s3api_xsd_generated.go 51 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541
  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. XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ListAllMyBucketsResult"`
  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. }