/
zz_generated_models.go
3220 lines (2749 loc) · 104 KB
/
zz_generated_models.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
package azfile
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"encoding/base64"
"encoding/xml"
"errors"
"io"
"net/http"
"reflect"
"strconv"
"strings"
"time"
"unsafe"
)
// ETag is an entity tag.
type ETag string
const (
// ETagNone represents an empty entity tag.
ETagNone ETag = ""
// ETagAny matches any entity tag.
ETagAny ETag = "*"
)
// Metadata contains metadata key/value pairs.
type Metadata map[string]string
const mdPrefix = "x-ms-meta-"
const mdPrefixLen = len(mdPrefix)
// UnmarshalXML implements the xml.Unmarshaler interface for Metadata.
func (md *Metadata) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
tokName := ""
for t, err := d.Token(); err == nil; t, err = d.Token() {
switch tt := t.(type) {
case xml.StartElement:
tokName = strings.ToLower(tt.Name.Local)
break
case xml.CharData:
if *md == nil {
*md = Metadata{}
}
(*md)[tokName] = string(tt)
break
}
}
return nil
}
// Marker represents an opaque value used in paged responses.
type Marker struct {
Val *string
}
// NotDone returns true if the list enumeration should be started or is not yet complete. Specifically, NotDone returns true
// for a just-initialized (zero value) Marker indicating that you should make an initial request to get a result portion from
// the service. NotDone also returns true whenever the service returns an interim result portion. NotDone returns false only
// after the service has returned the final result portion.
func (m Marker) NotDone() bool {
return m.Val == nil || *m.Val != ""
}
// UnmarshalXML implements the xml.Unmarshaler interface for Marker.
func (m *Marker) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
var out string
err := d.DecodeElement(&out, &start)
m.Val = &out
return err
}
// concatenates a slice of const values with the specified separator between each item
func joinConst(s interface{}, sep string) string {
v := reflect.ValueOf(s)
if v.Kind() != reflect.Slice && v.Kind() != reflect.Array {
panic("s wasn't a slice or array")
}
ss := make([]string, 0, v.Len())
for i := 0; i < v.Len(); i++ {
ss = append(ss, v.Index(i).String())
}
return strings.Join(ss, sep)
}
func validateError(err error) {
if err != nil {
panic(err)
}
}
// CopyStatusType enumerates the values for copy status type.
type CopyStatusType string
const (
// CopyStatusAborted ...
CopyStatusAborted CopyStatusType = "aborted"
// CopyStatusFailed ...
CopyStatusFailed CopyStatusType = "failed"
// CopyStatusNone represents an empty CopyStatusType.
CopyStatusNone CopyStatusType = ""
// CopyStatusPending ...
CopyStatusPending CopyStatusType = "pending"
// CopyStatusSuccess ...
CopyStatusSuccess CopyStatusType = "success"
)
// PossibleCopyStatusTypeValues returns an array of possible values for the CopyStatusType const type.
func PossibleCopyStatusTypeValues() []CopyStatusType {
return []CopyStatusType{CopyStatusAborted, CopyStatusFailed, CopyStatusNone, CopyStatusPending, CopyStatusSuccess}
}
// DeleteSnapshotsOptionType enumerates the values for delete snapshots option type.
type DeleteSnapshotsOptionType string
const (
// DeleteSnapshotsOptionInclude ...
DeleteSnapshotsOptionInclude DeleteSnapshotsOptionType = "include"
// DeleteSnapshotsOptionNone represents an empty DeleteSnapshotsOptionType.
DeleteSnapshotsOptionNone DeleteSnapshotsOptionType = ""
)
// PossibleDeleteSnapshotsOptionTypeValues returns an array of possible values for the DeleteSnapshotsOptionType const type.
func PossibleDeleteSnapshotsOptionTypeValues() []DeleteSnapshotsOptionType {
return []DeleteSnapshotsOptionType{DeleteSnapshotsOptionInclude, DeleteSnapshotsOptionNone}
}
// FileRangeWriteType enumerates the values for file range write type.
type FileRangeWriteType string
const (
// FileRangeWriteClear ...
FileRangeWriteClear FileRangeWriteType = "clear"
// FileRangeWriteNone represents an empty FileRangeWriteType.
FileRangeWriteNone FileRangeWriteType = ""
// FileRangeWriteUpdate ...
FileRangeWriteUpdate FileRangeWriteType = "update"
)
// PossibleFileRangeWriteTypeValues returns an array of possible values for the FileRangeWriteType const type.
func PossibleFileRangeWriteTypeValues() []FileRangeWriteType {
return []FileRangeWriteType{FileRangeWriteClear, FileRangeWriteNone, FileRangeWriteUpdate}
}
// ListSharesIncludeType enumerates the values for list shares include type.
type ListSharesIncludeType string
const (
// ListSharesIncludeMetadata ...
ListSharesIncludeMetadata ListSharesIncludeType = "metadata"
// ListSharesIncludeNone represents an empty ListSharesIncludeType.
ListSharesIncludeNone ListSharesIncludeType = ""
// ListSharesIncludeSnapshots ...
ListSharesIncludeSnapshots ListSharesIncludeType = "snapshots"
)
// PossibleListSharesIncludeTypeValues returns an array of possible values for the ListSharesIncludeType const type.
func PossibleListSharesIncludeTypeValues() []ListSharesIncludeType {
return []ListSharesIncludeType{ListSharesIncludeMetadata, ListSharesIncludeNone, ListSharesIncludeSnapshots}
}
// StorageErrorCodeType enumerates the values for storage error code type.
type StorageErrorCodeType string
const (
// StorageErrorCodeAccountAlreadyExists ...
StorageErrorCodeAccountAlreadyExists StorageErrorCodeType = "AccountAlreadyExists"
// StorageErrorCodeAccountBeingCreated ...
StorageErrorCodeAccountBeingCreated StorageErrorCodeType = "AccountBeingCreated"
// StorageErrorCodeAccountIsDisabled ...
StorageErrorCodeAccountIsDisabled StorageErrorCodeType = "AccountIsDisabled"
// StorageErrorCodeAuthenticationFailed ...
StorageErrorCodeAuthenticationFailed StorageErrorCodeType = "AuthenticationFailed"
// StorageErrorCodeAuthorizationFailure ...
StorageErrorCodeAuthorizationFailure StorageErrorCodeType = "AuthorizationFailure"
// StorageErrorCodeAuthorizationPermissionMismatch ...
StorageErrorCodeAuthorizationPermissionMismatch StorageErrorCodeType = "AuthorizationPermissionMismatch"
// StorageErrorCodeAuthorizationProtocolMismatch ...
StorageErrorCodeAuthorizationProtocolMismatch StorageErrorCodeType = "AuthorizationProtocolMismatch"
// StorageErrorCodeAuthorizationResourceTypeMismatch ...
StorageErrorCodeAuthorizationResourceTypeMismatch StorageErrorCodeType = "AuthorizationResourceTypeMismatch"
// StorageErrorCodeAuthorizationServiceMismatch ...
StorageErrorCodeAuthorizationServiceMismatch StorageErrorCodeType = "AuthorizationServiceMismatch"
// StorageErrorCodeAuthorizationSourceIPMismatch ...
StorageErrorCodeAuthorizationSourceIPMismatch StorageErrorCodeType = "AuthorizationSourceIPMismatch"
// StorageErrorCodeCannotDeleteFileOrDirectory ...
StorageErrorCodeCannotDeleteFileOrDirectory StorageErrorCodeType = "CannotDeleteFileOrDirectory"
// StorageErrorCodeClientCacheFlushDelay ...
StorageErrorCodeClientCacheFlushDelay StorageErrorCodeType = "ClientCacheFlushDelay"
// StorageErrorCodeConditionHeadersNotSupported ...
StorageErrorCodeConditionHeadersNotSupported StorageErrorCodeType = "ConditionHeadersNotSupported"
// StorageErrorCodeConditionNotMet ...
StorageErrorCodeConditionNotMet StorageErrorCodeType = "ConditionNotMet"
// StorageErrorCodeContainerQuotaDowngradeNotAllowed ...
StorageErrorCodeContainerQuotaDowngradeNotAllowed StorageErrorCodeType = "ContainerQuotaDowngradeNotAllowed"
// StorageErrorCodeDeletePending ...
StorageErrorCodeDeletePending StorageErrorCodeType = "DeletePending"
// StorageErrorCodeDirectoryNotEmpty ...
StorageErrorCodeDirectoryNotEmpty StorageErrorCodeType = "DirectoryNotEmpty"
// StorageErrorCodeEmptyMetadataKey ...
StorageErrorCodeEmptyMetadataKey StorageErrorCodeType = "EmptyMetadataKey"
// StorageErrorCodeFeatureVersionMismatch ...
StorageErrorCodeFeatureVersionMismatch StorageErrorCodeType = "FeatureVersionMismatch"
// StorageErrorCodeFileLockConflict ...
StorageErrorCodeFileLockConflict StorageErrorCodeType = "FileLockConflict"
// StorageErrorCodeInsufficientAccountPermissions ...
StorageErrorCodeInsufficientAccountPermissions StorageErrorCodeType = "InsufficientAccountPermissions"
// StorageErrorCodeInternalError ...
StorageErrorCodeInternalError StorageErrorCodeType = "InternalError"
// StorageErrorCodeInvalidAuthenticationInfo ...
StorageErrorCodeInvalidAuthenticationInfo StorageErrorCodeType = "InvalidAuthenticationInfo"
// StorageErrorCodeInvalidFileOrDirectoryPathName ...
StorageErrorCodeInvalidFileOrDirectoryPathName StorageErrorCodeType = "InvalidFileOrDirectoryPathName"
// StorageErrorCodeInvalidHeaderValue ...
StorageErrorCodeInvalidHeaderValue StorageErrorCodeType = "InvalidHeaderValue"
// StorageErrorCodeInvalidHTTPVerb ...
StorageErrorCodeInvalidHTTPVerb StorageErrorCodeType = "InvalidHttpVerb"
// StorageErrorCodeInvalidInput ...
StorageErrorCodeInvalidInput StorageErrorCodeType = "InvalidInput"
// StorageErrorCodeInvalidMd5 ...
StorageErrorCodeInvalidMd5 StorageErrorCodeType = "InvalidMd5"
// StorageErrorCodeInvalidMetadata ...
StorageErrorCodeInvalidMetadata StorageErrorCodeType = "InvalidMetadata"
// StorageErrorCodeInvalidQueryParameterValue ...
StorageErrorCodeInvalidQueryParameterValue StorageErrorCodeType = "InvalidQueryParameterValue"
// StorageErrorCodeInvalidRange ...
StorageErrorCodeInvalidRange StorageErrorCodeType = "InvalidRange"
// StorageErrorCodeInvalidResourceName ...
StorageErrorCodeInvalidResourceName StorageErrorCodeType = "InvalidResourceName"
// StorageErrorCodeInvalidURI ...
StorageErrorCodeInvalidURI StorageErrorCodeType = "InvalidUri"
// StorageErrorCodeInvalidXMLDocument ...
StorageErrorCodeInvalidXMLDocument StorageErrorCodeType = "InvalidXmlDocument"
// StorageErrorCodeInvalidXMLNodeValue ...
StorageErrorCodeInvalidXMLNodeValue StorageErrorCodeType = "InvalidXmlNodeValue"
// StorageErrorCodeMd5Mismatch ...
StorageErrorCodeMd5Mismatch StorageErrorCodeType = "Md5Mismatch"
// StorageErrorCodeMetadataTooLarge ...
StorageErrorCodeMetadataTooLarge StorageErrorCodeType = "MetadataTooLarge"
// StorageErrorCodeMissingContentLengthHeader ...
StorageErrorCodeMissingContentLengthHeader StorageErrorCodeType = "MissingContentLengthHeader"
// StorageErrorCodeMissingRequiredHeader ...
StorageErrorCodeMissingRequiredHeader StorageErrorCodeType = "MissingRequiredHeader"
// StorageErrorCodeMissingRequiredQueryParameter ...
StorageErrorCodeMissingRequiredQueryParameter StorageErrorCodeType = "MissingRequiredQueryParameter"
// StorageErrorCodeMissingRequiredXMLNode ...
StorageErrorCodeMissingRequiredXMLNode StorageErrorCodeType = "MissingRequiredXmlNode"
// StorageErrorCodeMultipleConditionHeadersNotSupported ...
StorageErrorCodeMultipleConditionHeadersNotSupported StorageErrorCodeType = "MultipleConditionHeadersNotSupported"
// StorageErrorCodeNone represents an empty StorageErrorCodeType.
StorageErrorCodeNone StorageErrorCodeType = ""
// StorageErrorCodeOperationTimedOut ...
StorageErrorCodeOperationTimedOut StorageErrorCodeType = "OperationTimedOut"
// StorageErrorCodeOutOfRangeInput ...
StorageErrorCodeOutOfRangeInput StorageErrorCodeType = "OutOfRangeInput"
// StorageErrorCodeOutOfRangeQueryParameterValue ...
StorageErrorCodeOutOfRangeQueryParameterValue StorageErrorCodeType = "OutOfRangeQueryParameterValue"
// StorageErrorCodeParentNotFound ...
StorageErrorCodeParentNotFound StorageErrorCodeType = "ParentNotFound"
// StorageErrorCodeReadOnlyAttribute ...
StorageErrorCodeReadOnlyAttribute StorageErrorCodeType = "ReadOnlyAttribute"
// StorageErrorCodeRequestBodyTooLarge ...
StorageErrorCodeRequestBodyTooLarge StorageErrorCodeType = "RequestBodyTooLarge"
// StorageErrorCodeRequestURLFailedToParse ...
StorageErrorCodeRequestURLFailedToParse StorageErrorCodeType = "RequestUrlFailedToParse"
// StorageErrorCodeResourceAlreadyExists ...
StorageErrorCodeResourceAlreadyExists StorageErrorCodeType = "ResourceAlreadyExists"
// StorageErrorCodeResourceNotFound ...
StorageErrorCodeResourceNotFound StorageErrorCodeType = "ResourceNotFound"
// StorageErrorCodeResourceTypeMismatch ...
StorageErrorCodeResourceTypeMismatch StorageErrorCodeType = "ResourceTypeMismatch"
// StorageErrorCodeServerBusy ...
StorageErrorCodeServerBusy StorageErrorCodeType = "ServerBusy"
// StorageErrorCodeShareAlreadyExists ...
StorageErrorCodeShareAlreadyExists StorageErrorCodeType = "ShareAlreadyExists"
// StorageErrorCodeShareBeingDeleted ...
StorageErrorCodeShareBeingDeleted StorageErrorCodeType = "ShareBeingDeleted"
// StorageErrorCodeShareDisabled ...
StorageErrorCodeShareDisabled StorageErrorCodeType = "ShareDisabled"
// StorageErrorCodeShareHasSnapshots ...
StorageErrorCodeShareHasSnapshots StorageErrorCodeType = "ShareHasSnapshots"
// StorageErrorCodeShareNotFound ...
StorageErrorCodeShareNotFound StorageErrorCodeType = "ShareNotFound"
// StorageErrorCodeShareSnapshotCountExceeded ...
StorageErrorCodeShareSnapshotCountExceeded StorageErrorCodeType = "ShareSnapshotCountExceeded"
// StorageErrorCodeShareSnapshotInProgress ...
StorageErrorCodeShareSnapshotInProgress StorageErrorCodeType = "ShareSnapshotInProgress"
// StorageErrorCodeShareSnapshotOperationNotSupported ...
StorageErrorCodeShareSnapshotOperationNotSupported StorageErrorCodeType = "ShareSnapshotOperationNotSupported"
// StorageErrorCodeSharingViolation ...
StorageErrorCodeSharingViolation StorageErrorCodeType = "SharingViolation"
// StorageErrorCodeUnsupportedHeader ...
StorageErrorCodeUnsupportedHeader StorageErrorCodeType = "UnsupportedHeader"
// StorageErrorCodeUnsupportedHTTPVerb ...
StorageErrorCodeUnsupportedHTTPVerb StorageErrorCodeType = "UnsupportedHttpVerb"
// StorageErrorCodeUnsupportedQueryParameter ...
StorageErrorCodeUnsupportedQueryParameter StorageErrorCodeType = "UnsupportedQueryParameter"
// StorageErrorCodeUnsupportedXMLNode ...
StorageErrorCodeUnsupportedXMLNode StorageErrorCodeType = "UnsupportedXmlNode"
)
// PossibleStorageErrorCodeTypeValues returns an array of possible values for the StorageErrorCodeType const type.
func PossibleStorageErrorCodeTypeValues() []StorageErrorCodeType {
return []StorageErrorCodeType{StorageErrorCodeAccountAlreadyExists, StorageErrorCodeAccountBeingCreated, StorageErrorCodeAccountIsDisabled, StorageErrorCodeAuthenticationFailed, StorageErrorCodeAuthorizationFailure, StorageErrorCodeAuthorizationPermissionMismatch, StorageErrorCodeAuthorizationProtocolMismatch, StorageErrorCodeAuthorizationResourceTypeMismatch, StorageErrorCodeAuthorizationServiceMismatch, StorageErrorCodeAuthorizationSourceIPMismatch, StorageErrorCodeCannotDeleteFileOrDirectory, StorageErrorCodeClientCacheFlushDelay, StorageErrorCodeConditionHeadersNotSupported, StorageErrorCodeConditionNotMet, StorageErrorCodeContainerQuotaDowngradeNotAllowed, StorageErrorCodeDeletePending, StorageErrorCodeDirectoryNotEmpty, StorageErrorCodeEmptyMetadataKey, StorageErrorCodeFeatureVersionMismatch, StorageErrorCodeFileLockConflict, StorageErrorCodeInsufficientAccountPermissions, StorageErrorCodeInternalError, StorageErrorCodeInvalidAuthenticationInfo, StorageErrorCodeInvalidFileOrDirectoryPathName, StorageErrorCodeInvalidHeaderValue, StorageErrorCodeInvalidHTTPVerb, StorageErrorCodeInvalidInput, StorageErrorCodeInvalidMd5, StorageErrorCodeInvalidMetadata, StorageErrorCodeInvalidQueryParameterValue, StorageErrorCodeInvalidRange, StorageErrorCodeInvalidResourceName, StorageErrorCodeInvalidURI, StorageErrorCodeInvalidXMLDocument, StorageErrorCodeInvalidXMLNodeValue, StorageErrorCodeMd5Mismatch, StorageErrorCodeMetadataTooLarge, StorageErrorCodeMissingContentLengthHeader, StorageErrorCodeMissingRequiredHeader, StorageErrorCodeMissingRequiredQueryParameter, StorageErrorCodeMissingRequiredXMLNode, StorageErrorCodeMultipleConditionHeadersNotSupported, StorageErrorCodeNone, StorageErrorCodeOperationTimedOut, StorageErrorCodeOutOfRangeInput, StorageErrorCodeOutOfRangeQueryParameterValue, StorageErrorCodeParentNotFound, StorageErrorCodeReadOnlyAttribute, StorageErrorCodeRequestBodyTooLarge, StorageErrorCodeRequestURLFailedToParse, StorageErrorCodeResourceAlreadyExists, StorageErrorCodeResourceNotFound, StorageErrorCodeResourceTypeMismatch, StorageErrorCodeServerBusy, StorageErrorCodeShareAlreadyExists, StorageErrorCodeShareBeingDeleted, StorageErrorCodeShareDisabled, StorageErrorCodeShareHasSnapshots, StorageErrorCodeShareNotFound, StorageErrorCodeShareSnapshotCountExceeded, StorageErrorCodeShareSnapshotInProgress, StorageErrorCodeShareSnapshotOperationNotSupported, StorageErrorCodeSharingViolation, StorageErrorCodeUnsupportedHeader, StorageErrorCodeUnsupportedHTTPVerb, StorageErrorCodeUnsupportedQueryParameter, StorageErrorCodeUnsupportedXMLNode}
}
// AccessPolicy - An Access policy.
type AccessPolicy struct {
// Start - The date-time the policy is active.
Start *time.Time `xml:"Start"`
// Expiry - The date-time the policy expires.
Expiry *time.Time `xml:"Expiry"`
// Permission - The permissions for the ACL policy.
Permission *string `xml:"Permission"`
}
// MarshalXML implements the xml.Marshaler interface for AccessPolicy.
func (ap AccessPolicy) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
ap2 := (*accessPolicy)(unsafe.Pointer(&ap))
return e.EncodeElement(*ap2, start)
}
// UnmarshalXML implements the xml.Unmarshaler interface for AccessPolicy.
func (ap *AccessPolicy) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
ap2 := (*accessPolicy)(unsafe.Pointer(ap))
return d.DecodeElement(ap2, &start)
}
// CorsRule - CORS is an HTTP feature that enables a web application running under one domain to access
// resources in another domain. Web browsers implement a security restriction known as same-origin policy that
// prevents a web page from calling APIs in a different domain; CORS provides a secure way to allow one domain
// (the origin domain) to call APIs in another domain.
type CorsRule struct {
// 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.
AllowedOrigins string `xml:"AllowedOrigins"`
// AllowedMethods - The methods (HTTP request verbs) that the origin domain may use for a CORS request. (comma separated)
AllowedMethods string `xml:"AllowedMethods"`
// AllowedHeaders - The request headers that the origin domain may specify on the CORS request.
AllowedHeaders string `xml:"AllowedHeaders"`
// ExposedHeaders - The response headers that may be sent in the response to the CORS request and exposed by the browser to the request issuer.
ExposedHeaders string `xml:"ExposedHeaders"`
// MaxAgeInSeconds - The maximum amount time that a browser should cache the preflight OPTIONS request.
MaxAgeInSeconds int32 `xml:"MaxAgeInSeconds"`
}
// DirectoryCreateResponse ...
type DirectoryCreateResponse struct {
rawResponse *http.Response
}
// Response returns the raw HTTP response object.
func (dcr DirectoryCreateResponse) Response() *http.Response {
return dcr.rawResponse
}
// StatusCode returns the HTTP status code of the response, e.g. 200.
func (dcr DirectoryCreateResponse) StatusCode() int {
return dcr.rawResponse.StatusCode
}
// Status returns the HTTP status message of the response, e.g. "200 OK".
func (dcr DirectoryCreateResponse) Status() string {
return dcr.rawResponse.Status
}
// Date returns the value for header Date.
func (dcr DirectoryCreateResponse) Date() time.Time {
s := dcr.rawResponse.Header.Get("Date")
if s == "" {
return time.Time{}
}
t, err := time.Parse(time.RFC1123, s)
if err != nil {
t = time.Time{}
}
return t
}
// ErrorCode returns the value for header x-ms-error-code.
func (dcr DirectoryCreateResponse) ErrorCode() string {
return dcr.rawResponse.Header.Get("x-ms-error-code")
}
// ETag returns the value for header ETag.
func (dcr DirectoryCreateResponse) ETag() ETag {
return ETag(dcr.rawResponse.Header.Get("ETag"))
}
// FileAttributes returns the value for header x-ms-file-attributes.
func (dcr DirectoryCreateResponse) FileAttributes() string {
return dcr.rawResponse.Header.Get("x-ms-file-attributes")
}
// FileChangeTime returns the value for header x-ms-file-change-time.
func (dcr DirectoryCreateResponse) FileChangeTime() string {
return dcr.rawResponse.Header.Get("x-ms-file-change-time")
}
// FileCreationTime returns the value for header x-ms-file-creation-time.
func (dcr DirectoryCreateResponse) FileCreationTime() string {
return dcr.rawResponse.Header.Get("x-ms-file-creation-time")
}
// FileID returns the value for header x-ms-file-id.
func (dcr DirectoryCreateResponse) FileID() string {
return dcr.rawResponse.Header.Get("x-ms-file-id")
}
// FileLastWriteTime returns the value for header x-ms-file-last-write-time.
func (dcr DirectoryCreateResponse) FileLastWriteTime() string {
return dcr.rawResponse.Header.Get("x-ms-file-last-write-time")
}
// FileParentID returns the value for header x-ms-file-parent-id.
func (dcr DirectoryCreateResponse) FileParentID() string {
return dcr.rawResponse.Header.Get("x-ms-file-parent-id")
}
// FilePermissionKey returns the value for header x-ms-file-permission-key.
func (dcr DirectoryCreateResponse) FilePermissionKey() string {
return dcr.rawResponse.Header.Get("x-ms-file-permission-key")
}
// IsServerEncrypted returns the value for header x-ms-request-server-encrypted.
func (dcr DirectoryCreateResponse) IsServerEncrypted() string {
return dcr.rawResponse.Header.Get("x-ms-request-server-encrypted")
}
// LastModified returns the value for header Last-Modified.
func (dcr DirectoryCreateResponse) LastModified() time.Time {
s := dcr.rawResponse.Header.Get("Last-Modified")
if s == "" {
return time.Time{}
}
t, err := time.Parse(time.RFC1123, s)
if err != nil {
t = time.Time{}
}
return t
}
// RequestID returns the value for header x-ms-request-id.
func (dcr DirectoryCreateResponse) RequestID() string {
return dcr.rawResponse.Header.Get("x-ms-request-id")
}
// Version returns the value for header x-ms-version.
func (dcr DirectoryCreateResponse) Version() string {
return dcr.rawResponse.Header.Get("x-ms-version")
}
// DirectoryDeleteResponse ...
type DirectoryDeleteResponse struct {
rawResponse *http.Response
}
// Response returns the raw HTTP response object.
func (ddr DirectoryDeleteResponse) Response() *http.Response {
return ddr.rawResponse
}
// StatusCode returns the HTTP status code of the response, e.g. 200.
func (ddr DirectoryDeleteResponse) StatusCode() int {
return ddr.rawResponse.StatusCode
}
// Status returns the HTTP status message of the response, e.g. "200 OK".
func (ddr DirectoryDeleteResponse) Status() string {
return ddr.rawResponse.Status
}
// Date returns the value for header Date.
func (ddr DirectoryDeleteResponse) Date() time.Time {
s := ddr.rawResponse.Header.Get("Date")
if s == "" {
return time.Time{}
}
t, err := time.Parse(time.RFC1123, s)
if err != nil {
t = time.Time{}
}
return t
}
// ErrorCode returns the value for header x-ms-error-code.
func (ddr DirectoryDeleteResponse) ErrorCode() string {
return ddr.rawResponse.Header.Get("x-ms-error-code")
}
// RequestID returns the value for header x-ms-request-id.
func (ddr DirectoryDeleteResponse) RequestID() string {
return ddr.rawResponse.Header.Get("x-ms-request-id")
}
// Version returns the value for header x-ms-version.
func (ddr DirectoryDeleteResponse) Version() string {
return ddr.rawResponse.Header.Get("x-ms-version")
}
// DirectoryForceCloseHandlesResponse ...
type DirectoryForceCloseHandlesResponse struct {
rawResponse *http.Response
}
// Response returns the raw HTTP response object.
func (dfchr DirectoryForceCloseHandlesResponse) Response() *http.Response {
return dfchr.rawResponse
}
// StatusCode returns the HTTP status code of the response, e.g. 200.
func (dfchr DirectoryForceCloseHandlesResponse) StatusCode() int {
return dfchr.rawResponse.StatusCode
}
// Status returns the HTTP status message of the response, e.g. "200 OK".
func (dfchr DirectoryForceCloseHandlesResponse) Status() string {
return dfchr.rawResponse.Status
}
// Date returns the value for header Date.
func (dfchr DirectoryForceCloseHandlesResponse) Date() time.Time {
s := dfchr.rawResponse.Header.Get("Date")
if s == "" {
return time.Time{}
}
t, err := time.Parse(time.RFC1123, s)
if err != nil {
t = time.Time{}
}
return t
}
// ErrorCode returns the value for header x-ms-error-code.
func (dfchr DirectoryForceCloseHandlesResponse) ErrorCode() string {
return dfchr.rawResponse.Header.Get("x-ms-error-code")
}
// Marker returns the value for header x-ms-marker.
func (dfchr DirectoryForceCloseHandlesResponse) Marker() string {
return dfchr.rawResponse.Header.Get("x-ms-marker")
}
// NumberOfHandlesClosed returns the value for header x-ms-number-of-handles-closed.
func (dfchr DirectoryForceCloseHandlesResponse) NumberOfHandlesClosed() int32 {
s := dfchr.rawResponse.Header.Get("x-ms-number-of-handles-closed")
if s == "" {
return -1
}
i, err := strconv.ParseInt(s, 10, 32)
if err != nil {
i = 0
}
return int32(i)
}
// RequestID returns the value for header x-ms-request-id.
func (dfchr DirectoryForceCloseHandlesResponse) RequestID() string {
return dfchr.rawResponse.Header.Get("x-ms-request-id")
}
// Version returns the value for header x-ms-version.
func (dfchr DirectoryForceCloseHandlesResponse) Version() string {
return dfchr.rawResponse.Header.Get("x-ms-version")
}
// DirectoryGetPropertiesResponse ...
type DirectoryGetPropertiesResponse struct {
rawResponse *http.Response
}
// NewMetadata returns user-defined key/value pairs.
func (dgpr DirectoryGetPropertiesResponse) NewMetadata() Metadata {
md := Metadata{}
for k, v := range dgpr.rawResponse.Header {
if len(k) > mdPrefixLen {
if prefix := k[0:mdPrefixLen]; strings.EqualFold(prefix, mdPrefix) {
md[strings.ToLower(k[mdPrefixLen:])] = v[0]
}
}
}
return md
}
// Response returns the raw HTTP response object.
func (dgpr DirectoryGetPropertiesResponse) Response() *http.Response {
return dgpr.rawResponse
}
// StatusCode returns the HTTP status code of the response, e.g. 200.
func (dgpr DirectoryGetPropertiesResponse) StatusCode() int {
return dgpr.rawResponse.StatusCode
}
// Status returns the HTTP status message of the response, e.g. "200 OK".
func (dgpr DirectoryGetPropertiesResponse) Status() string {
return dgpr.rawResponse.Status
}
// Date returns the value for header Date.
func (dgpr DirectoryGetPropertiesResponse) Date() time.Time {
s := dgpr.rawResponse.Header.Get("Date")
if s == "" {
return time.Time{}
}
t, err := time.Parse(time.RFC1123, s)
if err != nil {
t = time.Time{}
}
return t
}
// ErrorCode returns the value for header x-ms-error-code.
func (dgpr DirectoryGetPropertiesResponse) ErrorCode() string {
return dgpr.rawResponse.Header.Get("x-ms-error-code")
}
// ETag returns the value for header ETag.
func (dgpr DirectoryGetPropertiesResponse) ETag() ETag {
return ETag(dgpr.rawResponse.Header.Get("ETag"))
}
// FileAttributes returns the value for header x-ms-file-attributes.
func (dgpr DirectoryGetPropertiesResponse) FileAttributes() string {
return dgpr.rawResponse.Header.Get("x-ms-file-attributes")
}
// FileChangeTime returns the value for header x-ms-file-change-time.
func (dgpr DirectoryGetPropertiesResponse) FileChangeTime() string {
return dgpr.rawResponse.Header.Get("x-ms-file-change-time")
}
// FileCreationTime returns the value for header x-ms-file-creation-time.
func (dgpr DirectoryGetPropertiesResponse) FileCreationTime() string {
return dgpr.rawResponse.Header.Get("x-ms-file-creation-time")
}
// FileID returns the value for header x-ms-file-id.
func (dgpr DirectoryGetPropertiesResponse) FileID() string {
return dgpr.rawResponse.Header.Get("x-ms-file-id")
}
// FileLastWriteTime returns the value for header x-ms-file-last-write-time.
func (dgpr DirectoryGetPropertiesResponse) FileLastWriteTime() string {
return dgpr.rawResponse.Header.Get("x-ms-file-last-write-time")
}
// FileParentID returns the value for header x-ms-file-parent-id.
func (dgpr DirectoryGetPropertiesResponse) FileParentID() string {
return dgpr.rawResponse.Header.Get("x-ms-file-parent-id")
}
// FilePermissionKey returns the value for header x-ms-file-permission-key.
func (dgpr DirectoryGetPropertiesResponse) FilePermissionKey() string {
return dgpr.rawResponse.Header.Get("x-ms-file-permission-key")
}
// IsServerEncrypted returns the value for header x-ms-server-encrypted.
func (dgpr DirectoryGetPropertiesResponse) IsServerEncrypted() string {
return dgpr.rawResponse.Header.Get("x-ms-server-encrypted")
}
// LastModified returns the value for header Last-Modified.
func (dgpr DirectoryGetPropertiesResponse) LastModified() time.Time {
s := dgpr.rawResponse.Header.Get("Last-Modified")
if s == "" {
return time.Time{}
}
t, err := time.Parse(time.RFC1123, s)
if err != nil {
t = time.Time{}
}
return t
}
// RequestID returns the value for header x-ms-request-id.
func (dgpr DirectoryGetPropertiesResponse) RequestID() string {
return dgpr.rawResponse.Header.Get("x-ms-request-id")
}
// Version returns the value for header x-ms-version.
func (dgpr DirectoryGetPropertiesResponse) Version() string {
return dgpr.rawResponse.Header.Get("x-ms-version")
}
// DirectoryItem - A listed directory item.
//type DirectoryItem struct {
// // XMLName is used for marshalling and is subject to removal in a future release.
// XMLName xml.Name `xml:"Directory"`
// Name string `xml:"Name"`
//}
// DirectorySetMetadataResponse ...
type DirectorySetMetadataResponse struct {
rawResponse *http.Response
}
// Response returns the raw HTTP response object.
func (dsmr DirectorySetMetadataResponse) Response() *http.Response {
return dsmr.rawResponse
}
// StatusCode returns the HTTP status code of the response, e.g. 200.
func (dsmr DirectorySetMetadataResponse) StatusCode() int {
return dsmr.rawResponse.StatusCode
}
// Status returns the HTTP status message of the response, e.g. "200 OK".
func (dsmr DirectorySetMetadataResponse) Status() string {
return dsmr.rawResponse.Status
}
// Date returns the value for header Date.
func (dsmr DirectorySetMetadataResponse) Date() time.Time {
s := dsmr.rawResponse.Header.Get("Date")
if s == "" {
return time.Time{}
}
t, err := time.Parse(time.RFC1123, s)
if err != nil {
t = time.Time{}
}
return t
}
// ErrorCode returns the value for header x-ms-error-code.
func (dsmr DirectorySetMetadataResponse) ErrorCode() string {
return dsmr.rawResponse.Header.Get("x-ms-error-code")
}
// ETag returns the value for header ETag.
func (dsmr DirectorySetMetadataResponse) ETag() ETag {
return ETag(dsmr.rawResponse.Header.Get("ETag"))
}
// IsServerEncrypted returns the value for header x-ms-request-server-encrypted.
func (dsmr DirectorySetMetadataResponse) IsServerEncrypted() string {
return dsmr.rawResponse.Header.Get("x-ms-request-server-encrypted")
}
// RequestID returns the value for header x-ms-request-id.
func (dsmr DirectorySetMetadataResponse) RequestID() string {
return dsmr.rawResponse.Header.Get("x-ms-request-id")
}
// Version returns the value for header x-ms-version.
func (dsmr DirectorySetMetadataResponse) Version() string {
return dsmr.rawResponse.Header.Get("x-ms-version")
}
// DirectorySetPropertiesResponse ...
type DirectorySetPropertiesResponse struct {
rawResponse *http.Response
}
// Response returns the raw HTTP response object.
func (dspr DirectorySetPropertiesResponse) Response() *http.Response {
return dspr.rawResponse
}
// StatusCode returns the HTTP status code of the response, e.g. 200.
func (dspr DirectorySetPropertiesResponse) StatusCode() int {
return dspr.rawResponse.StatusCode
}
// Status returns the HTTP status message of the response, e.g. "200 OK".
func (dspr DirectorySetPropertiesResponse) Status() string {
return dspr.rawResponse.Status
}
// Date returns the value for header Date.
func (dspr DirectorySetPropertiesResponse) Date() time.Time {
s := dspr.rawResponse.Header.Get("Date")
if s == "" {
return time.Time{}
}
t, err := time.Parse(time.RFC1123, s)
if err != nil {
t = time.Time{}
}
return t
}
// ErrorCode returns the value for header x-ms-error-code.
func (dspr DirectorySetPropertiesResponse) ErrorCode() string {
return dspr.rawResponse.Header.Get("x-ms-error-code")
}
// ETag returns the value for header ETag.
func (dspr DirectorySetPropertiesResponse) ETag() ETag {
return ETag(dspr.rawResponse.Header.Get("ETag"))
}
// FileAttributes returns the value for header x-ms-file-attributes.
func (dspr DirectorySetPropertiesResponse) FileAttributes() string {
return dspr.rawResponse.Header.Get("x-ms-file-attributes")
}
// FileChangeTime returns the value for header x-ms-file-change-time.
func (dspr DirectorySetPropertiesResponse) FileChangeTime() string {
return dspr.rawResponse.Header.Get("x-ms-file-change-time")
}
// FileCreationTime returns the value for header x-ms-file-creation-time.
func (dspr DirectorySetPropertiesResponse) FileCreationTime() string {
return dspr.rawResponse.Header.Get("x-ms-file-creation-time")
}
// FileID returns the value for header x-ms-file-id.
func (dspr DirectorySetPropertiesResponse) FileID() string {
return dspr.rawResponse.Header.Get("x-ms-file-id")
}
// FileLastWriteTime returns the value for header x-ms-file-last-write-time.
func (dspr DirectorySetPropertiesResponse) FileLastWriteTime() string {
return dspr.rawResponse.Header.Get("x-ms-file-last-write-time")
}
// FileParentID returns the value for header x-ms-file-parent-id.
func (dspr DirectorySetPropertiesResponse) FileParentID() string {
return dspr.rawResponse.Header.Get("x-ms-file-parent-id")
}
// FilePermissionKey returns the value for header x-ms-file-permission-key.
func (dspr DirectorySetPropertiesResponse) FilePermissionKey() string {
return dspr.rawResponse.Header.Get("x-ms-file-permission-key")
}
// IsServerEncrypted returns the value for header x-ms-request-server-encrypted.
func (dspr DirectorySetPropertiesResponse) IsServerEncrypted() string {
return dspr.rawResponse.Header.Get("x-ms-request-server-encrypted")
}
// LastModified returns the value for header Last-Modified.
func (dspr DirectorySetPropertiesResponse) LastModified() time.Time {
s := dspr.rawResponse.Header.Get("Last-Modified")
if s == "" {
return time.Time{}
}
t, err := time.Parse(time.RFC1123, s)
if err != nil {
t = time.Time{}
}
return t
}
// RequestID returns the value for header x-ms-request-id.
func (dspr DirectorySetPropertiesResponse) RequestID() string {
return dspr.rawResponse.Header.Get("x-ms-request-id")
}
// Version returns the value for header x-ms-version.
func (dspr DirectorySetPropertiesResponse) Version() string {
return dspr.rawResponse.Header.Get("x-ms-version")
}
// DownloadResponse - Wraps the response from the fileClient.Download method.
type DownloadResponse struct {
rawResponse *http.Response
}
// NewMetadata returns user-defined key/value pairs.
func (dr DownloadResponse) NewMetadata() Metadata {
md := Metadata{}
for k, v := range dr.rawResponse.Header {
if len(k) > mdPrefixLen {
if prefix := k[0:mdPrefixLen]; strings.EqualFold(prefix, mdPrefix) {
md[strings.ToLower(k[mdPrefixLen:])] = v[0]
}
}
}
return md
}
// Response returns the raw HTTP response object.
func (dr DownloadResponse) Response() *http.Response {
return dr.rawResponse
}
// StatusCode returns the HTTP status code of the response, e.g. 200.
func (dr DownloadResponse) StatusCode() int {
return dr.rawResponse.StatusCode
}
// Status returns the HTTP status message of the response, e.g. "200 OK".
func (dr DownloadResponse) Status() string {
return dr.rawResponse.Status
}
// Body returns the raw HTTP response object's Body.
func (dr DownloadResponse) Body() io.ReadCloser {
return dr.rawResponse.Body
}
// AcceptRanges returns the value for header Accept-Ranges.
func (dr DownloadResponse) AcceptRanges() string {
return dr.rawResponse.Header.Get("Accept-Ranges")
}
// CacheControl returns the value for header Cache-Control.
func (dr DownloadResponse) CacheControl() string {
return dr.rawResponse.Header.Get("Cache-Control")
}
// ContentDisposition returns the value for header Content-Disposition.
func (dr DownloadResponse) ContentDisposition() string {
return dr.rawResponse.Header.Get("Content-Disposition")
}
// ContentEncoding returns the value for header Content-Encoding.
func (dr DownloadResponse) ContentEncoding() string {
return dr.rawResponse.Header.Get("Content-Encoding")
}
// ContentLanguage returns the value for header Content-Language.
func (dr DownloadResponse) ContentLanguage() string {
return dr.rawResponse.Header.Get("Content-Language")
}
// ContentLength returns the value for header Content-Length.
func (dr DownloadResponse) ContentLength() int64 {
s := dr.rawResponse.Header.Get("Content-Length")
if s == "" {
return -1
}
i, err := strconv.ParseInt(s, 10, 64)
if err != nil {
i = 0
}
return i
}
// ContentMD5 returns the value for header Content-MD5.
func (dr DownloadResponse) ContentMD5() []byte {
s := dr.rawResponse.Header.Get("Content-MD5")
if s == "" {
return nil
}
b, err := base64.StdEncoding.DecodeString(s)
if err != nil {
b = nil
}
return b
}
// ContentRange returns the value for header Content-Range.
func (dr DownloadResponse) ContentRange() string {
return dr.rawResponse.Header.Get("Content-Range")
}
// ContentType returns the value for header Content-Type.
func (dr DownloadResponse) ContentType() string {
return dr.rawResponse.Header.Get("Content-Type")
}
// CopyCompletionTime returns the value for header x-ms-copy-completion-time.
func (dr DownloadResponse) CopyCompletionTime() time.Time {
s := dr.rawResponse.Header.Get("x-ms-copy-completion-time")
if s == "" {
return time.Time{}
}
t, err := time.Parse(time.RFC1123, s)
if err != nil {
t = time.Time{}
}
return t
}
// CopyID returns the value for header x-ms-copy-id.
func (dr DownloadResponse) CopyID() string {
return dr.rawResponse.Header.Get("x-ms-copy-id")
}
// CopyProgress returns the value for header x-ms-copy-progress.
func (dr DownloadResponse) CopyProgress() string {
return dr.rawResponse.Header.Get("x-ms-copy-progress")
}
// CopySource returns the value for header x-ms-copy-source.
func (dr DownloadResponse) CopySource() string {
return dr.rawResponse.Header.Get("x-ms-copy-source")
}
// CopyStatus returns the value for header x-ms-copy-status.
func (dr DownloadResponse) CopyStatus() CopyStatusType {
return CopyStatusType(dr.rawResponse.Header.Get("x-ms-copy-status"))
}
// CopyStatusDescription returns the value for header x-ms-copy-status-description.
func (dr DownloadResponse) CopyStatusDescription() string {
return dr.rawResponse.Header.Get("x-ms-copy-status-description")
}
// Date returns the value for header Date.
func (dr DownloadResponse) Date() time.Time {
s := dr.rawResponse.Header.Get("Date")
if s == "" {