1 package catalog
2
3
4
5
6
7
8
9 import (
10 "context"
11 "encoding/json"
12 "github.com/Azure/go-autorest/autorest"
13 "github.com/Azure/go-autorest/autorest/date"
14 "github.com/Azure/go-autorest/autorest/to"
15 "github.com/Azure/go-autorest/tracing"
16 "github.com/gofrs/uuid"
17 "net/http"
18 )
19
20
21 const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog"
22
23
24
25 type DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters struct {
26
27 Password *string `json:"password,omitempty"`
28
29 URI *string `json:"uri,omitempty"`
30 }
31
32
33 type DdlName struct {
34
35 FirstPart *string `json:"firstPart,omitempty"`
36
37 SecondPart *string `json:"secondPart,omitempty"`
38
39 ThirdPart *string `json:"thirdPart,omitempty"`
40
41 Server *string `json:"server,omitempty"`
42 }
43
44
45 type EntityID struct {
46
47 Name *DdlName `json:"name,omitempty"`
48
49 Version *uuid.UUID `json:"version,omitempty"`
50 }
51
52
53 type ExternalTable struct {
54
55 TableName *string `json:"tableName,omitempty"`
56
57 DataSource *EntityID `json:"dataSource,omitempty"`
58 }
59
60
61 type Item struct {
62
63 ComputeAccountName *string `json:"computeAccountName,omitempty"`
64
65 Version *uuid.UUID `json:"version,omitempty"`
66 }
67
68
69 type ItemList struct {
70
71 Count *int32 `json:"count,omitempty"`
72
73 NextLink *string `json:"nextLink,omitempty"`
74 }
75
76
77 type TypeFieldInfo struct {
78
79 Name *string `json:"name,omitempty"`
80
81 Type *string `json:"type,omitempty"`
82 }
83
84
85 type USQLAssembly struct {
86 autorest.Response `json:"-"`
87
88 DatabaseName *string `json:"databaseName,omitempty"`
89
90 Name *string `json:"assemblyName,omitempty"`
91
92 ClrName *string `json:"clrName,omitempty"`
93
94 IsVisible *bool `json:"isVisible,omitempty"`
95
96 IsUserDefined *bool `json:"isUserDefined,omitempty"`
97
98 Files *[]USQLAssemblyFileInfo `json:"files,omitempty"`
99
100 Dependencies *[]USQLAssemblyDependencyInfo `json:"dependencies,omitempty"`
101
102 ComputeAccountName *string `json:"computeAccountName,omitempty"`
103
104 Version *uuid.UUID `json:"version,omitempty"`
105 }
106
107
108 type USQLAssemblyClr struct {
109
110 DatabaseName *string `json:"databaseName,omitempty"`
111
112 Name *string `json:"assemblyClrName,omitempty"`
113
114 ClrName *string `json:"clrName,omitempty"`
115
116 ComputeAccountName *string `json:"computeAccountName,omitempty"`
117
118 Version *uuid.UUID `json:"version,omitempty"`
119 }
120
121
122 type USQLAssemblyDependencyInfo struct {
123
124 EntityID *EntityID `json:"entityId,omitempty"`
125 }
126
127
128 type USQLAssemblyFileInfo struct {
129
130 Type FileType `json:"type,omitempty"`
131
132 OriginalPath *string `json:"originalPath,omitempty"`
133
134 ContentPath *string `json:"contentPath,omitempty"`
135 }
136
137
138 type USQLAssemblyList struct {
139 autorest.Response `json:"-"`
140
141 Value *[]USQLAssemblyClr `json:"value,omitempty"`
142
143 Count *int32 `json:"count,omitempty"`
144
145 NextLink *string `json:"nextLink,omitempty"`
146 }
147
148
149 func (usal USQLAssemblyList) MarshalJSON() ([]byte, error) {
150 objectMap := make(map[string]interface{})
151 if usal.Count != nil {
152 objectMap["count"] = usal.Count
153 }
154 if usal.NextLink != nil {
155 objectMap["nextLink"] = usal.NextLink
156 }
157 return json.Marshal(objectMap)
158 }
159
160
161 type USQLAssemblyListIterator struct {
162 i int
163 page USQLAssemblyListPage
164 }
165
166
167
168 func (iter *USQLAssemblyListIterator) NextWithContext(ctx context.Context) (err error) {
169 if tracing.IsEnabled() {
170 ctx = tracing.StartSpan(ctx, fqdn+"/USQLAssemblyListIterator.NextWithContext")
171 defer func() {
172 sc := -1
173 if iter.Response().Response.Response != nil {
174 sc = iter.Response().Response.Response.StatusCode
175 }
176 tracing.EndSpan(ctx, sc, err)
177 }()
178 }
179 iter.i++
180 if iter.i < len(iter.page.Values()) {
181 return nil
182 }
183 err = iter.page.NextWithContext(ctx)
184 if err != nil {
185 iter.i--
186 return err
187 }
188 iter.i = 0
189 return nil
190 }
191
192
193
194
195 func (iter *USQLAssemblyListIterator) Next() error {
196 return iter.NextWithContext(context.Background())
197 }
198
199
200 func (iter USQLAssemblyListIterator) NotDone() bool {
201 return iter.page.NotDone() && iter.i < len(iter.page.Values())
202 }
203
204
205 func (iter USQLAssemblyListIterator) Response() USQLAssemblyList {
206 return iter.page.Response()
207 }
208
209
210
211 func (iter USQLAssemblyListIterator) Value() USQLAssemblyClr {
212 if !iter.page.NotDone() {
213 return USQLAssemblyClr{}
214 }
215 return iter.page.Values()[iter.i]
216 }
217
218
219 func NewUSQLAssemblyListIterator(page USQLAssemblyListPage) USQLAssemblyListIterator {
220 return USQLAssemblyListIterator{page: page}
221 }
222
223
224 func (usal USQLAssemblyList) IsEmpty() bool {
225 return usal.Value == nil || len(*usal.Value) == 0
226 }
227
228
229 func (usal USQLAssemblyList) hasNextLink() bool {
230 return usal.NextLink != nil && len(*usal.NextLink) != 0
231 }
232
233
234
235 func (usal USQLAssemblyList) uSQLAssemblyListPreparer(ctx context.Context) (*http.Request, error) {
236 if !usal.hasNextLink() {
237 return nil, nil
238 }
239 return autorest.Prepare((&http.Request{}).WithContext(ctx),
240 autorest.AsJSON(),
241 autorest.AsGet(),
242 autorest.WithBaseURL(to.String(usal.NextLink)))
243 }
244
245
246 type USQLAssemblyListPage struct {
247 fn func(context.Context, USQLAssemblyList) (USQLAssemblyList, error)
248 ual USQLAssemblyList
249 }
250
251
252
253 func (page *USQLAssemblyListPage) NextWithContext(ctx context.Context) (err error) {
254 if tracing.IsEnabled() {
255 ctx = tracing.StartSpan(ctx, fqdn+"/USQLAssemblyListPage.NextWithContext")
256 defer func() {
257 sc := -1
258 if page.Response().Response.Response != nil {
259 sc = page.Response().Response.Response.StatusCode
260 }
261 tracing.EndSpan(ctx, sc, err)
262 }()
263 }
264 for {
265 next, err := page.fn(ctx, page.ual)
266 if err != nil {
267 return err
268 }
269 page.ual = next
270 if !next.hasNextLink() || !next.IsEmpty() {
271 break
272 }
273 }
274 return nil
275 }
276
277
278
279
280 func (page *USQLAssemblyListPage) Next() error {
281 return page.NextWithContext(context.Background())
282 }
283
284
285 func (page USQLAssemblyListPage) NotDone() bool {
286 return !page.ual.IsEmpty()
287 }
288
289
290 func (page USQLAssemblyListPage) Response() USQLAssemblyList {
291 return page.ual
292 }
293
294
295 func (page USQLAssemblyListPage) Values() []USQLAssemblyClr {
296 if page.ual.IsEmpty() {
297 return nil
298 }
299 return *page.ual.Value
300 }
301
302
303 func NewUSQLAssemblyListPage(cur USQLAssemblyList, getNextPage func(context.Context, USQLAssemblyList) (USQLAssemblyList, error)) USQLAssemblyListPage {
304 return USQLAssemblyListPage{
305 fn: getNextPage,
306 ual: cur,
307 }
308 }
309
310
311 type USQLCredential struct {
312 autorest.Response `json:"-"`
313
314 DatabaseName *string `json:"databaseName,omitempty"`
315
316 Identity *string `json:"identity,omitempty"`
317
318 Name *string `json:"credentialName,omitempty"`
319
320 UserName *string `json:"userName,omitempty"`
321
322 ComputeAccountName *string `json:"computeAccountName,omitempty"`
323
324 Version *uuid.UUID `json:"version,omitempty"`
325 }
326
327
328 type USQLCredentialList struct {
329 autorest.Response `json:"-"`
330
331 Value *[]USQLCredential `json:"value,omitempty"`
332
333 Count *int32 `json:"count,omitempty"`
334
335 NextLink *string `json:"nextLink,omitempty"`
336 }
337
338
339 func (uscl USQLCredentialList) MarshalJSON() ([]byte, error) {
340 objectMap := make(map[string]interface{})
341 if uscl.Count != nil {
342 objectMap["count"] = uscl.Count
343 }
344 if uscl.NextLink != nil {
345 objectMap["nextLink"] = uscl.NextLink
346 }
347 return json.Marshal(objectMap)
348 }
349
350
351 type USQLCredentialListIterator struct {
352 i int
353 page USQLCredentialListPage
354 }
355
356
357
358 func (iter *USQLCredentialListIterator) NextWithContext(ctx context.Context) (err error) {
359 if tracing.IsEnabled() {
360 ctx = tracing.StartSpan(ctx, fqdn+"/USQLCredentialListIterator.NextWithContext")
361 defer func() {
362 sc := -1
363 if iter.Response().Response.Response != nil {
364 sc = iter.Response().Response.Response.StatusCode
365 }
366 tracing.EndSpan(ctx, sc, err)
367 }()
368 }
369 iter.i++
370 if iter.i < len(iter.page.Values()) {
371 return nil
372 }
373 err = iter.page.NextWithContext(ctx)
374 if err != nil {
375 iter.i--
376 return err
377 }
378 iter.i = 0
379 return nil
380 }
381
382
383
384
385 func (iter *USQLCredentialListIterator) Next() error {
386 return iter.NextWithContext(context.Background())
387 }
388
389
390 func (iter USQLCredentialListIterator) NotDone() bool {
391 return iter.page.NotDone() && iter.i < len(iter.page.Values())
392 }
393
394
395 func (iter USQLCredentialListIterator) Response() USQLCredentialList {
396 return iter.page.Response()
397 }
398
399
400
401 func (iter USQLCredentialListIterator) Value() USQLCredential {
402 if !iter.page.NotDone() {
403 return USQLCredential{}
404 }
405 return iter.page.Values()[iter.i]
406 }
407
408
409 func NewUSQLCredentialListIterator(page USQLCredentialListPage) USQLCredentialListIterator {
410 return USQLCredentialListIterator{page: page}
411 }
412
413
414 func (uscl USQLCredentialList) IsEmpty() bool {
415 return uscl.Value == nil || len(*uscl.Value) == 0
416 }
417
418
419 func (uscl USQLCredentialList) hasNextLink() bool {
420 return uscl.NextLink != nil && len(*uscl.NextLink) != 0
421 }
422
423
424
425 func (uscl USQLCredentialList) uSQLCredentialListPreparer(ctx context.Context) (*http.Request, error) {
426 if !uscl.hasNextLink() {
427 return nil, nil
428 }
429 return autorest.Prepare((&http.Request{}).WithContext(ctx),
430 autorest.AsJSON(),
431 autorest.AsGet(),
432 autorest.WithBaseURL(to.String(uscl.NextLink)))
433 }
434
435
436 type USQLCredentialListPage struct {
437 fn func(context.Context, USQLCredentialList) (USQLCredentialList, error)
438 ucl USQLCredentialList
439 }
440
441
442
443 func (page *USQLCredentialListPage) NextWithContext(ctx context.Context) (err error) {
444 if tracing.IsEnabled() {
445 ctx = tracing.StartSpan(ctx, fqdn+"/USQLCredentialListPage.NextWithContext")
446 defer func() {
447 sc := -1
448 if page.Response().Response.Response != nil {
449 sc = page.Response().Response.Response.StatusCode
450 }
451 tracing.EndSpan(ctx, sc, err)
452 }()
453 }
454 for {
455 next, err := page.fn(ctx, page.ucl)
456 if err != nil {
457 return err
458 }
459 page.ucl = next
460 if !next.hasNextLink() || !next.IsEmpty() {
461 break
462 }
463 }
464 return nil
465 }
466
467
468
469
470 func (page *USQLCredentialListPage) Next() error {
471 return page.NextWithContext(context.Background())
472 }
473
474
475 func (page USQLCredentialListPage) NotDone() bool {
476 return !page.ucl.IsEmpty()
477 }
478
479
480 func (page USQLCredentialListPage) Response() USQLCredentialList {
481 return page.ucl
482 }
483
484
485 func (page USQLCredentialListPage) Values() []USQLCredential {
486 if page.ucl.IsEmpty() {
487 return nil
488 }
489 return *page.ucl.Value
490 }
491
492
493 func NewUSQLCredentialListPage(cur USQLCredentialList, getNextPage func(context.Context, USQLCredentialList) (USQLCredentialList, error)) USQLCredentialListPage {
494 return USQLCredentialListPage{
495 fn: getNextPage,
496 ucl: cur,
497 }
498 }
499
500
501 type USQLDatabase struct {
502 autorest.Response `json:"-"`
503
504 Name *string `json:"databaseName,omitempty"`
505
506 ComputeAccountName *string `json:"computeAccountName,omitempty"`
507
508 Version *uuid.UUID `json:"version,omitempty"`
509 }
510
511
512 type USQLDatabaseList struct {
513 autorest.Response `json:"-"`
514
515 Value *[]USQLDatabase `json:"value,omitempty"`
516
517 Count *int32 `json:"count,omitempty"`
518
519 NextLink *string `json:"nextLink,omitempty"`
520 }
521
522
523 func (usdl USQLDatabaseList) MarshalJSON() ([]byte, error) {
524 objectMap := make(map[string]interface{})
525 if usdl.Count != nil {
526 objectMap["count"] = usdl.Count
527 }
528 if usdl.NextLink != nil {
529 objectMap["nextLink"] = usdl.NextLink
530 }
531 return json.Marshal(objectMap)
532 }
533
534
535 type USQLDatabaseListIterator struct {
536 i int
537 page USQLDatabaseListPage
538 }
539
540
541
542 func (iter *USQLDatabaseListIterator) NextWithContext(ctx context.Context) (err error) {
543 if tracing.IsEnabled() {
544 ctx = tracing.StartSpan(ctx, fqdn+"/USQLDatabaseListIterator.NextWithContext")
545 defer func() {
546 sc := -1
547 if iter.Response().Response.Response != nil {
548 sc = iter.Response().Response.Response.StatusCode
549 }
550 tracing.EndSpan(ctx, sc, err)
551 }()
552 }
553 iter.i++
554 if iter.i < len(iter.page.Values()) {
555 return nil
556 }
557 err = iter.page.NextWithContext(ctx)
558 if err != nil {
559 iter.i--
560 return err
561 }
562 iter.i = 0
563 return nil
564 }
565
566
567
568
569 func (iter *USQLDatabaseListIterator) Next() error {
570 return iter.NextWithContext(context.Background())
571 }
572
573
574 func (iter USQLDatabaseListIterator) NotDone() bool {
575 return iter.page.NotDone() && iter.i < len(iter.page.Values())
576 }
577
578
579 func (iter USQLDatabaseListIterator) Response() USQLDatabaseList {
580 return iter.page.Response()
581 }
582
583
584
585 func (iter USQLDatabaseListIterator) Value() USQLDatabase {
586 if !iter.page.NotDone() {
587 return USQLDatabase{}
588 }
589 return iter.page.Values()[iter.i]
590 }
591
592
593 func NewUSQLDatabaseListIterator(page USQLDatabaseListPage) USQLDatabaseListIterator {
594 return USQLDatabaseListIterator{page: page}
595 }
596
597
598 func (usdl USQLDatabaseList) IsEmpty() bool {
599 return usdl.Value == nil || len(*usdl.Value) == 0
600 }
601
602
603 func (usdl USQLDatabaseList) hasNextLink() bool {
604 return usdl.NextLink != nil && len(*usdl.NextLink) != 0
605 }
606
607
608
609 func (usdl USQLDatabaseList) uSQLDatabaseListPreparer(ctx context.Context) (*http.Request, error) {
610 if !usdl.hasNextLink() {
611 return nil, nil
612 }
613 return autorest.Prepare((&http.Request{}).WithContext(ctx),
614 autorest.AsJSON(),
615 autorest.AsGet(),
616 autorest.WithBaseURL(to.String(usdl.NextLink)))
617 }
618
619
620 type USQLDatabaseListPage struct {
621 fn func(context.Context, USQLDatabaseList) (USQLDatabaseList, error)
622 udl USQLDatabaseList
623 }
624
625
626
627 func (page *USQLDatabaseListPage) NextWithContext(ctx context.Context) (err error) {
628 if tracing.IsEnabled() {
629 ctx = tracing.StartSpan(ctx, fqdn+"/USQLDatabaseListPage.NextWithContext")
630 defer func() {
631 sc := -1
632 if page.Response().Response.Response != nil {
633 sc = page.Response().Response.Response.StatusCode
634 }
635 tracing.EndSpan(ctx, sc, err)
636 }()
637 }
638 for {
639 next, err := page.fn(ctx, page.udl)
640 if err != nil {
641 return err
642 }
643 page.udl = next
644 if !next.hasNextLink() || !next.IsEmpty() {
645 break
646 }
647 }
648 return nil
649 }
650
651
652
653
654 func (page *USQLDatabaseListPage) Next() error {
655 return page.NextWithContext(context.Background())
656 }
657
658
659 func (page USQLDatabaseListPage) NotDone() bool {
660 return !page.udl.IsEmpty()
661 }
662
663
664 func (page USQLDatabaseListPage) Response() USQLDatabaseList {
665 return page.udl
666 }
667
668
669 func (page USQLDatabaseListPage) Values() []USQLDatabase {
670 if page.udl.IsEmpty() {
671 return nil
672 }
673 return *page.udl.Value
674 }
675
676
677 func NewUSQLDatabaseListPage(cur USQLDatabaseList, getNextPage func(context.Context, USQLDatabaseList) (USQLDatabaseList, error)) USQLDatabaseListPage {
678 return USQLDatabaseListPage{
679 fn: getNextPage,
680 udl: cur,
681 }
682 }
683
684
685 type USQLDirectedColumn struct {
686
687 Name *string `json:"name,omitempty"`
688
689 Descending *bool `json:"descending,omitempty"`
690 }
691
692
693 type USQLDistributionInfo struct {
694
695 Type *int32 `json:"type,omitempty"`
696
697 Keys *[]USQLDirectedColumn `json:"keys,omitempty"`
698
699 Count *int32 `json:"count,omitempty"`
700
701 DynamicCount *int32 `json:"dynamicCount,omitempty"`
702 }
703
704
705 type USQLExternalDataSource struct {
706 autorest.Response `json:"-"`
707
708 DatabaseName *string `json:"databaseName,omitempty"`
709
710 Name *string `json:"externalDataSourceName,omitempty"`
711
712 Provider *string `json:"provider,omitempty"`
713
714 ProviderString *string `json:"providerString,omitempty"`
715
716 PushdownTypes *[]string `json:"pushdownTypes,omitempty"`
717
718 ComputeAccountName *string `json:"computeAccountName,omitempty"`
719
720 Version *uuid.UUID `json:"version,omitempty"`
721 }
722
723
724 type USQLExternalDataSourceList struct {
725 autorest.Response `json:"-"`
726
727 Value *[]USQLExternalDataSource `json:"value,omitempty"`
728
729 Count *int32 `json:"count,omitempty"`
730
731 NextLink *string `json:"nextLink,omitempty"`
732 }
733
734
735 func (usedsl USQLExternalDataSourceList) MarshalJSON() ([]byte, error) {
736 objectMap := make(map[string]interface{})
737 if usedsl.Count != nil {
738 objectMap["count"] = usedsl.Count
739 }
740 if usedsl.NextLink != nil {
741 objectMap["nextLink"] = usedsl.NextLink
742 }
743 return json.Marshal(objectMap)
744 }
745
746
747
748 type USQLExternalDataSourceListIterator struct {
749 i int
750 page USQLExternalDataSourceListPage
751 }
752
753
754
755 func (iter *USQLExternalDataSourceListIterator) NextWithContext(ctx context.Context) (err error) {
756 if tracing.IsEnabled() {
757 ctx = tracing.StartSpan(ctx, fqdn+"/USQLExternalDataSourceListIterator.NextWithContext")
758 defer func() {
759 sc := -1
760 if iter.Response().Response.Response != nil {
761 sc = iter.Response().Response.Response.StatusCode
762 }
763 tracing.EndSpan(ctx, sc, err)
764 }()
765 }
766 iter.i++
767 if iter.i < len(iter.page.Values()) {
768 return nil
769 }
770 err = iter.page.NextWithContext(ctx)
771 if err != nil {
772 iter.i--
773 return err
774 }
775 iter.i = 0
776 return nil
777 }
778
779
780
781
782 func (iter *USQLExternalDataSourceListIterator) Next() error {
783 return iter.NextWithContext(context.Background())
784 }
785
786
787 func (iter USQLExternalDataSourceListIterator) NotDone() bool {
788 return iter.page.NotDone() && iter.i < len(iter.page.Values())
789 }
790
791
792 func (iter USQLExternalDataSourceListIterator) Response() USQLExternalDataSourceList {
793 return iter.page.Response()
794 }
795
796
797
798 func (iter USQLExternalDataSourceListIterator) Value() USQLExternalDataSource {
799 if !iter.page.NotDone() {
800 return USQLExternalDataSource{}
801 }
802 return iter.page.Values()[iter.i]
803 }
804
805
806 func NewUSQLExternalDataSourceListIterator(page USQLExternalDataSourceListPage) USQLExternalDataSourceListIterator {
807 return USQLExternalDataSourceListIterator{page: page}
808 }
809
810
811 func (usedsl USQLExternalDataSourceList) IsEmpty() bool {
812 return usedsl.Value == nil || len(*usedsl.Value) == 0
813 }
814
815
816 func (usedsl USQLExternalDataSourceList) hasNextLink() bool {
817 return usedsl.NextLink != nil && len(*usedsl.NextLink) != 0
818 }
819
820
821
822 func (usedsl USQLExternalDataSourceList) uSQLExternalDataSourceListPreparer(ctx context.Context) (*http.Request, error) {
823 if !usedsl.hasNextLink() {
824 return nil, nil
825 }
826 return autorest.Prepare((&http.Request{}).WithContext(ctx),
827 autorest.AsJSON(),
828 autorest.AsGet(),
829 autorest.WithBaseURL(to.String(usedsl.NextLink)))
830 }
831
832
833 type USQLExternalDataSourceListPage struct {
834 fn func(context.Context, USQLExternalDataSourceList) (USQLExternalDataSourceList, error)
835 uedsl USQLExternalDataSourceList
836 }
837
838
839
840 func (page *USQLExternalDataSourceListPage) NextWithContext(ctx context.Context) (err error) {
841 if tracing.IsEnabled() {
842 ctx = tracing.StartSpan(ctx, fqdn+"/USQLExternalDataSourceListPage.NextWithContext")
843 defer func() {
844 sc := -1
845 if page.Response().Response.Response != nil {
846 sc = page.Response().Response.Response.StatusCode
847 }
848 tracing.EndSpan(ctx, sc, err)
849 }()
850 }
851 for {
852 next, err := page.fn(ctx, page.uedsl)
853 if err != nil {
854 return err
855 }
856 page.uedsl = next
857 if !next.hasNextLink() || !next.IsEmpty() {
858 break
859 }
860 }
861 return nil
862 }
863
864
865
866
867 func (page *USQLExternalDataSourceListPage) Next() error {
868 return page.NextWithContext(context.Background())
869 }
870
871
872 func (page USQLExternalDataSourceListPage) NotDone() bool {
873 return !page.uedsl.IsEmpty()
874 }
875
876
877 func (page USQLExternalDataSourceListPage) Response() USQLExternalDataSourceList {
878 return page.uedsl
879 }
880
881
882 func (page USQLExternalDataSourceListPage) Values() []USQLExternalDataSource {
883 if page.uedsl.IsEmpty() {
884 return nil
885 }
886 return *page.uedsl.Value
887 }
888
889
890 func NewUSQLExternalDataSourceListPage(cur USQLExternalDataSourceList, getNextPage func(context.Context, USQLExternalDataSourceList) (USQLExternalDataSourceList, error)) USQLExternalDataSourceListPage {
891 return USQLExternalDataSourceListPage{
892 fn: getNextPage,
893 uedsl: cur,
894 }
895 }
896
897
898 type USQLIndex struct {
899
900 Name *string `json:"name,omitempty"`
901
902 IndexKeys *[]USQLDirectedColumn `json:"indexKeys,omitempty"`
903
904 Columns *[]string `json:"columns,omitempty"`
905
906 DistributionInfo *USQLDistributionInfo `json:"distributionInfo,omitempty"`
907
908 PartitionFunction *uuid.UUID `json:"partitionFunction,omitempty"`
909
910 PartitionKeyList *[]string `json:"partitionKeyList,omitempty"`
911
912 StreamNames *[]string `json:"streamNames,omitempty"`
913
914 IsColumnstore *bool `json:"isColumnstore,omitempty"`
915
916 IndexID *int32 `json:"indexId,omitempty"`
917
918 IsUnique *bool `json:"isUnique,omitempty"`
919 }
920
921
922 type USQLProcedure struct {
923 autorest.Response `json:"-"`
924
925 DatabaseName *string `json:"databaseName,omitempty"`
926
927 SchemaName *string `json:"schemaName,omitempty"`
928
929 Name *string `json:"procName,omitempty"`
930
931 Definition *string `json:"definition,omitempty"`
932
933 ComputeAccountName *string `json:"computeAccountName,omitempty"`
934
935 Version *uuid.UUID `json:"version,omitempty"`
936 }
937
938
939 type USQLProcedureList struct {
940 autorest.Response `json:"-"`
941
942 Value *[]USQLProcedure `json:"value,omitempty"`
943
944 Count *int32 `json:"count,omitempty"`
945
946 NextLink *string `json:"nextLink,omitempty"`
947 }
948
949
950 func (uspl USQLProcedureList) MarshalJSON() ([]byte, error) {
951 objectMap := make(map[string]interface{})
952 if uspl.Count != nil {
953 objectMap["count"] = uspl.Count
954 }
955 if uspl.NextLink != nil {
956 objectMap["nextLink"] = uspl.NextLink
957 }
958 return json.Marshal(objectMap)
959 }
960
961
962 type USQLProcedureListIterator struct {
963 i int
964 page USQLProcedureListPage
965 }
966
967
968
969 func (iter *USQLProcedureListIterator) NextWithContext(ctx context.Context) (err error) {
970 if tracing.IsEnabled() {
971 ctx = tracing.StartSpan(ctx, fqdn+"/USQLProcedureListIterator.NextWithContext")
972 defer func() {
973 sc := -1
974 if iter.Response().Response.Response != nil {
975 sc = iter.Response().Response.Response.StatusCode
976 }
977 tracing.EndSpan(ctx, sc, err)
978 }()
979 }
980 iter.i++
981 if iter.i < len(iter.page.Values()) {
982 return nil
983 }
984 err = iter.page.NextWithContext(ctx)
985 if err != nil {
986 iter.i--
987 return err
988 }
989 iter.i = 0
990 return nil
991 }
992
993
994
995
996 func (iter *USQLProcedureListIterator) Next() error {
997 return iter.NextWithContext(context.Background())
998 }
999
1000
1001 func (iter USQLProcedureListIterator) NotDone() bool {
1002 return iter.page.NotDone() && iter.i < len(iter.page.Values())
1003 }
1004
1005
1006 func (iter USQLProcedureListIterator) Response() USQLProcedureList {
1007 return iter.page.Response()
1008 }
1009
1010
1011
1012 func (iter USQLProcedureListIterator) Value() USQLProcedure {
1013 if !iter.page.NotDone() {
1014 return USQLProcedure{}
1015 }
1016 return iter.page.Values()[iter.i]
1017 }
1018
1019
1020 func NewUSQLProcedureListIterator(page USQLProcedureListPage) USQLProcedureListIterator {
1021 return USQLProcedureListIterator{page: page}
1022 }
1023
1024
1025 func (uspl USQLProcedureList) IsEmpty() bool {
1026 return uspl.Value == nil || len(*uspl.Value) == 0
1027 }
1028
1029
1030 func (uspl USQLProcedureList) hasNextLink() bool {
1031 return uspl.NextLink != nil && len(*uspl.NextLink) != 0
1032 }
1033
1034
1035
1036 func (uspl USQLProcedureList) uSQLProcedureListPreparer(ctx context.Context) (*http.Request, error) {
1037 if !uspl.hasNextLink() {
1038 return nil, nil
1039 }
1040 return autorest.Prepare((&http.Request{}).WithContext(ctx),
1041 autorest.AsJSON(),
1042 autorest.AsGet(),
1043 autorest.WithBaseURL(to.String(uspl.NextLink)))
1044 }
1045
1046
1047 type USQLProcedureListPage struct {
1048 fn func(context.Context, USQLProcedureList) (USQLProcedureList, error)
1049 upl USQLProcedureList
1050 }
1051
1052
1053
1054 func (page *USQLProcedureListPage) NextWithContext(ctx context.Context) (err error) {
1055 if tracing.IsEnabled() {
1056 ctx = tracing.StartSpan(ctx, fqdn+"/USQLProcedureListPage.NextWithContext")
1057 defer func() {
1058 sc := -1
1059 if page.Response().Response.Response != nil {
1060 sc = page.Response().Response.Response.StatusCode
1061 }
1062 tracing.EndSpan(ctx, sc, err)
1063 }()
1064 }
1065 for {
1066 next, err := page.fn(ctx, page.upl)
1067 if err != nil {
1068 return err
1069 }
1070 page.upl = next
1071 if !next.hasNextLink() || !next.IsEmpty() {
1072 break
1073 }
1074 }
1075 return nil
1076 }
1077
1078
1079
1080
1081 func (page *USQLProcedureListPage) Next() error {
1082 return page.NextWithContext(context.Background())
1083 }
1084
1085
1086 func (page USQLProcedureListPage) NotDone() bool {
1087 return !page.upl.IsEmpty()
1088 }
1089
1090
1091 func (page USQLProcedureListPage) Response() USQLProcedureList {
1092 return page.upl
1093 }
1094
1095
1096 func (page USQLProcedureListPage) Values() []USQLProcedure {
1097 if page.upl.IsEmpty() {
1098 return nil
1099 }
1100 return *page.upl.Value
1101 }
1102
1103
1104 func NewUSQLProcedureListPage(cur USQLProcedureList, getNextPage func(context.Context, USQLProcedureList) (USQLProcedureList, error)) USQLProcedureListPage {
1105 return USQLProcedureListPage{
1106 fn: getNextPage,
1107 upl: cur,
1108 }
1109 }
1110
1111
1112 type USQLSchema struct {
1113 autorest.Response `json:"-"`
1114
1115 DatabaseName *string `json:"databaseName,omitempty"`
1116
1117 Name *string `json:"schemaName,omitempty"`
1118
1119 ComputeAccountName *string `json:"computeAccountName,omitempty"`
1120
1121 Version *uuid.UUID `json:"version,omitempty"`
1122 }
1123
1124
1125 type USQLSchemaList struct {
1126 autorest.Response `json:"-"`
1127
1128 Value *[]USQLSchema `json:"value,omitempty"`
1129
1130 Count *int32 `json:"count,omitempty"`
1131
1132 NextLink *string `json:"nextLink,omitempty"`
1133 }
1134
1135
1136 func (ussl USQLSchemaList) MarshalJSON() ([]byte, error) {
1137 objectMap := make(map[string]interface{})
1138 if ussl.Count != nil {
1139 objectMap["count"] = ussl.Count
1140 }
1141 if ussl.NextLink != nil {
1142 objectMap["nextLink"] = ussl.NextLink
1143 }
1144 return json.Marshal(objectMap)
1145 }
1146
1147
1148 type USQLSchemaListIterator struct {
1149 i int
1150 page USQLSchemaListPage
1151 }
1152
1153
1154
1155 func (iter *USQLSchemaListIterator) NextWithContext(ctx context.Context) (err error) {
1156 if tracing.IsEnabled() {
1157 ctx = tracing.StartSpan(ctx, fqdn+"/USQLSchemaListIterator.NextWithContext")
1158 defer func() {
1159 sc := -1
1160 if iter.Response().Response.Response != nil {
1161 sc = iter.Response().Response.Response.StatusCode
1162 }
1163 tracing.EndSpan(ctx, sc, err)
1164 }()
1165 }
1166 iter.i++
1167 if iter.i < len(iter.page.Values()) {
1168 return nil
1169 }
1170 err = iter.page.NextWithContext(ctx)
1171 if err != nil {
1172 iter.i--
1173 return err
1174 }
1175 iter.i = 0
1176 return nil
1177 }
1178
1179
1180
1181
1182 func (iter *USQLSchemaListIterator) Next() error {
1183 return iter.NextWithContext(context.Background())
1184 }
1185
1186
1187 func (iter USQLSchemaListIterator) NotDone() bool {
1188 return iter.page.NotDone() && iter.i < len(iter.page.Values())
1189 }
1190
1191
1192 func (iter USQLSchemaListIterator) Response() USQLSchemaList {
1193 return iter.page.Response()
1194 }
1195
1196
1197
1198 func (iter USQLSchemaListIterator) Value() USQLSchema {
1199 if !iter.page.NotDone() {
1200 return USQLSchema{}
1201 }
1202 return iter.page.Values()[iter.i]
1203 }
1204
1205
1206 func NewUSQLSchemaListIterator(page USQLSchemaListPage) USQLSchemaListIterator {
1207 return USQLSchemaListIterator{page: page}
1208 }
1209
1210
1211 func (ussl USQLSchemaList) IsEmpty() bool {
1212 return ussl.Value == nil || len(*ussl.Value) == 0
1213 }
1214
1215
1216 func (ussl USQLSchemaList) hasNextLink() bool {
1217 return ussl.NextLink != nil && len(*ussl.NextLink) != 0
1218 }
1219
1220
1221
1222 func (ussl USQLSchemaList) uSQLSchemaListPreparer(ctx context.Context) (*http.Request, error) {
1223 if !ussl.hasNextLink() {
1224 return nil, nil
1225 }
1226 return autorest.Prepare((&http.Request{}).WithContext(ctx),
1227 autorest.AsJSON(),
1228 autorest.AsGet(),
1229 autorest.WithBaseURL(to.String(ussl.NextLink)))
1230 }
1231
1232
1233 type USQLSchemaListPage struct {
1234 fn func(context.Context, USQLSchemaList) (USQLSchemaList, error)
1235 usl USQLSchemaList
1236 }
1237
1238
1239
1240 func (page *USQLSchemaListPage) NextWithContext(ctx context.Context) (err error) {
1241 if tracing.IsEnabled() {
1242 ctx = tracing.StartSpan(ctx, fqdn+"/USQLSchemaListPage.NextWithContext")
1243 defer func() {
1244 sc := -1
1245 if page.Response().Response.Response != nil {
1246 sc = page.Response().Response.Response.StatusCode
1247 }
1248 tracing.EndSpan(ctx, sc, err)
1249 }()
1250 }
1251 for {
1252 next, err := page.fn(ctx, page.usl)
1253 if err != nil {
1254 return err
1255 }
1256 page.usl = next
1257 if !next.hasNextLink() || !next.IsEmpty() {
1258 break
1259 }
1260 }
1261 return nil
1262 }
1263
1264
1265
1266
1267 func (page *USQLSchemaListPage) Next() error {
1268 return page.NextWithContext(context.Background())
1269 }
1270
1271
1272 func (page USQLSchemaListPage) NotDone() bool {
1273 return !page.usl.IsEmpty()
1274 }
1275
1276
1277 func (page USQLSchemaListPage) Response() USQLSchemaList {
1278 return page.usl
1279 }
1280
1281
1282 func (page USQLSchemaListPage) Values() []USQLSchema {
1283 if page.usl.IsEmpty() {
1284 return nil
1285 }
1286 return *page.usl.Value
1287 }
1288
1289
1290 func NewUSQLSchemaListPage(cur USQLSchemaList, getNextPage func(context.Context, USQLSchemaList) (USQLSchemaList, error)) USQLSchemaListPage {
1291 return USQLSchemaListPage{
1292 fn: getNextPage,
1293 usl: cur,
1294 }
1295 }
1296
1297
1298 type USQLSecret struct {
1299 autorest.Response `json:"-"`
1300
1301 DatabaseName *string `json:"databaseName,omitempty"`
1302
1303 Name *string `json:"secretName,omitempty"`
1304
1305 CreationTime *date.Time `json:"creationTime,omitempty"`
1306
1307 URI *string `json:"uri,omitempty"`
1308
1309 Password *string `json:"password,omitempty"`
1310
1311 ComputeAccountName *string `json:"computeAccountName,omitempty"`
1312
1313 Version *uuid.UUID `json:"version,omitempty"`
1314 }
1315
1316
1317 type USQLTable struct {
1318 autorest.Response `json:"-"`
1319
1320 DatabaseName *string `json:"databaseName,omitempty"`
1321
1322 SchemaName *string `json:"schemaName,omitempty"`
1323
1324 Name *string `json:"tableName,omitempty"`
1325
1326 ColumnList *[]USQLTableColumn `json:"columnList,omitempty"`
1327
1328 IndexList *[]USQLIndex `json:"indexList,omitempty"`
1329
1330 PartitionKeyList *[]string `json:"partitionKeyList,omitempty"`
1331
1332 ExternalTable *ExternalTable `json:"externalTable,omitempty"`
1333
1334 DistributionInfo *USQLDistributionInfo `json:"distributionInfo,omitempty"`
1335
1336 ComputeAccountName *string `json:"computeAccountName,omitempty"`
1337
1338 Version *uuid.UUID `json:"version,omitempty"`
1339 }
1340
1341
1342 type USQLTableColumn struct {
1343
1344 Name *string `json:"name,omitempty"`
1345
1346 Type *string `json:"type,omitempty"`
1347 }
1348
1349
1350 type USQLTableList struct {
1351 autorest.Response `json:"-"`
1352
1353 Value *[]USQLTable `json:"value,omitempty"`
1354
1355 Count *int32 `json:"count,omitempty"`
1356
1357 NextLink *string `json:"nextLink,omitempty"`
1358 }
1359
1360
1361 func (ustl USQLTableList) MarshalJSON() ([]byte, error) {
1362 objectMap := make(map[string]interface{})
1363 if ustl.Count != nil {
1364 objectMap["count"] = ustl.Count
1365 }
1366 if ustl.NextLink != nil {
1367 objectMap["nextLink"] = ustl.NextLink
1368 }
1369 return json.Marshal(objectMap)
1370 }
1371
1372
1373 type USQLTableListIterator struct {
1374 i int
1375 page USQLTableListPage
1376 }
1377
1378
1379
1380 func (iter *USQLTableListIterator) NextWithContext(ctx context.Context) (err error) {
1381 if tracing.IsEnabled() {
1382 ctx = tracing.StartSpan(ctx, fqdn+"/USQLTableListIterator.NextWithContext")
1383 defer func() {
1384 sc := -1
1385 if iter.Response().Response.Response != nil {
1386 sc = iter.Response().Response.Response.StatusCode
1387 }
1388 tracing.EndSpan(ctx, sc, err)
1389 }()
1390 }
1391 iter.i++
1392 if iter.i < len(iter.page.Values()) {
1393 return nil
1394 }
1395 err = iter.page.NextWithContext(ctx)
1396 if err != nil {
1397 iter.i--
1398 return err
1399 }
1400 iter.i = 0
1401 return nil
1402 }
1403
1404
1405
1406
1407 func (iter *USQLTableListIterator) Next() error {
1408 return iter.NextWithContext(context.Background())
1409 }
1410
1411
1412 func (iter USQLTableListIterator) NotDone() bool {
1413 return iter.page.NotDone() && iter.i < len(iter.page.Values())
1414 }
1415
1416
1417 func (iter USQLTableListIterator) Response() USQLTableList {
1418 return iter.page.Response()
1419 }
1420
1421
1422
1423 func (iter USQLTableListIterator) Value() USQLTable {
1424 if !iter.page.NotDone() {
1425 return USQLTable{}
1426 }
1427 return iter.page.Values()[iter.i]
1428 }
1429
1430
1431 func NewUSQLTableListIterator(page USQLTableListPage) USQLTableListIterator {
1432 return USQLTableListIterator{page: page}
1433 }
1434
1435
1436 func (ustl USQLTableList) IsEmpty() bool {
1437 return ustl.Value == nil || len(*ustl.Value) == 0
1438 }
1439
1440
1441 func (ustl USQLTableList) hasNextLink() bool {
1442 return ustl.NextLink != nil && len(*ustl.NextLink) != 0
1443 }
1444
1445
1446
1447 func (ustl USQLTableList) uSQLTableListPreparer(ctx context.Context) (*http.Request, error) {
1448 if !ustl.hasNextLink() {
1449 return nil, nil
1450 }
1451 return autorest.Prepare((&http.Request{}).WithContext(ctx),
1452 autorest.AsJSON(),
1453 autorest.AsGet(),
1454 autorest.WithBaseURL(to.String(ustl.NextLink)))
1455 }
1456
1457
1458 type USQLTableListPage struct {
1459 fn func(context.Context, USQLTableList) (USQLTableList, error)
1460 utl USQLTableList
1461 }
1462
1463
1464
1465 func (page *USQLTableListPage) NextWithContext(ctx context.Context) (err error) {
1466 if tracing.IsEnabled() {
1467 ctx = tracing.StartSpan(ctx, fqdn+"/USQLTableListPage.NextWithContext")
1468 defer func() {
1469 sc := -1
1470 if page.Response().Response.Response != nil {
1471 sc = page.Response().Response.Response.StatusCode
1472 }
1473 tracing.EndSpan(ctx, sc, err)
1474 }()
1475 }
1476 for {
1477 next, err := page.fn(ctx, page.utl)
1478 if err != nil {
1479 return err
1480 }
1481 page.utl = next
1482 if !next.hasNextLink() || !next.IsEmpty() {
1483 break
1484 }
1485 }
1486 return nil
1487 }
1488
1489
1490
1491
1492 func (page *USQLTableListPage) Next() error {
1493 return page.NextWithContext(context.Background())
1494 }
1495
1496
1497 func (page USQLTableListPage) NotDone() bool {
1498 return !page.utl.IsEmpty()
1499 }
1500
1501
1502 func (page USQLTableListPage) Response() USQLTableList {
1503 return page.utl
1504 }
1505
1506
1507 func (page USQLTableListPage) Values() []USQLTable {
1508 if page.utl.IsEmpty() {
1509 return nil
1510 }
1511 return *page.utl.Value
1512 }
1513
1514
1515 func NewUSQLTableListPage(cur USQLTableList, getNextPage func(context.Context, USQLTableList) (USQLTableList, error)) USQLTableListPage {
1516 return USQLTableListPage{
1517 fn: getNextPage,
1518 utl: cur,
1519 }
1520 }
1521
1522
1523 type USQLTablePartition struct {
1524 autorest.Response `json:"-"`
1525
1526 DatabaseName *string `json:"databaseName,omitempty"`
1527
1528 SchemaName *string `json:"schemaName,omitempty"`
1529
1530 Name *string `json:"partitionName,omitempty"`
1531
1532 ParentName *DdlName `json:"parentName,omitempty"`
1533
1534 IndexID *int32 `json:"indexId,omitempty"`
1535
1536 Label *[]string `json:"label,omitempty"`
1537
1538 CreateDate *date.Time `json:"createDate,omitempty"`
1539
1540 ComputeAccountName *string `json:"computeAccountName,omitempty"`
1541
1542 Version *uuid.UUID `json:"version,omitempty"`
1543 }
1544
1545
1546 type USQLTablePartitionList struct {
1547 autorest.Response `json:"-"`
1548
1549 Value *[]USQLTablePartition `json:"value,omitempty"`
1550
1551 Count *int32 `json:"count,omitempty"`
1552
1553 NextLink *string `json:"nextLink,omitempty"`
1554 }
1555
1556
1557 func (ustpl USQLTablePartitionList) MarshalJSON() ([]byte, error) {
1558 objectMap := make(map[string]interface{})
1559 if ustpl.Count != nil {
1560 objectMap["count"] = ustpl.Count
1561 }
1562 if ustpl.NextLink != nil {
1563 objectMap["nextLink"] = ustpl.NextLink
1564 }
1565 return json.Marshal(objectMap)
1566 }
1567
1568
1569 type USQLTablePartitionListIterator struct {
1570 i int
1571 page USQLTablePartitionListPage
1572 }
1573
1574
1575
1576 func (iter *USQLTablePartitionListIterator) NextWithContext(ctx context.Context) (err error) {
1577 if tracing.IsEnabled() {
1578 ctx = tracing.StartSpan(ctx, fqdn+"/USQLTablePartitionListIterator.NextWithContext")
1579 defer func() {
1580 sc := -1
1581 if iter.Response().Response.Response != nil {
1582 sc = iter.Response().Response.Response.StatusCode
1583 }
1584 tracing.EndSpan(ctx, sc, err)
1585 }()
1586 }
1587 iter.i++
1588 if iter.i < len(iter.page.Values()) {
1589 return nil
1590 }
1591 err = iter.page.NextWithContext(ctx)
1592 if err != nil {
1593 iter.i--
1594 return err
1595 }
1596 iter.i = 0
1597 return nil
1598 }
1599
1600
1601
1602
1603 func (iter *USQLTablePartitionListIterator) Next() error {
1604 return iter.NextWithContext(context.Background())
1605 }
1606
1607
1608 func (iter USQLTablePartitionListIterator) NotDone() bool {
1609 return iter.page.NotDone() && iter.i < len(iter.page.Values())
1610 }
1611
1612
1613 func (iter USQLTablePartitionListIterator) Response() USQLTablePartitionList {
1614 return iter.page.Response()
1615 }
1616
1617
1618
1619 func (iter USQLTablePartitionListIterator) Value() USQLTablePartition {
1620 if !iter.page.NotDone() {
1621 return USQLTablePartition{}
1622 }
1623 return iter.page.Values()[iter.i]
1624 }
1625
1626
1627 func NewUSQLTablePartitionListIterator(page USQLTablePartitionListPage) USQLTablePartitionListIterator {
1628 return USQLTablePartitionListIterator{page: page}
1629 }
1630
1631
1632 func (ustpl USQLTablePartitionList) IsEmpty() bool {
1633 return ustpl.Value == nil || len(*ustpl.Value) == 0
1634 }
1635
1636
1637 func (ustpl USQLTablePartitionList) hasNextLink() bool {
1638 return ustpl.NextLink != nil && len(*ustpl.NextLink) != 0
1639 }
1640
1641
1642
1643 func (ustpl USQLTablePartitionList) uSQLTablePartitionListPreparer(ctx context.Context) (*http.Request, error) {
1644 if !ustpl.hasNextLink() {
1645 return nil, nil
1646 }
1647 return autorest.Prepare((&http.Request{}).WithContext(ctx),
1648 autorest.AsJSON(),
1649 autorest.AsGet(),
1650 autorest.WithBaseURL(to.String(ustpl.NextLink)))
1651 }
1652
1653
1654 type USQLTablePartitionListPage struct {
1655 fn func(context.Context, USQLTablePartitionList) (USQLTablePartitionList, error)
1656 utpl USQLTablePartitionList
1657 }
1658
1659
1660
1661 func (page *USQLTablePartitionListPage) NextWithContext(ctx context.Context) (err error) {
1662 if tracing.IsEnabled() {
1663 ctx = tracing.StartSpan(ctx, fqdn+"/USQLTablePartitionListPage.NextWithContext")
1664 defer func() {
1665 sc := -1
1666 if page.Response().Response.Response != nil {
1667 sc = page.Response().Response.Response.StatusCode
1668 }
1669 tracing.EndSpan(ctx, sc, err)
1670 }()
1671 }
1672 for {
1673 next, err := page.fn(ctx, page.utpl)
1674 if err != nil {
1675 return err
1676 }
1677 page.utpl = next
1678 if !next.hasNextLink() || !next.IsEmpty() {
1679 break
1680 }
1681 }
1682 return nil
1683 }
1684
1685
1686
1687
1688 func (page *USQLTablePartitionListPage) Next() error {
1689 return page.NextWithContext(context.Background())
1690 }
1691
1692
1693 func (page USQLTablePartitionListPage) NotDone() bool {
1694 return !page.utpl.IsEmpty()
1695 }
1696
1697
1698 func (page USQLTablePartitionListPage) Response() USQLTablePartitionList {
1699 return page.utpl
1700 }
1701
1702
1703 func (page USQLTablePartitionListPage) Values() []USQLTablePartition {
1704 if page.utpl.IsEmpty() {
1705 return nil
1706 }
1707 return *page.utpl.Value
1708 }
1709
1710
1711 func NewUSQLTablePartitionListPage(cur USQLTablePartitionList, getNextPage func(context.Context, USQLTablePartitionList) (USQLTablePartitionList, error)) USQLTablePartitionListPage {
1712 return USQLTablePartitionListPage{
1713 fn: getNextPage,
1714 utpl: cur,
1715 }
1716 }
1717
1718
1719 type USQLTableStatistics struct {
1720 autorest.Response `json:"-"`
1721
1722 DatabaseName *string `json:"databaseName,omitempty"`
1723
1724 SchemaName *string `json:"schemaName,omitempty"`
1725
1726 TableName *string `json:"tableName,omitempty"`
1727
1728 Name *string `json:"statisticsName,omitempty"`
1729
1730 UserStatName *string `json:"userStatName,omitempty"`
1731
1732 StatDataPath *string `json:"statDataPath,omitempty"`
1733
1734 CreateTime *date.Time `json:"createTime,omitempty"`
1735
1736 UpdateTime *date.Time `json:"updateTime,omitempty"`
1737
1738 IsUserCreated *bool `json:"isUserCreated,omitempty"`
1739
1740 IsAutoCreated *bool `json:"isAutoCreated,omitempty"`
1741
1742 HasFilter *bool `json:"hasFilter,omitempty"`
1743
1744 FilterDefinition *string `json:"filterDefinition,omitempty"`
1745
1746 ColNames *[]string `json:"colNames,omitempty"`
1747
1748 ComputeAccountName *string `json:"computeAccountName,omitempty"`
1749
1750 Version *uuid.UUID `json:"version,omitempty"`
1751 }
1752
1753
1754 type USQLTableStatisticsList struct {
1755 autorest.Response `json:"-"`
1756
1757 Value *[]USQLTableStatistics `json:"value,omitempty"`
1758
1759 Count *int32 `json:"count,omitempty"`
1760
1761 NextLink *string `json:"nextLink,omitempty"`
1762 }
1763
1764
1765 func (ustsl USQLTableStatisticsList) MarshalJSON() ([]byte, error) {
1766 objectMap := make(map[string]interface{})
1767 if ustsl.Count != nil {
1768 objectMap["count"] = ustsl.Count
1769 }
1770 if ustsl.NextLink != nil {
1771 objectMap["nextLink"] = ustsl.NextLink
1772 }
1773 return json.Marshal(objectMap)
1774 }
1775
1776
1777 type USQLTableStatisticsListIterator struct {
1778 i int
1779 page USQLTableStatisticsListPage
1780 }
1781
1782
1783
1784 func (iter *USQLTableStatisticsListIterator) NextWithContext(ctx context.Context) (err error) {
1785 if tracing.IsEnabled() {
1786 ctx = tracing.StartSpan(ctx, fqdn+"/USQLTableStatisticsListIterator.NextWithContext")
1787 defer func() {
1788 sc := -1
1789 if iter.Response().Response.Response != nil {
1790 sc = iter.Response().Response.Response.StatusCode
1791 }
1792 tracing.EndSpan(ctx, sc, err)
1793 }()
1794 }
1795 iter.i++
1796 if iter.i < len(iter.page.Values()) {
1797 return nil
1798 }
1799 err = iter.page.NextWithContext(ctx)
1800 if err != nil {
1801 iter.i--
1802 return err
1803 }
1804 iter.i = 0
1805 return nil
1806 }
1807
1808
1809
1810
1811 func (iter *USQLTableStatisticsListIterator) Next() error {
1812 return iter.NextWithContext(context.Background())
1813 }
1814
1815
1816 func (iter USQLTableStatisticsListIterator) NotDone() bool {
1817 return iter.page.NotDone() && iter.i < len(iter.page.Values())
1818 }
1819
1820
1821 func (iter USQLTableStatisticsListIterator) Response() USQLTableStatisticsList {
1822 return iter.page.Response()
1823 }
1824
1825
1826
1827 func (iter USQLTableStatisticsListIterator) Value() USQLTableStatistics {
1828 if !iter.page.NotDone() {
1829 return USQLTableStatistics{}
1830 }
1831 return iter.page.Values()[iter.i]
1832 }
1833
1834
1835 func NewUSQLTableStatisticsListIterator(page USQLTableStatisticsListPage) USQLTableStatisticsListIterator {
1836 return USQLTableStatisticsListIterator{page: page}
1837 }
1838
1839
1840 func (ustsl USQLTableStatisticsList) IsEmpty() bool {
1841 return ustsl.Value == nil || len(*ustsl.Value) == 0
1842 }
1843
1844
1845 func (ustsl USQLTableStatisticsList) hasNextLink() bool {
1846 return ustsl.NextLink != nil && len(*ustsl.NextLink) != 0
1847 }
1848
1849
1850
1851 func (ustsl USQLTableStatisticsList) uSQLTableStatisticsListPreparer(ctx context.Context) (*http.Request, error) {
1852 if !ustsl.hasNextLink() {
1853 return nil, nil
1854 }
1855 return autorest.Prepare((&http.Request{}).WithContext(ctx),
1856 autorest.AsJSON(),
1857 autorest.AsGet(),
1858 autorest.WithBaseURL(to.String(ustsl.NextLink)))
1859 }
1860
1861
1862 type USQLTableStatisticsListPage struct {
1863 fn func(context.Context, USQLTableStatisticsList) (USQLTableStatisticsList, error)
1864 utsl USQLTableStatisticsList
1865 }
1866
1867
1868
1869 func (page *USQLTableStatisticsListPage) NextWithContext(ctx context.Context) (err error) {
1870 if tracing.IsEnabled() {
1871 ctx = tracing.StartSpan(ctx, fqdn+"/USQLTableStatisticsListPage.NextWithContext")
1872 defer func() {
1873 sc := -1
1874 if page.Response().Response.Response != nil {
1875 sc = page.Response().Response.Response.StatusCode
1876 }
1877 tracing.EndSpan(ctx, sc, err)
1878 }()
1879 }
1880 for {
1881 next, err := page.fn(ctx, page.utsl)
1882 if err != nil {
1883 return err
1884 }
1885 page.utsl = next
1886 if !next.hasNextLink() || !next.IsEmpty() {
1887 break
1888 }
1889 }
1890 return nil
1891 }
1892
1893
1894
1895
1896 func (page *USQLTableStatisticsListPage) Next() error {
1897 return page.NextWithContext(context.Background())
1898 }
1899
1900
1901 func (page USQLTableStatisticsListPage) NotDone() bool {
1902 return !page.utsl.IsEmpty()
1903 }
1904
1905
1906 func (page USQLTableStatisticsListPage) Response() USQLTableStatisticsList {
1907 return page.utsl
1908 }
1909
1910
1911 func (page USQLTableStatisticsListPage) Values() []USQLTableStatistics {
1912 if page.utsl.IsEmpty() {
1913 return nil
1914 }
1915 return *page.utsl.Value
1916 }
1917
1918
1919 func NewUSQLTableStatisticsListPage(cur USQLTableStatisticsList, getNextPage func(context.Context, USQLTableStatisticsList) (USQLTableStatisticsList, error)) USQLTableStatisticsListPage {
1920 return USQLTableStatisticsListPage{
1921 fn: getNextPage,
1922 utsl: cur,
1923 }
1924 }
1925
1926
1927 type USQLTableType struct {
1928 autorest.Response `json:"-"`
1929
1930 Columns *[]TypeFieldInfo `json:"columns,omitempty"`
1931
1932 DatabaseName *string `json:"databaseName,omitempty"`
1933
1934 SchemaName *string `json:"schemaName,omitempty"`
1935
1936 Name *string `json:"typeName,omitempty"`
1937
1938 TypeFamily *string `json:"typeFamily,omitempty"`
1939
1940 CSharpName *string `json:"cSharpName,omitempty"`
1941
1942 FullCSharpName *string `json:"fullCSharpName,omitempty"`
1943
1944 SystemTypeID *int32 `json:"systemTypeId,omitempty"`
1945
1946 UserTypeID *int32 `json:"userTypeId,omitempty"`
1947
1948 SchemaID *int32 `json:"schemaId,omitempty"`
1949
1950 PrincipalID *int32 `json:"principalId,omitempty"`
1951
1952 IsNullable *bool `json:"isNullable,omitempty"`
1953
1954 IsUserDefined *bool `json:"isUserDefined,omitempty"`
1955
1956 IsAssemblyType *bool `json:"isAssemblyType,omitempty"`
1957
1958 IsTableType *bool `json:"isTableType,omitempty"`
1959
1960 IsComplexType *bool `json:"isComplexType,omitempty"`
1961
1962 ComputeAccountName *string `json:"computeAccountName,omitempty"`
1963
1964 Version *uuid.UUID `json:"version,omitempty"`
1965 }
1966
1967
1968 func (ustt USQLTableType) MarshalJSON() ([]byte, error) {
1969 objectMap := make(map[string]interface{})
1970 if ustt.DatabaseName != nil {
1971 objectMap["databaseName"] = ustt.DatabaseName
1972 }
1973 if ustt.SchemaName != nil {
1974 objectMap["schemaName"] = ustt.SchemaName
1975 }
1976 if ustt.Name != nil {
1977 objectMap["typeName"] = ustt.Name
1978 }
1979 if ustt.TypeFamily != nil {
1980 objectMap["typeFamily"] = ustt.TypeFamily
1981 }
1982 if ustt.CSharpName != nil {
1983 objectMap["cSharpName"] = ustt.CSharpName
1984 }
1985 if ustt.FullCSharpName != nil {
1986 objectMap["fullCSharpName"] = ustt.FullCSharpName
1987 }
1988 if ustt.SystemTypeID != nil {
1989 objectMap["systemTypeId"] = ustt.SystemTypeID
1990 }
1991 if ustt.UserTypeID != nil {
1992 objectMap["userTypeId"] = ustt.UserTypeID
1993 }
1994 if ustt.SchemaID != nil {
1995 objectMap["schemaId"] = ustt.SchemaID
1996 }
1997 if ustt.PrincipalID != nil {
1998 objectMap["principalId"] = ustt.PrincipalID
1999 }
2000 if ustt.IsNullable != nil {
2001 objectMap["isNullable"] = ustt.IsNullable
2002 }
2003 if ustt.IsUserDefined != nil {
2004 objectMap["isUserDefined"] = ustt.IsUserDefined
2005 }
2006 if ustt.IsAssemblyType != nil {
2007 objectMap["isAssemblyType"] = ustt.IsAssemblyType
2008 }
2009 if ustt.IsTableType != nil {
2010 objectMap["isTableType"] = ustt.IsTableType
2011 }
2012 if ustt.IsComplexType != nil {
2013 objectMap["isComplexType"] = ustt.IsComplexType
2014 }
2015 if ustt.ComputeAccountName != nil {
2016 objectMap["computeAccountName"] = ustt.ComputeAccountName
2017 }
2018 if ustt.Version != nil {
2019 objectMap["version"] = ustt.Version
2020 }
2021 return json.Marshal(objectMap)
2022 }
2023
2024
2025 type USQLTableTypeList struct {
2026 autorest.Response `json:"-"`
2027
2028 Value *[]USQLTableType `json:"value,omitempty"`
2029
2030 Count *int32 `json:"count,omitempty"`
2031
2032 NextLink *string `json:"nextLink,omitempty"`
2033 }
2034
2035
2036 func (usttl USQLTableTypeList) MarshalJSON() ([]byte, error) {
2037 objectMap := make(map[string]interface{})
2038 if usttl.Count != nil {
2039 objectMap["count"] = usttl.Count
2040 }
2041 if usttl.NextLink != nil {
2042 objectMap["nextLink"] = usttl.NextLink
2043 }
2044 return json.Marshal(objectMap)
2045 }
2046
2047
2048 type USQLTableTypeListIterator struct {
2049 i int
2050 page USQLTableTypeListPage
2051 }
2052
2053
2054
2055 func (iter *USQLTableTypeListIterator) NextWithContext(ctx context.Context) (err error) {
2056 if tracing.IsEnabled() {
2057 ctx = tracing.StartSpan(ctx, fqdn+"/USQLTableTypeListIterator.NextWithContext")
2058 defer func() {
2059 sc := -1
2060 if iter.Response().Response.Response != nil {
2061 sc = iter.Response().Response.Response.StatusCode
2062 }
2063 tracing.EndSpan(ctx, sc, err)
2064 }()
2065 }
2066 iter.i++
2067 if iter.i < len(iter.page.Values()) {
2068 return nil
2069 }
2070 err = iter.page.NextWithContext(ctx)
2071 if err != nil {
2072 iter.i--
2073 return err
2074 }
2075 iter.i = 0
2076 return nil
2077 }
2078
2079
2080
2081
2082 func (iter *USQLTableTypeListIterator) Next() error {
2083 return iter.NextWithContext(context.Background())
2084 }
2085
2086
2087 func (iter USQLTableTypeListIterator) NotDone() bool {
2088 return iter.page.NotDone() && iter.i < len(iter.page.Values())
2089 }
2090
2091
2092 func (iter USQLTableTypeListIterator) Response() USQLTableTypeList {
2093 return iter.page.Response()
2094 }
2095
2096
2097
2098 func (iter USQLTableTypeListIterator) Value() USQLTableType {
2099 if !iter.page.NotDone() {
2100 return USQLTableType{}
2101 }
2102 return iter.page.Values()[iter.i]
2103 }
2104
2105
2106 func NewUSQLTableTypeListIterator(page USQLTableTypeListPage) USQLTableTypeListIterator {
2107 return USQLTableTypeListIterator{page: page}
2108 }
2109
2110
2111 func (usttl USQLTableTypeList) IsEmpty() bool {
2112 return usttl.Value == nil || len(*usttl.Value) == 0
2113 }
2114
2115
2116 func (usttl USQLTableTypeList) hasNextLink() bool {
2117 return usttl.NextLink != nil && len(*usttl.NextLink) != 0
2118 }
2119
2120
2121
2122 func (usttl USQLTableTypeList) uSQLTableTypeListPreparer(ctx context.Context) (*http.Request, error) {
2123 if !usttl.hasNextLink() {
2124 return nil, nil
2125 }
2126 return autorest.Prepare((&http.Request{}).WithContext(ctx),
2127 autorest.AsJSON(),
2128 autorest.AsGet(),
2129 autorest.WithBaseURL(to.String(usttl.NextLink)))
2130 }
2131
2132
2133 type USQLTableTypeListPage struct {
2134 fn func(context.Context, USQLTableTypeList) (USQLTableTypeList, error)
2135 uttl USQLTableTypeList
2136 }
2137
2138
2139
2140 func (page *USQLTableTypeListPage) NextWithContext(ctx context.Context) (err error) {
2141 if tracing.IsEnabled() {
2142 ctx = tracing.StartSpan(ctx, fqdn+"/USQLTableTypeListPage.NextWithContext")
2143 defer func() {
2144 sc := -1
2145 if page.Response().Response.Response != nil {
2146 sc = page.Response().Response.Response.StatusCode
2147 }
2148 tracing.EndSpan(ctx, sc, err)
2149 }()
2150 }
2151 for {
2152 next, err := page.fn(ctx, page.uttl)
2153 if err != nil {
2154 return err
2155 }
2156 page.uttl = next
2157 if !next.hasNextLink() || !next.IsEmpty() {
2158 break
2159 }
2160 }
2161 return nil
2162 }
2163
2164
2165
2166
2167 func (page *USQLTableTypeListPage) Next() error {
2168 return page.NextWithContext(context.Background())
2169 }
2170
2171
2172 func (page USQLTableTypeListPage) NotDone() bool {
2173 return !page.uttl.IsEmpty()
2174 }
2175
2176
2177 func (page USQLTableTypeListPage) Response() USQLTableTypeList {
2178 return page.uttl
2179 }
2180
2181
2182 func (page USQLTableTypeListPage) Values() []USQLTableType {
2183 if page.uttl.IsEmpty() {
2184 return nil
2185 }
2186 return *page.uttl.Value
2187 }
2188
2189
2190 func NewUSQLTableTypeListPage(cur USQLTableTypeList, getNextPage func(context.Context, USQLTableTypeList) (USQLTableTypeList, error)) USQLTableTypeListPage {
2191 return USQLTableTypeListPage{
2192 fn: getNextPage,
2193 uttl: cur,
2194 }
2195 }
2196
2197
2198 type USQLTableValuedFunction struct {
2199 autorest.Response `json:"-"`
2200
2201 DatabaseName *string `json:"databaseName,omitempty"`
2202
2203 SchemaName *string `json:"schemaName,omitempty"`
2204
2205 Name *string `json:"tvfName,omitempty"`
2206
2207 Definition *string `json:"definition,omitempty"`
2208
2209 ComputeAccountName *string `json:"computeAccountName,omitempty"`
2210
2211 Version *uuid.UUID `json:"version,omitempty"`
2212 }
2213
2214
2215 type USQLTableValuedFunctionList struct {
2216 autorest.Response `json:"-"`
2217
2218 Value *[]USQLTableValuedFunction `json:"value,omitempty"`
2219
2220 Count *int32 `json:"count,omitempty"`
2221
2222 NextLink *string `json:"nextLink,omitempty"`
2223 }
2224
2225
2226 func (ustvfl USQLTableValuedFunctionList) MarshalJSON() ([]byte, error) {
2227 objectMap := make(map[string]interface{})
2228 if ustvfl.Count != nil {
2229 objectMap["count"] = ustvfl.Count
2230 }
2231 if ustvfl.NextLink != nil {
2232 objectMap["nextLink"] = ustvfl.NextLink
2233 }
2234 return json.Marshal(objectMap)
2235 }
2236
2237
2238
2239 type USQLTableValuedFunctionListIterator struct {
2240 i int
2241 page USQLTableValuedFunctionListPage
2242 }
2243
2244
2245
2246 func (iter *USQLTableValuedFunctionListIterator) NextWithContext(ctx context.Context) (err error) {
2247 if tracing.IsEnabled() {
2248 ctx = tracing.StartSpan(ctx, fqdn+"/USQLTableValuedFunctionListIterator.NextWithContext")
2249 defer func() {
2250 sc := -1
2251 if iter.Response().Response.Response != nil {
2252 sc = iter.Response().Response.Response.StatusCode
2253 }
2254 tracing.EndSpan(ctx, sc, err)
2255 }()
2256 }
2257 iter.i++
2258 if iter.i < len(iter.page.Values()) {
2259 return nil
2260 }
2261 err = iter.page.NextWithContext(ctx)
2262 if err != nil {
2263 iter.i--
2264 return err
2265 }
2266 iter.i = 0
2267 return nil
2268 }
2269
2270
2271
2272
2273 func (iter *USQLTableValuedFunctionListIterator) Next() error {
2274 return iter.NextWithContext(context.Background())
2275 }
2276
2277
2278 func (iter USQLTableValuedFunctionListIterator) NotDone() bool {
2279 return iter.page.NotDone() && iter.i < len(iter.page.Values())
2280 }
2281
2282
2283 func (iter USQLTableValuedFunctionListIterator) Response() USQLTableValuedFunctionList {
2284 return iter.page.Response()
2285 }
2286
2287
2288
2289 func (iter USQLTableValuedFunctionListIterator) Value() USQLTableValuedFunction {
2290 if !iter.page.NotDone() {
2291 return USQLTableValuedFunction{}
2292 }
2293 return iter.page.Values()[iter.i]
2294 }
2295
2296
2297 func NewUSQLTableValuedFunctionListIterator(page USQLTableValuedFunctionListPage) USQLTableValuedFunctionListIterator {
2298 return USQLTableValuedFunctionListIterator{page: page}
2299 }
2300
2301
2302 func (ustvfl USQLTableValuedFunctionList) IsEmpty() bool {
2303 return ustvfl.Value == nil || len(*ustvfl.Value) == 0
2304 }
2305
2306
2307 func (ustvfl USQLTableValuedFunctionList) hasNextLink() bool {
2308 return ustvfl.NextLink != nil && len(*ustvfl.NextLink) != 0
2309 }
2310
2311
2312
2313 func (ustvfl USQLTableValuedFunctionList) uSQLTableValuedFunctionListPreparer(ctx context.Context) (*http.Request, error) {
2314 if !ustvfl.hasNextLink() {
2315 return nil, nil
2316 }
2317 return autorest.Prepare((&http.Request{}).WithContext(ctx),
2318 autorest.AsJSON(),
2319 autorest.AsGet(),
2320 autorest.WithBaseURL(to.String(ustvfl.NextLink)))
2321 }
2322
2323
2324 type USQLTableValuedFunctionListPage struct {
2325 fn func(context.Context, USQLTableValuedFunctionList) (USQLTableValuedFunctionList, error)
2326 utvfl USQLTableValuedFunctionList
2327 }
2328
2329
2330
2331 func (page *USQLTableValuedFunctionListPage) NextWithContext(ctx context.Context) (err error) {
2332 if tracing.IsEnabled() {
2333 ctx = tracing.StartSpan(ctx, fqdn+"/USQLTableValuedFunctionListPage.NextWithContext")
2334 defer func() {
2335 sc := -1
2336 if page.Response().Response.Response != nil {
2337 sc = page.Response().Response.Response.StatusCode
2338 }
2339 tracing.EndSpan(ctx, sc, err)
2340 }()
2341 }
2342 for {
2343 next, err := page.fn(ctx, page.utvfl)
2344 if err != nil {
2345 return err
2346 }
2347 page.utvfl = next
2348 if !next.hasNextLink() || !next.IsEmpty() {
2349 break
2350 }
2351 }
2352 return nil
2353 }
2354
2355
2356
2357
2358 func (page *USQLTableValuedFunctionListPage) Next() error {
2359 return page.NextWithContext(context.Background())
2360 }
2361
2362
2363 func (page USQLTableValuedFunctionListPage) NotDone() bool {
2364 return !page.utvfl.IsEmpty()
2365 }
2366
2367
2368 func (page USQLTableValuedFunctionListPage) Response() USQLTableValuedFunctionList {
2369 return page.utvfl
2370 }
2371
2372
2373 func (page USQLTableValuedFunctionListPage) Values() []USQLTableValuedFunction {
2374 if page.utvfl.IsEmpty() {
2375 return nil
2376 }
2377 return *page.utvfl.Value
2378 }
2379
2380
2381 func NewUSQLTableValuedFunctionListPage(cur USQLTableValuedFunctionList, getNextPage func(context.Context, USQLTableValuedFunctionList) (USQLTableValuedFunctionList, error)) USQLTableValuedFunctionListPage {
2382 return USQLTableValuedFunctionListPage{
2383 fn: getNextPage,
2384 utvfl: cur,
2385 }
2386 }
2387
2388
2389 type USQLType struct {
2390
2391 DatabaseName *string `json:"databaseName,omitempty"`
2392
2393 SchemaName *string `json:"schemaName,omitempty"`
2394
2395 Name *string `json:"typeName,omitempty"`
2396
2397 TypeFamily *string `json:"typeFamily,omitempty"`
2398
2399 CSharpName *string `json:"cSharpName,omitempty"`
2400
2401 FullCSharpName *string `json:"fullCSharpName,omitempty"`
2402
2403 SystemTypeID *int32 `json:"systemTypeId,omitempty"`
2404
2405 UserTypeID *int32 `json:"userTypeId,omitempty"`
2406
2407 SchemaID *int32 `json:"schemaId,omitempty"`
2408
2409 PrincipalID *int32 `json:"principalId,omitempty"`
2410
2411 IsNullable *bool `json:"isNullable,omitempty"`
2412
2413 IsUserDefined *bool `json:"isUserDefined,omitempty"`
2414
2415 IsAssemblyType *bool `json:"isAssemblyType,omitempty"`
2416
2417 IsTableType *bool `json:"isTableType,omitempty"`
2418
2419 IsComplexType *bool `json:"isComplexType,omitempty"`
2420
2421 ComputeAccountName *string `json:"computeAccountName,omitempty"`
2422
2423 Version *uuid.UUID `json:"version,omitempty"`
2424 }
2425
2426
2427 type USQLTypeList struct {
2428 autorest.Response `json:"-"`
2429
2430 Value *[]USQLType `json:"value,omitempty"`
2431
2432 Count *int32 `json:"count,omitempty"`
2433
2434 NextLink *string `json:"nextLink,omitempty"`
2435 }
2436
2437
2438 func (ustl USQLTypeList) MarshalJSON() ([]byte, error) {
2439 objectMap := make(map[string]interface{})
2440 if ustl.Count != nil {
2441 objectMap["count"] = ustl.Count
2442 }
2443 if ustl.NextLink != nil {
2444 objectMap["nextLink"] = ustl.NextLink
2445 }
2446 return json.Marshal(objectMap)
2447 }
2448
2449
2450 type USQLTypeListIterator struct {
2451 i int
2452 page USQLTypeListPage
2453 }
2454
2455
2456
2457 func (iter *USQLTypeListIterator) NextWithContext(ctx context.Context) (err error) {
2458 if tracing.IsEnabled() {
2459 ctx = tracing.StartSpan(ctx, fqdn+"/USQLTypeListIterator.NextWithContext")
2460 defer func() {
2461 sc := -1
2462 if iter.Response().Response.Response != nil {
2463 sc = iter.Response().Response.Response.StatusCode
2464 }
2465 tracing.EndSpan(ctx, sc, err)
2466 }()
2467 }
2468 iter.i++
2469 if iter.i < len(iter.page.Values()) {
2470 return nil
2471 }
2472 err = iter.page.NextWithContext(ctx)
2473 if err != nil {
2474 iter.i--
2475 return err
2476 }
2477 iter.i = 0
2478 return nil
2479 }
2480
2481
2482
2483
2484 func (iter *USQLTypeListIterator) Next() error {
2485 return iter.NextWithContext(context.Background())
2486 }
2487
2488
2489 func (iter USQLTypeListIterator) NotDone() bool {
2490 return iter.page.NotDone() && iter.i < len(iter.page.Values())
2491 }
2492
2493
2494 func (iter USQLTypeListIterator) Response() USQLTypeList {
2495 return iter.page.Response()
2496 }
2497
2498
2499
2500 func (iter USQLTypeListIterator) Value() USQLType {
2501 if !iter.page.NotDone() {
2502 return USQLType{}
2503 }
2504 return iter.page.Values()[iter.i]
2505 }
2506
2507
2508 func NewUSQLTypeListIterator(page USQLTypeListPage) USQLTypeListIterator {
2509 return USQLTypeListIterator{page: page}
2510 }
2511
2512
2513 func (ustl USQLTypeList) IsEmpty() bool {
2514 return ustl.Value == nil || len(*ustl.Value) == 0
2515 }
2516
2517
2518 func (ustl USQLTypeList) hasNextLink() bool {
2519 return ustl.NextLink != nil && len(*ustl.NextLink) != 0
2520 }
2521
2522
2523
2524 func (ustl USQLTypeList) uSQLTypeListPreparer(ctx context.Context) (*http.Request, error) {
2525 if !ustl.hasNextLink() {
2526 return nil, nil
2527 }
2528 return autorest.Prepare((&http.Request{}).WithContext(ctx),
2529 autorest.AsJSON(),
2530 autorest.AsGet(),
2531 autorest.WithBaseURL(to.String(ustl.NextLink)))
2532 }
2533
2534
2535 type USQLTypeListPage struct {
2536 fn func(context.Context, USQLTypeList) (USQLTypeList, error)
2537 utl USQLTypeList
2538 }
2539
2540
2541
2542 func (page *USQLTypeListPage) NextWithContext(ctx context.Context) (err error) {
2543 if tracing.IsEnabled() {
2544 ctx = tracing.StartSpan(ctx, fqdn+"/USQLTypeListPage.NextWithContext")
2545 defer func() {
2546 sc := -1
2547 if page.Response().Response.Response != nil {
2548 sc = page.Response().Response.Response.StatusCode
2549 }
2550 tracing.EndSpan(ctx, sc, err)
2551 }()
2552 }
2553 for {
2554 next, err := page.fn(ctx, page.utl)
2555 if err != nil {
2556 return err
2557 }
2558 page.utl = next
2559 if !next.hasNextLink() || !next.IsEmpty() {
2560 break
2561 }
2562 }
2563 return nil
2564 }
2565
2566
2567
2568
2569 func (page *USQLTypeListPage) Next() error {
2570 return page.NextWithContext(context.Background())
2571 }
2572
2573
2574 func (page USQLTypeListPage) NotDone() bool {
2575 return !page.utl.IsEmpty()
2576 }
2577
2578
2579 func (page USQLTypeListPage) Response() USQLTypeList {
2580 return page.utl
2581 }
2582
2583
2584 func (page USQLTypeListPage) Values() []USQLType {
2585 if page.utl.IsEmpty() {
2586 return nil
2587 }
2588 return *page.utl.Value
2589 }
2590
2591
2592 func NewUSQLTypeListPage(cur USQLTypeList, getNextPage func(context.Context, USQLTypeList) (USQLTypeList, error)) USQLTypeListPage {
2593 return USQLTypeListPage{
2594 fn: getNextPage,
2595 utl: cur,
2596 }
2597 }
2598
2599
2600 type USQLView struct {
2601 autorest.Response `json:"-"`
2602
2603 DatabaseName *string `json:"databaseName,omitempty"`
2604
2605 SchemaName *string `json:"schemaName,omitempty"`
2606
2607 Name *string `json:"viewName,omitempty"`
2608
2609 Definition *string `json:"definition,omitempty"`
2610
2611 ComputeAccountName *string `json:"computeAccountName,omitempty"`
2612
2613 Version *uuid.UUID `json:"version,omitempty"`
2614 }
2615
2616
2617 type USQLViewList struct {
2618 autorest.Response `json:"-"`
2619
2620 Value *[]USQLView `json:"value,omitempty"`
2621
2622 Count *int32 `json:"count,omitempty"`
2623
2624 NextLink *string `json:"nextLink,omitempty"`
2625 }
2626
2627
2628 func (usvl USQLViewList) MarshalJSON() ([]byte, error) {
2629 objectMap := make(map[string]interface{})
2630 if usvl.Count != nil {
2631 objectMap["count"] = usvl.Count
2632 }
2633 if usvl.NextLink != nil {
2634 objectMap["nextLink"] = usvl.NextLink
2635 }
2636 return json.Marshal(objectMap)
2637 }
2638
2639
2640 type USQLViewListIterator struct {
2641 i int
2642 page USQLViewListPage
2643 }
2644
2645
2646
2647 func (iter *USQLViewListIterator) NextWithContext(ctx context.Context) (err error) {
2648 if tracing.IsEnabled() {
2649 ctx = tracing.StartSpan(ctx, fqdn+"/USQLViewListIterator.NextWithContext")
2650 defer func() {
2651 sc := -1
2652 if iter.Response().Response.Response != nil {
2653 sc = iter.Response().Response.Response.StatusCode
2654 }
2655 tracing.EndSpan(ctx, sc, err)
2656 }()
2657 }
2658 iter.i++
2659 if iter.i < len(iter.page.Values()) {
2660 return nil
2661 }
2662 err = iter.page.NextWithContext(ctx)
2663 if err != nil {
2664 iter.i--
2665 return err
2666 }
2667 iter.i = 0
2668 return nil
2669 }
2670
2671
2672
2673
2674 func (iter *USQLViewListIterator) Next() error {
2675 return iter.NextWithContext(context.Background())
2676 }
2677
2678
2679 func (iter USQLViewListIterator) NotDone() bool {
2680 return iter.page.NotDone() && iter.i < len(iter.page.Values())
2681 }
2682
2683
2684 func (iter USQLViewListIterator) Response() USQLViewList {
2685 return iter.page.Response()
2686 }
2687
2688
2689
2690 func (iter USQLViewListIterator) Value() USQLView {
2691 if !iter.page.NotDone() {
2692 return USQLView{}
2693 }
2694 return iter.page.Values()[iter.i]
2695 }
2696
2697
2698 func NewUSQLViewListIterator(page USQLViewListPage) USQLViewListIterator {
2699 return USQLViewListIterator{page: page}
2700 }
2701
2702
2703 func (usvl USQLViewList) IsEmpty() bool {
2704 return usvl.Value == nil || len(*usvl.Value) == 0
2705 }
2706
2707
2708 func (usvl USQLViewList) hasNextLink() bool {
2709 return usvl.NextLink != nil && len(*usvl.NextLink) != 0
2710 }
2711
2712
2713
2714 func (usvl USQLViewList) uSQLViewListPreparer(ctx context.Context) (*http.Request, error) {
2715 if !usvl.hasNextLink() {
2716 return nil, nil
2717 }
2718 return autorest.Prepare((&http.Request{}).WithContext(ctx),
2719 autorest.AsJSON(),
2720 autorest.AsGet(),
2721 autorest.WithBaseURL(to.String(usvl.NextLink)))
2722 }
2723
2724
2725 type USQLViewListPage struct {
2726 fn func(context.Context, USQLViewList) (USQLViewList, error)
2727 uvl USQLViewList
2728 }
2729
2730
2731
2732 func (page *USQLViewListPage) NextWithContext(ctx context.Context) (err error) {
2733 if tracing.IsEnabled() {
2734 ctx = tracing.StartSpan(ctx, fqdn+"/USQLViewListPage.NextWithContext")
2735 defer func() {
2736 sc := -1
2737 if page.Response().Response.Response != nil {
2738 sc = page.Response().Response.Response.StatusCode
2739 }
2740 tracing.EndSpan(ctx, sc, err)
2741 }()
2742 }
2743 for {
2744 next, err := page.fn(ctx, page.uvl)
2745 if err != nil {
2746 return err
2747 }
2748 page.uvl = next
2749 if !next.hasNextLink() || !next.IsEmpty() {
2750 break
2751 }
2752 }
2753 return nil
2754 }
2755
2756
2757
2758
2759 func (page *USQLViewListPage) Next() error {
2760 return page.NextWithContext(context.Background())
2761 }
2762
2763
2764 func (page USQLViewListPage) NotDone() bool {
2765 return !page.uvl.IsEmpty()
2766 }
2767
2768
2769 func (page USQLViewListPage) Response() USQLViewList {
2770 return page.uvl
2771 }
2772
2773
2774 func (page USQLViewListPage) Values() []USQLView {
2775 if page.uvl.IsEmpty() {
2776 return nil
2777 }
2778 return *page.uvl.Value
2779 }
2780
2781
2782 func NewUSQLViewListPage(cur USQLViewList, getNextPage func(context.Context, USQLViewList) (USQLViewList, error)) USQLViewListPage {
2783 return USQLViewListPage{
2784 fn: getNextPage,
2785 uvl: cur,
2786 }
2787 }
2788
View as plain text