package s3
import (
smithy
smithyxml
smithytime
smithyhttp
)
type awsRestxml_serializeOpAbortMultipartUpload struct {
}
func (*awsRestxml_serializeOpAbortMultipartUpload) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpAbortMultipartUpload) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*AbortMultipartUploadInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}/{Key+}?x-id=AbortMultipartUpload")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "DELETE"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsAbortMultipartUploadInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *AbortMultipartUploadInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
if .Key == nil || len(*.Key) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
}
if .Key != nil {
if := .SetURI("Key").String(*.Key); != nil {
return
}
}
if len(.RequestPayer) > 0 {
:= "X-Amz-Request-Payer"
.SetHeader().String(string(.RequestPayer))
}
if .UploadId != nil {
.SetQuery("uploadId").String(*.UploadId)
}
return nil
}
type awsRestxml_serializeOpCompleteMultipartUpload struct {
}
func (*awsRestxml_serializeOpCompleteMultipartUpload) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpCompleteMultipartUpload) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*CompleteMultipartUploadInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}/{Key+}?x-id=CompleteMultipartUpload")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "POST"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsCompleteMultipartUploadInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .MultipartUpload != nil {
if !.HasHeader("Content-Type") {
= smithyhttp.SetIsContentTypeDefaultValue(, true)
.SetHeader("Content-Type").String("application/xml")
}
:= smithyxml.NewEncoder(bytes.NewBuffer(nil))
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "CompleteMultipartUpload",
},
Attr: ,
}
.Attr = append(.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
if := awsRestxml_serializeDocumentCompletedMultipartUpload(.MultipartUpload, .RootElement()); != nil {
return , , &smithy.SerializationError{Err: }
}
:= bytes.NewReader(.Bytes())
if , = .SetStream(); != nil {
return , , &smithy.SerializationError{Err: }
}
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *CompleteMultipartUploadInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ChecksumCRC32 != nil && len(*.ChecksumCRC32) > 0 {
:= "X-Amz-Checksum-Crc32"
.SetHeader().String(*.ChecksumCRC32)
}
if .ChecksumCRC32C != nil && len(*.ChecksumCRC32C) > 0 {
:= "X-Amz-Checksum-Crc32c"
.SetHeader().String(*.ChecksumCRC32C)
}
if .ChecksumSHA1 != nil && len(*.ChecksumSHA1) > 0 {
:= "X-Amz-Checksum-Sha1"
.SetHeader().String(*.ChecksumSHA1)
}
if .ChecksumSHA256 != nil && len(*.ChecksumSHA256) > 0 {
:= "X-Amz-Checksum-Sha256"
.SetHeader().String(*.ChecksumSHA256)
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
if .Key == nil || len(*.Key) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
}
if .Key != nil {
if := .SetURI("Key").String(*.Key); != nil {
return
}
}
if len(.RequestPayer) > 0 {
:= "X-Amz-Request-Payer"
.SetHeader().String(string(.RequestPayer))
}
if .SSECustomerAlgorithm != nil && len(*.SSECustomerAlgorithm) > 0 {
:= "X-Amz-Server-Side-Encryption-Customer-Algorithm"
.SetHeader().String(*.SSECustomerAlgorithm)
}
if .SSECustomerKey != nil && len(*.SSECustomerKey) > 0 {
:= "X-Amz-Server-Side-Encryption-Customer-Key"
.SetHeader().String(*.SSECustomerKey)
}
if .SSECustomerKeyMD5 != nil && len(*.SSECustomerKeyMD5) > 0 {
:= "X-Amz-Server-Side-Encryption-Customer-Key-Md5"
.SetHeader().String(*.SSECustomerKeyMD5)
}
if .UploadId != nil {
.SetQuery("uploadId").String(*.UploadId)
}
return nil
}
type awsRestxml_serializeOpCopyObject struct {
}
func (*awsRestxml_serializeOpCopyObject) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpCopyObject) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*CopyObjectInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}/{Key+}?x-id=CopyObject")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "PUT"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsCopyObjectInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *CopyObjectInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if len(.ACL) > 0 {
:= "X-Amz-Acl"
.SetHeader().String(string(.ACL))
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .BucketKeyEnabled {
:= "X-Amz-Server-Side-Encryption-Bucket-Key-Enabled"
.SetHeader().Boolean(.BucketKeyEnabled)
}
if .CacheControl != nil && len(*.CacheControl) > 0 {
:= "Cache-Control"
.SetHeader().String(*.CacheControl)
}
if len(.ChecksumAlgorithm) > 0 {
:= "X-Amz-Checksum-Algorithm"
.SetHeader().String(string(.ChecksumAlgorithm))
}
if .ContentDisposition != nil && len(*.ContentDisposition) > 0 {
:= "Content-Disposition"
.SetHeader().String(*.ContentDisposition)
}
if .ContentEncoding != nil && len(*.ContentEncoding) > 0 {
:= "Content-Encoding"
.SetHeader().String(*.ContentEncoding)
}
if .ContentLanguage != nil && len(*.ContentLanguage) > 0 {
:= "Content-Language"
.SetHeader().String(*.ContentLanguage)
}
if .ContentType != nil && len(*.ContentType) > 0 {
:= "Content-Type"
.SetHeader().String(*.ContentType)
}
if .CopySource != nil && len(*.CopySource) > 0 {
:= "X-Amz-Copy-Source"
.SetHeader().String(*.CopySource)
}
if .CopySourceIfMatch != nil && len(*.CopySourceIfMatch) > 0 {
:= "X-Amz-Copy-Source-If-Match"
.SetHeader().String(*.CopySourceIfMatch)
}
if .CopySourceIfModifiedSince != nil {
:= "X-Amz-Copy-Source-If-Modified-Since"
.SetHeader().String(smithytime.FormatHTTPDate(*.CopySourceIfModifiedSince))
}
if .CopySourceIfNoneMatch != nil && len(*.CopySourceIfNoneMatch) > 0 {
:= "X-Amz-Copy-Source-If-None-Match"
.SetHeader().String(*.CopySourceIfNoneMatch)
}
if .CopySourceIfUnmodifiedSince != nil {
:= "X-Amz-Copy-Source-If-Unmodified-Since"
.SetHeader().String(smithytime.FormatHTTPDate(*.CopySourceIfUnmodifiedSince))
}
if .CopySourceSSECustomerAlgorithm != nil && len(*.CopySourceSSECustomerAlgorithm) > 0 {
:= "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Algorithm"
.SetHeader().String(*.CopySourceSSECustomerAlgorithm)
}
if .CopySourceSSECustomerKey != nil && len(*.CopySourceSSECustomerKey) > 0 {
:= "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key"
.SetHeader().String(*.CopySourceSSECustomerKey)
}
if .CopySourceSSECustomerKeyMD5 != nil && len(*.CopySourceSSECustomerKeyMD5) > 0 {
:= "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key-Md5"
.SetHeader().String(*.CopySourceSSECustomerKeyMD5)
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
if .ExpectedSourceBucketOwner != nil && len(*.ExpectedSourceBucketOwner) > 0 {
:= "X-Amz-Source-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedSourceBucketOwner)
}
if .Expires != nil {
:= "Expires"
.SetHeader().String(smithytime.FormatHTTPDate(*.Expires))
}
if .GrantFullControl != nil && len(*.GrantFullControl) > 0 {
:= "X-Amz-Grant-Full-Control"
.SetHeader().String(*.GrantFullControl)
}
if .GrantRead != nil && len(*.GrantRead) > 0 {
:= "X-Amz-Grant-Read"
.SetHeader().String(*.GrantRead)
}
if .GrantReadACP != nil && len(*.GrantReadACP) > 0 {
:= "X-Amz-Grant-Read-Acp"
.SetHeader().String(*.GrantReadACP)
}
if .GrantWriteACP != nil && len(*.GrantWriteACP) > 0 {
:= "X-Amz-Grant-Write-Acp"
.SetHeader().String(*.GrantWriteACP)
}
if .Key == nil || len(*.Key) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
}
if .Key != nil {
if := .SetURI("Key").String(*.Key); != nil {
return
}
}
if .Metadata != nil {
:= .Headers("X-Amz-Meta-")
for , := range .Metadata {
if len() > 0 {
.SetHeader(http.CanonicalHeaderKey()).String()
}
}
}
if len(.MetadataDirective) > 0 {
:= "X-Amz-Metadata-Directive"
.SetHeader().String(string(.MetadataDirective))
}
if len(.ObjectLockLegalHoldStatus) > 0 {
:= "X-Amz-Object-Lock-Legal-Hold"
.SetHeader().String(string(.ObjectLockLegalHoldStatus))
}
if len(.ObjectLockMode) > 0 {
:= "X-Amz-Object-Lock-Mode"
.SetHeader().String(string(.ObjectLockMode))
}
if .ObjectLockRetainUntilDate != nil {
:= "X-Amz-Object-Lock-Retain-Until-Date"
.SetHeader().String(smithytime.FormatDateTime(*.ObjectLockRetainUntilDate))
}
if len(.RequestPayer) > 0 {
:= "X-Amz-Request-Payer"
.SetHeader().String(string(.RequestPayer))
}
if len(.ServerSideEncryption) > 0 {
:= "X-Amz-Server-Side-Encryption"
.SetHeader().String(string(.ServerSideEncryption))
}
if .SSECustomerAlgorithm != nil && len(*.SSECustomerAlgorithm) > 0 {
:= "X-Amz-Server-Side-Encryption-Customer-Algorithm"
.SetHeader().String(*.SSECustomerAlgorithm)
}
if .SSECustomerKey != nil && len(*.SSECustomerKey) > 0 {
:= "X-Amz-Server-Side-Encryption-Customer-Key"
.SetHeader().String(*.SSECustomerKey)
}
if .SSECustomerKeyMD5 != nil && len(*.SSECustomerKeyMD5) > 0 {
:= "X-Amz-Server-Side-Encryption-Customer-Key-Md5"
.SetHeader().String(*.SSECustomerKeyMD5)
}
if .SSEKMSEncryptionContext != nil && len(*.SSEKMSEncryptionContext) > 0 {
:= "X-Amz-Server-Side-Encryption-Context"
.SetHeader().String(*.SSEKMSEncryptionContext)
}
if .SSEKMSKeyId != nil && len(*.SSEKMSKeyId) > 0 {
:= "X-Amz-Server-Side-Encryption-Aws-Kms-Key-Id"
.SetHeader().String(*.SSEKMSKeyId)
}
if len(.StorageClass) > 0 {
:= "X-Amz-Storage-Class"
.SetHeader().String(string(.StorageClass))
}
if .Tagging != nil && len(*.Tagging) > 0 {
:= "X-Amz-Tagging"
.SetHeader().String(*.Tagging)
}
if len(.TaggingDirective) > 0 {
:= "X-Amz-Tagging-Directive"
.SetHeader().String(string(.TaggingDirective))
}
if .WebsiteRedirectLocation != nil && len(*.WebsiteRedirectLocation) > 0 {
:= "X-Amz-Website-Redirect-Location"
.SetHeader().String(*.WebsiteRedirectLocation)
}
return nil
}
type awsRestxml_serializeOpCreateBucket struct {
}
func (*awsRestxml_serializeOpCreateBucket) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpCreateBucket) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*CreateBucketInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "PUT"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsCreateBucketInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .CreateBucketConfiguration != nil {
if !.HasHeader("Content-Type") {
= smithyhttp.SetIsContentTypeDefaultValue(, true)
.SetHeader("Content-Type").String("application/xml")
}
:= smithyxml.NewEncoder(bytes.NewBuffer(nil))
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "CreateBucketConfiguration",
},
Attr: ,
}
.Attr = append(.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
if := awsRestxml_serializeDocumentCreateBucketConfiguration(.CreateBucketConfiguration, .RootElement()); != nil {
return , , &smithy.SerializationError{Err: }
}
:= bytes.NewReader(.Bytes())
if , = .SetStream(); != nil {
return , , &smithy.SerializationError{Err: }
}
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *CreateBucketInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if len(.ACL) > 0 {
:= "X-Amz-Acl"
.SetHeader().String(string(.ACL))
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .GrantFullControl != nil && len(*.GrantFullControl) > 0 {
:= "X-Amz-Grant-Full-Control"
.SetHeader().String(*.GrantFullControl)
}
if .GrantRead != nil && len(*.GrantRead) > 0 {
:= "X-Amz-Grant-Read"
.SetHeader().String(*.GrantRead)
}
if .GrantReadACP != nil && len(*.GrantReadACP) > 0 {
:= "X-Amz-Grant-Read-Acp"
.SetHeader().String(*.GrantReadACP)
}
if .GrantWrite != nil && len(*.GrantWrite) > 0 {
:= "X-Amz-Grant-Write"
.SetHeader().String(*.GrantWrite)
}
if .GrantWriteACP != nil && len(*.GrantWriteACP) > 0 {
:= "X-Amz-Grant-Write-Acp"
.SetHeader().String(*.GrantWriteACP)
}
if .ObjectLockEnabledForBucket {
:= "X-Amz-Bucket-Object-Lock-Enabled"
.SetHeader().Boolean(.ObjectLockEnabledForBucket)
}
if len(.ObjectOwnership) > 0 {
:= "X-Amz-Object-Ownership"
.SetHeader().String(string(.ObjectOwnership))
}
return nil
}
type awsRestxml_serializeOpCreateMultipartUpload struct {
}
func (*awsRestxml_serializeOpCreateMultipartUpload) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpCreateMultipartUpload) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*CreateMultipartUploadInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}/{Key+}?uploads&x-id=CreateMultipartUpload")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "POST"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsCreateMultipartUploadInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *CreateMultipartUploadInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if len(.ACL) > 0 {
:= "X-Amz-Acl"
.SetHeader().String(string(.ACL))
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .BucketKeyEnabled {
:= "X-Amz-Server-Side-Encryption-Bucket-Key-Enabled"
.SetHeader().Boolean(.BucketKeyEnabled)
}
if .CacheControl != nil && len(*.CacheControl) > 0 {
:= "Cache-Control"
.SetHeader().String(*.CacheControl)
}
if len(.ChecksumAlgorithm) > 0 {
:= "X-Amz-Checksum-Algorithm"
.SetHeader().String(string(.ChecksumAlgorithm))
}
if .ContentDisposition != nil && len(*.ContentDisposition) > 0 {
:= "Content-Disposition"
.SetHeader().String(*.ContentDisposition)
}
if .ContentEncoding != nil && len(*.ContentEncoding) > 0 {
:= "Content-Encoding"
.SetHeader().String(*.ContentEncoding)
}
if .ContentLanguage != nil && len(*.ContentLanguage) > 0 {
:= "Content-Language"
.SetHeader().String(*.ContentLanguage)
}
if .ContentType != nil && len(*.ContentType) > 0 {
:= "Content-Type"
.SetHeader().String(*.ContentType)
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
if .Expires != nil {
:= "Expires"
.SetHeader().String(smithytime.FormatHTTPDate(*.Expires))
}
if .GrantFullControl != nil && len(*.GrantFullControl) > 0 {
:= "X-Amz-Grant-Full-Control"
.SetHeader().String(*.GrantFullControl)
}
if .GrantRead != nil && len(*.GrantRead) > 0 {
:= "X-Amz-Grant-Read"
.SetHeader().String(*.GrantRead)
}
if .GrantReadACP != nil && len(*.GrantReadACP) > 0 {
:= "X-Amz-Grant-Read-Acp"
.SetHeader().String(*.GrantReadACP)
}
if .GrantWriteACP != nil && len(*.GrantWriteACP) > 0 {
:= "X-Amz-Grant-Write-Acp"
.SetHeader().String(*.GrantWriteACP)
}
if .Key == nil || len(*.Key) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
}
if .Key != nil {
if := .SetURI("Key").String(*.Key); != nil {
return
}
}
if .Metadata != nil {
:= .Headers("X-Amz-Meta-")
for , := range .Metadata {
if len() > 0 {
.SetHeader(http.CanonicalHeaderKey()).String()
}
}
}
if len(.ObjectLockLegalHoldStatus) > 0 {
:= "X-Amz-Object-Lock-Legal-Hold"
.SetHeader().String(string(.ObjectLockLegalHoldStatus))
}
if len(.ObjectLockMode) > 0 {
:= "X-Amz-Object-Lock-Mode"
.SetHeader().String(string(.ObjectLockMode))
}
if .ObjectLockRetainUntilDate != nil {
:= "X-Amz-Object-Lock-Retain-Until-Date"
.SetHeader().String(smithytime.FormatDateTime(*.ObjectLockRetainUntilDate))
}
if len(.RequestPayer) > 0 {
:= "X-Amz-Request-Payer"
.SetHeader().String(string(.RequestPayer))
}
if len(.ServerSideEncryption) > 0 {
:= "X-Amz-Server-Side-Encryption"
.SetHeader().String(string(.ServerSideEncryption))
}
if .SSECustomerAlgorithm != nil && len(*.SSECustomerAlgorithm) > 0 {
:= "X-Amz-Server-Side-Encryption-Customer-Algorithm"
.SetHeader().String(*.SSECustomerAlgorithm)
}
if .SSECustomerKey != nil && len(*.SSECustomerKey) > 0 {
:= "X-Amz-Server-Side-Encryption-Customer-Key"
.SetHeader().String(*.SSECustomerKey)
}
if .SSECustomerKeyMD5 != nil && len(*.SSECustomerKeyMD5) > 0 {
:= "X-Amz-Server-Side-Encryption-Customer-Key-Md5"
.SetHeader().String(*.SSECustomerKeyMD5)
}
if .SSEKMSEncryptionContext != nil && len(*.SSEKMSEncryptionContext) > 0 {
:= "X-Amz-Server-Side-Encryption-Context"
.SetHeader().String(*.SSEKMSEncryptionContext)
}
if .SSEKMSKeyId != nil && len(*.SSEKMSKeyId) > 0 {
:= "X-Amz-Server-Side-Encryption-Aws-Kms-Key-Id"
.SetHeader().String(*.SSEKMSKeyId)
}
if len(.StorageClass) > 0 {
:= "X-Amz-Storage-Class"
.SetHeader().String(string(.StorageClass))
}
if .Tagging != nil && len(*.Tagging) > 0 {
:= "X-Amz-Tagging"
.SetHeader().String(*.Tagging)
}
if .WebsiteRedirectLocation != nil && len(*.WebsiteRedirectLocation) > 0 {
:= "X-Amz-Website-Redirect-Location"
.SetHeader().String(*.WebsiteRedirectLocation)
}
return nil
}
type awsRestxml_serializeOpDeleteBucket struct {
}
func (*awsRestxml_serializeOpDeleteBucket) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpDeleteBucket) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*DeleteBucketInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "DELETE"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsDeleteBucketInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *DeleteBucketInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
return nil
}
type awsRestxml_serializeOpDeleteBucketAnalyticsConfiguration struct {
}
func (*awsRestxml_serializeOpDeleteBucketAnalyticsConfiguration) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpDeleteBucketAnalyticsConfiguration) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*DeleteBucketAnalyticsConfigurationInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?analytics")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "DELETE"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsDeleteBucketAnalyticsConfigurationInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *DeleteBucketAnalyticsConfigurationInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
if .Id != nil {
.SetQuery("id").String(*.Id)
}
return nil
}
type awsRestxml_serializeOpDeleteBucketCors struct {
}
func (*awsRestxml_serializeOpDeleteBucketCors) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpDeleteBucketCors) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*DeleteBucketCorsInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?cors")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "DELETE"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsDeleteBucketCorsInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *DeleteBucketCorsInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
return nil
}
type awsRestxml_serializeOpDeleteBucketEncryption struct {
}
func (*awsRestxml_serializeOpDeleteBucketEncryption) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpDeleteBucketEncryption) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*DeleteBucketEncryptionInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?encryption")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "DELETE"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsDeleteBucketEncryptionInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *DeleteBucketEncryptionInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
return nil
}
type awsRestxml_serializeOpDeleteBucketIntelligentTieringConfiguration struct {
}
func (*awsRestxml_serializeOpDeleteBucketIntelligentTieringConfiguration) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpDeleteBucketIntelligentTieringConfiguration) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*DeleteBucketIntelligentTieringConfigurationInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?intelligent-tiering")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "DELETE"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsDeleteBucketIntelligentTieringConfigurationInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *DeleteBucketIntelligentTieringConfigurationInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .Id != nil {
.SetQuery("id").String(*.Id)
}
return nil
}
type awsRestxml_serializeOpDeleteBucketInventoryConfiguration struct {
}
func (*awsRestxml_serializeOpDeleteBucketInventoryConfiguration) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpDeleteBucketInventoryConfiguration) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*DeleteBucketInventoryConfigurationInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?inventory")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "DELETE"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsDeleteBucketInventoryConfigurationInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *DeleteBucketInventoryConfigurationInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
if .Id != nil {
.SetQuery("id").String(*.Id)
}
return nil
}
type awsRestxml_serializeOpDeleteBucketLifecycle struct {
}
func (*awsRestxml_serializeOpDeleteBucketLifecycle) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpDeleteBucketLifecycle) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*DeleteBucketLifecycleInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?lifecycle")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "DELETE"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsDeleteBucketLifecycleInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *DeleteBucketLifecycleInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
return nil
}
type awsRestxml_serializeOpDeleteBucketMetricsConfiguration struct {
}
func (*awsRestxml_serializeOpDeleteBucketMetricsConfiguration) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpDeleteBucketMetricsConfiguration) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*DeleteBucketMetricsConfigurationInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?metrics")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "DELETE"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsDeleteBucketMetricsConfigurationInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *DeleteBucketMetricsConfigurationInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
if .Id != nil {
.SetQuery("id").String(*.Id)
}
return nil
}
type awsRestxml_serializeOpDeleteBucketOwnershipControls struct {
}
func (*awsRestxml_serializeOpDeleteBucketOwnershipControls) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpDeleteBucketOwnershipControls) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*DeleteBucketOwnershipControlsInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?ownershipControls")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "DELETE"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsDeleteBucketOwnershipControlsInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *DeleteBucketOwnershipControlsInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
return nil
}
type awsRestxml_serializeOpDeleteBucketPolicy struct {
}
func (*awsRestxml_serializeOpDeleteBucketPolicy) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpDeleteBucketPolicy) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*DeleteBucketPolicyInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?policy")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "DELETE"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsDeleteBucketPolicyInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *DeleteBucketPolicyInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
return nil
}
type awsRestxml_serializeOpDeleteBucketReplication struct {
}
func (*awsRestxml_serializeOpDeleteBucketReplication) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpDeleteBucketReplication) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*DeleteBucketReplicationInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?replication")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "DELETE"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsDeleteBucketReplicationInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *DeleteBucketReplicationInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
return nil
}
type awsRestxml_serializeOpDeleteBucketTagging struct {
}
func (*awsRestxml_serializeOpDeleteBucketTagging) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpDeleteBucketTagging) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*DeleteBucketTaggingInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?tagging")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "DELETE"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsDeleteBucketTaggingInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *DeleteBucketTaggingInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
return nil
}
type awsRestxml_serializeOpDeleteBucketWebsite struct {
}
func (*awsRestxml_serializeOpDeleteBucketWebsite) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpDeleteBucketWebsite) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*DeleteBucketWebsiteInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?website")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "DELETE"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsDeleteBucketWebsiteInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *DeleteBucketWebsiteInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
return nil
}
type awsRestxml_serializeOpDeleteObject struct {
}
func (*awsRestxml_serializeOpDeleteObject) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpDeleteObject) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*DeleteObjectInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}/{Key+}?x-id=DeleteObject")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "DELETE"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsDeleteObjectInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *DeleteObjectInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .BypassGovernanceRetention {
:= "X-Amz-Bypass-Governance-Retention"
.SetHeader().Boolean(.BypassGovernanceRetention)
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
if .Key == nil || len(*.Key) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
}
if .Key != nil {
if := .SetURI("Key").String(*.Key); != nil {
return
}
}
if .MFA != nil && len(*.MFA) > 0 {
:= "X-Amz-Mfa"
.SetHeader().String(*.MFA)
}
if len(.RequestPayer) > 0 {
:= "X-Amz-Request-Payer"
.SetHeader().String(string(.RequestPayer))
}
if .VersionId != nil {
.SetQuery("versionId").String(*.VersionId)
}
return nil
}
type awsRestxml_serializeOpDeleteObjects struct {
}
func (*awsRestxml_serializeOpDeleteObjects) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpDeleteObjects) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*DeleteObjectsInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?delete&x-id=DeleteObjects")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "POST"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsDeleteObjectsInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Delete != nil {
if !.HasHeader("Content-Type") {
= smithyhttp.SetIsContentTypeDefaultValue(, true)
.SetHeader("Content-Type").String("application/xml")
}
:= smithyxml.NewEncoder(bytes.NewBuffer(nil))
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Delete",
},
Attr: ,
}
.Attr = append(.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
if := awsRestxml_serializeDocumentDelete(.Delete, .RootElement()); != nil {
return , , &smithy.SerializationError{Err: }
}
:= bytes.NewReader(.Bytes())
if , = .SetStream(); != nil {
return , , &smithy.SerializationError{Err: }
}
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *DeleteObjectsInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .BypassGovernanceRetention {
:= "X-Amz-Bypass-Governance-Retention"
.SetHeader().Boolean(.BypassGovernanceRetention)
}
if len(.ChecksumAlgorithm) > 0 {
:= "X-Amz-Sdk-Checksum-Algorithm"
.SetHeader().String(string(.ChecksumAlgorithm))
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
if .MFA != nil && len(*.MFA) > 0 {
:= "X-Amz-Mfa"
.SetHeader().String(*.MFA)
}
if len(.RequestPayer) > 0 {
:= "X-Amz-Request-Payer"
.SetHeader().String(string(.RequestPayer))
}
return nil
}
type awsRestxml_serializeOpDeleteObjectTagging struct {
}
func (*awsRestxml_serializeOpDeleteObjectTagging) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpDeleteObjectTagging) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*DeleteObjectTaggingInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}/{Key+}?tagging")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "DELETE"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsDeleteObjectTaggingInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *DeleteObjectTaggingInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
if .Key == nil || len(*.Key) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
}
if .Key != nil {
if := .SetURI("Key").String(*.Key); != nil {
return
}
}
if .VersionId != nil {
.SetQuery("versionId").String(*.VersionId)
}
return nil
}
type awsRestxml_serializeOpDeletePublicAccessBlock struct {
}
func (*awsRestxml_serializeOpDeletePublicAccessBlock) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpDeletePublicAccessBlock) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*DeletePublicAccessBlockInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?publicAccessBlock")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "DELETE"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsDeletePublicAccessBlockInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *DeletePublicAccessBlockInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
return nil
}
type awsRestxml_serializeOpGetBucketAccelerateConfiguration struct {
}
func (*awsRestxml_serializeOpGetBucketAccelerateConfiguration) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpGetBucketAccelerateConfiguration) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*GetBucketAccelerateConfigurationInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?accelerate")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "GET"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsGetBucketAccelerateConfigurationInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *GetBucketAccelerateConfigurationInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
return nil
}
type awsRestxml_serializeOpGetBucketAcl struct {
}
func (*awsRestxml_serializeOpGetBucketAcl) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpGetBucketAcl) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*GetBucketAclInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?acl")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "GET"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsGetBucketAclInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *GetBucketAclInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
return nil
}
type awsRestxml_serializeOpGetBucketAnalyticsConfiguration struct {
}
func (*awsRestxml_serializeOpGetBucketAnalyticsConfiguration) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpGetBucketAnalyticsConfiguration) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*GetBucketAnalyticsConfigurationInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?analytics&x-id=GetBucketAnalyticsConfiguration")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "GET"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsGetBucketAnalyticsConfigurationInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *GetBucketAnalyticsConfigurationInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
if .Id != nil {
.SetQuery("id").String(*.Id)
}
return nil
}
type awsRestxml_serializeOpGetBucketCors struct {
}
func (*awsRestxml_serializeOpGetBucketCors) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpGetBucketCors) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*GetBucketCorsInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?cors")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "GET"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsGetBucketCorsInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *GetBucketCorsInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
return nil
}
type awsRestxml_serializeOpGetBucketEncryption struct {
}
func (*awsRestxml_serializeOpGetBucketEncryption) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpGetBucketEncryption) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*GetBucketEncryptionInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?encryption")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "GET"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsGetBucketEncryptionInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *GetBucketEncryptionInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
return nil
}
type awsRestxml_serializeOpGetBucketIntelligentTieringConfiguration struct {
}
func (*awsRestxml_serializeOpGetBucketIntelligentTieringConfiguration) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpGetBucketIntelligentTieringConfiguration) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*GetBucketIntelligentTieringConfigurationInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?intelligent-tiering&x-id=GetBucketIntelligentTieringConfiguration")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "GET"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsGetBucketIntelligentTieringConfigurationInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *GetBucketIntelligentTieringConfigurationInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .Id != nil {
.SetQuery("id").String(*.Id)
}
return nil
}
type awsRestxml_serializeOpGetBucketInventoryConfiguration struct {
}
func (*awsRestxml_serializeOpGetBucketInventoryConfiguration) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpGetBucketInventoryConfiguration) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*GetBucketInventoryConfigurationInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?inventory&x-id=GetBucketInventoryConfiguration")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "GET"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsGetBucketInventoryConfigurationInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *GetBucketInventoryConfigurationInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
if .Id != nil {
.SetQuery("id").String(*.Id)
}
return nil
}
type awsRestxml_serializeOpGetBucketLifecycleConfiguration struct {
}
func (*awsRestxml_serializeOpGetBucketLifecycleConfiguration) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpGetBucketLifecycleConfiguration) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*GetBucketLifecycleConfigurationInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?lifecycle")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "GET"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsGetBucketLifecycleConfigurationInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *GetBucketLifecycleConfigurationInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
return nil
}
type awsRestxml_serializeOpGetBucketLocation struct {
}
func (*awsRestxml_serializeOpGetBucketLocation) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpGetBucketLocation) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*GetBucketLocationInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?location")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "GET"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsGetBucketLocationInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *GetBucketLocationInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
return nil
}
type awsRestxml_serializeOpGetBucketLogging struct {
}
func (*awsRestxml_serializeOpGetBucketLogging) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpGetBucketLogging) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*GetBucketLoggingInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?logging")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "GET"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsGetBucketLoggingInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *GetBucketLoggingInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
return nil
}
type awsRestxml_serializeOpGetBucketMetricsConfiguration struct {
}
func (*awsRestxml_serializeOpGetBucketMetricsConfiguration) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpGetBucketMetricsConfiguration) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*GetBucketMetricsConfigurationInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?metrics&x-id=GetBucketMetricsConfiguration")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "GET"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsGetBucketMetricsConfigurationInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *GetBucketMetricsConfigurationInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
if .Id != nil {
.SetQuery("id").String(*.Id)
}
return nil
}
type awsRestxml_serializeOpGetBucketNotificationConfiguration struct {
}
func (*awsRestxml_serializeOpGetBucketNotificationConfiguration) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpGetBucketNotificationConfiguration) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*GetBucketNotificationConfigurationInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?notification")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "GET"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsGetBucketNotificationConfigurationInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *GetBucketNotificationConfigurationInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
return nil
}
type awsRestxml_serializeOpGetBucketOwnershipControls struct {
}
func (*awsRestxml_serializeOpGetBucketOwnershipControls) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpGetBucketOwnershipControls) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*GetBucketOwnershipControlsInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?ownershipControls")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "GET"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsGetBucketOwnershipControlsInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *GetBucketOwnershipControlsInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
return nil
}
type awsRestxml_serializeOpGetBucketPolicy struct {
}
func (*awsRestxml_serializeOpGetBucketPolicy) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpGetBucketPolicy) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*GetBucketPolicyInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?policy")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "GET"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsGetBucketPolicyInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *GetBucketPolicyInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
return nil
}
type awsRestxml_serializeOpGetBucketPolicyStatus struct {
}
func (*awsRestxml_serializeOpGetBucketPolicyStatus) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpGetBucketPolicyStatus) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*GetBucketPolicyStatusInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?policyStatus")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "GET"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsGetBucketPolicyStatusInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *GetBucketPolicyStatusInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
return nil
}
type awsRestxml_serializeOpGetBucketReplication struct {
}
func (*awsRestxml_serializeOpGetBucketReplication) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpGetBucketReplication) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*GetBucketReplicationInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?replication")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "GET"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsGetBucketReplicationInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *GetBucketReplicationInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
return nil
}
type awsRestxml_serializeOpGetBucketRequestPayment struct {
}
func (*awsRestxml_serializeOpGetBucketRequestPayment) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpGetBucketRequestPayment) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*GetBucketRequestPaymentInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?requestPayment")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "GET"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsGetBucketRequestPaymentInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *GetBucketRequestPaymentInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
return nil
}
type awsRestxml_serializeOpGetBucketTagging struct {
}
func (*awsRestxml_serializeOpGetBucketTagging) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpGetBucketTagging) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*GetBucketTaggingInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?tagging")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "GET"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsGetBucketTaggingInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *GetBucketTaggingInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
return nil
}
type awsRestxml_serializeOpGetBucketVersioning struct {
}
func (*awsRestxml_serializeOpGetBucketVersioning) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpGetBucketVersioning) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*GetBucketVersioningInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?versioning")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "GET"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsGetBucketVersioningInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *GetBucketVersioningInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
return nil
}
type awsRestxml_serializeOpGetBucketWebsite struct {
}
func (*awsRestxml_serializeOpGetBucketWebsite) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpGetBucketWebsite) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*GetBucketWebsiteInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?website")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "GET"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsGetBucketWebsiteInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *GetBucketWebsiteInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
return nil
}
type awsRestxml_serializeOpGetObject struct {
}
func (*awsRestxml_serializeOpGetObject) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpGetObject) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*GetObjectInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}/{Key+}?x-id=GetObject")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "GET"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsGetObjectInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *GetObjectInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if len(.ChecksumMode) > 0 {
:= "X-Amz-Checksum-Mode"
.SetHeader().String(string(.ChecksumMode))
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
if .IfMatch != nil && len(*.IfMatch) > 0 {
:= "If-Match"
.SetHeader().String(*.IfMatch)
}
if .IfModifiedSince != nil {
:= "If-Modified-Since"
.SetHeader().String(smithytime.FormatHTTPDate(*.IfModifiedSince))
}
if .IfNoneMatch != nil && len(*.IfNoneMatch) > 0 {
:= "If-None-Match"
.SetHeader().String(*.IfNoneMatch)
}
if .IfUnmodifiedSince != nil {
:= "If-Unmodified-Since"
.SetHeader().String(smithytime.FormatHTTPDate(*.IfUnmodifiedSince))
}
if .Key == nil || len(*.Key) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
}
if .Key != nil {
if := .SetURI("Key").String(*.Key); != nil {
return
}
}
if .PartNumber != 0 {
.SetQuery("partNumber").Integer(.PartNumber)
}
if .Range != nil && len(*.Range) > 0 {
:= "Range"
.SetHeader().String(*.Range)
}
if len(.RequestPayer) > 0 {
:= "X-Amz-Request-Payer"
.SetHeader().String(string(.RequestPayer))
}
if .ResponseCacheControl != nil {
.SetQuery("response-cache-control").String(*.ResponseCacheControl)
}
if .ResponseContentDisposition != nil {
.SetQuery("response-content-disposition").String(*.ResponseContentDisposition)
}
if .ResponseContentEncoding != nil {
.SetQuery("response-content-encoding").String(*.ResponseContentEncoding)
}
if .ResponseContentLanguage != nil {
.SetQuery("response-content-language").String(*.ResponseContentLanguage)
}
if .ResponseContentType != nil {
.SetQuery("response-content-type").String(*.ResponseContentType)
}
if .ResponseExpires != nil {
.SetQuery("response-expires").String(smithytime.FormatHTTPDate(*.ResponseExpires))
}
if .SSECustomerAlgorithm != nil && len(*.SSECustomerAlgorithm) > 0 {
:= "X-Amz-Server-Side-Encryption-Customer-Algorithm"
.SetHeader().String(*.SSECustomerAlgorithm)
}
if .SSECustomerKey != nil && len(*.SSECustomerKey) > 0 {
:= "X-Amz-Server-Side-Encryption-Customer-Key"
.SetHeader().String(*.SSECustomerKey)
}
if .SSECustomerKeyMD5 != nil && len(*.SSECustomerKeyMD5) > 0 {
:= "X-Amz-Server-Side-Encryption-Customer-Key-Md5"
.SetHeader().String(*.SSECustomerKeyMD5)
}
if .VersionId != nil {
.SetQuery("versionId").String(*.VersionId)
}
return nil
}
type awsRestxml_serializeOpGetObjectAcl struct {
}
func (*awsRestxml_serializeOpGetObjectAcl) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpGetObjectAcl) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*GetObjectAclInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}/{Key+}?acl")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "GET"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsGetObjectAclInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *GetObjectAclInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
if .Key == nil || len(*.Key) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
}
if .Key != nil {
if := .SetURI("Key").String(*.Key); != nil {
return
}
}
if len(.RequestPayer) > 0 {
:= "X-Amz-Request-Payer"
.SetHeader().String(string(.RequestPayer))
}
if .VersionId != nil {
.SetQuery("versionId").String(*.VersionId)
}
return nil
}
type awsRestxml_serializeOpGetObjectAttributes struct {
}
func (*awsRestxml_serializeOpGetObjectAttributes) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpGetObjectAttributes) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*GetObjectAttributesInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}/{Key+}?attributes")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "GET"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsGetObjectAttributesInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *GetObjectAttributesInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
if .Key == nil || len(*.Key) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
}
if .Key != nil {
if := .SetURI("Key").String(*.Key); != nil {
return
}
}
if .MaxParts != 0 {
:= "X-Amz-Max-Parts"
.SetHeader().Integer(.MaxParts)
}
if .ObjectAttributes != nil {
:= "X-Amz-Object-Attributes"
for := range .ObjectAttributes {
if len(.ObjectAttributes[]) > 0 {
:= string(.ObjectAttributes[])
if strings.Index(string(.ObjectAttributes[]), `,`) != -1 || strings.Index(string(.ObjectAttributes[]), `"`) != -1 {
= strconv.Quote(string(.ObjectAttributes[]))
}
.AddHeader().String(string())
}
}
}
if .PartNumberMarker != nil && len(*.PartNumberMarker) > 0 {
:= "X-Amz-Part-Number-Marker"
.SetHeader().String(*.PartNumberMarker)
}
if len(.RequestPayer) > 0 {
:= "X-Amz-Request-Payer"
.SetHeader().String(string(.RequestPayer))
}
if .SSECustomerAlgorithm != nil && len(*.SSECustomerAlgorithm) > 0 {
:= "X-Amz-Server-Side-Encryption-Customer-Algorithm"
.SetHeader().String(*.SSECustomerAlgorithm)
}
if .SSECustomerKey != nil && len(*.SSECustomerKey) > 0 {
:= "X-Amz-Server-Side-Encryption-Customer-Key"
.SetHeader().String(*.SSECustomerKey)
}
if .SSECustomerKeyMD5 != nil && len(*.SSECustomerKeyMD5) > 0 {
:= "X-Amz-Server-Side-Encryption-Customer-Key-Md5"
.SetHeader().String(*.SSECustomerKeyMD5)
}
if .VersionId != nil {
.SetQuery("versionId").String(*.VersionId)
}
return nil
}
type awsRestxml_serializeOpGetObjectLegalHold struct {
}
func (*awsRestxml_serializeOpGetObjectLegalHold) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpGetObjectLegalHold) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*GetObjectLegalHoldInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}/{Key+}?legal-hold")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "GET"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsGetObjectLegalHoldInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *GetObjectLegalHoldInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
if .Key == nil || len(*.Key) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
}
if .Key != nil {
if := .SetURI("Key").String(*.Key); != nil {
return
}
}
if len(.RequestPayer) > 0 {
:= "X-Amz-Request-Payer"
.SetHeader().String(string(.RequestPayer))
}
if .VersionId != nil {
.SetQuery("versionId").String(*.VersionId)
}
return nil
}
type awsRestxml_serializeOpGetObjectLockConfiguration struct {
}
func (*awsRestxml_serializeOpGetObjectLockConfiguration) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpGetObjectLockConfiguration) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*GetObjectLockConfigurationInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?object-lock")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "GET"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsGetObjectLockConfigurationInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *GetObjectLockConfigurationInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
return nil
}
type awsRestxml_serializeOpGetObjectRetention struct {
}
func (*awsRestxml_serializeOpGetObjectRetention) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpGetObjectRetention) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*GetObjectRetentionInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}/{Key+}?retention")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "GET"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsGetObjectRetentionInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *GetObjectRetentionInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
if .Key == nil || len(*.Key) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
}
if .Key != nil {
if := .SetURI("Key").String(*.Key); != nil {
return
}
}
if len(.RequestPayer) > 0 {
:= "X-Amz-Request-Payer"
.SetHeader().String(string(.RequestPayer))
}
if .VersionId != nil {
.SetQuery("versionId").String(*.VersionId)
}
return nil
}
type awsRestxml_serializeOpGetObjectTagging struct {
}
func (*awsRestxml_serializeOpGetObjectTagging) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpGetObjectTagging) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*GetObjectTaggingInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}/{Key+}?tagging")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "GET"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsGetObjectTaggingInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *GetObjectTaggingInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
if .Key == nil || len(*.Key) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
}
if .Key != nil {
if := .SetURI("Key").String(*.Key); != nil {
return
}
}
if len(.RequestPayer) > 0 {
:= "X-Amz-Request-Payer"
.SetHeader().String(string(.RequestPayer))
}
if .VersionId != nil {
.SetQuery("versionId").String(*.VersionId)
}
return nil
}
type awsRestxml_serializeOpGetObjectTorrent struct {
}
func (*awsRestxml_serializeOpGetObjectTorrent) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpGetObjectTorrent) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*GetObjectTorrentInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}/{Key+}?torrent")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "GET"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsGetObjectTorrentInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *GetObjectTorrentInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
if .Key == nil || len(*.Key) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
}
if .Key != nil {
if := .SetURI("Key").String(*.Key); != nil {
return
}
}
if len(.RequestPayer) > 0 {
:= "X-Amz-Request-Payer"
.SetHeader().String(string(.RequestPayer))
}
return nil
}
type awsRestxml_serializeOpGetPublicAccessBlock struct {
}
func (*awsRestxml_serializeOpGetPublicAccessBlock) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpGetPublicAccessBlock) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*GetPublicAccessBlockInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?publicAccessBlock")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "GET"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsGetPublicAccessBlockInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *GetPublicAccessBlockInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
return nil
}
type awsRestxml_serializeOpHeadBucket struct {
}
func (*awsRestxml_serializeOpHeadBucket) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpHeadBucket) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*HeadBucketInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "HEAD"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsHeadBucketInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *HeadBucketInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
return nil
}
type awsRestxml_serializeOpHeadObject struct {
}
func (*awsRestxml_serializeOpHeadObject) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpHeadObject) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*HeadObjectInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}/{Key+}")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "HEAD"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsHeadObjectInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *HeadObjectInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if len(.ChecksumMode) > 0 {
:= "X-Amz-Checksum-Mode"
.SetHeader().String(string(.ChecksumMode))
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
if .IfMatch != nil && len(*.IfMatch) > 0 {
:= "If-Match"
.SetHeader().String(*.IfMatch)
}
if .IfModifiedSince != nil {
:= "If-Modified-Since"
.SetHeader().String(smithytime.FormatHTTPDate(*.IfModifiedSince))
}
if .IfNoneMatch != nil && len(*.IfNoneMatch) > 0 {
:= "If-None-Match"
.SetHeader().String(*.IfNoneMatch)
}
if .IfUnmodifiedSince != nil {
:= "If-Unmodified-Since"
.SetHeader().String(smithytime.FormatHTTPDate(*.IfUnmodifiedSince))
}
if .Key == nil || len(*.Key) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
}
if .Key != nil {
if := .SetURI("Key").String(*.Key); != nil {
return
}
}
if .PartNumber != 0 {
.SetQuery("partNumber").Integer(.PartNumber)
}
if .Range != nil && len(*.Range) > 0 {
:= "Range"
.SetHeader().String(*.Range)
}
if len(.RequestPayer) > 0 {
:= "X-Amz-Request-Payer"
.SetHeader().String(string(.RequestPayer))
}
if .SSECustomerAlgorithm != nil && len(*.SSECustomerAlgorithm) > 0 {
:= "X-Amz-Server-Side-Encryption-Customer-Algorithm"
.SetHeader().String(*.SSECustomerAlgorithm)
}
if .SSECustomerKey != nil && len(*.SSECustomerKey) > 0 {
:= "X-Amz-Server-Side-Encryption-Customer-Key"
.SetHeader().String(*.SSECustomerKey)
}
if .SSECustomerKeyMD5 != nil && len(*.SSECustomerKeyMD5) > 0 {
:= "X-Amz-Server-Side-Encryption-Customer-Key-Md5"
.SetHeader().String(*.SSECustomerKeyMD5)
}
if .VersionId != nil {
.SetQuery("versionId").String(*.VersionId)
}
return nil
}
type awsRestxml_serializeOpListBucketAnalyticsConfigurations struct {
}
func (*awsRestxml_serializeOpListBucketAnalyticsConfigurations) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpListBucketAnalyticsConfigurations) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*ListBucketAnalyticsConfigurationsInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?analytics&x-id=ListBucketAnalyticsConfigurations")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "GET"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsListBucketAnalyticsConfigurationsInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *ListBucketAnalyticsConfigurationsInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ContinuationToken != nil {
.SetQuery("continuation-token").String(*.ContinuationToken)
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
return nil
}
type awsRestxml_serializeOpListBucketIntelligentTieringConfigurations struct {
}
func (*awsRestxml_serializeOpListBucketIntelligentTieringConfigurations) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpListBucketIntelligentTieringConfigurations) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*ListBucketIntelligentTieringConfigurationsInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?intelligent-tiering&x-id=ListBucketIntelligentTieringConfigurations")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "GET"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsListBucketIntelligentTieringConfigurationsInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *ListBucketIntelligentTieringConfigurationsInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ContinuationToken != nil {
.SetQuery("continuation-token").String(*.ContinuationToken)
}
return nil
}
type awsRestxml_serializeOpListBucketInventoryConfigurations struct {
}
func (*awsRestxml_serializeOpListBucketInventoryConfigurations) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpListBucketInventoryConfigurations) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*ListBucketInventoryConfigurationsInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?inventory&x-id=ListBucketInventoryConfigurations")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "GET"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsListBucketInventoryConfigurationsInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *ListBucketInventoryConfigurationsInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ContinuationToken != nil {
.SetQuery("continuation-token").String(*.ContinuationToken)
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
return nil
}
type awsRestxml_serializeOpListBucketMetricsConfigurations struct {
}
func (*awsRestxml_serializeOpListBucketMetricsConfigurations) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpListBucketMetricsConfigurations) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*ListBucketMetricsConfigurationsInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?metrics&x-id=ListBucketMetricsConfigurations")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "GET"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsListBucketMetricsConfigurationsInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *ListBucketMetricsConfigurationsInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ContinuationToken != nil {
.SetQuery("continuation-token").String(*.ContinuationToken)
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
return nil
}
type awsRestxml_serializeOpListBuckets struct {
}
func (*awsRestxml_serializeOpListBuckets) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpListBuckets) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*ListBucketsInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "GET"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *ListBucketsInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
return nil
}
type awsRestxml_serializeOpListMultipartUploads struct {
}
func (*awsRestxml_serializeOpListMultipartUploads) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpListMultipartUploads) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*ListMultipartUploadsInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?uploads")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "GET"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsListMultipartUploadsInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *ListMultipartUploadsInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .Delimiter != nil {
.SetQuery("delimiter").String(*.Delimiter)
}
if len(.EncodingType) > 0 {
.SetQuery("encoding-type").String(string(.EncodingType))
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
if .KeyMarker != nil {
.SetQuery("key-marker").String(*.KeyMarker)
}
if .MaxUploads != 0 {
.SetQuery("max-uploads").Integer(.MaxUploads)
}
if .Prefix != nil {
.SetQuery("prefix").String(*.Prefix)
}
if .UploadIdMarker != nil {
.SetQuery("upload-id-marker").String(*.UploadIdMarker)
}
return nil
}
type awsRestxml_serializeOpListObjects struct {
}
func (*awsRestxml_serializeOpListObjects) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpListObjects) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*ListObjectsInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "GET"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsListObjectsInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *ListObjectsInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .Delimiter != nil {
.SetQuery("delimiter").String(*.Delimiter)
}
if len(.EncodingType) > 0 {
.SetQuery("encoding-type").String(string(.EncodingType))
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
if .Marker != nil {
.SetQuery("marker").String(*.Marker)
}
if .MaxKeys != 0 {
.SetQuery("max-keys").Integer(.MaxKeys)
}
if .Prefix != nil {
.SetQuery("prefix").String(*.Prefix)
}
if len(.RequestPayer) > 0 {
:= "X-Amz-Request-Payer"
.SetHeader().String(string(.RequestPayer))
}
return nil
}
type awsRestxml_serializeOpListObjectsV2 struct {
}
func (*awsRestxml_serializeOpListObjectsV2) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpListObjectsV2) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*ListObjectsV2Input)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?list-type=2")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "GET"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsListObjectsV2Input(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *ListObjectsV2Input, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ContinuationToken != nil {
.SetQuery("continuation-token").String(*.ContinuationToken)
}
if .Delimiter != nil {
.SetQuery("delimiter").String(*.Delimiter)
}
if len(.EncodingType) > 0 {
.SetQuery("encoding-type").String(string(.EncodingType))
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
if .FetchOwner {
.SetQuery("fetch-owner").Boolean(.FetchOwner)
}
if .MaxKeys != 0 {
.SetQuery("max-keys").Integer(.MaxKeys)
}
if .Prefix != nil {
.SetQuery("prefix").String(*.Prefix)
}
if len(.RequestPayer) > 0 {
:= "X-Amz-Request-Payer"
.SetHeader().String(string(.RequestPayer))
}
if .StartAfter != nil {
.SetQuery("start-after").String(*.StartAfter)
}
return nil
}
type awsRestxml_serializeOpListObjectVersions struct {
}
func (*awsRestxml_serializeOpListObjectVersions) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpListObjectVersions) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*ListObjectVersionsInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?versions")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "GET"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsListObjectVersionsInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *ListObjectVersionsInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .Delimiter != nil {
.SetQuery("delimiter").String(*.Delimiter)
}
if len(.EncodingType) > 0 {
.SetQuery("encoding-type").String(string(.EncodingType))
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
if .KeyMarker != nil {
.SetQuery("key-marker").String(*.KeyMarker)
}
if .MaxKeys != 0 {
.SetQuery("max-keys").Integer(.MaxKeys)
}
if .Prefix != nil {
.SetQuery("prefix").String(*.Prefix)
}
if .VersionIdMarker != nil {
.SetQuery("version-id-marker").String(*.VersionIdMarker)
}
return nil
}
type awsRestxml_serializeOpListParts struct {
}
func (*awsRestxml_serializeOpListParts) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpListParts) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*ListPartsInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}/{Key+}?x-id=ListParts")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "GET"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsListPartsInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *ListPartsInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
if .Key == nil || len(*.Key) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
}
if .Key != nil {
if := .SetURI("Key").String(*.Key); != nil {
return
}
}
if .MaxParts != 0 {
.SetQuery("max-parts").Integer(.MaxParts)
}
if .PartNumberMarker != nil {
.SetQuery("part-number-marker").String(*.PartNumberMarker)
}
if len(.RequestPayer) > 0 {
:= "X-Amz-Request-Payer"
.SetHeader().String(string(.RequestPayer))
}
if .SSECustomerAlgorithm != nil && len(*.SSECustomerAlgorithm) > 0 {
:= "X-Amz-Server-Side-Encryption-Customer-Algorithm"
.SetHeader().String(*.SSECustomerAlgorithm)
}
if .SSECustomerKey != nil && len(*.SSECustomerKey) > 0 {
:= "X-Amz-Server-Side-Encryption-Customer-Key"
.SetHeader().String(*.SSECustomerKey)
}
if .SSECustomerKeyMD5 != nil && len(*.SSECustomerKeyMD5) > 0 {
:= "X-Amz-Server-Side-Encryption-Customer-Key-Md5"
.SetHeader().String(*.SSECustomerKeyMD5)
}
if .UploadId != nil {
.SetQuery("uploadId").String(*.UploadId)
}
return nil
}
type awsRestxml_serializeOpPutBucketAccelerateConfiguration struct {
}
func (*awsRestxml_serializeOpPutBucketAccelerateConfiguration) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpPutBucketAccelerateConfiguration) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*PutBucketAccelerateConfigurationInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?accelerate")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "PUT"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsPutBucketAccelerateConfigurationInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .AccelerateConfiguration != nil {
if !.HasHeader("Content-Type") {
= smithyhttp.SetIsContentTypeDefaultValue(, true)
.SetHeader("Content-Type").String("application/xml")
}
:= smithyxml.NewEncoder(bytes.NewBuffer(nil))
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "AccelerateConfiguration",
},
Attr: ,
}
.Attr = append(.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
if := awsRestxml_serializeDocumentAccelerateConfiguration(.AccelerateConfiguration, .RootElement()); != nil {
return , , &smithy.SerializationError{Err: }
}
:= bytes.NewReader(.Bytes())
if , = .SetStream(); != nil {
return , , &smithy.SerializationError{Err: }
}
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *PutBucketAccelerateConfigurationInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if len(.ChecksumAlgorithm) > 0 {
:= "X-Amz-Sdk-Checksum-Algorithm"
.SetHeader().String(string(.ChecksumAlgorithm))
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
return nil
}
type awsRestxml_serializeOpPutBucketAcl struct {
}
func (*awsRestxml_serializeOpPutBucketAcl) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpPutBucketAcl) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*PutBucketAclInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?acl")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "PUT"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsPutBucketAclInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .AccessControlPolicy != nil {
if !.HasHeader("Content-Type") {
= smithyhttp.SetIsContentTypeDefaultValue(, true)
.SetHeader("Content-Type").String("application/xml")
}
:= smithyxml.NewEncoder(bytes.NewBuffer(nil))
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "AccessControlPolicy",
},
Attr: ,
}
.Attr = append(.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
if := awsRestxml_serializeDocumentAccessControlPolicy(.AccessControlPolicy, .RootElement()); != nil {
return , , &smithy.SerializationError{Err: }
}
:= bytes.NewReader(.Bytes())
if , = .SetStream(); != nil {
return , , &smithy.SerializationError{Err: }
}
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *PutBucketAclInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if len(.ACL) > 0 {
:= "X-Amz-Acl"
.SetHeader().String(string(.ACL))
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if len(.ChecksumAlgorithm) > 0 {
:= "X-Amz-Sdk-Checksum-Algorithm"
.SetHeader().String(string(.ChecksumAlgorithm))
}
if .ContentMD5 != nil && len(*.ContentMD5) > 0 {
:= "Content-Md5"
.SetHeader().String(*.ContentMD5)
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
if .GrantFullControl != nil && len(*.GrantFullControl) > 0 {
:= "X-Amz-Grant-Full-Control"
.SetHeader().String(*.GrantFullControl)
}
if .GrantRead != nil && len(*.GrantRead) > 0 {
:= "X-Amz-Grant-Read"
.SetHeader().String(*.GrantRead)
}
if .GrantReadACP != nil && len(*.GrantReadACP) > 0 {
:= "X-Amz-Grant-Read-Acp"
.SetHeader().String(*.GrantReadACP)
}
if .GrantWrite != nil && len(*.GrantWrite) > 0 {
:= "X-Amz-Grant-Write"
.SetHeader().String(*.GrantWrite)
}
if .GrantWriteACP != nil && len(*.GrantWriteACP) > 0 {
:= "X-Amz-Grant-Write-Acp"
.SetHeader().String(*.GrantWriteACP)
}
return nil
}
type awsRestxml_serializeOpPutBucketAnalyticsConfiguration struct {
}
func (*awsRestxml_serializeOpPutBucketAnalyticsConfiguration) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpPutBucketAnalyticsConfiguration) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*PutBucketAnalyticsConfigurationInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?analytics")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "PUT"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsPutBucketAnalyticsConfigurationInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .AnalyticsConfiguration != nil {
if !.HasHeader("Content-Type") {
= smithyhttp.SetIsContentTypeDefaultValue(, true)
.SetHeader("Content-Type").String("application/xml")
}
:= smithyxml.NewEncoder(bytes.NewBuffer(nil))
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "AnalyticsConfiguration",
},
Attr: ,
}
.Attr = append(.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
if := awsRestxml_serializeDocumentAnalyticsConfiguration(.AnalyticsConfiguration, .RootElement()); != nil {
return , , &smithy.SerializationError{Err: }
}
:= bytes.NewReader(.Bytes())
if , = .SetStream(); != nil {
return , , &smithy.SerializationError{Err: }
}
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *PutBucketAnalyticsConfigurationInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
if .Id != nil {
.SetQuery("id").String(*.Id)
}
return nil
}
type awsRestxml_serializeOpPutBucketCors struct {
}
func (*awsRestxml_serializeOpPutBucketCors) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpPutBucketCors) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*PutBucketCorsInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?cors")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "PUT"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsPutBucketCorsInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .CORSConfiguration != nil {
if !.HasHeader("Content-Type") {
= smithyhttp.SetIsContentTypeDefaultValue(, true)
.SetHeader("Content-Type").String("application/xml")
}
:= smithyxml.NewEncoder(bytes.NewBuffer(nil))
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "CORSConfiguration",
},
Attr: ,
}
.Attr = append(.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
if := awsRestxml_serializeDocumentCORSConfiguration(.CORSConfiguration, .RootElement()); != nil {
return , , &smithy.SerializationError{Err: }
}
:= bytes.NewReader(.Bytes())
if , = .SetStream(); != nil {
return , , &smithy.SerializationError{Err: }
}
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *PutBucketCorsInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if len(.ChecksumAlgorithm) > 0 {
:= "X-Amz-Sdk-Checksum-Algorithm"
.SetHeader().String(string(.ChecksumAlgorithm))
}
if .ContentMD5 != nil && len(*.ContentMD5) > 0 {
:= "Content-Md5"
.SetHeader().String(*.ContentMD5)
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
return nil
}
type awsRestxml_serializeOpPutBucketEncryption struct {
}
func (*awsRestxml_serializeOpPutBucketEncryption) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpPutBucketEncryption) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*PutBucketEncryptionInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?encryption")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "PUT"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsPutBucketEncryptionInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .ServerSideEncryptionConfiguration != nil {
if !.HasHeader("Content-Type") {
= smithyhttp.SetIsContentTypeDefaultValue(, true)
.SetHeader("Content-Type").String("application/xml")
}
:= smithyxml.NewEncoder(bytes.NewBuffer(nil))
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ServerSideEncryptionConfiguration",
},
Attr: ,
}
.Attr = append(.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
if := awsRestxml_serializeDocumentServerSideEncryptionConfiguration(.ServerSideEncryptionConfiguration, .RootElement()); != nil {
return , , &smithy.SerializationError{Err: }
}
:= bytes.NewReader(.Bytes())
if , = .SetStream(); != nil {
return , , &smithy.SerializationError{Err: }
}
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *PutBucketEncryptionInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if len(.ChecksumAlgorithm) > 0 {
:= "X-Amz-Sdk-Checksum-Algorithm"
.SetHeader().String(string(.ChecksumAlgorithm))
}
if .ContentMD5 != nil && len(*.ContentMD5) > 0 {
:= "Content-Md5"
.SetHeader().String(*.ContentMD5)
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
return nil
}
type awsRestxml_serializeOpPutBucketIntelligentTieringConfiguration struct {
}
func (*awsRestxml_serializeOpPutBucketIntelligentTieringConfiguration) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpPutBucketIntelligentTieringConfiguration) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*PutBucketIntelligentTieringConfigurationInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?intelligent-tiering")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "PUT"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsPutBucketIntelligentTieringConfigurationInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .IntelligentTieringConfiguration != nil {
if !.HasHeader("Content-Type") {
= smithyhttp.SetIsContentTypeDefaultValue(, true)
.SetHeader("Content-Type").String("application/xml")
}
:= smithyxml.NewEncoder(bytes.NewBuffer(nil))
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "IntelligentTieringConfiguration",
},
Attr: ,
}
.Attr = append(.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
if := awsRestxml_serializeDocumentIntelligentTieringConfiguration(.IntelligentTieringConfiguration, .RootElement()); != nil {
return , , &smithy.SerializationError{Err: }
}
:= bytes.NewReader(.Bytes())
if , = .SetStream(); != nil {
return , , &smithy.SerializationError{Err: }
}
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *PutBucketIntelligentTieringConfigurationInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .Id != nil {
.SetQuery("id").String(*.Id)
}
return nil
}
type awsRestxml_serializeOpPutBucketInventoryConfiguration struct {
}
func (*awsRestxml_serializeOpPutBucketInventoryConfiguration) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpPutBucketInventoryConfiguration) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*PutBucketInventoryConfigurationInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?inventory")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "PUT"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsPutBucketInventoryConfigurationInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .InventoryConfiguration != nil {
if !.HasHeader("Content-Type") {
= smithyhttp.SetIsContentTypeDefaultValue(, true)
.SetHeader("Content-Type").String("application/xml")
}
:= smithyxml.NewEncoder(bytes.NewBuffer(nil))
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "InventoryConfiguration",
},
Attr: ,
}
.Attr = append(.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
if := awsRestxml_serializeDocumentInventoryConfiguration(.InventoryConfiguration, .RootElement()); != nil {
return , , &smithy.SerializationError{Err: }
}
:= bytes.NewReader(.Bytes())
if , = .SetStream(); != nil {
return , , &smithy.SerializationError{Err: }
}
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *PutBucketInventoryConfigurationInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
if .Id != nil {
.SetQuery("id").String(*.Id)
}
return nil
}
type awsRestxml_serializeOpPutBucketLifecycleConfiguration struct {
}
func (*awsRestxml_serializeOpPutBucketLifecycleConfiguration) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpPutBucketLifecycleConfiguration) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*PutBucketLifecycleConfigurationInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?lifecycle")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "PUT"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsPutBucketLifecycleConfigurationInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .LifecycleConfiguration != nil {
if !.HasHeader("Content-Type") {
= smithyhttp.SetIsContentTypeDefaultValue(, true)
.SetHeader("Content-Type").String("application/xml")
}
:= smithyxml.NewEncoder(bytes.NewBuffer(nil))
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "LifecycleConfiguration",
},
Attr: ,
}
.Attr = append(.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
if := awsRestxml_serializeDocumentBucketLifecycleConfiguration(.LifecycleConfiguration, .RootElement()); != nil {
return , , &smithy.SerializationError{Err: }
}
:= bytes.NewReader(.Bytes())
if , = .SetStream(); != nil {
return , , &smithy.SerializationError{Err: }
}
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *PutBucketLifecycleConfigurationInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if len(.ChecksumAlgorithm) > 0 {
:= "X-Amz-Sdk-Checksum-Algorithm"
.SetHeader().String(string(.ChecksumAlgorithm))
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
return nil
}
type awsRestxml_serializeOpPutBucketLogging struct {
}
func (*awsRestxml_serializeOpPutBucketLogging) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpPutBucketLogging) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*PutBucketLoggingInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?logging")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "PUT"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsPutBucketLoggingInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .BucketLoggingStatus != nil {
if !.HasHeader("Content-Type") {
= smithyhttp.SetIsContentTypeDefaultValue(, true)
.SetHeader("Content-Type").String("application/xml")
}
:= smithyxml.NewEncoder(bytes.NewBuffer(nil))
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "BucketLoggingStatus",
},
Attr: ,
}
.Attr = append(.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
if := awsRestxml_serializeDocumentBucketLoggingStatus(.BucketLoggingStatus, .RootElement()); != nil {
return , , &smithy.SerializationError{Err: }
}
:= bytes.NewReader(.Bytes())
if , = .SetStream(); != nil {
return , , &smithy.SerializationError{Err: }
}
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *PutBucketLoggingInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if len(.ChecksumAlgorithm) > 0 {
:= "X-Amz-Sdk-Checksum-Algorithm"
.SetHeader().String(string(.ChecksumAlgorithm))
}
if .ContentMD5 != nil && len(*.ContentMD5) > 0 {
:= "Content-Md5"
.SetHeader().String(*.ContentMD5)
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
return nil
}
type awsRestxml_serializeOpPutBucketMetricsConfiguration struct {
}
func (*awsRestxml_serializeOpPutBucketMetricsConfiguration) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpPutBucketMetricsConfiguration) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*PutBucketMetricsConfigurationInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?metrics")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "PUT"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsPutBucketMetricsConfigurationInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .MetricsConfiguration != nil {
if !.HasHeader("Content-Type") {
= smithyhttp.SetIsContentTypeDefaultValue(, true)
.SetHeader("Content-Type").String("application/xml")
}
:= smithyxml.NewEncoder(bytes.NewBuffer(nil))
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "MetricsConfiguration",
},
Attr: ,
}
.Attr = append(.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
if := awsRestxml_serializeDocumentMetricsConfiguration(.MetricsConfiguration, .RootElement()); != nil {
return , , &smithy.SerializationError{Err: }
}
:= bytes.NewReader(.Bytes())
if , = .SetStream(); != nil {
return , , &smithy.SerializationError{Err: }
}
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *PutBucketMetricsConfigurationInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
if .Id != nil {
.SetQuery("id").String(*.Id)
}
return nil
}
type awsRestxml_serializeOpPutBucketNotificationConfiguration struct {
}
func (*awsRestxml_serializeOpPutBucketNotificationConfiguration) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpPutBucketNotificationConfiguration) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*PutBucketNotificationConfigurationInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?notification")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "PUT"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsPutBucketNotificationConfigurationInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .NotificationConfiguration != nil {
if !.HasHeader("Content-Type") {
= smithyhttp.SetIsContentTypeDefaultValue(, true)
.SetHeader("Content-Type").String("application/xml")
}
:= smithyxml.NewEncoder(bytes.NewBuffer(nil))
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "NotificationConfiguration",
},
Attr: ,
}
.Attr = append(.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
if := awsRestxml_serializeDocumentNotificationConfiguration(.NotificationConfiguration, .RootElement()); != nil {
return , , &smithy.SerializationError{Err: }
}
:= bytes.NewReader(.Bytes())
if , = .SetStream(); != nil {
return , , &smithy.SerializationError{Err: }
}
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *PutBucketNotificationConfigurationInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
if .SkipDestinationValidation {
:= "X-Amz-Skip-Destination-Validation"
.SetHeader().Boolean(.SkipDestinationValidation)
}
return nil
}
type awsRestxml_serializeOpPutBucketOwnershipControls struct {
}
func (*awsRestxml_serializeOpPutBucketOwnershipControls) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpPutBucketOwnershipControls) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*PutBucketOwnershipControlsInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?ownershipControls")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "PUT"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsPutBucketOwnershipControlsInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .OwnershipControls != nil {
if !.HasHeader("Content-Type") {
= smithyhttp.SetIsContentTypeDefaultValue(, true)
.SetHeader("Content-Type").String("application/xml")
}
:= smithyxml.NewEncoder(bytes.NewBuffer(nil))
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "OwnershipControls",
},
Attr: ,
}
.Attr = append(.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
if := awsRestxml_serializeDocumentOwnershipControls(.OwnershipControls, .RootElement()); != nil {
return , , &smithy.SerializationError{Err: }
}
:= bytes.NewReader(.Bytes())
if , = .SetStream(); != nil {
return , , &smithy.SerializationError{Err: }
}
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *PutBucketOwnershipControlsInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ContentMD5 != nil && len(*.ContentMD5) > 0 {
:= "Content-Md5"
.SetHeader().String(*.ContentMD5)
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
return nil
}
type awsRestxml_serializeOpPutBucketPolicy struct {
}
func (*awsRestxml_serializeOpPutBucketPolicy) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpPutBucketPolicy) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*PutBucketPolicyInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?policy")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "PUT"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsPutBucketPolicyInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if !.HasHeader("Content-Type") {
= smithyhttp.SetIsContentTypeDefaultValue(, true)
.SetHeader("Content-Type").String("text/plain")
}
if .Policy != nil {
:= strings.NewReader(*.Policy)
if , = .SetStream(); != nil {
return , , &smithy.SerializationError{Err: }
}
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *PutBucketPolicyInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if len(.ChecksumAlgorithm) > 0 {
:= "X-Amz-Sdk-Checksum-Algorithm"
.SetHeader().String(string(.ChecksumAlgorithm))
}
if .ConfirmRemoveSelfBucketAccess {
:= "X-Amz-Confirm-Remove-Self-Bucket-Access"
.SetHeader().Boolean(.ConfirmRemoveSelfBucketAccess)
}
if .ContentMD5 != nil && len(*.ContentMD5) > 0 {
:= "Content-Md5"
.SetHeader().String(*.ContentMD5)
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
return nil
}
type awsRestxml_serializeOpPutBucketReplication struct {
}
func (*awsRestxml_serializeOpPutBucketReplication) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpPutBucketReplication) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*PutBucketReplicationInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?replication")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "PUT"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsPutBucketReplicationInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .ReplicationConfiguration != nil {
if !.HasHeader("Content-Type") {
= smithyhttp.SetIsContentTypeDefaultValue(, true)
.SetHeader("Content-Type").String("application/xml")
}
:= smithyxml.NewEncoder(bytes.NewBuffer(nil))
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ReplicationConfiguration",
},
Attr: ,
}
.Attr = append(.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
if := awsRestxml_serializeDocumentReplicationConfiguration(.ReplicationConfiguration, .RootElement()); != nil {
return , , &smithy.SerializationError{Err: }
}
:= bytes.NewReader(.Bytes())
if , = .SetStream(); != nil {
return , , &smithy.SerializationError{Err: }
}
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *PutBucketReplicationInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if len(.ChecksumAlgorithm) > 0 {
:= "X-Amz-Sdk-Checksum-Algorithm"
.SetHeader().String(string(.ChecksumAlgorithm))
}
if .ContentMD5 != nil && len(*.ContentMD5) > 0 {
:= "Content-Md5"
.SetHeader().String(*.ContentMD5)
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
if .Token != nil && len(*.Token) > 0 {
:= "X-Amz-Bucket-Object-Lock-Token"
.SetHeader().String(*.Token)
}
return nil
}
type awsRestxml_serializeOpPutBucketRequestPayment struct {
}
func (*awsRestxml_serializeOpPutBucketRequestPayment) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpPutBucketRequestPayment) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*PutBucketRequestPaymentInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?requestPayment")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "PUT"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsPutBucketRequestPaymentInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .RequestPaymentConfiguration != nil {
if !.HasHeader("Content-Type") {
= smithyhttp.SetIsContentTypeDefaultValue(, true)
.SetHeader("Content-Type").String("application/xml")
}
:= smithyxml.NewEncoder(bytes.NewBuffer(nil))
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "RequestPaymentConfiguration",
},
Attr: ,
}
.Attr = append(.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
if := awsRestxml_serializeDocumentRequestPaymentConfiguration(.RequestPaymentConfiguration, .RootElement()); != nil {
return , , &smithy.SerializationError{Err: }
}
:= bytes.NewReader(.Bytes())
if , = .SetStream(); != nil {
return , , &smithy.SerializationError{Err: }
}
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *PutBucketRequestPaymentInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if len(.ChecksumAlgorithm) > 0 {
:= "X-Amz-Sdk-Checksum-Algorithm"
.SetHeader().String(string(.ChecksumAlgorithm))
}
if .ContentMD5 != nil && len(*.ContentMD5) > 0 {
:= "Content-Md5"
.SetHeader().String(*.ContentMD5)
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
return nil
}
type awsRestxml_serializeOpPutBucketTagging struct {
}
func (*awsRestxml_serializeOpPutBucketTagging) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpPutBucketTagging) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*PutBucketTaggingInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?tagging")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "PUT"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsPutBucketTaggingInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Tagging != nil {
if !.HasHeader("Content-Type") {
= smithyhttp.SetIsContentTypeDefaultValue(, true)
.SetHeader("Content-Type").String("application/xml")
}
:= smithyxml.NewEncoder(bytes.NewBuffer(nil))
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Tagging",
},
Attr: ,
}
.Attr = append(.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
if := awsRestxml_serializeDocumentTagging(.Tagging, .RootElement()); != nil {
return , , &smithy.SerializationError{Err: }
}
:= bytes.NewReader(.Bytes())
if , = .SetStream(); != nil {
return , , &smithy.SerializationError{Err: }
}
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *PutBucketTaggingInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if len(.ChecksumAlgorithm) > 0 {
:= "X-Amz-Sdk-Checksum-Algorithm"
.SetHeader().String(string(.ChecksumAlgorithm))
}
if .ContentMD5 != nil && len(*.ContentMD5) > 0 {
:= "Content-Md5"
.SetHeader().String(*.ContentMD5)
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
return nil
}
type awsRestxml_serializeOpPutBucketVersioning struct {
}
func (*awsRestxml_serializeOpPutBucketVersioning) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpPutBucketVersioning) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*PutBucketVersioningInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?versioning")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "PUT"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsPutBucketVersioningInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .VersioningConfiguration != nil {
if !.HasHeader("Content-Type") {
= smithyhttp.SetIsContentTypeDefaultValue(, true)
.SetHeader("Content-Type").String("application/xml")
}
:= smithyxml.NewEncoder(bytes.NewBuffer(nil))
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "VersioningConfiguration",
},
Attr: ,
}
.Attr = append(.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
if := awsRestxml_serializeDocumentVersioningConfiguration(.VersioningConfiguration, .RootElement()); != nil {
return , , &smithy.SerializationError{Err: }
}
:= bytes.NewReader(.Bytes())
if , = .SetStream(); != nil {
return , , &smithy.SerializationError{Err: }
}
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *PutBucketVersioningInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if len(.ChecksumAlgorithm) > 0 {
:= "X-Amz-Sdk-Checksum-Algorithm"
.SetHeader().String(string(.ChecksumAlgorithm))
}
if .ContentMD5 != nil && len(*.ContentMD5) > 0 {
:= "Content-Md5"
.SetHeader().String(*.ContentMD5)
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
if .MFA != nil && len(*.MFA) > 0 {
:= "X-Amz-Mfa"
.SetHeader().String(*.MFA)
}
return nil
}
type awsRestxml_serializeOpPutBucketWebsite struct {
}
func (*awsRestxml_serializeOpPutBucketWebsite) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpPutBucketWebsite) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*PutBucketWebsiteInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?website")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "PUT"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsPutBucketWebsiteInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .WebsiteConfiguration != nil {
if !.HasHeader("Content-Type") {
= smithyhttp.SetIsContentTypeDefaultValue(, true)
.SetHeader("Content-Type").String("application/xml")
}
:= smithyxml.NewEncoder(bytes.NewBuffer(nil))
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "WebsiteConfiguration",
},
Attr: ,
}
.Attr = append(.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
if := awsRestxml_serializeDocumentWebsiteConfiguration(.WebsiteConfiguration, .RootElement()); != nil {
return , , &smithy.SerializationError{Err: }
}
:= bytes.NewReader(.Bytes())
if , = .SetStream(); != nil {
return , , &smithy.SerializationError{Err: }
}
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *PutBucketWebsiteInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if len(.ChecksumAlgorithm) > 0 {
:= "X-Amz-Sdk-Checksum-Algorithm"
.SetHeader().String(string(.ChecksumAlgorithm))
}
if .ContentMD5 != nil && len(*.ContentMD5) > 0 {
:= "Content-Md5"
.SetHeader().String(*.ContentMD5)
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
return nil
}
type awsRestxml_serializeOpPutObject struct {
}
func (*awsRestxml_serializeOpPutObject) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpPutObject) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*PutObjectInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}/{Key+}?x-id=PutObject")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "PUT"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsPutObjectInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if !.HasHeader("Content-Type") {
= smithyhttp.SetIsContentTypeDefaultValue(, true)
.SetHeader("Content-Type").String("application/octet-stream")
}
if .Body != nil {
:= .Body
if , = .SetStream(); != nil {
return , , &smithy.SerializationError{Err: }
}
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *PutObjectInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if len(.ACL) > 0 {
:= "X-Amz-Acl"
.SetHeader().String(string(.ACL))
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .BucketKeyEnabled {
:= "X-Amz-Server-Side-Encryption-Bucket-Key-Enabled"
.SetHeader().Boolean(.BucketKeyEnabled)
}
if .CacheControl != nil && len(*.CacheControl) > 0 {
:= "Cache-Control"
.SetHeader().String(*.CacheControl)
}
if len(.ChecksumAlgorithm) > 0 {
:= "X-Amz-Sdk-Checksum-Algorithm"
.SetHeader().String(string(.ChecksumAlgorithm))
}
if .ChecksumCRC32 != nil && len(*.ChecksumCRC32) > 0 {
:= "X-Amz-Checksum-Crc32"
.SetHeader().String(*.ChecksumCRC32)
}
if .ChecksumCRC32C != nil && len(*.ChecksumCRC32C) > 0 {
:= "X-Amz-Checksum-Crc32c"
.SetHeader().String(*.ChecksumCRC32C)
}
if .ChecksumSHA1 != nil && len(*.ChecksumSHA1) > 0 {
:= "X-Amz-Checksum-Sha1"
.SetHeader().String(*.ChecksumSHA1)
}
if .ChecksumSHA256 != nil && len(*.ChecksumSHA256) > 0 {
:= "X-Amz-Checksum-Sha256"
.SetHeader().String(*.ChecksumSHA256)
}
if .ContentDisposition != nil && len(*.ContentDisposition) > 0 {
:= "Content-Disposition"
.SetHeader().String(*.ContentDisposition)
}
if .ContentEncoding != nil && len(*.ContentEncoding) > 0 {
:= "Content-Encoding"
.SetHeader().String(*.ContentEncoding)
}
if .ContentLanguage != nil && len(*.ContentLanguage) > 0 {
:= "Content-Language"
.SetHeader().String(*.ContentLanguage)
}
if .ContentLength != 0 {
:= "Content-Length"
.SetHeader().Long(.ContentLength)
}
if .ContentMD5 != nil && len(*.ContentMD5) > 0 {
:= "Content-Md5"
.SetHeader().String(*.ContentMD5)
}
if .ContentType != nil && len(*.ContentType) > 0 {
:= "Content-Type"
.SetHeader().String(*.ContentType)
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
if .Expires != nil {
:= "Expires"
.SetHeader().String(smithytime.FormatHTTPDate(*.Expires))
}
if .GrantFullControl != nil && len(*.GrantFullControl) > 0 {
:= "X-Amz-Grant-Full-Control"
.SetHeader().String(*.GrantFullControl)
}
if .GrantRead != nil && len(*.GrantRead) > 0 {
:= "X-Amz-Grant-Read"
.SetHeader().String(*.GrantRead)
}
if .GrantReadACP != nil && len(*.GrantReadACP) > 0 {
:= "X-Amz-Grant-Read-Acp"
.SetHeader().String(*.GrantReadACP)
}
if .GrantWriteACP != nil && len(*.GrantWriteACP) > 0 {
:= "X-Amz-Grant-Write-Acp"
.SetHeader().String(*.GrantWriteACP)
}
if .Key == nil || len(*.Key) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
}
if .Key != nil {
if := .SetURI("Key").String(*.Key); != nil {
return
}
}
if .Metadata != nil {
:= .Headers("X-Amz-Meta-")
for , := range .Metadata {
if len() > 0 {
.SetHeader(http.CanonicalHeaderKey()).String()
}
}
}
if len(.ObjectLockLegalHoldStatus) > 0 {
:= "X-Amz-Object-Lock-Legal-Hold"
.SetHeader().String(string(.ObjectLockLegalHoldStatus))
}
if len(.ObjectLockMode) > 0 {
:= "X-Amz-Object-Lock-Mode"
.SetHeader().String(string(.ObjectLockMode))
}
if .ObjectLockRetainUntilDate != nil {
:= "X-Amz-Object-Lock-Retain-Until-Date"
.SetHeader().String(smithytime.FormatDateTime(*.ObjectLockRetainUntilDate))
}
if len(.RequestPayer) > 0 {
:= "X-Amz-Request-Payer"
.SetHeader().String(string(.RequestPayer))
}
if len(.ServerSideEncryption) > 0 {
:= "X-Amz-Server-Side-Encryption"
.SetHeader().String(string(.ServerSideEncryption))
}
if .SSECustomerAlgorithm != nil && len(*.SSECustomerAlgorithm) > 0 {
:= "X-Amz-Server-Side-Encryption-Customer-Algorithm"
.SetHeader().String(*.SSECustomerAlgorithm)
}
if .SSECustomerKey != nil && len(*.SSECustomerKey) > 0 {
:= "X-Amz-Server-Side-Encryption-Customer-Key"
.SetHeader().String(*.SSECustomerKey)
}
if .SSECustomerKeyMD5 != nil && len(*.SSECustomerKeyMD5) > 0 {
:= "X-Amz-Server-Side-Encryption-Customer-Key-Md5"
.SetHeader().String(*.SSECustomerKeyMD5)
}
if .SSEKMSEncryptionContext != nil && len(*.SSEKMSEncryptionContext) > 0 {
:= "X-Amz-Server-Side-Encryption-Context"
.SetHeader().String(*.SSEKMSEncryptionContext)
}
if .SSEKMSKeyId != nil && len(*.SSEKMSKeyId) > 0 {
:= "X-Amz-Server-Side-Encryption-Aws-Kms-Key-Id"
.SetHeader().String(*.SSEKMSKeyId)
}
if len(.StorageClass) > 0 {
:= "X-Amz-Storage-Class"
.SetHeader().String(string(.StorageClass))
}
if .Tagging != nil && len(*.Tagging) > 0 {
:= "X-Amz-Tagging"
.SetHeader().String(*.Tagging)
}
if .WebsiteRedirectLocation != nil && len(*.WebsiteRedirectLocation) > 0 {
:= "X-Amz-Website-Redirect-Location"
.SetHeader().String(*.WebsiteRedirectLocation)
}
return nil
}
type awsRestxml_serializeOpPutObjectAcl struct {
}
func (*awsRestxml_serializeOpPutObjectAcl) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpPutObjectAcl) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*PutObjectAclInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}/{Key+}?acl")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "PUT"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsPutObjectAclInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .AccessControlPolicy != nil {
if !.HasHeader("Content-Type") {
= smithyhttp.SetIsContentTypeDefaultValue(, true)
.SetHeader("Content-Type").String("application/xml")
}
:= smithyxml.NewEncoder(bytes.NewBuffer(nil))
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "AccessControlPolicy",
},
Attr: ,
}
.Attr = append(.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
if := awsRestxml_serializeDocumentAccessControlPolicy(.AccessControlPolicy, .RootElement()); != nil {
return , , &smithy.SerializationError{Err: }
}
:= bytes.NewReader(.Bytes())
if , = .SetStream(); != nil {
return , , &smithy.SerializationError{Err: }
}
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *PutObjectAclInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if len(.ACL) > 0 {
:= "X-Amz-Acl"
.SetHeader().String(string(.ACL))
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if len(.ChecksumAlgorithm) > 0 {
:= "X-Amz-Sdk-Checksum-Algorithm"
.SetHeader().String(string(.ChecksumAlgorithm))
}
if .ContentMD5 != nil && len(*.ContentMD5) > 0 {
:= "Content-Md5"
.SetHeader().String(*.ContentMD5)
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
if .GrantFullControl != nil && len(*.GrantFullControl) > 0 {
:= "X-Amz-Grant-Full-Control"
.SetHeader().String(*.GrantFullControl)
}
if .GrantRead != nil && len(*.GrantRead) > 0 {
:= "X-Amz-Grant-Read"
.SetHeader().String(*.GrantRead)
}
if .GrantReadACP != nil && len(*.GrantReadACP) > 0 {
:= "X-Amz-Grant-Read-Acp"
.SetHeader().String(*.GrantReadACP)
}
if .GrantWrite != nil && len(*.GrantWrite) > 0 {
:= "X-Amz-Grant-Write"
.SetHeader().String(*.GrantWrite)
}
if .GrantWriteACP != nil && len(*.GrantWriteACP) > 0 {
:= "X-Amz-Grant-Write-Acp"
.SetHeader().String(*.GrantWriteACP)
}
if .Key == nil || len(*.Key) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
}
if .Key != nil {
if := .SetURI("Key").String(*.Key); != nil {
return
}
}
if len(.RequestPayer) > 0 {
:= "X-Amz-Request-Payer"
.SetHeader().String(string(.RequestPayer))
}
if .VersionId != nil {
.SetQuery("versionId").String(*.VersionId)
}
return nil
}
type awsRestxml_serializeOpPutObjectLegalHold struct {
}
func (*awsRestxml_serializeOpPutObjectLegalHold) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpPutObjectLegalHold) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*PutObjectLegalHoldInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}/{Key+}?legal-hold")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "PUT"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsPutObjectLegalHoldInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .LegalHold != nil {
if !.HasHeader("Content-Type") {
= smithyhttp.SetIsContentTypeDefaultValue(, true)
.SetHeader("Content-Type").String("application/xml")
}
:= smithyxml.NewEncoder(bytes.NewBuffer(nil))
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "LegalHold",
},
Attr: ,
}
.Attr = append(.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
if := awsRestxml_serializeDocumentObjectLockLegalHold(.LegalHold, .RootElement()); != nil {
return , , &smithy.SerializationError{Err: }
}
:= bytes.NewReader(.Bytes())
if , = .SetStream(); != nil {
return , , &smithy.SerializationError{Err: }
}
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *PutObjectLegalHoldInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if len(.ChecksumAlgorithm) > 0 {
:= "X-Amz-Sdk-Checksum-Algorithm"
.SetHeader().String(string(.ChecksumAlgorithm))
}
if .ContentMD5 != nil && len(*.ContentMD5) > 0 {
:= "Content-Md5"
.SetHeader().String(*.ContentMD5)
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
if .Key == nil || len(*.Key) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
}
if .Key != nil {
if := .SetURI("Key").String(*.Key); != nil {
return
}
}
if len(.RequestPayer) > 0 {
:= "X-Amz-Request-Payer"
.SetHeader().String(string(.RequestPayer))
}
if .VersionId != nil {
.SetQuery("versionId").String(*.VersionId)
}
return nil
}
type awsRestxml_serializeOpPutObjectLockConfiguration struct {
}
func (*awsRestxml_serializeOpPutObjectLockConfiguration) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpPutObjectLockConfiguration) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*PutObjectLockConfigurationInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?object-lock")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "PUT"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsPutObjectLockConfigurationInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .ObjectLockConfiguration != nil {
if !.HasHeader("Content-Type") {
= smithyhttp.SetIsContentTypeDefaultValue(, true)
.SetHeader("Content-Type").String("application/xml")
}
:= smithyxml.NewEncoder(bytes.NewBuffer(nil))
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ObjectLockConfiguration",
},
Attr: ,
}
.Attr = append(.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
if := awsRestxml_serializeDocumentObjectLockConfiguration(.ObjectLockConfiguration, .RootElement()); != nil {
return , , &smithy.SerializationError{Err: }
}
:= bytes.NewReader(.Bytes())
if , = .SetStream(); != nil {
return , , &smithy.SerializationError{Err: }
}
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *PutObjectLockConfigurationInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if len(.ChecksumAlgorithm) > 0 {
:= "X-Amz-Sdk-Checksum-Algorithm"
.SetHeader().String(string(.ChecksumAlgorithm))
}
if .ContentMD5 != nil && len(*.ContentMD5) > 0 {
:= "Content-Md5"
.SetHeader().String(*.ContentMD5)
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
if len(.RequestPayer) > 0 {
:= "X-Amz-Request-Payer"
.SetHeader().String(string(.RequestPayer))
}
if .Token != nil && len(*.Token) > 0 {
:= "X-Amz-Bucket-Object-Lock-Token"
.SetHeader().String(*.Token)
}
return nil
}
type awsRestxml_serializeOpPutObjectRetention struct {
}
func (*awsRestxml_serializeOpPutObjectRetention) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpPutObjectRetention) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*PutObjectRetentionInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}/{Key+}?retention")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "PUT"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsPutObjectRetentionInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Retention != nil {
if !.HasHeader("Content-Type") {
= smithyhttp.SetIsContentTypeDefaultValue(, true)
.SetHeader("Content-Type").String("application/xml")
}
:= smithyxml.NewEncoder(bytes.NewBuffer(nil))
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Retention",
},
Attr: ,
}
.Attr = append(.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
if := awsRestxml_serializeDocumentObjectLockRetention(.Retention, .RootElement()); != nil {
return , , &smithy.SerializationError{Err: }
}
:= bytes.NewReader(.Bytes())
if , = .SetStream(); != nil {
return , , &smithy.SerializationError{Err: }
}
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *PutObjectRetentionInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .BypassGovernanceRetention {
:= "X-Amz-Bypass-Governance-Retention"
.SetHeader().Boolean(.BypassGovernanceRetention)
}
if len(.ChecksumAlgorithm) > 0 {
:= "X-Amz-Sdk-Checksum-Algorithm"
.SetHeader().String(string(.ChecksumAlgorithm))
}
if .ContentMD5 != nil && len(*.ContentMD5) > 0 {
:= "Content-Md5"
.SetHeader().String(*.ContentMD5)
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
if .Key == nil || len(*.Key) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
}
if .Key != nil {
if := .SetURI("Key").String(*.Key); != nil {
return
}
}
if len(.RequestPayer) > 0 {
:= "X-Amz-Request-Payer"
.SetHeader().String(string(.RequestPayer))
}
if .VersionId != nil {
.SetQuery("versionId").String(*.VersionId)
}
return nil
}
type awsRestxml_serializeOpPutObjectTagging struct {
}
func (*awsRestxml_serializeOpPutObjectTagging) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpPutObjectTagging) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*PutObjectTaggingInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}/{Key+}?tagging")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "PUT"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsPutObjectTaggingInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Tagging != nil {
if !.HasHeader("Content-Type") {
= smithyhttp.SetIsContentTypeDefaultValue(, true)
.SetHeader("Content-Type").String("application/xml")
}
:= smithyxml.NewEncoder(bytes.NewBuffer(nil))
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Tagging",
},
Attr: ,
}
.Attr = append(.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
if := awsRestxml_serializeDocumentTagging(.Tagging, .RootElement()); != nil {
return , , &smithy.SerializationError{Err: }
}
:= bytes.NewReader(.Bytes())
if , = .SetStream(); != nil {
return , , &smithy.SerializationError{Err: }
}
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *PutObjectTaggingInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if len(.ChecksumAlgorithm) > 0 {
:= "X-Amz-Sdk-Checksum-Algorithm"
.SetHeader().String(string(.ChecksumAlgorithm))
}
if .ContentMD5 != nil && len(*.ContentMD5) > 0 {
:= "Content-Md5"
.SetHeader().String(*.ContentMD5)
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
if .Key == nil || len(*.Key) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
}
if .Key != nil {
if := .SetURI("Key").String(*.Key); != nil {
return
}
}
if len(.RequestPayer) > 0 {
:= "X-Amz-Request-Payer"
.SetHeader().String(string(.RequestPayer))
}
if .VersionId != nil {
.SetQuery("versionId").String(*.VersionId)
}
return nil
}
type awsRestxml_serializeOpPutPublicAccessBlock struct {
}
func (*awsRestxml_serializeOpPutPublicAccessBlock) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpPutPublicAccessBlock) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*PutPublicAccessBlockInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}?publicAccessBlock")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "PUT"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsPutPublicAccessBlockInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .PublicAccessBlockConfiguration != nil {
if !.HasHeader("Content-Type") {
= smithyhttp.SetIsContentTypeDefaultValue(, true)
.SetHeader("Content-Type").String("application/xml")
}
:= smithyxml.NewEncoder(bytes.NewBuffer(nil))
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "PublicAccessBlockConfiguration",
},
Attr: ,
}
.Attr = append(.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
if := awsRestxml_serializeDocumentPublicAccessBlockConfiguration(.PublicAccessBlockConfiguration, .RootElement()); != nil {
return , , &smithy.SerializationError{Err: }
}
:= bytes.NewReader(.Bytes())
if , = .SetStream(); != nil {
return , , &smithy.SerializationError{Err: }
}
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *PutPublicAccessBlockInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if len(.ChecksumAlgorithm) > 0 {
:= "X-Amz-Sdk-Checksum-Algorithm"
.SetHeader().String(string(.ChecksumAlgorithm))
}
if .ContentMD5 != nil && len(*.ContentMD5) > 0 {
:= "Content-Md5"
.SetHeader().String(*.ContentMD5)
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
return nil
}
type awsRestxml_serializeOpRestoreObject struct {
}
func (*awsRestxml_serializeOpRestoreObject) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpRestoreObject) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*RestoreObjectInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}/{Key+}?restore&x-id=RestoreObject")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "POST"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsRestoreObjectInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .RestoreRequest != nil {
if !.HasHeader("Content-Type") {
= smithyhttp.SetIsContentTypeDefaultValue(, true)
.SetHeader("Content-Type").String("application/xml")
}
:= smithyxml.NewEncoder(bytes.NewBuffer(nil))
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "RestoreRequest",
},
Attr: ,
}
.Attr = append(.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
if := awsRestxml_serializeDocumentRestoreRequest(.RestoreRequest, .RootElement()); != nil {
return , , &smithy.SerializationError{Err: }
}
:= bytes.NewReader(.Bytes())
if , = .SetStream(); != nil {
return , , &smithy.SerializationError{Err: }
}
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *RestoreObjectInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if len(.ChecksumAlgorithm) > 0 {
:= "X-Amz-Sdk-Checksum-Algorithm"
.SetHeader().String(string(.ChecksumAlgorithm))
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
if .Key == nil || len(*.Key) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
}
if .Key != nil {
if := .SetURI("Key").String(*.Key); != nil {
return
}
}
if len(.RequestPayer) > 0 {
:= "X-Amz-Request-Payer"
.SetHeader().String(string(.RequestPayer))
}
if .VersionId != nil {
.SetQuery("versionId").String(*.VersionId)
}
return nil
}
type awsRestxml_serializeOpSelectObjectContent struct {
}
func (*awsRestxml_serializeOpSelectObjectContent) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpSelectObjectContent) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*SelectObjectContentInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}/{Key+}?select&select-type=2&x-id=SelectObjectContent")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "POST"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsSelectObjectContentInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
.SetHeader("Content-Type").String("application/xml")
:= smithyxml.NewEncoder(bytes.NewBuffer(nil))
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "SelectObjectContentRequest",
},
Attr: ,
}
.Attr = append(.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
if := awsRestxml_serializeOpDocumentSelectObjectContentInput(, .RootElement()); != nil {
return , , &smithy.SerializationError{Err: }
}
if , = .SetStream(bytes.NewReader(.Bytes())); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *SelectObjectContentInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
if .Key == nil || len(*.Key) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
}
if .Key != nil {
if := .SetURI("Key").String(*.Key); != nil {
return
}
}
if .SSECustomerAlgorithm != nil && len(*.SSECustomerAlgorithm) > 0 {
:= "X-Amz-Server-Side-Encryption-Customer-Algorithm"
.SetHeader().String(*.SSECustomerAlgorithm)
}
if .SSECustomerKey != nil && len(*.SSECustomerKey) > 0 {
:= "X-Amz-Server-Side-Encryption-Customer-Key"
.SetHeader().String(*.SSECustomerKey)
}
if .SSECustomerKeyMD5 != nil && len(*.SSECustomerKeyMD5) > 0 {
:= "X-Amz-Server-Side-Encryption-Customer-Key-Md5"
.SetHeader().String(*.SSECustomerKeyMD5)
}
return nil
}
func ( *SelectObjectContentInput, smithyxml.Value) error {
defer .Close()
if .Expression != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Expression",
},
Attr: ,
}
:= .MemberElement()
.String(*.Expression)
}
if len(.ExpressionType) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ExpressionType",
},
Attr: ,
}
:= .MemberElement()
.String(string(.ExpressionType))
}
if .InputSerialization != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "InputSerialization",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentInputSerialization(.InputSerialization, ); != nil {
return
}
}
if .OutputSerialization != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "OutputSerialization",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentOutputSerialization(.OutputSerialization, ); != nil {
return
}
}
if .RequestProgress != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "RequestProgress",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentRequestProgress(.RequestProgress, ); != nil {
return
}
}
if .ScanRange != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ScanRange",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentScanRange(.ScanRange, ); != nil {
return
}
}
return nil
}
type awsRestxml_serializeOpUploadPart struct {
}
func (*awsRestxml_serializeOpUploadPart) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpUploadPart) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*UploadPartInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}/{Key+}?x-id=UploadPart")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "PUT"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsUploadPartInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if !.HasHeader("Content-Type") {
= smithyhttp.SetIsContentTypeDefaultValue(, true)
.SetHeader("Content-Type").String("application/octet-stream")
}
if .Body != nil {
:= .Body
if , = .SetStream(); != nil {
return , , &smithy.SerializationError{Err: }
}
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *UploadPartInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if len(.ChecksumAlgorithm) > 0 {
:= "X-Amz-Sdk-Checksum-Algorithm"
.SetHeader().String(string(.ChecksumAlgorithm))
}
if .ChecksumCRC32 != nil && len(*.ChecksumCRC32) > 0 {
:= "X-Amz-Checksum-Crc32"
.SetHeader().String(*.ChecksumCRC32)
}
if .ChecksumCRC32C != nil && len(*.ChecksumCRC32C) > 0 {
:= "X-Amz-Checksum-Crc32c"
.SetHeader().String(*.ChecksumCRC32C)
}
if .ChecksumSHA1 != nil && len(*.ChecksumSHA1) > 0 {
:= "X-Amz-Checksum-Sha1"
.SetHeader().String(*.ChecksumSHA1)
}
if .ChecksumSHA256 != nil && len(*.ChecksumSHA256) > 0 {
:= "X-Amz-Checksum-Sha256"
.SetHeader().String(*.ChecksumSHA256)
}
if .ContentLength != 0 {
:= "Content-Length"
.SetHeader().Long(.ContentLength)
}
if .ContentMD5 != nil && len(*.ContentMD5) > 0 {
:= "Content-Md5"
.SetHeader().String(*.ContentMD5)
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
if .Key == nil || len(*.Key) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
}
if .Key != nil {
if := .SetURI("Key").String(*.Key); != nil {
return
}
}
{
.SetQuery("partNumber").Integer(.PartNumber)
}
if len(.RequestPayer) > 0 {
:= "X-Amz-Request-Payer"
.SetHeader().String(string(.RequestPayer))
}
if .SSECustomerAlgorithm != nil && len(*.SSECustomerAlgorithm) > 0 {
:= "X-Amz-Server-Side-Encryption-Customer-Algorithm"
.SetHeader().String(*.SSECustomerAlgorithm)
}
if .SSECustomerKey != nil && len(*.SSECustomerKey) > 0 {
:= "X-Amz-Server-Side-Encryption-Customer-Key"
.SetHeader().String(*.SSECustomerKey)
}
if .SSECustomerKeyMD5 != nil && len(*.SSECustomerKeyMD5) > 0 {
:= "X-Amz-Server-Side-Encryption-Customer-Key-Md5"
.SetHeader().String(*.SSECustomerKeyMD5)
}
if .UploadId != nil {
.SetQuery("uploadId").String(*.UploadId)
}
return nil
}
type awsRestxml_serializeOpUploadPartCopy struct {
}
func (*awsRestxml_serializeOpUploadPartCopy) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpUploadPartCopy) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*UploadPartCopyInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/{Bucket}/{Key+}?x-id=UploadPartCopy")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "PUT"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsUploadPartCopyInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *UploadPartCopyInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .Bucket == nil || len(*.Bucket) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
}
if .Bucket != nil {
if := .SetURI("Bucket").String(*.Bucket); != nil {
return
}
}
if .CopySource != nil && len(*.CopySource) > 0 {
:= "X-Amz-Copy-Source"
.SetHeader().String(*.CopySource)
}
if .CopySourceIfMatch != nil && len(*.CopySourceIfMatch) > 0 {
:= "X-Amz-Copy-Source-If-Match"
.SetHeader().String(*.CopySourceIfMatch)
}
if .CopySourceIfModifiedSince != nil {
:= "X-Amz-Copy-Source-If-Modified-Since"
.SetHeader().String(smithytime.FormatHTTPDate(*.CopySourceIfModifiedSince))
}
if .CopySourceIfNoneMatch != nil && len(*.CopySourceIfNoneMatch) > 0 {
:= "X-Amz-Copy-Source-If-None-Match"
.SetHeader().String(*.CopySourceIfNoneMatch)
}
if .CopySourceIfUnmodifiedSince != nil {
:= "X-Amz-Copy-Source-If-Unmodified-Since"
.SetHeader().String(smithytime.FormatHTTPDate(*.CopySourceIfUnmodifiedSince))
}
if .CopySourceRange != nil && len(*.CopySourceRange) > 0 {
:= "X-Amz-Copy-Source-Range"
.SetHeader().String(*.CopySourceRange)
}
if .CopySourceSSECustomerAlgorithm != nil && len(*.CopySourceSSECustomerAlgorithm) > 0 {
:= "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Algorithm"
.SetHeader().String(*.CopySourceSSECustomerAlgorithm)
}
if .CopySourceSSECustomerKey != nil && len(*.CopySourceSSECustomerKey) > 0 {
:= "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key"
.SetHeader().String(*.CopySourceSSECustomerKey)
}
if .CopySourceSSECustomerKeyMD5 != nil && len(*.CopySourceSSECustomerKeyMD5) > 0 {
:= "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key-Md5"
.SetHeader().String(*.CopySourceSSECustomerKeyMD5)
}
if .ExpectedBucketOwner != nil && len(*.ExpectedBucketOwner) > 0 {
:= "X-Amz-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedBucketOwner)
}
if .ExpectedSourceBucketOwner != nil && len(*.ExpectedSourceBucketOwner) > 0 {
:= "X-Amz-Source-Expected-Bucket-Owner"
.SetHeader().String(*.ExpectedSourceBucketOwner)
}
if .Key == nil || len(*.Key) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
}
if .Key != nil {
if := .SetURI("Key").String(*.Key); != nil {
return
}
}
{
.SetQuery("partNumber").Integer(.PartNumber)
}
if len(.RequestPayer) > 0 {
:= "X-Amz-Request-Payer"
.SetHeader().String(string(.RequestPayer))
}
if .SSECustomerAlgorithm != nil && len(*.SSECustomerAlgorithm) > 0 {
:= "X-Amz-Server-Side-Encryption-Customer-Algorithm"
.SetHeader().String(*.SSECustomerAlgorithm)
}
if .SSECustomerKey != nil && len(*.SSECustomerKey) > 0 {
:= "X-Amz-Server-Side-Encryption-Customer-Key"
.SetHeader().String(*.SSECustomerKey)
}
if .SSECustomerKeyMD5 != nil && len(*.SSECustomerKeyMD5) > 0 {
:= "X-Amz-Server-Side-Encryption-Customer-Key-Md5"
.SetHeader().String(*.SSECustomerKeyMD5)
}
if .UploadId != nil {
.SetQuery("uploadId").String(*.UploadId)
}
return nil
}
type awsRestxml_serializeOpWriteGetObjectResponse struct {
}
func (*awsRestxml_serializeOpWriteGetObjectResponse) () string {
return "OperationSerializer"
}
func ( *awsRestxml_serializeOpWriteGetObjectResponse) ( context.Context, middleware.SerializeInput, middleware.SerializeHandler) (
middleware.SerializeOutput, middleware.Metadata, error,
) {
, := .Request.(*smithyhttp.Request)
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", .Request)}
}
, := .Parameters.(*WriteGetObjectResponseInput)
_ =
if ! {
return , , &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", .Parameters)}
}
, := httpbinding.SplitURI("/WriteGetObjectResponse?x-id=WriteGetObjectResponse")
.URL.Path = smithyhttp.JoinPath(.URL.Path, )
.URL.RawQuery = smithyhttp.JoinRawQuery(.URL.RawQuery, )
.Method = "POST"
, := httpbinding.NewEncoder(.URL.Path, .URL.RawQuery, .Header)
if != nil {
return , , &smithy.SerializationError{Err: }
}
if := awsRestxml_serializeOpHttpBindingsWriteGetObjectResponseInput(, ); != nil {
return , , &smithy.SerializationError{Err: }
}
if !.HasHeader("Content-Type") {
= smithyhttp.SetIsContentTypeDefaultValue(, true)
.SetHeader("Content-Type").String("application/octet-stream")
}
if .Body != nil {
:= .Body
if , = .SetStream(); != nil {
return , , &smithy.SerializationError{Err: }
}
}
if .Request, = .Encode(.Request); != nil {
return , , &smithy.SerializationError{Err: }
}
.Request =
return .HandleSerialize(, )
}
func ( *WriteGetObjectResponseInput, *httpbinding.Encoder) error {
if == nil {
return fmt.Errorf("unsupported serialization of nil %T", )
}
if .AcceptRanges != nil && len(*.AcceptRanges) > 0 {
:= "X-Amz-Fwd-Header-Accept-Ranges"
.SetHeader().String(*.AcceptRanges)
}
if .BucketKeyEnabled {
:= "X-Amz-Fwd-Header-X-Amz-Server-Side-Encryption-Bucket-Key-Enabled"
.SetHeader().Boolean(.BucketKeyEnabled)
}
if .CacheControl != nil && len(*.CacheControl) > 0 {
:= "X-Amz-Fwd-Header-Cache-Control"
.SetHeader().String(*.CacheControl)
}
if .ChecksumCRC32 != nil && len(*.ChecksumCRC32) > 0 {
:= "X-Amz-Fwd-Header-X-Amz-Checksum-Crc32"
.SetHeader().String(*.ChecksumCRC32)
}
if .ChecksumCRC32C != nil && len(*.ChecksumCRC32C) > 0 {
:= "X-Amz-Fwd-Header-X-Amz-Checksum-Crc32c"
.SetHeader().String(*.ChecksumCRC32C)
}
if .ChecksumSHA1 != nil && len(*.ChecksumSHA1) > 0 {
:= "X-Amz-Fwd-Header-X-Amz-Checksum-Sha1"
.SetHeader().String(*.ChecksumSHA1)
}
if .ChecksumSHA256 != nil && len(*.ChecksumSHA256) > 0 {
:= "X-Amz-Fwd-Header-X-Amz-Checksum-Sha256"
.SetHeader().String(*.ChecksumSHA256)
}
if .ContentDisposition != nil && len(*.ContentDisposition) > 0 {
:= "X-Amz-Fwd-Header-Content-Disposition"
.SetHeader().String(*.ContentDisposition)
}
if .ContentEncoding != nil && len(*.ContentEncoding) > 0 {
:= "X-Amz-Fwd-Header-Content-Encoding"
.SetHeader().String(*.ContentEncoding)
}
if .ContentLanguage != nil && len(*.ContentLanguage) > 0 {
:= "X-Amz-Fwd-Header-Content-Language"
.SetHeader().String(*.ContentLanguage)
}
if .ContentLength != 0 {
:= "Content-Length"
.SetHeader().Long(.ContentLength)
}
if .ContentRange != nil && len(*.ContentRange) > 0 {
:= "X-Amz-Fwd-Header-Content-Range"
.SetHeader().String(*.ContentRange)
}
if .ContentType != nil && len(*.ContentType) > 0 {
:= "X-Amz-Fwd-Header-Content-Type"
.SetHeader().String(*.ContentType)
}
if .DeleteMarker {
:= "X-Amz-Fwd-Header-X-Amz-Delete-Marker"
.SetHeader().Boolean(.DeleteMarker)
}
if .ErrorCode != nil && len(*.ErrorCode) > 0 {
:= "X-Amz-Fwd-Error-Code"
.SetHeader().String(*.ErrorCode)
}
if .ErrorMessage != nil && len(*.ErrorMessage) > 0 {
:= "X-Amz-Fwd-Error-Message"
.SetHeader().String(*.ErrorMessage)
}
if .ETag != nil && len(*.ETag) > 0 {
:= "X-Amz-Fwd-Header-Etag"
.SetHeader().String(*.ETag)
}
if .Expiration != nil && len(*.Expiration) > 0 {
:= "X-Amz-Fwd-Header-X-Amz-Expiration"
.SetHeader().String(*.Expiration)
}
if .Expires != nil {
:= "X-Amz-Fwd-Header-Expires"
.SetHeader().String(smithytime.FormatHTTPDate(*.Expires))
}
if .LastModified != nil {
:= "X-Amz-Fwd-Header-Last-Modified"
.SetHeader().String(smithytime.FormatHTTPDate(*.LastModified))
}
if .Metadata != nil {
:= .Headers("X-Amz-Meta-")
for , := range .Metadata {
if len() > 0 {
.SetHeader(http.CanonicalHeaderKey()).String()
}
}
}
if .MissingMeta != 0 {
:= "X-Amz-Fwd-Header-X-Amz-Missing-Meta"
.SetHeader().Integer(.MissingMeta)
}
if len(.ObjectLockLegalHoldStatus) > 0 {
:= "X-Amz-Fwd-Header-X-Amz-Object-Lock-Legal-Hold"
.SetHeader().String(string(.ObjectLockLegalHoldStatus))
}
if len(.ObjectLockMode) > 0 {
:= "X-Amz-Fwd-Header-X-Amz-Object-Lock-Mode"
.SetHeader().String(string(.ObjectLockMode))
}
if .ObjectLockRetainUntilDate != nil {
:= "X-Amz-Fwd-Header-X-Amz-Object-Lock-Retain-Until-Date"
.SetHeader().String(smithytime.FormatDateTime(*.ObjectLockRetainUntilDate))
}
if .PartsCount != 0 {
:= "X-Amz-Fwd-Header-X-Amz-Mp-Parts-Count"
.SetHeader().Integer(.PartsCount)
}
if len(.ReplicationStatus) > 0 {
:= "X-Amz-Fwd-Header-X-Amz-Replication-Status"
.SetHeader().String(string(.ReplicationStatus))
}
if len(.RequestCharged) > 0 {
:= "X-Amz-Fwd-Header-X-Amz-Request-Charged"
.SetHeader().String(string(.RequestCharged))
}
if .RequestRoute != nil && len(*.RequestRoute) > 0 {
:= "X-Amz-Request-Route"
.SetHeader().String(*.RequestRoute)
}
if .RequestToken != nil && len(*.RequestToken) > 0 {
:= "X-Amz-Request-Token"
.SetHeader().String(*.RequestToken)
}
if .Restore != nil && len(*.Restore) > 0 {
:= "X-Amz-Fwd-Header-X-Amz-Restore"
.SetHeader().String(*.Restore)
}
if len(.ServerSideEncryption) > 0 {
:= "X-Amz-Fwd-Header-X-Amz-Server-Side-Encryption"
.SetHeader().String(string(.ServerSideEncryption))
}
if .SSECustomerAlgorithm != nil && len(*.SSECustomerAlgorithm) > 0 {
:= "X-Amz-Fwd-Header-X-Amz-Server-Side-Encryption-Customer-Algorithm"
.SetHeader().String(*.SSECustomerAlgorithm)
}
if .SSECustomerKeyMD5 != nil && len(*.SSECustomerKeyMD5) > 0 {
:= "X-Amz-Fwd-Header-X-Amz-Server-Side-Encryption-Customer-Key-Md5"
.SetHeader().String(*.SSECustomerKeyMD5)
}
if .SSEKMSKeyId != nil && len(*.SSEKMSKeyId) > 0 {
:= "X-Amz-Fwd-Header-X-Amz-Server-Side-Encryption-Aws-Kms-Key-Id"
.SetHeader().String(*.SSEKMSKeyId)
}
if .StatusCode != 0 {
:= "X-Amz-Fwd-Status"
.SetHeader().Integer(.StatusCode)
}
if len(.StorageClass) > 0 {
:= "X-Amz-Fwd-Header-X-Amz-Storage-Class"
.SetHeader().String(string(.StorageClass))
}
if .TagCount != 0 {
:= "X-Amz-Fwd-Header-X-Amz-Tagging-Count"
.SetHeader().Integer(.TagCount)
}
if .VersionId != nil && len(*.VersionId) > 0 {
:= "X-Amz-Fwd-Header-X-Amz-Version-Id"
.SetHeader().String(*.VersionId)
}
return nil
}
func ( *types.AbortIncompleteMultipartUpload, smithyxml.Value) error {
defer .Close()
if .DaysAfterInitiation != 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "DaysAfterInitiation",
},
Attr: ,
}
:= .MemberElement()
.Integer(.DaysAfterInitiation)
}
return nil
}
func ( *types.AccelerateConfiguration, smithyxml.Value) error {
defer .Close()
if len(.Status) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Status",
},
Attr: ,
}
:= .MemberElement()
.String(string(.Status))
}
return nil
}
func ( *types.AccessControlPolicy, smithyxml.Value) error {
defer .Close()
if .Grants != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "AccessControlList",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentGrants(.Grants, ); != nil {
return
}
}
if .Owner != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Owner",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentOwner(.Owner, ); != nil {
return
}
}
return nil
}
func ( *types.AccessControlTranslation, smithyxml.Value) error {
defer .Close()
if len(.Owner) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Owner",
},
Attr: ,
}
:= .MemberElement()
.String(string(.Owner))
}
return nil
}
func ( []string, smithyxml.Value) error {
var *smithyxml.Array
if !.IsFlattened() {
defer .Close()
}
= .Array()
for := range {
:= .Member()
.String([])
}
return nil
}
func ( []string, smithyxml.Value) error {
var *smithyxml.Array
if !.IsFlattened() {
defer .Close()
}
= .Array()
for := range {
:= .Member()
.String([])
}
return nil
}
func ( []string, smithyxml.Value) error {
var *smithyxml.Array
if !.IsFlattened() {
defer .Close()
}
= .Array()
for := range {
:= .Member()
.String([])
}
return nil
}
func ( *types.AnalyticsAndOperator, smithyxml.Value) error {
defer .Close()
if .Prefix != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Prefix",
},
Attr: ,
}
:= .MemberElement()
.String(*.Prefix)
}
if .Tags != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Tag",
},
Attr: ,
}
:= .FlattenedElement()
if := awsRestxml_serializeDocumentTagSet(.Tags, ); != nil {
return
}
}
return nil
}
func ( *types.AnalyticsConfiguration, smithyxml.Value) error {
defer .Close()
if .Filter != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Filter",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentAnalyticsFilter(.Filter, ); != nil {
return
}
}
if .Id != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Id",
},
Attr: ,
}
:= .MemberElement()
.String(*.Id)
}
if .StorageClassAnalysis != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "StorageClassAnalysis",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentStorageClassAnalysis(.StorageClassAnalysis, ); != nil {
return
}
}
return nil
}
func ( *types.AnalyticsExportDestination, smithyxml.Value) error {
defer .Close()
if .S3BucketDestination != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "S3BucketDestination",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentAnalyticsS3BucketDestination(.S3BucketDestination, ); != nil {
return
}
}
return nil
}
func ( types.AnalyticsFilter, smithyxml.Value) error {
defer .Close()
switch uv := .(type) {
case *types.AnalyticsFilterMemberAnd:
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "And",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentAnalyticsAndOperator(&.Value, ); != nil {
return
}
case *types.AnalyticsFilterMemberPrefix:
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Prefix",
},
Attr: ,
}
:= .MemberElement()
.String(.Value)
case *types.AnalyticsFilterMemberTag:
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Tag",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentTag(&.Value, ); != nil {
return
}
default:
return fmt.Errorf("attempted to serialize unknown member type %T for union %T", , )
}
return nil
}
func ( *types.AnalyticsS3BucketDestination, smithyxml.Value) error {
defer .Close()
if .Bucket != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Bucket",
},
Attr: ,
}
:= .MemberElement()
.String(*.Bucket)
}
if .BucketAccountId != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "BucketAccountId",
},
Attr: ,
}
:= .MemberElement()
.String(*.BucketAccountId)
}
if len(.Format) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Format",
},
Attr: ,
}
:= .MemberElement()
.String(string(.Format))
}
if .Prefix != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Prefix",
},
Attr: ,
}
:= .MemberElement()
.String(*.Prefix)
}
return nil
}
func ( *types.BucketLifecycleConfiguration, smithyxml.Value) error {
defer .Close()
if .Rules != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Rule",
},
Attr: ,
}
:= .FlattenedElement()
if := awsRestxml_serializeDocumentLifecycleRules(.Rules, ); != nil {
return
}
}
return nil
}
func ( *types.BucketLoggingStatus, smithyxml.Value) error {
defer .Close()
if .LoggingEnabled != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "LoggingEnabled",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentLoggingEnabled(.LoggingEnabled, ); != nil {
return
}
}
return nil
}
func ( *types.CompletedMultipartUpload, smithyxml.Value) error {
defer .Close()
if .Parts != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Part",
},
Attr: ,
}
:= .FlattenedElement()
if := awsRestxml_serializeDocumentCompletedPartList(.Parts, ); != nil {
return
}
}
return nil
}
func ( *types.CompletedPart, smithyxml.Value) error {
defer .Close()
if .ChecksumCRC32 != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ChecksumCRC32",
},
Attr: ,
}
:= .MemberElement()
.String(*.ChecksumCRC32)
}
if .ChecksumCRC32C != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ChecksumCRC32C",
},
Attr: ,
}
:= .MemberElement()
.String(*.ChecksumCRC32C)
}
if .ChecksumSHA1 != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ChecksumSHA1",
},
Attr: ,
}
:= .MemberElement()
.String(*.ChecksumSHA1)
}
if .ChecksumSHA256 != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ChecksumSHA256",
},
Attr: ,
}
:= .MemberElement()
.String(*.ChecksumSHA256)
}
if .ETag != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ETag",
},
Attr: ,
}
:= .MemberElement()
.String(*.ETag)
}
if .PartNumber != 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "PartNumber",
},
Attr: ,
}
:= .MemberElement()
.Integer(.PartNumber)
}
return nil
}
func ( []types.CompletedPart, smithyxml.Value) error {
var *smithyxml.Array
if !.IsFlattened() {
defer .Close()
}
= .Array()
for := range {
:= .Member()
if := awsRestxml_serializeDocumentCompletedPart(&[], ); != nil {
return
}
}
return nil
}
func ( *types.Condition, smithyxml.Value) error {
defer .Close()
if .HttpErrorCodeReturnedEquals != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "HttpErrorCodeReturnedEquals",
},
Attr: ,
}
:= .MemberElement()
.String(*.HttpErrorCodeReturnedEquals)
}
if .KeyPrefixEquals != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "KeyPrefixEquals",
},
Attr: ,
}
:= .MemberElement()
.String(*.KeyPrefixEquals)
}
return nil
}
func ( *types.CORSConfiguration, smithyxml.Value) error {
defer .Close()
if .CORSRules != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "CORSRule",
},
Attr: ,
}
:= .FlattenedElement()
if := awsRestxml_serializeDocumentCORSRules(.CORSRules, ); != nil {
return
}
}
return nil
}
func ( *types.CORSRule, smithyxml.Value) error {
defer .Close()
if .AllowedHeaders != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "AllowedHeader",
},
Attr: ,
}
:= .FlattenedElement()
if := awsRestxml_serializeDocumentAllowedHeaders(.AllowedHeaders, ); != nil {
return
}
}
if .AllowedMethods != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "AllowedMethod",
},
Attr: ,
}
:= .FlattenedElement()
if := awsRestxml_serializeDocumentAllowedMethods(.AllowedMethods, ); != nil {
return
}
}
if .AllowedOrigins != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "AllowedOrigin",
},
Attr: ,
}
:= .FlattenedElement()
if := awsRestxml_serializeDocumentAllowedOrigins(.AllowedOrigins, ); != nil {
return
}
}
if .ExposeHeaders != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ExposeHeader",
},
Attr: ,
}
:= .FlattenedElement()
if := awsRestxml_serializeDocumentExposeHeaders(.ExposeHeaders, ); != nil {
return
}
}
if .ID != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ID",
},
Attr: ,
}
:= .MemberElement()
.String(*.ID)
}
if .MaxAgeSeconds != 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "MaxAgeSeconds",
},
Attr: ,
}
:= .MemberElement()
.Integer(.MaxAgeSeconds)
}
return nil
}
func ( []types.CORSRule, smithyxml.Value) error {
var *smithyxml.Array
if !.IsFlattened() {
defer .Close()
}
= .Array()
for := range {
:= .Member()
if := awsRestxml_serializeDocumentCORSRule(&[], ); != nil {
return
}
}
return nil
}
func ( *types.CreateBucketConfiguration, smithyxml.Value) error {
defer .Close()
if len(.LocationConstraint) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "LocationConstraint",
},
Attr: ,
}
:= .MemberElement()
.String(string(.LocationConstraint))
}
return nil
}
func ( *types.CSVInput, smithyxml.Value) error {
defer .Close()
if .AllowQuotedRecordDelimiter {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "AllowQuotedRecordDelimiter",
},
Attr: ,
}
:= .MemberElement()
.Boolean(.AllowQuotedRecordDelimiter)
}
if .Comments != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Comments",
},
Attr: ,
}
:= .MemberElement()
.String(*.Comments)
}
if .FieldDelimiter != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "FieldDelimiter",
},
Attr: ,
}
:= .MemberElement()
.String(*.FieldDelimiter)
}
if len(.FileHeaderInfo) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "FileHeaderInfo",
},
Attr: ,
}
:= .MemberElement()
.String(string(.FileHeaderInfo))
}
if .QuoteCharacter != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "QuoteCharacter",
},
Attr: ,
}
:= .MemberElement()
.String(*.QuoteCharacter)
}
if .QuoteEscapeCharacter != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "QuoteEscapeCharacter",
},
Attr: ,
}
:= .MemberElement()
.String(*.QuoteEscapeCharacter)
}
if .RecordDelimiter != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "RecordDelimiter",
},
Attr: ,
}
:= .MemberElement()
.String(*.RecordDelimiter)
}
return nil
}
func ( *types.CSVOutput, smithyxml.Value) error {
defer .Close()
if .FieldDelimiter != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "FieldDelimiter",
},
Attr: ,
}
:= .MemberElement()
.String(*.FieldDelimiter)
}
if .QuoteCharacter != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "QuoteCharacter",
},
Attr: ,
}
:= .MemberElement()
.String(*.QuoteCharacter)
}
if .QuoteEscapeCharacter != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "QuoteEscapeCharacter",
},
Attr: ,
}
:= .MemberElement()
.String(*.QuoteEscapeCharacter)
}
if len(.QuoteFields) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "QuoteFields",
},
Attr: ,
}
:= .MemberElement()
.String(string(.QuoteFields))
}
if .RecordDelimiter != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "RecordDelimiter",
},
Attr: ,
}
:= .MemberElement()
.String(*.RecordDelimiter)
}
return nil
}
func ( *types.DefaultRetention, smithyxml.Value) error {
defer .Close()
if .Days != 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Days",
},
Attr: ,
}
:= .MemberElement()
.Integer(.Days)
}
if len(.Mode) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Mode",
},
Attr: ,
}
:= .MemberElement()
.String(string(.Mode))
}
if .Years != 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Years",
},
Attr: ,
}
:= .MemberElement()
.Integer(.Years)
}
return nil
}
func ( *types.Delete, smithyxml.Value) error {
defer .Close()
if .Objects != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Object",
},
Attr: ,
}
:= .FlattenedElement()
if := awsRestxml_serializeDocumentObjectIdentifierList(.Objects, ); != nil {
return
}
}
if .Quiet {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Quiet",
},
Attr: ,
}
:= .MemberElement()
.Boolean(.Quiet)
}
return nil
}
func ( *types.DeleteMarkerReplication, smithyxml.Value) error {
defer .Close()
if len(.Status) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Status",
},
Attr: ,
}
:= .MemberElement()
.String(string(.Status))
}
return nil
}
func ( *types.Destination, smithyxml.Value) error {
defer .Close()
if .AccessControlTranslation != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "AccessControlTranslation",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentAccessControlTranslation(.AccessControlTranslation, ); != nil {
return
}
}
if .Account != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Account",
},
Attr: ,
}
:= .MemberElement()
.String(*.Account)
}
if .Bucket != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Bucket",
},
Attr: ,
}
:= .MemberElement()
.String(*.Bucket)
}
if .EncryptionConfiguration != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "EncryptionConfiguration",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentEncryptionConfiguration(.EncryptionConfiguration, ); != nil {
return
}
}
if .Metrics != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Metrics",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentMetrics(.Metrics, ); != nil {
return
}
}
if .ReplicationTime != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ReplicationTime",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentReplicationTime(.ReplicationTime, ); != nil {
return
}
}
if len(.StorageClass) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "StorageClass",
},
Attr: ,
}
:= .MemberElement()
.String(string(.StorageClass))
}
return nil
}
func ( *types.Encryption, smithyxml.Value) error {
defer .Close()
if len(.EncryptionType) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "EncryptionType",
},
Attr: ,
}
:= .MemberElement()
.String(string(.EncryptionType))
}
if .KMSContext != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "KMSContext",
},
Attr: ,
}
:= .MemberElement()
.String(*.KMSContext)
}
if .KMSKeyId != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "KMSKeyId",
},
Attr: ,
}
:= .MemberElement()
.String(*.KMSKeyId)
}
return nil
}
func ( *types.EncryptionConfiguration, smithyxml.Value) error {
defer .Close()
if .ReplicaKmsKeyID != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ReplicaKmsKeyID",
},
Attr: ,
}
:= .MemberElement()
.String(*.ReplicaKmsKeyID)
}
return nil
}
func ( *types.ErrorDocument, smithyxml.Value) error {
defer .Close()
if .Key != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Key",
},
Attr: ,
}
:= .MemberElement()
.String(*.Key)
}
return nil
}
func ( *types.EventBridgeConfiguration, smithyxml.Value) error {
defer .Close()
return nil
}
func ( []types.Event, smithyxml.Value) error {
var *smithyxml.Array
if !.IsFlattened() {
defer .Close()
}
= .Array()
for := range {
:= .Member()
.String(string([]))
}
return nil
}
func ( *types.ExistingObjectReplication, smithyxml.Value) error {
defer .Close()
if len(.Status) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Status",
},
Attr: ,
}
:= .MemberElement()
.String(string(.Status))
}
return nil
}
func ( []string, smithyxml.Value) error {
var *smithyxml.Array
if !.IsFlattened() {
defer .Close()
}
= .Array()
for := range {
:= .Member()
.String([])
}
return nil
}
func ( *types.FilterRule, smithyxml.Value) error {
defer .Close()
if len(.Name) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Name",
},
Attr: ,
}
:= .MemberElement()
.String(string(.Name))
}
if .Value != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Value",
},
Attr: ,
}
:= .MemberElement()
.String(*.Value)
}
return nil
}
func ( []types.FilterRule, smithyxml.Value) error {
var *smithyxml.Array
if !.IsFlattened() {
defer .Close()
}
= .Array()
for := range {
:= .Member()
if := awsRestxml_serializeDocumentFilterRule(&[], ); != nil {
return
}
}
return nil
}
func ( *types.GlacierJobParameters, smithyxml.Value) error {
defer .Close()
if len(.Tier) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Tier",
},
Attr: ,
}
:= .MemberElement()
.String(string(.Tier))
}
return nil
}
func ( *types.Grant, smithyxml.Value) error {
defer .Close()
if .Grantee != nil {
:= []smithyxml.Attr{}
= append(, smithyxml.NewNamespaceAttribute("xsi", "http://www.w3.org/2001/XMLSchema-instance"))
if len(.Grantee.Type) > 0 {
var string
= string(.Grantee.Type)
= append(, smithyxml.NewAttribute("xsi:type", ))
}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Grantee",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentGrantee(.Grantee, ); != nil {
return
}
}
if len(.Permission) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Permission",
},
Attr: ,
}
:= .MemberElement()
.String(string(.Permission))
}
return nil
}
func ( *types.Grantee, smithyxml.Value) error {
defer .Close()
if .DisplayName != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "DisplayName",
},
Attr: ,
}
:= .MemberElement()
.String(*.DisplayName)
}
if .EmailAddress != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "EmailAddress",
},
Attr: ,
}
:= .MemberElement()
.String(*.EmailAddress)
}
if .ID != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ID",
},
Attr: ,
}
:= .MemberElement()
.String(*.ID)
}
if .URI != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "URI",
},
Attr: ,
}
:= .MemberElement()
.String(*.URI)
}
return nil
}
func ( []types.Grant, smithyxml.Value) error {
var *smithyxml.Array
if !.IsFlattened() {
defer .Close()
}
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Grant",
},
Attr: ,
}
= .ArrayWithCustomName()
for := range {
:= .Member()
if := awsRestxml_serializeDocumentGrant(&[], ); != nil {
return
}
}
return nil
}
func ( *types.IndexDocument, smithyxml.Value) error {
defer .Close()
if .Suffix != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Suffix",
},
Attr: ,
}
:= .MemberElement()
.String(*.Suffix)
}
return nil
}
func ( *types.InputSerialization, smithyxml.Value) error {
defer .Close()
if len(.CompressionType) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "CompressionType",
},
Attr: ,
}
:= .MemberElement()
.String(string(.CompressionType))
}
if .CSV != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "CSV",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentCSVInput(.CSV, ); != nil {
return
}
}
if .JSON != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "JSON",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentJSONInput(.JSON, ); != nil {
return
}
}
if .Parquet != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Parquet",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentParquetInput(.Parquet, ); != nil {
return
}
}
return nil
}
func ( *types.IntelligentTieringAndOperator, smithyxml.Value) error {
defer .Close()
if .Prefix != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Prefix",
},
Attr: ,
}
:= .MemberElement()
.String(*.Prefix)
}
if .Tags != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Tag",
},
Attr: ,
}
:= .FlattenedElement()
if := awsRestxml_serializeDocumentTagSet(.Tags, ); != nil {
return
}
}
return nil
}
func ( *types.IntelligentTieringConfiguration, smithyxml.Value) error {
defer .Close()
if .Filter != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Filter",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentIntelligentTieringFilter(.Filter, ); != nil {
return
}
}
if .Id != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Id",
},
Attr: ,
}
:= .MemberElement()
.String(*.Id)
}
if len(.Status) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Status",
},
Attr: ,
}
:= .MemberElement()
.String(string(.Status))
}
if .Tierings != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Tiering",
},
Attr: ,
}
:= .FlattenedElement()
if := awsRestxml_serializeDocumentTieringList(.Tierings, ); != nil {
return
}
}
return nil
}
func ( *types.IntelligentTieringFilter, smithyxml.Value) error {
defer .Close()
if .And != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "And",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentIntelligentTieringAndOperator(.And, ); != nil {
return
}
}
if .Prefix != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Prefix",
},
Attr: ,
}
:= .MemberElement()
.String(*.Prefix)
}
if .Tag != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Tag",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentTag(.Tag, ); != nil {
return
}
}
return nil
}
func ( *types.InventoryConfiguration, smithyxml.Value) error {
defer .Close()
if .Destination != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Destination",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentInventoryDestination(.Destination, ); != nil {
return
}
}
if .Filter != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Filter",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentInventoryFilter(.Filter, ); != nil {
return
}
}
if .Id != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Id",
},
Attr: ,
}
:= .MemberElement()
.String(*.Id)
}
if len(.IncludedObjectVersions) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "IncludedObjectVersions",
},
Attr: ,
}
:= .MemberElement()
.String(string(.IncludedObjectVersions))
}
{
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "IsEnabled",
},
Attr: ,
}
:= .MemberElement()
.Boolean(.IsEnabled)
}
if .OptionalFields != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "OptionalFields",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentInventoryOptionalFields(.OptionalFields, ); != nil {
return
}
}
if .Schedule != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Schedule",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentInventorySchedule(.Schedule, ); != nil {
return
}
}
return nil
}
func ( *types.InventoryDestination, smithyxml.Value) error {
defer .Close()
if .S3BucketDestination != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "S3BucketDestination",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentInventoryS3BucketDestination(.S3BucketDestination, ); != nil {
return
}
}
return nil
}
func ( *types.InventoryEncryption, smithyxml.Value) error {
defer .Close()
if .SSEKMS != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "SSE-KMS",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentSSEKMS(.SSEKMS, ); != nil {
return
}
}
if .SSES3 != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "SSE-S3",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentSSES3(.SSES3, ); != nil {
return
}
}
return nil
}
func ( *types.InventoryFilter, smithyxml.Value) error {
defer .Close()
if .Prefix != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Prefix",
},
Attr: ,
}
:= .MemberElement()
.String(*.Prefix)
}
return nil
}
func ( []types.InventoryOptionalField, smithyxml.Value) error {
var *smithyxml.Array
if !.IsFlattened() {
defer .Close()
}
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Field",
},
Attr: ,
}
= .ArrayWithCustomName()
for := range {
:= .Member()
.String(string([]))
}
return nil
}
func ( *types.InventoryS3BucketDestination, smithyxml.Value) error {
defer .Close()
if .AccountId != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "AccountId",
},
Attr: ,
}
:= .MemberElement()
.String(*.AccountId)
}
if .Bucket != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Bucket",
},
Attr: ,
}
:= .MemberElement()
.String(*.Bucket)
}
if .Encryption != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Encryption",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentInventoryEncryption(.Encryption, ); != nil {
return
}
}
if len(.Format) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Format",
},
Attr: ,
}
:= .MemberElement()
.String(string(.Format))
}
if .Prefix != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Prefix",
},
Attr: ,
}
:= .MemberElement()
.String(*.Prefix)
}
return nil
}
func ( *types.InventorySchedule, smithyxml.Value) error {
defer .Close()
if len(.Frequency) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Frequency",
},
Attr: ,
}
:= .MemberElement()
.String(string(.Frequency))
}
return nil
}
func ( *types.JSONInput, smithyxml.Value) error {
defer .Close()
if len(.Type) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Type",
},
Attr: ,
}
:= .MemberElement()
.String(string(.Type))
}
return nil
}
func ( *types.JSONOutput, smithyxml.Value) error {
defer .Close()
if .RecordDelimiter != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "RecordDelimiter",
},
Attr: ,
}
:= .MemberElement()
.String(*.RecordDelimiter)
}
return nil
}
func ( *types.LambdaFunctionConfiguration, smithyxml.Value) error {
defer .Close()
if .Events != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Event",
},
Attr: ,
}
:= .FlattenedElement()
if := awsRestxml_serializeDocumentEventList(.Events, ); != nil {
return
}
}
if .Filter != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Filter",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentNotificationConfigurationFilter(.Filter, ); != nil {
return
}
}
if .Id != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Id",
},
Attr: ,
}
:= .MemberElement()
.String(*.Id)
}
if .LambdaFunctionArn != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "CloudFunction",
},
Attr: ,
}
:= .MemberElement()
.String(*.LambdaFunctionArn)
}
return nil
}
func ( []types.LambdaFunctionConfiguration, smithyxml.Value) error {
var *smithyxml.Array
if !.IsFlattened() {
defer .Close()
}
= .Array()
for := range {
:= .Member()
if := awsRestxml_serializeDocumentLambdaFunctionConfiguration(&[], ); != nil {
return
}
}
return nil
}
func ( *types.LifecycleExpiration, smithyxml.Value) error {
defer .Close()
if .Date != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Date",
},
Attr: ,
}
:= .MemberElement()
.String(smithytime.FormatDateTime(*.Date))
}
if .Days != 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Days",
},
Attr: ,
}
:= .MemberElement()
.Integer(.Days)
}
if .ExpiredObjectDeleteMarker {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ExpiredObjectDeleteMarker",
},
Attr: ,
}
:= .MemberElement()
.Boolean(.ExpiredObjectDeleteMarker)
}
return nil
}
func ( *types.LifecycleRule, smithyxml.Value) error {
defer .Close()
if .AbortIncompleteMultipartUpload != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "AbortIncompleteMultipartUpload",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentAbortIncompleteMultipartUpload(.AbortIncompleteMultipartUpload, ); != nil {
return
}
}
if .Expiration != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Expiration",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentLifecycleExpiration(.Expiration, ); != nil {
return
}
}
if .Filter != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Filter",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentLifecycleRuleFilter(.Filter, ); != nil {
return
}
}
if .ID != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ID",
},
Attr: ,
}
:= .MemberElement()
.String(*.ID)
}
if .NoncurrentVersionExpiration != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "NoncurrentVersionExpiration",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentNoncurrentVersionExpiration(.NoncurrentVersionExpiration, ); != nil {
return
}
}
if .NoncurrentVersionTransitions != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "NoncurrentVersionTransition",
},
Attr: ,
}
:= .FlattenedElement()
if := awsRestxml_serializeDocumentNoncurrentVersionTransitionList(.NoncurrentVersionTransitions, ); != nil {
return
}
}
if .Prefix != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Prefix",
},
Attr: ,
}
:= .MemberElement()
.String(*.Prefix)
}
if len(.Status) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Status",
},
Attr: ,
}
:= .MemberElement()
.String(string(.Status))
}
if .Transitions != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Transition",
},
Attr: ,
}
:= .FlattenedElement()
if := awsRestxml_serializeDocumentTransitionList(.Transitions, ); != nil {
return
}
}
return nil
}
func ( *types.LifecycleRuleAndOperator, smithyxml.Value) error {
defer .Close()
if .ObjectSizeGreaterThan != 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ObjectSizeGreaterThan",
},
Attr: ,
}
:= .MemberElement()
.Long(.ObjectSizeGreaterThan)
}
if .ObjectSizeLessThan != 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ObjectSizeLessThan",
},
Attr: ,
}
:= .MemberElement()
.Long(.ObjectSizeLessThan)
}
if .Prefix != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Prefix",
},
Attr: ,
}
:= .MemberElement()
.String(*.Prefix)
}
if .Tags != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Tag",
},
Attr: ,
}
:= .FlattenedElement()
if := awsRestxml_serializeDocumentTagSet(.Tags, ); != nil {
return
}
}
return nil
}
func ( types.LifecycleRuleFilter, smithyxml.Value) error {
defer .Close()
switch uv := .(type) {
case *types.LifecycleRuleFilterMemberAnd:
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "And",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentLifecycleRuleAndOperator(&.Value, ); != nil {
return
}
case *types.LifecycleRuleFilterMemberObjectSizeGreaterThan:
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ObjectSizeGreaterThan",
},
Attr: ,
}
:= .MemberElement()
.Long(.Value)
case *types.LifecycleRuleFilterMemberObjectSizeLessThan:
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ObjectSizeLessThan",
},
Attr: ,
}
:= .MemberElement()
.Long(.Value)
case *types.LifecycleRuleFilterMemberPrefix:
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Prefix",
},
Attr: ,
}
:= .MemberElement()
.String(.Value)
case *types.LifecycleRuleFilterMemberTag:
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Tag",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentTag(&.Value, ); != nil {
return
}
default:
return fmt.Errorf("attempted to serialize unknown member type %T for union %T", , )
}
return nil
}
func ( []types.LifecycleRule, smithyxml.Value) error {
var *smithyxml.Array
if !.IsFlattened() {
defer .Close()
}
= .Array()
for := range {
:= .Member()
if := awsRestxml_serializeDocumentLifecycleRule(&[], ); != nil {
return
}
}
return nil
}
func ( *types.LoggingEnabled, smithyxml.Value) error {
defer .Close()
if .TargetBucket != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "TargetBucket",
},
Attr: ,
}
:= .MemberElement()
.String(*.TargetBucket)
}
if .TargetGrants != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "TargetGrants",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentTargetGrants(.TargetGrants, ); != nil {
return
}
}
if .TargetPrefix != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "TargetPrefix",
},
Attr: ,
}
:= .MemberElement()
.String(*.TargetPrefix)
}
return nil
}
func ( *types.MetadataEntry, smithyxml.Value) error {
defer .Close()
if .Name != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Name",
},
Attr: ,
}
:= .MemberElement()
.String(*.Name)
}
if .Value != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Value",
},
Attr: ,
}
:= .MemberElement()
.String(*.Value)
}
return nil
}
func ( *types.Metrics, smithyxml.Value) error {
defer .Close()
if .EventThreshold != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "EventThreshold",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentReplicationTimeValue(.EventThreshold, ); != nil {
return
}
}
if len(.Status) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Status",
},
Attr: ,
}
:= .MemberElement()
.String(string(.Status))
}
return nil
}
func ( *types.MetricsAndOperator, smithyxml.Value) error {
defer .Close()
if .AccessPointArn != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "AccessPointArn",
},
Attr: ,
}
:= .MemberElement()
.String(*.AccessPointArn)
}
if .Prefix != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Prefix",
},
Attr: ,
}
:= .MemberElement()
.String(*.Prefix)
}
if .Tags != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Tag",
},
Attr: ,
}
:= .FlattenedElement()
if := awsRestxml_serializeDocumentTagSet(.Tags, ); != nil {
return
}
}
return nil
}
func ( *types.MetricsConfiguration, smithyxml.Value) error {
defer .Close()
if .Filter != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Filter",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentMetricsFilter(.Filter, ); != nil {
return
}
}
if .Id != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Id",
},
Attr: ,
}
:= .MemberElement()
.String(*.Id)
}
return nil
}
func ( types.MetricsFilter, smithyxml.Value) error {
defer .Close()
switch uv := .(type) {
case *types.MetricsFilterMemberAccessPointArn:
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "AccessPointArn",
},
Attr: ,
}
:= .MemberElement()
.String(.Value)
case *types.MetricsFilterMemberAnd:
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "And",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentMetricsAndOperator(&.Value, ); != nil {
return
}
case *types.MetricsFilterMemberPrefix:
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Prefix",
},
Attr: ,
}
:= .MemberElement()
.String(.Value)
case *types.MetricsFilterMemberTag:
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Tag",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentTag(&.Value, ); != nil {
return
}
default:
return fmt.Errorf("attempted to serialize unknown member type %T for union %T", , )
}
return nil
}
func ( *types.NoncurrentVersionExpiration, smithyxml.Value) error {
defer .Close()
if .NewerNoncurrentVersions != 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "NewerNoncurrentVersions",
},
Attr: ,
}
:= .MemberElement()
.Integer(.NewerNoncurrentVersions)
}
if .NoncurrentDays != 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "NoncurrentDays",
},
Attr: ,
}
:= .MemberElement()
.Integer(.NoncurrentDays)
}
return nil
}
func ( *types.NoncurrentVersionTransition, smithyxml.Value) error {
defer .Close()
if .NewerNoncurrentVersions != 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "NewerNoncurrentVersions",
},
Attr: ,
}
:= .MemberElement()
.Integer(.NewerNoncurrentVersions)
}
if .NoncurrentDays != 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "NoncurrentDays",
},
Attr: ,
}
:= .MemberElement()
.Integer(.NoncurrentDays)
}
if len(.StorageClass) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "StorageClass",
},
Attr: ,
}
:= .MemberElement()
.String(string(.StorageClass))
}
return nil
}
func ( []types.NoncurrentVersionTransition, smithyxml.Value) error {
var *smithyxml.Array
if !.IsFlattened() {
defer .Close()
}
= .Array()
for := range {
:= .Member()
if := awsRestxml_serializeDocumentNoncurrentVersionTransition(&[], ); != nil {
return
}
}
return nil
}
func ( *types.NotificationConfiguration, smithyxml.Value) error {
defer .Close()
if .EventBridgeConfiguration != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "EventBridgeConfiguration",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentEventBridgeConfiguration(.EventBridgeConfiguration, ); != nil {
return
}
}
if .LambdaFunctionConfigurations != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "CloudFunctionConfiguration",
},
Attr: ,
}
:= .FlattenedElement()
if := awsRestxml_serializeDocumentLambdaFunctionConfigurationList(.LambdaFunctionConfigurations, ); != nil {
return
}
}
if .QueueConfigurations != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "QueueConfiguration",
},
Attr: ,
}
:= .FlattenedElement()
if := awsRestxml_serializeDocumentQueueConfigurationList(.QueueConfigurations, ); != nil {
return
}
}
if .TopicConfigurations != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "TopicConfiguration",
},
Attr: ,
}
:= .FlattenedElement()
if := awsRestxml_serializeDocumentTopicConfigurationList(.TopicConfigurations, ); != nil {
return
}
}
return nil
}
func ( *types.NotificationConfigurationFilter, smithyxml.Value) error {
defer .Close()
if .Key != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "S3Key",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentS3KeyFilter(.Key, ); != nil {
return
}
}
return nil
}
func ( *types.ObjectIdentifier, smithyxml.Value) error {
defer .Close()
if .Key != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Key",
},
Attr: ,
}
:= .MemberElement()
.String(*.Key)
}
if .VersionId != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "VersionId",
},
Attr: ,
}
:= .MemberElement()
.String(*.VersionId)
}
return nil
}
func ( []types.ObjectIdentifier, smithyxml.Value) error {
var *smithyxml.Array
if !.IsFlattened() {
defer .Close()
}
= .Array()
for := range {
:= .Member()
if := awsRestxml_serializeDocumentObjectIdentifier(&[], ); != nil {
return
}
}
return nil
}
func ( *types.ObjectLockConfiguration, smithyxml.Value) error {
defer .Close()
if len(.ObjectLockEnabled) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ObjectLockEnabled",
},
Attr: ,
}
:= .MemberElement()
.String(string(.ObjectLockEnabled))
}
if .Rule != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Rule",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentObjectLockRule(.Rule, ); != nil {
return
}
}
return nil
}
func ( *types.ObjectLockLegalHold, smithyxml.Value) error {
defer .Close()
if len(.Status) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Status",
},
Attr: ,
}
:= .MemberElement()
.String(string(.Status))
}
return nil
}
func ( *types.ObjectLockRetention, smithyxml.Value) error {
defer .Close()
if len(.Mode) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Mode",
},
Attr: ,
}
:= .MemberElement()
.String(string(.Mode))
}
if .RetainUntilDate != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "RetainUntilDate",
},
Attr: ,
}
:= .MemberElement()
.String(smithytime.FormatDateTime(*.RetainUntilDate))
}
return nil
}
func ( *types.ObjectLockRule, smithyxml.Value) error {
defer .Close()
if .DefaultRetention != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "DefaultRetention",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentDefaultRetention(.DefaultRetention, ); != nil {
return
}
}
return nil
}
func ( *types.OutputLocation, smithyxml.Value) error {
defer .Close()
if .S3 != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "S3",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentS3Location(.S3, ); != nil {
return
}
}
return nil
}
func ( *types.OutputSerialization, smithyxml.Value) error {
defer .Close()
if .CSV != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "CSV",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentCSVOutput(.CSV, ); != nil {
return
}
}
if .JSON != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "JSON",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentJSONOutput(.JSON, ); != nil {
return
}
}
return nil
}
func ( *types.Owner, smithyxml.Value) error {
defer .Close()
if .DisplayName != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "DisplayName",
},
Attr: ,
}
:= .MemberElement()
.String(*.DisplayName)
}
if .ID != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ID",
},
Attr: ,
}
:= .MemberElement()
.String(*.ID)
}
return nil
}
func ( *types.OwnershipControls, smithyxml.Value) error {
defer .Close()
if .Rules != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Rule",
},
Attr: ,
}
:= .FlattenedElement()
if := awsRestxml_serializeDocumentOwnershipControlsRules(.Rules, ); != nil {
return
}
}
return nil
}
func ( *types.OwnershipControlsRule, smithyxml.Value) error {
defer .Close()
if len(.ObjectOwnership) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ObjectOwnership",
},
Attr: ,
}
:= .MemberElement()
.String(string(.ObjectOwnership))
}
return nil
}
func ( []types.OwnershipControlsRule, smithyxml.Value) error {
var *smithyxml.Array
if !.IsFlattened() {
defer .Close()
}
= .Array()
for := range {
:= .Member()
if := awsRestxml_serializeDocumentOwnershipControlsRule(&[], ); != nil {
return
}
}
return nil
}
func ( *types.ParquetInput, smithyxml.Value) error {
defer .Close()
return nil
}
func ( *types.PublicAccessBlockConfiguration, smithyxml.Value) error {
defer .Close()
if .BlockPublicAcls {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "BlockPublicAcls",
},
Attr: ,
}
:= .MemberElement()
.Boolean(.BlockPublicAcls)
}
if .BlockPublicPolicy {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "BlockPublicPolicy",
},
Attr: ,
}
:= .MemberElement()
.Boolean(.BlockPublicPolicy)
}
if .IgnorePublicAcls {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "IgnorePublicAcls",
},
Attr: ,
}
:= .MemberElement()
.Boolean(.IgnorePublicAcls)
}
if .RestrictPublicBuckets {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "RestrictPublicBuckets",
},
Attr: ,
}
:= .MemberElement()
.Boolean(.RestrictPublicBuckets)
}
return nil
}
func ( *types.QueueConfiguration, smithyxml.Value) error {
defer .Close()
if .Events != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Event",
},
Attr: ,
}
:= .FlattenedElement()
if := awsRestxml_serializeDocumentEventList(.Events, ); != nil {
return
}
}
if .Filter != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Filter",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentNotificationConfigurationFilter(.Filter, ); != nil {
return
}
}
if .Id != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Id",
},
Attr: ,
}
:= .MemberElement()
.String(*.Id)
}
if .QueueArn != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Queue",
},
Attr: ,
}
:= .MemberElement()
.String(*.QueueArn)
}
return nil
}
func ( []types.QueueConfiguration, smithyxml.Value) error {
var *smithyxml.Array
if !.IsFlattened() {
defer .Close()
}
= .Array()
for := range {
:= .Member()
if := awsRestxml_serializeDocumentQueueConfiguration(&[], ); != nil {
return
}
}
return nil
}
func ( *types.Redirect, smithyxml.Value) error {
defer .Close()
if .HostName != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "HostName",
},
Attr: ,
}
:= .MemberElement()
.String(*.HostName)
}
if .HttpRedirectCode != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "HttpRedirectCode",
},
Attr: ,
}
:= .MemberElement()
.String(*.HttpRedirectCode)
}
if len(.Protocol) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Protocol",
},
Attr: ,
}
:= .MemberElement()
.String(string(.Protocol))
}
if .ReplaceKeyPrefixWith != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ReplaceKeyPrefixWith",
},
Attr: ,
}
:= .MemberElement()
.String(*.ReplaceKeyPrefixWith)
}
if .ReplaceKeyWith != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ReplaceKeyWith",
},
Attr: ,
}
:= .MemberElement()
.String(*.ReplaceKeyWith)
}
return nil
}
func ( *types.RedirectAllRequestsTo, smithyxml.Value) error {
defer .Close()
if .HostName != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "HostName",
},
Attr: ,
}
:= .MemberElement()
.String(*.HostName)
}
if len(.Protocol) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Protocol",
},
Attr: ,
}
:= .MemberElement()
.String(string(.Protocol))
}
return nil
}
func ( *types.ReplicaModifications, smithyxml.Value) error {
defer .Close()
if len(.Status) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Status",
},
Attr: ,
}
:= .MemberElement()
.String(string(.Status))
}
return nil
}
func ( *types.ReplicationConfiguration, smithyxml.Value) error {
defer .Close()
if .Role != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Role",
},
Attr: ,
}
:= .MemberElement()
.String(*.Role)
}
if .Rules != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Rule",
},
Attr: ,
}
:= .FlattenedElement()
if := awsRestxml_serializeDocumentReplicationRules(.Rules, ); != nil {
return
}
}
return nil
}
func ( *types.ReplicationRule, smithyxml.Value) error {
defer .Close()
if .DeleteMarkerReplication != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "DeleteMarkerReplication",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentDeleteMarkerReplication(.DeleteMarkerReplication, ); != nil {
return
}
}
if .Destination != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Destination",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentDestination(.Destination, ); != nil {
return
}
}
if .ExistingObjectReplication != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ExistingObjectReplication",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentExistingObjectReplication(.ExistingObjectReplication, ); != nil {
return
}
}
if .Filter != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Filter",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentReplicationRuleFilter(.Filter, ); != nil {
return
}
}
if .ID != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ID",
},
Attr: ,
}
:= .MemberElement()
.String(*.ID)
}
if .Prefix != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Prefix",
},
Attr: ,
}
:= .MemberElement()
.String(*.Prefix)
}
if .Priority != 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Priority",
},
Attr: ,
}
:= .MemberElement()
.Integer(.Priority)
}
if .SourceSelectionCriteria != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "SourceSelectionCriteria",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentSourceSelectionCriteria(.SourceSelectionCriteria, ); != nil {
return
}
}
if len(.Status) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Status",
},
Attr: ,
}
:= .MemberElement()
.String(string(.Status))
}
return nil
}
func ( *types.ReplicationRuleAndOperator, smithyxml.Value) error {
defer .Close()
if .Prefix != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Prefix",
},
Attr: ,
}
:= .MemberElement()
.String(*.Prefix)
}
if .Tags != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Tag",
},
Attr: ,
}
:= .FlattenedElement()
if := awsRestxml_serializeDocumentTagSet(.Tags, ); != nil {
return
}
}
return nil
}
func ( types.ReplicationRuleFilter, smithyxml.Value) error {
defer .Close()
switch uv := .(type) {
case *types.ReplicationRuleFilterMemberAnd:
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "And",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentReplicationRuleAndOperator(&.Value, ); != nil {
return
}
case *types.ReplicationRuleFilterMemberPrefix:
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Prefix",
},
Attr: ,
}
:= .MemberElement()
.String(.Value)
case *types.ReplicationRuleFilterMemberTag:
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Tag",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentTag(&.Value, ); != nil {
return
}
default:
return fmt.Errorf("attempted to serialize unknown member type %T for union %T", , )
}
return nil
}
func ( []types.ReplicationRule, smithyxml.Value) error {
var *smithyxml.Array
if !.IsFlattened() {
defer .Close()
}
= .Array()
for := range {
:= .Member()
if := awsRestxml_serializeDocumentReplicationRule(&[], ); != nil {
return
}
}
return nil
}
func ( *types.ReplicationTime, smithyxml.Value) error {
defer .Close()
if len(.Status) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Status",
},
Attr: ,
}
:= .MemberElement()
.String(string(.Status))
}
if .Time != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Time",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentReplicationTimeValue(.Time, ); != nil {
return
}
}
return nil
}
func ( *types.ReplicationTimeValue, smithyxml.Value) error {
defer .Close()
if .Minutes != 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Minutes",
},
Attr: ,
}
:= .MemberElement()
.Integer(.Minutes)
}
return nil
}
func ( *types.RequestPaymentConfiguration, smithyxml.Value) error {
defer .Close()
if len(.Payer) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Payer",
},
Attr: ,
}
:= .MemberElement()
.String(string(.Payer))
}
return nil
}
func ( *types.RequestProgress, smithyxml.Value) error {
defer .Close()
if .Enabled {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Enabled",
},
Attr: ,
}
:= .MemberElement()
.Boolean(.Enabled)
}
return nil
}
func ( *types.RestoreRequest, smithyxml.Value) error {
defer .Close()
if .Days != 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Days",
},
Attr: ,
}
:= .MemberElement()
.Integer(.Days)
}
if .Description != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Description",
},
Attr: ,
}
:= .MemberElement()
.String(*.Description)
}
if .GlacierJobParameters != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "GlacierJobParameters",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentGlacierJobParameters(.GlacierJobParameters, ); != nil {
return
}
}
if .OutputLocation != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "OutputLocation",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentOutputLocation(.OutputLocation, ); != nil {
return
}
}
if .SelectParameters != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "SelectParameters",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentSelectParameters(.SelectParameters, ); != nil {
return
}
}
if len(.Tier) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Tier",
},
Attr: ,
}
:= .MemberElement()
.String(string(.Tier))
}
if len(.Type) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Type",
},
Attr: ,
}
:= .MemberElement()
.String(string(.Type))
}
return nil
}
func ( *types.RoutingRule, smithyxml.Value) error {
defer .Close()
if .Condition != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Condition",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentCondition(.Condition, ); != nil {
return
}
}
if .Redirect != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Redirect",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentRedirect(.Redirect, ); != nil {
return
}
}
return nil
}
func ( []types.RoutingRule, smithyxml.Value) error {
var *smithyxml.Array
if !.IsFlattened() {
defer .Close()
}
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "RoutingRule",
},
Attr: ,
}
= .ArrayWithCustomName()
for := range {
:= .Member()
if := awsRestxml_serializeDocumentRoutingRule(&[], ); != nil {
return
}
}
return nil
}
func ( *types.S3KeyFilter, smithyxml.Value) error {
defer .Close()
if .FilterRules != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "FilterRule",
},
Attr: ,
}
:= .FlattenedElement()
if := awsRestxml_serializeDocumentFilterRuleList(.FilterRules, ); != nil {
return
}
}
return nil
}
func ( *types.S3Location, smithyxml.Value) error {
defer .Close()
if .AccessControlList != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "AccessControlList",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentGrants(.AccessControlList, ); != nil {
return
}
}
if .BucketName != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "BucketName",
},
Attr: ,
}
:= .MemberElement()
.String(*.BucketName)
}
if len(.CannedACL) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "CannedACL",
},
Attr: ,
}
:= .MemberElement()
.String(string(.CannedACL))
}
if .Encryption != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Encryption",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentEncryption(.Encryption, ); != nil {
return
}
}
if .Prefix != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Prefix",
},
Attr: ,
}
:= .MemberElement()
.String(*.Prefix)
}
if len(.StorageClass) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "StorageClass",
},
Attr: ,
}
:= .MemberElement()
.String(string(.StorageClass))
}
if .Tagging != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Tagging",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentTagging(.Tagging, ); != nil {
return
}
}
if .UserMetadata != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "UserMetadata",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentUserMetadata(.UserMetadata, ); != nil {
return
}
}
return nil
}
func ( *types.ScanRange, smithyxml.Value) error {
defer .Close()
if .End != 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "End",
},
Attr: ,
}
:= .MemberElement()
.Long(.End)
}
if .Start != 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Start",
},
Attr: ,
}
:= .MemberElement()
.Long(.Start)
}
return nil
}
func ( *types.SelectParameters, smithyxml.Value) error {
defer .Close()
if .Expression != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Expression",
},
Attr: ,
}
:= .MemberElement()
.String(*.Expression)
}
if len(.ExpressionType) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ExpressionType",
},
Attr: ,
}
:= .MemberElement()
.String(string(.ExpressionType))
}
if .InputSerialization != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "InputSerialization",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentInputSerialization(.InputSerialization, ); != nil {
return
}
}
if .OutputSerialization != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "OutputSerialization",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentOutputSerialization(.OutputSerialization, ); != nil {
return
}
}
return nil
}
func ( *types.ServerSideEncryptionByDefault, smithyxml.Value) error {
defer .Close()
if .KMSMasterKeyID != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "KMSMasterKeyID",
},
Attr: ,
}
:= .MemberElement()
.String(*.KMSMasterKeyID)
}
if len(.SSEAlgorithm) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "SSEAlgorithm",
},
Attr: ,
}
:= .MemberElement()
.String(string(.SSEAlgorithm))
}
return nil
}
func ( *types.ServerSideEncryptionConfiguration, smithyxml.Value) error {
defer .Close()
if .Rules != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Rule",
},
Attr: ,
}
:= .FlattenedElement()
if := awsRestxml_serializeDocumentServerSideEncryptionRules(.Rules, ); != nil {
return
}
}
return nil
}
func ( *types.ServerSideEncryptionRule, smithyxml.Value) error {
defer .Close()
if .ApplyServerSideEncryptionByDefault != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ApplyServerSideEncryptionByDefault",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentServerSideEncryptionByDefault(.ApplyServerSideEncryptionByDefault, ); != nil {
return
}
}
if .BucketKeyEnabled {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "BucketKeyEnabled",
},
Attr: ,
}
:= .MemberElement()
.Boolean(.BucketKeyEnabled)
}
return nil
}
func ( []types.ServerSideEncryptionRule, smithyxml.Value) error {
var *smithyxml.Array
if !.IsFlattened() {
defer .Close()
}
= .Array()
for := range {
:= .Member()
if := awsRestxml_serializeDocumentServerSideEncryptionRule(&[], ); != nil {
return
}
}
return nil
}
func ( *types.SourceSelectionCriteria, smithyxml.Value) error {
defer .Close()
if .ReplicaModifications != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ReplicaModifications",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentReplicaModifications(.ReplicaModifications, ); != nil {
return
}
}
if .SseKmsEncryptedObjects != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "SseKmsEncryptedObjects",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentSseKmsEncryptedObjects(.SseKmsEncryptedObjects, ); != nil {
return
}
}
return nil
}
func ( *types.SSEKMS, smithyxml.Value) error {
defer .Close()
if .KeyId != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "KeyId",
},
Attr: ,
}
:= .MemberElement()
.String(*.KeyId)
}
return nil
}
func ( *types.SseKmsEncryptedObjects, smithyxml.Value) error {
defer .Close()
if len(.Status) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Status",
},
Attr: ,
}
:= .MemberElement()
.String(string(.Status))
}
return nil
}
func ( *types.SSES3, smithyxml.Value) error {
defer .Close()
return nil
}
func ( *types.StorageClassAnalysis, smithyxml.Value) error {
defer .Close()
if .DataExport != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "DataExport",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentStorageClassAnalysisDataExport(.DataExport, ); != nil {
return
}
}
return nil
}
func ( *types.StorageClassAnalysisDataExport, smithyxml.Value) error {
defer .Close()
if .Destination != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Destination",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentAnalyticsExportDestination(.Destination, ); != nil {
return
}
}
if len(.OutputSchemaVersion) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "OutputSchemaVersion",
},
Attr: ,
}
:= .MemberElement()
.String(string(.OutputSchemaVersion))
}
return nil
}
func ( *types.Tag, smithyxml.Value) error {
defer .Close()
if .Key != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Key",
},
Attr: ,
}
:= .MemberElement()
.String(*.Key)
}
if .Value != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Value",
},
Attr: ,
}
:= .MemberElement()
.String(*.Value)
}
return nil
}
func ( *types.Tagging, smithyxml.Value) error {
defer .Close()
if .TagSet != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "TagSet",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentTagSet(.TagSet, ); != nil {
return
}
}
return nil
}
func ( []types.Tag, smithyxml.Value) error {
var *smithyxml.Array
if !.IsFlattened() {
defer .Close()
}
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Tag",
},
Attr: ,
}
= .ArrayWithCustomName()
for := range {
:= .Member()
if := awsRestxml_serializeDocumentTag(&[], ); != nil {
return
}
}
return nil
}
func ( *types.TargetGrant, smithyxml.Value) error {
defer .Close()
if .Grantee != nil {
:= []smithyxml.Attr{}
= append(, smithyxml.NewNamespaceAttribute("xsi", "http://www.w3.org/2001/XMLSchema-instance"))
if len(.Grantee.Type) > 0 {
var string
= string(.Grantee.Type)
= append(, smithyxml.NewAttribute("xsi:type", ))
}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Grantee",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentGrantee(.Grantee, ); != nil {
return
}
}
if len(.Permission) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Permission",
},
Attr: ,
}
:= .MemberElement()
.String(string(.Permission))
}
return nil
}
func ( []types.TargetGrant, smithyxml.Value) error {
var *smithyxml.Array
if !.IsFlattened() {
defer .Close()
}
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Grant",
},
Attr: ,
}
= .ArrayWithCustomName()
for := range {
:= .Member()
if := awsRestxml_serializeDocumentTargetGrant(&[], ); != nil {
return
}
}
return nil
}
func ( *types.Tiering, smithyxml.Value) error {
defer .Close()
if len(.AccessTier) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "AccessTier",
},
Attr: ,
}
:= .MemberElement()
.String(string(.AccessTier))
}
{
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Days",
},
Attr: ,
}
:= .MemberElement()
.Integer(.Days)
}
return nil
}
func ( []types.Tiering, smithyxml.Value) error {
var *smithyxml.Array
if !.IsFlattened() {
defer .Close()
}
= .Array()
for := range {
:= .Member()
if := awsRestxml_serializeDocumentTiering(&[], ); != nil {
return
}
}
return nil
}
func ( *types.TopicConfiguration, smithyxml.Value) error {
defer .Close()
if .Events != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Event",
},
Attr: ,
}
:= .FlattenedElement()
if := awsRestxml_serializeDocumentEventList(.Events, ); != nil {
return
}
}
if .Filter != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Filter",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentNotificationConfigurationFilter(.Filter, ); != nil {
return
}
}
if .Id != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Id",
},
Attr: ,
}
:= .MemberElement()
.String(*.Id)
}
if .TopicArn != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Topic",
},
Attr: ,
}
:= .MemberElement()
.String(*.TopicArn)
}
return nil
}
func ( []types.TopicConfiguration, smithyxml.Value) error {
var *smithyxml.Array
if !.IsFlattened() {
defer .Close()
}
= .Array()
for := range {
:= .Member()
if := awsRestxml_serializeDocumentTopicConfiguration(&[], ); != nil {
return
}
}
return nil
}
func ( *types.Transition, smithyxml.Value) error {
defer .Close()
if .Date != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Date",
},
Attr: ,
}
:= .MemberElement()
.String(smithytime.FormatDateTime(*.Date))
}
if .Days != 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Days",
},
Attr: ,
}
:= .MemberElement()
.Integer(.Days)
}
if len(.StorageClass) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "StorageClass",
},
Attr: ,
}
:= .MemberElement()
.String(string(.StorageClass))
}
return nil
}
func ( []types.Transition, smithyxml.Value) error {
var *smithyxml.Array
if !.IsFlattened() {
defer .Close()
}
= .Array()
for := range {
:= .Member()
if := awsRestxml_serializeDocumentTransition(&[], ); != nil {
return
}
}
return nil
}
func ( []types.MetadataEntry, smithyxml.Value) error {
var *smithyxml.Array
if !.IsFlattened() {
defer .Close()
}
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "MetadataEntry",
},
Attr: ,
}
= .ArrayWithCustomName()
for := range {
:= .Member()
if := awsRestxml_serializeDocumentMetadataEntry(&[], ); != nil {
return
}
}
return nil
}
func ( *types.VersioningConfiguration, smithyxml.Value) error {
defer .Close()
if len(.MFADelete) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "MfaDelete",
},
Attr: ,
}
:= .MemberElement()
.String(string(.MFADelete))
}
if len(.Status) > 0 {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Status",
},
Attr: ,
}
:= .MemberElement()
.String(string(.Status))
}
return nil
}
func ( *types.WebsiteConfiguration, smithyxml.Value) error {
defer .Close()
if .ErrorDocument != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ErrorDocument",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentErrorDocument(.ErrorDocument, ); != nil {
return
}
}
if .IndexDocument != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "IndexDocument",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentIndexDocument(.IndexDocument, ); != nil {
return
}
}
if .RedirectAllRequestsTo != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "RedirectAllRequestsTo",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentRedirectAllRequestsTo(.RedirectAllRequestsTo, ); != nil {
return
}
}
if .RoutingRules != nil {
:= []smithyxml.Attr{}
:= smithyxml.StartElement{
Name: smithyxml.Name{
Local: "RoutingRules",
},
Attr: ,
}
:= .MemberElement()
if := awsRestxml_serializeDocumentRoutingRules(.RoutingRules, ); != nil {
return
}
}
return nil
}