File: document.go

package info (click to toggle)
golang-github-aws-aws-sdk-go-v2 1.24.1-2~bpo12%2B1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-backports
  • size: 554,032 kB
  • sloc: java: 15,941; makefile: 419; sh: 175
file content (34 lines) | stat: -rw-r--r-- 1,550 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Code generated by smithy-go-codegen DO NOT EDIT.

package document

import (
	internaldocument "github.com/aws/aws-sdk-go-v2/internal/protocoltest/awsrestjson/internal/document"
)

// Interface defines a document which is a protocol-agnostic type which supports a
// JSON-like data-model. You can use this type to send UTF-8 strings, arbitrary
// precision numbers, booleans, nulls, a list of these values, and a map of UTF-8
// strings to these values.
//
// You create a document type using the NewLazyDocument function and passing it
// the Go type to marshal. When receiving a document in an API response, you use
// the document's UnmarshalSmithyDocument function to decode the response to your
// desired Go type. Unless documented specifically generated structure types in
// client packages or client types packages are not supported at this time. Such
// types embed a noSmithyDocumentSerde and will cause an error to be returned when
// attempting to send an API request.
//
// For more information see the accompanying package documentation and linked
// references.
type Interface = internaldocument.Interface

// You create document type using the NewLazyDocument function and passing it the
// Go type to be marshaled and sent to the service. The document marshaler supports
// semantics similar to the encoding/json Go standard library.
//
// For more information see the accompanying package documentation and linked
// references.
func NewLazyDocument(v interface{}) Interface {
	return internaldocument.NewDocumentMarshaler(v)
}