1package azblob
2
3// Code generated by Microsoft (R) AutoRest Code Generator.
4// Changes may cause incorrect behavior and will be lost if the code is regenerated.
5
6import (
7	"crypto/hmac"
8	"crypto/sha256"
9	"encoding/base64"
10	"encoding/xml"
11	"errors"
12	"io"
13	"net/http"
14	"reflect"
15	"strconv"
16	"strings"
17	"time"
18	"unsafe"
19)
20
21// ETag is an entity tag.
22type ETag string
23
24const (
25	// ETagNone represents an empty entity tag.
26	ETagNone ETag = ""
27
28	// ETagAny matches any entity tag.
29	ETagAny ETag = "*"
30)
31
32// Metadata contains metadata key/value pairs.
33type Metadata map[string]string
34
35const mdPrefix = "x-ms-meta-"
36
37const mdPrefixLen = len(mdPrefix)
38
39// UnmarshalXML implements the xml.Unmarshaler interface for Metadata.
40func (md *Metadata) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
41	tokName := ""
42	for t, err := d.Token(); err == nil; t, err = d.Token() {
43		switch tt := t.(type) {
44		case xml.StartElement:
45			tokName = strings.ToLower(tt.Name.Local)
46			break
47		case xml.CharData:
48			if *md == nil {
49				*md = Metadata{}
50			}
51			(*md)[tokName] = string(tt)
52			break
53		}
54	}
55	return nil
56}
57
58// Marker represents an opaque value used in paged responses.
59type Marker struct {
60	Val *string
61}
62
63// NotDone returns true if the list enumeration should be started or is not yet complete. Specifically, NotDone returns true
64// for a just-initialized (zero value) Marker indicating that you should make an initial request to get a result portion from
65// the service. NotDone also returns true whenever the service returns an interim result portion. NotDone returns false only
66// after the service has returned the final result portion.
67func (m Marker) NotDone() bool {
68	return m.Val == nil || *m.Val != ""
69}
70
71// UnmarshalXML implements the xml.Unmarshaler interface for Marker.
72func (m *Marker) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
73	var out string
74	err := d.DecodeElement(&out, &start)
75	m.Val = &out
76	return err
77}
78
79// concatenates a slice of const values with the specified separator between each item
80func joinConst(s interface{}, sep string) string {
81	v := reflect.ValueOf(s)
82	if v.Kind() != reflect.Slice && v.Kind() != reflect.Array {
83		panic("s wasn't a slice or array")
84	}
85	ss := make([]string, 0, v.Len())
86	for i := 0; i < v.Len(); i++ {
87		ss = append(ss, v.Index(i).String())
88	}
89	return strings.Join(ss, sep)
90}
91
92func validateError(err error) {
93	if err != nil {
94		panic(err)
95	}
96}
97
98// AccessTierType enumerates the values for access tier type.
99type AccessTierType string
100
101const (
102	// AccessTierArchive ...
103	AccessTierArchive AccessTierType = "Archive"
104	// AccessTierCool ...
105	AccessTierCool AccessTierType = "Cool"
106	// AccessTierHot ...
107	AccessTierHot AccessTierType = "Hot"
108	// AccessTierNone represents an empty AccessTierType.
109	AccessTierNone AccessTierType = ""
110	// AccessTierP10 ...
111	AccessTierP10 AccessTierType = "P10"
112	// AccessTierP20 ...
113	AccessTierP20 AccessTierType = "P20"
114	// AccessTierP30 ...
115	AccessTierP30 AccessTierType = "P30"
116	// AccessTierP4 ...
117	AccessTierP4 AccessTierType = "P4"
118	// AccessTierP40 ...
119	AccessTierP40 AccessTierType = "P40"
120	// AccessTierP50 ...
121	AccessTierP50 AccessTierType = "P50"
122	// AccessTierP6 ...
123	AccessTierP6 AccessTierType = "P6"
124)
125
126// PossibleAccessTierTypeValues returns an array of possible values for the AccessTierType const type.
127func PossibleAccessTierTypeValues() []AccessTierType {
128	return []AccessTierType{AccessTierArchive, AccessTierCool, AccessTierHot, AccessTierNone, AccessTierP10, AccessTierP20, AccessTierP30, AccessTierP4, AccessTierP40, AccessTierP50, AccessTierP6}
129}
130
131// AccountKindType enumerates the values for account kind type.
132type AccountKindType string
133
134const (
135	// AccountKindBlobStorage ...
136	AccountKindBlobStorage AccountKindType = "BlobStorage"
137	// AccountKindNone represents an empty AccountKindType.
138	AccountKindNone AccountKindType = ""
139	// AccountKindStorage ...
140	AccountKindStorage AccountKindType = "Storage"
141	// AccountKindStorageV2 ...
142	AccountKindStorageV2 AccountKindType = "StorageV2"
143)
144
145// PossibleAccountKindTypeValues returns an array of possible values for the AccountKindType const type.
146func PossibleAccountKindTypeValues() []AccountKindType {
147	return []AccountKindType{AccountKindBlobStorage, AccountKindNone, AccountKindStorage, AccountKindStorageV2}
148}
149
150// ArchiveStatusType enumerates the values for archive status type.
151type ArchiveStatusType string
152
153const (
154	// ArchiveStatusNone represents an empty ArchiveStatusType.
155	ArchiveStatusNone ArchiveStatusType = ""
156	// ArchiveStatusRehydratePendingToCool ...
157	ArchiveStatusRehydratePendingToCool ArchiveStatusType = "rehydrate-pending-to-cool"
158	// ArchiveStatusRehydratePendingToHot ...
159	ArchiveStatusRehydratePendingToHot ArchiveStatusType = "rehydrate-pending-to-hot"
160)
161
162// PossibleArchiveStatusTypeValues returns an array of possible values for the ArchiveStatusType const type.
163func PossibleArchiveStatusTypeValues() []ArchiveStatusType {
164	return []ArchiveStatusType{ArchiveStatusNone, ArchiveStatusRehydratePendingToCool, ArchiveStatusRehydratePendingToHot}
165}
166
167// BlobType enumerates the values for blob type.
168type BlobType string
169
170const (
171	// BlobAppendBlob ...
172	BlobAppendBlob BlobType = "AppendBlob"
173	// BlobBlockBlob ...
174	BlobBlockBlob BlobType = "BlockBlob"
175	// BlobNone represents an empty BlobType.
176	BlobNone BlobType = ""
177	// BlobPageBlob ...
178	BlobPageBlob BlobType = "PageBlob"
179)
180
181// PossibleBlobTypeValues returns an array of possible values for the BlobType const type.
182func PossibleBlobTypeValues() []BlobType {
183	return []BlobType{BlobAppendBlob, BlobBlockBlob, BlobNone, BlobPageBlob}
184}
185
186// BlockListType enumerates the values for block list type.
187type BlockListType string
188
189const (
190	// BlockListAll ...
191	BlockListAll BlockListType = "all"
192	// BlockListCommitted ...
193	BlockListCommitted BlockListType = "committed"
194	// BlockListNone represents an empty BlockListType.
195	BlockListNone BlockListType = ""
196	// BlockListUncommitted ...
197	BlockListUncommitted BlockListType = "uncommitted"
198)
199
200// PossibleBlockListTypeValues returns an array of possible values for the BlockListType const type.
201func PossibleBlockListTypeValues() []BlockListType {
202	return []BlockListType{BlockListAll, BlockListCommitted, BlockListNone, BlockListUncommitted}
203}
204
205// CopyStatusType enumerates the values for copy status type.
206type CopyStatusType string
207
208const (
209	// CopyStatusAborted ...
210	CopyStatusAborted CopyStatusType = "aborted"
211	// CopyStatusFailed ...
212	CopyStatusFailed CopyStatusType = "failed"
213	// CopyStatusNone represents an empty CopyStatusType.
214	CopyStatusNone CopyStatusType = ""
215	// CopyStatusPending ...
216	CopyStatusPending CopyStatusType = "pending"
217	// CopyStatusSuccess ...
218	CopyStatusSuccess CopyStatusType = "success"
219)
220
221// PossibleCopyStatusTypeValues returns an array of possible values for the CopyStatusType const type.
222func PossibleCopyStatusTypeValues() []CopyStatusType {
223	return []CopyStatusType{CopyStatusAborted, CopyStatusFailed, CopyStatusNone, CopyStatusPending, CopyStatusSuccess}
224}
225
226// DeleteSnapshotsOptionType enumerates the values for delete snapshots option type.
227type DeleteSnapshotsOptionType string
228
229const (
230	// DeleteSnapshotsOptionInclude ...
231	DeleteSnapshotsOptionInclude DeleteSnapshotsOptionType = "include"
232	// DeleteSnapshotsOptionNone represents an empty DeleteSnapshotsOptionType.
233	DeleteSnapshotsOptionNone DeleteSnapshotsOptionType = ""
234	// DeleteSnapshotsOptionOnly ...
235	DeleteSnapshotsOptionOnly DeleteSnapshotsOptionType = "only"
236)
237
238// PossibleDeleteSnapshotsOptionTypeValues returns an array of possible values for the DeleteSnapshotsOptionType const type.
239func PossibleDeleteSnapshotsOptionTypeValues() []DeleteSnapshotsOptionType {
240	return []DeleteSnapshotsOptionType{DeleteSnapshotsOptionInclude, DeleteSnapshotsOptionNone, DeleteSnapshotsOptionOnly}
241}
242
243// GeoReplicationStatusType enumerates the values for geo replication status type.
244type GeoReplicationStatusType string
245
246const (
247	// GeoReplicationStatusBootstrap ...
248	GeoReplicationStatusBootstrap GeoReplicationStatusType = "bootstrap"
249	// GeoReplicationStatusLive ...
250	GeoReplicationStatusLive GeoReplicationStatusType = "live"
251	// GeoReplicationStatusNone represents an empty GeoReplicationStatusType.
252	GeoReplicationStatusNone GeoReplicationStatusType = ""
253	// GeoReplicationStatusUnavailable ...
254	GeoReplicationStatusUnavailable GeoReplicationStatusType = "unavailable"
255)
256
257// PossibleGeoReplicationStatusTypeValues returns an array of possible values for the GeoReplicationStatusType const type.
258func PossibleGeoReplicationStatusTypeValues() []GeoReplicationStatusType {
259	return []GeoReplicationStatusType{GeoReplicationStatusBootstrap, GeoReplicationStatusLive, GeoReplicationStatusNone, GeoReplicationStatusUnavailable}
260}
261
262// LeaseDurationType enumerates the values for lease duration type.
263type LeaseDurationType string
264
265const (
266	// LeaseDurationFixed ...
267	LeaseDurationFixed LeaseDurationType = "fixed"
268	// LeaseDurationInfinite ...
269	LeaseDurationInfinite LeaseDurationType = "infinite"
270	// LeaseDurationNone represents an empty LeaseDurationType.
271	LeaseDurationNone LeaseDurationType = ""
272)
273
274// PossibleLeaseDurationTypeValues returns an array of possible values for the LeaseDurationType const type.
275func PossibleLeaseDurationTypeValues() []LeaseDurationType {
276	return []LeaseDurationType{LeaseDurationFixed, LeaseDurationInfinite, LeaseDurationNone}
277}
278
279// LeaseStateType enumerates the values for lease state type.
280type LeaseStateType string
281
282const (
283	// LeaseStateAvailable ...
284	LeaseStateAvailable LeaseStateType = "available"
285	// LeaseStateBreaking ...
286	LeaseStateBreaking LeaseStateType = "breaking"
287	// LeaseStateBroken ...
288	LeaseStateBroken LeaseStateType = "broken"
289	// LeaseStateExpired ...
290	LeaseStateExpired LeaseStateType = "expired"
291	// LeaseStateLeased ...
292	LeaseStateLeased LeaseStateType = "leased"
293	// LeaseStateNone represents an empty LeaseStateType.
294	LeaseStateNone LeaseStateType = ""
295)
296
297// PossibleLeaseStateTypeValues returns an array of possible values for the LeaseStateType const type.
298func PossibleLeaseStateTypeValues() []LeaseStateType {
299	return []LeaseStateType{LeaseStateAvailable, LeaseStateBreaking, LeaseStateBroken, LeaseStateExpired, LeaseStateLeased, LeaseStateNone}
300}
301
302// LeaseStatusType enumerates the values for lease status type.
303type LeaseStatusType string
304
305const (
306	// LeaseStatusLocked ...
307	LeaseStatusLocked LeaseStatusType = "locked"
308	// LeaseStatusNone represents an empty LeaseStatusType.
309	LeaseStatusNone LeaseStatusType = ""
310	// LeaseStatusUnlocked ...
311	LeaseStatusUnlocked LeaseStatusType = "unlocked"
312)
313
314// PossibleLeaseStatusTypeValues returns an array of possible values for the LeaseStatusType const type.
315func PossibleLeaseStatusTypeValues() []LeaseStatusType {
316	return []LeaseStatusType{LeaseStatusLocked, LeaseStatusNone, LeaseStatusUnlocked}
317}
318
319// ListBlobsIncludeItemType enumerates the values for list blobs include item type.
320type ListBlobsIncludeItemType string
321
322const (
323	// ListBlobsIncludeItemCopy ...
324	ListBlobsIncludeItemCopy ListBlobsIncludeItemType = "copy"
325	// ListBlobsIncludeItemDeleted ...
326	ListBlobsIncludeItemDeleted ListBlobsIncludeItemType = "deleted"
327	// ListBlobsIncludeItemMetadata ...
328	ListBlobsIncludeItemMetadata ListBlobsIncludeItemType = "metadata"
329	// ListBlobsIncludeItemNone represents an empty ListBlobsIncludeItemType.
330	ListBlobsIncludeItemNone ListBlobsIncludeItemType = ""
331	// ListBlobsIncludeItemSnapshots ...
332	ListBlobsIncludeItemSnapshots ListBlobsIncludeItemType = "snapshots"
333	// ListBlobsIncludeItemUncommittedblobs ...
334	ListBlobsIncludeItemUncommittedblobs ListBlobsIncludeItemType = "uncommittedblobs"
335)
336
337// PossibleListBlobsIncludeItemTypeValues returns an array of possible values for the ListBlobsIncludeItemType const type.
338func PossibleListBlobsIncludeItemTypeValues() []ListBlobsIncludeItemType {
339	return []ListBlobsIncludeItemType{ListBlobsIncludeItemCopy, ListBlobsIncludeItemDeleted, ListBlobsIncludeItemMetadata, ListBlobsIncludeItemNone, ListBlobsIncludeItemSnapshots, ListBlobsIncludeItemUncommittedblobs}
340}
341
342// ListContainersIncludeType enumerates the values for list containers include type.
343type ListContainersIncludeType string
344
345const (
346	// ListContainersIncludeMetadata ...
347	ListContainersIncludeMetadata ListContainersIncludeType = "metadata"
348	// ListContainersIncludeNone represents an empty ListContainersIncludeType.
349	ListContainersIncludeNone ListContainersIncludeType = ""
350)
351
352// PossibleListContainersIncludeTypeValues returns an array of possible values for the ListContainersIncludeType const type.
353func PossibleListContainersIncludeTypeValues() []ListContainersIncludeType {
354	return []ListContainersIncludeType{ListContainersIncludeMetadata, ListContainersIncludeNone}
355}
356
357// PublicAccessType enumerates the values for public access type.
358type PublicAccessType string
359
360const (
361	// PublicAccessBlob ...
362	PublicAccessBlob PublicAccessType = "blob"
363	// PublicAccessContainer ...
364	PublicAccessContainer PublicAccessType = "container"
365	// PublicAccessNone represents an empty PublicAccessType.
366	PublicAccessNone PublicAccessType = ""
367)
368
369// PossiblePublicAccessTypeValues returns an array of possible values for the PublicAccessType const type.
370func PossiblePublicAccessTypeValues() []PublicAccessType {
371	return []PublicAccessType{PublicAccessBlob, PublicAccessContainer, PublicAccessNone}
372}
373
374// SequenceNumberActionType enumerates the values for sequence number action type.
375type SequenceNumberActionType string
376
377const (
378	// SequenceNumberActionIncrement ...
379	SequenceNumberActionIncrement SequenceNumberActionType = "increment"
380	// SequenceNumberActionMax ...
381	SequenceNumberActionMax SequenceNumberActionType = "max"
382	// SequenceNumberActionNone represents an empty SequenceNumberActionType.
383	SequenceNumberActionNone SequenceNumberActionType = ""
384	// SequenceNumberActionUpdate ...
385	SequenceNumberActionUpdate SequenceNumberActionType = "update"
386)
387
388// PossibleSequenceNumberActionTypeValues returns an array of possible values for the SequenceNumberActionType const type.
389func PossibleSequenceNumberActionTypeValues() []SequenceNumberActionType {
390	return []SequenceNumberActionType{SequenceNumberActionIncrement, SequenceNumberActionMax, SequenceNumberActionNone, SequenceNumberActionUpdate}
391}
392
393// SkuNameType enumerates the values for sku name type.
394type SkuNameType string
395
396const (
397	// SkuNameNone represents an empty SkuNameType.
398	SkuNameNone SkuNameType = ""
399	// SkuNamePremiumLRS ...
400	SkuNamePremiumLRS SkuNameType = "Premium_LRS"
401	// SkuNameStandardGRS ...
402	SkuNameStandardGRS SkuNameType = "Standard_GRS"
403	// SkuNameStandardLRS ...
404	SkuNameStandardLRS SkuNameType = "Standard_LRS"
405	// SkuNameStandardRAGRS ...
406	SkuNameStandardRAGRS SkuNameType = "Standard_RAGRS"
407	// SkuNameStandardZRS ...
408	SkuNameStandardZRS SkuNameType = "Standard_ZRS"
409)
410
411// PossibleSkuNameTypeValues returns an array of possible values for the SkuNameType const type.
412func PossibleSkuNameTypeValues() []SkuNameType {
413	return []SkuNameType{SkuNameNone, SkuNamePremiumLRS, SkuNameStandardGRS, SkuNameStandardLRS, SkuNameStandardRAGRS, SkuNameStandardZRS}
414}
415
416// StorageErrorCodeType enumerates the values for storage error code type.
417type StorageErrorCodeType string
418
419const (
420	// StorageErrorCodeAccountAlreadyExists ...
421	StorageErrorCodeAccountAlreadyExists StorageErrorCodeType = "AccountAlreadyExists"
422	// StorageErrorCodeAccountBeingCreated ...
423	StorageErrorCodeAccountBeingCreated StorageErrorCodeType = "AccountBeingCreated"
424	// StorageErrorCodeAccountIsDisabled ...
425	StorageErrorCodeAccountIsDisabled StorageErrorCodeType = "AccountIsDisabled"
426	// StorageErrorCodeAppendPositionConditionNotMet ...
427	StorageErrorCodeAppendPositionConditionNotMet StorageErrorCodeType = "AppendPositionConditionNotMet"
428	// StorageErrorCodeAuthenticationFailed ...
429	StorageErrorCodeAuthenticationFailed StorageErrorCodeType = "AuthenticationFailed"
430	// StorageErrorCodeAuthorizationFailure ...
431	StorageErrorCodeAuthorizationFailure StorageErrorCodeType = "AuthorizationFailure"
432	// StorageErrorCodeBlobAlreadyExists ...
433	StorageErrorCodeBlobAlreadyExists StorageErrorCodeType = "BlobAlreadyExists"
434	// StorageErrorCodeBlobArchived ...
435	StorageErrorCodeBlobArchived StorageErrorCodeType = "BlobArchived"
436	// StorageErrorCodeBlobBeingRehydrated ...
437	StorageErrorCodeBlobBeingRehydrated StorageErrorCodeType = "BlobBeingRehydrated"
438	// StorageErrorCodeBlobNotArchived ...
439	StorageErrorCodeBlobNotArchived StorageErrorCodeType = "BlobNotArchived"
440	// StorageErrorCodeBlobNotFound ...
441	StorageErrorCodeBlobNotFound StorageErrorCodeType = "BlobNotFound"
442	// StorageErrorCodeBlobOverwritten ...
443	StorageErrorCodeBlobOverwritten StorageErrorCodeType = "BlobOverwritten"
444	// StorageErrorCodeBlobTierInadequateForContentLength ...
445	StorageErrorCodeBlobTierInadequateForContentLength StorageErrorCodeType = "BlobTierInadequateForContentLength"
446	// StorageErrorCodeBlockCountExceedsLimit ...
447	StorageErrorCodeBlockCountExceedsLimit StorageErrorCodeType = "BlockCountExceedsLimit"
448	// StorageErrorCodeBlockListTooLong ...
449	StorageErrorCodeBlockListTooLong StorageErrorCodeType = "BlockListTooLong"
450	// StorageErrorCodeCannotChangeToLowerTier ...
451	StorageErrorCodeCannotChangeToLowerTier StorageErrorCodeType = "CannotChangeToLowerTier"
452	// StorageErrorCodeCannotVerifyCopySource ...
453	StorageErrorCodeCannotVerifyCopySource StorageErrorCodeType = "CannotVerifyCopySource"
454	// StorageErrorCodeConditionHeadersNotSupported ...
455	StorageErrorCodeConditionHeadersNotSupported StorageErrorCodeType = "ConditionHeadersNotSupported"
456	// StorageErrorCodeConditionNotMet ...
457	StorageErrorCodeConditionNotMet StorageErrorCodeType = "ConditionNotMet"
458	// StorageErrorCodeContainerAlreadyExists ...
459	StorageErrorCodeContainerAlreadyExists StorageErrorCodeType = "ContainerAlreadyExists"
460	// StorageErrorCodeContainerBeingDeleted ...
461	StorageErrorCodeContainerBeingDeleted StorageErrorCodeType = "ContainerBeingDeleted"
462	// StorageErrorCodeContainerDisabled ...
463	StorageErrorCodeContainerDisabled StorageErrorCodeType = "ContainerDisabled"
464	// StorageErrorCodeContainerNotFound ...
465	StorageErrorCodeContainerNotFound StorageErrorCodeType = "ContainerNotFound"
466	// StorageErrorCodeContentLengthLargerThanTierLimit ...
467	StorageErrorCodeContentLengthLargerThanTierLimit StorageErrorCodeType = "ContentLengthLargerThanTierLimit"
468	// StorageErrorCodeCopyAcrossAccountsNotSupported ...
469	StorageErrorCodeCopyAcrossAccountsNotSupported StorageErrorCodeType = "CopyAcrossAccountsNotSupported"
470	// StorageErrorCodeCopyIDMismatch ...
471	StorageErrorCodeCopyIDMismatch StorageErrorCodeType = "CopyIdMismatch"
472	// StorageErrorCodeEmptyMetadataKey ...
473	StorageErrorCodeEmptyMetadataKey StorageErrorCodeType = "EmptyMetadataKey"
474	// StorageErrorCodeFeatureVersionMismatch ...
475	StorageErrorCodeFeatureVersionMismatch StorageErrorCodeType = "FeatureVersionMismatch"
476	// StorageErrorCodeIncrementalCopyBlobMismatch ...
477	StorageErrorCodeIncrementalCopyBlobMismatch StorageErrorCodeType = "IncrementalCopyBlobMismatch"
478	// StorageErrorCodeIncrementalCopyOfEralierVersionSnapshotNotAllowed ...
479	StorageErrorCodeIncrementalCopyOfEralierVersionSnapshotNotAllowed StorageErrorCodeType = "IncrementalCopyOfEralierVersionSnapshotNotAllowed"
480	// StorageErrorCodeIncrementalCopySourceMustBeSnapshot ...
481	StorageErrorCodeIncrementalCopySourceMustBeSnapshot StorageErrorCodeType = "IncrementalCopySourceMustBeSnapshot"
482	// StorageErrorCodeInfiniteLeaseDurationRequired ...
483	StorageErrorCodeInfiniteLeaseDurationRequired StorageErrorCodeType = "InfiniteLeaseDurationRequired"
484	// StorageErrorCodeInsufficientAccountPermissions ...
485	StorageErrorCodeInsufficientAccountPermissions StorageErrorCodeType = "InsufficientAccountPermissions"
486	// StorageErrorCodeInternalError ...
487	StorageErrorCodeInternalError StorageErrorCodeType = "InternalError"
488	// StorageErrorCodeInvalidAuthenticationInfo ...
489	StorageErrorCodeInvalidAuthenticationInfo StorageErrorCodeType = "InvalidAuthenticationInfo"
490	// StorageErrorCodeInvalidBlobOrBlock ...
491	StorageErrorCodeInvalidBlobOrBlock StorageErrorCodeType = "InvalidBlobOrBlock"
492	// StorageErrorCodeInvalidBlobTier ...
493	StorageErrorCodeInvalidBlobTier StorageErrorCodeType = "InvalidBlobTier"
494	// StorageErrorCodeInvalidBlobType ...
495	StorageErrorCodeInvalidBlobType StorageErrorCodeType = "InvalidBlobType"
496	// StorageErrorCodeInvalidBlockID ...
497	StorageErrorCodeInvalidBlockID StorageErrorCodeType = "InvalidBlockId"
498	// StorageErrorCodeInvalidBlockList ...
499	StorageErrorCodeInvalidBlockList StorageErrorCodeType = "InvalidBlockList"
500	// StorageErrorCodeInvalidHeaderValue ...
501	StorageErrorCodeInvalidHeaderValue StorageErrorCodeType = "InvalidHeaderValue"
502	// StorageErrorCodeInvalidHTTPVerb ...
503	StorageErrorCodeInvalidHTTPVerb StorageErrorCodeType = "InvalidHttpVerb"
504	// StorageErrorCodeInvalidInput ...
505	StorageErrorCodeInvalidInput StorageErrorCodeType = "InvalidInput"
506	// StorageErrorCodeInvalidMd5 ...
507	StorageErrorCodeInvalidMd5 StorageErrorCodeType = "InvalidMd5"
508	// StorageErrorCodeInvalidMetadata ...
509	StorageErrorCodeInvalidMetadata StorageErrorCodeType = "InvalidMetadata"
510	// StorageErrorCodeInvalidOperation ...
511	StorageErrorCodeInvalidOperation StorageErrorCodeType = "InvalidOperation"
512	// StorageErrorCodeInvalidPageRange ...
513	StorageErrorCodeInvalidPageRange StorageErrorCodeType = "InvalidPageRange"
514	// StorageErrorCodeInvalidQueryParameterValue ...
515	StorageErrorCodeInvalidQueryParameterValue StorageErrorCodeType = "InvalidQueryParameterValue"
516	// StorageErrorCodeInvalidRange ...
517	StorageErrorCodeInvalidRange StorageErrorCodeType = "InvalidRange"
518	// StorageErrorCodeInvalidResourceName ...
519	StorageErrorCodeInvalidResourceName StorageErrorCodeType = "InvalidResourceName"
520	// StorageErrorCodeInvalidSourceBlobType ...
521	StorageErrorCodeInvalidSourceBlobType StorageErrorCodeType = "InvalidSourceBlobType"
522	// StorageErrorCodeInvalidSourceBlobURL ...
523	StorageErrorCodeInvalidSourceBlobURL StorageErrorCodeType = "InvalidSourceBlobUrl"
524	// StorageErrorCodeInvalidURI ...
525	StorageErrorCodeInvalidURI StorageErrorCodeType = "InvalidUri"
526	// StorageErrorCodeInvalidVersionForPageBlobOperation ...
527	StorageErrorCodeInvalidVersionForPageBlobOperation StorageErrorCodeType = "InvalidVersionForPageBlobOperation"
528	// StorageErrorCodeInvalidXMLDocument ...
529	StorageErrorCodeInvalidXMLDocument StorageErrorCodeType = "InvalidXmlDocument"
530	// StorageErrorCodeInvalidXMLNodeValue ...
531	StorageErrorCodeInvalidXMLNodeValue StorageErrorCodeType = "InvalidXmlNodeValue"
532	// StorageErrorCodeLeaseAlreadyBroken ...
533	StorageErrorCodeLeaseAlreadyBroken StorageErrorCodeType = "LeaseAlreadyBroken"
534	// StorageErrorCodeLeaseAlreadyPresent ...
535	StorageErrorCodeLeaseAlreadyPresent StorageErrorCodeType = "LeaseAlreadyPresent"
536	// StorageErrorCodeLeaseIDMismatchWithBlobOperation ...
537	StorageErrorCodeLeaseIDMismatchWithBlobOperation StorageErrorCodeType = "LeaseIdMismatchWithBlobOperation"
538	// StorageErrorCodeLeaseIDMismatchWithContainerOperation ...
539	StorageErrorCodeLeaseIDMismatchWithContainerOperation StorageErrorCodeType = "LeaseIdMismatchWithContainerOperation"
540	// StorageErrorCodeLeaseIDMismatchWithLeaseOperation ...
541	StorageErrorCodeLeaseIDMismatchWithLeaseOperation StorageErrorCodeType = "LeaseIdMismatchWithLeaseOperation"
542	// StorageErrorCodeLeaseIDMissing ...
543	StorageErrorCodeLeaseIDMissing StorageErrorCodeType = "LeaseIdMissing"
544	// StorageErrorCodeLeaseIsBreakingAndCannotBeAcquired ...
545	StorageErrorCodeLeaseIsBreakingAndCannotBeAcquired StorageErrorCodeType = "LeaseIsBreakingAndCannotBeAcquired"
546	// StorageErrorCodeLeaseIsBreakingAndCannotBeChanged ...
547	StorageErrorCodeLeaseIsBreakingAndCannotBeChanged StorageErrorCodeType = "LeaseIsBreakingAndCannotBeChanged"
548	// StorageErrorCodeLeaseIsBrokenAndCannotBeRenewed ...
549	StorageErrorCodeLeaseIsBrokenAndCannotBeRenewed StorageErrorCodeType = "LeaseIsBrokenAndCannotBeRenewed"
550	// StorageErrorCodeLeaseLost ...
551	StorageErrorCodeLeaseLost StorageErrorCodeType = "LeaseLost"
552	// StorageErrorCodeLeaseNotPresentWithBlobOperation ...
553	StorageErrorCodeLeaseNotPresentWithBlobOperation StorageErrorCodeType = "LeaseNotPresentWithBlobOperation"
554	// StorageErrorCodeLeaseNotPresentWithContainerOperation ...
555	StorageErrorCodeLeaseNotPresentWithContainerOperation StorageErrorCodeType = "LeaseNotPresentWithContainerOperation"
556	// StorageErrorCodeLeaseNotPresentWithLeaseOperation ...
557	StorageErrorCodeLeaseNotPresentWithLeaseOperation StorageErrorCodeType = "LeaseNotPresentWithLeaseOperation"
558	// StorageErrorCodeMaxBlobSizeConditionNotMet ...
559	StorageErrorCodeMaxBlobSizeConditionNotMet StorageErrorCodeType = "MaxBlobSizeConditionNotMet"
560	// StorageErrorCodeMd5Mismatch ...
561	StorageErrorCodeMd5Mismatch StorageErrorCodeType = "Md5Mismatch"
562	// StorageErrorCodeMetadataTooLarge ...
563	StorageErrorCodeMetadataTooLarge StorageErrorCodeType = "MetadataTooLarge"
564	// StorageErrorCodeMissingContentLengthHeader ...
565	StorageErrorCodeMissingContentLengthHeader StorageErrorCodeType = "MissingContentLengthHeader"
566	// StorageErrorCodeMissingRequiredHeader ...
567	StorageErrorCodeMissingRequiredHeader StorageErrorCodeType = "MissingRequiredHeader"
568	// StorageErrorCodeMissingRequiredQueryParameter ...
569	StorageErrorCodeMissingRequiredQueryParameter StorageErrorCodeType = "MissingRequiredQueryParameter"
570	// StorageErrorCodeMissingRequiredXMLNode ...
571	StorageErrorCodeMissingRequiredXMLNode StorageErrorCodeType = "MissingRequiredXmlNode"
572	// StorageErrorCodeMultipleConditionHeadersNotSupported ...
573	StorageErrorCodeMultipleConditionHeadersNotSupported StorageErrorCodeType = "MultipleConditionHeadersNotSupported"
574	// StorageErrorCodeNone represents an empty StorageErrorCodeType.
575	StorageErrorCodeNone StorageErrorCodeType = ""
576	// StorageErrorCodeNoPendingCopyOperation ...
577	StorageErrorCodeNoPendingCopyOperation StorageErrorCodeType = "NoPendingCopyOperation"
578	// StorageErrorCodeOperationNotAllowedOnIncrementalCopyBlob ...
579	StorageErrorCodeOperationNotAllowedOnIncrementalCopyBlob StorageErrorCodeType = "OperationNotAllowedOnIncrementalCopyBlob"
580	// StorageErrorCodeOperationTimedOut ...
581	StorageErrorCodeOperationTimedOut StorageErrorCodeType = "OperationTimedOut"
582	// StorageErrorCodeOutOfRangeInput ...
583	StorageErrorCodeOutOfRangeInput StorageErrorCodeType = "OutOfRangeInput"
584	// StorageErrorCodeOutOfRangeQueryParameterValue ...
585	StorageErrorCodeOutOfRangeQueryParameterValue StorageErrorCodeType = "OutOfRangeQueryParameterValue"
586	// StorageErrorCodePendingCopyOperation ...
587	StorageErrorCodePendingCopyOperation StorageErrorCodeType = "PendingCopyOperation"
588	// StorageErrorCodePreviousSnapshotCannotBeNewer ...
589	StorageErrorCodePreviousSnapshotCannotBeNewer StorageErrorCodeType = "PreviousSnapshotCannotBeNewer"
590	// StorageErrorCodePreviousSnapshotNotFound ...
591	StorageErrorCodePreviousSnapshotNotFound StorageErrorCodeType = "PreviousSnapshotNotFound"
592	// StorageErrorCodePreviousSnapshotOperationNotSupported ...
593	StorageErrorCodePreviousSnapshotOperationNotSupported StorageErrorCodeType = "PreviousSnapshotOperationNotSupported"
594	// StorageErrorCodeRequestBodyTooLarge ...
595	StorageErrorCodeRequestBodyTooLarge StorageErrorCodeType = "RequestBodyTooLarge"
596	// StorageErrorCodeRequestURLFailedToParse ...
597	StorageErrorCodeRequestURLFailedToParse StorageErrorCodeType = "RequestUrlFailedToParse"
598	// StorageErrorCodeResourceAlreadyExists ...
599	StorageErrorCodeResourceAlreadyExists StorageErrorCodeType = "ResourceAlreadyExists"
600	// StorageErrorCodeResourceNotFound ...
601	StorageErrorCodeResourceNotFound StorageErrorCodeType = "ResourceNotFound"
602	// StorageErrorCodeResourceTypeMismatch ...
603	StorageErrorCodeResourceTypeMismatch StorageErrorCodeType = "ResourceTypeMismatch"
604	// StorageErrorCodeSequenceNumberConditionNotMet ...
605	StorageErrorCodeSequenceNumberConditionNotMet StorageErrorCodeType = "SequenceNumberConditionNotMet"
606	// StorageErrorCodeSequenceNumberIncrementTooLarge ...
607	StorageErrorCodeSequenceNumberIncrementTooLarge StorageErrorCodeType = "SequenceNumberIncrementTooLarge"
608	// StorageErrorCodeServerBusy ...
609	StorageErrorCodeServerBusy StorageErrorCodeType = "ServerBusy"
610	// StorageErrorCodeSnaphotOperationRateExceeded ...
611	StorageErrorCodeSnaphotOperationRateExceeded StorageErrorCodeType = "SnaphotOperationRateExceeded"
612	// StorageErrorCodeSnapshotCountExceeded ...
613	StorageErrorCodeSnapshotCountExceeded StorageErrorCodeType = "SnapshotCountExceeded"
614	// StorageErrorCodeSnapshotsPresent ...
615	StorageErrorCodeSnapshotsPresent StorageErrorCodeType = "SnapshotsPresent"
616	// StorageErrorCodeSourceConditionNotMet ...
617	StorageErrorCodeSourceConditionNotMet StorageErrorCodeType = "SourceConditionNotMet"
618	// StorageErrorCodeSystemInUse ...
619	StorageErrorCodeSystemInUse StorageErrorCodeType = "SystemInUse"
620	// StorageErrorCodeTargetConditionNotMet ...
621	StorageErrorCodeTargetConditionNotMet StorageErrorCodeType = "TargetConditionNotMet"
622	// StorageErrorCodeUnauthorizedBlobOverwrite ...
623	StorageErrorCodeUnauthorizedBlobOverwrite StorageErrorCodeType = "UnauthorizedBlobOverwrite"
624	// StorageErrorCodeUnsupportedHeader ...
625	StorageErrorCodeUnsupportedHeader StorageErrorCodeType = "UnsupportedHeader"
626	// StorageErrorCodeUnsupportedHTTPVerb ...
627	StorageErrorCodeUnsupportedHTTPVerb StorageErrorCodeType = "UnsupportedHttpVerb"
628	// StorageErrorCodeUnsupportedQueryParameter ...
629	StorageErrorCodeUnsupportedQueryParameter StorageErrorCodeType = "UnsupportedQueryParameter"
630	// StorageErrorCodeUnsupportedXMLNode ...
631	StorageErrorCodeUnsupportedXMLNode StorageErrorCodeType = "UnsupportedXmlNode"
632)
633
634// PossibleStorageErrorCodeTypeValues returns an array of possible values for the StorageErrorCodeType const type.
635func PossibleStorageErrorCodeTypeValues() []StorageErrorCodeType {
636	return []StorageErrorCodeType{StorageErrorCodeAccountAlreadyExists, StorageErrorCodeAccountBeingCreated, StorageErrorCodeAccountIsDisabled, StorageErrorCodeAppendPositionConditionNotMet, StorageErrorCodeAuthenticationFailed, StorageErrorCodeAuthorizationFailure, StorageErrorCodeBlobAlreadyExists, StorageErrorCodeBlobArchived, StorageErrorCodeBlobBeingRehydrated, StorageErrorCodeBlobNotArchived, StorageErrorCodeBlobNotFound, StorageErrorCodeBlobOverwritten, StorageErrorCodeBlobTierInadequateForContentLength, StorageErrorCodeBlockCountExceedsLimit, StorageErrorCodeBlockListTooLong, StorageErrorCodeCannotChangeToLowerTier, StorageErrorCodeCannotVerifyCopySource, StorageErrorCodeConditionHeadersNotSupported, StorageErrorCodeConditionNotMet, StorageErrorCodeContainerAlreadyExists, StorageErrorCodeContainerBeingDeleted, StorageErrorCodeContainerDisabled, StorageErrorCodeContainerNotFound, StorageErrorCodeContentLengthLargerThanTierLimit, StorageErrorCodeCopyAcrossAccountsNotSupported, StorageErrorCodeCopyIDMismatch, StorageErrorCodeEmptyMetadataKey, StorageErrorCodeFeatureVersionMismatch, StorageErrorCodeIncrementalCopyBlobMismatch, StorageErrorCodeIncrementalCopyOfEralierVersionSnapshotNotAllowed, StorageErrorCodeIncrementalCopySourceMustBeSnapshot, StorageErrorCodeInfiniteLeaseDurationRequired, StorageErrorCodeInsufficientAccountPermissions, StorageErrorCodeInternalError, StorageErrorCodeInvalidAuthenticationInfo, StorageErrorCodeInvalidBlobOrBlock, StorageErrorCodeInvalidBlobTier, StorageErrorCodeInvalidBlobType, StorageErrorCodeInvalidBlockID, StorageErrorCodeInvalidBlockList, StorageErrorCodeInvalidHeaderValue, StorageErrorCodeInvalidHTTPVerb, StorageErrorCodeInvalidInput, StorageErrorCodeInvalidMd5, StorageErrorCodeInvalidMetadata, StorageErrorCodeInvalidOperation, StorageErrorCodeInvalidPageRange, StorageErrorCodeInvalidQueryParameterValue, StorageErrorCodeInvalidRange, StorageErrorCodeInvalidResourceName, StorageErrorCodeInvalidSourceBlobType, StorageErrorCodeInvalidSourceBlobURL, StorageErrorCodeInvalidURI, StorageErrorCodeInvalidVersionForPageBlobOperation, StorageErrorCodeInvalidXMLDocument, StorageErrorCodeInvalidXMLNodeValue, StorageErrorCodeLeaseAlreadyBroken, StorageErrorCodeLeaseAlreadyPresent, StorageErrorCodeLeaseIDMismatchWithBlobOperation, StorageErrorCodeLeaseIDMismatchWithContainerOperation, StorageErrorCodeLeaseIDMismatchWithLeaseOperation, StorageErrorCodeLeaseIDMissing, StorageErrorCodeLeaseIsBreakingAndCannotBeAcquired, StorageErrorCodeLeaseIsBreakingAndCannotBeChanged, StorageErrorCodeLeaseIsBrokenAndCannotBeRenewed, StorageErrorCodeLeaseLost, StorageErrorCodeLeaseNotPresentWithBlobOperation, StorageErrorCodeLeaseNotPresentWithContainerOperation, StorageErrorCodeLeaseNotPresentWithLeaseOperation, StorageErrorCodeMaxBlobSizeConditionNotMet, StorageErrorCodeMd5Mismatch, StorageErrorCodeMetadataTooLarge, StorageErrorCodeMissingContentLengthHeader, StorageErrorCodeMissingRequiredHeader, StorageErrorCodeMissingRequiredQueryParameter, StorageErrorCodeMissingRequiredXMLNode, StorageErrorCodeMultipleConditionHeadersNotSupported, StorageErrorCodeNone, StorageErrorCodeNoPendingCopyOperation, StorageErrorCodeOperationNotAllowedOnIncrementalCopyBlob, StorageErrorCodeOperationTimedOut, StorageErrorCodeOutOfRangeInput, StorageErrorCodeOutOfRangeQueryParameterValue, StorageErrorCodePendingCopyOperation, StorageErrorCodePreviousSnapshotCannotBeNewer, StorageErrorCodePreviousSnapshotNotFound, StorageErrorCodePreviousSnapshotOperationNotSupported, StorageErrorCodeRequestBodyTooLarge, StorageErrorCodeRequestURLFailedToParse, StorageErrorCodeResourceAlreadyExists, StorageErrorCodeResourceNotFound, StorageErrorCodeResourceTypeMismatch, StorageErrorCodeSequenceNumberConditionNotMet, StorageErrorCodeSequenceNumberIncrementTooLarge, StorageErrorCodeServerBusy, StorageErrorCodeSnaphotOperationRateExceeded, StorageErrorCodeSnapshotCountExceeded, StorageErrorCodeSnapshotsPresent, StorageErrorCodeSourceConditionNotMet, StorageErrorCodeSystemInUse, StorageErrorCodeTargetConditionNotMet, StorageErrorCodeUnauthorizedBlobOverwrite, StorageErrorCodeUnsupportedHeader, StorageErrorCodeUnsupportedHTTPVerb, StorageErrorCodeUnsupportedQueryParameter, StorageErrorCodeUnsupportedXMLNode}
637}
638
639// SyncCopyStatusType enumerates the values for sync copy status type.
640type SyncCopyStatusType string
641
642const (
643	// SyncCopyStatusNone represents an empty SyncCopyStatusType.
644	SyncCopyStatusNone SyncCopyStatusType = ""
645	// SyncCopyStatusSuccess ...
646	SyncCopyStatusSuccess SyncCopyStatusType = "success"
647)
648
649// PossibleSyncCopyStatusTypeValues returns an array of possible values for the SyncCopyStatusType const type.
650func PossibleSyncCopyStatusTypeValues() []SyncCopyStatusType {
651	return []SyncCopyStatusType{SyncCopyStatusNone, SyncCopyStatusSuccess}
652}
653
654// AccessPolicy - An Access policy
655type AccessPolicy struct {
656	// Start - the date-time the policy is active
657	Start time.Time `xml:"Start"`
658	// Expiry - the date-time the policy expires
659	Expiry time.Time `xml:"Expiry"`
660	// Permission - the permissions for the acl policy
661	Permission string `xml:"Permission"`
662}
663
664// MarshalXML implements the xml.Marshaler interface for AccessPolicy.
665func (ap AccessPolicy) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
666	ap2 := (*accessPolicy)(unsafe.Pointer(&ap))
667	return e.EncodeElement(*ap2, start)
668}
669
670// UnmarshalXML implements the xml.Unmarshaler interface for AccessPolicy.
671func (ap *AccessPolicy) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
672	ap2 := (*accessPolicy)(unsafe.Pointer(ap))
673	return d.DecodeElement(ap2, &start)
674}
675
676// AppendBlobAppendBlockFromURLResponse ...
677type AppendBlobAppendBlockFromURLResponse struct {
678	rawResponse *http.Response
679}
680
681// Response returns the raw HTTP response object.
682func (ababfur AppendBlobAppendBlockFromURLResponse) Response() *http.Response {
683	return ababfur.rawResponse
684}
685
686// StatusCode returns the HTTP status code of the response, e.g. 200.
687func (ababfur AppendBlobAppendBlockFromURLResponse) StatusCode() int {
688	return ababfur.rawResponse.StatusCode
689}
690
691// Status returns the HTTP status message of the response, e.g. "200 OK".
692func (ababfur AppendBlobAppendBlockFromURLResponse) Status() string {
693	return ababfur.rawResponse.Status
694}
695
696// BlobAppendOffset returns the value for header x-ms-blob-append-offset.
697func (ababfur AppendBlobAppendBlockFromURLResponse) BlobAppendOffset() string {
698	return ababfur.rawResponse.Header.Get("x-ms-blob-append-offset")
699}
700
701// BlobCommittedBlockCount returns the value for header x-ms-blob-committed-block-count.
702func (ababfur AppendBlobAppendBlockFromURLResponse) BlobCommittedBlockCount() int32 {
703	s := ababfur.rawResponse.Header.Get("x-ms-blob-committed-block-count")
704	if s == "" {
705		return -1
706	}
707	i, err := strconv.ParseInt(s, 10, 32)
708	if err != nil {
709		i = 0
710	}
711	return int32(i)
712}
713
714// ContentMD5 returns the value for header Content-MD5.
715func (ababfur AppendBlobAppendBlockFromURLResponse) ContentMD5() []byte {
716	s := ababfur.rawResponse.Header.Get("Content-MD5")
717	if s == "" {
718		return nil
719	}
720	b, err := base64.StdEncoding.DecodeString(s)
721	if err != nil {
722		b = nil
723	}
724	return b
725}
726
727// Date returns the value for header Date.
728func (ababfur AppendBlobAppendBlockFromURLResponse) Date() time.Time {
729	s := ababfur.rawResponse.Header.Get("Date")
730	if s == "" {
731		return time.Time{}
732	}
733	t, err := time.Parse(time.RFC1123, s)
734	if err != nil {
735		t = time.Time{}
736	}
737	return t
738}
739
740// ErrorCode returns the value for header x-ms-error-code.
741func (ababfur AppendBlobAppendBlockFromURLResponse) ErrorCode() string {
742	return ababfur.rawResponse.Header.Get("x-ms-error-code")
743}
744
745// ETag returns the value for header ETag.
746func (ababfur AppendBlobAppendBlockFromURLResponse) ETag() ETag {
747	return ETag(ababfur.rawResponse.Header.Get("ETag"))
748}
749
750// LastModified returns the value for header Last-Modified.
751func (ababfur AppendBlobAppendBlockFromURLResponse) LastModified() time.Time {
752	s := ababfur.rawResponse.Header.Get("Last-Modified")
753	if s == "" {
754		return time.Time{}
755	}
756	t, err := time.Parse(time.RFC1123, s)
757	if err != nil {
758		t = time.Time{}
759	}
760	return t
761}
762
763// RequestID returns the value for header x-ms-request-id.
764func (ababfur AppendBlobAppendBlockFromURLResponse) RequestID() string {
765	return ababfur.rawResponse.Header.Get("x-ms-request-id")
766}
767
768// Version returns the value for header x-ms-version.
769func (ababfur AppendBlobAppendBlockFromURLResponse) Version() string {
770	return ababfur.rawResponse.Header.Get("x-ms-version")
771}
772
773// AppendBlobAppendBlockResponse ...
774type AppendBlobAppendBlockResponse struct {
775	rawResponse *http.Response
776}
777
778// Response returns the raw HTTP response object.
779func (ababr AppendBlobAppendBlockResponse) Response() *http.Response {
780	return ababr.rawResponse
781}
782
783// StatusCode returns the HTTP status code of the response, e.g. 200.
784func (ababr AppendBlobAppendBlockResponse) StatusCode() int {
785	return ababr.rawResponse.StatusCode
786}
787
788// Status returns the HTTP status message of the response, e.g. "200 OK".
789func (ababr AppendBlobAppendBlockResponse) Status() string {
790	return ababr.rawResponse.Status
791}
792
793// BlobAppendOffset returns the value for header x-ms-blob-append-offset.
794func (ababr AppendBlobAppendBlockResponse) BlobAppendOffset() string {
795	return ababr.rawResponse.Header.Get("x-ms-blob-append-offset")
796}
797
798// BlobCommittedBlockCount returns the value for header x-ms-blob-committed-block-count.
799func (ababr AppendBlobAppendBlockResponse) BlobCommittedBlockCount() int32 {
800	s := ababr.rawResponse.Header.Get("x-ms-blob-committed-block-count")
801	if s == "" {
802		return -1
803	}
804	i, err := strconv.ParseInt(s, 10, 32)
805	if err != nil {
806		i = 0
807	}
808	return int32(i)
809}
810
811// ContentMD5 returns the value for header Content-MD5.
812func (ababr AppendBlobAppendBlockResponse) ContentMD5() []byte {
813	s := ababr.rawResponse.Header.Get("Content-MD5")
814	if s == "" {
815		return nil
816	}
817	b, err := base64.StdEncoding.DecodeString(s)
818	if err != nil {
819		b = nil
820	}
821	return b
822}
823
824// Date returns the value for header Date.
825func (ababr AppendBlobAppendBlockResponse) Date() time.Time {
826	s := ababr.rawResponse.Header.Get("Date")
827	if s == "" {
828		return time.Time{}
829	}
830	t, err := time.Parse(time.RFC1123, s)
831	if err != nil {
832		t = time.Time{}
833	}
834	return t
835}
836
837// ErrorCode returns the value for header x-ms-error-code.
838func (ababr AppendBlobAppendBlockResponse) ErrorCode() string {
839	return ababr.rawResponse.Header.Get("x-ms-error-code")
840}
841
842// ETag returns the value for header ETag.
843func (ababr AppendBlobAppendBlockResponse) ETag() ETag {
844	return ETag(ababr.rawResponse.Header.Get("ETag"))
845}
846
847// IsServerEncrypted returns the value for header x-ms-request-server-encrypted.
848func (ababr AppendBlobAppendBlockResponse) IsServerEncrypted() string {
849	return ababr.rawResponse.Header.Get("x-ms-request-server-encrypted")
850}
851
852// LastModified returns the value for header Last-Modified.
853func (ababr AppendBlobAppendBlockResponse) LastModified() time.Time {
854	s := ababr.rawResponse.Header.Get("Last-Modified")
855	if s == "" {
856		return time.Time{}
857	}
858	t, err := time.Parse(time.RFC1123, s)
859	if err != nil {
860		t = time.Time{}
861	}
862	return t
863}
864
865// RequestID returns the value for header x-ms-request-id.
866func (ababr AppendBlobAppendBlockResponse) RequestID() string {
867	return ababr.rawResponse.Header.Get("x-ms-request-id")
868}
869
870// Version returns the value for header x-ms-version.
871func (ababr AppendBlobAppendBlockResponse) Version() string {
872	return ababr.rawResponse.Header.Get("x-ms-version")
873}
874
875// AppendBlobCreateResponse ...
876type AppendBlobCreateResponse struct {
877	rawResponse *http.Response
878}
879
880// Response returns the raw HTTP response object.
881func (abcr AppendBlobCreateResponse) Response() *http.Response {
882	return abcr.rawResponse
883}
884
885// StatusCode returns the HTTP status code of the response, e.g. 200.
886func (abcr AppendBlobCreateResponse) StatusCode() int {
887	return abcr.rawResponse.StatusCode
888}
889
890// Status returns the HTTP status message of the response, e.g. "200 OK".
891func (abcr AppendBlobCreateResponse) Status() string {
892	return abcr.rawResponse.Status
893}
894
895// ContentMD5 returns the value for header Content-MD5.
896func (abcr AppendBlobCreateResponse) ContentMD5() []byte {
897	s := abcr.rawResponse.Header.Get("Content-MD5")
898	if s == "" {
899		return nil
900	}
901	b, err := base64.StdEncoding.DecodeString(s)
902	if err != nil {
903		b = nil
904	}
905	return b
906}
907
908// Date returns the value for header Date.
909func (abcr AppendBlobCreateResponse) Date() time.Time {
910	s := abcr.rawResponse.Header.Get("Date")
911	if s == "" {
912		return time.Time{}
913	}
914	t, err := time.Parse(time.RFC1123, s)
915	if err != nil {
916		t = time.Time{}
917	}
918	return t
919}
920
921// ErrorCode returns the value for header x-ms-error-code.
922func (abcr AppendBlobCreateResponse) ErrorCode() string {
923	return abcr.rawResponse.Header.Get("x-ms-error-code")
924}
925
926// ETag returns the value for header ETag.
927func (abcr AppendBlobCreateResponse) ETag() ETag {
928	return ETag(abcr.rawResponse.Header.Get("ETag"))
929}
930
931// IsServerEncrypted returns the value for header x-ms-request-server-encrypted.
932func (abcr AppendBlobCreateResponse) IsServerEncrypted() string {
933	return abcr.rawResponse.Header.Get("x-ms-request-server-encrypted")
934}
935
936// LastModified returns the value for header Last-Modified.
937func (abcr AppendBlobCreateResponse) LastModified() time.Time {
938	s := abcr.rawResponse.Header.Get("Last-Modified")
939	if s == "" {
940		return time.Time{}
941	}
942	t, err := time.Parse(time.RFC1123, s)
943	if err != nil {
944		t = time.Time{}
945	}
946	return t
947}
948
949// RequestID returns the value for header x-ms-request-id.
950func (abcr AppendBlobCreateResponse) RequestID() string {
951	return abcr.rawResponse.Header.Get("x-ms-request-id")
952}
953
954// Version returns the value for header x-ms-version.
955func (abcr AppendBlobCreateResponse) Version() string {
956	return abcr.rawResponse.Header.Get("x-ms-version")
957}
958
959// BlobAbortCopyFromURLResponse ...
960type BlobAbortCopyFromURLResponse struct {
961	rawResponse *http.Response
962}
963
964// Response returns the raw HTTP response object.
965func (bacfur BlobAbortCopyFromURLResponse) Response() *http.Response {
966	return bacfur.rawResponse
967}
968
969// StatusCode returns the HTTP status code of the response, e.g. 200.
970func (bacfur BlobAbortCopyFromURLResponse) StatusCode() int {
971	return bacfur.rawResponse.StatusCode
972}
973
974// Status returns the HTTP status message of the response, e.g. "200 OK".
975func (bacfur BlobAbortCopyFromURLResponse) Status() string {
976	return bacfur.rawResponse.Status
977}
978
979// Date returns the value for header Date.
980func (bacfur BlobAbortCopyFromURLResponse) Date() time.Time {
981	s := bacfur.rawResponse.Header.Get("Date")
982	if s == "" {
983		return time.Time{}
984	}
985	t, err := time.Parse(time.RFC1123, s)
986	if err != nil {
987		t = time.Time{}
988	}
989	return t
990}
991
992// ErrorCode returns the value for header x-ms-error-code.
993func (bacfur BlobAbortCopyFromURLResponse) ErrorCode() string {
994	return bacfur.rawResponse.Header.Get("x-ms-error-code")
995}
996
997// RequestID returns the value for header x-ms-request-id.
998func (bacfur BlobAbortCopyFromURLResponse) RequestID() string {
999	return bacfur.rawResponse.Header.Get("x-ms-request-id")
1000}
1001
1002// Version returns the value for header x-ms-version.
1003func (bacfur BlobAbortCopyFromURLResponse) Version() string {
1004	return bacfur.rawResponse.Header.Get("x-ms-version")
1005}
1006
1007// BlobAcquireLeaseResponse ...
1008type BlobAcquireLeaseResponse struct {
1009	rawResponse *http.Response
1010}
1011
1012// Response returns the raw HTTP response object.
1013func (balr BlobAcquireLeaseResponse) Response() *http.Response {
1014	return balr.rawResponse
1015}
1016
1017// StatusCode returns the HTTP status code of the response, e.g. 200.
1018func (balr BlobAcquireLeaseResponse) StatusCode() int {
1019	return balr.rawResponse.StatusCode
1020}
1021
1022// Status returns the HTTP status message of the response, e.g. "200 OK".
1023func (balr BlobAcquireLeaseResponse) Status() string {
1024	return balr.rawResponse.Status
1025}
1026
1027// Date returns the value for header Date.
1028func (balr BlobAcquireLeaseResponse) Date() time.Time {
1029	s := balr.rawResponse.Header.Get("Date")
1030	if s == "" {
1031		return time.Time{}
1032	}
1033	t, err := time.Parse(time.RFC1123, s)
1034	if err != nil {
1035		t = time.Time{}
1036	}
1037	return t
1038}
1039
1040// ErrorCode returns the value for header x-ms-error-code.
1041func (balr BlobAcquireLeaseResponse) ErrorCode() string {
1042	return balr.rawResponse.Header.Get("x-ms-error-code")
1043}
1044
1045// ETag returns the value for header ETag.
1046func (balr BlobAcquireLeaseResponse) ETag() ETag {
1047	return ETag(balr.rawResponse.Header.Get("ETag"))
1048}
1049
1050// LastModified returns the value for header Last-Modified.
1051func (balr BlobAcquireLeaseResponse) LastModified() time.Time {
1052	s := balr.rawResponse.Header.Get("Last-Modified")
1053	if s == "" {
1054		return time.Time{}
1055	}
1056	t, err := time.Parse(time.RFC1123, s)
1057	if err != nil {
1058		t = time.Time{}
1059	}
1060	return t
1061}
1062
1063// LeaseID returns the value for header x-ms-lease-id.
1064func (balr BlobAcquireLeaseResponse) LeaseID() string {
1065	return balr.rawResponse.Header.Get("x-ms-lease-id")
1066}
1067
1068// RequestID returns the value for header x-ms-request-id.
1069func (balr BlobAcquireLeaseResponse) RequestID() string {
1070	return balr.rawResponse.Header.Get("x-ms-request-id")
1071}
1072
1073// Version returns the value for header x-ms-version.
1074func (balr BlobAcquireLeaseResponse) Version() string {
1075	return balr.rawResponse.Header.Get("x-ms-version")
1076}
1077
1078// BlobBreakLeaseResponse ...
1079type BlobBreakLeaseResponse struct {
1080	rawResponse *http.Response
1081}
1082
1083// Response returns the raw HTTP response object.
1084func (bblr BlobBreakLeaseResponse) Response() *http.Response {
1085	return bblr.rawResponse
1086}
1087
1088// StatusCode returns the HTTP status code of the response, e.g. 200.
1089func (bblr BlobBreakLeaseResponse) StatusCode() int {
1090	return bblr.rawResponse.StatusCode
1091}
1092
1093// Status returns the HTTP status message of the response, e.g. "200 OK".
1094func (bblr BlobBreakLeaseResponse) Status() string {
1095	return bblr.rawResponse.Status
1096}
1097
1098// Date returns the value for header Date.
1099func (bblr BlobBreakLeaseResponse) Date() time.Time {
1100	s := bblr.rawResponse.Header.Get("Date")
1101	if s == "" {
1102		return time.Time{}
1103	}
1104	t, err := time.Parse(time.RFC1123, s)
1105	if err != nil {
1106		t = time.Time{}
1107	}
1108	return t
1109}
1110
1111// ErrorCode returns the value for header x-ms-error-code.
1112func (bblr BlobBreakLeaseResponse) ErrorCode() string {
1113	return bblr.rawResponse.Header.Get("x-ms-error-code")
1114}
1115
1116// ETag returns the value for header ETag.
1117func (bblr BlobBreakLeaseResponse) ETag() ETag {
1118	return ETag(bblr.rawResponse.Header.Get("ETag"))
1119}
1120
1121// LastModified returns the value for header Last-Modified.
1122func (bblr BlobBreakLeaseResponse) LastModified() time.Time {
1123	s := bblr.rawResponse.Header.Get("Last-Modified")
1124	if s == "" {
1125		return time.Time{}
1126	}
1127	t, err := time.Parse(time.RFC1123, s)
1128	if err != nil {
1129		t = time.Time{}
1130	}
1131	return t
1132}
1133
1134// LeaseTime returns the value for header x-ms-lease-time.
1135func (bblr BlobBreakLeaseResponse) LeaseTime() int32 {
1136	s := bblr.rawResponse.Header.Get("x-ms-lease-time")
1137	if s == "" {
1138		return -1
1139	}
1140	i, err := strconv.ParseInt(s, 10, 32)
1141	if err != nil {
1142		i = 0
1143	}
1144	return int32(i)
1145}
1146
1147// RequestID returns the value for header x-ms-request-id.
1148func (bblr BlobBreakLeaseResponse) RequestID() string {
1149	return bblr.rawResponse.Header.Get("x-ms-request-id")
1150}
1151
1152// Version returns the value for header x-ms-version.
1153func (bblr BlobBreakLeaseResponse) Version() string {
1154	return bblr.rawResponse.Header.Get("x-ms-version")
1155}
1156
1157// BlobChangeLeaseResponse ...
1158type BlobChangeLeaseResponse struct {
1159	rawResponse *http.Response
1160}
1161
1162// Response returns the raw HTTP response object.
1163func (bclr BlobChangeLeaseResponse) Response() *http.Response {
1164	return bclr.rawResponse
1165}
1166
1167// StatusCode returns the HTTP status code of the response, e.g. 200.
1168func (bclr BlobChangeLeaseResponse) StatusCode() int {
1169	return bclr.rawResponse.StatusCode
1170}
1171
1172// Status returns the HTTP status message of the response, e.g. "200 OK".
1173func (bclr BlobChangeLeaseResponse) Status() string {
1174	return bclr.rawResponse.Status
1175}
1176
1177// Date returns the value for header Date.
1178func (bclr BlobChangeLeaseResponse) Date() time.Time {
1179	s := bclr.rawResponse.Header.Get("Date")
1180	if s == "" {
1181		return time.Time{}
1182	}
1183	t, err := time.Parse(time.RFC1123, s)
1184	if err != nil {
1185		t = time.Time{}
1186	}
1187	return t
1188}
1189
1190// ErrorCode returns the value for header x-ms-error-code.
1191func (bclr BlobChangeLeaseResponse) ErrorCode() string {
1192	return bclr.rawResponse.Header.Get("x-ms-error-code")
1193}
1194
1195// ETag returns the value for header ETag.
1196func (bclr BlobChangeLeaseResponse) ETag() ETag {
1197	return ETag(bclr.rawResponse.Header.Get("ETag"))
1198}
1199
1200// LastModified returns the value for header Last-Modified.
1201func (bclr BlobChangeLeaseResponse) LastModified() time.Time {
1202	s := bclr.rawResponse.Header.Get("Last-Modified")
1203	if s == "" {
1204		return time.Time{}
1205	}
1206	t, err := time.Parse(time.RFC1123, s)
1207	if err != nil {
1208		t = time.Time{}
1209	}
1210	return t
1211}
1212
1213// LeaseID returns the value for header x-ms-lease-id.
1214func (bclr BlobChangeLeaseResponse) LeaseID() string {
1215	return bclr.rawResponse.Header.Get("x-ms-lease-id")
1216}
1217
1218// RequestID returns the value for header x-ms-request-id.
1219func (bclr BlobChangeLeaseResponse) RequestID() string {
1220	return bclr.rawResponse.Header.Get("x-ms-request-id")
1221}
1222
1223// Version returns the value for header x-ms-version.
1224func (bclr BlobChangeLeaseResponse) Version() string {
1225	return bclr.rawResponse.Header.Get("x-ms-version")
1226}
1227
1228// BlobCopyFromURLResponse ...
1229type BlobCopyFromURLResponse struct {
1230	rawResponse *http.Response
1231}
1232
1233// Response returns the raw HTTP response object.
1234func (bcfur BlobCopyFromURLResponse) Response() *http.Response {
1235	return bcfur.rawResponse
1236}
1237
1238// StatusCode returns the HTTP status code of the response, e.g. 200.
1239func (bcfur BlobCopyFromURLResponse) StatusCode() int {
1240	return bcfur.rawResponse.StatusCode
1241}
1242
1243// Status returns the HTTP status message of the response, e.g. "200 OK".
1244func (bcfur BlobCopyFromURLResponse) Status() string {
1245	return bcfur.rawResponse.Status
1246}
1247
1248// CopyID returns the value for header x-ms-copy-id.
1249func (bcfur BlobCopyFromURLResponse) CopyID() string {
1250	return bcfur.rawResponse.Header.Get("x-ms-copy-id")
1251}
1252
1253// CopyStatus returns the value for header x-ms-copy-status.
1254func (bcfur BlobCopyFromURLResponse) CopyStatus() SyncCopyStatusType {
1255	return SyncCopyStatusType(bcfur.rawResponse.Header.Get("x-ms-copy-status"))
1256}
1257
1258// Date returns the value for header Date.
1259func (bcfur BlobCopyFromURLResponse) Date() time.Time {
1260	s := bcfur.rawResponse.Header.Get("Date")
1261	if s == "" {
1262		return time.Time{}
1263	}
1264	t, err := time.Parse(time.RFC1123, s)
1265	if err != nil {
1266		t = time.Time{}
1267	}
1268	return t
1269}
1270
1271// ErrorCode returns the value for header x-ms-error-code.
1272func (bcfur BlobCopyFromURLResponse) ErrorCode() string {
1273	return bcfur.rawResponse.Header.Get("x-ms-error-code")
1274}
1275
1276// ETag returns the value for header ETag.
1277func (bcfur BlobCopyFromURLResponse) ETag() ETag {
1278	return ETag(bcfur.rawResponse.Header.Get("ETag"))
1279}
1280
1281// LastModified returns the value for header Last-Modified.
1282func (bcfur BlobCopyFromURLResponse) LastModified() time.Time {
1283	s := bcfur.rawResponse.Header.Get("Last-Modified")
1284	if s == "" {
1285		return time.Time{}
1286	}
1287	t, err := time.Parse(time.RFC1123, s)
1288	if err != nil {
1289		t = time.Time{}
1290	}
1291	return t
1292}
1293
1294// RequestID returns the value for header x-ms-request-id.
1295func (bcfur BlobCopyFromURLResponse) RequestID() string {
1296	return bcfur.rawResponse.Header.Get("x-ms-request-id")
1297}
1298
1299// Version returns the value for header x-ms-version.
1300func (bcfur BlobCopyFromURLResponse) Version() string {
1301	return bcfur.rawResponse.Header.Get("x-ms-version")
1302}
1303
1304// BlobCreateSnapshotResponse ...
1305type BlobCreateSnapshotResponse struct {
1306	rawResponse *http.Response
1307}
1308
1309// Response returns the raw HTTP response object.
1310func (bcsr BlobCreateSnapshotResponse) Response() *http.Response {
1311	return bcsr.rawResponse
1312}
1313
1314// StatusCode returns the HTTP status code of the response, e.g. 200.
1315func (bcsr BlobCreateSnapshotResponse) StatusCode() int {
1316	return bcsr.rawResponse.StatusCode
1317}
1318
1319// Status returns the HTTP status message of the response, e.g. "200 OK".
1320func (bcsr BlobCreateSnapshotResponse) Status() string {
1321	return bcsr.rawResponse.Status
1322}
1323
1324// Date returns the value for header Date.
1325func (bcsr BlobCreateSnapshotResponse) Date() time.Time {
1326	s := bcsr.rawResponse.Header.Get("Date")
1327	if s == "" {
1328		return time.Time{}
1329	}
1330	t, err := time.Parse(time.RFC1123, s)
1331	if err != nil {
1332		t = time.Time{}
1333	}
1334	return t
1335}
1336
1337// ErrorCode returns the value for header x-ms-error-code.
1338func (bcsr BlobCreateSnapshotResponse) ErrorCode() string {
1339	return bcsr.rawResponse.Header.Get("x-ms-error-code")
1340}
1341
1342// ETag returns the value for header ETag.
1343func (bcsr BlobCreateSnapshotResponse) ETag() ETag {
1344	return ETag(bcsr.rawResponse.Header.Get("ETag"))
1345}
1346
1347// LastModified returns the value for header Last-Modified.
1348func (bcsr BlobCreateSnapshotResponse) LastModified() time.Time {
1349	s := bcsr.rawResponse.Header.Get("Last-Modified")
1350	if s == "" {
1351		return time.Time{}
1352	}
1353	t, err := time.Parse(time.RFC1123, s)
1354	if err != nil {
1355		t = time.Time{}
1356	}
1357	return t
1358}
1359
1360// RequestID returns the value for header x-ms-request-id.
1361func (bcsr BlobCreateSnapshotResponse) RequestID() string {
1362	return bcsr.rawResponse.Header.Get("x-ms-request-id")
1363}
1364
1365// Snapshot returns the value for header x-ms-snapshot.
1366func (bcsr BlobCreateSnapshotResponse) Snapshot() string {
1367	return bcsr.rawResponse.Header.Get("x-ms-snapshot")
1368}
1369
1370// Version returns the value for header x-ms-version.
1371func (bcsr BlobCreateSnapshotResponse) Version() string {
1372	return bcsr.rawResponse.Header.Get("x-ms-version")
1373}
1374
1375// BlobDeleteResponse ...
1376type BlobDeleteResponse struct {
1377	rawResponse *http.Response
1378}
1379
1380// Response returns the raw HTTP response object.
1381func (bdr BlobDeleteResponse) Response() *http.Response {
1382	return bdr.rawResponse
1383}
1384
1385// StatusCode returns the HTTP status code of the response, e.g. 200.
1386func (bdr BlobDeleteResponse) StatusCode() int {
1387	return bdr.rawResponse.StatusCode
1388}
1389
1390// Status returns the HTTP status message of the response, e.g. "200 OK".
1391func (bdr BlobDeleteResponse) Status() string {
1392	return bdr.rawResponse.Status
1393}
1394
1395// Date returns the value for header Date.
1396func (bdr BlobDeleteResponse) Date() time.Time {
1397	s := bdr.rawResponse.Header.Get("Date")
1398	if s == "" {
1399		return time.Time{}
1400	}
1401	t, err := time.Parse(time.RFC1123, s)
1402	if err != nil {
1403		t = time.Time{}
1404	}
1405	return t
1406}
1407
1408// ErrorCode returns the value for header x-ms-error-code.
1409func (bdr BlobDeleteResponse) ErrorCode() string {
1410	return bdr.rawResponse.Header.Get("x-ms-error-code")
1411}
1412
1413// RequestID returns the value for header x-ms-request-id.
1414func (bdr BlobDeleteResponse) RequestID() string {
1415	return bdr.rawResponse.Header.Get("x-ms-request-id")
1416}
1417
1418// Version returns the value for header x-ms-version.
1419func (bdr BlobDeleteResponse) Version() string {
1420	return bdr.rawResponse.Header.Get("x-ms-version")
1421}
1422
1423// BlobFlatListSegment ...
1424type BlobFlatListSegment struct {
1425	// XMLName is used for marshalling and is subject to removal in a future release.
1426	XMLName   xml.Name   `xml:"Blobs"`
1427	BlobItems []BlobItem `xml:"Blob"`
1428}
1429
1430// BlobGetAccountInfoResponse ...
1431type BlobGetAccountInfoResponse struct {
1432	rawResponse *http.Response
1433}
1434
1435// Response returns the raw HTTP response object.
1436func (bgair BlobGetAccountInfoResponse) Response() *http.Response {
1437	return bgair.rawResponse
1438}
1439
1440// StatusCode returns the HTTP status code of the response, e.g. 200.
1441func (bgair BlobGetAccountInfoResponse) StatusCode() int {
1442	return bgair.rawResponse.StatusCode
1443}
1444
1445// Status returns the HTTP status message of the response, e.g. "200 OK".
1446func (bgair BlobGetAccountInfoResponse) Status() string {
1447	return bgair.rawResponse.Status
1448}
1449
1450// AccountKind returns the value for header x-ms-account-kind.
1451func (bgair BlobGetAccountInfoResponse) AccountKind() AccountKindType {
1452	return AccountKindType(bgair.rawResponse.Header.Get("x-ms-account-kind"))
1453}
1454
1455// Date returns the value for header Date.
1456func (bgair BlobGetAccountInfoResponse) Date() time.Time {
1457	s := bgair.rawResponse.Header.Get("Date")
1458	if s == "" {
1459		return time.Time{}
1460	}
1461	t, err := time.Parse(time.RFC1123, s)
1462	if err != nil {
1463		t = time.Time{}
1464	}
1465	return t
1466}
1467
1468// ErrorCode returns the value for header x-ms-error-code.
1469func (bgair BlobGetAccountInfoResponse) ErrorCode() string {
1470	return bgair.rawResponse.Header.Get("x-ms-error-code")
1471}
1472
1473// RequestID returns the value for header x-ms-request-id.
1474func (bgair BlobGetAccountInfoResponse) RequestID() string {
1475	return bgair.rawResponse.Header.Get("x-ms-request-id")
1476}
1477
1478// SkuName returns the value for header x-ms-sku-name.
1479func (bgair BlobGetAccountInfoResponse) SkuName() SkuNameType {
1480	return SkuNameType(bgair.rawResponse.Header.Get("x-ms-sku-name"))
1481}
1482
1483// Version returns the value for header x-ms-version.
1484func (bgair BlobGetAccountInfoResponse) Version() string {
1485	return bgair.rawResponse.Header.Get("x-ms-version")
1486}
1487
1488// BlobGetPropertiesResponse ...
1489type BlobGetPropertiesResponse struct {
1490	rawResponse *http.Response
1491}
1492
1493// NewMetadata returns user-defined key/value pairs.
1494func (bgpr BlobGetPropertiesResponse) NewMetadata() Metadata {
1495	md := Metadata{}
1496	for k, v := range bgpr.rawResponse.Header {
1497		if len(k) > mdPrefixLen {
1498			if prefix := k[0:mdPrefixLen]; strings.EqualFold(prefix, mdPrefix) {
1499				md[strings.ToLower(k[mdPrefixLen:])] = v[0]
1500			}
1501		}
1502	}
1503	return md
1504}
1505
1506// Response returns the raw HTTP response object.
1507func (bgpr BlobGetPropertiesResponse) Response() *http.Response {
1508	return bgpr.rawResponse
1509}
1510
1511// StatusCode returns the HTTP status code of the response, e.g. 200.
1512func (bgpr BlobGetPropertiesResponse) StatusCode() int {
1513	return bgpr.rawResponse.StatusCode
1514}
1515
1516// Status returns the HTTP status message of the response, e.g. "200 OK".
1517func (bgpr BlobGetPropertiesResponse) Status() string {
1518	return bgpr.rawResponse.Status
1519}
1520
1521// AcceptRanges returns the value for header Accept-Ranges.
1522func (bgpr BlobGetPropertiesResponse) AcceptRanges() string {
1523	return bgpr.rawResponse.Header.Get("Accept-Ranges")
1524}
1525
1526// AccessTier returns the value for header x-ms-access-tier.
1527func (bgpr BlobGetPropertiesResponse) AccessTier() string {
1528	return bgpr.rawResponse.Header.Get("x-ms-access-tier")
1529}
1530
1531// AccessTierChangeTime returns the value for header x-ms-access-tier-change-time.
1532func (bgpr BlobGetPropertiesResponse) AccessTierChangeTime() time.Time {
1533	s := bgpr.rawResponse.Header.Get("x-ms-access-tier-change-time")
1534	if s == "" {
1535		return time.Time{}
1536	}
1537	t, err := time.Parse(time.RFC1123, s)
1538	if err != nil {
1539		t = time.Time{}
1540	}
1541	return t
1542}
1543
1544// AccessTierInferred returns the value for header x-ms-access-tier-inferred.
1545func (bgpr BlobGetPropertiesResponse) AccessTierInferred() string {
1546	return bgpr.rawResponse.Header.Get("x-ms-access-tier-inferred")
1547}
1548
1549// ArchiveStatus returns the value for header x-ms-archive-status.
1550func (bgpr BlobGetPropertiesResponse) ArchiveStatus() string {
1551	return bgpr.rawResponse.Header.Get("x-ms-archive-status")
1552}
1553
1554// BlobCommittedBlockCount returns the value for header x-ms-blob-committed-block-count.
1555func (bgpr BlobGetPropertiesResponse) BlobCommittedBlockCount() int32 {
1556	s := bgpr.rawResponse.Header.Get("x-ms-blob-committed-block-count")
1557	if s == "" {
1558		return -1
1559	}
1560	i, err := strconv.ParseInt(s, 10, 32)
1561	if err != nil {
1562		i = 0
1563	}
1564	return int32(i)
1565}
1566
1567// BlobSequenceNumber returns the value for header x-ms-blob-sequence-number.
1568func (bgpr BlobGetPropertiesResponse) BlobSequenceNumber() int64 {
1569	s := bgpr.rawResponse.Header.Get("x-ms-blob-sequence-number")
1570	if s == "" {
1571		return -1
1572	}
1573	i, err := strconv.ParseInt(s, 10, 64)
1574	if err != nil {
1575		i = 0
1576	}
1577	return i
1578}
1579
1580// BlobType returns the value for header x-ms-blob-type.
1581func (bgpr BlobGetPropertiesResponse) BlobType() BlobType {
1582	return BlobType(bgpr.rawResponse.Header.Get("x-ms-blob-type"))
1583}
1584
1585// CacheControl returns the value for header Cache-Control.
1586func (bgpr BlobGetPropertiesResponse) CacheControl() string {
1587	return bgpr.rawResponse.Header.Get("Cache-Control")
1588}
1589
1590// ContentDisposition returns the value for header Content-Disposition.
1591func (bgpr BlobGetPropertiesResponse) ContentDisposition() string {
1592	return bgpr.rawResponse.Header.Get("Content-Disposition")
1593}
1594
1595// ContentEncoding returns the value for header Content-Encoding.
1596func (bgpr BlobGetPropertiesResponse) ContentEncoding() string {
1597	return bgpr.rawResponse.Header.Get("Content-Encoding")
1598}
1599
1600// ContentLanguage returns the value for header Content-Language.
1601func (bgpr BlobGetPropertiesResponse) ContentLanguage() string {
1602	return bgpr.rawResponse.Header.Get("Content-Language")
1603}
1604
1605// ContentLength returns the value for header Content-Length.
1606func (bgpr BlobGetPropertiesResponse) ContentLength() int64 {
1607	s := bgpr.rawResponse.Header.Get("Content-Length")
1608	if s == "" {
1609		return -1
1610	}
1611	i, err := strconv.ParseInt(s, 10, 64)
1612	if err != nil {
1613		i = 0
1614	}
1615	return i
1616}
1617
1618// ContentMD5 returns the value for header Content-MD5.
1619func (bgpr BlobGetPropertiesResponse) ContentMD5() []byte {
1620	s := bgpr.rawResponse.Header.Get("Content-MD5")
1621	if s == "" {
1622		return nil
1623	}
1624	b, err := base64.StdEncoding.DecodeString(s)
1625	if err != nil {
1626		b = nil
1627	}
1628	return b
1629}
1630
1631// ContentType returns the value for header Content-Type.
1632func (bgpr BlobGetPropertiesResponse) ContentType() string {
1633	return bgpr.rawResponse.Header.Get("Content-Type")
1634}
1635
1636// CopyCompletionTime returns the value for header x-ms-copy-completion-time.
1637func (bgpr BlobGetPropertiesResponse) CopyCompletionTime() time.Time {
1638	s := bgpr.rawResponse.Header.Get("x-ms-copy-completion-time")
1639	if s == "" {
1640		return time.Time{}
1641	}
1642	t, err := time.Parse(time.RFC1123, s)
1643	if err != nil {
1644		t = time.Time{}
1645	}
1646	return t
1647}
1648
1649// CopyID returns the value for header x-ms-copy-id.
1650func (bgpr BlobGetPropertiesResponse) CopyID() string {
1651	return bgpr.rawResponse.Header.Get("x-ms-copy-id")
1652}
1653
1654// CopyProgress returns the value for header x-ms-copy-progress.
1655func (bgpr BlobGetPropertiesResponse) CopyProgress() string {
1656	return bgpr.rawResponse.Header.Get("x-ms-copy-progress")
1657}
1658
1659// CopySource returns the value for header x-ms-copy-source.
1660func (bgpr BlobGetPropertiesResponse) CopySource() string {
1661	return bgpr.rawResponse.Header.Get("x-ms-copy-source")
1662}
1663
1664// CopyStatus returns the value for header x-ms-copy-status.
1665func (bgpr BlobGetPropertiesResponse) CopyStatus() CopyStatusType {
1666	return CopyStatusType(bgpr.rawResponse.Header.Get("x-ms-copy-status"))
1667}
1668
1669// CopyStatusDescription returns the value for header x-ms-copy-status-description.
1670func (bgpr BlobGetPropertiesResponse) CopyStatusDescription() string {
1671	return bgpr.rawResponse.Header.Get("x-ms-copy-status-description")
1672}
1673
1674// CreationTime returns the value for header x-ms-creation-time.
1675func (bgpr BlobGetPropertiesResponse) CreationTime() time.Time {
1676	s := bgpr.rawResponse.Header.Get("x-ms-creation-time")
1677	if s == "" {
1678		return time.Time{}
1679	}
1680	t, err := time.Parse(time.RFC1123, s)
1681	if err != nil {
1682		t = time.Time{}
1683	}
1684	return t
1685}
1686
1687// Date returns the value for header Date.
1688func (bgpr BlobGetPropertiesResponse) Date() time.Time {
1689	s := bgpr.rawResponse.Header.Get("Date")
1690	if s == "" {
1691		return time.Time{}
1692	}
1693	t, err := time.Parse(time.RFC1123, s)
1694	if err != nil {
1695		t = time.Time{}
1696	}
1697	return t
1698}
1699
1700// DestinationSnapshot returns the value for header x-ms-copy-destination-snapshot.
1701func (bgpr BlobGetPropertiesResponse) DestinationSnapshot() string {
1702	return bgpr.rawResponse.Header.Get("x-ms-copy-destination-snapshot")
1703}
1704
1705// ErrorCode returns the value for header x-ms-error-code.
1706func (bgpr BlobGetPropertiesResponse) ErrorCode() string {
1707	return bgpr.rawResponse.Header.Get("x-ms-error-code")
1708}
1709
1710// ETag returns the value for header ETag.
1711func (bgpr BlobGetPropertiesResponse) ETag() ETag {
1712	return ETag(bgpr.rawResponse.Header.Get("ETag"))
1713}
1714
1715// IsIncrementalCopy returns the value for header x-ms-incremental-copy.
1716func (bgpr BlobGetPropertiesResponse) IsIncrementalCopy() string {
1717	return bgpr.rawResponse.Header.Get("x-ms-incremental-copy")
1718}
1719
1720// IsServerEncrypted returns the value for header x-ms-server-encrypted.
1721func (bgpr BlobGetPropertiesResponse) IsServerEncrypted() string {
1722	return bgpr.rawResponse.Header.Get("x-ms-server-encrypted")
1723}
1724
1725// LastModified returns the value for header Last-Modified.
1726func (bgpr BlobGetPropertiesResponse) LastModified() time.Time {
1727	s := bgpr.rawResponse.Header.Get("Last-Modified")
1728	if s == "" {
1729		return time.Time{}
1730	}
1731	t, err := time.Parse(time.RFC1123, s)
1732	if err != nil {
1733		t = time.Time{}
1734	}
1735	return t
1736}
1737
1738// LeaseDuration returns the value for header x-ms-lease-duration.
1739func (bgpr BlobGetPropertiesResponse) LeaseDuration() LeaseDurationType {
1740	return LeaseDurationType(bgpr.rawResponse.Header.Get("x-ms-lease-duration"))
1741}
1742
1743// LeaseState returns the value for header x-ms-lease-state.
1744func (bgpr BlobGetPropertiesResponse) LeaseState() LeaseStateType {
1745	return LeaseStateType(bgpr.rawResponse.Header.Get("x-ms-lease-state"))
1746}
1747
1748// LeaseStatus returns the value for header x-ms-lease-status.
1749func (bgpr BlobGetPropertiesResponse) LeaseStatus() LeaseStatusType {
1750	return LeaseStatusType(bgpr.rawResponse.Header.Get("x-ms-lease-status"))
1751}
1752
1753// RequestID returns the value for header x-ms-request-id.
1754func (bgpr BlobGetPropertiesResponse) RequestID() string {
1755	return bgpr.rawResponse.Header.Get("x-ms-request-id")
1756}
1757
1758// Version returns the value for header x-ms-version.
1759func (bgpr BlobGetPropertiesResponse) Version() string {
1760	return bgpr.rawResponse.Header.Get("x-ms-version")
1761}
1762
1763// BlobHierarchyListSegment ...
1764type BlobHierarchyListSegment struct {
1765	// XMLName is used for marshalling and is subject to removal in a future release.
1766	XMLName      xml.Name     `xml:"Blobs"`
1767	BlobPrefixes []BlobPrefix `xml:"BlobPrefix"`
1768	BlobItems    []BlobItem   `xml:"Blob"`
1769}
1770
1771// BlobItem - An Azure Storage blob
1772type BlobItem struct {
1773	// XMLName is used for marshalling and is subject to removal in a future release.
1774	XMLName    xml.Name       `xml:"Blob"`
1775	Name       string         `xml:"Name"`
1776	Deleted    bool           `xml:"Deleted"`
1777	Snapshot   string         `xml:"Snapshot"`
1778	Properties BlobProperties `xml:"Properties"`
1779	Metadata   Metadata       `xml:"Metadata"`
1780}
1781
1782// BlobPrefix ...
1783type BlobPrefix struct {
1784	Name string `xml:"Name"`
1785}
1786
1787// BlobProperties - Properties of a blob
1788type BlobProperties struct {
1789	// XMLName is used for marshalling and is subject to removal in a future release.
1790	XMLName      xml.Name   `xml:"Properties"`
1791	CreationTime *time.Time `xml:"Creation-Time"`
1792	LastModified time.Time  `xml:"Last-Modified"`
1793	Etag         ETag       `xml:"Etag"`
1794	// ContentLength - Size in bytes
1795	ContentLength      *int64  `xml:"Content-Length"`
1796	ContentType        *string `xml:"Content-Type"`
1797	ContentEncoding    *string `xml:"Content-Encoding"`
1798	ContentLanguage    *string `xml:"Content-Language"`
1799	ContentMD5         []byte  `xml:"Content-MD5"`
1800	ContentDisposition *string `xml:"Content-Disposition"`
1801	CacheControl       *string `xml:"Cache-Control"`
1802	BlobSequenceNumber *int64  `xml:"x-ms-blob-sequence-number"`
1803	// BlobType - Possible values include: 'BlobBlockBlob', 'BlobPageBlob', 'BlobAppendBlob', 'BlobNone'
1804	BlobType BlobType `xml:"BlobType"`
1805	// LeaseStatus - Possible values include: 'LeaseStatusLocked', 'LeaseStatusUnlocked', 'LeaseStatusNone'
1806	LeaseStatus LeaseStatusType `xml:"LeaseStatus"`
1807	// LeaseState - Possible values include: 'LeaseStateAvailable', 'LeaseStateLeased', 'LeaseStateExpired', 'LeaseStateBreaking', 'LeaseStateBroken', 'LeaseStateNone'
1808	LeaseState LeaseStateType `xml:"LeaseState"`
1809	// LeaseDuration - Possible values include: 'LeaseDurationInfinite', 'LeaseDurationFixed', 'LeaseDurationNone'
1810	LeaseDuration LeaseDurationType `xml:"LeaseDuration"`
1811	CopyID        *string           `xml:"CopyId"`
1812	// CopyStatus - Possible values include: 'CopyStatusPending', 'CopyStatusSuccess', 'CopyStatusAborted', 'CopyStatusFailed', 'CopyStatusNone'
1813	CopyStatus             CopyStatusType `xml:"CopyStatus"`
1814	CopySource             *string        `xml:"CopySource"`
1815	CopyProgress           *string        `xml:"CopyProgress"`
1816	CopyCompletionTime     *time.Time     `xml:"CopyCompletionTime"`
1817	CopyStatusDescription  *string        `xml:"CopyStatusDescription"`
1818	ServerEncrypted        *bool          `xml:"ServerEncrypted"`
1819	IncrementalCopy        *bool          `xml:"IncrementalCopy"`
1820	DestinationSnapshot    *string        `xml:"DestinationSnapshot"`
1821	DeletedTime            *time.Time     `xml:"DeletedTime"`
1822	RemainingRetentionDays *int32         `xml:"RemainingRetentionDays"`
1823	// AccessTier - Possible values include: 'AccessTierP4', 'AccessTierP6', 'AccessTierP10', 'AccessTierP20', 'AccessTierP30', 'AccessTierP40', 'AccessTierP50', 'AccessTierHot', 'AccessTierCool', 'AccessTierArchive', 'AccessTierNone'
1824	AccessTier         AccessTierType `xml:"AccessTier"`
1825	AccessTierInferred *bool          `xml:"AccessTierInferred"`
1826	// ArchiveStatus - Possible values include: 'ArchiveStatusRehydratePendingToHot', 'ArchiveStatusRehydratePendingToCool', 'ArchiveStatusNone'
1827	ArchiveStatus        ArchiveStatusType `xml:"ArchiveStatus"`
1828	AccessTierChangeTime *time.Time        `xml:"AccessTierChangeTime"`
1829}
1830
1831// MarshalXML implements the xml.Marshaler interface for BlobProperties.
1832func (bp BlobProperties) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
1833	bp2 := (*blobProperties)(unsafe.Pointer(&bp))
1834	return e.EncodeElement(*bp2, start)
1835}
1836
1837// UnmarshalXML implements the xml.Unmarshaler interface for BlobProperties.
1838func (bp *BlobProperties) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
1839	bp2 := (*blobProperties)(unsafe.Pointer(bp))
1840	return d.DecodeElement(bp2, &start)
1841}
1842
1843// BlobReleaseLeaseResponse ...
1844type BlobReleaseLeaseResponse struct {
1845	rawResponse *http.Response
1846}
1847
1848// Response returns the raw HTTP response object.
1849func (brlr BlobReleaseLeaseResponse) Response() *http.Response {
1850	return brlr.rawResponse
1851}
1852
1853// StatusCode returns the HTTP status code of the response, e.g. 200.
1854func (brlr BlobReleaseLeaseResponse) StatusCode() int {
1855	return brlr.rawResponse.StatusCode
1856}
1857
1858// Status returns the HTTP status message of the response, e.g. "200 OK".
1859func (brlr BlobReleaseLeaseResponse) Status() string {
1860	return brlr.rawResponse.Status
1861}
1862
1863// Date returns the value for header Date.
1864func (brlr BlobReleaseLeaseResponse) Date() time.Time {
1865	s := brlr.rawResponse.Header.Get("Date")
1866	if s == "" {
1867		return time.Time{}
1868	}
1869	t, err := time.Parse(time.RFC1123, s)
1870	if err != nil {
1871		t = time.Time{}
1872	}
1873	return t
1874}
1875
1876// ErrorCode returns the value for header x-ms-error-code.
1877func (brlr BlobReleaseLeaseResponse) ErrorCode() string {
1878	return brlr.rawResponse.Header.Get("x-ms-error-code")
1879}
1880
1881// ETag returns the value for header ETag.
1882func (brlr BlobReleaseLeaseResponse) ETag() ETag {
1883	return ETag(brlr.rawResponse.Header.Get("ETag"))
1884}
1885
1886// LastModified returns the value for header Last-Modified.
1887func (brlr BlobReleaseLeaseResponse) LastModified() time.Time {
1888	s := brlr.rawResponse.Header.Get("Last-Modified")
1889	if s == "" {
1890		return time.Time{}
1891	}
1892	t, err := time.Parse(time.RFC1123, s)
1893	if err != nil {
1894		t = time.Time{}
1895	}
1896	return t
1897}
1898
1899// RequestID returns the value for header x-ms-request-id.
1900func (brlr BlobReleaseLeaseResponse) RequestID() string {
1901	return brlr.rawResponse.Header.Get("x-ms-request-id")
1902}
1903
1904// Version returns the value for header x-ms-version.
1905func (brlr BlobReleaseLeaseResponse) Version() string {
1906	return brlr.rawResponse.Header.Get("x-ms-version")
1907}
1908
1909// BlobRenewLeaseResponse ...
1910type BlobRenewLeaseResponse struct {
1911	rawResponse *http.Response
1912}
1913
1914// Response returns the raw HTTP response object.
1915func (brlr BlobRenewLeaseResponse) Response() *http.Response {
1916	return brlr.rawResponse
1917}
1918
1919// StatusCode returns the HTTP status code of the response, e.g. 200.
1920func (brlr BlobRenewLeaseResponse) StatusCode() int {
1921	return brlr.rawResponse.StatusCode
1922}
1923
1924// Status returns the HTTP status message of the response, e.g. "200 OK".
1925func (brlr BlobRenewLeaseResponse) Status() string {
1926	return brlr.rawResponse.Status
1927}
1928
1929// Date returns the value for header Date.
1930func (brlr BlobRenewLeaseResponse) Date() time.Time {
1931	s := brlr.rawResponse.Header.Get("Date")
1932	if s == "" {
1933		return time.Time{}
1934	}
1935	t, err := time.Parse(time.RFC1123, s)
1936	if err != nil {
1937		t = time.Time{}
1938	}
1939	return t
1940}
1941
1942// ErrorCode returns the value for header x-ms-error-code.
1943func (brlr BlobRenewLeaseResponse) ErrorCode() string {
1944	return brlr.rawResponse.Header.Get("x-ms-error-code")
1945}
1946
1947// ETag returns the value for header ETag.
1948func (brlr BlobRenewLeaseResponse) ETag() ETag {
1949	return ETag(brlr.rawResponse.Header.Get("ETag"))
1950}
1951
1952// LastModified returns the value for header Last-Modified.
1953func (brlr BlobRenewLeaseResponse) LastModified() time.Time {
1954	s := brlr.rawResponse.Header.Get("Last-Modified")
1955	if s == "" {
1956		return time.Time{}
1957	}
1958	t, err := time.Parse(time.RFC1123, s)
1959	if err != nil {
1960		t = time.Time{}
1961	}
1962	return t
1963}
1964
1965// LeaseID returns the value for header x-ms-lease-id.
1966func (brlr BlobRenewLeaseResponse) LeaseID() string {
1967	return brlr.rawResponse.Header.Get("x-ms-lease-id")
1968}
1969
1970// RequestID returns the value for header x-ms-request-id.
1971func (brlr BlobRenewLeaseResponse) RequestID() string {
1972	return brlr.rawResponse.Header.Get("x-ms-request-id")
1973}
1974
1975// Version returns the value for header x-ms-version.
1976func (brlr BlobRenewLeaseResponse) Version() string {
1977	return brlr.rawResponse.Header.Get("x-ms-version")
1978}
1979
1980// BlobSetHTTPHeadersResponse ...
1981type BlobSetHTTPHeadersResponse struct {
1982	rawResponse *http.Response
1983}
1984
1985// Response returns the raw HTTP response object.
1986func (bshhr BlobSetHTTPHeadersResponse) Response() *http.Response {
1987	return bshhr.rawResponse
1988}
1989
1990// StatusCode returns the HTTP status code of the response, e.g. 200.
1991func (bshhr BlobSetHTTPHeadersResponse) StatusCode() int {
1992	return bshhr.rawResponse.StatusCode
1993}
1994
1995// Status returns the HTTP status message of the response, e.g. "200 OK".
1996func (bshhr BlobSetHTTPHeadersResponse) Status() string {
1997	return bshhr.rawResponse.Status
1998}
1999
2000// BlobSequenceNumber returns the value for header x-ms-blob-sequence-number.
2001func (bshhr BlobSetHTTPHeadersResponse) BlobSequenceNumber() int64 {
2002	s := bshhr.rawResponse.Header.Get("x-ms-blob-sequence-number")
2003	if s == "" {
2004		return -1
2005	}
2006	i, err := strconv.ParseInt(s, 10, 64)
2007	if err != nil {
2008		i = 0
2009	}
2010	return i
2011}
2012
2013// Date returns the value for header Date.
2014func (bshhr BlobSetHTTPHeadersResponse) Date() time.Time {
2015	s := bshhr.rawResponse.Header.Get("Date")
2016	if s == "" {
2017		return time.Time{}
2018	}
2019	t, err := time.Parse(time.RFC1123, s)
2020	if err != nil {
2021		t = time.Time{}
2022	}
2023	return t
2024}
2025
2026// ErrorCode returns the value for header x-ms-error-code.
2027func (bshhr BlobSetHTTPHeadersResponse) ErrorCode() string {
2028	return bshhr.rawResponse.Header.Get("x-ms-error-code")
2029}
2030
2031// ETag returns the value for header ETag.
2032func (bshhr BlobSetHTTPHeadersResponse) ETag() ETag {
2033	return ETag(bshhr.rawResponse.Header.Get("ETag"))
2034}
2035
2036// LastModified returns the value for header Last-Modified.
2037func (bshhr BlobSetHTTPHeadersResponse) LastModified() time.Time {
2038	s := bshhr.rawResponse.Header.Get("Last-Modified")
2039	if s == "" {
2040		return time.Time{}
2041	}
2042	t, err := time.Parse(time.RFC1123, s)
2043	if err != nil {
2044		t = time.Time{}
2045	}
2046	return t
2047}
2048
2049// RequestID returns the value for header x-ms-request-id.
2050func (bshhr BlobSetHTTPHeadersResponse) RequestID() string {
2051	return bshhr.rawResponse.Header.Get("x-ms-request-id")
2052}
2053
2054// Version returns the value for header x-ms-version.
2055func (bshhr BlobSetHTTPHeadersResponse) Version() string {
2056	return bshhr.rawResponse.Header.Get("x-ms-version")
2057}
2058
2059// BlobSetMetadataResponse ...
2060type BlobSetMetadataResponse struct {
2061	rawResponse *http.Response
2062}
2063
2064// Response returns the raw HTTP response object.
2065func (bsmr BlobSetMetadataResponse) Response() *http.Response {
2066	return bsmr.rawResponse
2067}
2068
2069// StatusCode returns the HTTP status code of the response, e.g. 200.
2070func (bsmr BlobSetMetadataResponse) StatusCode() int {
2071	return bsmr.rawResponse.StatusCode
2072}
2073
2074// Status returns the HTTP status message of the response, e.g. "200 OK".
2075func (bsmr BlobSetMetadataResponse) Status() string {
2076	return bsmr.rawResponse.Status
2077}
2078
2079// Date returns the value for header Date.
2080func (bsmr BlobSetMetadataResponse) Date() time.Time {
2081	s := bsmr.rawResponse.Header.Get("Date")
2082	if s == "" {
2083		return time.Time{}
2084	}
2085	t, err := time.Parse(time.RFC1123, s)
2086	if err != nil {
2087		t = time.Time{}
2088	}
2089	return t
2090}
2091
2092// ErrorCode returns the value for header x-ms-error-code.
2093func (bsmr BlobSetMetadataResponse) ErrorCode() string {
2094	return bsmr.rawResponse.Header.Get("x-ms-error-code")
2095}
2096
2097// ETag returns the value for header ETag.
2098func (bsmr BlobSetMetadataResponse) ETag() ETag {
2099	return ETag(bsmr.rawResponse.Header.Get("ETag"))
2100}
2101
2102// IsServerEncrypted returns the value for header x-ms-request-server-encrypted.
2103func (bsmr BlobSetMetadataResponse) IsServerEncrypted() string {
2104	return bsmr.rawResponse.Header.Get("x-ms-request-server-encrypted")
2105}
2106
2107// LastModified returns the value for header Last-Modified.
2108func (bsmr BlobSetMetadataResponse) LastModified() time.Time {
2109	s := bsmr.rawResponse.Header.Get("Last-Modified")
2110	if s == "" {
2111		return time.Time{}
2112	}
2113	t, err := time.Parse(time.RFC1123, s)
2114	if err != nil {
2115		t = time.Time{}
2116	}
2117	return t
2118}
2119
2120// RequestID returns the value for header x-ms-request-id.
2121func (bsmr BlobSetMetadataResponse) RequestID() string {
2122	return bsmr.rawResponse.Header.Get("x-ms-request-id")
2123}
2124
2125// Version returns the value for header x-ms-version.
2126func (bsmr BlobSetMetadataResponse) Version() string {
2127	return bsmr.rawResponse.Header.Get("x-ms-version")
2128}
2129
2130// BlobSetTierResponse ...
2131type BlobSetTierResponse struct {
2132	rawResponse *http.Response
2133}
2134
2135// Response returns the raw HTTP response object.
2136func (bstr BlobSetTierResponse) Response() *http.Response {
2137	return bstr.rawResponse
2138}
2139
2140// StatusCode returns the HTTP status code of the response, e.g. 200.
2141func (bstr BlobSetTierResponse) StatusCode() int {
2142	return bstr.rawResponse.StatusCode
2143}
2144
2145// Status returns the HTTP status message of the response, e.g. "200 OK".
2146func (bstr BlobSetTierResponse) Status() string {
2147	return bstr.rawResponse.Status
2148}
2149
2150// ErrorCode returns the value for header x-ms-error-code.
2151func (bstr BlobSetTierResponse) ErrorCode() string {
2152	return bstr.rawResponse.Header.Get("x-ms-error-code")
2153}
2154
2155// RequestID returns the value for header x-ms-request-id.
2156func (bstr BlobSetTierResponse) RequestID() string {
2157	return bstr.rawResponse.Header.Get("x-ms-request-id")
2158}
2159
2160// Version returns the value for header x-ms-version.
2161func (bstr BlobSetTierResponse) Version() string {
2162	return bstr.rawResponse.Header.Get("x-ms-version")
2163}
2164
2165// BlobStartCopyFromURLResponse ...
2166type BlobStartCopyFromURLResponse struct {
2167	rawResponse *http.Response
2168}
2169
2170// Response returns the raw HTTP response object.
2171func (bscfur BlobStartCopyFromURLResponse) Response() *http.Response {
2172	return bscfur.rawResponse
2173}
2174
2175// StatusCode returns the HTTP status code of the response, e.g. 200.
2176func (bscfur BlobStartCopyFromURLResponse) StatusCode() int {
2177	return bscfur.rawResponse.StatusCode
2178}
2179
2180// Status returns the HTTP status message of the response, e.g. "200 OK".
2181func (bscfur BlobStartCopyFromURLResponse) Status() string {
2182	return bscfur.rawResponse.Status
2183}
2184
2185// CopyID returns the value for header x-ms-copy-id.
2186func (bscfur BlobStartCopyFromURLResponse) CopyID() string {
2187	return bscfur.rawResponse.Header.Get("x-ms-copy-id")
2188}
2189
2190// CopyStatus returns the value for header x-ms-copy-status.
2191func (bscfur BlobStartCopyFromURLResponse) CopyStatus() CopyStatusType {
2192	return CopyStatusType(bscfur.rawResponse.Header.Get("x-ms-copy-status"))
2193}
2194
2195// Date returns the value for header Date.
2196func (bscfur BlobStartCopyFromURLResponse) Date() time.Time {
2197	s := bscfur.rawResponse.Header.Get("Date")
2198	if s == "" {
2199		return time.Time{}
2200	}
2201	t, err := time.Parse(time.RFC1123, s)
2202	if err != nil {
2203		t = time.Time{}
2204	}
2205	return t
2206}
2207
2208// ErrorCode returns the value for header x-ms-error-code.
2209func (bscfur BlobStartCopyFromURLResponse) ErrorCode() string {
2210	return bscfur.rawResponse.Header.Get("x-ms-error-code")
2211}
2212
2213// ETag returns the value for header ETag.
2214func (bscfur BlobStartCopyFromURLResponse) ETag() ETag {
2215	return ETag(bscfur.rawResponse.Header.Get("ETag"))
2216}
2217
2218// LastModified returns the value for header Last-Modified.
2219func (bscfur BlobStartCopyFromURLResponse) LastModified() time.Time {
2220	s := bscfur.rawResponse.Header.Get("Last-Modified")
2221	if s == "" {
2222		return time.Time{}
2223	}
2224	t, err := time.Parse(time.RFC1123, s)
2225	if err != nil {
2226		t = time.Time{}
2227	}
2228	return t
2229}
2230
2231// RequestID returns the value for header x-ms-request-id.
2232func (bscfur BlobStartCopyFromURLResponse) RequestID() string {
2233	return bscfur.rawResponse.Header.Get("x-ms-request-id")
2234}
2235
2236// Version returns the value for header x-ms-version.
2237func (bscfur BlobStartCopyFromURLResponse) Version() string {
2238	return bscfur.rawResponse.Header.Get("x-ms-version")
2239}
2240
2241// BlobUndeleteResponse ...
2242type BlobUndeleteResponse struct {
2243	rawResponse *http.Response
2244}
2245
2246// Response returns the raw HTTP response object.
2247func (bur BlobUndeleteResponse) Response() *http.Response {
2248	return bur.rawResponse
2249}
2250
2251// StatusCode returns the HTTP status code of the response, e.g. 200.
2252func (bur BlobUndeleteResponse) StatusCode() int {
2253	return bur.rawResponse.StatusCode
2254}
2255
2256// Status returns the HTTP status message of the response, e.g. "200 OK".
2257func (bur BlobUndeleteResponse) Status() string {
2258	return bur.rawResponse.Status
2259}
2260
2261// Date returns the value for header Date.
2262func (bur BlobUndeleteResponse) Date() time.Time {
2263	s := bur.rawResponse.Header.Get("Date")
2264	if s == "" {
2265		return time.Time{}
2266	}
2267	t, err := time.Parse(time.RFC1123, s)
2268	if err != nil {
2269		t = time.Time{}
2270	}
2271	return t
2272}
2273
2274// ErrorCode returns the value for header x-ms-error-code.
2275func (bur BlobUndeleteResponse) ErrorCode() string {
2276	return bur.rawResponse.Header.Get("x-ms-error-code")
2277}
2278
2279// RequestID returns the value for header x-ms-request-id.
2280func (bur BlobUndeleteResponse) RequestID() string {
2281	return bur.rawResponse.Header.Get("x-ms-request-id")
2282}
2283
2284// Version returns the value for header x-ms-version.
2285func (bur BlobUndeleteResponse) Version() string {
2286	return bur.rawResponse.Header.Get("x-ms-version")
2287}
2288
2289// Block - Represents a single block in a block blob.  It describes the block's ID and size.
2290type Block struct {
2291	// Name - The base64 encoded block ID.
2292	Name string `xml:"Name"`
2293	// Size - The block size in bytes.
2294	Size int32 `xml:"Size"`
2295}
2296
2297// BlockBlobCommitBlockListResponse ...
2298type BlockBlobCommitBlockListResponse struct {
2299	rawResponse *http.Response
2300}
2301
2302// Response returns the raw HTTP response object.
2303func (bbcblr BlockBlobCommitBlockListResponse) Response() *http.Response {
2304	return bbcblr.rawResponse
2305}
2306
2307// StatusCode returns the HTTP status code of the response, e.g. 200.
2308func (bbcblr BlockBlobCommitBlockListResponse) StatusCode() int {
2309	return bbcblr.rawResponse.StatusCode
2310}
2311
2312// Status returns the HTTP status message of the response, e.g. "200 OK".
2313func (bbcblr BlockBlobCommitBlockListResponse) Status() string {
2314	return bbcblr.rawResponse.Status
2315}
2316
2317// ContentMD5 returns the value for header Content-MD5.
2318func (bbcblr BlockBlobCommitBlockListResponse) ContentMD5() []byte {
2319	s := bbcblr.rawResponse.Header.Get("Content-MD5")
2320	if s == "" {
2321		return nil
2322	}
2323	b, err := base64.StdEncoding.DecodeString(s)
2324	if err != nil {
2325		b = nil
2326	}
2327	return b
2328}
2329
2330// Date returns the value for header Date.
2331func (bbcblr BlockBlobCommitBlockListResponse) Date() time.Time {
2332	s := bbcblr.rawResponse.Header.Get("Date")
2333	if s == "" {
2334		return time.Time{}
2335	}
2336	t, err := time.Parse(time.RFC1123, s)
2337	if err != nil {
2338		t = time.Time{}
2339	}
2340	return t
2341}
2342
2343// ErrorCode returns the value for header x-ms-error-code.
2344func (bbcblr BlockBlobCommitBlockListResponse) ErrorCode() string {
2345	return bbcblr.rawResponse.Header.Get("x-ms-error-code")
2346}
2347
2348// ETag returns the value for header ETag.
2349func (bbcblr BlockBlobCommitBlockListResponse) ETag() ETag {
2350	return ETag(bbcblr.rawResponse.Header.Get("ETag"))
2351}
2352
2353// IsServerEncrypted returns the value for header x-ms-request-server-encrypted.
2354func (bbcblr BlockBlobCommitBlockListResponse) IsServerEncrypted() string {
2355	return bbcblr.rawResponse.Header.Get("x-ms-request-server-encrypted")
2356}
2357
2358// LastModified returns the value for header Last-Modified.
2359func (bbcblr BlockBlobCommitBlockListResponse) LastModified() time.Time {
2360	s := bbcblr.rawResponse.Header.Get("Last-Modified")
2361	if s == "" {
2362		return time.Time{}
2363	}
2364	t, err := time.Parse(time.RFC1123, s)
2365	if err != nil {
2366		t = time.Time{}
2367	}
2368	return t
2369}
2370
2371// RequestID returns the value for header x-ms-request-id.
2372func (bbcblr BlockBlobCommitBlockListResponse) RequestID() string {
2373	return bbcblr.rawResponse.Header.Get("x-ms-request-id")
2374}
2375
2376// Version returns the value for header x-ms-version.
2377func (bbcblr BlockBlobCommitBlockListResponse) Version() string {
2378	return bbcblr.rawResponse.Header.Get("x-ms-version")
2379}
2380
2381// BlockBlobStageBlockFromURLResponse ...
2382type BlockBlobStageBlockFromURLResponse struct {
2383	rawResponse *http.Response
2384}
2385
2386// Response returns the raw HTTP response object.
2387func (bbsbfur BlockBlobStageBlockFromURLResponse) Response() *http.Response {
2388	return bbsbfur.rawResponse
2389}
2390
2391// StatusCode returns the HTTP status code of the response, e.g. 200.
2392func (bbsbfur BlockBlobStageBlockFromURLResponse) StatusCode() int {
2393	return bbsbfur.rawResponse.StatusCode
2394}
2395
2396// Status returns the HTTP status message of the response, e.g. "200 OK".
2397func (bbsbfur BlockBlobStageBlockFromURLResponse) Status() string {
2398	return bbsbfur.rawResponse.Status
2399}
2400
2401// ContentMD5 returns the value for header Content-MD5.
2402func (bbsbfur BlockBlobStageBlockFromURLResponse) ContentMD5() []byte {
2403	s := bbsbfur.rawResponse.Header.Get("Content-MD5")
2404	if s == "" {
2405		return nil
2406	}
2407	b, err := base64.StdEncoding.DecodeString(s)
2408	if err != nil {
2409		b = nil
2410	}
2411	return b
2412}
2413
2414// Date returns the value for header Date.
2415func (bbsbfur BlockBlobStageBlockFromURLResponse) Date() time.Time {
2416	s := bbsbfur.rawResponse.Header.Get("Date")
2417	if s == "" {
2418		return time.Time{}
2419	}
2420	t, err := time.Parse(time.RFC1123, s)
2421	if err != nil {
2422		t = time.Time{}
2423	}
2424	return t
2425}
2426
2427// ErrorCode returns the value for header x-ms-error-code.
2428func (bbsbfur BlockBlobStageBlockFromURLResponse) ErrorCode() string {
2429	return bbsbfur.rawResponse.Header.Get("x-ms-error-code")
2430}
2431
2432// IsServerEncrypted returns the value for header x-ms-request-server-encrypted.
2433func (bbsbfur BlockBlobStageBlockFromURLResponse) IsServerEncrypted() string {
2434	return bbsbfur.rawResponse.Header.Get("x-ms-request-server-encrypted")
2435}
2436
2437// RequestID returns the value for header x-ms-request-id.
2438func (bbsbfur BlockBlobStageBlockFromURLResponse) RequestID() string {
2439	return bbsbfur.rawResponse.Header.Get("x-ms-request-id")
2440}
2441
2442// Version returns the value for header x-ms-version.
2443func (bbsbfur BlockBlobStageBlockFromURLResponse) Version() string {
2444	return bbsbfur.rawResponse.Header.Get("x-ms-version")
2445}
2446
2447// BlockBlobStageBlockResponse ...
2448type BlockBlobStageBlockResponse struct {
2449	rawResponse *http.Response
2450}
2451
2452// Response returns the raw HTTP response object.
2453func (bbsbr BlockBlobStageBlockResponse) Response() *http.Response {
2454	return bbsbr.rawResponse
2455}
2456
2457// StatusCode returns the HTTP status code of the response, e.g. 200.
2458func (bbsbr BlockBlobStageBlockResponse) StatusCode() int {
2459	return bbsbr.rawResponse.StatusCode
2460}
2461
2462// Status returns the HTTP status message of the response, e.g. "200 OK".
2463func (bbsbr BlockBlobStageBlockResponse) Status() string {
2464	return bbsbr.rawResponse.Status
2465}
2466
2467// ContentMD5 returns the value for header Content-MD5.
2468func (bbsbr BlockBlobStageBlockResponse) ContentMD5() []byte {
2469	s := bbsbr.rawResponse.Header.Get("Content-MD5")
2470	if s == "" {
2471		return nil
2472	}
2473	b, err := base64.StdEncoding.DecodeString(s)
2474	if err != nil {
2475		b = nil
2476	}
2477	return b
2478}
2479
2480// Date returns the value for header Date.
2481func (bbsbr BlockBlobStageBlockResponse) Date() time.Time {
2482	s := bbsbr.rawResponse.Header.Get("Date")
2483	if s == "" {
2484		return time.Time{}
2485	}
2486	t, err := time.Parse(time.RFC1123, s)
2487	if err != nil {
2488		t = time.Time{}
2489	}
2490	return t
2491}
2492
2493// ErrorCode returns the value for header x-ms-error-code.
2494func (bbsbr BlockBlobStageBlockResponse) ErrorCode() string {
2495	return bbsbr.rawResponse.Header.Get("x-ms-error-code")
2496}
2497
2498// IsServerEncrypted returns the value for header x-ms-request-server-encrypted.
2499func (bbsbr BlockBlobStageBlockResponse) IsServerEncrypted() string {
2500	return bbsbr.rawResponse.Header.Get("x-ms-request-server-encrypted")
2501}
2502
2503// RequestID returns the value for header x-ms-request-id.
2504func (bbsbr BlockBlobStageBlockResponse) RequestID() string {
2505	return bbsbr.rawResponse.Header.Get("x-ms-request-id")
2506}
2507
2508// Version returns the value for header x-ms-version.
2509func (bbsbr BlockBlobStageBlockResponse) Version() string {
2510	return bbsbr.rawResponse.Header.Get("x-ms-version")
2511}
2512
2513// BlockBlobUploadResponse ...
2514type BlockBlobUploadResponse struct {
2515	rawResponse *http.Response
2516}
2517
2518// Response returns the raw HTTP response object.
2519func (bbur BlockBlobUploadResponse) Response() *http.Response {
2520	return bbur.rawResponse
2521}
2522
2523// StatusCode returns the HTTP status code of the response, e.g. 200.
2524func (bbur BlockBlobUploadResponse) StatusCode() int {
2525	return bbur.rawResponse.StatusCode
2526}
2527
2528// Status returns the HTTP status message of the response, e.g. "200 OK".
2529func (bbur BlockBlobUploadResponse) Status() string {
2530	return bbur.rawResponse.Status
2531}
2532
2533// ContentMD5 returns the value for header Content-MD5.
2534func (bbur BlockBlobUploadResponse) ContentMD5() []byte {
2535	s := bbur.rawResponse.Header.Get("Content-MD5")
2536	if s == "" {
2537		return nil
2538	}
2539	b, err := base64.StdEncoding.DecodeString(s)
2540	if err != nil {
2541		b = nil
2542	}
2543	return b
2544}
2545
2546// Date returns the value for header Date.
2547func (bbur BlockBlobUploadResponse) Date() time.Time {
2548	s := bbur.rawResponse.Header.Get("Date")
2549	if s == "" {
2550		return time.Time{}
2551	}
2552	t, err := time.Parse(time.RFC1123, s)
2553	if err != nil {
2554		t = time.Time{}
2555	}
2556	return t
2557}
2558
2559// ErrorCode returns the value for header x-ms-error-code.
2560func (bbur BlockBlobUploadResponse) ErrorCode() string {
2561	return bbur.rawResponse.Header.Get("x-ms-error-code")
2562}
2563
2564// ETag returns the value for header ETag.
2565func (bbur BlockBlobUploadResponse) ETag() ETag {
2566	return ETag(bbur.rawResponse.Header.Get("ETag"))
2567}
2568
2569// IsServerEncrypted returns the value for header x-ms-request-server-encrypted.
2570func (bbur BlockBlobUploadResponse) IsServerEncrypted() string {
2571	return bbur.rawResponse.Header.Get("x-ms-request-server-encrypted")
2572}
2573
2574// LastModified returns the value for header Last-Modified.
2575func (bbur BlockBlobUploadResponse) LastModified() time.Time {
2576	s := bbur.rawResponse.Header.Get("Last-Modified")
2577	if s == "" {
2578		return time.Time{}
2579	}
2580	t, err := time.Parse(time.RFC1123, s)
2581	if err != nil {
2582		t = time.Time{}
2583	}
2584	return t
2585}
2586
2587// RequestID returns the value for header x-ms-request-id.
2588func (bbur BlockBlobUploadResponse) RequestID() string {
2589	return bbur.rawResponse.Header.Get("x-ms-request-id")
2590}
2591
2592// Version returns the value for header x-ms-version.
2593func (bbur BlockBlobUploadResponse) Version() string {
2594	return bbur.rawResponse.Header.Get("x-ms-version")
2595}
2596
2597// BlockList ...
2598type BlockList struct {
2599	rawResponse       *http.Response
2600	CommittedBlocks   []Block `xml:"CommittedBlocks>Block"`
2601	UncommittedBlocks []Block `xml:"UncommittedBlocks>Block"`
2602}
2603
2604// Response returns the raw HTTP response object.
2605func (bl BlockList) Response() *http.Response {
2606	return bl.rawResponse
2607}
2608
2609// StatusCode returns the HTTP status code of the response, e.g. 200.
2610func (bl BlockList) StatusCode() int {
2611	return bl.rawResponse.StatusCode
2612}
2613
2614// Status returns the HTTP status message of the response, e.g. "200 OK".
2615func (bl BlockList) Status() string {
2616	return bl.rawResponse.Status
2617}
2618
2619// BlobContentLength returns the value for header x-ms-blob-content-length.
2620func (bl BlockList) BlobContentLength() int64 {
2621	s := bl.rawResponse.Header.Get("x-ms-blob-content-length")
2622	if s == "" {
2623		return -1
2624	}
2625	i, err := strconv.ParseInt(s, 10, 64)
2626	if err != nil {
2627		i = 0
2628	}
2629	return i
2630}
2631
2632// ContentType returns the value for header Content-Type.
2633func (bl BlockList) ContentType() string {
2634	return bl.rawResponse.Header.Get("Content-Type")
2635}
2636
2637// Date returns the value for header Date.
2638func (bl BlockList) Date() time.Time {
2639	s := bl.rawResponse.Header.Get("Date")
2640	if s == "" {
2641		return time.Time{}
2642	}
2643	t, err := time.Parse(time.RFC1123, s)
2644	if err != nil {
2645		t = time.Time{}
2646	}
2647	return t
2648}
2649
2650// ErrorCode returns the value for header x-ms-error-code.
2651func (bl BlockList) ErrorCode() string {
2652	return bl.rawResponse.Header.Get("x-ms-error-code")
2653}
2654
2655// ETag returns the value for header ETag.
2656func (bl BlockList) ETag() ETag {
2657	return ETag(bl.rawResponse.Header.Get("ETag"))
2658}
2659
2660// LastModified returns the value for header Last-Modified.
2661func (bl BlockList) LastModified() time.Time {
2662	s := bl.rawResponse.Header.Get("Last-Modified")
2663	if s == "" {
2664		return time.Time{}
2665	}
2666	t, err := time.Parse(time.RFC1123, s)
2667	if err != nil {
2668		t = time.Time{}
2669	}
2670	return t
2671}
2672
2673// RequestID returns the value for header x-ms-request-id.
2674func (bl BlockList) RequestID() string {
2675	return bl.rawResponse.Header.Get("x-ms-request-id")
2676}
2677
2678// Version returns the value for header x-ms-version.
2679func (bl BlockList) Version() string {
2680	return bl.rawResponse.Header.Get("x-ms-version")
2681}
2682
2683// BlockLookupList ...
2684type BlockLookupList struct {
2685	// XMLName is used for marshalling and is subject to removal in a future release.
2686	XMLName     xml.Name `xml:"BlockList"`
2687	Committed   []string `xml:"Committed"`
2688	Uncommitted []string `xml:"Uncommitted"`
2689	Latest      []string `xml:"Latest"`
2690}
2691
2692// ClearRange ...
2693type ClearRange struct {
2694	Start int64 `xml:"Start"`
2695	End   int64 `xml:"End"`
2696}
2697
2698// ContainerAcquireLeaseResponse ...
2699type ContainerAcquireLeaseResponse struct {
2700	rawResponse *http.Response
2701}
2702
2703// Response returns the raw HTTP response object.
2704func (calr ContainerAcquireLeaseResponse) Response() *http.Response {
2705	return calr.rawResponse
2706}
2707
2708// StatusCode returns the HTTP status code of the response, e.g. 200.
2709func (calr ContainerAcquireLeaseResponse) StatusCode() int {
2710	return calr.rawResponse.StatusCode
2711}
2712
2713// Status returns the HTTP status message of the response, e.g. "200 OK".
2714func (calr ContainerAcquireLeaseResponse) Status() string {
2715	return calr.rawResponse.Status
2716}
2717
2718// Date returns the value for header Date.
2719func (calr ContainerAcquireLeaseResponse) Date() time.Time {
2720	s := calr.rawResponse.Header.Get("Date")
2721	if s == "" {
2722		return time.Time{}
2723	}
2724	t, err := time.Parse(time.RFC1123, s)
2725	if err != nil {
2726		t = time.Time{}
2727	}
2728	return t
2729}
2730
2731// ErrorCode returns the value for header x-ms-error-code.
2732func (calr ContainerAcquireLeaseResponse) ErrorCode() string {
2733	return calr.rawResponse.Header.Get("x-ms-error-code")
2734}
2735
2736// ETag returns the value for header ETag.
2737func (calr ContainerAcquireLeaseResponse) ETag() ETag {
2738	return ETag(calr.rawResponse.Header.Get("ETag"))
2739}
2740
2741// LastModified returns the value for header Last-Modified.
2742func (calr ContainerAcquireLeaseResponse) LastModified() time.Time {
2743	s := calr.rawResponse.Header.Get("Last-Modified")
2744	if s == "" {
2745		return time.Time{}
2746	}
2747	t, err := time.Parse(time.RFC1123, s)
2748	if err != nil {
2749		t = time.Time{}
2750	}
2751	return t
2752}
2753
2754// LeaseID returns the value for header x-ms-lease-id.
2755func (calr ContainerAcquireLeaseResponse) LeaseID() string {
2756	return calr.rawResponse.Header.Get("x-ms-lease-id")
2757}
2758
2759// RequestID returns the value for header x-ms-request-id.
2760func (calr ContainerAcquireLeaseResponse) RequestID() string {
2761	return calr.rawResponse.Header.Get("x-ms-request-id")
2762}
2763
2764// Version returns the value for header x-ms-version.
2765func (calr ContainerAcquireLeaseResponse) Version() string {
2766	return calr.rawResponse.Header.Get("x-ms-version")
2767}
2768
2769// ContainerBreakLeaseResponse ...
2770type ContainerBreakLeaseResponse struct {
2771	rawResponse *http.Response
2772}
2773
2774// Response returns the raw HTTP response object.
2775func (cblr ContainerBreakLeaseResponse) Response() *http.Response {
2776	return cblr.rawResponse
2777}
2778
2779// StatusCode returns the HTTP status code of the response, e.g. 200.
2780func (cblr ContainerBreakLeaseResponse) StatusCode() int {
2781	return cblr.rawResponse.StatusCode
2782}
2783
2784// Status returns the HTTP status message of the response, e.g. "200 OK".
2785func (cblr ContainerBreakLeaseResponse) Status() string {
2786	return cblr.rawResponse.Status
2787}
2788
2789// Date returns the value for header Date.
2790func (cblr ContainerBreakLeaseResponse) Date() time.Time {
2791	s := cblr.rawResponse.Header.Get("Date")
2792	if s == "" {
2793		return time.Time{}
2794	}
2795	t, err := time.Parse(time.RFC1123, s)
2796	if err != nil {
2797		t = time.Time{}
2798	}
2799	return t
2800}
2801
2802// ErrorCode returns the value for header x-ms-error-code.
2803func (cblr ContainerBreakLeaseResponse) ErrorCode() string {
2804	return cblr.rawResponse.Header.Get("x-ms-error-code")
2805}
2806
2807// ETag returns the value for header ETag.
2808func (cblr ContainerBreakLeaseResponse) ETag() ETag {
2809	return ETag(cblr.rawResponse.Header.Get("ETag"))
2810}
2811
2812// LastModified returns the value for header Last-Modified.
2813func (cblr ContainerBreakLeaseResponse) LastModified() time.Time {
2814	s := cblr.rawResponse.Header.Get("Last-Modified")
2815	if s == "" {
2816		return time.Time{}
2817	}
2818	t, err := time.Parse(time.RFC1123, s)
2819	if err != nil {
2820		t = time.Time{}
2821	}
2822	return t
2823}
2824
2825// LeaseTime returns the value for header x-ms-lease-time.
2826func (cblr ContainerBreakLeaseResponse) LeaseTime() int32 {
2827	s := cblr.rawResponse.Header.Get("x-ms-lease-time")
2828	if s == "" {
2829		return -1
2830	}
2831	i, err := strconv.ParseInt(s, 10, 32)
2832	if err != nil {
2833		i = 0
2834	}
2835	return int32(i)
2836}
2837
2838// RequestID returns the value for header x-ms-request-id.
2839func (cblr ContainerBreakLeaseResponse) RequestID() string {
2840	return cblr.rawResponse.Header.Get("x-ms-request-id")
2841}
2842
2843// Version returns the value for header x-ms-version.
2844func (cblr ContainerBreakLeaseResponse) Version() string {
2845	return cblr.rawResponse.Header.Get("x-ms-version")
2846}
2847
2848// ContainerChangeLeaseResponse ...
2849type ContainerChangeLeaseResponse struct {
2850	rawResponse *http.Response
2851}
2852
2853// Response returns the raw HTTP response object.
2854func (cclr ContainerChangeLeaseResponse) Response() *http.Response {
2855	return cclr.rawResponse
2856}
2857
2858// StatusCode returns the HTTP status code of the response, e.g. 200.
2859func (cclr ContainerChangeLeaseResponse) StatusCode() int {
2860	return cclr.rawResponse.StatusCode
2861}
2862
2863// Status returns the HTTP status message of the response, e.g. "200 OK".
2864func (cclr ContainerChangeLeaseResponse) Status() string {
2865	return cclr.rawResponse.Status
2866}
2867
2868// Date returns the value for header Date.
2869func (cclr ContainerChangeLeaseResponse) Date() time.Time {
2870	s := cclr.rawResponse.Header.Get("Date")
2871	if s == "" {
2872		return time.Time{}
2873	}
2874	t, err := time.Parse(time.RFC1123, s)
2875	if err != nil {
2876		t = time.Time{}
2877	}
2878	return t
2879}
2880
2881// ErrorCode returns the value for header x-ms-error-code.
2882func (cclr ContainerChangeLeaseResponse) ErrorCode() string {
2883	return cclr.rawResponse.Header.Get("x-ms-error-code")
2884}
2885
2886// ETag returns the value for header ETag.
2887func (cclr ContainerChangeLeaseResponse) ETag() ETag {
2888	return ETag(cclr.rawResponse.Header.Get("ETag"))
2889}
2890
2891// LastModified returns the value for header Last-Modified.
2892func (cclr ContainerChangeLeaseResponse) LastModified() time.Time {
2893	s := cclr.rawResponse.Header.Get("Last-Modified")
2894	if s == "" {
2895		return time.Time{}
2896	}
2897	t, err := time.Parse(time.RFC1123, s)
2898	if err != nil {
2899		t = time.Time{}
2900	}
2901	return t
2902}
2903
2904// LeaseID returns the value for header x-ms-lease-id.
2905func (cclr ContainerChangeLeaseResponse) LeaseID() string {
2906	return cclr.rawResponse.Header.Get("x-ms-lease-id")
2907}
2908
2909// RequestID returns the value for header x-ms-request-id.
2910func (cclr ContainerChangeLeaseResponse) RequestID() string {
2911	return cclr.rawResponse.Header.Get("x-ms-request-id")
2912}
2913
2914// Version returns the value for header x-ms-version.
2915func (cclr ContainerChangeLeaseResponse) Version() string {
2916	return cclr.rawResponse.Header.Get("x-ms-version")
2917}
2918
2919// ContainerCreateResponse ...
2920type ContainerCreateResponse struct {
2921	rawResponse *http.Response
2922}
2923
2924// Response returns the raw HTTP response object.
2925func (ccr ContainerCreateResponse) Response() *http.Response {
2926	return ccr.rawResponse
2927}
2928
2929// StatusCode returns the HTTP status code of the response, e.g. 200.
2930func (ccr ContainerCreateResponse) StatusCode() int {
2931	return ccr.rawResponse.StatusCode
2932}
2933
2934// Status returns the HTTP status message of the response, e.g. "200 OK".
2935func (ccr ContainerCreateResponse) Status() string {
2936	return ccr.rawResponse.Status
2937}
2938
2939// Date returns the value for header Date.
2940func (ccr ContainerCreateResponse) Date() time.Time {
2941	s := ccr.rawResponse.Header.Get("Date")
2942	if s == "" {
2943		return time.Time{}
2944	}
2945	t, err := time.Parse(time.RFC1123, s)
2946	if err != nil {
2947		t = time.Time{}
2948	}
2949	return t
2950}
2951
2952// ErrorCode returns the value for header x-ms-error-code.
2953func (ccr ContainerCreateResponse) ErrorCode() string {
2954	return ccr.rawResponse.Header.Get("x-ms-error-code")
2955}
2956
2957// ETag returns the value for header ETag.
2958func (ccr ContainerCreateResponse) ETag() ETag {
2959	return ETag(ccr.rawResponse.Header.Get("ETag"))
2960}
2961
2962// LastModified returns the value for header Last-Modified.
2963func (ccr ContainerCreateResponse) LastModified() time.Time {
2964	s := ccr.rawResponse.Header.Get("Last-Modified")
2965	if s == "" {
2966		return time.Time{}
2967	}
2968	t, err := time.Parse(time.RFC1123, s)
2969	if err != nil {
2970		t = time.Time{}
2971	}
2972	return t
2973}
2974
2975// RequestID returns the value for header x-ms-request-id.
2976func (ccr ContainerCreateResponse) RequestID() string {
2977	return ccr.rawResponse.Header.Get("x-ms-request-id")
2978}
2979
2980// Version returns the value for header x-ms-version.
2981func (ccr ContainerCreateResponse) Version() string {
2982	return ccr.rawResponse.Header.Get("x-ms-version")
2983}
2984
2985// ContainerDeleteResponse ...
2986type ContainerDeleteResponse struct {
2987	rawResponse *http.Response
2988}
2989
2990// Response returns the raw HTTP response object.
2991func (cdr ContainerDeleteResponse) Response() *http.Response {
2992	return cdr.rawResponse
2993}
2994
2995// StatusCode returns the HTTP status code of the response, e.g. 200.
2996func (cdr ContainerDeleteResponse) StatusCode() int {
2997	return cdr.rawResponse.StatusCode
2998}
2999
3000// Status returns the HTTP status message of the response, e.g. "200 OK".
3001func (cdr ContainerDeleteResponse) Status() string {
3002	return cdr.rawResponse.Status
3003}
3004
3005// Date returns the value for header Date.
3006func (cdr ContainerDeleteResponse) Date() time.Time {
3007	s := cdr.rawResponse.Header.Get("Date")
3008	if s == "" {
3009		return time.Time{}
3010	}
3011	t, err := time.Parse(time.RFC1123, s)
3012	if err != nil {
3013		t = time.Time{}
3014	}
3015	return t
3016}
3017
3018// ErrorCode returns the value for header x-ms-error-code.
3019func (cdr ContainerDeleteResponse) ErrorCode() string {
3020	return cdr.rawResponse.Header.Get("x-ms-error-code")
3021}
3022
3023// RequestID returns the value for header x-ms-request-id.
3024func (cdr ContainerDeleteResponse) RequestID() string {
3025	return cdr.rawResponse.Header.Get("x-ms-request-id")
3026}
3027
3028// Version returns the value for header x-ms-version.
3029func (cdr ContainerDeleteResponse) Version() string {
3030	return cdr.rawResponse.Header.Get("x-ms-version")
3031}
3032
3033// ContainerGetAccountInfoResponse ...
3034type ContainerGetAccountInfoResponse struct {
3035	rawResponse *http.Response
3036}
3037
3038// Response returns the raw HTTP response object.
3039func (cgair ContainerGetAccountInfoResponse) Response() *http.Response {
3040	return cgair.rawResponse
3041}
3042
3043// StatusCode returns the HTTP status code of the response, e.g. 200.
3044func (cgair ContainerGetAccountInfoResponse) StatusCode() int {
3045	return cgair.rawResponse.StatusCode
3046}
3047
3048// Status returns the HTTP status message of the response, e.g. "200 OK".
3049func (cgair ContainerGetAccountInfoResponse) Status() string {
3050	return cgair.rawResponse.Status
3051}
3052
3053// AccountKind returns the value for header x-ms-account-kind.
3054func (cgair ContainerGetAccountInfoResponse) AccountKind() AccountKindType {
3055	return AccountKindType(cgair.rawResponse.Header.Get("x-ms-account-kind"))
3056}
3057
3058// Date returns the value for header Date.
3059func (cgair ContainerGetAccountInfoResponse) Date() time.Time {
3060	s := cgair.rawResponse.Header.Get("Date")
3061	if s == "" {
3062		return time.Time{}
3063	}
3064	t, err := time.Parse(time.RFC1123, s)
3065	if err != nil {
3066		t = time.Time{}
3067	}
3068	return t
3069}
3070
3071// ErrorCode returns the value for header x-ms-error-code.
3072func (cgair ContainerGetAccountInfoResponse) ErrorCode() string {
3073	return cgair.rawResponse.Header.Get("x-ms-error-code")
3074}
3075
3076// RequestID returns the value for header x-ms-request-id.
3077func (cgair ContainerGetAccountInfoResponse) RequestID() string {
3078	return cgair.rawResponse.Header.Get("x-ms-request-id")
3079}
3080
3081// SkuName returns the value for header x-ms-sku-name.
3082func (cgair ContainerGetAccountInfoResponse) SkuName() SkuNameType {
3083	return SkuNameType(cgair.rawResponse.Header.Get("x-ms-sku-name"))
3084}
3085
3086// Version returns the value for header x-ms-version.
3087func (cgair ContainerGetAccountInfoResponse) Version() string {
3088	return cgair.rawResponse.Header.Get("x-ms-version")
3089}
3090
3091// ContainerGetPropertiesResponse ...
3092type ContainerGetPropertiesResponse struct {
3093	rawResponse *http.Response
3094}
3095
3096// NewMetadata returns user-defined key/value pairs.
3097func (cgpr ContainerGetPropertiesResponse) NewMetadata() Metadata {
3098	md := Metadata{}
3099	for k, v := range cgpr.rawResponse.Header {
3100		if len(k) > mdPrefixLen {
3101			if prefix := k[0:mdPrefixLen]; strings.EqualFold(prefix, mdPrefix) {
3102				md[strings.ToLower(k[mdPrefixLen:])] = v[0]
3103			}
3104		}
3105	}
3106	return md
3107}
3108
3109// Response returns the raw HTTP response object.
3110func (cgpr ContainerGetPropertiesResponse) Response() *http.Response {
3111	return cgpr.rawResponse
3112}
3113
3114// StatusCode returns the HTTP status code of the response, e.g. 200.
3115func (cgpr ContainerGetPropertiesResponse) StatusCode() int {
3116	return cgpr.rawResponse.StatusCode
3117}
3118
3119// Status returns the HTTP status message of the response, e.g. "200 OK".
3120func (cgpr ContainerGetPropertiesResponse) Status() string {
3121	return cgpr.rawResponse.Status
3122}
3123
3124// BlobPublicAccess returns the value for header x-ms-blob-public-access.
3125func (cgpr ContainerGetPropertiesResponse) BlobPublicAccess() PublicAccessType {
3126	return PublicAccessType(cgpr.rawResponse.Header.Get("x-ms-blob-public-access"))
3127}
3128
3129// Date returns the value for header Date.
3130func (cgpr ContainerGetPropertiesResponse) Date() time.Time {
3131	s := cgpr.rawResponse.Header.Get("Date")
3132	if s == "" {
3133		return time.Time{}
3134	}
3135	t, err := time.Parse(time.RFC1123, s)
3136	if err != nil {
3137		t = time.Time{}
3138	}
3139	return t
3140}
3141
3142// ErrorCode returns the value for header x-ms-error-code.
3143func (cgpr ContainerGetPropertiesResponse) ErrorCode() string {
3144	return cgpr.rawResponse.Header.Get("x-ms-error-code")
3145}
3146
3147// ETag returns the value for header ETag.
3148func (cgpr ContainerGetPropertiesResponse) ETag() ETag {
3149	return ETag(cgpr.rawResponse.Header.Get("ETag"))
3150}
3151
3152// HasImmutabilityPolicy returns the value for header x-ms-has-immutability-policy.
3153func (cgpr ContainerGetPropertiesResponse) HasImmutabilityPolicy() string {
3154	return cgpr.rawResponse.Header.Get("x-ms-has-immutability-policy")
3155}
3156
3157// HasLegalHold returns the value for header x-ms-has-legal-hold.
3158func (cgpr ContainerGetPropertiesResponse) HasLegalHold() string {
3159	return cgpr.rawResponse.Header.Get("x-ms-has-legal-hold")
3160}
3161
3162// LastModified returns the value for header Last-Modified.
3163func (cgpr ContainerGetPropertiesResponse) LastModified() time.Time {
3164	s := cgpr.rawResponse.Header.Get("Last-Modified")
3165	if s == "" {
3166		return time.Time{}
3167	}
3168	t, err := time.Parse(time.RFC1123, s)
3169	if err != nil {
3170		t = time.Time{}
3171	}
3172	return t
3173}
3174
3175// LeaseDuration returns the value for header x-ms-lease-duration.
3176func (cgpr ContainerGetPropertiesResponse) LeaseDuration() LeaseDurationType {
3177	return LeaseDurationType(cgpr.rawResponse.Header.Get("x-ms-lease-duration"))
3178}
3179
3180// LeaseState returns the value for header x-ms-lease-state.
3181func (cgpr ContainerGetPropertiesResponse) LeaseState() LeaseStateType {
3182	return LeaseStateType(cgpr.rawResponse.Header.Get("x-ms-lease-state"))
3183}
3184
3185// LeaseStatus returns the value for header x-ms-lease-status.
3186func (cgpr ContainerGetPropertiesResponse) LeaseStatus() LeaseStatusType {
3187	return LeaseStatusType(cgpr.rawResponse.Header.Get("x-ms-lease-status"))
3188}
3189
3190// RequestID returns the value for header x-ms-request-id.
3191func (cgpr ContainerGetPropertiesResponse) RequestID() string {
3192	return cgpr.rawResponse.Header.Get("x-ms-request-id")
3193}
3194
3195// Version returns the value for header x-ms-version.
3196func (cgpr ContainerGetPropertiesResponse) Version() string {
3197	return cgpr.rawResponse.Header.Get("x-ms-version")
3198}
3199
3200// ContainerItem - An Azure Storage container
3201type ContainerItem struct {
3202	// XMLName is used for marshalling and is subject to removal in a future release.
3203	XMLName    xml.Name            `xml:"Container"`
3204	Name       string              `xml:"Name"`
3205	Properties ContainerProperties `xml:"Properties"`
3206	Metadata   Metadata            `xml:"Metadata"`
3207}
3208
3209// ContainerProperties - Properties of a container
3210type ContainerProperties struct {
3211	LastModified time.Time `xml:"Last-Modified"`
3212	Etag         ETag      `xml:"Etag"`
3213	// LeaseStatus - Possible values include: 'LeaseStatusLocked', 'LeaseStatusUnlocked', 'LeaseStatusNone'
3214	LeaseStatus LeaseStatusType `xml:"LeaseStatus"`
3215	// LeaseState - Possible values include: 'LeaseStateAvailable', 'LeaseStateLeased', 'LeaseStateExpired', 'LeaseStateBreaking', 'LeaseStateBroken', 'LeaseStateNone'
3216	LeaseState LeaseStateType `xml:"LeaseState"`
3217	// LeaseDuration - Possible values include: 'LeaseDurationInfinite', 'LeaseDurationFixed', 'LeaseDurationNone'
3218	LeaseDuration LeaseDurationType `xml:"LeaseDuration"`
3219	// PublicAccess - Possible values include: 'PublicAccessContainer', 'PublicAccessBlob', 'PublicAccessNone'
3220	PublicAccess          PublicAccessType `xml:"PublicAccess"`
3221	HasImmutabilityPolicy *bool            `xml:"HasImmutabilityPolicy"`
3222	HasLegalHold          *bool            `xml:"HasLegalHold"`
3223}
3224
3225// MarshalXML implements the xml.Marshaler interface for ContainerProperties.
3226func (cp ContainerProperties) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
3227	cp2 := (*containerProperties)(unsafe.Pointer(&cp))
3228	return e.EncodeElement(*cp2, start)
3229}
3230
3231// UnmarshalXML implements the xml.Unmarshaler interface for ContainerProperties.
3232func (cp *ContainerProperties) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
3233	cp2 := (*containerProperties)(unsafe.Pointer(cp))
3234	return d.DecodeElement(cp2, &start)
3235}
3236
3237// ContainerReleaseLeaseResponse ...
3238type ContainerReleaseLeaseResponse struct {
3239	rawResponse *http.Response
3240}
3241
3242// Response returns the raw HTTP response object.
3243func (crlr ContainerReleaseLeaseResponse) Response() *http.Response {
3244	return crlr.rawResponse
3245}
3246
3247// StatusCode returns the HTTP status code of the response, e.g. 200.
3248func (crlr ContainerReleaseLeaseResponse) StatusCode() int {
3249	return crlr.rawResponse.StatusCode
3250}
3251
3252// Status returns the HTTP status message of the response, e.g. "200 OK".
3253func (crlr ContainerReleaseLeaseResponse) Status() string {
3254	return crlr.rawResponse.Status
3255}
3256
3257// Date returns the value for header Date.
3258func (crlr ContainerReleaseLeaseResponse) Date() time.Time {
3259	s := crlr.rawResponse.Header.Get("Date")
3260	if s == "" {
3261		return time.Time{}
3262	}
3263	t, err := time.Parse(time.RFC1123, s)
3264	if err != nil {
3265		t = time.Time{}
3266	}
3267	return t
3268}
3269
3270// ErrorCode returns the value for header x-ms-error-code.
3271func (crlr ContainerReleaseLeaseResponse) ErrorCode() string {
3272	return crlr.rawResponse.Header.Get("x-ms-error-code")
3273}
3274
3275// ETag returns the value for header ETag.
3276func (crlr ContainerReleaseLeaseResponse) ETag() ETag {
3277	return ETag(crlr.rawResponse.Header.Get("ETag"))
3278}
3279
3280// LastModified returns the value for header Last-Modified.
3281func (crlr ContainerReleaseLeaseResponse) LastModified() time.Time {
3282	s := crlr.rawResponse.Header.Get("Last-Modified")
3283	if s == "" {
3284		return time.Time{}
3285	}
3286	t, err := time.Parse(time.RFC1123, s)
3287	if err != nil {
3288		t = time.Time{}
3289	}
3290	return t
3291}
3292
3293// RequestID returns the value for header x-ms-request-id.
3294func (crlr ContainerReleaseLeaseResponse) RequestID() string {
3295	return crlr.rawResponse.Header.Get("x-ms-request-id")
3296}
3297
3298// Version returns the value for header x-ms-version.
3299func (crlr ContainerReleaseLeaseResponse) Version() string {
3300	return crlr.rawResponse.Header.Get("x-ms-version")
3301}
3302
3303// ContainerRenewLeaseResponse ...
3304type ContainerRenewLeaseResponse struct {
3305	rawResponse *http.Response
3306}
3307
3308// Response returns the raw HTTP response object.
3309func (crlr ContainerRenewLeaseResponse) Response() *http.Response {
3310	return crlr.rawResponse
3311}
3312
3313// StatusCode returns the HTTP status code of the response, e.g. 200.
3314func (crlr ContainerRenewLeaseResponse) StatusCode() int {
3315	return crlr.rawResponse.StatusCode
3316}
3317
3318// Status returns the HTTP status message of the response, e.g. "200 OK".
3319func (crlr ContainerRenewLeaseResponse) Status() string {
3320	return crlr.rawResponse.Status
3321}
3322
3323// Date returns the value for header Date.
3324func (crlr ContainerRenewLeaseResponse) Date() time.Time {
3325	s := crlr.rawResponse.Header.Get("Date")
3326	if s == "" {
3327		return time.Time{}
3328	}
3329	t, err := time.Parse(time.RFC1123, s)
3330	if err != nil {
3331		t = time.Time{}
3332	}
3333	return t
3334}
3335
3336// ErrorCode returns the value for header x-ms-error-code.
3337func (crlr ContainerRenewLeaseResponse) ErrorCode() string {
3338	return crlr.rawResponse.Header.Get("x-ms-error-code")
3339}
3340
3341// ETag returns the value for header ETag.
3342func (crlr ContainerRenewLeaseResponse) ETag() ETag {
3343	return ETag(crlr.rawResponse.Header.Get("ETag"))
3344}
3345
3346// LastModified returns the value for header Last-Modified.
3347func (crlr ContainerRenewLeaseResponse) LastModified() time.Time {
3348	s := crlr.rawResponse.Header.Get("Last-Modified")
3349	if s == "" {
3350		return time.Time{}
3351	}
3352	t, err := time.Parse(time.RFC1123, s)
3353	if err != nil {
3354		t = time.Time{}
3355	}
3356	return t
3357}
3358
3359// LeaseID returns the value for header x-ms-lease-id.
3360func (crlr ContainerRenewLeaseResponse) LeaseID() string {
3361	return crlr.rawResponse.Header.Get("x-ms-lease-id")
3362}
3363
3364// RequestID returns the value for header x-ms-request-id.
3365func (crlr ContainerRenewLeaseResponse) RequestID() string {
3366	return crlr.rawResponse.Header.Get("x-ms-request-id")
3367}
3368
3369// Version returns the value for header x-ms-version.
3370func (crlr ContainerRenewLeaseResponse) Version() string {
3371	return crlr.rawResponse.Header.Get("x-ms-version")
3372}
3373
3374// ContainerSetAccessPolicyResponse ...
3375type ContainerSetAccessPolicyResponse struct {
3376	rawResponse *http.Response
3377}
3378
3379// Response returns the raw HTTP response object.
3380func (csapr ContainerSetAccessPolicyResponse) Response() *http.Response {
3381	return csapr.rawResponse
3382}
3383
3384// StatusCode returns the HTTP status code of the response, e.g. 200.
3385func (csapr ContainerSetAccessPolicyResponse) StatusCode() int {
3386	return csapr.rawResponse.StatusCode
3387}
3388
3389// Status returns the HTTP status message of the response, e.g. "200 OK".
3390func (csapr ContainerSetAccessPolicyResponse) Status() string {
3391	return csapr.rawResponse.Status
3392}
3393
3394// Date returns the value for header Date.
3395func (csapr ContainerSetAccessPolicyResponse) Date() time.Time {
3396	s := csapr.rawResponse.Header.Get("Date")
3397	if s == "" {
3398		return time.Time{}
3399	}
3400	t, err := time.Parse(time.RFC1123, s)
3401	if err != nil {
3402		t = time.Time{}
3403	}
3404	return t
3405}
3406
3407// ErrorCode returns the value for header x-ms-error-code.
3408func (csapr ContainerSetAccessPolicyResponse) ErrorCode() string {
3409	return csapr.rawResponse.Header.Get("x-ms-error-code")
3410}
3411
3412// ETag returns the value for header ETag.
3413func (csapr ContainerSetAccessPolicyResponse) ETag() ETag {
3414	return ETag(csapr.rawResponse.Header.Get("ETag"))
3415}
3416
3417// LastModified returns the value for header Last-Modified.
3418func (csapr ContainerSetAccessPolicyResponse) LastModified() time.Time {
3419	s := csapr.rawResponse.Header.Get("Last-Modified")
3420	if s == "" {
3421		return time.Time{}
3422	}
3423	t, err := time.Parse(time.RFC1123, s)
3424	if err != nil {
3425		t = time.Time{}
3426	}
3427	return t
3428}
3429
3430// RequestID returns the value for header x-ms-request-id.
3431func (csapr ContainerSetAccessPolicyResponse) RequestID() string {
3432	return csapr.rawResponse.Header.Get("x-ms-request-id")
3433}
3434
3435// Version returns the value for header x-ms-version.
3436func (csapr ContainerSetAccessPolicyResponse) Version() string {
3437	return csapr.rawResponse.Header.Get("x-ms-version")
3438}
3439
3440// ContainerSetMetadataResponse ...
3441type ContainerSetMetadataResponse struct {
3442	rawResponse *http.Response
3443}
3444
3445// Response returns the raw HTTP response object.
3446func (csmr ContainerSetMetadataResponse) Response() *http.Response {
3447	return csmr.rawResponse
3448}
3449
3450// StatusCode returns the HTTP status code of the response, e.g. 200.
3451func (csmr ContainerSetMetadataResponse) StatusCode() int {
3452	return csmr.rawResponse.StatusCode
3453}
3454
3455// Status returns the HTTP status message of the response, e.g. "200 OK".
3456func (csmr ContainerSetMetadataResponse) Status() string {
3457	return csmr.rawResponse.Status
3458}
3459
3460// Date returns the value for header Date.
3461func (csmr ContainerSetMetadataResponse) Date() time.Time {
3462	s := csmr.rawResponse.Header.Get("Date")
3463	if s == "" {
3464		return time.Time{}
3465	}
3466	t, err := time.Parse(time.RFC1123, s)
3467	if err != nil {
3468		t = time.Time{}
3469	}
3470	return t
3471}
3472
3473// ErrorCode returns the value for header x-ms-error-code.
3474func (csmr ContainerSetMetadataResponse) ErrorCode() string {
3475	return csmr.rawResponse.Header.Get("x-ms-error-code")
3476}
3477
3478// ETag returns the value for header ETag.
3479func (csmr ContainerSetMetadataResponse) ETag() ETag {
3480	return ETag(csmr.rawResponse.Header.Get("ETag"))
3481}
3482
3483// LastModified returns the value for header Last-Modified.
3484func (csmr ContainerSetMetadataResponse) LastModified() time.Time {
3485	s := csmr.rawResponse.Header.Get("Last-Modified")
3486	if s == "" {
3487		return time.Time{}
3488	}
3489	t, err := time.Parse(time.RFC1123, s)
3490	if err != nil {
3491		t = time.Time{}
3492	}
3493	return t
3494}
3495
3496// RequestID returns the value for header x-ms-request-id.
3497func (csmr ContainerSetMetadataResponse) RequestID() string {
3498	return csmr.rawResponse.Header.Get("x-ms-request-id")
3499}
3500
3501// Version returns the value for header x-ms-version.
3502func (csmr ContainerSetMetadataResponse) Version() string {
3503	return csmr.rawResponse.Header.Get("x-ms-version")
3504}
3505
3506// CorsRule - CORS is an HTTP feature that enables a web application running under one domain to access
3507// resources in another domain. Web browsers implement a security restriction known as same-origin policy that
3508// prevents a web page from calling APIs in a different domain; CORS provides a secure way to allow one domain
3509// (the origin domain) to call APIs in another domain
3510type CorsRule struct {
3511	// AllowedOrigins - The origin domains that are permitted to make a request against the storage service via CORS. The origin domain is the domain from which the request originates. Note that the origin must be an exact case-sensitive match with the origin that the user age sends to the service. You can also use the wildcard character '*' to allow all origin domains to make requests via CORS.
3512	AllowedOrigins string `xml:"AllowedOrigins"`
3513	// AllowedMethods - The methods (HTTP request verbs) that the origin domain may use for a CORS request. (comma separated)
3514	AllowedMethods string `xml:"AllowedMethods"`
3515	// AllowedHeaders - the request headers that the origin domain may specify on the CORS request.
3516	AllowedHeaders string `xml:"AllowedHeaders"`
3517	// ExposedHeaders - The response headers that may be sent in the response to the CORS request and exposed by the browser to the request issuer
3518	ExposedHeaders string `xml:"ExposedHeaders"`
3519	// MaxAgeInSeconds - The maximum amount time that a browser should cache the preflight OPTIONS request.
3520	MaxAgeInSeconds int32 `xml:"MaxAgeInSeconds"`
3521}
3522
3523// downloadResponse - Wraps the response from the blobClient.Download method.
3524type downloadResponse struct {
3525	rawResponse *http.Response
3526}
3527
3528// NewMetadata returns user-defined key/value pairs.
3529func (dr downloadResponse) NewMetadata() Metadata {
3530	md := Metadata{}
3531	for k, v := range dr.rawResponse.Header {
3532		if len(k) > mdPrefixLen {
3533			if prefix := k[0:mdPrefixLen]; strings.EqualFold(prefix, mdPrefix) {
3534				md[strings.ToLower(k[mdPrefixLen:])] = v[0]
3535			}
3536		}
3537	}
3538	return md
3539}
3540
3541// Response returns the raw HTTP response object.
3542func (dr downloadResponse) Response() *http.Response {
3543	return dr.rawResponse
3544}
3545
3546// StatusCode returns the HTTP status code of the response, e.g. 200.
3547func (dr downloadResponse) StatusCode() int {
3548	return dr.rawResponse.StatusCode
3549}
3550
3551// Status returns the HTTP status message of the response, e.g. "200 OK".
3552func (dr downloadResponse) Status() string {
3553	return dr.rawResponse.Status
3554}
3555
3556// Body returns the raw HTTP response object's Body.
3557func (dr downloadResponse) Body() io.ReadCloser {
3558	return dr.rawResponse.Body
3559}
3560
3561// AcceptRanges returns the value for header Accept-Ranges.
3562func (dr downloadResponse) AcceptRanges() string {
3563	return dr.rawResponse.Header.Get("Accept-Ranges")
3564}
3565
3566// BlobCommittedBlockCount returns the value for header x-ms-blob-committed-block-count.
3567func (dr downloadResponse) BlobCommittedBlockCount() int32 {
3568	s := dr.rawResponse.Header.Get("x-ms-blob-committed-block-count")
3569	if s == "" {
3570		return -1
3571	}
3572	i, err := strconv.ParseInt(s, 10, 32)
3573	if err != nil {
3574		i = 0
3575	}
3576	return int32(i)
3577}
3578
3579// BlobContentMD5 returns the value for header x-ms-blob-content-md5.
3580func (dr downloadResponse) BlobContentMD5() []byte {
3581	s := dr.rawResponse.Header.Get("x-ms-blob-content-md5")
3582	if s == "" {
3583		return nil
3584	}
3585	b, err := base64.StdEncoding.DecodeString(s)
3586	if err != nil {
3587		b = nil
3588	}
3589	return b
3590}
3591
3592// BlobSequenceNumber returns the value for header x-ms-blob-sequence-number.
3593func (dr downloadResponse) BlobSequenceNumber() int64 {
3594	s := dr.rawResponse.Header.Get("x-ms-blob-sequence-number")
3595	if s == "" {
3596		return -1
3597	}
3598	i, err := strconv.ParseInt(s, 10, 64)
3599	if err != nil {
3600		i = 0
3601	}
3602	return i
3603}
3604
3605// BlobType returns the value for header x-ms-blob-type.
3606func (dr downloadResponse) BlobType() BlobType {
3607	return BlobType(dr.rawResponse.Header.Get("x-ms-blob-type"))
3608}
3609
3610// CacheControl returns the value for header Cache-Control.
3611func (dr downloadResponse) CacheControl() string {
3612	return dr.rawResponse.Header.Get("Cache-Control")
3613}
3614
3615// ContentDisposition returns the value for header Content-Disposition.
3616func (dr downloadResponse) ContentDisposition() string {
3617	return dr.rawResponse.Header.Get("Content-Disposition")
3618}
3619
3620// ContentEncoding returns the value for header Content-Encoding.
3621func (dr downloadResponse) ContentEncoding() string {
3622	return dr.rawResponse.Header.Get("Content-Encoding")
3623}
3624
3625// ContentLanguage returns the value for header Content-Language.
3626func (dr downloadResponse) ContentLanguage() string {
3627	return dr.rawResponse.Header.Get("Content-Language")
3628}
3629
3630// ContentLength returns the value for header Content-Length.
3631func (dr downloadResponse) ContentLength() int64 {
3632	s := dr.rawResponse.Header.Get("Content-Length")
3633	if s == "" {
3634		return -1
3635	}
3636	i, err := strconv.ParseInt(s, 10, 64)
3637	if err != nil {
3638		i = 0
3639	}
3640	return i
3641}
3642
3643// ContentMD5 returns the value for header Content-MD5.
3644func (dr downloadResponse) ContentMD5() []byte {
3645	s := dr.rawResponse.Header.Get("Content-MD5")
3646	if s == "" {
3647		return nil
3648	}
3649	b, err := base64.StdEncoding.DecodeString(s)
3650	if err != nil {
3651		b = nil
3652	}
3653	return b
3654}
3655
3656// ContentRange returns the value for header Content-Range.
3657func (dr downloadResponse) ContentRange() string {
3658	return dr.rawResponse.Header.Get("Content-Range")
3659}
3660
3661// ContentType returns the value for header Content-Type.
3662func (dr downloadResponse) ContentType() string {
3663	return dr.rawResponse.Header.Get("Content-Type")
3664}
3665
3666// CopyCompletionTime returns the value for header x-ms-copy-completion-time.
3667func (dr downloadResponse) CopyCompletionTime() time.Time {
3668	s := dr.rawResponse.Header.Get("x-ms-copy-completion-time")
3669	if s == "" {
3670		return time.Time{}
3671	}
3672	t, err := time.Parse(time.RFC1123, s)
3673	if err != nil {
3674		t = time.Time{}
3675	}
3676	return t
3677}
3678
3679// CopyID returns the value for header x-ms-copy-id.
3680func (dr downloadResponse) CopyID() string {
3681	return dr.rawResponse.Header.Get("x-ms-copy-id")
3682}
3683
3684// CopyProgress returns the value for header x-ms-copy-progress.
3685func (dr downloadResponse) CopyProgress() string {
3686	return dr.rawResponse.Header.Get("x-ms-copy-progress")
3687}
3688
3689// CopySource returns the value for header x-ms-copy-source.
3690func (dr downloadResponse) CopySource() string {
3691	return dr.rawResponse.Header.Get("x-ms-copy-source")
3692}
3693
3694// CopyStatus returns the value for header x-ms-copy-status.
3695func (dr downloadResponse) CopyStatus() CopyStatusType {
3696	return CopyStatusType(dr.rawResponse.Header.Get("x-ms-copy-status"))
3697}
3698
3699// CopyStatusDescription returns the value for header x-ms-copy-status-description.
3700func (dr downloadResponse) CopyStatusDescription() string {
3701	return dr.rawResponse.Header.Get("x-ms-copy-status-description")
3702}
3703
3704// Date returns the value for header Date.
3705func (dr downloadResponse) Date() time.Time {
3706	s := dr.rawResponse.Header.Get("Date")
3707	if s == "" {
3708		return time.Time{}
3709	}
3710	t, err := time.Parse(time.RFC1123, s)
3711	if err != nil {
3712		t = time.Time{}
3713	}
3714	return t
3715}
3716
3717// ErrorCode returns the value for header x-ms-error-code.
3718func (dr downloadResponse) ErrorCode() string {
3719	return dr.rawResponse.Header.Get("x-ms-error-code")
3720}
3721
3722// ETag returns the value for header ETag.
3723func (dr downloadResponse) ETag() ETag {
3724	return ETag(dr.rawResponse.Header.Get("ETag"))
3725}
3726
3727// IsServerEncrypted returns the value for header x-ms-server-encrypted.
3728func (dr downloadResponse) IsServerEncrypted() string {
3729	return dr.rawResponse.Header.Get("x-ms-server-encrypted")
3730}
3731
3732// LastModified returns the value for header Last-Modified.
3733func (dr downloadResponse) LastModified() time.Time {
3734	s := dr.rawResponse.Header.Get("Last-Modified")
3735	if s == "" {
3736		return time.Time{}
3737	}
3738	t, err := time.Parse(time.RFC1123, s)
3739	if err != nil {
3740		t = time.Time{}
3741	}
3742	return t
3743}
3744
3745// LeaseDuration returns the value for header x-ms-lease-duration.
3746func (dr downloadResponse) LeaseDuration() LeaseDurationType {
3747	return LeaseDurationType(dr.rawResponse.Header.Get("x-ms-lease-duration"))
3748}
3749
3750// LeaseState returns the value for header x-ms-lease-state.
3751func (dr downloadResponse) LeaseState() LeaseStateType {
3752	return LeaseStateType(dr.rawResponse.Header.Get("x-ms-lease-state"))
3753}
3754
3755// LeaseStatus returns the value for header x-ms-lease-status.
3756func (dr downloadResponse) LeaseStatus() LeaseStatusType {
3757	return LeaseStatusType(dr.rawResponse.Header.Get("x-ms-lease-status"))
3758}
3759
3760// RequestID returns the value for header x-ms-request-id.
3761func (dr downloadResponse) RequestID() string {
3762	return dr.rawResponse.Header.Get("x-ms-request-id")
3763}
3764
3765// Version returns the value for header x-ms-version.
3766func (dr downloadResponse) Version() string {
3767	return dr.rawResponse.Header.Get("x-ms-version")
3768}
3769
3770// GeoReplication - Geo-Replication information for the Secondary Storage Service
3771type GeoReplication struct {
3772	// Status - The status of the secondary location. Possible values include: 'GeoReplicationStatusLive', 'GeoReplicationStatusBootstrap', 'GeoReplicationStatusUnavailable', 'GeoReplicationStatusNone'
3773	Status GeoReplicationStatusType `xml:"Status"`
3774	// LastSyncTime - A GMT date/time value, to the second. All primary writes preceding this value are guaranteed to be available for read operations at the secondary. Primary writes after this point in time may or may not be available for reads.
3775	LastSyncTime time.Time `xml:"LastSyncTime"`
3776}
3777
3778// MarshalXML implements the xml.Marshaler interface for GeoReplication.
3779func (gr GeoReplication) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
3780	gr2 := (*geoReplication)(unsafe.Pointer(&gr))
3781	return e.EncodeElement(*gr2, start)
3782}
3783
3784// UnmarshalXML implements the xml.Unmarshaler interface for GeoReplication.
3785func (gr *GeoReplication) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
3786	gr2 := (*geoReplication)(unsafe.Pointer(gr))
3787	return d.DecodeElement(gr2, &start)
3788}
3789
3790// KeyInfo - Key information
3791type KeyInfo struct {
3792	// Start - The date-time the key is active in ISO 8601 UTC time
3793	Start string `xml:"Start"`
3794	// Expiry - The date-time the key expires in ISO 8601 UTC time
3795	Expiry string `xml:"Expiry"`
3796}
3797
3798//NewKeyInfo creates a new KeyInfo struct with the correct time formatting & conversion
3799func NewKeyInfo(Start, Expiry time.Time) KeyInfo {
3800	return KeyInfo{
3801		Start:  Start.UTC().Format(SASTimeFormat),
3802		Expiry: Expiry.UTC().Format(SASTimeFormat),
3803	}
3804}
3805
3806// ListBlobsFlatSegmentResponse - An enumeration of blobs
3807type ListBlobsFlatSegmentResponse struct {
3808	rawResponse *http.Response
3809	// XMLName is used for marshalling and is subject to removal in a future release.
3810	XMLName         xml.Name            `xml:"EnumerationResults"`
3811	ServiceEndpoint string              `xml:"ServiceEndpoint,attr"`
3812	ContainerName   string              `xml:"ContainerName,attr"`
3813	Prefix          *string             `xml:"Prefix"`
3814	Marker          *string             `xml:"Marker"`
3815	MaxResults      *int32              `xml:"MaxResults"`
3816	Delimiter       *string             `xml:"Delimiter"`
3817	Segment         BlobFlatListSegment `xml:"Blobs"`
3818	NextMarker      Marker              `xml:"NextMarker"`
3819}
3820
3821// Response returns the raw HTTP response object.
3822func (lbfsr ListBlobsFlatSegmentResponse) Response() *http.Response {
3823	return lbfsr.rawResponse
3824}
3825
3826// StatusCode returns the HTTP status code of the response, e.g. 200.
3827func (lbfsr ListBlobsFlatSegmentResponse) StatusCode() int {
3828	return lbfsr.rawResponse.StatusCode
3829}
3830
3831// Status returns the HTTP status message of the response, e.g. "200 OK".
3832func (lbfsr ListBlobsFlatSegmentResponse) Status() string {
3833	return lbfsr.rawResponse.Status
3834}
3835
3836// ContentType returns the value for header Content-Type.
3837func (lbfsr ListBlobsFlatSegmentResponse) ContentType() string {
3838	return lbfsr.rawResponse.Header.Get("Content-Type")
3839}
3840
3841// Date returns the value for header Date.
3842func (lbfsr ListBlobsFlatSegmentResponse) Date() time.Time {
3843	s := lbfsr.rawResponse.Header.Get("Date")
3844	if s == "" {
3845		return time.Time{}
3846	}
3847	t, err := time.Parse(time.RFC1123, s)
3848	if err != nil {
3849		t = time.Time{}
3850	}
3851	return t
3852}
3853
3854// ErrorCode returns the value for header x-ms-error-code.
3855func (lbfsr ListBlobsFlatSegmentResponse) ErrorCode() string {
3856	return lbfsr.rawResponse.Header.Get("x-ms-error-code")
3857}
3858
3859// RequestID returns the value for header x-ms-request-id.
3860func (lbfsr ListBlobsFlatSegmentResponse) RequestID() string {
3861	return lbfsr.rawResponse.Header.Get("x-ms-request-id")
3862}
3863
3864// Version returns the value for header x-ms-version.
3865func (lbfsr ListBlobsFlatSegmentResponse) Version() string {
3866	return lbfsr.rawResponse.Header.Get("x-ms-version")
3867}
3868
3869// ListBlobsHierarchySegmentResponse - An enumeration of blobs
3870type ListBlobsHierarchySegmentResponse struct {
3871	rawResponse *http.Response
3872	// XMLName is used for marshalling and is subject to removal in a future release.
3873	XMLName         xml.Name                 `xml:"EnumerationResults"`
3874	ServiceEndpoint string                   `xml:"ServiceEndpoint,attr"`
3875	ContainerName   string                   `xml:"ContainerName,attr"`
3876	Prefix          *string                  `xml:"Prefix"`
3877	Marker          *string                  `xml:"Marker"`
3878	MaxResults      *int32                   `xml:"MaxResults"`
3879	Delimiter       *string                  `xml:"Delimiter"`
3880	Segment         BlobHierarchyListSegment `xml:"Blobs"`
3881	NextMarker      Marker                   `xml:"NextMarker"`
3882}
3883
3884// Response returns the raw HTTP response object.
3885func (lbhsr ListBlobsHierarchySegmentResponse) Response() *http.Response {
3886	return lbhsr.rawResponse
3887}
3888
3889// StatusCode returns the HTTP status code of the response, e.g. 200.
3890func (lbhsr ListBlobsHierarchySegmentResponse) StatusCode() int {
3891	return lbhsr.rawResponse.StatusCode
3892}
3893
3894// Status returns the HTTP status message of the response, e.g. "200 OK".
3895func (lbhsr ListBlobsHierarchySegmentResponse) Status() string {
3896	return lbhsr.rawResponse.Status
3897}
3898
3899// ContentType returns the value for header Content-Type.
3900func (lbhsr ListBlobsHierarchySegmentResponse) ContentType() string {
3901	return lbhsr.rawResponse.Header.Get("Content-Type")
3902}
3903
3904// Date returns the value for header Date.
3905func (lbhsr ListBlobsHierarchySegmentResponse) Date() time.Time {
3906	s := lbhsr.rawResponse.Header.Get("Date")
3907	if s == "" {
3908		return time.Time{}
3909	}
3910	t, err := time.Parse(time.RFC1123, s)
3911	if err != nil {
3912		t = time.Time{}
3913	}
3914	return t
3915}
3916
3917// ErrorCode returns the value for header x-ms-error-code.
3918func (lbhsr ListBlobsHierarchySegmentResponse) ErrorCode() string {
3919	return lbhsr.rawResponse.Header.Get("x-ms-error-code")
3920}
3921
3922// RequestID returns the value for header x-ms-request-id.
3923func (lbhsr ListBlobsHierarchySegmentResponse) RequestID() string {
3924	return lbhsr.rawResponse.Header.Get("x-ms-request-id")
3925}
3926
3927// Version returns the value for header x-ms-version.
3928func (lbhsr ListBlobsHierarchySegmentResponse) Version() string {
3929	return lbhsr.rawResponse.Header.Get("x-ms-version")
3930}
3931
3932// ListContainersSegmentResponse - An enumeration of containers
3933type ListContainersSegmentResponse struct {
3934	rawResponse *http.Response
3935	// XMLName is used for marshalling and is subject to removal in a future release.
3936	XMLName         xml.Name        `xml:"EnumerationResults"`
3937	ServiceEndpoint string          `xml:"ServiceEndpoint,attr"`
3938	Prefix          *string         `xml:"Prefix"`
3939	Marker          *string         `xml:"Marker"`
3940	MaxResults      *int32          `xml:"MaxResults"`
3941	ContainerItems  []ContainerItem `xml:"Containers>Container"`
3942	NextMarker      Marker          `xml:"NextMarker"`
3943}
3944
3945// Response returns the raw HTTP response object.
3946func (lcsr ListContainersSegmentResponse) Response() *http.Response {
3947	return lcsr.rawResponse
3948}
3949
3950// StatusCode returns the HTTP status code of the response, e.g. 200.
3951func (lcsr ListContainersSegmentResponse) StatusCode() int {
3952	return lcsr.rawResponse.StatusCode
3953}
3954
3955// Status returns the HTTP status message of the response, e.g. "200 OK".
3956func (lcsr ListContainersSegmentResponse) Status() string {
3957	return lcsr.rawResponse.Status
3958}
3959
3960// ErrorCode returns the value for header x-ms-error-code.
3961func (lcsr ListContainersSegmentResponse) ErrorCode() string {
3962	return lcsr.rawResponse.Header.Get("x-ms-error-code")
3963}
3964
3965// RequestID returns the value for header x-ms-request-id.
3966func (lcsr ListContainersSegmentResponse) RequestID() string {
3967	return lcsr.rawResponse.Header.Get("x-ms-request-id")
3968}
3969
3970// Version returns the value for header x-ms-version.
3971func (lcsr ListContainersSegmentResponse) Version() string {
3972	return lcsr.rawResponse.Header.Get("x-ms-version")
3973}
3974
3975// Logging - Azure Analytics Logging settings.
3976type Logging struct {
3977	// Version - The version of Storage Analytics to configure.
3978	Version string `xml:"Version"`
3979	// Delete - Indicates whether all delete requests should be logged.
3980	Delete bool `xml:"Delete"`
3981	// Read - Indicates whether all read requests should be logged.
3982	Read bool `xml:"Read"`
3983	// Write - Indicates whether all write requests should be logged.
3984	Write           bool            `xml:"Write"`
3985	RetentionPolicy RetentionPolicy `xml:"RetentionPolicy"`
3986}
3987
3988// Metrics - a summary of request statistics grouped by API in hour or minute aggregates for blobs
3989type Metrics struct {
3990	// Version - The version of Storage Analytics to configure.
3991	Version *string `xml:"Version"`
3992	// Enabled - Indicates whether metrics are enabled for the Blob service.
3993	Enabled bool `xml:"Enabled"`
3994	// IncludeAPIs - Indicates whether metrics should generate summary statistics for called API operations.
3995	IncludeAPIs     *bool            `xml:"IncludeAPIs"`
3996	RetentionPolicy *RetentionPolicy `xml:"RetentionPolicy"`
3997}
3998
3999// PageBlobClearPagesResponse ...
4000type PageBlobClearPagesResponse struct {
4001	rawResponse *http.Response
4002}
4003
4004// Response returns the raw HTTP response object.
4005func (pbcpr PageBlobClearPagesResponse) Response() *http.Response {
4006	return pbcpr.rawResponse
4007}
4008
4009// StatusCode returns the HTTP status code of the response, e.g. 200.
4010func (pbcpr PageBlobClearPagesResponse) StatusCode() int {
4011	return pbcpr.rawResponse.StatusCode
4012}
4013
4014// Status returns the HTTP status message of the response, e.g. "200 OK".
4015func (pbcpr PageBlobClearPagesResponse) Status() string {
4016	return pbcpr.rawResponse.Status
4017}
4018
4019// BlobSequenceNumber returns the value for header x-ms-blob-sequence-number.
4020func (pbcpr PageBlobClearPagesResponse) BlobSequenceNumber() int64 {
4021	s := pbcpr.rawResponse.Header.Get("x-ms-blob-sequence-number")
4022	if s == "" {
4023		return -1
4024	}
4025	i, err := strconv.ParseInt(s, 10, 64)
4026	if err != nil {
4027		i = 0
4028	}
4029	return i
4030}
4031
4032// ContentMD5 returns the value for header Content-MD5.
4033func (pbcpr PageBlobClearPagesResponse) ContentMD5() []byte {
4034	s := pbcpr.rawResponse.Header.Get("Content-MD5")
4035	if s == "" {
4036		return nil
4037	}
4038	b, err := base64.StdEncoding.DecodeString(s)
4039	if err != nil {
4040		b = nil
4041	}
4042	return b
4043}
4044
4045// Date returns the value for header Date.
4046func (pbcpr PageBlobClearPagesResponse) Date() time.Time {
4047	s := pbcpr.rawResponse.Header.Get("Date")
4048	if s == "" {
4049		return time.Time{}
4050	}
4051	t, err := time.Parse(time.RFC1123, s)
4052	if err != nil {
4053		t = time.Time{}
4054	}
4055	return t
4056}
4057
4058// ErrorCode returns the value for header x-ms-error-code.
4059func (pbcpr PageBlobClearPagesResponse) ErrorCode() string {
4060	return pbcpr.rawResponse.Header.Get("x-ms-error-code")
4061}
4062
4063// ETag returns the value for header ETag.
4064func (pbcpr PageBlobClearPagesResponse) ETag() ETag {
4065	return ETag(pbcpr.rawResponse.Header.Get("ETag"))
4066}
4067
4068// LastModified returns the value for header Last-Modified.
4069func (pbcpr PageBlobClearPagesResponse) LastModified() time.Time {
4070	s := pbcpr.rawResponse.Header.Get("Last-Modified")
4071	if s == "" {
4072		return time.Time{}
4073	}
4074	t, err := time.Parse(time.RFC1123, s)
4075	if err != nil {
4076		t = time.Time{}
4077	}
4078	return t
4079}
4080
4081// RequestID returns the value for header x-ms-request-id.
4082func (pbcpr PageBlobClearPagesResponse) RequestID() string {
4083	return pbcpr.rawResponse.Header.Get("x-ms-request-id")
4084}
4085
4086// Version returns the value for header x-ms-version.
4087func (pbcpr PageBlobClearPagesResponse) Version() string {
4088	return pbcpr.rawResponse.Header.Get("x-ms-version")
4089}
4090
4091// PageBlobCopyIncrementalResponse ...
4092type PageBlobCopyIncrementalResponse struct {
4093	rawResponse *http.Response
4094}
4095
4096// Response returns the raw HTTP response object.
4097func (pbcir PageBlobCopyIncrementalResponse) Response() *http.Response {
4098	return pbcir.rawResponse
4099}
4100
4101// StatusCode returns the HTTP status code of the response, e.g. 200.
4102func (pbcir PageBlobCopyIncrementalResponse) StatusCode() int {
4103	return pbcir.rawResponse.StatusCode
4104}
4105
4106// Status returns the HTTP status message of the response, e.g. "200 OK".
4107func (pbcir PageBlobCopyIncrementalResponse) Status() string {
4108	return pbcir.rawResponse.Status
4109}
4110
4111// CopyID returns the value for header x-ms-copy-id.
4112func (pbcir PageBlobCopyIncrementalResponse) CopyID() string {
4113	return pbcir.rawResponse.Header.Get("x-ms-copy-id")
4114}
4115
4116// CopyStatus returns the value for header x-ms-copy-status.
4117func (pbcir PageBlobCopyIncrementalResponse) CopyStatus() CopyStatusType {
4118	return CopyStatusType(pbcir.rawResponse.Header.Get("x-ms-copy-status"))
4119}
4120
4121// Date returns the value for header Date.
4122func (pbcir PageBlobCopyIncrementalResponse) Date() time.Time {
4123	s := pbcir.rawResponse.Header.Get("Date")
4124	if s == "" {
4125		return time.Time{}
4126	}
4127	t, err := time.Parse(time.RFC1123, s)
4128	if err != nil {
4129		t = time.Time{}
4130	}
4131	return t
4132}
4133
4134// ErrorCode returns the value for header x-ms-error-code.
4135func (pbcir PageBlobCopyIncrementalResponse) ErrorCode() string {
4136	return pbcir.rawResponse.Header.Get("x-ms-error-code")
4137}
4138
4139// ETag returns the value for header ETag.
4140func (pbcir PageBlobCopyIncrementalResponse) ETag() ETag {
4141	return ETag(pbcir.rawResponse.Header.Get("ETag"))
4142}
4143
4144// LastModified returns the value for header Last-Modified.
4145func (pbcir PageBlobCopyIncrementalResponse) LastModified() time.Time {
4146	s := pbcir.rawResponse.Header.Get("Last-Modified")
4147	if s == "" {
4148		return time.Time{}
4149	}
4150	t, err := time.Parse(time.RFC1123, s)
4151	if err != nil {
4152		t = time.Time{}
4153	}
4154	return t
4155}
4156
4157// RequestID returns the value for header x-ms-request-id.
4158func (pbcir PageBlobCopyIncrementalResponse) RequestID() string {
4159	return pbcir.rawResponse.Header.Get("x-ms-request-id")
4160}
4161
4162// Version returns the value for header x-ms-version.
4163func (pbcir PageBlobCopyIncrementalResponse) Version() string {
4164	return pbcir.rawResponse.Header.Get("x-ms-version")
4165}
4166
4167// PageBlobCreateResponse ...
4168type PageBlobCreateResponse struct {
4169	rawResponse *http.Response
4170}
4171
4172// Response returns the raw HTTP response object.
4173func (pbcr PageBlobCreateResponse) Response() *http.Response {
4174	return pbcr.rawResponse
4175}
4176
4177// StatusCode returns the HTTP status code of the response, e.g. 200.
4178func (pbcr PageBlobCreateResponse) StatusCode() int {
4179	return pbcr.rawResponse.StatusCode
4180}
4181
4182// Status returns the HTTP status message of the response, e.g. "200 OK".
4183func (pbcr PageBlobCreateResponse) Status() string {
4184	return pbcr.rawResponse.Status
4185}
4186
4187// ContentMD5 returns the value for header Content-MD5.
4188func (pbcr PageBlobCreateResponse) ContentMD5() []byte {
4189	s := pbcr.rawResponse.Header.Get("Content-MD5")
4190	if s == "" {
4191		return nil
4192	}
4193	b, err := base64.StdEncoding.DecodeString(s)
4194	if err != nil {
4195		b = nil
4196	}
4197	return b
4198}
4199
4200// Date returns the value for header Date.
4201func (pbcr PageBlobCreateResponse) Date() time.Time {
4202	s := pbcr.rawResponse.Header.Get("Date")
4203	if s == "" {
4204		return time.Time{}
4205	}
4206	t, err := time.Parse(time.RFC1123, s)
4207	if err != nil {
4208		t = time.Time{}
4209	}
4210	return t
4211}
4212
4213// ErrorCode returns the value for header x-ms-error-code.
4214func (pbcr PageBlobCreateResponse) ErrorCode() string {
4215	return pbcr.rawResponse.Header.Get("x-ms-error-code")
4216}
4217
4218// ETag returns the value for header ETag.
4219func (pbcr PageBlobCreateResponse) ETag() ETag {
4220	return ETag(pbcr.rawResponse.Header.Get("ETag"))
4221}
4222
4223// IsServerEncrypted returns the value for header x-ms-request-server-encrypted.
4224func (pbcr PageBlobCreateResponse) IsServerEncrypted() string {
4225	return pbcr.rawResponse.Header.Get("x-ms-request-server-encrypted")
4226}
4227
4228// LastModified returns the value for header Last-Modified.
4229func (pbcr PageBlobCreateResponse) LastModified() time.Time {
4230	s := pbcr.rawResponse.Header.Get("Last-Modified")
4231	if s == "" {
4232		return time.Time{}
4233	}
4234	t, err := time.Parse(time.RFC1123, s)
4235	if err != nil {
4236		t = time.Time{}
4237	}
4238	return t
4239}
4240
4241// RequestID returns the value for header x-ms-request-id.
4242func (pbcr PageBlobCreateResponse) RequestID() string {
4243	return pbcr.rawResponse.Header.Get("x-ms-request-id")
4244}
4245
4246// Version returns the value for header x-ms-version.
4247func (pbcr PageBlobCreateResponse) Version() string {
4248	return pbcr.rawResponse.Header.Get("x-ms-version")
4249}
4250
4251// PageBlobResizeResponse ...
4252type PageBlobResizeResponse struct {
4253	rawResponse *http.Response
4254}
4255
4256// Response returns the raw HTTP response object.
4257func (pbrr PageBlobResizeResponse) Response() *http.Response {
4258	return pbrr.rawResponse
4259}
4260
4261// StatusCode returns the HTTP status code of the response, e.g. 200.
4262func (pbrr PageBlobResizeResponse) StatusCode() int {
4263	return pbrr.rawResponse.StatusCode
4264}
4265
4266// Status returns the HTTP status message of the response, e.g. "200 OK".
4267func (pbrr PageBlobResizeResponse) Status() string {
4268	return pbrr.rawResponse.Status
4269}
4270
4271// BlobSequenceNumber returns the value for header x-ms-blob-sequence-number.
4272func (pbrr PageBlobResizeResponse) BlobSequenceNumber() int64 {
4273	s := pbrr.rawResponse.Header.Get("x-ms-blob-sequence-number")
4274	if s == "" {
4275		return -1
4276	}
4277	i, err := strconv.ParseInt(s, 10, 64)
4278	if err != nil {
4279		i = 0
4280	}
4281	return i
4282}
4283
4284// Date returns the value for header Date.
4285func (pbrr PageBlobResizeResponse) Date() time.Time {
4286	s := pbrr.rawResponse.Header.Get("Date")
4287	if s == "" {
4288		return time.Time{}
4289	}
4290	t, err := time.Parse(time.RFC1123, s)
4291	if err != nil {
4292		t = time.Time{}
4293	}
4294	return t
4295}
4296
4297// ErrorCode returns the value for header x-ms-error-code.
4298func (pbrr PageBlobResizeResponse) ErrorCode() string {
4299	return pbrr.rawResponse.Header.Get("x-ms-error-code")
4300}
4301
4302// ETag returns the value for header ETag.
4303func (pbrr PageBlobResizeResponse) ETag() ETag {
4304	return ETag(pbrr.rawResponse.Header.Get("ETag"))
4305}
4306
4307// LastModified returns the value for header Last-Modified.
4308func (pbrr PageBlobResizeResponse) LastModified() time.Time {
4309	s := pbrr.rawResponse.Header.Get("Last-Modified")
4310	if s == "" {
4311		return time.Time{}
4312	}
4313	t, err := time.Parse(time.RFC1123, s)
4314	if err != nil {
4315		t = time.Time{}
4316	}
4317	return t
4318}
4319
4320// RequestID returns the value for header x-ms-request-id.
4321func (pbrr PageBlobResizeResponse) RequestID() string {
4322	return pbrr.rawResponse.Header.Get("x-ms-request-id")
4323}
4324
4325// Version returns the value for header x-ms-version.
4326func (pbrr PageBlobResizeResponse) Version() string {
4327	return pbrr.rawResponse.Header.Get("x-ms-version")
4328}
4329
4330// PageBlobUpdateSequenceNumberResponse ...
4331type PageBlobUpdateSequenceNumberResponse struct {
4332	rawResponse *http.Response
4333}
4334
4335// Response returns the raw HTTP response object.
4336func (pbusnr PageBlobUpdateSequenceNumberResponse) Response() *http.Response {
4337	return pbusnr.rawResponse
4338}
4339
4340// StatusCode returns the HTTP status code of the response, e.g. 200.
4341func (pbusnr PageBlobUpdateSequenceNumberResponse) StatusCode() int {
4342	return pbusnr.rawResponse.StatusCode
4343}
4344
4345// Status returns the HTTP status message of the response, e.g. "200 OK".
4346func (pbusnr PageBlobUpdateSequenceNumberResponse) Status() string {
4347	return pbusnr.rawResponse.Status
4348}
4349
4350// BlobSequenceNumber returns the value for header x-ms-blob-sequence-number.
4351func (pbusnr PageBlobUpdateSequenceNumberResponse) BlobSequenceNumber() int64 {
4352	s := pbusnr.rawResponse.Header.Get("x-ms-blob-sequence-number")
4353	if s == "" {
4354		return -1
4355	}
4356	i, err := strconv.ParseInt(s, 10, 64)
4357	if err != nil {
4358		i = 0
4359	}
4360	return i
4361}
4362
4363// Date returns the value for header Date.
4364func (pbusnr PageBlobUpdateSequenceNumberResponse) Date() time.Time {
4365	s := pbusnr.rawResponse.Header.Get("Date")
4366	if s == "" {
4367		return time.Time{}
4368	}
4369	t, err := time.Parse(time.RFC1123, s)
4370	if err != nil {
4371		t = time.Time{}
4372	}
4373	return t
4374}
4375
4376// ErrorCode returns the value for header x-ms-error-code.
4377func (pbusnr PageBlobUpdateSequenceNumberResponse) ErrorCode() string {
4378	return pbusnr.rawResponse.Header.Get("x-ms-error-code")
4379}
4380
4381// ETag returns the value for header ETag.
4382func (pbusnr PageBlobUpdateSequenceNumberResponse) ETag() ETag {
4383	return ETag(pbusnr.rawResponse.Header.Get("ETag"))
4384}
4385
4386// LastModified returns the value for header Last-Modified.
4387func (pbusnr PageBlobUpdateSequenceNumberResponse) LastModified() time.Time {
4388	s := pbusnr.rawResponse.Header.Get("Last-Modified")
4389	if s == "" {
4390		return time.Time{}
4391	}
4392	t, err := time.Parse(time.RFC1123, s)
4393	if err != nil {
4394		t = time.Time{}
4395	}
4396	return t
4397}
4398
4399// RequestID returns the value for header x-ms-request-id.
4400func (pbusnr PageBlobUpdateSequenceNumberResponse) RequestID() string {
4401	return pbusnr.rawResponse.Header.Get("x-ms-request-id")
4402}
4403
4404// Version returns the value for header x-ms-version.
4405func (pbusnr PageBlobUpdateSequenceNumberResponse) Version() string {
4406	return pbusnr.rawResponse.Header.Get("x-ms-version")
4407}
4408
4409// PageBlobUploadPagesFromURLResponse ...
4410type PageBlobUploadPagesFromURLResponse struct {
4411	rawResponse *http.Response
4412}
4413
4414// Response returns the raw HTTP response object.
4415func (pbupfur PageBlobUploadPagesFromURLResponse) Response() *http.Response {
4416	return pbupfur.rawResponse
4417}
4418
4419// StatusCode returns the HTTP status code of the response, e.g. 200.
4420func (pbupfur PageBlobUploadPagesFromURLResponse) StatusCode() int {
4421	return pbupfur.rawResponse.StatusCode
4422}
4423
4424// Status returns the HTTP status message of the response, e.g. "200 OK".
4425func (pbupfur PageBlobUploadPagesFromURLResponse) Status() string {
4426	return pbupfur.rawResponse.Status
4427}
4428
4429// BlobSequenceNumber returns the value for header x-ms-blob-sequence-number.
4430func (pbupfur PageBlobUploadPagesFromURLResponse) BlobSequenceNumber() int64 {
4431	s := pbupfur.rawResponse.Header.Get("x-ms-blob-sequence-number")
4432	if s == "" {
4433		return -1
4434	}
4435	i, err := strconv.ParseInt(s, 10, 64)
4436	if err != nil {
4437		i = 0
4438	}
4439	return i
4440}
4441
4442// ContentMD5 returns the value for header Content-MD5.
4443func (pbupfur PageBlobUploadPagesFromURLResponse) ContentMD5() []byte {
4444	s := pbupfur.rawResponse.Header.Get("Content-MD5")
4445	if s == "" {
4446		return nil
4447	}
4448	b, err := base64.StdEncoding.DecodeString(s)
4449	if err != nil {
4450		b = nil
4451	}
4452	return b
4453}
4454
4455// Date returns the value for header Date.
4456func (pbupfur PageBlobUploadPagesFromURLResponse) Date() time.Time {
4457	s := pbupfur.rawResponse.Header.Get("Date")
4458	if s == "" {
4459		return time.Time{}
4460	}
4461	t, err := time.Parse(time.RFC1123, s)
4462	if err != nil {
4463		t = time.Time{}
4464	}
4465	return t
4466}
4467
4468// ErrorCode returns the value for header x-ms-error-code.
4469func (pbupfur PageBlobUploadPagesFromURLResponse) ErrorCode() string {
4470	return pbupfur.rawResponse.Header.Get("x-ms-error-code")
4471}
4472
4473// ETag returns the value for header ETag.
4474func (pbupfur PageBlobUploadPagesFromURLResponse) ETag() ETag {
4475	return ETag(pbupfur.rawResponse.Header.Get("ETag"))
4476}
4477
4478// IsServerEncrypted returns the value for header x-ms-request-server-encrypted.
4479func (pbupfur PageBlobUploadPagesFromURLResponse) IsServerEncrypted() string {
4480	return pbupfur.rawResponse.Header.Get("x-ms-request-server-encrypted")
4481}
4482
4483// LastModified returns the value for header Last-Modified.
4484func (pbupfur PageBlobUploadPagesFromURLResponse) LastModified() time.Time {
4485	s := pbupfur.rawResponse.Header.Get("Last-Modified")
4486	if s == "" {
4487		return time.Time{}
4488	}
4489	t, err := time.Parse(time.RFC1123, s)
4490	if err != nil {
4491		t = time.Time{}
4492	}
4493	return t
4494}
4495
4496// RequestID returns the value for header x-ms-request-id.
4497func (pbupfur PageBlobUploadPagesFromURLResponse) RequestID() string {
4498	return pbupfur.rawResponse.Header.Get("x-ms-request-id")
4499}
4500
4501// Version returns the value for header x-ms-version.
4502func (pbupfur PageBlobUploadPagesFromURLResponse) Version() string {
4503	return pbupfur.rawResponse.Header.Get("x-ms-version")
4504}
4505
4506// PageBlobUploadPagesResponse ...
4507type PageBlobUploadPagesResponse struct {
4508	rawResponse *http.Response
4509}
4510
4511// Response returns the raw HTTP response object.
4512func (pbupr PageBlobUploadPagesResponse) Response() *http.Response {
4513	return pbupr.rawResponse
4514}
4515
4516// StatusCode returns the HTTP status code of the response, e.g. 200.
4517func (pbupr PageBlobUploadPagesResponse) StatusCode() int {
4518	return pbupr.rawResponse.StatusCode
4519}
4520
4521// Status returns the HTTP status message of the response, e.g. "200 OK".
4522func (pbupr PageBlobUploadPagesResponse) Status() string {
4523	return pbupr.rawResponse.Status
4524}
4525
4526// BlobSequenceNumber returns the value for header x-ms-blob-sequence-number.
4527func (pbupr PageBlobUploadPagesResponse) BlobSequenceNumber() int64 {
4528	s := pbupr.rawResponse.Header.Get("x-ms-blob-sequence-number")
4529	if s == "" {
4530		return -1
4531	}
4532	i, err := strconv.ParseInt(s, 10, 64)
4533	if err != nil {
4534		i = 0
4535	}
4536	return i
4537}
4538
4539// ContentMD5 returns the value for header Content-MD5.
4540func (pbupr PageBlobUploadPagesResponse) ContentMD5() []byte {
4541	s := pbupr.rawResponse.Header.Get("Content-MD5")
4542	if s == "" {
4543		return nil
4544	}
4545	b, err := base64.StdEncoding.DecodeString(s)
4546	if err != nil {
4547		b = nil
4548	}
4549	return b
4550}
4551
4552// Date returns the value for header Date.
4553func (pbupr PageBlobUploadPagesResponse) Date() time.Time {
4554	s := pbupr.rawResponse.Header.Get("Date")
4555	if s == "" {
4556		return time.Time{}
4557	}
4558	t, err := time.Parse(time.RFC1123, s)
4559	if err != nil {
4560		t = time.Time{}
4561	}
4562	return t
4563}
4564
4565// ErrorCode returns the value for header x-ms-error-code.
4566func (pbupr PageBlobUploadPagesResponse) ErrorCode() string {
4567	return pbupr.rawResponse.Header.Get("x-ms-error-code")
4568}
4569
4570// ETag returns the value for header ETag.
4571func (pbupr PageBlobUploadPagesResponse) ETag() ETag {
4572	return ETag(pbupr.rawResponse.Header.Get("ETag"))
4573}
4574
4575// IsServerEncrypted returns the value for header x-ms-request-server-encrypted.
4576func (pbupr PageBlobUploadPagesResponse) IsServerEncrypted() string {
4577	return pbupr.rawResponse.Header.Get("x-ms-request-server-encrypted")
4578}
4579
4580// LastModified returns the value for header Last-Modified.
4581func (pbupr PageBlobUploadPagesResponse) LastModified() time.Time {
4582	s := pbupr.rawResponse.Header.Get("Last-Modified")
4583	if s == "" {
4584		return time.Time{}
4585	}
4586	t, err := time.Parse(time.RFC1123, s)
4587	if err != nil {
4588		t = time.Time{}
4589	}
4590	return t
4591}
4592
4593// RequestID returns the value for header x-ms-request-id.
4594func (pbupr PageBlobUploadPagesResponse) RequestID() string {
4595	return pbupr.rawResponse.Header.Get("x-ms-request-id")
4596}
4597
4598// Version returns the value for header x-ms-version.
4599func (pbupr PageBlobUploadPagesResponse) Version() string {
4600	return pbupr.rawResponse.Header.Get("x-ms-version")
4601}
4602
4603// PageList - the list of pages
4604type PageList struct {
4605	rawResponse *http.Response
4606	PageRange   []PageRange  `xml:"PageRange"`
4607	ClearRange  []ClearRange `xml:"ClearRange"`
4608}
4609
4610// Response returns the raw HTTP response object.
4611func (pl PageList) Response() *http.Response {
4612	return pl.rawResponse
4613}
4614
4615// StatusCode returns the HTTP status code of the response, e.g. 200.
4616func (pl PageList) StatusCode() int {
4617	return pl.rawResponse.StatusCode
4618}
4619
4620// Status returns the HTTP status message of the response, e.g. "200 OK".
4621func (pl PageList) Status() string {
4622	return pl.rawResponse.Status
4623}
4624
4625// BlobContentLength returns the value for header x-ms-blob-content-length.
4626func (pl PageList) BlobContentLength() int64 {
4627	s := pl.rawResponse.Header.Get("x-ms-blob-content-length")
4628	if s == "" {
4629		return -1
4630	}
4631	i, err := strconv.ParseInt(s, 10, 64)
4632	if err != nil {
4633		i = 0
4634	}
4635	return i
4636}
4637
4638// Date returns the value for header Date.
4639func (pl PageList) Date() time.Time {
4640	s := pl.rawResponse.Header.Get("Date")
4641	if s == "" {
4642		return time.Time{}
4643	}
4644	t, err := time.Parse(time.RFC1123, s)
4645	if err != nil {
4646		t = time.Time{}
4647	}
4648	return t
4649}
4650
4651// ErrorCode returns the value for header x-ms-error-code.
4652func (pl PageList) ErrorCode() string {
4653	return pl.rawResponse.Header.Get("x-ms-error-code")
4654}
4655
4656// ETag returns the value for header ETag.
4657func (pl PageList) ETag() ETag {
4658	return ETag(pl.rawResponse.Header.Get("ETag"))
4659}
4660
4661// LastModified returns the value for header Last-Modified.
4662func (pl PageList) LastModified() time.Time {
4663	s := pl.rawResponse.Header.Get("Last-Modified")
4664	if s == "" {
4665		return time.Time{}
4666	}
4667	t, err := time.Parse(time.RFC1123, s)
4668	if err != nil {
4669		t = time.Time{}
4670	}
4671	return t
4672}
4673
4674// RequestID returns the value for header x-ms-request-id.
4675func (pl PageList) RequestID() string {
4676	return pl.rawResponse.Header.Get("x-ms-request-id")
4677}
4678
4679// Version returns the value for header x-ms-version.
4680func (pl PageList) Version() string {
4681	return pl.rawResponse.Header.Get("x-ms-version")
4682}
4683
4684// PageRange ...
4685type PageRange struct {
4686	Start int64 `xml:"Start"`
4687	End   int64 `xml:"End"`
4688}
4689
4690// RetentionPolicy - the retention policy which determines how long the associated data should persist
4691type RetentionPolicy struct {
4692	// Enabled - Indicates whether a retention policy is enabled for the storage service
4693	Enabled bool `xml:"Enabled"`
4694	// Days - Indicates the number of days that metrics or logging or soft-deleted data should be retained. All data older than this value will be deleted
4695	Days *int32 `xml:"Days"`
4696}
4697
4698// ServiceGetAccountInfoResponse ...
4699type ServiceGetAccountInfoResponse struct {
4700	rawResponse *http.Response
4701}
4702
4703// Response returns the raw HTTP response object.
4704func (sgair ServiceGetAccountInfoResponse) Response() *http.Response {
4705	return sgair.rawResponse
4706}
4707
4708// StatusCode returns the HTTP status code of the response, e.g. 200.
4709func (sgair ServiceGetAccountInfoResponse) StatusCode() int {
4710	return sgair.rawResponse.StatusCode
4711}
4712
4713// Status returns the HTTP status message of the response, e.g. "200 OK".
4714func (sgair ServiceGetAccountInfoResponse) Status() string {
4715	return sgair.rawResponse.Status
4716}
4717
4718// AccountKind returns the value for header x-ms-account-kind.
4719func (sgair ServiceGetAccountInfoResponse) AccountKind() AccountKindType {
4720	return AccountKindType(sgair.rawResponse.Header.Get("x-ms-account-kind"))
4721}
4722
4723// Date returns the value for header Date.
4724func (sgair ServiceGetAccountInfoResponse) Date() time.Time {
4725	s := sgair.rawResponse.Header.Get("Date")
4726	if s == "" {
4727		return time.Time{}
4728	}
4729	t, err := time.Parse(time.RFC1123, s)
4730	if err != nil {
4731		t = time.Time{}
4732	}
4733	return t
4734}
4735
4736// ErrorCode returns the value for header x-ms-error-code.
4737func (sgair ServiceGetAccountInfoResponse) ErrorCode() string {
4738	return sgair.rawResponse.Header.Get("x-ms-error-code")
4739}
4740
4741// RequestID returns the value for header x-ms-request-id.
4742func (sgair ServiceGetAccountInfoResponse) RequestID() string {
4743	return sgair.rawResponse.Header.Get("x-ms-request-id")
4744}
4745
4746// SkuName returns the value for header x-ms-sku-name.
4747func (sgair ServiceGetAccountInfoResponse) SkuName() SkuNameType {
4748	return SkuNameType(sgair.rawResponse.Header.Get("x-ms-sku-name"))
4749}
4750
4751// Version returns the value for header x-ms-version.
4752func (sgair ServiceGetAccountInfoResponse) Version() string {
4753	return sgair.rawResponse.Header.Get("x-ms-version")
4754}
4755
4756// ServiceSetPropertiesResponse ...
4757type ServiceSetPropertiesResponse struct {
4758	rawResponse *http.Response
4759}
4760
4761// Response returns the raw HTTP response object.
4762func (sspr ServiceSetPropertiesResponse) Response() *http.Response {
4763	return sspr.rawResponse
4764}
4765
4766// StatusCode returns the HTTP status code of the response, e.g. 200.
4767func (sspr ServiceSetPropertiesResponse) StatusCode() int {
4768	return sspr.rawResponse.StatusCode
4769}
4770
4771// Status returns the HTTP status message of the response, e.g. "200 OK".
4772func (sspr ServiceSetPropertiesResponse) Status() string {
4773	return sspr.rawResponse.Status
4774}
4775
4776// ErrorCode returns the value for header x-ms-error-code.
4777func (sspr ServiceSetPropertiesResponse) ErrorCode() string {
4778	return sspr.rawResponse.Header.Get("x-ms-error-code")
4779}
4780
4781// RequestID returns the value for header x-ms-request-id.
4782func (sspr ServiceSetPropertiesResponse) RequestID() string {
4783	return sspr.rawResponse.Header.Get("x-ms-request-id")
4784}
4785
4786// Version returns the value for header x-ms-version.
4787func (sspr ServiceSetPropertiesResponse) Version() string {
4788	return sspr.rawResponse.Header.Get("x-ms-version")
4789}
4790
4791// SignedIdentifier - signed identifier
4792type SignedIdentifier struct {
4793	// ID - a unique id
4794	ID           string       `xml:"Id"`
4795	AccessPolicy AccessPolicy `xml:"AccessPolicy"`
4796}
4797
4798// SignedIdentifiers - Wraps the response from the containerClient.GetAccessPolicy method.
4799type SignedIdentifiers struct {
4800	rawResponse *http.Response
4801	Items       []SignedIdentifier `xml:"SignedIdentifier"`
4802}
4803
4804// Response returns the raw HTTP response object.
4805func (si SignedIdentifiers) Response() *http.Response {
4806	return si.rawResponse
4807}
4808
4809// StatusCode returns the HTTP status code of the response, e.g. 200.
4810func (si SignedIdentifiers) StatusCode() int {
4811	return si.rawResponse.StatusCode
4812}
4813
4814// Status returns the HTTP status message of the response, e.g. "200 OK".
4815func (si SignedIdentifiers) Status() string {
4816	return si.rawResponse.Status
4817}
4818
4819// BlobPublicAccess returns the value for header x-ms-blob-public-access.
4820func (si SignedIdentifiers) BlobPublicAccess() PublicAccessType {
4821	return PublicAccessType(si.rawResponse.Header.Get("x-ms-blob-public-access"))
4822}
4823
4824// Date returns the value for header Date.
4825func (si SignedIdentifiers) Date() time.Time {
4826	s := si.rawResponse.Header.Get("Date")
4827	if s == "" {
4828		return time.Time{}
4829	}
4830	t, err := time.Parse(time.RFC1123, s)
4831	if err != nil {
4832		t = time.Time{}
4833	}
4834	return t
4835}
4836
4837// ErrorCode returns the value for header x-ms-error-code.
4838func (si SignedIdentifiers) ErrorCode() string {
4839	return si.rawResponse.Header.Get("x-ms-error-code")
4840}
4841
4842// ETag returns the value for header ETag.
4843func (si SignedIdentifiers) ETag() ETag {
4844	return ETag(si.rawResponse.Header.Get("ETag"))
4845}
4846
4847// LastModified returns the value for header Last-Modified.
4848func (si SignedIdentifiers) LastModified() time.Time {
4849	s := si.rawResponse.Header.Get("Last-Modified")
4850	if s == "" {
4851		return time.Time{}
4852	}
4853	t, err := time.Parse(time.RFC1123, s)
4854	if err != nil {
4855		t = time.Time{}
4856	}
4857	return t
4858}
4859
4860// RequestID returns the value for header x-ms-request-id.
4861func (si SignedIdentifiers) RequestID() string {
4862	return si.rawResponse.Header.Get("x-ms-request-id")
4863}
4864
4865// Version returns the value for header x-ms-version.
4866func (si SignedIdentifiers) Version() string {
4867	return si.rawResponse.Header.Get("x-ms-version")
4868}
4869
4870// StaticWebsite - The properties that enable an account to host a static website
4871type StaticWebsite struct {
4872	// Enabled - Indicates whether this account is hosting a static website
4873	Enabled bool `xml:"Enabled"`
4874	// IndexDocument - The default name of the index page under each directory
4875	IndexDocument *string `xml:"IndexDocument"`
4876	// ErrorDocument404Path - The absolute path of the custom 404 page
4877	ErrorDocument404Path *string `xml:"ErrorDocument404Path"`
4878}
4879
4880// StorageServiceProperties - Storage Service Properties.
4881type StorageServiceProperties struct {
4882	rawResponse   *http.Response
4883	Logging       *Logging `xml:"Logging"`
4884	HourMetrics   *Metrics `xml:"HourMetrics"`
4885	MinuteMetrics *Metrics `xml:"MinuteMetrics"`
4886	// Cors - The set of CORS rules.
4887	Cors []CorsRule `xml:"Cors>CorsRule"`
4888	// DefaultServiceVersion - The default version to use for requests to the Blob service if an incoming request's version is not specified. Possible values include version 2008-10-27 and all more recent versions
4889	DefaultServiceVersion *string          `xml:"DefaultServiceVersion"`
4890	DeleteRetentionPolicy *RetentionPolicy `xml:"DeleteRetentionPolicy"`
4891	StaticWebsite         *StaticWebsite   `xml:"StaticWebsite"`
4892}
4893
4894// Response returns the raw HTTP response object.
4895func (ssp StorageServiceProperties) Response() *http.Response {
4896	return ssp.rawResponse
4897}
4898
4899// StatusCode returns the HTTP status code of the response, e.g. 200.
4900func (ssp StorageServiceProperties) StatusCode() int {
4901	return ssp.rawResponse.StatusCode
4902}
4903
4904// Status returns the HTTP status message of the response, e.g. "200 OK".
4905func (ssp StorageServiceProperties) Status() string {
4906	return ssp.rawResponse.Status
4907}
4908
4909// ErrorCode returns the value for header x-ms-error-code.
4910func (ssp StorageServiceProperties) ErrorCode() string {
4911	return ssp.rawResponse.Header.Get("x-ms-error-code")
4912}
4913
4914// RequestID returns the value for header x-ms-request-id.
4915func (ssp StorageServiceProperties) RequestID() string {
4916	return ssp.rawResponse.Header.Get("x-ms-request-id")
4917}
4918
4919// Version returns the value for header x-ms-version.
4920func (ssp StorageServiceProperties) Version() string {
4921	return ssp.rawResponse.Header.Get("x-ms-version")
4922}
4923
4924// StorageServiceStats - Stats for the storage service.
4925type StorageServiceStats struct {
4926	rawResponse    *http.Response
4927	GeoReplication *GeoReplication `xml:"GeoReplication"`
4928}
4929
4930// Response returns the raw HTTP response object.
4931func (sss StorageServiceStats) Response() *http.Response {
4932	return sss.rawResponse
4933}
4934
4935// StatusCode returns the HTTP status code of the response, e.g. 200.
4936func (sss StorageServiceStats) StatusCode() int {
4937	return sss.rawResponse.StatusCode
4938}
4939
4940// Status returns the HTTP status message of the response, e.g. "200 OK".
4941func (sss StorageServiceStats) Status() string {
4942	return sss.rawResponse.Status
4943}
4944
4945// Date returns the value for header Date.
4946func (sss StorageServiceStats) Date() time.Time {
4947	s := sss.rawResponse.Header.Get("Date")
4948	if s == "" {
4949		return time.Time{}
4950	}
4951	t, err := time.Parse(time.RFC1123, s)
4952	if err != nil {
4953		t = time.Time{}
4954	}
4955	return t
4956}
4957
4958// ErrorCode returns the value for header x-ms-error-code.
4959func (sss StorageServiceStats) ErrorCode() string {
4960	return sss.rawResponse.Header.Get("x-ms-error-code")
4961}
4962
4963// RequestID returns the value for header x-ms-request-id.
4964func (sss StorageServiceStats) RequestID() string {
4965	return sss.rawResponse.Header.Get("x-ms-request-id")
4966}
4967
4968// Version returns the value for header x-ms-version.
4969func (sss StorageServiceStats) Version() string {
4970	return sss.rawResponse.Header.Get("x-ms-version")
4971}
4972
4973// UserDelegationKey - A user delegation key
4974type UserDelegationKey struct {
4975	rawResponse *http.Response
4976	// SignedOid - The Azure Active Directory object ID in GUID format.
4977	SignedOid string `xml:"SignedOid"`
4978	// SignedTid - The Azure Active Directory tenant ID in GUID format
4979	SignedTid string `xml:"SignedTid"`
4980	// SignedStart - The date-time the key is active
4981	SignedStart time.Time `xml:"SignedStart"`
4982	// SignedExpiry - The date-time the key expires
4983	SignedExpiry time.Time `xml:"SignedExpiry"`
4984	// SignedService - Abbreviation of the Azure Storage service that accepts the key
4985	SignedService string `xml:"SignedService"`
4986	// SignedVersion - The service version that created the key
4987	SignedVersion string `xml:"SignedVersion"`
4988	// Value - The key as a base64 string
4989	Value string `xml:"Value"`
4990}
4991
4992func (udk UserDelegationKey) ComputeHMACSHA256(message string) (base64String string) {
4993	bytes, _ := base64.StdEncoding.DecodeString(udk.Value)
4994	h := hmac.New(sha256.New, bytes)
4995	h.Write([]byte(message))
4996	return base64.StdEncoding.EncodeToString(h.Sum(nil))
4997}
4998
4999// MarshalXML implements the xml.Marshaler interface for UserDelegationKey.
5000func (udk UserDelegationKey) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
5001	udk2 := (*userDelegationKey)(unsafe.Pointer(&udk))
5002	return e.EncodeElement(*udk2, start)
5003}
5004
5005// UnmarshalXML implements the xml.Unmarshaler interface for UserDelegationKey.
5006func (udk *UserDelegationKey) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
5007	udk2 := (*userDelegationKey)(unsafe.Pointer(udk))
5008	return d.DecodeElement(udk2, &start)
5009}
5010
5011// Response returns the raw HTTP response object.
5012func (udk UserDelegationKey) Response() *http.Response {
5013	return udk.rawResponse
5014}
5015
5016// StatusCode returns the HTTP status code of the response, e.g. 200.
5017func (udk UserDelegationKey) StatusCode() int {
5018	return udk.rawResponse.StatusCode
5019}
5020
5021// Status returns the HTTP status message of the response, e.g. "200 OK".
5022func (udk UserDelegationKey) Status() string {
5023	return udk.rawResponse.Status
5024}
5025
5026// Date returns the value for header Date.
5027func (udk UserDelegationKey) Date() time.Time {
5028	s := udk.rawResponse.Header.Get("Date")
5029	if s == "" {
5030		return time.Time{}
5031	}
5032	t, err := time.Parse(time.RFC1123, s)
5033	if err != nil {
5034		t = time.Time{}
5035	}
5036	return t
5037}
5038
5039// ErrorCode returns the value for header x-ms-error-code.
5040func (udk UserDelegationKey) ErrorCode() string {
5041	return udk.rawResponse.Header.Get("x-ms-error-code")
5042}
5043
5044// RequestID returns the value for header x-ms-request-id.
5045func (udk UserDelegationKey) RequestID() string {
5046	return udk.rawResponse.Header.Get("x-ms-request-id")
5047}
5048
5049// Version returns the value for header x-ms-version.
5050func (udk UserDelegationKey) Version() string {
5051	return udk.rawResponse.Header.Get("x-ms-version")
5052}
5053
5054func init() {
5055	if reflect.TypeOf((*UserDelegationKey)(nil)).Elem().Size() != reflect.TypeOf((*userDelegationKey)(nil)).Elem().Size() {
5056		validateError(errors.New("size mismatch between UserDelegationKey and userDelegationKey"))
5057	}
5058	if reflect.TypeOf((*AccessPolicy)(nil)).Elem().Size() != reflect.TypeOf((*accessPolicy)(nil)).Elem().Size() {
5059		validateError(errors.New("size mismatch between AccessPolicy and accessPolicy"))
5060	}
5061	if reflect.TypeOf((*BlobProperties)(nil)).Elem().Size() != reflect.TypeOf((*blobProperties)(nil)).Elem().Size() {
5062		validateError(errors.New("size mismatch between BlobProperties and blobProperties"))
5063	}
5064	if reflect.TypeOf((*ContainerProperties)(nil)).Elem().Size() != reflect.TypeOf((*containerProperties)(nil)).Elem().Size() {
5065		validateError(errors.New("size mismatch between ContainerProperties and containerProperties"))
5066	}
5067	if reflect.TypeOf((*GeoReplication)(nil)).Elem().Size() != reflect.TypeOf((*geoReplication)(nil)).Elem().Size() {
5068		validateError(errors.New("size mismatch between GeoReplication and geoReplication"))
5069	}
5070}
5071
5072const (
5073	rfc3339Format = "2006-01-02T15:04:05Z" //This was wrong in the generated code, FYI
5074)
5075
5076// used to convert times from UTC to GMT before sending across the wire
5077var gmt = time.FixedZone("GMT", 0)
5078
5079// internal type used for marshalling time in RFC1123 format
5080type timeRFC1123 struct {
5081	time.Time
5082}
5083
5084// MarshalText implements the encoding.TextMarshaler interface for timeRFC1123.
5085func (t timeRFC1123) MarshalText() ([]byte, error) {
5086	return []byte(t.Format(time.RFC1123)), nil
5087}
5088
5089// UnmarshalText implements the encoding.TextUnmarshaler interface for timeRFC1123.
5090func (t *timeRFC1123) UnmarshalText(data []byte) (err error) {
5091	t.Time, err = time.Parse(time.RFC1123, string(data))
5092	return
5093}
5094
5095// internal type used for marshalling time in RFC3339 format
5096type timeRFC3339 struct {
5097	time.Time
5098}
5099
5100// MarshalText implements the encoding.TextMarshaler interface for timeRFC3339.
5101func (t timeRFC3339) MarshalText() ([]byte, error) {
5102	return []byte(t.Format(rfc3339Format)), nil
5103}
5104
5105// UnmarshalText implements the encoding.TextUnmarshaler interface for timeRFC3339.
5106func (t *timeRFC3339) UnmarshalText(data []byte) (err error) {
5107	t.Time, err = time.Parse(rfc3339Format, string(data))
5108	return
5109}
5110
5111// internal type used for marshalling base64 encoded strings
5112type base64Encoded struct {
5113	b []byte
5114}
5115
5116// MarshalText implements the encoding.TextMarshaler interface for base64Encoded.
5117func (c base64Encoded) MarshalText() ([]byte, error) {
5118	return []byte(base64.StdEncoding.EncodeToString(c.b)), nil
5119}
5120
5121// UnmarshalText implements the encoding.TextUnmarshaler interface for base64Encoded.
5122func (c *base64Encoded) UnmarshalText(data []byte) error {
5123	b, err := base64.StdEncoding.DecodeString(string(data))
5124	if err != nil {
5125		return err
5126	}
5127	c.b = b
5128	return nil
5129}
5130
5131// internal type used for marshalling
5132type userDelegationKey struct {
5133	rawResponse   *http.Response
5134	SignedOid     string      `xml:"SignedOid"`
5135	SignedTid     string      `xml:"SignedTid"`
5136	SignedStart   timeRFC3339 `xml:"SignedStart"`
5137	SignedExpiry  timeRFC3339 `xml:"SignedExpiry"`
5138	SignedService string      `xml:"SignedService"`
5139	SignedVersion string      `xml:"SignedVersion"`
5140	Value         string      `xml:"Value"`
5141}
5142
5143// internal type used for marshalling
5144type accessPolicy struct {
5145	Start      timeRFC3339 `xml:"Start"`
5146	Expiry     timeRFC3339 `xml:"Expiry"`
5147	Permission string      `xml:"Permission"`
5148}
5149
5150// internal type used for marshalling
5151type blobProperties struct {
5152	// XMLName is used for marshalling and is subject to removal in a future release.
5153	XMLName                xml.Name          `xml:"Properties"`
5154	CreationTime           *timeRFC1123      `xml:"Creation-Time"`
5155	LastModified           timeRFC1123       `xml:"Last-Modified"`
5156	Etag                   ETag              `xml:"Etag"`
5157	ContentLength          *int64            `xml:"Content-Length"`
5158	ContentType            *string           `xml:"Content-Type"`
5159	ContentEncoding        *string           `xml:"Content-Encoding"`
5160	ContentLanguage        *string           `xml:"Content-Language"`
5161	ContentMD5             base64Encoded     `xml:"Content-MD5"`
5162	ContentDisposition     *string           `xml:"Content-Disposition"`
5163	CacheControl           *string           `xml:"Cache-Control"`
5164	BlobSequenceNumber     *int64            `xml:"x-ms-blob-sequence-number"`
5165	BlobType               BlobType          `xml:"BlobType"`
5166	LeaseStatus            LeaseStatusType   `xml:"LeaseStatus"`
5167	LeaseState             LeaseStateType    `xml:"LeaseState"`
5168	LeaseDuration          LeaseDurationType `xml:"LeaseDuration"`
5169	CopyID                 *string           `xml:"CopyId"`
5170	CopyStatus             CopyStatusType    `xml:"CopyStatus"`
5171	CopySource             *string           `xml:"CopySource"`
5172	CopyProgress           *string           `xml:"CopyProgress"`
5173	CopyCompletionTime     *timeRFC1123      `xml:"CopyCompletionTime"`
5174	CopyStatusDescription  *string           `xml:"CopyStatusDescription"`
5175	ServerEncrypted        *bool             `xml:"ServerEncrypted"`
5176	IncrementalCopy        *bool             `xml:"IncrementalCopy"`
5177	DestinationSnapshot    *string           `xml:"DestinationSnapshot"`
5178	DeletedTime            *timeRFC1123      `xml:"DeletedTime"`
5179	RemainingRetentionDays *int32            `xml:"RemainingRetentionDays"`
5180	AccessTier             AccessTierType    `xml:"AccessTier"`
5181	AccessTierInferred     *bool             `xml:"AccessTierInferred"`
5182	ArchiveStatus          ArchiveStatusType `xml:"ArchiveStatus"`
5183	AccessTierChangeTime   *timeRFC1123      `xml:"AccessTierChangeTime"`
5184}
5185
5186// internal type used for marshalling
5187type containerProperties struct {
5188	LastModified          timeRFC1123       `xml:"Last-Modified"`
5189	Etag                  ETag              `xml:"Etag"`
5190	LeaseStatus           LeaseStatusType   `xml:"LeaseStatus"`
5191	LeaseState            LeaseStateType    `xml:"LeaseState"`
5192	LeaseDuration         LeaseDurationType `xml:"LeaseDuration"`
5193	PublicAccess          PublicAccessType  `xml:"PublicAccess"`
5194	HasImmutabilityPolicy *bool             `xml:"HasImmutabilityPolicy"`
5195	HasLegalHold          *bool             `xml:"HasLegalHold"`
5196}
5197
5198// internal type used for marshalling
5199type geoReplication struct {
5200	Status       GeoReplicationStatusType `xml:"Status"`
5201	LastSyncTime timeRFC1123              `xml:"LastSyncTime"`
5202}
5203