1 package account
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/azure"
14 "github.com/Azure/go-autorest/autorest/date"
15 "github.com/Azure/go-autorest/autorest/to"
16 "github.com/Azure/go-autorest/tracing"
17 "github.com/gofrs/uuid"
18 "net/http"
19 )
20
21
22 const fqdn = "github.com/Azure/azure-sdk-for-go/services/datalake/analytics/mgmt/2016-11-01/account"
23
24
25
26 type AccountsCreateFutureType struct {
27 azure.FutureAPI
28
29
30 Result func(AccountsClient) (DataLakeAnalyticsAccount, error)
31 }
32
33
34 func (future *AccountsCreateFutureType) UnmarshalJSON(body []byte) error {
35 var azFuture azure.Future
36 if err := json.Unmarshal(body, &azFuture); err != nil {
37 return err
38 }
39 future.FutureAPI = &azFuture
40 future.Result = future.result
41 return nil
42 }
43
44
45 func (future *AccountsCreateFutureType) result(client AccountsClient) (dlaa DataLakeAnalyticsAccount, err error) {
46 var done bool
47 done, err = future.DoneWithContext(context.Background(), client)
48 if err != nil {
49 err = autorest.NewErrorWithError(err, "account.AccountsCreateFutureType", "Result", future.Response(), "Polling failure")
50 return
51 }
52 if !done {
53 dlaa.Response.Response = future.Response()
54 err = azure.NewAsyncOpIncompleteError("account.AccountsCreateFutureType")
55 return
56 }
57 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
58 if dlaa.Response.Response, err = future.GetResult(sender); err == nil && dlaa.Response.Response.StatusCode != http.StatusNoContent {
59 dlaa, err = client.CreateResponder(dlaa.Response.Response)
60 if err != nil {
61 err = autorest.NewErrorWithError(err, "account.AccountsCreateFutureType", "Result", dlaa.Response.Response, "Failure responding to request")
62 }
63 }
64 return
65 }
66
67
68
69 type AccountsDeleteFutureType struct {
70 azure.FutureAPI
71
72
73 Result func(AccountsClient) (autorest.Response, error)
74 }
75
76
77 func (future *AccountsDeleteFutureType) UnmarshalJSON(body []byte) error {
78 var azFuture azure.Future
79 if err := json.Unmarshal(body, &azFuture); err != nil {
80 return err
81 }
82 future.FutureAPI = &azFuture
83 future.Result = future.result
84 return nil
85 }
86
87
88 func (future *AccountsDeleteFutureType) result(client AccountsClient) (ar autorest.Response, err error) {
89 var done bool
90 done, err = future.DoneWithContext(context.Background(), client)
91 if err != nil {
92 err = autorest.NewErrorWithError(err, "account.AccountsDeleteFutureType", "Result", future.Response(), "Polling failure")
93 return
94 }
95 if !done {
96 ar.Response = future.Response()
97 err = azure.NewAsyncOpIncompleteError("account.AccountsDeleteFutureType")
98 return
99 }
100 ar.Response = future.Response()
101 return
102 }
103
104
105
106 type AccountsUpdateFutureType struct {
107 azure.FutureAPI
108
109
110 Result func(AccountsClient) (DataLakeAnalyticsAccount, error)
111 }
112
113
114 func (future *AccountsUpdateFutureType) UnmarshalJSON(body []byte) error {
115 var azFuture azure.Future
116 if err := json.Unmarshal(body, &azFuture); err != nil {
117 return err
118 }
119 future.FutureAPI = &azFuture
120 future.Result = future.result
121 return nil
122 }
123
124
125 func (future *AccountsUpdateFutureType) result(client AccountsClient) (dlaa DataLakeAnalyticsAccount, err error) {
126 var done bool
127 done, err = future.DoneWithContext(context.Background(), client)
128 if err != nil {
129 err = autorest.NewErrorWithError(err, "account.AccountsUpdateFutureType", "Result", future.Response(), "Polling failure")
130 return
131 }
132 if !done {
133 dlaa.Response.Response = future.Response()
134 err = azure.NewAsyncOpIncompleteError("account.AccountsUpdateFutureType")
135 return
136 }
137 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
138 if dlaa.Response.Response, err = future.GetResult(sender); err == nil && dlaa.Response.Response.StatusCode != http.StatusNoContent {
139 dlaa, err = client.UpdateResponder(dlaa.Response.Response)
140 if err != nil {
141 err = autorest.NewErrorWithError(err, "account.AccountsUpdateFutureType", "Result", dlaa.Response.Response, "Failure responding to request")
142 }
143 }
144 return
145 }
146
147
148 type AddDataLakeStoreParameters struct {
149
150 *AddDataLakeStoreProperties `json:"properties,omitempty"`
151 }
152
153
154 func (adlsp AddDataLakeStoreParameters) MarshalJSON() ([]byte, error) {
155 objectMap := make(map[string]interface{})
156 if adlsp.AddDataLakeStoreProperties != nil {
157 objectMap["properties"] = adlsp.AddDataLakeStoreProperties
158 }
159 return json.Marshal(objectMap)
160 }
161
162
163 func (adlsp *AddDataLakeStoreParameters) UnmarshalJSON(body []byte) error {
164 var m map[string]*json.RawMessage
165 err := json.Unmarshal(body, &m)
166 if err != nil {
167 return err
168 }
169 for k, v := range m {
170 switch k {
171 case "properties":
172 if v != nil {
173 var addDataLakeStoreProperties AddDataLakeStoreProperties
174 err = json.Unmarshal(*v, &addDataLakeStoreProperties)
175 if err != nil {
176 return err
177 }
178 adlsp.AddDataLakeStoreProperties = &addDataLakeStoreProperties
179 }
180 }
181 }
182
183 return nil
184 }
185
186
187
188 type AddDataLakeStoreProperties struct {
189
190 Suffix *string `json:"suffix,omitempty"`
191 }
192
193
194
195 type AddDataLakeStoreWithAccountParameters struct {
196
197 Name *string `json:"name,omitempty"`
198
199 *AddDataLakeStoreProperties `json:"properties,omitempty"`
200 }
201
202
203 func (adlswap AddDataLakeStoreWithAccountParameters) MarshalJSON() ([]byte, error) {
204 objectMap := make(map[string]interface{})
205 if adlswap.Name != nil {
206 objectMap["name"] = adlswap.Name
207 }
208 if adlswap.AddDataLakeStoreProperties != nil {
209 objectMap["properties"] = adlswap.AddDataLakeStoreProperties
210 }
211 return json.Marshal(objectMap)
212 }
213
214
215 func (adlswap *AddDataLakeStoreWithAccountParameters) UnmarshalJSON(body []byte) error {
216 var m map[string]*json.RawMessage
217 err := json.Unmarshal(body, &m)
218 if err != nil {
219 return err
220 }
221 for k, v := range m {
222 switch k {
223 case "name":
224 if v != nil {
225 var name string
226 err = json.Unmarshal(*v, &name)
227 if err != nil {
228 return err
229 }
230 adlswap.Name = &name
231 }
232 case "properties":
233 if v != nil {
234 var addDataLakeStoreProperties AddDataLakeStoreProperties
235 err = json.Unmarshal(*v, &addDataLakeStoreProperties)
236 if err != nil {
237 return err
238 }
239 adlswap.AddDataLakeStoreProperties = &addDataLakeStoreProperties
240 }
241 }
242 }
243
244 return nil
245 }
246
247
248 type AddStorageAccountParameters struct {
249
250 *AddStorageAccountProperties `json:"properties,omitempty"`
251 }
252
253
254 func (asap AddStorageAccountParameters) MarshalJSON() ([]byte, error) {
255 objectMap := make(map[string]interface{})
256 if asap.AddStorageAccountProperties != nil {
257 objectMap["properties"] = asap.AddStorageAccountProperties
258 }
259 return json.Marshal(objectMap)
260 }
261
262
263 func (asap *AddStorageAccountParameters) UnmarshalJSON(body []byte) error {
264 var m map[string]*json.RawMessage
265 err := json.Unmarshal(body, &m)
266 if err != nil {
267 return err
268 }
269 for k, v := range m {
270 switch k {
271 case "properties":
272 if v != nil {
273 var addStorageAccountProperties AddStorageAccountProperties
274 err = json.Unmarshal(*v, &addStorageAccountProperties)
275 if err != nil {
276 return err
277 }
278 asap.AddStorageAccountProperties = &addStorageAccountProperties
279 }
280 }
281 }
282
283 return nil
284 }
285
286
287
288 type AddStorageAccountProperties struct {
289
290 AccessKey *string `json:"accessKey,omitempty"`
291
292 Suffix *string `json:"suffix,omitempty"`
293 }
294
295
296
297 type AddStorageAccountWithAccountParameters struct {
298
299 Name *string `json:"name,omitempty"`
300
301 *AddStorageAccountProperties `json:"properties,omitempty"`
302 }
303
304
305 func (asawap AddStorageAccountWithAccountParameters) MarshalJSON() ([]byte, error) {
306 objectMap := make(map[string]interface{})
307 if asawap.Name != nil {
308 objectMap["name"] = asawap.Name
309 }
310 if asawap.AddStorageAccountProperties != nil {
311 objectMap["properties"] = asawap.AddStorageAccountProperties
312 }
313 return json.Marshal(objectMap)
314 }
315
316
317 func (asawap *AddStorageAccountWithAccountParameters) UnmarshalJSON(body []byte) error {
318 var m map[string]*json.RawMessage
319 err := json.Unmarshal(body, &m)
320 if err != nil {
321 return err
322 }
323 for k, v := range m {
324 switch k {
325 case "name":
326 if v != nil {
327 var name string
328 err = json.Unmarshal(*v, &name)
329 if err != nil {
330 return err
331 }
332 asawap.Name = &name
333 }
334 case "properties":
335 if v != nil {
336 var addStorageAccountProperties AddStorageAccountProperties
337 err = json.Unmarshal(*v, &addStorageAccountProperties)
338 if err != nil {
339 return err
340 }
341 asawap.AddStorageAccountProperties = &addStorageAccountProperties
342 }
343 }
344 }
345
346 return nil
347 }
348
349
350 type CapabilityInformation struct {
351 autorest.Response `json:"-"`
352
353 SubscriptionID *uuid.UUID `json:"subscriptionId,omitempty"`
354
355 State SubscriptionState `json:"state,omitempty"`
356
357 MaxAccountCount *int32 `json:"maxAccountCount,omitempty"`
358
359 AccountCount *int32 `json:"accountCount,omitempty"`
360
361 MigrationState *bool `json:"migrationState,omitempty"`
362 }
363
364
365 func (ci CapabilityInformation) MarshalJSON() ([]byte, error) {
366 objectMap := make(map[string]interface{})
367 return json.Marshal(objectMap)
368 }
369
370
371 type CheckNameAvailabilityParameters struct {
372
373 Name *string `json:"name,omitempty"`
374
375 Type *string `json:"type,omitempty"`
376 }
377
378
379 type ComputePolicy struct {
380 autorest.Response `json:"-"`
381
382 *ComputePolicyProperties `json:"properties,omitempty"`
383
384 ID *string `json:"id,omitempty"`
385
386 Name *string `json:"name,omitempty"`
387
388 Type *string `json:"type,omitempty"`
389 }
390
391
392 func (cp ComputePolicy) MarshalJSON() ([]byte, error) {
393 objectMap := make(map[string]interface{})
394 return json.Marshal(objectMap)
395 }
396
397
398 func (cp *ComputePolicy) UnmarshalJSON(body []byte) error {
399 var m map[string]*json.RawMessage
400 err := json.Unmarshal(body, &m)
401 if err != nil {
402 return err
403 }
404 for k, v := range m {
405 switch k {
406 case "properties":
407 if v != nil {
408 var computePolicyProperties ComputePolicyProperties
409 err = json.Unmarshal(*v, &computePolicyProperties)
410 if err != nil {
411 return err
412 }
413 cp.ComputePolicyProperties = &computePolicyProperties
414 }
415 case "id":
416 if v != nil {
417 var ID string
418 err = json.Unmarshal(*v, &ID)
419 if err != nil {
420 return err
421 }
422 cp.ID = &ID
423 }
424 case "name":
425 if v != nil {
426 var name string
427 err = json.Unmarshal(*v, &name)
428 if err != nil {
429 return err
430 }
431 cp.Name = &name
432 }
433 case "type":
434 if v != nil {
435 var typeVar string
436 err = json.Unmarshal(*v, &typeVar)
437 if err != nil {
438 return err
439 }
440 cp.Type = &typeVar
441 }
442 }
443 }
444
445 return nil
446 }
447
448
449 type ComputePolicyListResult struct {
450 autorest.Response `json:"-"`
451
452 Value *[]ComputePolicy `json:"value,omitempty"`
453
454 NextLink *string `json:"nextLink,omitempty"`
455 }
456
457
458 func (cplr ComputePolicyListResult) MarshalJSON() ([]byte, error) {
459 objectMap := make(map[string]interface{})
460 return json.Marshal(objectMap)
461 }
462
463
464 type ComputePolicyListResultIterator struct {
465 i int
466 page ComputePolicyListResultPage
467 }
468
469
470
471 func (iter *ComputePolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
472 if tracing.IsEnabled() {
473 ctx = tracing.StartSpan(ctx, fqdn+"/ComputePolicyListResultIterator.NextWithContext")
474 defer func() {
475 sc := -1
476 if iter.Response().Response.Response != nil {
477 sc = iter.Response().Response.Response.StatusCode
478 }
479 tracing.EndSpan(ctx, sc, err)
480 }()
481 }
482 iter.i++
483 if iter.i < len(iter.page.Values()) {
484 return nil
485 }
486 err = iter.page.NextWithContext(ctx)
487 if err != nil {
488 iter.i--
489 return err
490 }
491 iter.i = 0
492 return nil
493 }
494
495
496
497
498 func (iter *ComputePolicyListResultIterator) Next() error {
499 return iter.NextWithContext(context.Background())
500 }
501
502
503 func (iter ComputePolicyListResultIterator) NotDone() bool {
504 return iter.page.NotDone() && iter.i < len(iter.page.Values())
505 }
506
507
508 func (iter ComputePolicyListResultIterator) Response() ComputePolicyListResult {
509 return iter.page.Response()
510 }
511
512
513
514 func (iter ComputePolicyListResultIterator) Value() ComputePolicy {
515 if !iter.page.NotDone() {
516 return ComputePolicy{}
517 }
518 return iter.page.Values()[iter.i]
519 }
520
521
522 func NewComputePolicyListResultIterator(page ComputePolicyListResultPage) ComputePolicyListResultIterator {
523 return ComputePolicyListResultIterator{page: page}
524 }
525
526
527 func (cplr ComputePolicyListResult) IsEmpty() bool {
528 return cplr.Value == nil || len(*cplr.Value) == 0
529 }
530
531
532 func (cplr ComputePolicyListResult) hasNextLink() bool {
533 return cplr.NextLink != nil && len(*cplr.NextLink) != 0
534 }
535
536
537
538 func (cplr ComputePolicyListResult) computePolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
539 if !cplr.hasNextLink() {
540 return nil, nil
541 }
542 return autorest.Prepare((&http.Request{}).WithContext(ctx),
543 autorest.AsJSON(),
544 autorest.AsGet(),
545 autorest.WithBaseURL(to.String(cplr.NextLink)))
546 }
547
548
549 type ComputePolicyListResultPage struct {
550 fn func(context.Context, ComputePolicyListResult) (ComputePolicyListResult, error)
551 cplr ComputePolicyListResult
552 }
553
554
555
556 func (page *ComputePolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
557 if tracing.IsEnabled() {
558 ctx = tracing.StartSpan(ctx, fqdn+"/ComputePolicyListResultPage.NextWithContext")
559 defer func() {
560 sc := -1
561 if page.Response().Response.Response != nil {
562 sc = page.Response().Response.Response.StatusCode
563 }
564 tracing.EndSpan(ctx, sc, err)
565 }()
566 }
567 for {
568 next, err := page.fn(ctx, page.cplr)
569 if err != nil {
570 return err
571 }
572 page.cplr = next
573 if !next.hasNextLink() || !next.IsEmpty() {
574 break
575 }
576 }
577 return nil
578 }
579
580
581
582
583 func (page *ComputePolicyListResultPage) Next() error {
584 return page.NextWithContext(context.Background())
585 }
586
587
588 func (page ComputePolicyListResultPage) NotDone() bool {
589 return !page.cplr.IsEmpty()
590 }
591
592
593 func (page ComputePolicyListResultPage) Response() ComputePolicyListResult {
594 return page.cplr
595 }
596
597
598 func (page ComputePolicyListResultPage) Values() []ComputePolicy {
599 if page.cplr.IsEmpty() {
600 return nil
601 }
602 return *page.cplr.Value
603 }
604
605
606 func NewComputePolicyListResultPage(cur ComputePolicyListResult, getNextPage func(context.Context, ComputePolicyListResult) (ComputePolicyListResult, error)) ComputePolicyListResultPage {
607 return ComputePolicyListResultPage{
608 fn: getNextPage,
609 cplr: cur,
610 }
611 }
612
613
614 type ComputePolicyProperties struct {
615
616 ObjectID *uuid.UUID `json:"objectId,omitempty"`
617
618 ObjectType AADObjectType `json:"objectType,omitempty"`
619
620 MaxDegreeOfParallelismPerJob *int32 `json:"maxDegreeOfParallelismPerJob,omitempty"`
621
622 MinPriorityPerJob *int32 `json:"minPriorityPerJob,omitempty"`
623 }
624
625
626 func (cpp ComputePolicyProperties) MarshalJSON() ([]byte, error) {
627 objectMap := make(map[string]interface{})
628 return json.Marshal(objectMap)
629 }
630
631
632
633 type CreateComputePolicyWithAccountParameters struct {
634
635 Name *string `json:"name,omitempty"`
636
637 *CreateOrUpdateComputePolicyProperties `json:"properties,omitempty"`
638 }
639
640
641 func (ccpwap CreateComputePolicyWithAccountParameters) MarshalJSON() ([]byte, error) {
642 objectMap := make(map[string]interface{})
643 if ccpwap.Name != nil {
644 objectMap["name"] = ccpwap.Name
645 }
646 if ccpwap.CreateOrUpdateComputePolicyProperties != nil {
647 objectMap["properties"] = ccpwap.CreateOrUpdateComputePolicyProperties
648 }
649 return json.Marshal(objectMap)
650 }
651
652
653 func (ccpwap *CreateComputePolicyWithAccountParameters) UnmarshalJSON(body []byte) error {
654 var m map[string]*json.RawMessage
655 err := json.Unmarshal(body, &m)
656 if err != nil {
657 return err
658 }
659 for k, v := range m {
660 switch k {
661 case "name":
662 if v != nil {
663 var name string
664 err = json.Unmarshal(*v, &name)
665 if err != nil {
666 return err
667 }
668 ccpwap.Name = &name
669 }
670 case "properties":
671 if v != nil {
672 var createOrUpdateComputePolicyProperties CreateOrUpdateComputePolicyProperties
673 err = json.Unmarshal(*v, &createOrUpdateComputePolicyProperties)
674 if err != nil {
675 return err
676 }
677 ccpwap.CreateOrUpdateComputePolicyProperties = &createOrUpdateComputePolicyProperties
678 }
679 }
680 }
681
682 return nil
683 }
684
685
686
687 type CreateDataLakeAnalyticsAccountParameters struct {
688
689 Location *string `json:"location,omitempty"`
690
691 Tags map[string]*string `json:"tags"`
692
693 *CreateDataLakeAnalyticsAccountProperties `json:"properties,omitempty"`
694 }
695
696
697 func (cdlaap CreateDataLakeAnalyticsAccountParameters) MarshalJSON() ([]byte, error) {
698 objectMap := make(map[string]interface{})
699 if cdlaap.Location != nil {
700 objectMap["location"] = cdlaap.Location
701 }
702 if cdlaap.Tags != nil {
703 objectMap["tags"] = cdlaap.Tags
704 }
705 if cdlaap.CreateDataLakeAnalyticsAccountProperties != nil {
706 objectMap["properties"] = cdlaap.CreateDataLakeAnalyticsAccountProperties
707 }
708 return json.Marshal(objectMap)
709 }
710
711
712 func (cdlaap *CreateDataLakeAnalyticsAccountParameters) UnmarshalJSON(body []byte) error {
713 var m map[string]*json.RawMessage
714 err := json.Unmarshal(body, &m)
715 if err != nil {
716 return err
717 }
718 for k, v := range m {
719 switch k {
720 case "location":
721 if v != nil {
722 var location string
723 err = json.Unmarshal(*v, &location)
724 if err != nil {
725 return err
726 }
727 cdlaap.Location = &location
728 }
729 case "tags":
730 if v != nil {
731 var tags map[string]*string
732 err = json.Unmarshal(*v, &tags)
733 if err != nil {
734 return err
735 }
736 cdlaap.Tags = tags
737 }
738 case "properties":
739 if v != nil {
740 var createDataLakeAnalyticsAccountProperties CreateDataLakeAnalyticsAccountProperties
741 err = json.Unmarshal(*v, &createDataLakeAnalyticsAccountProperties)
742 if err != nil {
743 return err
744 }
745 cdlaap.CreateDataLakeAnalyticsAccountProperties = &createDataLakeAnalyticsAccountProperties
746 }
747 }
748 }
749
750 return nil
751 }
752
753
754 type CreateDataLakeAnalyticsAccountProperties struct {
755
756 DefaultDataLakeStoreAccount *string `json:"defaultDataLakeStoreAccount,omitempty"`
757
758 DataLakeStoreAccounts *[]AddDataLakeStoreWithAccountParameters `json:"dataLakeStoreAccounts,omitempty"`
759
760 StorageAccounts *[]AddStorageAccountWithAccountParameters `json:"storageAccounts,omitempty"`
761
762 ComputePolicies *[]CreateComputePolicyWithAccountParameters `json:"computePolicies,omitempty"`
763
764 FirewallRules *[]CreateFirewallRuleWithAccountParameters `json:"firewallRules,omitempty"`
765
766 FirewallState FirewallState `json:"firewallState,omitempty"`
767
768 FirewallAllowAzureIps FirewallAllowAzureIpsState `json:"firewallAllowAzureIps,omitempty"`
769
770 NewTier TierType `json:"newTier,omitempty"`
771
772 MaxJobCount *int32 `json:"maxJobCount,omitempty"`
773
774 MaxDegreeOfParallelism *int32 `json:"maxDegreeOfParallelism,omitempty"`
775
776 MaxDegreeOfParallelismPerJob *int32 `json:"maxDegreeOfParallelismPerJob,omitempty"`
777
778 MinPriorityPerJob *int32 `json:"minPriorityPerJob,omitempty"`
779
780 QueryStoreRetention *int32 `json:"queryStoreRetention,omitempty"`
781 }
782
783
784
785 type CreateFirewallRuleWithAccountParameters struct {
786
787 Name *string `json:"name,omitempty"`
788
789 *CreateOrUpdateFirewallRuleProperties `json:"properties,omitempty"`
790 }
791
792
793 func (cfrwap CreateFirewallRuleWithAccountParameters) MarshalJSON() ([]byte, error) {
794 objectMap := make(map[string]interface{})
795 if cfrwap.Name != nil {
796 objectMap["name"] = cfrwap.Name
797 }
798 if cfrwap.CreateOrUpdateFirewallRuleProperties != nil {
799 objectMap["properties"] = cfrwap.CreateOrUpdateFirewallRuleProperties
800 }
801 return json.Marshal(objectMap)
802 }
803
804
805 func (cfrwap *CreateFirewallRuleWithAccountParameters) UnmarshalJSON(body []byte) error {
806 var m map[string]*json.RawMessage
807 err := json.Unmarshal(body, &m)
808 if err != nil {
809 return err
810 }
811 for k, v := range m {
812 switch k {
813 case "name":
814 if v != nil {
815 var name string
816 err = json.Unmarshal(*v, &name)
817 if err != nil {
818 return err
819 }
820 cfrwap.Name = &name
821 }
822 case "properties":
823 if v != nil {
824 var createOrUpdateFirewallRuleProperties CreateOrUpdateFirewallRuleProperties
825 err = json.Unmarshal(*v, &createOrUpdateFirewallRuleProperties)
826 if err != nil {
827 return err
828 }
829 cfrwap.CreateOrUpdateFirewallRuleProperties = &createOrUpdateFirewallRuleProperties
830 }
831 }
832 }
833
834 return nil
835 }
836
837
838 type CreateOrUpdateComputePolicyParameters struct {
839
840 *CreateOrUpdateComputePolicyProperties `json:"properties,omitempty"`
841 }
842
843
844 func (coucpp CreateOrUpdateComputePolicyParameters) MarshalJSON() ([]byte, error) {
845 objectMap := make(map[string]interface{})
846 if coucpp.CreateOrUpdateComputePolicyProperties != nil {
847 objectMap["properties"] = coucpp.CreateOrUpdateComputePolicyProperties
848 }
849 return json.Marshal(objectMap)
850 }
851
852
853 func (coucpp *CreateOrUpdateComputePolicyParameters) UnmarshalJSON(body []byte) error {
854 var m map[string]*json.RawMessage
855 err := json.Unmarshal(body, &m)
856 if err != nil {
857 return err
858 }
859 for k, v := range m {
860 switch k {
861 case "properties":
862 if v != nil {
863 var createOrUpdateComputePolicyProperties CreateOrUpdateComputePolicyProperties
864 err = json.Unmarshal(*v, &createOrUpdateComputePolicyProperties)
865 if err != nil {
866 return err
867 }
868 coucpp.CreateOrUpdateComputePolicyProperties = &createOrUpdateComputePolicyProperties
869 }
870 }
871 }
872
873 return nil
874 }
875
876
877
878 type CreateOrUpdateComputePolicyProperties struct {
879
880 ObjectID *uuid.UUID `json:"objectId,omitempty"`
881
882 ObjectType AADObjectType `json:"objectType,omitempty"`
883
884 MaxDegreeOfParallelismPerJob *int32 `json:"maxDegreeOfParallelismPerJob,omitempty"`
885
886 MinPriorityPerJob *int32 `json:"minPriorityPerJob,omitempty"`
887 }
888
889
890 type CreateOrUpdateFirewallRuleParameters struct {
891
892 *CreateOrUpdateFirewallRuleProperties `json:"properties,omitempty"`
893 }
894
895
896 func (coufrp CreateOrUpdateFirewallRuleParameters) MarshalJSON() ([]byte, error) {
897 objectMap := make(map[string]interface{})
898 if coufrp.CreateOrUpdateFirewallRuleProperties != nil {
899 objectMap["properties"] = coufrp.CreateOrUpdateFirewallRuleProperties
900 }
901 return json.Marshal(objectMap)
902 }
903
904
905 func (coufrp *CreateOrUpdateFirewallRuleParameters) UnmarshalJSON(body []byte) error {
906 var m map[string]*json.RawMessage
907 err := json.Unmarshal(body, &m)
908 if err != nil {
909 return err
910 }
911 for k, v := range m {
912 switch k {
913 case "properties":
914 if v != nil {
915 var createOrUpdateFirewallRuleProperties CreateOrUpdateFirewallRuleProperties
916 err = json.Unmarshal(*v, &createOrUpdateFirewallRuleProperties)
917 if err != nil {
918 return err
919 }
920 coufrp.CreateOrUpdateFirewallRuleProperties = &createOrUpdateFirewallRuleProperties
921 }
922 }
923 }
924
925 return nil
926 }
927
928
929
930 type CreateOrUpdateFirewallRuleProperties struct {
931
932 StartIPAddress *string `json:"startIpAddress,omitempty"`
933
934 EndIPAddress *string `json:"endIpAddress,omitempty"`
935 }
936
937
938
939 type DataLakeAnalyticsAccount struct {
940 autorest.Response `json:"-"`
941
942 *DataLakeAnalyticsAccountProperties `json:"properties,omitempty"`
943
944 ID *string `json:"id,omitempty"`
945
946 Name *string `json:"name,omitempty"`
947
948 Type *string `json:"type,omitempty"`
949
950 Location *string `json:"location,omitempty"`
951
952 Tags map[string]*string `json:"tags"`
953 }
954
955
956 func (dlaa DataLakeAnalyticsAccount) MarshalJSON() ([]byte, error) {
957 objectMap := make(map[string]interface{})
958 return json.Marshal(objectMap)
959 }
960
961
962 func (dlaa *DataLakeAnalyticsAccount) UnmarshalJSON(body []byte) error {
963 var m map[string]*json.RawMessage
964 err := json.Unmarshal(body, &m)
965 if err != nil {
966 return err
967 }
968 for k, v := range m {
969 switch k {
970 case "properties":
971 if v != nil {
972 var dataLakeAnalyticsAccountProperties DataLakeAnalyticsAccountProperties
973 err = json.Unmarshal(*v, &dataLakeAnalyticsAccountProperties)
974 if err != nil {
975 return err
976 }
977 dlaa.DataLakeAnalyticsAccountProperties = &dataLakeAnalyticsAccountProperties
978 }
979 case "id":
980 if v != nil {
981 var ID string
982 err = json.Unmarshal(*v, &ID)
983 if err != nil {
984 return err
985 }
986 dlaa.ID = &ID
987 }
988 case "name":
989 if v != nil {
990 var name string
991 err = json.Unmarshal(*v, &name)
992 if err != nil {
993 return err
994 }
995 dlaa.Name = &name
996 }
997 case "type":
998 if v != nil {
999 var typeVar string
1000 err = json.Unmarshal(*v, &typeVar)
1001 if err != nil {
1002 return err
1003 }
1004 dlaa.Type = &typeVar
1005 }
1006 case "location":
1007 if v != nil {
1008 var location string
1009 err = json.Unmarshal(*v, &location)
1010 if err != nil {
1011 return err
1012 }
1013 dlaa.Location = &location
1014 }
1015 case "tags":
1016 if v != nil {
1017 var tags map[string]*string
1018 err = json.Unmarshal(*v, &tags)
1019 if err != nil {
1020 return err
1021 }
1022 dlaa.Tags = tags
1023 }
1024 }
1025 }
1026
1027 return nil
1028 }
1029
1030
1031
1032 type DataLakeAnalyticsAccountBasic struct {
1033
1034 *DataLakeAnalyticsAccountPropertiesBasic `json:"properties,omitempty"`
1035
1036 ID *string `json:"id,omitempty"`
1037
1038 Name *string `json:"name,omitempty"`
1039
1040 Type *string `json:"type,omitempty"`
1041
1042 Location *string `json:"location,omitempty"`
1043
1044 Tags map[string]*string `json:"tags"`
1045 }
1046
1047
1048 func (dlaab DataLakeAnalyticsAccountBasic) MarshalJSON() ([]byte, error) {
1049 objectMap := make(map[string]interface{})
1050 return json.Marshal(objectMap)
1051 }
1052
1053
1054 func (dlaab *DataLakeAnalyticsAccountBasic) UnmarshalJSON(body []byte) error {
1055 var m map[string]*json.RawMessage
1056 err := json.Unmarshal(body, &m)
1057 if err != nil {
1058 return err
1059 }
1060 for k, v := range m {
1061 switch k {
1062 case "properties":
1063 if v != nil {
1064 var dataLakeAnalyticsAccountPropertiesBasic DataLakeAnalyticsAccountPropertiesBasic
1065 err = json.Unmarshal(*v, &dataLakeAnalyticsAccountPropertiesBasic)
1066 if err != nil {
1067 return err
1068 }
1069 dlaab.DataLakeAnalyticsAccountPropertiesBasic = &dataLakeAnalyticsAccountPropertiesBasic
1070 }
1071 case "id":
1072 if v != nil {
1073 var ID string
1074 err = json.Unmarshal(*v, &ID)
1075 if err != nil {
1076 return err
1077 }
1078 dlaab.ID = &ID
1079 }
1080 case "name":
1081 if v != nil {
1082 var name string
1083 err = json.Unmarshal(*v, &name)
1084 if err != nil {
1085 return err
1086 }
1087 dlaab.Name = &name
1088 }
1089 case "type":
1090 if v != nil {
1091 var typeVar string
1092 err = json.Unmarshal(*v, &typeVar)
1093 if err != nil {
1094 return err
1095 }
1096 dlaab.Type = &typeVar
1097 }
1098 case "location":
1099 if v != nil {
1100 var location string
1101 err = json.Unmarshal(*v, &location)
1102 if err != nil {
1103 return err
1104 }
1105 dlaab.Location = &location
1106 }
1107 case "tags":
1108 if v != nil {
1109 var tags map[string]*string
1110 err = json.Unmarshal(*v, &tags)
1111 if err != nil {
1112 return err
1113 }
1114 dlaab.Tags = tags
1115 }
1116 }
1117 }
1118
1119 return nil
1120 }
1121
1122
1123 type DataLakeAnalyticsAccountListResult struct {
1124 autorest.Response `json:"-"`
1125
1126 Value *[]DataLakeAnalyticsAccountBasic `json:"value,omitempty"`
1127
1128 NextLink *string `json:"nextLink,omitempty"`
1129 }
1130
1131
1132 func (dlaalr DataLakeAnalyticsAccountListResult) MarshalJSON() ([]byte, error) {
1133 objectMap := make(map[string]interface{})
1134 return json.Marshal(objectMap)
1135 }
1136
1137
1138
1139 type DataLakeAnalyticsAccountListResultIterator struct {
1140 i int
1141 page DataLakeAnalyticsAccountListResultPage
1142 }
1143
1144
1145
1146 func (iter *DataLakeAnalyticsAccountListResultIterator) NextWithContext(ctx context.Context) (err error) {
1147 if tracing.IsEnabled() {
1148 ctx = tracing.StartSpan(ctx, fqdn+"/DataLakeAnalyticsAccountListResultIterator.NextWithContext")
1149 defer func() {
1150 sc := -1
1151 if iter.Response().Response.Response != nil {
1152 sc = iter.Response().Response.Response.StatusCode
1153 }
1154 tracing.EndSpan(ctx, sc, err)
1155 }()
1156 }
1157 iter.i++
1158 if iter.i < len(iter.page.Values()) {
1159 return nil
1160 }
1161 err = iter.page.NextWithContext(ctx)
1162 if err != nil {
1163 iter.i--
1164 return err
1165 }
1166 iter.i = 0
1167 return nil
1168 }
1169
1170
1171
1172
1173 func (iter *DataLakeAnalyticsAccountListResultIterator) Next() error {
1174 return iter.NextWithContext(context.Background())
1175 }
1176
1177
1178 func (iter DataLakeAnalyticsAccountListResultIterator) NotDone() bool {
1179 return iter.page.NotDone() && iter.i < len(iter.page.Values())
1180 }
1181
1182
1183 func (iter DataLakeAnalyticsAccountListResultIterator) Response() DataLakeAnalyticsAccountListResult {
1184 return iter.page.Response()
1185 }
1186
1187
1188
1189 func (iter DataLakeAnalyticsAccountListResultIterator) Value() DataLakeAnalyticsAccountBasic {
1190 if !iter.page.NotDone() {
1191 return DataLakeAnalyticsAccountBasic{}
1192 }
1193 return iter.page.Values()[iter.i]
1194 }
1195
1196
1197 func NewDataLakeAnalyticsAccountListResultIterator(page DataLakeAnalyticsAccountListResultPage) DataLakeAnalyticsAccountListResultIterator {
1198 return DataLakeAnalyticsAccountListResultIterator{page: page}
1199 }
1200
1201
1202 func (dlaalr DataLakeAnalyticsAccountListResult) IsEmpty() bool {
1203 return dlaalr.Value == nil || len(*dlaalr.Value) == 0
1204 }
1205
1206
1207 func (dlaalr DataLakeAnalyticsAccountListResult) hasNextLink() bool {
1208 return dlaalr.NextLink != nil && len(*dlaalr.NextLink) != 0
1209 }
1210
1211
1212
1213 func (dlaalr DataLakeAnalyticsAccountListResult) dataLakeAnalyticsAccountListResultPreparer(ctx context.Context) (*http.Request, error) {
1214 if !dlaalr.hasNextLink() {
1215 return nil, nil
1216 }
1217 return autorest.Prepare((&http.Request{}).WithContext(ctx),
1218 autorest.AsJSON(),
1219 autorest.AsGet(),
1220 autorest.WithBaseURL(to.String(dlaalr.NextLink)))
1221 }
1222
1223
1224 type DataLakeAnalyticsAccountListResultPage struct {
1225 fn func(context.Context, DataLakeAnalyticsAccountListResult) (DataLakeAnalyticsAccountListResult, error)
1226 dlaalr DataLakeAnalyticsAccountListResult
1227 }
1228
1229
1230
1231 func (page *DataLakeAnalyticsAccountListResultPage) NextWithContext(ctx context.Context) (err error) {
1232 if tracing.IsEnabled() {
1233 ctx = tracing.StartSpan(ctx, fqdn+"/DataLakeAnalyticsAccountListResultPage.NextWithContext")
1234 defer func() {
1235 sc := -1
1236 if page.Response().Response.Response != nil {
1237 sc = page.Response().Response.Response.StatusCode
1238 }
1239 tracing.EndSpan(ctx, sc, err)
1240 }()
1241 }
1242 for {
1243 next, err := page.fn(ctx, page.dlaalr)
1244 if err != nil {
1245 return err
1246 }
1247 page.dlaalr = next
1248 if !next.hasNextLink() || !next.IsEmpty() {
1249 break
1250 }
1251 }
1252 return nil
1253 }
1254
1255
1256
1257
1258 func (page *DataLakeAnalyticsAccountListResultPage) Next() error {
1259 return page.NextWithContext(context.Background())
1260 }
1261
1262
1263 func (page DataLakeAnalyticsAccountListResultPage) NotDone() bool {
1264 return !page.dlaalr.IsEmpty()
1265 }
1266
1267
1268 func (page DataLakeAnalyticsAccountListResultPage) Response() DataLakeAnalyticsAccountListResult {
1269 return page.dlaalr
1270 }
1271
1272
1273 func (page DataLakeAnalyticsAccountListResultPage) Values() []DataLakeAnalyticsAccountBasic {
1274 if page.dlaalr.IsEmpty() {
1275 return nil
1276 }
1277 return *page.dlaalr.Value
1278 }
1279
1280
1281 func NewDataLakeAnalyticsAccountListResultPage(cur DataLakeAnalyticsAccountListResult, getNextPage func(context.Context, DataLakeAnalyticsAccountListResult) (DataLakeAnalyticsAccountListResult, error)) DataLakeAnalyticsAccountListResultPage {
1282 return DataLakeAnalyticsAccountListResultPage{
1283 fn: getNextPage,
1284 dlaalr: cur,
1285 }
1286 }
1287
1288
1289
1290 type DataLakeAnalyticsAccountProperties struct {
1291
1292 DefaultDataLakeStoreAccount *string `json:"defaultDataLakeStoreAccount,omitempty"`
1293
1294 DataLakeStoreAccounts *[]DataLakeStoreAccountInformation `json:"dataLakeStoreAccounts,omitempty"`
1295
1296 StorageAccounts *[]StorageAccountInformation `json:"storageAccounts,omitempty"`
1297
1298 ComputePolicies *[]ComputePolicy `json:"computePolicies,omitempty"`
1299
1300 FirewallRules *[]FirewallRule `json:"firewallRules,omitempty"`
1301
1302 FirewallState FirewallState `json:"firewallState,omitempty"`
1303
1304 FirewallAllowAzureIps FirewallAllowAzureIpsState `json:"firewallAllowAzureIps,omitempty"`
1305
1306 NewTier TierType `json:"newTier,omitempty"`
1307
1308 CurrentTier TierType `json:"currentTier,omitempty"`
1309
1310 MaxJobCount *int32 `json:"maxJobCount,omitempty"`
1311
1312 SystemMaxJobCount *int32 `json:"systemMaxJobCount,omitempty"`
1313
1314 MaxDegreeOfParallelism *int32 `json:"maxDegreeOfParallelism,omitempty"`
1315
1316 SystemMaxDegreeOfParallelism *int32 `json:"systemMaxDegreeOfParallelism,omitempty"`
1317
1318 MaxDegreeOfParallelismPerJob *int32 `json:"maxDegreeOfParallelismPerJob,omitempty"`
1319
1320 MinPriorityPerJob *int32 `json:"minPriorityPerJob,omitempty"`
1321
1322 QueryStoreRetention *int32 `json:"queryStoreRetention,omitempty"`
1323
1324 AccountID *uuid.UUID `json:"accountId,omitempty"`
1325
1326 ProvisioningState DataLakeAnalyticsAccountStatus `json:"provisioningState,omitempty"`
1327
1328 State DataLakeAnalyticsAccountState `json:"state,omitempty"`
1329
1330 CreationTime *date.Time `json:"creationTime,omitempty"`
1331
1332 LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
1333
1334 Endpoint *string `json:"endpoint,omitempty"`
1335 }
1336
1337
1338 func (dlaap DataLakeAnalyticsAccountProperties) MarshalJSON() ([]byte, error) {
1339 objectMap := make(map[string]interface{})
1340 return json.Marshal(objectMap)
1341 }
1342
1343
1344
1345 type DataLakeAnalyticsAccountPropertiesBasic struct {
1346
1347 AccountID *uuid.UUID `json:"accountId,omitempty"`
1348
1349 ProvisioningState DataLakeAnalyticsAccountStatus `json:"provisioningState,omitempty"`
1350
1351 State DataLakeAnalyticsAccountState `json:"state,omitempty"`
1352
1353 CreationTime *date.Time `json:"creationTime,omitempty"`
1354
1355 LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
1356
1357 Endpoint *string `json:"endpoint,omitempty"`
1358 }
1359
1360
1361 func (dlaapb DataLakeAnalyticsAccountPropertiesBasic) MarshalJSON() ([]byte, error) {
1362 objectMap := make(map[string]interface{})
1363 return json.Marshal(objectMap)
1364 }
1365
1366
1367 type DataLakeStoreAccountInformation struct {
1368 autorest.Response `json:"-"`
1369
1370 *DataLakeStoreAccountInformationProperties `json:"properties,omitempty"`
1371
1372 ID *string `json:"id,omitempty"`
1373
1374 Name *string `json:"name,omitempty"`
1375
1376 Type *string `json:"type,omitempty"`
1377 }
1378
1379
1380 func (dlsai DataLakeStoreAccountInformation) MarshalJSON() ([]byte, error) {
1381 objectMap := make(map[string]interface{})
1382 return json.Marshal(objectMap)
1383 }
1384
1385
1386 func (dlsai *DataLakeStoreAccountInformation) UnmarshalJSON(body []byte) error {
1387 var m map[string]*json.RawMessage
1388 err := json.Unmarshal(body, &m)
1389 if err != nil {
1390 return err
1391 }
1392 for k, v := range m {
1393 switch k {
1394 case "properties":
1395 if v != nil {
1396 var dataLakeStoreAccountInformationProperties DataLakeStoreAccountInformationProperties
1397 err = json.Unmarshal(*v, &dataLakeStoreAccountInformationProperties)
1398 if err != nil {
1399 return err
1400 }
1401 dlsai.DataLakeStoreAccountInformationProperties = &dataLakeStoreAccountInformationProperties
1402 }
1403 case "id":
1404 if v != nil {
1405 var ID string
1406 err = json.Unmarshal(*v, &ID)
1407 if err != nil {
1408 return err
1409 }
1410 dlsai.ID = &ID
1411 }
1412 case "name":
1413 if v != nil {
1414 var name string
1415 err = json.Unmarshal(*v, &name)
1416 if err != nil {
1417 return err
1418 }
1419 dlsai.Name = &name
1420 }
1421 case "type":
1422 if v != nil {
1423 var typeVar string
1424 err = json.Unmarshal(*v, &typeVar)
1425 if err != nil {
1426 return err
1427 }
1428 dlsai.Type = &typeVar
1429 }
1430 }
1431 }
1432
1433 return nil
1434 }
1435
1436
1437 type DataLakeStoreAccountInformationListResult struct {
1438 autorest.Response `json:"-"`
1439
1440 Value *[]DataLakeStoreAccountInformation `json:"value,omitempty"`
1441
1442 NextLink *string `json:"nextLink,omitempty"`
1443 }
1444
1445
1446 func (dlsailr DataLakeStoreAccountInformationListResult) MarshalJSON() ([]byte, error) {
1447 objectMap := make(map[string]interface{})
1448 return json.Marshal(objectMap)
1449 }
1450
1451
1452
1453 type DataLakeStoreAccountInformationListResultIterator struct {
1454 i int
1455 page DataLakeStoreAccountInformationListResultPage
1456 }
1457
1458
1459
1460 func (iter *DataLakeStoreAccountInformationListResultIterator) NextWithContext(ctx context.Context) (err error) {
1461 if tracing.IsEnabled() {
1462 ctx = tracing.StartSpan(ctx, fqdn+"/DataLakeStoreAccountInformationListResultIterator.NextWithContext")
1463 defer func() {
1464 sc := -1
1465 if iter.Response().Response.Response != nil {
1466 sc = iter.Response().Response.Response.StatusCode
1467 }
1468 tracing.EndSpan(ctx, sc, err)
1469 }()
1470 }
1471 iter.i++
1472 if iter.i < len(iter.page.Values()) {
1473 return nil
1474 }
1475 err = iter.page.NextWithContext(ctx)
1476 if err != nil {
1477 iter.i--
1478 return err
1479 }
1480 iter.i = 0
1481 return nil
1482 }
1483
1484
1485
1486
1487 func (iter *DataLakeStoreAccountInformationListResultIterator) Next() error {
1488 return iter.NextWithContext(context.Background())
1489 }
1490
1491
1492 func (iter DataLakeStoreAccountInformationListResultIterator) NotDone() bool {
1493 return iter.page.NotDone() && iter.i < len(iter.page.Values())
1494 }
1495
1496
1497 func (iter DataLakeStoreAccountInformationListResultIterator) Response() DataLakeStoreAccountInformationListResult {
1498 return iter.page.Response()
1499 }
1500
1501
1502
1503 func (iter DataLakeStoreAccountInformationListResultIterator) Value() DataLakeStoreAccountInformation {
1504 if !iter.page.NotDone() {
1505 return DataLakeStoreAccountInformation{}
1506 }
1507 return iter.page.Values()[iter.i]
1508 }
1509
1510
1511 func NewDataLakeStoreAccountInformationListResultIterator(page DataLakeStoreAccountInformationListResultPage) DataLakeStoreAccountInformationListResultIterator {
1512 return DataLakeStoreAccountInformationListResultIterator{page: page}
1513 }
1514
1515
1516 func (dlsailr DataLakeStoreAccountInformationListResult) IsEmpty() bool {
1517 return dlsailr.Value == nil || len(*dlsailr.Value) == 0
1518 }
1519
1520
1521 func (dlsailr DataLakeStoreAccountInformationListResult) hasNextLink() bool {
1522 return dlsailr.NextLink != nil && len(*dlsailr.NextLink) != 0
1523 }
1524
1525
1526
1527 func (dlsailr DataLakeStoreAccountInformationListResult) dataLakeStoreAccountInformationListResultPreparer(ctx context.Context) (*http.Request, error) {
1528 if !dlsailr.hasNextLink() {
1529 return nil, nil
1530 }
1531 return autorest.Prepare((&http.Request{}).WithContext(ctx),
1532 autorest.AsJSON(),
1533 autorest.AsGet(),
1534 autorest.WithBaseURL(to.String(dlsailr.NextLink)))
1535 }
1536
1537
1538 type DataLakeStoreAccountInformationListResultPage struct {
1539 fn func(context.Context, DataLakeStoreAccountInformationListResult) (DataLakeStoreAccountInformationListResult, error)
1540 dlsailr DataLakeStoreAccountInformationListResult
1541 }
1542
1543
1544
1545 func (page *DataLakeStoreAccountInformationListResultPage) NextWithContext(ctx context.Context) (err error) {
1546 if tracing.IsEnabled() {
1547 ctx = tracing.StartSpan(ctx, fqdn+"/DataLakeStoreAccountInformationListResultPage.NextWithContext")
1548 defer func() {
1549 sc := -1
1550 if page.Response().Response.Response != nil {
1551 sc = page.Response().Response.Response.StatusCode
1552 }
1553 tracing.EndSpan(ctx, sc, err)
1554 }()
1555 }
1556 for {
1557 next, err := page.fn(ctx, page.dlsailr)
1558 if err != nil {
1559 return err
1560 }
1561 page.dlsailr = next
1562 if !next.hasNextLink() || !next.IsEmpty() {
1563 break
1564 }
1565 }
1566 return nil
1567 }
1568
1569
1570
1571
1572 func (page *DataLakeStoreAccountInformationListResultPage) Next() error {
1573 return page.NextWithContext(context.Background())
1574 }
1575
1576
1577 func (page DataLakeStoreAccountInformationListResultPage) NotDone() bool {
1578 return !page.dlsailr.IsEmpty()
1579 }
1580
1581
1582 func (page DataLakeStoreAccountInformationListResultPage) Response() DataLakeStoreAccountInformationListResult {
1583 return page.dlsailr
1584 }
1585
1586
1587 func (page DataLakeStoreAccountInformationListResultPage) Values() []DataLakeStoreAccountInformation {
1588 if page.dlsailr.IsEmpty() {
1589 return nil
1590 }
1591 return *page.dlsailr.Value
1592 }
1593
1594
1595 func NewDataLakeStoreAccountInformationListResultPage(cur DataLakeStoreAccountInformationListResult, getNextPage func(context.Context, DataLakeStoreAccountInformationListResult) (DataLakeStoreAccountInformationListResult, error)) DataLakeStoreAccountInformationListResultPage {
1596 return DataLakeStoreAccountInformationListResultPage{
1597 fn: getNextPage,
1598 dlsailr: cur,
1599 }
1600 }
1601
1602
1603 type DataLakeStoreAccountInformationProperties struct {
1604
1605 Suffix *string `json:"suffix,omitempty"`
1606 }
1607
1608
1609 func (dlsaip DataLakeStoreAccountInformationProperties) MarshalJSON() ([]byte, error) {
1610 objectMap := make(map[string]interface{})
1611 return json.Marshal(objectMap)
1612 }
1613
1614
1615 type FirewallRule struct {
1616 autorest.Response `json:"-"`
1617
1618 *FirewallRuleProperties `json:"properties,omitempty"`
1619
1620 ID *string `json:"id,omitempty"`
1621
1622 Name *string `json:"name,omitempty"`
1623
1624 Type *string `json:"type,omitempty"`
1625 }
1626
1627
1628 func (fr FirewallRule) MarshalJSON() ([]byte, error) {
1629 objectMap := make(map[string]interface{})
1630 return json.Marshal(objectMap)
1631 }
1632
1633
1634 func (fr *FirewallRule) UnmarshalJSON(body []byte) error {
1635 var m map[string]*json.RawMessage
1636 err := json.Unmarshal(body, &m)
1637 if err != nil {
1638 return err
1639 }
1640 for k, v := range m {
1641 switch k {
1642 case "properties":
1643 if v != nil {
1644 var firewallRuleProperties FirewallRuleProperties
1645 err = json.Unmarshal(*v, &firewallRuleProperties)
1646 if err != nil {
1647 return err
1648 }
1649 fr.FirewallRuleProperties = &firewallRuleProperties
1650 }
1651 case "id":
1652 if v != nil {
1653 var ID string
1654 err = json.Unmarshal(*v, &ID)
1655 if err != nil {
1656 return err
1657 }
1658 fr.ID = &ID
1659 }
1660 case "name":
1661 if v != nil {
1662 var name string
1663 err = json.Unmarshal(*v, &name)
1664 if err != nil {
1665 return err
1666 }
1667 fr.Name = &name
1668 }
1669 case "type":
1670 if v != nil {
1671 var typeVar string
1672 err = json.Unmarshal(*v, &typeVar)
1673 if err != nil {
1674 return err
1675 }
1676 fr.Type = &typeVar
1677 }
1678 }
1679 }
1680
1681 return nil
1682 }
1683
1684
1685 type FirewallRuleListResult struct {
1686 autorest.Response `json:"-"`
1687
1688 Value *[]FirewallRule `json:"value,omitempty"`
1689
1690 NextLink *string `json:"nextLink,omitempty"`
1691 }
1692
1693
1694 func (frlr FirewallRuleListResult) MarshalJSON() ([]byte, error) {
1695 objectMap := make(map[string]interface{})
1696 return json.Marshal(objectMap)
1697 }
1698
1699
1700 type FirewallRuleListResultIterator struct {
1701 i int
1702 page FirewallRuleListResultPage
1703 }
1704
1705
1706
1707 func (iter *FirewallRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
1708 if tracing.IsEnabled() {
1709 ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRuleListResultIterator.NextWithContext")
1710 defer func() {
1711 sc := -1
1712 if iter.Response().Response.Response != nil {
1713 sc = iter.Response().Response.Response.StatusCode
1714 }
1715 tracing.EndSpan(ctx, sc, err)
1716 }()
1717 }
1718 iter.i++
1719 if iter.i < len(iter.page.Values()) {
1720 return nil
1721 }
1722 err = iter.page.NextWithContext(ctx)
1723 if err != nil {
1724 iter.i--
1725 return err
1726 }
1727 iter.i = 0
1728 return nil
1729 }
1730
1731
1732
1733
1734 func (iter *FirewallRuleListResultIterator) Next() error {
1735 return iter.NextWithContext(context.Background())
1736 }
1737
1738
1739 func (iter FirewallRuleListResultIterator) NotDone() bool {
1740 return iter.page.NotDone() && iter.i < len(iter.page.Values())
1741 }
1742
1743
1744 func (iter FirewallRuleListResultIterator) Response() FirewallRuleListResult {
1745 return iter.page.Response()
1746 }
1747
1748
1749
1750 func (iter FirewallRuleListResultIterator) Value() FirewallRule {
1751 if !iter.page.NotDone() {
1752 return FirewallRule{}
1753 }
1754 return iter.page.Values()[iter.i]
1755 }
1756
1757
1758 func NewFirewallRuleListResultIterator(page FirewallRuleListResultPage) FirewallRuleListResultIterator {
1759 return FirewallRuleListResultIterator{page: page}
1760 }
1761
1762
1763 func (frlr FirewallRuleListResult) IsEmpty() bool {
1764 return frlr.Value == nil || len(*frlr.Value) == 0
1765 }
1766
1767
1768 func (frlr FirewallRuleListResult) hasNextLink() bool {
1769 return frlr.NextLink != nil && len(*frlr.NextLink) != 0
1770 }
1771
1772
1773
1774 func (frlr FirewallRuleListResult) firewallRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
1775 if !frlr.hasNextLink() {
1776 return nil, nil
1777 }
1778 return autorest.Prepare((&http.Request{}).WithContext(ctx),
1779 autorest.AsJSON(),
1780 autorest.AsGet(),
1781 autorest.WithBaseURL(to.String(frlr.NextLink)))
1782 }
1783
1784
1785 type FirewallRuleListResultPage struct {
1786 fn func(context.Context, FirewallRuleListResult) (FirewallRuleListResult, error)
1787 frlr FirewallRuleListResult
1788 }
1789
1790
1791
1792 func (page *FirewallRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
1793 if tracing.IsEnabled() {
1794 ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRuleListResultPage.NextWithContext")
1795 defer func() {
1796 sc := -1
1797 if page.Response().Response.Response != nil {
1798 sc = page.Response().Response.Response.StatusCode
1799 }
1800 tracing.EndSpan(ctx, sc, err)
1801 }()
1802 }
1803 for {
1804 next, err := page.fn(ctx, page.frlr)
1805 if err != nil {
1806 return err
1807 }
1808 page.frlr = next
1809 if !next.hasNextLink() || !next.IsEmpty() {
1810 break
1811 }
1812 }
1813 return nil
1814 }
1815
1816
1817
1818
1819 func (page *FirewallRuleListResultPage) Next() error {
1820 return page.NextWithContext(context.Background())
1821 }
1822
1823
1824 func (page FirewallRuleListResultPage) NotDone() bool {
1825 return !page.frlr.IsEmpty()
1826 }
1827
1828
1829 func (page FirewallRuleListResultPage) Response() FirewallRuleListResult {
1830 return page.frlr
1831 }
1832
1833
1834 func (page FirewallRuleListResultPage) Values() []FirewallRule {
1835 if page.frlr.IsEmpty() {
1836 return nil
1837 }
1838 return *page.frlr.Value
1839 }
1840
1841
1842 func NewFirewallRuleListResultPage(cur FirewallRuleListResult, getNextPage func(context.Context, FirewallRuleListResult) (FirewallRuleListResult, error)) FirewallRuleListResultPage {
1843 return FirewallRuleListResultPage{
1844 fn: getNextPage,
1845 frlr: cur,
1846 }
1847 }
1848
1849
1850 type FirewallRuleProperties struct {
1851
1852 StartIPAddress *string `json:"startIpAddress,omitempty"`
1853
1854 EndIPAddress *string `json:"endIpAddress,omitempty"`
1855 }
1856
1857
1858 func (frp FirewallRuleProperties) MarshalJSON() ([]byte, error) {
1859 objectMap := make(map[string]interface{})
1860 return json.Marshal(objectMap)
1861 }
1862
1863
1864 type NameAvailabilityInformation struct {
1865 autorest.Response `json:"-"`
1866
1867 NameAvailable *bool `json:"nameAvailable,omitempty"`
1868
1869 Reason *string `json:"reason,omitempty"`
1870
1871 Message *string `json:"message,omitempty"`
1872 }
1873
1874
1875 func (nai NameAvailabilityInformation) MarshalJSON() ([]byte, error) {
1876 objectMap := make(map[string]interface{})
1877 return json.Marshal(objectMap)
1878 }
1879
1880
1881 type Operation struct {
1882
1883 Name *string `json:"name,omitempty"`
1884
1885 Display *OperationDisplay `json:"display,omitempty"`
1886
1887 Origin OperationOrigin `json:"origin,omitempty"`
1888 }
1889
1890
1891 func (o Operation) MarshalJSON() ([]byte, error) {
1892 objectMap := make(map[string]interface{})
1893 return json.Marshal(objectMap)
1894 }
1895
1896
1897 type OperationDisplay struct {
1898
1899 Provider *string `json:"provider,omitempty"`
1900
1901 Resource *string `json:"resource,omitempty"`
1902
1903 Operation *string `json:"operation,omitempty"`
1904
1905 Description *string `json:"description,omitempty"`
1906 }
1907
1908
1909 func (od OperationDisplay) MarshalJSON() ([]byte, error) {
1910 objectMap := make(map[string]interface{})
1911 return json.Marshal(objectMap)
1912 }
1913
1914
1915 type OperationListResult struct {
1916 autorest.Response `json:"-"`
1917
1918 Value *[]Operation `json:"value,omitempty"`
1919
1920 NextLink *string `json:"nextLink,omitempty"`
1921 }
1922
1923
1924 func (olr OperationListResult) MarshalJSON() ([]byte, error) {
1925 objectMap := make(map[string]interface{})
1926 return json.Marshal(objectMap)
1927 }
1928
1929
1930 type Resource struct {
1931
1932 ID *string `json:"id,omitempty"`
1933
1934 Name *string `json:"name,omitempty"`
1935
1936 Type *string `json:"type,omitempty"`
1937
1938 Location *string `json:"location,omitempty"`
1939
1940 Tags map[string]*string `json:"tags"`
1941 }
1942
1943
1944 func (r Resource) MarshalJSON() ([]byte, error) {
1945 objectMap := make(map[string]interface{})
1946 return json.Marshal(objectMap)
1947 }
1948
1949
1950 type SasTokenInformation struct {
1951
1952 AccessToken *string `json:"accessToken,omitempty"`
1953 }
1954
1955
1956 func (sti SasTokenInformation) MarshalJSON() ([]byte, error) {
1957 objectMap := make(map[string]interface{})
1958 return json.Marshal(objectMap)
1959 }
1960
1961
1962
1963 type SasTokenInformationListResult struct {
1964 autorest.Response `json:"-"`
1965
1966 Value *[]SasTokenInformation `json:"value,omitempty"`
1967
1968 NextLink *string `json:"nextLink,omitempty"`
1969 }
1970
1971
1972 func (stilr SasTokenInformationListResult) MarshalJSON() ([]byte, error) {
1973 objectMap := make(map[string]interface{})
1974 return json.Marshal(objectMap)
1975 }
1976
1977
1978
1979 type SasTokenInformationListResultIterator struct {
1980 i int
1981 page SasTokenInformationListResultPage
1982 }
1983
1984
1985
1986 func (iter *SasTokenInformationListResultIterator) NextWithContext(ctx context.Context) (err error) {
1987 if tracing.IsEnabled() {
1988 ctx = tracing.StartSpan(ctx, fqdn+"/SasTokenInformationListResultIterator.NextWithContext")
1989 defer func() {
1990 sc := -1
1991 if iter.Response().Response.Response != nil {
1992 sc = iter.Response().Response.Response.StatusCode
1993 }
1994 tracing.EndSpan(ctx, sc, err)
1995 }()
1996 }
1997 iter.i++
1998 if iter.i < len(iter.page.Values()) {
1999 return nil
2000 }
2001 err = iter.page.NextWithContext(ctx)
2002 if err != nil {
2003 iter.i--
2004 return err
2005 }
2006 iter.i = 0
2007 return nil
2008 }
2009
2010
2011
2012
2013 func (iter *SasTokenInformationListResultIterator) Next() error {
2014 return iter.NextWithContext(context.Background())
2015 }
2016
2017
2018 func (iter SasTokenInformationListResultIterator) NotDone() bool {
2019 return iter.page.NotDone() && iter.i < len(iter.page.Values())
2020 }
2021
2022
2023 func (iter SasTokenInformationListResultIterator) Response() SasTokenInformationListResult {
2024 return iter.page.Response()
2025 }
2026
2027
2028
2029 func (iter SasTokenInformationListResultIterator) Value() SasTokenInformation {
2030 if !iter.page.NotDone() {
2031 return SasTokenInformation{}
2032 }
2033 return iter.page.Values()[iter.i]
2034 }
2035
2036
2037 func NewSasTokenInformationListResultIterator(page SasTokenInformationListResultPage) SasTokenInformationListResultIterator {
2038 return SasTokenInformationListResultIterator{page: page}
2039 }
2040
2041
2042 func (stilr SasTokenInformationListResult) IsEmpty() bool {
2043 return stilr.Value == nil || len(*stilr.Value) == 0
2044 }
2045
2046
2047 func (stilr SasTokenInformationListResult) hasNextLink() bool {
2048 return stilr.NextLink != nil && len(*stilr.NextLink) != 0
2049 }
2050
2051
2052
2053 func (stilr SasTokenInformationListResult) sasTokenInformationListResultPreparer(ctx context.Context) (*http.Request, error) {
2054 if !stilr.hasNextLink() {
2055 return nil, nil
2056 }
2057 return autorest.Prepare((&http.Request{}).WithContext(ctx),
2058 autorest.AsJSON(),
2059 autorest.AsGet(),
2060 autorest.WithBaseURL(to.String(stilr.NextLink)))
2061 }
2062
2063
2064 type SasTokenInformationListResultPage struct {
2065 fn func(context.Context, SasTokenInformationListResult) (SasTokenInformationListResult, error)
2066 stilr SasTokenInformationListResult
2067 }
2068
2069
2070
2071 func (page *SasTokenInformationListResultPage) NextWithContext(ctx context.Context) (err error) {
2072 if tracing.IsEnabled() {
2073 ctx = tracing.StartSpan(ctx, fqdn+"/SasTokenInformationListResultPage.NextWithContext")
2074 defer func() {
2075 sc := -1
2076 if page.Response().Response.Response != nil {
2077 sc = page.Response().Response.Response.StatusCode
2078 }
2079 tracing.EndSpan(ctx, sc, err)
2080 }()
2081 }
2082 for {
2083 next, err := page.fn(ctx, page.stilr)
2084 if err != nil {
2085 return err
2086 }
2087 page.stilr = next
2088 if !next.hasNextLink() || !next.IsEmpty() {
2089 break
2090 }
2091 }
2092 return nil
2093 }
2094
2095
2096
2097
2098 func (page *SasTokenInformationListResultPage) Next() error {
2099 return page.NextWithContext(context.Background())
2100 }
2101
2102
2103 func (page SasTokenInformationListResultPage) NotDone() bool {
2104 return !page.stilr.IsEmpty()
2105 }
2106
2107
2108 func (page SasTokenInformationListResultPage) Response() SasTokenInformationListResult {
2109 return page.stilr
2110 }
2111
2112
2113 func (page SasTokenInformationListResultPage) Values() []SasTokenInformation {
2114 if page.stilr.IsEmpty() {
2115 return nil
2116 }
2117 return *page.stilr.Value
2118 }
2119
2120
2121 func NewSasTokenInformationListResultPage(cur SasTokenInformationListResult, getNextPage func(context.Context, SasTokenInformationListResult) (SasTokenInformationListResult, error)) SasTokenInformationListResultPage {
2122 return SasTokenInformationListResultPage{
2123 fn: getNextPage,
2124 stilr: cur,
2125 }
2126 }
2127
2128
2129 type StorageAccountInformation struct {
2130 autorest.Response `json:"-"`
2131
2132 *StorageAccountInformationProperties `json:"properties,omitempty"`
2133
2134 ID *string `json:"id,omitempty"`
2135
2136 Name *string `json:"name,omitempty"`
2137
2138 Type *string `json:"type,omitempty"`
2139 }
2140
2141
2142 func (sai StorageAccountInformation) MarshalJSON() ([]byte, error) {
2143 objectMap := make(map[string]interface{})
2144 return json.Marshal(objectMap)
2145 }
2146
2147
2148 func (sai *StorageAccountInformation) UnmarshalJSON(body []byte) error {
2149 var m map[string]*json.RawMessage
2150 err := json.Unmarshal(body, &m)
2151 if err != nil {
2152 return err
2153 }
2154 for k, v := range m {
2155 switch k {
2156 case "properties":
2157 if v != nil {
2158 var storageAccountInformationProperties StorageAccountInformationProperties
2159 err = json.Unmarshal(*v, &storageAccountInformationProperties)
2160 if err != nil {
2161 return err
2162 }
2163 sai.StorageAccountInformationProperties = &storageAccountInformationProperties
2164 }
2165 case "id":
2166 if v != nil {
2167 var ID string
2168 err = json.Unmarshal(*v, &ID)
2169 if err != nil {
2170 return err
2171 }
2172 sai.ID = &ID
2173 }
2174 case "name":
2175 if v != nil {
2176 var name string
2177 err = json.Unmarshal(*v, &name)
2178 if err != nil {
2179 return err
2180 }
2181 sai.Name = &name
2182 }
2183 case "type":
2184 if v != nil {
2185 var typeVar string
2186 err = json.Unmarshal(*v, &typeVar)
2187 if err != nil {
2188 return err
2189 }
2190 sai.Type = &typeVar
2191 }
2192 }
2193 }
2194
2195 return nil
2196 }
2197
2198
2199 type StorageAccountInformationListResult struct {
2200 autorest.Response `json:"-"`
2201
2202 Value *[]StorageAccountInformation `json:"value,omitempty"`
2203
2204 NextLink *string `json:"nextLink,omitempty"`
2205 }
2206
2207
2208 func (sailr StorageAccountInformationListResult) MarshalJSON() ([]byte, error) {
2209 objectMap := make(map[string]interface{})
2210 return json.Marshal(objectMap)
2211 }
2212
2213
2214
2215 type StorageAccountInformationListResultIterator struct {
2216 i int
2217 page StorageAccountInformationListResultPage
2218 }
2219
2220
2221
2222 func (iter *StorageAccountInformationListResultIterator) NextWithContext(ctx context.Context) (err error) {
2223 if tracing.IsEnabled() {
2224 ctx = tracing.StartSpan(ctx, fqdn+"/StorageAccountInformationListResultIterator.NextWithContext")
2225 defer func() {
2226 sc := -1
2227 if iter.Response().Response.Response != nil {
2228 sc = iter.Response().Response.Response.StatusCode
2229 }
2230 tracing.EndSpan(ctx, sc, err)
2231 }()
2232 }
2233 iter.i++
2234 if iter.i < len(iter.page.Values()) {
2235 return nil
2236 }
2237 err = iter.page.NextWithContext(ctx)
2238 if err != nil {
2239 iter.i--
2240 return err
2241 }
2242 iter.i = 0
2243 return nil
2244 }
2245
2246
2247
2248
2249 func (iter *StorageAccountInformationListResultIterator) Next() error {
2250 return iter.NextWithContext(context.Background())
2251 }
2252
2253
2254 func (iter StorageAccountInformationListResultIterator) NotDone() bool {
2255 return iter.page.NotDone() && iter.i < len(iter.page.Values())
2256 }
2257
2258
2259 func (iter StorageAccountInformationListResultIterator) Response() StorageAccountInformationListResult {
2260 return iter.page.Response()
2261 }
2262
2263
2264
2265 func (iter StorageAccountInformationListResultIterator) Value() StorageAccountInformation {
2266 if !iter.page.NotDone() {
2267 return StorageAccountInformation{}
2268 }
2269 return iter.page.Values()[iter.i]
2270 }
2271
2272
2273 func NewStorageAccountInformationListResultIterator(page StorageAccountInformationListResultPage) StorageAccountInformationListResultIterator {
2274 return StorageAccountInformationListResultIterator{page: page}
2275 }
2276
2277
2278 func (sailr StorageAccountInformationListResult) IsEmpty() bool {
2279 return sailr.Value == nil || len(*sailr.Value) == 0
2280 }
2281
2282
2283 func (sailr StorageAccountInformationListResult) hasNextLink() bool {
2284 return sailr.NextLink != nil && len(*sailr.NextLink) != 0
2285 }
2286
2287
2288
2289 func (sailr StorageAccountInformationListResult) storageAccountInformationListResultPreparer(ctx context.Context) (*http.Request, error) {
2290 if !sailr.hasNextLink() {
2291 return nil, nil
2292 }
2293 return autorest.Prepare((&http.Request{}).WithContext(ctx),
2294 autorest.AsJSON(),
2295 autorest.AsGet(),
2296 autorest.WithBaseURL(to.String(sailr.NextLink)))
2297 }
2298
2299
2300 type StorageAccountInformationListResultPage struct {
2301 fn func(context.Context, StorageAccountInformationListResult) (StorageAccountInformationListResult, error)
2302 sailr StorageAccountInformationListResult
2303 }
2304
2305
2306
2307 func (page *StorageAccountInformationListResultPage) NextWithContext(ctx context.Context) (err error) {
2308 if tracing.IsEnabled() {
2309 ctx = tracing.StartSpan(ctx, fqdn+"/StorageAccountInformationListResultPage.NextWithContext")
2310 defer func() {
2311 sc := -1
2312 if page.Response().Response.Response != nil {
2313 sc = page.Response().Response.Response.StatusCode
2314 }
2315 tracing.EndSpan(ctx, sc, err)
2316 }()
2317 }
2318 for {
2319 next, err := page.fn(ctx, page.sailr)
2320 if err != nil {
2321 return err
2322 }
2323 page.sailr = next
2324 if !next.hasNextLink() || !next.IsEmpty() {
2325 break
2326 }
2327 }
2328 return nil
2329 }
2330
2331
2332
2333
2334 func (page *StorageAccountInformationListResultPage) Next() error {
2335 return page.NextWithContext(context.Background())
2336 }
2337
2338
2339 func (page StorageAccountInformationListResultPage) NotDone() bool {
2340 return !page.sailr.IsEmpty()
2341 }
2342
2343
2344 func (page StorageAccountInformationListResultPage) Response() StorageAccountInformationListResult {
2345 return page.sailr
2346 }
2347
2348
2349 func (page StorageAccountInformationListResultPage) Values() []StorageAccountInformation {
2350 if page.sailr.IsEmpty() {
2351 return nil
2352 }
2353 return *page.sailr.Value
2354 }
2355
2356
2357 func NewStorageAccountInformationListResultPage(cur StorageAccountInformationListResult, getNextPage func(context.Context, StorageAccountInformationListResult) (StorageAccountInformationListResult, error)) StorageAccountInformationListResultPage {
2358 return StorageAccountInformationListResultPage{
2359 fn: getNextPage,
2360 sailr: cur,
2361 }
2362 }
2363
2364
2365 type StorageAccountInformationProperties struct {
2366
2367 Suffix *string `json:"suffix,omitempty"`
2368 }
2369
2370
2371 func (saip StorageAccountInformationProperties) MarshalJSON() ([]byte, error) {
2372 objectMap := make(map[string]interface{})
2373 return json.Marshal(objectMap)
2374 }
2375
2376
2377 type StorageContainer struct {
2378 autorest.Response `json:"-"`
2379
2380 *StorageContainerProperties `json:"properties,omitempty"`
2381
2382 ID *string `json:"id,omitempty"`
2383
2384 Name *string `json:"name,omitempty"`
2385
2386 Type *string `json:"type,omitempty"`
2387 }
2388
2389
2390 func (sc StorageContainer) MarshalJSON() ([]byte, error) {
2391 objectMap := make(map[string]interface{})
2392 return json.Marshal(objectMap)
2393 }
2394
2395
2396 func (sc *StorageContainer) UnmarshalJSON(body []byte) error {
2397 var m map[string]*json.RawMessage
2398 err := json.Unmarshal(body, &m)
2399 if err != nil {
2400 return err
2401 }
2402 for k, v := range m {
2403 switch k {
2404 case "properties":
2405 if v != nil {
2406 var storageContainerProperties StorageContainerProperties
2407 err = json.Unmarshal(*v, &storageContainerProperties)
2408 if err != nil {
2409 return err
2410 }
2411 sc.StorageContainerProperties = &storageContainerProperties
2412 }
2413 case "id":
2414 if v != nil {
2415 var ID string
2416 err = json.Unmarshal(*v, &ID)
2417 if err != nil {
2418 return err
2419 }
2420 sc.ID = &ID
2421 }
2422 case "name":
2423 if v != nil {
2424 var name string
2425 err = json.Unmarshal(*v, &name)
2426 if err != nil {
2427 return err
2428 }
2429 sc.Name = &name
2430 }
2431 case "type":
2432 if v != nil {
2433 var typeVar string
2434 err = json.Unmarshal(*v, &typeVar)
2435 if err != nil {
2436 return err
2437 }
2438 sc.Type = &typeVar
2439 }
2440 }
2441 }
2442
2443 return nil
2444 }
2445
2446
2447
2448 type StorageContainerListResult struct {
2449 autorest.Response `json:"-"`
2450
2451 Value *[]StorageContainer `json:"value,omitempty"`
2452
2453 NextLink *string `json:"nextLink,omitempty"`
2454 }
2455
2456
2457 func (sclr StorageContainerListResult) MarshalJSON() ([]byte, error) {
2458 objectMap := make(map[string]interface{})
2459 return json.Marshal(objectMap)
2460 }
2461
2462
2463 type StorageContainerListResultIterator struct {
2464 i int
2465 page StorageContainerListResultPage
2466 }
2467
2468
2469
2470 func (iter *StorageContainerListResultIterator) NextWithContext(ctx context.Context) (err error) {
2471 if tracing.IsEnabled() {
2472 ctx = tracing.StartSpan(ctx, fqdn+"/StorageContainerListResultIterator.NextWithContext")
2473 defer func() {
2474 sc := -1
2475 if iter.Response().Response.Response != nil {
2476 sc = iter.Response().Response.Response.StatusCode
2477 }
2478 tracing.EndSpan(ctx, sc, err)
2479 }()
2480 }
2481 iter.i++
2482 if iter.i < len(iter.page.Values()) {
2483 return nil
2484 }
2485 err = iter.page.NextWithContext(ctx)
2486 if err != nil {
2487 iter.i--
2488 return err
2489 }
2490 iter.i = 0
2491 return nil
2492 }
2493
2494
2495
2496
2497 func (iter *StorageContainerListResultIterator) Next() error {
2498 return iter.NextWithContext(context.Background())
2499 }
2500
2501
2502 func (iter StorageContainerListResultIterator) NotDone() bool {
2503 return iter.page.NotDone() && iter.i < len(iter.page.Values())
2504 }
2505
2506
2507 func (iter StorageContainerListResultIterator) Response() StorageContainerListResult {
2508 return iter.page.Response()
2509 }
2510
2511
2512
2513 func (iter StorageContainerListResultIterator) Value() StorageContainer {
2514 if !iter.page.NotDone() {
2515 return StorageContainer{}
2516 }
2517 return iter.page.Values()[iter.i]
2518 }
2519
2520
2521 func NewStorageContainerListResultIterator(page StorageContainerListResultPage) StorageContainerListResultIterator {
2522 return StorageContainerListResultIterator{page: page}
2523 }
2524
2525
2526 func (sclr StorageContainerListResult) IsEmpty() bool {
2527 return sclr.Value == nil || len(*sclr.Value) == 0
2528 }
2529
2530
2531 func (sclr StorageContainerListResult) hasNextLink() bool {
2532 return sclr.NextLink != nil && len(*sclr.NextLink) != 0
2533 }
2534
2535
2536
2537 func (sclr StorageContainerListResult) storageContainerListResultPreparer(ctx context.Context) (*http.Request, error) {
2538 if !sclr.hasNextLink() {
2539 return nil, nil
2540 }
2541 return autorest.Prepare((&http.Request{}).WithContext(ctx),
2542 autorest.AsJSON(),
2543 autorest.AsGet(),
2544 autorest.WithBaseURL(to.String(sclr.NextLink)))
2545 }
2546
2547
2548 type StorageContainerListResultPage struct {
2549 fn func(context.Context, StorageContainerListResult) (StorageContainerListResult, error)
2550 sclr StorageContainerListResult
2551 }
2552
2553
2554
2555 func (page *StorageContainerListResultPage) NextWithContext(ctx context.Context) (err error) {
2556 if tracing.IsEnabled() {
2557 ctx = tracing.StartSpan(ctx, fqdn+"/StorageContainerListResultPage.NextWithContext")
2558 defer func() {
2559 sc := -1
2560 if page.Response().Response.Response != nil {
2561 sc = page.Response().Response.Response.StatusCode
2562 }
2563 tracing.EndSpan(ctx, sc, err)
2564 }()
2565 }
2566 for {
2567 next, err := page.fn(ctx, page.sclr)
2568 if err != nil {
2569 return err
2570 }
2571 page.sclr = next
2572 if !next.hasNextLink() || !next.IsEmpty() {
2573 break
2574 }
2575 }
2576 return nil
2577 }
2578
2579
2580
2581
2582 func (page *StorageContainerListResultPage) Next() error {
2583 return page.NextWithContext(context.Background())
2584 }
2585
2586
2587 func (page StorageContainerListResultPage) NotDone() bool {
2588 return !page.sclr.IsEmpty()
2589 }
2590
2591
2592 func (page StorageContainerListResultPage) Response() StorageContainerListResult {
2593 return page.sclr
2594 }
2595
2596
2597 func (page StorageContainerListResultPage) Values() []StorageContainer {
2598 if page.sclr.IsEmpty() {
2599 return nil
2600 }
2601 return *page.sclr.Value
2602 }
2603
2604
2605 func NewStorageContainerListResultPage(cur StorageContainerListResult, getNextPage func(context.Context, StorageContainerListResult) (StorageContainerListResult, error)) StorageContainerListResultPage {
2606 return StorageContainerListResultPage{
2607 fn: getNextPage,
2608 sclr: cur,
2609 }
2610 }
2611
2612
2613 type StorageContainerProperties struct {
2614
2615 LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
2616 }
2617
2618
2619 func (scp StorageContainerProperties) MarshalJSON() ([]byte, error) {
2620 objectMap := make(map[string]interface{})
2621 return json.Marshal(objectMap)
2622 }
2623
2624
2625 type SubResource struct {
2626
2627 ID *string `json:"id,omitempty"`
2628
2629 Name *string `json:"name,omitempty"`
2630
2631 Type *string `json:"type,omitempty"`
2632 }
2633
2634
2635 func (sr SubResource) MarshalJSON() ([]byte, error) {
2636 objectMap := make(map[string]interface{})
2637 return json.Marshal(objectMap)
2638 }
2639
2640
2641 type UpdateComputePolicyParameters struct {
2642
2643 *UpdateComputePolicyProperties `json:"properties,omitempty"`
2644 }
2645
2646
2647 func (ucpp UpdateComputePolicyParameters) MarshalJSON() ([]byte, error) {
2648 objectMap := make(map[string]interface{})
2649 if ucpp.UpdateComputePolicyProperties != nil {
2650 objectMap["properties"] = ucpp.UpdateComputePolicyProperties
2651 }
2652 return json.Marshal(objectMap)
2653 }
2654
2655
2656 func (ucpp *UpdateComputePolicyParameters) UnmarshalJSON(body []byte) error {
2657 var m map[string]*json.RawMessage
2658 err := json.Unmarshal(body, &m)
2659 if err != nil {
2660 return err
2661 }
2662 for k, v := range m {
2663 switch k {
2664 case "properties":
2665 if v != nil {
2666 var updateComputePolicyProperties UpdateComputePolicyProperties
2667 err = json.Unmarshal(*v, &updateComputePolicyProperties)
2668 if err != nil {
2669 return err
2670 }
2671 ucpp.UpdateComputePolicyProperties = &updateComputePolicyProperties
2672 }
2673 }
2674 }
2675
2676 return nil
2677 }
2678
2679
2680 type UpdateComputePolicyProperties struct {
2681
2682 ObjectID *uuid.UUID `json:"objectId,omitempty"`
2683
2684 ObjectType AADObjectType `json:"objectType,omitempty"`
2685
2686 MaxDegreeOfParallelismPerJob *int32 `json:"maxDegreeOfParallelismPerJob,omitempty"`
2687
2688 MinPriorityPerJob *int32 `json:"minPriorityPerJob,omitempty"`
2689 }
2690
2691
2692
2693 type UpdateComputePolicyWithAccountParameters struct {
2694
2695 Name *string `json:"name,omitempty"`
2696
2697 *UpdateComputePolicyProperties `json:"properties,omitempty"`
2698 }
2699
2700
2701 func (ucpwap UpdateComputePolicyWithAccountParameters) MarshalJSON() ([]byte, error) {
2702 objectMap := make(map[string]interface{})
2703 if ucpwap.Name != nil {
2704 objectMap["name"] = ucpwap.Name
2705 }
2706 if ucpwap.UpdateComputePolicyProperties != nil {
2707 objectMap["properties"] = ucpwap.UpdateComputePolicyProperties
2708 }
2709 return json.Marshal(objectMap)
2710 }
2711
2712
2713 func (ucpwap *UpdateComputePolicyWithAccountParameters) UnmarshalJSON(body []byte) error {
2714 var m map[string]*json.RawMessage
2715 err := json.Unmarshal(body, &m)
2716 if err != nil {
2717 return err
2718 }
2719 for k, v := range m {
2720 switch k {
2721 case "name":
2722 if v != nil {
2723 var name string
2724 err = json.Unmarshal(*v, &name)
2725 if err != nil {
2726 return err
2727 }
2728 ucpwap.Name = &name
2729 }
2730 case "properties":
2731 if v != nil {
2732 var updateComputePolicyProperties UpdateComputePolicyProperties
2733 err = json.Unmarshal(*v, &updateComputePolicyProperties)
2734 if err != nil {
2735 return err
2736 }
2737 ucpwap.UpdateComputePolicyProperties = &updateComputePolicyProperties
2738 }
2739 }
2740 }
2741
2742 return nil
2743 }
2744
2745
2746
2747 type UpdateDataLakeAnalyticsAccountParameters struct {
2748
2749 Tags map[string]*string `json:"tags"`
2750
2751 *UpdateDataLakeAnalyticsAccountProperties `json:"properties,omitempty"`
2752 }
2753
2754
2755 func (udlaap UpdateDataLakeAnalyticsAccountParameters) MarshalJSON() ([]byte, error) {
2756 objectMap := make(map[string]interface{})
2757 if udlaap.Tags != nil {
2758 objectMap["tags"] = udlaap.Tags
2759 }
2760 if udlaap.UpdateDataLakeAnalyticsAccountProperties != nil {
2761 objectMap["properties"] = udlaap.UpdateDataLakeAnalyticsAccountProperties
2762 }
2763 return json.Marshal(objectMap)
2764 }
2765
2766
2767 func (udlaap *UpdateDataLakeAnalyticsAccountParameters) UnmarshalJSON(body []byte) error {
2768 var m map[string]*json.RawMessage
2769 err := json.Unmarshal(body, &m)
2770 if err != nil {
2771 return err
2772 }
2773 for k, v := range m {
2774 switch k {
2775 case "tags":
2776 if v != nil {
2777 var tags map[string]*string
2778 err = json.Unmarshal(*v, &tags)
2779 if err != nil {
2780 return err
2781 }
2782 udlaap.Tags = tags
2783 }
2784 case "properties":
2785 if v != nil {
2786 var updateDataLakeAnalyticsAccountProperties UpdateDataLakeAnalyticsAccountProperties
2787 err = json.Unmarshal(*v, &updateDataLakeAnalyticsAccountProperties)
2788 if err != nil {
2789 return err
2790 }
2791 udlaap.UpdateDataLakeAnalyticsAccountProperties = &updateDataLakeAnalyticsAccountProperties
2792 }
2793 }
2794 }
2795
2796 return nil
2797 }
2798
2799
2800
2801 type UpdateDataLakeAnalyticsAccountProperties struct {
2802
2803 DataLakeStoreAccounts *[]UpdateDataLakeStoreWithAccountParameters `json:"dataLakeStoreAccounts,omitempty"`
2804
2805 StorageAccounts *[]UpdateStorageAccountWithAccountParameters `json:"storageAccounts,omitempty"`
2806
2807 ComputePolicies *[]UpdateComputePolicyWithAccountParameters `json:"computePolicies,omitempty"`
2808
2809 FirewallRules *[]UpdateFirewallRuleWithAccountParameters `json:"firewallRules,omitempty"`
2810
2811 FirewallState FirewallState `json:"firewallState,omitempty"`
2812
2813 FirewallAllowAzureIps FirewallAllowAzureIpsState `json:"firewallAllowAzureIps,omitempty"`
2814
2815 NewTier TierType `json:"newTier,omitempty"`
2816
2817 MaxJobCount *int32 `json:"maxJobCount,omitempty"`
2818
2819 MaxDegreeOfParallelism *int32 `json:"maxDegreeOfParallelism,omitempty"`
2820
2821 MaxDegreeOfParallelismPerJob *int32 `json:"maxDegreeOfParallelismPerJob,omitempty"`
2822
2823 MinPriorityPerJob *int32 `json:"minPriorityPerJob,omitempty"`
2824
2825 QueryStoreRetention *int32 `json:"queryStoreRetention,omitempty"`
2826 }
2827
2828
2829
2830 type UpdateDataLakeStoreProperties struct {
2831
2832 Suffix *string `json:"suffix,omitempty"`
2833 }
2834
2835
2836
2837 type UpdateDataLakeStoreWithAccountParameters struct {
2838
2839 Name *string `json:"name,omitempty"`
2840
2841 *UpdateDataLakeStoreProperties `json:"properties,omitempty"`
2842 }
2843
2844
2845 func (udlswap UpdateDataLakeStoreWithAccountParameters) MarshalJSON() ([]byte, error) {
2846 objectMap := make(map[string]interface{})
2847 if udlswap.Name != nil {
2848 objectMap["name"] = udlswap.Name
2849 }
2850 if udlswap.UpdateDataLakeStoreProperties != nil {
2851 objectMap["properties"] = udlswap.UpdateDataLakeStoreProperties
2852 }
2853 return json.Marshal(objectMap)
2854 }
2855
2856
2857 func (udlswap *UpdateDataLakeStoreWithAccountParameters) UnmarshalJSON(body []byte) error {
2858 var m map[string]*json.RawMessage
2859 err := json.Unmarshal(body, &m)
2860 if err != nil {
2861 return err
2862 }
2863 for k, v := range m {
2864 switch k {
2865 case "name":
2866 if v != nil {
2867 var name string
2868 err = json.Unmarshal(*v, &name)
2869 if err != nil {
2870 return err
2871 }
2872 udlswap.Name = &name
2873 }
2874 case "properties":
2875 if v != nil {
2876 var updateDataLakeStoreProperties UpdateDataLakeStoreProperties
2877 err = json.Unmarshal(*v, &updateDataLakeStoreProperties)
2878 if err != nil {
2879 return err
2880 }
2881 udlswap.UpdateDataLakeStoreProperties = &updateDataLakeStoreProperties
2882 }
2883 }
2884 }
2885
2886 return nil
2887 }
2888
2889
2890 type UpdateFirewallRuleParameters struct {
2891
2892 *UpdateFirewallRuleProperties `json:"properties,omitempty"`
2893 }
2894
2895
2896 func (ufrp UpdateFirewallRuleParameters) MarshalJSON() ([]byte, error) {
2897 objectMap := make(map[string]interface{})
2898 if ufrp.UpdateFirewallRuleProperties != nil {
2899 objectMap["properties"] = ufrp.UpdateFirewallRuleProperties
2900 }
2901 return json.Marshal(objectMap)
2902 }
2903
2904
2905 func (ufrp *UpdateFirewallRuleParameters) UnmarshalJSON(body []byte) error {
2906 var m map[string]*json.RawMessage
2907 err := json.Unmarshal(body, &m)
2908 if err != nil {
2909 return err
2910 }
2911 for k, v := range m {
2912 switch k {
2913 case "properties":
2914 if v != nil {
2915 var updateFirewallRuleProperties UpdateFirewallRuleProperties
2916 err = json.Unmarshal(*v, &updateFirewallRuleProperties)
2917 if err != nil {
2918 return err
2919 }
2920 ufrp.UpdateFirewallRuleProperties = &updateFirewallRuleProperties
2921 }
2922 }
2923 }
2924
2925 return nil
2926 }
2927
2928
2929 type UpdateFirewallRuleProperties struct {
2930
2931 StartIPAddress *string `json:"startIpAddress,omitempty"`
2932
2933 EndIPAddress *string `json:"endIpAddress,omitempty"`
2934 }
2935
2936
2937
2938 type UpdateFirewallRuleWithAccountParameters struct {
2939
2940 Name *string `json:"name,omitempty"`
2941
2942 *UpdateFirewallRuleProperties `json:"properties,omitempty"`
2943 }
2944
2945
2946 func (ufrwap UpdateFirewallRuleWithAccountParameters) MarshalJSON() ([]byte, error) {
2947 objectMap := make(map[string]interface{})
2948 if ufrwap.Name != nil {
2949 objectMap["name"] = ufrwap.Name
2950 }
2951 if ufrwap.UpdateFirewallRuleProperties != nil {
2952 objectMap["properties"] = ufrwap.UpdateFirewallRuleProperties
2953 }
2954 return json.Marshal(objectMap)
2955 }
2956
2957
2958 func (ufrwap *UpdateFirewallRuleWithAccountParameters) UnmarshalJSON(body []byte) error {
2959 var m map[string]*json.RawMessage
2960 err := json.Unmarshal(body, &m)
2961 if err != nil {
2962 return err
2963 }
2964 for k, v := range m {
2965 switch k {
2966 case "name":
2967 if v != nil {
2968 var name string
2969 err = json.Unmarshal(*v, &name)
2970 if err != nil {
2971 return err
2972 }
2973 ufrwap.Name = &name
2974 }
2975 case "properties":
2976 if v != nil {
2977 var updateFirewallRuleProperties UpdateFirewallRuleProperties
2978 err = json.Unmarshal(*v, &updateFirewallRuleProperties)
2979 if err != nil {
2980 return err
2981 }
2982 ufrwap.UpdateFirewallRuleProperties = &updateFirewallRuleProperties
2983 }
2984 }
2985 }
2986
2987 return nil
2988 }
2989
2990
2991 type UpdateStorageAccountParameters struct {
2992
2993 *UpdateStorageAccountProperties `json:"properties,omitempty"`
2994 }
2995
2996
2997 func (usap UpdateStorageAccountParameters) MarshalJSON() ([]byte, error) {
2998 objectMap := make(map[string]interface{})
2999 if usap.UpdateStorageAccountProperties != nil {
3000 objectMap["properties"] = usap.UpdateStorageAccountProperties
3001 }
3002 return json.Marshal(objectMap)
3003 }
3004
3005
3006 func (usap *UpdateStorageAccountParameters) UnmarshalJSON(body []byte) error {
3007 var m map[string]*json.RawMessage
3008 err := json.Unmarshal(body, &m)
3009 if err != nil {
3010 return err
3011 }
3012 for k, v := range m {
3013 switch k {
3014 case "properties":
3015 if v != nil {
3016 var updateStorageAccountProperties UpdateStorageAccountProperties
3017 err = json.Unmarshal(*v, &updateStorageAccountProperties)
3018 if err != nil {
3019 return err
3020 }
3021 usap.UpdateStorageAccountProperties = &updateStorageAccountProperties
3022 }
3023 }
3024 }
3025
3026 return nil
3027 }
3028
3029
3030
3031 type UpdateStorageAccountProperties struct {
3032
3033 AccessKey *string `json:"accessKey,omitempty"`
3034
3035 Suffix *string `json:"suffix,omitempty"`
3036 }
3037
3038
3039
3040 type UpdateStorageAccountWithAccountParameters struct {
3041
3042 Name *string `json:"name,omitempty"`
3043
3044 *UpdateStorageAccountProperties `json:"properties,omitempty"`
3045 }
3046
3047
3048 func (usawap UpdateStorageAccountWithAccountParameters) MarshalJSON() ([]byte, error) {
3049 objectMap := make(map[string]interface{})
3050 if usawap.Name != nil {
3051 objectMap["name"] = usawap.Name
3052 }
3053 if usawap.UpdateStorageAccountProperties != nil {
3054 objectMap["properties"] = usawap.UpdateStorageAccountProperties
3055 }
3056 return json.Marshal(objectMap)
3057 }
3058
3059
3060 func (usawap *UpdateStorageAccountWithAccountParameters) UnmarshalJSON(body []byte) error {
3061 var m map[string]*json.RawMessage
3062 err := json.Unmarshal(body, &m)
3063 if err != nil {
3064 return err
3065 }
3066 for k, v := range m {
3067 switch k {
3068 case "name":
3069 if v != nil {
3070 var name string
3071 err = json.Unmarshal(*v, &name)
3072 if err != nil {
3073 return err
3074 }
3075 usawap.Name = &name
3076 }
3077 case "properties":
3078 if v != nil {
3079 var updateStorageAccountProperties UpdateStorageAccountProperties
3080 err = json.Unmarshal(*v, &updateStorageAccountProperties)
3081 if err != nil {
3082 return err
3083 }
3084 usawap.UpdateStorageAccountProperties = &updateStorageAccountProperties
3085 }
3086 }
3087 }
3088
3089 return nil
3090 }
3091
View as plain text