1 package dtl
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 "net/http"
18 )
19
20
21 const fqdn = "github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl"
22
23
24
25 type ApplicableSchedule struct {
26 autorest.Response `json:"-"`
27
28 *ApplicableScheduleProperties `json:"properties,omitempty"`
29
30 ID *string `json:"id,omitempty"`
31
32 Name *string `json:"name,omitempty"`
33
34 Type *string `json:"type,omitempty"`
35
36 Location *string `json:"location,omitempty"`
37
38 Tags map[string]*string `json:"tags"`
39 }
40
41
42 func (as ApplicableSchedule) MarshalJSON() ([]byte, error) {
43 objectMap := make(map[string]interface{})
44 if as.ApplicableScheduleProperties != nil {
45 objectMap["properties"] = as.ApplicableScheduleProperties
46 }
47 if as.Location != nil {
48 objectMap["location"] = as.Location
49 }
50 if as.Tags != nil {
51 objectMap["tags"] = as.Tags
52 }
53 return json.Marshal(objectMap)
54 }
55
56
57 func (as *ApplicableSchedule) UnmarshalJSON(body []byte) error {
58 var m map[string]*json.RawMessage
59 err := json.Unmarshal(body, &m)
60 if err != nil {
61 return err
62 }
63 for k, v := range m {
64 switch k {
65 case "properties":
66 if v != nil {
67 var applicableScheduleProperties ApplicableScheduleProperties
68 err = json.Unmarshal(*v, &applicableScheduleProperties)
69 if err != nil {
70 return err
71 }
72 as.ApplicableScheduleProperties = &applicableScheduleProperties
73 }
74 case "id":
75 if v != nil {
76 var ID string
77 err = json.Unmarshal(*v, &ID)
78 if err != nil {
79 return err
80 }
81 as.ID = &ID
82 }
83 case "name":
84 if v != nil {
85 var name string
86 err = json.Unmarshal(*v, &name)
87 if err != nil {
88 return err
89 }
90 as.Name = &name
91 }
92 case "type":
93 if v != nil {
94 var typeVar string
95 err = json.Unmarshal(*v, &typeVar)
96 if err != nil {
97 return err
98 }
99 as.Type = &typeVar
100 }
101 case "location":
102 if v != nil {
103 var location string
104 err = json.Unmarshal(*v, &location)
105 if err != nil {
106 return err
107 }
108 as.Location = &location
109 }
110 case "tags":
111 if v != nil {
112 var tags map[string]*string
113 err = json.Unmarshal(*v, &tags)
114 if err != nil {
115 return err
116 }
117 as.Tags = tags
118 }
119 }
120 }
121
122 return nil
123 }
124
125
126
127 type ApplicableScheduleFragment struct {
128
129 *ApplicableSchedulePropertiesFragment `json:"properties,omitempty"`
130
131 ID *string `json:"id,omitempty"`
132
133 Name *string `json:"name,omitempty"`
134
135 Type *string `json:"type,omitempty"`
136
137 Location *string `json:"location,omitempty"`
138
139 Tags map[string]*string `json:"tags"`
140 }
141
142
143 func (asf ApplicableScheduleFragment) MarshalJSON() ([]byte, error) {
144 objectMap := make(map[string]interface{})
145 if asf.ApplicableSchedulePropertiesFragment != nil {
146 objectMap["properties"] = asf.ApplicableSchedulePropertiesFragment
147 }
148 if asf.Location != nil {
149 objectMap["location"] = asf.Location
150 }
151 if asf.Tags != nil {
152 objectMap["tags"] = asf.Tags
153 }
154 return json.Marshal(objectMap)
155 }
156
157
158 func (asf *ApplicableScheduleFragment) UnmarshalJSON(body []byte) error {
159 var m map[string]*json.RawMessage
160 err := json.Unmarshal(body, &m)
161 if err != nil {
162 return err
163 }
164 for k, v := range m {
165 switch k {
166 case "properties":
167 if v != nil {
168 var applicableSchedulePropertiesFragment ApplicableSchedulePropertiesFragment
169 err = json.Unmarshal(*v, &applicableSchedulePropertiesFragment)
170 if err != nil {
171 return err
172 }
173 asf.ApplicableSchedulePropertiesFragment = &applicableSchedulePropertiesFragment
174 }
175 case "id":
176 if v != nil {
177 var ID string
178 err = json.Unmarshal(*v, &ID)
179 if err != nil {
180 return err
181 }
182 asf.ID = &ID
183 }
184 case "name":
185 if v != nil {
186 var name string
187 err = json.Unmarshal(*v, &name)
188 if err != nil {
189 return err
190 }
191 asf.Name = &name
192 }
193 case "type":
194 if v != nil {
195 var typeVar string
196 err = json.Unmarshal(*v, &typeVar)
197 if err != nil {
198 return err
199 }
200 asf.Type = &typeVar
201 }
202 case "location":
203 if v != nil {
204 var location string
205 err = json.Unmarshal(*v, &location)
206 if err != nil {
207 return err
208 }
209 asf.Location = &location
210 }
211 case "tags":
212 if v != nil {
213 var tags map[string]*string
214 err = json.Unmarshal(*v, &tags)
215 if err != nil {
216 return err
217 }
218 asf.Tags = tags
219 }
220 }
221 }
222
223 return nil
224 }
225
226
227 type ApplicableScheduleProperties struct {
228
229 LabVmsShutdown *Schedule `json:"labVmsShutdown,omitempty"`
230
231 LabVmsStartup *Schedule `json:"labVmsStartup,omitempty"`
232 }
233
234
235 type ApplicableSchedulePropertiesFragment struct {
236
237 LabVmsShutdown *ScheduleFragment `json:"labVmsShutdown,omitempty"`
238
239 LabVmsStartup *ScheduleFragment `json:"labVmsStartup,omitempty"`
240 }
241
242
243 type ApplyArtifactsRequest struct {
244
245 Artifacts *[]ArtifactInstallProperties `json:"artifacts,omitempty"`
246 }
247
248
249 type ArmTemplate struct {
250 autorest.Response `json:"-"`
251
252 *ArmTemplateProperties `json:"properties,omitempty"`
253
254 ID *string `json:"id,omitempty"`
255
256 Name *string `json:"name,omitempty"`
257
258 Type *string `json:"type,omitempty"`
259
260 Location *string `json:"location,omitempty"`
261
262 Tags map[string]*string `json:"tags"`
263 }
264
265
266 func (at ArmTemplate) MarshalJSON() ([]byte, error) {
267 objectMap := make(map[string]interface{})
268 if at.ArmTemplateProperties != nil {
269 objectMap["properties"] = at.ArmTemplateProperties
270 }
271 if at.Location != nil {
272 objectMap["location"] = at.Location
273 }
274 if at.Tags != nil {
275 objectMap["tags"] = at.Tags
276 }
277 return json.Marshal(objectMap)
278 }
279
280
281 func (at *ArmTemplate) UnmarshalJSON(body []byte) error {
282 var m map[string]*json.RawMessage
283 err := json.Unmarshal(body, &m)
284 if err != nil {
285 return err
286 }
287 for k, v := range m {
288 switch k {
289 case "properties":
290 if v != nil {
291 var armTemplateProperties ArmTemplateProperties
292 err = json.Unmarshal(*v, &armTemplateProperties)
293 if err != nil {
294 return err
295 }
296 at.ArmTemplateProperties = &armTemplateProperties
297 }
298 case "id":
299 if v != nil {
300 var ID string
301 err = json.Unmarshal(*v, &ID)
302 if err != nil {
303 return err
304 }
305 at.ID = &ID
306 }
307 case "name":
308 if v != nil {
309 var name string
310 err = json.Unmarshal(*v, &name)
311 if err != nil {
312 return err
313 }
314 at.Name = &name
315 }
316 case "type":
317 if v != nil {
318 var typeVar string
319 err = json.Unmarshal(*v, &typeVar)
320 if err != nil {
321 return err
322 }
323 at.Type = &typeVar
324 }
325 case "location":
326 if v != nil {
327 var location string
328 err = json.Unmarshal(*v, &location)
329 if err != nil {
330 return err
331 }
332 at.Location = &location
333 }
334 case "tags":
335 if v != nil {
336 var tags map[string]*string
337 err = json.Unmarshal(*v, &tags)
338 if err != nil {
339 return err
340 }
341 at.Tags = tags
342 }
343 }
344 }
345
346 return nil
347 }
348
349
350 type ArmTemplateInfo struct {
351 autorest.Response `json:"-"`
352
353 Template interface{} `json:"template,omitempty"`
354
355 Parameters interface{} `json:"parameters,omitempty"`
356 }
357
358
359 type ArmTemplateParameterProperties struct {
360
361 Name *string `json:"name,omitempty"`
362
363 Value *string `json:"value,omitempty"`
364 }
365
366
367 type ArmTemplateProperties struct {
368
369 DisplayName *string `json:"displayName,omitempty"`
370
371 Description *string `json:"description,omitempty"`
372
373 Publisher *string `json:"publisher,omitempty"`
374
375 Icon *string `json:"icon,omitempty"`
376
377 Contents interface{} `json:"contents,omitempty"`
378
379 CreatedDate *date.Time `json:"createdDate,omitempty"`
380
381 ParametersValueFilesInfo *[]ParametersValueFileInfo `json:"parametersValueFilesInfo,omitempty"`
382 }
383
384
385 func (atp ArmTemplateProperties) MarshalJSON() ([]byte, error) {
386 objectMap := make(map[string]interface{})
387 return json.Marshal(objectMap)
388 }
389
390
391 type Artifact struct {
392 autorest.Response `json:"-"`
393
394 *ArtifactProperties `json:"properties,omitempty"`
395
396 ID *string `json:"id,omitempty"`
397
398 Name *string `json:"name,omitempty"`
399
400 Type *string `json:"type,omitempty"`
401
402 Location *string `json:"location,omitempty"`
403
404 Tags map[string]*string `json:"tags"`
405 }
406
407
408 func (a Artifact) MarshalJSON() ([]byte, error) {
409 objectMap := make(map[string]interface{})
410 if a.ArtifactProperties != nil {
411 objectMap["properties"] = a.ArtifactProperties
412 }
413 if a.Location != nil {
414 objectMap["location"] = a.Location
415 }
416 if a.Tags != nil {
417 objectMap["tags"] = a.Tags
418 }
419 return json.Marshal(objectMap)
420 }
421
422
423 func (a *Artifact) UnmarshalJSON(body []byte) error {
424 var m map[string]*json.RawMessage
425 err := json.Unmarshal(body, &m)
426 if err != nil {
427 return err
428 }
429 for k, v := range m {
430 switch k {
431 case "properties":
432 if v != nil {
433 var artifactProperties ArtifactProperties
434 err = json.Unmarshal(*v, &artifactProperties)
435 if err != nil {
436 return err
437 }
438 a.ArtifactProperties = &artifactProperties
439 }
440 case "id":
441 if v != nil {
442 var ID string
443 err = json.Unmarshal(*v, &ID)
444 if err != nil {
445 return err
446 }
447 a.ID = &ID
448 }
449 case "name":
450 if v != nil {
451 var name string
452 err = json.Unmarshal(*v, &name)
453 if err != nil {
454 return err
455 }
456 a.Name = &name
457 }
458 case "type":
459 if v != nil {
460 var typeVar string
461 err = json.Unmarshal(*v, &typeVar)
462 if err != nil {
463 return err
464 }
465 a.Type = &typeVar
466 }
467 case "location":
468 if v != nil {
469 var location string
470 err = json.Unmarshal(*v, &location)
471 if err != nil {
472 return err
473 }
474 a.Location = &location
475 }
476 case "tags":
477 if v != nil {
478 var tags map[string]*string
479 err = json.Unmarshal(*v, &tags)
480 if err != nil {
481 return err
482 }
483 a.Tags = tags
484 }
485 }
486 }
487
488 return nil
489 }
490
491
492 type ArtifactDeploymentStatusProperties struct {
493
494 DeploymentStatus *string `json:"deploymentStatus,omitempty"`
495
496 ArtifactsApplied *int32 `json:"artifactsApplied,omitempty"`
497
498 TotalArtifacts *int32 `json:"totalArtifacts,omitempty"`
499 }
500
501
502 type ArtifactDeploymentStatusPropertiesFragment struct {
503
504 DeploymentStatus *string `json:"deploymentStatus,omitempty"`
505
506 ArtifactsApplied *int32 `json:"artifactsApplied,omitempty"`
507
508 TotalArtifacts *int32 `json:"totalArtifacts,omitempty"`
509 }
510
511
512 type ArtifactInstallProperties struct {
513
514 ArtifactID *string `json:"artifactId,omitempty"`
515
516 Parameters *[]ArtifactParameterProperties `json:"parameters,omitempty"`
517
518 Status *string `json:"status,omitempty"`
519
520 DeploymentStatusMessage *string `json:"deploymentStatusMessage,omitempty"`
521
522 VMExtensionStatusMessage *string `json:"vmExtensionStatusMessage,omitempty"`
523
524 InstallTime *date.Time `json:"installTime,omitempty"`
525 }
526
527
528 type ArtifactInstallPropertiesFragment struct {
529
530 ArtifactID *string `json:"artifactId,omitempty"`
531
532 Parameters *[]ArtifactParameterPropertiesFragment `json:"parameters,omitempty"`
533
534 Status *string `json:"status,omitempty"`
535
536 DeploymentStatusMessage *string `json:"deploymentStatusMessage,omitempty"`
537
538 VMExtensionStatusMessage *string `json:"vmExtensionStatusMessage,omitempty"`
539
540 InstallTime *date.Time `json:"installTime,omitempty"`
541 }
542
543
544 type ArtifactParameterProperties struct {
545
546 Name *string `json:"name,omitempty"`
547
548 Value *string `json:"value,omitempty"`
549 }
550
551
552 type ArtifactParameterPropertiesFragment struct {
553
554 Name *string `json:"name,omitempty"`
555
556 Value *string `json:"value,omitempty"`
557 }
558
559
560 type ArtifactProperties struct {
561
562 Title *string `json:"title,omitempty"`
563
564 Description *string `json:"description,omitempty"`
565
566 Publisher *string `json:"publisher,omitempty"`
567
568 FilePath *string `json:"filePath,omitempty"`
569
570 Icon *string `json:"icon,omitempty"`
571
572 TargetOsType *string `json:"targetOsType,omitempty"`
573
574 Parameters interface{} `json:"parameters,omitempty"`
575
576 CreatedDate *date.Time `json:"createdDate,omitempty"`
577 }
578
579
580 func (ap ArtifactProperties) MarshalJSON() ([]byte, error) {
581 objectMap := make(map[string]interface{})
582 return json.Marshal(objectMap)
583 }
584
585
586 type ArtifactSource struct {
587 autorest.Response `json:"-"`
588
589 *ArtifactSourceProperties `json:"properties,omitempty"`
590
591 ID *string `json:"id,omitempty"`
592
593 Name *string `json:"name,omitempty"`
594
595 Type *string `json:"type,omitempty"`
596
597 Location *string `json:"location,omitempty"`
598
599 Tags map[string]*string `json:"tags"`
600 }
601
602
603 func (as ArtifactSource) MarshalJSON() ([]byte, error) {
604 objectMap := make(map[string]interface{})
605 if as.ArtifactSourceProperties != nil {
606 objectMap["properties"] = as.ArtifactSourceProperties
607 }
608 if as.Location != nil {
609 objectMap["location"] = as.Location
610 }
611 if as.Tags != nil {
612 objectMap["tags"] = as.Tags
613 }
614 return json.Marshal(objectMap)
615 }
616
617
618 func (as *ArtifactSource) UnmarshalJSON(body []byte) error {
619 var m map[string]*json.RawMessage
620 err := json.Unmarshal(body, &m)
621 if err != nil {
622 return err
623 }
624 for k, v := range m {
625 switch k {
626 case "properties":
627 if v != nil {
628 var artifactSourceProperties ArtifactSourceProperties
629 err = json.Unmarshal(*v, &artifactSourceProperties)
630 if err != nil {
631 return err
632 }
633 as.ArtifactSourceProperties = &artifactSourceProperties
634 }
635 case "id":
636 if v != nil {
637 var ID string
638 err = json.Unmarshal(*v, &ID)
639 if err != nil {
640 return err
641 }
642 as.ID = &ID
643 }
644 case "name":
645 if v != nil {
646 var name string
647 err = json.Unmarshal(*v, &name)
648 if err != nil {
649 return err
650 }
651 as.Name = &name
652 }
653 case "type":
654 if v != nil {
655 var typeVar string
656 err = json.Unmarshal(*v, &typeVar)
657 if err != nil {
658 return err
659 }
660 as.Type = &typeVar
661 }
662 case "location":
663 if v != nil {
664 var location string
665 err = json.Unmarshal(*v, &location)
666 if err != nil {
667 return err
668 }
669 as.Location = &location
670 }
671 case "tags":
672 if v != nil {
673 var tags map[string]*string
674 err = json.Unmarshal(*v, &tags)
675 if err != nil {
676 return err
677 }
678 as.Tags = tags
679 }
680 }
681 }
682
683 return nil
684 }
685
686
687 type ArtifactSourceFragment struct {
688
689 *ArtifactSourcePropertiesFragment `json:"properties,omitempty"`
690
691 ID *string `json:"id,omitempty"`
692
693 Name *string `json:"name,omitempty"`
694
695 Type *string `json:"type,omitempty"`
696
697 Location *string `json:"location,omitempty"`
698
699 Tags map[string]*string `json:"tags"`
700 }
701
702
703 func (asf ArtifactSourceFragment) MarshalJSON() ([]byte, error) {
704 objectMap := make(map[string]interface{})
705 if asf.ArtifactSourcePropertiesFragment != nil {
706 objectMap["properties"] = asf.ArtifactSourcePropertiesFragment
707 }
708 if asf.Location != nil {
709 objectMap["location"] = asf.Location
710 }
711 if asf.Tags != nil {
712 objectMap["tags"] = asf.Tags
713 }
714 return json.Marshal(objectMap)
715 }
716
717
718 func (asf *ArtifactSourceFragment) UnmarshalJSON(body []byte) error {
719 var m map[string]*json.RawMessage
720 err := json.Unmarshal(body, &m)
721 if err != nil {
722 return err
723 }
724 for k, v := range m {
725 switch k {
726 case "properties":
727 if v != nil {
728 var artifactSourcePropertiesFragment ArtifactSourcePropertiesFragment
729 err = json.Unmarshal(*v, &artifactSourcePropertiesFragment)
730 if err != nil {
731 return err
732 }
733 asf.ArtifactSourcePropertiesFragment = &artifactSourcePropertiesFragment
734 }
735 case "id":
736 if v != nil {
737 var ID string
738 err = json.Unmarshal(*v, &ID)
739 if err != nil {
740 return err
741 }
742 asf.ID = &ID
743 }
744 case "name":
745 if v != nil {
746 var name string
747 err = json.Unmarshal(*v, &name)
748 if err != nil {
749 return err
750 }
751 asf.Name = &name
752 }
753 case "type":
754 if v != nil {
755 var typeVar string
756 err = json.Unmarshal(*v, &typeVar)
757 if err != nil {
758 return err
759 }
760 asf.Type = &typeVar
761 }
762 case "location":
763 if v != nil {
764 var location string
765 err = json.Unmarshal(*v, &location)
766 if err != nil {
767 return err
768 }
769 asf.Location = &location
770 }
771 case "tags":
772 if v != nil {
773 var tags map[string]*string
774 err = json.Unmarshal(*v, &tags)
775 if err != nil {
776 return err
777 }
778 asf.Tags = tags
779 }
780 }
781 }
782
783 return nil
784 }
785
786
787 type ArtifactSourceProperties struct {
788
789 DisplayName *string `json:"displayName,omitempty"`
790
791 URI *string `json:"uri,omitempty"`
792
793 SourceType SourceControlType `json:"sourceType,omitempty"`
794
795 FolderPath *string `json:"folderPath,omitempty"`
796
797 ArmTemplateFolderPath *string `json:"armTemplateFolderPath,omitempty"`
798
799 BranchRef *string `json:"branchRef,omitempty"`
800
801 SecurityToken *string `json:"securityToken,omitempty"`
802
803 Status EnableStatus `json:"status,omitempty"`
804
805 CreatedDate *date.Time `json:"createdDate,omitempty"`
806
807 ProvisioningState *string `json:"provisioningState,omitempty"`
808
809 UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
810 }
811
812
813 func (asp ArtifactSourceProperties) MarshalJSON() ([]byte, error) {
814 objectMap := make(map[string]interface{})
815 if asp.DisplayName != nil {
816 objectMap["displayName"] = asp.DisplayName
817 }
818 if asp.URI != nil {
819 objectMap["uri"] = asp.URI
820 }
821 if asp.SourceType != "" {
822 objectMap["sourceType"] = asp.SourceType
823 }
824 if asp.FolderPath != nil {
825 objectMap["folderPath"] = asp.FolderPath
826 }
827 if asp.ArmTemplateFolderPath != nil {
828 objectMap["armTemplateFolderPath"] = asp.ArmTemplateFolderPath
829 }
830 if asp.BranchRef != nil {
831 objectMap["branchRef"] = asp.BranchRef
832 }
833 if asp.SecurityToken != nil {
834 objectMap["securityToken"] = asp.SecurityToken
835 }
836 if asp.Status != "" {
837 objectMap["status"] = asp.Status
838 }
839 if asp.ProvisioningState != nil {
840 objectMap["provisioningState"] = asp.ProvisioningState
841 }
842 if asp.UniqueIdentifier != nil {
843 objectMap["uniqueIdentifier"] = asp.UniqueIdentifier
844 }
845 return json.Marshal(objectMap)
846 }
847
848
849 type ArtifactSourcePropertiesFragment struct {
850
851 DisplayName *string `json:"displayName,omitempty"`
852
853 URI *string `json:"uri,omitempty"`
854
855 SourceType SourceControlType `json:"sourceType,omitempty"`
856
857 FolderPath *string `json:"folderPath,omitempty"`
858
859 ArmTemplateFolderPath *string `json:"armTemplateFolderPath,omitempty"`
860
861 BranchRef *string `json:"branchRef,omitempty"`
862
863 SecurityToken *string `json:"securityToken,omitempty"`
864
865 Status EnableStatus `json:"status,omitempty"`
866
867 ProvisioningState *string `json:"provisioningState,omitempty"`
868
869 UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
870 }
871
872
873 type AttachDiskProperties struct {
874
875 LeasedByLabVMID *string `json:"leasedByLabVmId,omitempty"`
876 }
877
878
879 type AttachNewDataDiskOptions struct {
880
881 DiskSizeGiB *int32 `json:"diskSizeGiB,omitempty"`
882
883 DiskName *string `json:"diskName,omitempty"`
884
885 DiskType StorageType `json:"diskType,omitempty"`
886 }
887
888
889 type BulkCreationParameters struct {
890
891 InstanceCount *int32 `json:"instanceCount,omitempty"`
892 }
893
894
895 type CloudError struct {
896 Error *CloudErrorBody `json:"error,omitempty"`
897 }
898
899
900 type CloudErrorBody struct {
901 Code *string `json:"code,omitempty"`
902 Message *string `json:"message,omitempty"`
903 Target *string `json:"target,omitempty"`
904
905 Details *[]CloudErrorBody `json:"details,omitempty"`
906 }
907
908
909 type ComputeDataDisk struct {
910
911 Name *string `json:"name,omitempty"`
912
913 DiskURI *string `json:"diskUri,omitempty"`
914
915 ManagedDiskID *string `json:"managedDiskId,omitempty"`
916
917 DiskSizeGiB *int32 `json:"diskSizeGiB,omitempty"`
918 }
919
920
921 type ComputeDataDiskFragment struct {
922
923 Name *string `json:"name,omitempty"`
924
925 DiskURI *string `json:"diskUri,omitempty"`
926
927 ManagedDiskID *string `json:"managedDiskId,omitempty"`
928
929 DiskSizeGiB *int32 `json:"diskSizeGiB,omitempty"`
930 }
931
932
933 type ComputeVMInstanceViewStatus struct {
934
935 Code *string `json:"code,omitempty"`
936
937 DisplayStatus *string `json:"displayStatus,omitempty"`
938
939 Message *string `json:"message,omitempty"`
940 }
941
942
943 type ComputeVMInstanceViewStatusFragment struct {
944
945 Code *string `json:"code,omitempty"`
946
947 DisplayStatus *string `json:"displayStatus,omitempty"`
948
949 Message *string `json:"message,omitempty"`
950 }
951
952
953 type ComputeVMProperties struct {
954
955 Statuses *[]ComputeVMInstanceViewStatus `json:"statuses,omitempty"`
956
957 OsType *string `json:"osType,omitempty"`
958
959 VMSize *string `json:"vmSize,omitempty"`
960
961 NetworkInterfaceID *string `json:"networkInterfaceId,omitempty"`
962
963 OsDiskID *string `json:"osDiskId,omitempty"`
964
965 DataDiskIds *[]string `json:"dataDiskIds,omitempty"`
966
967 DataDisks *[]ComputeDataDisk `json:"dataDisks,omitempty"`
968 }
969
970
971 type ComputeVMPropertiesFragment struct {
972
973 Statuses *[]ComputeVMInstanceViewStatusFragment `json:"statuses,omitempty"`
974
975 OsType *string `json:"osType,omitempty"`
976
977 VMSize *string `json:"vmSize,omitempty"`
978
979 NetworkInterfaceID *string `json:"networkInterfaceId,omitempty"`
980
981 OsDiskID *string `json:"osDiskId,omitempty"`
982
983 DataDiskIds *[]string `json:"dataDiskIds,omitempty"`
984
985 DataDisks *[]ComputeDataDiskFragment `json:"dataDisks,omitempty"`
986 }
987
988
989 type CostThresholdProperties struct {
990
991 ThresholdID *string `json:"thresholdId,omitempty"`
992
993 PercentageThreshold *PercentageCostThresholdProperties `json:"percentageThreshold,omitempty"`
994
995 DisplayOnChart CostThresholdStatus `json:"displayOnChart,omitempty"`
996
997 SendNotificationWhenExceeded CostThresholdStatus `json:"sendNotificationWhenExceeded,omitempty"`
998
999 NotificationSent *string `json:"notificationSent,omitempty"`
1000 }
1001
1002
1003 type CustomImage struct {
1004 autorest.Response `json:"-"`
1005
1006 *CustomImageProperties `json:"properties,omitempty"`
1007
1008 ID *string `json:"id,omitempty"`
1009
1010 Name *string `json:"name,omitempty"`
1011
1012 Type *string `json:"type,omitempty"`
1013
1014 Location *string `json:"location,omitempty"`
1015
1016 Tags map[string]*string `json:"tags"`
1017 }
1018
1019
1020 func (ci CustomImage) MarshalJSON() ([]byte, error) {
1021 objectMap := make(map[string]interface{})
1022 if ci.CustomImageProperties != nil {
1023 objectMap["properties"] = ci.CustomImageProperties
1024 }
1025 if ci.Location != nil {
1026 objectMap["location"] = ci.Location
1027 }
1028 if ci.Tags != nil {
1029 objectMap["tags"] = ci.Tags
1030 }
1031 return json.Marshal(objectMap)
1032 }
1033
1034
1035 func (ci *CustomImage) UnmarshalJSON(body []byte) error {
1036 var m map[string]*json.RawMessage
1037 err := json.Unmarshal(body, &m)
1038 if err != nil {
1039 return err
1040 }
1041 for k, v := range m {
1042 switch k {
1043 case "properties":
1044 if v != nil {
1045 var customImageProperties CustomImageProperties
1046 err = json.Unmarshal(*v, &customImageProperties)
1047 if err != nil {
1048 return err
1049 }
1050 ci.CustomImageProperties = &customImageProperties
1051 }
1052 case "id":
1053 if v != nil {
1054 var ID string
1055 err = json.Unmarshal(*v, &ID)
1056 if err != nil {
1057 return err
1058 }
1059 ci.ID = &ID
1060 }
1061 case "name":
1062 if v != nil {
1063 var name string
1064 err = json.Unmarshal(*v, &name)
1065 if err != nil {
1066 return err
1067 }
1068 ci.Name = &name
1069 }
1070 case "type":
1071 if v != nil {
1072 var typeVar string
1073 err = json.Unmarshal(*v, &typeVar)
1074 if err != nil {
1075 return err
1076 }
1077 ci.Type = &typeVar
1078 }
1079 case "location":
1080 if v != nil {
1081 var location string
1082 err = json.Unmarshal(*v, &location)
1083 if err != nil {
1084 return err
1085 }
1086 ci.Location = &location
1087 }
1088 case "tags":
1089 if v != nil {
1090 var tags map[string]*string
1091 err = json.Unmarshal(*v, &tags)
1092 if err != nil {
1093 return err
1094 }
1095 ci.Tags = tags
1096 }
1097 }
1098 }
1099
1100 return nil
1101 }
1102
1103
1104 type CustomImageProperties struct {
1105
1106 VM *CustomImagePropertiesFromVM `json:"vm,omitempty"`
1107
1108 Vhd *CustomImagePropertiesCustom `json:"vhd,omitempty"`
1109
1110 Description *string `json:"description,omitempty"`
1111
1112 Author *string `json:"author,omitempty"`
1113
1114 CreationDate *date.Time `json:"creationDate,omitempty"`
1115
1116 ManagedImageID *string `json:"managedImageId,omitempty"`
1117
1118 ProvisioningState *string `json:"provisioningState,omitempty"`
1119
1120 UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
1121 }
1122
1123
1124 func (cip CustomImageProperties) MarshalJSON() ([]byte, error) {
1125 objectMap := make(map[string]interface{})
1126 if cip.VM != nil {
1127 objectMap["vm"] = cip.VM
1128 }
1129 if cip.Vhd != nil {
1130 objectMap["vhd"] = cip.Vhd
1131 }
1132 if cip.Description != nil {
1133 objectMap["description"] = cip.Description
1134 }
1135 if cip.Author != nil {
1136 objectMap["author"] = cip.Author
1137 }
1138 if cip.ManagedImageID != nil {
1139 objectMap["managedImageId"] = cip.ManagedImageID
1140 }
1141 if cip.ProvisioningState != nil {
1142 objectMap["provisioningState"] = cip.ProvisioningState
1143 }
1144 if cip.UniqueIdentifier != nil {
1145 objectMap["uniqueIdentifier"] = cip.UniqueIdentifier
1146 }
1147 return json.Marshal(objectMap)
1148 }
1149
1150
1151 type CustomImagePropertiesCustom struct {
1152
1153 ImageName *string `json:"imageName,omitempty"`
1154
1155 SysPrep *bool `json:"sysPrep,omitempty"`
1156
1157 OsType CustomImageOsType `json:"osType,omitempty"`
1158 }
1159
1160
1161 type CustomImagePropertiesFromVM struct {
1162
1163 SourceVMID *string `json:"sourceVmId,omitempty"`
1164
1165 WindowsOsInfo *WindowsOsInfo `json:"windowsOsInfo,omitempty"`
1166
1167 LinuxOsInfo *LinuxOsInfo `json:"linuxOsInfo,omitempty"`
1168 }
1169
1170
1171
1172 type CustomImagesCreateOrUpdateFuture struct {
1173 azure.FutureAPI
1174
1175
1176 Result func(CustomImagesClient) (CustomImage, error)
1177 }
1178
1179
1180 func (future *CustomImagesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
1181 var azFuture azure.Future
1182 if err := json.Unmarshal(body, &azFuture); err != nil {
1183 return err
1184 }
1185 future.FutureAPI = &azFuture
1186 future.Result = future.result
1187 return nil
1188 }
1189
1190
1191 func (future *CustomImagesCreateOrUpdateFuture) result(client CustomImagesClient) (ci CustomImage, err error) {
1192 var done bool
1193 done, err = future.DoneWithContext(context.Background(), client)
1194 if err != nil {
1195 err = autorest.NewErrorWithError(err, "dtl.CustomImagesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
1196 return
1197 }
1198 if !done {
1199 ci.Response.Response = future.Response()
1200 err = azure.NewAsyncOpIncompleteError("dtl.CustomImagesCreateOrUpdateFuture")
1201 return
1202 }
1203 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1204 if ci.Response.Response, err = future.GetResult(sender); err == nil && ci.Response.Response.StatusCode != http.StatusNoContent {
1205 ci, err = client.CreateOrUpdateResponder(ci.Response.Response)
1206 if err != nil {
1207 err = autorest.NewErrorWithError(err, "dtl.CustomImagesCreateOrUpdateFuture", "Result", ci.Response.Response, "Failure responding to request")
1208 }
1209 }
1210 return
1211 }
1212
1213
1214
1215 type CustomImagesDeleteFuture struct {
1216 azure.FutureAPI
1217
1218
1219 Result func(CustomImagesClient) (autorest.Response, error)
1220 }
1221
1222
1223 func (future *CustomImagesDeleteFuture) UnmarshalJSON(body []byte) error {
1224 var azFuture azure.Future
1225 if err := json.Unmarshal(body, &azFuture); err != nil {
1226 return err
1227 }
1228 future.FutureAPI = &azFuture
1229 future.Result = future.result
1230 return nil
1231 }
1232
1233
1234 func (future *CustomImagesDeleteFuture) result(client CustomImagesClient) (ar autorest.Response, err error) {
1235 var done bool
1236 done, err = future.DoneWithContext(context.Background(), client)
1237 if err != nil {
1238 err = autorest.NewErrorWithError(err, "dtl.CustomImagesDeleteFuture", "Result", future.Response(), "Polling failure")
1239 return
1240 }
1241 if !done {
1242 ar.Response = future.Response()
1243 err = azure.NewAsyncOpIncompleteError("dtl.CustomImagesDeleteFuture")
1244 return
1245 }
1246 ar.Response = future.Response()
1247 return
1248 }
1249
1250
1251 type DataDiskProperties struct {
1252
1253 AttachNewDataDiskOptions *AttachNewDataDiskOptions `json:"attachNewDataDiskOptions,omitempty"`
1254
1255 ExistingLabDiskID *string `json:"existingLabDiskId,omitempty"`
1256
1257 HostCaching HostCachingOptions `json:"hostCaching,omitempty"`
1258 }
1259
1260
1261 type DayDetails struct {
1262
1263 Time *string `json:"time,omitempty"`
1264 }
1265
1266
1267 type DayDetailsFragment struct {
1268
1269 Time *string `json:"time,omitempty"`
1270 }
1271
1272
1273 type DetachDataDiskProperties struct {
1274
1275 ExistingLabDiskID *string `json:"existingLabDiskId,omitempty"`
1276 }
1277
1278
1279 type DetachDiskProperties struct {
1280
1281 LeasedByLabVMID *string `json:"leasedByLabVmId,omitempty"`
1282 }
1283
1284
1285 type Disk struct {
1286 autorest.Response `json:"-"`
1287
1288 *DiskProperties `json:"properties,omitempty"`
1289
1290 ID *string `json:"id,omitempty"`
1291
1292 Name *string `json:"name,omitempty"`
1293
1294 Type *string `json:"type,omitempty"`
1295
1296 Location *string `json:"location,omitempty"`
1297
1298 Tags map[string]*string `json:"tags"`
1299 }
1300
1301
1302 func (d Disk) MarshalJSON() ([]byte, error) {
1303 objectMap := make(map[string]interface{})
1304 if d.DiskProperties != nil {
1305 objectMap["properties"] = d.DiskProperties
1306 }
1307 if d.Location != nil {
1308 objectMap["location"] = d.Location
1309 }
1310 if d.Tags != nil {
1311 objectMap["tags"] = d.Tags
1312 }
1313 return json.Marshal(objectMap)
1314 }
1315
1316
1317 func (d *Disk) UnmarshalJSON(body []byte) error {
1318 var m map[string]*json.RawMessage
1319 err := json.Unmarshal(body, &m)
1320 if err != nil {
1321 return err
1322 }
1323 for k, v := range m {
1324 switch k {
1325 case "properties":
1326 if v != nil {
1327 var diskProperties DiskProperties
1328 err = json.Unmarshal(*v, &diskProperties)
1329 if err != nil {
1330 return err
1331 }
1332 d.DiskProperties = &diskProperties
1333 }
1334 case "id":
1335 if v != nil {
1336 var ID string
1337 err = json.Unmarshal(*v, &ID)
1338 if err != nil {
1339 return err
1340 }
1341 d.ID = &ID
1342 }
1343 case "name":
1344 if v != nil {
1345 var name string
1346 err = json.Unmarshal(*v, &name)
1347 if err != nil {
1348 return err
1349 }
1350 d.Name = &name
1351 }
1352 case "type":
1353 if v != nil {
1354 var typeVar string
1355 err = json.Unmarshal(*v, &typeVar)
1356 if err != nil {
1357 return err
1358 }
1359 d.Type = &typeVar
1360 }
1361 case "location":
1362 if v != nil {
1363 var location string
1364 err = json.Unmarshal(*v, &location)
1365 if err != nil {
1366 return err
1367 }
1368 d.Location = &location
1369 }
1370 case "tags":
1371 if v != nil {
1372 var tags map[string]*string
1373 err = json.Unmarshal(*v, &tags)
1374 if err != nil {
1375 return err
1376 }
1377 d.Tags = tags
1378 }
1379 }
1380 }
1381
1382 return nil
1383 }
1384
1385
1386 type DiskProperties struct {
1387
1388 DiskType StorageType `json:"diskType,omitempty"`
1389
1390 DiskSizeGiB *int32 `json:"diskSizeGiB,omitempty"`
1391
1392 LeasedByLabVMID *string `json:"leasedByLabVmId,omitempty"`
1393
1394 DiskBlobName *string `json:"diskBlobName,omitempty"`
1395
1396 DiskURI *string `json:"diskUri,omitempty"`
1397
1398 CreatedDate *date.Time `json:"createdDate,omitempty"`
1399
1400 HostCaching *string `json:"hostCaching,omitempty"`
1401
1402 ManagedDiskID *string `json:"managedDiskId,omitempty"`
1403
1404 ProvisioningState *string `json:"provisioningState,omitempty"`
1405
1406 UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
1407 }
1408
1409
1410 func (dp DiskProperties) MarshalJSON() ([]byte, error) {
1411 objectMap := make(map[string]interface{})
1412 if dp.DiskType != "" {
1413 objectMap["diskType"] = dp.DiskType
1414 }
1415 if dp.DiskSizeGiB != nil {
1416 objectMap["diskSizeGiB"] = dp.DiskSizeGiB
1417 }
1418 if dp.LeasedByLabVMID != nil {
1419 objectMap["leasedByLabVmId"] = dp.LeasedByLabVMID
1420 }
1421 if dp.DiskBlobName != nil {
1422 objectMap["diskBlobName"] = dp.DiskBlobName
1423 }
1424 if dp.DiskURI != nil {
1425 objectMap["diskUri"] = dp.DiskURI
1426 }
1427 if dp.HostCaching != nil {
1428 objectMap["hostCaching"] = dp.HostCaching
1429 }
1430 if dp.ManagedDiskID != nil {
1431 objectMap["managedDiskId"] = dp.ManagedDiskID
1432 }
1433 if dp.ProvisioningState != nil {
1434 objectMap["provisioningState"] = dp.ProvisioningState
1435 }
1436 if dp.UniqueIdentifier != nil {
1437 objectMap["uniqueIdentifier"] = dp.UniqueIdentifier
1438 }
1439 return json.Marshal(objectMap)
1440 }
1441
1442
1443 type DisksAttachFuture struct {
1444 azure.FutureAPI
1445
1446
1447 Result func(DisksClient) (autorest.Response, error)
1448 }
1449
1450
1451 func (future *DisksAttachFuture) UnmarshalJSON(body []byte) error {
1452 var azFuture azure.Future
1453 if err := json.Unmarshal(body, &azFuture); err != nil {
1454 return err
1455 }
1456 future.FutureAPI = &azFuture
1457 future.Result = future.result
1458 return nil
1459 }
1460
1461
1462 func (future *DisksAttachFuture) result(client DisksClient) (ar autorest.Response, err error) {
1463 var done bool
1464 done, err = future.DoneWithContext(context.Background(), client)
1465 if err != nil {
1466 err = autorest.NewErrorWithError(err, "dtl.DisksAttachFuture", "Result", future.Response(), "Polling failure")
1467 return
1468 }
1469 if !done {
1470 ar.Response = future.Response()
1471 err = azure.NewAsyncOpIncompleteError("dtl.DisksAttachFuture")
1472 return
1473 }
1474 ar.Response = future.Response()
1475 return
1476 }
1477
1478
1479
1480 type DisksCreateOrUpdateFuture struct {
1481 azure.FutureAPI
1482
1483
1484 Result func(DisksClient) (Disk, error)
1485 }
1486
1487
1488 func (future *DisksCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
1489 var azFuture azure.Future
1490 if err := json.Unmarshal(body, &azFuture); err != nil {
1491 return err
1492 }
1493 future.FutureAPI = &azFuture
1494 future.Result = future.result
1495 return nil
1496 }
1497
1498
1499 func (future *DisksCreateOrUpdateFuture) result(client DisksClient) (d Disk, err error) {
1500 var done bool
1501 done, err = future.DoneWithContext(context.Background(), client)
1502 if err != nil {
1503 err = autorest.NewErrorWithError(err, "dtl.DisksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
1504 return
1505 }
1506 if !done {
1507 d.Response.Response = future.Response()
1508 err = azure.NewAsyncOpIncompleteError("dtl.DisksCreateOrUpdateFuture")
1509 return
1510 }
1511 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1512 if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent {
1513 d, err = client.CreateOrUpdateResponder(d.Response.Response)
1514 if err != nil {
1515 err = autorest.NewErrorWithError(err, "dtl.DisksCreateOrUpdateFuture", "Result", d.Response.Response, "Failure responding to request")
1516 }
1517 }
1518 return
1519 }
1520
1521
1522 type DisksDeleteFuture struct {
1523 azure.FutureAPI
1524
1525
1526 Result func(DisksClient) (autorest.Response, error)
1527 }
1528
1529
1530 func (future *DisksDeleteFuture) UnmarshalJSON(body []byte) error {
1531 var azFuture azure.Future
1532 if err := json.Unmarshal(body, &azFuture); err != nil {
1533 return err
1534 }
1535 future.FutureAPI = &azFuture
1536 future.Result = future.result
1537 return nil
1538 }
1539
1540
1541 func (future *DisksDeleteFuture) result(client DisksClient) (ar autorest.Response, err error) {
1542 var done bool
1543 done, err = future.DoneWithContext(context.Background(), client)
1544 if err != nil {
1545 err = autorest.NewErrorWithError(err, "dtl.DisksDeleteFuture", "Result", future.Response(), "Polling failure")
1546 return
1547 }
1548 if !done {
1549 ar.Response = future.Response()
1550 err = azure.NewAsyncOpIncompleteError("dtl.DisksDeleteFuture")
1551 return
1552 }
1553 ar.Response = future.Response()
1554 return
1555 }
1556
1557
1558 type DisksDetachFuture struct {
1559 azure.FutureAPI
1560
1561
1562 Result func(DisksClient) (autorest.Response, error)
1563 }
1564
1565
1566 func (future *DisksDetachFuture) UnmarshalJSON(body []byte) error {
1567 var azFuture azure.Future
1568 if err := json.Unmarshal(body, &azFuture); err != nil {
1569 return err
1570 }
1571 future.FutureAPI = &azFuture
1572 future.Result = future.result
1573 return nil
1574 }
1575
1576
1577 func (future *DisksDetachFuture) result(client DisksClient) (ar autorest.Response, err error) {
1578 var done bool
1579 done, err = future.DoneWithContext(context.Background(), client)
1580 if err != nil {
1581 err = autorest.NewErrorWithError(err, "dtl.DisksDetachFuture", "Result", future.Response(), "Polling failure")
1582 return
1583 }
1584 if !done {
1585 ar.Response = future.Response()
1586 err = azure.NewAsyncOpIncompleteError("dtl.DisksDetachFuture")
1587 return
1588 }
1589 ar.Response = future.Response()
1590 return
1591 }
1592
1593
1594 type Environment struct {
1595 autorest.Response `json:"-"`
1596
1597 *EnvironmentProperties `json:"properties,omitempty"`
1598
1599 ID *string `json:"id,omitempty"`
1600
1601 Name *string `json:"name,omitempty"`
1602
1603 Type *string `json:"type,omitempty"`
1604
1605 Location *string `json:"location,omitempty"`
1606
1607 Tags map[string]*string `json:"tags"`
1608 }
1609
1610
1611 func (e Environment) MarshalJSON() ([]byte, error) {
1612 objectMap := make(map[string]interface{})
1613 if e.EnvironmentProperties != nil {
1614 objectMap["properties"] = e.EnvironmentProperties
1615 }
1616 if e.Location != nil {
1617 objectMap["location"] = e.Location
1618 }
1619 if e.Tags != nil {
1620 objectMap["tags"] = e.Tags
1621 }
1622 return json.Marshal(objectMap)
1623 }
1624
1625
1626 func (e *Environment) UnmarshalJSON(body []byte) error {
1627 var m map[string]*json.RawMessage
1628 err := json.Unmarshal(body, &m)
1629 if err != nil {
1630 return err
1631 }
1632 for k, v := range m {
1633 switch k {
1634 case "properties":
1635 if v != nil {
1636 var environmentProperties EnvironmentProperties
1637 err = json.Unmarshal(*v, &environmentProperties)
1638 if err != nil {
1639 return err
1640 }
1641 e.EnvironmentProperties = &environmentProperties
1642 }
1643 case "id":
1644 if v != nil {
1645 var ID string
1646 err = json.Unmarshal(*v, &ID)
1647 if err != nil {
1648 return err
1649 }
1650 e.ID = &ID
1651 }
1652 case "name":
1653 if v != nil {
1654 var name string
1655 err = json.Unmarshal(*v, &name)
1656 if err != nil {
1657 return err
1658 }
1659 e.Name = &name
1660 }
1661 case "type":
1662 if v != nil {
1663 var typeVar string
1664 err = json.Unmarshal(*v, &typeVar)
1665 if err != nil {
1666 return err
1667 }
1668 e.Type = &typeVar
1669 }
1670 case "location":
1671 if v != nil {
1672 var location string
1673 err = json.Unmarshal(*v, &location)
1674 if err != nil {
1675 return err
1676 }
1677 e.Location = &location
1678 }
1679 case "tags":
1680 if v != nil {
1681 var tags map[string]*string
1682 err = json.Unmarshal(*v, &tags)
1683 if err != nil {
1684 return err
1685 }
1686 e.Tags = tags
1687 }
1688 }
1689 }
1690
1691 return nil
1692 }
1693
1694
1695 type EnvironmentDeploymentProperties struct {
1696
1697 ArmTemplateID *string `json:"armTemplateId,omitempty"`
1698
1699 Parameters *[]ArmTemplateParameterProperties `json:"parameters,omitempty"`
1700 }
1701
1702
1703 type EnvironmentProperties struct {
1704
1705 DeploymentProperties *EnvironmentDeploymentProperties `json:"deploymentProperties,omitempty"`
1706
1707 ArmTemplateDisplayName *string `json:"armTemplateDisplayName,omitempty"`
1708
1709 ResourceGroupID *string `json:"resourceGroupId,omitempty"`
1710
1711 CreatedByUser *string `json:"createdByUser,omitempty"`
1712
1713 ProvisioningState *string `json:"provisioningState,omitempty"`
1714
1715 UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
1716 }
1717
1718
1719 func (ep EnvironmentProperties) MarshalJSON() ([]byte, error) {
1720 objectMap := make(map[string]interface{})
1721 if ep.DeploymentProperties != nil {
1722 objectMap["deploymentProperties"] = ep.DeploymentProperties
1723 }
1724 if ep.ArmTemplateDisplayName != nil {
1725 objectMap["armTemplateDisplayName"] = ep.ArmTemplateDisplayName
1726 }
1727 if ep.ProvisioningState != nil {
1728 objectMap["provisioningState"] = ep.ProvisioningState
1729 }
1730 if ep.UniqueIdentifier != nil {
1731 objectMap["uniqueIdentifier"] = ep.UniqueIdentifier
1732 }
1733 return json.Marshal(objectMap)
1734 }
1735
1736
1737
1738 type EnvironmentsCreateOrUpdateFuture struct {
1739 azure.FutureAPI
1740
1741
1742 Result func(EnvironmentsClient) (Environment, error)
1743 }
1744
1745
1746 func (future *EnvironmentsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
1747 var azFuture azure.Future
1748 if err := json.Unmarshal(body, &azFuture); err != nil {
1749 return err
1750 }
1751 future.FutureAPI = &azFuture
1752 future.Result = future.result
1753 return nil
1754 }
1755
1756
1757 func (future *EnvironmentsCreateOrUpdateFuture) result(client EnvironmentsClient) (e Environment, err error) {
1758 var done bool
1759 done, err = future.DoneWithContext(context.Background(), client)
1760 if err != nil {
1761 err = autorest.NewErrorWithError(err, "dtl.EnvironmentsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
1762 return
1763 }
1764 if !done {
1765 e.Response.Response = future.Response()
1766 err = azure.NewAsyncOpIncompleteError("dtl.EnvironmentsCreateOrUpdateFuture")
1767 return
1768 }
1769 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1770 if e.Response.Response, err = future.GetResult(sender); err == nil && e.Response.Response.StatusCode != http.StatusNoContent {
1771 e, err = client.CreateOrUpdateResponder(e.Response.Response)
1772 if err != nil {
1773 err = autorest.NewErrorWithError(err, "dtl.EnvironmentsCreateOrUpdateFuture", "Result", e.Response.Response, "Failure responding to request")
1774 }
1775 }
1776 return
1777 }
1778
1779
1780
1781 type EnvironmentsDeleteFuture struct {
1782 azure.FutureAPI
1783
1784
1785 Result func(EnvironmentsClient) (autorest.Response, error)
1786 }
1787
1788
1789 func (future *EnvironmentsDeleteFuture) UnmarshalJSON(body []byte) error {
1790 var azFuture azure.Future
1791 if err := json.Unmarshal(body, &azFuture); err != nil {
1792 return err
1793 }
1794 future.FutureAPI = &azFuture
1795 future.Result = future.result
1796 return nil
1797 }
1798
1799
1800 func (future *EnvironmentsDeleteFuture) result(client EnvironmentsClient) (ar autorest.Response, err error) {
1801 var done bool
1802 done, err = future.DoneWithContext(context.Background(), client)
1803 if err != nil {
1804 err = autorest.NewErrorWithError(err, "dtl.EnvironmentsDeleteFuture", "Result", future.Response(), "Polling failure")
1805 return
1806 }
1807 if !done {
1808 ar.Response = future.Response()
1809 err = azure.NewAsyncOpIncompleteError("dtl.EnvironmentsDeleteFuture")
1810 return
1811 }
1812 ar.Response = future.Response()
1813 return
1814 }
1815
1816
1817 type EvaluatePoliciesProperties struct {
1818
1819 FactName *string `json:"factName,omitempty"`
1820
1821 FactData *string `json:"factData,omitempty"`
1822
1823 ValueOffset *string `json:"valueOffset,omitempty"`
1824 }
1825
1826
1827 type EvaluatePoliciesRequest struct {
1828
1829 Policies *[]EvaluatePoliciesProperties `json:"policies,omitempty"`
1830 }
1831
1832
1833 type EvaluatePoliciesResponse struct {
1834 autorest.Response `json:"-"`
1835
1836 Results *[]PolicySetResult `json:"results,omitempty"`
1837 }
1838
1839
1840 type Event struct {
1841
1842 EventName NotificationChannelEventType `json:"eventName,omitempty"`
1843 }
1844
1845
1846 type EventFragment struct {
1847
1848 EventName NotificationChannelEventType `json:"eventName,omitempty"`
1849 }
1850
1851
1852 type ExportResourceUsageParameters struct {
1853
1854 BlobStorageAbsoluteSasURI *string `json:"blobStorageAbsoluteSasUri,omitempty"`
1855
1856 UsageStartDate *date.Time `json:"usageStartDate,omitempty"`
1857 }
1858
1859
1860 type ExternalSubnet struct {
1861
1862 ID *string `json:"id,omitempty"`
1863
1864 Name *string `json:"name,omitempty"`
1865 }
1866
1867
1868 type ExternalSubnetFragment struct {
1869
1870 ID *string `json:"id,omitempty"`
1871
1872 Name *string `json:"name,omitempty"`
1873 }
1874
1875
1876 type Formula struct {
1877 autorest.Response `json:"-"`
1878
1879 *FormulaProperties `json:"properties,omitempty"`
1880
1881 ID *string `json:"id,omitempty"`
1882
1883 Name *string `json:"name,omitempty"`
1884
1885 Type *string `json:"type,omitempty"`
1886
1887 Location *string `json:"location,omitempty"`
1888
1889 Tags map[string]*string `json:"tags"`
1890 }
1891
1892
1893 func (f Formula) MarshalJSON() ([]byte, error) {
1894 objectMap := make(map[string]interface{})
1895 if f.FormulaProperties != nil {
1896 objectMap["properties"] = f.FormulaProperties
1897 }
1898 if f.Location != nil {
1899 objectMap["location"] = f.Location
1900 }
1901 if f.Tags != nil {
1902 objectMap["tags"] = f.Tags
1903 }
1904 return json.Marshal(objectMap)
1905 }
1906
1907
1908 func (f *Formula) UnmarshalJSON(body []byte) error {
1909 var m map[string]*json.RawMessage
1910 err := json.Unmarshal(body, &m)
1911 if err != nil {
1912 return err
1913 }
1914 for k, v := range m {
1915 switch k {
1916 case "properties":
1917 if v != nil {
1918 var formulaProperties FormulaProperties
1919 err = json.Unmarshal(*v, &formulaProperties)
1920 if err != nil {
1921 return err
1922 }
1923 f.FormulaProperties = &formulaProperties
1924 }
1925 case "id":
1926 if v != nil {
1927 var ID string
1928 err = json.Unmarshal(*v, &ID)
1929 if err != nil {
1930 return err
1931 }
1932 f.ID = &ID
1933 }
1934 case "name":
1935 if v != nil {
1936 var name string
1937 err = json.Unmarshal(*v, &name)
1938 if err != nil {
1939 return err
1940 }
1941 f.Name = &name
1942 }
1943 case "type":
1944 if v != nil {
1945 var typeVar string
1946 err = json.Unmarshal(*v, &typeVar)
1947 if err != nil {
1948 return err
1949 }
1950 f.Type = &typeVar
1951 }
1952 case "location":
1953 if v != nil {
1954 var location string
1955 err = json.Unmarshal(*v, &location)
1956 if err != nil {
1957 return err
1958 }
1959 f.Location = &location
1960 }
1961 case "tags":
1962 if v != nil {
1963 var tags map[string]*string
1964 err = json.Unmarshal(*v, &tags)
1965 if err != nil {
1966 return err
1967 }
1968 f.Tags = tags
1969 }
1970 }
1971 }
1972
1973 return nil
1974 }
1975
1976
1977 type FormulaProperties struct {
1978
1979 Description *string `json:"description,omitempty"`
1980
1981 Author *string `json:"author,omitempty"`
1982
1983 OsType *string `json:"osType,omitempty"`
1984
1985 CreationDate *date.Time `json:"creationDate,omitempty"`
1986
1987 FormulaContent *LabVirtualMachineCreationParameter `json:"formulaContent,omitempty"`
1988
1989 VM *FormulaPropertiesFromVM `json:"vm,omitempty"`
1990
1991 ProvisioningState *string `json:"provisioningState,omitempty"`
1992
1993 UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
1994 }
1995
1996
1997 func (fp FormulaProperties) MarshalJSON() ([]byte, error) {
1998 objectMap := make(map[string]interface{})
1999 if fp.Description != nil {
2000 objectMap["description"] = fp.Description
2001 }
2002 if fp.Author != nil {
2003 objectMap["author"] = fp.Author
2004 }
2005 if fp.OsType != nil {
2006 objectMap["osType"] = fp.OsType
2007 }
2008 if fp.FormulaContent != nil {
2009 objectMap["formulaContent"] = fp.FormulaContent
2010 }
2011 if fp.VM != nil {
2012 objectMap["vm"] = fp.VM
2013 }
2014 if fp.ProvisioningState != nil {
2015 objectMap["provisioningState"] = fp.ProvisioningState
2016 }
2017 if fp.UniqueIdentifier != nil {
2018 objectMap["uniqueIdentifier"] = fp.UniqueIdentifier
2019 }
2020 return json.Marshal(objectMap)
2021 }
2022
2023
2024 type FormulaPropertiesFromVM struct {
2025
2026 LabVMID *string `json:"labVmId,omitempty"`
2027 }
2028
2029
2030
2031 type FormulasCreateOrUpdateFuture struct {
2032 azure.FutureAPI
2033
2034
2035 Result func(FormulasClient) (Formula, error)
2036 }
2037
2038
2039 func (future *FormulasCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
2040 var azFuture azure.Future
2041 if err := json.Unmarshal(body, &azFuture); err != nil {
2042 return err
2043 }
2044 future.FutureAPI = &azFuture
2045 future.Result = future.result
2046 return nil
2047 }
2048
2049
2050 func (future *FormulasCreateOrUpdateFuture) result(client FormulasClient) (f Formula, err error) {
2051 var done bool
2052 done, err = future.DoneWithContext(context.Background(), client)
2053 if err != nil {
2054 err = autorest.NewErrorWithError(err, "dtl.FormulasCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
2055 return
2056 }
2057 if !done {
2058 f.Response.Response = future.Response()
2059 err = azure.NewAsyncOpIncompleteError("dtl.FormulasCreateOrUpdateFuture")
2060 return
2061 }
2062 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2063 if f.Response.Response, err = future.GetResult(sender); err == nil && f.Response.Response.StatusCode != http.StatusNoContent {
2064 f, err = client.CreateOrUpdateResponder(f.Response.Response)
2065 if err != nil {
2066 err = autorest.NewErrorWithError(err, "dtl.FormulasCreateOrUpdateFuture", "Result", f.Response.Response, "Failure responding to request")
2067 }
2068 }
2069 return
2070 }
2071
2072
2073 type GalleryImage struct {
2074
2075 *GalleryImageProperties `json:"properties,omitempty"`
2076
2077 ID *string `json:"id,omitempty"`
2078
2079 Name *string `json:"name,omitempty"`
2080
2081 Type *string `json:"type,omitempty"`
2082
2083 Location *string `json:"location,omitempty"`
2084
2085 Tags map[string]*string `json:"tags"`
2086 }
2087
2088
2089 func (gi GalleryImage) MarshalJSON() ([]byte, error) {
2090 objectMap := make(map[string]interface{})
2091 if gi.GalleryImageProperties != nil {
2092 objectMap["properties"] = gi.GalleryImageProperties
2093 }
2094 if gi.Location != nil {
2095 objectMap["location"] = gi.Location
2096 }
2097 if gi.Tags != nil {
2098 objectMap["tags"] = gi.Tags
2099 }
2100 return json.Marshal(objectMap)
2101 }
2102
2103
2104 func (gi *GalleryImage) UnmarshalJSON(body []byte) error {
2105 var m map[string]*json.RawMessage
2106 err := json.Unmarshal(body, &m)
2107 if err != nil {
2108 return err
2109 }
2110 for k, v := range m {
2111 switch k {
2112 case "properties":
2113 if v != nil {
2114 var galleryImageProperties GalleryImageProperties
2115 err = json.Unmarshal(*v, &galleryImageProperties)
2116 if err != nil {
2117 return err
2118 }
2119 gi.GalleryImageProperties = &galleryImageProperties
2120 }
2121 case "id":
2122 if v != nil {
2123 var ID string
2124 err = json.Unmarshal(*v, &ID)
2125 if err != nil {
2126 return err
2127 }
2128 gi.ID = &ID
2129 }
2130 case "name":
2131 if v != nil {
2132 var name string
2133 err = json.Unmarshal(*v, &name)
2134 if err != nil {
2135 return err
2136 }
2137 gi.Name = &name
2138 }
2139 case "type":
2140 if v != nil {
2141 var typeVar string
2142 err = json.Unmarshal(*v, &typeVar)
2143 if err != nil {
2144 return err
2145 }
2146 gi.Type = &typeVar
2147 }
2148 case "location":
2149 if v != nil {
2150 var location string
2151 err = json.Unmarshal(*v, &location)
2152 if err != nil {
2153 return err
2154 }
2155 gi.Location = &location
2156 }
2157 case "tags":
2158 if v != nil {
2159 var tags map[string]*string
2160 err = json.Unmarshal(*v, &tags)
2161 if err != nil {
2162 return err
2163 }
2164 gi.Tags = tags
2165 }
2166 }
2167 }
2168
2169 return nil
2170 }
2171
2172
2173 type GalleryImageProperties struct {
2174
2175 Author *string `json:"author,omitempty"`
2176
2177 CreatedDate *date.Time `json:"createdDate,omitempty"`
2178
2179 Description *string `json:"description,omitempty"`
2180
2181 ImageReference *GalleryImageReference `json:"imageReference,omitempty"`
2182
2183 Icon *string `json:"icon,omitempty"`
2184
2185 Enabled *bool `json:"enabled,omitempty"`
2186 }
2187
2188
2189 func (gip GalleryImageProperties) MarshalJSON() ([]byte, error) {
2190 objectMap := make(map[string]interface{})
2191 if gip.Author != nil {
2192 objectMap["author"] = gip.Author
2193 }
2194 if gip.Description != nil {
2195 objectMap["description"] = gip.Description
2196 }
2197 if gip.ImageReference != nil {
2198 objectMap["imageReference"] = gip.ImageReference
2199 }
2200 if gip.Icon != nil {
2201 objectMap["icon"] = gip.Icon
2202 }
2203 if gip.Enabled != nil {
2204 objectMap["enabled"] = gip.Enabled
2205 }
2206 return json.Marshal(objectMap)
2207 }
2208
2209
2210 type GalleryImageReference struct {
2211
2212 Offer *string `json:"offer,omitempty"`
2213
2214 Publisher *string `json:"publisher,omitempty"`
2215
2216 Sku *string `json:"sku,omitempty"`
2217
2218 OsType *string `json:"osType,omitempty"`
2219
2220 Version *string `json:"version,omitempty"`
2221 }
2222
2223
2224 type GalleryImageReferenceFragment struct {
2225
2226 Offer *string `json:"offer,omitempty"`
2227
2228 Publisher *string `json:"publisher,omitempty"`
2229
2230 Sku *string `json:"sku,omitempty"`
2231
2232 OsType *string `json:"osType,omitempty"`
2233
2234 Version *string `json:"version,omitempty"`
2235 }
2236
2237
2238 type GenerateArmTemplateRequest struct {
2239
2240 VirtualMachineName *string `json:"virtualMachineName,omitempty"`
2241
2242 Parameters *[]ParameterInfo `json:"parameters,omitempty"`
2243
2244 Location *string `json:"location,omitempty"`
2245
2246 FileUploadOptions FileUploadOptions `json:"fileUploadOptions,omitempty"`
2247 }
2248
2249
2250 type GenerateUploadURIParameter struct {
2251
2252 BlobName *string `json:"blobName,omitempty"`
2253 }
2254
2255
2256 type GenerateUploadURIResponse struct {
2257 autorest.Response `json:"-"`
2258
2259 UploadURI *string `json:"uploadUri,omitempty"`
2260 }
2261
2262
2263
2264 type GlobalSchedulesExecuteFuture struct {
2265 azure.FutureAPI
2266
2267
2268 Result func(GlobalSchedulesClient) (autorest.Response, error)
2269 }
2270
2271
2272 func (future *GlobalSchedulesExecuteFuture) UnmarshalJSON(body []byte) error {
2273 var azFuture azure.Future
2274 if err := json.Unmarshal(body, &azFuture); err != nil {
2275 return err
2276 }
2277 future.FutureAPI = &azFuture
2278 future.Result = future.result
2279 return nil
2280 }
2281
2282
2283 func (future *GlobalSchedulesExecuteFuture) result(client GlobalSchedulesClient) (ar autorest.Response, err error) {
2284 var done bool
2285 done, err = future.DoneWithContext(context.Background(), client)
2286 if err != nil {
2287 err = autorest.NewErrorWithError(err, "dtl.GlobalSchedulesExecuteFuture", "Result", future.Response(), "Polling failure")
2288 return
2289 }
2290 if !done {
2291 ar.Response = future.Response()
2292 err = azure.NewAsyncOpIncompleteError("dtl.GlobalSchedulesExecuteFuture")
2293 return
2294 }
2295 ar.Response = future.Response()
2296 return
2297 }
2298
2299
2300
2301 type GlobalSchedulesRetargetFuture struct {
2302 azure.FutureAPI
2303
2304
2305 Result func(GlobalSchedulesClient) (autorest.Response, error)
2306 }
2307
2308
2309 func (future *GlobalSchedulesRetargetFuture) UnmarshalJSON(body []byte) error {
2310 var azFuture azure.Future
2311 if err := json.Unmarshal(body, &azFuture); err != nil {
2312 return err
2313 }
2314 future.FutureAPI = &azFuture
2315 future.Result = future.result
2316 return nil
2317 }
2318
2319
2320 func (future *GlobalSchedulesRetargetFuture) result(client GlobalSchedulesClient) (ar autorest.Response, err error) {
2321 var done bool
2322 done, err = future.DoneWithContext(context.Background(), client)
2323 if err != nil {
2324 err = autorest.NewErrorWithError(err, "dtl.GlobalSchedulesRetargetFuture", "Result", future.Response(), "Polling failure")
2325 return
2326 }
2327 if !done {
2328 ar.Response = future.Response()
2329 err = azure.NewAsyncOpIncompleteError("dtl.GlobalSchedulesRetargetFuture")
2330 return
2331 }
2332 ar.Response = future.Response()
2333 return
2334 }
2335
2336
2337 type HourDetails struct {
2338
2339 Minute *int32 `json:"minute,omitempty"`
2340 }
2341
2342
2343 type HourDetailsFragment struct {
2344
2345 Minute *int32 `json:"minute,omitempty"`
2346 }
2347
2348
2349 type IdentityProperties struct {
2350
2351 Type *string `json:"type,omitempty"`
2352
2353 PrincipalID *string `json:"principalId,omitempty"`
2354
2355 TenantID *string `json:"tenantId,omitempty"`
2356
2357 ClientSecretURL *string `json:"clientSecretUrl,omitempty"`
2358 }
2359
2360
2361
2362 type InboundNatRule struct {
2363
2364 TransportProtocol TransportProtocol `json:"transportProtocol,omitempty"`
2365
2366 FrontendPort *int32 `json:"frontendPort,omitempty"`
2367
2368 BackendPort *int32 `json:"backendPort,omitempty"`
2369 }
2370
2371
2372
2373 type InboundNatRuleFragment struct {
2374
2375 TransportProtocol TransportProtocol `json:"transportProtocol,omitempty"`
2376
2377 FrontendPort *int32 `json:"frontendPort,omitempty"`
2378
2379 BackendPort *int32 `json:"backendPort,omitempty"`
2380 }
2381
2382
2383 type Lab struct {
2384 autorest.Response `json:"-"`
2385
2386 *LabProperties `json:"properties,omitempty"`
2387
2388 ID *string `json:"id,omitempty"`
2389
2390 Name *string `json:"name,omitempty"`
2391
2392 Type *string `json:"type,omitempty"`
2393
2394 Location *string `json:"location,omitempty"`
2395
2396 Tags map[string]*string `json:"tags"`
2397 }
2398
2399
2400 func (l Lab) MarshalJSON() ([]byte, error) {
2401 objectMap := make(map[string]interface{})
2402 if l.LabProperties != nil {
2403 objectMap["properties"] = l.LabProperties
2404 }
2405 if l.Location != nil {
2406 objectMap["location"] = l.Location
2407 }
2408 if l.Tags != nil {
2409 objectMap["tags"] = l.Tags
2410 }
2411 return json.Marshal(objectMap)
2412 }
2413
2414
2415 func (l *Lab) UnmarshalJSON(body []byte) error {
2416 var m map[string]*json.RawMessage
2417 err := json.Unmarshal(body, &m)
2418 if err != nil {
2419 return err
2420 }
2421 for k, v := range m {
2422 switch k {
2423 case "properties":
2424 if v != nil {
2425 var labProperties LabProperties
2426 err = json.Unmarshal(*v, &labProperties)
2427 if err != nil {
2428 return err
2429 }
2430 l.LabProperties = &labProperties
2431 }
2432 case "id":
2433 if v != nil {
2434 var ID string
2435 err = json.Unmarshal(*v, &ID)
2436 if err != nil {
2437 return err
2438 }
2439 l.ID = &ID
2440 }
2441 case "name":
2442 if v != nil {
2443 var name string
2444 err = json.Unmarshal(*v, &name)
2445 if err != nil {
2446 return err
2447 }
2448 l.Name = &name
2449 }
2450 case "type":
2451 if v != nil {
2452 var typeVar string
2453 err = json.Unmarshal(*v, &typeVar)
2454 if err != nil {
2455 return err
2456 }
2457 l.Type = &typeVar
2458 }
2459 case "location":
2460 if v != nil {
2461 var location string
2462 err = json.Unmarshal(*v, &location)
2463 if err != nil {
2464 return err
2465 }
2466 l.Location = &location
2467 }
2468 case "tags":
2469 if v != nil {
2470 var tags map[string]*string
2471 err = json.Unmarshal(*v, &tags)
2472 if err != nil {
2473 return err
2474 }
2475 l.Tags = tags
2476 }
2477 }
2478 }
2479
2480 return nil
2481 }
2482
2483
2484 type LabCost struct {
2485 autorest.Response `json:"-"`
2486
2487 *LabCostProperties `json:"properties,omitempty"`
2488
2489 ID *string `json:"id,omitempty"`
2490
2491 Name *string `json:"name,omitempty"`
2492
2493 Type *string `json:"type,omitempty"`
2494
2495 Location *string `json:"location,omitempty"`
2496
2497 Tags map[string]*string `json:"tags"`
2498 }
2499
2500
2501 func (lc LabCost) MarshalJSON() ([]byte, error) {
2502 objectMap := make(map[string]interface{})
2503 if lc.LabCostProperties != nil {
2504 objectMap["properties"] = lc.LabCostProperties
2505 }
2506 if lc.Location != nil {
2507 objectMap["location"] = lc.Location
2508 }
2509 if lc.Tags != nil {
2510 objectMap["tags"] = lc.Tags
2511 }
2512 return json.Marshal(objectMap)
2513 }
2514
2515
2516 func (lc *LabCost) UnmarshalJSON(body []byte) error {
2517 var m map[string]*json.RawMessage
2518 err := json.Unmarshal(body, &m)
2519 if err != nil {
2520 return err
2521 }
2522 for k, v := range m {
2523 switch k {
2524 case "properties":
2525 if v != nil {
2526 var labCostProperties LabCostProperties
2527 err = json.Unmarshal(*v, &labCostProperties)
2528 if err != nil {
2529 return err
2530 }
2531 lc.LabCostProperties = &labCostProperties
2532 }
2533 case "id":
2534 if v != nil {
2535 var ID string
2536 err = json.Unmarshal(*v, &ID)
2537 if err != nil {
2538 return err
2539 }
2540 lc.ID = &ID
2541 }
2542 case "name":
2543 if v != nil {
2544 var name string
2545 err = json.Unmarshal(*v, &name)
2546 if err != nil {
2547 return err
2548 }
2549 lc.Name = &name
2550 }
2551 case "type":
2552 if v != nil {
2553 var typeVar string
2554 err = json.Unmarshal(*v, &typeVar)
2555 if err != nil {
2556 return err
2557 }
2558 lc.Type = &typeVar
2559 }
2560 case "location":
2561 if v != nil {
2562 var location string
2563 err = json.Unmarshal(*v, &location)
2564 if err != nil {
2565 return err
2566 }
2567 lc.Location = &location
2568 }
2569 case "tags":
2570 if v != nil {
2571 var tags map[string]*string
2572 err = json.Unmarshal(*v, &tags)
2573 if err != nil {
2574 return err
2575 }
2576 lc.Tags = tags
2577 }
2578 }
2579 }
2580
2581 return nil
2582 }
2583
2584
2585 type LabCostDetailsProperties struct {
2586
2587 Date *date.Time `json:"date,omitempty"`
2588
2589 Cost *float64 `json:"cost,omitempty"`
2590
2591 CostType CostType `json:"costType,omitempty"`
2592 }
2593
2594
2595 type LabCostProperties struct {
2596
2597 TargetCost *TargetCostProperties `json:"targetCost,omitempty"`
2598
2599 LabCostSummary *LabCostSummaryProperties `json:"labCostSummary,omitempty"`
2600
2601 LabCostDetails *[]LabCostDetailsProperties `json:"labCostDetails,omitempty"`
2602
2603 ResourceCosts *[]LabResourceCostProperties `json:"resourceCosts,omitempty"`
2604
2605 CurrencyCode *string `json:"currencyCode,omitempty"`
2606
2607 StartDateTime *date.Time `json:"startDateTime,omitempty"`
2608
2609 EndDateTime *date.Time `json:"endDateTime,omitempty"`
2610
2611 CreatedDate *date.Time `json:"createdDate,omitempty"`
2612
2613 ProvisioningState *string `json:"provisioningState,omitempty"`
2614
2615 UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
2616 }
2617
2618
2619 func (lcp LabCostProperties) MarshalJSON() ([]byte, error) {
2620 objectMap := make(map[string]interface{})
2621 if lcp.TargetCost != nil {
2622 objectMap["targetCost"] = lcp.TargetCost
2623 }
2624 if lcp.CurrencyCode != nil {
2625 objectMap["currencyCode"] = lcp.CurrencyCode
2626 }
2627 if lcp.StartDateTime != nil {
2628 objectMap["startDateTime"] = lcp.StartDateTime
2629 }
2630 if lcp.EndDateTime != nil {
2631 objectMap["endDateTime"] = lcp.EndDateTime
2632 }
2633 if lcp.CreatedDate != nil {
2634 objectMap["createdDate"] = lcp.CreatedDate
2635 }
2636 if lcp.ProvisioningState != nil {
2637 objectMap["provisioningState"] = lcp.ProvisioningState
2638 }
2639 if lcp.UniqueIdentifier != nil {
2640 objectMap["uniqueIdentifier"] = lcp.UniqueIdentifier
2641 }
2642 return json.Marshal(objectMap)
2643 }
2644
2645
2646 type LabCostSummaryProperties struct {
2647
2648 EstimatedLabCost *float64 `json:"estimatedLabCost,omitempty"`
2649 }
2650
2651
2652 type LabFragment struct {
2653
2654 *LabPropertiesFragment `json:"properties,omitempty"`
2655
2656 ID *string `json:"id,omitempty"`
2657
2658 Name *string `json:"name,omitempty"`
2659
2660 Type *string `json:"type,omitempty"`
2661
2662 Location *string `json:"location,omitempty"`
2663
2664 Tags map[string]*string `json:"tags"`
2665 }
2666
2667
2668 func (lf LabFragment) MarshalJSON() ([]byte, error) {
2669 objectMap := make(map[string]interface{})
2670 if lf.LabPropertiesFragment != nil {
2671 objectMap["properties"] = lf.LabPropertiesFragment
2672 }
2673 if lf.Location != nil {
2674 objectMap["location"] = lf.Location
2675 }
2676 if lf.Tags != nil {
2677 objectMap["tags"] = lf.Tags
2678 }
2679 return json.Marshal(objectMap)
2680 }
2681
2682
2683 func (lf *LabFragment) UnmarshalJSON(body []byte) error {
2684 var m map[string]*json.RawMessage
2685 err := json.Unmarshal(body, &m)
2686 if err != nil {
2687 return err
2688 }
2689 for k, v := range m {
2690 switch k {
2691 case "properties":
2692 if v != nil {
2693 var labPropertiesFragment LabPropertiesFragment
2694 err = json.Unmarshal(*v, &labPropertiesFragment)
2695 if err != nil {
2696 return err
2697 }
2698 lf.LabPropertiesFragment = &labPropertiesFragment
2699 }
2700 case "id":
2701 if v != nil {
2702 var ID string
2703 err = json.Unmarshal(*v, &ID)
2704 if err != nil {
2705 return err
2706 }
2707 lf.ID = &ID
2708 }
2709 case "name":
2710 if v != nil {
2711 var name string
2712 err = json.Unmarshal(*v, &name)
2713 if err != nil {
2714 return err
2715 }
2716 lf.Name = &name
2717 }
2718 case "type":
2719 if v != nil {
2720 var typeVar string
2721 err = json.Unmarshal(*v, &typeVar)
2722 if err != nil {
2723 return err
2724 }
2725 lf.Type = &typeVar
2726 }
2727 case "location":
2728 if v != nil {
2729 var location string
2730 err = json.Unmarshal(*v, &location)
2731 if err != nil {
2732 return err
2733 }
2734 lf.Location = &location
2735 }
2736 case "tags":
2737 if v != nil {
2738 var tags map[string]*string
2739 err = json.Unmarshal(*v, &tags)
2740 if err != nil {
2741 return err
2742 }
2743 lf.Tags = tags
2744 }
2745 }
2746 }
2747
2748 return nil
2749 }
2750
2751
2752 type LabProperties struct {
2753
2754 DefaultStorageAccount *string `json:"defaultStorageAccount,omitempty"`
2755
2756 DefaultPremiumStorageAccount *string `json:"defaultPremiumStorageAccount,omitempty"`
2757
2758 ArtifactsStorageAccount *string `json:"artifactsStorageAccount,omitempty"`
2759
2760 PremiumDataDiskStorageAccount *string `json:"premiumDataDiskStorageAccount,omitempty"`
2761
2762 VaultName *string `json:"vaultName,omitempty"`
2763
2764 LabStorageType StorageType `json:"labStorageType,omitempty"`
2765
2766 CreatedDate *date.Time `json:"createdDate,omitempty"`
2767
2768
2769
2770 PremiumDataDisks PremiumDataDisk `json:"premiumDataDisks,omitempty"`
2771
2772 ProvisioningState *string `json:"provisioningState,omitempty"`
2773
2774 UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
2775 }
2776
2777
2778 func (lp LabProperties) MarshalJSON() ([]byte, error) {
2779 objectMap := make(map[string]interface{})
2780 if lp.LabStorageType != "" {
2781 objectMap["labStorageType"] = lp.LabStorageType
2782 }
2783 if lp.PremiumDataDisks != "" {
2784 objectMap["premiumDataDisks"] = lp.PremiumDataDisks
2785 }
2786 if lp.ProvisioningState != nil {
2787 objectMap["provisioningState"] = lp.ProvisioningState
2788 }
2789 if lp.UniqueIdentifier != nil {
2790 objectMap["uniqueIdentifier"] = lp.UniqueIdentifier
2791 }
2792 return json.Marshal(objectMap)
2793 }
2794
2795
2796 type LabPropertiesFragment struct {
2797
2798 LabStorageType StorageType `json:"labStorageType,omitempty"`
2799
2800
2801
2802 PremiumDataDisks PremiumDataDisk `json:"premiumDataDisks,omitempty"`
2803
2804 ProvisioningState *string `json:"provisioningState,omitempty"`
2805
2806 UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
2807 }
2808
2809
2810 type LabResourceCostProperties struct {
2811
2812 Resourcename *string `json:"resourcename,omitempty"`
2813
2814 ResourceUID *string `json:"resourceUId,omitempty"`
2815
2816 ResourceCost *float64 `json:"resourceCost,omitempty"`
2817
2818 ResourceType *string `json:"resourceType,omitempty"`
2819
2820 ResourceOwner *string `json:"resourceOwner,omitempty"`
2821
2822 ResourcePricingTier *string `json:"resourcePricingTier,omitempty"`
2823
2824 ResourceStatus *string `json:"resourceStatus,omitempty"`
2825
2826 ResourceID *string `json:"resourceId,omitempty"`
2827
2828 ExternalResourceID *string `json:"externalResourceId,omitempty"`
2829 }
2830
2831
2832
2833 type LabsClaimAnyVMFuture struct {
2834 azure.FutureAPI
2835
2836
2837 Result func(LabsClient) (autorest.Response, error)
2838 }
2839
2840
2841 func (future *LabsClaimAnyVMFuture) UnmarshalJSON(body []byte) error {
2842 var azFuture azure.Future
2843 if err := json.Unmarshal(body, &azFuture); err != nil {
2844 return err
2845 }
2846 future.FutureAPI = &azFuture
2847 future.Result = future.result
2848 return nil
2849 }
2850
2851
2852 func (future *LabsClaimAnyVMFuture) result(client LabsClient) (ar autorest.Response, err error) {
2853 var done bool
2854 done, err = future.DoneWithContext(context.Background(), client)
2855 if err != nil {
2856 err = autorest.NewErrorWithError(err, "dtl.LabsClaimAnyVMFuture", "Result", future.Response(), "Polling failure")
2857 return
2858 }
2859 if !done {
2860 ar.Response = future.Response()
2861 err = azure.NewAsyncOpIncompleteError("dtl.LabsClaimAnyVMFuture")
2862 return
2863 }
2864 ar.Response = future.Response()
2865 return
2866 }
2867
2868
2869
2870 type LabsCreateEnvironmentFuture struct {
2871 azure.FutureAPI
2872
2873
2874 Result func(LabsClient) (autorest.Response, error)
2875 }
2876
2877
2878 func (future *LabsCreateEnvironmentFuture) UnmarshalJSON(body []byte) error {
2879 var azFuture azure.Future
2880 if err := json.Unmarshal(body, &azFuture); err != nil {
2881 return err
2882 }
2883 future.FutureAPI = &azFuture
2884 future.Result = future.result
2885 return nil
2886 }
2887
2888
2889 func (future *LabsCreateEnvironmentFuture) result(client LabsClient) (ar autorest.Response, err error) {
2890 var done bool
2891 done, err = future.DoneWithContext(context.Background(), client)
2892 if err != nil {
2893 err = autorest.NewErrorWithError(err, "dtl.LabsCreateEnvironmentFuture", "Result", future.Response(), "Polling failure")
2894 return
2895 }
2896 if !done {
2897 ar.Response = future.Response()
2898 err = azure.NewAsyncOpIncompleteError("dtl.LabsCreateEnvironmentFuture")
2899 return
2900 }
2901 ar.Response = future.Response()
2902 return
2903 }
2904
2905
2906
2907 type LabsCreateOrUpdateFuture struct {
2908 azure.FutureAPI
2909
2910
2911 Result func(LabsClient) (Lab, error)
2912 }
2913
2914
2915 func (future *LabsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
2916 var azFuture azure.Future
2917 if err := json.Unmarshal(body, &azFuture); err != nil {
2918 return err
2919 }
2920 future.FutureAPI = &azFuture
2921 future.Result = future.result
2922 return nil
2923 }
2924
2925
2926 func (future *LabsCreateOrUpdateFuture) result(client LabsClient) (l Lab, err error) {
2927 var done bool
2928 done, err = future.DoneWithContext(context.Background(), client)
2929 if err != nil {
2930 err = autorest.NewErrorWithError(err, "dtl.LabsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
2931 return
2932 }
2933 if !done {
2934 l.Response.Response = future.Response()
2935 err = azure.NewAsyncOpIncompleteError("dtl.LabsCreateOrUpdateFuture")
2936 return
2937 }
2938 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2939 if l.Response.Response, err = future.GetResult(sender); err == nil && l.Response.Response.StatusCode != http.StatusNoContent {
2940 l, err = client.CreateOrUpdateResponder(l.Response.Response)
2941 if err != nil {
2942 err = autorest.NewErrorWithError(err, "dtl.LabsCreateOrUpdateFuture", "Result", l.Response.Response, "Failure responding to request")
2943 }
2944 }
2945 return
2946 }
2947
2948
2949 type LabsDeleteFuture struct {
2950 azure.FutureAPI
2951
2952
2953 Result func(LabsClient) (autorest.Response, error)
2954 }
2955
2956
2957 func (future *LabsDeleteFuture) UnmarshalJSON(body []byte) error {
2958 var azFuture azure.Future
2959 if err := json.Unmarshal(body, &azFuture); err != nil {
2960 return err
2961 }
2962 future.FutureAPI = &azFuture
2963 future.Result = future.result
2964 return nil
2965 }
2966
2967
2968 func (future *LabsDeleteFuture) result(client LabsClient) (ar autorest.Response, err error) {
2969 var done bool
2970 done, err = future.DoneWithContext(context.Background(), client)
2971 if err != nil {
2972 err = autorest.NewErrorWithError(err, "dtl.LabsDeleteFuture", "Result", future.Response(), "Polling failure")
2973 return
2974 }
2975 if !done {
2976 ar.Response = future.Response()
2977 err = azure.NewAsyncOpIncompleteError("dtl.LabsDeleteFuture")
2978 return
2979 }
2980 ar.Response = future.Response()
2981 return
2982 }
2983
2984
2985
2986 type LabsExportResourceUsageFuture struct {
2987 azure.FutureAPI
2988
2989
2990 Result func(LabsClient) (autorest.Response, error)
2991 }
2992
2993
2994 func (future *LabsExportResourceUsageFuture) UnmarshalJSON(body []byte) error {
2995 var azFuture azure.Future
2996 if err := json.Unmarshal(body, &azFuture); err != nil {
2997 return err
2998 }
2999 future.FutureAPI = &azFuture
3000 future.Result = future.result
3001 return nil
3002 }
3003
3004
3005 func (future *LabsExportResourceUsageFuture) result(client LabsClient) (ar autorest.Response, err error) {
3006 var done bool
3007 done, err = future.DoneWithContext(context.Background(), client)
3008 if err != nil {
3009 err = autorest.NewErrorWithError(err, "dtl.LabsExportResourceUsageFuture", "Result", future.Response(), "Polling failure")
3010 return
3011 }
3012 if !done {
3013 ar.Response = future.Response()
3014 err = azure.NewAsyncOpIncompleteError("dtl.LabsExportResourceUsageFuture")
3015 return
3016 }
3017 ar.Response = future.Response()
3018 return
3019 }
3020
3021
3022 type LabVhd struct {
3023
3024 ID *string `json:"id,omitempty"`
3025 }
3026
3027
3028 type LabVirtualMachine struct {
3029 autorest.Response `json:"-"`
3030
3031 *LabVirtualMachineProperties `json:"properties,omitempty"`
3032
3033 ID *string `json:"id,omitempty"`
3034
3035 Name *string `json:"name,omitempty"`
3036
3037 Type *string `json:"type,omitempty"`
3038
3039 Location *string `json:"location,omitempty"`
3040
3041 Tags map[string]*string `json:"tags"`
3042 }
3043
3044
3045 func (lvm LabVirtualMachine) MarshalJSON() ([]byte, error) {
3046 objectMap := make(map[string]interface{})
3047 if lvm.LabVirtualMachineProperties != nil {
3048 objectMap["properties"] = lvm.LabVirtualMachineProperties
3049 }
3050 if lvm.Location != nil {
3051 objectMap["location"] = lvm.Location
3052 }
3053 if lvm.Tags != nil {
3054 objectMap["tags"] = lvm.Tags
3055 }
3056 return json.Marshal(objectMap)
3057 }
3058
3059
3060 func (lvm *LabVirtualMachine) 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 "properties":
3069 if v != nil {
3070 var labVirtualMachineProperties LabVirtualMachineProperties
3071 err = json.Unmarshal(*v, &labVirtualMachineProperties)
3072 if err != nil {
3073 return err
3074 }
3075 lvm.LabVirtualMachineProperties = &labVirtualMachineProperties
3076 }
3077 case "id":
3078 if v != nil {
3079 var ID string
3080 err = json.Unmarshal(*v, &ID)
3081 if err != nil {
3082 return err
3083 }
3084 lvm.ID = &ID
3085 }
3086 case "name":
3087 if v != nil {
3088 var name string
3089 err = json.Unmarshal(*v, &name)
3090 if err != nil {
3091 return err
3092 }
3093 lvm.Name = &name
3094 }
3095 case "type":
3096 if v != nil {
3097 var typeVar string
3098 err = json.Unmarshal(*v, &typeVar)
3099 if err != nil {
3100 return err
3101 }
3102 lvm.Type = &typeVar
3103 }
3104 case "location":
3105 if v != nil {
3106 var location string
3107 err = json.Unmarshal(*v, &location)
3108 if err != nil {
3109 return err
3110 }
3111 lvm.Location = &location
3112 }
3113 case "tags":
3114 if v != nil {
3115 var tags map[string]*string
3116 err = json.Unmarshal(*v, &tags)
3117 if err != nil {
3118 return err
3119 }
3120 lvm.Tags = tags
3121 }
3122 }
3123 }
3124
3125 return nil
3126 }
3127
3128
3129 type LabVirtualMachineCreationParameter struct {
3130
3131 *LabVirtualMachineCreationParameterProperties `json:"properties,omitempty"`
3132
3133 Name *string `json:"name,omitempty"`
3134
3135 Location *string `json:"location,omitempty"`
3136
3137 Tags map[string]*string `json:"tags"`
3138 }
3139
3140
3141 func (lvmcp LabVirtualMachineCreationParameter) MarshalJSON() ([]byte, error) {
3142 objectMap := make(map[string]interface{})
3143 if lvmcp.LabVirtualMachineCreationParameterProperties != nil {
3144 objectMap["properties"] = lvmcp.LabVirtualMachineCreationParameterProperties
3145 }
3146 if lvmcp.Name != nil {
3147 objectMap["name"] = lvmcp.Name
3148 }
3149 if lvmcp.Location != nil {
3150 objectMap["location"] = lvmcp.Location
3151 }
3152 if lvmcp.Tags != nil {
3153 objectMap["tags"] = lvmcp.Tags
3154 }
3155 return json.Marshal(objectMap)
3156 }
3157
3158
3159 func (lvmcp *LabVirtualMachineCreationParameter) UnmarshalJSON(body []byte) error {
3160 var m map[string]*json.RawMessage
3161 err := json.Unmarshal(body, &m)
3162 if err != nil {
3163 return err
3164 }
3165 for k, v := range m {
3166 switch k {
3167 case "properties":
3168 if v != nil {
3169 var labVirtualMachineCreationParameterProperties LabVirtualMachineCreationParameterProperties
3170 err = json.Unmarshal(*v, &labVirtualMachineCreationParameterProperties)
3171 if err != nil {
3172 return err
3173 }
3174 lvmcp.LabVirtualMachineCreationParameterProperties = &labVirtualMachineCreationParameterProperties
3175 }
3176 case "name":
3177 if v != nil {
3178 var name string
3179 err = json.Unmarshal(*v, &name)
3180 if err != nil {
3181 return err
3182 }
3183 lvmcp.Name = &name
3184 }
3185 case "location":
3186 if v != nil {
3187 var location string
3188 err = json.Unmarshal(*v, &location)
3189 if err != nil {
3190 return err
3191 }
3192 lvmcp.Location = &location
3193 }
3194 case "tags":
3195 if v != nil {
3196 var tags map[string]*string
3197 err = json.Unmarshal(*v, &tags)
3198 if err != nil {
3199 return err
3200 }
3201 lvmcp.Tags = tags
3202 }
3203 }
3204 }
3205
3206 return nil
3207 }
3208
3209
3210 type LabVirtualMachineCreationParameterProperties struct {
3211
3212 BulkCreationParameters *BulkCreationParameters `json:"bulkCreationParameters,omitempty"`
3213
3214 Notes *string `json:"notes,omitempty"`
3215
3216 OwnerObjectID *string `json:"ownerObjectId,omitempty"`
3217
3218 OwnerUserPrincipalName *string `json:"ownerUserPrincipalName,omitempty"`
3219
3220 CreatedByUserID *string `json:"createdByUserId,omitempty"`
3221
3222 CreatedByUser *string `json:"createdByUser,omitempty"`
3223
3224 CreatedDate *date.Time `json:"createdDate,omitempty"`
3225
3226 CustomImageID *string `json:"customImageId,omitempty"`
3227
3228 OsType *string `json:"osType,omitempty"`
3229
3230 Size *string `json:"size,omitempty"`
3231
3232 UserName *string `json:"userName,omitempty"`
3233
3234 Password *string `json:"password,omitempty"`
3235
3236 SSHKey *string `json:"sshKey,omitempty"`
3237
3238 IsAuthenticationWithSSHKey *bool `json:"isAuthenticationWithSshKey,omitempty"`
3239
3240 Fqdn *string `json:"fqdn,omitempty"`
3241
3242 LabSubnetName *string `json:"labSubnetName,omitempty"`
3243
3244 LabVirtualNetworkID *string `json:"labVirtualNetworkId,omitempty"`
3245
3246 DisallowPublicIPAddress *bool `json:"disallowPublicIpAddress,omitempty"`
3247
3248 Artifacts *[]ArtifactInstallProperties `json:"artifacts,omitempty"`
3249
3250 ArtifactDeploymentStatus *ArtifactDeploymentStatusProperties `json:"artifactDeploymentStatus,omitempty"`
3251
3252 GalleryImageReference *GalleryImageReference `json:"galleryImageReference,omitempty"`
3253
3254 ComputeVM *ComputeVMProperties `json:"computeVm,omitempty"`
3255
3256 NetworkInterface *NetworkInterfaceProperties `json:"networkInterface,omitempty"`
3257
3258 ApplicableSchedule *ApplicableSchedule `json:"applicableSchedule,omitempty"`
3259
3260 ExpirationDate *date.Time `json:"expirationDate,omitempty"`
3261
3262 AllowClaim *bool `json:"allowClaim,omitempty"`
3263
3264 StorageType *string `json:"storageType,omitempty"`
3265
3266 VirtualMachineCreationSource VirtualMachineCreationSource `json:"virtualMachineCreationSource,omitempty"`
3267
3268 EnvironmentID *string `json:"environmentId,omitempty"`
3269
3270 ProvisioningState *string `json:"provisioningState,omitempty"`
3271
3272 UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
3273 }
3274
3275
3276 type LabVirtualMachineFragment struct {
3277
3278 *LabVirtualMachinePropertiesFragment `json:"properties,omitempty"`
3279
3280 ID *string `json:"id,omitempty"`
3281
3282 Name *string `json:"name,omitempty"`
3283
3284 Type *string `json:"type,omitempty"`
3285
3286 Location *string `json:"location,omitempty"`
3287
3288 Tags map[string]*string `json:"tags"`
3289 }
3290
3291
3292 func (lvmf LabVirtualMachineFragment) MarshalJSON() ([]byte, error) {
3293 objectMap := make(map[string]interface{})
3294 if lvmf.LabVirtualMachinePropertiesFragment != nil {
3295 objectMap["properties"] = lvmf.LabVirtualMachinePropertiesFragment
3296 }
3297 if lvmf.Location != nil {
3298 objectMap["location"] = lvmf.Location
3299 }
3300 if lvmf.Tags != nil {
3301 objectMap["tags"] = lvmf.Tags
3302 }
3303 return json.Marshal(objectMap)
3304 }
3305
3306
3307 func (lvmf *LabVirtualMachineFragment) UnmarshalJSON(body []byte) error {
3308 var m map[string]*json.RawMessage
3309 err := json.Unmarshal(body, &m)
3310 if err != nil {
3311 return err
3312 }
3313 for k, v := range m {
3314 switch k {
3315 case "properties":
3316 if v != nil {
3317 var labVirtualMachinePropertiesFragment LabVirtualMachinePropertiesFragment
3318 err = json.Unmarshal(*v, &labVirtualMachinePropertiesFragment)
3319 if err != nil {
3320 return err
3321 }
3322 lvmf.LabVirtualMachinePropertiesFragment = &labVirtualMachinePropertiesFragment
3323 }
3324 case "id":
3325 if v != nil {
3326 var ID string
3327 err = json.Unmarshal(*v, &ID)
3328 if err != nil {
3329 return err
3330 }
3331 lvmf.ID = &ID
3332 }
3333 case "name":
3334 if v != nil {
3335 var name string
3336 err = json.Unmarshal(*v, &name)
3337 if err != nil {
3338 return err
3339 }
3340 lvmf.Name = &name
3341 }
3342 case "type":
3343 if v != nil {
3344 var typeVar string
3345 err = json.Unmarshal(*v, &typeVar)
3346 if err != nil {
3347 return err
3348 }
3349 lvmf.Type = &typeVar
3350 }
3351 case "location":
3352 if v != nil {
3353 var location string
3354 err = json.Unmarshal(*v, &location)
3355 if err != nil {
3356 return err
3357 }
3358 lvmf.Location = &location
3359 }
3360 case "tags":
3361 if v != nil {
3362 var tags map[string]*string
3363 err = json.Unmarshal(*v, &tags)
3364 if err != nil {
3365 return err
3366 }
3367 lvmf.Tags = tags
3368 }
3369 }
3370 }
3371
3372 return nil
3373 }
3374
3375
3376 type LabVirtualMachineProperties struct {
3377
3378 Notes *string `json:"notes,omitempty"`
3379
3380 OwnerObjectID *string `json:"ownerObjectId,omitempty"`
3381
3382 OwnerUserPrincipalName *string `json:"ownerUserPrincipalName,omitempty"`
3383
3384 CreatedByUserID *string `json:"createdByUserId,omitempty"`
3385
3386 CreatedByUser *string `json:"createdByUser,omitempty"`
3387
3388 CreatedDate *date.Time `json:"createdDate,omitempty"`
3389
3390 ComputeID *string `json:"computeId,omitempty"`
3391
3392 CustomImageID *string `json:"customImageId,omitempty"`
3393
3394 OsType *string `json:"osType,omitempty"`
3395
3396 Size *string `json:"size,omitempty"`
3397
3398 UserName *string `json:"userName,omitempty"`
3399
3400 Password *string `json:"password,omitempty"`
3401
3402 SSHKey *string `json:"sshKey,omitempty"`
3403
3404 IsAuthenticationWithSSHKey *bool `json:"isAuthenticationWithSshKey,omitempty"`
3405
3406 Fqdn *string `json:"fqdn,omitempty"`
3407
3408 LabSubnetName *string `json:"labSubnetName,omitempty"`
3409
3410 LabVirtualNetworkID *string `json:"labVirtualNetworkId,omitempty"`
3411
3412 DisallowPublicIPAddress *bool `json:"disallowPublicIpAddress,omitempty"`
3413
3414 Artifacts *[]ArtifactInstallProperties `json:"artifacts,omitempty"`
3415
3416 ArtifactDeploymentStatus *ArtifactDeploymentStatusProperties `json:"artifactDeploymentStatus,omitempty"`
3417
3418 GalleryImageReference *GalleryImageReference `json:"galleryImageReference,omitempty"`
3419
3420 ComputeVM *ComputeVMProperties `json:"computeVm,omitempty"`
3421
3422 NetworkInterface *NetworkInterfaceProperties `json:"networkInterface,omitempty"`
3423
3424 ApplicableSchedule *ApplicableSchedule `json:"applicableSchedule,omitempty"`
3425
3426 ExpirationDate *date.Time `json:"expirationDate,omitempty"`
3427
3428 AllowClaim *bool `json:"allowClaim,omitempty"`
3429
3430 StorageType *string `json:"storageType,omitempty"`
3431
3432 VirtualMachineCreationSource VirtualMachineCreationSource `json:"virtualMachineCreationSource,omitempty"`
3433
3434 EnvironmentID *string `json:"environmentId,omitempty"`
3435
3436 ProvisioningState *string `json:"provisioningState,omitempty"`
3437
3438 UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
3439 }
3440
3441
3442 func (lvmp LabVirtualMachineProperties) MarshalJSON() ([]byte, error) {
3443 objectMap := make(map[string]interface{})
3444 if lvmp.Notes != nil {
3445 objectMap["notes"] = lvmp.Notes
3446 }
3447 if lvmp.OwnerObjectID != nil {
3448 objectMap["ownerObjectId"] = lvmp.OwnerObjectID
3449 }
3450 if lvmp.OwnerUserPrincipalName != nil {
3451 objectMap["ownerUserPrincipalName"] = lvmp.OwnerUserPrincipalName
3452 }
3453 if lvmp.CreatedByUserID != nil {
3454 objectMap["createdByUserId"] = lvmp.CreatedByUserID
3455 }
3456 if lvmp.CreatedByUser != nil {
3457 objectMap["createdByUser"] = lvmp.CreatedByUser
3458 }
3459 if lvmp.CreatedDate != nil {
3460 objectMap["createdDate"] = lvmp.CreatedDate
3461 }
3462 if lvmp.CustomImageID != nil {
3463 objectMap["customImageId"] = lvmp.CustomImageID
3464 }
3465 if lvmp.OsType != nil {
3466 objectMap["osType"] = lvmp.OsType
3467 }
3468 if lvmp.Size != nil {
3469 objectMap["size"] = lvmp.Size
3470 }
3471 if lvmp.UserName != nil {
3472 objectMap["userName"] = lvmp.UserName
3473 }
3474 if lvmp.Password != nil {
3475 objectMap["password"] = lvmp.Password
3476 }
3477 if lvmp.SSHKey != nil {
3478 objectMap["sshKey"] = lvmp.SSHKey
3479 }
3480 if lvmp.IsAuthenticationWithSSHKey != nil {
3481 objectMap["isAuthenticationWithSshKey"] = lvmp.IsAuthenticationWithSSHKey
3482 }
3483 if lvmp.Fqdn != nil {
3484 objectMap["fqdn"] = lvmp.Fqdn
3485 }
3486 if lvmp.LabSubnetName != nil {
3487 objectMap["labSubnetName"] = lvmp.LabSubnetName
3488 }
3489 if lvmp.LabVirtualNetworkID != nil {
3490 objectMap["labVirtualNetworkId"] = lvmp.LabVirtualNetworkID
3491 }
3492 if lvmp.DisallowPublicIPAddress != nil {
3493 objectMap["disallowPublicIpAddress"] = lvmp.DisallowPublicIPAddress
3494 }
3495 if lvmp.Artifacts != nil {
3496 objectMap["artifacts"] = lvmp.Artifacts
3497 }
3498 if lvmp.ArtifactDeploymentStatus != nil {
3499 objectMap["artifactDeploymentStatus"] = lvmp.ArtifactDeploymentStatus
3500 }
3501 if lvmp.GalleryImageReference != nil {
3502 objectMap["galleryImageReference"] = lvmp.GalleryImageReference
3503 }
3504 if lvmp.ComputeVM != nil {
3505 objectMap["computeVm"] = lvmp.ComputeVM
3506 }
3507 if lvmp.NetworkInterface != nil {
3508 objectMap["networkInterface"] = lvmp.NetworkInterface
3509 }
3510 if lvmp.ApplicableSchedule != nil {
3511 objectMap["applicableSchedule"] = lvmp.ApplicableSchedule
3512 }
3513 if lvmp.ExpirationDate != nil {
3514 objectMap["expirationDate"] = lvmp.ExpirationDate
3515 }
3516 if lvmp.AllowClaim != nil {
3517 objectMap["allowClaim"] = lvmp.AllowClaim
3518 }
3519 if lvmp.StorageType != nil {
3520 objectMap["storageType"] = lvmp.StorageType
3521 }
3522 if lvmp.VirtualMachineCreationSource != "" {
3523 objectMap["virtualMachineCreationSource"] = lvmp.VirtualMachineCreationSource
3524 }
3525 if lvmp.EnvironmentID != nil {
3526 objectMap["environmentId"] = lvmp.EnvironmentID
3527 }
3528 if lvmp.ProvisioningState != nil {
3529 objectMap["provisioningState"] = lvmp.ProvisioningState
3530 }
3531 if lvmp.UniqueIdentifier != nil {
3532 objectMap["uniqueIdentifier"] = lvmp.UniqueIdentifier
3533 }
3534 return json.Marshal(objectMap)
3535 }
3536
3537
3538 type LabVirtualMachinePropertiesFragment struct {
3539
3540 Notes *string `json:"notes,omitempty"`
3541
3542 OwnerObjectID *string `json:"ownerObjectId,omitempty"`
3543
3544 OwnerUserPrincipalName *string `json:"ownerUserPrincipalName,omitempty"`
3545
3546 CreatedByUserID *string `json:"createdByUserId,omitempty"`
3547
3548 CreatedByUser *string `json:"createdByUser,omitempty"`
3549
3550 CreatedDate *date.Time `json:"createdDate,omitempty"`
3551
3552 CustomImageID *string `json:"customImageId,omitempty"`
3553
3554 OsType *string `json:"osType,omitempty"`
3555
3556 Size *string `json:"size,omitempty"`
3557
3558 UserName *string `json:"userName,omitempty"`
3559
3560 Password *string `json:"password,omitempty"`
3561
3562 SSHKey *string `json:"sshKey,omitempty"`
3563
3564 IsAuthenticationWithSSHKey *bool `json:"isAuthenticationWithSshKey,omitempty"`
3565
3566 Fqdn *string `json:"fqdn,omitempty"`
3567
3568 LabSubnetName *string `json:"labSubnetName,omitempty"`
3569
3570 LabVirtualNetworkID *string `json:"labVirtualNetworkId,omitempty"`
3571
3572 DisallowPublicIPAddress *bool `json:"disallowPublicIpAddress,omitempty"`
3573
3574 Artifacts *[]ArtifactInstallPropertiesFragment `json:"artifacts,omitempty"`
3575
3576 ArtifactDeploymentStatus *ArtifactDeploymentStatusPropertiesFragment `json:"artifactDeploymentStatus,omitempty"`
3577
3578 GalleryImageReference *GalleryImageReferenceFragment `json:"galleryImageReference,omitempty"`
3579
3580 ComputeVM *ComputeVMPropertiesFragment `json:"computeVm,omitempty"`
3581
3582 NetworkInterface *NetworkInterfacePropertiesFragment `json:"networkInterface,omitempty"`
3583
3584 ApplicableSchedule *ApplicableScheduleFragment `json:"applicableSchedule,omitempty"`
3585
3586 ExpirationDate *date.Time `json:"expirationDate,omitempty"`
3587
3588 AllowClaim *bool `json:"allowClaim,omitempty"`
3589
3590 StorageType *string `json:"storageType,omitempty"`
3591
3592 VirtualMachineCreationSource VirtualMachineCreationSource `json:"virtualMachineCreationSource,omitempty"`
3593
3594 EnvironmentID *string `json:"environmentId,omitempty"`
3595
3596 ProvisioningState *string `json:"provisioningState,omitempty"`
3597
3598 UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
3599 }
3600
3601
3602 type LinuxOsInfo struct {
3603
3604 LinuxOsState LinuxOsState `json:"linuxOsState,omitempty"`
3605 }
3606
3607
3608 type NetworkInterfaceProperties struct {
3609
3610 VirtualNetworkID *string `json:"virtualNetworkId,omitempty"`
3611
3612 SubnetID *string `json:"subnetId,omitempty"`
3613
3614 PublicIPAddressID *string `json:"publicIpAddressId,omitempty"`
3615
3616 PublicIPAddress *string `json:"publicIpAddress,omitempty"`
3617
3618 PrivateIPAddress *string `json:"privateIpAddress,omitempty"`
3619
3620 DNSName *string `json:"dnsName,omitempty"`
3621
3622 RdpAuthority *string `json:"rdpAuthority,omitempty"`
3623
3624 SSHAuthority *string `json:"sshAuthority,omitempty"`
3625
3626 SharedPublicIPAddressConfiguration *SharedPublicIPAddressConfiguration `json:"sharedPublicIpAddressConfiguration,omitempty"`
3627 }
3628
3629
3630 type NetworkInterfacePropertiesFragment struct {
3631
3632 VirtualNetworkID *string `json:"virtualNetworkId,omitempty"`
3633
3634 SubnetID *string `json:"subnetId,omitempty"`
3635
3636 PublicIPAddressID *string `json:"publicIpAddressId,omitempty"`
3637
3638 PublicIPAddress *string `json:"publicIpAddress,omitempty"`
3639
3640 PrivateIPAddress *string `json:"privateIpAddress,omitempty"`
3641
3642 DNSName *string `json:"dnsName,omitempty"`
3643
3644 RdpAuthority *string `json:"rdpAuthority,omitempty"`
3645
3646 SSHAuthority *string `json:"sshAuthority,omitempty"`
3647
3648 SharedPublicIPAddressConfiguration *SharedPublicIPAddressConfigurationFragment `json:"sharedPublicIpAddressConfiguration,omitempty"`
3649 }
3650
3651
3652 type NotificationChannel struct {
3653 autorest.Response `json:"-"`
3654
3655 *NotificationChannelProperties `json:"properties,omitempty"`
3656
3657 ID *string `json:"id,omitempty"`
3658
3659 Name *string `json:"name,omitempty"`
3660
3661 Type *string `json:"type,omitempty"`
3662
3663 Location *string `json:"location,omitempty"`
3664
3665 Tags map[string]*string `json:"tags"`
3666 }
3667
3668
3669 func (nc NotificationChannel) MarshalJSON() ([]byte, error) {
3670 objectMap := make(map[string]interface{})
3671 if nc.NotificationChannelProperties != nil {
3672 objectMap["properties"] = nc.NotificationChannelProperties
3673 }
3674 if nc.Location != nil {
3675 objectMap["location"] = nc.Location
3676 }
3677 if nc.Tags != nil {
3678 objectMap["tags"] = nc.Tags
3679 }
3680 return json.Marshal(objectMap)
3681 }
3682
3683
3684 func (nc *NotificationChannel) UnmarshalJSON(body []byte) error {
3685 var m map[string]*json.RawMessage
3686 err := json.Unmarshal(body, &m)
3687 if err != nil {
3688 return err
3689 }
3690 for k, v := range m {
3691 switch k {
3692 case "properties":
3693 if v != nil {
3694 var notificationChannelProperties NotificationChannelProperties
3695 err = json.Unmarshal(*v, ¬ificationChannelProperties)
3696 if err != nil {
3697 return err
3698 }
3699 nc.NotificationChannelProperties = ¬ificationChannelProperties
3700 }
3701 case "id":
3702 if v != nil {
3703 var ID string
3704 err = json.Unmarshal(*v, &ID)
3705 if err != nil {
3706 return err
3707 }
3708 nc.ID = &ID
3709 }
3710 case "name":
3711 if v != nil {
3712 var name string
3713 err = json.Unmarshal(*v, &name)
3714 if err != nil {
3715 return err
3716 }
3717 nc.Name = &name
3718 }
3719 case "type":
3720 if v != nil {
3721 var typeVar string
3722 err = json.Unmarshal(*v, &typeVar)
3723 if err != nil {
3724 return err
3725 }
3726 nc.Type = &typeVar
3727 }
3728 case "location":
3729 if v != nil {
3730 var location string
3731 err = json.Unmarshal(*v, &location)
3732 if err != nil {
3733 return err
3734 }
3735 nc.Location = &location
3736 }
3737 case "tags":
3738 if v != nil {
3739 var tags map[string]*string
3740 err = json.Unmarshal(*v, &tags)
3741 if err != nil {
3742 return err
3743 }
3744 nc.Tags = tags
3745 }
3746 }
3747 }
3748
3749 return nil
3750 }
3751
3752
3753 type NotificationChannelFragment struct {
3754
3755 *NotificationChannelPropertiesFragment `json:"properties,omitempty"`
3756
3757 ID *string `json:"id,omitempty"`
3758
3759 Name *string `json:"name,omitempty"`
3760
3761 Type *string `json:"type,omitempty"`
3762
3763 Location *string `json:"location,omitempty"`
3764
3765 Tags map[string]*string `json:"tags"`
3766 }
3767
3768
3769 func (ncf NotificationChannelFragment) MarshalJSON() ([]byte, error) {
3770 objectMap := make(map[string]interface{})
3771 if ncf.NotificationChannelPropertiesFragment != nil {
3772 objectMap["properties"] = ncf.NotificationChannelPropertiesFragment
3773 }
3774 if ncf.Location != nil {
3775 objectMap["location"] = ncf.Location
3776 }
3777 if ncf.Tags != nil {
3778 objectMap["tags"] = ncf.Tags
3779 }
3780 return json.Marshal(objectMap)
3781 }
3782
3783
3784 func (ncf *NotificationChannelFragment) UnmarshalJSON(body []byte) error {
3785 var m map[string]*json.RawMessage
3786 err := json.Unmarshal(body, &m)
3787 if err != nil {
3788 return err
3789 }
3790 for k, v := range m {
3791 switch k {
3792 case "properties":
3793 if v != nil {
3794 var notificationChannelPropertiesFragment NotificationChannelPropertiesFragment
3795 err = json.Unmarshal(*v, ¬ificationChannelPropertiesFragment)
3796 if err != nil {
3797 return err
3798 }
3799 ncf.NotificationChannelPropertiesFragment = ¬ificationChannelPropertiesFragment
3800 }
3801 case "id":
3802 if v != nil {
3803 var ID string
3804 err = json.Unmarshal(*v, &ID)
3805 if err != nil {
3806 return err
3807 }
3808 ncf.ID = &ID
3809 }
3810 case "name":
3811 if v != nil {
3812 var name string
3813 err = json.Unmarshal(*v, &name)
3814 if err != nil {
3815 return err
3816 }
3817 ncf.Name = &name
3818 }
3819 case "type":
3820 if v != nil {
3821 var typeVar string
3822 err = json.Unmarshal(*v, &typeVar)
3823 if err != nil {
3824 return err
3825 }
3826 ncf.Type = &typeVar
3827 }
3828 case "location":
3829 if v != nil {
3830 var location string
3831 err = json.Unmarshal(*v, &location)
3832 if err != nil {
3833 return err
3834 }
3835 ncf.Location = &location
3836 }
3837 case "tags":
3838 if v != nil {
3839 var tags map[string]*string
3840 err = json.Unmarshal(*v, &tags)
3841 if err != nil {
3842 return err
3843 }
3844 ncf.Tags = tags
3845 }
3846 }
3847 }
3848
3849 return nil
3850 }
3851
3852
3853 type NotificationChannelProperties struct {
3854
3855 WebHookURL *string `json:"webHookUrl,omitempty"`
3856
3857 Description *string `json:"description,omitempty"`
3858
3859 Events *[]Event `json:"events,omitempty"`
3860
3861 CreatedDate *date.Time `json:"createdDate,omitempty"`
3862
3863 ProvisioningState *string `json:"provisioningState,omitempty"`
3864
3865 UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
3866 }
3867
3868
3869 func (ncp NotificationChannelProperties) MarshalJSON() ([]byte, error) {
3870 objectMap := make(map[string]interface{})
3871 if ncp.WebHookURL != nil {
3872 objectMap["webHookUrl"] = ncp.WebHookURL
3873 }
3874 if ncp.Description != nil {
3875 objectMap["description"] = ncp.Description
3876 }
3877 if ncp.Events != nil {
3878 objectMap["events"] = ncp.Events
3879 }
3880 if ncp.ProvisioningState != nil {
3881 objectMap["provisioningState"] = ncp.ProvisioningState
3882 }
3883 if ncp.UniqueIdentifier != nil {
3884 objectMap["uniqueIdentifier"] = ncp.UniqueIdentifier
3885 }
3886 return json.Marshal(objectMap)
3887 }
3888
3889
3890 type NotificationChannelPropertiesFragment struct {
3891
3892 WebHookURL *string `json:"webHookUrl,omitempty"`
3893
3894 Description *string `json:"description,omitempty"`
3895
3896 Events *[]EventFragment `json:"events,omitempty"`
3897
3898 ProvisioningState *string `json:"provisioningState,omitempty"`
3899
3900 UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
3901 }
3902
3903
3904 type NotificationSettings struct {
3905
3906 Status NotificationStatus `json:"status,omitempty"`
3907
3908 TimeInMinutes *int32 `json:"timeInMinutes,omitempty"`
3909
3910 WebhookURL *string `json:"webhookUrl,omitempty"`
3911 }
3912
3913
3914 type NotificationSettingsFragment struct {
3915
3916 Status NotificationStatus `json:"status,omitempty"`
3917
3918 TimeInMinutes *int32 `json:"timeInMinutes,omitempty"`
3919
3920 WebhookURL *string `json:"webhookUrl,omitempty"`
3921 }
3922
3923
3924 type NotifyParameters struct {
3925
3926 EventName NotificationChannelEventType `json:"eventName,omitempty"`
3927
3928 JSONPayload *string `json:"jsonPayload,omitempty"`
3929 }
3930
3931
3932 type OperationError struct {
3933
3934 Code *string `json:"code,omitempty"`
3935
3936 Message *string `json:"message,omitempty"`
3937 }
3938
3939
3940 type OperationMetadata struct {
3941
3942 Name *string `json:"name,omitempty"`
3943
3944 Display *OperationMetadataDisplay `json:"display,omitempty"`
3945 }
3946
3947
3948 type OperationMetadataDisplay struct {
3949
3950 Provider *string `json:"provider,omitempty"`
3951
3952 Resource *string `json:"resource,omitempty"`
3953
3954 Operation *string `json:"operation,omitempty"`
3955
3956 Description *string `json:"description,omitempty"`
3957 }
3958
3959
3960 type OperationResult struct {
3961 autorest.Response `json:"-"`
3962
3963 Status *string `json:"status,omitempty"`
3964
3965 StatusCode HTTPStatusCode `json:"statusCode,omitempty"`
3966
3967 Error *OperationError `json:"error,omitempty"`
3968 }
3969
3970
3971 type ParameterInfo struct {
3972
3973 Name *string `json:"name,omitempty"`
3974
3975 Value *string `json:"value,omitempty"`
3976 }
3977
3978
3979 type ParametersValueFileInfo struct {
3980
3981 FileName *string `json:"fileName,omitempty"`
3982
3983 ParametersValueInfo interface{} `json:"parametersValueInfo,omitempty"`
3984 }
3985
3986
3987 type PercentageCostThresholdProperties struct {
3988
3989 ThresholdValue *float64 `json:"thresholdValue,omitempty"`
3990 }
3991
3992
3993 type Policy struct {
3994 autorest.Response `json:"-"`
3995
3996 *PolicyProperties `json:"properties,omitempty"`
3997
3998 ID *string `json:"id,omitempty"`
3999
4000 Name *string `json:"name,omitempty"`
4001
4002 Type *string `json:"type,omitempty"`
4003
4004 Location *string `json:"location,omitempty"`
4005
4006 Tags map[string]*string `json:"tags"`
4007 }
4008
4009
4010 func (p Policy) MarshalJSON() ([]byte, error) {
4011 objectMap := make(map[string]interface{})
4012 if p.PolicyProperties != nil {
4013 objectMap["properties"] = p.PolicyProperties
4014 }
4015 if p.Location != nil {
4016 objectMap["location"] = p.Location
4017 }
4018 if p.Tags != nil {
4019 objectMap["tags"] = p.Tags
4020 }
4021 return json.Marshal(objectMap)
4022 }
4023
4024
4025 func (p *Policy) UnmarshalJSON(body []byte) error {
4026 var m map[string]*json.RawMessage
4027 err := json.Unmarshal(body, &m)
4028 if err != nil {
4029 return err
4030 }
4031 for k, v := range m {
4032 switch k {
4033 case "properties":
4034 if v != nil {
4035 var policyProperties PolicyProperties
4036 err = json.Unmarshal(*v, &policyProperties)
4037 if err != nil {
4038 return err
4039 }
4040 p.PolicyProperties = &policyProperties
4041 }
4042 case "id":
4043 if v != nil {
4044 var ID string
4045 err = json.Unmarshal(*v, &ID)
4046 if err != nil {
4047 return err
4048 }
4049 p.ID = &ID
4050 }
4051 case "name":
4052 if v != nil {
4053 var name string
4054 err = json.Unmarshal(*v, &name)
4055 if err != nil {
4056 return err
4057 }
4058 p.Name = &name
4059 }
4060 case "type":
4061 if v != nil {
4062 var typeVar string
4063 err = json.Unmarshal(*v, &typeVar)
4064 if err != nil {
4065 return err
4066 }
4067 p.Type = &typeVar
4068 }
4069 case "location":
4070 if v != nil {
4071 var location string
4072 err = json.Unmarshal(*v, &location)
4073 if err != nil {
4074 return err
4075 }
4076 p.Location = &location
4077 }
4078 case "tags":
4079 if v != nil {
4080 var tags map[string]*string
4081 err = json.Unmarshal(*v, &tags)
4082 if err != nil {
4083 return err
4084 }
4085 p.Tags = tags
4086 }
4087 }
4088 }
4089
4090 return nil
4091 }
4092
4093
4094 type PolicyFragment struct {
4095
4096 *PolicyPropertiesFragment `json:"properties,omitempty"`
4097
4098 ID *string `json:"id,omitempty"`
4099
4100 Name *string `json:"name,omitempty"`
4101
4102 Type *string `json:"type,omitempty"`
4103
4104 Location *string `json:"location,omitempty"`
4105
4106 Tags map[string]*string `json:"tags"`
4107 }
4108
4109
4110 func (pf PolicyFragment) MarshalJSON() ([]byte, error) {
4111 objectMap := make(map[string]interface{})
4112 if pf.PolicyPropertiesFragment != nil {
4113 objectMap["properties"] = pf.PolicyPropertiesFragment
4114 }
4115 if pf.Location != nil {
4116 objectMap["location"] = pf.Location
4117 }
4118 if pf.Tags != nil {
4119 objectMap["tags"] = pf.Tags
4120 }
4121 return json.Marshal(objectMap)
4122 }
4123
4124
4125 func (pf *PolicyFragment) UnmarshalJSON(body []byte) error {
4126 var m map[string]*json.RawMessage
4127 err := json.Unmarshal(body, &m)
4128 if err != nil {
4129 return err
4130 }
4131 for k, v := range m {
4132 switch k {
4133 case "properties":
4134 if v != nil {
4135 var policyPropertiesFragment PolicyPropertiesFragment
4136 err = json.Unmarshal(*v, &policyPropertiesFragment)
4137 if err != nil {
4138 return err
4139 }
4140 pf.PolicyPropertiesFragment = &policyPropertiesFragment
4141 }
4142 case "id":
4143 if v != nil {
4144 var ID string
4145 err = json.Unmarshal(*v, &ID)
4146 if err != nil {
4147 return err
4148 }
4149 pf.ID = &ID
4150 }
4151 case "name":
4152 if v != nil {
4153 var name string
4154 err = json.Unmarshal(*v, &name)
4155 if err != nil {
4156 return err
4157 }
4158 pf.Name = &name
4159 }
4160 case "type":
4161 if v != nil {
4162 var typeVar string
4163 err = json.Unmarshal(*v, &typeVar)
4164 if err != nil {
4165 return err
4166 }
4167 pf.Type = &typeVar
4168 }
4169 case "location":
4170 if v != nil {
4171 var location string
4172 err = json.Unmarshal(*v, &location)
4173 if err != nil {
4174 return err
4175 }
4176 pf.Location = &location
4177 }
4178 case "tags":
4179 if v != nil {
4180 var tags map[string]*string
4181 err = json.Unmarshal(*v, &tags)
4182 if err != nil {
4183 return err
4184 }
4185 pf.Tags = tags
4186 }
4187 }
4188 }
4189
4190 return nil
4191 }
4192
4193
4194 type PolicyProperties struct {
4195
4196 Description *string `json:"description,omitempty"`
4197
4198 Status PolicyStatus `json:"status,omitempty"`
4199
4200 FactName PolicyFactName `json:"factName,omitempty"`
4201
4202 FactData *string `json:"factData,omitempty"`
4203
4204 Threshold *string `json:"threshold,omitempty"`
4205
4206 EvaluatorType PolicyEvaluatorType `json:"evaluatorType,omitempty"`
4207
4208 CreatedDate *date.Time `json:"createdDate,omitempty"`
4209
4210 ProvisioningState *string `json:"provisioningState,omitempty"`
4211
4212 UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
4213 }
4214
4215
4216 func (pp PolicyProperties) MarshalJSON() ([]byte, error) {
4217 objectMap := make(map[string]interface{})
4218 if pp.Description != nil {
4219 objectMap["description"] = pp.Description
4220 }
4221 if pp.Status != "" {
4222 objectMap["status"] = pp.Status
4223 }
4224 if pp.FactName != "" {
4225 objectMap["factName"] = pp.FactName
4226 }
4227 if pp.FactData != nil {
4228 objectMap["factData"] = pp.FactData
4229 }
4230 if pp.Threshold != nil {
4231 objectMap["threshold"] = pp.Threshold
4232 }
4233 if pp.EvaluatorType != "" {
4234 objectMap["evaluatorType"] = pp.EvaluatorType
4235 }
4236 if pp.ProvisioningState != nil {
4237 objectMap["provisioningState"] = pp.ProvisioningState
4238 }
4239 if pp.UniqueIdentifier != nil {
4240 objectMap["uniqueIdentifier"] = pp.UniqueIdentifier
4241 }
4242 return json.Marshal(objectMap)
4243 }
4244
4245
4246 type PolicyPropertiesFragment struct {
4247
4248 Description *string `json:"description,omitempty"`
4249
4250 Status PolicyStatus `json:"status,omitempty"`
4251
4252 FactName PolicyFactName `json:"factName,omitempty"`
4253
4254 FactData *string `json:"factData,omitempty"`
4255
4256 Threshold *string `json:"threshold,omitempty"`
4257
4258 EvaluatorType PolicyEvaluatorType `json:"evaluatorType,omitempty"`
4259
4260 ProvisioningState *string `json:"provisioningState,omitempty"`
4261
4262 UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
4263 }
4264
4265
4266 type PolicySetResult struct {
4267
4268 HasError *bool `json:"hasError,omitempty"`
4269
4270 PolicyViolations *[]PolicyViolation `json:"policyViolations,omitempty"`
4271 }
4272
4273
4274 type PolicyViolation struct {
4275
4276 Code *string `json:"code,omitempty"`
4277
4278 Message *string `json:"message,omitempty"`
4279 }
4280
4281
4282 type Port struct {
4283
4284 TransportProtocol TransportProtocol `json:"transportProtocol,omitempty"`
4285
4286 BackendPort *int32 `json:"backendPort,omitempty"`
4287 }
4288
4289
4290 type PortFragment struct {
4291
4292 TransportProtocol TransportProtocol `json:"transportProtocol,omitempty"`
4293
4294 BackendPort *int32 `json:"backendPort,omitempty"`
4295 }
4296
4297
4298 type ProviderOperationResult struct {
4299 autorest.Response `json:"-"`
4300
4301 Value *[]OperationMetadata `json:"value,omitempty"`
4302
4303 NextLink *string `json:"nextLink,omitempty"`
4304 }
4305
4306
4307 func (por ProviderOperationResult) MarshalJSON() ([]byte, error) {
4308 objectMap := make(map[string]interface{})
4309 if por.Value != nil {
4310 objectMap["value"] = por.Value
4311 }
4312 return json.Marshal(objectMap)
4313 }
4314
4315
4316 type ProviderOperationResultIterator struct {
4317 i int
4318 page ProviderOperationResultPage
4319 }
4320
4321
4322
4323 func (iter *ProviderOperationResultIterator) NextWithContext(ctx context.Context) (err error) {
4324 if tracing.IsEnabled() {
4325 ctx = tracing.StartSpan(ctx, fqdn+"/ProviderOperationResultIterator.NextWithContext")
4326 defer func() {
4327 sc := -1
4328 if iter.Response().Response.Response != nil {
4329 sc = iter.Response().Response.Response.StatusCode
4330 }
4331 tracing.EndSpan(ctx, sc, err)
4332 }()
4333 }
4334 iter.i++
4335 if iter.i < len(iter.page.Values()) {
4336 return nil
4337 }
4338 err = iter.page.NextWithContext(ctx)
4339 if err != nil {
4340 iter.i--
4341 return err
4342 }
4343 iter.i = 0
4344 return nil
4345 }
4346
4347
4348
4349
4350 func (iter *ProviderOperationResultIterator) Next() error {
4351 return iter.NextWithContext(context.Background())
4352 }
4353
4354
4355 func (iter ProviderOperationResultIterator) NotDone() bool {
4356 return iter.page.NotDone() && iter.i < len(iter.page.Values())
4357 }
4358
4359
4360 func (iter ProviderOperationResultIterator) Response() ProviderOperationResult {
4361 return iter.page.Response()
4362 }
4363
4364
4365
4366 func (iter ProviderOperationResultIterator) Value() OperationMetadata {
4367 if !iter.page.NotDone() {
4368 return OperationMetadata{}
4369 }
4370 return iter.page.Values()[iter.i]
4371 }
4372
4373
4374 func NewProviderOperationResultIterator(page ProviderOperationResultPage) ProviderOperationResultIterator {
4375 return ProviderOperationResultIterator{page: page}
4376 }
4377
4378
4379 func (por ProviderOperationResult) IsEmpty() bool {
4380 return por.Value == nil || len(*por.Value) == 0
4381 }
4382
4383
4384 func (por ProviderOperationResult) hasNextLink() bool {
4385 return por.NextLink != nil && len(*por.NextLink) != 0
4386 }
4387
4388
4389
4390 func (por ProviderOperationResult) providerOperationResultPreparer(ctx context.Context) (*http.Request, error) {
4391 if !por.hasNextLink() {
4392 return nil, nil
4393 }
4394 return autorest.Prepare((&http.Request{}).WithContext(ctx),
4395 autorest.AsJSON(),
4396 autorest.AsGet(),
4397 autorest.WithBaseURL(to.String(por.NextLink)))
4398 }
4399
4400
4401 type ProviderOperationResultPage struct {
4402 fn func(context.Context, ProviderOperationResult) (ProviderOperationResult, error)
4403 por ProviderOperationResult
4404 }
4405
4406
4407
4408 func (page *ProviderOperationResultPage) NextWithContext(ctx context.Context) (err error) {
4409 if tracing.IsEnabled() {
4410 ctx = tracing.StartSpan(ctx, fqdn+"/ProviderOperationResultPage.NextWithContext")
4411 defer func() {
4412 sc := -1
4413 if page.Response().Response.Response != nil {
4414 sc = page.Response().Response.Response.StatusCode
4415 }
4416 tracing.EndSpan(ctx, sc, err)
4417 }()
4418 }
4419 for {
4420 next, err := page.fn(ctx, page.por)
4421 if err != nil {
4422 return err
4423 }
4424 page.por = next
4425 if !next.hasNextLink() || !next.IsEmpty() {
4426 break
4427 }
4428 }
4429 return nil
4430 }
4431
4432
4433
4434
4435 func (page *ProviderOperationResultPage) Next() error {
4436 return page.NextWithContext(context.Background())
4437 }
4438
4439
4440 func (page ProviderOperationResultPage) NotDone() bool {
4441 return !page.por.IsEmpty()
4442 }
4443
4444
4445 func (page ProviderOperationResultPage) Response() ProviderOperationResult {
4446 return page.por
4447 }
4448
4449
4450 func (page ProviderOperationResultPage) Values() []OperationMetadata {
4451 if page.por.IsEmpty() {
4452 return nil
4453 }
4454 return *page.por.Value
4455 }
4456
4457
4458 func NewProviderOperationResultPage(cur ProviderOperationResult, getNextPage func(context.Context, ProviderOperationResult) (ProviderOperationResult, error)) ProviderOperationResultPage {
4459 return ProviderOperationResultPage{
4460 fn: getNextPage,
4461 por: cur,
4462 }
4463 }
4464
4465
4466 type Resource struct {
4467
4468 ID *string `json:"id,omitempty"`
4469
4470 Name *string `json:"name,omitempty"`
4471
4472 Type *string `json:"type,omitempty"`
4473
4474 Location *string `json:"location,omitempty"`
4475
4476 Tags map[string]*string `json:"tags"`
4477 }
4478
4479
4480 func (r Resource) MarshalJSON() ([]byte, error) {
4481 objectMap := make(map[string]interface{})
4482 if r.Location != nil {
4483 objectMap["location"] = r.Location
4484 }
4485 if r.Tags != nil {
4486 objectMap["tags"] = r.Tags
4487 }
4488 return json.Marshal(objectMap)
4489 }
4490
4491
4492 type ResponseWithContinuationArmTemplate struct {
4493 autorest.Response `json:"-"`
4494
4495 Value *[]ArmTemplate `json:"value,omitempty"`
4496
4497 NextLink *string `json:"nextLink,omitempty"`
4498 }
4499
4500
4501 type ResponseWithContinuationArmTemplateIterator struct {
4502 i int
4503 page ResponseWithContinuationArmTemplatePage
4504 }
4505
4506
4507
4508 func (iter *ResponseWithContinuationArmTemplateIterator) NextWithContext(ctx context.Context) (err error) {
4509 if tracing.IsEnabled() {
4510 ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationArmTemplateIterator.NextWithContext")
4511 defer func() {
4512 sc := -1
4513 if iter.Response().Response.Response != nil {
4514 sc = iter.Response().Response.Response.StatusCode
4515 }
4516 tracing.EndSpan(ctx, sc, err)
4517 }()
4518 }
4519 iter.i++
4520 if iter.i < len(iter.page.Values()) {
4521 return nil
4522 }
4523 err = iter.page.NextWithContext(ctx)
4524 if err != nil {
4525 iter.i--
4526 return err
4527 }
4528 iter.i = 0
4529 return nil
4530 }
4531
4532
4533
4534
4535 func (iter *ResponseWithContinuationArmTemplateIterator) Next() error {
4536 return iter.NextWithContext(context.Background())
4537 }
4538
4539
4540 func (iter ResponseWithContinuationArmTemplateIterator) NotDone() bool {
4541 return iter.page.NotDone() && iter.i < len(iter.page.Values())
4542 }
4543
4544
4545 func (iter ResponseWithContinuationArmTemplateIterator) Response() ResponseWithContinuationArmTemplate {
4546 return iter.page.Response()
4547 }
4548
4549
4550
4551 func (iter ResponseWithContinuationArmTemplateIterator) Value() ArmTemplate {
4552 if !iter.page.NotDone() {
4553 return ArmTemplate{}
4554 }
4555 return iter.page.Values()[iter.i]
4556 }
4557
4558
4559 func NewResponseWithContinuationArmTemplateIterator(page ResponseWithContinuationArmTemplatePage) ResponseWithContinuationArmTemplateIterator {
4560 return ResponseWithContinuationArmTemplateIterator{page: page}
4561 }
4562
4563
4564 func (rwcAt ResponseWithContinuationArmTemplate) IsEmpty() bool {
4565 return rwcAt.Value == nil || len(*rwcAt.Value) == 0
4566 }
4567
4568
4569 func (rwcAt ResponseWithContinuationArmTemplate) hasNextLink() bool {
4570 return rwcAt.NextLink != nil && len(*rwcAt.NextLink) != 0
4571 }
4572
4573
4574
4575 func (rwcAt ResponseWithContinuationArmTemplate) responseWithContinuationArmTemplatePreparer(ctx context.Context) (*http.Request, error) {
4576 if !rwcAt.hasNextLink() {
4577 return nil, nil
4578 }
4579 return autorest.Prepare((&http.Request{}).WithContext(ctx),
4580 autorest.AsJSON(),
4581 autorest.AsGet(),
4582 autorest.WithBaseURL(to.String(rwcAt.NextLink)))
4583 }
4584
4585
4586 type ResponseWithContinuationArmTemplatePage struct {
4587 fn func(context.Context, ResponseWithContinuationArmTemplate) (ResponseWithContinuationArmTemplate, error)
4588 rwcat ResponseWithContinuationArmTemplate
4589 }
4590
4591
4592
4593 func (page *ResponseWithContinuationArmTemplatePage) NextWithContext(ctx context.Context) (err error) {
4594 if tracing.IsEnabled() {
4595 ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationArmTemplatePage.NextWithContext")
4596 defer func() {
4597 sc := -1
4598 if page.Response().Response.Response != nil {
4599 sc = page.Response().Response.Response.StatusCode
4600 }
4601 tracing.EndSpan(ctx, sc, err)
4602 }()
4603 }
4604 for {
4605 next, err := page.fn(ctx, page.rwcat)
4606 if err != nil {
4607 return err
4608 }
4609 page.rwcat = next
4610 if !next.hasNextLink() || !next.IsEmpty() {
4611 break
4612 }
4613 }
4614 return nil
4615 }
4616
4617
4618
4619
4620 func (page *ResponseWithContinuationArmTemplatePage) Next() error {
4621 return page.NextWithContext(context.Background())
4622 }
4623
4624
4625 func (page ResponseWithContinuationArmTemplatePage) NotDone() bool {
4626 return !page.rwcat.IsEmpty()
4627 }
4628
4629
4630 func (page ResponseWithContinuationArmTemplatePage) Response() ResponseWithContinuationArmTemplate {
4631 return page.rwcat
4632 }
4633
4634
4635 func (page ResponseWithContinuationArmTemplatePage) Values() []ArmTemplate {
4636 if page.rwcat.IsEmpty() {
4637 return nil
4638 }
4639 return *page.rwcat.Value
4640 }
4641
4642
4643 func NewResponseWithContinuationArmTemplatePage(cur ResponseWithContinuationArmTemplate, getNextPage func(context.Context, ResponseWithContinuationArmTemplate) (ResponseWithContinuationArmTemplate, error)) ResponseWithContinuationArmTemplatePage {
4644 return ResponseWithContinuationArmTemplatePage{
4645 fn: getNextPage,
4646 rwcat: cur,
4647 }
4648 }
4649
4650
4651 type ResponseWithContinuationArtifact struct {
4652 autorest.Response `json:"-"`
4653
4654 Value *[]Artifact `json:"value,omitempty"`
4655
4656 NextLink *string `json:"nextLink,omitempty"`
4657 }
4658
4659
4660 type ResponseWithContinuationArtifactIterator struct {
4661 i int
4662 page ResponseWithContinuationArtifactPage
4663 }
4664
4665
4666
4667 func (iter *ResponseWithContinuationArtifactIterator) NextWithContext(ctx context.Context) (err error) {
4668 if tracing.IsEnabled() {
4669 ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationArtifactIterator.NextWithContext")
4670 defer func() {
4671 sc := -1
4672 if iter.Response().Response.Response != nil {
4673 sc = iter.Response().Response.Response.StatusCode
4674 }
4675 tracing.EndSpan(ctx, sc, err)
4676 }()
4677 }
4678 iter.i++
4679 if iter.i < len(iter.page.Values()) {
4680 return nil
4681 }
4682 err = iter.page.NextWithContext(ctx)
4683 if err != nil {
4684 iter.i--
4685 return err
4686 }
4687 iter.i = 0
4688 return nil
4689 }
4690
4691
4692
4693
4694 func (iter *ResponseWithContinuationArtifactIterator) Next() error {
4695 return iter.NextWithContext(context.Background())
4696 }
4697
4698
4699 func (iter ResponseWithContinuationArtifactIterator) NotDone() bool {
4700 return iter.page.NotDone() && iter.i < len(iter.page.Values())
4701 }
4702
4703
4704 func (iter ResponseWithContinuationArtifactIterator) Response() ResponseWithContinuationArtifact {
4705 return iter.page.Response()
4706 }
4707
4708
4709
4710 func (iter ResponseWithContinuationArtifactIterator) Value() Artifact {
4711 if !iter.page.NotDone() {
4712 return Artifact{}
4713 }
4714 return iter.page.Values()[iter.i]
4715 }
4716
4717
4718 func NewResponseWithContinuationArtifactIterator(page ResponseWithContinuationArtifactPage) ResponseWithContinuationArtifactIterator {
4719 return ResponseWithContinuationArtifactIterator{page: page}
4720 }
4721
4722
4723 func (rwcA ResponseWithContinuationArtifact) IsEmpty() bool {
4724 return rwcA.Value == nil || len(*rwcA.Value) == 0
4725 }
4726
4727
4728 func (rwcA ResponseWithContinuationArtifact) hasNextLink() bool {
4729 return rwcA.NextLink != nil && len(*rwcA.NextLink) != 0
4730 }
4731
4732
4733
4734 func (rwcA ResponseWithContinuationArtifact) responseWithContinuationArtifactPreparer(ctx context.Context) (*http.Request, error) {
4735 if !rwcA.hasNextLink() {
4736 return nil, nil
4737 }
4738 return autorest.Prepare((&http.Request{}).WithContext(ctx),
4739 autorest.AsJSON(),
4740 autorest.AsGet(),
4741 autorest.WithBaseURL(to.String(rwcA.NextLink)))
4742 }
4743
4744
4745 type ResponseWithContinuationArtifactPage struct {
4746 fn func(context.Context, ResponseWithContinuationArtifact) (ResponseWithContinuationArtifact, error)
4747 rwca ResponseWithContinuationArtifact
4748 }
4749
4750
4751
4752 func (page *ResponseWithContinuationArtifactPage) NextWithContext(ctx context.Context) (err error) {
4753 if tracing.IsEnabled() {
4754 ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationArtifactPage.NextWithContext")
4755 defer func() {
4756 sc := -1
4757 if page.Response().Response.Response != nil {
4758 sc = page.Response().Response.Response.StatusCode
4759 }
4760 tracing.EndSpan(ctx, sc, err)
4761 }()
4762 }
4763 for {
4764 next, err := page.fn(ctx, page.rwca)
4765 if err != nil {
4766 return err
4767 }
4768 page.rwca = next
4769 if !next.hasNextLink() || !next.IsEmpty() {
4770 break
4771 }
4772 }
4773 return nil
4774 }
4775
4776
4777
4778
4779 func (page *ResponseWithContinuationArtifactPage) Next() error {
4780 return page.NextWithContext(context.Background())
4781 }
4782
4783
4784 func (page ResponseWithContinuationArtifactPage) NotDone() bool {
4785 return !page.rwca.IsEmpty()
4786 }
4787
4788
4789 func (page ResponseWithContinuationArtifactPage) Response() ResponseWithContinuationArtifact {
4790 return page.rwca
4791 }
4792
4793
4794 func (page ResponseWithContinuationArtifactPage) Values() []Artifact {
4795 if page.rwca.IsEmpty() {
4796 return nil
4797 }
4798 return *page.rwca.Value
4799 }
4800
4801
4802 func NewResponseWithContinuationArtifactPage(cur ResponseWithContinuationArtifact, getNextPage func(context.Context, ResponseWithContinuationArtifact) (ResponseWithContinuationArtifact, error)) ResponseWithContinuationArtifactPage {
4803 return ResponseWithContinuationArtifactPage{
4804 fn: getNextPage,
4805 rwca: cur,
4806 }
4807 }
4808
4809
4810 type ResponseWithContinuationArtifactSource struct {
4811 autorest.Response `json:"-"`
4812
4813 Value *[]ArtifactSource `json:"value,omitempty"`
4814
4815 NextLink *string `json:"nextLink,omitempty"`
4816 }
4817
4818
4819
4820 type ResponseWithContinuationArtifactSourceIterator struct {
4821 i int
4822 page ResponseWithContinuationArtifactSourcePage
4823 }
4824
4825
4826
4827 func (iter *ResponseWithContinuationArtifactSourceIterator) NextWithContext(ctx context.Context) (err error) {
4828 if tracing.IsEnabled() {
4829 ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationArtifactSourceIterator.NextWithContext")
4830 defer func() {
4831 sc := -1
4832 if iter.Response().Response.Response != nil {
4833 sc = iter.Response().Response.Response.StatusCode
4834 }
4835 tracing.EndSpan(ctx, sc, err)
4836 }()
4837 }
4838 iter.i++
4839 if iter.i < len(iter.page.Values()) {
4840 return nil
4841 }
4842 err = iter.page.NextWithContext(ctx)
4843 if err != nil {
4844 iter.i--
4845 return err
4846 }
4847 iter.i = 0
4848 return nil
4849 }
4850
4851
4852
4853
4854 func (iter *ResponseWithContinuationArtifactSourceIterator) Next() error {
4855 return iter.NextWithContext(context.Background())
4856 }
4857
4858
4859 func (iter ResponseWithContinuationArtifactSourceIterator) NotDone() bool {
4860 return iter.page.NotDone() && iter.i < len(iter.page.Values())
4861 }
4862
4863
4864 func (iter ResponseWithContinuationArtifactSourceIterator) Response() ResponseWithContinuationArtifactSource {
4865 return iter.page.Response()
4866 }
4867
4868
4869
4870 func (iter ResponseWithContinuationArtifactSourceIterator) Value() ArtifactSource {
4871 if !iter.page.NotDone() {
4872 return ArtifactSource{}
4873 }
4874 return iter.page.Values()[iter.i]
4875 }
4876
4877
4878 func NewResponseWithContinuationArtifactSourceIterator(page ResponseWithContinuationArtifactSourcePage) ResponseWithContinuationArtifactSourceIterator {
4879 return ResponseWithContinuationArtifactSourceIterator{page: page}
4880 }
4881
4882
4883 func (rwcAs ResponseWithContinuationArtifactSource) IsEmpty() bool {
4884 return rwcAs.Value == nil || len(*rwcAs.Value) == 0
4885 }
4886
4887
4888 func (rwcAs ResponseWithContinuationArtifactSource) hasNextLink() bool {
4889 return rwcAs.NextLink != nil && len(*rwcAs.NextLink) != 0
4890 }
4891
4892
4893
4894 func (rwcAs ResponseWithContinuationArtifactSource) responseWithContinuationArtifactSourcePreparer(ctx context.Context) (*http.Request, error) {
4895 if !rwcAs.hasNextLink() {
4896 return nil, nil
4897 }
4898 return autorest.Prepare((&http.Request{}).WithContext(ctx),
4899 autorest.AsJSON(),
4900 autorest.AsGet(),
4901 autorest.WithBaseURL(to.String(rwcAs.NextLink)))
4902 }
4903
4904
4905 type ResponseWithContinuationArtifactSourcePage struct {
4906 fn func(context.Context, ResponseWithContinuationArtifactSource) (ResponseWithContinuationArtifactSource, error)
4907 rwcas ResponseWithContinuationArtifactSource
4908 }
4909
4910
4911
4912 func (page *ResponseWithContinuationArtifactSourcePage) NextWithContext(ctx context.Context) (err error) {
4913 if tracing.IsEnabled() {
4914 ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationArtifactSourcePage.NextWithContext")
4915 defer func() {
4916 sc := -1
4917 if page.Response().Response.Response != nil {
4918 sc = page.Response().Response.Response.StatusCode
4919 }
4920 tracing.EndSpan(ctx, sc, err)
4921 }()
4922 }
4923 for {
4924 next, err := page.fn(ctx, page.rwcas)
4925 if err != nil {
4926 return err
4927 }
4928 page.rwcas = next
4929 if !next.hasNextLink() || !next.IsEmpty() {
4930 break
4931 }
4932 }
4933 return nil
4934 }
4935
4936
4937
4938
4939 func (page *ResponseWithContinuationArtifactSourcePage) Next() error {
4940 return page.NextWithContext(context.Background())
4941 }
4942
4943
4944 func (page ResponseWithContinuationArtifactSourcePage) NotDone() bool {
4945 return !page.rwcas.IsEmpty()
4946 }
4947
4948
4949 func (page ResponseWithContinuationArtifactSourcePage) Response() ResponseWithContinuationArtifactSource {
4950 return page.rwcas
4951 }
4952
4953
4954 func (page ResponseWithContinuationArtifactSourcePage) Values() []ArtifactSource {
4955 if page.rwcas.IsEmpty() {
4956 return nil
4957 }
4958 return *page.rwcas.Value
4959 }
4960
4961
4962 func NewResponseWithContinuationArtifactSourcePage(cur ResponseWithContinuationArtifactSource, getNextPage func(context.Context, ResponseWithContinuationArtifactSource) (ResponseWithContinuationArtifactSource, error)) ResponseWithContinuationArtifactSourcePage {
4963 return ResponseWithContinuationArtifactSourcePage{
4964 fn: getNextPage,
4965 rwcas: cur,
4966 }
4967 }
4968
4969
4970 type ResponseWithContinuationCustomImage struct {
4971 autorest.Response `json:"-"`
4972
4973 Value *[]CustomImage `json:"value,omitempty"`
4974
4975 NextLink *string `json:"nextLink,omitempty"`
4976 }
4977
4978
4979 type ResponseWithContinuationCustomImageIterator struct {
4980 i int
4981 page ResponseWithContinuationCustomImagePage
4982 }
4983
4984
4985
4986 func (iter *ResponseWithContinuationCustomImageIterator) NextWithContext(ctx context.Context) (err error) {
4987 if tracing.IsEnabled() {
4988 ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationCustomImageIterator.NextWithContext")
4989 defer func() {
4990 sc := -1
4991 if iter.Response().Response.Response != nil {
4992 sc = iter.Response().Response.Response.StatusCode
4993 }
4994 tracing.EndSpan(ctx, sc, err)
4995 }()
4996 }
4997 iter.i++
4998 if iter.i < len(iter.page.Values()) {
4999 return nil
5000 }
5001 err = iter.page.NextWithContext(ctx)
5002 if err != nil {
5003 iter.i--
5004 return err
5005 }
5006 iter.i = 0
5007 return nil
5008 }
5009
5010
5011
5012
5013 func (iter *ResponseWithContinuationCustomImageIterator) Next() error {
5014 return iter.NextWithContext(context.Background())
5015 }
5016
5017
5018 func (iter ResponseWithContinuationCustomImageIterator) NotDone() bool {
5019 return iter.page.NotDone() && iter.i < len(iter.page.Values())
5020 }
5021
5022
5023 func (iter ResponseWithContinuationCustomImageIterator) Response() ResponseWithContinuationCustomImage {
5024 return iter.page.Response()
5025 }
5026
5027
5028
5029 func (iter ResponseWithContinuationCustomImageIterator) Value() CustomImage {
5030 if !iter.page.NotDone() {
5031 return CustomImage{}
5032 }
5033 return iter.page.Values()[iter.i]
5034 }
5035
5036
5037 func NewResponseWithContinuationCustomImageIterator(page ResponseWithContinuationCustomImagePage) ResponseWithContinuationCustomImageIterator {
5038 return ResponseWithContinuationCustomImageIterator{page: page}
5039 }
5040
5041
5042 func (rwcCi ResponseWithContinuationCustomImage) IsEmpty() bool {
5043 return rwcCi.Value == nil || len(*rwcCi.Value) == 0
5044 }
5045
5046
5047 func (rwcCi ResponseWithContinuationCustomImage) hasNextLink() bool {
5048 return rwcCi.NextLink != nil && len(*rwcCi.NextLink) != 0
5049 }
5050
5051
5052
5053 func (rwcCi ResponseWithContinuationCustomImage) responseWithContinuationCustomImagePreparer(ctx context.Context) (*http.Request, error) {
5054 if !rwcCi.hasNextLink() {
5055 return nil, nil
5056 }
5057 return autorest.Prepare((&http.Request{}).WithContext(ctx),
5058 autorest.AsJSON(),
5059 autorest.AsGet(),
5060 autorest.WithBaseURL(to.String(rwcCi.NextLink)))
5061 }
5062
5063
5064 type ResponseWithContinuationCustomImagePage struct {
5065 fn func(context.Context, ResponseWithContinuationCustomImage) (ResponseWithContinuationCustomImage, error)
5066 rwcci ResponseWithContinuationCustomImage
5067 }
5068
5069
5070
5071 func (page *ResponseWithContinuationCustomImagePage) NextWithContext(ctx context.Context) (err error) {
5072 if tracing.IsEnabled() {
5073 ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationCustomImagePage.NextWithContext")
5074 defer func() {
5075 sc := -1
5076 if page.Response().Response.Response != nil {
5077 sc = page.Response().Response.Response.StatusCode
5078 }
5079 tracing.EndSpan(ctx, sc, err)
5080 }()
5081 }
5082 for {
5083 next, err := page.fn(ctx, page.rwcci)
5084 if err != nil {
5085 return err
5086 }
5087 page.rwcci = next
5088 if !next.hasNextLink() || !next.IsEmpty() {
5089 break
5090 }
5091 }
5092 return nil
5093 }
5094
5095
5096
5097
5098 func (page *ResponseWithContinuationCustomImagePage) Next() error {
5099 return page.NextWithContext(context.Background())
5100 }
5101
5102
5103 func (page ResponseWithContinuationCustomImagePage) NotDone() bool {
5104 return !page.rwcci.IsEmpty()
5105 }
5106
5107
5108 func (page ResponseWithContinuationCustomImagePage) Response() ResponseWithContinuationCustomImage {
5109 return page.rwcci
5110 }
5111
5112
5113 func (page ResponseWithContinuationCustomImagePage) Values() []CustomImage {
5114 if page.rwcci.IsEmpty() {
5115 return nil
5116 }
5117 return *page.rwcci.Value
5118 }
5119
5120
5121 func NewResponseWithContinuationCustomImagePage(cur ResponseWithContinuationCustomImage, getNextPage func(context.Context, ResponseWithContinuationCustomImage) (ResponseWithContinuationCustomImage, error)) ResponseWithContinuationCustomImagePage {
5122 return ResponseWithContinuationCustomImagePage{
5123 fn: getNextPage,
5124 rwcci: cur,
5125 }
5126 }
5127
5128
5129 type ResponseWithContinuationDisk struct {
5130 autorest.Response `json:"-"`
5131
5132 Value *[]Disk `json:"value,omitempty"`
5133
5134 NextLink *string `json:"nextLink,omitempty"`
5135 }
5136
5137
5138 type ResponseWithContinuationDiskIterator struct {
5139 i int
5140 page ResponseWithContinuationDiskPage
5141 }
5142
5143
5144
5145 func (iter *ResponseWithContinuationDiskIterator) NextWithContext(ctx context.Context) (err error) {
5146 if tracing.IsEnabled() {
5147 ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationDiskIterator.NextWithContext")
5148 defer func() {
5149 sc := -1
5150 if iter.Response().Response.Response != nil {
5151 sc = iter.Response().Response.Response.StatusCode
5152 }
5153 tracing.EndSpan(ctx, sc, err)
5154 }()
5155 }
5156 iter.i++
5157 if iter.i < len(iter.page.Values()) {
5158 return nil
5159 }
5160 err = iter.page.NextWithContext(ctx)
5161 if err != nil {
5162 iter.i--
5163 return err
5164 }
5165 iter.i = 0
5166 return nil
5167 }
5168
5169
5170
5171
5172 func (iter *ResponseWithContinuationDiskIterator) Next() error {
5173 return iter.NextWithContext(context.Background())
5174 }
5175
5176
5177 func (iter ResponseWithContinuationDiskIterator) NotDone() bool {
5178 return iter.page.NotDone() && iter.i < len(iter.page.Values())
5179 }
5180
5181
5182 func (iter ResponseWithContinuationDiskIterator) Response() ResponseWithContinuationDisk {
5183 return iter.page.Response()
5184 }
5185
5186
5187
5188 func (iter ResponseWithContinuationDiskIterator) Value() Disk {
5189 if !iter.page.NotDone() {
5190 return Disk{}
5191 }
5192 return iter.page.Values()[iter.i]
5193 }
5194
5195
5196 func NewResponseWithContinuationDiskIterator(page ResponseWithContinuationDiskPage) ResponseWithContinuationDiskIterator {
5197 return ResponseWithContinuationDiskIterator{page: page}
5198 }
5199
5200
5201 func (rwcD ResponseWithContinuationDisk) IsEmpty() bool {
5202 return rwcD.Value == nil || len(*rwcD.Value) == 0
5203 }
5204
5205
5206 func (rwcD ResponseWithContinuationDisk) hasNextLink() bool {
5207 return rwcD.NextLink != nil && len(*rwcD.NextLink) != 0
5208 }
5209
5210
5211
5212 func (rwcD ResponseWithContinuationDisk) responseWithContinuationDiskPreparer(ctx context.Context) (*http.Request, error) {
5213 if !rwcD.hasNextLink() {
5214 return nil, nil
5215 }
5216 return autorest.Prepare((&http.Request{}).WithContext(ctx),
5217 autorest.AsJSON(),
5218 autorest.AsGet(),
5219 autorest.WithBaseURL(to.String(rwcD.NextLink)))
5220 }
5221
5222
5223 type ResponseWithContinuationDiskPage struct {
5224 fn func(context.Context, ResponseWithContinuationDisk) (ResponseWithContinuationDisk, error)
5225 rwcd ResponseWithContinuationDisk
5226 }
5227
5228
5229
5230 func (page *ResponseWithContinuationDiskPage) NextWithContext(ctx context.Context) (err error) {
5231 if tracing.IsEnabled() {
5232 ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationDiskPage.NextWithContext")
5233 defer func() {
5234 sc := -1
5235 if page.Response().Response.Response != nil {
5236 sc = page.Response().Response.Response.StatusCode
5237 }
5238 tracing.EndSpan(ctx, sc, err)
5239 }()
5240 }
5241 for {
5242 next, err := page.fn(ctx, page.rwcd)
5243 if err != nil {
5244 return err
5245 }
5246 page.rwcd = next
5247 if !next.hasNextLink() || !next.IsEmpty() {
5248 break
5249 }
5250 }
5251 return nil
5252 }
5253
5254
5255
5256
5257 func (page *ResponseWithContinuationDiskPage) Next() error {
5258 return page.NextWithContext(context.Background())
5259 }
5260
5261
5262 func (page ResponseWithContinuationDiskPage) NotDone() bool {
5263 return !page.rwcd.IsEmpty()
5264 }
5265
5266
5267 func (page ResponseWithContinuationDiskPage) Response() ResponseWithContinuationDisk {
5268 return page.rwcd
5269 }
5270
5271
5272 func (page ResponseWithContinuationDiskPage) Values() []Disk {
5273 if page.rwcd.IsEmpty() {
5274 return nil
5275 }
5276 return *page.rwcd.Value
5277 }
5278
5279
5280 func NewResponseWithContinuationDiskPage(cur ResponseWithContinuationDisk, getNextPage func(context.Context, ResponseWithContinuationDisk) (ResponseWithContinuationDisk, error)) ResponseWithContinuationDiskPage {
5281 return ResponseWithContinuationDiskPage{
5282 fn: getNextPage,
5283 rwcd: cur,
5284 }
5285 }
5286
5287
5288 type ResponseWithContinuationDtlEnvironment struct {
5289 autorest.Response `json:"-"`
5290
5291 Value *[]Environment `json:"value,omitempty"`
5292
5293 NextLink *string `json:"nextLink,omitempty"`
5294 }
5295
5296
5297
5298 type ResponseWithContinuationDtlEnvironmentIterator struct {
5299 i int
5300 page ResponseWithContinuationDtlEnvironmentPage
5301 }
5302
5303
5304
5305 func (iter *ResponseWithContinuationDtlEnvironmentIterator) NextWithContext(ctx context.Context) (err error) {
5306 if tracing.IsEnabled() {
5307 ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationDtlEnvironmentIterator.NextWithContext")
5308 defer func() {
5309 sc := -1
5310 if iter.Response().Response.Response != nil {
5311 sc = iter.Response().Response.Response.StatusCode
5312 }
5313 tracing.EndSpan(ctx, sc, err)
5314 }()
5315 }
5316 iter.i++
5317 if iter.i < len(iter.page.Values()) {
5318 return nil
5319 }
5320 err = iter.page.NextWithContext(ctx)
5321 if err != nil {
5322 iter.i--
5323 return err
5324 }
5325 iter.i = 0
5326 return nil
5327 }
5328
5329
5330
5331
5332 func (iter *ResponseWithContinuationDtlEnvironmentIterator) Next() error {
5333 return iter.NextWithContext(context.Background())
5334 }
5335
5336
5337 func (iter ResponseWithContinuationDtlEnvironmentIterator) NotDone() bool {
5338 return iter.page.NotDone() && iter.i < len(iter.page.Values())
5339 }
5340
5341
5342 func (iter ResponseWithContinuationDtlEnvironmentIterator) Response() ResponseWithContinuationDtlEnvironment {
5343 return iter.page.Response()
5344 }
5345
5346
5347
5348 func (iter ResponseWithContinuationDtlEnvironmentIterator) Value() Environment {
5349 if !iter.page.NotDone() {
5350 return Environment{}
5351 }
5352 return iter.page.Values()[iter.i]
5353 }
5354
5355
5356 func NewResponseWithContinuationDtlEnvironmentIterator(page ResponseWithContinuationDtlEnvironmentPage) ResponseWithContinuationDtlEnvironmentIterator {
5357 return ResponseWithContinuationDtlEnvironmentIterator{page: page}
5358 }
5359
5360
5361 func (rwcDe ResponseWithContinuationDtlEnvironment) IsEmpty() bool {
5362 return rwcDe.Value == nil || len(*rwcDe.Value) == 0
5363 }
5364
5365
5366 func (rwcDe ResponseWithContinuationDtlEnvironment) hasNextLink() bool {
5367 return rwcDe.NextLink != nil && len(*rwcDe.NextLink) != 0
5368 }
5369
5370
5371
5372 func (rwcDe ResponseWithContinuationDtlEnvironment) responseWithContinuationDtlEnvironmentPreparer(ctx context.Context) (*http.Request, error) {
5373 if !rwcDe.hasNextLink() {
5374 return nil, nil
5375 }
5376 return autorest.Prepare((&http.Request{}).WithContext(ctx),
5377 autorest.AsJSON(),
5378 autorest.AsGet(),
5379 autorest.WithBaseURL(to.String(rwcDe.NextLink)))
5380 }
5381
5382
5383 type ResponseWithContinuationDtlEnvironmentPage struct {
5384 fn func(context.Context, ResponseWithContinuationDtlEnvironment) (ResponseWithContinuationDtlEnvironment, error)
5385 rwcde ResponseWithContinuationDtlEnvironment
5386 }
5387
5388
5389
5390 func (page *ResponseWithContinuationDtlEnvironmentPage) NextWithContext(ctx context.Context) (err error) {
5391 if tracing.IsEnabled() {
5392 ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationDtlEnvironmentPage.NextWithContext")
5393 defer func() {
5394 sc := -1
5395 if page.Response().Response.Response != nil {
5396 sc = page.Response().Response.Response.StatusCode
5397 }
5398 tracing.EndSpan(ctx, sc, err)
5399 }()
5400 }
5401 for {
5402 next, err := page.fn(ctx, page.rwcde)
5403 if err != nil {
5404 return err
5405 }
5406 page.rwcde = next
5407 if !next.hasNextLink() || !next.IsEmpty() {
5408 break
5409 }
5410 }
5411 return nil
5412 }
5413
5414
5415
5416
5417 func (page *ResponseWithContinuationDtlEnvironmentPage) Next() error {
5418 return page.NextWithContext(context.Background())
5419 }
5420
5421
5422 func (page ResponseWithContinuationDtlEnvironmentPage) NotDone() bool {
5423 return !page.rwcde.IsEmpty()
5424 }
5425
5426
5427 func (page ResponseWithContinuationDtlEnvironmentPage) Response() ResponseWithContinuationDtlEnvironment {
5428 return page.rwcde
5429 }
5430
5431
5432 func (page ResponseWithContinuationDtlEnvironmentPage) Values() []Environment {
5433 if page.rwcde.IsEmpty() {
5434 return nil
5435 }
5436 return *page.rwcde.Value
5437 }
5438
5439
5440 func NewResponseWithContinuationDtlEnvironmentPage(cur ResponseWithContinuationDtlEnvironment, getNextPage func(context.Context, ResponseWithContinuationDtlEnvironment) (ResponseWithContinuationDtlEnvironment, error)) ResponseWithContinuationDtlEnvironmentPage {
5441 return ResponseWithContinuationDtlEnvironmentPage{
5442 fn: getNextPage,
5443 rwcde: cur,
5444 }
5445 }
5446
5447
5448 type ResponseWithContinuationFormula struct {
5449 autorest.Response `json:"-"`
5450
5451 Value *[]Formula `json:"value,omitempty"`
5452
5453 NextLink *string `json:"nextLink,omitempty"`
5454 }
5455
5456
5457 type ResponseWithContinuationFormulaIterator struct {
5458 i int
5459 page ResponseWithContinuationFormulaPage
5460 }
5461
5462
5463
5464 func (iter *ResponseWithContinuationFormulaIterator) NextWithContext(ctx context.Context) (err error) {
5465 if tracing.IsEnabled() {
5466 ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationFormulaIterator.NextWithContext")
5467 defer func() {
5468 sc := -1
5469 if iter.Response().Response.Response != nil {
5470 sc = iter.Response().Response.Response.StatusCode
5471 }
5472 tracing.EndSpan(ctx, sc, err)
5473 }()
5474 }
5475 iter.i++
5476 if iter.i < len(iter.page.Values()) {
5477 return nil
5478 }
5479 err = iter.page.NextWithContext(ctx)
5480 if err != nil {
5481 iter.i--
5482 return err
5483 }
5484 iter.i = 0
5485 return nil
5486 }
5487
5488
5489
5490
5491 func (iter *ResponseWithContinuationFormulaIterator) Next() error {
5492 return iter.NextWithContext(context.Background())
5493 }
5494
5495
5496 func (iter ResponseWithContinuationFormulaIterator) NotDone() bool {
5497 return iter.page.NotDone() && iter.i < len(iter.page.Values())
5498 }
5499
5500
5501 func (iter ResponseWithContinuationFormulaIterator) Response() ResponseWithContinuationFormula {
5502 return iter.page.Response()
5503 }
5504
5505
5506
5507 func (iter ResponseWithContinuationFormulaIterator) Value() Formula {
5508 if !iter.page.NotDone() {
5509 return Formula{}
5510 }
5511 return iter.page.Values()[iter.i]
5512 }
5513
5514
5515 func NewResponseWithContinuationFormulaIterator(page ResponseWithContinuationFormulaPage) ResponseWithContinuationFormulaIterator {
5516 return ResponseWithContinuationFormulaIterator{page: page}
5517 }
5518
5519
5520 func (rwcF ResponseWithContinuationFormula) IsEmpty() bool {
5521 return rwcF.Value == nil || len(*rwcF.Value) == 0
5522 }
5523
5524
5525 func (rwcF ResponseWithContinuationFormula) hasNextLink() bool {
5526 return rwcF.NextLink != nil && len(*rwcF.NextLink) != 0
5527 }
5528
5529
5530
5531 func (rwcF ResponseWithContinuationFormula) responseWithContinuationFormulaPreparer(ctx context.Context) (*http.Request, error) {
5532 if !rwcF.hasNextLink() {
5533 return nil, nil
5534 }
5535 return autorest.Prepare((&http.Request{}).WithContext(ctx),
5536 autorest.AsJSON(),
5537 autorest.AsGet(),
5538 autorest.WithBaseURL(to.String(rwcF.NextLink)))
5539 }
5540
5541
5542 type ResponseWithContinuationFormulaPage struct {
5543 fn func(context.Context, ResponseWithContinuationFormula) (ResponseWithContinuationFormula, error)
5544 rwcf ResponseWithContinuationFormula
5545 }
5546
5547
5548
5549 func (page *ResponseWithContinuationFormulaPage) NextWithContext(ctx context.Context) (err error) {
5550 if tracing.IsEnabled() {
5551 ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationFormulaPage.NextWithContext")
5552 defer func() {
5553 sc := -1
5554 if page.Response().Response.Response != nil {
5555 sc = page.Response().Response.Response.StatusCode
5556 }
5557 tracing.EndSpan(ctx, sc, err)
5558 }()
5559 }
5560 for {
5561 next, err := page.fn(ctx, page.rwcf)
5562 if err != nil {
5563 return err
5564 }
5565 page.rwcf = next
5566 if !next.hasNextLink() || !next.IsEmpty() {
5567 break
5568 }
5569 }
5570 return nil
5571 }
5572
5573
5574
5575
5576 func (page *ResponseWithContinuationFormulaPage) Next() error {
5577 return page.NextWithContext(context.Background())
5578 }
5579
5580
5581 func (page ResponseWithContinuationFormulaPage) NotDone() bool {
5582 return !page.rwcf.IsEmpty()
5583 }
5584
5585
5586 func (page ResponseWithContinuationFormulaPage) Response() ResponseWithContinuationFormula {
5587 return page.rwcf
5588 }
5589
5590
5591 func (page ResponseWithContinuationFormulaPage) Values() []Formula {
5592 if page.rwcf.IsEmpty() {
5593 return nil
5594 }
5595 return *page.rwcf.Value
5596 }
5597
5598
5599 func NewResponseWithContinuationFormulaPage(cur ResponseWithContinuationFormula, getNextPage func(context.Context, ResponseWithContinuationFormula) (ResponseWithContinuationFormula, error)) ResponseWithContinuationFormulaPage {
5600 return ResponseWithContinuationFormulaPage{
5601 fn: getNextPage,
5602 rwcf: cur,
5603 }
5604 }
5605
5606
5607 type ResponseWithContinuationGalleryImage struct {
5608 autorest.Response `json:"-"`
5609
5610 Value *[]GalleryImage `json:"value,omitempty"`
5611
5612 NextLink *string `json:"nextLink,omitempty"`
5613 }
5614
5615
5616
5617 type ResponseWithContinuationGalleryImageIterator struct {
5618 i int
5619 page ResponseWithContinuationGalleryImagePage
5620 }
5621
5622
5623
5624 func (iter *ResponseWithContinuationGalleryImageIterator) NextWithContext(ctx context.Context) (err error) {
5625 if tracing.IsEnabled() {
5626 ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationGalleryImageIterator.NextWithContext")
5627 defer func() {
5628 sc := -1
5629 if iter.Response().Response.Response != nil {
5630 sc = iter.Response().Response.Response.StatusCode
5631 }
5632 tracing.EndSpan(ctx, sc, err)
5633 }()
5634 }
5635 iter.i++
5636 if iter.i < len(iter.page.Values()) {
5637 return nil
5638 }
5639 err = iter.page.NextWithContext(ctx)
5640 if err != nil {
5641 iter.i--
5642 return err
5643 }
5644 iter.i = 0
5645 return nil
5646 }
5647
5648
5649
5650
5651 func (iter *ResponseWithContinuationGalleryImageIterator) Next() error {
5652 return iter.NextWithContext(context.Background())
5653 }
5654
5655
5656 func (iter ResponseWithContinuationGalleryImageIterator) NotDone() bool {
5657 return iter.page.NotDone() && iter.i < len(iter.page.Values())
5658 }
5659
5660
5661 func (iter ResponseWithContinuationGalleryImageIterator) Response() ResponseWithContinuationGalleryImage {
5662 return iter.page.Response()
5663 }
5664
5665
5666
5667 func (iter ResponseWithContinuationGalleryImageIterator) Value() GalleryImage {
5668 if !iter.page.NotDone() {
5669 return GalleryImage{}
5670 }
5671 return iter.page.Values()[iter.i]
5672 }
5673
5674
5675 func NewResponseWithContinuationGalleryImageIterator(page ResponseWithContinuationGalleryImagePage) ResponseWithContinuationGalleryImageIterator {
5676 return ResponseWithContinuationGalleryImageIterator{page: page}
5677 }
5678
5679
5680 func (rwcGi ResponseWithContinuationGalleryImage) IsEmpty() bool {
5681 return rwcGi.Value == nil || len(*rwcGi.Value) == 0
5682 }
5683
5684
5685 func (rwcGi ResponseWithContinuationGalleryImage) hasNextLink() bool {
5686 return rwcGi.NextLink != nil && len(*rwcGi.NextLink) != 0
5687 }
5688
5689
5690
5691 func (rwcGi ResponseWithContinuationGalleryImage) responseWithContinuationGalleryImagePreparer(ctx context.Context) (*http.Request, error) {
5692 if !rwcGi.hasNextLink() {
5693 return nil, nil
5694 }
5695 return autorest.Prepare((&http.Request{}).WithContext(ctx),
5696 autorest.AsJSON(),
5697 autorest.AsGet(),
5698 autorest.WithBaseURL(to.String(rwcGi.NextLink)))
5699 }
5700
5701
5702 type ResponseWithContinuationGalleryImagePage struct {
5703 fn func(context.Context, ResponseWithContinuationGalleryImage) (ResponseWithContinuationGalleryImage, error)
5704 rwcgi ResponseWithContinuationGalleryImage
5705 }
5706
5707
5708
5709 func (page *ResponseWithContinuationGalleryImagePage) NextWithContext(ctx context.Context) (err error) {
5710 if tracing.IsEnabled() {
5711 ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationGalleryImagePage.NextWithContext")
5712 defer func() {
5713 sc := -1
5714 if page.Response().Response.Response != nil {
5715 sc = page.Response().Response.Response.StatusCode
5716 }
5717 tracing.EndSpan(ctx, sc, err)
5718 }()
5719 }
5720 for {
5721 next, err := page.fn(ctx, page.rwcgi)
5722 if err != nil {
5723 return err
5724 }
5725 page.rwcgi = next
5726 if !next.hasNextLink() || !next.IsEmpty() {
5727 break
5728 }
5729 }
5730 return nil
5731 }
5732
5733
5734
5735
5736 func (page *ResponseWithContinuationGalleryImagePage) Next() error {
5737 return page.NextWithContext(context.Background())
5738 }
5739
5740
5741 func (page ResponseWithContinuationGalleryImagePage) NotDone() bool {
5742 return !page.rwcgi.IsEmpty()
5743 }
5744
5745
5746 func (page ResponseWithContinuationGalleryImagePage) Response() ResponseWithContinuationGalleryImage {
5747 return page.rwcgi
5748 }
5749
5750
5751 func (page ResponseWithContinuationGalleryImagePage) Values() []GalleryImage {
5752 if page.rwcgi.IsEmpty() {
5753 return nil
5754 }
5755 return *page.rwcgi.Value
5756 }
5757
5758
5759 func NewResponseWithContinuationGalleryImagePage(cur ResponseWithContinuationGalleryImage, getNextPage func(context.Context, ResponseWithContinuationGalleryImage) (ResponseWithContinuationGalleryImage, error)) ResponseWithContinuationGalleryImagePage {
5760 return ResponseWithContinuationGalleryImagePage{
5761 fn: getNextPage,
5762 rwcgi: cur,
5763 }
5764 }
5765
5766
5767 type ResponseWithContinuationLab struct {
5768 autorest.Response `json:"-"`
5769
5770 Value *[]Lab `json:"value,omitempty"`
5771
5772 NextLink *string `json:"nextLink,omitempty"`
5773 }
5774
5775
5776 type ResponseWithContinuationLabIterator struct {
5777 i int
5778 page ResponseWithContinuationLabPage
5779 }
5780
5781
5782
5783 func (iter *ResponseWithContinuationLabIterator) NextWithContext(ctx context.Context) (err error) {
5784 if tracing.IsEnabled() {
5785 ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationLabIterator.NextWithContext")
5786 defer func() {
5787 sc := -1
5788 if iter.Response().Response.Response != nil {
5789 sc = iter.Response().Response.Response.StatusCode
5790 }
5791 tracing.EndSpan(ctx, sc, err)
5792 }()
5793 }
5794 iter.i++
5795 if iter.i < len(iter.page.Values()) {
5796 return nil
5797 }
5798 err = iter.page.NextWithContext(ctx)
5799 if err != nil {
5800 iter.i--
5801 return err
5802 }
5803 iter.i = 0
5804 return nil
5805 }
5806
5807
5808
5809
5810 func (iter *ResponseWithContinuationLabIterator) Next() error {
5811 return iter.NextWithContext(context.Background())
5812 }
5813
5814
5815 func (iter ResponseWithContinuationLabIterator) NotDone() bool {
5816 return iter.page.NotDone() && iter.i < len(iter.page.Values())
5817 }
5818
5819
5820 func (iter ResponseWithContinuationLabIterator) Response() ResponseWithContinuationLab {
5821 return iter.page.Response()
5822 }
5823
5824
5825
5826 func (iter ResponseWithContinuationLabIterator) Value() Lab {
5827 if !iter.page.NotDone() {
5828 return Lab{}
5829 }
5830 return iter.page.Values()[iter.i]
5831 }
5832
5833
5834 func NewResponseWithContinuationLabIterator(page ResponseWithContinuationLabPage) ResponseWithContinuationLabIterator {
5835 return ResponseWithContinuationLabIterator{page: page}
5836 }
5837
5838
5839 func (rwcL ResponseWithContinuationLab) IsEmpty() bool {
5840 return rwcL.Value == nil || len(*rwcL.Value) == 0
5841 }
5842
5843
5844 func (rwcL ResponseWithContinuationLab) hasNextLink() bool {
5845 return rwcL.NextLink != nil && len(*rwcL.NextLink) != 0
5846 }
5847
5848
5849
5850 func (rwcL ResponseWithContinuationLab) responseWithContinuationLabPreparer(ctx context.Context) (*http.Request, error) {
5851 if !rwcL.hasNextLink() {
5852 return nil, nil
5853 }
5854 return autorest.Prepare((&http.Request{}).WithContext(ctx),
5855 autorest.AsJSON(),
5856 autorest.AsGet(),
5857 autorest.WithBaseURL(to.String(rwcL.NextLink)))
5858 }
5859
5860
5861 type ResponseWithContinuationLabPage struct {
5862 fn func(context.Context, ResponseWithContinuationLab) (ResponseWithContinuationLab, error)
5863 rwcl ResponseWithContinuationLab
5864 }
5865
5866
5867
5868 func (page *ResponseWithContinuationLabPage) NextWithContext(ctx context.Context) (err error) {
5869 if tracing.IsEnabled() {
5870 ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationLabPage.NextWithContext")
5871 defer func() {
5872 sc := -1
5873 if page.Response().Response.Response != nil {
5874 sc = page.Response().Response.Response.StatusCode
5875 }
5876 tracing.EndSpan(ctx, sc, err)
5877 }()
5878 }
5879 for {
5880 next, err := page.fn(ctx, page.rwcl)
5881 if err != nil {
5882 return err
5883 }
5884 page.rwcl = next
5885 if !next.hasNextLink() || !next.IsEmpty() {
5886 break
5887 }
5888 }
5889 return nil
5890 }
5891
5892
5893
5894
5895 func (page *ResponseWithContinuationLabPage) Next() error {
5896 return page.NextWithContext(context.Background())
5897 }
5898
5899
5900 func (page ResponseWithContinuationLabPage) NotDone() bool {
5901 return !page.rwcl.IsEmpty()
5902 }
5903
5904
5905 func (page ResponseWithContinuationLabPage) Response() ResponseWithContinuationLab {
5906 return page.rwcl
5907 }
5908
5909
5910 func (page ResponseWithContinuationLabPage) Values() []Lab {
5911 if page.rwcl.IsEmpty() {
5912 return nil
5913 }
5914 return *page.rwcl.Value
5915 }
5916
5917
5918 func NewResponseWithContinuationLabPage(cur ResponseWithContinuationLab, getNextPage func(context.Context, ResponseWithContinuationLab) (ResponseWithContinuationLab, error)) ResponseWithContinuationLabPage {
5919 return ResponseWithContinuationLabPage{
5920 fn: getNextPage,
5921 rwcl: cur,
5922 }
5923 }
5924
5925
5926 type ResponseWithContinuationLabVhd struct {
5927 autorest.Response `json:"-"`
5928
5929 Value *[]LabVhd `json:"value,omitempty"`
5930
5931 NextLink *string `json:"nextLink,omitempty"`
5932 }
5933
5934
5935 type ResponseWithContinuationLabVhdIterator struct {
5936 i int
5937 page ResponseWithContinuationLabVhdPage
5938 }
5939
5940
5941
5942 func (iter *ResponseWithContinuationLabVhdIterator) NextWithContext(ctx context.Context) (err error) {
5943 if tracing.IsEnabled() {
5944 ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationLabVhdIterator.NextWithContext")
5945 defer func() {
5946 sc := -1
5947 if iter.Response().Response.Response != nil {
5948 sc = iter.Response().Response.Response.StatusCode
5949 }
5950 tracing.EndSpan(ctx, sc, err)
5951 }()
5952 }
5953 iter.i++
5954 if iter.i < len(iter.page.Values()) {
5955 return nil
5956 }
5957 err = iter.page.NextWithContext(ctx)
5958 if err != nil {
5959 iter.i--
5960 return err
5961 }
5962 iter.i = 0
5963 return nil
5964 }
5965
5966
5967
5968
5969 func (iter *ResponseWithContinuationLabVhdIterator) Next() error {
5970 return iter.NextWithContext(context.Background())
5971 }
5972
5973
5974 func (iter ResponseWithContinuationLabVhdIterator) NotDone() bool {
5975 return iter.page.NotDone() && iter.i < len(iter.page.Values())
5976 }
5977
5978
5979 func (iter ResponseWithContinuationLabVhdIterator) Response() ResponseWithContinuationLabVhd {
5980 return iter.page.Response()
5981 }
5982
5983
5984
5985 func (iter ResponseWithContinuationLabVhdIterator) Value() LabVhd {
5986 if !iter.page.NotDone() {
5987 return LabVhd{}
5988 }
5989 return iter.page.Values()[iter.i]
5990 }
5991
5992
5993 func NewResponseWithContinuationLabVhdIterator(page ResponseWithContinuationLabVhdPage) ResponseWithContinuationLabVhdIterator {
5994 return ResponseWithContinuationLabVhdIterator{page: page}
5995 }
5996
5997
5998 func (rwcLv ResponseWithContinuationLabVhd) IsEmpty() bool {
5999 return rwcLv.Value == nil || len(*rwcLv.Value) == 0
6000 }
6001
6002
6003 func (rwcLv ResponseWithContinuationLabVhd) hasNextLink() bool {
6004 return rwcLv.NextLink != nil && len(*rwcLv.NextLink) != 0
6005 }
6006
6007
6008
6009 func (rwcLv ResponseWithContinuationLabVhd) responseWithContinuationLabVhdPreparer(ctx context.Context) (*http.Request, error) {
6010 if !rwcLv.hasNextLink() {
6011 return nil, nil
6012 }
6013 return autorest.Prepare((&http.Request{}).WithContext(ctx),
6014 autorest.AsJSON(),
6015 autorest.AsGet(),
6016 autorest.WithBaseURL(to.String(rwcLv.NextLink)))
6017 }
6018
6019
6020 type ResponseWithContinuationLabVhdPage struct {
6021 fn func(context.Context, ResponseWithContinuationLabVhd) (ResponseWithContinuationLabVhd, error)
6022 rwclv ResponseWithContinuationLabVhd
6023 }
6024
6025
6026
6027 func (page *ResponseWithContinuationLabVhdPage) NextWithContext(ctx context.Context) (err error) {
6028 if tracing.IsEnabled() {
6029 ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationLabVhdPage.NextWithContext")
6030 defer func() {
6031 sc := -1
6032 if page.Response().Response.Response != nil {
6033 sc = page.Response().Response.Response.StatusCode
6034 }
6035 tracing.EndSpan(ctx, sc, err)
6036 }()
6037 }
6038 for {
6039 next, err := page.fn(ctx, page.rwclv)
6040 if err != nil {
6041 return err
6042 }
6043 page.rwclv = next
6044 if !next.hasNextLink() || !next.IsEmpty() {
6045 break
6046 }
6047 }
6048 return nil
6049 }
6050
6051
6052
6053
6054 func (page *ResponseWithContinuationLabVhdPage) Next() error {
6055 return page.NextWithContext(context.Background())
6056 }
6057
6058
6059 func (page ResponseWithContinuationLabVhdPage) NotDone() bool {
6060 return !page.rwclv.IsEmpty()
6061 }
6062
6063
6064 func (page ResponseWithContinuationLabVhdPage) Response() ResponseWithContinuationLabVhd {
6065 return page.rwclv
6066 }
6067
6068
6069 func (page ResponseWithContinuationLabVhdPage) Values() []LabVhd {
6070 if page.rwclv.IsEmpty() {
6071 return nil
6072 }
6073 return *page.rwclv.Value
6074 }
6075
6076
6077 func NewResponseWithContinuationLabVhdPage(cur ResponseWithContinuationLabVhd, getNextPage func(context.Context, ResponseWithContinuationLabVhd) (ResponseWithContinuationLabVhd, error)) ResponseWithContinuationLabVhdPage {
6078 return ResponseWithContinuationLabVhdPage{
6079 fn: getNextPage,
6080 rwclv: cur,
6081 }
6082 }
6083
6084
6085 type ResponseWithContinuationLabVirtualMachine struct {
6086 autorest.Response `json:"-"`
6087
6088 Value *[]LabVirtualMachine `json:"value,omitempty"`
6089
6090 NextLink *string `json:"nextLink,omitempty"`
6091 }
6092
6093
6094
6095 type ResponseWithContinuationLabVirtualMachineIterator struct {
6096 i int
6097 page ResponseWithContinuationLabVirtualMachinePage
6098 }
6099
6100
6101
6102 func (iter *ResponseWithContinuationLabVirtualMachineIterator) NextWithContext(ctx context.Context) (err error) {
6103 if tracing.IsEnabled() {
6104 ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationLabVirtualMachineIterator.NextWithContext")
6105 defer func() {
6106 sc := -1
6107 if iter.Response().Response.Response != nil {
6108 sc = iter.Response().Response.Response.StatusCode
6109 }
6110 tracing.EndSpan(ctx, sc, err)
6111 }()
6112 }
6113 iter.i++
6114 if iter.i < len(iter.page.Values()) {
6115 return nil
6116 }
6117 err = iter.page.NextWithContext(ctx)
6118 if err != nil {
6119 iter.i--
6120 return err
6121 }
6122 iter.i = 0
6123 return nil
6124 }
6125
6126
6127
6128
6129 func (iter *ResponseWithContinuationLabVirtualMachineIterator) Next() error {
6130 return iter.NextWithContext(context.Background())
6131 }
6132
6133
6134 func (iter ResponseWithContinuationLabVirtualMachineIterator) NotDone() bool {
6135 return iter.page.NotDone() && iter.i < len(iter.page.Values())
6136 }
6137
6138
6139 func (iter ResponseWithContinuationLabVirtualMachineIterator) Response() ResponseWithContinuationLabVirtualMachine {
6140 return iter.page.Response()
6141 }
6142
6143
6144
6145 func (iter ResponseWithContinuationLabVirtualMachineIterator) Value() LabVirtualMachine {
6146 if !iter.page.NotDone() {
6147 return LabVirtualMachine{}
6148 }
6149 return iter.page.Values()[iter.i]
6150 }
6151
6152
6153 func NewResponseWithContinuationLabVirtualMachineIterator(page ResponseWithContinuationLabVirtualMachinePage) ResponseWithContinuationLabVirtualMachineIterator {
6154 return ResponseWithContinuationLabVirtualMachineIterator{page: page}
6155 }
6156
6157
6158 func (rwcLvm ResponseWithContinuationLabVirtualMachine) IsEmpty() bool {
6159 return rwcLvm.Value == nil || len(*rwcLvm.Value) == 0
6160 }
6161
6162
6163 func (rwcLvm ResponseWithContinuationLabVirtualMachine) hasNextLink() bool {
6164 return rwcLvm.NextLink != nil && len(*rwcLvm.NextLink) != 0
6165 }
6166
6167
6168
6169 func (rwcLvm ResponseWithContinuationLabVirtualMachine) responseWithContinuationLabVirtualMachinePreparer(ctx context.Context) (*http.Request, error) {
6170 if !rwcLvm.hasNextLink() {
6171 return nil, nil
6172 }
6173 return autorest.Prepare((&http.Request{}).WithContext(ctx),
6174 autorest.AsJSON(),
6175 autorest.AsGet(),
6176 autorest.WithBaseURL(to.String(rwcLvm.NextLink)))
6177 }
6178
6179
6180 type ResponseWithContinuationLabVirtualMachinePage struct {
6181 fn func(context.Context, ResponseWithContinuationLabVirtualMachine) (ResponseWithContinuationLabVirtualMachine, error)
6182 rwclvm ResponseWithContinuationLabVirtualMachine
6183 }
6184
6185
6186
6187 func (page *ResponseWithContinuationLabVirtualMachinePage) NextWithContext(ctx context.Context) (err error) {
6188 if tracing.IsEnabled() {
6189 ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationLabVirtualMachinePage.NextWithContext")
6190 defer func() {
6191 sc := -1
6192 if page.Response().Response.Response != nil {
6193 sc = page.Response().Response.Response.StatusCode
6194 }
6195 tracing.EndSpan(ctx, sc, err)
6196 }()
6197 }
6198 for {
6199 next, err := page.fn(ctx, page.rwclvm)
6200 if err != nil {
6201 return err
6202 }
6203 page.rwclvm = next
6204 if !next.hasNextLink() || !next.IsEmpty() {
6205 break
6206 }
6207 }
6208 return nil
6209 }
6210
6211
6212
6213
6214 func (page *ResponseWithContinuationLabVirtualMachinePage) Next() error {
6215 return page.NextWithContext(context.Background())
6216 }
6217
6218
6219 func (page ResponseWithContinuationLabVirtualMachinePage) NotDone() bool {
6220 return !page.rwclvm.IsEmpty()
6221 }
6222
6223
6224 func (page ResponseWithContinuationLabVirtualMachinePage) Response() ResponseWithContinuationLabVirtualMachine {
6225 return page.rwclvm
6226 }
6227
6228
6229 func (page ResponseWithContinuationLabVirtualMachinePage) Values() []LabVirtualMachine {
6230 if page.rwclvm.IsEmpty() {
6231 return nil
6232 }
6233 return *page.rwclvm.Value
6234 }
6235
6236
6237 func NewResponseWithContinuationLabVirtualMachinePage(cur ResponseWithContinuationLabVirtualMachine, getNextPage func(context.Context, ResponseWithContinuationLabVirtualMachine) (ResponseWithContinuationLabVirtualMachine, error)) ResponseWithContinuationLabVirtualMachinePage {
6238 return ResponseWithContinuationLabVirtualMachinePage{
6239 fn: getNextPage,
6240 rwclvm: cur,
6241 }
6242 }
6243
6244
6245 type ResponseWithContinuationNotificationChannel struct {
6246 autorest.Response `json:"-"`
6247
6248 Value *[]NotificationChannel `json:"value,omitempty"`
6249
6250 NextLink *string `json:"nextLink,omitempty"`
6251 }
6252
6253
6254
6255 type ResponseWithContinuationNotificationChannelIterator struct {
6256 i int
6257 page ResponseWithContinuationNotificationChannelPage
6258 }
6259
6260
6261
6262 func (iter *ResponseWithContinuationNotificationChannelIterator) NextWithContext(ctx context.Context) (err error) {
6263 if tracing.IsEnabled() {
6264 ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationNotificationChannelIterator.NextWithContext")
6265 defer func() {
6266 sc := -1
6267 if iter.Response().Response.Response != nil {
6268 sc = iter.Response().Response.Response.StatusCode
6269 }
6270 tracing.EndSpan(ctx, sc, err)
6271 }()
6272 }
6273 iter.i++
6274 if iter.i < len(iter.page.Values()) {
6275 return nil
6276 }
6277 err = iter.page.NextWithContext(ctx)
6278 if err != nil {
6279 iter.i--
6280 return err
6281 }
6282 iter.i = 0
6283 return nil
6284 }
6285
6286
6287
6288
6289 func (iter *ResponseWithContinuationNotificationChannelIterator) Next() error {
6290 return iter.NextWithContext(context.Background())
6291 }
6292
6293
6294 func (iter ResponseWithContinuationNotificationChannelIterator) NotDone() bool {
6295 return iter.page.NotDone() && iter.i < len(iter.page.Values())
6296 }
6297
6298
6299 func (iter ResponseWithContinuationNotificationChannelIterator) Response() ResponseWithContinuationNotificationChannel {
6300 return iter.page.Response()
6301 }
6302
6303
6304
6305 func (iter ResponseWithContinuationNotificationChannelIterator) Value() NotificationChannel {
6306 if !iter.page.NotDone() {
6307 return NotificationChannel{}
6308 }
6309 return iter.page.Values()[iter.i]
6310 }
6311
6312
6313 func NewResponseWithContinuationNotificationChannelIterator(page ResponseWithContinuationNotificationChannelPage) ResponseWithContinuationNotificationChannelIterator {
6314 return ResponseWithContinuationNotificationChannelIterator{page: page}
6315 }
6316
6317
6318 func (rwcNc ResponseWithContinuationNotificationChannel) IsEmpty() bool {
6319 return rwcNc.Value == nil || len(*rwcNc.Value) == 0
6320 }
6321
6322
6323 func (rwcNc ResponseWithContinuationNotificationChannel) hasNextLink() bool {
6324 return rwcNc.NextLink != nil && len(*rwcNc.NextLink) != 0
6325 }
6326
6327
6328
6329 func (rwcNc ResponseWithContinuationNotificationChannel) responseWithContinuationNotificationChannelPreparer(ctx context.Context) (*http.Request, error) {
6330 if !rwcNc.hasNextLink() {
6331 return nil, nil
6332 }
6333 return autorest.Prepare((&http.Request{}).WithContext(ctx),
6334 autorest.AsJSON(),
6335 autorest.AsGet(),
6336 autorest.WithBaseURL(to.String(rwcNc.NextLink)))
6337 }
6338
6339
6340 type ResponseWithContinuationNotificationChannelPage struct {
6341 fn func(context.Context, ResponseWithContinuationNotificationChannel) (ResponseWithContinuationNotificationChannel, error)
6342 rwcnc ResponseWithContinuationNotificationChannel
6343 }
6344
6345
6346
6347 func (page *ResponseWithContinuationNotificationChannelPage) NextWithContext(ctx context.Context) (err error) {
6348 if tracing.IsEnabled() {
6349 ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationNotificationChannelPage.NextWithContext")
6350 defer func() {
6351 sc := -1
6352 if page.Response().Response.Response != nil {
6353 sc = page.Response().Response.Response.StatusCode
6354 }
6355 tracing.EndSpan(ctx, sc, err)
6356 }()
6357 }
6358 for {
6359 next, err := page.fn(ctx, page.rwcnc)
6360 if err != nil {
6361 return err
6362 }
6363 page.rwcnc = next
6364 if !next.hasNextLink() || !next.IsEmpty() {
6365 break
6366 }
6367 }
6368 return nil
6369 }
6370
6371
6372
6373
6374 func (page *ResponseWithContinuationNotificationChannelPage) Next() error {
6375 return page.NextWithContext(context.Background())
6376 }
6377
6378
6379 func (page ResponseWithContinuationNotificationChannelPage) NotDone() bool {
6380 return !page.rwcnc.IsEmpty()
6381 }
6382
6383
6384 func (page ResponseWithContinuationNotificationChannelPage) Response() ResponseWithContinuationNotificationChannel {
6385 return page.rwcnc
6386 }
6387
6388
6389 func (page ResponseWithContinuationNotificationChannelPage) Values() []NotificationChannel {
6390 if page.rwcnc.IsEmpty() {
6391 return nil
6392 }
6393 return *page.rwcnc.Value
6394 }
6395
6396
6397 func NewResponseWithContinuationNotificationChannelPage(cur ResponseWithContinuationNotificationChannel, getNextPage func(context.Context, ResponseWithContinuationNotificationChannel) (ResponseWithContinuationNotificationChannel, error)) ResponseWithContinuationNotificationChannelPage {
6398 return ResponseWithContinuationNotificationChannelPage{
6399 fn: getNextPage,
6400 rwcnc: cur,
6401 }
6402 }
6403
6404
6405 type ResponseWithContinuationPolicy struct {
6406 autorest.Response `json:"-"`
6407
6408 Value *[]Policy `json:"value,omitempty"`
6409
6410 NextLink *string `json:"nextLink,omitempty"`
6411 }
6412
6413
6414 type ResponseWithContinuationPolicyIterator struct {
6415 i int
6416 page ResponseWithContinuationPolicyPage
6417 }
6418
6419
6420
6421 func (iter *ResponseWithContinuationPolicyIterator) NextWithContext(ctx context.Context) (err error) {
6422 if tracing.IsEnabled() {
6423 ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationPolicyIterator.NextWithContext")
6424 defer func() {
6425 sc := -1
6426 if iter.Response().Response.Response != nil {
6427 sc = iter.Response().Response.Response.StatusCode
6428 }
6429 tracing.EndSpan(ctx, sc, err)
6430 }()
6431 }
6432 iter.i++
6433 if iter.i < len(iter.page.Values()) {
6434 return nil
6435 }
6436 err = iter.page.NextWithContext(ctx)
6437 if err != nil {
6438 iter.i--
6439 return err
6440 }
6441 iter.i = 0
6442 return nil
6443 }
6444
6445
6446
6447
6448 func (iter *ResponseWithContinuationPolicyIterator) Next() error {
6449 return iter.NextWithContext(context.Background())
6450 }
6451
6452
6453 func (iter ResponseWithContinuationPolicyIterator) NotDone() bool {
6454 return iter.page.NotDone() && iter.i < len(iter.page.Values())
6455 }
6456
6457
6458 func (iter ResponseWithContinuationPolicyIterator) Response() ResponseWithContinuationPolicy {
6459 return iter.page.Response()
6460 }
6461
6462
6463
6464 func (iter ResponseWithContinuationPolicyIterator) Value() Policy {
6465 if !iter.page.NotDone() {
6466 return Policy{}
6467 }
6468 return iter.page.Values()[iter.i]
6469 }
6470
6471
6472 func NewResponseWithContinuationPolicyIterator(page ResponseWithContinuationPolicyPage) ResponseWithContinuationPolicyIterator {
6473 return ResponseWithContinuationPolicyIterator{page: page}
6474 }
6475
6476
6477 func (rwcP ResponseWithContinuationPolicy) IsEmpty() bool {
6478 return rwcP.Value == nil || len(*rwcP.Value) == 0
6479 }
6480
6481
6482 func (rwcP ResponseWithContinuationPolicy) hasNextLink() bool {
6483 return rwcP.NextLink != nil && len(*rwcP.NextLink) != 0
6484 }
6485
6486
6487
6488 func (rwcP ResponseWithContinuationPolicy) responseWithContinuationPolicyPreparer(ctx context.Context) (*http.Request, error) {
6489 if !rwcP.hasNextLink() {
6490 return nil, nil
6491 }
6492 return autorest.Prepare((&http.Request{}).WithContext(ctx),
6493 autorest.AsJSON(),
6494 autorest.AsGet(),
6495 autorest.WithBaseURL(to.String(rwcP.NextLink)))
6496 }
6497
6498
6499 type ResponseWithContinuationPolicyPage struct {
6500 fn func(context.Context, ResponseWithContinuationPolicy) (ResponseWithContinuationPolicy, error)
6501 rwcp ResponseWithContinuationPolicy
6502 }
6503
6504
6505
6506 func (page *ResponseWithContinuationPolicyPage) NextWithContext(ctx context.Context) (err error) {
6507 if tracing.IsEnabled() {
6508 ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationPolicyPage.NextWithContext")
6509 defer func() {
6510 sc := -1
6511 if page.Response().Response.Response != nil {
6512 sc = page.Response().Response.Response.StatusCode
6513 }
6514 tracing.EndSpan(ctx, sc, err)
6515 }()
6516 }
6517 for {
6518 next, err := page.fn(ctx, page.rwcp)
6519 if err != nil {
6520 return err
6521 }
6522 page.rwcp = next
6523 if !next.hasNextLink() || !next.IsEmpty() {
6524 break
6525 }
6526 }
6527 return nil
6528 }
6529
6530
6531
6532
6533 func (page *ResponseWithContinuationPolicyPage) Next() error {
6534 return page.NextWithContext(context.Background())
6535 }
6536
6537
6538 func (page ResponseWithContinuationPolicyPage) NotDone() bool {
6539 return !page.rwcp.IsEmpty()
6540 }
6541
6542
6543 func (page ResponseWithContinuationPolicyPage) Response() ResponseWithContinuationPolicy {
6544 return page.rwcp
6545 }
6546
6547
6548 func (page ResponseWithContinuationPolicyPage) Values() []Policy {
6549 if page.rwcp.IsEmpty() {
6550 return nil
6551 }
6552 return *page.rwcp.Value
6553 }
6554
6555
6556 func NewResponseWithContinuationPolicyPage(cur ResponseWithContinuationPolicy, getNextPage func(context.Context, ResponseWithContinuationPolicy) (ResponseWithContinuationPolicy, error)) ResponseWithContinuationPolicyPage {
6557 return ResponseWithContinuationPolicyPage{
6558 fn: getNextPage,
6559 rwcp: cur,
6560 }
6561 }
6562
6563
6564 type ResponseWithContinuationSchedule struct {
6565 autorest.Response `json:"-"`
6566
6567 Value *[]Schedule `json:"value,omitempty"`
6568
6569 NextLink *string `json:"nextLink,omitempty"`
6570 }
6571
6572
6573 type ResponseWithContinuationScheduleIterator struct {
6574 i int
6575 page ResponseWithContinuationSchedulePage
6576 }
6577
6578
6579
6580 func (iter *ResponseWithContinuationScheduleIterator) NextWithContext(ctx context.Context) (err error) {
6581 if tracing.IsEnabled() {
6582 ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationScheduleIterator.NextWithContext")
6583 defer func() {
6584 sc := -1
6585 if iter.Response().Response.Response != nil {
6586 sc = iter.Response().Response.Response.StatusCode
6587 }
6588 tracing.EndSpan(ctx, sc, err)
6589 }()
6590 }
6591 iter.i++
6592 if iter.i < len(iter.page.Values()) {
6593 return nil
6594 }
6595 err = iter.page.NextWithContext(ctx)
6596 if err != nil {
6597 iter.i--
6598 return err
6599 }
6600 iter.i = 0
6601 return nil
6602 }
6603
6604
6605
6606
6607 func (iter *ResponseWithContinuationScheduleIterator) Next() error {
6608 return iter.NextWithContext(context.Background())
6609 }
6610
6611
6612 func (iter ResponseWithContinuationScheduleIterator) NotDone() bool {
6613 return iter.page.NotDone() && iter.i < len(iter.page.Values())
6614 }
6615
6616
6617 func (iter ResponseWithContinuationScheduleIterator) Response() ResponseWithContinuationSchedule {
6618 return iter.page.Response()
6619 }
6620
6621
6622
6623 func (iter ResponseWithContinuationScheduleIterator) Value() Schedule {
6624 if !iter.page.NotDone() {
6625 return Schedule{}
6626 }
6627 return iter.page.Values()[iter.i]
6628 }
6629
6630
6631 func NewResponseWithContinuationScheduleIterator(page ResponseWithContinuationSchedulePage) ResponseWithContinuationScheduleIterator {
6632 return ResponseWithContinuationScheduleIterator{page: page}
6633 }
6634
6635
6636 func (rwcS ResponseWithContinuationSchedule) IsEmpty() bool {
6637 return rwcS.Value == nil || len(*rwcS.Value) == 0
6638 }
6639
6640
6641 func (rwcS ResponseWithContinuationSchedule) hasNextLink() bool {
6642 return rwcS.NextLink != nil && len(*rwcS.NextLink) != 0
6643 }
6644
6645
6646
6647 func (rwcS ResponseWithContinuationSchedule) responseWithContinuationSchedulePreparer(ctx context.Context) (*http.Request, error) {
6648 if !rwcS.hasNextLink() {
6649 return nil, nil
6650 }
6651 return autorest.Prepare((&http.Request{}).WithContext(ctx),
6652 autorest.AsJSON(),
6653 autorest.AsGet(),
6654 autorest.WithBaseURL(to.String(rwcS.NextLink)))
6655 }
6656
6657
6658 type ResponseWithContinuationSchedulePage struct {
6659 fn func(context.Context, ResponseWithContinuationSchedule) (ResponseWithContinuationSchedule, error)
6660 rwcs ResponseWithContinuationSchedule
6661 }
6662
6663
6664
6665 func (page *ResponseWithContinuationSchedulePage) NextWithContext(ctx context.Context) (err error) {
6666 if tracing.IsEnabled() {
6667 ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationSchedulePage.NextWithContext")
6668 defer func() {
6669 sc := -1
6670 if page.Response().Response.Response != nil {
6671 sc = page.Response().Response.Response.StatusCode
6672 }
6673 tracing.EndSpan(ctx, sc, err)
6674 }()
6675 }
6676 for {
6677 next, err := page.fn(ctx, page.rwcs)
6678 if err != nil {
6679 return err
6680 }
6681 page.rwcs = next
6682 if !next.hasNextLink() || !next.IsEmpty() {
6683 break
6684 }
6685 }
6686 return nil
6687 }
6688
6689
6690
6691
6692 func (page *ResponseWithContinuationSchedulePage) Next() error {
6693 return page.NextWithContext(context.Background())
6694 }
6695
6696
6697 func (page ResponseWithContinuationSchedulePage) NotDone() bool {
6698 return !page.rwcs.IsEmpty()
6699 }
6700
6701
6702 func (page ResponseWithContinuationSchedulePage) Response() ResponseWithContinuationSchedule {
6703 return page.rwcs
6704 }
6705
6706
6707 func (page ResponseWithContinuationSchedulePage) Values() []Schedule {
6708 if page.rwcs.IsEmpty() {
6709 return nil
6710 }
6711 return *page.rwcs.Value
6712 }
6713
6714
6715 func NewResponseWithContinuationSchedulePage(cur ResponseWithContinuationSchedule, getNextPage func(context.Context, ResponseWithContinuationSchedule) (ResponseWithContinuationSchedule, error)) ResponseWithContinuationSchedulePage {
6716 return ResponseWithContinuationSchedulePage{
6717 fn: getNextPage,
6718 rwcs: cur,
6719 }
6720 }
6721
6722
6723 type ResponseWithContinuationSecret struct {
6724 autorest.Response `json:"-"`
6725
6726 Value *[]Secret `json:"value,omitempty"`
6727
6728 NextLink *string `json:"nextLink,omitempty"`
6729 }
6730
6731
6732 type ResponseWithContinuationSecretIterator struct {
6733 i int
6734 page ResponseWithContinuationSecretPage
6735 }
6736
6737
6738
6739 func (iter *ResponseWithContinuationSecretIterator) NextWithContext(ctx context.Context) (err error) {
6740 if tracing.IsEnabled() {
6741 ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationSecretIterator.NextWithContext")
6742 defer func() {
6743 sc := -1
6744 if iter.Response().Response.Response != nil {
6745 sc = iter.Response().Response.Response.StatusCode
6746 }
6747 tracing.EndSpan(ctx, sc, err)
6748 }()
6749 }
6750 iter.i++
6751 if iter.i < len(iter.page.Values()) {
6752 return nil
6753 }
6754 err = iter.page.NextWithContext(ctx)
6755 if err != nil {
6756 iter.i--
6757 return err
6758 }
6759 iter.i = 0
6760 return nil
6761 }
6762
6763
6764
6765
6766 func (iter *ResponseWithContinuationSecretIterator) Next() error {
6767 return iter.NextWithContext(context.Background())
6768 }
6769
6770
6771 func (iter ResponseWithContinuationSecretIterator) NotDone() bool {
6772 return iter.page.NotDone() && iter.i < len(iter.page.Values())
6773 }
6774
6775
6776 func (iter ResponseWithContinuationSecretIterator) Response() ResponseWithContinuationSecret {
6777 return iter.page.Response()
6778 }
6779
6780
6781
6782 func (iter ResponseWithContinuationSecretIterator) Value() Secret {
6783 if !iter.page.NotDone() {
6784 return Secret{}
6785 }
6786 return iter.page.Values()[iter.i]
6787 }
6788
6789
6790 func NewResponseWithContinuationSecretIterator(page ResponseWithContinuationSecretPage) ResponseWithContinuationSecretIterator {
6791 return ResponseWithContinuationSecretIterator{page: page}
6792 }
6793
6794
6795 func (rwcS ResponseWithContinuationSecret) IsEmpty() bool {
6796 return rwcS.Value == nil || len(*rwcS.Value) == 0
6797 }
6798
6799
6800 func (rwcS ResponseWithContinuationSecret) hasNextLink() bool {
6801 return rwcS.NextLink != nil && len(*rwcS.NextLink) != 0
6802 }
6803
6804
6805
6806 func (rwcS ResponseWithContinuationSecret) responseWithContinuationSecretPreparer(ctx context.Context) (*http.Request, error) {
6807 if !rwcS.hasNextLink() {
6808 return nil, nil
6809 }
6810 return autorest.Prepare((&http.Request{}).WithContext(ctx),
6811 autorest.AsJSON(),
6812 autorest.AsGet(),
6813 autorest.WithBaseURL(to.String(rwcS.NextLink)))
6814 }
6815
6816
6817 type ResponseWithContinuationSecretPage struct {
6818 fn func(context.Context, ResponseWithContinuationSecret) (ResponseWithContinuationSecret, error)
6819 rwcs ResponseWithContinuationSecret
6820 }
6821
6822
6823
6824 func (page *ResponseWithContinuationSecretPage) NextWithContext(ctx context.Context) (err error) {
6825 if tracing.IsEnabled() {
6826 ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationSecretPage.NextWithContext")
6827 defer func() {
6828 sc := -1
6829 if page.Response().Response.Response != nil {
6830 sc = page.Response().Response.Response.StatusCode
6831 }
6832 tracing.EndSpan(ctx, sc, err)
6833 }()
6834 }
6835 for {
6836 next, err := page.fn(ctx, page.rwcs)
6837 if err != nil {
6838 return err
6839 }
6840 page.rwcs = next
6841 if !next.hasNextLink() || !next.IsEmpty() {
6842 break
6843 }
6844 }
6845 return nil
6846 }
6847
6848
6849
6850
6851 func (page *ResponseWithContinuationSecretPage) Next() error {
6852 return page.NextWithContext(context.Background())
6853 }
6854
6855
6856 func (page ResponseWithContinuationSecretPage) NotDone() bool {
6857 return !page.rwcs.IsEmpty()
6858 }
6859
6860
6861 func (page ResponseWithContinuationSecretPage) Response() ResponseWithContinuationSecret {
6862 return page.rwcs
6863 }
6864
6865
6866 func (page ResponseWithContinuationSecretPage) Values() []Secret {
6867 if page.rwcs.IsEmpty() {
6868 return nil
6869 }
6870 return *page.rwcs.Value
6871 }
6872
6873
6874 func NewResponseWithContinuationSecretPage(cur ResponseWithContinuationSecret, getNextPage func(context.Context, ResponseWithContinuationSecret) (ResponseWithContinuationSecret, error)) ResponseWithContinuationSecretPage {
6875 return ResponseWithContinuationSecretPage{
6876 fn: getNextPage,
6877 rwcs: cur,
6878 }
6879 }
6880
6881
6882 type ResponseWithContinuationServiceRunner struct {
6883 autorest.Response `json:"-"`
6884
6885 Value *[]ServiceRunner `json:"value,omitempty"`
6886
6887 NextLink *string `json:"nextLink,omitempty"`
6888 }
6889
6890
6891
6892 type ResponseWithContinuationServiceRunnerIterator struct {
6893 i int
6894 page ResponseWithContinuationServiceRunnerPage
6895 }
6896
6897
6898
6899 func (iter *ResponseWithContinuationServiceRunnerIterator) NextWithContext(ctx context.Context) (err error) {
6900 if tracing.IsEnabled() {
6901 ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationServiceRunnerIterator.NextWithContext")
6902 defer func() {
6903 sc := -1
6904 if iter.Response().Response.Response != nil {
6905 sc = iter.Response().Response.Response.StatusCode
6906 }
6907 tracing.EndSpan(ctx, sc, err)
6908 }()
6909 }
6910 iter.i++
6911 if iter.i < len(iter.page.Values()) {
6912 return nil
6913 }
6914 err = iter.page.NextWithContext(ctx)
6915 if err != nil {
6916 iter.i--
6917 return err
6918 }
6919 iter.i = 0
6920 return nil
6921 }
6922
6923
6924
6925
6926 func (iter *ResponseWithContinuationServiceRunnerIterator) Next() error {
6927 return iter.NextWithContext(context.Background())
6928 }
6929
6930
6931 func (iter ResponseWithContinuationServiceRunnerIterator) NotDone() bool {
6932 return iter.page.NotDone() && iter.i < len(iter.page.Values())
6933 }
6934
6935
6936 func (iter ResponseWithContinuationServiceRunnerIterator) Response() ResponseWithContinuationServiceRunner {
6937 return iter.page.Response()
6938 }
6939
6940
6941
6942 func (iter ResponseWithContinuationServiceRunnerIterator) Value() ServiceRunner {
6943 if !iter.page.NotDone() {
6944 return ServiceRunner{}
6945 }
6946 return iter.page.Values()[iter.i]
6947 }
6948
6949
6950 func NewResponseWithContinuationServiceRunnerIterator(page ResponseWithContinuationServiceRunnerPage) ResponseWithContinuationServiceRunnerIterator {
6951 return ResponseWithContinuationServiceRunnerIterator{page: page}
6952 }
6953
6954
6955 func (rwcSr ResponseWithContinuationServiceRunner) IsEmpty() bool {
6956 return rwcSr.Value == nil || len(*rwcSr.Value) == 0
6957 }
6958
6959
6960 func (rwcSr ResponseWithContinuationServiceRunner) hasNextLink() bool {
6961 return rwcSr.NextLink != nil && len(*rwcSr.NextLink) != 0
6962 }
6963
6964
6965
6966 func (rwcSr ResponseWithContinuationServiceRunner) responseWithContinuationServiceRunnerPreparer(ctx context.Context) (*http.Request, error) {
6967 if !rwcSr.hasNextLink() {
6968 return nil, nil
6969 }
6970 return autorest.Prepare((&http.Request{}).WithContext(ctx),
6971 autorest.AsJSON(),
6972 autorest.AsGet(),
6973 autorest.WithBaseURL(to.String(rwcSr.NextLink)))
6974 }
6975
6976
6977 type ResponseWithContinuationServiceRunnerPage struct {
6978 fn func(context.Context, ResponseWithContinuationServiceRunner) (ResponseWithContinuationServiceRunner, error)
6979 rwcsr ResponseWithContinuationServiceRunner
6980 }
6981
6982
6983
6984 func (page *ResponseWithContinuationServiceRunnerPage) NextWithContext(ctx context.Context) (err error) {
6985 if tracing.IsEnabled() {
6986 ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationServiceRunnerPage.NextWithContext")
6987 defer func() {
6988 sc := -1
6989 if page.Response().Response.Response != nil {
6990 sc = page.Response().Response.Response.StatusCode
6991 }
6992 tracing.EndSpan(ctx, sc, err)
6993 }()
6994 }
6995 for {
6996 next, err := page.fn(ctx, page.rwcsr)
6997 if err != nil {
6998 return err
6999 }
7000 page.rwcsr = next
7001 if !next.hasNextLink() || !next.IsEmpty() {
7002 break
7003 }
7004 }
7005 return nil
7006 }
7007
7008
7009
7010
7011 func (page *ResponseWithContinuationServiceRunnerPage) Next() error {
7012 return page.NextWithContext(context.Background())
7013 }
7014
7015
7016 func (page ResponseWithContinuationServiceRunnerPage) NotDone() bool {
7017 return !page.rwcsr.IsEmpty()
7018 }
7019
7020
7021 func (page ResponseWithContinuationServiceRunnerPage) Response() ResponseWithContinuationServiceRunner {
7022 return page.rwcsr
7023 }
7024
7025
7026 func (page ResponseWithContinuationServiceRunnerPage) Values() []ServiceRunner {
7027 if page.rwcsr.IsEmpty() {
7028 return nil
7029 }
7030 return *page.rwcsr.Value
7031 }
7032
7033
7034 func NewResponseWithContinuationServiceRunnerPage(cur ResponseWithContinuationServiceRunner, getNextPage func(context.Context, ResponseWithContinuationServiceRunner) (ResponseWithContinuationServiceRunner, error)) ResponseWithContinuationServiceRunnerPage {
7035 return ResponseWithContinuationServiceRunnerPage{
7036 fn: getNextPage,
7037 rwcsr: cur,
7038 }
7039 }
7040
7041
7042 type ResponseWithContinuationUser struct {
7043 autorest.Response `json:"-"`
7044
7045 Value *[]User `json:"value,omitempty"`
7046
7047 NextLink *string `json:"nextLink,omitempty"`
7048 }
7049
7050
7051 type ResponseWithContinuationUserIterator struct {
7052 i int
7053 page ResponseWithContinuationUserPage
7054 }
7055
7056
7057
7058 func (iter *ResponseWithContinuationUserIterator) NextWithContext(ctx context.Context) (err error) {
7059 if tracing.IsEnabled() {
7060 ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationUserIterator.NextWithContext")
7061 defer func() {
7062 sc := -1
7063 if iter.Response().Response.Response != nil {
7064 sc = iter.Response().Response.Response.StatusCode
7065 }
7066 tracing.EndSpan(ctx, sc, err)
7067 }()
7068 }
7069 iter.i++
7070 if iter.i < len(iter.page.Values()) {
7071 return nil
7072 }
7073 err = iter.page.NextWithContext(ctx)
7074 if err != nil {
7075 iter.i--
7076 return err
7077 }
7078 iter.i = 0
7079 return nil
7080 }
7081
7082
7083
7084
7085 func (iter *ResponseWithContinuationUserIterator) Next() error {
7086 return iter.NextWithContext(context.Background())
7087 }
7088
7089
7090 func (iter ResponseWithContinuationUserIterator) NotDone() bool {
7091 return iter.page.NotDone() && iter.i < len(iter.page.Values())
7092 }
7093
7094
7095 func (iter ResponseWithContinuationUserIterator) Response() ResponseWithContinuationUser {
7096 return iter.page.Response()
7097 }
7098
7099
7100
7101 func (iter ResponseWithContinuationUserIterator) Value() User {
7102 if !iter.page.NotDone() {
7103 return User{}
7104 }
7105 return iter.page.Values()[iter.i]
7106 }
7107
7108
7109 func NewResponseWithContinuationUserIterator(page ResponseWithContinuationUserPage) ResponseWithContinuationUserIterator {
7110 return ResponseWithContinuationUserIterator{page: page}
7111 }
7112
7113
7114 func (rwcU ResponseWithContinuationUser) IsEmpty() bool {
7115 return rwcU.Value == nil || len(*rwcU.Value) == 0
7116 }
7117
7118
7119 func (rwcU ResponseWithContinuationUser) hasNextLink() bool {
7120 return rwcU.NextLink != nil && len(*rwcU.NextLink) != 0
7121 }
7122
7123
7124
7125 func (rwcU ResponseWithContinuationUser) responseWithContinuationUserPreparer(ctx context.Context) (*http.Request, error) {
7126 if !rwcU.hasNextLink() {
7127 return nil, nil
7128 }
7129 return autorest.Prepare((&http.Request{}).WithContext(ctx),
7130 autorest.AsJSON(),
7131 autorest.AsGet(),
7132 autorest.WithBaseURL(to.String(rwcU.NextLink)))
7133 }
7134
7135
7136 type ResponseWithContinuationUserPage struct {
7137 fn func(context.Context, ResponseWithContinuationUser) (ResponseWithContinuationUser, error)
7138 rwcu ResponseWithContinuationUser
7139 }
7140
7141
7142
7143 func (page *ResponseWithContinuationUserPage) NextWithContext(ctx context.Context) (err error) {
7144 if tracing.IsEnabled() {
7145 ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationUserPage.NextWithContext")
7146 defer func() {
7147 sc := -1
7148 if page.Response().Response.Response != nil {
7149 sc = page.Response().Response.Response.StatusCode
7150 }
7151 tracing.EndSpan(ctx, sc, err)
7152 }()
7153 }
7154 for {
7155 next, err := page.fn(ctx, page.rwcu)
7156 if err != nil {
7157 return err
7158 }
7159 page.rwcu = next
7160 if !next.hasNextLink() || !next.IsEmpty() {
7161 break
7162 }
7163 }
7164 return nil
7165 }
7166
7167
7168
7169
7170 func (page *ResponseWithContinuationUserPage) Next() error {
7171 return page.NextWithContext(context.Background())
7172 }
7173
7174
7175 func (page ResponseWithContinuationUserPage) NotDone() bool {
7176 return !page.rwcu.IsEmpty()
7177 }
7178
7179
7180 func (page ResponseWithContinuationUserPage) Response() ResponseWithContinuationUser {
7181 return page.rwcu
7182 }
7183
7184
7185 func (page ResponseWithContinuationUserPage) Values() []User {
7186 if page.rwcu.IsEmpty() {
7187 return nil
7188 }
7189 return *page.rwcu.Value
7190 }
7191
7192
7193 func NewResponseWithContinuationUserPage(cur ResponseWithContinuationUser, getNextPage func(context.Context, ResponseWithContinuationUser) (ResponseWithContinuationUser, error)) ResponseWithContinuationUserPage {
7194 return ResponseWithContinuationUserPage{
7195 fn: getNextPage,
7196 rwcu: cur,
7197 }
7198 }
7199
7200
7201 type ResponseWithContinuationVirtualNetwork struct {
7202 autorest.Response `json:"-"`
7203
7204 Value *[]VirtualNetwork `json:"value,omitempty"`
7205
7206 NextLink *string `json:"nextLink,omitempty"`
7207 }
7208
7209
7210
7211 type ResponseWithContinuationVirtualNetworkIterator struct {
7212 i int
7213 page ResponseWithContinuationVirtualNetworkPage
7214 }
7215
7216
7217
7218 func (iter *ResponseWithContinuationVirtualNetworkIterator) NextWithContext(ctx context.Context) (err error) {
7219 if tracing.IsEnabled() {
7220 ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationVirtualNetworkIterator.NextWithContext")
7221 defer func() {
7222 sc := -1
7223 if iter.Response().Response.Response != nil {
7224 sc = iter.Response().Response.Response.StatusCode
7225 }
7226 tracing.EndSpan(ctx, sc, err)
7227 }()
7228 }
7229 iter.i++
7230 if iter.i < len(iter.page.Values()) {
7231 return nil
7232 }
7233 err = iter.page.NextWithContext(ctx)
7234 if err != nil {
7235 iter.i--
7236 return err
7237 }
7238 iter.i = 0
7239 return nil
7240 }
7241
7242
7243
7244
7245 func (iter *ResponseWithContinuationVirtualNetworkIterator) Next() error {
7246 return iter.NextWithContext(context.Background())
7247 }
7248
7249
7250 func (iter ResponseWithContinuationVirtualNetworkIterator) NotDone() bool {
7251 return iter.page.NotDone() && iter.i < len(iter.page.Values())
7252 }
7253
7254
7255 func (iter ResponseWithContinuationVirtualNetworkIterator) Response() ResponseWithContinuationVirtualNetwork {
7256 return iter.page.Response()
7257 }
7258
7259
7260
7261 func (iter ResponseWithContinuationVirtualNetworkIterator) Value() VirtualNetwork {
7262 if !iter.page.NotDone() {
7263 return VirtualNetwork{}
7264 }
7265 return iter.page.Values()[iter.i]
7266 }
7267
7268
7269 func NewResponseWithContinuationVirtualNetworkIterator(page ResponseWithContinuationVirtualNetworkPage) ResponseWithContinuationVirtualNetworkIterator {
7270 return ResponseWithContinuationVirtualNetworkIterator{page: page}
7271 }
7272
7273
7274 func (rwcVn ResponseWithContinuationVirtualNetwork) IsEmpty() bool {
7275 return rwcVn.Value == nil || len(*rwcVn.Value) == 0
7276 }
7277
7278
7279 func (rwcVn ResponseWithContinuationVirtualNetwork) hasNextLink() bool {
7280 return rwcVn.NextLink != nil && len(*rwcVn.NextLink) != 0
7281 }
7282
7283
7284
7285 func (rwcVn ResponseWithContinuationVirtualNetwork) responseWithContinuationVirtualNetworkPreparer(ctx context.Context) (*http.Request, error) {
7286 if !rwcVn.hasNextLink() {
7287 return nil, nil
7288 }
7289 return autorest.Prepare((&http.Request{}).WithContext(ctx),
7290 autorest.AsJSON(),
7291 autorest.AsGet(),
7292 autorest.WithBaseURL(to.String(rwcVn.NextLink)))
7293 }
7294
7295
7296 type ResponseWithContinuationVirtualNetworkPage struct {
7297 fn func(context.Context, ResponseWithContinuationVirtualNetwork) (ResponseWithContinuationVirtualNetwork, error)
7298 rwcvn ResponseWithContinuationVirtualNetwork
7299 }
7300
7301
7302
7303 func (page *ResponseWithContinuationVirtualNetworkPage) NextWithContext(ctx context.Context) (err error) {
7304 if tracing.IsEnabled() {
7305 ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationVirtualNetworkPage.NextWithContext")
7306 defer func() {
7307 sc := -1
7308 if page.Response().Response.Response != nil {
7309 sc = page.Response().Response.Response.StatusCode
7310 }
7311 tracing.EndSpan(ctx, sc, err)
7312 }()
7313 }
7314 for {
7315 next, err := page.fn(ctx, page.rwcvn)
7316 if err != nil {
7317 return err
7318 }
7319 page.rwcvn = next
7320 if !next.hasNextLink() || !next.IsEmpty() {
7321 break
7322 }
7323 }
7324 return nil
7325 }
7326
7327
7328
7329
7330 func (page *ResponseWithContinuationVirtualNetworkPage) Next() error {
7331 return page.NextWithContext(context.Background())
7332 }
7333
7334
7335 func (page ResponseWithContinuationVirtualNetworkPage) NotDone() bool {
7336 return !page.rwcvn.IsEmpty()
7337 }
7338
7339
7340 func (page ResponseWithContinuationVirtualNetworkPage) Response() ResponseWithContinuationVirtualNetwork {
7341 return page.rwcvn
7342 }
7343
7344
7345 func (page ResponseWithContinuationVirtualNetworkPage) Values() []VirtualNetwork {
7346 if page.rwcvn.IsEmpty() {
7347 return nil
7348 }
7349 return *page.rwcvn.Value
7350 }
7351
7352
7353 func NewResponseWithContinuationVirtualNetworkPage(cur ResponseWithContinuationVirtualNetwork, getNextPage func(context.Context, ResponseWithContinuationVirtualNetwork) (ResponseWithContinuationVirtualNetwork, error)) ResponseWithContinuationVirtualNetworkPage {
7354 return ResponseWithContinuationVirtualNetworkPage{
7355 fn: getNextPage,
7356 rwcvn: cur,
7357 }
7358 }
7359
7360
7361 type RetargetScheduleProperties struct {
7362
7363 CurrentResourceID *string `json:"currentResourceId,omitempty"`
7364
7365 TargetResourceID *string `json:"targetResourceId,omitempty"`
7366 }
7367
7368
7369 type Schedule struct {
7370 autorest.Response `json:"-"`
7371
7372 *ScheduleProperties `json:"properties,omitempty"`
7373
7374 ID *string `json:"id,omitempty"`
7375
7376 Name *string `json:"name,omitempty"`
7377
7378 Type *string `json:"type,omitempty"`
7379
7380 Location *string `json:"location,omitempty"`
7381
7382 Tags map[string]*string `json:"tags"`
7383 }
7384
7385
7386 func (s Schedule) MarshalJSON() ([]byte, error) {
7387 objectMap := make(map[string]interface{})
7388 if s.ScheduleProperties != nil {
7389 objectMap["properties"] = s.ScheduleProperties
7390 }
7391 if s.Location != nil {
7392 objectMap["location"] = s.Location
7393 }
7394 if s.Tags != nil {
7395 objectMap["tags"] = s.Tags
7396 }
7397 return json.Marshal(objectMap)
7398 }
7399
7400
7401 func (s *Schedule) UnmarshalJSON(body []byte) error {
7402 var m map[string]*json.RawMessage
7403 err := json.Unmarshal(body, &m)
7404 if err != nil {
7405 return err
7406 }
7407 for k, v := range m {
7408 switch k {
7409 case "properties":
7410 if v != nil {
7411 var scheduleProperties ScheduleProperties
7412 err = json.Unmarshal(*v, &scheduleProperties)
7413 if err != nil {
7414 return err
7415 }
7416 s.ScheduleProperties = &scheduleProperties
7417 }
7418 case "id":
7419 if v != nil {
7420 var ID string
7421 err = json.Unmarshal(*v, &ID)
7422 if err != nil {
7423 return err
7424 }
7425 s.ID = &ID
7426 }
7427 case "name":
7428 if v != nil {
7429 var name string
7430 err = json.Unmarshal(*v, &name)
7431 if err != nil {
7432 return err
7433 }
7434 s.Name = &name
7435 }
7436 case "type":
7437 if v != nil {
7438 var typeVar string
7439 err = json.Unmarshal(*v, &typeVar)
7440 if err != nil {
7441 return err
7442 }
7443 s.Type = &typeVar
7444 }
7445 case "location":
7446 if v != nil {
7447 var location string
7448 err = json.Unmarshal(*v, &location)
7449 if err != nil {
7450 return err
7451 }
7452 s.Location = &location
7453 }
7454 case "tags":
7455 if v != nil {
7456 var tags map[string]*string
7457 err = json.Unmarshal(*v, &tags)
7458 if err != nil {
7459 return err
7460 }
7461 s.Tags = tags
7462 }
7463 }
7464 }
7465
7466 return nil
7467 }
7468
7469
7470 type ScheduleFragment struct {
7471
7472 *SchedulePropertiesFragment `json:"properties,omitempty"`
7473
7474 ID *string `json:"id,omitempty"`
7475
7476 Name *string `json:"name,omitempty"`
7477
7478 Type *string `json:"type,omitempty"`
7479
7480 Location *string `json:"location,omitempty"`
7481
7482 Tags map[string]*string `json:"tags"`
7483 }
7484
7485
7486 func (sf ScheduleFragment) MarshalJSON() ([]byte, error) {
7487 objectMap := make(map[string]interface{})
7488 if sf.SchedulePropertiesFragment != nil {
7489 objectMap["properties"] = sf.SchedulePropertiesFragment
7490 }
7491 if sf.Location != nil {
7492 objectMap["location"] = sf.Location
7493 }
7494 if sf.Tags != nil {
7495 objectMap["tags"] = sf.Tags
7496 }
7497 return json.Marshal(objectMap)
7498 }
7499
7500
7501 func (sf *ScheduleFragment) UnmarshalJSON(body []byte) error {
7502 var m map[string]*json.RawMessage
7503 err := json.Unmarshal(body, &m)
7504 if err != nil {
7505 return err
7506 }
7507 for k, v := range m {
7508 switch k {
7509 case "properties":
7510 if v != nil {
7511 var schedulePropertiesFragment SchedulePropertiesFragment
7512 err = json.Unmarshal(*v, &schedulePropertiesFragment)
7513 if err != nil {
7514 return err
7515 }
7516 sf.SchedulePropertiesFragment = &schedulePropertiesFragment
7517 }
7518 case "id":
7519 if v != nil {
7520 var ID string
7521 err = json.Unmarshal(*v, &ID)
7522 if err != nil {
7523 return err
7524 }
7525 sf.ID = &ID
7526 }
7527 case "name":
7528 if v != nil {
7529 var name string
7530 err = json.Unmarshal(*v, &name)
7531 if err != nil {
7532 return err
7533 }
7534 sf.Name = &name
7535 }
7536 case "type":
7537 if v != nil {
7538 var typeVar string
7539 err = json.Unmarshal(*v, &typeVar)
7540 if err != nil {
7541 return err
7542 }
7543 sf.Type = &typeVar
7544 }
7545 case "location":
7546 if v != nil {
7547 var location string
7548 err = json.Unmarshal(*v, &location)
7549 if err != nil {
7550 return err
7551 }
7552 sf.Location = &location
7553 }
7554 case "tags":
7555 if v != nil {
7556 var tags map[string]*string
7557 err = json.Unmarshal(*v, &tags)
7558 if err != nil {
7559 return err
7560 }
7561 sf.Tags = tags
7562 }
7563 }
7564 }
7565
7566 return nil
7567 }
7568
7569
7570 type ScheduleProperties struct {
7571
7572 Status EnableStatus `json:"status,omitempty"`
7573
7574 TaskType *string `json:"taskType,omitempty"`
7575
7576 WeeklyRecurrence *WeekDetails `json:"weeklyRecurrence,omitempty"`
7577
7578 DailyRecurrence *DayDetails `json:"dailyRecurrence,omitempty"`
7579
7580 HourlyRecurrence *HourDetails `json:"hourlyRecurrence,omitempty"`
7581
7582 TimeZoneID *string `json:"timeZoneId,omitempty"`
7583
7584 NotificationSettings *NotificationSettings `json:"notificationSettings,omitempty"`
7585
7586 CreatedDate *date.Time `json:"createdDate,omitempty"`
7587
7588 TargetResourceID *string `json:"targetResourceId,omitempty"`
7589
7590 ProvisioningState *string `json:"provisioningState,omitempty"`
7591
7592 UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
7593 }
7594
7595
7596 func (sp ScheduleProperties) MarshalJSON() ([]byte, error) {
7597 objectMap := make(map[string]interface{})
7598 if sp.Status != "" {
7599 objectMap["status"] = sp.Status
7600 }
7601 if sp.TaskType != nil {
7602 objectMap["taskType"] = sp.TaskType
7603 }
7604 if sp.WeeklyRecurrence != nil {
7605 objectMap["weeklyRecurrence"] = sp.WeeklyRecurrence
7606 }
7607 if sp.DailyRecurrence != nil {
7608 objectMap["dailyRecurrence"] = sp.DailyRecurrence
7609 }
7610 if sp.HourlyRecurrence != nil {
7611 objectMap["hourlyRecurrence"] = sp.HourlyRecurrence
7612 }
7613 if sp.TimeZoneID != nil {
7614 objectMap["timeZoneId"] = sp.TimeZoneID
7615 }
7616 if sp.NotificationSettings != nil {
7617 objectMap["notificationSettings"] = sp.NotificationSettings
7618 }
7619 if sp.TargetResourceID != nil {
7620 objectMap["targetResourceId"] = sp.TargetResourceID
7621 }
7622 if sp.ProvisioningState != nil {
7623 objectMap["provisioningState"] = sp.ProvisioningState
7624 }
7625 if sp.UniqueIdentifier != nil {
7626 objectMap["uniqueIdentifier"] = sp.UniqueIdentifier
7627 }
7628 return json.Marshal(objectMap)
7629 }
7630
7631
7632 type SchedulePropertiesFragment struct {
7633
7634 Status EnableStatus `json:"status,omitempty"`
7635
7636 TaskType *string `json:"taskType,omitempty"`
7637
7638 WeeklyRecurrence *WeekDetailsFragment `json:"weeklyRecurrence,omitempty"`
7639
7640 DailyRecurrence *DayDetailsFragment `json:"dailyRecurrence,omitempty"`
7641
7642 HourlyRecurrence *HourDetailsFragment `json:"hourlyRecurrence,omitempty"`
7643
7644 TimeZoneID *string `json:"timeZoneId,omitempty"`
7645
7646 NotificationSettings *NotificationSettingsFragment `json:"notificationSettings,omitempty"`
7647
7648 TargetResourceID *string `json:"targetResourceId,omitempty"`
7649
7650 ProvisioningState *string `json:"provisioningState,omitempty"`
7651
7652 UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
7653 }
7654
7655
7656
7657 type SchedulesExecuteFuture struct {
7658 azure.FutureAPI
7659
7660
7661 Result func(SchedulesClient) (autorest.Response, error)
7662 }
7663
7664
7665 func (future *SchedulesExecuteFuture) UnmarshalJSON(body []byte) error {
7666 var azFuture azure.Future
7667 if err := json.Unmarshal(body, &azFuture); err != nil {
7668 return err
7669 }
7670 future.FutureAPI = &azFuture
7671 future.Result = future.result
7672 return nil
7673 }
7674
7675
7676 func (future *SchedulesExecuteFuture) result(client SchedulesClient) (ar autorest.Response, err error) {
7677 var done bool
7678 done, err = future.DoneWithContext(context.Background(), client)
7679 if err != nil {
7680 err = autorest.NewErrorWithError(err, "dtl.SchedulesExecuteFuture", "Result", future.Response(), "Polling failure")
7681 return
7682 }
7683 if !done {
7684 ar.Response = future.Response()
7685 err = azure.NewAsyncOpIncompleteError("dtl.SchedulesExecuteFuture")
7686 return
7687 }
7688 ar.Response = future.Response()
7689 return
7690 }
7691
7692
7693 type Secret struct {
7694 autorest.Response `json:"-"`
7695
7696 *SecretProperties `json:"properties,omitempty"`
7697
7698 ID *string `json:"id,omitempty"`
7699
7700 Name *string `json:"name,omitempty"`
7701
7702 Type *string `json:"type,omitempty"`
7703
7704 Location *string `json:"location,omitempty"`
7705
7706 Tags map[string]*string `json:"tags"`
7707 }
7708
7709
7710 func (s Secret) MarshalJSON() ([]byte, error) {
7711 objectMap := make(map[string]interface{})
7712 if s.SecretProperties != nil {
7713 objectMap["properties"] = s.SecretProperties
7714 }
7715 if s.Location != nil {
7716 objectMap["location"] = s.Location
7717 }
7718 if s.Tags != nil {
7719 objectMap["tags"] = s.Tags
7720 }
7721 return json.Marshal(objectMap)
7722 }
7723
7724
7725 func (s *Secret) UnmarshalJSON(body []byte) error {
7726 var m map[string]*json.RawMessage
7727 err := json.Unmarshal(body, &m)
7728 if err != nil {
7729 return err
7730 }
7731 for k, v := range m {
7732 switch k {
7733 case "properties":
7734 if v != nil {
7735 var secretProperties SecretProperties
7736 err = json.Unmarshal(*v, &secretProperties)
7737 if err != nil {
7738 return err
7739 }
7740 s.SecretProperties = &secretProperties
7741 }
7742 case "id":
7743 if v != nil {
7744 var ID string
7745 err = json.Unmarshal(*v, &ID)
7746 if err != nil {
7747 return err
7748 }
7749 s.ID = &ID
7750 }
7751 case "name":
7752 if v != nil {
7753 var name string
7754 err = json.Unmarshal(*v, &name)
7755 if err != nil {
7756 return err
7757 }
7758 s.Name = &name
7759 }
7760 case "type":
7761 if v != nil {
7762 var typeVar string
7763 err = json.Unmarshal(*v, &typeVar)
7764 if err != nil {
7765 return err
7766 }
7767 s.Type = &typeVar
7768 }
7769 case "location":
7770 if v != nil {
7771 var location string
7772 err = json.Unmarshal(*v, &location)
7773 if err != nil {
7774 return err
7775 }
7776 s.Location = &location
7777 }
7778 case "tags":
7779 if v != nil {
7780 var tags map[string]*string
7781 err = json.Unmarshal(*v, &tags)
7782 if err != nil {
7783 return err
7784 }
7785 s.Tags = tags
7786 }
7787 }
7788 }
7789
7790 return nil
7791 }
7792
7793
7794 type SecretProperties struct {
7795
7796 Value *string `json:"value,omitempty"`
7797
7798 ProvisioningState *string `json:"provisioningState,omitempty"`
7799
7800 UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
7801 }
7802
7803
7804 type ServiceRunner struct {
7805 autorest.Response `json:"-"`
7806
7807 Identity *IdentityProperties `json:"identity,omitempty"`
7808
7809 ID *string `json:"id,omitempty"`
7810
7811 Name *string `json:"name,omitempty"`
7812
7813 Type *string `json:"type,omitempty"`
7814
7815 Location *string `json:"location,omitempty"`
7816
7817 Tags map[string]*string `json:"tags"`
7818 }
7819
7820
7821 func (sr ServiceRunner) MarshalJSON() ([]byte, error) {
7822 objectMap := make(map[string]interface{})
7823 if sr.Identity != nil {
7824 objectMap["identity"] = sr.Identity
7825 }
7826 if sr.Location != nil {
7827 objectMap["location"] = sr.Location
7828 }
7829 if sr.Tags != nil {
7830 objectMap["tags"] = sr.Tags
7831 }
7832 return json.Marshal(objectMap)
7833 }
7834
7835
7836
7837 type SharedPublicIPAddressConfiguration struct {
7838
7839 InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"`
7840 }
7841
7842
7843
7844 type SharedPublicIPAddressConfigurationFragment struct {
7845
7846 InboundNatRules *[]InboundNatRuleFragment `json:"inboundNatRules,omitempty"`
7847 }
7848
7849
7850
7851 type ShutdownNotificationContent struct {
7852
7853 SkipURL *string `json:"skipUrl,omitempty"`
7854
7855 DelayURL60 *string `json:"delayUrl60,omitempty"`
7856
7857 DelayURL120 *string `json:"delayUrl120,omitempty"`
7858
7859 VMName *string `json:"vmName,omitempty"`
7860
7861 GUID *string `json:"guid,omitempty"`
7862
7863 Owner *string `json:"owner,omitempty"`
7864
7865 EventType *string `json:"eventType,omitempty"`
7866
7867 Text *string `json:"text,omitempty"`
7868
7869 SubscriptionID *string `json:"subscriptionId,omitempty"`
7870
7871 ResourceGroupName *string `json:"resourceGroupName,omitempty"`
7872
7873 LabName *string `json:"labName,omitempty"`
7874 }
7875
7876
7877 type Subnet struct {
7878
7879 ResourceID *string `json:"resourceId,omitempty"`
7880
7881 LabSubnetName *string `json:"labSubnetName,omitempty"`
7882
7883 AllowPublicIP UsagePermissionType `json:"allowPublicIp,omitempty"`
7884 }
7885
7886
7887 type SubnetFragment struct {
7888
7889 ResourceID *string `json:"resourceId,omitempty"`
7890
7891 LabSubnetName *string `json:"labSubnetName,omitempty"`
7892
7893 AllowPublicIP UsagePermissionType `json:"allowPublicIp,omitempty"`
7894 }
7895
7896
7897 type SubnetOverride struct {
7898
7899 ResourceID *string `json:"resourceId,omitempty"`
7900
7901 LabSubnetName *string `json:"labSubnetName,omitempty"`
7902
7903 UseInVMCreationPermission UsagePermissionType `json:"useInVmCreationPermission,omitempty"`
7904
7905 UsePublicIPAddressPermission UsagePermissionType `json:"usePublicIpAddressPermission,omitempty"`
7906
7907 SharedPublicIPAddressConfiguration *SubnetSharedPublicIPAddressConfiguration `json:"sharedPublicIpAddressConfiguration,omitempty"`
7908
7909 VirtualNetworkPoolName *string `json:"virtualNetworkPoolName,omitempty"`
7910 }
7911
7912
7913 type SubnetOverrideFragment struct {
7914
7915 ResourceID *string `json:"resourceId,omitempty"`
7916
7917 LabSubnetName *string `json:"labSubnetName,omitempty"`
7918
7919 UseInVMCreationPermission UsagePermissionType `json:"useInVmCreationPermission,omitempty"`
7920
7921 UsePublicIPAddressPermission UsagePermissionType `json:"usePublicIpAddressPermission,omitempty"`
7922
7923 SharedPublicIPAddressConfiguration *SubnetSharedPublicIPAddressConfigurationFragment `json:"sharedPublicIpAddressConfiguration,omitempty"`
7924
7925 VirtualNetworkPoolName *string `json:"virtualNetworkPoolName,omitempty"`
7926 }
7927
7928
7929 type SubnetSharedPublicIPAddressConfiguration struct {
7930
7931 AllowedPorts *[]Port `json:"allowedPorts,omitempty"`
7932 }
7933
7934
7935 type SubnetSharedPublicIPAddressConfigurationFragment struct {
7936
7937 AllowedPorts *[]PortFragment `json:"allowedPorts,omitempty"`
7938 }
7939
7940
7941 type TargetCostProperties struct {
7942
7943 Status TargetCostStatus `json:"status,omitempty"`
7944
7945 Target *int32 `json:"target,omitempty"`
7946
7947 CostThresholds *[]CostThresholdProperties `json:"costThresholds,omitempty"`
7948
7949 CycleStartDateTime *date.Time `json:"cycleStartDateTime,omitempty"`
7950
7951 CycleEndDateTime *date.Time `json:"cycleEndDateTime,omitempty"`
7952
7953 CycleType ReportingCycleType `json:"cycleType,omitempty"`
7954 }
7955
7956
7957 type User struct {
7958 autorest.Response `json:"-"`
7959
7960 *UserProperties `json:"properties,omitempty"`
7961
7962 ID *string `json:"id,omitempty"`
7963
7964 Name *string `json:"name,omitempty"`
7965
7966 Type *string `json:"type,omitempty"`
7967
7968 Location *string `json:"location,omitempty"`
7969
7970 Tags map[string]*string `json:"tags"`
7971 }
7972
7973
7974 func (u User) MarshalJSON() ([]byte, error) {
7975 objectMap := make(map[string]interface{})
7976 if u.UserProperties != nil {
7977 objectMap["properties"] = u.UserProperties
7978 }
7979 if u.Location != nil {
7980 objectMap["location"] = u.Location
7981 }
7982 if u.Tags != nil {
7983 objectMap["tags"] = u.Tags
7984 }
7985 return json.Marshal(objectMap)
7986 }
7987
7988
7989 func (u *User) UnmarshalJSON(body []byte) error {
7990 var m map[string]*json.RawMessage
7991 err := json.Unmarshal(body, &m)
7992 if err != nil {
7993 return err
7994 }
7995 for k, v := range m {
7996 switch k {
7997 case "properties":
7998 if v != nil {
7999 var userProperties UserProperties
8000 err = json.Unmarshal(*v, &userProperties)
8001 if err != nil {
8002 return err
8003 }
8004 u.UserProperties = &userProperties
8005 }
8006 case "id":
8007 if v != nil {
8008 var ID string
8009 err = json.Unmarshal(*v, &ID)
8010 if err != nil {
8011 return err
8012 }
8013 u.ID = &ID
8014 }
8015 case "name":
8016 if v != nil {
8017 var name string
8018 err = json.Unmarshal(*v, &name)
8019 if err != nil {
8020 return err
8021 }
8022 u.Name = &name
8023 }
8024 case "type":
8025 if v != nil {
8026 var typeVar string
8027 err = json.Unmarshal(*v, &typeVar)
8028 if err != nil {
8029 return err
8030 }
8031 u.Type = &typeVar
8032 }
8033 case "location":
8034 if v != nil {
8035 var location string
8036 err = json.Unmarshal(*v, &location)
8037 if err != nil {
8038 return err
8039 }
8040 u.Location = &location
8041 }
8042 case "tags":
8043 if v != nil {
8044 var tags map[string]*string
8045 err = json.Unmarshal(*v, &tags)
8046 if err != nil {
8047 return err
8048 }
8049 u.Tags = tags
8050 }
8051 }
8052 }
8053
8054 return nil
8055 }
8056
8057
8058 type UserFragment struct {
8059
8060 *UserPropertiesFragment `json:"properties,omitempty"`
8061
8062 ID *string `json:"id,omitempty"`
8063
8064 Name *string `json:"name,omitempty"`
8065
8066 Type *string `json:"type,omitempty"`
8067
8068 Location *string `json:"location,omitempty"`
8069
8070 Tags map[string]*string `json:"tags"`
8071 }
8072
8073
8074 func (uf UserFragment) MarshalJSON() ([]byte, error) {
8075 objectMap := make(map[string]interface{})
8076 if uf.UserPropertiesFragment != nil {
8077 objectMap["properties"] = uf.UserPropertiesFragment
8078 }
8079 if uf.Location != nil {
8080 objectMap["location"] = uf.Location
8081 }
8082 if uf.Tags != nil {
8083 objectMap["tags"] = uf.Tags
8084 }
8085 return json.Marshal(objectMap)
8086 }
8087
8088
8089 func (uf *UserFragment) UnmarshalJSON(body []byte) error {
8090 var m map[string]*json.RawMessage
8091 err := json.Unmarshal(body, &m)
8092 if err != nil {
8093 return err
8094 }
8095 for k, v := range m {
8096 switch k {
8097 case "properties":
8098 if v != nil {
8099 var userPropertiesFragment UserPropertiesFragment
8100 err = json.Unmarshal(*v, &userPropertiesFragment)
8101 if err != nil {
8102 return err
8103 }
8104 uf.UserPropertiesFragment = &userPropertiesFragment
8105 }
8106 case "id":
8107 if v != nil {
8108 var ID string
8109 err = json.Unmarshal(*v, &ID)
8110 if err != nil {
8111 return err
8112 }
8113 uf.ID = &ID
8114 }
8115 case "name":
8116 if v != nil {
8117 var name string
8118 err = json.Unmarshal(*v, &name)
8119 if err != nil {
8120 return err
8121 }
8122 uf.Name = &name
8123 }
8124 case "type":
8125 if v != nil {
8126 var typeVar string
8127 err = json.Unmarshal(*v, &typeVar)
8128 if err != nil {
8129 return err
8130 }
8131 uf.Type = &typeVar
8132 }
8133 case "location":
8134 if v != nil {
8135 var location string
8136 err = json.Unmarshal(*v, &location)
8137 if err != nil {
8138 return err
8139 }
8140 uf.Location = &location
8141 }
8142 case "tags":
8143 if v != nil {
8144 var tags map[string]*string
8145 err = json.Unmarshal(*v, &tags)
8146 if err != nil {
8147 return err
8148 }
8149 uf.Tags = tags
8150 }
8151 }
8152 }
8153
8154 return nil
8155 }
8156
8157
8158 type UserIdentity struct {
8159
8160 PrincipalName *string `json:"principalName,omitempty"`
8161
8162 PrincipalID *string `json:"principalId,omitempty"`
8163
8164 TenantID *string `json:"tenantId,omitempty"`
8165
8166 ObjectID *string `json:"objectId,omitempty"`
8167
8168 AppID *string `json:"appId,omitempty"`
8169 }
8170
8171
8172 type UserIdentityFragment struct {
8173
8174 PrincipalName *string `json:"principalName,omitempty"`
8175
8176 PrincipalID *string `json:"principalId,omitempty"`
8177
8178 TenantID *string `json:"tenantId,omitempty"`
8179
8180 ObjectID *string `json:"objectId,omitempty"`
8181
8182 AppID *string `json:"appId,omitempty"`
8183 }
8184
8185
8186 type UserProperties struct {
8187
8188 Identity *UserIdentity `json:"identity,omitempty"`
8189
8190 SecretStore *UserSecretStore `json:"secretStore,omitempty"`
8191
8192 CreatedDate *date.Time `json:"createdDate,omitempty"`
8193
8194 ProvisioningState *string `json:"provisioningState,omitempty"`
8195
8196 UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
8197 }
8198
8199
8200 func (up UserProperties) MarshalJSON() ([]byte, error) {
8201 objectMap := make(map[string]interface{})
8202 if up.Identity != nil {
8203 objectMap["identity"] = up.Identity
8204 }
8205 if up.SecretStore != nil {
8206 objectMap["secretStore"] = up.SecretStore
8207 }
8208 if up.ProvisioningState != nil {
8209 objectMap["provisioningState"] = up.ProvisioningState
8210 }
8211 if up.UniqueIdentifier != nil {
8212 objectMap["uniqueIdentifier"] = up.UniqueIdentifier
8213 }
8214 return json.Marshal(objectMap)
8215 }
8216
8217
8218 type UserPropertiesFragment struct {
8219
8220 Identity *UserIdentityFragment `json:"identity,omitempty"`
8221
8222 SecretStore *UserSecretStoreFragment `json:"secretStore,omitempty"`
8223
8224 ProvisioningState *string `json:"provisioningState,omitempty"`
8225
8226 UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
8227 }
8228
8229
8230 type UsersDeleteFuture struct {
8231 azure.FutureAPI
8232
8233
8234 Result func(UsersClient) (autorest.Response, error)
8235 }
8236
8237
8238 func (future *UsersDeleteFuture) UnmarshalJSON(body []byte) error {
8239 var azFuture azure.Future
8240 if err := json.Unmarshal(body, &azFuture); err != nil {
8241 return err
8242 }
8243 future.FutureAPI = &azFuture
8244 future.Result = future.result
8245 return nil
8246 }
8247
8248
8249 func (future *UsersDeleteFuture) result(client UsersClient) (ar autorest.Response, err error) {
8250 var done bool
8251 done, err = future.DoneWithContext(context.Background(), client)
8252 if err != nil {
8253 err = autorest.NewErrorWithError(err, "dtl.UsersDeleteFuture", "Result", future.Response(), "Polling failure")
8254 return
8255 }
8256 if !done {
8257 ar.Response = future.Response()
8258 err = azure.NewAsyncOpIncompleteError("dtl.UsersDeleteFuture")
8259 return
8260 }
8261 ar.Response = future.Response()
8262 return
8263 }
8264
8265
8266 type UserSecretStore struct {
8267
8268 KeyVaultURI *string `json:"keyVaultUri,omitempty"`
8269
8270 KeyVaultID *string `json:"keyVaultId,omitempty"`
8271 }
8272
8273
8274 type UserSecretStoreFragment struct {
8275
8276 KeyVaultURI *string `json:"keyVaultUri,omitempty"`
8277
8278 KeyVaultID *string `json:"keyVaultId,omitempty"`
8279 }
8280
8281
8282
8283 type VirtualMachinesAddDataDiskFuture struct {
8284 azure.FutureAPI
8285
8286
8287 Result func(VirtualMachinesClient) (autorest.Response, error)
8288 }
8289
8290
8291 func (future *VirtualMachinesAddDataDiskFuture) UnmarshalJSON(body []byte) error {
8292 var azFuture azure.Future
8293 if err := json.Unmarshal(body, &azFuture); err != nil {
8294 return err
8295 }
8296 future.FutureAPI = &azFuture
8297 future.Result = future.result
8298 return nil
8299 }
8300
8301
8302 func (future *VirtualMachinesAddDataDiskFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
8303 var done bool
8304 done, err = future.DoneWithContext(context.Background(), client)
8305 if err != nil {
8306 err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesAddDataDiskFuture", "Result", future.Response(), "Polling failure")
8307 return
8308 }
8309 if !done {
8310 ar.Response = future.Response()
8311 err = azure.NewAsyncOpIncompleteError("dtl.VirtualMachinesAddDataDiskFuture")
8312 return
8313 }
8314 ar.Response = future.Response()
8315 return
8316 }
8317
8318
8319
8320 type VirtualMachinesApplyArtifactsFuture struct {
8321 azure.FutureAPI
8322
8323
8324 Result func(VirtualMachinesClient) (autorest.Response, error)
8325 }
8326
8327
8328 func (future *VirtualMachinesApplyArtifactsFuture) UnmarshalJSON(body []byte) error {
8329 var azFuture azure.Future
8330 if err := json.Unmarshal(body, &azFuture); err != nil {
8331 return err
8332 }
8333 future.FutureAPI = &azFuture
8334 future.Result = future.result
8335 return nil
8336 }
8337
8338
8339 func (future *VirtualMachinesApplyArtifactsFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
8340 var done bool
8341 done, err = future.DoneWithContext(context.Background(), client)
8342 if err != nil {
8343 err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesApplyArtifactsFuture", "Result", future.Response(), "Polling failure")
8344 return
8345 }
8346 if !done {
8347 ar.Response = future.Response()
8348 err = azure.NewAsyncOpIncompleteError("dtl.VirtualMachinesApplyArtifactsFuture")
8349 return
8350 }
8351 ar.Response = future.Response()
8352 return
8353 }
8354
8355
8356
8357 type VirtualMachineSchedulesExecuteFuture struct {
8358 azure.FutureAPI
8359
8360
8361 Result func(VirtualMachineSchedulesClient) (autorest.Response, error)
8362 }
8363
8364
8365 func (future *VirtualMachineSchedulesExecuteFuture) UnmarshalJSON(body []byte) error {
8366 var azFuture azure.Future
8367 if err := json.Unmarshal(body, &azFuture); err != nil {
8368 return err
8369 }
8370 future.FutureAPI = &azFuture
8371 future.Result = future.result
8372 return nil
8373 }
8374
8375
8376 func (future *VirtualMachineSchedulesExecuteFuture) result(client VirtualMachineSchedulesClient) (ar autorest.Response, err error) {
8377 var done bool
8378 done, err = future.DoneWithContext(context.Background(), client)
8379 if err != nil {
8380 err = autorest.NewErrorWithError(err, "dtl.VirtualMachineSchedulesExecuteFuture", "Result", future.Response(), "Polling failure")
8381 return
8382 }
8383 if !done {
8384 ar.Response = future.Response()
8385 err = azure.NewAsyncOpIncompleteError("dtl.VirtualMachineSchedulesExecuteFuture")
8386 return
8387 }
8388 ar.Response = future.Response()
8389 return
8390 }
8391
8392
8393
8394 type VirtualMachinesClaimFuture struct {
8395 azure.FutureAPI
8396
8397
8398 Result func(VirtualMachinesClient) (autorest.Response, error)
8399 }
8400
8401
8402 func (future *VirtualMachinesClaimFuture) UnmarshalJSON(body []byte) error {
8403 var azFuture azure.Future
8404 if err := json.Unmarshal(body, &azFuture); err != nil {
8405 return err
8406 }
8407 future.FutureAPI = &azFuture
8408 future.Result = future.result
8409 return nil
8410 }
8411
8412
8413 func (future *VirtualMachinesClaimFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
8414 var done bool
8415 done, err = future.DoneWithContext(context.Background(), client)
8416 if err != nil {
8417 err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesClaimFuture", "Result", future.Response(), "Polling failure")
8418 return
8419 }
8420 if !done {
8421 ar.Response = future.Response()
8422 err = azure.NewAsyncOpIncompleteError("dtl.VirtualMachinesClaimFuture")
8423 return
8424 }
8425 ar.Response = future.Response()
8426 return
8427 }
8428
8429
8430
8431 type VirtualMachinesCreateOrUpdateFuture struct {
8432 azure.FutureAPI
8433
8434
8435 Result func(VirtualMachinesClient) (LabVirtualMachine, error)
8436 }
8437
8438
8439 func (future *VirtualMachinesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
8440 var azFuture azure.Future
8441 if err := json.Unmarshal(body, &azFuture); err != nil {
8442 return err
8443 }
8444 future.FutureAPI = &azFuture
8445 future.Result = future.result
8446 return nil
8447 }
8448
8449
8450 func (future *VirtualMachinesCreateOrUpdateFuture) result(client VirtualMachinesClient) (lvm LabVirtualMachine, err error) {
8451 var done bool
8452 done, err = future.DoneWithContext(context.Background(), client)
8453 if err != nil {
8454 err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
8455 return
8456 }
8457 if !done {
8458 lvm.Response.Response = future.Response()
8459 err = azure.NewAsyncOpIncompleteError("dtl.VirtualMachinesCreateOrUpdateFuture")
8460 return
8461 }
8462 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8463 if lvm.Response.Response, err = future.GetResult(sender); err == nil && lvm.Response.Response.StatusCode != http.StatusNoContent {
8464 lvm, err = client.CreateOrUpdateResponder(lvm.Response.Response)
8465 if err != nil {
8466 err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesCreateOrUpdateFuture", "Result", lvm.Response.Response, "Failure responding to request")
8467 }
8468 }
8469 return
8470 }
8471
8472
8473
8474 type VirtualMachinesDeleteFuture struct {
8475 azure.FutureAPI
8476
8477
8478 Result func(VirtualMachinesClient) (autorest.Response, error)
8479 }
8480
8481
8482 func (future *VirtualMachinesDeleteFuture) UnmarshalJSON(body []byte) error {
8483 var azFuture azure.Future
8484 if err := json.Unmarshal(body, &azFuture); err != nil {
8485 return err
8486 }
8487 future.FutureAPI = &azFuture
8488 future.Result = future.result
8489 return nil
8490 }
8491
8492
8493 func (future *VirtualMachinesDeleteFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
8494 var done bool
8495 done, err = future.DoneWithContext(context.Background(), client)
8496 if err != nil {
8497 err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesDeleteFuture", "Result", future.Response(), "Polling failure")
8498 return
8499 }
8500 if !done {
8501 ar.Response = future.Response()
8502 err = azure.NewAsyncOpIncompleteError("dtl.VirtualMachinesDeleteFuture")
8503 return
8504 }
8505 ar.Response = future.Response()
8506 return
8507 }
8508
8509
8510
8511 type VirtualMachinesDetachDataDiskFuture struct {
8512 azure.FutureAPI
8513
8514
8515 Result func(VirtualMachinesClient) (autorest.Response, error)
8516 }
8517
8518
8519 func (future *VirtualMachinesDetachDataDiskFuture) UnmarshalJSON(body []byte) error {
8520 var azFuture azure.Future
8521 if err := json.Unmarshal(body, &azFuture); err != nil {
8522 return err
8523 }
8524 future.FutureAPI = &azFuture
8525 future.Result = future.result
8526 return nil
8527 }
8528
8529
8530 func (future *VirtualMachinesDetachDataDiskFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
8531 var done bool
8532 done, err = future.DoneWithContext(context.Background(), client)
8533 if err != nil {
8534 err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesDetachDataDiskFuture", "Result", future.Response(), "Polling failure")
8535 return
8536 }
8537 if !done {
8538 ar.Response = future.Response()
8539 err = azure.NewAsyncOpIncompleteError("dtl.VirtualMachinesDetachDataDiskFuture")
8540 return
8541 }
8542 ar.Response = future.Response()
8543 return
8544 }
8545
8546
8547
8548 type VirtualMachinesStartFuture struct {
8549 azure.FutureAPI
8550
8551
8552 Result func(VirtualMachinesClient) (autorest.Response, error)
8553 }
8554
8555
8556 func (future *VirtualMachinesStartFuture) UnmarshalJSON(body []byte) error {
8557 var azFuture azure.Future
8558 if err := json.Unmarshal(body, &azFuture); err != nil {
8559 return err
8560 }
8561 future.FutureAPI = &azFuture
8562 future.Result = future.result
8563 return nil
8564 }
8565
8566
8567 func (future *VirtualMachinesStartFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
8568 var done bool
8569 done, err = future.DoneWithContext(context.Background(), client)
8570 if err != nil {
8571 err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesStartFuture", "Result", future.Response(), "Polling failure")
8572 return
8573 }
8574 if !done {
8575 ar.Response = future.Response()
8576 err = azure.NewAsyncOpIncompleteError("dtl.VirtualMachinesStartFuture")
8577 return
8578 }
8579 ar.Response = future.Response()
8580 return
8581 }
8582
8583
8584
8585 type VirtualMachinesStopFuture struct {
8586 azure.FutureAPI
8587
8588
8589 Result func(VirtualMachinesClient) (autorest.Response, error)
8590 }
8591
8592
8593 func (future *VirtualMachinesStopFuture) UnmarshalJSON(body []byte) error {
8594 var azFuture azure.Future
8595 if err := json.Unmarshal(body, &azFuture); err != nil {
8596 return err
8597 }
8598 future.FutureAPI = &azFuture
8599 future.Result = future.result
8600 return nil
8601 }
8602
8603
8604 func (future *VirtualMachinesStopFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
8605 var done bool
8606 done, err = future.DoneWithContext(context.Background(), client)
8607 if err != nil {
8608 err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesStopFuture", "Result", future.Response(), "Polling failure")
8609 return
8610 }
8611 if !done {
8612 ar.Response = future.Response()
8613 err = azure.NewAsyncOpIncompleteError("dtl.VirtualMachinesStopFuture")
8614 return
8615 }
8616 ar.Response = future.Response()
8617 return
8618 }
8619
8620
8621 type VirtualNetwork struct {
8622 autorest.Response `json:"-"`
8623
8624 *VirtualNetworkProperties `json:"properties,omitempty"`
8625
8626 ID *string `json:"id,omitempty"`
8627
8628 Name *string `json:"name,omitempty"`
8629
8630 Type *string `json:"type,omitempty"`
8631
8632 Location *string `json:"location,omitempty"`
8633
8634 Tags map[string]*string `json:"tags"`
8635 }
8636
8637
8638 func (vn VirtualNetwork) MarshalJSON() ([]byte, error) {
8639 objectMap := make(map[string]interface{})
8640 if vn.VirtualNetworkProperties != nil {
8641 objectMap["properties"] = vn.VirtualNetworkProperties
8642 }
8643 if vn.Location != nil {
8644 objectMap["location"] = vn.Location
8645 }
8646 if vn.Tags != nil {
8647 objectMap["tags"] = vn.Tags
8648 }
8649 return json.Marshal(objectMap)
8650 }
8651
8652
8653 func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error {
8654 var m map[string]*json.RawMessage
8655 err := json.Unmarshal(body, &m)
8656 if err != nil {
8657 return err
8658 }
8659 for k, v := range m {
8660 switch k {
8661 case "properties":
8662 if v != nil {
8663 var virtualNetworkProperties VirtualNetworkProperties
8664 err = json.Unmarshal(*v, &virtualNetworkProperties)
8665 if err != nil {
8666 return err
8667 }
8668 vn.VirtualNetworkProperties = &virtualNetworkProperties
8669 }
8670 case "id":
8671 if v != nil {
8672 var ID string
8673 err = json.Unmarshal(*v, &ID)
8674 if err != nil {
8675 return err
8676 }
8677 vn.ID = &ID
8678 }
8679 case "name":
8680 if v != nil {
8681 var name string
8682 err = json.Unmarshal(*v, &name)
8683 if err != nil {
8684 return err
8685 }
8686 vn.Name = &name
8687 }
8688 case "type":
8689 if v != nil {
8690 var typeVar string
8691 err = json.Unmarshal(*v, &typeVar)
8692 if err != nil {
8693 return err
8694 }
8695 vn.Type = &typeVar
8696 }
8697 case "location":
8698 if v != nil {
8699 var location string
8700 err = json.Unmarshal(*v, &location)
8701 if err != nil {
8702 return err
8703 }
8704 vn.Location = &location
8705 }
8706 case "tags":
8707 if v != nil {
8708 var tags map[string]*string
8709 err = json.Unmarshal(*v, &tags)
8710 if err != nil {
8711 return err
8712 }
8713 vn.Tags = tags
8714 }
8715 }
8716 }
8717
8718 return nil
8719 }
8720
8721
8722 type VirtualNetworkFragment struct {
8723
8724 *VirtualNetworkPropertiesFragment `json:"properties,omitempty"`
8725
8726 ID *string `json:"id,omitempty"`
8727
8728 Name *string `json:"name,omitempty"`
8729
8730 Type *string `json:"type,omitempty"`
8731
8732 Location *string `json:"location,omitempty"`
8733
8734 Tags map[string]*string `json:"tags"`
8735 }
8736
8737
8738 func (vnf VirtualNetworkFragment) MarshalJSON() ([]byte, error) {
8739 objectMap := make(map[string]interface{})
8740 if vnf.VirtualNetworkPropertiesFragment != nil {
8741 objectMap["properties"] = vnf.VirtualNetworkPropertiesFragment
8742 }
8743 if vnf.Location != nil {
8744 objectMap["location"] = vnf.Location
8745 }
8746 if vnf.Tags != nil {
8747 objectMap["tags"] = vnf.Tags
8748 }
8749 return json.Marshal(objectMap)
8750 }
8751
8752
8753 func (vnf *VirtualNetworkFragment) UnmarshalJSON(body []byte) error {
8754 var m map[string]*json.RawMessage
8755 err := json.Unmarshal(body, &m)
8756 if err != nil {
8757 return err
8758 }
8759 for k, v := range m {
8760 switch k {
8761 case "properties":
8762 if v != nil {
8763 var virtualNetworkPropertiesFragment VirtualNetworkPropertiesFragment
8764 err = json.Unmarshal(*v, &virtualNetworkPropertiesFragment)
8765 if err != nil {
8766 return err
8767 }
8768 vnf.VirtualNetworkPropertiesFragment = &virtualNetworkPropertiesFragment
8769 }
8770 case "id":
8771 if v != nil {
8772 var ID string
8773 err = json.Unmarshal(*v, &ID)
8774 if err != nil {
8775 return err
8776 }
8777 vnf.ID = &ID
8778 }
8779 case "name":
8780 if v != nil {
8781 var name string
8782 err = json.Unmarshal(*v, &name)
8783 if err != nil {
8784 return err
8785 }
8786 vnf.Name = &name
8787 }
8788 case "type":
8789 if v != nil {
8790 var typeVar string
8791 err = json.Unmarshal(*v, &typeVar)
8792 if err != nil {
8793 return err
8794 }
8795 vnf.Type = &typeVar
8796 }
8797 case "location":
8798 if v != nil {
8799 var location string
8800 err = json.Unmarshal(*v, &location)
8801 if err != nil {
8802 return err
8803 }
8804 vnf.Location = &location
8805 }
8806 case "tags":
8807 if v != nil {
8808 var tags map[string]*string
8809 err = json.Unmarshal(*v, &tags)
8810 if err != nil {
8811 return err
8812 }
8813 vnf.Tags = tags
8814 }
8815 }
8816 }
8817
8818 return nil
8819 }
8820
8821
8822 type VirtualNetworkProperties struct {
8823
8824 AllowedSubnets *[]Subnet `json:"allowedSubnets,omitempty"`
8825
8826 Description *string `json:"description,omitempty"`
8827
8828 ExternalProviderResourceID *string `json:"externalProviderResourceId,omitempty"`
8829
8830 ExternalSubnets *[]ExternalSubnet `json:"externalSubnets,omitempty"`
8831
8832 SubnetOverrides *[]SubnetOverride `json:"subnetOverrides,omitempty"`
8833
8834 CreatedDate *date.Time `json:"createdDate,omitempty"`
8835
8836 ProvisioningState *string `json:"provisioningState,omitempty"`
8837
8838 UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
8839 }
8840
8841
8842 func (vnp VirtualNetworkProperties) MarshalJSON() ([]byte, error) {
8843 objectMap := make(map[string]interface{})
8844 if vnp.AllowedSubnets != nil {
8845 objectMap["allowedSubnets"] = vnp.AllowedSubnets
8846 }
8847 if vnp.Description != nil {
8848 objectMap["description"] = vnp.Description
8849 }
8850 if vnp.ExternalProviderResourceID != nil {
8851 objectMap["externalProviderResourceId"] = vnp.ExternalProviderResourceID
8852 }
8853 if vnp.ExternalSubnets != nil {
8854 objectMap["externalSubnets"] = vnp.ExternalSubnets
8855 }
8856 if vnp.SubnetOverrides != nil {
8857 objectMap["subnetOverrides"] = vnp.SubnetOverrides
8858 }
8859 if vnp.ProvisioningState != nil {
8860 objectMap["provisioningState"] = vnp.ProvisioningState
8861 }
8862 if vnp.UniqueIdentifier != nil {
8863 objectMap["uniqueIdentifier"] = vnp.UniqueIdentifier
8864 }
8865 return json.Marshal(objectMap)
8866 }
8867
8868
8869 type VirtualNetworkPropertiesFragment struct {
8870
8871 AllowedSubnets *[]SubnetFragment `json:"allowedSubnets,omitempty"`
8872
8873 Description *string `json:"description,omitempty"`
8874
8875 ExternalProviderResourceID *string `json:"externalProviderResourceId,omitempty"`
8876
8877 ExternalSubnets *[]ExternalSubnetFragment `json:"externalSubnets,omitempty"`
8878
8879 SubnetOverrides *[]SubnetOverrideFragment `json:"subnetOverrides,omitempty"`
8880
8881 ProvisioningState *string `json:"provisioningState,omitempty"`
8882
8883 UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
8884 }
8885
8886
8887
8888 type VirtualNetworksCreateOrUpdateFuture struct {
8889 azure.FutureAPI
8890
8891
8892 Result func(VirtualNetworksClient) (VirtualNetwork, error)
8893 }
8894
8895
8896 func (future *VirtualNetworksCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
8897 var azFuture azure.Future
8898 if err := json.Unmarshal(body, &azFuture); err != nil {
8899 return err
8900 }
8901 future.FutureAPI = &azFuture
8902 future.Result = future.result
8903 return nil
8904 }
8905
8906
8907 func (future *VirtualNetworksCreateOrUpdateFuture) result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
8908 var done bool
8909 done, err = future.DoneWithContext(context.Background(), client)
8910 if err != nil {
8911 err = autorest.NewErrorWithError(err, "dtl.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
8912 return
8913 }
8914 if !done {
8915 vn.Response.Response = future.Response()
8916 err = azure.NewAsyncOpIncompleteError("dtl.VirtualNetworksCreateOrUpdateFuture")
8917 return
8918 }
8919 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8920 if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
8921 vn, err = client.CreateOrUpdateResponder(vn.Response.Response)
8922 if err != nil {
8923 err = autorest.NewErrorWithError(err, "dtl.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request")
8924 }
8925 }
8926 return
8927 }
8928
8929
8930
8931 type VirtualNetworksDeleteFuture struct {
8932 azure.FutureAPI
8933
8934
8935 Result func(VirtualNetworksClient) (autorest.Response, error)
8936 }
8937
8938
8939 func (future *VirtualNetworksDeleteFuture) UnmarshalJSON(body []byte) error {
8940 var azFuture azure.Future
8941 if err := json.Unmarshal(body, &azFuture); err != nil {
8942 return err
8943 }
8944 future.FutureAPI = &azFuture
8945 future.Result = future.result
8946 return nil
8947 }
8948
8949
8950 func (future *VirtualNetworksDeleteFuture) result(client VirtualNetworksClient) (ar autorest.Response, err error) {
8951 var done bool
8952 done, err = future.DoneWithContext(context.Background(), client)
8953 if err != nil {
8954 err = autorest.NewErrorWithError(err, "dtl.VirtualNetworksDeleteFuture", "Result", future.Response(), "Polling failure")
8955 return
8956 }
8957 if !done {
8958 ar.Response = future.Response()
8959 err = azure.NewAsyncOpIncompleteError("dtl.VirtualNetworksDeleteFuture")
8960 return
8961 }
8962 ar.Response = future.Response()
8963 return
8964 }
8965
8966
8967 type WeekDetails struct {
8968
8969 Weekdays *[]string `json:"weekdays,omitempty"`
8970
8971 Time *string `json:"time,omitempty"`
8972 }
8973
8974
8975 type WeekDetailsFragment struct {
8976
8977 Weekdays *[]string `json:"weekdays,omitempty"`
8978
8979 Time *string `json:"time,omitempty"`
8980 }
8981
8982
8983 type WindowsOsInfo struct {
8984
8985 WindowsOsState WindowsOsState `json:"windowsOsState,omitempty"`
8986 }
8987
View as plain text