From 346a05b49a8087dd88f76a7a09c7dd89d9c14cfc Mon Sep 17 00:00:00 2001 From: jonaustin09 Date: Wed, 17 May 2023 00:46:21 +0500 Subject: [PATCH] feat: removed s3 xsd schema --- s3response/AmazonS3-additions.xsd | 989 --------------- s3response/AmazonS3.xsd | 692 ----------- s3response/README.txt | 7 - s3response/s3api_xsd_generated.go | 1859 ----------------------------- s3response/s3response.go | 169 --- 5 files changed, 3716 deletions(-) delete mode 100644 s3response/AmazonS3-additions.xsd delete mode 100644 s3response/AmazonS3.xsd delete mode 100644 s3response/README.txt delete mode 100644 s3response/s3api_xsd_generated.go delete mode 100644 s3response/s3response.go diff --git a/s3response/AmazonS3-additions.xsd b/s3response/AmazonS3-additions.xsd deleted file mode 100644 index 02cc84fa..00000000 --- a/s3response/AmazonS3-additions.xsd +++ /dev/null @@ -1,989 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/s3response/AmazonS3.xsd b/s3response/AmazonS3.xsd deleted file mode 100644 index 8016a6a8..00000000 --- a/s3response/AmazonS3.xsd +++ /dev/null @@ -1,692 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/s3response/README.txt b/s3response/README.txt deleted file mode 100644 index 5a515b83..00000000 --- a/s3response/README.txt +++ /dev/null @@ -1,7 +0,0 @@ -https://doc.s3.amazonaws.com/2006-03-01/AmazonS3.xsd - -see https://blog.aqwari.net/xml-schema-go/ - -go install aqwari.net/xml/cmd/xsdgen@latest -xsdgen -o s3api_xsd_generated.go -pkg s3response AmazonS3.xsd -xsdgen -o s3api_xsd_generated.go -pkg s3response AmazonS3-additions.xsd diff --git a/s3response/s3api_xsd_generated.go b/s3response/s3api_xsd_generated.go deleted file mode 100644 index 63042991..00000000 --- a/s3response/s3api_xsd_generated.go +++ /dev/null @@ -1,1859 +0,0 @@ -// Code generated by xsdgen. DO NOT EDIT. - -package s3response - -import ( - "bytes" - "encoding/base64" - "encoding/xml" - "time" -) - -type AccessControlList struct { - Grant []Grant `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Grant,omitempty"` -} - -type AccessControlPolicy struct { - Owner CanonicalUser `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Owner"` - AccessControlList AccessControlList `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AccessControlList"` -} - -type AmazonCustomerByEmail struct { - EmailAddress string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ EmailAddress"` -} - -type Anon1 struct { - Bucket string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"` - Key string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Key"` - Metadata []MetadataEntry `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Metadata,omitempty"` - ContentLength int64 `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ContentLength"` - AccessControlList AccessControlList `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AccessControlList,omitempty"` - StorageClass StorageClass `xml:"http://s3.amazonaws.com/doc/2006-03-01/ StorageClass,omitempty"` - AWSAccessKeyId string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"` - Timestamp time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - Signature string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"` - Credential string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"` -} - -func (t *Anon1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - type T Anon1 - var layout struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - layout.T = (*T)(t) - layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp) - return e.EncodeElement(layout, start) -} -func (t *Anon1) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { - type T Anon1 - var overlay struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - overlay.T = (*T)(t) - overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp) - return d.DecodeElement(&overlay, &start) -} - -type Anon10 struct { - Bucket string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"` - Prefix string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Prefix,omitempty"` - Marker string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Marker,omitempty"` - MaxKeys int `xml:"http://s3.amazonaws.com/doc/2006-03-01/ MaxKeys,omitempty"` - Delimiter string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Delimiter,omitempty"` - AWSAccessKeyId string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"` - Timestamp time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - Signature string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"` - Credential string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"` -} - -func (t *Anon10) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - type T Anon10 - var layout struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - layout.T = (*T)(t) - layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp) - return e.EncodeElement(layout, start) -} -func (t *Anon10) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { - type T Anon10 - var overlay struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - overlay.T = (*T)(t) - overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp) - return d.DecodeElement(&overlay, &start) -} - -type Anon11 struct { - ListBucketResponse ListBucketResult `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ListBucketResponse"` -} - -type Anon12 struct { - ListVersionsResponse ListVersionsResult `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ListVersionsResponse"` -} - -type Anon13 struct { - Bucket string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"` - Delimiter string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Delimiter"` - EncodingType string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ EncodingType"` - KeyMarker string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ KeyMarker"` - MaxUploads string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ MaxUploads"` - Prefix string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Prefix"` - UploadIdMarker string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ UploadIdMarker"` - AWSAccessKeyId string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"` - Timestamp time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - Signature string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"` - Credential string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"` -} - -func (t *Anon13) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - type T Anon13 - var layout struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - layout.T = (*T)(t) - layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp) - return e.EncodeElement(layout, start) -} -func (t *Anon13) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { - type T Anon13 - var overlay struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - overlay.T = (*T)(t) - overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp) - return d.DecodeElement(&overlay, &start) -} - -type Anon14 struct { - Bucket string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"` - KeyMarker string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ KeyMarker"` - UploadIdMarker string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ UploadIdMarker"` - NextKeyMarker string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ NextKeyMarker"` - Prefix string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Prefix"` - Delimiter string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Delimiter"` - NextUploadIdMarker string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ NextUploadIdMarker"` - MaxUploads int `xml:"http://s3.amazonaws.com/doc/2006-03-01/ MaxUploads"` - IsTruncated bool `xml:"http://s3.amazonaws.com/doc/2006-03-01/ IsTruncated"` - Upload UploadEntry `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Upload"` - CommonPrefixes CommonPrefixes `xml:"http://s3.amazonaws.com/doc/2006-03-01/ CommonPrefixes"` - EncodingType string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ EncodingType"` -} - -type Anon15 struct { - Bucket string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"` - CacheControl string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ CacheControl"` - ContentDisposition string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ContentDisposition"` - ContentEncoding string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ContentEncoding"` - ContentLanguage string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ContentLanguage"` - ContentType string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ContentType"` - Expires time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Expires"` - Key string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Key"` - AWSAccessKeyId string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"` - Timestamp time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - Signature string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"` - Credential string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"` -} - -func (t *Anon15) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - type T Anon15 - var layout struct { - *T - Expires *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Expires"` - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - layout.T = (*T)(t) - layout.Expires = (*xsdDateTime)(&layout.T.Expires) - layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp) - return e.EncodeElement(layout, start) -} -func (t *Anon15) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { - type T Anon15 - var overlay struct { - *T - Expires *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Expires"` - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - overlay.T = (*T)(t) - overlay.Expires = (*xsdDateTime)(&overlay.T.Expires) - overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp) - return d.DecodeElement(&overlay, &start) -} - -type Anon16 struct { - Bucket string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"` - Key string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Key"` - UploadId string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ UploadId"` -} - -type Anon17 struct { - AWSAccessKeyId string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"` - Timestamp time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - Signature string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"` -} - -func (t *Anon17) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - type T Anon17 - var layout struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - layout.T = (*T)(t) - layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp) - return e.EncodeElement(layout, start) -} -func (t *Anon17) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { - type T Anon17 - var overlay struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - overlay.T = (*T)(t) - overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp) - return d.DecodeElement(&overlay, &start) -} - -type Anon18 struct { - ListAllMyBucketsResponse ListAllMyBucketsResult `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ListAllMyBucketsResponse"` -} - -type Anon19 struct { - Location string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Location"` - Bucket string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"` - Key string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Key"` - ETag string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ETag"` -} - -type Anon2 struct { - PutObjectResponse PutObjectResult `xml:"http://s3.amazonaws.com/doc/2006-03-01/ PutObjectResponse"` -} - -type Anon20 struct { - SourceBucket string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ SourceBucket"` - SourceKey string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ SourceKey"` - DestinationBucket string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ DestinationBucket"` - DestinationKey string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ DestinationKey"` - MetadataDirective MetadataDirective `xml:"http://s3.amazonaws.com/doc/2006-03-01/ MetadataDirective,omitempty"` - Metadata []MetadataEntry `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Metadata,omitempty"` - AccessControlList AccessControlList `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AccessControlList,omitempty"` - CopySourceIfModifiedSince time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ CopySourceIfModifiedSince,omitempty"` - CopySourceIfUnmodifiedSince time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ CopySourceIfUnmodifiedSince,omitempty"` - CopySourceIfMatch []string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ CopySourceIfMatch,omitempty"` - CopySourceIfNoneMatch []string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ CopySourceIfNoneMatch,omitempty"` - StorageClass StorageClass `xml:"http://s3.amazonaws.com/doc/2006-03-01/ StorageClass,omitempty"` - AWSAccessKeyId string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"` - Timestamp time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - Signature string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"` - Credential string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"` -} - -func (t *Anon20) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - type T Anon20 - var layout struct { - *T - CopySourceIfModifiedSince *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ CopySourceIfModifiedSince,omitempty"` - CopySourceIfUnmodifiedSince *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ CopySourceIfUnmodifiedSince,omitempty"` - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - layout.T = (*T)(t) - layout.CopySourceIfModifiedSince = (*xsdDateTime)(&layout.T.CopySourceIfModifiedSince) - layout.CopySourceIfUnmodifiedSince = (*xsdDateTime)(&layout.T.CopySourceIfUnmodifiedSince) - layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp) - return e.EncodeElement(layout, start) -} -func (t *Anon20) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { - type T Anon20 - var overlay struct { - *T - CopySourceIfModifiedSince *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ CopySourceIfModifiedSince,omitempty"` - CopySourceIfUnmodifiedSince *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ CopySourceIfUnmodifiedSince,omitempty"` - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - overlay.T = (*T)(t) - overlay.CopySourceIfModifiedSince = (*xsdDateTime)(&overlay.T.CopySourceIfModifiedSince) - overlay.CopySourceIfUnmodifiedSince = (*xsdDateTime)(&overlay.T.CopySourceIfUnmodifiedSince) - overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp) - return d.DecodeElement(&overlay, &start) -} - -type Anon21 struct { - CopyObjectResult CopyObjectResult `xml:"http://s3.amazonaws.com/doc/2006-03-01/ CopyObjectResult"` -} - -type Anon3 struct { - Bucket string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"` - Key string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Key"` - Metadata []MetadataEntry `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Metadata,omitempty"` - Data []byte `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Data"` - ContentLength int64 `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ContentLength"` - AccessControlList AccessControlList `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AccessControlList,omitempty"` - StorageClass StorageClass `xml:"http://s3.amazonaws.com/doc/2006-03-01/ StorageClass,omitempty"` - AWSAccessKeyId string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"` - Timestamp time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - Signature string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"` - Credential string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"` -} - -func (t *Anon3) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - type T Anon3 - var layout struct { - *T - Data *xsdBase64Binary `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Data"` - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - layout.T = (*T)(t) - layout.Data = (*xsdBase64Binary)(&layout.T.Data) - layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp) - return e.EncodeElement(layout, start) -} -func (t *Anon3) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { - type T Anon3 - var overlay struct { - *T - Data *xsdBase64Binary `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Data"` - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - overlay.T = (*T)(t) - overlay.Data = (*xsdBase64Binary)(&overlay.T.Data) - overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp) - return d.DecodeElement(&overlay, &start) -} - -type Anon4 struct { - PutObjectInlineResponse PutObjectResult `xml:"http://s3.amazonaws.com/doc/2006-03-01/ PutObjectInlineResponse"` -} - -type Anon5 struct { - Bucket string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"` - Key string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Key"` - AWSAccessKeyId string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"` - Timestamp time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - Signature string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"` - Credential string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"` -} - -func (t *Anon5) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - type T Anon5 - var layout struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - layout.T = (*T)(t) - layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp) - return e.EncodeElement(layout, start) -} -func (t *Anon5) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { - type T Anon5 - var overlay struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - overlay.T = (*T)(t) - overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp) - return d.DecodeElement(&overlay, &start) -} - -type Anon6 struct { - DeleteObjectResponse Status `xml:"http://s3.amazonaws.com/doc/2006-03-01/ DeleteObjectResponse"` -} - -type Anon7 struct { - AWSAccessKeyId string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"` - Timestamp time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - Signature string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"` - Credential string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"` -} - -func (t *Anon7) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - type T Anon7 - var layout struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - layout.T = (*T)(t) - layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp) - return e.EncodeElement(layout, start) -} -func (t *Anon7) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { - type T Anon7 - var overlay struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - overlay.T = (*T)(t) - overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp) - return d.DecodeElement(&overlay, &start) -} - -type Anon8 struct { - Delete DeleteObjectEntry `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Delete"` -} - -type Anon9 struct { - Deleted DeletedEntry `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Deleted"` - Error Error `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Error"` -} - -type BucketLoggingStatus struct { - LoggingEnabled LoggingSettings `xml:"http://s3.amazonaws.com/doc/2006-03-01/ LoggingEnabled,omitempty"` -} - -type CanonicalUser struct { - ID string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ID"` - DisplayName string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ DisplayName,omitempty"` -} - -type Checksum struct { - ChecksumCRC32 string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ChecksumCRC32"` - ChecksumCRC32C string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ChecksumCRC32C"` - ChecksumSHA1 string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ChecksumSHA1"` - ChecksumSHA256 string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ChecksumSHA256"` -} - -type CommonPrefixes struct { - Prefix string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Prefix"` -} - -type CopyObject struct { - SourceBucket string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ SourceBucket"` - SourceKey string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ SourceKey"` - DestinationBucket string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ DestinationBucket"` - DestinationKey string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ DestinationKey"` - MetadataDirective MetadataDirective `xml:"http://s3.amazonaws.com/doc/2006-03-01/ MetadataDirective,omitempty"` - Metadata []MetadataEntry `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Metadata,omitempty"` - AccessControlList AccessControlList `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AccessControlList,omitempty"` - CopySourceIfModifiedSince time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ CopySourceIfModifiedSince,omitempty"` - CopySourceIfUnmodifiedSince time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ CopySourceIfUnmodifiedSince,omitempty"` - CopySourceIfMatch []string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ CopySourceIfMatch,omitempty"` - CopySourceIfNoneMatch []string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ CopySourceIfNoneMatch,omitempty"` - StorageClass StorageClass `xml:"http://s3.amazonaws.com/doc/2006-03-01/ StorageClass,omitempty"` - AWSAccessKeyId string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"` - Timestamp time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - Signature string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"` - Credential string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"` -} - -func (t *CopyObject) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - type T CopyObject - var layout struct { - *T - CopySourceIfModifiedSince *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ CopySourceIfModifiedSince,omitempty"` - CopySourceIfUnmodifiedSince *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ CopySourceIfUnmodifiedSince,omitempty"` - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - layout.T = (*T)(t) - layout.CopySourceIfModifiedSince = (*xsdDateTime)(&layout.T.CopySourceIfModifiedSince) - layout.CopySourceIfUnmodifiedSince = (*xsdDateTime)(&layout.T.CopySourceIfUnmodifiedSince) - layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp) - return e.EncodeElement(layout, start) -} -func (t *CopyObject) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { - type T CopyObject - var overlay struct { - *T - CopySourceIfModifiedSince *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ CopySourceIfModifiedSince,omitempty"` - CopySourceIfUnmodifiedSince *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ CopySourceIfUnmodifiedSince,omitempty"` - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - overlay.T = (*T)(t) - overlay.CopySourceIfModifiedSince = (*xsdDateTime)(&overlay.T.CopySourceIfModifiedSince) - overlay.CopySourceIfUnmodifiedSince = (*xsdDateTime)(&overlay.T.CopySourceIfUnmodifiedSince) - overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp) - return d.DecodeElement(&overlay, &start) -} - -type CopyObjectResponse struct { - CopyObjectResult CopyObjectResult `xml:"http://s3.amazonaws.com/doc/2006-03-01/ CopyObjectResult"` -} - -type CopyObjectResult struct { - LastModified time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ LastModified"` - ETag string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ETag"` -} - -func (t *CopyObjectResult) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - type T CopyObjectResult - var layout struct { - *T - LastModified *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ LastModified"` - } - layout.T = (*T)(t) - layout.LastModified = (*xsdDateTime)(&layout.T.LastModified) - return e.EncodeElement(layout, start) -} -func (t *CopyObjectResult) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { - type T CopyObjectResult - var overlay struct { - *T - LastModified *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ LastModified"` - } - overlay.T = (*T)(t) - overlay.LastModified = (*xsdDateTime)(&overlay.T.LastModified) - return d.DecodeElement(&overlay, &start) -} - -type CreateBucket struct { - Bucket string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"` - AccessControlList AccessControlList `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AccessControlList,omitempty"` - AWSAccessKeyId string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"` - Timestamp time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - Signature string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"` -} - -func (t *CreateBucket) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - type T CreateBucket - var layout struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - layout.T = (*T)(t) - layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp) - return e.EncodeElement(layout, start) -} -func (t *CreateBucket) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { - type T CreateBucket - var overlay struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - overlay.T = (*T)(t) - overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp) - return d.DecodeElement(&overlay, &start) -} - -type CreateBucketConfiguration struct { - LocationConstraint string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ LocationConstraint"` -} - -type CreateBucketResponse struct { - CreateBucketReturn CreateBucketResult `xml:"http://s3.amazonaws.com/doc/2006-03-01/ CreateBucketReturn"` -} - -type CreateBucketResult struct { - BucketName string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ BucketName"` -} - -type CreateMultipartUpload struct { - Bucket string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"` - CacheControl string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ CacheControl"` - ContentDisposition string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ContentDisposition"` - ContentEncoding string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ContentEncoding"` - ContentLanguage string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ContentLanguage"` - ContentType string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ContentType"` - Expires time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Expires"` - Key string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Key"` - AWSAccessKeyId string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"` - Timestamp time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - Signature string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"` - Credential string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"` -} - -func (t *CreateMultipartUpload) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - type T CreateMultipartUpload - var layout struct { - *T - Expires *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Expires"` - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - layout.T = (*T)(t) - layout.Expires = (*xsdDateTime)(&layout.T.Expires) - layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp) - return e.EncodeElement(layout, start) -} -func (t *CreateMultipartUpload) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { - type T CreateMultipartUpload - var overlay struct { - *T - Expires *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Expires"` - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - overlay.T = (*T)(t) - overlay.Expires = (*xsdDateTime)(&overlay.T.Expires) - overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp) - return d.DecodeElement(&overlay, &start) -} - -type CreateMultipartUploadResponse struct { - Bucket string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"` - Key string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Key"` - UploadId string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ UploadId"` -} - -type DeleteBucket struct { - Bucket string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"` - AWSAccessKeyId string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"` - Timestamp time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - Signature string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"` - Credential string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"` -} - -func (t *DeleteBucket) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - type T DeleteBucket - var layout struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - layout.T = (*T)(t) - layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp) - return e.EncodeElement(layout, start) -} -func (t *DeleteBucket) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { - type T DeleteBucket - var overlay struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - overlay.T = (*T)(t) - overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp) - return d.DecodeElement(&overlay, &start) -} - -type DeleteBucketResponse struct { - DeleteBucketResponse Status `xml:"http://s3.amazonaws.com/doc/2006-03-01/ DeleteBucketResponse"` -} - -type DeleteMarkerEntry struct { - Key string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Key"` - VersionId string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ VersionId"` - IsLatest bool `xml:"http://s3.amazonaws.com/doc/2006-03-01/ IsLatest"` - LastModified time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ LastModified"` - Owner CanonicalUser `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Owner,omitempty"` -} - -func (t *DeleteMarkerEntry) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - type T DeleteMarkerEntry - var layout struct { - *T - LastModified *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ LastModified"` - } - layout.T = (*T)(t) - layout.LastModified = (*xsdDateTime)(&layout.T.LastModified) - return e.EncodeElement(layout, start) -} -func (t *DeleteMarkerEntry) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { - type T DeleteMarkerEntry - var overlay struct { - *T - LastModified *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ LastModified"` - } - overlay.T = (*T)(t) - overlay.LastModified = (*xsdDateTime)(&overlay.T.LastModified) - return d.DecodeElement(&overlay, &start) -} - -type DeleteObject struct { - Bucket string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"` - Key string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Key"` - AWSAccessKeyId string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"` - Timestamp time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - Signature string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"` - Credential string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"` -} - -func (t *DeleteObject) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - type T DeleteObject - var layout struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - layout.T = (*T)(t) - layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp) - return e.EncodeElement(layout, start) -} -func (t *DeleteObject) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { - type T DeleteObject - var overlay struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - overlay.T = (*T)(t) - overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp) - return d.DecodeElement(&overlay, &start) -} - -type DeleteObjectEntry struct { - Object ObjectIdentifier `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Object"` - Key string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Key"` - Quiet bool `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Quiet"` -} - -type DeleteObjectResponse struct { - DeleteObjectResponse Status `xml:"http://s3.amazonaws.com/doc/2006-03-01/ DeleteObjectResponse"` -} - -type DeleteObjects struct { - AWSAccessKeyId string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"` - Timestamp time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - Signature string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"` - Credential string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"` -} - -func (t *DeleteObjects) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - type T DeleteObjects - var layout struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - layout.T = (*T)(t) - layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp) - return e.EncodeElement(layout, start) -} -func (t *DeleteObjects) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { - type T DeleteObjects - var overlay struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - overlay.T = (*T)(t) - overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp) - return d.DecodeElement(&overlay, &start) -} - -type DeleteObjectsInput struct { - Delete DeleteObjectEntry `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Delete"` -} - -type DeleteObjectsResponse struct { - Deleted DeletedEntry `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Deleted"` - Error Error `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Error"` -} - -type DeletedEntry struct { - DeleteMarker bool `xml:"http://s3.amazonaws.com/doc/2006-03-01/ DeleteMarker"` - DeleteMarkerVersionId string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ DeleteMarkerVersionId"` - Key string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Key"` - VersionId string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ VersionId"` -} - -type Error struct { - Code string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Code"` - Key string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Key"` - Message string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Message"` - VersionId string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ VersionId"` -} - -type GetBucketAccessControlPolicy struct { - Bucket string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"` - AWSAccessKeyId string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"` - Timestamp time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - Signature string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"` - Credential string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"` -} - -func (t *GetBucketAccessControlPolicy) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - type T GetBucketAccessControlPolicy - var layout struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - layout.T = (*T)(t) - layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp) - return e.EncodeElement(layout, start) -} -func (t *GetBucketAccessControlPolicy) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { - type T GetBucketAccessControlPolicy - var overlay struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - overlay.T = (*T)(t) - overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp) - return d.DecodeElement(&overlay, &start) -} - -type GetBucketAccessControlPolicyResponse struct { - GetBucketAccessControlPolicyResponse AccessControlPolicy `xml:"http://s3.amazonaws.com/doc/2006-03-01/ GetBucketAccessControlPolicyResponse"` -} - -type GetBucketAcl struct { - Bucket string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"` - AWSAccessKeyId string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"` - Timestamp time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - Signature string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"` - Credential string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"` -} - -func (t *GetBucketAcl) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - type T GetBucketAcl - var layout struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - layout.T = (*T)(t) - layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp) - return e.EncodeElement(layout, start) -} -func (t *GetBucketAcl) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { - type T GetBucketAcl - var overlay struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - overlay.T = (*T)(t) - overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp) - return d.DecodeElement(&overlay, &start) -} - -type GetBucketAclResponse struct { - CanonicalUser CanonicalUser `xml:"http://s3.amazonaws.com/doc/2006-03-01/ CanonicalUser"` - AccessControlList AccessControlList `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AccessControlList"` - AWSAccessKeyId string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"` - Timestamp time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - Signature string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"` - Credential string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"` -} - -func (t *GetBucketAclResponse) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - type T GetBucketAclResponse - var layout struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - layout.T = (*T)(t) - layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp) - return e.EncodeElement(layout, start) -} -func (t *GetBucketAclResponse) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { - type T GetBucketAclResponse - var overlay struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - overlay.T = (*T)(t) - overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp) - return d.DecodeElement(&overlay, &start) -} - -type GetBucketLoggingStatus struct { - Bucket string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"` - AWSAccessKeyId string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"` - Timestamp time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - Signature string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"` - Credential string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"` -} - -func (t *GetBucketLoggingStatus) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - type T GetBucketLoggingStatus - var layout struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - layout.T = (*T)(t) - layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp) - return e.EncodeElement(layout, start) -} -func (t *GetBucketLoggingStatus) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { - type T GetBucketLoggingStatus - var overlay struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - overlay.T = (*T)(t) - overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp) - return d.DecodeElement(&overlay, &start) -} - -type GetBucketLoggingStatusResponse struct { - GetBucketLoggingStatusResponse BucketLoggingStatus `xml:"http://s3.amazonaws.com/doc/2006-03-01/ GetBucketLoggingStatusResponse"` -} - -type GetObject struct { - Bucket string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"` - Key string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Key"` - GetMetadata bool `xml:"http://s3.amazonaws.com/doc/2006-03-01/ GetMetadata"` - GetData bool `xml:"http://s3.amazonaws.com/doc/2006-03-01/ GetData"` - InlineData bool `xml:"http://s3.amazonaws.com/doc/2006-03-01/ InlineData"` - AWSAccessKeyId string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"` - Timestamp time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - Signature string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"` - Credential string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"` -} - -func (t *GetObject) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - type T GetObject - var layout struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - layout.T = (*T)(t) - layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp) - return e.EncodeElement(layout, start) -} -func (t *GetObject) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { - type T GetObject - var overlay struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - overlay.T = (*T)(t) - overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp) - return d.DecodeElement(&overlay, &start) -} - -type GetObjectAccessControlPolicy struct { - Bucket string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"` - Key string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Key"` - AWSAccessKeyId string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"` - Timestamp time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - Signature string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"` - Credential string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"` -} - -func (t *GetObjectAccessControlPolicy) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - type T GetObjectAccessControlPolicy - var layout struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - layout.T = (*T)(t) - layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp) - return e.EncodeElement(layout, start) -} -func (t *GetObjectAccessControlPolicy) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { - type T GetObjectAccessControlPolicy - var overlay struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - overlay.T = (*T)(t) - overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp) - return d.DecodeElement(&overlay, &start) -} - -type GetObjectAccessControlPolicyResponse struct { - GetObjectAccessControlPolicyResponse AccessControlPolicy `xml:"http://s3.amazonaws.com/doc/2006-03-01/ GetObjectAccessControlPolicyResponse"` -} - -type GetObjectAcl struct { - Bucket string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"` - Key string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Key"` - AWSAccessKeyId string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"` - Timestamp time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - Signature string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"` - Credential string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"` -} - -func (t *GetObjectAcl) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - type T GetObjectAcl - var layout struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - layout.T = (*T)(t) - layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp) - return e.EncodeElement(layout, start) -} -func (t *GetObjectAcl) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { - type T GetObjectAcl - var overlay struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - overlay.T = (*T)(t) - overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp) - return d.DecodeElement(&overlay, &start) -} - -type GetObjectAclResponse struct { - Owner CanonicalUser `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Owner"` - Grants AccessControlList `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Grants"` - RequestCharged string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ RequestCharged"` -} - -type GetObjectAttributes struct { - Bucket string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"` - Key string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Key"` - Attributes string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Attributes"` - AWSAccessKeyId string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"` - Timestamp time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - Signature string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"` - Credential string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"` -} - -func (t *GetObjectAttributes) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - type T GetObjectAttributes - var layout struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - layout.T = (*T)(t) - layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp) - return e.EncodeElement(layout, start) -} -func (t *GetObjectAttributes) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { - type T GetObjectAttributes - var overlay struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - overlay.T = (*T)(t) - overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp) - return d.DecodeElement(&overlay, &start) -} - -type GetObjectAttributesResponse struct { - Etag string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Etag"` - Checksum Checksum `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Checksum"` - RequestCharged string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ RequestCharged"` - ObjectParts ObjectParts `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ObjectParts"` - StorageClass string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ StorageClass"` - ObjectSize int64 `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ObjectSize"` -} - -type GetObjectExtended struct { - Bucket string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"` - Key string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Key"` - GetMetadata bool `xml:"http://s3.amazonaws.com/doc/2006-03-01/ GetMetadata"` - GetData bool `xml:"http://s3.amazonaws.com/doc/2006-03-01/ GetData"` - InlineData bool `xml:"http://s3.amazonaws.com/doc/2006-03-01/ InlineData"` - ByteRangeStart int64 `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ByteRangeStart,omitempty"` - ByteRangeEnd int64 `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ByteRangeEnd,omitempty"` - IfModifiedSince time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ IfModifiedSince,omitempty"` - IfUnmodifiedSince time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ IfUnmodifiedSince,omitempty"` - IfMatch []string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ IfMatch,omitempty"` - IfNoneMatch []string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ IfNoneMatch,omitempty"` - ReturnCompleteObjectOnConditionFailure bool `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ReturnCompleteObjectOnConditionFailure,omitempty"` - AWSAccessKeyId string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"` - Timestamp time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - Signature string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"` - Credential string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"` -} - -func (t *GetObjectExtended) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - type T GetObjectExtended - var layout struct { - *T - IfModifiedSince *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ IfModifiedSince,omitempty"` - IfUnmodifiedSince *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ IfUnmodifiedSince,omitempty"` - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - layout.T = (*T)(t) - layout.IfModifiedSince = (*xsdDateTime)(&layout.T.IfModifiedSince) - layout.IfUnmodifiedSince = (*xsdDateTime)(&layout.T.IfUnmodifiedSince) - layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp) - return e.EncodeElement(layout, start) -} -func (t *GetObjectExtended) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { - type T GetObjectExtended - var overlay struct { - *T - IfModifiedSince *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ IfModifiedSince,omitempty"` - IfUnmodifiedSince *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ IfUnmodifiedSince,omitempty"` - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - overlay.T = (*T)(t) - overlay.IfModifiedSince = (*xsdDateTime)(&overlay.T.IfModifiedSince) - overlay.IfUnmodifiedSince = (*xsdDateTime)(&overlay.T.IfUnmodifiedSince) - overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp) - return d.DecodeElement(&overlay, &start) -} - -type GetObjectExtendedResponse struct { - GetObjectResponse GetObjectResult `xml:"http://s3.amazonaws.com/doc/2006-03-01/ GetObjectResponse"` -} - -type GetObjectResponse struct { - GetObjectResponse GetObjectResult `xml:"http://s3.amazonaws.com/doc/2006-03-01/ GetObjectResponse"` -} - -type GetObjectResult struct { - Status Status `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Status"` - Metadata []MetadataEntry `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Metadata,omitempty"` - Data []byte `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Data,omitempty"` - LastModified time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ LastModified"` - ETag string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ETag"` -} - -func (t *GetObjectResult) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - type T GetObjectResult - var layout struct { - *T - Data *xsdBase64Binary `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Data,omitempty"` - LastModified *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ LastModified"` - } - layout.T = (*T)(t) - layout.Data = (*xsdBase64Binary)(&layout.T.Data) - layout.LastModified = (*xsdDateTime)(&layout.T.LastModified) - return e.EncodeElement(layout, start) -} -func (t *GetObjectResult) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { - type T GetObjectResult - var overlay struct { - *T - Data *xsdBase64Binary `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Data,omitempty"` - LastModified *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ LastModified"` - } - overlay.T = (*T)(t) - overlay.Data = (*xsdBase64Binary)(&overlay.T.Data) - overlay.LastModified = (*xsdDateTime)(&overlay.T.LastModified) - return d.DecodeElement(&overlay, &start) -} - -type Grant struct { - Grantee Grantee `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Grantee"` - Permission Permission `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Permission"` -} - -type Grantee struct { -} - -type Group struct { - URI string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ URI"` -} - -type HeadBucket struct { - Bucket string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"` - AWSAccessKeyId string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"` - Timestamp time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - Signature string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"` - Credential string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"` -} - -func (t *HeadBucket) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - type T HeadBucket - var layout struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - layout.T = (*T)(t) - layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp) - return e.EncodeElement(layout, start) -} -func (t *HeadBucket) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { - type T HeadBucket - var overlay struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - overlay.T = (*T)(t) - overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp) - return d.DecodeElement(&overlay, &start) -} - -type HeadBucketResponse struct { - AWSAccessKeyId string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"` - Timestamp time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - Signature string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"` - Credential string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"` -} - -func (t *HeadBucketResponse) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - type T HeadBucketResponse - var layout struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - layout.T = (*T)(t) - layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp) - return e.EncodeElement(layout, start) -} -func (t *HeadBucketResponse) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { - type T HeadBucketResponse - var overlay struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - overlay.T = (*T)(t) - overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp) - return d.DecodeElement(&overlay, &start) -} - -type HeadObject struct { - Bucket string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"` - Key string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Key"` - AWSAccessKeyId string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"` - Timestamp time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - Signature string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"` - Credential string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"` -} - -func (t *HeadObject) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - type T HeadObject - var layout struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - layout.T = (*T)(t) - layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp) - return e.EncodeElement(layout, start) -} -func (t *HeadObject) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { - type T HeadObject - var overlay struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - overlay.T = (*T)(t) - overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp) - return d.DecodeElement(&overlay, &start) -} - -type HeadObjectResponse struct { - AWSAccessKeyId string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"` - Timestamp time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - Signature string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"` - Credential string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"` -} - -func (t *HeadObjectResponse) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - type T HeadObjectResponse - var layout struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - layout.T = (*T)(t) - layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp) - return e.EncodeElement(layout, start) -} -func (t *HeadObjectResponse) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { - type T HeadObjectResponse - var overlay struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - overlay.T = (*T)(t) - overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp) - return d.DecodeElement(&overlay, &start) -} - -type InitiatorEntry struct { - DisplayName string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ DisplayName"` - ID string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ID"` -} - -type ListAllMyBuckets struct { - AWSAccessKeyId string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"` - Timestamp time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - Signature string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"` -} - -func (t *ListAllMyBuckets) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - type T ListAllMyBuckets - var layout struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - layout.T = (*T)(t) - layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp) - return e.EncodeElement(layout, start) -} -func (t *ListAllMyBuckets) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { - type T ListAllMyBuckets - var overlay struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - overlay.T = (*T)(t) - overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp) - return d.DecodeElement(&overlay, &start) -} - -type ListAllMyBucketsEntry struct { - Name string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Name"` - CreationDate time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ CreationDate"` -} - -func (t *ListAllMyBucketsEntry) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - type T ListAllMyBucketsEntry - var layout struct { - *T - CreationDate *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ CreationDate"` - } - layout.T = (*T)(t) - layout.CreationDate = (*xsdDateTime)(&layout.T.CreationDate) - return e.EncodeElement(layout, start) -} -func (t *ListAllMyBucketsEntry) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { - type T ListAllMyBucketsEntry - var overlay struct { - *T - CreationDate *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ CreationDate"` - } - overlay.T = (*T)(t) - overlay.CreationDate = (*xsdDateTime)(&overlay.T.CreationDate) - return d.DecodeElement(&overlay, &start) -} - -type ListAllMyBucketsList struct { - Bucket []ListAllMyBucketsEntry `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket,omitempty"` -} - -type ListAllMyBucketsResponse struct { - ListAllMyBucketsResponse ListAllMyBucketsResult `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ListAllMyBucketsResponse"` -} - -type ListAllMyBucketsResult struct { - Owner CanonicalUser `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Owner"` - Buckets ListAllMyBucketsList `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Buckets"` -} - -type ListBucket struct { - Bucket string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"` - Prefix string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Prefix,omitempty"` - Marker string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Marker,omitempty"` - MaxKeys int `xml:"http://s3.amazonaws.com/doc/2006-03-01/ MaxKeys,omitempty"` - Delimiter string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Delimiter,omitempty"` - AWSAccessKeyId string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"` - Timestamp time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - Signature string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"` - Credential string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"` -} - -func (t *ListBucket) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - type T ListBucket - var layout struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - layout.T = (*T)(t) - layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp) - return e.EncodeElement(layout, start) -} -func (t *ListBucket) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { - type T ListBucket - var overlay struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - overlay.T = (*T)(t) - overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp) - return d.DecodeElement(&overlay, &start) -} - -type ListBucketResponse struct { - ListBucketResponse ListBucketResult `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ListBucketResponse"` -} - -type ListBucketResult struct { - Metadata []MetadataEntry `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Metadata,omitempty"` - Name string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Name"` - Prefix string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Prefix"` - Marker string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Marker"` - NextMarker string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ NextMarker,omitempty"` - MaxKeys int `xml:"http://s3.amazonaws.com/doc/2006-03-01/ MaxKeys"` - Delimiter string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Delimiter,omitempty"` - IsTruncated bool `xml:"http://s3.amazonaws.com/doc/2006-03-01/ IsTruncated"` - Contents []ListEntry `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Contents,omitempty"` - CommonPrefixes []PrefixEntry `xml:"http://s3.amazonaws.com/doc/2006-03-01/ CommonPrefixes,omitempty"` -} - -type ListEntry struct { - Key string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Key"` - LastModified time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ LastModified"` - ETag string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ETag"` - Size int64 `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Size"` - Owner CanonicalUser `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Owner,omitempty"` - StorageClass StorageClass `xml:"http://s3.amazonaws.com/doc/2006-03-01/ StorageClass"` -} - -func (t *ListEntry) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - type T ListEntry - var layout struct { - *T - LastModified *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ LastModified"` - } - layout.T = (*T)(t) - layout.LastModified = (*xsdDateTime)(&layout.T.LastModified) - return e.EncodeElement(layout, start) -} -func (t *ListEntry) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { - type T ListEntry - var overlay struct { - *T - LastModified *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ LastModified"` - } - overlay.T = (*T)(t) - overlay.LastModified = (*xsdDateTime)(&overlay.T.LastModified) - return d.DecodeElement(&overlay, &start) -} - -type ListMultipartUploads struct { - Bucket string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"` - Delimiter string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Delimiter"` - EncodingType string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ EncodingType"` - KeyMarker string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ KeyMarker"` - MaxUploads string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ MaxUploads"` - Prefix string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Prefix"` - UploadIdMarker string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ UploadIdMarker"` - AWSAccessKeyId string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"` - Timestamp time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - Signature string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"` - Credential string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"` -} - -func (t *ListMultipartUploads) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - type T ListMultipartUploads - var layout struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - layout.T = (*T)(t) - layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp) - return e.EncodeElement(layout, start) -} -func (t *ListMultipartUploads) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { - type T ListMultipartUploads - var overlay struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - overlay.T = (*T)(t) - overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp) - return d.DecodeElement(&overlay, &start) -} - -type ListMultipartUploadsResponse struct { - Bucket string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"` - KeyMarker string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ KeyMarker"` - UploadIdMarker string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ UploadIdMarker"` - NextKeyMarker string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ NextKeyMarker"` - Prefix string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Prefix"` - Delimiter string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Delimiter"` - NextUploadIdMarker string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ NextUploadIdMarker"` - MaxUploads int `xml:"http://s3.amazonaws.com/doc/2006-03-01/ MaxUploads"` - IsTruncated bool `xml:"http://s3.amazonaws.com/doc/2006-03-01/ IsTruncated"` - Upload UploadEntry `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Upload"` - CommonPrefixes CommonPrefixes `xml:"http://s3.amazonaws.com/doc/2006-03-01/ CommonPrefixes"` - EncodingType string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ EncodingType"` -} - -type ListVersionsResponse struct { - ListVersionsResponse ListVersionsResult `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ListVersionsResponse"` -} - -type ListVersionsResult struct { - Metadata []MetadataEntry `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Metadata,omitempty"` - Name string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Name"` - Prefix string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Prefix"` - KeyMarker string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ KeyMarker"` - VersionIdMarker string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ VersionIdMarker"` - NextKeyMarker string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ NextKeyMarker,omitempty"` - NextVersionIdMarker string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ NextVersionIdMarker,omitempty"` - MaxKeys int `xml:"http://s3.amazonaws.com/doc/2006-03-01/ MaxKeys"` - Delimiter string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Delimiter,omitempty"` - IsTruncated bool `xml:"http://s3.amazonaws.com/doc/2006-03-01/ IsTruncated"` - Version VersionEntry `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Version,omitempty"` - DeleteMarker DeleteMarkerEntry `xml:"http://s3.amazonaws.com/doc/2006-03-01/ DeleteMarker,omitempty"` - CommonPrefixes []PrefixEntry `xml:"http://s3.amazonaws.com/doc/2006-03-01/ CommonPrefixes,omitempty"` -} - -type LoggingSettings struct { - TargetBucket string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ TargetBucket"` - TargetPrefix string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ TargetPrefix"` - TargetGrants AccessControlList `xml:"http://s3.amazonaws.com/doc/2006-03-01/ TargetGrants,omitempty"` -} - -// May be one of COPY, REPLACE -type MetadataDirective string - -type MetadataEntry struct { - Name string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Name"` - Value string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Value"` -} - -// May be one of Enabled, Disabled -type MfaDeleteStatus string - -type NotificationConfiguration struct { - TopicConfiguration []TopicConfiguration `xml:"http://s3.amazonaws.com/doc/2006-03-01/ TopicConfiguration,omitempty"` -} - -type ObjectIdentifier struct { - Key string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Key"` - VersionId string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ VersionId"` -} - -type ObjectParts struct { - IsTruncated bool `xml:"http://s3.amazonaws.com/doc/2006-03-01/ IsTruncated"` - MaxParts int `xml:"http://s3.amazonaws.com/doc/2006-03-01/ MaxParts"` - NextPartNumberMarker int `xml:"http://s3.amazonaws.com/doc/2006-03-01/ NextPartNumberMarker"` - PartNumberMarker int `xml:"http://s3.amazonaws.com/doc/2006-03-01/ PartNumberMarker"` - Part Part `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Part"` - PartsCount int `xml:"http://s3.amazonaws.com/doc/2006-03-01/ PartsCount"` -} - -type Part struct { - ChecksumCRC32 string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ChecksumCRC32"` - ChecksumCRC32C string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ChecksumCRC32C"` - ChecksumSHA1 string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ChecksumSHA1"` - ChecksumSHA256 string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ChecksumSHA256"` - PartNumber int `xml:"http://s3.amazonaws.com/doc/2006-03-01/ PartNumber"` - Size int `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Size"` -} - -// May be one of BucketOwner, Requester -type Payer string - -// May be one of READ, WRITE, READ_ACP, WRITE_ACP, FULL_CONTROL -type Permission string - -type PostResponse struct { - Location string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Location"` - Bucket string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"` - Key string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Key"` - ETag string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ETag"` -} - -type PrefixEntry struct { - Prefix string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Prefix"` -} - -type PutObject struct { - Bucket string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"` - Key string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Key"` - Metadata []MetadataEntry `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Metadata,omitempty"` - ContentLength int64 `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ContentLength"` - AccessControlList AccessControlList `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AccessControlList,omitempty"` - StorageClass StorageClass `xml:"http://s3.amazonaws.com/doc/2006-03-01/ StorageClass,omitempty"` - AWSAccessKeyId string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"` - Timestamp time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - Signature string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"` - Credential string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"` -} - -func (t *PutObject) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - type T PutObject - var layout struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - layout.T = (*T)(t) - layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp) - return e.EncodeElement(layout, start) -} -func (t *PutObject) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { - type T PutObject - var overlay struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - overlay.T = (*T)(t) - overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp) - return d.DecodeElement(&overlay, &start) -} - -type PutObjectInline struct { - Bucket string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"` - Key string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Key"` - Metadata []MetadataEntry `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Metadata,omitempty"` - Data []byte `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Data"` - ContentLength int64 `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ContentLength"` - AccessControlList AccessControlList `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AccessControlList,omitempty"` - StorageClass StorageClass `xml:"http://s3.amazonaws.com/doc/2006-03-01/ StorageClass,omitempty"` - AWSAccessKeyId string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"` - Timestamp time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - Signature string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"` - Credential string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"` -} - -func (t *PutObjectInline) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - type T PutObjectInline - var layout struct { - *T - Data *xsdBase64Binary `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Data"` - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - layout.T = (*T)(t) - layout.Data = (*xsdBase64Binary)(&layout.T.Data) - layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp) - return e.EncodeElement(layout, start) -} -func (t *PutObjectInline) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { - type T PutObjectInline - var overlay struct { - *T - Data *xsdBase64Binary `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Data"` - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - overlay.T = (*T)(t) - overlay.Data = (*xsdBase64Binary)(&overlay.T.Data) - overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp) - return d.DecodeElement(&overlay, &start) -} - -type PutObjectInlineResponse struct { - PutObjectInlineResponse PutObjectResult `xml:"http://s3.amazonaws.com/doc/2006-03-01/ PutObjectInlineResponse"` -} - -type PutObjectResponse struct { - PutObjectResponse PutObjectResult `xml:"http://s3.amazonaws.com/doc/2006-03-01/ PutObjectResponse"` -} - -type PutObjectResult struct { - ETag string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ETag"` - LastModified time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ LastModified"` -} - -func (t *PutObjectResult) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - type T PutObjectResult - var layout struct { - *T - LastModified *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ LastModified"` - } - layout.T = (*T)(t) - layout.LastModified = (*xsdDateTime)(&layout.T.LastModified) - return e.EncodeElement(layout, start) -} -func (t *PutObjectResult) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { - type T PutObjectResult - var overlay struct { - *T - LastModified *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ LastModified"` - } - overlay.T = (*T)(t) - overlay.LastModified = (*xsdDateTime)(&overlay.T.LastModified) - return d.DecodeElement(&overlay, &start) -} - -type RequestPaymentConfiguration struct { - Payer Payer `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Payer"` -} - -type Result struct { - Status Status `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Status"` -} - -type SetBucketAccessControlPolicy struct { - Bucket string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"` - AccessControlList AccessControlList `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AccessControlList,omitempty"` - AWSAccessKeyId string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"` - Timestamp time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - Signature string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"` - Credential string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"` -} - -func (t *SetBucketAccessControlPolicy) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - type T SetBucketAccessControlPolicy - var layout struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - layout.T = (*T)(t) - layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp) - return e.EncodeElement(layout, start) -} -func (t *SetBucketAccessControlPolicy) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { - type T SetBucketAccessControlPolicy - var overlay struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - overlay.T = (*T)(t) - overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp) - return d.DecodeElement(&overlay, &start) -} - -type SetBucketAccessControlPolicyResponse struct { -} - -type SetBucketLoggingStatus struct { - Bucket string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"` - AWSAccessKeyId string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"` - Timestamp time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - Signature string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"` - Credential string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"` - BucketLoggingStatus BucketLoggingStatus `xml:"http://s3.amazonaws.com/doc/2006-03-01/ BucketLoggingStatus"` -} - -func (t *SetBucketLoggingStatus) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - type T SetBucketLoggingStatus - var layout struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - layout.T = (*T)(t) - layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp) - return e.EncodeElement(layout, start) -} -func (t *SetBucketLoggingStatus) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { - type T SetBucketLoggingStatus - var overlay struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - overlay.T = (*T)(t) - overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp) - return d.DecodeElement(&overlay, &start) -} - -type SetBucketLoggingStatusResponse struct { -} - -type SetObjectAccessControlPolicy struct { - Bucket string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"` - Key string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Key"` - AccessControlList AccessControlList `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AccessControlList"` - AWSAccessKeyId string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"` - Timestamp time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - Signature string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"` - Credential string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"` -} - -func (t *SetObjectAccessControlPolicy) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - type T SetObjectAccessControlPolicy - var layout struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - layout.T = (*T)(t) - layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp) - return e.EncodeElement(layout, start) -} -func (t *SetObjectAccessControlPolicy) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { - type T SetObjectAccessControlPolicy - var overlay struct { - *T - Timestamp *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"` - } - overlay.T = (*T)(t) - overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp) - return d.DecodeElement(&overlay, &start) -} - -type SetObjectAccessControlPolicyResponse struct { -} - -type Status struct { - Code int `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Code"` - Description string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Description"` -} - -// May be one of STANDARD, REDUCED_REDUNDANCY, GLACIER, UNKNOWN -type StorageClass string - -type TopicConfiguration struct { - Topic string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Topic"` - Event []string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Event"` -} - -type UploadEntry struct { - ChecksumAlgorithm string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ChecksumAlgorithm"` - Initiated time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Initiated"` - Initiator InitiatorEntry `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Initiator"` - Key string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Key"` - Owner CanonicalUser `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Owner"` - StorageClass string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ StorageClass"` - UploadId string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ UploadId"` -} - -func (t *UploadEntry) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - type T UploadEntry - var layout struct { - *T - Initiated *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Initiated"` - } - layout.T = (*T)(t) - layout.Initiated = (*xsdDateTime)(&layout.T.Initiated) - return e.EncodeElement(layout, start) -} -func (t *UploadEntry) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { - type T UploadEntry - var overlay struct { - *T - Initiated *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Initiated"` - } - overlay.T = (*T)(t) - overlay.Initiated = (*xsdDateTime)(&overlay.T.Initiated) - return d.DecodeElement(&overlay, &start) -} - -type User struct { -} - -type VersionEntry struct { - Key string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Key"` - VersionId string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ VersionId"` - IsLatest bool `xml:"http://s3.amazonaws.com/doc/2006-03-01/ IsLatest"` - LastModified time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ LastModified"` - ETag string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ETag"` - Size int64 `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Size"` - Owner CanonicalUser `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Owner,omitempty"` - StorageClass StorageClass `xml:"http://s3.amazonaws.com/doc/2006-03-01/ StorageClass"` -} - -func (t *VersionEntry) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - type T VersionEntry - var layout struct { - *T - LastModified *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ LastModified"` - } - layout.T = (*T)(t) - layout.LastModified = (*xsdDateTime)(&layout.T.LastModified) - return e.EncodeElement(layout, start) -} -func (t *VersionEntry) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { - type T VersionEntry - var overlay struct { - *T - LastModified *xsdDateTime `xml:"http://s3.amazonaws.com/doc/2006-03-01/ LastModified"` - } - overlay.T = (*T)(t) - overlay.LastModified = (*xsdDateTime)(&overlay.T.LastModified) - return d.DecodeElement(&overlay, &start) -} - -type VersioningConfiguration struct { - Status VersioningStatus `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Status,omitempty"` - MfaDelete MfaDeleteStatus `xml:"http://s3.amazonaws.com/doc/2006-03-01/ MfaDelete,omitempty"` -} - -// May be one of Enabled, Suspended -type VersioningStatus string - -type xsdBase64Binary []byte - -func (b *xsdBase64Binary) UnmarshalText(text []byte) (err error) { - *b, err = base64.StdEncoding.DecodeString(string(text)) - return -} -func (b xsdBase64Binary) MarshalText() ([]byte, error) { - var buf bytes.Buffer - enc := base64.NewEncoder(base64.StdEncoding, &buf) - enc.Write([]byte(b)) - enc.Close() - return buf.Bytes(), nil -} - -type xsdDateTime time.Time - -func (t *xsdDateTime) UnmarshalText(text []byte) error { - return _unmarshalTime(text, (*time.Time)(t), "2006-01-02T15:04:05.999999999") -} -func (t xsdDateTime) MarshalText() ([]byte, error) { - return _marshalTime((time.Time)(t), "2006-01-02T15:04:05.999999999") -} -func (t xsdDateTime) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - if (time.Time)(t).IsZero() { - return nil - } - m, err := t.MarshalText() - if err != nil { - return err - } - return e.EncodeElement(m, start) -} -func (t xsdDateTime) MarshalXMLAttr(name xml.Name) (xml.Attr, error) { - if (time.Time)(t).IsZero() { - return xml.Attr{}, nil - } - m, err := t.MarshalText() - return xml.Attr{Name: name, Value: string(m)}, err -} -func _unmarshalTime(text []byte, t *time.Time, format string) (err error) { - s := string(bytes.TrimSpace(text)) - *t, err = time.Parse(format, s) - if _, ok := err.(*time.ParseError); ok { - *t, err = time.Parse(format+"Z07:00", s) - } - return err -} -func _marshalTime(t time.Time, format string) ([]byte, error) { - return []byte(t.Format(format + "Z07:00")), nil -} diff --git a/s3response/s3response.go b/s3response/s3response.go deleted file mode 100644 index 00c7b8b4..00000000 --- a/s3response/s3response.go +++ /dev/null @@ -1,169 +0,0 @@ -package s3response - -import ( - "encoding/xml" -) - -type ListBucketResultV2 struct { - XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ListBucketResult"` - Name string `xml:"Name"` - Prefix string `xml:"Prefix"` - MaxKeys int `xml:"MaxKeys"` - Delimiter string `xml:"Delimiter,omitempty"` - IsTruncated bool `xml:"IsTruncated"` - Contents []ListEntry `xml:"Contents,omitempty"` - CommonPrefixes []PrefixEntry `xml:"CommonPrefixes,omitempty"` - ContinuationToken string `xml:"ContinuationToken,omitempty"` - NextContinuationToken string `xml:"NextContinuationToken,omitempty"` - KeyCount int `xml:"KeyCount"` - StartAfter string `xml:"StartAfter,omitempty"` -} - -// LocationResponse - format for location response. -type LocationResponse struct { - XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ LocationConstraint" json:"-"` - Location string `xml:",chardata"` -} - -// ListPartsResponse - format for list parts response. -type ListPartsResponse struct { - XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ListPartsResult" json:"-"` - - Bucket string - Key string - UploadID string `xml:"UploadId"` - - Initiator CanonicalUser - Owner Owner - - // The class of storage used to store the object. - StorageClass string - - PartNumberMarker int - NextPartNumberMarker int - MaxParts int - IsTruncated bool - - // List of parts. - Parts []Part `xml:"Part"` -} - -// CommonPrefix container for prefix response in ListObjectsResponse -type CommonPrefix struct { - Prefix string -} - -// Bucket container for bucket metadata -type Bucket struct { - Name string - CreationDate string // time string of format "2006-01-02T15:04:05.000Z" -} - -// ObjectVersion container for object version metadata -type ObjectVersion struct { - Object - IsLatest bool - VersionID string `xml:"VersionId"` - - isDeleteMarker bool -} - -// MarshalXML - marshal ObjectVersion -func (o ObjectVersion) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - if o.isDeleteMarker { - start.Name.Local = "DeleteMarker" - } else { - start.Name.Local = "Version" - } - - type objectVersionWrapper ObjectVersion - return e.EncodeElement(objectVersionWrapper(o), start) -} - -// StringMap is a map[string]string. -type StringMap map[string]string - -// MarshalXML - StringMap marshals into XML. -func (s StringMap) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - - tokens := []xml.Token{start} - - for key, value := range s { - t := xml.StartElement{} - t.Name = xml.Name{ - Space: "", - Local: key, - } - tokens = append(tokens, t, xml.CharData(value), xml.EndElement{Name: t.Name}) - } - - tokens = append(tokens, xml.EndElement{ - Name: start.Name, - }) - - for _, t := range tokens { - if err := e.EncodeToken(t); err != nil { - return err - } - } - - // flush to ensure tokens are written - return e.Flush() -} - -// Object container for object metadata -type Object struct { - Key string - LastModified string // time string of format "2006-01-02T15:04:05.000Z" - ETag string - Size int64 - - // Owner of the object. - Owner Owner - - // The class of storage used to store the object. - StorageClass string - - // UserMetadata user-defined metadata - UserMetadata StringMap `xml:"UserMetadata,omitempty"` -} - -// CopyObjectPartResponse container returns ETag and LastModified of the successfully copied object -type CopyObjectPartResponse struct { - XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ CopyPartResult" json:"-"` - LastModified string // time string of format "2006-01-02T15:04:05.000Z" - ETag string // md5sum of the copied object part. -} - -// Owner - bucket owner/principal -type Owner struct { - ID string - DisplayName string -} - -// InitiateMultipartUploadResponse container for InitiateMultiPartUpload response, provides uploadID to start MultiPart upload -type InitiateMultipartUploadResponse struct { - XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ InitiateMultipartUploadResult" json:"-"` - - Bucket string - Key string - UploadID string `xml:"UploadId"` -} - -// CompleteMultipartUploadResponse container for completed multipart upload response -type CompleteMultipartUploadResponse struct { - XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ CompleteMultipartUploadResult" json:"-"` - - Location string - Bucket string - Key string - ETag string -} - -// DeleteError structure. -type DeleteError struct { - Code string - Message string - Key string - VersionID string `xml:"VersionId"` -}