You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1554 lines
51 KiB

3 years ago
3 years ago
3 years ago
  1. // Code generated by xsdgen. DO NOT EDIT.
  2. package s3api
  3. import (
  4. "bytes"
  5. "encoding/base64"
  6. "encoding/xml"
  7. "time"
  8. )
  9. type AccessControlList struct {
  10. Grant []Grant `xml:"Grant,omitempty"`
  11. }
  12. type AccessControlPolicy struct {
  13. Owner CanonicalUser `xml:"Owner"`
  14. AccessControlList AccessControlList `xml:"AccessControlList"`
  15. }
  16. type AmazonCustomerByEmail struct {
  17. EmailAddress string `xml:"EmailAddress"`
  18. }
  19. type Anon1 struct {
  20. Bucket string `xml:"Bucket"`
  21. AWSAccessKeyId string `xml:"AWSAccessKeyId,omitempty"`
  22. Timestamp time.Time `xml:"Timestamp,omitempty"`
  23. Signature string `xml:"Signature,omitempty"`
  24. Credential string `xml:"Credential,omitempty"`
  25. }
  26. func (t *Anon1) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  27. type T Anon1
  28. var layout struct {
  29. *T
  30. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  31. }
  32. layout.T = (*T)(t)
  33. layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp)
  34. return e.EncodeElement(layout, start)
  35. }
  36. func (t *Anon1) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  37. type T Anon1
  38. var overlay struct {
  39. *T
  40. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  41. }
  42. overlay.T = (*T)(t)
  43. overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp)
  44. return d.DecodeElement(&overlay, &start)
  45. }
  46. type Anon10 struct {
  47. }
  48. type Anon11 struct {
  49. Bucket string `xml:"Bucket"`
  50. AccessControlList AccessControlList `xml:"AccessControlList,omitempty"`
  51. AWSAccessKeyId string `xml:"AWSAccessKeyId,omitempty"`
  52. Timestamp time.Time `xml:"Timestamp,omitempty"`
  53. Signature string `xml:"Signature,omitempty"`
  54. Credential string `xml:"Credential,omitempty"`
  55. }
  56. func (t *Anon11) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  57. type T Anon11
  58. var layout struct {
  59. *T
  60. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  61. }
  62. layout.T = (*T)(t)
  63. layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp)
  64. return e.EncodeElement(layout, start)
  65. }
  66. func (t *Anon11) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  67. type T Anon11
  68. var overlay struct {
  69. *T
  70. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  71. }
  72. overlay.T = (*T)(t)
  73. overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp)
  74. return d.DecodeElement(&overlay, &start)
  75. }
  76. type Anon12 struct {
  77. }
  78. type Anon13 struct {
  79. Bucket string `xml:"Bucket"`
  80. Key string `xml:"Key"`
  81. GetMetadata bool `xml:"GetMetadata"`
  82. GetData bool `xml:"GetData"`
  83. InlineData bool `xml:"InlineData"`
  84. AWSAccessKeyId string `xml:"AWSAccessKeyId,omitempty"`
  85. Timestamp time.Time `xml:"Timestamp,omitempty"`
  86. Signature string `xml:"Signature,omitempty"`
  87. Credential string `xml:"Credential,omitempty"`
  88. }
  89. func (t *Anon13) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  90. type T Anon13
  91. var layout struct {
  92. *T
  93. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  94. }
  95. layout.T = (*T)(t)
  96. layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp)
  97. return e.EncodeElement(layout, start)
  98. }
  99. func (t *Anon13) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  100. type T Anon13
  101. var overlay struct {
  102. *T
  103. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  104. }
  105. overlay.T = (*T)(t)
  106. overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp)
  107. return d.DecodeElement(&overlay, &start)
  108. }
  109. type Anon14 struct {
  110. GetObjectResponse GetObjectResult `xml:"GetObjectResponse"`
  111. }
  112. type Anon15 struct {
  113. Bucket string `xml:"Bucket"`
  114. Key string `xml:"Key"`
  115. GetMetadata bool `xml:"GetMetadata"`
  116. GetData bool `xml:"GetData"`
  117. InlineData bool `xml:"InlineData"`
  118. ByteRangeStart int64 `xml:"ByteRangeStart,omitempty"`
  119. ByteRangeEnd int64 `xml:"ByteRangeEnd,omitempty"`
  120. IfModifiedSince time.Time `xml:"IfModifiedSince,omitempty"`
  121. IfUnmodifiedSince time.Time `xml:"IfUnmodifiedSince,omitempty"`
  122. IfMatch []string `xml:"IfMatch,omitempty"`
  123. IfNoneMatch []string `xml:"IfNoneMatch,omitempty"`
  124. ReturnCompleteObjectOnConditionFailure bool `xml:"ReturnCompleteObjectOnConditionFailure,omitempty"`
  125. AWSAccessKeyId string `xml:"AWSAccessKeyId,omitempty"`
  126. Timestamp time.Time `xml:"Timestamp,omitempty"`
  127. Signature string `xml:"Signature,omitempty"`
  128. Credential string `xml:"Credential,omitempty"`
  129. }
  130. func (t *Anon15) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  131. type T Anon15
  132. var layout struct {
  133. *T
  134. IfModifiedSince *xsdDateTime `xml:"IfModifiedSince,omitempty"`
  135. IfUnmodifiedSince *xsdDateTime `xml:"IfUnmodifiedSince,omitempty"`
  136. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  137. }
  138. layout.T = (*T)(t)
  139. layout.IfModifiedSince = (*xsdDateTime)(&layout.T.IfModifiedSince)
  140. layout.IfUnmodifiedSince = (*xsdDateTime)(&layout.T.IfUnmodifiedSince)
  141. layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp)
  142. return e.EncodeElement(layout, start)
  143. }
  144. func (t *Anon15) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  145. type T Anon15
  146. var overlay struct {
  147. *T
  148. IfModifiedSince *xsdDateTime `xml:"IfModifiedSince,omitempty"`
  149. IfUnmodifiedSince *xsdDateTime `xml:"IfUnmodifiedSince,omitempty"`
  150. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  151. }
  152. overlay.T = (*T)(t)
  153. overlay.IfModifiedSince = (*xsdDateTime)(&overlay.T.IfModifiedSince)
  154. overlay.IfUnmodifiedSince = (*xsdDateTime)(&overlay.T.IfUnmodifiedSince)
  155. overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp)
  156. return d.DecodeElement(&overlay, &start)
  157. }
  158. type Anon16 struct {
  159. GetObjectResponse GetObjectResult `xml:"GetObjectResponse"`
  160. }
  161. type Anon17 struct {
  162. Bucket string `xml:"Bucket"`
  163. Key string `xml:"Key"`
  164. Metadata []MetadataEntry `xml:"Metadata,omitempty"`
  165. ContentLength int64 `xml:"ContentLength"`
  166. AccessControlList AccessControlList `xml:"AccessControlList,omitempty"`
  167. StorageClass StorageClass `xml:"StorageClass,omitempty"`
  168. AWSAccessKeyId string `xml:"AWSAccessKeyId,omitempty"`
  169. Timestamp time.Time `xml:"Timestamp,omitempty"`
  170. Signature string `xml:"Signature,omitempty"`
  171. Credential string `xml:"Credential,omitempty"`
  172. }
  173. func (t *Anon17) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  174. type T Anon17
  175. var layout struct {
  176. *T
  177. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  178. }
  179. layout.T = (*T)(t)
  180. layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp)
  181. return e.EncodeElement(layout, start)
  182. }
  183. func (t *Anon17) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  184. type T Anon17
  185. var overlay struct {
  186. *T
  187. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  188. }
  189. overlay.T = (*T)(t)
  190. overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp)
  191. return d.DecodeElement(&overlay, &start)
  192. }
  193. type Anon18 struct {
  194. PutObjectResponse PutObjectResult `xml:"PutObjectResponse"`
  195. }
  196. type Anon19 struct {
  197. Bucket string `xml:"Bucket"`
  198. Key string `xml:"Key"`
  199. Metadata []MetadataEntry `xml:"Metadata,omitempty"`
  200. Data []byte `xml:"Data"`
  201. ContentLength int64 `xml:"ContentLength"`
  202. AccessControlList AccessControlList `xml:"AccessControlList,omitempty"`
  203. StorageClass StorageClass `xml:"StorageClass,omitempty"`
  204. AWSAccessKeyId string `xml:"AWSAccessKeyId,omitempty"`
  205. Timestamp time.Time `xml:"Timestamp,omitempty"`
  206. Signature string `xml:"Signature,omitempty"`
  207. Credential string `xml:"Credential,omitempty"`
  208. }
  209. func (t *Anon19) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  210. type T Anon19
  211. var layout struct {
  212. *T
  213. Data *xsdBase64Binary `xml:"Data"`
  214. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  215. }
  216. layout.T = (*T)(t)
  217. layout.Data = (*xsdBase64Binary)(&layout.T.Data)
  218. layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp)
  219. return e.EncodeElement(layout, start)
  220. }
  221. func (t *Anon19) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  222. type T Anon19
  223. var overlay struct {
  224. *T
  225. Data *xsdBase64Binary `xml:"Data"`
  226. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  227. }
  228. overlay.T = (*T)(t)
  229. overlay.Data = (*xsdBase64Binary)(&overlay.T.Data)
  230. overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp)
  231. return d.DecodeElement(&overlay, &start)
  232. }
  233. type Anon2 struct {
  234. GetBucketLoggingStatusResponse BucketLoggingStatus `xml:"GetBucketLoggingStatusResponse"`
  235. }
  236. type Anon20 struct {
  237. PutObjectInlineResponse PutObjectResult `xml:"PutObjectInlineResponse"`
  238. }
  239. type Anon21 struct {
  240. Bucket string `xml:"Bucket"`
  241. Key string `xml:"Key"`
  242. AWSAccessKeyId string `xml:"AWSAccessKeyId,omitempty"`
  243. Timestamp time.Time `xml:"Timestamp,omitempty"`
  244. Signature string `xml:"Signature,omitempty"`
  245. Credential string `xml:"Credential,omitempty"`
  246. }
  247. func (t *Anon21) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  248. type T Anon21
  249. var layout struct {
  250. *T
  251. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  252. }
  253. layout.T = (*T)(t)
  254. layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp)
  255. return e.EncodeElement(layout, start)
  256. }
  257. func (t *Anon21) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  258. type T Anon21
  259. var overlay struct {
  260. *T
  261. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  262. }
  263. overlay.T = (*T)(t)
  264. overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp)
  265. return d.DecodeElement(&overlay, &start)
  266. }
  267. type Anon22 struct {
  268. DeleteObjectResponse Status `xml:"DeleteObjectResponse"`
  269. }
  270. type Anon23 struct {
  271. Bucket string `xml:"Bucket"`
  272. Prefix string `xml:"Prefix,omitempty"`
  273. Marker string `xml:"Marker,omitempty"`
  274. MaxKeys int `xml:"MaxKeys,omitempty"`
  275. Delimiter string `xml:"Delimiter,omitempty"`
  276. AWSAccessKeyId string `xml:"AWSAccessKeyId,omitempty"`
  277. Timestamp time.Time `xml:"Timestamp,omitempty"`
  278. Signature string `xml:"Signature,omitempty"`
  279. Credential string `xml:"Credential,omitempty"`
  280. }
  281. func (t *Anon23) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  282. type T Anon23
  283. var layout struct {
  284. *T
  285. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  286. }
  287. layout.T = (*T)(t)
  288. layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp)
  289. return e.EncodeElement(layout, start)
  290. }
  291. func (t *Anon23) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  292. type T Anon23
  293. var overlay struct {
  294. *T
  295. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  296. }
  297. overlay.T = (*T)(t)
  298. overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp)
  299. return d.DecodeElement(&overlay, &start)
  300. }
  301. type Anon24 struct {
  302. ListBucketResponse ListBucketResult `xml:"ListBucketResponse"`
  303. }
  304. type Anon25 struct {
  305. ListVersionsResponse ListVersionsResult `xml:"ListVersionsResponse"`
  306. }
  307. type Anon26 struct {
  308. AWSAccessKeyId string `xml:"AWSAccessKeyId,omitempty"`
  309. Timestamp time.Time `xml:"Timestamp,omitempty"`
  310. Signature string `xml:"Signature,omitempty"`
  311. }
  312. func (t *Anon26) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  313. type T Anon26
  314. var layout struct {
  315. *T
  316. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  317. }
  318. layout.T = (*T)(t)
  319. layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp)
  320. return e.EncodeElement(layout, start)
  321. }
  322. func (t *Anon26) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  323. type T Anon26
  324. var overlay struct {
  325. *T
  326. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  327. }
  328. overlay.T = (*T)(t)
  329. overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp)
  330. return d.DecodeElement(&overlay, &start)
  331. }
  332. type Anon27 struct {
  333. ListAllMyBucketsResponse ListAllMyBucketsResult `xml:"ListAllMyBucketsResponse"`
  334. }
  335. type Anon28 struct {
  336. Location string `xml:"Location"`
  337. Bucket string `xml:"Bucket"`
  338. Key string `xml:"Key"`
  339. ETag string `xml:"ETag"`
  340. }
  341. type Anon29 struct {
  342. SourceBucket string `xml:"SourceBucket"`
  343. SourceKey string `xml:"SourceKey"`
  344. DestinationBucket string `xml:"DestinationBucket"`
  345. DestinationKey string `xml:"DestinationKey"`
  346. MetadataDirective MetadataDirective `xml:"MetadataDirective,omitempty"`
  347. Metadata []MetadataEntry `xml:"Metadata,omitempty"`
  348. AccessControlList AccessControlList `xml:"AccessControlList,omitempty"`
  349. CopySourceIfModifiedSince time.Time `xml:"CopySourceIfModifiedSince,omitempty"`
  350. CopySourceIfUnmodifiedSince time.Time `xml:"CopySourceIfUnmodifiedSince,omitempty"`
  351. CopySourceIfMatch []string `xml:"CopySourceIfMatch,omitempty"`
  352. CopySourceIfNoneMatch []string `xml:"CopySourceIfNoneMatch,omitempty"`
  353. StorageClass StorageClass `xml:"StorageClass,omitempty"`
  354. AWSAccessKeyId string `xml:"AWSAccessKeyId,omitempty"`
  355. Timestamp time.Time `xml:"Timestamp,omitempty"`
  356. Signature string `xml:"Signature,omitempty"`
  357. Credential string `xml:"Credential,omitempty"`
  358. }
  359. func (t *Anon29) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  360. type T Anon29
  361. var layout struct {
  362. *T
  363. CopySourceIfModifiedSince *xsdDateTime `xml:"CopySourceIfModifiedSince,omitempty"`
  364. CopySourceIfUnmodifiedSince *xsdDateTime `xml:"CopySourceIfUnmodifiedSince,omitempty"`
  365. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  366. }
  367. layout.T = (*T)(t)
  368. layout.CopySourceIfModifiedSince = (*xsdDateTime)(&layout.T.CopySourceIfModifiedSince)
  369. layout.CopySourceIfUnmodifiedSince = (*xsdDateTime)(&layout.T.CopySourceIfUnmodifiedSince)
  370. layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp)
  371. return e.EncodeElement(layout, start)
  372. }
  373. func (t *Anon29) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  374. type T Anon29
  375. var overlay struct {
  376. *T
  377. CopySourceIfModifiedSince *xsdDateTime `xml:"CopySourceIfModifiedSince,omitempty"`
  378. CopySourceIfUnmodifiedSince *xsdDateTime `xml:"CopySourceIfUnmodifiedSince,omitempty"`
  379. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  380. }
  381. overlay.T = (*T)(t)
  382. overlay.CopySourceIfModifiedSince = (*xsdDateTime)(&overlay.T.CopySourceIfModifiedSince)
  383. overlay.CopySourceIfUnmodifiedSince = (*xsdDateTime)(&overlay.T.CopySourceIfUnmodifiedSince)
  384. overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp)
  385. return d.DecodeElement(&overlay, &start)
  386. }
  387. type Anon3 struct {
  388. Bucket string `xml:"Bucket"`
  389. AWSAccessKeyId string `xml:"AWSAccessKeyId,omitempty"`
  390. Timestamp time.Time `xml:"Timestamp,omitempty"`
  391. Signature string `xml:"Signature,omitempty"`
  392. Credential string `xml:"Credential,omitempty"`
  393. BucketLoggingStatus BucketLoggingStatus `xml:"BucketLoggingStatus"`
  394. }
  395. func (t *Anon3) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  396. type T Anon3
  397. var layout struct {
  398. *T
  399. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  400. }
  401. layout.T = (*T)(t)
  402. layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp)
  403. return e.EncodeElement(layout, start)
  404. }
  405. func (t *Anon3) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  406. type T Anon3
  407. var overlay struct {
  408. *T
  409. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  410. }
  411. overlay.T = (*T)(t)
  412. overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp)
  413. return d.DecodeElement(&overlay, &start)
  414. }
  415. type Anon30 struct {
  416. CopyObjectResult CopyObjectResult `xml:"CopyObjectResult"`
  417. }
  418. type Anon4 struct {
  419. }
  420. type Anon5 struct {
  421. Bucket string `xml:"Bucket"`
  422. Key string `xml:"Key"`
  423. AWSAccessKeyId string `xml:"AWSAccessKeyId,omitempty"`
  424. Timestamp time.Time `xml:"Timestamp,omitempty"`
  425. Signature string `xml:"Signature,omitempty"`
  426. Credential string `xml:"Credential,omitempty"`
  427. }
  428. func (t *Anon5) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  429. type T Anon5
  430. var layout struct {
  431. *T
  432. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  433. }
  434. layout.T = (*T)(t)
  435. layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp)
  436. return e.EncodeElement(layout, start)
  437. }
  438. func (t *Anon5) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  439. type T Anon5
  440. var overlay struct {
  441. *T
  442. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  443. }
  444. overlay.T = (*T)(t)
  445. overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp)
  446. return d.DecodeElement(&overlay, &start)
  447. }
  448. type Anon6 struct {
  449. GetObjectAccessControlPolicyResponse AccessControlPolicy `xml:"GetObjectAccessControlPolicyResponse"`
  450. }
  451. type Anon7 struct {
  452. Bucket string `xml:"Bucket"`
  453. AWSAccessKeyId string `xml:"AWSAccessKeyId,omitempty"`
  454. Timestamp time.Time `xml:"Timestamp,omitempty"`
  455. Signature string `xml:"Signature,omitempty"`
  456. Credential string `xml:"Credential,omitempty"`
  457. }
  458. func (t *Anon7) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  459. type T Anon7
  460. var layout struct {
  461. *T
  462. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  463. }
  464. layout.T = (*T)(t)
  465. layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp)
  466. return e.EncodeElement(layout, start)
  467. }
  468. func (t *Anon7) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  469. type T Anon7
  470. var overlay struct {
  471. *T
  472. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  473. }
  474. overlay.T = (*T)(t)
  475. overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp)
  476. return d.DecodeElement(&overlay, &start)
  477. }
  478. type Anon8 struct {
  479. GetBucketAccessControlPolicyResponse AccessControlPolicy `xml:"GetBucketAccessControlPolicyResponse"`
  480. }
  481. type Anon9 struct {
  482. Bucket string `xml:"Bucket"`
  483. Key string `xml:"Key"`
  484. AccessControlList AccessControlList `xml:"AccessControlList"`
  485. AWSAccessKeyId string `xml:"AWSAccessKeyId,omitempty"`
  486. Timestamp time.Time `xml:"Timestamp,omitempty"`
  487. Signature string `xml:"Signature,omitempty"`
  488. Credential string `xml:"Credential,omitempty"`
  489. }
  490. func (t *Anon9) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  491. type T Anon9
  492. var layout struct {
  493. *T
  494. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  495. }
  496. layout.T = (*T)(t)
  497. layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp)
  498. return e.EncodeElement(layout, start)
  499. }
  500. func (t *Anon9) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  501. type T Anon9
  502. var overlay struct {
  503. *T
  504. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  505. }
  506. overlay.T = (*T)(t)
  507. overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp)
  508. return d.DecodeElement(&overlay, &start)
  509. }
  510. type BucketLoggingStatus struct {
  511. LoggingEnabled LoggingSettings `xml:"LoggingEnabled,omitempty"`
  512. }
  513. type CanonicalUser struct {
  514. ID string `xml:"ID"`
  515. DisplayName string `xml:"DisplayName,omitempty"`
  516. set bool
  517. }
  518. type CopyObject struct {
  519. SourceBucket string `xml:"SourceBucket"`
  520. SourceKey string `xml:"SourceKey"`
  521. DestinationBucket string `xml:"DestinationBucket"`
  522. DestinationKey string `xml:"DestinationKey"`
  523. MetadataDirective MetadataDirective `xml:"MetadataDirective,omitempty"`
  524. Metadata []MetadataEntry `xml:"Metadata,omitempty"`
  525. AccessControlList AccessControlList `xml:"AccessControlList,omitempty"`
  526. CopySourceIfModifiedSince time.Time `xml:"CopySourceIfModifiedSince,omitempty"`
  527. CopySourceIfUnmodifiedSince time.Time `xml:"CopySourceIfUnmodifiedSince,omitempty"`
  528. CopySourceIfMatch []string `xml:"CopySourceIfMatch,omitempty"`
  529. CopySourceIfNoneMatch []string `xml:"CopySourceIfNoneMatch,omitempty"`
  530. StorageClass StorageClass `xml:"StorageClass,omitempty"`
  531. AWSAccessKeyId string `xml:"AWSAccessKeyId,omitempty"`
  532. Timestamp time.Time `xml:"Timestamp,omitempty"`
  533. Signature string `xml:"Signature,omitempty"`
  534. Credential string `xml:"Credential,omitempty"`
  535. }
  536. func (t *CopyObject) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  537. type T CopyObject
  538. var layout struct {
  539. *T
  540. CopySourceIfModifiedSince *xsdDateTime `xml:"CopySourceIfModifiedSince,omitempty"`
  541. CopySourceIfUnmodifiedSince *xsdDateTime `xml:"CopySourceIfUnmodifiedSince,omitempty"`
  542. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  543. }
  544. layout.T = (*T)(t)
  545. layout.CopySourceIfModifiedSince = (*xsdDateTime)(&layout.T.CopySourceIfModifiedSince)
  546. layout.CopySourceIfUnmodifiedSince = (*xsdDateTime)(&layout.T.CopySourceIfUnmodifiedSince)
  547. layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp)
  548. return e.EncodeElement(layout, start)
  549. }
  550. func (t *CopyObject) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  551. type T CopyObject
  552. var overlay struct {
  553. *T
  554. CopySourceIfModifiedSince *xsdDateTime `xml:"CopySourceIfModifiedSince,omitempty"`
  555. CopySourceIfUnmodifiedSince *xsdDateTime `xml:"CopySourceIfUnmodifiedSince,omitempty"`
  556. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  557. }
  558. overlay.T = (*T)(t)
  559. overlay.CopySourceIfModifiedSince = (*xsdDateTime)(&overlay.T.CopySourceIfModifiedSince)
  560. overlay.CopySourceIfUnmodifiedSince = (*xsdDateTime)(&overlay.T.CopySourceIfUnmodifiedSince)
  561. overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp)
  562. return d.DecodeElement(&overlay, &start)
  563. }
  564. type CopyObjectResponse struct {
  565. CopyObjectResult CopyObjectResult `xml:"CopyObjectResult"`
  566. }
  567. type CopyObjectResult struct {
  568. LastModified time.Time `xml:"LastModified"`
  569. ETag string `xml:"ETag"`
  570. }
  571. func (t *CopyObjectResult) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  572. type T CopyObjectResult
  573. var layout struct {
  574. *T
  575. LastModified *xsdDateTime `xml:"LastModified"`
  576. }
  577. layout.T = (*T)(t)
  578. layout.LastModified = (*xsdDateTime)(&layout.T.LastModified)
  579. return e.EncodeElement(layout, start)
  580. }
  581. func (t *CopyObjectResult) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  582. type T CopyObjectResult
  583. var overlay struct {
  584. *T
  585. LastModified *xsdDateTime `xml:"LastModified"`
  586. }
  587. overlay.T = (*T)(t)
  588. overlay.LastModified = (*xsdDateTime)(&overlay.T.LastModified)
  589. return d.DecodeElement(&overlay, &start)
  590. }
  591. type CreateBucket struct {
  592. Bucket string `xml:"Bucket"`
  593. AccessControlList AccessControlList `xml:"AccessControlList,omitempty"`
  594. AWSAccessKeyId string `xml:"AWSAccessKeyId,omitempty"`
  595. Timestamp time.Time `xml:"Timestamp,omitempty"`
  596. Signature string `xml:"Signature,omitempty"`
  597. }
  598. func (t *CreateBucket) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  599. type T CreateBucket
  600. var layout struct {
  601. *T
  602. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  603. }
  604. layout.T = (*T)(t)
  605. layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp)
  606. return e.EncodeElement(layout, start)
  607. }
  608. func (t *CreateBucket) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  609. type T CreateBucket
  610. var overlay struct {
  611. *T
  612. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  613. }
  614. overlay.T = (*T)(t)
  615. overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp)
  616. return d.DecodeElement(&overlay, &start)
  617. }
  618. type CreateBucketConfiguration struct {
  619. LocationConstraint string `xml:"LocationConstraint"`
  620. }
  621. type CreateBucketResponse struct {
  622. CreateBucketReturn CreateBucketResult `xml:"CreateBucketReturn"`
  623. }
  624. type CreateBucketResult struct {
  625. BucketName string `xml:"BucketName"`
  626. }
  627. type DeleteBucket struct {
  628. Bucket string `xml:"Bucket"`
  629. AWSAccessKeyId string `xml:"AWSAccessKeyId,omitempty"`
  630. Timestamp time.Time `xml:"Timestamp,omitempty"`
  631. Signature string `xml:"Signature,omitempty"`
  632. Credential string `xml:"Credential,omitempty"`
  633. }
  634. func (t *DeleteBucket) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  635. type T DeleteBucket
  636. var layout struct {
  637. *T
  638. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  639. }
  640. layout.T = (*T)(t)
  641. layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp)
  642. return e.EncodeElement(layout, start)
  643. }
  644. func (t *DeleteBucket) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  645. type T DeleteBucket
  646. var overlay struct {
  647. *T
  648. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  649. }
  650. overlay.T = (*T)(t)
  651. overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp)
  652. return d.DecodeElement(&overlay, &start)
  653. }
  654. type DeleteBucketResponse struct {
  655. DeleteBucketResponse Status `xml:"DeleteBucketResponse"`
  656. }
  657. type DeleteMarkerEntry struct {
  658. Key string `xml:"Key"`
  659. VersionId string `xml:"VersionId"`
  660. IsLatest bool `xml:"IsLatest"`
  661. LastModified time.Time `xml:"LastModified"`
  662. Owner CanonicalUser `xml:"Owner,omitempty"`
  663. }
  664. func (t *DeleteMarkerEntry) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  665. type T DeleteMarkerEntry
  666. var layout struct {
  667. *T
  668. LastModified *xsdDateTime `xml:"LastModified"`
  669. }
  670. layout.T = (*T)(t)
  671. layout.LastModified = (*xsdDateTime)(&layout.T.LastModified)
  672. return e.EncodeElement(layout, start)
  673. }
  674. func (t *DeleteMarkerEntry) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  675. type T DeleteMarkerEntry
  676. var overlay struct {
  677. *T
  678. LastModified *xsdDateTime `xml:"LastModified"`
  679. }
  680. overlay.T = (*T)(t)
  681. overlay.LastModified = (*xsdDateTime)(&overlay.T.LastModified)
  682. return d.DecodeElement(&overlay, &start)
  683. }
  684. type DeleteObject struct {
  685. Bucket string `xml:"Bucket"`
  686. Key string `xml:"Key"`
  687. AWSAccessKeyId string `xml:"AWSAccessKeyId,omitempty"`
  688. Timestamp time.Time `xml:"Timestamp,omitempty"`
  689. Signature string `xml:"Signature,omitempty"`
  690. Credential string `xml:"Credential,omitempty"`
  691. }
  692. func (t *DeleteObject) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  693. type T DeleteObject
  694. var layout struct {
  695. *T
  696. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  697. }
  698. layout.T = (*T)(t)
  699. layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp)
  700. return e.EncodeElement(layout, start)
  701. }
  702. func (t *DeleteObject) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  703. type T DeleteObject
  704. var overlay struct {
  705. *T
  706. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  707. }
  708. overlay.T = (*T)(t)
  709. overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp)
  710. return d.DecodeElement(&overlay, &start)
  711. }
  712. type DeleteObjectResponse struct {
  713. DeleteObjectResponse Status `xml:"DeleteObjectResponse"`
  714. }
  715. type GetBucketAccessControlPolicy struct {
  716. Bucket string `xml:"Bucket"`
  717. AWSAccessKeyId string `xml:"AWSAccessKeyId,omitempty"`
  718. Timestamp time.Time `xml:"Timestamp,omitempty"`
  719. Signature string `xml:"Signature,omitempty"`
  720. Credential string `xml:"Credential,omitempty"`
  721. }
  722. func (t *GetBucketAccessControlPolicy) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  723. type T GetBucketAccessControlPolicy
  724. var layout struct {
  725. *T
  726. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  727. }
  728. layout.T = (*T)(t)
  729. layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp)
  730. return e.EncodeElement(layout, start)
  731. }
  732. func (t *GetBucketAccessControlPolicy) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  733. type T GetBucketAccessControlPolicy
  734. var overlay struct {
  735. *T
  736. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  737. }
  738. overlay.T = (*T)(t)
  739. overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp)
  740. return d.DecodeElement(&overlay, &start)
  741. }
  742. type GetBucketAccessControlPolicyResponse struct {
  743. GetBucketAccessControlPolicyResponse AccessControlPolicy `xml:"GetBucketAccessControlPolicyResponse"`
  744. }
  745. type GetBucketLoggingStatus struct {
  746. Bucket string `xml:"Bucket"`
  747. AWSAccessKeyId string `xml:"AWSAccessKeyId,omitempty"`
  748. Timestamp time.Time `xml:"Timestamp,omitempty"`
  749. Signature string `xml:"Signature,omitempty"`
  750. Credential string `xml:"Credential,omitempty"`
  751. }
  752. func (t *GetBucketLoggingStatus) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  753. type T GetBucketLoggingStatus
  754. var layout struct {
  755. *T
  756. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  757. }
  758. layout.T = (*T)(t)
  759. layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp)
  760. return e.EncodeElement(layout, start)
  761. }
  762. func (t *GetBucketLoggingStatus) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  763. type T GetBucketLoggingStatus
  764. var overlay struct {
  765. *T
  766. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  767. }
  768. overlay.T = (*T)(t)
  769. overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp)
  770. return d.DecodeElement(&overlay, &start)
  771. }
  772. type GetBucketLoggingStatusResponse struct {
  773. GetBucketLoggingStatusResponse BucketLoggingStatus `xml:"GetBucketLoggingStatusResponse"`
  774. }
  775. type GetObject struct {
  776. Bucket string `xml:"Bucket"`
  777. Key string `xml:"Key"`
  778. GetMetadata bool `xml:"GetMetadata"`
  779. GetData bool `xml:"GetData"`
  780. InlineData bool `xml:"InlineData"`
  781. AWSAccessKeyId string `xml:"AWSAccessKeyId,omitempty"`
  782. Timestamp time.Time `xml:"Timestamp,omitempty"`
  783. Signature string `xml:"Signature,omitempty"`
  784. Credential string `xml:"Credential,omitempty"`
  785. }
  786. func (t *GetObject) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  787. type T GetObject
  788. var layout struct {
  789. *T
  790. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  791. }
  792. layout.T = (*T)(t)
  793. layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp)
  794. return e.EncodeElement(layout, start)
  795. }
  796. func (t *GetObject) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  797. type T GetObject
  798. var overlay struct {
  799. *T
  800. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  801. }
  802. overlay.T = (*T)(t)
  803. overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp)
  804. return d.DecodeElement(&overlay, &start)
  805. }
  806. type GetObjectAccessControlPolicy struct {
  807. Bucket string `xml:"Bucket"`
  808. Key string `xml:"Key"`
  809. AWSAccessKeyId string `xml:"AWSAccessKeyId,omitempty"`
  810. Timestamp time.Time `xml:"Timestamp,omitempty"`
  811. Signature string `xml:"Signature,omitempty"`
  812. Credential string `xml:"Credential,omitempty"`
  813. }
  814. func (t *GetObjectAccessControlPolicy) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  815. type T GetObjectAccessControlPolicy
  816. var layout struct {
  817. *T
  818. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  819. }
  820. layout.T = (*T)(t)
  821. layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp)
  822. return e.EncodeElement(layout, start)
  823. }
  824. func (t *GetObjectAccessControlPolicy) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  825. type T GetObjectAccessControlPolicy
  826. var overlay struct {
  827. *T
  828. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  829. }
  830. overlay.T = (*T)(t)
  831. overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp)
  832. return d.DecodeElement(&overlay, &start)
  833. }
  834. type GetObjectAccessControlPolicyResponse struct {
  835. GetObjectAccessControlPolicyResponse AccessControlPolicy `xml:"GetObjectAccessControlPolicyResponse"`
  836. }
  837. type GetObjectExtended struct {
  838. Bucket string `xml:"Bucket"`
  839. Key string `xml:"Key"`
  840. GetMetadata bool `xml:"GetMetadata"`
  841. GetData bool `xml:"GetData"`
  842. InlineData bool `xml:"InlineData"`
  843. ByteRangeStart int64 `xml:"ByteRangeStart,omitempty"`
  844. ByteRangeEnd int64 `xml:"ByteRangeEnd,omitempty"`
  845. IfModifiedSince time.Time `xml:"IfModifiedSince,omitempty"`
  846. IfUnmodifiedSince time.Time `xml:"IfUnmodifiedSince,omitempty"`
  847. IfMatch []string `xml:"IfMatch,omitempty"`
  848. IfNoneMatch []string `xml:"IfNoneMatch,omitempty"`
  849. ReturnCompleteObjectOnConditionFailure bool `xml:"ReturnCompleteObjectOnConditionFailure,omitempty"`
  850. AWSAccessKeyId string `xml:"AWSAccessKeyId,omitempty"`
  851. Timestamp time.Time `xml:"Timestamp,omitempty"`
  852. Signature string `xml:"Signature,omitempty"`
  853. Credential string `xml:"Credential,omitempty"`
  854. }
  855. func (t *GetObjectExtended) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  856. type T GetObjectExtended
  857. var layout struct {
  858. *T
  859. IfModifiedSince *xsdDateTime `xml:"IfModifiedSince,omitempty"`
  860. IfUnmodifiedSince *xsdDateTime `xml:"IfUnmodifiedSince,omitempty"`
  861. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  862. }
  863. layout.T = (*T)(t)
  864. layout.IfModifiedSince = (*xsdDateTime)(&layout.T.IfModifiedSince)
  865. layout.IfUnmodifiedSince = (*xsdDateTime)(&layout.T.IfUnmodifiedSince)
  866. layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp)
  867. return e.EncodeElement(layout, start)
  868. }
  869. func (t *GetObjectExtended) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  870. type T GetObjectExtended
  871. var overlay struct {
  872. *T
  873. IfModifiedSince *xsdDateTime `xml:"IfModifiedSince,omitempty"`
  874. IfUnmodifiedSince *xsdDateTime `xml:"IfUnmodifiedSince,omitempty"`
  875. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  876. }
  877. overlay.T = (*T)(t)
  878. overlay.IfModifiedSince = (*xsdDateTime)(&overlay.T.IfModifiedSince)
  879. overlay.IfUnmodifiedSince = (*xsdDateTime)(&overlay.T.IfUnmodifiedSince)
  880. overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp)
  881. return d.DecodeElement(&overlay, &start)
  882. }
  883. type GetObjectExtendedResponse struct {
  884. GetObjectResponse GetObjectResult `xml:"GetObjectResponse"`
  885. }
  886. type GetObjectResponse struct {
  887. GetObjectResponse GetObjectResult `xml:"GetObjectResponse"`
  888. }
  889. type GetObjectResult struct {
  890. Status Status `xml:"Status"`
  891. Metadata []MetadataEntry `xml:"Metadata,omitempty"`
  892. Data []byte `xml:"Data,omitempty"`
  893. LastModified time.Time `xml:"LastModified"`
  894. ETag string `xml:"ETag"`
  895. }
  896. func (t *GetObjectResult) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  897. type T GetObjectResult
  898. var layout struct {
  899. *T
  900. Data *xsdBase64Binary `xml:"Data,omitempty"`
  901. LastModified *xsdDateTime `xml:"LastModified"`
  902. }
  903. layout.T = (*T)(t)
  904. layout.Data = (*xsdBase64Binary)(&layout.T.Data)
  905. layout.LastModified = (*xsdDateTime)(&layout.T.LastModified)
  906. return e.EncodeElement(layout, start)
  907. }
  908. func (t *GetObjectResult) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  909. type T GetObjectResult
  910. var overlay struct {
  911. *T
  912. Data *xsdBase64Binary `xml:"Data,omitempty"`
  913. LastModified *xsdDateTime `xml:"LastModified"`
  914. }
  915. overlay.T = (*T)(t)
  916. overlay.Data = (*xsdBase64Binary)(&overlay.T.Data)
  917. overlay.LastModified = (*xsdDateTime)(&overlay.T.LastModified)
  918. return d.DecodeElement(&overlay, &start)
  919. }
  920. type Grant struct {
  921. Grantee Grantee `xml:"Grantee"`
  922. Permission Permission `xml:"Permission"`
  923. }
  924. type Group struct {
  925. URI string `xml:"URI"`
  926. }
  927. type ListAllMyBuckets struct {
  928. AWSAccessKeyId string `xml:"AWSAccessKeyId,omitempty"`
  929. Timestamp time.Time `xml:"Timestamp,omitempty"`
  930. Signature string `xml:"Signature,omitempty"`
  931. }
  932. func (t *ListAllMyBuckets) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  933. type T ListAllMyBuckets
  934. var layout struct {
  935. *T
  936. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  937. }
  938. layout.T = (*T)(t)
  939. layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp)
  940. return e.EncodeElement(layout, start)
  941. }
  942. func (t *ListAllMyBuckets) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  943. type T ListAllMyBuckets
  944. var overlay struct {
  945. *T
  946. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  947. }
  948. overlay.T = (*T)(t)
  949. overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp)
  950. return d.DecodeElement(&overlay, &start)
  951. }
  952. type ListAllMyBucketsEntry struct {
  953. Name string `xml:"Name"`
  954. CreationDate time.Time `xml:"CreationDate"`
  955. }
  956. func (t *ListAllMyBucketsEntry) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  957. type T ListAllMyBucketsEntry
  958. var layout struct {
  959. *T
  960. CreationDate *xsdDateTime `xml:"CreationDate"`
  961. }
  962. layout.T = (*T)(t)
  963. layout.CreationDate = (*xsdDateTime)(&layout.T.CreationDate)
  964. return e.EncodeElement(layout, start)
  965. }
  966. func (t *ListAllMyBucketsEntry) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  967. type T ListAllMyBucketsEntry
  968. var overlay struct {
  969. *T
  970. CreationDate *xsdDateTime `xml:"CreationDate"`
  971. }
  972. overlay.T = (*T)(t)
  973. overlay.CreationDate = (*xsdDateTime)(&overlay.T.CreationDate)
  974. return d.DecodeElement(&overlay, &start)
  975. }
  976. type ListAllMyBucketsList struct {
  977. Bucket []ListAllMyBucketsEntry `xml:"Bucket,omitempty"`
  978. }
  979. type ListAllMyBucketsResponse struct {
  980. ListAllMyBucketsResponse ListAllMyBucketsResult `xml:"ListAllMyBucketsResponse"`
  981. }
  982. type ListAllMyBucketsResult struct {
  983. Owner CanonicalUser `xml:"Owner"`
  984. Buckets ListAllMyBucketsList `xml:"Buckets"`
  985. }
  986. type ListBucket struct {
  987. Bucket string `xml:"Bucket"`
  988. Prefix string `xml:"Prefix,omitempty"`
  989. Marker string `xml:"Marker,omitempty"`
  990. MaxKeys int `xml:"MaxKeys,omitempty"`
  991. Delimiter string `xml:"Delimiter,omitempty"`
  992. AWSAccessKeyId string `xml:"AWSAccessKeyId,omitempty"`
  993. Timestamp time.Time `xml:"Timestamp,omitempty"`
  994. Signature string `xml:"Signature,omitempty"`
  995. Credential string `xml:"Credential,omitempty"`
  996. }
  997. func (t *ListBucket) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  998. type T ListBucket
  999. var layout struct {
  1000. *T
  1001. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  1002. }
  1003. layout.T = (*T)(t)
  1004. layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp)
  1005. return e.EncodeElement(layout, start)
  1006. }
  1007. func (t *ListBucket) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  1008. type T ListBucket
  1009. var overlay struct {
  1010. *T
  1011. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  1012. }
  1013. overlay.T = (*T)(t)
  1014. overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp)
  1015. return d.DecodeElement(&overlay, &start)
  1016. }
  1017. type ListBucketResponse struct {
  1018. ListBucketResponse ListBucketResult `xml:"ListBucketResponse"`
  1019. }
  1020. type ListBucketResult struct {
  1021. Metadata []MetadataEntry `xml:"Metadata,omitempty"`
  1022. Name string `xml:"Name"`
  1023. Prefix string `xml:"Prefix"`
  1024. Marker string `xml:"Marker"`
  1025. NextMarker string `xml:"NextMarker,omitempty"`
  1026. MaxKeys int `xml:"MaxKeys"`
  1027. Delimiter string `xml:"Delimiter,omitempty"`
  1028. IsTruncated bool `xml:"IsTruncated"`
  1029. Contents []ListEntry `xml:"Contents,omitempty"`
  1030. CommonPrefixes []PrefixEntry `xml:"CommonPrefixes,omitempty"`
  1031. EncodingType string `xml:"EncodingType"`
  1032. }
  1033. type ListEntry struct {
  1034. Key string `xml:"Key"`
  1035. LastModified time.Time `xml:"LastModified"`
  1036. ETag string `xml:"ETag"`
  1037. Size int64 `xml:"Size"`
  1038. Owner CanonicalUser `xml:"Owner,omitempty"`
  1039. StorageClass StorageClass `xml:"StorageClass"`
  1040. }
  1041. func (t *ListEntry) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  1042. type T ListEntry
  1043. var layout struct {
  1044. *T
  1045. LastModified *xsdDateTime `xml:"LastModified"`
  1046. }
  1047. layout.T = (*T)(t)
  1048. layout.LastModified = (*xsdDateTime)(&layout.T.LastModified)
  1049. return e.EncodeElement(layout, start)
  1050. }
  1051. func (t *ListEntry) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  1052. type T ListEntry
  1053. var overlay struct {
  1054. *T
  1055. LastModified *xsdDateTime `xml:"LastModified"`
  1056. }
  1057. overlay.T = (*T)(t)
  1058. overlay.LastModified = (*xsdDateTime)(&overlay.T.LastModified)
  1059. return d.DecodeElement(&overlay, &start)
  1060. }
  1061. type ListVersionsResponse struct {
  1062. ListVersionsResponse ListVersionsResult `xml:"ListVersionsResponse"`
  1063. }
  1064. type ListVersionsResult struct {
  1065. Metadata []MetadataEntry `xml:"Metadata,omitempty"`
  1066. Name string `xml:"Name"`
  1067. Prefix string `xml:"Prefix"`
  1068. KeyMarker string `xml:"KeyMarker"`
  1069. VersionIdMarker string `xml:"VersionIdMarker"`
  1070. NextKeyMarker string `xml:"NextKeyMarker,omitempty"`
  1071. NextVersionIdMarker string `xml:"NextVersionIdMarker,omitempty"`
  1072. MaxKeys int `xml:"MaxKeys"`
  1073. Delimiter string `xml:"Delimiter,omitempty"`
  1074. IsTruncated bool `xml:"IsTruncated"`
  1075. Version VersionEntry `xml:"Version,omitempty"`
  1076. DeleteMarker DeleteMarkerEntry `xml:"DeleteMarker,omitempty"`
  1077. CommonPrefixes []PrefixEntry `xml:"CommonPrefixes,omitempty"`
  1078. }
  1079. type LoggingSettings struct {
  1080. TargetBucket string `xml:"TargetBucket"`
  1081. TargetPrefix string `xml:"TargetPrefix"`
  1082. TargetGrants AccessControlList `xml:"TargetGrants,omitempty"`
  1083. }
  1084. // May be one of COPY, REPLACE
  1085. type MetadataDirective string
  1086. type MetadataEntry struct {
  1087. Name string `xml:"Name"`
  1088. Value string `xml:"Value"`
  1089. }
  1090. // May be one of Enabled, Disabled
  1091. type MfaDeleteStatus string
  1092. type NotificationConfiguration struct {
  1093. TopicConfiguration []TopicConfiguration `xml:"TopicConfiguration,omitempty"`
  1094. }
  1095. // May be one of BucketOwner, Requester
  1096. type Payer string
  1097. // May be one of READ, WRITE, READ_ACP, WRITE_ACP, FULL_CONTROL
  1098. type Permission string
  1099. type PostResponse struct {
  1100. Location string `xml:"Location"`
  1101. Bucket string `xml:"Bucket"`
  1102. Key string `xml:"Key"`
  1103. ETag string `xml:"ETag"`
  1104. }
  1105. type PrefixEntry struct {
  1106. Prefix string `xml:"Prefix"`
  1107. }
  1108. type PutObject struct {
  1109. Bucket string `xml:"Bucket"`
  1110. Key string `xml:"Key"`
  1111. Metadata []MetadataEntry `xml:"Metadata,omitempty"`
  1112. ContentLength int64 `xml:"ContentLength"`
  1113. AccessControlList AccessControlList `xml:"AccessControlList,omitempty"`
  1114. StorageClass StorageClass `xml:"StorageClass,omitempty"`
  1115. AWSAccessKeyId string `xml:"AWSAccessKeyId,omitempty"`
  1116. Timestamp time.Time `xml:"Timestamp,omitempty"`
  1117. Signature string `xml:"Signature,omitempty"`
  1118. Credential string `xml:"Credential,omitempty"`
  1119. }
  1120. func (t *PutObject) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  1121. type T PutObject
  1122. var layout struct {
  1123. *T
  1124. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  1125. }
  1126. layout.T = (*T)(t)
  1127. layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp)
  1128. return e.EncodeElement(layout, start)
  1129. }
  1130. func (t *PutObject) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  1131. type T PutObject
  1132. var overlay struct {
  1133. *T
  1134. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  1135. }
  1136. overlay.T = (*T)(t)
  1137. overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp)
  1138. return d.DecodeElement(&overlay, &start)
  1139. }
  1140. type PutObjectInline struct {
  1141. Bucket string `xml:"Bucket"`
  1142. Key string `xml:"Key"`
  1143. Metadata []MetadataEntry `xml:"Metadata,omitempty"`
  1144. Data []byte `xml:"Data"`
  1145. ContentLength int64 `xml:"ContentLength"`
  1146. AccessControlList AccessControlList `xml:"AccessControlList,omitempty"`
  1147. StorageClass StorageClass `xml:"StorageClass,omitempty"`
  1148. AWSAccessKeyId string `xml:"AWSAccessKeyId,omitempty"`
  1149. Timestamp time.Time `xml:"Timestamp,omitempty"`
  1150. Signature string `xml:"Signature,omitempty"`
  1151. Credential string `xml:"Credential,omitempty"`
  1152. }
  1153. func (t *PutObjectInline) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  1154. type T PutObjectInline
  1155. var layout struct {
  1156. *T
  1157. Data *xsdBase64Binary `xml:"Data"`
  1158. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  1159. }
  1160. layout.T = (*T)(t)
  1161. layout.Data = (*xsdBase64Binary)(&layout.T.Data)
  1162. layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp)
  1163. return e.EncodeElement(layout, start)
  1164. }
  1165. func (t *PutObjectInline) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  1166. type T PutObjectInline
  1167. var overlay struct {
  1168. *T
  1169. Data *xsdBase64Binary `xml:"Data"`
  1170. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  1171. }
  1172. overlay.T = (*T)(t)
  1173. overlay.Data = (*xsdBase64Binary)(&overlay.T.Data)
  1174. overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp)
  1175. return d.DecodeElement(&overlay, &start)
  1176. }
  1177. type PutObjectInlineResponse struct {
  1178. PutObjectInlineResponse PutObjectResult `xml:"PutObjectInlineResponse"`
  1179. }
  1180. type PutObjectResponse struct {
  1181. PutObjectResponse PutObjectResult `xml:"PutObjectResponse"`
  1182. }
  1183. type PutObjectResult struct {
  1184. ETag string `xml:"ETag"`
  1185. LastModified time.Time `xml:"LastModified"`
  1186. }
  1187. func (t *PutObjectResult) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  1188. type T PutObjectResult
  1189. var layout struct {
  1190. *T
  1191. LastModified *xsdDateTime `xml:"LastModified"`
  1192. }
  1193. layout.T = (*T)(t)
  1194. layout.LastModified = (*xsdDateTime)(&layout.T.LastModified)
  1195. return e.EncodeElement(layout, start)
  1196. }
  1197. func (t *PutObjectResult) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  1198. type T PutObjectResult
  1199. var overlay struct {
  1200. *T
  1201. LastModified *xsdDateTime `xml:"LastModified"`
  1202. }
  1203. overlay.T = (*T)(t)
  1204. overlay.LastModified = (*xsdDateTime)(&overlay.T.LastModified)
  1205. return d.DecodeElement(&overlay, &start)
  1206. }
  1207. type RequestPaymentConfiguration struct {
  1208. Payer Payer `xml:"Payer"`
  1209. }
  1210. type Result struct {
  1211. Status Status `xml:"Status"`
  1212. }
  1213. type SetBucketAccessControlPolicy struct {
  1214. Bucket string `xml:"Bucket"`
  1215. AccessControlList AccessControlList `xml:"AccessControlList,omitempty"`
  1216. AWSAccessKeyId string `xml:"AWSAccessKeyId,omitempty"`
  1217. Timestamp time.Time `xml:"Timestamp,omitempty"`
  1218. Signature string `xml:"Signature,omitempty"`
  1219. Credential string `xml:"Credential,omitempty"`
  1220. }
  1221. func (t *SetBucketAccessControlPolicy) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  1222. type T SetBucketAccessControlPolicy
  1223. var layout struct {
  1224. *T
  1225. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  1226. }
  1227. layout.T = (*T)(t)
  1228. layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp)
  1229. return e.EncodeElement(layout, start)
  1230. }
  1231. func (t *SetBucketAccessControlPolicy) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  1232. type T SetBucketAccessControlPolicy
  1233. var overlay struct {
  1234. *T
  1235. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  1236. }
  1237. overlay.T = (*T)(t)
  1238. overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp)
  1239. return d.DecodeElement(&overlay, &start)
  1240. }
  1241. type SetBucketAccessControlPolicyResponse struct {
  1242. }
  1243. type SetBucketLoggingStatus struct {
  1244. Bucket string `xml:"Bucket"`
  1245. AWSAccessKeyId string `xml:"AWSAccessKeyId,omitempty"`
  1246. Timestamp time.Time `xml:"Timestamp,omitempty"`
  1247. Signature string `xml:"Signature,omitempty"`
  1248. Credential string `xml:"Credential,omitempty"`
  1249. BucketLoggingStatus BucketLoggingStatus `xml:"BucketLoggingStatus"`
  1250. }
  1251. func (t *SetBucketLoggingStatus) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  1252. type T SetBucketLoggingStatus
  1253. var layout struct {
  1254. *T
  1255. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  1256. }
  1257. layout.T = (*T)(t)
  1258. layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp)
  1259. return e.EncodeElement(layout, start)
  1260. }
  1261. func (t *SetBucketLoggingStatus) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  1262. type T SetBucketLoggingStatus
  1263. var overlay struct {
  1264. *T
  1265. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  1266. }
  1267. overlay.T = (*T)(t)
  1268. overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp)
  1269. return d.DecodeElement(&overlay, &start)
  1270. }
  1271. type SetBucketLoggingStatusResponse struct {
  1272. }
  1273. type SetObjectAccessControlPolicy struct {
  1274. Bucket string `xml:"Bucket"`
  1275. Key string `xml:"Key"`
  1276. AccessControlList AccessControlList `xml:"AccessControlList"`
  1277. AWSAccessKeyId string `xml:"AWSAccessKeyId,omitempty"`
  1278. Timestamp time.Time `xml:"Timestamp,omitempty"`
  1279. Signature string `xml:"Signature,omitempty"`
  1280. Credential string `xml:"Credential,omitempty"`
  1281. }
  1282. func (t *SetObjectAccessControlPolicy) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  1283. type T SetObjectAccessControlPolicy
  1284. var layout struct {
  1285. *T
  1286. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  1287. }
  1288. layout.T = (*T)(t)
  1289. layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp)
  1290. return e.EncodeElement(layout, start)
  1291. }
  1292. func (t *SetObjectAccessControlPolicy) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  1293. type T SetObjectAccessControlPolicy
  1294. var overlay struct {
  1295. *T
  1296. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  1297. }
  1298. overlay.T = (*T)(t)
  1299. overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp)
  1300. return d.DecodeElement(&overlay, &start)
  1301. }
  1302. type SetObjectAccessControlPolicyResponse struct {
  1303. }
  1304. type Status struct {
  1305. Code int `xml:"Code"`
  1306. Description string `xml:"Description"`
  1307. }
  1308. // May be one of STANDARD, REDUCED_REDUNDANCY, GLACIER, UNKNOWN
  1309. type StorageClass string
  1310. type TopicConfiguration struct {
  1311. Topic string `xml:"Topic"`
  1312. Event []string `xml:"Event"`
  1313. }
  1314. type User struct {
  1315. }
  1316. type VersionEntry struct {
  1317. Key string `xml:"Key"`
  1318. VersionId string `xml:"VersionId"`
  1319. IsLatest bool `xml:"IsLatest"`
  1320. LastModified time.Time `xml:"LastModified"`
  1321. ETag string `xml:"ETag"`
  1322. Size int64 `xml:"Size"`
  1323. Owner CanonicalUser `xml:"Owner,omitempty"`
  1324. StorageClass StorageClass `xml:"StorageClass"`
  1325. }
  1326. func (t *VersionEntry) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  1327. type T VersionEntry
  1328. var layout struct {
  1329. *T
  1330. LastModified *xsdDateTime `xml:"LastModified"`
  1331. }
  1332. layout.T = (*T)(t)
  1333. layout.LastModified = (*xsdDateTime)(&layout.T.LastModified)
  1334. return e.EncodeElement(layout, start)
  1335. }
  1336. func (t *VersionEntry) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  1337. type T VersionEntry
  1338. var overlay struct {
  1339. *T
  1340. LastModified *xsdDateTime `xml:"LastModified"`
  1341. }
  1342. overlay.T = (*T)(t)
  1343. overlay.LastModified = (*xsdDateTime)(&overlay.T.LastModified)
  1344. return d.DecodeElement(&overlay, &start)
  1345. }
  1346. type VersioningConfiguration struct {
  1347. Status VersioningStatus `xml:"Status,omitempty"`
  1348. MfaDelete MfaDeleteStatus `xml:"MfaDelete,omitempty"`
  1349. }
  1350. // May be one of Enabled, Suspended
  1351. type VersioningStatus string
  1352. type xsdBase64Binary []byte
  1353. func (b *xsdBase64Binary) UnmarshalText(text []byte) (err error) {
  1354. *b, err = base64.StdEncoding.DecodeString(string(text))
  1355. return
  1356. }
  1357. func (b xsdBase64Binary) MarshalText() ([]byte, error) {
  1358. var buf bytes.Buffer
  1359. enc := base64.NewEncoder(base64.StdEncoding, &buf)
  1360. enc.Write([]byte(b))
  1361. enc.Close()
  1362. return buf.Bytes(), nil
  1363. }
  1364. type xsdDateTime time.Time
  1365. func (t *xsdDateTime) UnmarshalText(text []byte) error {
  1366. return _unmarshalTime(text, (*time.Time)(t), "2006-01-02T15:04:05.999999999")
  1367. }
  1368. func (t xsdDateTime) MarshalText() ([]byte, error) {
  1369. return _marshalTime((time.Time)(t), "2006-01-02T15:04:05.999999999")
  1370. }
  1371. func (t xsdDateTime) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  1372. if (time.Time)(t).IsZero() {
  1373. return nil
  1374. }
  1375. m, err := t.MarshalText()
  1376. if err != nil {
  1377. return err
  1378. }
  1379. return e.EncodeElement(m, start)
  1380. }
  1381. func (t xsdDateTime) MarshalXMLAttr(name xml.Name) (xml.Attr, error) {
  1382. if (time.Time)(t).IsZero() {
  1383. return xml.Attr{}, nil
  1384. }
  1385. m, err := t.MarshalText()
  1386. return xml.Attr{Name: name, Value: string(m)}, err
  1387. }
  1388. func _unmarshalTime(text []byte, t *time.Time, format string) (err error) {
  1389. s := string(bytes.TrimSpace(text))
  1390. *t, err = time.Parse(format, s)
  1391. if _, ok := err.(*time.ParseError); ok {
  1392. *t, err = time.Parse(format+"Z07:00", s)
  1393. }
  1394. return err
  1395. }
  1396. func _marshalTime(t time.Time, format string) ([]byte, error) {
  1397. return []byte(t.Format(format + "Z07:00")), nil
  1398. }