s3api_xsd_generated.go 51 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540
  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. }
  517. type CopyObject struct {
  518. SourceBucket string `xml:"SourceBucket"`
  519. SourceKey string `xml:"SourceKey"`
  520. DestinationBucket string `xml:"DestinationBucket"`
  521. DestinationKey string `xml:"DestinationKey"`
  522. MetadataDirective MetadataDirective `xml:"MetadataDirective,omitempty"`
  523. Metadata []MetadataEntry `xml:"Metadata,omitempty"`
  524. AccessControlList AccessControlList `xml:"AccessControlList,omitempty"`
  525. CopySourceIfModifiedSince time.Time `xml:"CopySourceIfModifiedSince,omitempty"`
  526. CopySourceIfUnmodifiedSince time.Time `xml:"CopySourceIfUnmodifiedSince,omitempty"`
  527. CopySourceIfMatch []string `xml:"CopySourceIfMatch,omitempty"`
  528. CopySourceIfNoneMatch []string `xml:"CopySourceIfNoneMatch,omitempty"`
  529. StorageClass StorageClass `xml:"StorageClass,omitempty"`
  530. AWSAccessKeyId string `xml:"AWSAccessKeyId,omitempty"`
  531. Timestamp time.Time `xml:"Timestamp,omitempty"`
  532. Signature string `xml:"Signature,omitempty"`
  533. Credential string `xml:"Credential,omitempty"`
  534. }
  535. func (t *CopyObject) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  536. type T CopyObject
  537. var layout struct {
  538. *T
  539. CopySourceIfModifiedSince *xsdDateTime `xml:"CopySourceIfModifiedSince,omitempty"`
  540. CopySourceIfUnmodifiedSince *xsdDateTime `xml:"CopySourceIfUnmodifiedSince,omitempty"`
  541. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  542. }
  543. layout.T = (*T)(t)
  544. layout.CopySourceIfModifiedSince = (*xsdDateTime)(&layout.T.CopySourceIfModifiedSince)
  545. layout.CopySourceIfUnmodifiedSince = (*xsdDateTime)(&layout.T.CopySourceIfUnmodifiedSince)
  546. layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp)
  547. return e.EncodeElement(layout, start)
  548. }
  549. func (t *CopyObject) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  550. type T CopyObject
  551. var overlay struct {
  552. *T
  553. CopySourceIfModifiedSince *xsdDateTime `xml:"CopySourceIfModifiedSince,omitempty"`
  554. CopySourceIfUnmodifiedSince *xsdDateTime `xml:"CopySourceIfUnmodifiedSince,omitempty"`
  555. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  556. }
  557. overlay.T = (*T)(t)
  558. overlay.CopySourceIfModifiedSince = (*xsdDateTime)(&overlay.T.CopySourceIfModifiedSince)
  559. overlay.CopySourceIfUnmodifiedSince = (*xsdDateTime)(&overlay.T.CopySourceIfUnmodifiedSince)
  560. overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp)
  561. return d.DecodeElement(&overlay, &start)
  562. }
  563. type CopyObjectResponse struct {
  564. CopyObjectResult CopyObjectResult `xml:"CopyObjectResult"`
  565. }
  566. type CopyObjectResult struct {
  567. LastModified time.Time `xml:"LastModified"`
  568. ETag string `xml:"ETag"`
  569. }
  570. func (t *CopyObjectResult) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  571. type T CopyObjectResult
  572. var layout struct {
  573. *T
  574. LastModified *xsdDateTime `xml:"LastModified"`
  575. }
  576. layout.T = (*T)(t)
  577. layout.LastModified = (*xsdDateTime)(&layout.T.LastModified)
  578. return e.EncodeElement(layout, start)
  579. }
  580. func (t *CopyObjectResult) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  581. type T CopyObjectResult
  582. var overlay struct {
  583. *T
  584. LastModified *xsdDateTime `xml:"LastModified"`
  585. }
  586. overlay.T = (*T)(t)
  587. overlay.LastModified = (*xsdDateTime)(&overlay.T.LastModified)
  588. return d.DecodeElement(&overlay, &start)
  589. }
  590. type CreateBucket struct {
  591. Bucket string `xml:"Bucket"`
  592. AccessControlList AccessControlList `xml:"AccessControlList,omitempty"`
  593. AWSAccessKeyId string `xml:"AWSAccessKeyId,omitempty"`
  594. Timestamp time.Time `xml:"Timestamp,omitempty"`
  595. Signature string `xml:"Signature,omitempty"`
  596. }
  597. func (t *CreateBucket) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  598. type T CreateBucket
  599. var layout struct {
  600. *T
  601. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  602. }
  603. layout.T = (*T)(t)
  604. layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp)
  605. return e.EncodeElement(layout, start)
  606. }
  607. func (t *CreateBucket) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  608. type T CreateBucket
  609. var overlay struct {
  610. *T
  611. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  612. }
  613. overlay.T = (*T)(t)
  614. overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp)
  615. return d.DecodeElement(&overlay, &start)
  616. }
  617. type CreateBucketConfiguration struct {
  618. LocationConstraint string `xml:"LocationConstraint"`
  619. }
  620. type CreateBucketResponse struct {
  621. CreateBucketReturn CreateBucketResult `xml:"CreateBucketReturn"`
  622. }
  623. type CreateBucketResult struct {
  624. BucketName string `xml:"BucketName"`
  625. }
  626. type DeleteBucket struct {
  627. Bucket string `xml:"Bucket"`
  628. AWSAccessKeyId string `xml:"AWSAccessKeyId,omitempty"`
  629. Timestamp time.Time `xml:"Timestamp,omitempty"`
  630. Signature string `xml:"Signature,omitempty"`
  631. Credential string `xml:"Credential,omitempty"`
  632. }
  633. func (t *DeleteBucket) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  634. type T DeleteBucket
  635. var layout struct {
  636. *T
  637. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  638. }
  639. layout.T = (*T)(t)
  640. layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp)
  641. return e.EncodeElement(layout, start)
  642. }
  643. func (t *DeleteBucket) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  644. type T DeleteBucket
  645. var overlay struct {
  646. *T
  647. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  648. }
  649. overlay.T = (*T)(t)
  650. overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp)
  651. return d.DecodeElement(&overlay, &start)
  652. }
  653. type DeleteBucketResponse struct {
  654. DeleteBucketResponse Status `xml:"DeleteBucketResponse"`
  655. }
  656. type DeleteMarkerEntry struct {
  657. Key string `xml:"Key"`
  658. VersionId string `xml:"VersionId"`
  659. IsLatest bool `xml:"IsLatest"`
  660. LastModified time.Time `xml:"LastModified"`
  661. Owner CanonicalUser `xml:"Owner,omitempty"`
  662. }
  663. func (t *DeleteMarkerEntry) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  664. type T DeleteMarkerEntry
  665. var layout struct {
  666. *T
  667. LastModified *xsdDateTime `xml:"LastModified"`
  668. }
  669. layout.T = (*T)(t)
  670. layout.LastModified = (*xsdDateTime)(&layout.T.LastModified)
  671. return e.EncodeElement(layout, start)
  672. }
  673. func (t *DeleteMarkerEntry) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  674. type T DeleteMarkerEntry
  675. var overlay struct {
  676. *T
  677. LastModified *xsdDateTime `xml:"LastModified"`
  678. }
  679. overlay.T = (*T)(t)
  680. overlay.LastModified = (*xsdDateTime)(&overlay.T.LastModified)
  681. return d.DecodeElement(&overlay, &start)
  682. }
  683. type DeleteObject struct {
  684. Bucket string `xml:"Bucket"`
  685. Key string `xml:"Key"`
  686. AWSAccessKeyId string `xml:"AWSAccessKeyId,omitempty"`
  687. Timestamp time.Time `xml:"Timestamp,omitempty"`
  688. Signature string `xml:"Signature,omitempty"`
  689. Credential string `xml:"Credential,omitempty"`
  690. }
  691. func (t *DeleteObject) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  692. type T DeleteObject
  693. var layout struct {
  694. *T
  695. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  696. }
  697. layout.T = (*T)(t)
  698. layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp)
  699. return e.EncodeElement(layout, start)
  700. }
  701. func (t *DeleteObject) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  702. type T DeleteObject
  703. var overlay struct {
  704. *T
  705. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  706. }
  707. overlay.T = (*T)(t)
  708. overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp)
  709. return d.DecodeElement(&overlay, &start)
  710. }
  711. type DeleteObjectResponse struct {
  712. DeleteObjectResponse Status `xml:"DeleteObjectResponse"`
  713. }
  714. type GetBucketAccessControlPolicy struct {
  715. Bucket string `xml:"Bucket"`
  716. AWSAccessKeyId string `xml:"AWSAccessKeyId,omitempty"`
  717. Timestamp time.Time `xml:"Timestamp,omitempty"`
  718. Signature string `xml:"Signature,omitempty"`
  719. Credential string `xml:"Credential,omitempty"`
  720. }
  721. func (t *GetBucketAccessControlPolicy) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  722. type T GetBucketAccessControlPolicy
  723. var layout struct {
  724. *T
  725. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  726. }
  727. layout.T = (*T)(t)
  728. layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp)
  729. return e.EncodeElement(layout, start)
  730. }
  731. func (t *GetBucketAccessControlPolicy) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  732. type T GetBucketAccessControlPolicy
  733. var overlay struct {
  734. *T
  735. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  736. }
  737. overlay.T = (*T)(t)
  738. overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp)
  739. return d.DecodeElement(&overlay, &start)
  740. }
  741. type GetBucketAccessControlPolicyResponse struct {
  742. GetBucketAccessControlPolicyResponse AccessControlPolicy `xml:"GetBucketAccessControlPolicyResponse"`
  743. }
  744. type GetBucketLoggingStatus struct {
  745. Bucket string `xml:"Bucket"`
  746. AWSAccessKeyId string `xml:"AWSAccessKeyId,omitempty"`
  747. Timestamp time.Time `xml:"Timestamp,omitempty"`
  748. Signature string `xml:"Signature,omitempty"`
  749. Credential string `xml:"Credential,omitempty"`
  750. }
  751. func (t *GetBucketLoggingStatus) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  752. type T GetBucketLoggingStatus
  753. var layout struct {
  754. *T
  755. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  756. }
  757. layout.T = (*T)(t)
  758. layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp)
  759. return e.EncodeElement(layout, start)
  760. }
  761. func (t *GetBucketLoggingStatus) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  762. type T GetBucketLoggingStatus
  763. var overlay struct {
  764. *T
  765. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  766. }
  767. overlay.T = (*T)(t)
  768. overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp)
  769. return d.DecodeElement(&overlay, &start)
  770. }
  771. type GetBucketLoggingStatusResponse struct {
  772. GetBucketLoggingStatusResponse BucketLoggingStatus `xml:"GetBucketLoggingStatusResponse"`
  773. }
  774. type GetObject struct {
  775. Bucket string `xml:"Bucket"`
  776. Key string `xml:"Key"`
  777. GetMetadata bool `xml:"GetMetadata"`
  778. GetData bool `xml:"GetData"`
  779. InlineData bool `xml:"InlineData"`
  780. AWSAccessKeyId string `xml:"AWSAccessKeyId,omitempty"`
  781. Timestamp time.Time `xml:"Timestamp,omitempty"`
  782. Signature string `xml:"Signature,omitempty"`
  783. Credential string `xml:"Credential,omitempty"`
  784. }
  785. func (t *GetObject) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  786. type T GetObject
  787. var layout struct {
  788. *T
  789. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  790. }
  791. layout.T = (*T)(t)
  792. layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp)
  793. return e.EncodeElement(layout, start)
  794. }
  795. func (t *GetObject) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  796. type T GetObject
  797. var overlay struct {
  798. *T
  799. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  800. }
  801. overlay.T = (*T)(t)
  802. overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp)
  803. return d.DecodeElement(&overlay, &start)
  804. }
  805. type GetObjectAccessControlPolicy struct {
  806. Bucket string `xml:"Bucket"`
  807. Key string `xml:"Key"`
  808. AWSAccessKeyId string `xml:"AWSAccessKeyId,omitempty"`
  809. Timestamp time.Time `xml:"Timestamp,omitempty"`
  810. Signature string `xml:"Signature,omitempty"`
  811. Credential string `xml:"Credential,omitempty"`
  812. }
  813. func (t *GetObjectAccessControlPolicy) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  814. type T GetObjectAccessControlPolicy
  815. var layout struct {
  816. *T
  817. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  818. }
  819. layout.T = (*T)(t)
  820. layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp)
  821. return e.EncodeElement(layout, start)
  822. }
  823. func (t *GetObjectAccessControlPolicy) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  824. type T GetObjectAccessControlPolicy
  825. var overlay struct {
  826. *T
  827. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  828. }
  829. overlay.T = (*T)(t)
  830. overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp)
  831. return d.DecodeElement(&overlay, &start)
  832. }
  833. type GetObjectAccessControlPolicyResponse struct {
  834. GetObjectAccessControlPolicyResponse AccessControlPolicy `xml:"GetObjectAccessControlPolicyResponse"`
  835. }
  836. type GetObjectExtended struct {
  837. Bucket string `xml:"Bucket"`
  838. Key string `xml:"Key"`
  839. GetMetadata bool `xml:"GetMetadata"`
  840. GetData bool `xml:"GetData"`
  841. InlineData bool `xml:"InlineData"`
  842. ByteRangeStart int64 `xml:"ByteRangeStart,omitempty"`
  843. ByteRangeEnd int64 `xml:"ByteRangeEnd,omitempty"`
  844. IfModifiedSince time.Time `xml:"IfModifiedSince,omitempty"`
  845. IfUnmodifiedSince time.Time `xml:"IfUnmodifiedSince,omitempty"`
  846. IfMatch []string `xml:"IfMatch,omitempty"`
  847. IfNoneMatch []string `xml:"IfNoneMatch,omitempty"`
  848. ReturnCompleteObjectOnConditionFailure bool `xml:"ReturnCompleteObjectOnConditionFailure,omitempty"`
  849. AWSAccessKeyId string `xml:"AWSAccessKeyId,omitempty"`
  850. Timestamp time.Time `xml:"Timestamp,omitempty"`
  851. Signature string `xml:"Signature,omitempty"`
  852. Credential string `xml:"Credential,omitempty"`
  853. }
  854. func (t *GetObjectExtended) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  855. type T GetObjectExtended
  856. var layout struct {
  857. *T
  858. IfModifiedSince *xsdDateTime `xml:"IfModifiedSince,omitempty"`
  859. IfUnmodifiedSince *xsdDateTime `xml:"IfUnmodifiedSince,omitempty"`
  860. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  861. }
  862. layout.T = (*T)(t)
  863. layout.IfModifiedSince = (*xsdDateTime)(&layout.T.IfModifiedSince)
  864. layout.IfUnmodifiedSince = (*xsdDateTime)(&layout.T.IfUnmodifiedSince)
  865. layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp)
  866. return e.EncodeElement(layout, start)
  867. }
  868. func (t *GetObjectExtended) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  869. type T GetObjectExtended
  870. var overlay struct {
  871. *T
  872. IfModifiedSince *xsdDateTime `xml:"IfModifiedSince,omitempty"`
  873. IfUnmodifiedSince *xsdDateTime `xml:"IfUnmodifiedSince,omitempty"`
  874. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  875. }
  876. overlay.T = (*T)(t)
  877. overlay.IfModifiedSince = (*xsdDateTime)(&overlay.T.IfModifiedSince)
  878. overlay.IfUnmodifiedSince = (*xsdDateTime)(&overlay.T.IfUnmodifiedSince)
  879. overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp)
  880. return d.DecodeElement(&overlay, &start)
  881. }
  882. type GetObjectExtendedResponse struct {
  883. GetObjectResponse GetObjectResult `xml:"GetObjectResponse"`
  884. }
  885. type GetObjectResponse struct {
  886. GetObjectResponse GetObjectResult `xml:"GetObjectResponse"`
  887. }
  888. type GetObjectResult struct {
  889. Status Status `xml:"Status"`
  890. Metadata []MetadataEntry `xml:"Metadata,omitempty"`
  891. Data []byte `xml:"Data,omitempty"`
  892. LastModified time.Time `xml:"LastModified"`
  893. ETag string `xml:"ETag"`
  894. }
  895. func (t *GetObjectResult) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  896. type T GetObjectResult
  897. var layout struct {
  898. *T
  899. Data *xsdBase64Binary `xml:"Data,omitempty"`
  900. LastModified *xsdDateTime `xml:"LastModified"`
  901. }
  902. layout.T = (*T)(t)
  903. layout.Data = (*xsdBase64Binary)(&layout.T.Data)
  904. layout.LastModified = (*xsdDateTime)(&layout.T.LastModified)
  905. return e.EncodeElement(layout, start)
  906. }
  907. func (t *GetObjectResult) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  908. type T GetObjectResult
  909. var overlay struct {
  910. *T
  911. Data *xsdBase64Binary `xml:"Data,omitempty"`
  912. LastModified *xsdDateTime `xml:"LastModified"`
  913. }
  914. overlay.T = (*T)(t)
  915. overlay.Data = (*xsdBase64Binary)(&overlay.T.Data)
  916. overlay.LastModified = (*xsdDateTime)(&overlay.T.LastModified)
  917. return d.DecodeElement(&overlay, &start)
  918. }
  919. type Grant struct {
  920. Grantee Grantee `xml:"Grantee"`
  921. Permission Permission `xml:"Permission"`
  922. }
  923. type Group struct {
  924. URI string `xml:"URI"`
  925. }
  926. type ListAllMyBuckets struct {
  927. AWSAccessKeyId string `xml:"AWSAccessKeyId,omitempty"`
  928. Timestamp time.Time `xml:"Timestamp,omitempty"`
  929. Signature string `xml:"Signature,omitempty"`
  930. }
  931. func (t *ListAllMyBuckets) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  932. type T ListAllMyBuckets
  933. var layout struct {
  934. *T
  935. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  936. }
  937. layout.T = (*T)(t)
  938. layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp)
  939. return e.EncodeElement(layout, start)
  940. }
  941. func (t *ListAllMyBuckets) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  942. type T ListAllMyBuckets
  943. var overlay struct {
  944. *T
  945. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  946. }
  947. overlay.T = (*T)(t)
  948. overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp)
  949. return d.DecodeElement(&overlay, &start)
  950. }
  951. type ListAllMyBucketsEntry struct {
  952. Name string `xml:"Name"`
  953. CreationDate time.Time `xml:"CreationDate"`
  954. }
  955. func (t *ListAllMyBucketsEntry) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  956. type T ListAllMyBucketsEntry
  957. var layout struct {
  958. *T
  959. CreationDate *xsdDateTime `xml:"CreationDate"`
  960. }
  961. layout.T = (*T)(t)
  962. layout.CreationDate = (*xsdDateTime)(&layout.T.CreationDate)
  963. return e.EncodeElement(layout, start)
  964. }
  965. func (t *ListAllMyBucketsEntry) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  966. type T ListAllMyBucketsEntry
  967. var overlay struct {
  968. *T
  969. CreationDate *xsdDateTime `xml:"CreationDate"`
  970. }
  971. overlay.T = (*T)(t)
  972. overlay.CreationDate = (*xsdDateTime)(&overlay.T.CreationDate)
  973. return d.DecodeElement(&overlay, &start)
  974. }
  975. type ListAllMyBucketsList struct {
  976. Bucket []ListAllMyBucketsEntry `xml:"Bucket,omitempty"`
  977. }
  978. type ListAllMyBucketsResponse struct {
  979. ListAllMyBucketsResponse ListAllMyBucketsResult `xml:"ListAllMyBucketsResponse"`
  980. }
  981. type ListAllMyBucketsResult struct {
  982. Owner CanonicalUser `xml:"Owner"`
  983. Buckets ListAllMyBucketsList `xml:"Buckets"`
  984. }
  985. type ListBucket struct {
  986. Bucket string `xml:"Bucket"`
  987. Prefix string `xml:"Prefix,omitempty"`
  988. Marker string `xml:"Marker,omitempty"`
  989. MaxKeys int `xml:"MaxKeys,omitempty"`
  990. Delimiter string `xml:"Delimiter,omitempty"`
  991. AWSAccessKeyId string `xml:"AWSAccessKeyId,omitempty"`
  992. Timestamp time.Time `xml:"Timestamp,omitempty"`
  993. Signature string `xml:"Signature,omitempty"`
  994. Credential string `xml:"Credential,omitempty"`
  995. }
  996. func (t *ListBucket) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  997. type T ListBucket
  998. var layout struct {
  999. *T
  1000. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  1001. }
  1002. layout.T = (*T)(t)
  1003. layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp)
  1004. return e.EncodeElement(layout, start)
  1005. }
  1006. func (t *ListBucket) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  1007. type T ListBucket
  1008. var overlay struct {
  1009. *T
  1010. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  1011. }
  1012. overlay.T = (*T)(t)
  1013. overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp)
  1014. return d.DecodeElement(&overlay, &start)
  1015. }
  1016. type ListBucketResponse struct {
  1017. ListBucketResponse ListBucketResult `xml:"ListBucketResponse"`
  1018. }
  1019. type ListBucketResult struct {
  1020. Metadata []MetadataEntry `xml:"Metadata,omitempty"`
  1021. Name string `xml:"Name"`
  1022. Prefix string `xml:"Prefix"`
  1023. Marker string `xml:"Marker"`
  1024. NextMarker string `xml:"NextMarker,omitempty"`
  1025. MaxKeys int `xml:"MaxKeys"`
  1026. Delimiter string `xml:"Delimiter,omitempty"`
  1027. IsTruncated bool `xml:"IsTruncated"`
  1028. Contents []ListEntry `xml:"Contents,omitempty"`
  1029. CommonPrefixes []PrefixEntry `xml:"CommonPrefixes,omitempty"`
  1030. EncodingType string `xml:"EncodingType"`
  1031. }
  1032. type ListEntry struct {
  1033. Key string `xml:"Key"`
  1034. LastModified time.Time `xml:"LastModified"`
  1035. ETag string `xml:"ETag"`
  1036. Size int64 `xml:"Size"`
  1037. Owner CanonicalUser `xml:"Owner,omitempty"`
  1038. StorageClass StorageClass `xml:"StorageClass"`
  1039. }
  1040. func (t *ListEntry) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  1041. type T ListEntry
  1042. var layout struct {
  1043. *T
  1044. LastModified *xsdDateTime `xml:"LastModified"`
  1045. }
  1046. layout.T = (*T)(t)
  1047. layout.LastModified = (*xsdDateTime)(&layout.T.LastModified)
  1048. return e.EncodeElement(layout, start)
  1049. }
  1050. func (t *ListEntry) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  1051. type T ListEntry
  1052. var overlay struct {
  1053. *T
  1054. LastModified *xsdDateTime `xml:"LastModified"`
  1055. }
  1056. overlay.T = (*T)(t)
  1057. overlay.LastModified = (*xsdDateTime)(&overlay.T.LastModified)
  1058. return d.DecodeElement(&overlay, &start)
  1059. }
  1060. type ListVersionsResponse struct {
  1061. ListVersionsResponse ListVersionsResult `xml:"ListVersionsResponse"`
  1062. }
  1063. type ListVersionsResult struct {
  1064. Metadata []MetadataEntry `xml:"Metadata,omitempty"`
  1065. Name string `xml:"Name"`
  1066. Prefix string `xml:"Prefix"`
  1067. KeyMarker string `xml:"KeyMarker"`
  1068. VersionIdMarker string `xml:"VersionIdMarker"`
  1069. NextKeyMarker string `xml:"NextKeyMarker,omitempty"`
  1070. NextVersionIdMarker string `xml:"NextVersionIdMarker,omitempty"`
  1071. MaxKeys int `xml:"MaxKeys"`
  1072. Delimiter string `xml:"Delimiter,omitempty"`
  1073. IsTruncated bool `xml:"IsTruncated"`
  1074. Version VersionEntry `xml:"Version,omitempty"`
  1075. DeleteMarker DeleteMarkerEntry `xml:"DeleteMarker,omitempty"`
  1076. CommonPrefixes []PrefixEntry `xml:"CommonPrefixes,omitempty"`
  1077. }
  1078. type LoggingSettings struct {
  1079. TargetBucket string `xml:"TargetBucket"`
  1080. TargetPrefix string `xml:"TargetPrefix"`
  1081. TargetGrants AccessControlList `xml:"TargetGrants,omitempty"`
  1082. }
  1083. // May be one of COPY, REPLACE
  1084. type MetadataDirective string
  1085. type MetadataEntry struct {
  1086. Name string `xml:"Name"`
  1087. Value string `xml:"Value"`
  1088. }
  1089. // May be one of Enabled, Disabled
  1090. type MfaDeleteStatus string
  1091. type NotificationConfiguration struct {
  1092. TopicConfiguration []TopicConfiguration `xml:"TopicConfiguration,omitempty"`
  1093. }
  1094. // May be one of BucketOwner, Requester
  1095. type Payer string
  1096. // May be one of READ, WRITE, READ_ACP, WRITE_ACP, FULL_CONTROL
  1097. type Permission string
  1098. type PostResponse struct {
  1099. Location string `xml:"Location"`
  1100. Bucket string `xml:"Bucket"`
  1101. Key string `xml:"Key"`
  1102. ETag string `xml:"ETag"`
  1103. }
  1104. type PrefixEntry struct {
  1105. Prefix string `xml:"Prefix"`
  1106. }
  1107. type PutObject struct {
  1108. Bucket string `xml:"Bucket"`
  1109. Key string `xml:"Key"`
  1110. Metadata []MetadataEntry `xml:"Metadata,omitempty"`
  1111. ContentLength int64 `xml:"ContentLength"`
  1112. AccessControlList AccessControlList `xml:"AccessControlList,omitempty"`
  1113. StorageClass StorageClass `xml:"StorageClass,omitempty"`
  1114. AWSAccessKeyId string `xml:"AWSAccessKeyId,omitempty"`
  1115. Timestamp time.Time `xml:"Timestamp,omitempty"`
  1116. Signature string `xml:"Signature,omitempty"`
  1117. Credential string `xml:"Credential,omitempty"`
  1118. }
  1119. func (t *PutObject) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  1120. type T PutObject
  1121. var layout struct {
  1122. *T
  1123. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  1124. }
  1125. layout.T = (*T)(t)
  1126. layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp)
  1127. return e.EncodeElement(layout, start)
  1128. }
  1129. func (t *PutObject) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  1130. type T PutObject
  1131. var overlay struct {
  1132. *T
  1133. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  1134. }
  1135. overlay.T = (*T)(t)
  1136. overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp)
  1137. return d.DecodeElement(&overlay, &start)
  1138. }
  1139. type PutObjectInline struct {
  1140. Bucket string `xml:"Bucket"`
  1141. Key string `xml:"Key"`
  1142. Metadata []MetadataEntry `xml:"Metadata,omitempty"`
  1143. Data []byte `xml:"Data"`
  1144. ContentLength int64 `xml:"ContentLength"`
  1145. AccessControlList AccessControlList `xml:"AccessControlList,omitempty"`
  1146. StorageClass StorageClass `xml:"StorageClass,omitempty"`
  1147. AWSAccessKeyId string `xml:"AWSAccessKeyId,omitempty"`
  1148. Timestamp time.Time `xml:"Timestamp,omitempty"`
  1149. Signature string `xml:"Signature,omitempty"`
  1150. Credential string `xml:"Credential,omitempty"`
  1151. }
  1152. func (t *PutObjectInline) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  1153. type T PutObjectInline
  1154. var layout struct {
  1155. *T
  1156. Data *xsdBase64Binary `xml:"Data"`
  1157. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  1158. }
  1159. layout.T = (*T)(t)
  1160. layout.Data = (*xsdBase64Binary)(&layout.T.Data)
  1161. layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp)
  1162. return e.EncodeElement(layout, start)
  1163. }
  1164. func (t *PutObjectInline) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  1165. type T PutObjectInline
  1166. var overlay struct {
  1167. *T
  1168. Data *xsdBase64Binary `xml:"Data"`
  1169. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  1170. }
  1171. overlay.T = (*T)(t)
  1172. overlay.Data = (*xsdBase64Binary)(&overlay.T.Data)
  1173. overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp)
  1174. return d.DecodeElement(&overlay, &start)
  1175. }
  1176. type PutObjectInlineResponse struct {
  1177. PutObjectInlineResponse PutObjectResult `xml:"PutObjectInlineResponse"`
  1178. }
  1179. type PutObjectResponse struct {
  1180. PutObjectResponse PutObjectResult `xml:"PutObjectResponse"`
  1181. }
  1182. type PutObjectResult struct {
  1183. ETag string `xml:"ETag"`
  1184. LastModified time.Time `xml:"LastModified"`
  1185. }
  1186. func (t *PutObjectResult) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  1187. type T PutObjectResult
  1188. var layout struct {
  1189. *T
  1190. LastModified *xsdDateTime `xml:"LastModified"`
  1191. }
  1192. layout.T = (*T)(t)
  1193. layout.LastModified = (*xsdDateTime)(&layout.T.LastModified)
  1194. return e.EncodeElement(layout, start)
  1195. }
  1196. func (t *PutObjectResult) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  1197. type T PutObjectResult
  1198. var overlay struct {
  1199. *T
  1200. LastModified *xsdDateTime `xml:"LastModified"`
  1201. }
  1202. overlay.T = (*T)(t)
  1203. overlay.LastModified = (*xsdDateTime)(&overlay.T.LastModified)
  1204. return d.DecodeElement(&overlay, &start)
  1205. }
  1206. type RequestPaymentConfiguration struct {
  1207. Payer Payer `xml:"Payer"`
  1208. }
  1209. type Result struct {
  1210. Status Status `xml:"Status"`
  1211. }
  1212. type SetBucketAccessControlPolicy struct {
  1213. Bucket string `xml:"Bucket"`
  1214. AccessControlList AccessControlList `xml:"AccessControlList,omitempty"`
  1215. AWSAccessKeyId string `xml:"AWSAccessKeyId,omitempty"`
  1216. Timestamp time.Time `xml:"Timestamp,omitempty"`
  1217. Signature string `xml:"Signature,omitempty"`
  1218. Credential string `xml:"Credential,omitempty"`
  1219. }
  1220. func (t *SetBucketAccessControlPolicy) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  1221. type T SetBucketAccessControlPolicy
  1222. var layout struct {
  1223. *T
  1224. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  1225. }
  1226. layout.T = (*T)(t)
  1227. layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp)
  1228. return e.EncodeElement(layout, start)
  1229. }
  1230. func (t *SetBucketAccessControlPolicy) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  1231. type T SetBucketAccessControlPolicy
  1232. var overlay struct {
  1233. *T
  1234. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  1235. }
  1236. overlay.T = (*T)(t)
  1237. overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp)
  1238. return d.DecodeElement(&overlay, &start)
  1239. }
  1240. type SetBucketAccessControlPolicyResponse struct {
  1241. }
  1242. type SetBucketLoggingStatus struct {
  1243. Bucket string `xml:"Bucket"`
  1244. AWSAccessKeyId string `xml:"AWSAccessKeyId,omitempty"`
  1245. Timestamp time.Time `xml:"Timestamp,omitempty"`
  1246. Signature string `xml:"Signature,omitempty"`
  1247. Credential string `xml:"Credential,omitempty"`
  1248. BucketLoggingStatus BucketLoggingStatus `xml:"BucketLoggingStatus"`
  1249. }
  1250. func (t *SetBucketLoggingStatus) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  1251. type T SetBucketLoggingStatus
  1252. var layout struct {
  1253. *T
  1254. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  1255. }
  1256. layout.T = (*T)(t)
  1257. layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp)
  1258. return e.EncodeElement(layout, start)
  1259. }
  1260. func (t *SetBucketLoggingStatus) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  1261. type T SetBucketLoggingStatus
  1262. var overlay struct {
  1263. *T
  1264. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  1265. }
  1266. overlay.T = (*T)(t)
  1267. overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp)
  1268. return d.DecodeElement(&overlay, &start)
  1269. }
  1270. type SetBucketLoggingStatusResponse struct {
  1271. }
  1272. type SetObjectAccessControlPolicy struct {
  1273. Bucket string `xml:"Bucket"`
  1274. Key string `xml:"Key"`
  1275. AccessControlList AccessControlList `xml:"AccessControlList"`
  1276. AWSAccessKeyId string `xml:"AWSAccessKeyId,omitempty"`
  1277. Timestamp time.Time `xml:"Timestamp,omitempty"`
  1278. Signature string `xml:"Signature,omitempty"`
  1279. Credential string `xml:"Credential,omitempty"`
  1280. }
  1281. func (t *SetObjectAccessControlPolicy) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  1282. type T SetObjectAccessControlPolicy
  1283. var layout struct {
  1284. *T
  1285. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  1286. }
  1287. layout.T = (*T)(t)
  1288. layout.Timestamp = (*xsdDateTime)(&layout.T.Timestamp)
  1289. return e.EncodeElement(layout, start)
  1290. }
  1291. func (t *SetObjectAccessControlPolicy) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  1292. type T SetObjectAccessControlPolicy
  1293. var overlay struct {
  1294. *T
  1295. Timestamp *xsdDateTime `xml:"Timestamp,omitempty"`
  1296. }
  1297. overlay.T = (*T)(t)
  1298. overlay.Timestamp = (*xsdDateTime)(&overlay.T.Timestamp)
  1299. return d.DecodeElement(&overlay, &start)
  1300. }
  1301. type SetObjectAccessControlPolicyResponse struct {
  1302. }
  1303. type Status struct {
  1304. Code int `xml:"Code"`
  1305. Description string `xml:"Description"`
  1306. }
  1307. // May be one of STANDARD, REDUCED_REDUNDANCY, GLACIER, UNKNOWN
  1308. type StorageClass string
  1309. type TopicConfiguration struct {
  1310. Topic string `xml:"Topic"`
  1311. Event []string `xml:"Event"`
  1312. }
  1313. type User struct {
  1314. }
  1315. type VersionEntry struct {
  1316. Key string `xml:"Key"`
  1317. VersionId string `xml:"VersionId"`
  1318. IsLatest bool `xml:"IsLatest"`
  1319. LastModified time.Time `xml:"LastModified"`
  1320. ETag string `xml:"ETag"`
  1321. Size int64 `xml:"Size"`
  1322. Owner CanonicalUser `xml:"Owner,omitempty"`
  1323. StorageClass StorageClass `xml:"StorageClass"`
  1324. }
  1325. func (t *VersionEntry) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  1326. type T VersionEntry
  1327. var layout struct {
  1328. *T
  1329. LastModified *xsdDateTime `xml:"LastModified"`
  1330. }
  1331. layout.T = (*T)(t)
  1332. layout.LastModified = (*xsdDateTime)(&layout.T.LastModified)
  1333. return e.EncodeElement(layout, start)
  1334. }
  1335. func (t *VersionEntry) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
  1336. type T VersionEntry
  1337. var overlay struct {
  1338. *T
  1339. LastModified *xsdDateTime `xml:"LastModified"`
  1340. }
  1341. overlay.T = (*T)(t)
  1342. overlay.LastModified = (*xsdDateTime)(&overlay.T.LastModified)
  1343. return d.DecodeElement(&overlay, &start)
  1344. }
  1345. type VersioningConfiguration struct {
  1346. Status VersioningStatus `xml:"Status,omitempty"`
  1347. MfaDelete MfaDeleteStatus `xml:"MfaDelete,omitempty"`
  1348. }
  1349. // May be one of Enabled, Suspended
  1350. type VersioningStatus string
  1351. type xsdBase64Binary []byte
  1352. func (b *xsdBase64Binary) UnmarshalText(text []byte) (err error) {
  1353. *b, err = base64.StdEncoding.DecodeString(string(text))
  1354. return
  1355. }
  1356. func (b xsdBase64Binary) MarshalText() ([]byte, error) {
  1357. var buf bytes.Buffer
  1358. enc := base64.NewEncoder(base64.StdEncoding, &buf)
  1359. enc.Write([]byte(b))
  1360. enc.Close()
  1361. return buf.Bytes(), nil
  1362. }
  1363. type xsdDateTime time.Time
  1364. func (t *xsdDateTime) UnmarshalText(text []byte) error {
  1365. return _unmarshalTime(text, (*time.Time)(t), "2006-01-02T15:04:05.999999999")
  1366. }
  1367. func (t xsdDateTime) MarshalText() ([]byte, error) {
  1368. return _marshalTime((time.Time)(t), "2006-01-02T15:04:05.999999999")
  1369. }
  1370. func (t xsdDateTime) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
  1371. if (time.Time)(t).IsZero() {
  1372. return nil
  1373. }
  1374. m, err := t.MarshalText()
  1375. if err != nil {
  1376. return err
  1377. }
  1378. return e.EncodeElement(m, start)
  1379. }
  1380. func (t xsdDateTime) MarshalXMLAttr(name xml.Name) (xml.Attr, error) {
  1381. if (time.Time)(t).IsZero() {
  1382. return xml.Attr{}, nil
  1383. }
  1384. m, err := t.MarshalText()
  1385. return xml.Attr{Name: name, Value: string(m)}, err
  1386. }
  1387. func _unmarshalTime(text []byte, t *time.Time, format string) (err error) {
  1388. s := string(bytes.TrimSpace(text))
  1389. *t, err = time.Parse(format, s)
  1390. if _, ok := err.(*time.ParseError); ok {
  1391. *t, err = time.Parse(format+"Z07:00", s)
  1392. }
  1393. return err
  1394. }
  1395. func _marshalTime(t time.Time, format string) ([]byte, error) {
  1396. return []byte(t.Format(format + "Z07:00")), nil
  1397. }