forked from Azure/azure-sdk-for-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
models.go
971 lines (820 loc) · 39 KB
/
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
package filesystem
// Copyright (c) Microsoft and contributors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"encoding/json"
"errors"
"github.com/Azure/go-autorest/autorest"
"io"
)
// AppendModeType enumerates the values for append mode type.
type AppendModeType string
const (
// Autocreate specifies the autocreate state for append mode type.
Autocreate AppendModeType = "autocreate"
)
// Exception enumerates the values for exception.
type Exception string
const (
// ExceptionAccessControlException specifies the exception access control exception state for exception.
ExceptionAccessControlException Exception = "AccessControlException"
// ExceptionBadOffsetException specifies the exception bad offset exception state for exception.
ExceptionBadOffsetException Exception = "BadOffsetException"
// ExceptionFileAlreadyExistsException specifies the exception file already exists exception state for exception.
ExceptionFileAlreadyExistsException Exception = "FileAlreadyExistsException"
// ExceptionFileNotFoundException specifies the exception file not found exception state for exception.
ExceptionFileNotFoundException Exception = "FileNotFoundException"
// ExceptionIllegalArgumentException specifies the exception illegal argument exception state for exception.
ExceptionIllegalArgumentException Exception = "IllegalArgumentException"
// ExceptionIOException specifies the exception io exception state for exception.
ExceptionIOException Exception = "IOException"
// ExceptionRuntimeException specifies the exception runtime exception state for exception.
ExceptionRuntimeException Exception = "RuntimeException"
// ExceptionSecurityException specifies the exception security exception state for exception.
ExceptionSecurityException Exception = "SecurityException"
// ExceptionThrottledException specifies the exception throttled exception state for exception.
ExceptionThrottledException Exception = "ThrottledException"
// ExceptionUnsupportedOperationException specifies the exception unsupported operation exception state for exception.
ExceptionUnsupportedOperationException Exception = "UnsupportedOperationException"
)
// ExpiryOptionType enumerates the values for expiry option type.
type ExpiryOptionType string
const (
// Absolute specifies the absolute state for expiry option type.
Absolute ExpiryOptionType = "Absolute"
// NeverExpire specifies the never expire state for expiry option type.
NeverExpire ExpiryOptionType = "NeverExpire"
// RelativeToCreationDate specifies the relative to creation date state for expiry option type.
RelativeToCreationDate ExpiryOptionType = "RelativeToCreationDate"
// RelativeToNow specifies the relative to now state for expiry option type.
RelativeToNow ExpiryOptionType = "RelativeToNow"
)
// FileType enumerates the values for file type.
type FileType string
const (
// DIRECTORY specifies the directory state for file type.
DIRECTORY FileType = "DIRECTORY"
// FILE specifies the file state for file type.
FILE FileType = "FILE"
)
// SyncFlag enumerates the values for sync flag.
type SyncFlag string
const (
// CLOSE specifies the close state for sync flag.
CLOSE SyncFlag = "CLOSE"
// DATA specifies the data state for sync flag.
DATA SyncFlag = "DATA"
// METADATA specifies the metadata state for sync flag.
METADATA SyncFlag = "METADATA"
)
// ACLStatus is data Lake Store file or directory Access Control List information.
type ACLStatus struct {
Entries *[]string `json:"entries,omitempty"`
Group *string `json:"group,omitempty"`
Owner *string `json:"owner,omitempty"`
Permission *int32 `json:"permission,omitempty"`
StickyBit *bool `json:"stickyBit,omitempty"`
}
// ACLStatusResult is data Lake Store file or directory Access Control List information.
type ACLStatusResult struct {
autorest.Response `json:"-"`
ACLStatus *ACLStatus `json:"AclStatus,omitempty"`
}
// AdlsAccessControlException is a WebHDFS exception thrown indicating that access is denied due to insufficient
// permissions. Thrown when a 403 error response code is returned (forbidden).
type AdlsAccessControlException struct {
JavaClassName *string `json:"javaClassName,omitempty"`
Message *string `json:"message,omitempty"`
Exception Exception `json:"exception,omitempty"`
}
// MarshalJSON is the custom marshaler for AdlsAccessControlException.
func (aace AdlsAccessControlException) MarshalJSON() ([]byte, error) {
aace.Exception = ExceptionAccessControlException
type Alias AdlsAccessControlException
return json.Marshal(&struct {
Alias
}{
Alias: (Alias)(aace),
})
}
// AsAdlsIllegalArgumentException is the AdlsRemoteException implementation for AdlsAccessControlException.
func (aace AdlsAccessControlException) AsAdlsIllegalArgumentException() (*AdlsIllegalArgumentException, bool) {
return nil, false
}
// AsAdlsUnsupportedOperationException is the AdlsRemoteException implementation for AdlsAccessControlException.
func (aace AdlsAccessControlException) AsAdlsUnsupportedOperationException() (*AdlsUnsupportedOperationException, bool) {
return nil, false
}
// AsAdlsSecurityException is the AdlsRemoteException implementation for AdlsAccessControlException.
func (aace AdlsAccessControlException) AsAdlsSecurityException() (*AdlsSecurityException, bool) {
return nil, false
}
// AsAdlsIOException is the AdlsRemoteException implementation for AdlsAccessControlException.
func (aace AdlsAccessControlException) AsAdlsIOException() (*AdlsIOException, bool) {
return nil, false
}
// AsAdlsFileNotFoundException is the AdlsRemoteException implementation for AdlsAccessControlException.
func (aace AdlsAccessControlException) AsAdlsFileNotFoundException() (*AdlsFileNotFoundException, bool) {
return nil, false
}
// AsAdlsFileAlreadyExistsException is the AdlsRemoteException implementation for AdlsAccessControlException.
func (aace AdlsAccessControlException) AsAdlsFileAlreadyExistsException() (*AdlsFileAlreadyExistsException, bool) {
return nil, false
}
// AsAdlsBadOffsetException is the AdlsRemoteException implementation for AdlsAccessControlException.
func (aace AdlsAccessControlException) AsAdlsBadOffsetException() (*AdlsBadOffsetException, bool) {
return nil, false
}
// AsAdlsRuntimeException is the AdlsRemoteException implementation for AdlsAccessControlException.
func (aace AdlsAccessControlException) AsAdlsRuntimeException() (*AdlsRuntimeException, bool) {
return nil, false
}
// AsAdlsAccessControlException is the AdlsRemoteException implementation for AdlsAccessControlException.
func (aace AdlsAccessControlException) AsAdlsAccessControlException() (*AdlsAccessControlException, bool) {
return &aace, true
}
// AsAdlsThrottledException is the AdlsRemoteException implementation for AdlsAccessControlException.
func (aace AdlsAccessControlException) AsAdlsThrottledException() (*AdlsThrottledException, bool) {
return nil, false
}
// AdlsBadOffsetException is a WebHDFS exception thrown indicating the append or read is from a bad offset. Thrown when
// a 400 error response code is returned for append and open operations (Bad request).
type AdlsBadOffsetException struct {
JavaClassName *string `json:"javaClassName,omitempty"`
Message *string `json:"message,omitempty"`
Exception Exception `json:"exception,omitempty"`
}
// MarshalJSON is the custom marshaler for AdlsBadOffsetException.
func (aboe AdlsBadOffsetException) MarshalJSON() ([]byte, error) {
aboe.Exception = ExceptionBadOffsetException
type Alias AdlsBadOffsetException
return json.Marshal(&struct {
Alias
}{
Alias: (Alias)(aboe),
})
}
// AsAdlsIllegalArgumentException is the AdlsRemoteException implementation for AdlsBadOffsetException.
func (aboe AdlsBadOffsetException) AsAdlsIllegalArgumentException() (*AdlsIllegalArgumentException, bool) {
return nil, false
}
// AsAdlsUnsupportedOperationException is the AdlsRemoteException implementation for AdlsBadOffsetException.
func (aboe AdlsBadOffsetException) AsAdlsUnsupportedOperationException() (*AdlsUnsupportedOperationException, bool) {
return nil, false
}
// AsAdlsSecurityException is the AdlsRemoteException implementation for AdlsBadOffsetException.
func (aboe AdlsBadOffsetException) AsAdlsSecurityException() (*AdlsSecurityException, bool) {
return nil, false
}
// AsAdlsIOException is the AdlsRemoteException implementation for AdlsBadOffsetException.
func (aboe AdlsBadOffsetException) AsAdlsIOException() (*AdlsIOException, bool) {
return nil, false
}
// AsAdlsFileNotFoundException is the AdlsRemoteException implementation for AdlsBadOffsetException.
func (aboe AdlsBadOffsetException) AsAdlsFileNotFoundException() (*AdlsFileNotFoundException, bool) {
return nil, false
}
// AsAdlsFileAlreadyExistsException is the AdlsRemoteException implementation for AdlsBadOffsetException.
func (aboe AdlsBadOffsetException) AsAdlsFileAlreadyExistsException() (*AdlsFileAlreadyExistsException, bool) {
return nil, false
}
// AsAdlsBadOffsetException is the AdlsRemoteException implementation for AdlsBadOffsetException.
func (aboe AdlsBadOffsetException) AsAdlsBadOffsetException() (*AdlsBadOffsetException, bool) {
return &aboe, true
}
// AsAdlsRuntimeException is the AdlsRemoteException implementation for AdlsBadOffsetException.
func (aboe AdlsBadOffsetException) AsAdlsRuntimeException() (*AdlsRuntimeException, bool) {
return nil, false
}
// AsAdlsAccessControlException is the AdlsRemoteException implementation for AdlsBadOffsetException.
func (aboe AdlsBadOffsetException) AsAdlsAccessControlException() (*AdlsAccessControlException, bool) {
return nil, false
}
// AsAdlsThrottledException is the AdlsRemoteException implementation for AdlsBadOffsetException.
func (aboe AdlsBadOffsetException) AsAdlsThrottledException() (*AdlsThrottledException, bool) {
return nil, false
}
// AdlsError is data Lake Store filesystem error containing a specific WebHDFS exception.
type AdlsError struct {
RemoteException AdlsRemoteException `json:"RemoteException,omitempty"`
}
// UnmarshalJSON is the custom unmarshaler for AdlsError struct.
func (ae *AdlsError) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
return err
}
var v *json.RawMessage
v = m["RemoteException"]
if v != nil {
remoteException, err := unmarshalAdlsRemoteException(*m["RemoteException"])
if err != nil {
return err
}
ae.RemoteException = remoteException
}
return nil
}
// AdlsFileAlreadyExistsException is a WebHDFS exception thrown indicating the file or folder already exists. Thrown
// when a 403 error response code is returned (forbidden).
type AdlsFileAlreadyExistsException struct {
JavaClassName *string `json:"javaClassName,omitempty"`
Message *string `json:"message,omitempty"`
Exception Exception `json:"exception,omitempty"`
}
// MarshalJSON is the custom marshaler for AdlsFileAlreadyExistsException.
func (afaee AdlsFileAlreadyExistsException) MarshalJSON() ([]byte, error) {
afaee.Exception = ExceptionFileAlreadyExistsException
type Alias AdlsFileAlreadyExistsException
return json.Marshal(&struct {
Alias
}{
Alias: (Alias)(afaee),
})
}
// AsAdlsIllegalArgumentException is the AdlsRemoteException implementation for AdlsFileAlreadyExistsException.
func (afaee AdlsFileAlreadyExistsException) AsAdlsIllegalArgumentException() (*AdlsIllegalArgumentException, bool) {
return nil, false
}
// AsAdlsUnsupportedOperationException is the AdlsRemoteException implementation for AdlsFileAlreadyExistsException.
func (afaee AdlsFileAlreadyExistsException) AsAdlsUnsupportedOperationException() (*AdlsUnsupportedOperationException, bool) {
return nil, false
}
// AsAdlsSecurityException is the AdlsRemoteException implementation for AdlsFileAlreadyExistsException.
func (afaee AdlsFileAlreadyExistsException) AsAdlsSecurityException() (*AdlsSecurityException, bool) {
return nil, false
}
// AsAdlsIOException is the AdlsRemoteException implementation for AdlsFileAlreadyExistsException.
func (afaee AdlsFileAlreadyExistsException) AsAdlsIOException() (*AdlsIOException, bool) {
return nil, false
}
// AsAdlsFileNotFoundException is the AdlsRemoteException implementation for AdlsFileAlreadyExistsException.
func (afaee AdlsFileAlreadyExistsException) AsAdlsFileNotFoundException() (*AdlsFileNotFoundException, bool) {
return nil, false
}
// AsAdlsFileAlreadyExistsException is the AdlsRemoteException implementation for AdlsFileAlreadyExistsException.
func (afaee AdlsFileAlreadyExistsException) AsAdlsFileAlreadyExistsException() (*AdlsFileAlreadyExistsException, bool) {
return &afaee, true
}
// AsAdlsBadOffsetException is the AdlsRemoteException implementation for AdlsFileAlreadyExistsException.
func (afaee AdlsFileAlreadyExistsException) AsAdlsBadOffsetException() (*AdlsBadOffsetException, bool) {
return nil, false
}
// AsAdlsRuntimeException is the AdlsRemoteException implementation for AdlsFileAlreadyExistsException.
func (afaee AdlsFileAlreadyExistsException) AsAdlsRuntimeException() (*AdlsRuntimeException, bool) {
return nil, false
}
// AsAdlsAccessControlException is the AdlsRemoteException implementation for AdlsFileAlreadyExistsException.
func (afaee AdlsFileAlreadyExistsException) AsAdlsAccessControlException() (*AdlsAccessControlException, bool) {
return nil, false
}
// AsAdlsThrottledException is the AdlsRemoteException implementation for AdlsFileAlreadyExistsException.
func (afaee AdlsFileAlreadyExistsException) AsAdlsThrottledException() (*AdlsThrottledException, bool) {
return nil, false
}
// AdlsFileNotFoundException is a WebHDFS exception thrown indicating the file or folder could not be found. Thrown
// when a 404 error response code is returned (not found).
type AdlsFileNotFoundException struct {
JavaClassName *string `json:"javaClassName,omitempty"`
Message *string `json:"message,omitempty"`
Exception Exception `json:"exception,omitempty"`
}
// MarshalJSON is the custom marshaler for AdlsFileNotFoundException.
func (afnfe AdlsFileNotFoundException) MarshalJSON() ([]byte, error) {
afnfe.Exception = ExceptionFileNotFoundException
type Alias AdlsFileNotFoundException
return json.Marshal(&struct {
Alias
}{
Alias: (Alias)(afnfe),
})
}
// AsAdlsIllegalArgumentException is the AdlsRemoteException implementation for AdlsFileNotFoundException.
func (afnfe AdlsFileNotFoundException) AsAdlsIllegalArgumentException() (*AdlsIllegalArgumentException, bool) {
return nil, false
}
// AsAdlsUnsupportedOperationException is the AdlsRemoteException implementation for AdlsFileNotFoundException.
func (afnfe AdlsFileNotFoundException) AsAdlsUnsupportedOperationException() (*AdlsUnsupportedOperationException, bool) {
return nil, false
}
// AsAdlsSecurityException is the AdlsRemoteException implementation for AdlsFileNotFoundException.
func (afnfe AdlsFileNotFoundException) AsAdlsSecurityException() (*AdlsSecurityException, bool) {
return nil, false
}
// AsAdlsIOException is the AdlsRemoteException implementation for AdlsFileNotFoundException.
func (afnfe AdlsFileNotFoundException) AsAdlsIOException() (*AdlsIOException, bool) {
return nil, false
}
// AsAdlsFileNotFoundException is the AdlsRemoteException implementation for AdlsFileNotFoundException.
func (afnfe AdlsFileNotFoundException) AsAdlsFileNotFoundException() (*AdlsFileNotFoundException, bool) {
return &afnfe, true
}
// AsAdlsFileAlreadyExistsException is the AdlsRemoteException implementation for AdlsFileNotFoundException.
func (afnfe AdlsFileNotFoundException) AsAdlsFileAlreadyExistsException() (*AdlsFileAlreadyExistsException, bool) {
return nil, false
}
// AsAdlsBadOffsetException is the AdlsRemoteException implementation for AdlsFileNotFoundException.
func (afnfe AdlsFileNotFoundException) AsAdlsBadOffsetException() (*AdlsBadOffsetException, bool) {
return nil, false
}
// AsAdlsRuntimeException is the AdlsRemoteException implementation for AdlsFileNotFoundException.
func (afnfe AdlsFileNotFoundException) AsAdlsRuntimeException() (*AdlsRuntimeException, bool) {
return nil, false
}
// AsAdlsAccessControlException is the AdlsRemoteException implementation for AdlsFileNotFoundException.
func (afnfe AdlsFileNotFoundException) AsAdlsAccessControlException() (*AdlsAccessControlException, bool) {
return nil, false
}
// AsAdlsThrottledException is the AdlsRemoteException implementation for AdlsFileNotFoundException.
func (afnfe AdlsFileNotFoundException) AsAdlsThrottledException() (*AdlsThrottledException, bool) {
return nil, false
}
// AdlsIllegalArgumentException is a WebHDFS exception thrown indicating that one more arguments is incorrect. Thrown
// when a 400 error response code is returned (bad request).
type AdlsIllegalArgumentException struct {
JavaClassName *string `json:"javaClassName,omitempty"`
Message *string `json:"message,omitempty"`
Exception Exception `json:"exception,omitempty"`
}
// MarshalJSON is the custom marshaler for AdlsIllegalArgumentException.
func (aiae AdlsIllegalArgumentException) MarshalJSON() ([]byte, error) {
aiae.Exception = ExceptionIllegalArgumentException
type Alias AdlsIllegalArgumentException
return json.Marshal(&struct {
Alias
}{
Alias: (Alias)(aiae),
})
}
// AsAdlsIllegalArgumentException is the AdlsRemoteException implementation for AdlsIllegalArgumentException.
func (aiae AdlsIllegalArgumentException) AsAdlsIllegalArgumentException() (*AdlsIllegalArgumentException, bool) {
return &aiae, true
}
// AsAdlsUnsupportedOperationException is the AdlsRemoteException implementation for AdlsIllegalArgumentException.
func (aiae AdlsIllegalArgumentException) AsAdlsUnsupportedOperationException() (*AdlsUnsupportedOperationException, bool) {
return nil, false
}
// AsAdlsSecurityException is the AdlsRemoteException implementation for AdlsIllegalArgumentException.
func (aiae AdlsIllegalArgumentException) AsAdlsSecurityException() (*AdlsSecurityException, bool) {
return nil, false
}
// AsAdlsIOException is the AdlsRemoteException implementation for AdlsIllegalArgumentException.
func (aiae AdlsIllegalArgumentException) AsAdlsIOException() (*AdlsIOException, bool) {
return nil, false
}
// AsAdlsFileNotFoundException is the AdlsRemoteException implementation for AdlsIllegalArgumentException.
func (aiae AdlsIllegalArgumentException) AsAdlsFileNotFoundException() (*AdlsFileNotFoundException, bool) {
return nil, false
}
// AsAdlsFileAlreadyExistsException is the AdlsRemoteException implementation for AdlsIllegalArgumentException.
func (aiae AdlsIllegalArgumentException) AsAdlsFileAlreadyExistsException() (*AdlsFileAlreadyExistsException, bool) {
return nil, false
}
// AsAdlsBadOffsetException is the AdlsRemoteException implementation for AdlsIllegalArgumentException.
func (aiae AdlsIllegalArgumentException) AsAdlsBadOffsetException() (*AdlsBadOffsetException, bool) {
return nil, false
}
// AsAdlsRuntimeException is the AdlsRemoteException implementation for AdlsIllegalArgumentException.
func (aiae AdlsIllegalArgumentException) AsAdlsRuntimeException() (*AdlsRuntimeException, bool) {
return nil, false
}
// AsAdlsAccessControlException is the AdlsRemoteException implementation for AdlsIllegalArgumentException.
func (aiae AdlsIllegalArgumentException) AsAdlsAccessControlException() (*AdlsAccessControlException, bool) {
return nil, false
}
// AsAdlsThrottledException is the AdlsRemoteException implementation for AdlsIllegalArgumentException.
func (aiae AdlsIllegalArgumentException) AsAdlsThrottledException() (*AdlsThrottledException, bool) {
return nil, false
}
// AdlsIOException is a WebHDFS exception thrown indicating there was an IO (read or write) error. Thrown when a 403
// error response code is returned (forbidden).
type AdlsIOException struct {
JavaClassName *string `json:"javaClassName,omitempty"`
Message *string `json:"message,omitempty"`
Exception Exception `json:"exception,omitempty"`
}
// MarshalJSON is the custom marshaler for AdlsIOException.
func (aie AdlsIOException) MarshalJSON() ([]byte, error) {
aie.Exception = ExceptionIOException
type Alias AdlsIOException
return json.Marshal(&struct {
Alias
}{
Alias: (Alias)(aie),
})
}
// AsAdlsIllegalArgumentException is the AdlsRemoteException implementation for AdlsIOException.
func (aie AdlsIOException) AsAdlsIllegalArgumentException() (*AdlsIllegalArgumentException, bool) {
return nil, false
}
// AsAdlsUnsupportedOperationException is the AdlsRemoteException implementation for AdlsIOException.
func (aie AdlsIOException) AsAdlsUnsupportedOperationException() (*AdlsUnsupportedOperationException, bool) {
return nil, false
}
// AsAdlsSecurityException is the AdlsRemoteException implementation for AdlsIOException.
func (aie AdlsIOException) AsAdlsSecurityException() (*AdlsSecurityException, bool) {
return nil, false
}
// AsAdlsIOException is the AdlsRemoteException implementation for AdlsIOException.
func (aie AdlsIOException) AsAdlsIOException() (*AdlsIOException, bool) {
return &aie, true
}
// AsAdlsFileNotFoundException is the AdlsRemoteException implementation for AdlsIOException.
func (aie AdlsIOException) AsAdlsFileNotFoundException() (*AdlsFileNotFoundException, bool) {
return nil, false
}
// AsAdlsFileAlreadyExistsException is the AdlsRemoteException implementation for AdlsIOException.
func (aie AdlsIOException) AsAdlsFileAlreadyExistsException() (*AdlsFileAlreadyExistsException, bool) {
return nil, false
}
// AsAdlsBadOffsetException is the AdlsRemoteException implementation for AdlsIOException.
func (aie AdlsIOException) AsAdlsBadOffsetException() (*AdlsBadOffsetException, bool) {
return nil, false
}
// AsAdlsRuntimeException is the AdlsRemoteException implementation for AdlsIOException.
func (aie AdlsIOException) AsAdlsRuntimeException() (*AdlsRuntimeException, bool) {
return nil, false
}
// AsAdlsAccessControlException is the AdlsRemoteException implementation for AdlsIOException.
func (aie AdlsIOException) AsAdlsAccessControlException() (*AdlsAccessControlException, bool) {
return nil, false
}
// AsAdlsThrottledException is the AdlsRemoteException implementation for AdlsIOException.
func (aie AdlsIOException) AsAdlsThrottledException() (*AdlsThrottledException, bool) {
return nil, false
}
// AdlsRemoteException is data Lake Store filesystem exception based on the WebHDFS definition for RemoteExceptions.
// This is a WebHDFS 'catch all' exception
type AdlsRemoteException interface {
AsAdlsIllegalArgumentException() (*AdlsIllegalArgumentException, bool)
AsAdlsUnsupportedOperationException() (*AdlsUnsupportedOperationException, bool)
AsAdlsSecurityException() (*AdlsSecurityException, bool)
AsAdlsIOException() (*AdlsIOException, bool)
AsAdlsFileNotFoundException() (*AdlsFileNotFoundException, bool)
AsAdlsFileAlreadyExistsException() (*AdlsFileAlreadyExistsException, bool)
AsAdlsBadOffsetException() (*AdlsBadOffsetException, bool)
AsAdlsRuntimeException() (*AdlsRuntimeException, bool)
AsAdlsAccessControlException() (*AdlsAccessControlException, bool)
AsAdlsThrottledException() (*AdlsThrottledException, bool)
}
func unmarshalAdlsRemoteException(body []byte) (AdlsRemoteException, error) {
var m map[string]interface{}
err := json.Unmarshal(body, &m)
if err != nil {
return nil, err
}
switch m["exception"] {
case string(ExceptionIllegalArgumentException):
var aiae AdlsIllegalArgumentException
err := json.Unmarshal(body, &aiae)
return aiae, err
case string(ExceptionUnsupportedOperationException):
var auoe AdlsUnsupportedOperationException
err := json.Unmarshal(body, &auoe)
return auoe, err
case string(ExceptionSecurityException):
var ase AdlsSecurityException
err := json.Unmarshal(body, &ase)
return ase, err
case string(ExceptionIOException):
var aie AdlsIOException
err := json.Unmarshal(body, &aie)
return aie, err
case string(ExceptionFileNotFoundException):
var afnfe AdlsFileNotFoundException
err := json.Unmarshal(body, &afnfe)
return afnfe, err
case string(ExceptionFileAlreadyExistsException):
var afaee AdlsFileAlreadyExistsException
err := json.Unmarshal(body, &afaee)
return afaee, err
case string(ExceptionBadOffsetException):
var aboe AdlsBadOffsetException
err := json.Unmarshal(body, &aboe)
return aboe, err
case string(ExceptionRuntimeException):
var are AdlsRuntimeException
err := json.Unmarshal(body, &are)
return are, err
case string(ExceptionAccessControlException):
var aace AdlsAccessControlException
err := json.Unmarshal(body, &aace)
return aace, err
case string(ExceptionThrottledException):
var ate AdlsThrottledException
err := json.Unmarshal(body, &ate)
return ate, err
default:
return nil, errors.New("Unsupported type")
}
}
func unmarshalAdlsRemoteExceptionArray(body []byte) ([]AdlsRemoteException, error) {
var rawMessages []*json.RawMessage
err := json.Unmarshal(body, &rawMessages)
if err != nil {
return nil, err
}
areArray := make([]AdlsRemoteException, len(rawMessages))
for index, rawMessage := range rawMessages {
are, err := unmarshalAdlsRemoteException(*rawMessage)
if err != nil {
return nil, err
}
areArray[index] = are
}
return areArray, nil
}
// AdlsRuntimeException is a WebHDFS exception thrown when an unexpected error occurs during an operation. Thrown when
// a 500 error response code is returned (Internal server error).
type AdlsRuntimeException struct {
JavaClassName *string `json:"javaClassName,omitempty"`
Message *string `json:"message,omitempty"`
Exception Exception `json:"exception,omitempty"`
}
// MarshalJSON is the custom marshaler for AdlsRuntimeException.
func (are AdlsRuntimeException) MarshalJSON() ([]byte, error) {
are.Exception = ExceptionRuntimeException
type Alias AdlsRuntimeException
return json.Marshal(&struct {
Alias
}{
Alias: (Alias)(are),
})
}
// AsAdlsIllegalArgumentException is the AdlsRemoteException implementation for AdlsRuntimeException.
func (are AdlsRuntimeException) AsAdlsIllegalArgumentException() (*AdlsIllegalArgumentException, bool) {
return nil, false
}
// AsAdlsUnsupportedOperationException is the AdlsRemoteException implementation for AdlsRuntimeException.
func (are AdlsRuntimeException) AsAdlsUnsupportedOperationException() (*AdlsUnsupportedOperationException, bool) {
return nil, false
}
// AsAdlsSecurityException is the AdlsRemoteException implementation for AdlsRuntimeException.
func (are AdlsRuntimeException) AsAdlsSecurityException() (*AdlsSecurityException, bool) {
return nil, false
}
// AsAdlsIOException is the AdlsRemoteException implementation for AdlsRuntimeException.
func (are AdlsRuntimeException) AsAdlsIOException() (*AdlsIOException, bool) {
return nil, false
}
// AsAdlsFileNotFoundException is the AdlsRemoteException implementation for AdlsRuntimeException.
func (are AdlsRuntimeException) AsAdlsFileNotFoundException() (*AdlsFileNotFoundException, bool) {
return nil, false
}
// AsAdlsFileAlreadyExistsException is the AdlsRemoteException implementation for AdlsRuntimeException.
func (are AdlsRuntimeException) AsAdlsFileAlreadyExistsException() (*AdlsFileAlreadyExistsException, bool) {
return nil, false
}
// AsAdlsBadOffsetException is the AdlsRemoteException implementation for AdlsRuntimeException.
func (are AdlsRuntimeException) AsAdlsBadOffsetException() (*AdlsBadOffsetException, bool) {
return nil, false
}
// AsAdlsRuntimeException is the AdlsRemoteException implementation for AdlsRuntimeException.
func (are AdlsRuntimeException) AsAdlsRuntimeException() (*AdlsRuntimeException, bool) {
return &are, true
}
// AsAdlsAccessControlException is the AdlsRemoteException implementation for AdlsRuntimeException.
func (are AdlsRuntimeException) AsAdlsAccessControlException() (*AdlsAccessControlException, bool) {
return nil, false
}
// AsAdlsThrottledException is the AdlsRemoteException implementation for AdlsRuntimeException.
func (are AdlsRuntimeException) AsAdlsThrottledException() (*AdlsThrottledException, bool) {
return nil, false
}
// AdlsSecurityException is a WebHDFS exception thrown indicating that access is denied. Thrown when a 401 error
// response code is returned (Unauthorized).
type AdlsSecurityException struct {
JavaClassName *string `json:"javaClassName,omitempty"`
Message *string `json:"message,omitempty"`
Exception Exception `json:"exception,omitempty"`
}
// MarshalJSON is the custom marshaler for AdlsSecurityException.
func (ase AdlsSecurityException) MarshalJSON() ([]byte, error) {
ase.Exception = ExceptionSecurityException
type Alias AdlsSecurityException
return json.Marshal(&struct {
Alias
}{
Alias: (Alias)(ase),
})
}
// AsAdlsIllegalArgumentException is the AdlsRemoteException implementation for AdlsSecurityException.
func (ase AdlsSecurityException) AsAdlsIllegalArgumentException() (*AdlsIllegalArgumentException, bool) {
return nil, false
}
// AsAdlsUnsupportedOperationException is the AdlsRemoteException implementation for AdlsSecurityException.
func (ase AdlsSecurityException) AsAdlsUnsupportedOperationException() (*AdlsUnsupportedOperationException, bool) {
return nil, false
}
// AsAdlsSecurityException is the AdlsRemoteException implementation for AdlsSecurityException.
func (ase AdlsSecurityException) AsAdlsSecurityException() (*AdlsSecurityException, bool) {
return &ase, true
}
// AsAdlsIOException is the AdlsRemoteException implementation for AdlsSecurityException.
func (ase AdlsSecurityException) AsAdlsIOException() (*AdlsIOException, bool) {
return nil, false
}
// AsAdlsFileNotFoundException is the AdlsRemoteException implementation for AdlsSecurityException.
func (ase AdlsSecurityException) AsAdlsFileNotFoundException() (*AdlsFileNotFoundException, bool) {
return nil, false
}
// AsAdlsFileAlreadyExistsException is the AdlsRemoteException implementation for AdlsSecurityException.
func (ase AdlsSecurityException) AsAdlsFileAlreadyExistsException() (*AdlsFileAlreadyExistsException, bool) {
return nil, false
}
// AsAdlsBadOffsetException is the AdlsRemoteException implementation for AdlsSecurityException.
func (ase AdlsSecurityException) AsAdlsBadOffsetException() (*AdlsBadOffsetException, bool) {
return nil, false
}
// AsAdlsRuntimeException is the AdlsRemoteException implementation for AdlsSecurityException.
func (ase AdlsSecurityException) AsAdlsRuntimeException() (*AdlsRuntimeException, bool) {
return nil, false
}
// AsAdlsAccessControlException is the AdlsRemoteException implementation for AdlsSecurityException.
func (ase AdlsSecurityException) AsAdlsAccessControlException() (*AdlsAccessControlException, bool) {
return nil, false
}
// AsAdlsThrottledException is the AdlsRemoteException implementation for AdlsSecurityException.
func (ase AdlsSecurityException) AsAdlsThrottledException() (*AdlsThrottledException, bool) {
return nil, false
}
// AdlsThrottledException is a WebHDFS exception thrown indicating that the request is being throttled. Reducing the
// number of requests or request size helps to mitigate this error.
type AdlsThrottledException struct {
JavaClassName *string `json:"javaClassName,omitempty"`
Message *string `json:"message,omitempty"`
Exception Exception `json:"exception,omitempty"`
}
// MarshalJSON is the custom marshaler for AdlsThrottledException.
func (ate AdlsThrottledException) MarshalJSON() ([]byte, error) {
ate.Exception = ExceptionThrottledException
type Alias AdlsThrottledException
return json.Marshal(&struct {
Alias
}{
Alias: (Alias)(ate),
})
}
// AsAdlsIllegalArgumentException is the AdlsRemoteException implementation for AdlsThrottledException.
func (ate AdlsThrottledException) AsAdlsIllegalArgumentException() (*AdlsIllegalArgumentException, bool) {
return nil, false
}
// AsAdlsUnsupportedOperationException is the AdlsRemoteException implementation for AdlsThrottledException.
func (ate AdlsThrottledException) AsAdlsUnsupportedOperationException() (*AdlsUnsupportedOperationException, bool) {
return nil, false
}
// AsAdlsSecurityException is the AdlsRemoteException implementation for AdlsThrottledException.
func (ate AdlsThrottledException) AsAdlsSecurityException() (*AdlsSecurityException, bool) {
return nil, false
}
// AsAdlsIOException is the AdlsRemoteException implementation for AdlsThrottledException.
func (ate AdlsThrottledException) AsAdlsIOException() (*AdlsIOException, bool) {
return nil, false
}
// AsAdlsFileNotFoundException is the AdlsRemoteException implementation for AdlsThrottledException.
func (ate AdlsThrottledException) AsAdlsFileNotFoundException() (*AdlsFileNotFoundException, bool) {
return nil, false
}
// AsAdlsFileAlreadyExistsException is the AdlsRemoteException implementation for AdlsThrottledException.
func (ate AdlsThrottledException) AsAdlsFileAlreadyExistsException() (*AdlsFileAlreadyExistsException, bool) {
return nil, false
}
// AsAdlsBadOffsetException is the AdlsRemoteException implementation for AdlsThrottledException.
func (ate AdlsThrottledException) AsAdlsBadOffsetException() (*AdlsBadOffsetException, bool) {
return nil, false
}
// AsAdlsRuntimeException is the AdlsRemoteException implementation for AdlsThrottledException.
func (ate AdlsThrottledException) AsAdlsRuntimeException() (*AdlsRuntimeException, bool) {
return nil, false
}
// AsAdlsAccessControlException is the AdlsRemoteException implementation for AdlsThrottledException.
func (ate AdlsThrottledException) AsAdlsAccessControlException() (*AdlsAccessControlException, bool) {
return nil, false
}
// AsAdlsThrottledException is the AdlsRemoteException implementation for AdlsThrottledException.
func (ate AdlsThrottledException) AsAdlsThrottledException() (*AdlsThrottledException, bool) {
return &ate, true
}
// AdlsUnsupportedOperationException is a WebHDFS exception thrown indicating that the requested operation is not
// supported. Thrown when a 400 error response code is returned (bad request).
type AdlsUnsupportedOperationException struct {
JavaClassName *string `json:"javaClassName,omitempty"`
Message *string `json:"message,omitempty"`
Exception Exception `json:"exception,omitempty"`
}
// MarshalJSON is the custom marshaler for AdlsUnsupportedOperationException.
func (auoe AdlsUnsupportedOperationException) MarshalJSON() ([]byte, error) {
auoe.Exception = ExceptionUnsupportedOperationException
type Alias AdlsUnsupportedOperationException
return json.Marshal(&struct {
Alias
}{
Alias: (Alias)(auoe),
})
}
// AsAdlsIllegalArgumentException is the AdlsRemoteException implementation for AdlsUnsupportedOperationException.
func (auoe AdlsUnsupportedOperationException) AsAdlsIllegalArgumentException() (*AdlsIllegalArgumentException, bool) {
return nil, false
}
// AsAdlsUnsupportedOperationException is the AdlsRemoteException implementation for AdlsUnsupportedOperationException.
func (auoe AdlsUnsupportedOperationException) AsAdlsUnsupportedOperationException() (*AdlsUnsupportedOperationException, bool) {
return &auoe, true
}
// AsAdlsSecurityException is the AdlsRemoteException implementation for AdlsUnsupportedOperationException.
func (auoe AdlsUnsupportedOperationException) AsAdlsSecurityException() (*AdlsSecurityException, bool) {
return nil, false
}
// AsAdlsIOException is the AdlsRemoteException implementation for AdlsUnsupportedOperationException.
func (auoe AdlsUnsupportedOperationException) AsAdlsIOException() (*AdlsIOException, bool) {
return nil, false
}
// AsAdlsFileNotFoundException is the AdlsRemoteException implementation for AdlsUnsupportedOperationException.
func (auoe AdlsUnsupportedOperationException) AsAdlsFileNotFoundException() (*AdlsFileNotFoundException, bool) {
return nil, false
}
// AsAdlsFileAlreadyExistsException is the AdlsRemoteException implementation for AdlsUnsupportedOperationException.
func (auoe AdlsUnsupportedOperationException) AsAdlsFileAlreadyExistsException() (*AdlsFileAlreadyExistsException, bool) {
return nil, false
}
// AsAdlsBadOffsetException is the AdlsRemoteException implementation for AdlsUnsupportedOperationException.
func (auoe AdlsUnsupportedOperationException) AsAdlsBadOffsetException() (*AdlsBadOffsetException, bool) {
return nil, false
}
// AsAdlsRuntimeException is the AdlsRemoteException implementation for AdlsUnsupportedOperationException.
func (auoe AdlsUnsupportedOperationException) AsAdlsRuntimeException() (*AdlsRuntimeException, bool) {
return nil, false
}
// AsAdlsAccessControlException is the AdlsRemoteException implementation for AdlsUnsupportedOperationException.
func (auoe AdlsUnsupportedOperationException) AsAdlsAccessControlException() (*AdlsAccessControlException, bool) {
return nil, false
}
// AsAdlsThrottledException is the AdlsRemoteException implementation for AdlsUnsupportedOperationException.
func (auoe AdlsUnsupportedOperationException) AsAdlsThrottledException() (*AdlsThrottledException, bool) {
return nil, false
}
// ContentSummary is data Lake Store content summary information
type ContentSummary struct {
DirectoryCount *int64 `json:"directoryCount,omitempty"`
FileCount *int64 `json:"fileCount,omitempty"`
Length *int64 `json:"length,omitempty"`
SpaceConsumed *int64 `json:"spaceConsumed,omitempty"`
}
// ContentSummaryResult is data Lake Store filesystem content summary information response.
type ContentSummaryResult struct {
autorest.Response `json:"-"`
ContentSummary *ContentSummary `json:"ContentSummary,omitempty"`
}
// FileOperationResult is the result of the request or operation.
type FileOperationResult struct {
autorest.Response `json:"-"`
OperationResult *bool `json:"boolean,omitempty"`
}
// FileStatuses is data Lake Store file status list information.
type FileStatuses struct {
FileStatus *[]FileStatusProperties `json:"FileStatus,omitempty"`
}
// FileStatusesResult is data Lake Store filesystem file status list information response.
type FileStatusesResult struct {
autorest.Response `json:"-"`
FileStatuses *FileStatuses `json:"FileStatuses,omitempty"`
}
// FileStatusProperties is data Lake Store file or directory information.
type FileStatusProperties struct {
AccessTime *int64 `json:"accessTime,omitempty"`
BlockSize *int64 `json:"blockSize,omitempty"`
ChildrenNum *int64 `json:"childrenNum,omitempty"`
ExpirationTime *int64 `json:"msExpirationTime,omitempty"`
Group *string `json:"group,omitempty"`
Length *int64 `json:"length,omitempty"`
ModificationTime *int64 `json:"modificationTime,omitempty"`
Owner *string `json:"owner,omitempty"`
PathSuffix *string `json:"pathSuffix,omitempty"`
Permission *string `json:"permission,omitempty"`
Type FileType `json:"type,omitempty"`
ACLBit *bool `json:"aclBit,omitempty"`
}
// FileStatusResult is data Lake Store filesystem file status information response.
type FileStatusResult struct {
autorest.Response `json:"-"`
FileStatus *FileStatusProperties `json:"FileStatus,omitempty"`
}
// ReadCloser is
type ReadCloser struct {
autorest.Response `json:"-"`
Value *io.ReadCloser `json:"value,omitempty"`
}