forked from Azure/azure-sdk-for-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
models.go
1850 lines (1648 loc) · 64.3 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
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 catalog
// 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 (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/date"
"github.com/Azure/go-autorest/autorest/to"
"github.com/satori/go.uuid"
"net/http"
)
// FileType enumerates the values for file type.
type FileType string
const (
// Assembly ...
Assembly FileType = "Assembly"
// Resource ...
Resource FileType = "Resource"
)
// PossibleFileTypeValues returns an array of possible values for the FileType const type.
func PossibleFileTypeValues() []FileType {
return []FileType{Assembly, Resource}
}
// DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters dataLakeAnalytics DataLakeAnalyticsAccount information.
type DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters struct {
// Password - the password for the secret to pass in
Password *string `json:"password,omitempty"`
// URI - the URI identifier for the secret in the format <hostname>:<port>
URI *string `json:"uri,omitempty"`
}
// DdlName a Data Lake Analytics DDL name item.
type DdlName struct {
// FirstPart - the name of the table associated with this database and schema.
FirstPart *string `json:"firstPart,omitempty"`
// SecondPart - the name of the table associated with this database and schema.
SecondPart *string `json:"secondPart,omitempty"`
// ThirdPart - the name of the table associated with this database and schema.
ThirdPart *string `json:"thirdPart,omitempty"`
// Server - the name of the table associated with this database and schema.
Server *string `json:"server,omitempty"`
}
// EntityID a Data Lake Analytics catalog entity identifier object.
type EntityID struct {
// Name - the name of the external table associated with this database, schema and table.
Name *DdlName `json:"name,omitempty"`
// Version - the version of the external data source.
Version *uuid.UUID `json:"version,omitempty"`
}
// ExternalTable a Data Lake Analytics catalog external table item.
type ExternalTable struct {
// TableName - the name of the table associated with this database and schema.
TableName *string `json:"tableName,omitempty"`
// DataSource - the data source associated with this external table.
DataSource *EntityID `json:"dataSource,omitempty"`
}
// Item a Data Lake Analytics catalog item.
type Item struct {
// ComputeAccountName - the name of the Data Lake Analytics account.
ComputeAccountName *string `json:"computeAccountName,omitempty"`
// Version - the version of the catalog item.
Version *uuid.UUID `json:"version,omitempty"`
}
// ItemList a Data Lake Analytics catalog item list.
type ItemList struct {
// Count - the count of items in the list.
Count *int32 `json:"count,omitempty"`
// NextLink - the link to the next page of results.
NextLink *string `json:"nextLink,omitempty"`
}
// TypeFieldInfo a Data Lake Analytics catalog type field information item.
type TypeFieldInfo struct {
// Name - the name of the field associated with this type.
Name *string `json:"name,omitempty"`
// Type - the type of the field.
Type *string `json:"type,omitempty"`
}
// USQLAssembly a Data Lake Analytics catalog U-SQL Assembly.
type USQLAssembly struct {
autorest.Response `json:"-"`
// DatabaseName - the name of the database.
DatabaseName *string `json:"databaseName,omitempty"`
// Name - the name of the assembly.
Name *string `json:"assemblyName,omitempty"`
// ClrName - the name of the CLR.
ClrName *string `json:"clrName,omitempty"`
// IsVisible - the switch indicating if this assembly is visible or not.
IsVisible *bool `json:"isVisible,omitempty"`
// IsUserDefined - the switch indicating if this assembly is user defined or not.
IsUserDefined *bool `json:"isUserDefined,omitempty"`
// Files - the list of files associated with the assembly
Files *[]USQLAssemblyFileInfo `json:"files,omitempty"`
// Dependencies - the list of dependencies associated with the assembly
Dependencies *[]USQLAssemblyDependencyInfo `json:"dependencies,omitempty"`
// ComputeAccountName - the name of the Data Lake Analytics account.
ComputeAccountName *string `json:"computeAccountName,omitempty"`
// Version - the version of the catalog item.
Version *uuid.UUID `json:"version,omitempty"`
}
// USQLAssemblyClr a Data Lake Analytics catalog U-SQL assembly CLR item.
type USQLAssemblyClr struct {
// DatabaseName - the name of the database.
DatabaseName *string `json:"databaseName,omitempty"`
// Name - the name of the assembly.
Name *string `json:"assemblyClrName,omitempty"`
// ClrName - the name of the CLR.
ClrName *string `json:"clrName,omitempty"`
// ComputeAccountName - the name of the Data Lake Analytics account.
ComputeAccountName *string `json:"computeAccountName,omitempty"`
// Version - the version of the catalog item.
Version *uuid.UUID `json:"version,omitempty"`
}
// USQLAssemblyDependencyInfo a Data Lake Analytics catalog U-SQL dependency information item.
type USQLAssemblyDependencyInfo struct {
// EntityID - the EntityId of the dependency.
EntityID *EntityID `json:"entityId,omitempty"`
}
// USQLAssemblyFileInfo a Data Lake Analytics catalog U-SQL assembly file information item.
type USQLAssemblyFileInfo struct {
// Type - the assembly file type. Possible values include: 'Assembly', 'Resource'
Type FileType `json:"type,omitempty"`
// OriginalPath - the the original path to the assembly file.
OriginalPath *string `json:"originalPath,omitempty"`
// ContentPath - the the content path to the assembly file.
ContentPath *string `json:"contentPath,omitempty"`
}
// USQLAssemblyList a Data Lake Analytics catalog U-SQL assembly CLR item list.
type USQLAssemblyList struct {
autorest.Response `json:"-"`
// Value - the list of assemblies in the database
Value *[]USQLAssemblyClr `json:"value,omitempty"`
// Count - the count of items in the list.
Count *int32 `json:"count,omitempty"`
// NextLink - the link to the next page of results.
NextLink *string `json:"nextLink,omitempty"`
}
// USQLAssemblyListIterator provides access to a complete listing of USQLAssemblyClr values.
type USQLAssemblyListIterator struct {
i int
page USQLAssemblyListPage
}
// Next advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
func (iter *USQLAssemblyListIterator) Next() error {
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
err := iter.page.Next()
if err != nil {
iter.i--
return err
}
iter.i = 0
return nil
}
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter USQLAssemblyListIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
}
// Response returns the raw server response from the last page request.
func (iter USQLAssemblyListIterator) Response() USQLAssemblyList {
return iter.page.Response()
}
// Value returns the current value or a zero-initialized value if the
// iterator has advanced beyond the end of the collection.
func (iter USQLAssemblyListIterator) Value() USQLAssemblyClr {
if !iter.page.NotDone() {
return USQLAssemblyClr{}
}
return iter.page.Values()[iter.i]
}
// IsEmpty returns true if the ListResult contains no values.
func (usal USQLAssemblyList) IsEmpty() bool {
return usal.Value == nil || len(*usal.Value) == 0
}
// uSQLAssemblyListPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
func (usal USQLAssemblyList) uSQLAssemblyListPreparer() (*http.Request, error) {
if usal.NextLink == nil || len(to.String(usal.NextLink)) < 1 {
return nil, nil
}
return autorest.Prepare(&http.Request{},
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(usal.NextLink)))
}
// USQLAssemblyListPage contains a page of USQLAssemblyClr values.
type USQLAssemblyListPage struct {
fn func(USQLAssemblyList) (USQLAssemblyList, error)
ual USQLAssemblyList
}
// Next advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
func (page *USQLAssemblyListPage) Next() error {
next, err := page.fn(page.ual)
if err != nil {
return err
}
page.ual = next
return nil
}
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page USQLAssemblyListPage) NotDone() bool {
return !page.ual.IsEmpty()
}
// Response returns the raw server response from the last page request.
func (page USQLAssemblyListPage) Response() USQLAssemblyList {
return page.ual
}
// Values returns the slice of values for the current page or nil if there are no values.
func (page USQLAssemblyListPage) Values() []USQLAssemblyClr {
if page.ual.IsEmpty() {
return nil
}
return *page.ual.Value
}
// USQLCredential a Data Lake Analytics catalog U-SQL credential item.
type USQLCredential struct {
autorest.Response `json:"-"`
// DatabaseName - the name of the database the credential is in.
DatabaseName *string `json:"databaseName,omitempty"`
// Identity - the name of the secret associated with the credential.
Identity *string `json:"identity,omitempty"`
// Name - the name of the credential.
Name *string `json:"credentialName,omitempty"`
// UserName - the user name associated with the credential.
UserName *string `json:"userName,omitempty"`
// ComputeAccountName - the name of the Data Lake Analytics account.
ComputeAccountName *string `json:"computeAccountName,omitempty"`
// Version - the version of the catalog item.
Version *uuid.UUID `json:"version,omitempty"`
}
// USQLCredentialList a Data Lake Analytics catalog U-SQL credential item list.
type USQLCredentialList struct {
autorest.Response `json:"-"`
// Value - the list of credentials in the database
Value *[]USQLCredential `json:"value,omitempty"`
// Count - the count of items in the list.
Count *int32 `json:"count,omitempty"`
// NextLink - the link to the next page of results.
NextLink *string `json:"nextLink,omitempty"`
}
// USQLCredentialListIterator provides access to a complete listing of USQLCredential values.
type USQLCredentialListIterator struct {
i int
page USQLCredentialListPage
}
// Next advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
func (iter *USQLCredentialListIterator) Next() error {
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
err := iter.page.Next()
if err != nil {
iter.i--
return err
}
iter.i = 0
return nil
}
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter USQLCredentialListIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
}
// Response returns the raw server response from the last page request.
func (iter USQLCredentialListIterator) Response() USQLCredentialList {
return iter.page.Response()
}
// Value returns the current value or a zero-initialized value if the
// iterator has advanced beyond the end of the collection.
func (iter USQLCredentialListIterator) Value() USQLCredential {
if !iter.page.NotDone() {
return USQLCredential{}
}
return iter.page.Values()[iter.i]
}
// IsEmpty returns true if the ListResult contains no values.
func (uscl USQLCredentialList) IsEmpty() bool {
return uscl.Value == nil || len(*uscl.Value) == 0
}
// uSQLCredentialListPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
func (uscl USQLCredentialList) uSQLCredentialListPreparer() (*http.Request, error) {
if uscl.NextLink == nil || len(to.String(uscl.NextLink)) < 1 {
return nil, nil
}
return autorest.Prepare(&http.Request{},
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(uscl.NextLink)))
}
// USQLCredentialListPage contains a page of USQLCredential values.
type USQLCredentialListPage struct {
fn func(USQLCredentialList) (USQLCredentialList, error)
ucl USQLCredentialList
}
// Next advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
func (page *USQLCredentialListPage) Next() error {
next, err := page.fn(page.ucl)
if err != nil {
return err
}
page.ucl = next
return nil
}
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page USQLCredentialListPage) NotDone() bool {
return !page.ucl.IsEmpty()
}
// Response returns the raw server response from the last page request.
func (page USQLCredentialListPage) Response() USQLCredentialList {
return page.ucl
}
// Values returns the slice of values for the current page or nil if there are no values.
func (page USQLCredentialListPage) Values() []USQLCredential {
if page.ucl.IsEmpty() {
return nil
}
return *page.ucl.Value
}
// USQLDatabase a Data Lake Analytics catalog U-SQL database item.
type USQLDatabase struct {
autorest.Response `json:"-"`
// Name - the name of the database.
Name *string `json:"databaseName,omitempty"`
// ComputeAccountName - the name of the Data Lake Analytics account.
ComputeAccountName *string `json:"computeAccountName,omitempty"`
// Version - the version of the catalog item.
Version *uuid.UUID `json:"version,omitempty"`
}
// USQLDatabaseList a Data Lake Analytics catalog U-SQL database item list.
type USQLDatabaseList struct {
autorest.Response `json:"-"`
// Value - the list of databases
Value *[]USQLDatabase `json:"value,omitempty"`
// Count - the count of items in the list.
Count *int32 `json:"count,omitempty"`
// NextLink - the link to the next page of results.
NextLink *string `json:"nextLink,omitempty"`
}
// USQLDatabaseListIterator provides access to a complete listing of USQLDatabase values.
type USQLDatabaseListIterator struct {
i int
page USQLDatabaseListPage
}
// Next advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
func (iter *USQLDatabaseListIterator) Next() error {
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
err := iter.page.Next()
if err != nil {
iter.i--
return err
}
iter.i = 0
return nil
}
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter USQLDatabaseListIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
}
// Response returns the raw server response from the last page request.
func (iter USQLDatabaseListIterator) Response() USQLDatabaseList {
return iter.page.Response()
}
// Value returns the current value or a zero-initialized value if the
// iterator has advanced beyond the end of the collection.
func (iter USQLDatabaseListIterator) Value() USQLDatabase {
if !iter.page.NotDone() {
return USQLDatabase{}
}
return iter.page.Values()[iter.i]
}
// IsEmpty returns true if the ListResult contains no values.
func (usdl USQLDatabaseList) IsEmpty() bool {
return usdl.Value == nil || len(*usdl.Value) == 0
}
// uSQLDatabaseListPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
func (usdl USQLDatabaseList) uSQLDatabaseListPreparer() (*http.Request, error) {
if usdl.NextLink == nil || len(to.String(usdl.NextLink)) < 1 {
return nil, nil
}
return autorest.Prepare(&http.Request{},
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(usdl.NextLink)))
}
// USQLDatabaseListPage contains a page of USQLDatabase values.
type USQLDatabaseListPage struct {
fn func(USQLDatabaseList) (USQLDatabaseList, error)
udl USQLDatabaseList
}
// Next advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
func (page *USQLDatabaseListPage) Next() error {
next, err := page.fn(page.udl)
if err != nil {
return err
}
page.udl = next
return nil
}
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page USQLDatabaseListPage) NotDone() bool {
return !page.udl.IsEmpty()
}
// Response returns the raw server response from the last page request.
func (page USQLDatabaseListPage) Response() USQLDatabaseList {
return page.udl
}
// Values returns the slice of values for the current page or nil if there are no values.
func (page USQLDatabaseListPage) Values() []USQLDatabase {
if page.udl.IsEmpty() {
return nil
}
return *page.udl.Value
}
// USQLDirectedColumn a Data Lake Analytics catalog U-SQL directed column item.
type USQLDirectedColumn struct {
// Name - the name of the index in the table.
Name *string `json:"name,omitempty"`
// Descending - the switch indicating if the index is descending or not.
Descending *bool `json:"descending,omitempty"`
}
// USQLDistributionInfo a Data Lake Analytics catalog U-SQL distribution information object.
type USQLDistributionInfo struct {
// Type - the type of this distribution.
Type *int32 `json:"type,omitempty"`
// Keys - the list of directed columns in the distribution
Keys *[]USQLDirectedColumn `json:"keys,omitempty"`
// Count - the count of indices using this distribution.
Count *int32 `json:"count,omitempty"`
// DynamicCount - the dynamic count of indices using this distribution.
DynamicCount *int32 `json:"dynamicCount,omitempty"`
}
// USQLExternalDataSource a Data Lake Analytics catalog U-SQL external datasource item.
type USQLExternalDataSource struct {
autorest.Response `json:"-"`
// DatabaseName - the name of the database.
DatabaseName *string `json:"databaseName,omitempty"`
// Name - the name of the external data source.
Name *string `json:"externalDataSourceName,omitempty"`
// Provider - the name of the provider for the external data source.
Provider *string `json:"provider,omitempty"`
// ProviderString - the name of the provider string for the external data source.
ProviderString *string `json:"providerString,omitempty"`
// PushdownTypes - the list of types to push down from the external data source.
PushdownTypes *[]string `json:"pushdownTypes,omitempty"`
// ComputeAccountName - the name of the Data Lake Analytics account.
ComputeAccountName *string `json:"computeAccountName,omitempty"`
// Version - the version of the catalog item.
Version *uuid.UUID `json:"version,omitempty"`
}
// USQLExternalDataSourceList a Data Lake Analytics catalog U-SQL external datasource item list.
type USQLExternalDataSourceList struct {
autorest.Response `json:"-"`
// Value - the list of external data sources in the database
Value *[]USQLExternalDataSource `json:"value,omitempty"`
// Count - the count of items in the list.
Count *int32 `json:"count,omitempty"`
// NextLink - the link to the next page of results.
NextLink *string `json:"nextLink,omitempty"`
}
// USQLExternalDataSourceListIterator provides access to a complete listing of USQLExternalDataSource values.
type USQLExternalDataSourceListIterator struct {
i int
page USQLExternalDataSourceListPage
}
// Next advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
func (iter *USQLExternalDataSourceListIterator) Next() error {
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
err := iter.page.Next()
if err != nil {
iter.i--
return err
}
iter.i = 0
return nil
}
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter USQLExternalDataSourceListIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
}
// Response returns the raw server response from the last page request.
func (iter USQLExternalDataSourceListIterator) Response() USQLExternalDataSourceList {
return iter.page.Response()
}
// Value returns the current value or a zero-initialized value if the
// iterator has advanced beyond the end of the collection.
func (iter USQLExternalDataSourceListIterator) Value() USQLExternalDataSource {
if !iter.page.NotDone() {
return USQLExternalDataSource{}
}
return iter.page.Values()[iter.i]
}
// IsEmpty returns true if the ListResult contains no values.
func (usedsl USQLExternalDataSourceList) IsEmpty() bool {
return usedsl.Value == nil || len(*usedsl.Value) == 0
}
// uSQLExternalDataSourceListPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
func (usedsl USQLExternalDataSourceList) uSQLExternalDataSourceListPreparer() (*http.Request, error) {
if usedsl.NextLink == nil || len(to.String(usedsl.NextLink)) < 1 {
return nil, nil
}
return autorest.Prepare(&http.Request{},
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(usedsl.NextLink)))
}
// USQLExternalDataSourceListPage contains a page of USQLExternalDataSource values.
type USQLExternalDataSourceListPage struct {
fn func(USQLExternalDataSourceList) (USQLExternalDataSourceList, error)
uedsl USQLExternalDataSourceList
}
// Next advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
func (page *USQLExternalDataSourceListPage) Next() error {
next, err := page.fn(page.uedsl)
if err != nil {
return err
}
page.uedsl = next
return nil
}
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page USQLExternalDataSourceListPage) NotDone() bool {
return !page.uedsl.IsEmpty()
}
// Response returns the raw server response from the last page request.
func (page USQLExternalDataSourceListPage) Response() USQLExternalDataSourceList {
return page.uedsl
}
// Values returns the slice of values for the current page or nil if there are no values.
func (page USQLExternalDataSourceListPage) Values() []USQLExternalDataSource {
if page.uedsl.IsEmpty() {
return nil
}
return *page.uedsl.Value
}
// USQLIndex a Data Lake Analytics catalog U-SQL table index item.
type USQLIndex struct {
// Name - the name of the index in the table.
Name *string `json:"name,omitempty"`
// IndexKeys - the list of directed columns in the index
IndexKeys *[]USQLDirectedColumn `json:"indexKeys,omitempty"`
// Columns - the list of columns in the index
Columns *[]string `json:"columns,omitempty"`
// DistributionInfo - the distributions info of the index
DistributionInfo *USQLDistributionInfo `json:"distributionInfo,omitempty"`
// PartitionFunction - partition function ID for the index.
PartitionFunction *uuid.UUID `json:"partitionFunction,omitempty"`
// PartitionKeyList - the list of partion keys in the index
PartitionKeyList *[]string `json:"partitionKeyList,omitempty"`
// StreamNames - the list of full paths to the streams that contain this index in the DataLake account.
StreamNames *[]string `json:"streamNames,omitempty"`
// IsColumnstore - the switch indicating if this index is a columnstore index.
IsColumnstore *bool `json:"isColumnstore,omitempty"`
// IndexID - the ID of this index within the table.
IndexID *int32 `json:"indexId,omitempty"`
// IsUnique - the switch indicating if this index is a unique index.
IsUnique *bool `json:"isUnique,omitempty"`
}
// USQLProcedure a Data Lake Analytics catalog U-SQL procedure item.
type USQLProcedure struct {
autorest.Response `json:"-"`
// DatabaseName - the name of the database.
DatabaseName *string `json:"databaseName,omitempty"`
// SchemaName - the name of the schema associated with this procedure and database.
SchemaName *string `json:"schemaName,omitempty"`
// Name - the name of the procedure.
Name *string `json:"procName,omitempty"`
// Definition - the defined query of the procedure.
Definition *string `json:"definition,omitempty"`
// ComputeAccountName - the name of the Data Lake Analytics account.
ComputeAccountName *string `json:"computeAccountName,omitempty"`
// Version - the version of the catalog item.
Version *uuid.UUID `json:"version,omitempty"`
}
// USQLProcedureList a Data Lake Analytics catalog U-SQL procedure item list.
type USQLProcedureList struct {
autorest.Response `json:"-"`
// Value - the list of procedure in the database and schema combination
Value *[]USQLProcedure `json:"value,omitempty"`
// Count - the count of items in the list.
Count *int32 `json:"count,omitempty"`
// NextLink - the link to the next page of results.
NextLink *string `json:"nextLink,omitempty"`
}
// USQLProcedureListIterator provides access to a complete listing of USQLProcedure values.
type USQLProcedureListIterator struct {
i int
page USQLProcedureListPage
}
// Next advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
func (iter *USQLProcedureListIterator) Next() error {
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
err := iter.page.Next()
if err != nil {
iter.i--
return err
}
iter.i = 0
return nil
}
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter USQLProcedureListIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
}
// Response returns the raw server response from the last page request.
func (iter USQLProcedureListIterator) Response() USQLProcedureList {
return iter.page.Response()
}
// Value returns the current value or a zero-initialized value if the
// iterator has advanced beyond the end of the collection.
func (iter USQLProcedureListIterator) Value() USQLProcedure {
if !iter.page.NotDone() {
return USQLProcedure{}
}
return iter.page.Values()[iter.i]
}
// IsEmpty returns true if the ListResult contains no values.
func (uspl USQLProcedureList) IsEmpty() bool {
return uspl.Value == nil || len(*uspl.Value) == 0
}
// uSQLProcedureListPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
func (uspl USQLProcedureList) uSQLProcedureListPreparer() (*http.Request, error) {
if uspl.NextLink == nil || len(to.String(uspl.NextLink)) < 1 {
return nil, nil
}
return autorest.Prepare(&http.Request{},
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(uspl.NextLink)))
}
// USQLProcedureListPage contains a page of USQLProcedure values.
type USQLProcedureListPage struct {
fn func(USQLProcedureList) (USQLProcedureList, error)
upl USQLProcedureList
}
// Next advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
func (page *USQLProcedureListPage) Next() error {
next, err := page.fn(page.upl)
if err != nil {
return err
}
page.upl = next
return nil
}
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page USQLProcedureListPage) NotDone() bool {
return !page.upl.IsEmpty()
}
// Response returns the raw server response from the last page request.
func (page USQLProcedureListPage) Response() USQLProcedureList {
return page.upl
}
// Values returns the slice of values for the current page or nil if there are no values.
func (page USQLProcedureListPage) Values() []USQLProcedure {
if page.upl.IsEmpty() {
return nil
}
return *page.upl.Value
}
// USQLSchema a Data Lake Analytics catalog U-SQL schema item.
type USQLSchema struct {
autorest.Response `json:"-"`
// DatabaseName - the name of the database.
DatabaseName *string `json:"databaseName,omitempty"`
// Name - the name of the schema.
Name *string `json:"schemaName,omitempty"`
// ComputeAccountName - the name of the Data Lake Analytics account.
ComputeAccountName *string `json:"computeAccountName,omitempty"`
// Version - the version of the catalog item.
Version *uuid.UUID `json:"version,omitempty"`
}
// USQLSchemaList a Data Lake Analytics catalog U-SQL schema item list.
type USQLSchemaList struct {
autorest.Response `json:"-"`
// Value - the list of schemas in the database
Value *[]USQLSchema `json:"value,omitempty"`
// Count - the count of items in the list.
Count *int32 `json:"count,omitempty"`
// NextLink - the link to the next page of results.
NextLink *string `json:"nextLink,omitempty"`
}
// USQLSchemaListIterator provides access to a complete listing of USQLSchema values.
type USQLSchemaListIterator struct {
i int
page USQLSchemaListPage
}
// Next advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
func (iter *USQLSchemaListIterator) Next() error {
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
err := iter.page.Next()
if err != nil {
iter.i--
return err
}
iter.i = 0
return nil
}
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter USQLSchemaListIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
}
// Response returns the raw server response from the last page request.
func (iter USQLSchemaListIterator) Response() USQLSchemaList {
return iter.page.Response()
}
// Value returns the current value or a zero-initialized value if the
// iterator has advanced beyond the end of the collection.
func (iter USQLSchemaListIterator) Value() USQLSchema {
if !iter.page.NotDone() {
return USQLSchema{}
}
return iter.page.Values()[iter.i]
}
// IsEmpty returns true if the ListResult contains no values.
func (ussl USQLSchemaList) IsEmpty() bool {
return ussl.Value == nil || len(*ussl.Value) == 0
}
// uSQLSchemaListPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
func (ussl USQLSchemaList) uSQLSchemaListPreparer() (*http.Request, error) {
if ussl.NextLink == nil || len(to.String(ussl.NextLink)) < 1 {
return nil, nil
}
return autorest.Prepare(&http.Request{},
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(ussl.NextLink)))
}
// USQLSchemaListPage contains a page of USQLSchema values.
type USQLSchemaListPage struct {
fn func(USQLSchemaList) (USQLSchemaList, error)
usl USQLSchemaList
}
// Next advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
func (page *USQLSchemaListPage) Next() error {
next, err := page.fn(page.usl)
if err != nil {
return err
}
page.usl = next
return nil
}
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page USQLSchemaListPage) NotDone() bool {
return !page.usl.IsEmpty()
}
// Response returns the raw server response from the last page request.
func (page USQLSchemaListPage) Response() USQLSchemaList {
return page.usl
}
// Values returns the slice of values for the current page or nil if there are no values.
func (page USQLSchemaListPage) Values() []USQLSchema {
if page.usl.IsEmpty() {
return nil
}
return *page.usl.Value
}
// USQLSecret a Data Lake Analytics catalog U-SQL secret item.
type USQLSecret struct {
autorest.Response `json:"-"`
// DatabaseName - the name of the database.
DatabaseName *string `json:"databaseName,omitempty"`
// Name - the name of the secret.
Name *string `json:"secretName,omitempty"`
// CreationTime - the creation time of the credential object. This is the only information returned about a secret from a GET.
CreationTime *date.Time `json:"creationTime,omitempty"`
// URI - the URI identifier for the secret in the format <hostname>:<port>
URI *string `json:"uri,omitempty"`
// Password - the password for the secret to pass in
Password *string `json:"password,omitempty"`
// ComputeAccountName - the name of the Data Lake Analytics account.
ComputeAccountName *string `json:"computeAccountName,omitempty"`
// Version - the version of the catalog item.
Version *uuid.UUID `json:"version,omitempty"`
}
// USQLTable a Data Lake Analytics catalog U-SQL table item.
type USQLTable struct {
autorest.Response `json:"-"`
// DatabaseName - the name of the database.
DatabaseName *string `json:"databaseName,omitempty"`
// SchemaName - the name of the schema associated with this table and database.
SchemaName *string `json:"schemaName,omitempty"`
// Name - the name of the table.
Name *string `json:"tableName,omitempty"`
// ColumnList - the list of columns in this table
ColumnList *[]USQLTableColumn `json:"columnList,omitempty"`
// IndexList - the list of indices in this table
IndexList *[]USQLIndex `json:"indexList,omitempty"`
// PartitionKeyList - the list of partition keys in the table
PartitionKeyList *[]string `json:"partitionKeyList,omitempty"`
// ExternalTable - the external table associated with the table.
ExternalTable *ExternalTable `json:"externalTable,omitempty"`
// DistributionInfo - the distributions info of the table
DistributionInfo *USQLDistributionInfo `json:"distributionInfo,omitempty"`
// ComputeAccountName - the name of the Data Lake Analytics account.
ComputeAccountName *string `json:"computeAccountName,omitempty"`
// Version - the version of the catalog item.
Version *uuid.UUID `json:"version,omitempty"`
}
// USQLTableColumn a Data Lake Analytics catalog U-SQL table column item.
type USQLTableColumn struct {
// Name - the name of the column in the table.
Name *string `json:"name,omitempty"`
// Type - the object type of the specified column (such as System.String).
Type *string `json:"type,omitempty"`
}
// USQLTableList a Data Lake Analytics catalog U-SQL table item list.
type USQLTableList struct {
autorest.Response `json:"-"`
// Value - the list of tables in the database and schema combination
Value *[]USQLTable `json:"value,omitempty"`
// Count - the count of items in the list.
Count *int32 `json:"count,omitempty"`
// NextLink - the link to the next page of results.
NextLink *string `json:"nextLink,omitempty"`
}
// USQLTableListIterator provides access to a complete listing of USQLTable values.
type USQLTableListIterator struct {
i int
page USQLTableListPage
}
// Next advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
func (iter *USQLTableListIterator) Next() error {
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
err := iter.page.Next()
if err != nil {
iter.i--
return err
}
iter.i = 0
return nil
}
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter USQLTableListIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
}
// Response returns the raw server response from the last page request.
func (iter USQLTableListIterator) Response() USQLTableList {
return iter.page.Response()
}
// Value returns the current value or a zero-initialized value if the
// iterator has advanced beyond the end of the collection.
func (iter USQLTableListIterator) Value() USQLTable {
if !iter.page.NotDone() {
return USQLTable{}