1 package siterecovery
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/recoveryservices/mgmt/2016-08-10/siterecovery"
22
23
24 type A2AApplyRecoveryPointInput struct {
25
26 InstanceType InstanceTypeBasicApplyRecoveryPointProviderSpecificInput `json:"instanceType,omitempty"`
27 }
28
29
30 func (aarpi A2AApplyRecoveryPointInput) MarshalJSON() ([]byte, error) {
31 aarpi.InstanceType = InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeA2A
32 objectMap := make(map[string]interface{})
33 if aarpi.InstanceType != "" {
34 objectMap["instanceType"] = aarpi.InstanceType
35 }
36 return json.Marshal(objectMap)
37 }
38
39
40 func (aarpi A2AApplyRecoveryPointInput) AsHyperVReplicaAzureApplyRecoveryPointInput() (*HyperVReplicaAzureApplyRecoveryPointInput, bool) {
41 return nil, false
42 }
43
44
45 func (aarpi A2AApplyRecoveryPointInput) AsInMageAzureV2ApplyRecoveryPointInput() (*InMageAzureV2ApplyRecoveryPointInput, bool) {
46 return nil, false
47 }
48
49
50 func (aarpi A2AApplyRecoveryPointInput) AsA2AApplyRecoveryPointInput() (*A2AApplyRecoveryPointInput, bool) {
51 return &aarpi, true
52 }
53
54
55 func (aarpi A2AApplyRecoveryPointInput) AsApplyRecoveryPointProviderSpecificInput() (*ApplyRecoveryPointProviderSpecificInput, bool) {
56 return nil, false
57 }
58
59
60 func (aarpi A2AApplyRecoveryPointInput) AsBasicApplyRecoveryPointProviderSpecificInput() (BasicApplyRecoveryPointProviderSpecificInput, bool) {
61 return &aarpi, true
62 }
63
64
65 type A2AContainerCreationInput struct {
66
67 InstanceType InstanceTypeBasicReplicationProviderSpecificContainerCreationInput `json:"instanceType,omitempty"`
68 }
69
70
71 func (acci A2AContainerCreationInput) MarshalJSON() ([]byte, error) {
72 acci.InstanceType = InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeA2A
73 objectMap := make(map[string]interface{})
74 if acci.InstanceType != "" {
75 objectMap["instanceType"] = acci.InstanceType
76 }
77 return json.Marshal(objectMap)
78 }
79
80
81 func (acci A2AContainerCreationInput) AsA2AContainerCreationInput() (*A2AContainerCreationInput, bool) {
82 return &acci, true
83 }
84
85
86 func (acci A2AContainerCreationInput) AsReplicationProviderSpecificContainerCreationInput() (*ReplicationProviderSpecificContainerCreationInput, bool) {
87 return nil, false
88 }
89
90
91 func (acci A2AContainerCreationInput) AsBasicReplicationProviderSpecificContainerCreationInput() (BasicReplicationProviderSpecificContainerCreationInput, bool) {
92 return &acci, true
93 }
94
95
96 type A2AEnableProtectionInput struct {
97
98 FabricObjectID *string `json:"fabricObjectId,omitempty"`
99
100 RecoveryContainerID *string `json:"recoveryContainerId,omitempty"`
101
102 RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"`
103
104 RecoveryCloudServiceID *string `json:"recoveryCloudServiceId,omitempty"`
105
106 RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"`
107
108 VMDisks *[]A2AVMDiskInputDetails `json:"vmDisks,omitempty"`
109
110 VMManagedDisks *[]A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"`
111
112 InstanceType InstanceTypeBasicEnableProtectionProviderSpecificInput `json:"instanceType,omitempty"`
113 }
114
115
116 func (aepi A2AEnableProtectionInput) MarshalJSON() ([]byte, error) {
117 aepi.InstanceType = InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeA2A
118 objectMap := make(map[string]interface{})
119 if aepi.FabricObjectID != nil {
120 objectMap["fabricObjectId"] = aepi.FabricObjectID
121 }
122 if aepi.RecoveryContainerID != nil {
123 objectMap["recoveryContainerId"] = aepi.RecoveryContainerID
124 }
125 if aepi.RecoveryResourceGroupID != nil {
126 objectMap["recoveryResourceGroupId"] = aepi.RecoveryResourceGroupID
127 }
128 if aepi.RecoveryCloudServiceID != nil {
129 objectMap["recoveryCloudServiceId"] = aepi.RecoveryCloudServiceID
130 }
131 if aepi.RecoveryAvailabilitySetID != nil {
132 objectMap["recoveryAvailabilitySetId"] = aepi.RecoveryAvailabilitySetID
133 }
134 if aepi.VMDisks != nil {
135 objectMap["vmDisks"] = aepi.VMDisks
136 }
137 if aepi.VMManagedDisks != nil {
138 objectMap["vmManagedDisks"] = aepi.VMManagedDisks
139 }
140 if aepi.InstanceType != "" {
141 objectMap["instanceType"] = aepi.InstanceType
142 }
143 return json.Marshal(objectMap)
144 }
145
146
147 func (aepi A2AEnableProtectionInput) AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool) {
148 return nil, false
149 }
150
151
152 func (aepi A2AEnableProtectionInput) AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool) {
153 return nil, false
154 }
155
156
157 func (aepi A2AEnableProtectionInput) AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool) {
158 return nil, false
159 }
160
161
162 func (aepi A2AEnableProtectionInput) AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool) {
163 return nil, false
164 }
165
166
167 func (aepi A2AEnableProtectionInput) AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool) {
168 return &aepi, true
169 }
170
171
172 func (aepi A2AEnableProtectionInput) AsEnableProtectionProviderSpecificInput() (*EnableProtectionProviderSpecificInput, bool) {
173 return nil, false
174 }
175
176
177 func (aepi A2AEnableProtectionInput) AsBasicEnableProtectionProviderSpecificInput() (BasicEnableProtectionProviderSpecificInput, bool) {
178 return &aepi, true
179 }
180
181
182 type A2AEventDetails struct {
183
184 ProtectedItemName *string `json:"protectedItemName,omitempty"`
185
186 FabricObjectID *string `json:"fabricObjectId,omitempty"`
187
188 FabricName *string `json:"fabricName,omitempty"`
189
190 FabricLocation *string `json:"fabricLocation,omitempty"`
191
192 RemoteFabricName *string `json:"remoteFabricName,omitempty"`
193
194 RemoteFabricLocation *string `json:"remoteFabricLocation,omitempty"`
195
196 InstanceType InstanceType `json:"instanceType,omitempty"`
197 }
198
199
200 func (aed A2AEventDetails) MarshalJSON() ([]byte, error) {
201 aed.InstanceType = InstanceTypeA2A
202 objectMap := make(map[string]interface{})
203 if aed.ProtectedItemName != nil {
204 objectMap["protectedItemName"] = aed.ProtectedItemName
205 }
206 if aed.FabricObjectID != nil {
207 objectMap["fabricObjectId"] = aed.FabricObjectID
208 }
209 if aed.FabricName != nil {
210 objectMap["fabricName"] = aed.FabricName
211 }
212 if aed.FabricLocation != nil {
213 objectMap["fabricLocation"] = aed.FabricLocation
214 }
215 if aed.RemoteFabricName != nil {
216 objectMap["remoteFabricName"] = aed.RemoteFabricName
217 }
218 if aed.RemoteFabricLocation != nil {
219 objectMap["remoteFabricLocation"] = aed.RemoteFabricLocation
220 }
221 if aed.InstanceType != "" {
222 objectMap["instanceType"] = aed.InstanceType
223 }
224 return json.Marshal(objectMap)
225 }
226
227
228 func (aed A2AEventDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) {
229 return nil, false
230 }
231
232
233 func (aed A2AEventDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) {
234 return nil, false
235 }
236
237
238 func (aed A2AEventDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) {
239 return nil, false
240 }
241
242
243 func (aed A2AEventDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) {
244 return nil, false
245 }
246
247
248 func (aed A2AEventDetails) AsA2AEventDetails() (*A2AEventDetails, bool) {
249 return &aed, true
250 }
251
252
253 func (aed A2AEventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) {
254 return nil, false
255 }
256
257
258 func (aed A2AEventDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) {
259 return nil, false
260 }
261
262
263 func (aed A2AEventDetails) AsBasicEventProviderSpecificDetails() (BasicEventProviderSpecificDetails, bool) {
264 return &aed, true
265 }
266
267
268 type A2AFailoverProviderInput struct {
269
270 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
271
272 CloudServiceCreationOption *string `json:"cloudServiceCreationOption,omitempty"`
273
274 InstanceType InstanceTypeBasicProviderSpecificFailoverInput `json:"instanceType,omitempty"`
275 }
276
277
278 func (afpi A2AFailoverProviderInput) MarshalJSON() ([]byte, error) {
279 afpi.InstanceType = InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeA2A
280 objectMap := make(map[string]interface{})
281 if afpi.RecoveryPointID != nil {
282 objectMap["recoveryPointId"] = afpi.RecoveryPointID
283 }
284 if afpi.CloudServiceCreationOption != nil {
285 objectMap["cloudServiceCreationOption"] = afpi.CloudServiceCreationOption
286 }
287 if afpi.InstanceType != "" {
288 objectMap["instanceType"] = afpi.InstanceType
289 }
290 return json.Marshal(objectMap)
291 }
292
293
294 func (afpi A2AFailoverProviderInput) AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool) {
295 return nil, false
296 }
297
298
299 func (afpi A2AFailoverProviderInput) AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool) {
300 return nil, false
301 }
302
303
304 func (afpi A2AFailoverProviderInput) AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool) {
305 return nil, false
306 }
307
308
309 func (afpi A2AFailoverProviderInput) AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool) {
310 return nil, false
311 }
312
313
314 func (afpi A2AFailoverProviderInput) AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool) {
315 return &afpi, true
316 }
317
318
319 func (afpi A2AFailoverProviderInput) AsProviderSpecificFailoverInput() (*ProviderSpecificFailoverInput, bool) {
320 return nil, false
321 }
322
323
324 func (afpi A2AFailoverProviderInput) AsBasicProviderSpecificFailoverInput() (BasicProviderSpecificFailoverInput, bool) {
325 return &afpi, true
326 }
327
328
329 type A2APolicyCreationInput struct {
330
331 RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"`
332
333 CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"`
334
335 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"`
336
337 MultiVMSyncStatus SetMultiVMSyncStatus `json:"multiVmSyncStatus,omitempty"`
338
339 InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"`
340 }
341
342
343 func (apci A2APolicyCreationInput) MarshalJSON() ([]byte, error) {
344 apci.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeA2A
345 objectMap := make(map[string]interface{})
346 if apci.RecoveryPointHistory != nil {
347 objectMap["recoveryPointHistory"] = apci.RecoveryPointHistory
348 }
349 if apci.CrashConsistentFrequencyInMinutes != nil {
350 objectMap["crashConsistentFrequencyInMinutes"] = apci.CrashConsistentFrequencyInMinutes
351 }
352 if apci.AppConsistentFrequencyInMinutes != nil {
353 objectMap["appConsistentFrequencyInMinutes"] = apci.AppConsistentFrequencyInMinutes
354 }
355 if apci.MultiVMSyncStatus != "" {
356 objectMap["multiVmSyncStatus"] = apci.MultiVMSyncStatus
357 }
358 if apci.InstanceType != "" {
359 objectMap["instanceType"] = apci.InstanceType
360 }
361 return json.Marshal(objectMap)
362 }
363
364
365 func (apci A2APolicyCreationInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) {
366 return nil, false
367 }
368
369
370 func (apci A2APolicyCreationInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) {
371 return nil, false
372 }
373
374
375 func (apci A2APolicyCreationInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) {
376 return nil, false
377 }
378
379
380 func (apci A2APolicyCreationInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) {
381 return nil, false
382 }
383
384
385 func (apci A2APolicyCreationInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) {
386 return nil, false
387 }
388
389
390 func (apci A2APolicyCreationInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) {
391 return &apci, true
392 }
393
394
395 func (apci A2APolicyCreationInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) {
396 return nil, false
397 }
398
399
400 func (apci A2APolicyCreationInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) {
401 return nil, false
402 }
403
404
405 func (apci A2APolicyCreationInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) {
406 return &apci, true
407 }
408
409
410 type A2APolicyDetails struct {
411
412 RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"`
413
414 RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"`
415
416 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"`
417
418 MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"`
419
420 CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"`
421
422 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"`
423 }
424
425
426 func (apd A2APolicyDetails) MarshalJSON() ([]byte, error) {
427 apd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A
428 objectMap := make(map[string]interface{})
429 if apd.RecoveryPointThresholdInMinutes != nil {
430 objectMap["recoveryPointThresholdInMinutes"] = apd.RecoveryPointThresholdInMinutes
431 }
432 if apd.RecoveryPointHistory != nil {
433 objectMap["recoveryPointHistory"] = apd.RecoveryPointHistory
434 }
435 if apd.AppConsistentFrequencyInMinutes != nil {
436 objectMap["appConsistentFrequencyInMinutes"] = apd.AppConsistentFrequencyInMinutes
437 }
438 if apd.MultiVMSyncStatus != nil {
439 objectMap["multiVmSyncStatus"] = apd.MultiVMSyncStatus
440 }
441 if apd.CrashConsistentFrequencyInMinutes != nil {
442 objectMap["crashConsistentFrequencyInMinutes"] = apd.CrashConsistentFrequencyInMinutes
443 }
444 if apd.InstanceType != "" {
445 objectMap["instanceType"] = apd.InstanceType
446 }
447 return json.Marshal(objectMap)
448 }
449
450
451 func (apd A2APolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) {
452 return nil, false
453 }
454
455
456 func (apd A2APolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) {
457 return nil, false
458 }
459
460
461 func (apd A2APolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) {
462 return nil, false
463 }
464
465
466 func (apd A2APolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) {
467 return nil, false
468 }
469
470
471 func (apd A2APolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) {
472 return nil, false
473 }
474
475
476 func (apd A2APolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) {
477 return nil, false
478 }
479
480
481 func (apd A2APolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) {
482 return nil, false
483 }
484
485
486 func (apd A2APolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) {
487 return &apd, true
488 }
489
490
491 func (apd A2APolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) {
492 return nil, false
493 }
494
495
496 func (apd A2APolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) {
497 return nil, false
498 }
499
500
501 func (apd A2APolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) {
502 return nil, false
503 }
504
505
506 func (apd A2APolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) {
507 return &apd, true
508 }
509
510
511 type A2AProtectedDiskDetails struct {
512
513 DiskURI *string `json:"diskUri,omitempty"`
514
515 RecoveryAzureStorageAccountID *string `json:"recoveryAzureStorageAccountId,omitempty"`
516
517 PrimaryDiskAzureStorageAccountID *string `json:"primaryDiskAzureStorageAccountId,omitempty"`
518
519 RecoveryDiskURI *string `json:"recoveryDiskUri,omitempty"`
520
521 DiskName *string `json:"diskName,omitempty"`
522
523 DiskCapacityInBytes *int64 `json:"diskCapacityInBytes,omitempty"`
524
525 PrimaryStagingAzureStorageAccountID *string `json:"primaryStagingAzureStorageAccountId,omitempty"`
526
527 DiskType *string `json:"diskType,omitempty"`
528
529 ResyncRequired *bool `json:"resyncRequired,omitempty"`
530
531 MonitoringPercentageCompletion *int32 `json:"monitoringPercentageCompletion,omitempty"`
532
533 MonitoringJobType *string `json:"monitoringJobType,omitempty"`
534
535 DataPendingInStagingStorageAccountInMB *float64 `json:"dataPendingInStagingStorageAccountInMB,omitempty"`
536
537 DataPendingAtSourceAgentInMB *float64 `json:"dataPendingAtSourceAgentInMB,omitempty"`
538 }
539
540
541 type A2AProtectedManagedDiskDetails struct {
542
543 DiskID *string `json:"diskId,omitempty"`
544
545 RecoveryAzureResourceGroupID *string `json:"recoveryAzureResourceGroupId,omitempty"`
546
547 RecoveryDiskID *string `json:"recoveryDiskId,omitempty"`
548
549 DiskName *string `json:"diskName,omitempty"`
550
551 DiskCapacityInBytes *int64 `json:"diskCapacityInBytes,omitempty"`
552
553 PrimaryStagingAzureStorageAccountID *string `json:"primaryStagingAzureStorageAccountId,omitempty"`
554
555 DiskType *string `json:"diskType,omitempty"`
556
557 ResyncRequired *bool `json:"resyncRequired,omitempty"`
558
559 MonitoringPercentageCompletion *int32 `json:"monitoringPercentageCompletion,omitempty"`
560
561 MonitoringJobType *string `json:"monitoringJobType,omitempty"`
562
563 DataPendingInStagingStorageAccountInMB *float64 `json:"dataPendingInStagingStorageAccountInMB,omitempty"`
564
565 DataPendingAtSourceAgentInMB *float64 `json:"dataPendingAtSourceAgentInMB,omitempty"`
566 }
567
568
569 type A2AReplicationDetails struct {
570
571 FabricObjectID *string `json:"fabricObjectId,omitempty"`
572
573 MultiVMGroupID *string `json:"multiVmGroupId,omitempty"`
574
575 MultiVMGroupName *string `json:"multiVmGroupName,omitempty"`
576
577 ManagementID *string `json:"managementId,omitempty"`
578
579 ProtectedDisks *[]A2AProtectedDiskDetails `json:"protectedDisks,omitempty"`
580
581 ProtectedManagedDisks *[]A2AProtectedManagedDiskDetails `json:"protectedManagedDisks,omitempty"`
582
583 PrimaryFabricLocation *string `json:"primaryFabricLocation,omitempty"`
584
585 RecoveryFabricLocation *string `json:"recoveryFabricLocation,omitempty"`
586
587 OsType *string `json:"osType,omitempty"`
588
589 RecoveryAzureVMSize *string `json:"recoveryAzureVMSize,omitempty"`
590
591 RecoveryAzureVMName *string `json:"recoveryAzureVMName,omitempty"`
592
593 RecoveryAzureResourceGroupID *string `json:"recoveryAzureResourceGroupId,omitempty"`
594
595 RecoveryCloudService *string `json:"recoveryCloudService,omitempty"`
596
597 RecoveryAvailabilitySet *string `json:"recoveryAvailabilitySet,omitempty"`
598
599 SelectedRecoveryAzureNetworkID *string `json:"selectedRecoveryAzureNetworkId,omitempty"`
600
601 VMNics *[]VMNicDetails `json:"vmNics,omitempty"`
602
603 VMSyncedConfigDetails *AzureToAzureVMSyncedConfigDetails `json:"vmSyncedConfigDetails,omitempty"`
604
605 MonitoringPercentageCompletion *int32 `json:"monitoringPercentageCompletion,omitempty"`
606
607 MonitoringJobType *string `json:"monitoringJobType,omitempty"`
608
609 LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"`
610
611 AgentVersion *string `json:"agentVersion,omitempty"`
612
613 IsReplicationAgentUpdateRequired *bool `json:"isReplicationAgentUpdateRequired,omitempty"`
614
615 RecoveryFabricObjectID *string `json:"recoveryFabricObjectId,omitempty"`
616
617 VMProtectionState *string `json:"vmProtectionState,omitempty"`
618
619 VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"`
620
621 LifecycleID *string `json:"lifecycleId,omitempty"`
622
623 TestFailoverRecoveryFabricObjectID *string `json:"testFailoverRecoveryFabricObjectId,omitempty"`
624
625 RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"`
626
627 LastRpoCalculatedTime *date.Time `json:"lastRpoCalculatedTime,omitempty"`
628
629 InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"`
630 }
631
632
633 func (ard A2AReplicationDetails) MarshalJSON() ([]byte, error) {
634 ard.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeA2A
635 objectMap := make(map[string]interface{})
636 if ard.FabricObjectID != nil {
637 objectMap["fabricObjectId"] = ard.FabricObjectID
638 }
639 if ard.MultiVMGroupID != nil {
640 objectMap["multiVmGroupId"] = ard.MultiVMGroupID
641 }
642 if ard.MultiVMGroupName != nil {
643 objectMap["multiVmGroupName"] = ard.MultiVMGroupName
644 }
645 if ard.ManagementID != nil {
646 objectMap["managementId"] = ard.ManagementID
647 }
648 if ard.ProtectedDisks != nil {
649 objectMap["protectedDisks"] = ard.ProtectedDisks
650 }
651 if ard.ProtectedManagedDisks != nil {
652 objectMap["protectedManagedDisks"] = ard.ProtectedManagedDisks
653 }
654 if ard.PrimaryFabricLocation != nil {
655 objectMap["primaryFabricLocation"] = ard.PrimaryFabricLocation
656 }
657 if ard.RecoveryFabricLocation != nil {
658 objectMap["recoveryFabricLocation"] = ard.RecoveryFabricLocation
659 }
660 if ard.OsType != nil {
661 objectMap["osType"] = ard.OsType
662 }
663 if ard.RecoveryAzureVMSize != nil {
664 objectMap["recoveryAzureVMSize"] = ard.RecoveryAzureVMSize
665 }
666 if ard.RecoveryAzureVMName != nil {
667 objectMap["recoveryAzureVMName"] = ard.RecoveryAzureVMName
668 }
669 if ard.RecoveryAzureResourceGroupID != nil {
670 objectMap["recoveryAzureResourceGroupId"] = ard.RecoveryAzureResourceGroupID
671 }
672 if ard.RecoveryCloudService != nil {
673 objectMap["recoveryCloudService"] = ard.RecoveryCloudService
674 }
675 if ard.RecoveryAvailabilitySet != nil {
676 objectMap["recoveryAvailabilitySet"] = ard.RecoveryAvailabilitySet
677 }
678 if ard.SelectedRecoveryAzureNetworkID != nil {
679 objectMap["selectedRecoveryAzureNetworkId"] = ard.SelectedRecoveryAzureNetworkID
680 }
681 if ard.VMNics != nil {
682 objectMap["vmNics"] = ard.VMNics
683 }
684 if ard.VMSyncedConfigDetails != nil {
685 objectMap["vmSyncedConfigDetails"] = ard.VMSyncedConfigDetails
686 }
687 if ard.MonitoringPercentageCompletion != nil {
688 objectMap["monitoringPercentageCompletion"] = ard.MonitoringPercentageCompletion
689 }
690 if ard.MonitoringJobType != nil {
691 objectMap["monitoringJobType"] = ard.MonitoringJobType
692 }
693 if ard.LastHeartbeat != nil {
694 objectMap["lastHeartbeat"] = ard.LastHeartbeat
695 }
696 if ard.AgentVersion != nil {
697 objectMap["agentVersion"] = ard.AgentVersion
698 }
699 if ard.IsReplicationAgentUpdateRequired != nil {
700 objectMap["isReplicationAgentUpdateRequired"] = ard.IsReplicationAgentUpdateRequired
701 }
702 if ard.RecoveryFabricObjectID != nil {
703 objectMap["recoveryFabricObjectId"] = ard.RecoveryFabricObjectID
704 }
705 if ard.VMProtectionState != nil {
706 objectMap["vmProtectionState"] = ard.VMProtectionState
707 }
708 if ard.VMProtectionStateDescription != nil {
709 objectMap["vmProtectionStateDescription"] = ard.VMProtectionStateDescription
710 }
711 if ard.LifecycleID != nil {
712 objectMap["lifecycleId"] = ard.LifecycleID
713 }
714 if ard.TestFailoverRecoveryFabricObjectID != nil {
715 objectMap["testFailoverRecoveryFabricObjectId"] = ard.TestFailoverRecoveryFabricObjectID
716 }
717 if ard.RpoInSeconds != nil {
718 objectMap["rpoInSeconds"] = ard.RpoInSeconds
719 }
720 if ard.LastRpoCalculatedTime != nil {
721 objectMap["lastRpoCalculatedTime"] = ard.LastRpoCalculatedTime
722 }
723 if ard.InstanceType != "" {
724 objectMap["instanceType"] = ard.InstanceType
725 }
726 return json.Marshal(objectMap)
727 }
728
729
730 func (ard A2AReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) {
731 return nil, false
732 }
733
734
735 func (ard A2AReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) {
736 return nil, false
737 }
738
739
740 func (ard A2AReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) {
741 return nil, false
742 }
743
744
745 func (ard A2AReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) {
746 return nil, false
747 }
748
749
750 func (ard A2AReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) {
751 return nil, false
752 }
753
754
755 func (ard A2AReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) {
756 return nil, false
757 }
758
759
760 func (ard A2AReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) {
761 return &ard, true
762 }
763
764
765 func (ard A2AReplicationDetails) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) {
766 return nil, false
767 }
768
769
770 func (ard A2AReplicationDetails) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) {
771 return &ard, true
772 }
773
774
775 type A2AReprotectInput struct {
776
777 RecoveryContainerID *string `json:"recoveryContainerId,omitempty"`
778
779 VMDisks *[]A2AVMDiskInputDetails `json:"vmDisks,omitempty"`
780
781 RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"`
782
783 RecoveryCloudServiceID *string `json:"recoveryCloudServiceId,omitempty"`
784
785 RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"`
786
787 PolicyID *string `json:"policyId,omitempty"`
788
789 InstanceType InstanceTypeBasicReverseReplicationProviderSpecificInput `json:"instanceType,omitempty"`
790 }
791
792
793 func (ari A2AReprotectInput) MarshalJSON() ([]byte, error) {
794 ari.InstanceType = InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeA2A
795 objectMap := make(map[string]interface{})
796 if ari.RecoveryContainerID != nil {
797 objectMap["recoveryContainerId"] = ari.RecoveryContainerID
798 }
799 if ari.VMDisks != nil {
800 objectMap["vmDisks"] = ari.VMDisks
801 }
802 if ari.RecoveryResourceGroupID != nil {
803 objectMap["recoveryResourceGroupId"] = ari.RecoveryResourceGroupID
804 }
805 if ari.RecoveryCloudServiceID != nil {
806 objectMap["recoveryCloudServiceId"] = ari.RecoveryCloudServiceID
807 }
808 if ari.RecoveryAvailabilitySetID != nil {
809 objectMap["recoveryAvailabilitySetId"] = ari.RecoveryAvailabilitySetID
810 }
811 if ari.PolicyID != nil {
812 objectMap["policyId"] = ari.PolicyID
813 }
814 if ari.InstanceType != "" {
815 objectMap["instanceType"] = ari.InstanceType
816 }
817 return json.Marshal(objectMap)
818 }
819
820
821 func (ari A2AReprotectInput) AsHyperVReplicaAzureReprotectInput() (*HyperVReplicaAzureReprotectInput, bool) {
822 return nil, false
823 }
824
825
826 func (ari A2AReprotectInput) AsInMageAzureV2ReprotectInput() (*InMageAzureV2ReprotectInput, bool) {
827 return nil, false
828 }
829
830
831 func (ari A2AReprotectInput) AsInMageReprotectInput() (*InMageReprotectInput, bool) {
832 return nil, false
833 }
834
835
836 func (ari A2AReprotectInput) AsA2AReprotectInput() (*A2AReprotectInput, bool) {
837 return &ari, true
838 }
839
840
841 func (ari A2AReprotectInput) AsReverseReplicationProviderSpecificInput() (*ReverseReplicationProviderSpecificInput, bool) {
842 return nil, false
843 }
844
845
846 func (ari A2AReprotectInput) AsBasicReverseReplicationProviderSpecificInput() (BasicReverseReplicationProviderSpecificInput, bool) {
847 return &ari, true
848 }
849
850
851 type A2ASwitchProtectionInput struct {
852
853 RecoveryContainerID *string `json:"recoveryContainerId,omitempty"`
854
855 VMDisks *[]A2AVMDiskInputDetails `json:"vmDisks,omitempty"`
856
857 VMManagedDisks *[]A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"`
858
859 RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"`
860
861 RecoveryCloudServiceID *string `json:"recoveryCloudServiceId,omitempty"`
862
863 RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"`
864
865 PolicyID *string `json:"policyId,omitempty"`
866
867 InstanceType InstanceTypeBasicSwitchProtectionProviderSpecificInput `json:"instanceType,omitempty"`
868 }
869
870
871 func (aspi A2ASwitchProtectionInput) MarshalJSON() ([]byte, error) {
872 aspi.InstanceType = InstanceTypeBasicSwitchProtectionProviderSpecificInputInstanceTypeA2A
873 objectMap := make(map[string]interface{})
874 if aspi.RecoveryContainerID != nil {
875 objectMap["recoveryContainerId"] = aspi.RecoveryContainerID
876 }
877 if aspi.VMDisks != nil {
878 objectMap["vmDisks"] = aspi.VMDisks
879 }
880 if aspi.VMManagedDisks != nil {
881 objectMap["vmManagedDisks"] = aspi.VMManagedDisks
882 }
883 if aspi.RecoveryResourceGroupID != nil {
884 objectMap["recoveryResourceGroupId"] = aspi.RecoveryResourceGroupID
885 }
886 if aspi.RecoveryCloudServiceID != nil {
887 objectMap["recoveryCloudServiceId"] = aspi.RecoveryCloudServiceID
888 }
889 if aspi.RecoveryAvailabilitySetID != nil {
890 objectMap["recoveryAvailabilitySetId"] = aspi.RecoveryAvailabilitySetID
891 }
892 if aspi.PolicyID != nil {
893 objectMap["policyId"] = aspi.PolicyID
894 }
895 if aspi.InstanceType != "" {
896 objectMap["instanceType"] = aspi.InstanceType
897 }
898 return json.Marshal(objectMap)
899 }
900
901
902 func (aspi A2ASwitchProtectionInput) AsA2ASwitchProtectionInput() (*A2ASwitchProtectionInput, bool) {
903 return &aspi, true
904 }
905
906
907 func (aspi A2ASwitchProtectionInput) AsSwitchProtectionProviderSpecificInput() (*SwitchProtectionProviderSpecificInput, bool) {
908 return nil, false
909 }
910
911
912 func (aspi A2ASwitchProtectionInput) AsBasicSwitchProtectionProviderSpecificInput() (BasicSwitchProtectionProviderSpecificInput, bool) {
913 return &aspi, true
914 }
915
916
917 type A2AUpdateReplicationProtectedItemInput struct {
918
919 RecoveryCloudServiceID *string `json:"recoveryCloudServiceId,omitempty"`
920
921 RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"`
922
923 InstanceType InstanceTypeBasicUpdateReplicationProtectedItemProviderInput `json:"instanceType,omitempty"`
924 }
925
926
927 func (aurpii A2AUpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, error) {
928 aurpii.InstanceType = InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeA2A
929 objectMap := make(map[string]interface{})
930 if aurpii.RecoveryCloudServiceID != nil {
931 objectMap["recoveryCloudServiceId"] = aurpii.RecoveryCloudServiceID
932 }
933 if aurpii.RecoveryResourceGroupID != nil {
934 objectMap["recoveryResourceGroupId"] = aurpii.RecoveryResourceGroupID
935 }
936 if aurpii.InstanceType != "" {
937 objectMap["instanceType"] = aurpii.InstanceType
938 }
939 return json.Marshal(objectMap)
940 }
941
942
943 func (aurpii A2AUpdateReplicationProtectedItemInput) AsHyperVReplicaAzureUpdateReplicationProtectedItemInput() (*HyperVReplicaAzureUpdateReplicationProtectedItemInput, bool) {
944 return nil, false
945 }
946
947
948 func (aurpii A2AUpdateReplicationProtectedItemInput) AsInMageAzureV2UpdateReplicationProtectedItemInput() (*InMageAzureV2UpdateReplicationProtectedItemInput, bool) {
949 return nil, false
950 }
951
952
953 func (aurpii A2AUpdateReplicationProtectedItemInput) AsA2AUpdateReplicationProtectedItemInput() (*A2AUpdateReplicationProtectedItemInput, bool) {
954 return &aurpii, true
955 }
956
957
958 func (aurpii A2AUpdateReplicationProtectedItemInput) AsUpdateReplicationProtectedItemProviderInput() (*UpdateReplicationProtectedItemProviderInput, bool) {
959 return nil, false
960 }
961
962
963 func (aurpii A2AUpdateReplicationProtectedItemInput) AsBasicUpdateReplicationProtectedItemProviderInput() (BasicUpdateReplicationProtectedItemProviderInput, bool) {
964 return &aurpii, true
965 }
966
967
968 type A2AVMDiskInputDetails struct {
969
970 DiskURI *string `json:"diskUri,omitempty"`
971
972 RecoveryAzureStorageAccountID *string `json:"recoveryAzureStorageAccountId,omitempty"`
973
974 PrimaryStagingAzureStorageAccountID *string `json:"primaryStagingAzureStorageAccountId,omitempty"`
975 }
976
977
978 type A2AVMManagedDiskInputDetails struct {
979
980 DiskID *string `json:"diskId,omitempty"`
981
982 PrimaryStagingAzureStorageAccountID *string `json:"primaryStagingAzureStorageAccountId,omitempty"`
983
984 RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"`
985 }
986
987
988 type AddVCenterRequest struct {
989
990 Properties *AddVCenterRequestProperties `json:"properties,omitempty"`
991 }
992
993
994 type AddVCenterRequestProperties struct {
995
996 FriendlyName *string `json:"friendlyName,omitempty"`
997
998 IPAddress *string `json:"ipAddress,omitempty"`
999
1000 ProcessServerID *string `json:"processServerId,omitempty"`
1001
1002 Port *string `json:"port,omitempty"`
1003
1004 RunAsAccountID *string `json:"runAsAccountId,omitempty"`
1005 }
1006
1007
1008 type Alert struct {
1009 autorest.Response `json:"-"`
1010
1011 Properties *AlertProperties `json:"properties,omitempty"`
1012
1013 ID *string `json:"id,omitempty"`
1014
1015 Name *string `json:"name,omitempty"`
1016
1017 Type *string `json:"type,omitempty"`
1018
1019 Location *string `json:"location,omitempty"`
1020 }
1021
1022
1023 func (a Alert) MarshalJSON() ([]byte, error) {
1024 objectMap := make(map[string]interface{})
1025 if a.Properties != nil {
1026 objectMap["properties"] = a.Properties
1027 }
1028 if a.Location != nil {
1029 objectMap["location"] = a.Location
1030 }
1031 return json.Marshal(objectMap)
1032 }
1033
1034
1035 type AlertCollection struct {
1036 autorest.Response `json:"-"`
1037
1038 Value *[]Alert `json:"value,omitempty"`
1039
1040 NextLink *string `json:"nextLink,omitempty"`
1041 }
1042
1043
1044 type AlertCollectionIterator struct {
1045 i int
1046 page AlertCollectionPage
1047 }
1048
1049
1050
1051 func (iter *AlertCollectionIterator) NextWithContext(ctx context.Context) (err error) {
1052 if tracing.IsEnabled() {
1053 ctx = tracing.StartSpan(ctx, fqdn+"/AlertCollectionIterator.NextWithContext")
1054 defer func() {
1055 sc := -1
1056 if iter.Response().Response.Response != nil {
1057 sc = iter.Response().Response.Response.StatusCode
1058 }
1059 tracing.EndSpan(ctx, sc, err)
1060 }()
1061 }
1062 iter.i++
1063 if iter.i < len(iter.page.Values()) {
1064 return nil
1065 }
1066 err = iter.page.NextWithContext(ctx)
1067 if err != nil {
1068 iter.i--
1069 return err
1070 }
1071 iter.i = 0
1072 return nil
1073 }
1074
1075
1076
1077
1078 func (iter *AlertCollectionIterator) Next() error {
1079 return iter.NextWithContext(context.Background())
1080 }
1081
1082
1083 func (iter AlertCollectionIterator) NotDone() bool {
1084 return iter.page.NotDone() && iter.i < len(iter.page.Values())
1085 }
1086
1087
1088 func (iter AlertCollectionIterator) Response() AlertCollection {
1089 return iter.page.Response()
1090 }
1091
1092
1093
1094 func (iter AlertCollectionIterator) Value() Alert {
1095 if !iter.page.NotDone() {
1096 return Alert{}
1097 }
1098 return iter.page.Values()[iter.i]
1099 }
1100
1101
1102 func NewAlertCollectionIterator(page AlertCollectionPage) AlertCollectionIterator {
1103 return AlertCollectionIterator{page: page}
1104 }
1105
1106
1107 func (ac AlertCollection) IsEmpty() bool {
1108 return ac.Value == nil || len(*ac.Value) == 0
1109 }
1110
1111
1112 func (ac AlertCollection) hasNextLink() bool {
1113 return ac.NextLink != nil && len(*ac.NextLink) != 0
1114 }
1115
1116
1117
1118 func (ac AlertCollection) alertCollectionPreparer(ctx context.Context) (*http.Request, error) {
1119 if !ac.hasNextLink() {
1120 return nil, nil
1121 }
1122 return autorest.Prepare((&http.Request{}).WithContext(ctx),
1123 autorest.AsJSON(),
1124 autorest.AsGet(),
1125 autorest.WithBaseURL(to.String(ac.NextLink)))
1126 }
1127
1128
1129 type AlertCollectionPage struct {
1130 fn func(context.Context, AlertCollection) (AlertCollection, error)
1131 ac AlertCollection
1132 }
1133
1134
1135
1136 func (page *AlertCollectionPage) NextWithContext(ctx context.Context) (err error) {
1137 if tracing.IsEnabled() {
1138 ctx = tracing.StartSpan(ctx, fqdn+"/AlertCollectionPage.NextWithContext")
1139 defer func() {
1140 sc := -1
1141 if page.Response().Response.Response != nil {
1142 sc = page.Response().Response.Response.StatusCode
1143 }
1144 tracing.EndSpan(ctx, sc, err)
1145 }()
1146 }
1147 for {
1148 next, err := page.fn(ctx, page.ac)
1149 if err != nil {
1150 return err
1151 }
1152 page.ac = next
1153 if !next.hasNextLink() || !next.IsEmpty() {
1154 break
1155 }
1156 }
1157 return nil
1158 }
1159
1160
1161
1162
1163 func (page *AlertCollectionPage) Next() error {
1164 return page.NextWithContext(context.Background())
1165 }
1166
1167
1168 func (page AlertCollectionPage) NotDone() bool {
1169 return !page.ac.IsEmpty()
1170 }
1171
1172
1173 func (page AlertCollectionPage) Response() AlertCollection {
1174 return page.ac
1175 }
1176
1177
1178 func (page AlertCollectionPage) Values() []Alert {
1179 if page.ac.IsEmpty() {
1180 return nil
1181 }
1182 return *page.ac.Value
1183 }
1184
1185
1186 func NewAlertCollectionPage(cur AlertCollection, getNextPage func(context.Context, AlertCollection) (AlertCollection, error)) AlertCollectionPage {
1187 return AlertCollectionPage{
1188 fn: getNextPage,
1189 ac: cur,
1190 }
1191 }
1192
1193
1194 type AlertProperties struct {
1195
1196 SendToOwners *string `json:"sendToOwners,omitempty"`
1197
1198 CustomEmailAddresses *[]string `json:"customEmailAddresses,omitempty"`
1199
1200 Locale *string `json:"locale,omitempty"`
1201 }
1202
1203
1204 type ApplyRecoveryPointInput struct {
1205
1206 Properties *ApplyRecoveryPointInputProperties `json:"properties,omitempty"`
1207 }
1208
1209
1210 type ApplyRecoveryPointInputProperties struct {
1211
1212 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
1213
1214 ProviderSpecificDetails BasicApplyRecoveryPointProviderSpecificInput `json:"providerSpecificDetails,omitempty"`
1215 }
1216
1217
1218 func (arpip *ApplyRecoveryPointInputProperties) UnmarshalJSON(body []byte) error {
1219 var m map[string]*json.RawMessage
1220 err := json.Unmarshal(body, &m)
1221 if err != nil {
1222 return err
1223 }
1224 for k, v := range m {
1225 switch k {
1226 case "recoveryPointId":
1227 if v != nil {
1228 var recoveryPointID string
1229 err = json.Unmarshal(*v, &recoveryPointID)
1230 if err != nil {
1231 return err
1232 }
1233 arpip.RecoveryPointID = &recoveryPointID
1234 }
1235 case "providerSpecificDetails":
1236 if v != nil {
1237 providerSpecificDetails, err := unmarshalBasicApplyRecoveryPointProviderSpecificInput(*v)
1238 if err != nil {
1239 return err
1240 }
1241 arpip.ProviderSpecificDetails = providerSpecificDetails
1242 }
1243 }
1244 }
1245
1246 return nil
1247 }
1248
1249
1250 type BasicApplyRecoveryPointProviderSpecificInput interface {
1251 AsHyperVReplicaAzureApplyRecoveryPointInput() (*HyperVReplicaAzureApplyRecoveryPointInput, bool)
1252 AsInMageAzureV2ApplyRecoveryPointInput() (*InMageAzureV2ApplyRecoveryPointInput, bool)
1253 AsA2AApplyRecoveryPointInput() (*A2AApplyRecoveryPointInput, bool)
1254 AsApplyRecoveryPointProviderSpecificInput() (*ApplyRecoveryPointProviderSpecificInput, bool)
1255 }
1256
1257
1258 type ApplyRecoveryPointProviderSpecificInput struct {
1259
1260 InstanceType InstanceTypeBasicApplyRecoveryPointProviderSpecificInput `json:"instanceType,omitempty"`
1261 }
1262
1263 func unmarshalBasicApplyRecoveryPointProviderSpecificInput(body []byte) (BasicApplyRecoveryPointProviderSpecificInput, error) {
1264 var m map[string]interface{}
1265 err := json.Unmarshal(body, &m)
1266 if err != nil {
1267 return nil, err
1268 }
1269
1270 switch m["instanceType"] {
1271 case string(InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeHyperVReplicaAzure):
1272 var hvraarpi HyperVReplicaAzureApplyRecoveryPointInput
1273 err := json.Unmarshal(body, &hvraarpi)
1274 return hvraarpi, err
1275 case string(InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeInMageAzureV2):
1276 var imavarpi InMageAzureV2ApplyRecoveryPointInput
1277 err := json.Unmarshal(body, &imavarpi)
1278 return imavarpi, err
1279 case string(InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeA2A):
1280 var aarpi A2AApplyRecoveryPointInput
1281 err := json.Unmarshal(body, &aarpi)
1282 return aarpi, err
1283 default:
1284 var arppsi ApplyRecoveryPointProviderSpecificInput
1285 err := json.Unmarshal(body, &arppsi)
1286 return arppsi, err
1287 }
1288 }
1289 func unmarshalBasicApplyRecoveryPointProviderSpecificInputArray(body []byte) ([]BasicApplyRecoveryPointProviderSpecificInput, error) {
1290 var rawMessages []*json.RawMessage
1291 err := json.Unmarshal(body, &rawMessages)
1292 if err != nil {
1293 return nil, err
1294 }
1295
1296 arppsiArray := make([]BasicApplyRecoveryPointProviderSpecificInput, len(rawMessages))
1297
1298 for index, rawMessage := range rawMessages {
1299 arppsi, err := unmarshalBasicApplyRecoveryPointProviderSpecificInput(*rawMessage)
1300 if err != nil {
1301 return nil, err
1302 }
1303 arppsiArray[index] = arppsi
1304 }
1305 return arppsiArray, nil
1306 }
1307
1308
1309 func (arppsi ApplyRecoveryPointProviderSpecificInput) MarshalJSON() ([]byte, error) {
1310 arppsi.InstanceType = InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeApplyRecoveryPointProviderSpecificInput
1311 objectMap := make(map[string]interface{})
1312 if arppsi.InstanceType != "" {
1313 objectMap["instanceType"] = arppsi.InstanceType
1314 }
1315 return json.Marshal(objectMap)
1316 }
1317
1318
1319 func (arppsi ApplyRecoveryPointProviderSpecificInput) AsHyperVReplicaAzureApplyRecoveryPointInput() (*HyperVReplicaAzureApplyRecoveryPointInput, bool) {
1320 return nil, false
1321 }
1322
1323
1324 func (arppsi ApplyRecoveryPointProviderSpecificInput) AsInMageAzureV2ApplyRecoveryPointInput() (*InMageAzureV2ApplyRecoveryPointInput, bool) {
1325 return nil, false
1326 }
1327
1328
1329 func (arppsi ApplyRecoveryPointProviderSpecificInput) AsA2AApplyRecoveryPointInput() (*A2AApplyRecoveryPointInput, bool) {
1330 return nil, false
1331 }
1332
1333
1334 func (arppsi ApplyRecoveryPointProviderSpecificInput) AsApplyRecoveryPointProviderSpecificInput() (*ApplyRecoveryPointProviderSpecificInput, bool) {
1335 return &arppsi, true
1336 }
1337
1338
1339 func (arppsi ApplyRecoveryPointProviderSpecificInput) AsBasicApplyRecoveryPointProviderSpecificInput() (BasicApplyRecoveryPointProviderSpecificInput, bool) {
1340 return &arppsi, true
1341 }
1342
1343
1344 type ARMException struct {
1345
1346 Code *string `json:"code,omitempty"`
1347
1348 Message *string `json:"message,omitempty"`
1349
1350 Target *string `json:"target,omitempty"`
1351
1352 Details *[]ARMExceptionDetails `json:"details,omitempty"`
1353
1354 Innererror *ARMInnerError `json:"innererror,omitempty"`
1355 }
1356
1357
1358 type ARMExceptionDetails struct {
1359
1360 Code *string `json:"code,omitempty"`
1361
1362 Message *string `json:"message,omitempty"`
1363
1364 PossibleCauses *string `json:"possibleCauses,omitempty"`
1365
1366 RecommendedAction *string `json:"recommendedAction,omitempty"`
1367
1368 ClientRequestID *string `json:"clientRequestId,omitempty"`
1369
1370 ActivityID *string `json:"activityId,omitempty"`
1371
1372 Target *string `json:"target,omitempty"`
1373 }
1374
1375
1376 type ARMInnerError struct {
1377
1378 Trace *string `json:"trace,omitempty"`
1379
1380 Source *string `json:"source,omitempty"`
1381
1382 MethodStatus *MethodCallStatus `json:"methodStatus,omitempty"`
1383
1384 CloudID *string `json:"cloudId,omitempty"`
1385
1386 HVHostID *string `json:"hVHostId,omitempty"`
1387
1388 HVClusterID *string `json:"hVClusterId,omitempty"`
1389
1390 NetworkID *string `json:"networkId,omitempty"`
1391
1392 VMID *string `json:"vmId,omitempty"`
1393
1394 FabricID *string `json:"fabricId,omitempty"`
1395
1396 LiveID *string `json:"liveId,omitempty"`
1397
1398 ContainerID *string `json:"containerId,omitempty"`
1399
1400 ResourceID *string `json:"resourceId,omitempty"`
1401
1402 ResourceName *string `json:"resourceName,omitempty"`
1403
1404 SubscriptionID *string `json:"subscriptionId,omitempty"`
1405
1406 SerializedSRSLogContext *string `json:"serializedSRSLogContext,omitempty"`
1407 }
1408
1409
1410 type AsrJobDetails struct {
1411
1412 AffectedObjectDetails map[string]*string `json:"affectedObjectDetails"`
1413
1414 InstanceType InstanceTypeBasicJobDetails `json:"instanceType,omitempty"`
1415 }
1416
1417
1418 func (ajd AsrJobDetails) MarshalJSON() ([]byte, error) {
1419 ajd.InstanceType = InstanceTypeAsrJobDetails
1420 objectMap := make(map[string]interface{})
1421 if ajd.AffectedObjectDetails != nil {
1422 objectMap["affectedObjectDetails"] = ajd.AffectedObjectDetails
1423 }
1424 if ajd.InstanceType != "" {
1425 objectMap["instanceType"] = ajd.InstanceType
1426 }
1427 return json.Marshal(objectMap)
1428 }
1429
1430
1431 func (ajd AsrJobDetails) AsAsrJobDetails() (*AsrJobDetails, bool) {
1432 return &ajd, true
1433 }
1434
1435
1436 func (ajd AsrJobDetails) AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool) {
1437 return nil, false
1438 }
1439
1440
1441 func (ajd AsrJobDetails) AsFailoverJobDetails() (*FailoverJobDetails, bool) {
1442 return nil, false
1443 }
1444
1445
1446 func (ajd AsrJobDetails) AsExportJobDetails() (*ExportJobDetails, bool) {
1447 return nil, false
1448 }
1449
1450
1451 func (ajd AsrJobDetails) AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool) {
1452 return nil, false
1453 }
1454
1455
1456 func (ajd AsrJobDetails) AsJobDetails() (*JobDetails, bool) {
1457 return nil, false
1458 }
1459
1460
1461 func (ajd AsrJobDetails) AsBasicJobDetails() (BasicJobDetails, bool) {
1462 return &ajd, true
1463 }
1464
1465
1466 type ASRTask struct {
1467
1468 TaskID *string `json:"taskId,omitempty"`
1469
1470 Name *string `json:"name,omitempty"`
1471
1472 StartTime *date.Time `json:"startTime,omitempty"`
1473
1474 EndTime *date.Time `json:"endTime,omitempty"`
1475
1476 AllowedActions *[]string `json:"allowedActions,omitempty"`
1477
1478 FriendlyName *string `json:"friendlyName,omitempty"`
1479
1480 State *string `json:"state,omitempty"`
1481
1482 StateDescription *string `json:"stateDescription,omitempty"`
1483
1484 TaskType *string `json:"taskType,omitempty"`
1485
1486 CustomDetails BasicTaskTypeDetails `json:"customDetails,omitempty"`
1487
1488 GroupTaskCustomDetails BasicGroupTaskDetails `json:"groupTaskCustomDetails,omitempty"`
1489
1490 Errors *[]JobErrorDetails `json:"errors,omitempty"`
1491 }
1492
1493
1494 func (at *ASRTask) UnmarshalJSON(body []byte) error {
1495 var m map[string]*json.RawMessage
1496 err := json.Unmarshal(body, &m)
1497 if err != nil {
1498 return err
1499 }
1500 for k, v := range m {
1501 switch k {
1502 case "taskId":
1503 if v != nil {
1504 var taskID string
1505 err = json.Unmarshal(*v, &taskID)
1506 if err != nil {
1507 return err
1508 }
1509 at.TaskID = &taskID
1510 }
1511 case "name":
1512 if v != nil {
1513 var name string
1514 err = json.Unmarshal(*v, &name)
1515 if err != nil {
1516 return err
1517 }
1518 at.Name = &name
1519 }
1520 case "startTime":
1521 if v != nil {
1522 var startTime date.Time
1523 err = json.Unmarshal(*v, &startTime)
1524 if err != nil {
1525 return err
1526 }
1527 at.StartTime = &startTime
1528 }
1529 case "endTime":
1530 if v != nil {
1531 var endTime date.Time
1532 err = json.Unmarshal(*v, &endTime)
1533 if err != nil {
1534 return err
1535 }
1536 at.EndTime = &endTime
1537 }
1538 case "allowedActions":
1539 if v != nil {
1540 var allowedActions []string
1541 err = json.Unmarshal(*v, &allowedActions)
1542 if err != nil {
1543 return err
1544 }
1545 at.AllowedActions = &allowedActions
1546 }
1547 case "friendlyName":
1548 if v != nil {
1549 var friendlyName string
1550 err = json.Unmarshal(*v, &friendlyName)
1551 if err != nil {
1552 return err
1553 }
1554 at.FriendlyName = &friendlyName
1555 }
1556 case "state":
1557 if v != nil {
1558 var state string
1559 err = json.Unmarshal(*v, &state)
1560 if err != nil {
1561 return err
1562 }
1563 at.State = &state
1564 }
1565 case "stateDescription":
1566 if v != nil {
1567 var stateDescription string
1568 err = json.Unmarshal(*v, &stateDescription)
1569 if err != nil {
1570 return err
1571 }
1572 at.StateDescription = &stateDescription
1573 }
1574 case "taskType":
1575 if v != nil {
1576 var taskType string
1577 err = json.Unmarshal(*v, &taskType)
1578 if err != nil {
1579 return err
1580 }
1581 at.TaskType = &taskType
1582 }
1583 case "customDetails":
1584 if v != nil {
1585 customDetails, err := unmarshalBasicTaskTypeDetails(*v)
1586 if err != nil {
1587 return err
1588 }
1589 at.CustomDetails = customDetails
1590 }
1591 case "groupTaskCustomDetails":
1592 if v != nil {
1593 groupTaskCustomDetails, err := unmarshalBasicGroupTaskDetails(*v)
1594 if err != nil {
1595 return err
1596 }
1597 at.GroupTaskCustomDetails = groupTaskCustomDetails
1598 }
1599 case "errors":
1600 if v != nil {
1601 var errorsVar []JobErrorDetails
1602 err = json.Unmarshal(*v, &errorsVar)
1603 if err != nil {
1604 return err
1605 }
1606 at.Errors = &errorsVar
1607 }
1608 }
1609 }
1610
1611 return nil
1612 }
1613
1614
1615 type AutomationRunbookTaskDetails struct {
1616
1617 Name *string `json:"name,omitempty"`
1618
1619 CloudServiceName *string `json:"cloudServiceName,omitempty"`
1620
1621 SubscriptionID *string `json:"subscriptionId,omitempty"`
1622
1623 AccountName *string `json:"accountName,omitempty"`
1624
1625 RunbookID *string `json:"runbookId,omitempty"`
1626
1627 RunbookName *string `json:"runbookName,omitempty"`
1628
1629 JobID *string `json:"jobId,omitempty"`
1630
1631 JobOutput *string `json:"jobOutput,omitempty"`
1632
1633 IsPrimarySideScript *bool `json:"isPrimarySideScript,omitempty"`
1634
1635 InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"`
1636 }
1637
1638
1639 func (artd AutomationRunbookTaskDetails) MarshalJSON() ([]byte, error) {
1640 artd.InstanceType = InstanceTypeAutomationRunbookTaskDetails
1641 objectMap := make(map[string]interface{})
1642 if artd.Name != nil {
1643 objectMap["name"] = artd.Name
1644 }
1645 if artd.CloudServiceName != nil {
1646 objectMap["cloudServiceName"] = artd.CloudServiceName
1647 }
1648 if artd.SubscriptionID != nil {
1649 objectMap["subscriptionId"] = artd.SubscriptionID
1650 }
1651 if artd.AccountName != nil {
1652 objectMap["accountName"] = artd.AccountName
1653 }
1654 if artd.RunbookID != nil {
1655 objectMap["runbookId"] = artd.RunbookID
1656 }
1657 if artd.RunbookName != nil {
1658 objectMap["runbookName"] = artd.RunbookName
1659 }
1660 if artd.JobID != nil {
1661 objectMap["jobId"] = artd.JobID
1662 }
1663 if artd.JobOutput != nil {
1664 objectMap["jobOutput"] = artd.JobOutput
1665 }
1666 if artd.IsPrimarySideScript != nil {
1667 objectMap["isPrimarySideScript"] = artd.IsPrimarySideScript
1668 }
1669 if artd.InstanceType != "" {
1670 objectMap["instanceType"] = artd.InstanceType
1671 }
1672 return json.Marshal(objectMap)
1673 }
1674
1675
1676 func (artd AutomationRunbookTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) {
1677 return nil, false
1678 }
1679
1680
1681 func (artd AutomationRunbookTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) {
1682 return nil, false
1683 }
1684
1685
1686 func (artd AutomationRunbookTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) {
1687 return nil, false
1688 }
1689
1690
1691 func (artd AutomationRunbookTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) {
1692 return nil, false
1693 }
1694
1695
1696 func (artd AutomationRunbookTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) {
1697 return nil, false
1698 }
1699
1700
1701 func (artd AutomationRunbookTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) {
1702 return nil, false
1703 }
1704
1705
1706 func (artd AutomationRunbookTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) {
1707 return nil, false
1708 }
1709
1710
1711 func (artd AutomationRunbookTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) {
1712 return &artd, true
1713 }
1714
1715
1716 func (artd AutomationRunbookTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) {
1717 return nil, false
1718 }
1719
1720
1721 func (artd AutomationRunbookTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) {
1722 return &artd, true
1723 }
1724
1725
1726 type AzureFabricCreationInput struct {
1727
1728 Location *string `json:"location,omitempty"`
1729
1730 InstanceType InstanceTypeBasicFabricSpecificCreationInput `json:"instanceType,omitempty"`
1731 }
1732
1733
1734 func (afci AzureFabricCreationInput) MarshalJSON() ([]byte, error) {
1735 afci.InstanceType = InstanceTypeAzure
1736 objectMap := make(map[string]interface{})
1737 if afci.Location != nil {
1738 objectMap["location"] = afci.Location
1739 }
1740 if afci.InstanceType != "" {
1741 objectMap["instanceType"] = afci.InstanceType
1742 }
1743 return json.Marshal(objectMap)
1744 }
1745
1746
1747 func (afci AzureFabricCreationInput) AsAzureFabricCreationInput() (*AzureFabricCreationInput, bool) {
1748 return &afci, true
1749 }
1750
1751
1752 func (afci AzureFabricCreationInput) AsVMwareV2FabricCreationInput() (*VMwareV2FabricCreationInput, bool) {
1753 return nil, false
1754 }
1755
1756
1757 func (afci AzureFabricCreationInput) AsFabricSpecificCreationInput() (*FabricSpecificCreationInput, bool) {
1758 return nil, false
1759 }
1760
1761
1762 func (afci AzureFabricCreationInput) AsBasicFabricSpecificCreationInput() (BasicFabricSpecificCreationInput, bool) {
1763 return &afci, true
1764 }
1765
1766
1767 type AzureFabricSpecificDetails struct {
1768
1769 Location *string `json:"location,omitempty"`
1770
1771 ContainerIds *[]string `json:"containerIds,omitempty"`
1772
1773 InstanceType InstanceTypeBasicFabricSpecificDetails `json:"instanceType,omitempty"`
1774 }
1775
1776
1777 func (afsd AzureFabricSpecificDetails) MarshalJSON() ([]byte, error) {
1778 afsd.InstanceType = InstanceTypeBasicFabricSpecificDetailsInstanceTypeAzure
1779 objectMap := make(map[string]interface{})
1780 if afsd.Location != nil {
1781 objectMap["location"] = afsd.Location
1782 }
1783 if afsd.ContainerIds != nil {
1784 objectMap["containerIds"] = afsd.ContainerIds
1785 }
1786 if afsd.InstanceType != "" {
1787 objectMap["instanceType"] = afsd.InstanceType
1788 }
1789 return json.Marshal(objectMap)
1790 }
1791
1792
1793 func (afsd AzureFabricSpecificDetails) AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool) {
1794 return &afsd, true
1795 }
1796
1797
1798 func (afsd AzureFabricSpecificDetails) AsVmmDetails() (*VmmDetails, bool) {
1799 return nil, false
1800 }
1801
1802
1803 func (afsd AzureFabricSpecificDetails) AsHyperVSiteDetails() (*HyperVSiteDetails, bool) {
1804 return nil, false
1805 }
1806
1807
1808 func (afsd AzureFabricSpecificDetails) AsVMwareDetails() (*VMwareDetails, bool) {
1809 return nil, false
1810 }
1811
1812
1813 func (afsd AzureFabricSpecificDetails) AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool) {
1814 return nil, false
1815 }
1816
1817
1818 func (afsd AzureFabricSpecificDetails) AsFabricSpecificDetails() (*FabricSpecificDetails, bool) {
1819 return nil, false
1820 }
1821
1822
1823 func (afsd AzureFabricSpecificDetails) AsBasicFabricSpecificDetails() (BasicFabricSpecificDetails, bool) {
1824 return &afsd, true
1825 }
1826
1827
1828
1829 type AzureToAzureCreateNetworkMappingInput struct {
1830
1831 PrimaryNetworkID *string `json:"primaryNetworkId,omitempty"`
1832
1833 InstanceType InstanceTypeBasicFabricSpecificCreateNetworkMappingInput `json:"instanceType,omitempty"`
1834 }
1835
1836
1837 func (atacnmi AzureToAzureCreateNetworkMappingInput) MarshalJSON() ([]byte, error) {
1838 atacnmi.InstanceType = InstanceTypeAzureToAzure
1839 objectMap := make(map[string]interface{})
1840 if atacnmi.PrimaryNetworkID != nil {
1841 objectMap["primaryNetworkId"] = atacnmi.PrimaryNetworkID
1842 }
1843 if atacnmi.InstanceType != "" {
1844 objectMap["instanceType"] = atacnmi.InstanceType
1845 }
1846 return json.Marshal(objectMap)
1847 }
1848
1849
1850 func (atacnmi AzureToAzureCreateNetworkMappingInput) AsAzureToAzureCreateNetworkMappingInput() (*AzureToAzureCreateNetworkMappingInput, bool) {
1851 return &atacnmi, true
1852 }
1853
1854
1855 func (atacnmi AzureToAzureCreateNetworkMappingInput) AsVmmToAzureCreateNetworkMappingInput() (*VmmToAzureCreateNetworkMappingInput, bool) {
1856 return nil, false
1857 }
1858
1859
1860 func (atacnmi AzureToAzureCreateNetworkMappingInput) AsVmmToVmmCreateNetworkMappingInput() (*VmmToVmmCreateNetworkMappingInput, bool) {
1861 return nil, false
1862 }
1863
1864
1865 func (atacnmi AzureToAzureCreateNetworkMappingInput) AsFabricSpecificCreateNetworkMappingInput() (*FabricSpecificCreateNetworkMappingInput, bool) {
1866 return nil, false
1867 }
1868
1869
1870 func (atacnmi AzureToAzureCreateNetworkMappingInput) AsBasicFabricSpecificCreateNetworkMappingInput() (BasicFabricSpecificCreateNetworkMappingInput, bool) {
1871 return &atacnmi, true
1872 }
1873
1874
1875 type AzureToAzureNetworkMappingSettings struct {
1876
1877 PrimaryFabricLocation *string `json:"primaryFabricLocation,omitempty"`
1878
1879 RecoveryFabricLocation *string `json:"recoveryFabricLocation,omitempty"`
1880
1881 InstanceType InstanceTypeBasicNetworkMappingFabricSpecificSettings `json:"instanceType,omitempty"`
1882 }
1883
1884
1885 func (atanms AzureToAzureNetworkMappingSettings) MarshalJSON() ([]byte, error) {
1886 atanms.InstanceType = InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeAzureToAzure
1887 objectMap := make(map[string]interface{})
1888 if atanms.PrimaryFabricLocation != nil {
1889 objectMap["primaryFabricLocation"] = atanms.PrimaryFabricLocation
1890 }
1891 if atanms.RecoveryFabricLocation != nil {
1892 objectMap["recoveryFabricLocation"] = atanms.RecoveryFabricLocation
1893 }
1894 if atanms.InstanceType != "" {
1895 objectMap["instanceType"] = atanms.InstanceType
1896 }
1897 return json.Marshal(objectMap)
1898 }
1899
1900
1901 func (atanms AzureToAzureNetworkMappingSettings) AsAzureToAzureNetworkMappingSettings() (*AzureToAzureNetworkMappingSettings, bool) {
1902 return &atanms, true
1903 }
1904
1905
1906 func (atanms AzureToAzureNetworkMappingSettings) AsVmmToAzureNetworkMappingSettings() (*VmmToAzureNetworkMappingSettings, bool) {
1907 return nil, false
1908 }
1909
1910
1911 func (atanms AzureToAzureNetworkMappingSettings) AsVmmToVmmNetworkMappingSettings() (*VmmToVmmNetworkMappingSettings, bool) {
1912 return nil, false
1913 }
1914
1915
1916 func (atanms AzureToAzureNetworkMappingSettings) AsNetworkMappingFabricSpecificSettings() (*NetworkMappingFabricSpecificSettings, bool) {
1917 return nil, false
1918 }
1919
1920
1921 func (atanms AzureToAzureNetworkMappingSettings) AsBasicNetworkMappingFabricSpecificSettings() (BasicNetworkMappingFabricSpecificSettings, bool) {
1922 return &atanms, true
1923 }
1924
1925
1926 type AzureToAzureUpdateNetworkMappingInput struct {
1927
1928 PrimaryNetworkID *string `json:"primaryNetworkId,omitempty"`
1929
1930 InstanceType InstanceTypeBasicFabricSpecificUpdateNetworkMappingInput `json:"instanceType,omitempty"`
1931 }
1932
1933
1934 func (ataunmi AzureToAzureUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) {
1935 ataunmi.InstanceType = InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeAzureToAzure
1936 objectMap := make(map[string]interface{})
1937 if ataunmi.PrimaryNetworkID != nil {
1938 objectMap["primaryNetworkId"] = ataunmi.PrimaryNetworkID
1939 }
1940 if ataunmi.InstanceType != "" {
1941 objectMap["instanceType"] = ataunmi.InstanceType
1942 }
1943 return json.Marshal(objectMap)
1944 }
1945
1946
1947 func (ataunmi AzureToAzureUpdateNetworkMappingInput) AsAzureToAzureUpdateNetworkMappingInput() (*AzureToAzureUpdateNetworkMappingInput, bool) {
1948 return &ataunmi, true
1949 }
1950
1951
1952 func (ataunmi AzureToAzureUpdateNetworkMappingInput) AsVmmToAzureUpdateNetworkMappingInput() (*VmmToAzureUpdateNetworkMappingInput, bool) {
1953 return nil, false
1954 }
1955
1956
1957 func (ataunmi AzureToAzureUpdateNetworkMappingInput) AsVmmToVmmUpdateNetworkMappingInput() (*VmmToVmmUpdateNetworkMappingInput, bool) {
1958 return nil, false
1959 }
1960
1961
1962 func (ataunmi AzureToAzureUpdateNetworkMappingInput) AsFabricSpecificUpdateNetworkMappingInput() (*FabricSpecificUpdateNetworkMappingInput, bool) {
1963 return nil, false
1964 }
1965
1966
1967 func (ataunmi AzureToAzureUpdateNetworkMappingInput) AsBasicFabricSpecificUpdateNetworkMappingInput() (BasicFabricSpecificUpdateNetworkMappingInput, bool) {
1968 return &ataunmi, true
1969 }
1970
1971
1972 type AzureToAzureVMSyncedConfigDetails struct {
1973
1974 Tags map[string]*string `json:"tags"`
1975
1976 RoleAssignments *[]RoleAssignment `json:"roleAssignments,omitempty"`
1977
1978 InputEndpoints *[]InputEndpoint `json:"inputEndpoints,omitempty"`
1979 }
1980
1981
1982 func (atavscd AzureToAzureVMSyncedConfigDetails) MarshalJSON() ([]byte, error) {
1983 objectMap := make(map[string]interface{})
1984 if atavscd.Tags != nil {
1985 objectMap["tags"] = atavscd.Tags
1986 }
1987 if atavscd.RoleAssignments != nil {
1988 objectMap["roleAssignments"] = atavscd.RoleAssignments
1989 }
1990 if atavscd.InputEndpoints != nil {
1991 objectMap["inputEndpoints"] = atavscd.InputEndpoints
1992 }
1993 return json.Marshal(objectMap)
1994 }
1995
1996
1997 type AzureVMDiskDetails struct {
1998
1999 VhdType *string `json:"vhdType,omitempty"`
2000
2001 VhdID *string `json:"vhdId,omitempty"`
2002
2003 VhdName *string `json:"vhdName,omitempty"`
2004
2005 MaxSizeMB *string `json:"maxSizeMB,omitempty"`
2006
2007 TargetDiskLocation *string `json:"targetDiskLocation,omitempty"`
2008
2009 TargetDiskName *string `json:"targetDiskName,omitempty"`
2010
2011 LunID *string `json:"lunId,omitempty"`
2012 }
2013
2014
2015 type BasicConfigurationSettings interface {
2016 AsHyperVVirtualMachineDetails() (*HyperVVirtualMachineDetails, bool)
2017 AsVMwareVirtualMachineDetails() (*VMwareVirtualMachineDetails, bool)
2018 AsReplicationGroupDetails() (*ReplicationGroupDetails, bool)
2019 AsConfigurationSettings() (*ConfigurationSettings, bool)
2020 }
2021
2022
2023 type ConfigurationSettings struct {
2024
2025 InstanceType InstanceTypeBasicConfigurationSettings `json:"instanceType,omitempty"`
2026 }
2027
2028 func unmarshalBasicConfigurationSettings(body []byte) (BasicConfigurationSettings, error) {
2029 var m map[string]interface{}
2030 err := json.Unmarshal(body, &m)
2031 if err != nil {
2032 return nil, err
2033 }
2034
2035 switch m["instanceType"] {
2036 case string(InstanceTypeHyperVVirtualMachine):
2037 var hvvmd HyperVVirtualMachineDetails
2038 err := json.Unmarshal(body, &hvvmd)
2039 return hvvmd, err
2040 case string(InstanceTypeVMwareVirtualMachine):
2041 var vmvmd VMwareVirtualMachineDetails
2042 err := json.Unmarshal(body, &vmvmd)
2043 return vmvmd, err
2044 case string(InstanceTypeReplicationGroupDetails):
2045 var rgd ReplicationGroupDetails
2046 err := json.Unmarshal(body, &rgd)
2047 return rgd, err
2048 default:
2049 var cs ConfigurationSettings
2050 err := json.Unmarshal(body, &cs)
2051 return cs, err
2052 }
2053 }
2054 func unmarshalBasicConfigurationSettingsArray(body []byte) ([]BasicConfigurationSettings, error) {
2055 var rawMessages []*json.RawMessage
2056 err := json.Unmarshal(body, &rawMessages)
2057 if err != nil {
2058 return nil, err
2059 }
2060
2061 csArray := make([]BasicConfigurationSettings, len(rawMessages))
2062
2063 for index, rawMessage := range rawMessages {
2064 cs, err := unmarshalBasicConfigurationSettings(*rawMessage)
2065 if err != nil {
2066 return nil, err
2067 }
2068 csArray[index] = cs
2069 }
2070 return csArray, nil
2071 }
2072
2073
2074 func (cs ConfigurationSettings) MarshalJSON() ([]byte, error) {
2075 cs.InstanceType = InstanceTypeConfigurationSettings
2076 objectMap := make(map[string]interface{})
2077 if cs.InstanceType != "" {
2078 objectMap["instanceType"] = cs.InstanceType
2079 }
2080 return json.Marshal(objectMap)
2081 }
2082
2083
2084 func (cs ConfigurationSettings) AsHyperVVirtualMachineDetails() (*HyperVVirtualMachineDetails, bool) {
2085 return nil, false
2086 }
2087
2088
2089 func (cs ConfigurationSettings) AsVMwareVirtualMachineDetails() (*VMwareVirtualMachineDetails, bool) {
2090 return nil, false
2091 }
2092
2093
2094 func (cs ConfigurationSettings) AsReplicationGroupDetails() (*ReplicationGroupDetails, bool) {
2095 return nil, false
2096 }
2097
2098
2099 func (cs ConfigurationSettings) AsConfigurationSettings() (*ConfigurationSettings, bool) {
2100 return &cs, true
2101 }
2102
2103
2104 func (cs ConfigurationSettings) AsBasicConfigurationSettings() (BasicConfigurationSettings, bool) {
2105 return &cs, true
2106 }
2107
2108
2109 type ConfigureAlertRequest struct {
2110
2111 Properties *ConfigureAlertRequestProperties `json:"properties,omitempty"`
2112 }
2113
2114
2115 type ConfigureAlertRequestProperties struct {
2116
2117 SendToOwners *string `json:"sendToOwners,omitempty"`
2118
2119 CustomEmailAddresses *[]string `json:"customEmailAddresses,omitempty"`
2120
2121 Locale *string `json:"locale,omitempty"`
2122 }
2123
2124
2125
2126 type ConsistencyCheckTaskDetails struct {
2127
2128 VMDetails *[]InconsistentVMDetails `json:"vmDetails,omitempty"`
2129
2130 InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"`
2131 }
2132
2133
2134 func (cctd ConsistencyCheckTaskDetails) MarshalJSON() ([]byte, error) {
2135 cctd.InstanceType = InstanceTypeConsistencyCheckTaskDetails
2136 objectMap := make(map[string]interface{})
2137 if cctd.VMDetails != nil {
2138 objectMap["vmDetails"] = cctd.VMDetails
2139 }
2140 if cctd.InstanceType != "" {
2141 objectMap["instanceType"] = cctd.InstanceType
2142 }
2143 return json.Marshal(objectMap)
2144 }
2145
2146
2147 func (cctd ConsistencyCheckTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) {
2148 return nil, false
2149 }
2150
2151
2152 func (cctd ConsistencyCheckTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) {
2153 return nil, false
2154 }
2155
2156
2157 func (cctd ConsistencyCheckTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) {
2158 return nil, false
2159 }
2160
2161
2162 func (cctd ConsistencyCheckTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) {
2163 return nil, false
2164 }
2165
2166
2167 func (cctd ConsistencyCheckTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) {
2168 return nil, false
2169 }
2170
2171
2172 func (cctd ConsistencyCheckTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) {
2173 return nil, false
2174 }
2175
2176
2177 func (cctd ConsistencyCheckTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) {
2178 return &cctd, true
2179 }
2180
2181
2182 func (cctd ConsistencyCheckTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) {
2183 return nil, false
2184 }
2185
2186
2187 func (cctd ConsistencyCheckTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) {
2188 return nil, false
2189 }
2190
2191
2192 func (cctd ConsistencyCheckTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) {
2193 return &cctd, true
2194 }
2195
2196
2197 type CreateNetworkMappingInput struct {
2198
2199 Properties *CreateNetworkMappingInputProperties `json:"properties,omitempty"`
2200 }
2201
2202
2203 type CreateNetworkMappingInputProperties struct {
2204
2205 RecoveryFabricName *string `json:"recoveryFabricName,omitempty"`
2206
2207 RecoveryNetworkID *string `json:"recoveryNetworkId,omitempty"`
2208
2209 FabricSpecificDetails BasicFabricSpecificCreateNetworkMappingInput `json:"fabricSpecificDetails,omitempty"`
2210 }
2211
2212
2213 func (cnmip *CreateNetworkMappingInputProperties) UnmarshalJSON(body []byte) error {
2214 var m map[string]*json.RawMessage
2215 err := json.Unmarshal(body, &m)
2216 if err != nil {
2217 return err
2218 }
2219 for k, v := range m {
2220 switch k {
2221 case "recoveryFabricName":
2222 if v != nil {
2223 var recoveryFabricName string
2224 err = json.Unmarshal(*v, &recoveryFabricName)
2225 if err != nil {
2226 return err
2227 }
2228 cnmip.RecoveryFabricName = &recoveryFabricName
2229 }
2230 case "recoveryNetworkId":
2231 if v != nil {
2232 var recoveryNetworkID string
2233 err = json.Unmarshal(*v, &recoveryNetworkID)
2234 if err != nil {
2235 return err
2236 }
2237 cnmip.RecoveryNetworkID = &recoveryNetworkID
2238 }
2239 case "fabricSpecificDetails":
2240 if v != nil {
2241 fabricSpecificDetails, err := unmarshalBasicFabricSpecificCreateNetworkMappingInput(*v)
2242 if err != nil {
2243 return err
2244 }
2245 cnmip.FabricSpecificDetails = fabricSpecificDetails
2246 }
2247 }
2248 }
2249
2250 return nil
2251 }
2252
2253
2254 type CreatePolicyInput struct {
2255
2256 Properties *CreatePolicyInputProperties `json:"properties,omitempty"`
2257 }
2258
2259
2260 type CreatePolicyInputProperties struct {
2261
2262 ProviderSpecificInput BasicPolicyProviderSpecificInput `json:"providerSpecificInput,omitempty"`
2263 }
2264
2265
2266 func (cpip *CreatePolicyInputProperties) UnmarshalJSON(body []byte) error {
2267 var m map[string]*json.RawMessage
2268 err := json.Unmarshal(body, &m)
2269 if err != nil {
2270 return err
2271 }
2272 for k, v := range m {
2273 switch k {
2274 case "providerSpecificInput":
2275 if v != nil {
2276 providerSpecificInput, err := unmarshalBasicPolicyProviderSpecificInput(*v)
2277 if err != nil {
2278 return err
2279 }
2280 cpip.ProviderSpecificInput = providerSpecificInput
2281 }
2282 }
2283 }
2284
2285 return nil
2286 }
2287
2288
2289 type CreateProtectionContainerInput struct {
2290
2291 Properties *CreateProtectionContainerInputProperties `json:"properties,omitempty"`
2292 }
2293
2294
2295 type CreateProtectionContainerInputProperties struct {
2296
2297 ProviderSpecificInput *[]BasicReplicationProviderSpecificContainerCreationInput `json:"providerSpecificInput,omitempty"`
2298 }
2299
2300
2301 func (cpcip *CreateProtectionContainerInputProperties) UnmarshalJSON(body []byte) error {
2302 var m map[string]*json.RawMessage
2303 err := json.Unmarshal(body, &m)
2304 if err != nil {
2305 return err
2306 }
2307 for k, v := range m {
2308 switch k {
2309 case "providerSpecificInput":
2310 if v != nil {
2311 providerSpecificInput, err := unmarshalBasicReplicationProviderSpecificContainerCreationInputArray(*v)
2312 if err != nil {
2313 return err
2314 }
2315 cpcip.ProviderSpecificInput = &providerSpecificInput
2316 }
2317 }
2318 }
2319
2320 return nil
2321 }
2322
2323
2324 type CreateProtectionContainerMappingInput struct {
2325
2326 Properties *CreateProtectionContainerMappingInputProperties `json:"properties,omitempty"`
2327 }
2328
2329
2330 type CreateProtectionContainerMappingInputProperties struct {
2331
2332 TargetProtectionContainerID *string `json:"targetProtectionContainerId,omitempty"`
2333
2334 PolicyID *string `json:"PolicyId,omitempty"`
2335
2336 ProviderSpecificInput *ReplicationProviderSpecificContainerMappingInput `json:"providerSpecificInput,omitempty"`
2337 }
2338
2339
2340 type CreateRecoveryPlanInput struct {
2341
2342 Properties *CreateRecoveryPlanInputProperties `json:"properties,omitempty"`
2343 }
2344
2345
2346 type CreateRecoveryPlanInputProperties struct {
2347
2348 PrimaryFabricID *string `json:"primaryFabricId,omitempty"`
2349
2350 RecoveryFabricID *string `json:"recoveryFabricId,omitempty"`
2351
2352 FailoverDeploymentModel FailoverDeploymentModel `json:"failoverDeploymentModel,omitempty"`
2353
2354 Groups *[]RecoveryPlanGroup `json:"groups,omitempty"`
2355 }
2356
2357
2358 type CurrentScenarioDetails struct {
2359
2360 ScenarioName *string `json:"scenarioName,omitempty"`
2361
2362 JobID *string `json:"jobId,omitempty"`
2363
2364 StartTime *date.Time `json:"startTime,omitempty"`
2365 }
2366
2367
2368 type DataStore struct {
2369
2370 SymbolicName *string `json:"symbolicName,omitempty"`
2371
2372 UUID *string `json:"uuid,omitempty"`
2373
2374 Capacity *string `json:"capacity,omitempty"`
2375
2376 FreeSpace *string `json:"freeSpace,omitempty"`
2377
2378 Type *string `json:"type,omitempty"`
2379 }
2380
2381
2382 type DisableProtectionInput struct {
2383
2384 Properties *DisableProtectionInputProperties `json:"properties,omitempty"`
2385 }
2386
2387
2388 type DisableProtectionInputProperties struct {
2389
2390 DisableProtectionReason DisableProtectionReason `json:"disableProtectionReason,omitempty"`
2391
2392 ReplicationProviderInput BasicDisableProtectionProviderSpecificInput `json:"replicationProviderInput,omitempty"`
2393 }
2394
2395
2396 func (dpip *DisableProtectionInputProperties) UnmarshalJSON(body []byte) error {
2397 var m map[string]*json.RawMessage
2398 err := json.Unmarshal(body, &m)
2399 if err != nil {
2400 return err
2401 }
2402 for k, v := range m {
2403 switch k {
2404 case "disableProtectionReason":
2405 if v != nil {
2406 var disableProtectionReason DisableProtectionReason
2407 err = json.Unmarshal(*v, &disableProtectionReason)
2408 if err != nil {
2409 return err
2410 }
2411 dpip.DisableProtectionReason = disableProtectionReason
2412 }
2413 case "replicationProviderInput":
2414 if v != nil {
2415 replicationProviderInput, err := unmarshalBasicDisableProtectionProviderSpecificInput(*v)
2416 if err != nil {
2417 return err
2418 }
2419 dpip.ReplicationProviderInput = replicationProviderInput
2420 }
2421 }
2422 }
2423
2424 return nil
2425 }
2426
2427
2428 type BasicDisableProtectionProviderSpecificInput interface {
2429 AsInMageDisableProtectionProviderSpecificInput() (*InMageDisableProtectionProviderSpecificInput, bool)
2430 AsDisableProtectionProviderSpecificInput() (*DisableProtectionProviderSpecificInput, bool)
2431 }
2432
2433
2434 type DisableProtectionProviderSpecificInput struct {
2435
2436 InstanceType InstanceTypeBasicDisableProtectionProviderSpecificInput `json:"instanceType,omitempty"`
2437 }
2438
2439 func unmarshalBasicDisableProtectionProviderSpecificInput(body []byte) (BasicDisableProtectionProviderSpecificInput, error) {
2440 var m map[string]interface{}
2441 err := json.Unmarshal(body, &m)
2442 if err != nil {
2443 return nil, err
2444 }
2445
2446 switch m["instanceType"] {
2447 case string(InstanceTypeInMage):
2448 var imdppsi InMageDisableProtectionProviderSpecificInput
2449 err := json.Unmarshal(body, &imdppsi)
2450 return imdppsi, err
2451 default:
2452 var dppsi DisableProtectionProviderSpecificInput
2453 err := json.Unmarshal(body, &dppsi)
2454 return dppsi, err
2455 }
2456 }
2457 func unmarshalBasicDisableProtectionProviderSpecificInputArray(body []byte) ([]BasicDisableProtectionProviderSpecificInput, error) {
2458 var rawMessages []*json.RawMessage
2459 err := json.Unmarshal(body, &rawMessages)
2460 if err != nil {
2461 return nil, err
2462 }
2463
2464 dppsiArray := make([]BasicDisableProtectionProviderSpecificInput, len(rawMessages))
2465
2466 for index, rawMessage := range rawMessages {
2467 dppsi, err := unmarshalBasicDisableProtectionProviderSpecificInput(*rawMessage)
2468 if err != nil {
2469 return nil, err
2470 }
2471 dppsiArray[index] = dppsi
2472 }
2473 return dppsiArray, nil
2474 }
2475
2476
2477 func (dppsi DisableProtectionProviderSpecificInput) MarshalJSON() ([]byte, error) {
2478 dppsi.InstanceType = InstanceTypeDisableProtectionProviderSpecificInput
2479 objectMap := make(map[string]interface{})
2480 if dppsi.InstanceType != "" {
2481 objectMap["instanceType"] = dppsi.InstanceType
2482 }
2483 return json.Marshal(objectMap)
2484 }
2485
2486
2487 func (dppsi DisableProtectionProviderSpecificInput) AsInMageDisableProtectionProviderSpecificInput() (*InMageDisableProtectionProviderSpecificInput, bool) {
2488 return nil, false
2489 }
2490
2491
2492 func (dppsi DisableProtectionProviderSpecificInput) AsDisableProtectionProviderSpecificInput() (*DisableProtectionProviderSpecificInput, bool) {
2493 return &dppsi, true
2494 }
2495
2496
2497 func (dppsi DisableProtectionProviderSpecificInput) AsBasicDisableProtectionProviderSpecificInput() (BasicDisableProtectionProviderSpecificInput, bool) {
2498 return &dppsi, true
2499 }
2500
2501
2502 type DiscoverProtectableItemRequest struct {
2503
2504 Properties *DiscoverProtectableItemRequestProperties `json:"properties,omitempty"`
2505 }
2506
2507
2508 type DiscoverProtectableItemRequestProperties struct {
2509
2510 FriendlyName *string `json:"friendlyName,omitempty"`
2511
2512 IPAddress *string `json:"ipAddress,omitempty"`
2513
2514 OsType *string `json:"osType,omitempty"`
2515 }
2516
2517
2518 type DiskDetails struct {
2519
2520 MaxSizeMB *int64 `json:"maxSizeMB,omitempty"`
2521
2522 VhdType *string `json:"vhdType,omitempty"`
2523
2524 VhdID *string `json:"vhdId,omitempty"`
2525
2526 VhdName *string `json:"vhdName,omitempty"`
2527 }
2528
2529
2530 type DiskVolumeDetails struct {
2531
2532 Label *string `json:"label,omitempty"`
2533
2534 Name *string `json:"name,omitempty"`
2535 }
2536
2537
2538
2539
2540 type Display struct {
2541
2542 Provider *string `json:"provider,omitempty"`
2543
2544 Resource *string `json:"resource,omitempty"`
2545
2546 Operation *string `json:"operation,omitempty"`
2547
2548 Description *string `json:"description,omitempty"`
2549 }
2550
2551
2552 type EnableProtectionInput struct {
2553
2554 Properties *EnableProtectionInputProperties `json:"properties,omitempty"`
2555 }
2556
2557
2558 type EnableProtectionInputProperties struct {
2559
2560 PolicyID *string `json:"policyId,omitempty"`
2561
2562 ProtectableItemID *string `json:"protectableItemId,omitempty"`
2563
2564 ProviderSpecificDetails BasicEnableProtectionProviderSpecificInput `json:"providerSpecificDetails,omitempty"`
2565 }
2566
2567
2568 func (epip *EnableProtectionInputProperties) UnmarshalJSON(body []byte) error {
2569 var m map[string]*json.RawMessage
2570 err := json.Unmarshal(body, &m)
2571 if err != nil {
2572 return err
2573 }
2574 for k, v := range m {
2575 switch k {
2576 case "policyId":
2577 if v != nil {
2578 var policyID string
2579 err = json.Unmarshal(*v, &policyID)
2580 if err != nil {
2581 return err
2582 }
2583 epip.PolicyID = &policyID
2584 }
2585 case "protectableItemId":
2586 if v != nil {
2587 var protectableItemID string
2588 err = json.Unmarshal(*v, &protectableItemID)
2589 if err != nil {
2590 return err
2591 }
2592 epip.ProtectableItemID = &protectableItemID
2593 }
2594 case "providerSpecificDetails":
2595 if v != nil {
2596 providerSpecificDetails, err := unmarshalBasicEnableProtectionProviderSpecificInput(*v)
2597 if err != nil {
2598 return err
2599 }
2600 epip.ProviderSpecificDetails = providerSpecificDetails
2601 }
2602 }
2603 }
2604
2605 return nil
2606 }
2607
2608
2609 type BasicEnableProtectionProviderSpecificInput interface {
2610 AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool)
2611 AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool)
2612 AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool)
2613 AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool)
2614 AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool)
2615 AsEnableProtectionProviderSpecificInput() (*EnableProtectionProviderSpecificInput, bool)
2616 }
2617
2618
2619 type EnableProtectionProviderSpecificInput struct {
2620
2621 InstanceType InstanceTypeBasicEnableProtectionProviderSpecificInput `json:"instanceType,omitempty"`
2622 }
2623
2624 func unmarshalBasicEnableProtectionProviderSpecificInput(body []byte) (BasicEnableProtectionProviderSpecificInput, error) {
2625 var m map[string]interface{}
2626 err := json.Unmarshal(body, &m)
2627 if err != nil {
2628 return nil, err
2629 }
2630
2631 switch m["instanceType"] {
2632 case string(InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeHyperVReplicaAzure):
2633 var hvraepi HyperVReplicaAzureEnableProtectionInput
2634 err := json.Unmarshal(body, &hvraepi)
2635 return hvraepi, err
2636 case string(InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeSan):
2637 var sepi SanEnableProtectionInput
2638 err := json.Unmarshal(body, &sepi)
2639 return sepi, err
2640 case string(InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMageAzureV2):
2641 var imavepi InMageAzureV2EnableProtectionInput
2642 err := json.Unmarshal(body, &imavepi)
2643 return imavepi, err
2644 case string(InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMage):
2645 var imepi InMageEnableProtectionInput
2646 err := json.Unmarshal(body, &imepi)
2647 return imepi, err
2648 case string(InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeA2A):
2649 var aepi A2AEnableProtectionInput
2650 err := json.Unmarshal(body, &aepi)
2651 return aepi, err
2652 default:
2653 var eppsi EnableProtectionProviderSpecificInput
2654 err := json.Unmarshal(body, &eppsi)
2655 return eppsi, err
2656 }
2657 }
2658 func unmarshalBasicEnableProtectionProviderSpecificInputArray(body []byte) ([]BasicEnableProtectionProviderSpecificInput, error) {
2659 var rawMessages []*json.RawMessage
2660 err := json.Unmarshal(body, &rawMessages)
2661 if err != nil {
2662 return nil, err
2663 }
2664
2665 eppsiArray := make([]BasicEnableProtectionProviderSpecificInput, len(rawMessages))
2666
2667 for index, rawMessage := range rawMessages {
2668 eppsi, err := unmarshalBasicEnableProtectionProviderSpecificInput(*rawMessage)
2669 if err != nil {
2670 return nil, err
2671 }
2672 eppsiArray[index] = eppsi
2673 }
2674 return eppsiArray, nil
2675 }
2676
2677
2678 func (eppsi EnableProtectionProviderSpecificInput) MarshalJSON() ([]byte, error) {
2679 eppsi.InstanceType = InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeEnableProtectionProviderSpecificInput
2680 objectMap := make(map[string]interface{})
2681 if eppsi.InstanceType != "" {
2682 objectMap["instanceType"] = eppsi.InstanceType
2683 }
2684 return json.Marshal(objectMap)
2685 }
2686
2687
2688 func (eppsi EnableProtectionProviderSpecificInput) AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool) {
2689 return nil, false
2690 }
2691
2692
2693 func (eppsi EnableProtectionProviderSpecificInput) AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool) {
2694 return nil, false
2695 }
2696
2697
2698 func (eppsi EnableProtectionProviderSpecificInput) AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool) {
2699 return nil, false
2700 }
2701
2702
2703 func (eppsi EnableProtectionProviderSpecificInput) AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool) {
2704 return nil, false
2705 }
2706
2707
2708 func (eppsi EnableProtectionProviderSpecificInput) AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool) {
2709 return nil, false
2710 }
2711
2712
2713 func (eppsi EnableProtectionProviderSpecificInput) AsEnableProtectionProviderSpecificInput() (*EnableProtectionProviderSpecificInput, bool) {
2714 return &eppsi, true
2715 }
2716
2717
2718 func (eppsi EnableProtectionProviderSpecificInput) AsBasicEnableProtectionProviderSpecificInput() (BasicEnableProtectionProviderSpecificInput, bool) {
2719 return &eppsi, true
2720 }
2721
2722
2723 type EncryptionDetails struct {
2724
2725 KekState *string `json:"kekState,omitempty"`
2726
2727 KekCertThumbprint *string `json:"kekCertThumbprint,omitempty"`
2728
2729 KekCertExpiryDate *date.Time `json:"kekCertExpiryDate,omitempty"`
2730 }
2731
2732
2733 type Event struct {
2734 autorest.Response `json:"-"`
2735
2736 Properties *EventProperties `json:"properties,omitempty"`
2737
2738 ID *string `json:"id,omitempty"`
2739
2740 Name *string `json:"name,omitempty"`
2741
2742 Type *string `json:"type,omitempty"`
2743
2744 Location *string `json:"location,omitempty"`
2745 }
2746
2747
2748 func (e Event) MarshalJSON() ([]byte, error) {
2749 objectMap := make(map[string]interface{})
2750 if e.Properties != nil {
2751 objectMap["properties"] = e.Properties
2752 }
2753 if e.Location != nil {
2754 objectMap["location"] = e.Location
2755 }
2756 return json.Marshal(objectMap)
2757 }
2758
2759
2760 type EventCollection struct {
2761 autorest.Response `json:"-"`
2762
2763 Value *[]Event `json:"value,omitempty"`
2764
2765 NextLink *string `json:"nextLink,omitempty"`
2766 }
2767
2768
2769 type EventCollectionIterator struct {
2770 i int
2771 page EventCollectionPage
2772 }
2773
2774
2775
2776 func (iter *EventCollectionIterator) NextWithContext(ctx context.Context) (err error) {
2777 if tracing.IsEnabled() {
2778 ctx = tracing.StartSpan(ctx, fqdn+"/EventCollectionIterator.NextWithContext")
2779 defer func() {
2780 sc := -1
2781 if iter.Response().Response.Response != nil {
2782 sc = iter.Response().Response.Response.StatusCode
2783 }
2784 tracing.EndSpan(ctx, sc, err)
2785 }()
2786 }
2787 iter.i++
2788 if iter.i < len(iter.page.Values()) {
2789 return nil
2790 }
2791 err = iter.page.NextWithContext(ctx)
2792 if err != nil {
2793 iter.i--
2794 return err
2795 }
2796 iter.i = 0
2797 return nil
2798 }
2799
2800
2801
2802
2803 func (iter *EventCollectionIterator) Next() error {
2804 return iter.NextWithContext(context.Background())
2805 }
2806
2807
2808 func (iter EventCollectionIterator) NotDone() bool {
2809 return iter.page.NotDone() && iter.i < len(iter.page.Values())
2810 }
2811
2812
2813 func (iter EventCollectionIterator) Response() EventCollection {
2814 return iter.page.Response()
2815 }
2816
2817
2818
2819 func (iter EventCollectionIterator) Value() Event {
2820 if !iter.page.NotDone() {
2821 return Event{}
2822 }
2823 return iter.page.Values()[iter.i]
2824 }
2825
2826
2827 func NewEventCollectionIterator(page EventCollectionPage) EventCollectionIterator {
2828 return EventCollectionIterator{page: page}
2829 }
2830
2831
2832 func (ec EventCollection) IsEmpty() bool {
2833 return ec.Value == nil || len(*ec.Value) == 0
2834 }
2835
2836
2837 func (ec EventCollection) hasNextLink() bool {
2838 return ec.NextLink != nil && len(*ec.NextLink) != 0
2839 }
2840
2841
2842
2843 func (ec EventCollection) eventCollectionPreparer(ctx context.Context) (*http.Request, error) {
2844 if !ec.hasNextLink() {
2845 return nil, nil
2846 }
2847 return autorest.Prepare((&http.Request{}).WithContext(ctx),
2848 autorest.AsJSON(),
2849 autorest.AsGet(),
2850 autorest.WithBaseURL(to.String(ec.NextLink)))
2851 }
2852
2853
2854 type EventCollectionPage struct {
2855 fn func(context.Context, EventCollection) (EventCollection, error)
2856 ec EventCollection
2857 }
2858
2859
2860
2861 func (page *EventCollectionPage) NextWithContext(ctx context.Context) (err error) {
2862 if tracing.IsEnabled() {
2863 ctx = tracing.StartSpan(ctx, fqdn+"/EventCollectionPage.NextWithContext")
2864 defer func() {
2865 sc := -1
2866 if page.Response().Response.Response != nil {
2867 sc = page.Response().Response.Response.StatusCode
2868 }
2869 tracing.EndSpan(ctx, sc, err)
2870 }()
2871 }
2872 for {
2873 next, err := page.fn(ctx, page.ec)
2874 if err != nil {
2875 return err
2876 }
2877 page.ec = next
2878 if !next.hasNextLink() || !next.IsEmpty() {
2879 break
2880 }
2881 }
2882 return nil
2883 }
2884
2885
2886
2887
2888 func (page *EventCollectionPage) Next() error {
2889 return page.NextWithContext(context.Background())
2890 }
2891
2892
2893 func (page EventCollectionPage) NotDone() bool {
2894 return !page.ec.IsEmpty()
2895 }
2896
2897
2898 func (page EventCollectionPage) Response() EventCollection {
2899 return page.ec
2900 }
2901
2902
2903 func (page EventCollectionPage) Values() []Event {
2904 if page.ec.IsEmpty() {
2905 return nil
2906 }
2907 return *page.ec.Value
2908 }
2909
2910
2911 func NewEventCollectionPage(cur EventCollection, getNextPage func(context.Context, EventCollection) (EventCollection, error)) EventCollectionPage {
2912 return EventCollectionPage{
2913 fn: getNextPage,
2914 ec: cur,
2915 }
2916 }
2917
2918
2919 type EventProperties struct {
2920
2921 EventCode *string `json:"eventCode,omitempty"`
2922
2923 Description *string `json:"description,omitempty"`
2924
2925 EventType *string `json:"eventType,omitempty"`
2926
2927 AffectedObjectFriendlyName *string `json:"affectedObjectFriendlyName,omitempty"`
2928
2929 Severity *string `json:"severity,omitempty"`
2930
2931 TimeOfOccurrence *date.Time `json:"timeOfOccurrence,omitempty"`
2932
2933 FabricID *string `json:"fabricId,omitempty"`
2934
2935 ProviderSpecificDetails BasicEventProviderSpecificDetails `json:"providerSpecificDetails,omitempty"`
2936
2937 EventSpecificDetails BasicEventSpecificDetails `json:"eventSpecificDetails,omitempty"`
2938
2939 HealthErrors *[]HealthError `json:"healthErrors,omitempty"`
2940 }
2941
2942
2943 func (ep *EventProperties) UnmarshalJSON(body []byte) error {
2944 var m map[string]*json.RawMessage
2945 err := json.Unmarshal(body, &m)
2946 if err != nil {
2947 return err
2948 }
2949 for k, v := range m {
2950 switch k {
2951 case "eventCode":
2952 if v != nil {
2953 var eventCode string
2954 err = json.Unmarshal(*v, &eventCode)
2955 if err != nil {
2956 return err
2957 }
2958 ep.EventCode = &eventCode
2959 }
2960 case "description":
2961 if v != nil {
2962 var description string
2963 err = json.Unmarshal(*v, &description)
2964 if err != nil {
2965 return err
2966 }
2967 ep.Description = &description
2968 }
2969 case "eventType":
2970 if v != nil {
2971 var eventType string
2972 err = json.Unmarshal(*v, &eventType)
2973 if err != nil {
2974 return err
2975 }
2976 ep.EventType = &eventType
2977 }
2978 case "affectedObjectFriendlyName":
2979 if v != nil {
2980 var affectedObjectFriendlyName string
2981 err = json.Unmarshal(*v, &affectedObjectFriendlyName)
2982 if err != nil {
2983 return err
2984 }
2985 ep.AffectedObjectFriendlyName = &affectedObjectFriendlyName
2986 }
2987 case "severity":
2988 if v != nil {
2989 var severity string
2990 err = json.Unmarshal(*v, &severity)
2991 if err != nil {
2992 return err
2993 }
2994 ep.Severity = &severity
2995 }
2996 case "timeOfOccurrence":
2997 if v != nil {
2998 var timeOfOccurrence date.Time
2999 err = json.Unmarshal(*v, &timeOfOccurrence)
3000 if err != nil {
3001 return err
3002 }
3003 ep.TimeOfOccurrence = &timeOfOccurrence
3004 }
3005 case "fabricId":
3006 if v != nil {
3007 var fabricID string
3008 err = json.Unmarshal(*v, &fabricID)
3009 if err != nil {
3010 return err
3011 }
3012 ep.FabricID = &fabricID
3013 }
3014 case "providerSpecificDetails":
3015 if v != nil {
3016 providerSpecificDetails, err := unmarshalBasicEventProviderSpecificDetails(*v)
3017 if err != nil {
3018 return err
3019 }
3020 ep.ProviderSpecificDetails = providerSpecificDetails
3021 }
3022 case "eventSpecificDetails":
3023 if v != nil {
3024 eventSpecificDetails, err := unmarshalBasicEventSpecificDetails(*v)
3025 if err != nil {
3026 return err
3027 }
3028 ep.EventSpecificDetails = eventSpecificDetails
3029 }
3030 case "healthErrors":
3031 if v != nil {
3032 var healthErrors []HealthError
3033 err = json.Unmarshal(*v, &healthErrors)
3034 if err != nil {
3035 return err
3036 }
3037 ep.HealthErrors = &healthErrors
3038 }
3039 }
3040 }
3041
3042 return nil
3043 }
3044
3045
3046 type BasicEventProviderSpecificDetails interface {
3047 AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool)
3048 AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool)
3049 AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool)
3050 AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool)
3051 AsA2AEventDetails() (*A2AEventDetails, bool)
3052 AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool)
3053 AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool)
3054 }
3055
3056
3057 type EventProviderSpecificDetails struct {
3058
3059 InstanceType InstanceType `json:"instanceType,omitempty"`
3060 }
3061
3062 func unmarshalBasicEventProviderSpecificDetails(body []byte) (BasicEventProviderSpecificDetails, error) {
3063 var m map[string]interface{}
3064 err := json.Unmarshal(body, &m)
3065 if err != nil {
3066 return nil, err
3067 }
3068
3069 switch m["instanceType"] {
3070 case string(InstanceTypeHyperVReplicaBaseEventDetails):
3071 var hvrbed HyperVReplicaBaseEventDetails
3072 err := json.Unmarshal(body, &hvrbed)
3073 return hvrbed, err
3074 case string(InstanceTypeHyperVReplica2012):
3075 var hvr2ed HyperVReplica2012EventDetails
3076 err := json.Unmarshal(body, &hvr2ed)
3077 return hvr2ed, err
3078 case string(InstanceTypeHyperVReplica2012R2):
3079 var hvr2ed HyperVReplica2012R2EventDetails
3080 err := json.Unmarshal(body, &hvr2ed)
3081 return hvr2ed, err
3082 case string(InstanceTypeHyperVReplicaAzure):
3083 var hvraed HyperVReplicaAzureEventDetails
3084 err := json.Unmarshal(body, &hvraed)
3085 return hvraed, err
3086 case string(InstanceTypeA2A):
3087 var aed A2AEventDetails
3088 err := json.Unmarshal(body, &aed)
3089 return aed, err
3090 case string(InstanceTypeInMageAzureV2):
3091 var imaved InMageAzureV2EventDetails
3092 err := json.Unmarshal(body, &imaved)
3093 return imaved, err
3094 default:
3095 var epsd EventProviderSpecificDetails
3096 err := json.Unmarshal(body, &epsd)
3097 return epsd, err
3098 }
3099 }
3100 func unmarshalBasicEventProviderSpecificDetailsArray(body []byte) ([]BasicEventProviderSpecificDetails, error) {
3101 var rawMessages []*json.RawMessage
3102 err := json.Unmarshal(body, &rawMessages)
3103 if err != nil {
3104 return nil, err
3105 }
3106
3107 epsdArray := make([]BasicEventProviderSpecificDetails, len(rawMessages))
3108
3109 for index, rawMessage := range rawMessages {
3110 epsd, err := unmarshalBasicEventProviderSpecificDetails(*rawMessage)
3111 if err != nil {
3112 return nil, err
3113 }
3114 epsdArray[index] = epsd
3115 }
3116 return epsdArray, nil
3117 }
3118
3119
3120 func (epsd EventProviderSpecificDetails) MarshalJSON() ([]byte, error) {
3121 epsd.InstanceType = InstanceTypeEventProviderSpecificDetails
3122 objectMap := make(map[string]interface{})
3123 if epsd.InstanceType != "" {
3124 objectMap["instanceType"] = epsd.InstanceType
3125 }
3126 return json.Marshal(objectMap)
3127 }
3128
3129
3130 func (epsd EventProviderSpecificDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) {
3131 return nil, false
3132 }
3133
3134
3135 func (epsd EventProviderSpecificDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) {
3136 return nil, false
3137 }
3138
3139
3140 func (epsd EventProviderSpecificDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) {
3141 return nil, false
3142 }
3143
3144
3145 func (epsd EventProviderSpecificDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) {
3146 return nil, false
3147 }
3148
3149
3150 func (epsd EventProviderSpecificDetails) AsA2AEventDetails() (*A2AEventDetails, bool) {
3151 return nil, false
3152 }
3153
3154
3155 func (epsd EventProviderSpecificDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) {
3156 return nil, false
3157 }
3158
3159
3160 func (epsd EventProviderSpecificDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) {
3161 return &epsd, true
3162 }
3163
3164
3165 func (epsd EventProviderSpecificDetails) AsBasicEventProviderSpecificDetails() (BasicEventProviderSpecificDetails, bool) {
3166 return &epsd, true
3167 }
3168
3169
3170 type EventQueryParameter struct {
3171
3172 EventCode *string `json:"EventCode,omitempty"`
3173
3174 Severity *string `json:"Severity,omitempty"`
3175
3176 EventType *string `json:"EventType,omitempty"`
3177
3178 FabricName *string `json:"FabricName,omitempty"`
3179
3180 AffectedObjectFriendlyName *string `json:"AffectedObjectFriendlyName,omitempty"`
3181
3182 StartTime *date.Time `json:"StartTime,omitempty"`
3183
3184 EndTime *date.Time `json:"EndTime,omitempty"`
3185 }
3186
3187
3188 type BasicEventSpecificDetails interface {
3189 AsJobStatusEventDetails() (*JobStatusEventDetails, bool)
3190 AsEventSpecificDetails() (*EventSpecificDetails, bool)
3191 }
3192
3193
3194 type EventSpecificDetails struct {
3195
3196 InstanceType InstanceTypeBasicEventSpecificDetails `json:"instanceType,omitempty"`
3197 }
3198
3199 func unmarshalBasicEventSpecificDetails(body []byte) (BasicEventSpecificDetails, error) {
3200 var m map[string]interface{}
3201 err := json.Unmarshal(body, &m)
3202 if err != nil {
3203 return nil, err
3204 }
3205
3206 switch m["instanceType"] {
3207 case string(InstanceTypeJobStatus):
3208 var jsed JobStatusEventDetails
3209 err := json.Unmarshal(body, &jsed)
3210 return jsed, err
3211 default:
3212 var esd EventSpecificDetails
3213 err := json.Unmarshal(body, &esd)
3214 return esd, err
3215 }
3216 }
3217 func unmarshalBasicEventSpecificDetailsArray(body []byte) ([]BasicEventSpecificDetails, error) {
3218 var rawMessages []*json.RawMessage
3219 err := json.Unmarshal(body, &rawMessages)
3220 if err != nil {
3221 return nil, err
3222 }
3223
3224 esdArray := make([]BasicEventSpecificDetails, len(rawMessages))
3225
3226 for index, rawMessage := range rawMessages {
3227 esd, err := unmarshalBasicEventSpecificDetails(*rawMessage)
3228 if err != nil {
3229 return nil, err
3230 }
3231 esdArray[index] = esd
3232 }
3233 return esdArray, nil
3234 }
3235
3236
3237 func (esd EventSpecificDetails) MarshalJSON() ([]byte, error) {
3238 esd.InstanceType = InstanceTypeEventSpecificDetails
3239 objectMap := make(map[string]interface{})
3240 if esd.InstanceType != "" {
3241 objectMap["instanceType"] = esd.InstanceType
3242 }
3243 return json.Marshal(objectMap)
3244 }
3245
3246
3247 func (esd EventSpecificDetails) AsJobStatusEventDetails() (*JobStatusEventDetails, bool) {
3248 return nil, false
3249 }
3250
3251
3252 func (esd EventSpecificDetails) AsEventSpecificDetails() (*EventSpecificDetails, bool) {
3253 return &esd, true
3254 }
3255
3256
3257 func (esd EventSpecificDetails) AsBasicEventSpecificDetails() (BasicEventSpecificDetails, bool) {
3258 return &esd, true
3259 }
3260
3261
3262 type ExportJobDetails struct {
3263
3264 BlobURI *string `json:"blobUri,omitempty"`
3265
3266 SasToken *string `json:"sasToken,omitempty"`
3267
3268 AffectedObjectDetails map[string]*string `json:"affectedObjectDetails"`
3269
3270 InstanceType InstanceTypeBasicJobDetails `json:"instanceType,omitempty"`
3271 }
3272
3273
3274 func (ejd ExportJobDetails) MarshalJSON() ([]byte, error) {
3275 ejd.InstanceType = InstanceTypeExportJobDetails
3276 objectMap := make(map[string]interface{})
3277 if ejd.BlobURI != nil {
3278 objectMap["blobUri"] = ejd.BlobURI
3279 }
3280 if ejd.SasToken != nil {
3281 objectMap["sasToken"] = ejd.SasToken
3282 }
3283 if ejd.AffectedObjectDetails != nil {
3284 objectMap["affectedObjectDetails"] = ejd.AffectedObjectDetails
3285 }
3286 if ejd.InstanceType != "" {
3287 objectMap["instanceType"] = ejd.InstanceType
3288 }
3289 return json.Marshal(objectMap)
3290 }
3291
3292
3293 func (ejd ExportJobDetails) AsAsrJobDetails() (*AsrJobDetails, bool) {
3294 return nil, false
3295 }
3296
3297
3298 func (ejd ExportJobDetails) AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool) {
3299 return nil, false
3300 }
3301
3302
3303 func (ejd ExportJobDetails) AsFailoverJobDetails() (*FailoverJobDetails, bool) {
3304 return nil, false
3305 }
3306
3307
3308 func (ejd ExportJobDetails) AsExportJobDetails() (*ExportJobDetails, bool) {
3309 return &ejd, true
3310 }
3311
3312
3313 func (ejd ExportJobDetails) AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool) {
3314 return nil, false
3315 }
3316
3317
3318 func (ejd ExportJobDetails) AsJobDetails() (*JobDetails, bool) {
3319 return nil, false
3320 }
3321
3322
3323 func (ejd ExportJobDetails) AsBasicJobDetails() (BasicJobDetails, bool) {
3324 return &ejd, true
3325 }
3326
3327
3328 type Fabric struct {
3329 autorest.Response `json:"-"`
3330
3331 Properties *FabricProperties `json:"properties,omitempty"`
3332
3333 ID *string `json:"id,omitempty"`
3334
3335 Name *string `json:"name,omitempty"`
3336
3337 Type *string `json:"type,omitempty"`
3338
3339 Location *string `json:"location,omitempty"`
3340 }
3341
3342
3343 func (f Fabric) MarshalJSON() ([]byte, error) {
3344 objectMap := make(map[string]interface{})
3345 if f.Properties != nil {
3346 objectMap["properties"] = f.Properties
3347 }
3348 if f.Location != nil {
3349 objectMap["location"] = f.Location
3350 }
3351 return json.Marshal(objectMap)
3352 }
3353
3354
3355 type FabricCollection struct {
3356 autorest.Response `json:"-"`
3357
3358 Value *[]Fabric `json:"value,omitempty"`
3359
3360 NextLink *string `json:"nextLink,omitempty"`
3361 }
3362
3363
3364 type FabricCollectionIterator struct {
3365 i int
3366 page FabricCollectionPage
3367 }
3368
3369
3370
3371 func (iter *FabricCollectionIterator) NextWithContext(ctx context.Context) (err error) {
3372 if tracing.IsEnabled() {
3373 ctx = tracing.StartSpan(ctx, fqdn+"/FabricCollectionIterator.NextWithContext")
3374 defer func() {
3375 sc := -1
3376 if iter.Response().Response.Response != nil {
3377 sc = iter.Response().Response.Response.StatusCode
3378 }
3379 tracing.EndSpan(ctx, sc, err)
3380 }()
3381 }
3382 iter.i++
3383 if iter.i < len(iter.page.Values()) {
3384 return nil
3385 }
3386 err = iter.page.NextWithContext(ctx)
3387 if err != nil {
3388 iter.i--
3389 return err
3390 }
3391 iter.i = 0
3392 return nil
3393 }
3394
3395
3396
3397
3398 func (iter *FabricCollectionIterator) Next() error {
3399 return iter.NextWithContext(context.Background())
3400 }
3401
3402
3403 func (iter FabricCollectionIterator) NotDone() bool {
3404 return iter.page.NotDone() && iter.i < len(iter.page.Values())
3405 }
3406
3407
3408 func (iter FabricCollectionIterator) Response() FabricCollection {
3409 return iter.page.Response()
3410 }
3411
3412
3413
3414 func (iter FabricCollectionIterator) Value() Fabric {
3415 if !iter.page.NotDone() {
3416 return Fabric{}
3417 }
3418 return iter.page.Values()[iter.i]
3419 }
3420
3421
3422 func NewFabricCollectionIterator(page FabricCollectionPage) FabricCollectionIterator {
3423 return FabricCollectionIterator{page: page}
3424 }
3425
3426
3427 func (fc FabricCollection) IsEmpty() bool {
3428 return fc.Value == nil || len(*fc.Value) == 0
3429 }
3430
3431
3432 func (fc FabricCollection) hasNextLink() bool {
3433 return fc.NextLink != nil && len(*fc.NextLink) != 0
3434 }
3435
3436
3437
3438 func (fc FabricCollection) fabricCollectionPreparer(ctx context.Context) (*http.Request, error) {
3439 if !fc.hasNextLink() {
3440 return nil, nil
3441 }
3442 return autorest.Prepare((&http.Request{}).WithContext(ctx),
3443 autorest.AsJSON(),
3444 autorest.AsGet(),
3445 autorest.WithBaseURL(to.String(fc.NextLink)))
3446 }
3447
3448
3449 type FabricCollectionPage struct {
3450 fn func(context.Context, FabricCollection) (FabricCollection, error)
3451 fc FabricCollection
3452 }
3453
3454
3455
3456 func (page *FabricCollectionPage) NextWithContext(ctx context.Context) (err error) {
3457 if tracing.IsEnabled() {
3458 ctx = tracing.StartSpan(ctx, fqdn+"/FabricCollectionPage.NextWithContext")
3459 defer func() {
3460 sc := -1
3461 if page.Response().Response.Response != nil {
3462 sc = page.Response().Response.Response.StatusCode
3463 }
3464 tracing.EndSpan(ctx, sc, err)
3465 }()
3466 }
3467 for {
3468 next, err := page.fn(ctx, page.fc)
3469 if err != nil {
3470 return err
3471 }
3472 page.fc = next
3473 if !next.hasNextLink() || !next.IsEmpty() {
3474 break
3475 }
3476 }
3477 return nil
3478 }
3479
3480
3481
3482
3483 func (page *FabricCollectionPage) Next() error {
3484 return page.NextWithContext(context.Background())
3485 }
3486
3487
3488 func (page FabricCollectionPage) NotDone() bool {
3489 return !page.fc.IsEmpty()
3490 }
3491
3492
3493 func (page FabricCollectionPage) Response() FabricCollection {
3494 return page.fc
3495 }
3496
3497
3498 func (page FabricCollectionPage) Values() []Fabric {
3499 if page.fc.IsEmpty() {
3500 return nil
3501 }
3502 return *page.fc.Value
3503 }
3504
3505
3506 func NewFabricCollectionPage(cur FabricCollection, getNextPage func(context.Context, FabricCollection) (FabricCollection, error)) FabricCollectionPage {
3507 return FabricCollectionPage{
3508 fn: getNextPage,
3509 fc: cur,
3510 }
3511 }
3512
3513
3514 type FabricCreationInput struct {
3515
3516 Properties *FabricCreationInputProperties `json:"properties,omitempty"`
3517 }
3518
3519
3520 type FabricCreationInputProperties struct {
3521
3522 CustomDetails BasicFabricSpecificCreationInput `json:"customDetails,omitempty"`
3523 }
3524
3525
3526 func (fcip *FabricCreationInputProperties) UnmarshalJSON(body []byte) error {
3527 var m map[string]*json.RawMessage
3528 err := json.Unmarshal(body, &m)
3529 if err != nil {
3530 return err
3531 }
3532 for k, v := range m {
3533 switch k {
3534 case "customDetails":
3535 if v != nil {
3536 customDetails, err := unmarshalBasicFabricSpecificCreationInput(*v)
3537 if err != nil {
3538 return err
3539 }
3540 fcip.CustomDetails = customDetails
3541 }
3542 }
3543 }
3544
3545 return nil
3546 }
3547
3548
3549 type FabricProperties struct {
3550
3551 FriendlyName *string `json:"friendlyName,omitempty"`
3552
3553 EncryptionDetails *EncryptionDetails `json:"encryptionDetails,omitempty"`
3554
3555 RolloverEncryptionDetails *EncryptionDetails `json:"rolloverEncryptionDetails,omitempty"`
3556
3557 InternalIdentifier *string `json:"internalIdentifier,omitempty"`
3558
3559 BcdrState *string `json:"bcdrState,omitempty"`
3560
3561 CustomDetails BasicFabricSpecificDetails `json:"customDetails,omitempty"`
3562
3563 HealthErrorDetails *[]HealthError `json:"healthErrorDetails,omitempty"`
3564
3565 Health *string `json:"health,omitempty"`
3566 }
3567
3568
3569 func (fp *FabricProperties) UnmarshalJSON(body []byte) error {
3570 var m map[string]*json.RawMessage
3571 err := json.Unmarshal(body, &m)
3572 if err != nil {
3573 return err
3574 }
3575 for k, v := range m {
3576 switch k {
3577 case "friendlyName":
3578 if v != nil {
3579 var friendlyName string
3580 err = json.Unmarshal(*v, &friendlyName)
3581 if err != nil {
3582 return err
3583 }
3584 fp.FriendlyName = &friendlyName
3585 }
3586 case "encryptionDetails":
3587 if v != nil {
3588 var encryptionDetails EncryptionDetails
3589 err = json.Unmarshal(*v, &encryptionDetails)
3590 if err != nil {
3591 return err
3592 }
3593 fp.EncryptionDetails = &encryptionDetails
3594 }
3595 case "rolloverEncryptionDetails":
3596 if v != nil {
3597 var rolloverEncryptionDetails EncryptionDetails
3598 err = json.Unmarshal(*v, &rolloverEncryptionDetails)
3599 if err != nil {
3600 return err
3601 }
3602 fp.RolloverEncryptionDetails = &rolloverEncryptionDetails
3603 }
3604 case "internalIdentifier":
3605 if v != nil {
3606 var internalIdentifier string
3607 err = json.Unmarshal(*v, &internalIdentifier)
3608 if err != nil {
3609 return err
3610 }
3611 fp.InternalIdentifier = &internalIdentifier
3612 }
3613 case "bcdrState":
3614 if v != nil {
3615 var bcdrState string
3616 err = json.Unmarshal(*v, &bcdrState)
3617 if err != nil {
3618 return err
3619 }
3620 fp.BcdrState = &bcdrState
3621 }
3622 case "customDetails":
3623 if v != nil {
3624 customDetails, err := unmarshalBasicFabricSpecificDetails(*v)
3625 if err != nil {
3626 return err
3627 }
3628 fp.CustomDetails = customDetails
3629 }
3630 case "healthErrorDetails":
3631 if v != nil {
3632 var healthErrorDetails []HealthError
3633 err = json.Unmarshal(*v, &healthErrorDetails)
3634 if err != nil {
3635 return err
3636 }
3637 fp.HealthErrorDetails = &healthErrorDetails
3638 }
3639 case "health":
3640 if v != nil {
3641 var health string
3642 err = json.Unmarshal(*v, &health)
3643 if err != nil {
3644 return err
3645 }
3646 fp.Health = &health
3647 }
3648 }
3649 }
3650
3651 return nil
3652 }
3653
3654
3655 type FabricReplicationGroupTaskDetails struct {
3656
3657 SkippedReason *string `json:"skippedReason,omitempty"`
3658
3659 SkippedReasonString *string `json:"skippedReasonString,omitempty"`
3660
3661 JobTask *JobEntity `json:"jobTask,omitempty"`
3662
3663 InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"`
3664 }
3665
3666
3667 func (frgtd FabricReplicationGroupTaskDetails) MarshalJSON() ([]byte, error) {
3668 frgtd.InstanceType = InstanceTypeFabricReplicationGroupTaskDetails
3669 objectMap := make(map[string]interface{})
3670 if frgtd.SkippedReason != nil {
3671 objectMap["skippedReason"] = frgtd.SkippedReason
3672 }
3673 if frgtd.SkippedReasonString != nil {
3674 objectMap["skippedReasonString"] = frgtd.SkippedReasonString
3675 }
3676 if frgtd.JobTask != nil {
3677 objectMap["jobTask"] = frgtd.JobTask
3678 }
3679 if frgtd.InstanceType != "" {
3680 objectMap["instanceType"] = frgtd.InstanceType
3681 }
3682 return json.Marshal(objectMap)
3683 }
3684
3685
3686 func (frgtd FabricReplicationGroupTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) {
3687 return nil, false
3688 }
3689
3690
3691 func (frgtd FabricReplicationGroupTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) {
3692 return nil, false
3693 }
3694
3695
3696 func (frgtd FabricReplicationGroupTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) {
3697 return &frgtd, true
3698 }
3699
3700
3701 func (frgtd FabricReplicationGroupTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) {
3702 return nil, false
3703 }
3704
3705
3706 func (frgtd FabricReplicationGroupTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) {
3707 return nil, false
3708 }
3709
3710
3711 func (frgtd FabricReplicationGroupTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) {
3712 return nil, false
3713 }
3714
3715
3716 func (frgtd FabricReplicationGroupTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) {
3717 return nil, false
3718 }
3719
3720
3721 func (frgtd FabricReplicationGroupTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) {
3722 return nil, false
3723 }
3724
3725
3726 func (frgtd FabricReplicationGroupTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) {
3727 return nil, false
3728 }
3729
3730
3731 func (frgtd FabricReplicationGroupTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) {
3732 return &frgtd, true
3733 }
3734
3735
3736 type BasicFabricSpecificCreateNetworkMappingInput interface {
3737 AsAzureToAzureCreateNetworkMappingInput() (*AzureToAzureCreateNetworkMappingInput, bool)
3738 AsVmmToAzureCreateNetworkMappingInput() (*VmmToAzureCreateNetworkMappingInput, bool)
3739 AsVmmToVmmCreateNetworkMappingInput() (*VmmToVmmCreateNetworkMappingInput, bool)
3740 AsFabricSpecificCreateNetworkMappingInput() (*FabricSpecificCreateNetworkMappingInput, bool)
3741 }
3742
3743
3744 type FabricSpecificCreateNetworkMappingInput struct {
3745
3746 InstanceType InstanceTypeBasicFabricSpecificCreateNetworkMappingInput `json:"instanceType,omitempty"`
3747 }
3748
3749 func unmarshalBasicFabricSpecificCreateNetworkMappingInput(body []byte) (BasicFabricSpecificCreateNetworkMappingInput, error) {
3750 var m map[string]interface{}
3751 err := json.Unmarshal(body, &m)
3752 if err != nil {
3753 return nil, err
3754 }
3755
3756 switch m["instanceType"] {
3757 case string(InstanceTypeAzureToAzure):
3758 var atacnmi AzureToAzureCreateNetworkMappingInput
3759 err := json.Unmarshal(body, &atacnmi)
3760 return atacnmi, err
3761 case string(InstanceTypeVmmToAzure):
3762 var vtacnmi VmmToAzureCreateNetworkMappingInput
3763 err := json.Unmarshal(body, &vtacnmi)
3764 return vtacnmi, err
3765 case string(InstanceTypeVmmToVmm):
3766 var vtvcnmi VmmToVmmCreateNetworkMappingInput
3767 err := json.Unmarshal(body, &vtvcnmi)
3768 return vtvcnmi, err
3769 default:
3770 var fscnmi FabricSpecificCreateNetworkMappingInput
3771 err := json.Unmarshal(body, &fscnmi)
3772 return fscnmi, err
3773 }
3774 }
3775 func unmarshalBasicFabricSpecificCreateNetworkMappingInputArray(body []byte) ([]BasicFabricSpecificCreateNetworkMappingInput, error) {
3776 var rawMessages []*json.RawMessage
3777 err := json.Unmarshal(body, &rawMessages)
3778 if err != nil {
3779 return nil, err
3780 }
3781
3782 fscnmiArray := make([]BasicFabricSpecificCreateNetworkMappingInput, len(rawMessages))
3783
3784 for index, rawMessage := range rawMessages {
3785 fscnmi, err := unmarshalBasicFabricSpecificCreateNetworkMappingInput(*rawMessage)
3786 if err != nil {
3787 return nil, err
3788 }
3789 fscnmiArray[index] = fscnmi
3790 }
3791 return fscnmiArray, nil
3792 }
3793
3794
3795 func (fscnmi FabricSpecificCreateNetworkMappingInput) MarshalJSON() ([]byte, error) {
3796 fscnmi.InstanceType = InstanceTypeFabricSpecificCreateNetworkMappingInput
3797 objectMap := make(map[string]interface{})
3798 if fscnmi.InstanceType != "" {
3799 objectMap["instanceType"] = fscnmi.InstanceType
3800 }
3801 return json.Marshal(objectMap)
3802 }
3803
3804
3805 func (fscnmi FabricSpecificCreateNetworkMappingInput) AsAzureToAzureCreateNetworkMappingInput() (*AzureToAzureCreateNetworkMappingInput, bool) {
3806 return nil, false
3807 }
3808
3809
3810 func (fscnmi FabricSpecificCreateNetworkMappingInput) AsVmmToAzureCreateNetworkMappingInput() (*VmmToAzureCreateNetworkMappingInput, bool) {
3811 return nil, false
3812 }
3813
3814
3815 func (fscnmi FabricSpecificCreateNetworkMappingInput) AsVmmToVmmCreateNetworkMappingInput() (*VmmToVmmCreateNetworkMappingInput, bool) {
3816 return nil, false
3817 }
3818
3819
3820 func (fscnmi FabricSpecificCreateNetworkMappingInput) AsFabricSpecificCreateNetworkMappingInput() (*FabricSpecificCreateNetworkMappingInput, bool) {
3821 return &fscnmi, true
3822 }
3823
3824
3825 func (fscnmi FabricSpecificCreateNetworkMappingInput) AsBasicFabricSpecificCreateNetworkMappingInput() (BasicFabricSpecificCreateNetworkMappingInput, bool) {
3826 return &fscnmi, true
3827 }
3828
3829
3830 type BasicFabricSpecificCreationInput interface {
3831 AsAzureFabricCreationInput() (*AzureFabricCreationInput, bool)
3832 AsVMwareV2FabricCreationInput() (*VMwareV2FabricCreationInput, bool)
3833 AsFabricSpecificCreationInput() (*FabricSpecificCreationInput, bool)
3834 }
3835
3836
3837 type FabricSpecificCreationInput struct {
3838
3839 InstanceType InstanceTypeBasicFabricSpecificCreationInput `json:"instanceType,omitempty"`
3840 }
3841
3842 func unmarshalBasicFabricSpecificCreationInput(body []byte) (BasicFabricSpecificCreationInput, error) {
3843 var m map[string]interface{}
3844 err := json.Unmarshal(body, &m)
3845 if err != nil {
3846 return nil, err
3847 }
3848
3849 switch m["instanceType"] {
3850 case string(InstanceTypeAzure):
3851 var afci AzureFabricCreationInput
3852 err := json.Unmarshal(body, &afci)
3853 return afci, err
3854 case string(InstanceTypeVMwareV2):
3855 var vmvfci VMwareV2FabricCreationInput
3856 err := json.Unmarshal(body, &vmvfci)
3857 return vmvfci, err
3858 default:
3859 var fsci FabricSpecificCreationInput
3860 err := json.Unmarshal(body, &fsci)
3861 return fsci, err
3862 }
3863 }
3864 func unmarshalBasicFabricSpecificCreationInputArray(body []byte) ([]BasicFabricSpecificCreationInput, error) {
3865 var rawMessages []*json.RawMessage
3866 err := json.Unmarshal(body, &rawMessages)
3867 if err != nil {
3868 return nil, err
3869 }
3870
3871 fsciArray := make([]BasicFabricSpecificCreationInput, len(rawMessages))
3872
3873 for index, rawMessage := range rawMessages {
3874 fsci, err := unmarshalBasicFabricSpecificCreationInput(*rawMessage)
3875 if err != nil {
3876 return nil, err
3877 }
3878 fsciArray[index] = fsci
3879 }
3880 return fsciArray, nil
3881 }
3882
3883
3884 func (fsci FabricSpecificCreationInput) MarshalJSON() ([]byte, error) {
3885 fsci.InstanceType = InstanceTypeFabricSpecificCreationInput
3886 objectMap := make(map[string]interface{})
3887 if fsci.InstanceType != "" {
3888 objectMap["instanceType"] = fsci.InstanceType
3889 }
3890 return json.Marshal(objectMap)
3891 }
3892
3893
3894 func (fsci FabricSpecificCreationInput) AsAzureFabricCreationInput() (*AzureFabricCreationInput, bool) {
3895 return nil, false
3896 }
3897
3898
3899 func (fsci FabricSpecificCreationInput) AsVMwareV2FabricCreationInput() (*VMwareV2FabricCreationInput, bool) {
3900 return nil, false
3901 }
3902
3903
3904 func (fsci FabricSpecificCreationInput) AsFabricSpecificCreationInput() (*FabricSpecificCreationInput, bool) {
3905 return &fsci, true
3906 }
3907
3908
3909 func (fsci FabricSpecificCreationInput) AsBasicFabricSpecificCreationInput() (BasicFabricSpecificCreationInput, bool) {
3910 return &fsci, true
3911 }
3912
3913
3914 type BasicFabricSpecificDetails interface {
3915 AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool)
3916 AsVmmDetails() (*VmmDetails, bool)
3917 AsHyperVSiteDetails() (*HyperVSiteDetails, bool)
3918 AsVMwareDetails() (*VMwareDetails, bool)
3919 AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool)
3920 AsFabricSpecificDetails() (*FabricSpecificDetails, bool)
3921 }
3922
3923
3924 type FabricSpecificDetails struct {
3925
3926 InstanceType InstanceTypeBasicFabricSpecificDetails `json:"instanceType,omitempty"`
3927 }
3928
3929 func unmarshalBasicFabricSpecificDetails(body []byte) (BasicFabricSpecificDetails, error) {
3930 var m map[string]interface{}
3931 err := json.Unmarshal(body, &m)
3932 if err != nil {
3933 return nil, err
3934 }
3935
3936 switch m["instanceType"] {
3937 case string(InstanceTypeBasicFabricSpecificDetailsInstanceTypeAzure):
3938 var afsd AzureFabricSpecificDetails
3939 err := json.Unmarshal(body, &afsd)
3940 return afsd, err
3941 case string(InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMM):
3942 var vd VmmDetails
3943 err := json.Unmarshal(body, &vd)
3944 return vd, err
3945 case string(InstanceTypeBasicFabricSpecificDetailsInstanceTypeHyperVSite):
3946 var hvsd HyperVSiteDetails
3947 err := json.Unmarshal(body, &hvsd)
3948 return hvsd, err
3949 case string(InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMware):
3950 var vmd VMwareDetails
3951 err := json.Unmarshal(body, &vmd)
3952 return vmd, err
3953 case string(InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMwareV2):
3954 var vmvfsd VMwareV2FabricSpecificDetails
3955 err := json.Unmarshal(body, &vmvfsd)
3956 return vmvfsd, err
3957 default:
3958 var fsd FabricSpecificDetails
3959 err := json.Unmarshal(body, &fsd)
3960 return fsd, err
3961 }
3962 }
3963 func unmarshalBasicFabricSpecificDetailsArray(body []byte) ([]BasicFabricSpecificDetails, error) {
3964 var rawMessages []*json.RawMessage
3965 err := json.Unmarshal(body, &rawMessages)
3966 if err != nil {
3967 return nil, err
3968 }
3969
3970 fsdArray := make([]BasicFabricSpecificDetails, len(rawMessages))
3971
3972 for index, rawMessage := range rawMessages {
3973 fsd, err := unmarshalBasicFabricSpecificDetails(*rawMessage)
3974 if err != nil {
3975 return nil, err
3976 }
3977 fsdArray[index] = fsd
3978 }
3979 return fsdArray, nil
3980 }
3981
3982
3983 func (fsd FabricSpecificDetails) MarshalJSON() ([]byte, error) {
3984 fsd.InstanceType = InstanceTypeBasicFabricSpecificDetailsInstanceTypeFabricSpecificDetails
3985 objectMap := make(map[string]interface{})
3986 if fsd.InstanceType != "" {
3987 objectMap["instanceType"] = fsd.InstanceType
3988 }
3989 return json.Marshal(objectMap)
3990 }
3991
3992
3993 func (fsd FabricSpecificDetails) AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool) {
3994 return nil, false
3995 }
3996
3997
3998 func (fsd FabricSpecificDetails) AsVmmDetails() (*VmmDetails, bool) {
3999 return nil, false
4000 }
4001
4002
4003 func (fsd FabricSpecificDetails) AsHyperVSiteDetails() (*HyperVSiteDetails, bool) {
4004 return nil, false
4005 }
4006
4007
4008 func (fsd FabricSpecificDetails) AsVMwareDetails() (*VMwareDetails, bool) {
4009 return nil, false
4010 }
4011
4012
4013 func (fsd FabricSpecificDetails) AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool) {
4014 return nil, false
4015 }
4016
4017
4018 func (fsd FabricSpecificDetails) AsFabricSpecificDetails() (*FabricSpecificDetails, bool) {
4019 return &fsd, true
4020 }
4021
4022
4023 func (fsd FabricSpecificDetails) AsBasicFabricSpecificDetails() (BasicFabricSpecificDetails, bool) {
4024 return &fsd, true
4025 }
4026
4027
4028 type BasicFabricSpecificUpdateNetworkMappingInput interface {
4029 AsAzureToAzureUpdateNetworkMappingInput() (*AzureToAzureUpdateNetworkMappingInput, bool)
4030 AsVmmToAzureUpdateNetworkMappingInput() (*VmmToAzureUpdateNetworkMappingInput, bool)
4031 AsVmmToVmmUpdateNetworkMappingInput() (*VmmToVmmUpdateNetworkMappingInput, bool)
4032 AsFabricSpecificUpdateNetworkMappingInput() (*FabricSpecificUpdateNetworkMappingInput, bool)
4033 }
4034
4035
4036 type FabricSpecificUpdateNetworkMappingInput struct {
4037
4038 InstanceType InstanceTypeBasicFabricSpecificUpdateNetworkMappingInput `json:"instanceType,omitempty"`
4039 }
4040
4041 func unmarshalBasicFabricSpecificUpdateNetworkMappingInput(body []byte) (BasicFabricSpecificUpdateNetworkMappingInput, error) {
4042 var m map[string]interface{}
4043 err := json.Unmarshal(body, &m)
4044 if err != nil {
4045 return nil, err
4046 }
4047
4048 switch m["instanceType"] {
4049 case string(InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeAzureToAzure):
4050 var ataunmi AzureToAzureUpdateNetworkMappingInput
4051 err := json.Unmarshal(body, &ataunmi)
4052 return ataunmi, err
4053 case string(InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToAzure):
4054 var vtaunmi VmmToAzureUpdateNetworkMappingInput
4055 err := json.Unmarshal(body, &vtaunmi)
4056 return vtaunmi, err
4057 case string(InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToVmm):
4058 var vtvunmi VmmToVmmUpdateNetworkMappingInput
4059 err := json.Unmarshal(body, &vtvunmi)
4060 return vtvunmi, err
4061 default:
4062 var fsunmi FabricSpecificUpdateNetworkMappingInput
4063 err := json.Unmarshal(body, &fsunmi)
4064 return fsunmi, err
4065 }
4066 }
4067 func unmarshalBasicFabricSpecificUpdateNetworkMappingInputArray(body []byte) ([]BasicFabricSpecificUpdateNetworkMappingInput, error) {
4068 var rawMessages []*json.RawMessage
4069 err := json.Unmarshal(body, &rawMessages)
4070 if err != nil {
4071 return nil, err
4072 }
4073
4074 fsunmiArray := make([]BasicFabricSpecificUpdateNetworkMappingInput, len(rawMessages))
4075
4076 for index, rawMessage := range rawMessages {
4077 fsunmi, err := unmarshalBasicFabricSpecificUpdateNetworkMappingInput(*rawMessage)
4078 if err != nil {
4079 return nil, err
4080 }
4081 fsunmiArray[index] = fsunmi
4082 }
4083 return fsunmiArray, nil
4084 }
4085
4086
4087 func (fsunmi FabricSpecificUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) {
4088 fsunmi.InstanceType = InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeFabricSpecificUpdateNetworkMappingInput
4089 objectMap := make(map[string]interface{})
4090 if fsunmi.InstanceType != "" {
4091 objectMap["instanceType"] = fsunmi.InstanceType
4092 }
4093 return json.Marshal(objectMap)
4094 }
4095
4096
4097 func (fsunmi FabricSpecificUpdateNetworkMappingInput) AsAzureToAzureUpdateNetworkMappingInput() (*AzureToAzureUpdateNetworkMappingInput, bool) {
4098 return nil, false
4099 }
4100
4101
4102 func (fsunmi FabricSpecificUpdateNetworkMappingInput) AsVmmToAzureUpdateNetworkMappingInput() (*VmmToAzureUpdateNetworkMappingInput, bool) {
4103 return nil, false
4104 }
4105
4106
4107 func (fsunmi FabricSpecificUpdateNetworkMappingInput) AsVmmToVmmUpdateNetworkMappingInput() (*VmmToVmmUpdateNetworkMappingInput, bool) {
4108 return nil, false
4109 }
4110
4111
4112 func (fsunmi FabricSpecificUpdateNetworkMappingInput) AsFabricSpecificUpdateNetworkMappingInput() (*FabricSpecificUpdateNetworkMappingInput, bool) {
4113 return &fsunmi, true
4114 }
4115
4116
4117 func (fsunmi FabricSpecificUpdateNetworkMappingInput) AsBasicFabricSpecificUpdateNetworkMappingInput() (BasicFabricSpecificUpdateNetworkMappingInput, bool) {
4118 return &fsunmi, true
4119 }
4120
4121
4122 type FailoverJobDetails struct {
4123
4124 ProtectedItemDetails *[]FailoverReplicationProtectedItemDetails `json:"protectedItemDetails,omitempty"`
4125
4126 AffectedObjectDetails map[string]*string `json:"affectedObjectDetails"`
4127
4128 InstanceType InstanceTypeBasicJobDetails `json:"instanceType,omitempty"`
4129 }
4130
4131
4132 func (fjd FailoverJobDetails) MarshalJSON() ([]byte, error) {
4133 fjd.InstanceType = InstanceTypeFailoverJobDetails
4134 objectMap := make(map[string]interface{})
4135 if fjd.ProtectedItemDetails != nil {
4136 objectMap["protectedItemDetails"] = fjd.ProtectedItemDetails
4137 }
4138 if fjd.AffectedObjectDetails != nil {
4139 objectMap["affectedObjectDetails"] = fjd.AffectedObjectDetails
4140 }
4141 if fjd.InstanceType != "" {
4142 objectMap["instanceType"] = fjd.InstanceType
4143 }
4144 return json.Marshal(objectMap)
4145 }
4146
4147
4148 func (fjd FailoverJobDetails) AsAsrJobDetails() (*AsrJobDetails, bool) {
4149 return nil, false
4150 }
4151
4152
4153 func (fjd FailoverJobDetails) AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool) {
4154 return nil, false
4155 }
4156
4157
4158 func (fjd FailoverJobDetails) AsFailoverJobDetails() (*FailoverJobDetails, bool) {
4159 return &fjd, true
4160 }
4161
4162
4163 func (fjd FailoverJobDetails) AsExportJobDetails() (*ExportJobDetails, bool) {
4164 return nil, false
4165 }
4166
4167
4168 func (fjd FailoverJobDetails) AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool) {
4169 return nil, false
4170 }
4171
4172
4173 func (fjd FailoverJobDetails) AsJobDetails() (*JobDetails, bool) {
4174 return nil, false
4175 }
4176
4177
4178 func (fjd FailoverJobDetails) AsBasicJobDetails() (BasicJobDetails, bool) {
4179 return &fjd, true
4180 }
4181
4182
4183 type FailoverProcessServerRequest struct {
4184
4185 Properties *FailoverProcessServerRequestProperties `json:"properties,omitempty"`
4186 }
4187
4188
4189 type FailoverProcessServerRequestProperties struct {
4190
4191 ContainerName *string `json:"containerName,omitempty"`
4192
4193 SourceProcessServerID *string `json:"sourceProcessServerId,omitempty"`
4194
4195 TargetProcessServerID *string `json:"targetProcessServerId,omitempty"`
4196
4197 VmsToMigrate *[]string `json:"vmsToMigrate,omitempty"`
4198
4199 UpdateType *string `json:"updateType,omitempty"`
4200 }
4201
4202
4203 type FailoverReplicationProtectedItemDetails struct {
4204
4205 Name *string `json:"name,omitempty"`
4206
4207 FriendlyName *string `json:"friendlyName,omitempty"`
4208
4209 TestVMName *string `json:"testVmName,omitempty"`
4210
4211 TestVMFriendlyName *string `json:"testVmFriendlyName,omitempty"`
4212
4213 NetworkConnectionStatus *string `json:"networkConnectionStatus,omitempty"`
4214
4215 NetworkFriendlyName *string `json:"networkFriendlyName,omitempty"`
4216
4217 Subnet *string `json:"subnet,omitempty"`
4218
4219 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
4220
4221 RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"`
4222 }
4223
4224
4225
4226 type BasicGroupTaskDetails interface {
4227 AsInlineWorkflowTaskDetails() (*InlineWorkflowTaskDetails, bool)
4228 AsRecoveryPlanGroupTaskDetails() (*RecoveryPlanGroupTaskDetails, bool)
4229 AsRecoveryPlanShutdownGroupTaskDetails() (*RecoveryPlanShutdownGroupTaskDetails, bool)
4230 AsGroupTaskDetails() (*GroupTaskDetails, bool)
4231 }
4232
4233
4234
4235 type GroupTaskDetails struct {
4236
4237 ChildTasks *[]ASRTask `json:"childTasks,omitempty"`
4238
4239 InstanceType InstanceTypeBasicGroupTaskDetails `json:"instanceType,omitempty"`
4240 }
4241
4242 func unmarshalBasicGroupTaskDetails(body []byte) (BasicGroupTaskDetails, error) {
4243 var m map[string]interface{}
4244 err := json.Unmarshal(body, &m)
4245 if err != nil {
4246 return nil, err
4247 }
4248
4249 switch m["instanceType"] {
4250 case string(InstanceTypeInlineWorkflowTaskDetails):
4251 var iwtd InlineWorkflowTaskDetails
4252 err := json.Unmarshal(body, &iwtd)
4253 return iwtd, err
4254 case string(InstanceTypeRecoveryPlanGroupTaskDetails):
4255 var rpgtd RecoveryPlanGroupTaskDetails
4256 err := json.Unmarshal(body, &rpgtd)
4257 return rpgtd, err
4258 case string(InstanceTypeRecoveryPlanShutdownGroupTaskDetails):
4259 var rpsgtd RecoveryPlanShutdownGroupTaskDetails
4260 err := json.Unmarshal(body, &rpsgtd)
4261 return rpsgtd, err
4262 default:
4263 var gtd GroupTaskDetails
4264 err := json.Unmarshal(body, >d)
4265 return gtd, err
4266 }
4267 }
4268 func unmarshalBasicGroupTaskDetailsArray(body []byte) ([]BasicGroupTaskDetails, error) {
4269 var rawMessages []*json.RawMessage
4270 err := json.Unmarshal(body, &rawMessages)
4271 if err != nil {
4272 return nil, err
4273 }
4274
4275 gtdArray := make([]BasicGroupTaskDetails, len(rawMessages))
4276
4277 for index, rawMessage := range rawMessages {
4278 gtd, err := unmarshalBasicGroupTaskDetails(*rawMessage)
4279 if err != nil {
4280 return nil, err
4281 }
4282 gtdArray[index] = gtd
4283 }
4284 return gtdArray, nil
4285 }
4286
4287
4288 func (gtd GroupTaskDetails) MarshalJSON() ([]byte, error) {
4289 gtd.InstanceType = InstanceTypeGroupTaskDetails
4290 objectMap := make(map[string]interface{})
4291 if gtd.ChildTasks != nil {
4292 objectMap["childTasks"] = gtd.ChildTasks
4293 }
4294 if gtd.InstanceType != "" {
4295 objectMap["instanceType"] = gtd.InstanceType
4296 }
4297 return json.Marshal(objectMap)
4298 }
4299
4300
4301 func (gtd GroupTaskDetails) AsInlineWorkflowTaskDetails() (*InlineWorkflowTaskDetails, bool) {
4302 return nil, false
4303 }
4304
4305
4306 func (gtd GroupTaskDetails) AsRecoveryPlanGroupTaskDetails() (*RecoveryPlanGroupTaskDetails, bool) {
4307 return nil, false
4308 }
4309
4310
4311 func (gtd GroupTaskDetails) AsRecoveryPlanShutdownGroupTaskDetails() (*RecoveryPlanShutdownGroupTaskDetails, bool) {
4312 return nil, false
4313 }
4314
4315
4316 func (gtd GroupTaskDetails) AsGroupTaskDetails() (*GroupTaskDetails, bool) {
4317 return >d, true
4318 }
4319
4320
4321 func (gtd GroupTaskDetails) AsBasicGroupTaskDetails() (BasicGroupTaskDetails, bool) {
4322 return >d, true
4323 }
4324
4325
4326 type HealthError struct {
4327
4328 ErrorSource *string `json:"errorSource,omitempty"`
4329
4330 ErrorType *string `json:"errorType,omitempty"`
4331
4332 ErrorLevel *string `json:"errorLevel,omitempty"`
4333
4334 ErrorCode *string `json:"errorCode,omitempty"`
4335
4336 ErrorMessage *string `json:"errorMessage,omitempty"`
4337
4338 PossibleCauses *string `json:"possibleCauses,omitempty"`
4339
4340 RecommendedAction *string `json:"recommendedAction,omitempty"`
4341
4342 CreationTimeUtc *date.Time `json:"creationTimeUtc,omitempty"`
4343
4344 RecoveryProviderErrorMessage *string `json:"recoveryProviderErrorMessage,omitempty"`
4345
4346 EntityID *string `json:"entityId,omitempty"`
4347
4348 ChildErrors *[]HealthError `json:"childErrors,omitempty"`
4349 }
4350
4351
4352 type HealthErrorSummary struct {
4353
4354 SummaryCode *string `json:"summaryCode,omitempty"`
4355
4356 Category HealthErrorCategory `json:"category,omitempty"`
4357
4358 Severity Severity `json:"severity,omitempty"`
4359
4360 SummaryMessage *string `json:"summaryMessage,omitempty"`
4361
4362 AffectedResourceType *string `json:"affectedResourceType,omitempty"`
4363
4364 AffectedResourceSubtype *string `json:"affectedResourceSubtype,omitempty"`
4365
4366 AffectedResourceCorrelationIds *[]string `json:"affectedResourceCorrelationIds,omitempty"`
4367 }
4368
4369
4370 type HyperVReplica2012EventDetails struct {
4371
4372 ContainerName *string `json:"containerName,omitempty"`
4373
4374 FabricName *string `json:"fabricName,omitempty"`
4375
4376 RemoteContainerName *string `json:"remoteContainerName,omitempty"`
4377
4378 RemoteFabricName *string `json:"remoteFabricName,omitempty"`
4379
4380 InstanceType InstanceType `json:"instanceType,omitempty"`
4381 }
4382
4383
4384 func (hvr2ed HyperVReplica2012EventDetails) MarshalJSON() ([]byte, error) {
4385 hvr2ed.InstanceType = InstanceTypeHyperVReplica2012
4386 objectMap := make(map[string]interface{})
4387 if hvr2ed.ContainerName != nil {
4388 objectMap["containerName"] = hvr2ed.ContainerName
4389 }
4390 if hvr2ed.FabricName != nil {
4391 objectMap["fabricName"] = hvr2ed.FabricName
4392 }
4393 if hvr2ed.RemoteContainerName != nil {
4394 objectMap["remoteContainerName"] = hvr2ed.RemoteContainerName
4395 }
4396 if hvr2ed.RemoteFabricName != nil {
4397 objectMap["remoteFabricName"] = hvr2ed.RemoteFabricName
4398 }
4399 if hvr2ed.InstanceType != "" {
4400 objectMap["instanceType"] = hvr2ed.InstanceType
4401 }
4402 return json.Marshal(objectMap)
4403 }
4404
4405
4406 func (hvr2ed HyperVReplica2012EventDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) {
4407 return nil, false
4408 }
4409
4410
4411 func (hvr2ed HyperVReplica2012EventDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) {
4412 return &hvr2ed, true
4413 }
4414
4415
4416 func (hvr2ed HyperVReplica2012EventDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) {
4417 return nil, false
4418 }
4419
4420
4421 func (hvr2ed HyperVReplica2012EventDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) {
4422 return nil, false
4423 }
4424
4425
4426 func (hvr2ed HyperVReplica2012EventDetails) AsA2AEventDetails() (*A2AEventDetails, bool) {
4427 return nil, false
4428 }
4429
4430
4431 func (hvr2ed HyperVReplica2012EventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) {
4432 return nil, false
4433 }
4434
4435
4436 func (hvr2ed HyperVReplica2012EventDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) {
4437 return nil, false
4438 }
4439
4440
4441 func (hvr2ed HyperVReplica2012EventDetails) AsBasicEventProviderSpecificDetails() (BasicEventProviderSpecificDetails, bool) {
4442 return &hvr2ed, true
4443 }
4444
4445
4446 type HyperVReplica2012R2EventDetails struct {
4447
4448 ContainerName *string `json:"containerName,omitempty"`
4449
4450 FabricName *string `json:"fabricName,omitempty"`
4451
4452 RemoteContainerName *string `json:"remoteContainerName,omitempty"`
4453
4454 RemoteFabricName *string `json:"remoteFabricName,omitempty"`
4455
4456 InstanceType InstanceType `json:"instanceType,omitempty"`
4457 }
4458
4459
4460 func (hvr2ed HyperVReplica2012R2EventDetails) MarshalJSON() ([]byte, error) {
4461 hvr2ed.InstanceType = InstanceTypeHyperVReplica2012R2
4462 objectMap := make(map[string]interface{})
4463 if hvr2ed.ContainerName != nil {
4464 objectMap["containerName"] = hvr2ed.ContainerName
4465 }
4466 if hvr2ed.FabricName != nil {
4467 objectMap["fabricName"] = hvr2ed.FabricName
4468 }
4469 if hvr2ed.RemoteContainerName != nil {
4470 objectMap["remoteContainerName"] = hvr2ed.RemoteContainerName
4471 }
4472 if hvr2ed.RemoteFabricName != nil {
4473 objectMap["remoteFabricName"] = hvr2ed.RemoteFabricName
4474 }
4475 if hvr2ed.InstanceType != "" {
4476 objectMap["instanceType"] = hvr2ed.InstanceType
4477 }
4478 return json.Marshal(objectMap)
4479 }
4480
4481
4482 func (hvr2ed HyperVReplica2012R2EventDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) {
4483 return nil, false
4484 }
4485
4486
4487 func (hvr2ed HyperVReplica2012R2EventDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) {
4488 return nil, false
4489 }
4490
4491
4492 func (hvr2ed HyperVReplica2012R2EventDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) {
4493 return &hvr2ed, true
4494 }
4495
4496
4497 func (hvr2ed HyperVReplica2012R2EventDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) {
4498 return nil, false
4499 }
4500
4501
4502 func (hvr2ed HyperVReplica2012R2EventDetails) AsA2AEventDetails() (*A2AEventDetails, bool) {
4503 return nil, false
4504 }
4505
4506
4507 func (hvr2ed HyperVReplica2012R2EventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) {
4508 return nil, false
4509 }
4510
4511
4512 func (hvr2ed HyperVReplica2012R2EventDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) {
4513 return nil, false
4514 }
4515
4516
4517 func (hvr2ed HyperVReplica2012R2EventDetails) AsBasicEventProviderSpecificDetails() (BasicEventProviderSpecificDetails, bool) {
4518 return &hvr2ed, true
4519 }
4520
4521
4522
4523 type HyperVReplicaAzureApplyRecoveryPointInput struct {
4524
4525 VaultLocation *string `json:"vaultLocation,omitempty"`
4526
4527 PrimaryKekCertificatePfx *string `json:"primaryKekCertificatePfx,omitempty"`
4528
4529 SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"`
4530
4531 InstanceType InstanceTypeBasicApplyRecoveryPointProviderSpecificInput `json:"instanceType,omitempty"`
4532 }
4533
4534
4535 func (hvraarpi HyperVReplicaAzureApplyRecoveryPointInput) MarshalJSON() ([]byte, error) {
4536 hvraarpi.InstanceType = InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeHyperVReplicaAzure
4537 objectMap := make(map[string]interface{})
4538 if hvraarpi.VaultLocation != nil {
4539 objectMap["vaultLocation"] = hvraarpi.VaultLocation
4540 }
4541 if hvraarpi.PrimaryKekCertificatePfx != nil {
4542 objectMap["primaryKekCertificatePfx"] = hvraarpi.PrimaryKekCertificatePfx
4543 }
4544 if hvraarpi.SecondaryKekCertificatePfx != nil {
4545 objectMap["secondaryKekCertificatePfx"] = hvraarpi.SecondaryKekCertificatePfx
4546 }
4547 if hvraarpi.InstanceType != "" {
4548 objectMap["instanceType"] = hvraarpi.InstanceType
4549 }
4550 return json.Marshal(objectMap)
4551 }
4552
4553
4554 func (hvraarpi HyperVReplicaAzureApplyRecoveryPointInput) AsHyperVReplicaAzureApplyRecoveryPointInput() (*HyperVReplicaAzureApplyRecoveryPointInput, bool) {
4555 return &hvraarpi, true
4556 }
4557
4558
4559 func (hvraarpi HyperVReplicaAzureApplyRecoveryPointInput) AsInMageAzureV2ApplyRecoveryPointInput() (*InMageAzureV2ApplyRecoveryPointInput, bool) {
4560 return nil, false
4561 }
4562
4563
4564 func (hvraarpi HyperVReplicaAzureApplyRecoveryPointInput) AsA2AApplyRecoveryPointInput() (*A2AApplyRecoveryPointInput, bool) {
4565 return nil, false
4566 }
4567
4568
4569 func (hvraarpi HyperVReplicaAzureApplyRecoveryPointInput) AsApplyRecoveryPointProviderSpecificInput() (*ApplyRecoveryPointProviderSpecificInput, bool) {
4570 return nil, false
4571 }
4572
4573
4574 func (hvraarpi HyperVReplicaAzureApplyRecoveryPointInput) AsBasicApplyRecoveryPointProviderSpecificInput() (BasicApplyRecoveryPointProviderSpecificInput, bool) {
4575 return &hvraarpi, true
4576 }
4577
4578
4579 type HyperVReplicaAzureEnableProtectionInput struct {
4580
4581 HvHostVMID *string `json:"hvHostVmId,omitempty"`
4582
4583 VMName *string `json:"vmName,omitempty"`
4584
4585 OsType *string `json:"osType,omitempty"`
4586
4587 VhdID *string `json:"vhdId,omitempty"`
4588
4589 TargetStorageAccountID *string `json:"targetStorageAccountId,omitempty"`
4590
4591 TargetAzureNetworkID *string `json:"targetAzureNetworkId,omitempty"`
4592
4593 TargetAzureSubnetID *string `json:"targetAzureSubnetId,omitempty"`
4594
4595 EnableRDPOnTargetOption *string `json:"enableRDPOnTargetOption,omitempty"`
4596
4597 TargetAzureVMName *string `json:"targetAzureVmName,omitempty"`
4598
4599 LogStorageAccountID *string `json:"logStorageAccountId,omitempty"`
4600
4601 DisksToInclude *[]string `json:"disksToInclude,omitempty"`
4602
4603 TargetAzureV1ResourceGroupID *string `json:"targetAzureV1ResourceGroupId,omitempty"`
4604
4605 TargetAzureV2ResourceGroupID *string `json:"targetAzureV2ResourceGroupId,omitempty"`
4606
4607 UseManagedDisks *string `json:"useManagedDisks,omitempty"`
4608
4609 InstanceType InstanceTypeBasicEnableProtectionProviderSpecificInput `json:"instanceType,omitempty"`
4610 }
4611
4612
4613 func (hvraepi HyperVReplicaAzureEnableProtectionInput) MarshalJSON() ([]byte, error) {
4614 hvraepi.InstanceType = InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeHyperVReplicaAzure
4615 objectMap := make(map[string]interface{})
4616 if hvraepi.HvHostVMID != nil {
4617 objectMap["hvHostVmId"] = hvraepi.HvHostVMID
4618 }
4619 if hvraepi.VMName != nil {
4620 objectMap["vmName"] = hvraepi.VMName
4621 }
4622 if hvraepi.OsType != nil {
4623 objectMap["osType"] = hvraepi.OsType
4624 }
4625 if hvraepi.VhdID != nil {
4626 objectMap["vhdId"] = hvraepi.VhdID
4627 }
4628 if hvraepi.TargetStorageAccountID != nil {
4629 objectMap["targetStorageAccountId"] = hvraepi.TargetStorageAccountID
4630 }
4631 if hvraepi.TargetAzureNetworkID != nil {
4632 objectMap["targetAzureNetworkId"] = hvraepi.TargetAzureNetworkID
4633 }
4634 if hvraepi.TargetAzureSubnetID != nil {
4635 objectMap["targetAzureSubnetId"] = hvraepi.TargetAzureSubnetID
4636 }
4637 if hvraepi.EnableRDPOnTargetOption != nil {
4638 objectMap["enableRDPOnTargetOption"] = hvraepi.EnableRDPOnTargetOption
4639 }
4640 if hvraepi.TargetAzureVMName != nil {
4641 objectMap["targetAzureVmName"] = hvraepi.TargetAzureVMName
4642 }
4643 if hvraepi.LogStorageAccountID != nil {
4644 objectMap["logStorageAccountId"] = hvraepi.LogStorageAccountID
4645 }
4646 if hvraepi.DisksToInclude != nil {
4647 objectMap["disksToInclude"] = hvraepi.DisksToInclude
4648 }
4649 if hvraepi.TargetAzureV1ResourceGroupID != nil {
4650 objectMap["targetAzureV1ResourceGroupId"] = hvraepi.TargetAzureV1ResourceGroupID
4651 }
4652 if hvraepi.TargetAzureV2ResourceGroupID != nil {
4653 objectMap["targetAzureV2ResourceGroupId"] = hvraepi.TargetAzureV2ResourceGroupID
4654 }
4655 if hvraepi.UseManagedDisks != nil {
4656 objectMap["useManagedDisks"] = hvraepi.UseManagedDisks
4657 }
4658 if hvraepi.InstanceType != "" {
4659 objectMap["instanceType"] = hvraepi.InstanceType
4660 }
4661 return json.Marshal(objectMap)
4662 }
4663
4664
4665 func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool) {
4666 return &hvraepi, true
4667 }
4668
4669
4670 func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool) {
4671 return nil, false
4672 }
4673
4674
4675 func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool) {
4676 return nil, false
4677 }
4678
4679
4680 func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool) {
4681 return nil, false
4682 }
4683
4684
4685 func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool) {
4686 return nil, false
4687 }
4688
4689
4690 func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsEnableProtectionProviderSpecificInput() (*EnableProtectionProviderSpecificInput, bool) {
4691 return nil, false
4692 }
4693
4694
4695 func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsBasicEnableProtectionProviderSpecificInput() (BasicEnableProtectionProviderSpecificInput, bool) {
4696 return &hvraepi, true
4697 }
4698
4699
4700 type HyperVReplicaAzureEventDetails struct {
4701
4702 ContainerName *string `json:"containerName,omitempty"`
4703
4704 FabricName *string `json:"fabricName,omitempty"`
4705
4706 RemoteContainerName *string `json:"remoteContainerName,omitempty"`
4707
4708 InstanceType InstanceType `json:"instanceType,omitempty"`
4709 }
4710
4711
4712 func (hvraed HyperVReplicaAzureEventDetails) MarshalJSON() ([]byte, error) {
4713 hvraed.InstanceType = InstanceTypeHyperVReplicaAzure
4714 objectMap := make(map[string]interface{})
4715 if hvraed.ContainerName != nil {
4716 objectMap["containerName"] = hvraed.ContainerName
4717 }
4718 if hvraed.FabricName != nil {
4719 objectMap["fabricName"] = hvraed.FabricName
4720 }
4721 if hvraed.RemoteContainerName != nil {
4722 objectMap["remoteContainerName"] = hvraed.RemoteContainerName
4723 }
4724 if hvraed.InstanceType != "" {
4725 objectMap["instanceType"] = hvraed.InstanceType
4726 }
4727 return json.Marshal(objectMap)
4728 }
4729
4730
4731 func (hvraed HyperVReplicaAzureEventDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) {
4732 return nil, false
4733 }
4734
4735
4736 func (hvraed HyperVReplicaAzureEventDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) {
4737 return nil, false
4738 }
4739
4740
4741 func (hvraed HyperVReplicaAzureEventDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) {
4742 return nil, false
4743 }
4744
4745
4746 func (hvraed HyperVReplicaAzureEventDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) {
4747 return &hvraed, true
4748 }
4749
4750
4751 func (hvraed HyperVReplicaAzureEventDetails) AsA2AEventDetails() (*A2AEventDetails, bool) {
4752 return nil, false
4753 }
4754
4755
4756 func (hvraed HyperVReplicaAzureEventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) {
4757 return nil, false
4758 }
4759
4760
4761 func (hvraed HyperVReplicaAzureEventDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) {
4762 return nil, false
4763 }
4764
4765
4766 func (hvraed HyperVReplicaAzureEventDetails) AsBasicEventProviderSpecificDetails() (BasicEventProviderSpecificDetails, bool) {
4767 return &hvraed, true
4768 }
4769
4770
4771 type HyperVReplicaAzureFailbackProviderInput struct {
4772
4773 DataSyncOption *string `json:"dataSyncOption,omitempty"`
4774
4775 RecoveryVMCreationOption *string `json:"recoveryVmCreationOption,omitempty"`
4776
4777 ProviderIDForAlternateRecovery *string `json:"providerIdForAlternateRecovery,omitempty"`
4778
4779 InstanceType InstanceTypeBasicProviderSpecificFailoverInput `json:"instanceType,omitempty"`
4780 }
4781
4782
4783 func (hvrafpi HyperVReplicaAzureFailbackProviderInput) MarshalJSON() ([]byte, error) {
4784 hvrafpi.InstanceType = InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback
4785 objectMap := make(map[string]interface{})
4786 if hvrafpi.DataSyncOption != nil {
4787 objectMap["dataSyncOption"] = hvrafpi.DataSyncOption
4788 }
4789 if hvrafpi.RecoveryVMCreationOption != nil {
4790 objectMap["recoveryVmCreationOption"] = hvrafpi.RecoveryVMCreationOption
4791 }
4792 if hvrafpi.ProviderIDForAlternateRecovery != nil {
4793 objectMap["providerIdForAlternateRecovery"] = hvrafpi.ProviderIDForAlternateRecovery
4794 }
4795 if hvrafpi.InstanceType != "" {
4796 objectMap["instanceType"] = hvrafpi.InstanceType
4797 }
4798 return json.Marshal(objectMap)
4799 }
4800
4801
4802 func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool) {
4803 return nil, false
4804 }
4805
4806
4807 func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool) {
4808 return &hvrafpi, true
4809 }
4810
4811
4812 func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool) {
4813 return nil, false
4814 }
4815
4816
4817 func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool) {
4818 return nil, false
4819 }
4820
4821
4822 func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool) {
4823 return nil, false
4824 }
4825
4826
4827 func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsProviderSpecificFailoverInput() (*ProviderSpecificFailoverInput, bool) {
4828 return nil, false
4829 }
4830
4831
4832 func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsBasicProviderSpecificFailoverInput() (BasicProviderSpecificFailoverInput, bool) {
4833 return &hvrafpi, true
4834 }
4835
4836
4837 type HyperVReplicaAzureFailoverProviderInput struct {
4838
4839 VaultLocation *string `json:"vaultLocation,omitempty"`
4840
4841 PrimaryKekCertificatePfx *string `json:"primaryKekCertificatePfx,omitempty"`
4842
4843 SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"`
4844
4845 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
4846
4847 InstanceType InstanceTypeBasicProviderSpecificFailoverInput `json:"instanceType,omitempty"`
4848 }
4849
4850
4851 func (hvrafpi HyperVReplicaAzureFailoverProviderInput) MarshalJSON() ([]byte, error) {
4852 hvrafpi.InstanceType = InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure
4853 objectMap := make(map[string]interface{})
4854 if hvrafpi.VaultLocation != nil {
4855 objectMap["vaultLocation"] = hvrafpi.VaultLocation
4856 }
4857 if hvrafpi.PrimaryKekCertificatePfx != nil {
4858 objectMap["primaryKekCertificatePfx"] = hvrafpi.PrimaryKekCertificatePfx
4859 }
4860 if hvrafpi.SecondaryKekCertificatePfx != nil {
4861 objectMap["secondaryKekCertificatePfx"] = hvrafpi.SecondaryKekCertificatePfx
4862 }
4863 if hvrafpi.RecoveryPointID != nil {
4864 objectMap["recoveryPointId"] = hvrafpi.RecoveryPointID
4865 }
4866 if hvrafpi.InstanceType != "" {
4867 objectMap["instanceType"] = hvrafpi.InstanceType
4868 }
4869 return json.Marshal(objectMap)
4870 }
4871
4872
4873 func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool) {
4874 return &hvrafpi, true
4875 }
4876
4877
4878 func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool) {
4879 return nil, false
4880 }
4881
4882
4883 func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool) {
4884 return nil, false
4885 }
4886
4887
4888 func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool) {
4889 return nil, false
4890 }
4891
4892
4893 func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool) {
4894 return nil, false
4895 }
4896
4897
4898 func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsProviderSpecificFailoverInput() (*ProviderSpecificFailoverInput, bool) {
4899 return nil, false
4900 }
4901
4902
4903 func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsBasicProviderSpecificFailoverInput() (BasicProviderSpecificFailoverInput, bool) {
4904 return &hvrafpi, true
4905 }
4906
4907
4908 type HyperVReplicaAzurePolicyDetails struct {
4909
4910 RecoveryPointHistoryDurationInHours *int32 `json:"recoveryPointHistoryDurationInHours,omitempty"`
4911
4912 ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"`
4913
4914 ReplicationInterval *int32 `json:"replicationInterval,omitempty"`
4915
4916 OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"`
4917
4918 Encryption *string `json:"encryption,omitempty"`
4919
4920 ActiveStorageAccountID *string `json:"activeStorageAccountId,omitempty"`
4921
4922 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"`
4923 }
4924
4925
4926 func (hvrapd HyperVReplicaAzurePolicyDetails) MarshalJSON() ([]byte, error) {
4927 hvrapd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure
4928 objectMap := make(map[string]interface{})
4929 if hvrapd.RecoveryPointHistoryDurationInHours != nil {
4930 objectMap["recoveryPointHistoryDurationInHours"] = hvrapd.RecoveryPointHistoryDurationInHours
4931 }
4932 if hvrapd.ApplicationConsistentSnapshotFrequencyInHours != nil {
4933 objectMap["applicationConsistentSnapshotFrequencyInHours"] = hvrapd.ApplicationConsistentSnapshotFrequencyInHours
4934 }
4935 if hvrapd.ReplicationInterval != nil {
4936 objectMap["replicationInterval"] = hvrapd.ReplicationInterval
4937 }
4938 if hvrapd.OnlineReplicationStartTime != nil {
4939 objectMap["onlineReplicationStartTime"] = hvrapd.OnlineReplicationStartTime
4940 }
4941 if hvrapd.Encryption != nil {
4942 objectMap["encryption"] = hvrapd.Encryption
4943 }
4944 if hvrapd.ActiveStorageAccountID != nil {
4945 objectMap["activeStorageAccountId"] = hvrapd.ActiveStorageAccountID
4946 }
4947 if hvrapd.InstanceType != "" {
4948 objectMap["instanceType"] = hvrapd.InstanceType
4949 }
4950 return json.Marshal(objectMap)
4951 }
4952
4953
4954 func (hvrapd HyperVReplicaAzurePolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) {
4955 return &hvrapd, true
4956 }
4957
4958
4959 func (hvrapd HyperVReplicaAzurePolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) {
4960 return nil, false
4961 }
4962
4963
4964 func (hvrapd HyperVReplicaAzurePolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) {
4965 return nil, false
4966 }
4967
4968
4969 func (hvrapd HyperVReplicaAzurePolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) {
4970 return nil, false
4971 }
4972
4973
4974 func (hvrapd HyperVReplicaAzurePolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) {
4975 return nil, false
4976 }
4977
4978
4979 func (hvrapd HyperVReplicaAzurePolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) {
4980 return nil, false
4981 }
4982
4983
4984 func (hvrapd HyperVReplicaAzurePolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) {
4985 return nil, false
4986 }
4987
4988
4989 func (hvrapd HyperVReplicaAzurePolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) {
4990 return nil, false
4991 }
4992
4993
4994 func (hvrapd HyperVReplicaAzurePolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) {
4995 return nil, false
4996 }
4997
4998
4999 func (hvrapd HyperVReplicaAzurePolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) {
5000 return nil, false
5001 }
5002
5003
5004 func (hvrapd HyperVReplicaAzurePolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) {
5005 return nil, false
5006 }
5007
5008
5009 func (hvrapd HyperVReplicaAzurePolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) {
5010 return &hvrapd, true
5011 }
5012
5013
5014 type HyperVReplicaAzurePolicyInput struct {
5015
5016 RecoveryPointHistoryDuration *int32 `json:"recoveryPointHistoryDuration,omitempty"`
5017
5018 ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"`
5019
5020 ReplicationInterval *int32 `json:"replicationInterval,omitempty"`
5021
5022 OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"`
5023
5024 Encryption *string `json:"encryption,omitempty"`
5025
5026 StorageAccounts *[]string `json:"storageAccounts,omitempty"`
5027
5028 InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"`
5029 }
5030
5031
5032 func (hvrapi HyperVReplicaAzurePolicyInput) MarshalJSON() ([]byte, error) {
5033 hvrapi.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplicaAzure
5034 objectMap := make(map[string]interface{})
5035 if hvrapi.RecoveryPointHistoryDuration != nil {
5036 objectMap["recoveryPointHistoryDuration"] = hvrapi.RecoveryPointHistoryDuration
5037 }
5038 if hvrapi.ApplicationConsistentSnapshotFrequencyInHours != nil {
5039 objectMap["applicationConsistentSnapshotFrequencyInHours"] = hvrapi.ApplicationConsistentSnapshotFrequencyInHours
5040 }
5041 if hvrapi.ReplicationInterval != nil {
5042 objectMap["replicationInterval"] = hvrapi.ReplicationInterval
5043 }
5044 if hvrapi.OnlineReplicationStartTime != nil {
5045 objectMap["onlineReplicationStartTime"] = hvrapi.OnlineReplicationStartTime
5046 }
5047 if hvrapi.Encryption != nil {
5048 objectMap["encryption"] = hvrapi.Encryption
5049 }
5050 if hvrapi.StorageAccounts != nil {
5051 objectMap["storageAccounts"] = hvrapi.StorageAccounts
5052 }
5053 if hvrapi.InstanceType != "" {
5054 objectMap["instanceType"] = hvrapi.InstanceType
5055 }
5056 return json.Marshal(objectMap)
5057 }
5058
5059
5060 func (hvrapi HyperVReplicaAzurePolicyInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) {
5061 return &hvrapi, true
5062 }
5063
5064
5065 func (hvrapi HyperVReplicaAzurePolicyInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) {
5066 return nil, false
5067 }
5068
5069
5070 func (hvrapi HyperVReplicaAzurePolicyInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) {
5071 return nil, false
5072 }
5073
5074
5075 func (hvrapi HyperVReplicaAzurePolicyInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) {
5076 return nil, false
5077 }
5078
5079
5080 func (hvrapi HyperVReplicaAzurePolicyInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) {
5081 return nil, false
5082 }
5083
5084
5085 func (hvrapi HyperVReplicaAzurePolicyInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) {
5086 return nil, false
5087 }
5088
5089
5090 func (hvrapi HyperVReplicaAzurePolicyInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) {
5091 return nil, false
5092 }
5093
5094
5095 func (hvrapi HyperVReplicaAzurePolicyInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) {
5096 return nil, false
5097 }
5098
5099
5100 func (hvrapi HyperVReplicaAzurePolicyInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) {
5101 return &hvrapi, true
5102 }
5103
5104
5105 type HyperVReplicaAzureReplicationDetails struct {
5106
5107 AzureVMDiskDetails *[]AzureVMDiskDetails `json:"azureVMDiskDetails,omitempty"`
5108
5109 RecoveryAzureVMName *string `json:"recoveryAzureVMName,omitempty"`
5110
5111 RecoveryAzureVMSize *string `json:"recoveryAzureVMSize,omitempty"`
5112
5113 RecoveryAzureStorageAccount *string `json:"recoveryAzureStorageAccount,omitempty"`
5114
5115 RecoveryAzureLogStorageAccountID *string `json:"recoveryAzureLogStorageAccountId,omitempty"`
5116
5117 LastReplicatedTime *date.Time `json:"lastReplicatedTime,omitempty"`
5118
5119 VMID *string `json:"vmId,omitempty"`
5120
5121 VMProtectionState *string `json:"vmProtectionState,omitempty"`
5122
5123 VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"`
5124
5125 InitialReplicationDetails *InitialReplicationDetails `json:"initialReplicationDetails,omitempty"`
5126
5127 VMNics *[]VMNicDetails `json:"vmNics,omitempty"`
5128
5129 SelectedRecoveryAzureNetworkID *string `json:"selectedRecoveryAzureNetworkId,omitempty"`
5130
5131 Encryption *string `json:"encryption,omitempty"`
5132
5133 OSDetails *OSDetails `json:"oSDetails,omitempty"`
5134
5135 SourceVMRAMSizeInMB *int32 `json:"sourceVmRAMSizeInMB,omitempty"`
5136
5137 SourceVMCPUCount *int32 `json:"sourceVmCPUCount,omitempty"`
5138
5139 EnableRDPOnTargetOption *string `json:"enableRDPOnTargetOption,omitempty"`
5140
5141 RecoveryAzureResourceGroupID *string `json:"recoveryAzureResourceGroupId,omitempty"`
5142
5143 RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"`
5144
5145 UseManagedDisks *string `json:"useManagedDisks,omitempty"`
5146
5147 LicenseType *string `json:"licenseType,omitempty"`
5148
5149 InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"`
5150 }
5151
5152
5153 func (hvrard HyperVReplicaAzureReplicationDetails) MarshalJSON() ([]byte, error) {
5154 hvrard.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaAzure
5155 objectMap := make(map[string]interface{})
5156 if hvrard.AzureVMDiskDetails != nil {
5157 objectMap["azureVMDiskDetails"] = hvrard.AzureVMDiskDetails
5158 }
5159 if hvrard.RecoveryAzureVMName != nil {
5160 objectMap["recoveryAzureVMName"] = hvrard.RecoveryAzureVMName
5161 }
5162 if hvrard.RecoveryAzureVMSize != nil {
5163 objectMap["recoveryAzureVMSize"] = hvrard.RecoveryAzureVMSize
5164 }
5165 if hvrard.RecoveryAzureStorageAccount != nil {
5166 objectMap["recoveryAzureStorageAccount"] = hvrard.RecoveryAzureStorageAccount
5167 }
5168 if hvrard.RecoveryAzureLogStorageAccountID != nil {
5169 objectMap["recoveryAzureLogStorageAccountId"] = hvrard.RecoveryAzureLogStorageAccountID
5170 }
5171 if hvrard.LastReplicatedTime != nil {
5172 objectMap["lastReplicatedTime"] = hvrard.LastReplicatedTime
5173 }
5174 if hvrard.VMID != nil {
5175 objectMap["vmId"] = hvrard.VMID
5176 }
5177 if hvrard.VMProtectionState != nil {
5178 objectMap["vmProtectionState"] = hvrard.VMProtectionState
5179 }
5180 if hvrard.VMProtectionStateDescription != nil {
5181 objectMap["vmProtectionStateDescription"] = hvrard.VMProtectionStateDescription
5182 }
5183 if hvrard.InitialReplicationDetails != nil {
5184 objectMap["initialReplicationDetails"] = hvrard.InitialReplicationDetails
5185 }
5186 if hvrard.VMNics != nil {
5187 objectMap["vmNics"] = hvrard.VMNics
5188 }
5189 if hvrard.SelectedRecoveryAzureNetworkID != nil {
5190 objectMap["selectedRecoveryAzureNetworkId"] = hvrard.SelectedRecoveryAzureNetworkID
5191 }
5192 if hvrard.Encryption != nil {
5193 objectMap["encryption"] = hvrard.Encryption
5194 }
5195 if hvrard.OSDetails != nil {
5196 objectMap["oSDetails"] = hvrard.OSDetails
5197 }
5198 if hvrard.SourceVMRAMSizeInMB != nil {
5199 objectMap["sourceVmRAMSizeInMB"] = hvrard.SourceVMRAMSizeInMB
5200 }
5201 if hvrard.SourceVMCPUCount != nil {
5202 objectMap["sourceVmCPUCount"] = hvrard.SourceVMCPUCount
5203 }
5204 if hvrard.EnableRDPOnTargetOption != nil {
5205 objectMap["enableRDPOnTargetOption"] = hvrard.EnableRDPOnTargetOption
5206 }
5207 if hvrard.RecoveryAzureResourceGroupID != nil {
5208 objectMap["recoveryAzureResourceGroupId"] = hvrard.RecoveryAzureResourceGroupID
5209 }
5210 if hvrard.RecoveryAvailabilitySetID != nil {
5211 objectMap["recoveryAvailabilitySetId"] = hvrard.RecoveryAvailabilitySetID
5212 }
5213 if hvrard.UseManagedDisks != nil {
5214 objectMap["useManagedDisks"] = hvrard.UseManagedDisks
5215 }
5216 if hvrard.LicenseType != nil {
5217 objectMap["licenseType"] = hvrard.LicenseType
5218 }
5219 if hvrard.InstanceType != "" {
5220 objectMap["instanceType"] = hvrard.InstanceType
5221 }
5222 return json.Marshal(objectMap)
5223 }
5224
5225
5226 func (hvrard HyperVReplicaAzureReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) {
5227 return nil, false
5228 }
5229
5230
5231 func (hvrard HyperVReplicaAzureReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) {
5232 return nil, false
5233 }
5234
5235
5236 func (hvrard HyperVReplicaAzureReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) {
5237 return nil, false
5238 }
5239
5240
5241 func (hvrard HyperVReplicaAzureReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) {
5242 return &hvrard, true
5243 }
5244
5245
5246 func (hvrard HyperVReplicaAzureReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) {
5247 return nil, false
5248 }
5249
5250
5251 func (hvrard HyperVReplicaAzureReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) {
5252 return nil, false
5253 }
5254
5255
5256 func (hvrard HyperVReplicaAzureReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) {
5257 return nil, false
5258 }
5259
5260
5261 func (hvrard HyperVReplicaAzureReplicationDetails) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) {
5262 return nil, false
5263 }
5264
5265
5266 func (hvrard HyperVReplicaAzureReplicationDetails) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) {
5267 return &hvrard, true
5268 }
5269
5270
5271 type HyperVReplicaAzureReprotectInput struct {
5272
5273 HvHostVMID *string `json:"hvHostVmId,omitempty"`
5274
5275 VMName *string `json:"vmName,omitempty"`
5276
5277 OsType *string `json:"osType,omitempty"`
5278
5279 VHDID *string `json:"vHDId,omitempty"`
5280
5281 StorageAccountID *string `json:"storageAccountId,omitempty"`
5282
5283 LogStorageAccountID *string `json:"logStorageAccountId,omitempty"`
5284
5285 InstanceType InstanceTypeBasicReverseReplicationProviderSpecificInput `json:"instanceType,omitempty"`
5286 }
5287
5288
5289 func (hvrari HyperVReplicaAzureReprotectInput) MarshalJSON() ([]byte, error) {
5290 hvrari.InstanceType = InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeHyperVReplicaAzure
5291 objectMap := make(map[string]interface{})
5292 if hvrari.HvHostVMID != nil {
5293 objectMap["hvHostVmId"] = hvrari.HvHostVMID
5294 }
5295 if hvrari.VMName != nil {
5296 objectMap["vmName"] = hvrari.VMName
5297 }
5298 if hvrari.OsType != nil {
5299 objectMap["osType"] = hvrari.OsType
5300 }
5301 if hvrari.VHDID != nil {
5302 objectMap["vHDId"] = hvrari.VHDID
5303 }
5304 if hvrari.StorageAccountID != nil {
5305 objectMap["storageAccountId"] = hvrari.StorageAccountID
5306 }
5307 if hvrari.LogStorageAccountID != nil {
5308 objectMap["logStorageAccountId"] = hvrari.LogStorageAccountID
5309 }
5310 if hvrari.InstanceType != "" {
5311 objectMap["instanceType"] = hvrari.InstanceType
5312 }
5313 return json.Marshal(objectMap)
5314 }
5315
5316
5317 func (hvrari HyperVReplicaAzureReprotectInput) AsHyperVReplicaAzureReprotectInput() (*HyperVReplicaAzureReprotectInput, bool) {
5318 return &hvrari, true
5319 }
5320
5321
5322 func (hvrari HyperVReplicaAzureReprotectInput) AsInMageAzureV2ReprotectInput() (*InMageAzureV2ReprotectInput, bool) {
5323 return nil, false
5324 }
5325
5326
5327 func (hvrari HyperVReplicaAzureReprotectInput) AsInMageReprotectInput() (*InMageReprotectInput, bool) {
5328 return nil, false
5329 }
5330
5331
5332 func (hvrari HyperVReplicaAzureReprotectInput) AsA2AReprotectInput() (*A2AReprotectInput, bool) {
5333 return nil, false
5334 }
5335
5336
5337 func (hvrari HyperVReplicaAzureReprotectInput) AsReverseReplicationProviderSpecificInput() (*ReverseReplicationProviderSpecificInput, bool) {
5338 return nil, false
5339 }
5340
5341
5342 func (hvrari HyperVReplicaAzureReprotectInput) AsBasicReverseReplicationProviderSpecificInput() (BasicReverseReplicationProviderSpecificInput, bool) {
5343 return &hvrari, true
5344 }
5345
5346
5347
5348 type HyperVReplicaAzureUpdateReplicationProtectedItemInput struct {
5349
5350 RecoveryAzureV1ResourceGroupID *string `json:"recoveryAzureV1ResourceGroupId,omitempty"`
5351
5352 RecoveryAzureV2ResourceGroupID *string `json:"recoveryAzureV2ResourceGroupId,omitempty"`
5353
5354 UseManagedDisks *string `json:"useManagedDisks,omitempty"`
5355
5356 InstanceType InstanceTypeBasicUpdateReplicationProtectedItemProviderInput `json:"instanceType,omitempty"`
5357 }
5358
5359
5360 func (hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, error) {
5361 hvraurpii.InstanceType = InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeHyperVReplicaAzure
5362 objectMap := make(map[string]interface{})
5363 if hvraurpii.RecoveryAzureV1ResourceGroupID != nil {
5364 objectMap["recoveryAzureV1ResourceGroupId"] = hvraurpii.RecoveryAzureV1ResourceGroupID
5365 }
5366 if hvraurpii.RecoveryAzureV2ResourceGroupID != nil {
5367 objectMap["recoveryAzureV2ResourceGroupId"] = hvraurpii.RecoveryAzureV2ResourceGroupID
5368 }
5369 if hvraurpii.UseManagedDisks != nil {
5370 objectMap["useManagedDisks"] = hvraurpii.UseManagedDisks
5371 }
5372 if hvraurpii.InstanceType != "" {
5373 objectMap["instanceType"] = hvraurpii.InstanceType
5374 }
5375 return json.Marshal(objectMap)
5376 }
5377
5378
5379 func (hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput) AsHyperVReplicaAzureUpdateReplicationProtectedItemInput() (*HyperVReplicaAzureUpdateReplicationProtectedItemInput, bool) {
5380 return &hvraurpii, true
5381 }
5382
5383
5384 func (hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput) AsInMageAzureV2UpdateReplicationProtectedItemInput() (*InMageAzureV2UpdateReplicationProtectedItemInput, bool) {
5385 return nil, false
5386 }
5387
5388
5389 func (hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput) AsA2AUpdateReplicationProtectedItemInput() (*A2AUpdateReplicationProtectedItemInput, bool) {
5390 return nil, false
5391 }
5392
5393
5394 func (hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput) AsUpdateReplicationProtectedItemProviderInput() (*UpdateReplicationProtectedItemProviderInput, bool) {
5395 return nil, false
5396 }
5397
5398
5399 func (hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput) AsBasicUpdateReplicationProtectedItemProviderInput() (BasicUpdateReplicationProtectedItemProviderInput, bool) {
5400 return &hvraurpii, true
5401 }
5402
5403
5404 type HyperVReplicaBaseEventDetails struct {
5405
5406 ContainerName *string `json:"containerName,omitempty"`
5407
5408 FabricName *string `json:"fabricName,omitempty"`
5409
5410 RemoteContainerName *string `json:"remoteContainerName,omitempty"`
5411
5412 RemoteFabricName *string `json:"remoteFabricName,omitempty"`
5413
5414 InstanceType InstanceType `json:"instanceType,omitempty"`
5415 }
5416
5417
5418 func (hvrbed HyperVReplicaBaseEventDetails) MarshalJSON() ([]byte, error) {
5419 hvrbed.InstanceType = InstanceTypeHyperVReplicaBaseEventDetails
5420 objectMap := make(map[string]interface{})
5421 if hvrbed.ContainerName != nil {
5422 objectMap["containerName"] = hvrbed.ContainerName
5423 }
5424 if hvrbed.FabricName != nil {
5425 objectMap["fabricName"] = hvrbed.FabricName
5426 }
5427 if hvrbed.RemoteContainerName != nil {
5428 objectMap["remoteContainerName"] = hvrbed.RemoteContainerName
5429 }
5430 if hvrbed.RemoteFabricName != nil {
5431 objectMap["remoteFabricName"] = hvrbed.RemoteFabricName
5432 }
5433 if hvrbed.InstanceType != "" {
5434 objectMap["instanceType"] = hvrbed.InstanceType
5435 }
5436 return json.Marshal(objectMap)
5437 }
5438
5439
5440 func (hvrbed HyperVReplicaBaseEventDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) {
5441 return &hvrbed, true
5442 }
5443
5444
5445 func (hvrbed HyperVReplicaBaseEventDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) {
5446 return nil, false
5447 }
5448
5449
5450 func (hvrbed HyperVReplicaBaseEventDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) {
5451 return nil, false
5452 }
5453
5454
5455 func (hvrbed HyperVReplicaBaseEventDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) {
5456 return nil, false
5457 }
5458
5459
5460 func (hvrbed HyperVReplicaBaseEventDetails) AsA2AEventDetails() (*A2AEventDetails, bool) {
5461 return nil, false
5462 }
5463
5464
5465 func (hvrbed HyperVReplicaBaseEventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) {
5466 return nil, false
5467 }
5468
5469
5470 func (hvrbed HyperVReplicaBaseEventDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) {
5471 return nil, false
5472 }
5473
5474
5475 func (hvrbed HyperVReplicaBaseEventDetails) AsBasicEventProviderSpecificDetails() (BasicEventProviderSpecificDetails, bool) {
5476 return &hvrbed, true
5477 }
5478
5479
5480 type HyperVReplicaBasePolicyDetails struct {
5481
5482 RecoveryPoints *int32 `json:"recoveryPoints,omitempty"`
5483
5484 ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"`
5485
5486 Compression *string `json:"compression,omitempty"`
5487
5488 InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"`
5489
5490 OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"`
5491
5492 OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"`
5493
5494 OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"`
5495
5496 ReplicationPort *int32 `json:"replicationPort,omitempty"`
5497
5498 AllowedAuthenticationType *int32 `json:"allowedAuthenticationType,omitempty"`
5499
5500 ReplicaDeletionOption *string `json:"replicaDeletionOption,omitempty"`
5501
5502 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"`
5503 }
5504
5505
5506 func (hvrbpd HyperVReplicaBasePolicyDetails) MarshalJSON() ([]byte, error) {
5507 hvrbpd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails
5508 objectMap := make(map[string]interface{})
5509 if hvrbpd.RecoveryPoints != nil {
5510 objectMap["recoveryPoints"] = hvrbpd.RecoveryPoints
5511 }
5512 if hvrbpd.ApplicationConsistentSnapshotFrequencyInHours != nil {
5513 objectMap["applicationConsistentSnapshotFrequencyInHours"] = hvrbpd.ApplicationConsistentSnapshotFrequencyInHours
5514 }
5515 if hvrbpd.Compression != nil {
5516 objectMap["compression"] = hvrbpd.Compression
5517 }
5518 if hvrbpd.InitialReplicationMethod != nil {
5519 objectMap["initialReplicationMethod"] = hvrbpd.InitialReplicationMethod
5520 }
5521 if hvrbpd.OnlineReplicationStartTime != nil {
5522 objectMap["onlineReplicationStartTime"] = hvrbpd.OnlineReplicationStartTime
5523 }
5524 if hvrbpd.OfflineReplicationImportPath != nil {
5525 objectMap["offlineReplicationImportPath"] = hvrbpd.OfflineReplicationImportPath
5526 }
5527 if hvrbpd.OfflineReplicationExportPath != nil {
5528 objectMap["offlineReplicationExportPath"] = hvrbpd.OfflineReplicationExportPath
5529 }
5530 if hvrbpd.ReplicationPort != nil {
5531 objectMap["replicationPort"] = hvrbpd.ReplicationPort
5532 }
5533 if hvrbpd.AllowedAuthenticationType != nil {
5534 objectMap["allowedAuthenticationType"] = hvrbpd.AllowedAuthenticationType
5535 }
5536 if hvrbpd.ReplicaDeletionOption != nil {
5537 objectMap["replicaDeletionOption"] = hvrbpd.ReplicaDeletionOption
5538 }
5539 if hvrbpd.InstanceType != "" {
5540 objectMap["instanceType"] = hvrbpd.InstanceType
5541 }
5542 return json.Marshal(objectMap)
5543 }
5544
5545
5546 func (hvrbpd HyperVReplicaBasePolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) {
5547 return nil, false
5548 }
5549
5550
5551 func (hvrbpd HyperVReplicaBasePolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) {
5552 return &hvrbpd, true
5553 }
5554
5555
5556 func (hvrbpd HyperVReplicaBasePolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) {
5557 return nil, false
5558 }
5559
5560
5561 func (hvrbpd HyperVReplicaBasePolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) {
5562 return nil, false
5563 }
5564
5565
5566 func (hvrbpd HyperVReplicaBasePolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) {
5567 return nil, false
5568 }
5569
5570
5571 func (hvrbpd HyperVReplicaBasePolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) {
5572 return nil, false
5573 }
5574
5575
5576 func (hvrbpd HyperVReplicaBasePolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) {
5577 return nil, false
5578 }
5579
5580
5581 func (hvrbpd HyperVReplicaBasePolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) {
5582 return nil, false
5583 }
5584
5585
5586 func (hvrbpd HyperVReplicaBasePolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) {
5587 return nil, false
5588 }
5589
5590
5591 func (hvrbpd HyperVReplicaBasePolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) {
5592 return nil, false
5593 }
5594
5595
5596 func (hvrbpd HyperVReplicaBasePolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) {
5597 return nil, false
5598 }
5599
5600
5601 func (hvrbpd HyperVReplicaBasePolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) {
5602 return &hvrbpd, true
5603 }
5604
5605
5606 type HyperVReplicaBaseReplicationDetails struct {
5607
5608 LastReplicatedTime *date.Time `json:"lastReplicatedTime,omitempty"`
5609
5610 VMNics *[]VMNicDetails `json:"vmNics,omitempty"`
5611
5612 VMID *string `json:"vmId,omitempty"`
5613
5614 VMProtectionState *string `json:"vmProtectionState,omitempty"`
5615
5616 VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"`
5617
5618 InitialReplicationDetails *InitialReplicationDetails `json:"initialReplicationDetails,omitempty"`
5619
5620 VMDiskDetails *[]DiskDetails `json:"vMDiskDetails,omitempty"`
5621
5622 InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"`
5623 }
5624
5625
5626 func (hvrbrd HyperVReplicaBaseReplicationDetails) MarshalJSON() ([]byte, error) {
5627 hvrbrd.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaBaseReplicationDetails
5628 objectMap := make(map[string]interface{})
5629 if hvrbrd.LastReplicatedTime != nil {
5630 objectMap["lastReplicatedTime"] = hvrbrd.LastReplicatedTime
5631 }
5632 if hvrbrd.VMNics != nil {
5633 objectMap["vmNics"] = hvrbrd.VMNics
5634 }
5635 if hvrbrd.VMID != nil {
5636 objectMap["vmId"] = hvrbrd.VMID
5637 }
5638 if hvrbrd.VMProtectionState != nil {
5639 objectMap["vmProtectionState"] = hvrbrd.VMProtectionState
5640 }
5641 if hvrbrd.VMProtectionStateDescription != nil {
5642 objectMap["vmProtectionStateDescription"] = hvrbrd.VMProtectionStateDescription
5643 }
5644 if hvrbrd.InitialReplicationDetails != nil {
5645 objectMap["initialReplicationDetails"] = hvrbrd.InitialReplicationDetails
5646 }
5647 if hvrbrd.VMDiskDetails != nil {
5648 objectMap["vMDiskDetails"] = hvrbrd.VMDiskDetails
5649 }
5650 if hvrbrd.InstanceType != "" {
5651 objectMap["instanceType"] = hvrbrd.InstanceType
5652 }
5653 return json.Marshal(objectMap)
5654 }
5655
5656
5657 func (hvrbrd HyperVReplicaBaseReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) {
5658 return &hvrbrd, true
5659 }
5660
5661
5662 func (hvrbrd HyperVReplicaBaseReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) {
5663 return nil, false
5664 }
5665
5666
5667 func (hvrbrd HyperVReplicaBaseReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) {
5668 return nil, false
5669 }
5670
5671
5672 func (hvrbrd HyperVReplicaBaseReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) {
5673 return nil, false
5674 }
5675
5676
5677 func (hvrbrd HyperVReplicaBaseReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) {
5678 return nil, false
5679 }
5680
5681
5682 func (hvrbrd HyperVReplicaBaseReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) {
5683 return nil, false
5684 }
5685
5686
5687 func (hvrbrd HyperVReplicaBaseReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) {
5688 return nil, false
5689 }
5690
5691
5692 func (hvrbrd HyperVReplicaBaseReplicationDetails) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) {
5693 return nil, false
5694 }
5695
5696
5697 func (hvrbrd HyperVReplicaBaseReplicationDetails) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) {
5698 return &hvrbrd, true
5699 }
5700
5701
5702 type HyperVReplicaBluePolicyDetails struct {
5703
5704 ReplicationFrequencyInSeconds *int32 `json:"replicationFrequencyInSeconds,omitempty"`
5705
5706 RecoveryPoints *int32 `json:"recoveryPoints,omitempty"`
5707
5708 ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"`
5709
5710 Compression *string `json:"compression,omitempty"`
5711
5712 InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"`
5713
5714 OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"`
5715
5716 OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"`
5717
5718 OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"`
5719
5720 ReplicationPort *int32 `json:"replicationPort,omitempty"`
5721
5722 AllowedAuthenticationType *int32 `json:"allowedAuthenticationType,omitempty"`
5723
5724 ReplicaDeletionOption *string `json:"replicaDeletionOption,omitempty"`
5725
5726 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"`
5727 }
5728
5729
5730 func (hvrbpd HyperVReplicaBluePolicyDetails) MarshalJSON() ([]byte, error) {
5731 hvrbpd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2
5732 objectMap := make(map[string]interface{})
5733 if hvrbpd.ReplicationFrequencyInSeconds != nil {
5734 objectMap["replicationFrequencyInSeconds"] = hvrbpd.ReplicationFrequencyInSeconds
5735 }
5736 if hvrbpd.RecoveryPoints != nil {
5737 objectMap["recoveryPoints"] = hvrbpd.RecoveryPoints
5738 }
5739 if hvrbpd.ApplicationConsistentSnapshotFrequencyInHours != nil {
5740 objectMap["applicationConsistentSnapshotFrequencyInHours"] = hvrbpd.ApplicationConsistentSnapshotFrequencyInHours
5741 }
5742 if hvrbpd.Compression != nil {
5743 objectMap["compression"] = hvrbpd.Compression
5744 }
5745 if hvrbpd.InitialReplicationMethod != nil {
5746 objectMap["initialReplicationMethod"] = hvrbpd.InitialReplicationMethod
5747 }
5748 if hvrbpd.OnlineReplicationStartTime != nil {
5749 objectMap["onlineReplicationStartTime"] = hvrbpd.OnlineReplicationStartTime
5750 }
5751 if hvrbpd.OfflineReplicationImportPath != nil {
5752 objectMap["offlineReplicationImportPath"] = hvrbpd.OfflineReplicationImportPath
5753 }
5754 if hvrbpd.OfflineReplicationExportPath != nil {
5755 objectMap["offlineReplicationExportPath"] = hvrbpd.OfflineReplicationExportPath
5756 }
5757 if hvrbpd.ReplicationPort != nil {
5758 objectMap["replicationPort"] = hvrbpd.ReplicationPort
5759 }
5760 if hvrbpd.AllowedAuthenticationType != nil {
5761 objectMap["allowedAuthenticationType"] = hvrbpd.AllowedAuthenticationType
5762 }
5763 if hvrbpd.ReplicaDeletionOption != nil {
5764 objectMap["replicaDeletionOption"] = hvrbpd.ReplicaDeletionOption
5765 }
5766 if hvrbpd.InstanceType != "" {
5767 objectMap["instanceType"] = hvrbpd.InstanceType
5768 }
5769 return json.Marshal(objectMap)
5770 }
5771
5772
5773 func (hvrbpd HyperVReplicaBluePolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) {
5774 return nil, false
5775 }
5776
5777
5778 func (hvrbpd HyperVReplicaBluePolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) {
5779 return nil, false
5780 }
5781
5782
5783 func (hvrbpd HyperVReplicaBluePolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) {
5784 return nil, false
5785 }
5786
5787
5788 func (hvrbpd HyperVReplicaBluePolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) {
5789 return &hvrbpd, true
5790 }
5791
5792
5793 func (hvrbpd HyperVReplicaBluePolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) {
5794 return nil, false
5795 }
5796
5797
5798 func (hvrbpd HyperVReplicaBluePolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) {
5799 return nil, false
5800 }
5801
5802
5803 func (hvrbpd HyperVReplicaBluePolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) {
5804 return nil, false
5805 }
5806
5807
5808 func (hvrbpd HyperVReplicaBluePolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) {
5809 return nil, false
5810 }
5811
5812
5813 func (hvrbpd HyperVReplicaBluePolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) {
5814 return nil, false
5815 }
5816
5817
5818 func (hvrbpd HyperVReplicaBluePolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) {
5819 return nil, false
5820 }
5821
5822
5823 func (hvrbpd HyperVReplicaBluePolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) {
5824 return nil, false
5825 }
5826
5827
5828 func (hvrbpd HyperVReplicaBluePolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) {
5829 return &hvrbpd, true
5830 }
5831
5832
5833 type HyperVReplicaBluePolicyInput struct {
5834
5835 ReplicationFrequencyInSeconds *int32 `json:"replicationFrequencyInSeconds,omitempty"`
5836
5837 RecoveryPoints *int32 `json:"recoveryPoints,omitempty"`
5838
5839 ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"`
5840
5841 Compression *string `json:"compression,omitempty"`
5842
5843 InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"`
5844
5845 OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"`
5846
5847 OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"`
5848
5849 OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"`
5850
5851 ReplicationPort *int32 `json:"replicationPort,omitempty"`
5852
5853 AllowedAuthenticationType *int32 `json:"allowedAuthenticationType,omitempty"`
5854
5855 ReplicaDeletion *string `json:"replicaDeletion,omitempty"`
5856
5857 InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"`
5858 }
5859
5860
5861 func (hvrbpi HyperVReplicaBluePolicyInput) MarshalJSON() ([]byte, error) {
5862 hvrbpi.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012R2
5863 objectMap := make(map[string]interface{})
5864 if hvrbpi.ReplicationFrequencyInSeconds != nil {
5865 objectMap["replicationFrequencyInSeconds"] = hvrbpi.ReplicationFrequencyInSeconds
5866 }
5867 if hvrbpi.RecoveryPoints != nil {
5868 objectMap["recoveryPoints"] = hvrbpi.RecoveryPoints
5869 }
5870 if hvrbpi.ApplicationConsistentSnapshotFrequencyInHours != nil {
5871 objectMap["applicationConsistentSnapshotFrequencyInHours"] = hvrbpi.ApplicationConsistentSnapshotFrequencyInHours
5872 }
5873 if hvrbpi.Compression != nil {
5874 objectMap["compression"] = hvrbpi.Compression
5875 }
5876 if hvrbpi.InitialReplicationMethod != nil {
5877 objectMap["initialReplicationMethod"] = hvrbpi.InitialReplicationMethod
5878 }
5879 if hvrbpi.OnlineReplicationStartTime != nil {
5880 objectMap["onlineReplicationStartTime"] = hvrbpi.OnlineReplicationStartTime
5881 }
5882 if hvrbpi.OfflineReplicationImportPath != nil {
5883 objectMap["offlineReplicationImportPath"] = hvrbpi.OfflineReplicationImportPath
5884 }
5885 if hvrbpi.OfflineReplicationExportPath != nil {
5886 objectMap["offlineReplicationExportPath"] = hvrbpi.OfflineReplicationExportPath
5887 }
5888 if hvrbpi.ReplicationPort != nil {
5889 objectMap["replicationPort"] = hvrbpi.ReplicationPort
5890 }
5891 if hvrbpi.AllowedAuthenticationType != nil {
5892 objectMap["allowedAuthenticationType"] = hvrbpi.AllowedAuthenticationType
5893 }
5894 if hvrbpi.ReplicaDeletion != nil {
5895 objectMap["replicaDeletion"] = hvrbpi.ReplicaDeletion
5896 }
5897 if hvrbpi.InstanceType != "" {
5898 objectMap["instanceType"] = hvrbpi.InstanceType
5899 }
5900 return json.Marshal(objectMap)
5901 }
5902
5903
5904 func (hvrbpi HyperVReplicaBluePolicyInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) {
5905 return nil, false
5906 }
5907
5908
5909 func (hvrbpi HyperVReplicaBluePolicyInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) {
5910 return nil, false
5911 }
5912
5913
5914 func (hvrbpi HyperVReplicaBluePolicyInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) {
5915 return &hvrbpi, true
5916 }
5917
5918
5919 func (hvrbpi HyperVReplicaBluePolicyInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) {
5920 return nil, false
5921 }
5922
5923
5924 func (hvrbpi HyperVReplicaBluePolicyInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) {
5925 return nil, false
5926 }
5927
5928
5929 func (hvrbpi HyperVReplicaBluePolicyInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) {
5930 return nil, false
5931 }
5932
5933
5934 func (hvrbpi HyperVReplicaBluePolicyInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) {
5935 return nil, false
5936 }
5937
5938
5939 func (hvrbpi HyperVReplicaBluePolicyInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) {
5940 return nil, false
5941 }
5942
5943
5944 func (hvrbpi HyperVReplicaBluePolicyInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) {
5945 return &hvrbpi, true
5946 }
5947
5948
5949 type HyperVReplicaBlueReplicationDetails struct {
5950
5951 LastReplicatedTime *date.Time `json:"lastReplicatedTime,omitempty"`
5952
5953 VMNics *[]VMNicDetails `json:"vmNics,omitempty"`
5954
5955 VMID *string `json:"vmId,omitempty"`
5956
5957 VMProtectionState *string `json:"vmProtectionState,omitempty"`
5958
5959 VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"`
5960
5961 InitialReplicationDetails *InitialReplicationDetails `json:"initialReplicationDetails,omitempty"`
5962
5963 VMDiskDetails *[]DiskDetails `json:"vMDiskDetails,omitempty"`
5964
5965 InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"`
5966 }
5967
5968
5969 func (hvrbrd HyperVReplicaBlueReplicationDetails) MarshalJSON() ([]byte, error) {
5970 hvrbrd.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012R2
5971 objectMap := make(map[string]interface{})
5972 if hvrbrd.LastReplicatedTime != nil {
5973 objectMap["lastReplicatedTime"] = hvrbrd.LastReplicatedTime
5974 }
5975 if hvrbrd.VMNics != nil {
5976 objectMap["vmNics"] = hvrbrd.VMNics
5977 }
5978 if hvrbrd.VMID != nil {
5979 objectMap["vmId"] = hvrbrd.VMID
5980 }
5981 if hvrbrd.VMProtectionState != nil {
5982 objectMap["vmProtectionState"] = hvrbrd.VMProtectionState
5983 }
5984 if hvrbrd.VMProtectionStateDescription != nil {
5985 objectMap["vmProtectionStateDescription"] = hvrbrd.VMProtectionStateDescription
5986 }
5987 if hvrbrd.InitialReplicationDetails != nil {
5988 objectMap["initialReplicationDetails"] = hvrbrd.InitialReplicationDetails
5989 }
5990 if hvrbrd.VMDiskDetails != nil {
5991 objectMap["vMDiskDetails"] = hvrbrd.VMDiskDetails
5992 }
5993 if hvrbrd.InstanceType != "" {
5994 objectMap["instanceType"] = hvrbrd.InstanceType
5995 }
5996 return json.Marshal(objectMap)
5997 }
5998
5999
6000 func (hvrbrd HyperVReplicaBlueReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) {
6001 return nil, false
6002 }
6003
6004
6005 func (hvrbrd HyperVReplicaBlueReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) {
6006 return nil, false
6007 }
6008
6009
6010 func (hvrbrd HyperVReplicaBlueReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) {
6011 return &hvrbrd, true
6012 }
6013
6014
6015 func (hvrbrd HyperVReplicaBlueReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) {
6016 return nil, false
6017 }
6018
6019
6020 func (hvrbrd HyperVReplicaBlueReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) {
6021 return nil, false
6022 }
6023
6024
6025 func (hvrbrd HyperVReplicaBlueReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) {
6026 return nil, false
6027 }
6028
6029
6030 func (hvrbrd HyperVReplicaBlueReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) {
6031 return nil, false
6032 }
6033
6034
6035 func (hvrbrd HyperVReplicaBlueReplicationDetails) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) {
6036 return nil, false
6037 }
6038
6039
6040 func (hvrbrd HyperVReplicaBlueReplicationDetails) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) {
6041 return &hvrbrd, true
6042 }
6043
6044
6045 type HyperVReplicaPolicyDetails struct {
6046
6047 RecoveryPoints *int32 `json:"recoveryPoints,omitempty"`
6048
6049 ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"`
6050
6051 Compression *string `json:"compression,omitempty"`
6052
6053 InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"`
6054
6055 OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"`
6056
6057 OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"`
6058
6059 OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"`
6060
6061 ReplicationPort *int32 `json:"replicationPort,omitempty"`
6062
6063 AllowedAuthenticationType *int32 `json:"allowedAuthenticationType,omitempty"`
6064
6065 ReplicaDeletionOption *string `json:"replicaDeletionOption,omitempty"`
6066
6067 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"`
6068 }
6069
6070
6071 func (hvrpd HyperVReplicaPolicyDetails) MarshalJSON() ([]byte, error) {
6072 hvrpd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012
6073 objectMap := make(map[string]interface{})
6074 if hvrpd.RecoveryPoints != nil {
6075 objectMap["recoveryPoints"] = hvrpd.RecoveryPoints
6076 }
6077 if hvrpd.ApplicationConsistentSnapshotFrequencyInHours != nil {
6078 objectMap["applicationConsistentSnapshotFrequencyInHours"] = hvrpd.ApplicationConsistentSnapshotFrequencyInHours
6079 }
6080 if hvrpd.Compression != nil {
6081 objectMap["compression"] = hvrpd.Compression
6082 }
6083 if hvrpd.InitialReplicationMethod != nil {
6084 objectMap["initialReplicationMethod"] = hvrpd.InitialReplicationMethod
6085 }
6086 if hvrpd.OnlineReplicationStartTime != nil {
6087 objectMap["onlineReplicationStartTime"] = hvrpd.OnlineReplicationStartTime
6088 }
6089 if hvrpd.OfflineReplicationImportPath != nil {
6090 objectMap["offlineReplicationImportPath"] = hvrpd.OfflineReplicationImportPath
6091 }
6092 if hvrpd.OfflineReplicationExportPath != nil {
6093 objectMap["offlineReplicationExportPath"] = hvrpd.OfflineReplicationExportPath
6094 }
6095 if hvrpd.ReplicationPort != nil {
6096 objectMap["replicationPort"] = hvrpd.ReplicationPort
6097 }
6098 if hvrpd.AllowedAuthenticationType != nil {
6099 objectMap["allowedAuthenticationType"] = hvrpd.AllowedAuthenticationType
6100 }
6101 if hvrpd.ReplicaDeletionOption != nil {
6102 objectMap["replicaDeletionOption"] = hvrpd.ReplicaDeletionOption
6103 }
6104 if hvrpd.InstanceType != "" {
6105 objectMap["instanceType"] = hvrpd.InstanceType
6106 }
6107 return json.Marshal(objectMap)
6108 }
6109
6110
6111 func (hvrpd HyperVReplicaPolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) {
6112 return nil, false
6113 }
6114
6115
6116 func (hvrpd HyperVReplicaPolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) {
6117 return nil, false
6118 }
6119
6120
6121 func (hvrpd HyperVReplicaPolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) {
6122 return &hvrpd, true
6123 }
6124
6125
6126 func (hvrpd HyperVReplicaPolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) {
6127 return nil, false
6128 }
6129
6130
6131 func (hvrpd HyperVReplicaPolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) {
6132 return nil, false
6133 }
6134
6135
6136 func (hvrpd HyperVReplicaPolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) {
6137 return nil, false
6138 }
6139
6140
6141 func (hvrpd HyperVReplicaPolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) {
6142 return nil, false
6143 }
6144
6145
6146 func (hvrpd HyperVReplicaPolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) {
6147 return nil, false
6148 }
6149
6150
6151 func (hvrpd HyperVReplicaPolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) {
6152 return nil, false
6153 }
6154
6155
6156 func (hvrpd HyperVReplicaPolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) {
6157 return nil, false
6158 }
6159
6160
6161 func (hvrpd HyperVReplicaPolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) {
6162 return nil, false
6163 }
6164
6165
6166 func (hvrpd HyperVReplicaPolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) {
6167 return &hvrpd, true
6168 }
6169
6170
6171 type HyperVReplicaPolicyInput struct {
6172
6173 RecoveryPoints *int32 `json:"recoveryPoints,omitempty"`
6174
6175 ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"`
6176
6177 Compression *string `json:"compression,omitempty"`
6178
6179 InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"`
6180
6181 OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"`
6182
6183 OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"`
6184
6185 OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"`
6186
6187 ReplicationPort *int32 `json:"replicationPort,omitempty"`
6188
6189 AllowedAuthenticationType *int32 `json:"allowedAuthenticationType,omitempty"`
6190
6191 ReplicaDeletion *string `json:"replicaDeletion,omitempty"`
6192
6193 InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"`
6194 }
6195
6196
6197 func (hvrpi HyperVReplicaPolicyInput) MarshalJSON() ([]byte, error) {
6198 hvrpi.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012
6199 objectMap := make(map[string]interface{})
6200 if hvrpi.RecoveryPoints != nil {
6201 objectMap["recoveryPoints"] = hvrpi.RecoveryPoints
6202 }
6203 if hvrpi.ApplicationConsistentSnapshotFrequencyInHours != nil {
6204 objectMap["applicationConsistentSnapshotFrequencyInHours"] = hvrpi.ApplicationConsistentSnapshotFrequencyInHours
6205 }
6206 if hvrpi.Compression != nil {
6207 objectMap["compression"] = hvrpi.Compression
6208 }
6209 if hvrpi.InitialReplicationMethod != nil {
6210 objectMap["initialReplicationMethod"] = hvrpi.InitialReplicationMethod
6211 }
6212 if hvrpi.OnlineReplicationStartTime != nil {
6213 objectMap["onlineReplicationStartTime"] = hvrpi.OnlineReplicationStartTime
6214 }
6215 if hvrpi.OfflineReplicationImportPath != nil {
6216 objectMap["offlineReplicationImportPath"] = hvrpi.OfflineReplicationImportPath
6217 }
6218 if hvrpi.OfflineReplicationExportPath != nil {
6219 objectMap["offlineReplicationExportPath"] = hvrpi.OfflineReplicationExportPath
6220 }
6221 if hvrpi.ReplicationPort != nil {
6222 objectMap["replicationPort"] = hvrpi.ReplicationPort
6223 }
6224 if hvrpi.AllowedAuthenticationType != nil {
6225 objectMap["allowedAuthenticationType"] = hvrpi.AllowedAuthenticationType
6226 }
6227 if hvrpi.ReplicaDeletion != nil {
6228 objectMap["replicaDeletion"] = hvrpi.ReplicaDeletion
6229 }
6230 if hvrpi.InstanceType != "" {
6231 objectMap["instanceType"] = hvrpi.InstanceType
6232 }
6233 return json.Marshal(objectMap)
6234 }
6235
6236
6237 func (hvrpi HyperVReplicaPolicyInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) {
6238 return nil, false
6239 }
6240
6241
6242 func (hvrpi HyperVReplicaPolicyInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) {
6243 return &hvrpi, true
6244 }
6245
6246
6247 func (hvrpi HyperVReplicaPolicyInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) {
6248 return nil, false
6249 }
6250
6251
6252 func (hvrpi HyperVReplicaPolicyInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) {
6253 return nil, false
6254 }
6255
6256
6257 func (hvrpi HyperVReplicaPolicyInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) {
6258 return nil, false
6259 }
6260
6261
6262 func (hvrpi HyperVReplicaPolicyInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) {
6263 return nil, false
6264 }
6265
6266
6267 func (hvrpi HyperVReplicaPolicyInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) {
6268 return nil, false
6269 }
6270
6271
6272 func (hvrpi HyperVReplicaPolicyInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) {
6273 return nil, false
6274 }
6275
6276
6277 func (hvrpi HyperVReplicaPolicyInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) {
6278 return &hvrpi, true
6279 }
6280
6281
6282 type HyperVReplicaReplicationDetails struct {
6283
6284 LastReplicatedTime *date.Time `json:"lastReplicatedTime,omitempty"`
6285
6286 VMNics *[]VMNicDetails `json:"vmNics,omitempty"`
6287
6288 VMID *string `json:"vmId,omitempty"`
6289
6290 VMProtectionState *string `json:"vmProtectionState,omitempty"`
6291
6292 VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"`
6293
6294 InitialReplicationDetails *InitialReplicationDetails `json:"initialReplicationDetails,omitempty"`
6295
6296 VMDiskDetails *[]DiskDetails `json:"vMDiskDetails,omitempty"`
6297
6298 InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"`
6299 }
6300
6301
6302 func (hvrrd HyperVReplicaReplicationDetails) MarshalJSON() ([]byte, error) {
6303 hvrrd.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012
6304 objectMap := make(map[string]interface{})
6305 if hvrrd.LastReplicatedTime != nil {
6306 objectMap["lastReplicatedTime"] = hvrrd.LastReplicatedTime
6307 }
6308 if hvrrd.VMNics != nil {
6309 objectMap["vmNics"] = hvrrd.VMNics
6310 }
6311 if hvrrd.VMID != nil {
6312 objectMap["vmId"] = hvrrd.VMID
6313 }
6314 if hvrrd.VMProtectionState != nil {
6315 objectMap["vmProtectionState"] = hvrrd.VMProtectionState
6316 }
6317 if hvrrd.VMProtectionStateDescription != nil {
6318 objectMap["vmProtectionStateDescription"] = hvrrd.VMProtectionStateDescription
6319 }
6320 if hvrrd.InitialReplicationDetails != nil {
6321 objectMap["initialReplicationDetails"] = hvrrd.InitialReplicationDetails
6322 }
6323 if hvrrd.VMDiskDetails != nil {
6324 objectMap["vMDiskDetails"] = hvrrd.VMDiskDetails
6325 }
6326 if hvrrd.InstanceType != "" {
6327 objectMap["instanceType"] = hvrrd.InstanceType
6328 }
6329 return json.Marshal(objectMap)
6330 }
6331
6332
6333 func (hvrrd HyperVReplicaReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) {
6334 return nil, false
6335 }
6336
6337
6338 func (hvrrd HyperVReplicaReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) {
6339 return &hvrrd, true
6340 }
6341
6342
6343 func (hvrrd HyperVReplicaReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) {
6344 return nil, false
6345 }
6346
6347
6348 func (hvrrd HyperVReplicaReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) {
6349 return nil, false
6350 }
6351
6352
6353 func (hvrrd HyperVReplicaReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) {
6354 return nil, false
6355 }
6356
6357
6358 func (hvrrd HyperVReplicaReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) {
6359 return nil, false
6360 }
6361
6362
6363 func (hvrrd HyperVReplicaReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) {
6364 return nil, false
6365 }
6366
6367
6368 func (hvrrd HyperVReplicaReplicationDetails) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) {
6369 return nil, false
6370 }
6371
6372
6373 func (hvrrd HyperVReplicaReplicationDetails) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) {
6374 return &hvrrd, true
6375 }
6376
6377
6378 type HyperVSiteDetails struct {
6379
6380 InstanceType InstanceTypeBasicFabricSpecificDetails `json:"instanceType,omitempty"`
6381 }
6382
6383
6384 func (hvsd HyperVSiteDetails) MarshalJSON() ([]byte, error) {
6385 hvsd.InstanceType = InstanceTypeBasicFabricSpecificDetailsInstanceTypeHyperVSite
6386 objectMap := make(map[string]interface{})
6387 if hvsd.InstanceType != "" {
6388 objectMap["instanceType"] = hvsd.InstanceType
6389 }
6390 return json.Marshal(objectMap)
6391 }
6392
6393
6394 func (hvsd HyperVSiteDetails) AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool) {
6395 return nil, false
6396 }
6397
6398
6399 func (hvsd HyperVSiteDetails) AsVmmDetails() (*VmmDetails, bool) {
6400 return nil, false
6401 }
6402
6403
6404 func (hvsd HyperVSiteDetails) AsHyperVSiteDetails() (*HyperVSiteDetails, bool) {
6405 return &hvsd, true
6406 }
6407
6408
6409 func (hvsd HyperVSiteDetails) AsVMwareDetails() (*VMwareDetails, bool) {
6410 return nil, false
6411 }
6412
6413
6414 func (hvsd HyperVSiteDetails) AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool) {
6415 return nil, false
6416 }
6417
6418
6419 func (hvsd HyperVSiteDetails) AsFabricSpecificDetails() (*FabricSpecificDetails, bool) {
6420 return nil, false
6421 }
6422
6423
6424 func (hvsd HyperVSiteDetails) AsBasicFabricSpecificDetails() (BasicFabricSpecificDetails, bool) {
6425 return &hvsd, true
6426 }
6427
6428
6429 type HyperVVirtualMachineDetails struct {
6430
6431 SourceItemID *string `json:"sourceItemId,omitempty"`
6432
6433 Generation *string `json:"generation,omitempty"`
6434
6435 OsDetails *OSDetails `json:"osDetails,omitempty"`
6436
6437 DiskDetails *[]DiskDetails `json:"diskDetails,omitempty"`
6438
6439 InstanceType InstanceTypeBasicConfigurationSettings `json:"instanceType,omitempty"`
6440 }
6441
6442
6443 func (hvvmd HyperVVirtualMachineDetails) MarshalJSON() ([]byte, error) {
6444 hvvmd.InstanceType = InstanceTypeHyperVVirtualMachine
6445 objectMap := make(map[string]interface{})
6446 if hvvmd.SourceItemID != nil {
6447 objectMap["sourceItemId"] = hvvmd.SourceItemID
6448 }
6449 if hvvmd.Generation != nil {
6450 objectMap["generation"] = hvvmd.Generation
6451 }
6452 if hvvmd.OsDetails != nil {
6453 objectMap["osDetails"] = hvvmd.OsDetails
6454 }
6455 if hvvmd.DiskDetails != nil {
6456 objectMap["diskDetails"] = hvvmd.DiskDetails
6457 }
6458 if hvvmd.InstanceType != "" {
6459 objectMap["instanceType"] = hvvmd.InstanceType
6460 }
6461 return json.Marshal(objectMap)
6462 }
6463
6464
6465 func (hvvmd HyperVVirtualMachineDetails) AsHyperVVirtualMachineDetails() (*HyperVVirtualMachineDetails, bool) {
6466 return &hvvmd, true
6467 }
6468
6469
6470 func (hvvmd HyperVVirtualMachineDetails) AsVMwareVirtualMachineDetails() (*VMwareVirtualMachineDetails, bool) {
6471 return nil, false
6472 }
6473
6474
6475 func (hvvmd HyperVVirtualMachineDetails) AsReplicationGroupDetails() (*ReplicationGroupDetails, bool) {
6476 return nil, false
6477 }
6478
6479
6480 func (hvvmd HyperVVirtualMachineDetails) AsConfigurationSettings() (*ConfigurationSettings, bool) {
6481 return nil, false
6482 }
6483
6484
6485 func (hvvmd HyperVVirtualMachineDetails) AsBasicConfigurationSettings() (BasicConfigurationSettings, bool) {
6486 return &hvvmd, true
6487 }
6488
6489
6490 type IdentityInformation struct {
6491
6492 IdentityProviderType IdentityProviderType `json:"identityProviderType,omitempty"`
6493
6494 TenantID *string `json:"tenantId,omitempty"`
6495
6496 ApplicationID *string `json:"applicationId,omitempty"`
6497
6498 ObjectID *string `json:"objectId,omitempty"`
6499
6500 Audience *string `json:"audience,omitempty"`
6501
6502 AadAuthority *string `json:"aadAuthority,omitempty"`
6503
6504 CertificateThumbprint *string `json:"certificateThumbprint,omitempty"`
6505 }
6506
6507
6508
6509 type InconsistentVMDetails struct {
6510
6511 VMName *string `json:"vmName,omitempty"`
6512
6513 CloudName *string `json:"cloudName,omitempty"`
6514
6515 Details *[]string `json:"details,omitempty"`
6516
6517 ErrorIds *[]string `json:"errorIds,omitempty"`
6518 }
6519
6520
6521 type InitialReplicationDetails struct {
6522
6523 InitialReplicationType *string `json:"initialReplicationType,omitempty"`
6524
6525 InitialReplicationProgressPercentage *string `json:"initialReplicationProgressPercentage,omitempty"`
6526 }
6527
6528
6529 type InlineWorkflowTaskDetails struct {
6530
6531 WorkflowIds *[]string `json:"workflowIds,omitempty"`
6532
6533 ChildTasks *[]ASRTask `json:"childTasks,omitempty"`
6534
6535 InstanceType InstanceTypeBasicGroupTaskDetails `json:"instanceType,omitempty"`
6536 }
6537
6538
6539 func (iwtd InlineWorkflowTaskDetails) MarshalJSON() ([]byte, error) {
6540 iwtd.InstanceType = InstanceTypeInlineWorkflowTaskDetails
6541 objectMap := make(map[string]interface{})
6542 if iwtd.WorkflowIds != nil {
6543 objectMap["workflowIds"] = iwtd.WorkflowIds
6544 }
6545 if iwtd.ChildTasks != nil {
6546 objectMap["childTasks"] = iwtd.ChildTasks
6547 }
6548 if iwtd.InstanceType != "" {
6549 objectMap["instanceType"] = iwtd.InstanceType
6550 }
6551 return json.Marshal(objectMap)
6552 }
6553
6554
6555 func (iwtd InlineWorkflowTaskDetails) AsInlineWorkflowTaskDetails() (*InlineWorkflowTaskDetails, bool) {
6556 return &iwtd, true
6557 }
6558
6559
6560 func (iwtd InlineWorkflowTaskDetails) AsRecoveryPlanGroupTaskDetails() (*RecoveryPlanGroupTaskDetails, bool) {
6561 return nil, false
6562 }
6563
6564
6565 func (iwtd InlineWorkflowTaskDetails) AsRecoveryPlanShutdownGroupTaskDetails() (*RecoveryPlanShutdownGroupTaskDetails, bool) {
6566 return nil, false
6567 }
6568
6569
6570 func (iwtd InlineWorkflowTaskDetails) AsGroupTaskDetails() (*GroupTaskDetails, bool) {
6571 return nil, false
6572 }
6573
6574
6575 func (iwtd InlineWorkflowTaskDetails) AsBasicGroupTaskDetails() (BasicGroupTaskDetails, bool) {
6576 return &iwtd, true
6577 }
6578
6579
6580 type InMageAgentDetails struct {
6581
6582 AgentVersion *string `json:"agentVersion,omitempty"`
6583
6584 AgentUpdateStatus *string `json:"agentUpdateStatus,omitempty"`
6585
6586 PostUpdateRebootStatus *string `json:"postUpdateRebootStatus,omitempty"`
6587 }
6588
6589
6590 type InMageAzureV2ApplyRecoveryPointInput struct {
6591
6592 VaultLocation *string `json:"vaultLocation,omitempty"`
6593
6594 InstanceType InstanceTypeBasicApplyRecoveryPointProviderSpecificInput `json:"instanceType,omitempty"`
6595 }
6596
6597
6598 func (imavarpi InMageAzureV2ApplyRecoveryPointInput) MarshalJSON() ([]byte, error) {
6599 imavarpi.InstanceType = InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeInMageAzureV2
6600 objectMap := make(map[string]interface{})
6601 if imavarpi.VaultLocation != nil {
6602 objectMap["vaultLocation"] = imavarpi.VaultLocation
6603 }
6604 if imavarpi.InstanceType != "" {
6605 objectMap["instanceType"] = imavarpi.InstanceType
6606 }
6607 return json.Marshal(objectMap)
6608 }
6609
6610
6611 func (imavarpi InMageAzureV2ApplyRecoveryPointInput) AsHyperVReplicaAzureApplyRecoveryPointInput() (*HyperVReplicaAzureApplyRecoveryPointInput, bool) {
6612 return nil, false
6613 }
6614
6615
6616 func (imavarpi InMageAzureV2ApplyRecoveryPointInput) AsInMageAzureV2ApplyRecoveryPointInput() (*InMageAzureV2ApplyRecoveryPointInput, bool) {
6617 return &imavarpi, true
6618 }
6619
6620
6621 func (imavarpi InMageAzureV2ApplyRecoveryPointInput) AsA2AApplyRecoveryPointInput() (*A2AApplyRecoveryPointInput, bool) {
6622 return nil, false
6623 }
6624
6625
6626 func (imavarpi InMageAzureV2ApplyRecoveryPointInput) AsApplyRecoveryPointProviderSpecificInput() (*ApplyRecoveryPointProviderSpecificInput, bool) {
6627 return nil, false
6628 }
6629
6630
6631 func (imavarpi InMageAzureV2ApplyRecoveryPointInput) AsBasicApplyRecoveryPointProviderSpecificInput() (BasicApplyRecoveryPointProviderSpecificInput, bool) {
6632 return &imavarpi, true
6633 }
6634
6635
6636 type InMageAzureV2EnableProtectionInput struct {
6637
6638 MasterTargetID *string `json:"masterTargetId,omitempty"`
6639
6640 ProcessServerID *string `json:"processServerId,omitempty"`
6641
6642 StorageAccountID *string `json:"storageAccountId,omitempty"`
6643
6644 RunAsAccountID *string `json:"runAsAccountId,omitempty"`
6645
6646 MultiVMGroupID *string `json:"multiVmGroupId,omitempty"`
6647
6648 MultiVMGroupName *string `json:"multiVmGroupName,omitempty"`
6649
6650 DisksToInclude *[]string `json:"disksToInclude,omitempty"`
6651
6652 TargetAzureNetworkID *string `json:"targetAzureNetworkId,omitempty"`
6653
6654 TargetAzureSubnetID *string `json:"targetAzureSubnetId,omitempty"`
6655
6656 EnableRDPOnTargetOption *string `json:"enableRDPOnTargetOption,omitempty"`
6657
6658 TargetAzureVMName *string `json:"targetAzureVmName,omitempty"`
6659
6660 LogStorageAccountID *string `json:"logStorageAccountId,omitempty"`
6661
6662 TargetAzureV1ResourceGroupID *string `json:"targetAzureV1ResourceGroupId,omitempty"`
6663
6664 TargetAzureV2ResourceGroupID *string `json:"targetAzureV2ResourceGroupId,omitempty"`
6665
6666 UseManagedDisks *string `json:"useManagedDisks,omitempty"`
6667
6668 InstanceType InstanceTypeBasicEnableProtectionProviderSpecificInput `json:"instanceType,omitempty"`
6669 }
6670
6671
6672 func (imavepi InMageAzureV2EnableProtectionInput) MarshalJSON() ([]byte, error) {
6673 imavepi.InstanceType = InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMageAzureV2
6674 objectMap := make(map[string]interface{})
6675 if imavepi.MasterTargetID != nil {
6676 objectMap["masterTargetId"] = imavepi.MasterTargetID
6677 }
6678 if imavepi.ProcessServerID != nil {
6679 objectMap["processServerId"] = imavepi.ProcessServerID
6680 }
6681 if imavepi.StorageAccountID != nil {
6682 objectMap["storageAccountId"] = imavepi.StorageAccountID
6683 }
6684 if imavepi.RunAsAccountID != nil {
6685 objectMap["runAsAccountId"] = imavepi.RunAsAccountID
6686 }
6687 if imavepi.MultiVMGroupID != nil {
6688 objectMap["multiVmGroupId"] = imavepi.MultiVMGroupID
6689 }
6690 if imavepi.MultiVMGroupName != nil {
6691 objectMap["multiVmGroupName"] = imavepi.MultiVMGroupName
6692 }
6693 if imavepi.DisksToInclude != nil {
6694 objectMap["disksToInclude"] = imavepi.DisksToInclude
6695 }
6696 if imavepi.TargetAzureNetworkID != nil {
6697 objectMap["targetAzureNetworkId"] = imavepi.TargetAzureNetworkID
6698 }
6699 if imavepi.TargetAzureSubnetID != nil {
6700 objectMap["targetAzureSubnetId"] = imavepi.TargetAzureSubnetID
6701 }
6702 if imavepi.EnableRDPOnTargetOption != nil {
6703 objectMap["enableRDPOnTargetOption"] = imavepi.EnableRDPOnTargetOption
6704 }
6705 if imavepi.TargetAzureVMName != nil {
6706 objectMap["targetAzureVmName"] = imavepi.TargetAzureVMName
6707 }
6708 if imavepi.LogStorageAccountID != nil {
6709 objectMap["logStorageAccountId"] = imavepi.LogStorageAccountID
6710 }
6711 if imavepi.TargetAzureV1ResourceGroupID != nil {
6712 objectMap["targetAzureV1ResourceGroupId"] = imavepi.TargetAzureV1ResourceGroupID
6713 }
6714 if imavepi.TargetAzureV2ResourceGroupID != nil {
6715 objectMap["targetAzureV2ResourceGroupId"] = imavepi.TargetAzureV2ResourceGroupID
6716 }
6717 if imavepi.UseManagedDisks != nil {
6718 objectMap["useManagedDisks"] = imavepi.UseManagedDisks
6719 }
6720 if imavepi.InstanceType != "" {
6721 objectMap["instanceType"] = imavepi.InstanceType
6722 }
6723 return json.Marshal(objectMap)
6724 }
6725
6726
6727 func (imavepi InMageAzureV2EnableProtectionInput) AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool) {
6728 return nil, false
6729 }
6730
6731
6732 func (imavepi InMageAzureV2EnableProtectionInput) AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool) {
6733 return nil, false
6734 }
6735
6736
6737 func (imavepi InMageAzureV2EnableProtectionInput) AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool) {
6738 return &imavepi, true
6739 }
6740
6741
6742 func (imavepi InMageAzureV2EnableProtectionInput) AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool) {
6743 return nil, false
6744 }
6745
6746
6747 func (imavepi InMageAzureV2EnableProtectionInput) AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool) {
6748 return nil, false
6749 }
6750
6751
6752 func (imavepi InMageAzureV2EnableProtectionInput) AsEnableProtectionProviderSpecificInput() (*EnableProtectionProviderSpecificInput, bool) {
6753 return nil, false
6754 }
6755
6756
6757 func (imavepi InMageAzureV2EnableProtectionInput) AsBasicEnableProtectionProviderSpecificInput() (BasicEnableProtectionProviderSpecificInput, bool) {
6758 return &imavepi, true
6759 }
6760
6761
6762 type InMageAzureV2EventDetails struct {
6763
6764 EventType *string `json:"eventType,omitempty"`
6765
6766 Category *string `json:"category,omitempty"`
6767
6768 Component *string `json:"component,omitempty"`
6769
6770 CorrectiveAction *string `json:"correctiveAction,omitempty"`
6771
6772 Details *string `json:"details,omitempty"`
6773
6774 Summary *string `json:"summary,omitempty"`
6775
6776 SiteName *string `json:"siteName,omitempty"`
6777
6778 InstanceType InstanceType `json:"instanceType,omitempty"`
6779 }
6780
6781
6782 func (imaved InMageAzureV2EventDetails) MarshalJSON() ([]byte, error) {
6783 imaved.InstanceType = InstanceTypeInMageAzureV2
6784 objectMap := make(map[string]interface{})
6785 if imaved.EventType != nil {
6786 objectMap["eventType"] = imaved.EventType
6787 }
6788 if imaved.Category != nil {
6789 objectMap["category"] = imaved.Category
6790 }
6791 if imaved.Component != nil {
6792 objectMap["component"] = imaved.Component
6793 }
6794 if imaved.CorrectiveAction != nil {
6795 objectMap["correctiveAction"] = imaved.CorrectiveAction
6796 }
6797 if imaved.Details != nil {
6798 objectMap["details"] = imaved.Details
6799 }
6800 if imaved.Summary != nil {
6801 objectMap["summary"] = imaved.Summary
6802 }
6803 if imaved.SiteName != nil {
6804 objectMap["siteName"] = imaved.SiteName
6805 }
6806 if imaved.InstanceType != "" {
6807 objectMap["instanceType"] = imaved.InstanceType
6808 }
6809 return json.Marshal(objectMap)
6810 }
6811
6812
6813 func (imaved InMageAzureV2EventDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) {
6814 return nil, false
6815 }
6816
6817
6818 func (imaved InMageAzureV2EventDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) {
6819 return nil, false
6820 }
6821
6822
6823 func (imaved InMageAzureV2EventDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) {
6824 return nil, false
6825 }
6826
6827
6828 func (imaved InMageAzureV2EventDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) {
6829 return nil, false
6830 }
6831
6832
6833 func (imaved InMageAzureV2EventDetails) AsA2AEventDetails() (*A2AEventDetails, bool) {
6834 return nil, false
6835 }
6836
6837
6838 func (imaved InMageAzureV2EventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) {
6839 return &imaved, true
6840 }
6841
6842
6843 func (imaved InMageAzureV2EventDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) {
6844 return nil, false
6845 }
6846
6847
6848 func (imaved InMageAzureV2EventDetails) AsBasicEventProviderSpecificDetails() (BasicEventProviderSpecificDetails, bool) {
6849 return &imaved, true
6850 }
6851
6852
6853 type InMageAzureV2FailoverProviderInput struct {
6854
6855 VaultLocation *string `json:"vaultLocation,omitempty"`
6856
6857 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
6858
6859 InstanceType InstanceTypeBasicProviderSpecificFailoverInput `json:"instanceType,omitempty"`
6860 }
6861
6862
6863 func (imavfpi InMageAzureV2FailoverProviderInput) MarshalJSON() ([]byte, error) {
6864 imavfpi.InstanceType = InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMageAzureV2
6865 objectMap := make(map[string]interface{})
6866 if imavfpi.VaultLocation != nil {
6867 objectMap["vaultLocation"] = imavfpi.VaultLocation
6868 }
6869 if imavfpi.RecoveryPointID != nil {
6870 objectMap["recoveryPointId"] = imavfpi.RecoveryPointID
6871 }
6872 if imavfpi.InstanceType != "" {
6873 objectMap["instanceType"] = imavfpi.InstanceType
6874 }
6875 return json.Marshal(objectMap)
6876 }
6877
6878
6879 func (imavfpi InMageAzureV2FailoverProviderInput) AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool) {
6880 return nil, false
6881 }
6882
6883
6884 func (imavfpi InMageAzureV2FailoverProviderInput) AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool) {
6885 return nil, false
6886 }
6887
6888
6889 func (imavfpi InMageAzureV2FailoverProviderInput) AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool) {
6890 return &imavfpi, true
6891 }
6892
6893
6894 func (imavfpi InMageAzureV2FailoverProviderInput) AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool) {
6895 return nil, false
6896 }
6897
6898
6899 func (imavfpi InMageAzureV2FailoverProviderInput) AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool) {
6900 return nil, false
6901 }
6902
6903
6904 func (imavfpi InMageAzureV2FailoverProviderInput) AsProviderSpecificFailoverInput() (*ProviderSpecificFailoverInput, bool) {
6905 return nil, false
6906 }
6907
6908
6909 func (imavfpi InMageAzureV2FailoverProviderInput) AsBasicProviderSpecificFailoverInput() (BasicProviderSpecificFailoverInput, bool) {
6910 return &imavfpi, true
6911 }
6912
6913
6914 type InMageAzureV2PolicyDetails struct {
6915
6916 CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"`
6917
6918 RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"`
6919
6920 RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"`
6921
6922 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"`
6923
6924 MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"`
6925
6926 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"`
6927 }
6928
6929
6930 func (imavpd InMageAzureV2PolicyDetails) MarshalJSON() ([]byte, error) {
6931 imavpd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2
6932 objectMap := make(map[string]interface{})
6933 if imavpd.CrashConsistentFrequencyInMinutes != nil {
6934 objectMap["crashConsistentFrequencyInMinutes"] = imavpd.CrashConsistentFrequencyInMinutes
6935 }
6936 if imavpd.RecoveryPointThresholdInMinutes != nil {
6937 objectMap["recoveryPointThresholdInMinutes"] = imavpd.RecoveryPointThresholdInMinutes
6938 }
6939 if imavpd.RecoveryPointHistory != nil {
6940 objectMap["recoveryPointHistory"] = imavpd.RecoveryPointHistory
6941 }
6942 if imavpd.AppConsistentFrequencyInMinutes != nil {
6943 objectMap["appConsistentFrequencyInMinutes"] = imavpd.AppConsistentFrequencyInMinutes
6944 }
6945 if imavpd.MultiVMSyncStatus != nil {
6946 objectMap["multiVmSyncStatus"] = imavpd.MultiVMSyncStatus
6947 }
6948 if imavpd.InstanceType != "" {
6949 objectMap["instanceType"] = imavpd.InstanceType
6950 }
6951 return json.Marshal(objectMap)
6952 }
6953
6954
6955 func (imavpd InMageAzureV2PolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) {
6956 return nil, false
6957 }
6958
6959
6960 func (imavpd InMageAzureV2PolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) {
6961 return nil, false
6962 }
6963
6964
6965 func (imavpd InMageAzureV2PolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) {
6966 return nil, false
6967 }
6968
6969
6970 func (imavpd InMageAzureV2PolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) {
6971 return nil, false
6972 }
6973
6974
6975 func (imavpd InMageAzureV2PolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) {
6976 return nil, false
6977 }
6978
6979
6980 func (imavpd InMageAzureV2PolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) {
6981 return &imavpd, true
6982 }
6983
6984
6985 func (imavpd InMageAzureV2PolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) {
6986 return nil, false
6987 }
6988
6989
6990 func (imavpd InMageAzureV2PolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) {
6991 return nil, false
6992 }
6993
6994
6995 func (imavpd InMageAzureV2PolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) {
6996 return nil, false
6997 }
6998
6999
7000 func (imavpd InMageAzureV2PolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) {
7001 return nil, false
7002 }
7003
7004
7005 func (imavpd InMageAzureV2PolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) {
7006 return nil, false
7007 }
7008
7009
7010 func (imavpd InMageAzureV2PolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) {
7011 return &imavpd, true
7012 }
7013
7014
7015 type InMageAzureV2PolicyInput struct {
7016
7017 RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"`
7018
7019 RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"`
7020
7021 CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"`
7022
7023 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"`
7024
7025 MultiVMSyncStatus SetMultiVMSyncStatus `json:"multiVmSyncStatus,omitempty"`
7026
7027 InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"`
7028 }
7029
7030
7031 func (imavpi InMageAzureV2PolicyInput) MarshalJSON() ([]byte, error) {
7032 imavpi.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMageAzureV2
7033 objectMap := make(map[string]interface{})
7034 if imavpi.RecoveryPointThresholdInMinutes != nil {
7035 objectMap["recoveryPointThresholdInMinutes"] = imavpi.RecoveryPointThresholdInMinutes
7036 }
7037 if imavpi.RecoveryPointHistory != nil {
7038 objectMap["recoveryPointHistory"] = imavpi.RecoveryPointHistory
7039 }
7040 if imavpi.CrashConsistentFrequencyInMinutes != nil {
7041 objectMap["crashConsistentFrequencyInMinutes"] = imavpi.CrashConsistentFrequencyInMinutes
7042 }
7043 if imavpi.AppConsistentFrequencyInMinutes != nil {
7044 objectMap["appConsistentFrequencyInMinutes"] = imavpi.AppConsistentFrequencyInMinutes
7045 }
7046 if imavpi.MultiVMSyncStatus != "" {
7047 objectMap["multiVmSyncStatus"] = imavpi.MultiVMSyncStatus
7048 }
7049 if imavpi.InstanceType != "" {
7050 objectMap["instanceType"] = imavpi.InstanceType
7051 }
7052 return json.Marshal(objectMap)
7053 }
7054
7055
7056 func (imavpi InMageAzureV2PolicyInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) {
7057 return nil, false
7058 }
7059
7060
7061 func (imavpi InMageAzureV2PolicyInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) {
7062 return nil, false
7063 }
7064
7065
7066 func (imavpi InMageAzureV2PolicyInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) {
7067 return nil, false
7068 }
7069
7070
7071 func (imavpi InMageAzureV2PolicyInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) {
7072 return &imavpi, true
7073 }
7074
7075
7076 func (imavpi InMageAzureV2PolicyInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) {
7077 return nil, false
7078 }
7079
7080
7081 func (imavpi InMageAzureV2PolicyInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) {
7082 return nil, false
7083 }
7084
7085
7086 func (imavpi InMageAzureV2PolicyInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) {
7087 return nil, false
7088 }
7089
7090
7091 func (imavpi InMageAzureV2PolicyInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) {
7092 return nil, false
7093 }
7094
7095
7096 func (imavpi InMageAzureV2PolicyInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) {
7097 return &imavpi, true
7098 }
7099
7100
7101 type InMageAzureV2ProtectedDiskDetails struct {
7102
7103 DiskID *string `json:"diskId,omitempty"`
7104
7105 DiskName *string `json:"diskName,omitempty"`
7106
7107 ProtectionStage *string `json:"protectionStage,omitempty"`
7108
7109 HealthErrorCode *string `json:"healthErrorCode,omitempty"`
7110
7111 RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"`
7112
7113 ResyncRequired *string `json:"resyncRequired,omitempty"`
7114
7115 ResyncProgressPercentage *int32 `json:"resyncProgressPercentage,omitempty"`
7116
7117 ResyncDurationInSeconds *int64 `json:"resyncDurationInSeconds,omitempty"`
7118
7119 DiskCapacityInBytes *int64 `json:"diskCapacityInBytes,omitempty"`
7120
7121 FileSystemCapacityInBytes *int64 `json:"fileSystemCapacityInBytes,omitempty"`
7122
7123 SourceDataInMegaBytes *float64 `json:"sourceDataInMegaBytes,omitempty"`
7124
7125 PsDataInMegaBytes *float64 `json:"psDataInMegaBytes,omitempty"`
7126
7127 TargetDataInMegaBytes *float64 `json:"targetDataInMegaBytes,omitempty"`
7128
7129 DiskResized *string `json:"diskResized,omitempty"`
7130
7131 LastRpoCalculatedTime *date.Time `json:"lastRpoCalculatedTime,omitempty"`
7132 }
7133
7134
7135 type InMageAzureV2RecoveryPointDetails struct {
7136
7137 InstanceType *string `json:"instanceType,omitempty"`
7138
7139 IsMultiVMSyncPoint *string `json:"isMultiVmSyncPoint,omitempty"`
7140
7141 Type *string `json:"Type,omitempty"`
7142 }
7143
7144
7145 func (imavrpd InMageAzureV2RecoveryPointDetails) MarshalJSON() ([]byte, error) {
7146 objectMap := make(map[string]interface{})
7147 if imavrpd.IsMultiVMSyncPoint != nil {
7148 objectMap["isMultiVmSyncPoint"] = imavrpd.IsMultiVMSyncPoint
7149 }
7150 return json.Marshal(objectMap)
7151 }
7152
7153
7154 type InMageAzureV2ReplicationDetails struct {
7155
7156 InfrastructureVMID *string `json:"infrastructureVmId,omitempty"`
7157
7158 VCenterInfrastructureID *string `json:"vCenterInfrastructureId,omitempty"`
7159
7160 ProtectionStage *string `json:"protectionStage,omitempty"`
7161
7162 VMID *string `json:"vmId,omitempty"`
7163
7164 VMProtectionState *string `json:"vmProtectionState,omitempty"`
7165
7166 VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"`
7167
7168 ResyncProgressPercentage *int32 `json:"resyncProgressPercentage,omitempty"`
7169
7170 RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"`
7171
7172 CompressedDataRateInMB *float64 `json:"compressedDataRateInMB,omitempty"`
7173
7174 UncompressedDataRateInMB *float64 `json:"uncompressedDataRateInMB,omitempty"`
7175
7176 IPAddress *string `json:"ipAddress,omitempty"`
7177
7178 AgentVersion *string `json:"agentVersion,omitempty"`
7179
7180 IsAgentUpdateRequired *string `json:"isAgentUpdateRequired,omitempty"`
7181
7182 IsRebootAfterUpdateRequired *string `json:"isRebootAfterUpdateRequired,omitempty"`
7183
7184 LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"`
7185
7186 ProcessServerID *string `json:"processServerId,omitempty"`
7187
7188 MultiVMGroupID *string `json:"multiVmGroupId,omitempty"`
7189
7190 MultiVMGroupName *string `json:"multiVmGroupName,omitempty"`
7191
7192 MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"`
7193
7194 ProtectedDisks *[]InMageAzureV2ProtectedDiskDetails `json:"protectedDisks,omitempty"`
7195
7196 DiskResized *string `json:"diskResized,omitempty"`
7197
7198 MasterTargetID *string `json:"masterTargetId,omitempty"`
7199
7200 SourceVMCPUCount *int32 `json:"sourceVmCPUCount,omitempty"`
7201
7202 SourceVMRAMSizeInMB *int32 `json:"sourceVmRAMSizeInMB,omitempty"`
7203
7204 OsType *string `json:"osType,omitempty"`
7205
7206 VhdName *string `json:"vhdName,omitempty"`
7207
7208 OsDiskID *string `json:"osDiskId,omitempty"`
7209
7210 AzureVMDiskDetails *[]AzureVMDiskDetails `json:"azureVMDiskDetails,omitempty"`
7211
7212 RecoveryAzureVMName *string `json:"recoveryAzureVMName,omitempty"`
7213
7214 RecoveryAzureVMSize *string `json:"recoveryAzureVMSize,omitempty"`
7215
7216 RecoveryAzureStorageAccount *string `json:"recoveryAzureStorageAccount,omitempty"`
7217
7218 RecoveryAzureLogStorageAccountID *string `json:"recoveryAzureLogStorageAccountId,omitempty"`
7219
7220 VMNics *[]VMNicDetails `json:"vmNics,omitempty"`
7221
7222 SelectedRecoveryAzureNetworkID *string `json:"selectedRecoveryAzureNetworkId,omitempty"`
7223
7224 DiscoveryType *string `json:"discoveryType,omitempty"`
7225
7226 EnableRDPOnTargetOption *string `json:"enableRDPOnTargetOption,omitempty"`
7227
7228 Datastores *[]string `json:"datastores,omitempty"`
7229
7230 TargetVMID *string `json:"targetVmId,omitempty"`
7231
7232 RecoveryAzureResourceGroupID *string `json:"recoveryAzureResourceGroupId,omitempty"`
7233
7234 RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"`
7235
7236 UseManagedDisks *string `json:"useManagedDisks,omitempty"`
7237
7238 LicenseType *string `json:"licenseType,omitempty"`
7239
7240 ValidationErrors *[]HealthError `json:"validationErrors,omitempty"`
7241
7242 LastRpoCalculatedTime *date.Time `json:"lastRpoCalculatedTime,omitempty"`
7243
7244 LastUpdateReceivedTime *date.Time `json:"lastUpdateReceivedTime,omitempty"`
7245
7246 ReplicaID *string `json:"replicaId,omitempty"`
7247
7248 OsVersion *string `json:"osVersion,omitempty"`
7249
7250 InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"`
7251 }
7252
7253
7254 func (imavrd InMageAzureV2ReplicationDetails) MarshalJSON() ([]byte, error) {
7255 imavrd.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMageAzureV2
7256 objectMap := make(map[string]interface{})
7257 if imavrd.InfrastructureVMID != nil {
7258 objectMap["infrastructureVmId"] = imavrd.InfrastructureVMID
7259 }
7260 if imavrd.VCenterInfrastructureID != nil {
7261 objectMap["vCenterInfrastructureId"] = imavrd.VCenterInfrastructureID
7262 }
7263 if imavrd.ProtectionStage != nil {
7264 objectMap["protectionStage"] = imavrd.ProtectionStage
7265 }
7266 if imavrd.VMID != nil {
7267 objectMap["vmId"] = imavrd.VMID
7268 }
7269 if imavrd.VMProtectionState != nil {
7270 objectMap["vmProtectionState"] = imavrd.VMProtectionState
7271 }
7272 if imavrd.VMProtectionStateDescription != nil {
7273 objectMap["vmProtectionStateDescription"] = imavrd.VMProtectionStateDescription
7274 }
7275 if imavrd.ResyncProgressPercentage != nil {
7276 objectMap["resyncProgressPercentage"] = imavrd.ResyncProgressPercentage
7277 }
7278 if imavrd.RpoInSeconds != nil {
7279 objectMap["rpoInSeconds"] = imavrd.RpoInSeconds
7280 }
7281 if imavrd.CompressedDataRateInMB != nil {
7282 objectMap["compressedDataRateInMB"] = imavrd.CompressedDataRateInMB
7283 }
7284 if imavrd.UncompressedDataRateInMB != nil {
7285 objectMap["uncompressedDataRateInMB"] = imavrd.UncompressedDataRateInMB
7286 }
7287 if imavrd.IPAddress != nil {
7288 objectMap["ipAddress"] = imavrd.IPAddress
7289 }
7290 if imavrd.AgentVersion != nil {
7291 objectMap["agentVersion"] = imavrd.AgentVersion
7292 }
7293 if imavrd.IsAgentUpdateRequired != nil {
7294 objectMap["isAgentUpdateRequired"] = imavrd.IsAgentUpdateRequired
7295 }
7296 if imavrd.IsRebootAfterUpdateRequired != nil {
7297 objectMap["isRebootAfterUpdateRequired"] = imavrd.IsRebootAfterUpdateRequired
7298 }
7299 if imavrd.LastHeartbeat != nil {
7300 objectMap["lastHeartbeat"] = imavrd.LastHeartbeat
7301 }
7302 if imavrd.ProcessServerID != nil {
7303 objectMap["processServerId"] = imavrd.ProcessServerID
7304 }
7305 if imavrd.MultiVMGroupID != nil {
7306 objectMap["multiVmGroupId"] = imavrd.MultiVMGroupID
7307 }
7308 if imavrd.MultiVMGroupName != nil {
7309 objectMap["multiVmGroupName"] = imavrd.MultiVMGroupName
7310 }
7311 if imavrd.MultiVMSyncStatus != nil {
7312 objectMap["multiVmSyncStatus"] = imavrd.MultiVMSyncStatus
7313 }
7314 if imavrd.ProtectedDisks != nil {
7315 objectMap["protectedDisks"] = imavrd.ProtectedDisks
7316 }
7317 if imavrd.DiskResized != nil {
7318 objectMap["diskResized"] = imavrd.DiskResized
7319 }
7320 if imavrd.MasterTargetID != nil {
7321 objectMap["masterTargetId"] = imavrd.MasterTargetID
7322 }
7323 if imavrd.SourceVMCPUCount != nil {
7324 objectMap["sourceVmCPUCount"] = imavrd.SourceVMCPUCount
7325 }
7326 if imavrd.SourceVMRAMSizeInMB != nil {
7327 objectMap["sourceVmRAMSizeInMB"] = imavrd.SourceVMRAMSizeInMB
7328 }
7329 if imavrd.OsType != nil {
7330 objectMap["osType"] = imavrd.OsType
7331 }
7332 if imavrd.VhdName != nil {
7333 objectMap["vhdName"] = imavrd.VhdName
7334 }
7335 if imavrd.OsDiskID != nil {
7336 objectMap["osDiskId"] = imavrd.OsDiskID
7337 }
7338 if imavrd.AzureVMDiskDetails != nil {
7339 objectMap["azureVMDiskDetails"] = imavrd.AzureVMDiskDetails
7340 }
7341 if imavrd.RecoveryAzureVMName != nil {
7342 objectMap["recoveryAzureVMName"] = imavrd.RecoveryAzureVMName
7343 }
7344 if imavrd.RecoveryAzureVMSize != nil {
7345 objectMap["recoveryAzureVMSize"] = imavrd.RecoveryAzureVMSize
7346 }
7347 if imavrd.RecoveryAzureStorageAccount != nil {
7348 objectMap["recoveryAzureStorageAccount"] = imavrd.RecoveryAzureStorageAccount
7349 }
7350 if imavrd.RecoveryAzureLogStorageAccountID != nil {
7351 objectMap["recoveryAzureLogStorageAccountId"] = imavrd.RecoveryAzureLogStorageAccountID
7352 }
7353 if imavrd.VMNics != nil {
7354 objectMap["vmNics"] = imavrd.VMNics
7355 }
7356 if imavrd.SelectedRecoveryAzureNetworkID != nil {
7357 objectMap["selectedRecoveryAzureNetworkId"] = imavrd.SelectedRecoveryAzureNetworkID
7358 }
7359 if imavrd.DiscoveryType != nil {
7360 objectMap["discoveryType"] = imavrd.DiscoveryType
7361 }
7362 if imavrd.EnableRDPOnTargetOption != nil {
7363 objectMap["enableRDPOnTargetOption"] = imavrd.EnableRDPOnTargetOption
7364 }
7365 if imavrd.Datastores != nil {
7366 objectMap["datastores"] = imavrd.Datastores
7367 }
7368 if imavrd.TargetVMID != nil {
7369 objectMap["targetVmId"] = imavrd.TargetVMID
7370 }
7371 if imavrd.RecoveryAzureResourceGroupID != nil {
7372 objectMap["recoveryAzureResourceGroupId"] = imavrd.RecoveryAzureResourceGroupID
7373 }
7374 if imavrd.RecoveryAvailabilitySetID != nil {
7375 objectMap["recoveryAvailabilitySetId"] = imavrd.RecoveryAvailabilitySetID
7376 }
7377 if imavrd.UseManagedDisks != nil {
7378 objectMap["useManagedDisks"] = imavrd.UseManagedDisks
7379 }
7380 if imavrd.LicenseType != nil {
7381 objectMap["licenseType"] = imavrd.LicenseType
7382 }
7383 if imavrd.ValidationErrors != nil {
7384 objectMap["validationErrors"] = imavrd.ValidationErrors
7385 }
7386 if imavrd.LastRpoCalculatedTime != nil {
7387 objectMap["lastRpoCalculatedTime"] = imavrd.LastRpoCalculatedTime
7388 }
7389 if imavrd.LastUpdateReceivedTime != nil {
7390 objectMap["lastUpdateReceivedTime"] = imavrd.LastUpdateReceivedTime
7391 }
7392 if imavrd.ReplicaID != nil {
7393 objectMap["replicaId"] = imavrd.ReplicaID
7394 }
7395 if imavrd.OsVersion != nil {
7396 objectMap["osVersion"] = imavrd.OsVersion
7397 }
7398 if imavrd.InstanceType != "" {
7399 objectMap["instanceType"] = imavrd.InstanceType
7400 }
7401 return json.Marshal(objectMap)
7402 }
7403
7404
7405 func (imavrd InMageAzureV2ReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) {
7406 return nil, false
7407 }
7408
7409
7410 func (imavrd InMageAzureV2ReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) {
7411 return nil, false
7412 }
7413
7414
7415 func (imavrd InMageAzureV2ReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) {
7416 return nil, false
7417 }
7418
7419
7420 func (imavrd InMageAzureV2ReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) {
7421 return nil, false
7422 }
7423
7424
7425 func (imavrd InMageAzureV2ReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) {
7426 return &imavrd, true
7427 }
7428
7429
7430 func (imavrd InMageAzureV2ReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) {
7431 return nil, false
7432 }
7433
7434
7435 func (imavrd InMageAzureV2ReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) {
7436 return nil, false
7437 }
7438
7439
7440 func (imavrd InMageAzureV2ReplicationDetails) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) {
7441 return nil, false
7442 }
7443
7444
7445 func (imavrd InMageAzureV2ReplicationDetails) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) {
7446 return &imavrd, true
7447 }
7448
7449
7450 type InMageAzureV2ReprotectInput struct {
7451
7452 MasterTargetID *string `json:"masterTargetId,omitempty"`
7453
7454 ProcessServerID *string `json:"processServerId,omitempty"`
7455
7456 StorageAccountID *string `json:"storageAccountId,omitempty"`
7457
7458 RunAsAccountID *string `json:"runAsAccountId,omitempty"`
7459
7460 PolicyID *string `json:"policyId,omitempty"`
7461
7462 LogStorageAccountID *string `json:"logStorageAccountId,omitempty"`
7463
7464 DisksToInclude *[]string `json:"disksToInclude,omitempty"`
7465
7466 InstanceType InstanceTypeBasicReverseReplicationProviderSpecificInput `json:"instanceType,omitempty"`
7467 }
7468
7469
7470 func (imavri InMageAzureV2ReprotectInput) MarshalJSON() ([]byte, error) {
7471 imavri.InstanceType = InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMageAzureV2
7472 objectMap := make(map[string]interface{})
7473 if imavri.MasterTargetID != nil {
7474 objectMap["masterTargetId"] = imavri.MasterTargetID
7475 }
7476 if imavri.ProcessServerID != nil {
7477 objectMap["processServerId"] = imavri.ProcessServerID
7478 }
7479 if imavri.StorageAccountID != nil {
7480 objectMap["storageAccountId"] = imavri.StorageAccountID
7481 }
7482 if imavri.RunAsAccountID != nil {
7483 objectMap["runAsAccountId"] = imavri.RunAsAccountID
7484 }
7485 if imavri.PolicyID != nil {
7486 objectMap["policyId"] = imavri.PolicyID
7487 }
7488 if imavri.LogStorageAccountID != nil {
7489 objectMap["logStorageAccountId"] = imavri.LogStorageAccountID
7490 }
7491 if imavri.DisksToInclude != nil {
7492 objectMap["disksToInclude"] = imavri.DisksToInclude
7493 }
7494 if imavri.InstanceType != "" {
7495 objectMap["instanceType"] = imavri.InstanceType
7496 }
7497 return json.Marshal(objectMap)
7498 }
7499
7500
7501 func (imavri InMageAzureV2ReprotectInput) AsHyperVReplicaAzureReprotectInput() (*HyperVReplicaAzureReprotectInput, bool) {
7502 return nil, false
7503 }
7504
7505
7506 func (imavri InMageAzureV2ReprotectInput) AsInMageAzureV2ReprotectInput() (*InMageAzureV2ReprotectInput, bool) {
7507 return &imavri, true
7508 }
7509
7510
7511 func (imavri InMageAzureV2ReprotectInput) AsInMageReprotectInput() (*InMageReprotectInput, bool) {
7512 return nil, false
7513 }
7514
7515
7516 func (imavri InMageAzureV2ReprotectInput) AsA2AReprotectInput() (*A2AReprotectInput, bool) {
7517 return nil, false
7518 }
7519
7520
7521 func (imavri InMageAzureV2ReprotectInput) AsReverseReplicationProviderSpecificInput() (*ReverseReplicationProviderSpecificInput, bool) {
7522 return nil, false
7523 }
7524
7525
7526 func (imavri InMageAzureV2ReprotectInput) AsBasicReverseReplicationProviderSpecificInput() (BasicReverseReplicationProviderSpecificInput, bool) {
7527 return &imavri, true
7528 }
7529
7530
7531
7532 type InMageAzureV2UpdateReplicationProtectedItemInput struct {
7533
7534 RecoveryAzureV1ResourceGroupID *string `json:"recoveryAzureV1ResourceGroupId,omitempty"`
7535
7536 RecoveryAzureV2ResourceGroupID *string `json:"recoveryAzureV2ResourceGroupId,omitempty"`
7537
7538 UseManagedDisks *string `json:"useManagedDisks,omitempty"`
7539
7540 InstanceType InstanceTypeBasicUpdateReplicationProtectedItemProviderInput `json:"instanceType,omitempty"`
7541 }
7542
7543
7544 func (imavurpii InMageAzureV2UpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, error) {
7545 imavurpii.InstanceType = InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeInMageAzureV2
7546 objectMap := make(map[string]interface{})
7547 if imavurpii.RecoveryAzureV1ResourceGroupID != nil {
7548 objectMap["recoveryAzureV1ResourceGroupId"] = imavurpii.RecoveryAzureV1ResourceGroupID
7549 }
7550 if imavurpii.RecoveryAzureV2ResourceGroupID != nil {
7551 objectMap["recoveryAzureV2ResourceGroupId"] = imavurpii.RecoveryAzureV2ResourceGroupID
7552 }
7553 if imavurpii.UseManagedDisks != nil {
7554 objectMap["useManagedDisks"] = imavurpii.UseManagedDisks
7555 }
7556 if imavurpii.InstanceType != "" {
7557 objectMap["instanceType"] = imavurpii.InstanceType
7558 }
7559 return json.Marshal(objectMap)
7560 }
7561
7562
7563 func (imavurpii InMageAzureV2UpdateReplicationProtectedItemInput) AsHyperVReplicaAzureUpdateReplicationProtectedItemInput() (*HyperVReplicaAzureUpdateReplicationProtectedItemInput, bool) {
7564 return nil, false
7565 }
7566
7567
7568 func (imavurpii InMageAzureV2UpdateReplicationProtectedItemInput) AsInMageAzureV2UpdateReplicationProtectedItemInput() (*InMageAzureV2UpdateReplicationProtectedItemInput, bool) {
7569 return &imavurpii, true
7570 }
7571
7572
7573 func (imavurpii InMageAzureV2UpdateReplicationProtectedItemInput) AsA2AUpdateReplicationProtectedItemInput() (*A2AUpdateReplicationProtectedItemInput, bool) {
7574 return nil, false
7575 }
7576
7577
7578 func (imavurpii InMageAzureV2UpdateReplicationProtectedItemInput) AsUpdateReplicationProtectedItemProviderInput() (*UpdateReplicationProtectedItemProviderInput, bool) {
7579 return nil, false
7580 }
7581
7582
7583 func (imavurpii InMageAzureV2UpdateReplicationProtectedItemInput) AsBasicUpdateReplicationProtectedItemProviderInput() (BasicUpdateReplicationProtectedItemProviderInput, bool) {
7584 return &imavurpii, true
7585 }
7586
7587
7588 type InMageBasePolicyDetails struct {
7589
7590 RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"`
7591
7592 RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"`
7593
7594 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"`
7595
7596 MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"`
7597
7598 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"`
7599 }
7600
7601
7602 func (imbpd InMageBasePolicyDetails) MarshalJSON() ([]byte, error) {
7603 imbpd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails
7604 objectMap := make(map[string]interface{})
7605 if imbpd.RecoveryPointThresholdInMinutes != nil {
7606 objectMap["recoveryPointThresholdInMinutes"] = imbpd.RecoveryPointThresholdInMinutes
7607 }
7608 if imbpd.RecoveryPointHistory != nil {
7609 objectMap["recoveryPointHistory"] = imbpd.RecoveryPointHistory
7610 }
7611 if imbpd.AppConsistentFrequencyInMinutes != nil {
7612 objectMap["appConsistentFrequencyInMinutes"] = imbpd.AppConsistentFrequencyInMinutes
7613 }
7614 if imbpd.MultiVMSyncStatus != nil {
7615 objectMap["multiVmSyncStatus"] = imbpd.MultiVMSyncStatus
7616 }
7617 if imbpd.InstanceType != "" {
7618 objectMap["instanceType"] = imbpd.InstanceType
7619 }
7620 return json.Marshal(objectMap)
7621 }
7622
7623
7624 func (imbpd InMageBasePolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) {
7625 return nil, false
7626 }
7627
7628
7629 func (imbpd InMageBasePolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) {
7630 return nil, false
7631 }
7632
7633
7634 func (imbpd InMageBasePolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) {
7635 return nil, false
7636 }
7637
7638
7639 func (imbpd InMageBasePolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) {
7640 return nil, false
7641 }
7642
7643
7644 func (imbpd InMageBasePolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) {
7645 return &imbpd, true
7646 }
7647
7648
7649 func (imbpd InMageBasePolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) {
7650 return nil, false
7651 }
7652
7653
7654 func (imbpd InMageBasePolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) {
7655 return nil, false
7656 }
7657
7658
7659 func (imbpd InMageBasePolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) {
7660 return nil, false
7661 }
7662
7663
7664 func (imbpd InMageBasePolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) {
7665 return nil, false
7666 }
7667
7668
7669 func (imbpd InMageBasePolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) {
7670 return nil, false
7671 }
7672
7673
7674 func (imbpd InMageBasePolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) {
7675 return nil, false
7676 }
7677
7678
7679 func (imbpd InMageBasePolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) {
7680 return &imbpd, true
7681 }
7682
7683
7684 type InMageDisableProtectionProviderSpecificInput struct {
7685
7686 ReplicaVMDeletionStatus *string `json:"replicaVmDeletionStatus,omitempty"`
7687
7688 InstanceType InstanceTypeBasicDisableProtectionProviderSpecificInput `json:"instanceType,omitempty"`
7689 }
7690
7691
7692 func (imdppsi InMageDisableProtectionProviderSpecificInput) MarshalJSON() ([]byte, error) {
7693 imdppsi.InstanceType = InstanceTypeInMage
7694 objectMap := make(map[string]interface{})
7695 if imdppsi.ReplicaVMDeletionStatus != nil {
7696 objectMap["replicaVmDeletionStatus"] = imdppsi.ReplicaVMDeletionStatus
7697 }
7698 if imdppsi.InstanceType != "" {
7699 objectMap["instanceType"] = imdppsi.InstanceType
7700 }
7701 return json.Marshal(objectMap)
7702 }
7703
7704
7705 func (imdppsi InMageDisableProtectionProviderSpecificInput) AsInMageDisableProtectionProviderSpecificInput() (*InMageDisableProtectionProviderSpecificInput, bool) {
7706 return &imdppsi, true
7707 }
7708
7709
7710 func (imdppsi InMageDisableProtectionProviderSpecificInput) AsDisableProtectionProviderSpecificInput() (*DisableProtectionProviderSpecificInput, bool) {
7711 return nil, false
7712 }
7713
7714
7715 func (imdppsi InMageDisableProtectionProviderSpecificInput) AsBasicDisableProtectionProviderSpecificInput() (BasicDisableProtectionProviderSpecificInput, bool) {
7716 return &imdppsi, true
7717 }
7718
7719
7720 type InMageDiskDetails struct {
7721
7722 DiskID *string `json:"diskId,omitempty"`
7723
7724 DiskName *string `json:"diskName,omitempty"`
7725
7726 DiskSizeInMB *string `json:"diskSizeInMB,omitempty"`
7727
7728 DiskType *string `json:"diskType,omitempty"`
7729
7730 DiskConfiguration *string `json:"diskConfiguration,omitempty"`
7731
7732 VolumeList *[]DiskVolumeDetails `json:"volumeList,omitempty"`
7733 }
7734
7735
7736
7737 type InMageDiskExclusionInput struct {
7738
7739 VolumeOptions *[]InMageVolumeExclusionOptions `json:"volumeOptions,omitempty"`
7740
7741 DiskSignatureOptions *[]InMageDiskSignatureExclusionOptions `json:"diskSignatureOptions,omitempty"`
7742 }
7743
7744
7745
7746 type InMageDiskSignatureExclusionOptions struct {
7747
7748 DiskSignature *string `json:"diskSignature,omitempty"`
7749 }
7750
7751
7752 type InMageEnableProtectionInput struct {
7753
7754 VMFriendlyName *string `json:"vmFriendlyName,omitempty"`
7755
7756 MasterTargetID *string `json:"masterTargetId,omitempty"`
7757
7758 ProcessServerID *string `json:"processServerId,omitempty"`
7759
7760 RetentionDrive *string `json:"retentionDrive,omitempty"`
7761
7762 RunAsAccountID *string `json:"runAsAccountId,omitempty"`
7763
7764 MultiVMGroupID *string `json:"multiVmGroupId,omitempty"`
7765
7766 MultiVMGroupName *string `json:"multiVmGroupName,omitempty"`
7767
7768 DatastoreName *string `json:"datastoreName,omitempty"`
7769
7770 DiskExclusionInput *InMageDiskExclusionInput `json:"diskExclusionInput,omitempty"`
7771
7772 DisksToInclude *[]string `json:"disksToInclude,omitempty"`
7773
7774 InstanceType InstanceTypeBasicEnableProtectionProviderSpecificInput `json:"instanceType,omitempty"`
7775 }
7776
7777
7778 func (imepi InMageEnableProtectionInput) MarshalJSON() ([]byte, error) {
7779 imepi.InstanceType = InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMage
7780 objectMap := make(map[string]interface{})
7781 if imepi.VMFriendlyName != nil {
7782 objectMap["vmFriendlyName"] = imepi.VMFriendlyName
7783 }
7784 if imepi.MasterTargetID != nil {
7785 objectMap["masterTargetId"] = imepi.MasterTargetID
7786 }
7787 if imepi.ProcessServerID != nil {
7788 objectMap["processServerId"] = imepi.ProcessServerID
7789 }
7790 if imepi.RetentionDrive != nil {
7791 objectMap["retentionDrive"] = imepi.RetentionDrive
7792 }
7793 if imepi.RunAsAccountID != nil {
7794 objectMap["runAsAccountId"] = imepi.RunAsAccountID
7795 }
7796 if imepi.MultiVMGroupID != nil {
7797 objectMap["multiVmGroupId"] = imepi.MultiVMGroupID
7798 }
7799 if imepi.MultiVMGroupName != nil {
7800 objectMap["multiVmGroupName"] = imepi.MultiVMGroupName
7801 }
7802 if imepi.DatastoreName != nil {
7803 objectMap["datastoreName"] = imepi.DatastoreName
7804 }
7805 if imepi.DiskExclusionInput != nil {
7806 objectMap["diskExclusionInput"] = imepi.DiskExclusionInput
7807 }
7808 if imepi.DisksToInclude != nil {
7809 objectMap["disksToInclude"] = imepi.DisksToInclude
7810 }
7811 if imepi.InstanceType != "" {
7812 objectMap["instanceType"] = imepi.InstanceType
7813 }
7814 return json.Marshal(objectMap)
7815 }
7816
7817
7818 func (imepi InMageEnableProtectionInput) AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool) {
7819 return nil, false
7820 }
7821
7822
7823 func (imepi InMageEnableProtectionInput) AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool) {
7824 return nil, false
7825 }
7826
7827
7828 func (imepi InMageEnableProtectionInput) AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool) {
7829 return nil, false
7830 }
7831
7832
7833 func (imepi InMageEnableProtectionInput) AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool) {
7834 return &imepi, true
7835 }
7836
7837
7838 func (imepi InMageEnableProtectionInput) AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool) {
7839 return nil, false
7840 }
7841
7842
7843 func (imepi InMageEnableProtectionInput) AsEnableProtectionProviderSpecificInput() (*EnableProtectionProviderSpecificInput, bool) {
7844 return nil, false
7845 }
7846
7847
7848 func (imepi InMageEnableProtectionInput) AsBasicEnableProtectionProviderSpecificInput() (BasicEnableProtectionProviderSpecificInput, bool) {
7849 return &imepi, true
7850 }
7851
7852
7853 type InMageFailoverProviderInput struct {
7854
7855 RecoveryPointType RecoveryPointType `json:"recoveryPointType,omitempty"`
7856
7857 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
7858
7859 InstanceType InstanceTypeBasicProviderSpecificFailoverInput `json:"instanceType,omitempty"`
7860 }
7861
7862
7863 func (imfpi InMageFailoverProviderInput) MarshalJSON() ([]byte, error) {
7864 imfpi.InstanceType = InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMage
7865 objectMap := make(map[string]interface{})
7866 if imfpi.RecoveryPointType != "" {
7867 objectMap["recoveryPointType"] = imfpi.RecoveryPointType
7868 }
7869 if imfpi.RecoveryPointID != nil {
7870 objectMap["recoveryPointId"] = imfpi.RecoveryPointID
7871 }
7872 if imfpi.InstanceType != "" {
7873 objectMap["instanceType"] = imfpi.InstanceType
7874 }
7875 return json.Marshal(objectMap)
7876 }
7877
7878
7879 func (imfpi InMageFailoverProviderInput) AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool) {
7880 return nil, false
7881 }
7882
7883
7884 func (imfpi InMageFailoverProviderInput) AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool) {
7885 return nil, false
7886 }
7887
7888
7889 func (imfpi InMageFailoverProviderInput) AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool) {
7890 return nil, false
7891 }
7892
7893
7894 func (imfpi InMageFailoverProviderInput) AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool) {
7895 return &imfpi, true
7896 }
7897
7898
7899 func (imfpi InMageFailoverProviderInput) AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool) {
7900 return nil, false
7901 }
7902
7903
7904 func (imfpi InMageFailoverProviderInput) AsProviderSpecificFailoverInput() (*ProviderSpecificFailoverInput, bool) {
7905 return nil, false
7906 }
7907
7908
7909 func (imfpi InMageFailoverProviderInput) AsBasicProviderSpecificFailoverInput() (BasicProviderSpecificFailoverInput, bool) {
7910 return &imfpi, true
7911 }
7912
7913
7914 type InMagePolicyDetails struct {
7915
7916 RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"`
7917
7918 RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"`
7919
7920 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"`
7921
7922 MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"`
7923
7924 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"`
7925 }
7926
7927
7928 func (impd InMagePolicyDetails) MarshalJSON() ([]byte, error) {
7929 impd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage
7930 objectMap := make(map[string]interface{})
7931 if impd.RecoveryPointThresholdInMinutes != nil {
7932 objectMap["recoveryPointThresholdInMinutes"] = impd.RecoveryPointThresholdInMinutes
7933 }
7934 if impd.RecoveryPointHistory != nil {
7935 objectMap["recoveryPointHistory"] = impd.RecoveryPointHistory
7936 }
7937 if impd.AppConsistentFrequencyInMinutes != nil {
7938 objectMap["appConsistentFrequencyInMinutes"] = impd.AppConsistentFrequencyInMinutes
7939 }
7940 if impd.MultiVMSyncStatus != nil {
7941 objectMap["multiVmSyncStatus"] = impd.MultiVMSyncStatus
7942 }
7943 if impd.InstanceType != "" {
7944 objectMap["instanceType"] = impd.InstanceType
7945 }
7946 return json.Marshal(objectMap)
7947 }
7948
7949
7950 func (impd InMagePolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) {
7951 return nil, false
7952 }
7953
7954
7955 func (impd InMagePolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) {
7956 return nil, false
7957 }
7958
7959
7960 func (impd InMagePolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) {
7961 return nil, false
7962 }
7963
7964
7965 func (impd InMagePolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) {
7966 return nil, false
7967 }
7968
7969
7970 func (impd InMagePolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) {
7971 return nil, false
7972 }
7973
7974
7975 func (impd InMagePolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) {
7976 return nil, false
7977 }
7978
7979
7980 func (impd InMagePolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) {
7981 return &impd, true
7982 }
7983
7984
7985 func (impd InMagePolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) {
7986 return nil, false
7987 }
7988
7989
7990 func (impd InMagePolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) {
7991 return nil, false
7992 }
7993
7994
7995 func (impd InMagePolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) {
7996 return nil, false
7997 }
7998
7999
8000 func (impd InMagePolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) {
8001 return nil, false
8002 }
8003
8004
8005 func (impd InMagePolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) {
8006 return &impd, true
8007 }
8008
8009
8010 type InMagePolicyInput struct {
8011
8012 RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"`
8013
8014 RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"`
8015
8016 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"`
8017
8018 MultiVMSyncStatus SetMultiVMSyncStatus `json:"multiVmSyncStatus,omitempty"`
8019
8020 InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"`
8021 }
8022
8023
8024 func (impi InMagePolicyInput) MarshalJSON() ([]byte, error) {
8025 impi.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMage
8026 objectMap := make(map[string]interface{})
8027 if impi.RecoveryPointThresholdInMinutes != nil {
8028 objectMap["recoveryPointThresholdInMinutes"] = impi.RecoveryPointThresholdInMinutes
8029 }
8030 if impi.RecoveryPointHistory != nil {
8031 objectMap["recoveryPointHistory"] = impi.RecoveryPointHistory
8032 }
8033 if impi.AppConsistentFrequencyInMinutes != nil {
8034 objectMap["appConsistentFrequencyInMinutes"] = impi.AppConsistentFrequencyInMinutes
8035 }
8036 if impi.MultiVMSyncStatus != "" {
8037 objectMap["multiVmSyncStatus"] = impi.MultiVMSyncStatus
8038 }
8039 if impi.InstanceType != "" {
8040 objectMap["instanceType"] = impi.InstanceType
8041 }
8042 return json.Marshal(objectMap)
8043 }
8044
8045
8046 func (impi InMagePolicyInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) {
8047 return nil, false
8048 }
8049
8050
8051 func (impi InMagePolicyInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) {
8052 return nil, false
8053 }
8054
8055
8056 func (impi InMagePolicyInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) {
8057 return nil, false
8058 }
8059
8060
8061 func (impi InMagePolicyInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) {
8062 return nil, false
8063 }
8064
8065
8066 func (impi InMagePolicyInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) {
8067 return &impi, true
8068 }
8069
8070
8071 func (impi InMagePolicyInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) {
8072 return nil, false
8073 }
8074
8075
8076 func (impi InMagePolicyInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) {
8077 return nil, false
8078 }
8079
8080
8081 func (impi InMagePolicyInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) {
8082 return nil, false
8083 }
8084
8085
8086 func (impi InMagePolicyInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) {
8087 return &impi, true
8088 }
8089
8090
8091 type InMageProtectedDiskDetails struct {
8092
8093 DiskID *string `json:"diskId,omitempty"`
8094
8095 DiskName *string `json:"diskName,omitempty"`
8096
8097 ProtectionStage *string `json:"protectionStage,omitempty"`
8098
8099 HealthErrorCode *string `json:"healthErrorCode,omitempty"`
8100
8101 RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"`
8102
8103 ResyncRequired *string `json:"resyncRequired,omitempty"`
8104
8105 ResyncProgressPercentage *int32 `json:"resyncProgressPercentage,omitempty"`
8106
8107 ResyncDurationInSeconds *int64 `json:"resyncDurationInSeconds,omitempty"`
8108
8109 DiskCapacityInBytes *int64 `json:"diskCapacityInBytes,omitempty"`
8110
8111 FileSystemCapacityInBytes *int64 `json:"fileSystemCapacityInBytes,omitempty"`
8112
8113 SourceDataInMB *float64 `json:"sourceDataInMB,omitempty"`
8114
8115 PsDataInMB *float64 `json:"psDataInMB,omitempty"`
8116
8117 TargetDataInMB *float64 `json:"targetDataInMB,omitempty"`
8118
8119 DiskResized *string `json:"diskResized,omitempty"`
8120
8121 LastRpoCalculatedTime *date.Time `json:"lastRpoCalculatedTime,omitempty"`
8122 }
8123
8124
8125 type InMageReplicationDetails struct {
8126
8127 ActiveSiteType *string `json:"activeSiteType,omitempty"`
8128
8129 SourceVMCPUCount *int32 `json:"sourceVmCPUCount,omitempty"`
8130
8131 SourceVMRAMSizeInMB *int32 `json:"sourceVmRAMSizeInMB,omitempty"`
8132
8133 OsDetails *OSDiskDetails `json:"osDetails,omitempty"`
8134
8135 ProtectionStage *string `json:"protectionStage,omitempty"`
8136
8137 VMID *string `json:"vmId,omitempty"`
8138
8139 VMProtectionState *string `json:"vmProtectionState,omitempty"`
8140
8141 VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"`
8142
8143 ResyncDetails *InitialReplicationDetails `json:"resyncDetails,omitempty"`
8144
8145 RetentionWindowStart *date.Time `json:"retentionWindowStart,omitempty"`
8146
8147 RetentionWindowEnd *date.Time `json:"retentionWindowEnd,omitempty"`
8148
8149 CompressedDataRateInMB *float64 `json:"compressedDataRateInMB,omitempty"`
8150
8151 UncompressedDataRateInMB *float64 `json:"uncompressedDataRateInMB,omitempty"`
8152
8153 RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"`
8154
8155 ProtectedDisks *[]InMageProtectedDiskDetails `json:"protectedDisks,omitempty"`
8156
8157 IPAddress *string `json:"ipAddress,omitempty"`
8158
8159 LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"`
8160
8161 ProcessServerID *string `json:"processServerId,omitempty"`
8162
8163 MasterTargetID *string `json:"masterTargetId,omitempty"`
8164
8165 ConsistencyPoints map[string]*date.Time `json:"consistencyPoints"`
8166
8167 DiskResized *string `json:"diskResized,omitempty"`
8168
8169 RebootAfterUpdateStatus *string `json:"rebootAfterUpdateStatus,omitempty"`
8170
8171 MultiVMGroupID *string `json:"multiVmGroupId,omitempty"`
8172
8173 MultiVMGroupName *string `json:"multiVmGroupName,omitempty"`
8174
8175 MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"`
8176
8177 AgentDetails *InMageAgentDetails `json:"agentDetails,omitempty"`
8178
8179 VCenterInfrastructureID *string `json:"vCenterInfrastructureId,omitempty"`
8180
8181 InfrastructureVMID *string `json:"infrastructureVmId,omitempty"`
8182
8183 VMNics *[]VMNicDetails `json:"vmNics,omitempty"`
8184
8185 DiscoveryType *string `json:"discoveryType,omitempty"`
8186
8187 AzureStorageAccountID *string `json:"azureStorageAccountId,omitempty"`
8188
8189 Datastores *[]string `json:"datastores,omitempty"`
8190
8191 ValidationErrors *[]HealthError `json:"validationErrors,omitempty"`
8192
8193 LastRpoCalculatedTime *date.Time `json:"lastRpoCalculatedTime,omitempty"`
8194
8195 LastUpdateReceivedTime *date.Time `json:"lastUpdateReceivedTime,omitempty"`
8196
8197 ReplicaID *string `json:"replicaId,omitempty"`
8198
8199 OsVersion *string `json:"osVersion,omitempty"`
8200
8201 InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"`
8202 }
8203
8204
8205 func (imrd InMageReplicationDetails) MarshalJSON() ([]byte, error) {
8206 imrd.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMage
8207 objectMap := make(map[string]interface{})
8208 if imrd.ActiveSiteType != nil {
8209 objectMap["activeSiteType"] = imrd.ActiveSiteType
8210 }
8211 if imrd.SourceVMCPUCount != nil {
8212 objectMap["sourceVmCPUCount"] = imrd.SourceVMCPUCount
8213 }
8214 if imrd.SourceVMRAMSizeInMB != nil {
8215 objectMap["sourceVmRAMSizeInMB"] = imrd.SourceVMRAMSizeInMB
8216 }
8217 if imrd.OsDetails != nil {
8218 objectMap["osDetails"] = imrd.OsDetails
8219 }
8220 if imrd.ProtectionStage != nil {
8221 objectMap["protectionStage"] = imrd.ProtectionStage
8222 }
8223 if imrd.VMID != nil {
8224 objectMap["vmId"] = imrd.VMID
8225 }
8226 if imrd.VMProtectionState != nil {
8227 objectMap["vmProtectionState"] = imrd.VMProtectionState
8228 }
8229 if imrd.VMProtectionStateDescription != nil {
8230 objectMap["vmProtectionStateDescription"] = imrd.VMProtectionStateDescription
8231 }
8232 if imrd.ResyncDetails != nil {
8233 objectMap["resyncDetails"] = imrd.ResyncDetails
8234 }
8235 if imrd.RetentionWindowStart != nil {
8236 objectMap["retentionWindowStart"] = imrd.RetentionWindowStart
8237 }
8238 if imrd.RetentionWindowEnd != nil {
8239 objectMap["retentionWindowEnd"] = imrd.RetentionWindowEnd
8240 }
8241 if imrd.CompressedDataRateInMB != nil {
8242 objectMap["compressedDataRateInMB"] = imrd.CompressedDataRateInMB
8243 }
8244 if imrd.UncompressedDataRateInMB != nil {
8245 objectMap["uncompressedDataRateInMB"] = imrd.UncompressedDataRateInMB
8246 }
8247 if imrd.RpoInSeconds != nil {
8248 objectMap["rpoInSeconds"] = imrd.RpoInSeconds
8249 }
8250 if imrd.ProtectedDisks != nil {
8251 objectMap["protectedDisks"] = imrd.ProtectedDisks
8252 }
8253 if imrd.IPAddress != nil {
8254 objectMap["ipAddress"] = imrd.IPAddress
8255 }
8256 if imrd.LastHeartbeat != nil {
8257 objectMap["lastHeartbeat"] = imrd.LastHeartbeat
8258 }
8259 if imrd.ProcessServerID != nil {
8260 objectMap["processServerId"] = imrd.ProcessServerID
8261 }
8262 if imrd.MasterTargetID != nil {
8263 objectMap["masterTargetId"] = imrd.MasterTargetID
8264 }
8265 if imrd.ConsistencyPoints != nil {
8266 objectMap["consistencyPoints"] = imrd.ConsistencyPoints
8267 }
8268 if imrd.DiskResized != nil {
8269 objectMap["diskResized"] = imrd.DiskResized
8270 }
8271 if imrd.RebootAfterUpdateStatus != nil {
8272 objectMap["rebootAfterUpdateStatus"] = imrd.RebootAfterUpdateStatus
8273 }
8274 if imrd.MultiVMGroupID != nil {
8275 objectMap["multiVmGroupId"] = imrd.MultiVMGroupID
8276 }
8277 if imrd.MultiVMGroupName != nil {
8278 objectMap["multiVmGroupName"] = imrd.MultiVMGroupName
8279 }
8280 if imrd.MultiVMSyncStatus != nil {
8281 objectMap["multiVmSyncStatus"] = imrd.MultiVMSyncStatus
8282 }
8283 if imrd.AgentDetails != nil {
8284 objectMap["agentDetails"] = imrd.AgentDetails
8285 }
8286 if imrd.VCenterInfrastructureID != nil {
8287 objectMap["vCenterInfrastructureId"] = imrd.VCenterInfrastructureID
8288 }
8289 if imrd.InfrastructureVMID != nil {
8290 objectMap["infrastructureVmId"] = imrd.InfrastructureVMID
8291 }
8292 if imrd.VMNics != nil {
8293 objectMap["vmNics"] = imrd.VMNics
8294 }
8295 if imrd.DiscoveryType != nil {
8296 objectMap["discoveryType"] = imrd.DiscoveryType
8297 }
8298 if imrd.AzureStorageAccountID != nil {
8299 objectMap["azureStorageAccountId"] = imrd.AzureStorageAccountID
8300 }
8301 if imrd.Datastores != nil {
8302 objectMap["datastores"] = imrd.Datastores
8303 }
8304 if imrd.ValidationErrors != nil {
8305 objectMap["validationErrors"] = imrd.ValidationErrors
8306 }
8307 if imrd.LastRpoCalculatedTime != nil {
8308 objectMap["lastRpoCalculatedTime"] = imrd.LastRpoCalculatedTime
8309 }
8310 if imrd.LastUpdateReceivedTime != nil {
8311 objectMap["lastUpdateReceivedTime"] = imrd.LastUpdateReceivedTime
8312 }
8313 if imrd.ReplicaID != nil {
8314 objectMap["replicaId"] = imrd.ReplicaID
8315 }
8316 if imrd.OsVersion != nil {
8317 objectMap["osVersion"] = imrd.OsVersion
8318 }
8319 if imrd.InstanceType != "" {
8320 objectMap["instanceType"] = imrd.InstanceType
8321 }
8322 return json.Marshal(objectMap)
8323 }
8324
8325
8326 func (imrd InMageReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) {
8327 return nil, false
8328 }
8329
8330
8331 func (imrd InMageReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) {
8332 return nil, false
8333 }
8334
8335
8336 func (imrd InMageReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) {
8337 return nil, false
8338 }
8339
8340
8341 func (imrd InMageReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) {
8342 return nil, false
8343 }
8344
8345
8346 func (imrd InMageReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) {
8347 return nil, false
8348 }
8349
8350
8351 func (imrd InMageReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) {
8352 return &imrd, true
8353 }
8354
8355
8356 func (imrd InMageReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) {
8357 return nil, false
8358 }
8359
8360
8361 func (imrd InMageReplicationDetails) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) {
8362 return nil, false
8363 }
8364
8365
8366 func (imrd InMageReplicationDetails) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) {
8367 return &imrd, true
8368 }
8369
8370
8371 type InMageReprotectInput struct {
8372
8373 MasterTargetID *string `json:"masterTargetId,omitempty"`
8374
8375 ProcessServerID *string `json:"processServerId,omitempty"`
8376
8377 RetentionDrive *string `json:"retentionDrive,omitempty"`
8378
8379 RunAsAccountID *string `json:"runAsAccountId,omitempty"`
8380
8381 DatastoreName *string `json:"datastoreName,omitempty"`
8382
8383 DiskExclusionInput *InMageDiskExclusionInput `json:"diskExclusionInput,omitempty"`
8384
8385 ProfileID *string `json:"profileId,omitempty"`
8386
8387 DisksToInclude *[]string `json:"disksToInclude,omitempty"`
8388
8389 InstanceType InstanceTypeBasicReverseReplicationProviderSpecificInput `json:"instanceType,omitempty"`
8390 }
8391
8392
8393 func (imri InMageReprotectInput) MarshalJSON() ([]byte, error) {
8394 imri.InstanceType = InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMage
8395 objectMap := make(map[string]interface{})
8396 if imri.MasterTargetID != nil {
8397 objectMap["masterTargetId"] = imri.MasterTargetID
8398 }
8399 if imri.ProcessServerID != nil {
8400 objectMap["processServerId"] = imri.ProcessServerID
8401 }
8402 if imri.RetentionDrive != nil {
8403 objectMap["retentionDrive"] = imri.RetentionDrive
8404 }
8405 if imri.RunAsAccountID != nil {
8406 objectMap["runAsAccountId"] = imri.RunAsAccountID
8407 }
8408 if imri.DatastoreName != nil {
8409 objectMap["datastoreName"] = imri.DatastoreName
8410 }
8411 if imri.DiskExclusionInput != nil {
8412 objectMap["diskExclusionInput"] = imri.DiskExclusionInput
8413 }
8414 if imri.ProfileID != nil {
8415 objectMap["profileId"] = imri.ProfileID
8416 }
8417 if imri.DisksToInclude != nil {
8418 objectMap["disksToInclude"] = imri.DisksToInclude
8419 }
8420 if imri.InstanceType != "" {
8421 objectMap["instanceType"] = imri.InstanceType
8422 }
8423 return json.Marshal(objectMap)
8424 }
8425
8426
8427 func (imri InMageReprotectInput) AsHyperVReplicaAzureReprotectInput() (*HyperVReplicaAzureReprotectInput, bool) {
8428 return nil, false
8429 }
8430
8431
8432 func (imri InMageReprotectInput) AsInMageAzureV2ReprotectInput() (*InMageAzureV2ReprotectInput, bool) {
8433 return nil, false
8434 }
8435
8436
8437 func (imri InMageReprotectInput) AsInMageReprotectInput() (*InMageReprotectInput, bool) {
8438 return &imri, true
8439 }
8440
8441
8442 func (imri InMageReprotectInput) AsA2AReprotectInput() (*A2AReprotectInput, bool) {
8443 return nil, false
8444 }
8445
8446
8447 func (imri InMageReprotectInput) AsReverseReplicationProviderSpecificInput() (*ReverseReplicationProviderSpecificInput, bool) {
8448 return nil, false
8449 }
8450
8451
8452 func (imri InMageReprotectInput) AsBasicReverseReplicationProviderSpecificInput() (BasicReverseReplicationProviderSpecificInput, bool) {
8453 return &imri, true
8454 }
8455
8456
8457
8458 type InMageVolumeExclusionOptions struct {
8459
8460 VolumeLabel *string `json:"volumeLabel,omitempty"`
8461
8462 OnlyExcludeIfSingleVolume *string `json:"OnlyExcludeIfSingleVolume,omitempty"`
8463 }
8464
8465
8466 type InputEndpoint struct {
8467
8468 EndpointName *string `json:"endpointName,omitempty"`
8469
8470 PrivatePort *int32 `json:"privatePort,omitempty"`
8471
8472 PublicPort *int32 `json:"publicPort,omitempty"`
8473
8474 Protocol *string `json:"protocol,omitempty"`
8475 }
8476
8477
8478 type Job struct {
8479 autorest.Response `json:"-"`
8480
8481 Properties *JobProperties `json:"properties,omitempty"`
8482
8483 Status *string `json:"status,omitempty"`
8484
8485 Error *ARMException `json:"error,omitempty"`
8486
8487 StartTime *string `json:"startTime,omitempty"`
8488
8489 EndTime *string `json:"endTime,omitempty"`
8490
8491 ID *string `json:"id,omitempty"`
8492
8493 Name *string `json:"name,omitempty"`
8494
8495 Type *string `json:"type,omitempty"`
8496
8497 Location *string `json:"location,omitempty"`
8498 }
8499
8500
8501 func (j Job) MarshalJSON() ([]byte, error) {
8502 objectMap := make(map[string]interface{})
8503 if j.Properties != nil {
8504 objectMap["properties"] = j.Properties
8505 }
8506 if j.Status != nil {
8507 objectMap["status"] = j.Status
8508 }
8509 if j.Error != nil {
8510 objectMap["error"] = j.Error
8511 }
8512 if j.StartTime != nil {
8513 objectMap["startTime"] = j.StartTime
8514 }
8515 if j.EndTime != nil {
8516 objectMap["endTime"] = j.EndTime
8517 }
8518 if j.Location != nil {
8519 objectMap["location"] = j.Location
8520 }
8521 return json.Marshal(objectMap)
8522 }
8523
8524
8525 type JobCollection struct {
8526 autorest.Response `json:"-"`
8527
8528 Value *[]Job `json:"value,omitempty"`
8529
8530 NextLink *string `json:"nextLink,omitempty"`
8531 }
8532
8533
8534 type JobCollectionIterator struct {
8535 i int
8536 page JobCollectionPage
8537 }
8538
8539
8540
8541 func (iter *JobCollectionIterator) NextWithContext(ctx context.Context) (err error) {
8542 if tracing.IsEnabled() {
8543 ctx = tracing.StartSpan(ctx, fqdn+"/JobCollectionIterator.NextWithContext")
8544 defer func() {
8545 sc := -1
8546 if iter.Response().Response.Response != nil {
8547 sc = iter.Response().Response.Response.StatusCode
8548 }
8549 tracing.EndSpan(ctx, sc, err)
8550 }()
8551 }
8552 iter.i++
8553 if iter.i < len(iter.page.Values()) {
8554 return nil
8555 }
8556 err = iter.page.NextWithContext(ctx)
8557 if err != nil {
8558 iter.i--
8559 return err
8560 }
8561 iter.i = 0
8562 return nil
8563 }
8564
8565
8566
8567
8568 func (iter *JobCollectionIterator) Next() error {
8569 return iter.NextWithContext(context.Background())
8570 }
8571
8572
8573 func (iter JobCollectionIterator) NotDone() bool {
8574 return iter.page.NotDone() && iter.i < len(iter.page.Values())
8575 }
8576
8577
8578 func (iter JobCollectionIterator) Response() JobCollection {
8579 return iter.page.Response()
8580 }
8581
8582
8583
8584 func (iter JobCollectionIterator) Value() Job {
8585 if !iter.page.NotDone() {
8586 return Job{}
8587 }
8588 return iter.page.Values()[iter.i]
8589 }
8590
8591
8592 func NewJobCollectionIterator(page JobCollectionPage) JobCollectionIterator {
8593 return JobCollectionIterator{page: page}
8594 }
8595
8596
8597 func (jc JobCollection) IsEmpty() bool {
8598 return jc.Value == nil || len(*jc.Value) == 0
8599 }
8600
8601
8602 func (jc JobCollection) hasNextLink() bool {
8603 return jc.NextLink != nil && len(*jc.NextLink) != 0
8604 }
8605
8606
8607
8608 func (jc JobCollection) jobCollectionPreparer(ctx context.Context) (*http.Request, error) {
8609 if !jc.hasNextLink() {
8610 return nil, nil
8611 }
8612 return autorest.Prepare((&http.Request{}).WithContext(ctx),
8613 autorest.AsJSON(),
8614 autorest.AsGet(),
8615 autorest.WithBaseURL(to.String(jc.NextLink)))
8616 }
8617
8618
8619 type JobCollectionPage struct {
8620 fn func(context.Context, JobCollection) (JobCollection, error)
8621 jc JobCollection
8622 }
8623
8624
8625
8626 func (page *JobCollectionPage) NextWithContext(ctx context.Context) (err error) {
8627 if tracing.IsEnabled() {
8628 ctx = tracing.StartSpan(ctx, fqdn+"/JobCollectionPage.NextWithContext")
8629 defer func() {
8630 sc := -1
8631 if page.Response().Response.Response != nil {
8632 sc = page.Response().Response.Response.StatusCode
8633 }
8634 tracing.EndSpan(ctx, sc, err)
8635 }()
8636 }
8637 for {
8638 next, err := page.fn(ctx, page.jc)
8639 if err != nil {
8640 return err
8641 }
8642 page.jc = next
8643 if !next.hasNextLink() || !next.IsEmpty() {
8644 break
8645 }
8646 }
8647 return nil
8648 }
8649
8650
8651
8652
8653 func (page *JobCollectionPage) Next() error {
8654 return page.NextWithContext(context.Background())
8655 }
8656
8657
8658 func (page JobCollectionPage) NotDone() bool {
8659 return !page.jc.IsEmpty()
8660 }
8661
8662
8663 func (page JobCollectionPage) Response() JobCollection {
8664 return page.jc
8665 }
8666
8667
8668 func (page JobCollectionPage) Values() []Job {
8669 if page.jc.IsEmpty() {
8670 return nil
8671 }
8672 return *page.jc.Value
8673 }
8674
8675
8676 func NewJobCollectionPage(cur JobCollection, getNextPage func(context.Context, JobCollection) (JobCollection, error)) JobCollectionPage {
8677 return JobCollectionPage{
8678 fn: getNextPage,
8679 jc: cur,
8680 }
8681 }
8682
8683
8684 type BasicJobDetails interface {
8685 AsAsrJobDetails() (*AsrJobDetails, bool)
8686 AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool)
8687 AsFailoverJobDetails() (*FailoverJobDetails, bool)
8688 AsExportJobDetails() (*ExportJobDetails, bool)
8689 AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool)
8690 AsJobDetails() (*JobDetails, bool)
8691 }
8692
8693
8694 type JobDetails struct {
8695
8696 AffectedObjectDetails map[string]*string `json:"affectedObjectDetails"`
8697
8698 InstanceType InstanceTypeBasicJobDetails `json:"instanceType,omitempty"`
8699 }
8700
8701 func unmarshalBasicJobDetails(body []byte) (BasicJobDetails, error) {
8702 var m map[string]interface{}
8703 err := json.Unmarshal(body, &m)
8704 if err != nil {
8705 return nil, err
8706 }
8707
8708 switch m["instanceType"] {
8709 case string(InstanceTypeAsrJobDetails):
8710 var ajd AsrJobDetails
8711 err := json.Unmarshal(body, &ajd)
8712 return ajd, err
8713 case string(InstanceTypeTestFailoverJobDetails):
8714 var tfjd TestFailoverJobDetails
8715 err := json.Unmarshal(body, &tfjd)
8716 return tfjd, err
8717 case string(InstanceTypeFailoverJobDetails):
8718 var fjd FailoverJobDetails
8719 err := json.Unmarshal(body, &fjd)
8720 return fjd, err
8721 case string(InstanceTypeExportJobDetails):
8722 var ejd ExportJobDetails
8723 err := json.Unmarshal(body, &ejd)
8724 return ejd, err
8725 case string(InstanceTypeSwitchProtectionJobDetails):
8726 var spjd SwitchProtectionJobDetails
8727 err := json.Unmarshal(body, &spjd)
8728 return spjd, err
8729 default:
8730 var jd JobDetails
8731 err := json.Unmarshal(body, &jd)
8732 return jd, err
8733 }
8734 }
8735 func unmarshalBasicJobDetailsArray(body []byte) ([]BasicJobDetails, error) {
8736 var rawMessages []*json.RawMessage
8737 err := json.Unmarshal(body, &rawMessages)
8738 if err != nil {
8739 return nil, err
8740 }
8741
8742 jdArray := make([]BasicJobDetails, len(rawMessages))
8743
8744 for index, rawMessage := range rawMessages {
8745 jd, err := unmarshalBasicJobDetails(*rawMessage)
8746 if err != nil {
8747 return nil, err
8748 }
8749 jdArray[index] = jd
8750 }
8751 return jdArray, nil
8752 }
8753
8754
8755 func (jd JobDetails) MarshalJSON() ([]byte, error) {
8756 jd.InstanceType = InstanceTypeJobDetails
8757 objectMap := make(map[string]interface{})
8758 if jd.AffectedObjectDetails != nil {
8759 objectMap["affectedObjectDetails"] = jd.AffectedObjectDetails
8760 }
8761 if jd.InstanceType != "" {
8762 objectMap["instanceType"] = jd.InstanceType
8763 }
8764 return json.Marshal(objectMap)
8765 }
8766
8767
8768 func (jd JobDetails) AsAsrJobDetails() (*AsrJobDetails, bool) {
8769 return nil, false
8770 }
8771
8772
8773 func (jd JobDetails) AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool) {
8774 return nil, false
8775 }
8776
8777
8778 func (jd JobDetails) AsFailoverJobDetails() (*FailoverJobDetails, bool) {
8779 return nil, false
8780 }
8781
8782
8783 func (jd JobDetails) AsExportJobDetails() (*ExportJobDetails, bool) {
8784 return nil, false
8785 }
8786
8787
8788 func (jd JobDetails) AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool) {
8789 return nil, false
8790 }
8791
8792
8793 func (jd JobDetails) AsJobDetails() (*JobDetails, bool) {
8794 return &jd, true
8795 }
8796
8797
8798 func (jd JobDetails) AsBasicJobDetails() (BasicJobDetails, bool) {
8799 return &jd, true
8800 }
8801
8802
8803 type JobEntity struct {
8804
8805 JobID *string `json:"jobId,omitempty"`
8806
8807 JobFriendlyName *string `json:"jobFriendlyName,omitempty"`
8808
8809 TargetObjectID *string `json:"targetObjectId,omitempty"`
8810
8811 TargetObjectName *string `json:"targetObjectName,omitempty"`
8812
8813 TargetInstanceType *string `json:"targetInstanceType,omitempty"`
8814
8815 JobScenarioName *string `json:"jobScenarioName,omitempty"`
8816 }
8817
8818
8819 type JobErrorDetails struct {
8820
8821 ServiceErrorDetails *ServiceError `json:"serviceErrorDetails,omitempty"`
8822
8823 ProviderErrorDetails *ProviderError `json:"providerErrorDetails,omitempty"`
8824
8825 ErrorLevel *string `json:"errorLevel,omitempty"`
8826
8827 CreationTime *date.Time `json:"creationTime,omitempty"`
8828
8829 TaskID *string `json:"taskId,omitempty"`
8830 }
8831
8832
8833 type JobProperties struct {
8834
8835 ActivityID *string `json:"activityId,omitempty"`
8836
8837 ScenarioName *string `json:"scenarioName,omitempty"`
8838
8839 FriendlyName *string `json:"friendlyName,omitempty"`
8840
8841 State *string `json:"state,omitempty"`
8842
8843 StateDescription *string `json:"stateDescription,omitempty"`
8844
8845 Tasks *[]ASRTask `json:"tasks,omitempty"`
8846
8847 Errors *[]JobErrorDetails `json:"errors,omitempty"`
8848
8849 StartTime *date.Time `json:"startTime,omitempty"`
8850
8851 EndTime *date.Time `json:"endTime,omitempty"`
8852
8853 AllowedActions *[]string `json:"allowedActions,omitempty"`
8854
8855 TargetObjectID *string `json:"targetObjectId,omitempty"`
8856
8857 TargetObjectName *string `json:"targetObjectName,omitempty"`
8858
8859 TargetInstanceType *string `json:"targetInstanceType,omitempty"`
8860
8861 CustomDetails BasicJobDetails `json:"customDetails,omitempty"`
8862 }
8863
8864
8865 func (jp *JobProperties) UnmarshalJSON(body []byte) error {
8866 var m map[string]*json.RawMessage
8867 err := json.Unmarshal(body, &m)
8868 if err != nil {
8869 return err
8870 }
8871 for k, v := range m {
8872 switch k {
8873 case "activityId":
8874 if v != nil {
8875 var activityID string
8876 err = json.Unmarshal(*v, &activityID)
8877 if err != nil {
8878 return err
8879 }
8880 jp.ActivityID = &activityID
8881 }
8882 case "scenarioName":
8883 if v != nil {
8884 var scenarioName string
8885 err = json.Unmarshal(*v, &scenarioName)
8886 if err != nil {
8887 return err
8888 }
8889 jp.ScenarioName = &scenarioName
8890 }
8891 case "friendlyName":
8892 if v != nil {
8893 var friendlyName string
8894 err = json.Unmarshal(*v, &friendlyName)
8895 if err != nil {
8896 return err
8897 }
8898 jp.FriendlyName = &friendlyName
8899 }
8900 case "state":
8901 if v != nil {
8902 var state string
8903 err = json.Unmarshal(*v, &state)
8904 if err != nil {
8905 return err
8906 }
8907 jp.State = &state
8908 }
8909 case "stateDescription":
8910 if v != nil {
8911 var stateDescription string
8912 err = json.Unmarshal(*v, &stateDescription)
8913 if err != nil {
8914 return err
8915 }
8916 jp.StateDescription = &stateDescription
8917 }
8918 case "tasks":
8919 if v != nil {
8920 var tasks []ASRTask
8921 err = json.Unmarshal(*v, &tasks)
8922 if err != nil {
8923 return err
8924 }
8925 jp.Tasks = &tasks
8926 }
8927 case "errors":
8928 if v != nil {
8929 var errorsVar []JobErrorDetails
8930 err = json.Unmarshal(*v, &errorsVar)
8931 if err != nil {
8932 return err
8933 }
8934 jp.Errors = &errorsVar
8935 }
8936 case "startTime":
8937 if v != nil {
8938 var startTime date.Time
8939 err = json.Unmarshal(*v, &startTime)
8940 if err != nil {
8941 return err
8942 }
8943 jp.StartTime = &startTime
8944 }
8945 case "endTime":
8946 if v != nil {
8947 var endTime date.Time
8948 err = json.Unmarshal(*v, &endTime)
8949 if err != nil {
8950 return err
8951 }
8952 jp.EndTime = &endTime
8953 }
8954 case "allowedActions":
8955 if v != nil {
8956 var allowedActions []string
8957 err = json.Unmarshal(*v, &allowedActions)
8958 if err != nil {
8959 return err
8960 }
8961 jp.AllowedActions = &allowedActions
8962 }
8963 case "targetObjectId":
8964 if v != nil {
8965 var targetObjectID string
8966 err = json.Unmarshal(*v, &targetObjectID)
8967 if err != nil {
8968 return err
8969 }
8970 jp.TargetObjectID = &targetObjectID
8971 }
8972 case "targetObjectName":
8973 if v != nil {
8974 var targetObjectName string
8975 err = json.Unmarshal(*v, &targetObjectName)
8976 if err != nil {
8977 return err
8978 }
8979 jp.TargetObjectName = &targetObjectName
8980 }
8981 case "targetInstanceType":
8982 if v != nil {
8983 var targetInstanceType string
8984 err = json.Unmarshal(*v, &targetInstanceType)
8985 if err != nil {
8986 return err
8987 }
8988 jp.TargetInstanceType = &targetInstanceType
8989 }
8990 case "customDetails":
8991 if v != nil {
8992 customDetails, err := unmarshalBasicJobDetails(*v)
8993 if err != nil {
8994 return err
8995 }
8996 jp.CustomDetails = customDetails
8997 }
8998 }
8999 }
9000
9001 return nil
9002 }
9003
9004
9005 type JobQueryParameter struct {
9006
9007 StartTime *string `json:"startTime,omitempty"`
9008
9009 EndTime *string `json:"endTime,omitempty"`
9010
9011 FabricID *string `json:"fabricId,omitempty"`
9012
9013 AffectedObjectTypes *[]string `json:"affectedObjectTypes,omitempty"`
9014
9015 JobStatus *[]string `json:"jobStatus,omitempty"`
9016 }
9017
9018
9019 type JobStatusEventDetails struct {
9020
9021 JobID *string `json:"jobId,omitempty"`
9022
9023 JobFriendlyName *string `json:"jobFriendlyName,omitempty"`
9024
9025 JobStatus *string `json:"jobStatus,omitempty"`
9026
9027 AffectedObjectType *string `json:"affectedObjectType,omitempty"`
9028
9029 InstanceType InstanceTypeBasicEventSpecificDetails `json:"instanceType,omitempty"`
9030 }
9031
9032
9033 func (jsed JobStatusEventDetails) MarshalJSON() ([]byte, error) {
9034 jsed.InstanceType = InstanceTypeJobStatus
9035 objectMap := make(map[string]interface{})
9036 if jsed.JobID != nil {
9037 objectMap["jobId"] = jsed.JobID
9038 }
9039 if jsed.JobFriendlyName != nil {
9040 objectMap["jobFriendlyName"] = jsed.JobFriendlyName
9041 }
9042 if jsed.JobStatus != nil {
9043 objectMap["jobStatus"] = jsed.JobStatus
9044 }
9045 if jsed.AffectedObjectType != nil {
9046 objectMap["affectedObjectType"] = jsed.AffectedObjectType
9047 }
9048 if jsed.InstanceType != "" {
9049 objectMap["instanceType"] = jsed.InstanceType
9050 }
9051 return json.Marshal(objectMap)
9052 }
9053
9054
9055 func (jsed JobStatusEventDetails) AsJobStatusEventDetails() (*JobStatusEventDetails, bool) {
9056 return &jsed, true
9057 }
9058
9059
9060 func (jsed JobStatusEventDetails) AsEventSpecificDetails() (*EventSpecificDetails, bool) {
9061 return nil, false
9062 }
9063
9064
9065 func (jsed JobStatusEventDetails) AsBasicEventSpecificDetails() (BasicEventSpecificDetails, bool) {
9066 return &jsed, true
9067 }
9068
9069
9070
9071 type JobTaskDetails struct {
9072
9073 JobTask *JobEntity `json:"jobTask,omitempty"`
9074
9075 InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"`
9076 }
9077
9078
9079 func (jtd JobTaskDetails) MarshalJSON() ([]byte, error) {
9080 jtd.InstanceType = InstanceTypeJobTaskDetails
9081 objectMap := make(map[string]interface{})
9082 if jtd.JobTask != nil {
9083 objectMap["jobTask"] = jtd.JobTask
9084 }
9085 if jtd.InstanceType != "" {
9086 objectMap["instanceType"] = jtd.InstanceType
9087 }
9088 return json.Marshal(objectMap)
9089 }
9090
9091
9092 func (jtd JobTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) {
9093 return &jtd, true
9094 }
9095
9096
9097 func (jtd JobTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) {
9098 return nil, false
9099 }
9100
9101
9102 func (jtd JobTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) {
9103 return nil, false
9104 }
9105
9106
9107 func (jtd JobTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) {
9108 return nil, false
9109 }
9110
9111
9112 func (jtd JobTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) {
9113 return nil, false
9114 }
9115
9116
9117 func (jtd JobTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) {
9118 return nil, false
9119 }
9120
9121
9122 func (jtd JobTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) {
9123 return nil, false
9124 }
9125
9126
9127 func (jtd JobTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) {
9128 return nil, false
9129 }
9130
9131
9132 func (jtd JobTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) {
9133 return nil, false
9134 }
9135
9136
9137 func (jtd JobTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) {
9138 return &jtd, true
9139 }
9140
9141
9142 type LogicalNetwork struct {
9143 autorest.Response `json:"-"`
9144
9145 Properties *LogicalNetworkProperties `json:"properties,omitempty"`
9146
9147 ID *string `json:"id,omitempty"`
9148
9149 Name *string `json:"name,omitempty"`
9150
9151 Type *string `json:"type,omitempty"`
9152
9153 Location *string `json:"location,omitempty"`
9154 }
9155
9156
9157 func (ln LogicalNetwork) MarshalJSON() ([]byte, error) {
9158 objectMap := make(map[string]interface{})
9159 if ln.Properties != nil {
9160 objectMap["properties"] = ln.Properties
9161 }
9162 if ln.Location != nil {
9163 objectMap["location"] = ln.Location
9164 }
9165 return json.Marshal(objectMap)
9166 }
9167
9168
9169 type LogicalNetworkCollection struct {
9170 autorest.Response `json:"-"`
9171
9172 Value *[]LogicalNetwork `json:"value,omitempty"`
9173
9174 NextLink *string `json:"nextLink,omitempty"`
9175 }
9176
9177
9178 type LogicalNetworkCollectionIterator struct {
9179 i int
9180 page LogicalNetworkCollectionPage
9181 }
9182
9183
9184
9185 func (iter *LogicalNetworkCollectionIterator) NextWithContext(ctx context.Context) (err error) {
9186 if tracing.IsEnabled() {
9187 ctx = tracing.StartSpan(ctx, fqdn+"/LogicalNetworkCollectionIterator.NextWithContext")
9188 defer func() {
9189 sc := -1
9190 if iter.Response().Response.Response != nil {
9191 sc = iter.Response().Response.Response.StatusCode
9192 }
9193 tracing.EndSpan(ctx, sc, err)
9194 }()
9195 }
9196 iter.i++
9197 if iter.i < len(iter.page.Values()) {
9198 return nil
9199 }
9200 err = iter.page.NextWithContext(ctx)
9201 if err != nil {
9202 iter.i--
9203 return err
9204 }
9205 iter.i = 0
9206 return nil
9207 }
9208
9209
9210
9211
9212 func (iter *LogicalNetworkCollectionIterator) Next() error {
9213 return iter.NextWithContext(context.Background())
9214 }
9215
9216
9217 func (iter LogicalNetworkCollectionIterator) NotDone() bool {
9218 return iter.page.NotDone() && iter.i < len(iter.page.Values())
9219 }
9220
9221
9222 func (iter LogicalNetworkCollectionIterator) Response() LogicalNetworkCollection {
9223 return iter.page.Response()
9224 }
9225
9226
9227
9228 func (iter LogicalNetworkCollectionIterator) Value() LogicalNetwork {
9229 if !iter.page.NotDone() {
9230 return LogicalNetwork{}
9231 }
9232 return iter.page.Values()[iter.i]
9233 }
9234
9235
9236 func NewLogicalNetworkCollectionIterator(page LogicalNetworkCollectionPage) LogicalNetworkCollectionIterator {
9237 return LogicalNetworkCollectionIterator{page: page}
9238 }
9239
9240
9241 func (lnc LogicalNetworkCollection) IsEmpty() bool {
9242 return lnc.Value == nil || len(*lnc.Value) == 0
9243 }
9244
9245
9246 func (lnc LogicalNetworkCollection) hasNextLink() bool {
9247 return lnc.NextLink != nil && len(*lnc.NextLink) != 0
9248 }
9249
9250
9251
9252 func (lnc LogicalNetworkCollection) logicalNetworkCollectionPreparer(ctx context.Context) (*http.Request, error) {
9253 if !lnc.hasNextLink() {
9254 return nil, nil
9255 }
9256 return autorest.Prepare((&http.Request{}).WithContext(ctx),
9257 autorest.AsJSON(),
9258 autorest.AsGet(),
9259 autorest.WithBaseURL(to.String(lnc.NextLink)))
9260 }
9261
9262
9263 type LogicalNetworkCollectionPage struct {
9264 fn func(context.Context, LogicalNetworkCollection) (LogicalNetworkCollection, error)
9265 lnc LogicalNetworkCollection
9266 }
9267
9268
9269
9270 func (page *LogicalNetworkCollectionPage) NextWithContext(ctx context.Context) (err error) {
9271 if tracing.IsEnabled() {
9272 ctx = tracing.StartSpan(ctx, fqdn+"/LogicalNetworkCollectionPage.NextWithContext")
9273 defer func() {
9274 sc := -1
9275 if page.Response().Response.Response != nil {
9276 sc = page.Response().Response.Response.StatusCode
9277 }
9278 tracing.EndSpan(ctx, sc, err)
9279 }()
9280 }
9281 for {
9282 next, err := page.fn(ctx, page.lnc)
9283 if err != nil {
9284 return err
9285 }
9286 page.lnc = next
9287 if !next.hasNextLink() || !next.IsEmpty() {
9288 break
9289 }
9290 }
9291 return nil
9292 }
9293
9294
9295
9296
9297 func (page *LogicalNetworkCollectionPage) Next() error {
9298 return page.NextWithContext(context.Background())
9299 }
9300
9301
9302 func (page LogicalNetworkCollectionPage) NotDone() bool {
9303 return !page.lnc.IsEmpty()
9304 }
9305
9306
9307 func (page LogicalNetworkCollectionPage) Response() LogicalNetworkCollection {
9308 return page.lnc
9309 }
9310
9311
9312 func (page LogicalNetworkCollectionPage) Values() []LogicalNetwork {
9313 if page.lnc.IsEmpty() {
9314 return nil
9315 }
9316 return *page.lnc.Value
9317 }
9318
9319
9320 func NewLogicalNetworkCollectionPage(cur LogicalNetworkCollection, getNextPage func(context.Context, LogicalNetworkCollection) (LogicalNetworkCollection, error)) LogicalNetworkCollectionPage {
9321 return LogicalNetworkCollectionPage{
9322 fn: getNextPage,
9323 lnc: cur,
9324 }
9325 }
9326
9327
9328 type LogicalNetworkProperties struct {
9329
9330 FriendlyName *string `json:"friendlyName,omitempty"`
9331
9332 NetworkVirtualizationStatus *string `json:"networkVirtualizationStatus,omitempty"`
9333
9334 LogicalNetworkUsage *string `json:"logicalNetworkUsage,omitempty"`
9335
9336 LogicalNetworkDefinitionsStatus *string `json:"logicalNetworkDefinitionsStatus,omitempty"`
9337 }
9338
9339
9340 type ManualActionTaskDetails struct {
9341
9342 Name *string `json:"name,omitempty"`
9343
9344 Instructions *string `json:"instructions,omitempty"`
9345
9346 Observation *string `json:"observation,omitempty"`
9347
9348 InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"`
9349 }
9350
9351
9352 func (matd ManualActionTaskDetails) MarshalJSON() ([]byte, error) {
9353 matd.InstanceType = InstanceTypeManualActionTaskDetails
9354 objectMap := make(map[string]interface{})
9355 if matd.Name != nil {
9356 objectMap["name"] = matd.Name
9357 }
9358 if matd.Instructions != nil {
9359 objectMap["instructions"] = matd.Instructions
9360 }
9361 if matd.Observation != nil {
9362 objectMap["observation"] = matd.Observation
9363 }
9364 if matd.InstanceType != "" {
9365 objectMap["instanceType"] = matd.InstanceType
9366 }
9367 return json.Marshal(objectMap)
9368 }
9369
9370
9371 func (matd ManualActionTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) {
9372 return nil, false
9373 }
9374
9375
9376 func (matd ManualActionTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) {
9377 return nil, false
9378 }
9379
9380
9381 func (matd ManualActionTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) {
9382 return nil, false
9383 }
9384
9385
9386 func (matd ManualActionTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) {
9387 return &matd, true
9388 }
9389
9390
9391 func (matd ManualActionTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) {
9392 return nil, false
9393 }
9394
9395
9396 func (matd ManualActionTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) {
9397 return nil, false
9398 }
9399
9400
9401 func (matd ManualActionTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) {
9402 return nil, false
9403 }
9404
9405
9406 func (matd ManualActionTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) {
9407 return nil, false
9408 }
9409
9410
9411 func (matd ManualActionTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) {
9412 return nil, false
9413 }
9414
9415
9416 func (matd ManualActionTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) {
9417 return &matd, true
9418 }
9419
9420
9421 type MasterTargetServer struct {
9422
9423 ID *string `json:"id,omitempty"`
9424
9425 IPAddress *string `json:"ipAddress,omitempty"`
9426
9427 Name *string `json:"name,omitempty"`
9428
9429 OsType *string `json:"osType,omitempty"`
9430
9431 AgentVersion *string `json:"agentVersion,omitempty"`
9432
9433 LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"`
9434
9435 VersionStatus *string `json:"versionStatus,omitempty"`
9436
9437 RetentionVolumes *[]RetentionVolume `json:"retentionVolumes,omitempty"`
9438
9439 DataStores *[]DataStore `json:"dataStores,omitempty"`
9440
9441 ValidationErrors *[]HealthError `json:"validationErrors,omitempty"`
9442
9443 DiskCount *int32 `json:"diskCount,omitempty"`
9444
9445 OsVersion *string `json:"osVersion,omitempty"`
9446 }
9447
9448
9449 type MethodCallStatus struct {
9450
9451 IsVirtual *string `json:"isVirtual,omitempty"`
9452
9453 Parameters *[]string `json:"parameters,omitempty"`
9454
9455 ContainsGenericParameters *string `json:"containsGenericParameters,omitempty"`
9456 }
9457
9458
9459 type MobilityServiceUpdate struct {
9460
9461 Version *string `json:"version,omitempty"`
9462
9463 RebootStatus *string `json:"rebootStatus,omitempty"`
9464
9465 OsType *string `json:"osType,omitempty"`
9466 }
9467
9468
9469 type Network struct {
9470 autorest.Response `json:"-"`
9471
9472 Properties *NetworkProperties `json:"properties,omitempty"`
9473
9474 ID *string `json:"id,omitempty"`
9475
9476 Name *string `json:"name,omitempty"`
9477
9478 Type *string `json:"type,omitempty"`
9479
9480 Location *string `json:"location,omitempty"`
9481 }
9482
9483
9484 func (n Network) MarshalJSON() ([]byte, error) {
9485 objectMap := make(map[string]interface{})
9486 if n.Properties != nil {
9487 objectMap["properties"] = n.Properties
9488 }
9489 if n.Location != nil {
9490 objectMap["location"] = n.Location
9491 }
9492 return json.Marshal(objectMap)
9493 }
9494
9495
9496 type NetworkCollection struct {
9497 autorest.Response `json:"-"`
9498
9499 Value *[]Network `json:"value,omitempty"`
9500
9501 NextLink *string `json:"nextLink,omitempty"`
9502 }
9503
9504
9505 type NetworkCollectionIterator struct {
9506 i int
9507 page NetworkCollectionPage
9508 }
9509
9510
9511
9512 func (iter *NetworkCollectionIterator) NextWithContext(ctx context.Context) (err error) {
9513 if tracing.IsEnabled() {
9514 ctx = tracing.StartSpan(ctx, fqdn+"/NetworkCollectionIterator.NextWithContext")
9515 defer func() {
9516 sc := -1
9517 if iter.Response().Response.Response != nil {
9518 sc = iter.Response().Response.Response.StatusCode
9519 }
9520 tracing.EndSpan(ctx, sc, err)
9521 }()
9522 }
9523 iter.i++
9524 if iter.i < len(iter.page.Values()) {
9525 return nil
9526 }
9527 err = iter.page.NextWithContext(ctx)
9528 if err != nil {
9529 iter.i--
9530 return err
9531 }
9532 iter.i = 0
9533 return nil
9534 }
9535
9536
9537
9538
9539 func (iter *NetworkCollectionIterator) Next() error {
9540 return iter.NextWithContext(context.Background())
9541 }
9542
9543
9544 func (iter NetworkCollectionIterator) NotDone() bool {
9545 return iter.page.NotDone() && iter.i < len(iter.page.Values())
9546 }
9547
9548
9549 func (iter NetworkCollectionIterator) Response() NetworkCollection {
9550 return iter.page.Response()
9551 }
9552
9553
9554
9555 func (iter NetworkCollectionIterator) Value() Network {
9556 if !iter.page.NotDone() {
9557 return Network{}
9558 }
9559 return iter.page.Values()[iter.i]
9560 }
9561
9562
9563 func NewNetworkCollectionIterator(page NetworkCollectionPage) NetworkCollectionIterator {
9564 return NetworkCollectionIterator{page: page}
9565 }
9566
9567
9568 func (nc NetworkCollection) IsEmpty() bool {
9569 return nc.Value == nil || len(*nc.Value) == 0
9570 }
9571
9572
9573 func (nc NetworkCollection) hasNextLink() bool {
9574 return nc.NextLink != nil && len(*nc.NextLink) != 0
9575 }
9576
9577
9578
9579 func (nc NetworkCollection) networkCollectionPreparer(ctx context.Context) (*http.Request, error) {
9580 if !nc.hasNextLink() {
9581 return nil, nil
9582 }
9583 return autorest.Prepare((&http.Request{}).WithContext(ctx),
9584 autorest.AsJSON(),
9585 autorest.AsGet(),
9586 autorest.WithBaseURL(to.String(nc.NextLink)))
9587 }
9588
9589
9590 type NetworkCollectionPage struct {
9591 fn func(context.Context, NetworkCollection) (NetworkCollection, error)
9592 nc NetworkCollection
9593 }
9594
9595
9596
9597 func (page *NetworkCollectionPage) NextWithContext(ctx context.Context) (err error) {
9598 if tracing.IsEnabled() {
9599 ctx = tracing.StartSpan(ctx, fqdn+"/NetworkCollectionPage.NextWithContext")
9600 defer func() {
9601 sc := -1
9602 if page.Response().Response.Response != nil {
9603 sc = page.Response().Response.Response.StatusCode
9604 }
9605 tracing.EndSpan(ctx, sc, err)
9606 }()
9607 }
9608 for {
9609 next, err := page.fn(ctx, page.nc)
9610 if err != nil {
9611 return err
9612 }
9613 page.nc = next
9614 if !next.hasNextLink() || !next.IsEmpty() {
9615 break
9616 }
9617 }
9618 return nil
9619 }
9620
9621
9622
9623
9624 func (page *NetworkCollectionPage) Next() error {
9625 return page.NextWithContext(context.Background())
9626 }
9627
9628
9629 func (page NetworkCollectionPage) NotDone() bool {
9630 return !page.nc.IsEmpty()
9631 }
9632
9633
9634 func (page NetworkCollectionPage) Response() NetworkCollection {
9635 return page.nc
9636 }
9637
9638
9639 func (page NetworkCollectionPage) Values() []Network {
9640 if page.nc.IsEmpty() {
9641 return nil
9642 }
9643 return *page.nc.Value
9644 }
9645
9646
9647 func NewNetworkCollectionPage(cur NetworkCollection, getNextPage func(context.Context, NetworkCollection) (NetworkCollection, error)) NetworkCollectionPage {
9648 return NetworkCollectionPage{
9649 fn: getNextPage,
9650 nc: cur,
9651 }
9652 }
9653
9654
9655
9656
9657
9658
9659 type NetworkMapping struct {
9660 autorest.Response `json:"-"`
9661
9662 Properties *NetworkMappingProperties `json:"properties,omitempty"`
9663
9664 ID *string `json:"id,omitempty"`
9665
9666 Name *string `json:"name,omitempty"`
9667
9668 Type *string `json:"type,omitempty"`
9669
9670 Location *string `json:"location,omitempty"`
9671 }
9672
9673
9674 func (nm NetworkMapping) MarshalJSON() ([]byte, error) {
9675 objectMap := make(map[string]interface{})
9676 if nm.Properties != nil {
9677 objectMap["properties"] = nm.Properties
9678 }
9679 if nm.Location != nil {
9680 objectMap["location"] = nm.Location
9681 }
9682 return json.Marshal(objectMap)
9683 }
9684
9685
9686
9687
9688
9689 type NetworkMappingCollection struct {
9690 autorest.Response `json:"-"`
9691
9692 Value *[]NetworkMapping `json:"value,omitempty"`
9693
9694 NextLink *string `json:"nextLink,omitempty"`
9695 }
9696
9697
9698 type NetworkMappingCollectionIterator struct {
9699 i int
9700 page NetworkMappingCollectionPage
9701 }
9702
9703
9704
9705 func (iter *NetworkMappingCollectionIterator) NextWithContext(ctx context.Context) (err error) {
9706 if tracing.IsEnabled() {
9707 ctx = tracing.StartSpan(ctx, fqdn+"/NetworkMappingCollectionIterator.NextWithContext")
9708 defer func() {
9709 sc := -1
9710 if iter.Response().Response.Response != nil {
9711 sc = iter.Response().Response.Response.StatusCode
9712 }
9713 tracing.EndSpan(ctx, sc, err)
9714 }()
9715 }
9716 iter.i++
9717 if iter.i < len(iter.page.Values()) {
9718 return nil
9719 }
9720 err = iter.page.NextWithContext(ctx)
9721 if err != nil {
9722 iter.i--
9723 return err
9724 }
9725 iter.i = 0
9726 return nil
9727 }
9728
9729
9730
9731
9732 func (iter *NetworkMappingCollectionIterator) Next() error {
9733 return iter.NextWithContext(context.Background())
9734 }
9735
9736
9737 func (iter NetworkMappingCollectionIterator) NotDone() bool {
9738 return iter.page.NotDone() && iter.i < len(iter.page.Values())
9739 }
9740
9741
9742 func (iter NetworkMappingCollectionIterator) Response() NetworkMappingCollection {
9743 return iter.page.Response()
9744 }
9745
9746
9747
9748 func (iter NetworkMappingCollectionIterator) Value() NetworkMapping {
9749 if !iter.page.NotDone() {
9750 return NetworkMapping{}
9751 }
9752 return iter.page.Values()[iter.i]
9753 }
9754
9755
9756 func NewNetworkMappingCollectionIterator(page NetworkMappingCollectionPage) NetworkMappingCollectionIterator {
9757 return NetworkMappingCollectionIterator{page: page}
9758 }
9759
9760
9761 func (nmc NetworkMappingCollection) IsEmpty() bool {
9762 return nmc.Value == nil || len(*nmc.Value) == 0
9763 }
9764
9765
9766 func (nmc NetworkMappingCollection) hasNextLink() bool {
9767 return nmc.NextLink != nil && len(*nmc.NextLink) != 0
9768 }
9769
9770
9771
9772 func (nmc NetworkMappingCollection) networkMappingCollectionPreparer(ctx context.Context) (*http.Request, error) {
9773 if !nmc.hasNextLink() {
9774 return nil, nil
9775 }
9776 return autorest.Prepare((&http.Request{}).WithContext(ctx),
9777 autorest.AsJSON(),
9778 autorest.AsGet(),
9779 autorest.WithBaseURL(to.String(nmc.NextLink)))
9780 }
9781
9782
9783 type NetworkMappingCollectionPage struct {
9784 fn func(context.Context, NetworkMappingCollection) (NetworkMappingCollection, error)
9785 nmc NetworkMappingCollection
9786 }
9787
9788
9789
9790 func (page *NetworkMappingCollectionPage) NextWithContext(ctx context.Context) (err error) {
9791 if tracing.IsEnabled() {
9792 ctx = tracing.StartSpan(ctx, fqdn+"/NetworkMappingCollectionPage.NextWithContext")
9793 defer func() {
9794 sc := -1
9795 if page.Response().Response.Response != nil {
9796 sc = page.Response().Response.Response.StatusCode
9797 }
9798 tracing.EndSpan(ctx, sc, err)
9799 }()
9800 }
9801 for {
9802 next, err := page.fn(ctx, page.nmc)
9803 if err != nil {
9804 return err
9805 }
9806 page.nmc = next
9807 if !next.hasNextLink() || !next.IsEmpty() {
9808 break
9809 }
9810 }
9811 return nil
9812 }
9813
9814
9815
9816
9817 func (page *NetworkMappingCollectionPage) Next() error {
9818 return page.NextWithContext(context.Background())
9819 }
9820
9821
9822 func (page NetworkMappingCollectionPage) NotDone() bool {
9823 return !page.nmc.IsEmpty()
9824 }
9825
9826
9827 func (page NetworkMappingCollectionPage) Response() NetworkMappingCollection {
9828 return page.nmc
9829 }
9830
9831
9832 func (page NetworkMappingCollectionPage) Values() []NetworkMapping {
9833 if page.nmc.IsEmpty() {
9834 return nil
9835 }
9836 return *page.nmc.Value
9837 }
9838
9839
9840 func NewNetworkMappingCollectionPage(cur NetworkMappingCollection, getNextPage func(context.Context, NetworkMappingCollection) (NetworkMappingCollection, error)) NetworkMappingCollectionPage {
9841 return NetworkMappingCollectionPage{
9842 fn: getNextPage,
9843 nmc: cur,
9844 }
9845 }
9846
9847
9848 type BasicNetworkMappingFabricSpecificSettings interface {
9849 AsAzureToAzureNetworkMappingSettings() (*AzureToAzureNetworkMappingSettings, bool)
9850 AsVmmToAzureNetworkMappingSettings() (*VmmToAzureNetworkMappingSettings, bool)
9851 AsVmmToVmmNetworkMappingSettings() (*VmmToVmmNetworkMappingSettings, bool)
9852 AsNetworkMappingFabricSpecificSettings() (*NetworkMappingFabricSpecificSettings, bool)
9853 }
9854
9855
9856 type NetworkMappingFabricSpecificSettings struct {
9857
9858 InstanceType InstanceTypeBasicNetworkMappingFabricSpecificSettings `json:"instanceType,omitempty"`
9859 }
9860
9861 func unmarshalBasicNetworkMappingFabricSpecificSettings(body []byte) (BasicNetworkMappingFabricSpecificSettings, error) {
9862 var m map[string]interface{}
9863 err := json.Unmarshal(body, &m)
9864 if err != nil {
9865 return nil, err
9866 }
9867
9868 switch m["instanceType"] {
9869 case string(InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeAzureToAzure):
9870 var atanms AzureToAzureNetworkMappingSettings
9871 err := json.Unmarshal(body, &atanms)
9872 return atanms, err
9873 case string(InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToAzure):
9874 var vtanms VmmToAzureNetworkMappingSettings
9875 err := json.Unmarshal(body, &vtanms)
9876 return vtanms, err
9877 case string(InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToVmm):
9878 var vtvnms VmmToVmmNetworkMappingSettings
9879 err := json.Unmarshal(body, &vtvnms)
9880 return vtvnms, err
9881 default:
9882 var nmfss NetworkMappingFabricSpecificSettings
9883 err := json.Unmarshal(body, &nmfss)
9884 return nmfss, err
9885 }
9886 }
9887 func unmarshalBasicNetworkMappingFabricSpecificSettingsArray(body []byte) ([]BasicNetworkMappingFabricSpecificSettings, error) {
9888 var rawMessages []*json.RawMessage
9889 err := json.Unmarshal(body, &rawMessages)
9890 if err != nil {
9891 return nil, err
9892 }
9893
9894 nmfssArray := make([]BasicNetworkMappingFabricSpecificSettings, len(rawMessages))
9895
9896 for index, rawMessage := range rawMessages {
9897 nmfss, err := unmarshalBasicNetworkMappingFabricSpecificSettings(*rawMessage)
9898 if err != nil {
9899 return nil, err
9900 }
9901 nmfssArray[index] = nmfss
9902 }
9903 return nmfssArray, nil
9904 }
9905
9906
9907 func (nmfss NetworkMappingFabricSpecificSettings) MarshalJSON() ([]byte, error) {
9908 nmfss.InstanceType = InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeNetworkMappingFabricSpecificSettings
9909 objectMap := make(map[string]interface{})
9910 if nmfss.InstanceType != "" {
9911 objectMap["instanceType"] = nmfss.InstanceType
9912 }
9913 return json.Marshal(objectMap)
9914 }
9915
9916
9917 func (nmfss NetworkMappingFabricSpecificSettings) AsAzureToAzureNetworkMappingSettings() (*AzureToAzureNetworkMappingSettings, bool) {
9918 return nil, false
9919 }
9920
9921
9922 func (nmfss NetworkMappingFabricSpecificSettings) AsVmmToAzureNetworkMappingSettings() (*VmmToAzureNetworkMappingSettings, bool) {
9923 return nil, false
9924 }
9925
9926
9927 func (nmfss NetworkMappingFabricSpecificSettings) AsVmmToVmmNetworkMappingSettings() (*VmmToVmmNetworkMappingSettings, bool) {
9928 return nil, false
9929 }
9930
9931
9932 func (nmfss NetworkMappingFabricSpecificSettings) AsNetworkMappingFabricSpecificSettings() (*NetworkMappingFabricSpecificSettings, bool) {
9933 return &nmfss, true
9934 }
9935
9936
9937 func (nmfss NetworkMappingFabricSpecificSettings) AsBasicNetworkMappingFabricSpecificSettings() (BasicNetworkMappingFabricSpecificSettings, bool) {
9938 return &nmfss, true
9939 }
9940
9941
9942 type NetworkMappingProperties struct {
9943
9944 State *string `json:"state,omitempty"`
9945
9946 PrimaryNetworkFriendlyName *string `json:"primaryNetworkFriendlyName,omitempty"`
9947
9948 PrimaryNetworkID *string `json:"primaryNetworkId,omitempty"`
9949
9950 PrimaryFabricFriendlyName *string `json:"primaryFabricFriendlyName,omitempty"`
9951
9952 RecoveryNetworkFriendlyName *string `json:"recoveryNetworkFriendlyName,omitempty"`
9953
9954 RecoveryNetworkID *string `json:"recoveryNetworkId,omitempty"`
9955
9956 RecoveryFabricArmID *string `json:"recoveryFabricArmId,omitempty"`
9957
9958 RecoveryFabricFriendlyName *string `json:"recoveryFabricFriendlyName,omitempty"`
9959
9960 FabricSpecificSettings BasicNetworkMappingFabricSpecificSettings `json:"fabricSpecificSettings,omitempty"`
9961 }
9962
9963
9964 func (nmp *NetworkMappingProperties) UnmarshalJSON(body []byte) error {
9965 var m map[string]*json.RawMessage
9966 err := json.Unmarshal(body, &m)
9967 if err != nil {
9968 return err
9969 }
9970 for k, v := range m {
9971 switch k {
9972 case "state":
9973 if v != nil {
9974 var state string
9975 err = json.Unmarshal(*v, &state)
9976 if err != nil {
9977 return err
9978 }
9979 nmp.State = &state
9980 }
9981 case "primaryNetworkFriendlyName":
9982 if v != nil {
9983 var primaryNetworkFriendlyName string
9984 err = json.Unmarshal(*v, &primaryNetworkFriendlyName)
9985 if err != nil {
9986 return err
9987 }
9988 nmp.PrimaryNetworkFriendlyName = &primaryNetworkFriendlyName
9989 }
9990 case "primaryNetworkId":
9991 if v != nil {
9992 var primaryNetworkID string
9993 err = json.Unmarshal(*v, &primaryNetworkID)
9994 if err != nil {
9995 return err
9996 }
9997 nmp.PrimaryNetworkID = &primaryNetworkID
9998 }
9999 case "primaryFabricFriendlyName":
10000 if v != nil {
10001 var primaryFabricFriendlyName string
10002 err = json.Unmarshal(*v, &primaryFabricFriendlyName)
10003 if err != nil {
10004 return err
10005 }
10006 nmp.PrimaryFabricFriendlyName = &primaryFabricFriendlyName
10007 }
10008 case "recoveryNetworkFriendlyName":
10009 if v != nil {
10010 var recoveryNetworkFriendlyName string
10011 err = json.Unmarshal(*v, &recoveryNetworkFriendlyName)
10012 if err != nil {
10013 return err
10014 }
10015 nmp.RecoveryNetworkFriendlyName = &recoveryNetworkFriendlyName
10016 }
10017 case "recoveryNetworkId":
10018 if v != nil {
10019 var recoveryNetworkID string
10020 err = json.Unmarshal(*v, &recoveryNetworkID)
10021 if err != nil {
10022 return err
10023 }
10024 nmp.RecoveryNetworkID = &recoveryNetworkID
10025 }
10026 case "recoveryFabricArmId":
10027 if v != nil {
10028 var recoveryFabricArmID string
10029 err = json.Unmarshal(*v, &recoveryFabricArmID)
10030 if err != nil {
10031 return err
10032 }
10033 nmp.RecoveryFabricArmID = &recoveryFabricArmID
10034 }
10035 case "recoveryFabricFriendlyName":
10036 if v != nil {
10037 var recoveryFabricFriendlyName string
10038 err = json.Unmarshal(*v, &recoveryFabricFriendlyName)
10039 if err != nil {
10040 return err
10041 }
10042 nmp.RecoveryFabricFriendlyName = &recoveryFabricFriendlyName
10043 }
10044 case "fabricSpecificSettings":
10045 if v != nil {
10046 fabricSpecificSettings, err := unmarshalBasicNetworkMappingFabricSpecificSettings(*v)
10047 if err != nil {
10048 return err
10049 }
10050 nmp.FabricSpecificSettings = fabricSpecificSettings
10051 }
10052 }
10053 }
10054
10055 return nil
10056 }
10057
10058
10059 type NetworkProperties struct {
10060
10061 FabricType *string `json:"fabricType,omitempty"`
10062
10063 Subnets *[]Subnet `json:"subnets,omitempty"`
10064
10065 FriendlyName *string `json:"friendlyName,omitempty"`
10066
10067 NetworkType *string `json:"networkType,omitempty"`
10068 }
10069
10070
10071 type OperationsDiscovery struct {
10072
10073 Name *string `json:"name,omitempty"`
10074
10075 Display *Display `json:"display,omitempty"`
10076
10077 Origin *string `json:"origin,omitempty"`
10078
10079 Properties interface{} `json:"properties,omitempty"`
10080 }
10081
10082
10083 type OperationsDiscoveryCollection struct {
10084 autorest.Response `json:"-"`
10085
10086 Value *[]OperationsDiscovery `json:"value,omitempty"`
10087
10088 NextLink *string `json:"nextLink,omitempty"`
10089 }
10090
10091
10092
10093 type OperationsDiscoveryCollectionIterator struct {
10094 i int
10095 page OperationsDiscoveryCollectionPage
10096 }
10097
10098
10099
10100 func (iter *OperationsDiscoveryCollectionIterator) NextWithContext(ctx context.Context) (err error) {
10101 if tracing.IsEnabled() {
10102 ctx = tracing.StartSpan(ctx, fqdn+"/OperationsDiscoveryCollectionIterator.NextWithContext")
10103 defer func() {
10104 sc := -1
10105 if iter.Response().Response.Response != nil {
10106 sc = iter.Response().Response.Response.StatusCode
10107 }
10108 tracing.EndSpan(ctx, sc, err)
10109 }()
10110 }
10111 iter.i++
10112 if iter.i < len(iter.page.Values()) {
10113 return nil
10114 }
10115 err = iter.page.NextWithContext(ctx)
10116 if err != nil {
10117 iter.i--
10118 return err
10119 }
10120 iter.i = 0
10121 return nil
10122 }
10123
10124
10125
10126
10127 func (iter *OperationsDiscoveryCollectionIterator) Next() error {
10128 return iter.NextWithContext(context.Background())
10129 }
10130
10131
10132 func (iter OperationsDiscoveryCollectionIterator) NotDone() bool {
10133 return iter.page.NotDone() && iter.i < len(iter.page.Values())
10134 }
10135
10136
10137 func (iter OperationsDiscoveryCollectionIterator) Response() OperationsDiscoveryCollection {
10138 return iter.page.Response()
10139 }
10140
10141
10142
10143 func (iter OperationsDiscoveryCollectionIterator) Value() OperationsDiscovery {
10144 if !iter.page.NotDone() {
10145 return OperationsDiscovery{}
10146 }
10147 return iter.page.Values()[iter.i]
10148 }
10149
10150
10151 func NewOperationsDiscoveryCollectionIterator(page OperationsDiscoveryCollectionPage) OperationsDiscoveryCollectionIterator {
10152 return OperationsDiscoveryCollectionIterator{page: page}
10153 }
10154
10155
10156 func (odc OperationsDiscoveryCollection) IsEmpty() bool {
10157 return odc.Value == nil || len(*odc.Value) == 0
10158 }
10159
10160
10161 func (odc OperationsDiscoveryCollection) hasNextLink() bool {
10162 return odc.NextLink != nil && len(*odc.NextLink) != 0
10163 }
10164
10165
10166
10167 func (odc OperationsDiscoveryCollection) operationsDiscoveryCollectionPreparer(ctx context.Context) (*http.Request, error) {
10168 if !odc.hasNextLink() {
10169 return nil, nil
10170 }
10171 return autorest.Prepare((&http.Request{}).WithContext(ctx),
10172 autorest.AsJSON(),
10173 autorest.AsGet(),
10174 autorest.WithBaseURL(to.String(odc.NextLink)))
10175 }
10176
10177
10178 type OperationsDiscoveryCollectionPage struct {
10179 fn func(context.Context, OperationsDiscoveryCollection) (OperationsDiscoveryCollection, error)
10180 odc OperationsDiscoveryCollection
10181 }
10182
10183
10184
10185 func (page *OperationsDiscoveryCollectionPage) NextWithContext(ctx context.Context) (err error) {
10186 if tracing.IsEnabled() {
10187 ctx = tracing.StartSpan(ctx, fqdn+"/OperationsDiscoveryCollectionPage.NextWithContext")
10188 defer func() {
10189 sc := -1
10190 if page.Response().Response.Response != nil {
10191 sc = page.Response().Response.Response.StatusCode
10192 }
10193 tracing.EndSpan(ctx, sc, err)
10194 }()
10195 }
10196 for {
10197 next, err := page.fn(ctx, page.odc)
10198 if err != nil {
10199 return err
10200 }
10201 page.odc = next
10202 if !next.hasNextLink() || !next.IsEmpty() {
10203 break
10204 }
10205 }
10206 return nil
10207 }
10208
10209
10210
10211
10212 func (page *OperationsDiscoveryCollectionPage) Next() error {
10213 return page.NextWithContext(context.Background())
10214 }
10215
10216
10217 func (page OperationsDiscoveryCollectionPage) NotDone() bool {
10218 return !page.odc.IsEmpty()
10219 }
10220
10221
10222 func (page OperationsDiscoveryCollectionPage) Response() OperationsDiscoveryCollection {
10223 return page.odc
10224 }
10225
10226
10227 func (page OperationsDiscoveryCollectionPage) Values() []OperationsDiscovery {
10228 if page.odc.IsEmpty() {
10229 return nil
10230 }
10231 return *page.odc.Value
10232 }
10233
10234
10235 func NewOperationsDiscoveryCollectionPage(cur OperationsDiscoveryCollection, getNextPage func(context.Context, OperationsDiscoveryCollection) (OperationsDiscoveryCollection, error)) OperationsDiscoveryCollectionPage {
10236 return OperationsDiscoveryCollectionPage{
10237 fn: getNextPage,
10238 odc: cur,
10239 }
10240 }
10241
10242
10243 type OSDetails struct {
10244
10245 OsType *string `json:"osType,omitempty"`
10246
10247 ProductType *string `json:"productType,omitempty"`
10248
10249 OsEdition *string `json:"osEdition,omitempty"`
10250
10251 OSVersion *string `json:"oSVersion,omitempty"`
10252
10253 OSMajorVersion *string `json:"oSMajorVersion,omitempty"`
10254
10255 OSMinorVersion *string `json:"oSMinorVersion,omitempty"`
10256 }
10257
10258
10259 type OSDiskDetails struct {
10260
10261 OsVhdID *string `json:"osVhdId,omitempty"`
10262
10263 OsType *string `json:"osType,omitempty"`
10264
10265 VhdName *string `json:"vhdName,omitempty"`
10266 }
10267
10268
10269 type PlannedFailoverInput struct {
10270
10271 Properties *PlannedFailoverInputProperties `json:"properties,omitempty"`
10272 }
10273
10274
10275 type PlannedFailoverInputProperties struct {
10276
10277 FailoverDirection *string `json:"failoverDirection,omitempty"`
10278
10279 ProviderSpecificDetails BasicProviderSpecificFailoverInput `json:"providerSpecificDetails,omitempty"`
10280 }
10281
10282
10283 func (pfip *PlannedFailoverInputProperties) UnmarshalJSON(body []byte) error {
10284 var m map[string]*json.RawMessage
10285 err := json.Unmarshal(body, &m)
10286 if err != nil {
10287 return err
10288 }
10289 for k, v := range m {
10290 switch k {
10291 case "failoverDirection":
10292 if v != nil {
10293 var failoverDirection string
10294 err = json.Unmarshal(*v, &failoverDirection)
10295 if err != nil {
10296 return err
10297 }
10298 pfip.FailoverDirection = &failoverDirection
10299 }
10300 case "providerSpecificDetails":
10301 if v != nil {
10302 providerSpecificDetails, err := unmarshalBasicProviderSpecificFailoverInput(*v)
10303 if err != nil {
10304 return err
10305 }
10306 pfip.ProviderSpecificDetails = providerSpecificDetails
10307 }
10308 }
10309 }
10310
10311 return nil
10312 }
10313
10314
10315 type Policy struct {
10316 autorest.Response `json:"-"`
10317
10318 Properties *PolicyProperties `json:"properties,omitempty"`
10319
10320 ID *string `json:"id,omitempty"`
10321
10322 Name *string `json:"name,omitempty"`
10323
10324 Type *string `json:"type,omitempty"`
10325
10326 Location *string `json:"location,omitempty"`
10327 }
10328
10329
10330 func (p Policy) MarshalJSON() ([]byte, error) {
10331 objectMap := make(map[string]interface{})
10332 if p.Properties != nil {
10333 objectMap["properties"] = p.Properties
10334 }
10335 if p.Location != nil {
10336 objectMap["location"] = p.Location
10337 }
10338 return json.Marshal(objectMap)
10339 }
10340
10341
10342 type PolicyCollection struct {
10343 autorest.Response `json:"-"`
10344
10345 Value *[]Policy `json:"value,omitempty"`
10346
10347 NextLink *string `json:"nextLink,omitempty"`
10348 }
10349
10350
10351 type PolicyCollectionIterator struct {
10352 i int
10353 page PolicyCollectionPage
10354 }
10355
10356
10357
10358 func (iter *PolicyCollectionIterator) NextWithContext(ctx context.Context) (err error) {
10359 if tracing.IsEnabled() {
10360 ctx = tracing.StartSpan(ctx, fqdn+"/PolicyCollectionIterator.NextWithContext")
10361 defer func() {
10362 sc := -1
10363 if iter.Response().Response.Response != nil {
10364 sc = iter.Response().Response.Response.StatusCode
10365 }
10366 tracing.EndSpan(ctx, sc, err)
10367 }()
10368 }
10369 iter.i++
10370 if iter.i < len(iter.page.Values()) {
10371 return nil
10372 }
10373 err = iter.page.NextWithContext(ctx)
10374 if err != nil {
10375 iter.i--
10376 return err
10377 }
10378 iter.i = 0
10379 return nil
10380 }
10381
10382
10383
10384
10385 func (iter *PolicyCollectionIterator) Next() error {
10386 return iter.NextWithContext(context.Background())
10387 }
10388
10389
10390 func (iter PolicyCollectionIterator) NotDone() bool {
10391 return iter.page.NotDone() && iter.i < len(iter.page.Values())
10392 }
10393
10394
10395 func (iter PolicyCollectionIterator) Response() PolicyCollection {
10396 return iter.page.Response()
10397 }
10398
10399
10400
10401 func (iter PolicyCollectionIterator) Value() Policy {
10402 if !iter.page.NotDone() {
10403 return Policy{}
10404 }
10405 return iter.page.Values()[iter.i]
10406 }
10407
10408
10409 func NewPolicyCollectionIterator(page PolicyCollectionPage) PolicyCollectionIterator {
10410 return PolicyCollectionIterator{page: page}
10411 }
10412
10413
10414 func (pc PolicyCollection) IsEmpty() bool {
10415 return pc.Value == nil || len(*pc.Value) == 0
10416 }
10417
10418
10419 func (pc PolicyCollection) hasNextLink() bool {
10420 return pc.NextLink != nil && len(*pc.NextLink) != 0
10421 }
10422
10423
10424
10425 func (pc PolicyCollection) policyCollectionPreparer(ctx context.Context) (*http.Request, error) {
10426 if !pc.hasNextLink() {
10427 return nil, nil
10428 }
10429 return autorest.Prepare((&http.Request{}).WithContext(ctx),
10430 autorest.AsJSON(),
10431 autorest.AsGet(),
10432 autorest.WithBaseURL(to.String(pc.NextLink)))
10433 }
10434
10435
10436 type PolicyCollectionPage struct {
10437 fn func(context.Context, PolicyCollection) (PolicyCollection, error)
10438 pc PolicyCollection
10439 }
10440
10441
10442
10443 func (page *PolicyCollectionPage) NextWithContext(ctx context.Context) (err error) {
10444 if tracing.IsEnabled() {
10445 ctx = tracing.StartSpan(ctx, fqdn+"/PolicyCollectionPage.NextWithContext")
10446 defer func() {
10447 sc := -1
10448 if page.Response().Response.Response != nil {
10449 sc = page.Response().Response.Response.StatusCode
10450 }
10451 tracing.EndSpan(ctx, sc, err)
10452 }()
10453 }
10454 for {
10455 next, err := page.fn(ctx, page.pc)
10456 if err != nil {
10457 return err
10458 }
10459 page.pc = next
10460 if !next.hasNextLink() || !next.IsEmpty() {
10461 break
10462 }
10463 }
10464 return nil
10465 }
10466
10467
10468
10469
10470 func (page *PolicyCollectionPage) Next() error {
10471 return page.NextWithContext(context.Background())
10472 }
10473
10474
10475 func (page PolicyCollectionPage) NotDone() bool {
10476 return !page.pc.IsEmpty()
10477 }
10478
10479
10480 func (page PolicyCollectionPage) Response() PolicyCollection {
10481 return page.pc
10482 }
10483
10484
10485 func (page PolicyCollectionPage) Values() []Policy {
10486 if page.pc.IsEmpty() {
10487 return nil
10488 }
10489 return *page.pc.Value
10490 }
10491
10492
10493 func NewPolicyCollectionPage(cur PolicyCollection, getNextPage func(context.Context, PolicyCollection) (PolicyCollection, error)) PolicyCollectionPage {
10494 return PolicyCollectionPage{
10495 fn: getNextPage,
10496 pc: cur,
10497 }
10498 }
10499
10500
10501 type PolicyProperties struct {
10502
10503 FriendlyName *string `json:"friendlyName,omitempty"`
10504
10505 ProviderSpecificDetails BasicPolicyProviderSpecificDetails `json:"providerSpecificDetails,omitempty"`
10506 }
10507
10508
10509 func (pp *PolicyProperties) UnmarshalJSON(body []byte) error {
10510 var m map[string]*json.RawMessage
10511 err := json.Unmarshal(body, &m)
10512 if err != nil {
10513 return err
10514 }
10515 for k, v := range m {
10516 switch k {
10517 case "friendlyName":
10518 if v != nil {
10519 var friendlyName string
10520 err = json.Unmarshal(*v, &friendlyName)
10521 if err != nil {
10522 return err
10523 }
10524 pp.FriendlyName = &friendlyName
10525 }
10526 case "providerSpecificDetails":
10527 if v != nil {
10528 providerSpecificDetails, err := unmarshalBasicPolicyProviderSpecificDetails(*v)
10529 if err != nil {
10530 return err
10531 }
10532 pp.ProviderSpecificDetails = providerSpecificDetails
10533 }
10534 }
10535 }
10536
10537 return nil
10538 }
10539
10540
10541 type BasicPolicyProviderSpecificDetails interface {
10542 AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool)
10543 AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool)
10544 AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool)
10545 AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool)
10546 AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool)
10547 AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool)
10548 AsInMagePolicyDetails() (*InMagePolicyDetails, bool)
10549 AsA2APolicyDetails() (*A2APolicyDetails, bool)
10550 AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool)
10551 AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool)
10552 AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool)
10553 }
10554
10555
10556 type PolicyProviderSpecificDetails struct {
10557
10558 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"`
10559 }
10560
10561 func unmarshalBasicPolicyProviderSpecificDetails(body []byte) (BasicPolicyProviderSpecificDetails, error) {
10562 var m map[string]interface{}
10563 err := json.Unmarshal(body, &m)
10564 if err != nil {
10565 return nil, err
10566 }
10567
10568 switch m["instanceType"] {
10569 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure):
10570 var hvrapd HyperVReplicaAzurePolicyDetails
10571 err := json.Unmarshal(body, &hvrapd)
10572 return hvrapd, err
10573 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails):
10574 var hvrbpd HyperVReplicaBasePolicyDetails
10575 err := json.Unmarshal(body, &hvrbpd)
10576 return hvrbpd, err
10577 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012):
10578 var hvrpd HyperVReplicaPolicyDetails
10579 err := json.Unmarshal(body, &hvrpd)
10580 return hvrpd, err
10581 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2):
10582 var hvrbpd HyperVReplicaBluePolicyDetails
10583 err := json.Unmarshal(body, &hvrbpd)
10584 return hvrbpd, err
10585 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails):
10586 var imbpd InMageBasePolicyDetails
10587 err := json.Unmarshal(body, &imbpd)
10588 return imbpd, err
10589 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2):
10590 var imavpd InMageAzureV2PolicyDetails
10591 err := json.Unmarshal(body, &imavpd)
10592 return imavpd, err
10593 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage):
10594 var impd InMagePolicyDetails
10595 err := json.Unmarshal(body, &impd)
10596 return impd, err
10597 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A):
10598 var apd A2APolicyDetails
10599 err := json.Unmarshal(body, &apd)
10600 return apd, err
10601 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration):
10602 var rampd RcmAzureMigrationPolicyDetails
10603 err := json.Unmarshal(body, &rampd)
10604 return rampd, err
10605 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt):
10606 var vcpd VmwareCbtPolicyDetails
10607 err := json.Unmarshal(body, &vcpd)
10608 return vcpd, err
10609 default:
10610 var ppsd PolicyProviderSpecificDetails
10611 err := json.Unmarshal(body, &ppsd)
10612 return ppsd, err
10613 }
10614 }
10615 func unmarshalBasicPolicyProviderSpecificDetailsArray(body []byte) ([]BasicPolicyProviderSpecificDetails, error) {
10616 var rawMessages []*json.RawMessage
10617 err := json.Unmarshal(body, &rawMessages)
10618 if err != nil {
10619 return nil, err
10620 }
10621
10622 ppsdArray := make([]BasicPolicyProviderSpecificDetails, len(rawMessages))
10623
10624 for index, rawMessage := range rawMessages {
10625 ppsd, err := unmarshalBasicPolicyProviderSpecificDetails(*rawMessage)
10626 if err != nil {
10627 return nil, err
10628 }
10629 ppsdArray[index] = ppsd
10630 }
10631 return ppsdArray, nil
10632 }
10633
10634
10635 func (ppsd PolicyProviderSpecificDetails) MarshalJSON() ([]byte, error) {
10636 ppsd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypePolicyProviderSpecificDetails
10637 objectMap := make(map[string]interface{})
10638 if ppsd.InstanceType != "" {
10639 objectMap["instanceType"] = ppsd.InstanceType
10640 }
10641 return json.Marshal(objectMap)
10642 }
10643
10644
10645 func (ppsd PolicyProviderSpecificDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) {
10646 return nil, false
10647 }
10648
10649
10650 func (ppsd PolicyProviderSpecificDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) {
10651 return nil, false
10652 }
10653
10654
10655 func (ppsd PolicyProviderSpecificDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) {
10656 return nil, false
10657 }
10658
10659
10660 func (ppsd PolicyProviderSpecificDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) {
10661 return nil, false
10662 }
10663
10664
10665 func (ppsd PolicyProviderSpecificDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) {
10666 return nil, false
10667 }
10668
10669
10670 func (ppsd PolicyProviderSpecificDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) {
10671 return nil, false
10672 }
10673
10674
10675 func (ppsd PolicyProviderSpecificDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) {
10676 return nil, false
10677 }
10678
10679
10680 func (ppsd PolicyProviderSpecificDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) {
10681 return nil, false
10682 }
10683
10684
10685 func (ppsd PolicyProviderSpecificDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) {
10686 return nil, false
10687 }
10688
10689
10690 func (ppsd PolicyProviderSpecificDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) {
10691 return nil, false
10692 }
10693
10694
10695 func (ppsd PolicyProviderSpecificDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) {
10696 return &ppsd, true
10697 }
10698
10699
10700 func (ppsd PolicyProviderSpecificDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) {
10701 return &ppsd, true
10702 }
10703
10704
10705 type BasicPolicyProviderSpecificInput interface {
10706 AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool)
10707 AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool)
10708 AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool)
10709 AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool)
10710 AsInMagePolicyInput() (*InMagePolicyInput, bool)
10711 AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool)
10712 AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool)
10713 AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool)
10714 }
10715
10716
10717 type PolicyProviderSpecificInput struct {
10718
10719 InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"`
10720 }
10721
10722 func unmarshalBasicPolicyProviderSpecificInput(body []byte) (BasicPolicyProviderSpecificInput, error) {
10723 var m map[string]interface{}
10724 err := json.Unmarshal(body, &m)
10725 if err != nil {
10726 return nil, err
10727 }
10728
10729 switch m["instanceType"] {
10730 case string(InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplicaAzure):
10731 var hvrapi HyperVReplicaAzurePolicyInput
10732 err := json.Unmarshal(body, &hvrapi)
10733 return hvrapi, err
10734 case string(InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012):
10735 var hvrpi HyperVReplicaPolicyInput
10736 err := json.Unmarshal(body, &hvrpi)
10737 return hvrpi, err
10738 case string(InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012R2):
10739 var hvrbpi HyperVReplicaBluePolicyInput
10740 err := json.Unmarshal(body, &hvrbpi)
10741 return hvrbpi, err
10742 case string(InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMageAzureV2):
10743 var imavpi InMageAzureV2PolicyInput
10744 err := json.Unmarshal(body, &imavpi)
10745 return imavpi, err
10746 case string(InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMage):
10747 var impi InMagePolicyInput
10748 err := json.Unmarshal(body, &impi)
10749 return impi, err
10750 case string(InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeA2A):
10751 var apci A2APolicyCreationInput
10752 err := json.Unmarshal(body, &apci)
10753 return apci, err
10754 case string(InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeVMwareCbt):
10755 var vmcpci VMwareCbtPolicyCreationInput
10756 err := json.Unmarshal(body, &vmcpci)
10757 return vmcpci, err
10758 default:
10759 var ppsi PolicyProviderSpecificInput
10760 err := json.Unmarshal(body, &ppsi)
10761 return ppsi, err
10762 }
10763 }
10764 func unmarshalBasicPolicyProviderSpecificInputArray(body []byte) ([]BasicPolicyProviderSpecificInput, error) {
10765 var rawMessages []*json.RawMessage
10766 err := json.Unmarshal(body, &rawMessages)
10767 if err != nil {
10768 return nil, err
10769 }
10770
10771 ppsiArray := make([]BasicPolicyProviderSpecificInput, len(rawMessages))
10772
10773 for index, rawMessage := range rawMessages {
10774 ppsi, err := unmarshalBasicPolicyProviderSpecificInput(*rawMessage)
10775 if err != nil {
10776 return nil, err
10777 }
10778 ppsiArray[index] = ppsi
10779 }
10780 return ppsiArray, nil
10781 }
10782
10783
10784 func (ppsi PolicyProviderSpecificInput) MarshalJSON() ([]byte, error) {
10785 ppsi.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypePolicyProviderSpecificInput
10786 objectMap := make(map[string]interface{})
10787 if ppsi.InstanceType != "" {
10788 objectMap["instanceType"] = ppsi.InstanceType
10789 }
10790 return json.Marshal(objectMap)
10791 }
10792
10793
10794 func (ppsi PolicyProviderSpecificInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) {
10795 return nil, false
10796 }
10797
10798
10799 func (ppsi PolicyProviderSpecificInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) {
10800 return nil, false
10801 }
10802
10803
10804 func (ppsi PolicyProviderSpecificInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) {
10805 return nil, false
10806 }
10807
10808
10809 func (ppsi PolicyProviderSpecificInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) {
10810 return nil, false
10811 }
10812
10813
10814 func (ppsi PolicyProviderSpecificInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) {
10815 return nil, false
10816 }
10817
10818
10819 func (ppsi PolicyProviderSpecificInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) {
10820 return nil, false
10821 }
10822
10823
10824 func (ppsi PolicyProviderSpecificInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) {
10825 return nil, false
10826 }
10827
10828
10829 func (ppsi PolicyProviderSpecificInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) {
10830 return &ppsi, true
10831 }
10832
10833
10834 func (ppsi PolicyProviderSpecificInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) {
10835 return &ppsi, true
10836 }
10837
10838
10839 type ProcessServer struct {
10840
10841 FriendlyName *string `json:"friendlyName,omitempty"`
10842
10843 ID *string `json:"id,omitempty"`
10844
10845 IPAddress *string `json:"ipAddress,omitempty"`
10846
10847 OsType *string `json:"osType,omitempty"`
10848
10849 AgentVersion *string `json:"agentVersion,omitempty"`
10850
10851 LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"`
10852
10853 VersionStatus *string `json:"versionStatus,omitempty"`
10854
10855 MobilityServiceUpdates *[]MobilityServiceUpdate `json:"mobilityServiceUpdates,omitempty"`
10856
10857 HostID *string `json:"hostId,omitempty"`
10858
10859 MachineCount *string `json:"machineCount,omitempty"`
10860
10861 ReplicationPairCount *string `json:"replicationPairCount,omitempty"`
10862
10863 SystemLoad *string `json:"systemLoad,omitempty"`
10864
10865 SystemLoadStatus *string `json:"systemLoadStatus,omitempty"`
10866
10867 CPULoad *string `json:"cpuLoad,omitempty"`
10868
10869 CPULoadStatus *string `json:"cpuLoadStatus,omitempty"`
10870
10871 TotalMemoryInBytes *int64 `json:"totalMemoryInBytes,omitempty"`
10872
10873 AvailableMemoryInBytes *int64 `json:"availableMemoryInBytes,omitempty"`
10874
10875 MemoryUsageStatus *string `json:"memoryUsageStatus,omitempty"`
10876
10877 TotalSpaceInBytes *int64 `json:"totalSpaceInBytes,omitempty"`
10878
10879 AvailableSpaceInBytes *int64 `json:"availableSpaceInBytes,omitempty"`
10880
10881 SpaceUsageStatus *string `json:"spaceUsageStatus,omitempty"`
10882
10883 PsServiceStatus *string `json:"psServiceStatus,omitempty"`
10884
10885 SslCertExpiryDate *date.Time `json:"sslCertExpiryDate,omitempty"`
10886
10887 SslCertExpiryRemainingDays *int32 `json:"sslCertExpiryRemainingDays,omitempty"`
10888
10889 OsVersion *string `json:"osVersion,omitempty"`
10890 }
10891
10892
10893 type ProtectableItem struct {
10894 autorest.Response `json:"-"`
10895
10896 Properties *ProtectableItemProperties `json:"properties,omitempty"`
10897
10898 ID *string `json:"id,omitempty"`
10899
10900 Name *string `json:"name,omitempty"`
10901
10902 Type *string `json:"type,omitempty"`
10903
10904 Location *string `json:"location,omitempty"`
10905 }
10906
10907
10908 func (pi ProtectableItem) MarshalJSON() ([]byte, error) {
10909 objectMap := make(map[string]interface{})
10910 if pi.Properties != nil {
10911 objectMap["properties"] = pi.Properties
10912 }
10913 if pi.Location != nil {
10914 objectMap["location"] = pi.Location
10915 }
10916 return json.Marshal(objectMap)
10917 }
10918
10919
10920 type ProtectableItemCollection struct {
10921 autorest.Response `json:"-"`
10922
10923 Value *[]ProtectableItem `json:"value,omitempty"`
10924
10925 NextLink *string `json:"nextLink,omitempty"`
10926 }
10927
10928
10929 type ProtectableItemCollectionIterator struct {
10930 i int
10931 page ProtectableItemCollectionPage
10932 }
10933
10934
10935
10936 func (iter *ProtectableItemCollectionIterator) NextWithContext(ctx context.Context) (err error) {
10937 if tracing.IsEnabled() {
10938 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableItemCollectionIterator.NextWithContext")
10939 defer func() {
10940 sc := -1
10941 if iter.Response().Response.Response != nil {
10942 sc = iter.Response().Response.Response.StatusCode
10943 }
10944 tracing.EndSpan(ctx, sc, err)
10945 }()
10946 }
10947 iter.i++
10948 if iter.i < len(iter.page.Values()) {
10949 return nil
10950 }
10951 err = iter.page.NextWithContext(ctx)
10952 if err != nil {
10953 iter.i--
10954 return err
10955 }
10956 iter.i = 0
10957 return nil
10958 }
10959
10960
10961
10962
10963 func (iter *ProtectableItemCollectionIterator) Next() error {
10964 return iter.NextWithContext(context.Background())
10965 }
10966
10967
10968 func (iter ProtectableItemCollectionIterator) NotDone() bool {
10969 return iter.page.NotDone() && iter.i < len(iter.page.Values())
10970 }
10971
10972
10973 func (iter ProtectableItemCollectionIterator) Response() ProtectableItemCollection {
10974 return iter.page.Response()
10975 }
10976
10977
10978
10979 func (iter ProtectableItemCollectionIterator) Value() ProtectableItem {
10980 if !iter.page.NotDone() {
10981 return ProtectableItem{}
10982 }
10983 return iter.page.Values()[iter.i]
10984 }
10985
10986
10987 func NewProtectableItemCollectionIterator(page ProtectableItemCollectionPage) ProtectableItemCollectionIterator {
10988 return ProtectableItemCollectionIterator{page: page}
10989 }
10990
10991
10992 func (pic ProtectableItemCollection) IsEmpty() bool {
10993 return pic.Value == nil || len(*pic.Value) == 0
10994 }
10995
10996
10997 func (pic ProtectableItemCollection) hasNextLink() bool {
10998 return pic.NextLink != nil && len(*pic.NextLink) != 0
10999 }
11000
11001
11002
11003 func (pic ProtectableItemCollection) protectableItemCollectionPreparer(ctx context.Context) (*http.Request, error) {
11004 if !pic.hasNextLink() {
11005 return nil, nil
11006 }
11007 return autorest.Prepare((&http.Request{}).WithContext(ctx),
11008 autorest.AsJSON(),
11009 autorest.AsGet(),
11010 autorest.WithBaseURL(to.String(pic.NextLink)))
11011 }
11012
11013
11014 type ProtectableItemCollectionPage struct {
11015 fn func(context.Context, ProtectableItemCollection) (ProtectableItemCollection, error)
11016 pic ProtectableItemCollection
11017 }
11018
11019
11020
11021 func (page *ProtectableItemCollectionPage) NextWithContext(ctx context.Context) (err error) {
11022 if tracing.IsEnabled() {
11023 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableItemCollectionPage.NextWithContext")
11024 defer func() {
11025 sc := -1
11026 if page.Response().Response.Response != nil {
11027 sc = page.Response().Response.Response.StatusCode
11028 }
11029 tracing.EndSpan(ctx, sc, err)
11030 }()
11031 }
11032 for {
11033 next, err := page.fn(ctx, page.pic)
11034 if err != nil {
11035 return err
11036 }
11037 page.pic = next
11038 if !next.hasNextLink() || !next.IsEmpty() {
11039 break
11040 }
11041 }
11042 return nil
11043 }
11044
11045
11046
11047
11048 func (page *ProtectableItemCollectionPage) Next() error {
11049 return page.NextWithContext(context.Background())
11050 }
11051
11052
11053 func (page ProtectableItemCollectionPage) NotDone() bool {
11054 return !page.pic.IsEmpty()
11055 }
11056
11057
11058 func (page ProtectableItemCollectionPage) Response() ProtectableItemCollection {
11059 return page.pic
11060 }
11061
11062
11063 func (page ProtectableItemCollectionPage) Values() []ProtectableItem {
11064 if page.pic.IsEmpty() {
11065 return nil
11066 }
11067 return *page.pic.Value
11068 }
11069
11070
11071 func NewProtectableItemCollectionPage(cur ProtectableItemCollection, getNextPage func(context.Context, ProtectableItemCollection) (ProtectableItemCollection, error)) ProtectableItemCollectionPage {
11072 return ProtectableItemCollectionPage{
11073 fn: getNextPage,
11074 pic: cur,
11075 }
11076 }
11077
11078
11079 type ProtectableItemProperties struct {
11080
11081 FriendlyName *string `json:"friendlyName,omitempty"`
11082
11083 ProtectionStatus *string `json:"protectionStatus,omitempty"`
11084
11085 ReplicationProtectedItemID *string `json:"replicationProtectedItemId,omitempty"`
11086
11087 RecoveryServicesProviderID *string `json:"recoveryServicesProviderId,omitempty"`
11088
11089 ProtectionReadinessErrors *[]string `json:"protectionReadinessErrors,omitempty"`
11090
11091 SupportedReplicationProviders *[]string `json:"supportedReplicationProviders,omitempty"`
11092
11093 CustomDetails BasicConfigurationSettings `json:"customDetails,omitempty"`
11094 }
11095
11096
11097 func (pip *ProtectableItemProperties) UnmarshalJSON(body []byte) error {
11098 var m map[string]*json.RawMessage
11099 err := json.Unmarshal(body, &m)
11100 if err != nil {
11101 return err
11102 }
11103 for k, v := range m {
11104 switch k {
11105 case "friendlyName":
11106 if v != nil {
11107 var friendlyName string
11108 err = json.Unmarshal(*v, &friendlyName)
11109 if err != nil {
11110 return err
11111 }
11112 pip.FriendlyName = &friendlyName
11113 }
11114 case "protectionStatus":
11115 if v != nil {
11116 var protectionStatus string
11117 err = json.Unmarshal(*v, &protectionStatus)
11118 if err != nil {
11119 return err
11120 }
11121 pip.ProtectionStatus = &protectionStatus
11122 }
11123 case "replicationProtectedItemId":
11124 if v != nil {
11125 var replicationProtectedItemID string
11126 err = json.Unmarshal(*v, &replicationProtectedItemID)
11127 if err != nil {
11128 return err
11129 }
11130 pip.ReplicationProtectedItemID = &replicationProtectedItemID
11131 }
11132 case "recoveryServicesProviderId":
11133 if v != nil {
11134 var recoveryServicesProviderID string
11135 err = json.Unmarshal(*v, &recoveryServicesProviderID)
11136 if err != nil {
11137 return err
11138 }
11139 pip.RecoveryServicesProviderID = &recoveryServicesProviderID
11140 }
11141 case "protectionReadinessErrors":
11142 if v != nil {
11143 var protectionReadinessErrors []string
11144 err = json.Unmarshal(*v, &protectionReadinessErrors)
11145 if err != nil {
11146 return err
11147 }
11148 pip.ProtectionReadinessErrors = &protectionReadinessErrors
11149 }
11150 case "supportedReplicationProviders":
11151 if v != nil {
11152 var supportedReplicationProviders []string
11153 err = json.Unmarshal(*v, &supportedReplicationProviders)
11154 if err != nil {
11155 return err
11156 }
11157 pip.SupportedReplicationProviders = &supportedReplicationProviders
11158 }
11159 case "customDetails":
11160 if v != nil {
11161 customDetails, err := unmarshalBasicConfigurationSettings(*v)
11162 if err != nil {
11163 return err
11164 }
11165 pip.CustomDetails = customDetails
11166 }
11167 }
11168 }
11169
11170 return nil
11171 }
11172
11173
11174 type ProtectedItemsQueryParameter struct {
11175
11176 SourceFabricName *string `json:"sourceFabricName,omitempty"`
11177
11178 RecoveryPlanName *string `json:"recoveryPlanName,omitempty"`
11179
11180 VCenterName *string `json:"vCenterName,omitempty"`
11181 }
11182
11183
11184 type ProtectionContainer struct {
11185 autorest.Response `json:"-"`
11186
11187 Properties *ProtectionContainerProperties `json:"properties,omitempty"`
11188
11189 ID *string `json:"id,omitempty"`
11190
11191 Name *string `json:"name,omitempty"`
11192
11193 Type *string `json:"type,omitempty"`
11194
11195 Location *string `json:"location,omitempty"`
11196 }
11197
11198
11199 func (pc ProtectionContainer) MarshalJSON() ([]byte, error) {
11200 objectMap := make(map[string]interface{})
11201 if pc.Properties != nil {
11202 objectMap["properties"] = pc.Properties
11203 }
11204 if pc.Location != nil {
11205 objectMap["location"] = pc.Location
11206 }
11207 return json.Marshal(objectMap)
11208 }
11209
11210
11211 type ProtectionContainerCollection struct {
11212 autorest.Response `json:"-"`
11213
11214 Value *[]ProtectionContainer `json:"value,omitempty"`
11215
11216 NextLink *string `json:"nextLink,omitempty"`
11217 }
11218
11219
11220
11221 type ProtectionContainerCollectionIterator struct {
11222 i int
11223 page ProtectionContainerCollectionPage
11224 }
11225
11226
11227
11228 func (iter *ProtectionContainerCollectionIterator) NextWithContext(ctx context.Context) (err error) {
11229 if tracing.IsEnabled() {
11230 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerCollectionIterator.NextWithContext")
11231 defer func() {
11232 sc := -1
11233 if iter.Response().Response.Response != nil {
11234 sc = iter.Response().Response.Response.StatusCode
11235 }
11236 tracing.EndSpan(ctx, sc, err)
11237 }()
11238 }
11239 iter.i++
11240 if iter.i < len(iter.page.Values()) {
11241 return nil
11242 }
11243 err = iter.page.NextWithContext(ctx)
11244 if err != nil {
11245 iter.i--
11246 return err
11247 }
11248 iter.i = 0
11249 return nil
11250 }
11251
11252
11253
11254
11255 func (iter *ProtectionContainerCollectionIterator) Next() error {
11256 return iter.NextWithContext(context.Background())
11257 }
11258
11259
11260 func (iter ProtectionContainerCollectionIterator) NotDone() bool {
11261 return iter.page.NotDone() && iter.i < len(iter.page.Values())
11262 }
11263
11264
11265 func (iter ProtectionContainerCollectionIterator) Response() ProtectionContainerCollection {
11266 return iter.page.Response()
11267 }
11268
11269
11270
11271 func (iter ProtectionContainerCollectionIterator) Value() ProtectionContainer {
11272 if !iter.page.NotDone() {
11273 return ProtectionContainer{}
11274 }
11275 return iter.page.Values()[iter.i]
11276 }
11277
11278
11279 func NewProtectionContainerCollectionIterator(page ProtectionContainerCollectionPage) ProtectionContainerCollectionIterator {
11280 return ProtectionContainerCollectionIterator{page: page}
11281 }
11282
11283
11284 func (pcc ProtectionContainerCollection) IsEmpty() bool {
11285 return pcc.Value == nil || len(*pcc.Value) == 0
11286 }
11287
11288
11289 func (pcc ProtectionContainerCollection) hasNextLink() bool {
11290 return pcc.NextLink != nil && len(*pcc.NextLink) != 0
11291 }
11292
11293
11294
11295 func (pcc ProtectionContainerCollection) protectionContainerCollectionPreparer(ctx context.Context) (*http.Request, error) {
11296 if !pcc.hasNextLink() {
11297 return nil, nil
11298 }
11299 return autorest.Prepare((&http.Request{}).WithContext(ctx),
11300 autorest.AsJSON(),
11301 autorest.AsGet(),
11302 autorest.WithBaseURL(to.String(pcc.NextLink)))
11303 }
11304
11305
11306 type ProtectionContainerCollectionPage struct {
11307 fn func(context.Context, ProtectionContainerCollection) (ProtectionContainerCollection, error)
11308 pcc ProtectionContainerCollection
11309 }
11310
11311
11312
11313 func (page *ProtectionContainerCollectionPage) NextWithContext(ctx context.Context) (err error) {
11314 if tracing.IsEnabled() {
11315 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerCollectionPage.NextWithContext")
11316 defer func() {
11317 sc := -1
11318 if page.Response().Response.Response != nil {
11319 sc = page.Response().Response.Response.StatusCode
11320 }
11321 tracing.EndSpan(ctx, sc, err)
11322 }()
11323 }
11324 for {
11325 next, err := page.fn(ctx, page.pcc)
11326 if err != nil {
11327 return err
11328 }
11329 page.pcc = next
11330 if !next.hasNextLink() || !next.IsEmpty() {
11331 break
11332 }
11333 }
11334 return nil
11335 }
11336
11337
11338
11339
11340 func (page *ProtectionContainerCollectionPage) Next() error {
11341 return page.NextWithContext(context.Background())
11342 }
11343
11344
11345 func (page ProtectionContainerCollectionPage) NotDone() bool {
11346 return !page.pcc.IsEmpty()
11347 }
11348
11349
11350 func (page ProtectionContainerCollectionPage) Response() ProtectionContainerCollection {
11351 return page.pcc
11352 }
11353
11354
11355 func (page ProtectionContainerCollectionPage) Values() []ProtectionContainer {
11356 if page.pcc.IsEmpty() {
11357 return nil
11358 }
11359 return *page.pcc.Value
11360 }
11361
11362
11363 func NewProtectionContainerCollectionPage(cur ProtectionContainerCollection, getNextPage func(context.Context, ProtectionContainerCollection) (ProtectionContainerCollection, error)) ProtectionContainerCollectionPage {
11364 return ProtectionContainerCollectionPage{
11365 fn: getNextPage,
11366 pcc: cur,
11367 }
11368 }
11369
11370
11371 type ProtectionContainerFabricSpecificDetails struct {
11372
11373 InstanceType *string `json:"instanceType,omitempty"`
11374 }
11375
11376
11377 func (pcfsd ProtectionContainerFabricSpecificDetails) MarshalJSON() ([]byte, error) {
11378 objectMap := make(map[string]interface{})
11379 return json.Marshal(objectMap)
11380 }
11381
11382
11383 type ProtectionContainerMapping struct {
11384 autorest.Response `json:"-"`
11385
11386 Properties *ProtectionContainerMappingProperties `json:"properties,omitempty"`
11387
11388 ID *string `json:"id,omitempty"`
11389
11390 Name *string `json:"name,omitempty"`
11391
11392 Type *string `json:"type,omitempty"`
11393
11394 Location *string `json:"location,omitempty"`
11395 }
11396
11397
11398 func (pcm ProtectionContainerMapping) MarshalJSON() ([]byte, error) {
11399 objectMap := make(map[string]interface{})
11400 if pcm.Properties != nil {
11401 objectMap["properties"] = pcm.Properties
11402 }
11403 if pcm.Location != nil {
11404 objectMap["location"] = pcm.Location
11405 }
11406 return json.Marshal(objectMap)
11407 }
11408
11409
11410 type ProtectionContainerMappingCollection struct {
11411 autorest.Response `json:"-"`
11412
11413 Value *[]ProtectionContainerMapping `json:"value,omitempty"`
11414
11415 NextLink *string `json:"nextLink,omitempty"`
11416 }
11417
11418
11419
11420 type ProtectionContainerMappingCollectionIterator struct {
11421 i int
11422 page ProtectionContainerMappingCollectionPage
11423 }
11424
11425
11426
11427 func (iter *ProtectionContainerMappingCollectionIterator) NextWithContext(ctx context.Context) (err error) {
11428 if tracing.IsEnabled() {
11429 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerMappingCollectionIterator.NextWithContext")
11430 defer func() {
11431 sc := -1
11432 if iter.Response().Response.Response != nil {
11433 sc = iter.Response().Response.Response.StatusCode
11434 }
11435 tracing.EndSpan(ctx, sc, err)
11436 }()
11437 }
11438 iter.i++
11439 if iter.i < len(iter.page.Values()) {
11440 return nil
11441 }
11442 err = iter.page.NextWithContext(ctx)
11443 if err != nil {
11444 iter.i--
11445 return err
11446 }
11447 iter.i = 0
11448 return nil
11449 }
11450
11451
11452
11453
11454 func (iter *ProtectionContainerMappingCollectionIterator) Next() error {
11455 return iter.NextWithContext(context.Background())
11456 }
11457
11458
11459 func (iter ProtectionContainerMappingCollectionIterator) NotDone() bool {
11460 return iter.page.NotDone() && iter.i < len(iter.page.Values())
11461 }
11462
11463
11464 func (iter ProtectionContainerMappingCollectionIterator) Response() ProtectionContainerMappingCollection {
11465 return iter.page.Response()
11466 }
11467
11468
11469
11470 func (iter ProtectionContainerMappingCollectionIterator) Value() ProtectionContainerMapping {
11471 if !iter.page.NotDone() {
11472 return ProtectionContainerMapping{}
11473 }
11474 return iter.page.Values()[iter.i]
11475 }
11476
11477
11478 func NewProtectionContainerMappingCollectionIterator(page ProtectionContainerMappingCollectionPage) ProtectionContainerMappingCollectionIterator {
11479 return ProtectionContainerMappingCollectionIterator{page: page}
11480 }
11481
11482
11483 func (pcmc ProtectionContainerMappingCollection) IsEmpty() bool {
11484 return pcmc.Value == nil || len(*pcmc.Value) == 0
11485 }
11486
11487
11488 func (pcmc ProtectionContainerMappingCollection) hasNextLink() bool {
11489 return pcmc.NextLink != nil && len(*pcmc.NextLink) != 0
11490 }
11491
11492
11493
11494 func (pcmc ProtectionContainerMappingCollection) protectionContainerMappingCollectionPreparer(ctx context.Context) (*http.Request, error) {
11495 if !pcmc.hasNextLink() {
11496 return nil, nil
11497 }
11498 return autorest.Prepare((&http.Request{}).WithContext(ctx),
11499 autorest.AsJSON(),
11500 autorest.AsGet(),
11501 autorest.WithBaseURL(to.String(pcmc.NextLink)))
11502 }
11503
11504
11505 type ProtectionContainerMappingCollectionPage struct {
11506 fn func(context.Context, ProtectionContainerMappingCollection) (ProtectionContainerMappingCollection, error)
11507 pcmc ProtectionContainerMappingCollection
11508 }
11509
11510
11511
11512 func (page *ProtectionContainerMappingCollectionPage) NextWithContext(ctx context.Context) (err error) {
11513 if tracing.IsEnabled() {
11514 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerMappingCollectionPage.NextWithContext")
11515 defer func() {
11516 sc := -1
11517 if page.Response().Response.Response != nil {
11518 sc = page.Response().Response.Response.StatusCode
11519 }
11520 tracing.EndSpan(ctx, sc, err)
11521 }()
11522 }
11523 for {
11524 next, err := page.fn(ctx, page.pcmc)
11525 if err != nil {
11526 return err
11527 }
11528 page.pcmc = next
11529 if !next.hasNextLink() || !next.IsEmpty() {
11530 break
11531 }
11532 }
11533 return nil
11534 }
11535
11536
11537
11538
11539 func (page *ProtectionContainerMappingCollectionPage) Next() error {
11540 return page.NextWithContext(context.Background())
11541 }
11542
11543
11544 func (page ProtectionContainerMappingCollectionPage) NotDone() bool {
11545 return !page.pcmc.IsEmpty()
11546 }
11547
11548
11549 func (page ProtectionContainerMappingCollectionPage) Response() ProtectionContainerMappingCollection {
11550 return page.pcmc
11551 }
11552
11553
11554 func (page ProtectionContainerMappingCollectionPage) Values() []ProtectionContainerMapping {
11555 if page.pcmc.IsEmpty() {
11556 return nil
11557 }
11558 return *page.pcmc.Value
11559 }
11560
11561
11562 func NewProtectionContainerMappingCollectionPage(cur ProtectionContainerMappingCollection, getNextPage func(context.Context, ProtectionContainerMappingCollection) (ProtectionContainerMappingCollection, error)) ProtectionContainerMappingCollectionPage {
11563 return ProtectionContainerMappingCollectionPage{
11564 fn: getNextPage,
11565 pcmc: cur,
11566 }
11567 }
11568
11569
11570 type ProtectionContainerMappingProperties struct {
11571
11572 TargetProtectionContainerID *string `json:"targetProtectionContainerId,omitempty"`
11573
11574 TargetProtectionContainerFriendlyName *string `json:"targetProtectionContainerFriendlyName,omitempty"`
11575
11576 ProviderSpecificDetails *ProtectionContainerMappingProviderSpecificDetails `json:"providerSpecificDetails,omitempty"`
11577
11578 Health *string `json:"health,omitempty"`
11579
11580 HealthErrorDetails *[]HealthError `json:"healthErrorDetails,omitempty"`
11581
11582 PolicyID *string `json:"policyId,omitempty"`
11583
11584 State *string `json:"state,omitempty"`
11585
11586 SourceProtectionContainerFriendlyName *string `json:"sourceProtectionContainerFriendlyName,omitempty"`
11587
11588 SourceFabricFriendlyName *string `json:"sourceFabricFriendlyName,omitempty"`
11589
11590 TargetFabricFriendlyName *string `json:"targetFabricFriendlyName,omitempty"`
11591
11592 PolicyFriendlyName *string `json:"policyFriendlyName,omitempty"`
11593 }
11594
11595
11596 type ProtectionContainerMappingProviderSpecificDetails struct {
11597
11598 InstanceType *string `json:"instanceType,omitempty"`
11599 }
11600
11601
11602 func (pcmpsd ProtectionContainerMappingProviderSpecificDetails) MarshalJSON() ([]byte, error) {
11603 objectMap := make(map[string]interface{})
11604 return json.Marshal(objectMap)
11605 }
11606
11607
11608 type ProtectionContainerProperties struct {
11609
11610 FabricFriendlyName *string `json:"fabricFriendlyName,omitempty"`
11611
11612 FriendlyName *string `json:"friendlyName,omitempty"`
11613
11614 FabricType *string `json:"fabricType,omitempty"`
11615
11616 ProtectedItemCount *int32 `json:"protectedItemCount,omitempty"`
11617
11618 PairingStatus *string `json:"pairingStatus,omitempty"`
11619
11620 Role *string `json:"role,omitempty"`
11621
11622 FabricSpecificDetails *ProtectionContainerFabricSpecificDetails `json:"fabricSpecificDetails,omitempty"`
11623 }
11624
11625
11626 type ProviderError struct {
11627
11628 ErrorCode *int32 `json:"errorCode,omitempty"`
11629
11630 ErrorMessage *string `json:"errorMessage,omitempty"`
11631
11632 ErrorID *string `json:"errorId,omitempty"`
11633
11634 PossibleCauses *string `json:"possibleCauses,omitempty"`
11635
11636 RecommendedAction *string `json:"recommendedAction,omitempty"`
11637 }
11638
11639
11640 type BasicProviderSpecificFailoverInput interface {
11641 AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool)
11642 AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool)
11643 AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool)
11644 AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool)
11645 AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool)
11646 AsProviderSpecificFailoverInput() (*ProviderSpecificFailoverInput, bool)
11647 }
11648
11649
11650 type ProviderSpecificFailoverInput struct {
11651
11652 InstanceType InstanceTypeBasicProviderSpecificFailoverInput `json:"instanceType,omitempty"`
11653 }
11654
11655 func unmarshalBasicProviderSpecificFailoverInput(body []byte) (BasicProviderSpecificFailoverInput, error) {
11656 var m map[string]interface{}
11657 err := json.Unmarshal(body, &m)
11658 if err != nil {
11659 return nil, err
11660 }
11661
11662 switch m["instanceType"] {
11663 case string(InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure):
11664 var hvrafpi HyperVReplicaAzureFailoverProviderInput
11665 err := json.Unmarshal(body, &hvrafpi)
11666 return hvrafpi, err
11667 case string(InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback):
11668 var hvrafpi HyperVReplicaAzureFailbackProviderInput
11669 err := json.Unmarshal(body, &hvrafpi)
11670 return hvrafpi, err
11671 case string(InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMageAzureV2):
11672 var imavfpi InMageAzureV2FailoverProviderInput
11673 err := json.Unmarshal(body, &imavfpi)
11674 return imavfpi, err
11675 case string(InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMage):
11676 var imfpi InMageFailoverProviderInput
11677 err := json.Unmarshal(body, &imfpi)
11678 return imfpi, err
11679 case string(InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeA2A):
11680 var afpi A2AFailoverProviderInput
11681 err := json.Unmarshal(body, &afpi)
11682 return afpi, err
11683 default:
11684 var psfi ProviderSpecificFailoverInput
11685 err := json.Unmarshal(body, &psfi)
11686 return psfi, err
11687 }
11688 }
11689 func unmarshalBasicProviderSpecificFailoverInputArray(body []byte) ([]BasicProviderSpecificFailoverInput, error) {
11690 var rawMessages []*json.RawMessage
11691 err := json.Unmarshal(body, &rawMessages)
11692 if err != nil {
11693 return nil, err
11694 }
11695
11696 psfiArray := make([]BasicProviderSpecificFailoverInput, len(rawMessages))
11697
11698 for index, rawMessage := range rawMessages {
11699 psfi, err := unmarshalBasicProviderSpecificFailoverInput(*rawMessage)
11700 if err != nil {
11701 return nil, err
11702 }
11703 psfiArray[index] = psfi
11704 }
11705 return psfiArray, nil
11706 }
11707
11708
11709 func (psfi ProviderSpecificFailoverInput) MarshalJSON() ([]byte, error) {
11710 psfi.InstanceType = InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeProviderSpecificFailoverInput
11711 objectMap := make(map[string]interface{})
11712 if psfi.InstanceType != "" {
11713 objectMap["instanceType"] = psfi.InstanceType
11714 }
11715 return json.Marshal(objectMap)
11716 }
11717
11718
11719 func (psfi ProviderSpecificFailoverInput) AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool) {
11720 return nil, false
11721 }
11722
11723
11724 func (psfi ProviderSpecificFailoverInput) AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool) {
11725 return nil, false
11726 }
11727
11728
11729 func (psfi ProviderSpecificFailoverInput) AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool) {
11730 return nil, false
11731 }
11732
11733
11734 func (psfi ProviderSpecificFailoverInput) AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool) {
11735 return nil, false
11736 }
11737
11738
11739 func (psfi ProviderSpecificFailoverInput) AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool) {
11740 return nil, false
11741 }
11742
11743
11744 func (psfi ProviderSpecificFailoverInput) AsProviderSpecificFailoverInput() (*ProviderSpecificFailoverInput, bool) {
11745 return &psfi, true
11746 }
11747
11748
11749 func (psfi ProviderSpecificFailoverInput) AsBasicProviderSpecificFailoverInput() (BasicProviderSpecificFailoverInput, bool) {
11750 return &psfi, true
11751 }
11752
11753
11754 type ProviderSpecificRecoveryPointDetails struct {
11755
11756 Type *string `json:"Type,omitempty"`
11757 }
11758
11759
11760 func (psrpd ProviderSpecificRecoveryPointDetails) MarshalJSON() ([]byte, error) {
11761 objectMap := make(map[string]interface{})
11762 return json.Marshal(objectMap)
11763 }
11764
11765
11766 type RcmAzureMigrationPolicyDetails struct {
11767
11768 RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"`
11769
11770 RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"`
11771
11772 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"`
11773
11774 MultiVMSyncStatus MultiVMSyncStatus `json:"multiVmSyncStatus,omitempty"`
11775
11776 CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"`
11777
11778 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"`
11779 }
11780
11781
11782 func (rampd RcmAzureMigrationPolicyDetails) MarshalJSON() ([]byte, error) {
11783 rampd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration
11784 objectMap := make(map[string]interface{})
11785 if rampd.RecoveryPointThresholdInMinutes != nil {
11786 objectMap["recoveryPointThresholdInMinutes"] = rampd.RecoveryPointThresholdInMinutes
11787 }
11788 if rampd.RecoveryPointHistory != nil {
11789 objectMap["recoveryPointHistory"] = rampd.RecoveryPointHistory
11790 }
11791 if rampd.AppConsistentFrequencyInMinutes != nil {
11792 objectMap["appConsistentFrequencyInMinutes"] = rampd.AppConsistentFrequencyInMinutes
11793 }
11794 if rampd.MultiVMSyncStatus != "" {
11795 objectMap["multiVmSyncStatus"] = rampd.MultiVMSyncStatus
11796 }
11797 if rampd.CrashConsistentFrequencyInMinutes != nil {
11798 objectMap["crashConsistentFrequencyInMinutes"] = rampd.CrashConsistentFrequencyInMinutes
11799 }
11800 if rampd.InstanceType != "" {
11801 objectMap["instanceType"] = rampd.InstanceType
11802 }
11803 return json.Marshal(objectMap)
11804 }
11805
11806
11807 func (rampd RcmAzureMigrationPolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) {
11808 return nil, false
11809 }
11810
11811
11812 func (rampd RcmAzureMigrationPolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) {
11813 return nil, false
11814 }
11815
11816
11817 func (rampd RcmAzureMigrationPolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) {
11818 return nil, false
11819 }
11820
11821
11822 func (rampd RcmAzureMigrationPolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) {
11823 return nil, false
11824 }
11825
11826
11827 func (rampd RcmAzureMigrationPolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) {
11828 return nil, false
11829 }
11830
11831
11832 func (rampd RcmAzureMigrationPolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) {
11833 return nil, false
11834 }
11835
11836
11837 func (rampd RcmAzureMigrationPolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) {
11838 return nil, false
11839 }
11840
11841
11842 func (rampd RcmAzureMigrationPolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) {
11843 return nil, false
11844 }
11845
11846
11847 func (rampd RcmAzureMigrationPolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) {
11848 return &rampd, true
11849 }
11850
11851
11852 func (rampd RcmAzureMigrationPolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) {
11853 return nil, false
11854 }
11855
11856
11857 func (rampd RcmAzureMigrationPolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) {
11858 return nil, false
11859 }
11860
11861
11862 func (rampd RcmAzureMigrationPolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) {
11863 return &rampd, true
11864 }
11865
11866
11867 type RecoveryPlan struct {
11868 autorest.Response `json:"-"`
11869
11870 Properties *RecoveryPlanProperties `json:"properties,omitempty"`
11871
11872 ID *string `json:"id,omitempty"`
11873
11874 Name *string `json:"name,omitempty"`
11875
11876 Type *string `json:"type,omitempty"`
11877
11878 Location *string `json:"location,omitempty"`
11879 }
11880
11881
11882 func (rp RecoveryPlan) MarshalJSON() ([]byte, error) {
11883 objectMap := make(map[string]interface{})
11884 if rp.Properties != nil {
11885 objectMap["properties"] = rp.Properties
11886 }
11887 if rp.Location != nil {
11888 objectMap["location"] = rp.Location
11889 }
11890 return json.Marshal(objectMap)
11891 }
11892
11893
11894 type RecoveryPlanA2AFailoverInput struct {
11895
11896 RecoveryPointType A2ARpRecoveryPointType `json:"recoveryPointType,omitempty"`
11897
11898 CloudServiceCreationOption *string `json:"cloudServiceCreationOption,omitempty"`
11899
11900 InstanceType InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput `json:"instanceType,omitempty"`
11901 }
11902
11903
11904 func (rpafi RecoveryPlanA2AFailoverInput) MarshalJSON() ([]byte, error) {
11905 rpafi.InstanceType = InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeA2A
11906 objectMap := make(map[string]interface{})
11907 if rpafi.RecoveryPointType != "" {
11908 objectMap["recoveryPointType"] = rpafi.RecoveryPointType
11909 }
11910 if rpafi.CloudServiceCreationOption != nil {
11911 objectMap["cloudServiceCreationOption"] = rpafi.CloudServiceCreationOption
11912 }
11913 if rpafi.InstanceType != "" {
11914 objectMap["instanceType"] = rpafi.InstanceType
11915 }
11916 return json.Marshal(objectMap)
11917 }
11918
11919
11920 func (rpafi RecoveryPlanA2AFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool) {
11921 return nil, false
11922 }
11923
11924
11925 func (rpafi RecoveryPlanA2AFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool) {
11926 return nil, false
11927 }
11928
11929
11930 func (rpafi RecoveryPlanA2AFailoverInput) AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool) {
11931 return nil, false
11932 }
11933
11934
11935 func (rpafi RecoveryPlanA2AFailoverInput) AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool) {
11936 return nil, false
11937 }
11938
11939
11940 func (rpafi RecoveryPlanA2AFailoverInput) AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) {
11941 return &rpafi, true
11942 }
11943
11944
11945 func (rpafi RecoveryPlanA2AFailoverInput) AsRecoveryPlanProviderSpecificFailoverInput() (*RecoveryPlanProviderSpecificFailoverInput, bool) {
11946 return nil, false
11947 }
11948
11949
11950 func (rpafi RecoveryPlanA2AFailoverInput) AsBasicRecoveryPlanProviderSpecificFailoverInput() (BasicRecoveryPlanProviderSpecificFailoverInput, bool) {
11951 return &rpafi, true
11952 }
11953
11954
11955 type RecoveryPlanAction struct {
11956
11957 ActionName *string `json:"actionName,omitempty"`
11958
11959 FailoverTypes *[]ReplicationProtectedItemOperation `json:"failoverTypes,omitempty"`
11960
11961 FailoverDirections *[]PossibleOperationsDirections `json:"failoverDirections,omitempty"`
11962
11963 CustomDetails BasicRecoveryPlanActionDetails `json:"customDetails,omitempty"`
11964 }
11965
11966
11967 func (rpa *RecoveryPlanAction) UnmarshalJSON(body []byte) error {
11968 var m map[string]*json.RawMessage
11969 err := json.Unmarshal(body, &m)
11970 if err != nil {
11971 return err
11972 }
11973 for k, v := range m {
11974 switch k {
11975 case "actionName":
11976 if v != nil {
11977 var actionName string
11978 err = json.Unmarshal(*v, &actionName)
11979 if err != nil {
11980 return err
11981 }
11982 rpa.ActionName = &actionName
11983 }
11984 case "failoverTypes":
11985 if v != nil {
11986 var failoverTypes []ReplicationProtectedItemOperation
11987 err = json.Unmarshal(*v, &failoverTypes)
11988 if err != nil {
11989 return err
11990 }
11991 rpa.FailoverTypes = &failoverTypes
11992 }
11993 case "failoverDirections":
11994 if v != nil {
11995 var failoverDirections []PossibleOperationsDirections
11996 err = json.Unmarshal(*v, &failoverDirections)
11997 if err != nil {
11998 return err
11999 }
12000 rpa.FailoverDirections = &failoverDirections
12001 }
12002 case "customDetails":
12003 if v != nil {
12004 customDetails, err := unmarshalBasicRecoveryPlanActionDetails(*v)
12005 if err != nil {
12006 return err
12007 }
12008 rpa.CustomDetails = customDetails
12009 }
12010 }
12011 }
12012
12013 return nil
12014 }
12015
12016
12017 type BasicRecoveryPlanActionDetails interface {
12018 AsRecoveryPlanScriptActionDetails() (*RecoveryPlanScriptActionDetails, bool)
12019 AsRecoveryPlanAutomationRunbookActionDetails() (*RecoveryPlanAutomationRunbookActionDetails, bool)
12020 AsRecoveryPlanManualActionDetails() (*RecoveryPlanManualActionDetails, bool)
12021 AsRecoveryPlanActionDetails() (*RecoveryPlanActionDetails, bool)
12022 }
12023
12024
12025 type RecoveryPlanActionDetails struct {
12026
12027 InstanceType InstanceTypeBasicRecoveryPlanActionDetails `json:"instanceType,omitempty"`
12028 }
12029
12030 func unmarshalBasicRecoveryPlanActionDetails(body []byte) (BasicRecoveryPlanActionDetails, error) {
12031 var m map[string]interface{}
12032 err := json.Unmarshal(body, &m)
12033 if err != nil {
12034 return nil, err
12035 }
12036
12037 switch m["instanceType"] {
12038 case string(InstanceTypeScriptActionDetails):
12039 var rpsad RecoveryPlanScriptActionDetails
12040 err := json.Unmarshal(body, &rpsad)
12041 return rpsad, err
12042 case string(InstanceTypeAutomationRunbookActionDetails):
12043 var rparad RecoveryPlanAutomationRunbookActionDetails
12044 err := json.Unmarshal(body, &rparad)
12045 return rparad, err
12046 case string(InstanceTypeManualActionDetails):
12047 var rpmad RecoveryPlanManualActionDetails
12048 err := json.Unmarshal(body, &rpmad)
12049 return rpmad, err
12050 default:
12051 var rpad RecoveryPlanActionDetails
12052 err := json.Unmarshal(body, &rpad)
12053 return rpad, err
12054 }
12055 }
12056 func unmarshalBasicRecoveryPlanActionDetailsArray(body []byte) ([]BasicRecoveryPlanActionDetails, error) {
12057 var rawMessages []*json.RawMessage
12058 err := json.Unmarshal(body, &rawMessages)
12059 if err != nil {
12060 return nil, err
12061 }
12062
12063 rpadArray := make([]BasicRecoveryPlanActionDetails, len(rawMessages))
12064
12065 for index, rawMessage := range rawMessages {
12066 rpad, err := unmarshalBasicRecoveryPlanActionDetails(*rawMessage)
12067 if err != nil {
12068 return nil, err
12069 }
12070 rpadArray[index] = rpad
12071 }
12072 return rpadArray, nil
12073 }
12074
12075
12076 func (rpad RecoveryPlanActionDetails) MarshalJSON() ([]byte, error) {
12077 rpad.InstanceType = InstanceTypeRecoveryPlanActionDetails
12078 objectMap := make(map[string]interface{})
12079 if rpad.InstanceType != "" {
12080 objectMap["instanceType"] = rpad.InstanceType
12081 }
12082 return json.Marshal(objectMap)
12083 }
12084
12085
12086 func (rpad RecoveryPlanActionDetails) AsRecoveryPlanScriptActionDetails() (*RecoveryPlanScriptActionDetails, bool) {
12087 return nil, false
12088 }
12089
12090
12091 func (rpad RecoveryPlanActionDetails) AsRecoveryPlanAutomationRunbookActionDetails() (*RecoveryPlanAutomationRunbookActionDetails, bool) {
12092 return nil, false
12093 }
12094
12095
12096 func (rpad RecoveryPlanActionDetails) AsRecoveryPlanManualActionDetails() (*RecoveryPlanManualActionDetails, bool) {
12097 return nil, false
12098 }
12099
12100
12101 func (rpad RecoveryPlanActionDetails) AsRecoveryPlanActionDetails() (*RecoveryPlanActionDetails, bool) {
12102 return &rpad, true
12103 }
12104
12105
12106 func (rpad RecoveryPlanActionDetails) AsBasicRecoveryPlanActionDetails() (BasicRecoveryPlanActionDetails, bool) {
12107 return &rpad, true
12108 }
12109
12110
12111 type RecoveryPlanAutomationRunbookActionDetails struct {
12112
12113 RunbookID *string `json:"runbookId,omitempty"`
12114
12115 Timeout *string `json:"timeout,omitempty"`
12116
12117 FabricLocation RecoveryPlanActionLocation `json:"fabricLocation,omitempty"`
12118
12119 InstanceType InstanceTypeBasicRecoveryPlanActionDetails `json:"instanceType,omitempty"`
12120 }
12121
12122
12123 func (rparad RecoveryPlanAutomationRunbookActionDetails) MarshalJSON() ([]byte, error) {
12124 rparad.InstanceType = InstanceTypeAutomationRunbookActionDetails
12125 objectMap := make(map[string]interface{})
12126 if rparad.RunbookID != nil {
12127 objectMap["runbookId"] = rparad.RunbookID
12128 }
12129 if rparad.Timeout != nil {
12130 objectMap["timeout"] = rparad.Timeout
12131 }
12132 if rparad.FabricLocation != "" {
12133 objectMap["fabricLocation"] = rparad.FabricLocation
12134 }
12135 if rparad.InstanceType != "" {
12136 objectMap["instanceType"] = rparad.InstanceType
12137 }
12138 return json.Marshal(objectMap)
12139 }
12140
12141
12142 func (rparad RecoveryPlanAutomationRunbookActionDetails) AsRecoveryPlanScriptActionDetails() (*RecoveryPlanScriptActionDetails, bool) {
12143 return nil, false
12144 }
12145
12146
12147 func (rparad RecoveryPlanAutomationRunbookActionDetails) AsRecoveryPlanAutomationRunbookActionDetails() (*RecoveryPlanAutomationRunbookActionDetails, bool) {
12148 return &rparad, true
12149 }
12150
12151
12152 func (rparad RecoveryPlanAutomationRunbookActionDetails) AsRecoveryPlanManualActionDetails() (*RecoveryPlanManualActionDetails, bool) {
12153 return nil, false
12154 }
12155
12156
12157 func (rparad RecoveryPlanAutomationRunbookActionDetails) AsRecoveryPlanActionDetails() (*RecoveryPlanActionDetails, bool) {
12158 return nil, false
12159 }
12160
12161
12162 func (rparad RecoveryPlanAutomationRunbookActionDetails) AsBasicRecoveryPlanActionDetails() (BasicRecoveryPlanActionDetails, bool) {
12163 return &rparad, true
12164 }
12165
12166
12167 type RecoveryPlanCollection struct {
12168 autorest.Response `json:"-"`
12169
12170 Value *[]RecoveryPlan `json:"value,omitempty"`
12171
12172 NextLink *string `json:"nextLink,omitempty"`
12173 }
12174
12175
12176 type RecoveryPlanCollectionIterator struct {
12177 i int
12178 page RecoveryPlanCollectionPage
12179 }
12180
12181
12182
12183 func (iter *RecoveryPlanCollectionIterator) NextWithContext(ctx context.Context) (err error) {
12184 if tracing.IsEnabled() {
12185 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPlanCollectionIterator.NextWithContext")
12186 defer func() {
12187 sc := -1
12188 if iter.Response().Response.Response != nil {
12189 sc = iter.Response().Response.Response.StatusCode
12190 }
12191 tracing.EndSpan(ctx, sc, err)
12192 }()
12193 }
12194 iter.i++
12195 if iter.i < len(iter.page.Values()) {
12196 return nil
12197 }
12198 err = iter.page.NextWithContext(ctx)
12199 if err != nil {
12200 iter.i--
12201 return err
12202 }
12203 iter.i = 0
12204 return nil
12205 }
12206
12207
12208
12209
12210 func (iter *RecoveryPlanCollectionIterator) Next() error {
12211 return iter.NextWithContext(context.Background())
12212 }
12213
12214
12215 func (iter RecoveryPlanCollectionIterator) NotDone() bool {
12216 return iter.page.NotDone() && iter.i < len(iter.page.Values())
12217 }
12218
12219
12220 func (iter RecoveryPlanCollectionIterator) Response() RecoveryPlanCollection {
12221 return iter.page.Response()
12222 }
12223
12224
12225
12226 func (iter RecoveryPlanCollectionIterator) Value() RecoveryPlan {
12227 if !iter.page.NotDone() {
12228 return RecoveryPlan{}
12229 }
12230 return iter.page.Values()[iter.i]
12231 }
12232
12233
12234 func NewRecoveryPlanCollectionIterator(page RecoveryPlanCollectionPage) RecoveryPlanCollectionIterator {
12235 return RecoveryPlanCollectionIterator{page: page}
12236 }
12237
12238
12239 func (RPCVar RecoveryPlanCollection) IsEmpty() bool {
12240 return RPCVar.Value == nil || len(*RPCVar.Value) == 0
12241 }
12242
12243
12244 func (RPCVar RecoveryPlanCollection) hasNextLink() bool {
12245 return RPCVar.NextLink != nil && len(*RPCVar.NextLink) != 0
12246 }
12247
12248
12249
12250 func (RPCVar RecoveryPlanCollection) recoveryPlanCollectionPreparer(ctx context.Context) (*http.Request, error) {
12251 if !RPCVar.hasNextLink() {
12252 return nil, nil
12253 }
12254 return autorest.Prepare((&http.Request{}).WithContext(ctx),
12255 autorest.AsJSON(),
12256 autorest.AsGet(),
12257 autorest.WithBaseURL(to.String(RPCVar.NextLink)))
12258 }
12259
12260
12261 type RecoveryPlanCollectionPage struct {
12262 fn func(context.Context, RecoveryPlanCollection) (RecoveryPlanCollection, error)
12263 RPCVar RecoveryPlanCollection
12264 }
12265
12266
12267
12268 func (page *RecoveryPlanCollectionPage) NextWithContext(ctx context.Context) (err error) {
12269 if tracing.IsEnabled() {
12270 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPlanCollectionPage.NextWithContext")
12271 defer func() {
12272 sc := -1
12273 if page.Response().Response.Response != nil {
12274 sc = page.Response().Response.Response.StatusCode
12275 }
12276 tracing.EndSpan(ctx, sc, err)
12277 }()
12278 }
12279 for {
12280 next, err := page.fn(ctx, page.RPCVar)
12281 if err != nil {
12282 return err
12283 }
12284 page.RPCVar = next
12285 if !next.hasNextLink() || !next.IsEmpty() {
12286 break
12287 }
12288 }
12289 return nil
12290 }
12291
12292
12293
12294
12295 func (page *RecoveryPlanCollectionPage) Next() error {
12296 return page.NextWithContext(context.Background())
12297 }
12298
12299
12300 func (page RecoveryPlanCollectionPage) NotDone() bool {
12301 return !page.RPCVar.IsEmpty()
12302 }
12303
12304
12305 func (page RecoveryPlanCollectionPage) Response() RecoveryPlanCollection {
12306 return page.RPCVar
12307 }
12308
12309
12310 func (page RecoveryPlanCollectionPage) Values() []RecoveryPlan {
12311 if page.RPCVar.IsEmpty() {
12312 return nil
12313 }
12314 return *page.RPCVar.Value
12315 }
12316
12317
12318 func NewRecoveryPlanCollectionPage(cur RecoveryPlanCollection, getNextPage func(context.Context, RecoveryPlanCollection) (RecoveryPlanCollection, error)) RecoveryPlanCollectionPage {
12319 return RecoveryPlanCollectionPage{
12320 fn: getNextPage,
12321 RPCVar: cur,
12322 }
12323 }
12324
12325
12326 type RecoveryPlanGroup struct {
12327
12328 GroupType RecoveryPlanGroupType `json:"groupType,omitempty"`
12329
12330 ReplicationProtectedItems *[]RecoveryPlanProtectedItem `json:"replicationProtectedItems,omitempty"`
12331
12332 StartGroupActions *[]RecoveryPlanAction `json:"startGroupActions,omitempty"`
12333
12334 EndGroupActions *[]RecoveryPlanAction `json:"endGroupActions,omitempty"`
12335 }
12336
12337
12338 type RecoveryPlanGroupTaskDetails struct {
12339
12340 Name *string `json:"name,omitempty"`
12341
12342 GroupID *string `json:"groupId,omitempty"`
12343
12344 RpGroupType *string `json:"rpGroupType,omitempty"`
12345
12346 ChildTasks *[]ASRTask `json:"childTasks,omitempty"`
12347
12348 InstanceType InstanceTypeBasicGroupTaskDetails `json:"instanceType,omitempty"`
12349 }
12350
12351
12352 func (rpgtd RecoveryPlanGroupTaskDetails) MarshalJSON() ([]byte, error) {
12353 rpgtd.InstanceType = InstanceTypeRecoveryPlanGroupTaskDetails
12354 objectMap := make(map[string]interface{})
12355 if rpgtd.Name != nil {
12356 objectMap["name"] = rpgtd.Name
12357 }
12358 if rpgtd.GroupID != nil {
12359 objectMap["groupId"] = rpgtd.GroupID
12360 }
12361 if rpgtd.RpGroupType != nil {
12362 objectMap["rpGroupType"] = rpgtd.RpGroupType
12363 }
12364 if rpgtd.ChildTasks != nil {
12365 objectMap["childTasks"] = rpgtd.ChildTasks
12366 }
12367 if rpgtd.InstanceType != "" {
12368 objectMap["instanceType"] = rpgtd.InstanceType
12369 }
12370 return json.Marshal(objectMap)
12371 }
12372
12373
12374 func (rpgtd RecoveryPlanGroupTaskDetails) AsInlineWorkflowTaskDetails() (*InlineWorkflowTaskDetails, bool) {
12375 return nil, false
12376 }
12377
12378
12379 func (rpgtd RecoveryPlanGroupTaskDetails) AsRecoveryPlanGroupTaskDetails() (*RecoveryPlanGroupTaskDetails, bool) {
12380 return &rpgtd, true
12381 }
12382
12383
12384 func (rpgtd RecoveryPlanGroupTaskDetails) AsRecoveryPlanShutdownGroupTaskDetails() (*RecoveryPlanShutdownGroupTaskDetails, bool) {
12385 return nil, false
12386 }
12387
12388
12389 func (rpgtd RecoveryPlanGroupTaskDetails) AsGroupTaskDetails() (*GroupTaskDetails, bool) {
12390 return nil, false
12391 }
12392
12393
12394 func (rpgtd RecoveryPlanGroupTaskDetails) AsBasicGroupTaskDetails() (BasicGroupTaskDetails, bool) {
12395 return &rpgtd, true
12396 }
12397
12398
12399 type RecoveryPlanHyperVReplicaAzureFailbackInput struct {
12400
12401 DataSyncOption DataSyncStatus `json:"dataSyncOption,omitempty"`
12402
12403 RecoveryVMCreationOption AlternateLocationRecoveryOption `json:"recoveryVmCreationOption,omitempty"`
12404
12405 InstanceType InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput `json:"instanceType,omitempty"`
12406 }
12407
12408
12409 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) MarshalJSON() ([]byte, error) {
12410 rphvrafi.InstanceType = InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback
12411 objectMap := make(map[string]interface{})
12412 if rphvrafi.DataSyncOption != "" {
12413 objectMap["dataSyncOption"] = rphvrafi.DataSyncOption
12414 }
12415 if rphvrafi.RecoveryVMCreationOption != "" {
12416 objectMap["recoveryVmCreationOption"] = rphvrafi.RecoveryVMCreationOption
12417 }
12418 if rphvrafi.InstanceType != "" {
12419 objectMap["instanceType"] = rphvrafi.InstanceType
12420 }
12421 return json.Marshal(objectMap)
12422 }
12423
12424
12425 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool) {
12426 return nil, false
12427 }
12428
12429
12430 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool) {
12431 return &rphvrafi, true
12432 }
12433
12434
12435 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool) {
12436 return nil, false
12437 }
12438
12439
12440 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool) {
12441 return nil, false
12442 }
12443
12444
12445 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) {
12446 return nil, false
12447 }
12448
12449
12450 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsRecoveryPlanProviderSpecificFailoverInput() (*RecoveryPlanProviderSpecificFailoverInput, bool) {
12451 return nil, false
12452 }
12453
12454
12455 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsBasicRecoveryPlanProviderSpecificFailoverInput() (BasicRecoveryPlanProviderSpecificFailoverInput, bool) {
12456 return &rphvrafi, true
12457 }
12458
12459
12460 type RecoveryPlanHyperVReplicaAzureFailoverInput struct {
12461
12462 VaultLocation *string `json:"vaultLocation,omitempty"`
12463
12464 PrimaryKekCertificatePfx *string `json:"primaryKekCertificatePfx,omitempty"`
12465
12466 SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"`
12467
12468 RecoveryPointType HyperVReplicaAzureRpRecoveryPointType `json:"recoveryPointType,omitempty"`
12469
12470 InstanceType InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput `json:"instanceType,omitempty"`
12471 }
12472
12473
12474 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) MarshalJSON() ([]byte, error) {
12475 rphvrafi.InstanceType = InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure
12476 objectMap := make(map[string]interface{})
12477 if rphvrafi.VaultLocation != nil {
12478 objectMap["vaultLocation"] = rphvrafi.VaultLocation
12479 }
12480 if rphvrafi.PrimaryKekCertificatePfx != nil {
12481 objectMap["primaryKekCertificatePfx"] = rphvrafi.PrimaryKekCertificatePfx
12482 }
12483 if rphvrafi.SecondaryKekCertificatePfx != nil {
12484 objectMap["secondaryKekCertificatePfx"] = rphvrafi.SecondaryKekCertificatePfx
12485 }
12486 if rphvrafi.RecoveryPointType != "" {
12487 objectMap["recoveryPointType"] = rphvrafi.RecoveryPointType
12488 }
12489 if rphvrafi.InstanceType != "" {
12490 objectMap["instanceType"] = rphvrafi.InstanceType
12491 }
12492 return json.Marshal(objectMap)
12493 }
12494
12495
12496 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool) {
12497 return &rphvrafi, true
12498 }
12499
12500
12501 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool) {
12502 return nil, false
12503 }
12504
12505
12506 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool) {
12507 return nil, false
12508 }
12509
12510
12511 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool) {
12512 return nil, false
12513 }
12514
12515
12516 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) {
12517 return nil, false
12518 }
12519
12520
12521 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsRecoveryPlanProviderSpecificFailoverInput() (*RecoveryPlanProviderSpecificFailoverInput, bool) {
12522 return nil, false
12523 }
12524
12525
12526 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsBasicRecoveryPlanProviderSpecificFailoverInput() (BasicRecoveryPlanProviderSpecificFailoverInput, bool) {
12527 return &rphvrafi, true
12528 }
12529
12530
12531 type RecoveryPlanInMageAzureV2FailoverInput struct {
12532
12533 VaultLocation *string `json:"vaultLocation,omitempty"`
12534
12535 RecoveryPointType InMageV2RpRecoveryPointType `json:"recoveryPointType,omitempty"`
12536
12537 UseMultiVMSyncPoint *string `json:"useMultiVmSyncPoint,omitempty"`
12538
12539 InstanceType InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput `json:"instanceType,omitempty"`
12540 }
12541
12542
12543 func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) MarshalJSON() ([]byte, error) {
12544 rpimavfi.InstanceType = InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMageAzureV2
12545 objectMap := make(map[string]interface{})
12546 if rpimavfi.VaultLocation != nil {
12547 objectMap["vaultLocation"] = rpimavfi.VaultLocation
12548 }
12549 if rpimavfi.RecoveryPointType != "" {
12550 objectMap["recoveryPointType"] = rpimavfi.RecoveryPointType
12551 }
12552 if rpimavfi.UseMultiVMSyncPoint != nil {
12553 objectMap["useMultiVmSyncPoint"] = rpimavfi.UseMultiVMSyncPoint
12554 }
12555 if rpimavfi.InstanceType != "" {
12556 objectMap["instanceType"] = rpimavfi.InstanceType
12557 }
12558 return json.Marshal(objectMap)
12559 }
12560
12561
12562 func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool) {
12563 return nil, false
12564 }
12565
12566
12567 func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool) {
12568 return nil, false
12569 }
12570
12571
12572 func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool) {
12573 return &rpimavfi, true
12574 }
12575
12576
12577 func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool) {
12578 return nil, false
12579 }
12580
12581
12582 func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) {
12583 return nil, false
12584 }
12585
12586
12587 func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsRecoveryPlanProviderSpecificFailoverInput() (*RecoveryPlanProviderSpecificFailoverInput, bool) {
12588 return nil, false
12589 }
12590
12591
12592 func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsBasicRecoveryPlanProviderSpecificFailoverInput() (BasicRecoveryPlanProviderSpecificFailoverInput, bool) {
12593 return &rpimavfi, true
12594 }
12595
12596
12597 type RecoveryPlanInMageFailoverInput struct {
12598
12599 RecoveryPointType RpInMageRecoveryPointType `json:"recoveryPointType,omitempty"`
12600
12601 InstanceType InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput `json:"instanceType,omitempty"`
12602 }
12603
12604
12605 func (rpimfi RecoveryPlanInMageFailoverInput) MarshalJSON() ([]byte, error) {
12606 rpimfi.InstanceType = InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMage
12607 objectMap := make(map[string]interface{})
12608 if rpimfi.RecoveryPointType != "" {
12609 objectMap["recoveryPointType"] = rpimfi.RecoveryPointType
12610 }
12611 if rpimfi.InstanceType != "" {
12612 objectMap["instanceType"] = rpimfi.InstanceType
12613 }
12614 return json.Marshal(objectMap)
12615 }
12616
12617
12618 func (rpimfi RecoveryPlanInMageFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool) {
12619 return nil, false
12620 }
12621
12622
12623 func (rpimfi RecoveryPlanInMageFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool) {
12624 return nil, false
12625 }
12626
12627
12628 func (rpimfi RecoveryPlanInMageFailoverInput) AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool) {
12629 return nil, false
12630 }
12631
12632
12633 func (rpimfi RecoveryPlanInMageFailoverInput) AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool) {
12634 return &rpimfi, true
12635 }
12636
12637
12638 func (rpimfi RecoveryPlanInMageFailoverInput) AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) {
12639 return nil, false
12640 }
12641
12642
12643 func (rpimfi RecoveryPlanInMageFailoverInput) AsRecoveryPlanProviderSpecificFailoverInput() (*RecoveryPlanProviderSpecificFailoverInput, bool) {
12644 return nil, false
12645 }
12646
12647
12648 func (rpimfi RecoveryPlanInMageFailoverInput) AsBasicRecoveryPlanProviderSpecificFailoverInput() (BasicRecoveryPlanProviderSpecificFailoverInput, bool) {
12649 return &rpimfi, true
12650 }
12651
12652
12653 type RecoveryPlanManualActionDetails struct {
12654
12655 Description *string `json:"description,omitempty"`
12656
12657 InstanceType InstanceTypeBasicRecoveryPlanActionDetails `json:"instanceType,omitempty"`
12658 }
12659
12660
12661 func (rpmad RecoveryPlanManualActionDetails) MarshalJSON() ([]byte, error) {
12662 rpmad.InstanceType = InstanceTypeManualActionDetails
12663 objectMap := make(map[string]interface{})
12664 if rpmad.Description != nil {
12665 objectMap["description"] = rpmad.Description
12666 }
12667 if rpmad.InstanceType != "" {
12668 objectMap["instanceType"] = rpmad.InstanceType
12669 }
12670 return json.Marshal(objectMap)
12671 }
12672
12673
12674 func (rpmad RecoveryPlanManualActionDetails) AsRecoveryPlanScriptActionDetails() (*RecoveryPlanScriptActionDetails, bool) {
12675 return nil, false
12676 }
12677
12678
12679 func (rpmad RecoveryPlanManualActionDetails) AsRecoveryPlanAutomationRunbookActionDetails() (*RecoveryPlanAutomationRunbookActionDetails, bool) {
12680 return nil, false
12681 }
12682
12683
12684 func (rpmad RecoveryPlanManualActionDetails) AsRecoveryPlanManualActionDetails() (*RecoveryPlanManualActionDetails, bool) {
12685 return &rpmad, true
12686 }
12687
12688
12689 func (rpmad RecoveryPlanManualActionDetails) AsRecoveryPlanActionDetails() (*RecoveryPlanActionDetails, bool) {
12690 return nil, false
12691 }
12692
12693
12694 func (rpmad RecoveryPlanManualActionDetails) AsBasicRecoveryPlanActionDetails() (BasicRecoveryPlanActionDetails, bool) {
12695 return &rpmad, true
12696 }
12697
12698
12699 type RecoveryPlanPlannedFailoverInput struct {
12700
12701 Properties *RecoveryPlanPlannedFailoverInputProperties `json:"properties,omitempty"`
12702 }
12703
12704
12705 type RecoveryPlanPlannedFailoverInputProperties struct {
12706
12707 FailoverDirection PossibleOperationsDirections `json:"failoverDirection,omitempty"`
12708
12709 ProviderSpecificDetails *[]BasicRecoveryPlanProviderSpecificFailoverInput `json:"providerSpecificDetails,omitempty"`
12710 }
12711
12712
12713 func (rppfip *RecoveryPlanPlannedFailoverInputProperties) UnmarshalJSON(body []byte) error {
12714 var m map[string]*json.RawMessage
12715 err := json.Unmarshal(body, &m)
12716 if err != nil {
12717 return err
12718 }
12719 for k, v := range m {
12720 switch k {
12721 case "failoverDirection":
12722 if v != nil {
12723 var failoverDirection PossibleOperationsDirections
12724 err = json.Unmarshal(*v, &failoverDirection)
12725 if err != nil {
12726 return err
12727 }
12728 rppfip.FailoverDirection = failoverDirection
12729 }
12730 case "providerSpecificDetails":
12731 if v != nil {
12732 providerSpecificDetails, err := unmarshalBasicRecoveryPlanProviderSpecificFailoverInputArray(*v)
12733 if err != nil {
12734 return err
12735 }
12736 rppfip.ProviderSpecificDetails = &providerSpecificDetails
12737 }
12738 }
12739 }
12740
12741 return nil
12742 }
12743
12744
12745 type RecoveryPlanProperties struct {
12746
12747 FriendlyName *string `json:"friendlyName,omitempty"`
12748
12749 PrimaryFabricID *string `json:"primaryFabricId,omitempty"`
12750
12751 PrimaryFabricFriendlyName *string `json:"primaryFabricFriendlyName,omitempty"`
12752
12753 RecoveryFabricID *string `json:"recoveryFabricId,omitempty"`
12754
12755 RecoveryFabricFriendlyName *string `json:"recoveryFabricFriendlyName,omitempty"`
12756
12757 FailoverDeploymentModel *string `json:"failoverDeploymentModel,omitempty"`
12758
12759 ReplicationProviders *[]string `json:"replicationProviders,omitempty"`
12760
12761 AllowedOperations *[]string `json:"allowedOperations,omitempty"`
12762
12763 LastPlannedFailoverTime *date.Time `json:"lastPlannedFailoverTime,omitempty"`
12764
12765 LastUnplannedFailoverTime *date.Time `json:"lastUnplannedFailoverTime,omitempty"`
12766
12767 LastTestFailoverTime *date.Time `json:"lastTestFailoverTime,omitempty"`
12768
12769 CurrentScenario *CurrentScenarioDetails `json:"currentScenario,omitempty"`
12770
12771 CurrentScenarioStatus *string `json:"currentScenarioStatus,omitempty"`
12772
12773 CurrentScenarioStatusDescription *string `json:"currentScenarioStatusDescription,omitempty"`
12774
12775 Groups *[]RecoveryPlanGroup `json:"groups,omitempty"`
12776 }
12777
12778
12779 type RecoveryPlanProtectedItem struct {
12780
12781 ID *string `json:"id,omitempty"`
12782
12783 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
12784 }
12785
12786
12787 type BasicRecoveryPlanProviderSpecificFailoverInput interface {
12788 AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool)
12789 AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool)
12790 AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool)
12791 AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool)
12792 AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool)
12793 AsRecoveryPlanProviderSpecificFailoverInput() (*RecoveryPlanProviderSpecificFailoverInput, bool)
12794 }
12795
12796
12797 type RecoveryPlanProviderSpecificFailoverInput struct {
12798
12799 InstanceType InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput `json:"instanceType,omitempty"`
12800 }
12801
12802 func unmarshalBasicRecoveryPlanProviderSpecificFailoverInput(body []byte) (BasicRecoveryPlanProviderSpecificFailoverInput, error) {
12803 var m map[string]interface{}
12804 err := json.Unmarshal(body, &m)
12805 if err != nil {
12806 return nil, err
12807 }
12808
12809 switch m["instanceType"] {
12810 case string(InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure):
12811 var rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput
12812 err := json.Unmarshal(body, &rphvrafi)
12813 return rphvrafi, err
12814 case string(InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback):
12815 var rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput
12816 err := json.Unmarshal(body, &rphvrafi)
12817 return rphvrafi, err
12818 case string(InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMageAzureV2):
12819 var rpimavfi RecoveryPlanInMageAzureV2FailoverInput
12820 err := json.Unmarshal(body, &rpimavfi)
12821 return rpimavfi, err
12822 case string(InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMage):
12823 var rpimfi RecoveryPlanInMageFailoverInput
12824 err := json.Unmarshal(body, &rpimfi)
12825 return rpimfi, err
12826 case string(InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeA2A):
12827 var rpafi RecoveryPlanA2AFailoverInput
12828 err := json.Unmarshal(body, &rpafi)
12829 return rpafi, err
12830 default:
12831 var rppsfi RecoveryPlanProviderSpecificFailoverInput
12832 err := json.Unmarshal(body, &rppsfi)
12833 return rppsfi, err
12834 }
12835 }
12836 func unmarshalBasicRecoveryPlanProviderSpecificFailoverInputArray(body []byte) ([]BasicRecoveryPlanProviderSpecificFailoverInput, error) {
12837 var rawMessages []*json.RawMessage
12838 err := json.Unmarshal(body, &rawMessages)
12839 if err != nil {
12840 return nil, err
12841 }
12842
12843 rppsfiArray := make([]BasicRecoveryPlanProviderSpecificFailoverInput, len(rawMessages))
12844
12845 for index, rawMessage := range rawMessages {
12846 rppsfi, err := unmarshalBasicRecoveryPlanProviderSpecificFailoverInput(*rawMessage)
12847 if err != nil {
12848 return nil, err
12849 }
12850 rppsfiArray[index] = rppsfi
12851 }
12852 return rppsfiArray, nil
12853 }
12854
12855
12856 func (rppsfi RecoveryPlanProviderSpecificFailoverInput) MarshalJSON() ([]byte, error) {
12857 rppsfi.InstanceType = InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeRecoveryPlanProviderSpecificFailoverInput
12858 objectMap := make(map[string]interface{})
12859 if rppsfi.InstanceType != "" {
12860 objectMap["instanceType"] = rppsfi.InstanceType
12861 }
12862 return json.Marshal(objectMap)
12863 }
12864
12865
12866 func (rppsfi RecoveryPlanProviderSpecificFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool) {
12867 return nil, false
12868 }
12869
12870
12871 func (rppsfi RecoveryPlanProviderSpecificFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool) {
12872 return nil, false
12873 }
12874
12875
12876 func (rppsfi RecoveryPlanProviderSpecificFailoverInput) AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool) {
12877 return nil, false
12878 }
12879
12880
12881 func (rppsfi RecoveryPlanProviderSpecificFailoverInput) AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool) {
12882 return nil, false
12883 }
12884
12885
12886 func (rppsfi RecoveryPlanProviderSpecificFailoverInput) AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) {
12887 return nil, false
12888 }
12889
12890
12891 func (rppsfi RecoveryPlanProviderSpecificFailoverInput) AsRecoveryPlanProviderSpecificFailoverInput() (*RecoveryPlanProviderSpecificFailoverInput, bool) {
12892 return &rppsfi, true
12893 }
12894
12895
12896 func (rppsfi RecoveryPlanProviderSpecificFailoverInput) AsBasicRecoveryPlanProviderSpecificFailoverInput() (BasicRecoveryPlanProviderSpecificFailoverInput, bool) {
12897 return &rppsfi, true
12898 }
12899
12900
12901 type RecoveryPlanScriptActionDetails struct {
12902
12903 Path *string `json:"path,omitempty"`
12904
12905 Timeout *string `json:"timeout,omitempty"`
12906
12907 FabricLocation RecoveryPlanActionLocation `json:"fabricLocation,omitempty"`
12908
12909 InstanceType InstanceTypeBasicRecoveryPlanActionDetails `json:"instanceType,omitempty"`
12910 }
12911
12912
12913 func (rpsad RecoveryPlanScriptActionDetails) MarshalJSON() ([]byte, error) {
12914 rpsad.InstanceType = InstanceTypeScriptActionDetails
12915 objectMap := make(map[string]interface{})
12916 if rpsad.Path != nil {
12917 objectMap["path"] = rpsad.Path
12918 }
12919 if rpsad.Timeout != nil {
12920 objectMap["timeout"] = rpsad.Timeout
12921 }
12922 if rpsad.FabricLocation != "" {
12923 objectMap["fabricLocation"] = rpsad.FabricLocation
12924 }
12925 if rpsad.InstanceType != "" {
12926 objectMap["instanceType"] = rpsad.InstanceType
12927 }
12928 return json.Marshal(objectMap)
12929 }
12930
12931
12932 func (rpsad RecoveryPlanScriptActionDetails) AsRecoveryPlanScriptActionDetails() (*RecoveryPlanScriptActionDetails, bool) {
12933 return &rpsad, true
12934 }
12935
12936
12937 func (rpsad RecoveryPlanScriptActionDetails) AsRecoveryPlanAutomationRunbookActionDetails() (*RecoveryPlanAutomationRunbookActionDetails, bool) {
12938 return nil, false
12939 }
12940
12941
12942 func (rpsad RecoveryPlanScriptActionDetails) AsRecoveryPlanManualActionDetails() (*RecoveryPlanManualActionDetails, bool) {
12943 return nil, false
12944 }
12945
12946
12947 func (rpsad RecoveryPlanScriptActionDetails) AsRecoveryPlanActionDetails() (*RecoveryPlanActionDetails, bool) {
12948 return nil, false
12949 }
12950
12951
12952 func (rpsad RecoveryPlanScriptActionDetails) AsBasicRecoveryPlanActionDetails() (BasicRecoveryPlanActionDetails, bool) {
12953 return &rpsad, true
12954 }
12955
12956
12957
12958 type RecoveryPlanShutdownGroupTaskDetails struct {
12959
12960 Name *string `json:"name,omitempty"`
12961
12962 GroupID *string `json:"groupId,omitempty"`
12963
12964 RpGroupType *string `json:"rpGroupType,omitempty"`
12965
12966 ChildTasks *[]ASRTask `json:"childTasks,omitempty"`
12967
12968 InstanceType InstanceTypeBasicGroupTaskDetails `json:"instanceType,omitempty"`
12969 }
12970
12971
12972 func (rpsgtd RecoveryPlanShutdownGroupTaskDetails) MarshalJSON() ([]byte, error) {
12973 rpsgtd.InstanceType = InstanceTypeRecoveryPlanShutdownGroupTaskDetails
12974 objectMap := make(map[string]interface{})
12975 if rpsgtd.Name != nil {
12976 objectMap["name"] = rpsgtd.Name
12977 }
12978 if rpsgtd.GroupID != nil {
12979 objectMap["groupId"] = rpsgtd.GroupID
12980 }
12981 if rpsgtd.RpGroupType != nil {
12982 objectMap["rpGroupType"] = rpsgtd.RpGroupType
12983 }
12984 if rpsgtd.ChildTasks != nil {
12985 objectMap["childTasks"] = rpsgtd.ChildTasks
12986 }
12987 if rpsgtd.InstanceType != "" {
12988 objectMap["instanceType"] = rpsgtd.InstanceType
12989 }
12990 return json.Marshal(objectMap)
12991 }
12992
12993
12994 func (rpsgtd RecoveryPlanShutdownGroupTaskDetails) AsInlineWorkflowTaskDetails() (*InlineWorkflowTaskDetails, bool) {
12995 return nil, false
12996 }
12997
12998
12999 func (rpsgtd RecoveryPlanShutdownGroupTaskDetails) AsRecoveryPlanGroupTaskDetails() (*RecoveryPlanGroupTaskDetails, bool) {
13000 return nil, false
13001 }
13002
13003
13004 func (rpsgtd RecoveryPlanShutdownGroupTaskDetails) AsRecoveryPlanShutdownGroupTaskDetails() (*RecoveryPlanShutdownGroupTaskDetails, bool) {
13005 return &rpsgtd, true
13006 }
13007
13008
13009 func (rpsgtd RecoveryPlanShutdownGroupTaskDetails) AsGroupTaskDetails() (*GroupTaskDetails, bool) {
13010 return nil, false
13011 }
13012
13013
13014 func (rpsgtd RecoveryPlanShutdownGroupTaskDetails) AsBasicGroupTaskDetails() (BasicGroupTaskDetails, bool) {
13015 return &rpsgtd, true
13016 }
13017
13018
13019 type RecoveryPlanTestFailoverCleanupInput struct {
13020
13021 Properties *RecoveryPlanTestFailoverCleanupInputProperties `json:"properties,omitempty"`
13022 }
13023
13024
13025 type RecoveryPlanTestFailoverCleanupInputProperties struct {
13026
13027 Comments *string `json:"comments,omitempty"`
13028 }
13029
13030
13031 type RecoveryPlanTestFailoverInput struct {
13032
13033 Properties *RecoveryPlanTestFailoverInputProperties `json:"properties,omitempty"`
13034 }
13035
13036
13037 type RecoveryPlanTestFailoverInputProperties struct {
13038
13039 FailoverDirection PossibleOperationsDirections `json:"failoverDirection,omitempty"`
13040
13041 NetworkType *string `json:"networkType,omitempty"`
13042
13043 NetworkID *string `json:"networkId,omitempty"`
13044
13045 SkipTestFailoverCleanup *string `json:"skipTestFailoverCleanup,omitempty"`
13046
13047 ProviderSpecificDetails *[]BasicRecoveryPlanProviderSpecificFailoverInput `json:"providerSpecificDetails,omitempty"`
13048 }
13049
13050
13051 func (rptfip *RecoveryPlanTestFailoverInputProperties) UnmarshalJSON(body []byte) error {
13052 var m map[string]*json.RawMessage
13053 err := json.Unmarshal(body, &m)
13054 if err != nil {
13055 return err
13056 }
13057 for k, v := range m {
13058 switch k {
13059 case "failoverDirection":
13060 if v != nil {
13061 var failoverDirection PossibleOperationsDirections
13062 err = json.Unmarshal(*v, &failoverDirection)
13063 if err != nil {
13064 return err
13065 }
13066 rptfip.FailoverDirection = failoverDirection
13067 }
13068 case "networkType":
13069 if v != nil {
13070 var networkType string
13071 err = json.Unmarshal(*v, &networkType)
13072 if err != nil {
13073 return err
13074 }
13075 rptfip.NetworkType = &networkType
13076 }
13077 case "networkId":
13078 if v != nil {
13079 var networkID string
13080 err = json.Unmarshal(*v, &networkID)
13081 if err != nil {
13082 return err
13083 }
13084 rptfip.NetworkID = &networkID
13085 }
13086 case "skipTestFailoverCleanup":
13087 if v != nil {
13088 var skipTestFailoverCleanup string
13089 err = json.Unmarshal(*v, &skipTestFailoverCleanup)
13090 if err != nil {
13091 return err
13092 }
13093 rptfip.SkipTestFailoverCleanup = &skipTestFailoverCleanup
13094 }
13095 case "providerSpecificDetails":
13096 if v != nil {
13097 providerSpecificDetails, err := unmarshalBasicRecoveryPlanProviderSpecificFailoverInputArray(*v)
13098 if err != nil {
13099 return err
13100 }
13101 rptfip.ProviderSpecificDetails = &providerSpecificDetails
13102 }
13103 }
13104 }
13105
13106 return nil
13107 }
13108
13109
13110 type RecoveryPlanUnplannedFailoverInput struct {
13111
13112 Properties *RecoveryPlanUnplannedFailoverInputProperties `json:"properties,omitempty"`
13113 }
13114
13115
13116 type RecoveryPlanUnplannedFailoverInputProperties struct {
13117
13118 FailoverDirection PossibleOperationsDirections `json:"failoverDirection,omitempty"`
13119
13120 SourceSiteOperations SourceSiteOperations `json:"sourceSiteOperations,omitempty"`
13121
13122 ProviderSpecificDetails *[]BasicRecoveryPlanProviderSpecificFailoverInput `json:"providerSpecificDetails,omitempty"`
13123 }
13124
13125
13126 func (rpufip *RecoveryPlanUnplannedFailoverInputProperties) UnmarshalJSON(body []byte) error {
13127 var m map[string]*json.RawMessage
13128 err := json.Unmarshal(body, &m)
13129 if err != nil {
13130 return err
13131 }
13132 for k, v := range m {
13133 switch k {
13134 case "failoverDirection":
13135 if v != nil {
13136 var failoverDirection PossibleOperationsDirections
13137 err = json.Unmarshal(*v, &failoverDirection)
13138 if err != nil {
13139 return err
13140 }
13141 rpufip.FailoverDirection = failoverDirection
13142 }
13143 case "sourceSiteOperations":
13144 if v != nil {
13145 var sourceSiteOperations SourceSiteOperations
13146 err = json.Unmarshal(*v, &sourceSiteOperations)
13147 if err != nil {
13148 return err
13149 }
13150 rpufip.SourceSiteOperations = sourceSiteOperations
13151 }
13152 case "providerSpecificDetails":
13153 if v != nil {
13154 providerSpecificDetails, err := unmarshalBasicRecoveryPlanProviderSpecificFailoverInputArray(*v)
13155 if err != nil {
13156 return err
13157 }
13158 rpufip.ProviderSpecificDetails = &providerSpecificDetails
13159 }
13160 }
13161 }
13162
13163 return nil
13164 }
13165
13166
13167 type RecoveryPoint struct {
13168 autorest.Response `json:"-"`
13169
13170 Properties *RecoveryPointProperties `json:"properties,omitempty"`
13171
13172 ID *string `json:"id,omitempty"`
13173
13174 Name *string `json:"name,omitempty"`
13175
13176 Type *string `json:"type,omitempty"`
13177
13178 Location *string `json:"location,omitempty"`
13179 }
13180
13181
13182 func (rp RecoveryPoint) MarshalJSON() ([]byte, error) {
13183 objectMap := make(map[string]interface{})
13184 if rp.Properties != nil {
13185 objectMap["properties"] = rp.Properties
13186 }
13187 if rp.Location != nil {
13188 objectMap["location"] = rp.Location
13189 }
13190 return json.Marshal(objectMap)
13191 }
13192
13193
13194 type RecoveryPointCollection struct {
13195 autorest.Response `json:"-"`
13196
13197 Value *[]RecoveryPoint `json:"value,omitempty"`
13198
13199 NextLink *string `json:"nextLink,omitempty"`
13200 }
13201
13202
13203 type RecoveryPointCollectionIterator struct {
13204 i int
13205 page RecoveryPointCollectionPage
13206 }
13207
13208
13209
13210 func (iter *RecoveryPointCollectionIterator) NextWithContext(ctx context.Context) (err error) {
13211 if tracing.IsEnabled() {
13212 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPointCollectionIterator.NextWithContext")
13213 defer func() {
13214 sc := -1
13215 if iter.Response().Response.Response != nil {
13216 sc = iter.Response().Response.Response.StatusCode
13217 }
13218 tracing.EndSpan(ctx, sc, err)
13219 }()
13220 }
13221 iter.i++
13222 if iter.i < len(iter.page.Values()) {
13223 return nil
13224 }
13225 err = iter.page.NextWithContext(ctx)
13226 if err != nil {
13227 iter.i--
13228 return err
13229 }
13230 iter.i = 0
13231 return nil
13232 }
13233
13234
13235
13236
13237 func (iter *RecoveryPointCollectionIterator) Next() error {
13238 return iter.NextWithContext(context.Background())
13239 }
13240
13241
13242 func (iter RecoveryPointCollectionIterator) NotDone() bool {
13243 return iter.page.NotDone() && iter.i < len(iter.page.Values())
13244 }
13245
13246
13247 func (iter RecoveryPointCollectionIterator) Response() RecoveryPointCollection {
13248 return iter.page.Response()
13249 }
13250
13251
13252
13253 func (iter RecoveryPointCollectionIterator) Value() RecoveryPoint {
13254 if !iter.page.NotDone() {
13255 return RecoveryPoint{}
13256 }
13257 return iter.page.Values()[iter.i]
13258 }
13259
13260
13261 func NewRecoveryPointCollectionIterator(page RecoveryPointCollectionPage) RecoveryPointCollectionIterator {
13262 return RecoveryPointCollectionIterator{page: page}
13263 }
13264
13265
13266 func (RPCVar RecoveryPointCollection) IsEmpty() bool {
13267 return RPCVar.Value == nil || len(*RPCVar.Value) == 0
13268 }
13269
13270
13271 func (RPCVar RecoveryPointCollection) hasNextLink() bool {
13272 return RPCVar.NextLink != nil && len(*RPCVar.NextLink) != 0
13273 }
13274
13275
13276
13277 func (RPCVar RecoveryPointCollection) recoveryPointCollectionPreparer(ctx context.Context) (*http.Request, error) {
13278 if !RPCVar.hasNextLink() {
13279 return nil, nil
13280 }
13281 return autorest.Prepare((&http.Request{}).WithContext(ctx),
13282 autorest.AsJSON(),
13283 autorest.AsGet(),
13284 autorest.WithBaseURL(to.String(RPCVar.NextLink)))
13285 }
13286
13287
13288 type RecoveryPointCollectionPage struct {
13289 fn func(context.Context, RecoveryPointCollection) (RecoveryPointCollection, error)
13290 RPCVar RecoveryPointCollection
13291 }
13292
13293
13294
13295 func (page *RecoveryPointCollectionPage) NextWithContext(ctx context.Context) (err error) {
13296 if tracing.IsEnabled() {
13297 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPointCollectionPage.NextWithContext")
13298 defer func() {
13299 sc := -1
13300 if page.Response().Response.Response != nil {
13301 sc = page.Response().Response.Response.StatusCode
13302 }
13303 tracing.EndSpan(ctx, sc, err)
13304 }()
13305 }
13306 for {
13307 next, err := page.fn(ctx, page.RPCVar)
13308 if err != nil {
13309 return err
13310 }
13311 page.RPCVar = next
13312 if !next.hasNextLink() || !next.IsEmpty() {
13313 break
13314 }
13315 }
13316 return nil
13317 }
13318
13319
13320
13321
13322 func (page *RecoveryPointCollectionPage) Next() error {
13323 return page.NextWithContext(context.Background())
13324 }
13325
13326
13327 func (page RecoveryPointCollectionPage) NotDone() bool {
13328 return !page.RPCVar.IsEmpty()
13329 }
13330
13331
13332 func (page RecoveryPointCollectionPage) Response() RecoveryPointCollection {
13333 return page.RPCVar
13334 }
13335
13336
13337 func (page RecoveryPointCollectionPage) Values() []RecoveryPoint {
13338 if page.RPCVar.IsEmpty() {
13339 return nil
13340 }
13341 return *page.RPCVar.Value
13342 }
13343
13344
13345 func NewRecoveryPointCollectionPage(cur RecoveryPointCollection, getNextPage func(context.Context, RecoveryPointCollection) (RecoveryPointCollection, error)) RecoveryPointCollectionPage {
13346 return RecoveryPointCollectionPage{
13347 fn: getNextPage,
13348 RPCVar: cur,
13349 }
13350 }
13351
13352
13353 type RecoveryPointProperties struct {
13354
13355 RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"`
13356
13357 RecoveryPointType *string `json:"recoveryPointType,omitempty"`
13358
13359 ProviderSpecificDetails *ProviderSpecificRecoveryPointDetails `json:"providerSpecificDetails,omitempty"`
13360 }
13361
13362
13363 type RecoveryServicesProvider struct {
13364 autorest.Response `json:"-"`
13365
13366 Properties *RecoveryServicesProviderProperties `json:"properties,omitempty"`
13367
13368 ID *string `json:"id,omitempty"`
13369
13370 Name *string `json:"name,omitempty"`
13371
13372 Type *string `json:"type,omitempty"`
13373
13374 Location *string `json:"location,omitempty"`
13375 }
13376
13377
13378 func (rsp RecoveryServicesProvider) MarshalJSON() ([]byte, error) {
13379 objectMap := make(map[string]interface{})
13380 if rsp.Properties != nil {
13381 objectMap["properties"] = rsp.Properties
13382 }
13383 if rsp.Location != nil {
13384 objectMap["location"] = rsp.Location
13385 }
13386 return json.Marshal(objectMap)
13387 }
13388
13389
13390 type RecoveryServicesProviderCollection struct {
13391 autorest.Response `json:"-"`
13392
13393 Value *[]RecoveryServicesProvider `json:"value,omitempty"`
13394
13395 NextLink *string `json:"nextLink,omitempty"`
13396 }
13397
13398
13399
13400 type RecoveryServicesProviderCollectionIterator struct {
13401 i int
13402 page RecoveryServicesProviderCollectionPage
13403 }
13404
13405
13406
13407 func (iter *RecoveryServicesProviderCollectionIterator) NextWithContext(ctx context.Context) (err error) {
13408 if tracing.IsEnabled() {
13409 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryServicesProviderCollectionIterator.NextWithContext")
13410 defer func() {
13411 sc := -1
13412 if iter.Response().Response.Response != nil {
13413 sc = iter.Response().Response.Response.StatusCode
13414 }
13415 tracing.EndSpan(ctx, sc, err)
13416 }()
13417 }
13418 iter.i++
13419 if iter.i < len(iter.page.Values()) {
13420 return nil
13421 }
13422 err = iter.page.NextWithContext(ctx)
13423 if err != nil {
13424 iter.i--
13425 return err
13426 }
13427 iter.i = 0
13428 return nil
13429 }
13430
13431
13432
13433
13434 func (iter *RecoveryServicesProviderCollectionIterator) Next() error {
13435 return iter.NextWithContext(context.Background())
13436 }
13437
13438
13439 func (iter RecoveryServicesProviderCollectionIterator) NotDone() bool {
13440 return iter.page.NotDone() && iter.i < len(iter.page.Values())
13441 }
13442
13443
13444 func (iter RecoveryServicesProviderCollectionIterator) Response() RecoveryServicesProviderCollection {
13445 return iter.page.Response()
13446 }
13447
13448
13449
13450 func (iter RecoveryServicesProviderCollectionIterator) Value() RecoveryServicesProvider {
13451 if !iter.page.NotDone() {
13452 return RecoveryServicesProvider{}
13453 }
13454 return iter.page.Values()[iter.i]
13455 }
13456
13457
13458 func NewRecoveryServicesProviderCollectionIterator(page RecoveryServicesProviderCollectionPage) RecoveryServicesProviderCollectionIterator {
13459 return RecoveryServicesProviderCollectionIterator{page: page}
13460 }
13461
13462
13463 func (rspc RecoveryServicesProviderCollection) IsEmpty() bool {
13464 return rspc.Value == nil || len(*rspc.Value) == 0
13465 }
13466
13467
13468 func (rspc RecoveryServicesProviderCollection) hasNextLink() bool {
13469 return rspc.NextLink != nil && len(*rspc.NextLink) != 0
13470 }
13471
13472
13473
13474 func (rspc RecoveryServicesProviderCollection) recoveryServicesProviderCollectionPreparer(ctx context.Context) (*http.Request, error) {
13475 if !rspc.hasNextLink() {
13476 return nil, nil
13477 }
13478 return autorest.Prepare((&http.Request{}).WithContext(ctx),
13479 autorest.AsJSON(),
13480 autorest.AsGet(),
13481 autorest.WithBaseURL(to.String(rspc.NextLink)))
13482 }
13483
13484
13485 type RecoveryServicesProviderCollectionPage struct {
13486 fn func(context.Context, RecoveryServicesProviderCollection) (RecoveryServicesProviderCollection, error)
13487 rspc RecoveryServicesProviderCollection
13488 }
13489
13490
13491
13492 func (page *RecoveryServicesProviderCollectionPage) NextWithContext(ctx context.Context) (err error) {
13493 if tracing.IsEnabled() {
13494 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryServicesProviderCollectionPage.NextWithContext")
13495 defer func() {
13496 sc := -1
13497 if page.Response().Response.Response != nil {
13498 sc = page.Response().Response.Response.StatusCode
13499 }
13500 tracing.EndSpan(ctx, sc, err)
13501 }()
13502 }
13503 for {
13504 next, err := page.fn(ctx, page.rspc)
13505 if err != nil {
13506 return err
13507 }
13508 page.rspc = next
13509 if !next.hasNextLink() || !next.IsEmpty() {
13510 break
13511 }
13512 }
13513 return nil
13514 }
13515
13516
13517
13518
13519 func (page *RecoveryServicesProviderCollectionPage) Next() error {
13520 return page.NextWithContext(context.Background())
13521 }
13522
13523
13524 func (page RecoveryServicesProviderCollectionPage) NotDone() bool {
13525 return !page.rspc.IsEmpty()
13526 }
13527
13528
13529 func (page RecoveryServicesProviderCollectionPage) Response() RecoveryServicesProviderCollection {
13530 return page.rspc
13531 }
13532
13533
13534 func (page RecoveryServicesProviderCollectionPage) Values() []RecoveryServicesProvider {
13535 if page.rspc.IsEmpty() {
13536 return nil
13537 }
13538 return *page.rspc.Value
13539 }
13540
13541
13542 func NewRecoveryServicesProviderCollectionPage(cur RecoveryServicesProviderCollection, getNextPage func(context.Context, RecoveryServicesProviderCollection) (RecoveryServicesProviderCollection, error)) RecoveryServicesProviderCollectionPage {
13543 return RecoveryServicesProviderCollectionPage{
13544 fn: getNextPage,
13545 rspc: cur,
13546 }
13547 }
13548
13549
13550 type RecoveryServicesProviderProperties struct {
13551
13552 FabricType *string `json:"fabricType,omitempty"`
13553
13554 FriendlyName *string `json:"friendlyName,omitempty"`
13555
13556 ProviderVersion *string `json:"providerVersion,omitempty"`
13557
13558 ServerVersion *string `json:"serverVersion,omitempty"`
13559
13560 ProviderVersionState *string `json:"providerVersionState,omitempty"`
13561
13562 ProviderVersionExpiryDate *date.Time `json:"providerVersionExpiryDate,omitempty"`
13563
13564 FabricFriendlyName *string `json:"fabricFriendlyName,omitempty"`
13565
13566 LastHeartBeat *date.Time `json:"lastHeartBeat,omitempty"`
13567
13568 ConnectionStatus *string `json:"connectionStatus,omitempty"`
13569
13570 ProtectedItemCount *int32 `json:"protectedItemCount,omitempty"`
13571
13572 AllowedScenarios *[]string `json:"allowedScenarios,omitempty"`
13573
13574 HealthErrorDetails *[]HealthError `json:"healthErrorDetails,omitempty"`
13575
13576 DraIdentifier *string `json:"draIdentifier,omitempty"`
13577
13578 IdentityDetails *IdentityInformation `json:"identityDetails,omitempty"`
13579 }
13580
13581
13582 type RemoveProtectionContainerMappingInput struct {
13583
13584 Properties *RemoveProtectionContainerMappingInputProperties `json:"properties,omitempty"`
13585 }
13586
13587
13588 type RemoveProtectionContainerMappingInputProperties struct {
13589
13590 ProviderSpecificInput *ReplicationProviderContainerUnmappingInput `json:"providerSpecificInput,omitempty"`
13591 }
13592
13593
13594 type RenewCertificateInput struct {
13595
13596 Properties *RenewCertificateInputProperties `json:"properties,omitempty"`
13597 }
13598
13599
13600 type RenewCertificateInputProperties struct {
13601
13602 RenewCertificateType *string `json:"renewCertificateType,omitempty"`
13603 }
13604
13605
13606
13607 type ReplicationFabricsCheckConsistencyFuture struct {
13608 azure.FutureAPI
13609
13610
13611 Result func(ReplicationFabricsClient) (Fabric, error)
13612 }
13613
13614
13615 func (future *ReplicationFabricsCheckConsistencyFuture) UnmarshalJSON(body []byte) error {
13616 var azFuture azure.Future
13617 if err := json.Unmarshal(body, &azFuture); err != nil {
13618 return err
13619 }
13620 future.FutureAPI = &azFuture
13621 future.Result = future.result
13622 return nil
13623 }
13624
13625
13626 func (future *ReplicationFabricsCheckConsistencyFuture) result(client ReplicationFabricsClient) (f Fabric, err error) {
13627 var done bool
13628 done, err = future.DoneWithContext(context.Background(), client)
13629 if err != nil {
13630 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsCheckConsistencyFuture", "Result", future.Response(), "Polling failure")
13631 return
13632 }
13633 if !done {
13634 f.Response.Response = future.Response()
13635 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsCheckConsistencyFuture")
13636 return
13637 }
13638 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13639 if f.Response.Response, err = future.GetResult(sender); err == nil && f.Response.Response.StatusCode != http.StatusNoContent {
13640 f, err = client.CheckConsistencyResponder(f.Response.Response)
13641 if err != nil {
13642 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsCheckConsistencyFuture", "Result", f.Response.Response, "Failure responding to request")
13643 }
13644 }
13645 return
13646 }
13647
13648
13649
13650 type ReplicationFabricsCreateFuture struct {
13651 azure.FutureAPI
13652
13653
13654 Result func(ReplicationFabricsClient) (Fabric, error)
13655 }
13656
13657
13658 func (future *ReplicationFabricsCreateFuture) UnmarshalJSON(body []byte) error {
13659 var azFuture azure.Future
13660 if err := json.Unmarshal(body, &azFuture); err != nil {
13661 return err
13662 }
13663 future.FutureAPI = &azFuture
13664 future.Result = future.result
13665 return nil
13666 }
13667
13668
13669 func (future *ReplicationFabricsCreateFuture) result(client ReplicationFabricsClient) (f Fabric, err error) {
13670 var done bool
13671 done, err = future.DoneWithContext(context.Background(), client)
13672 if err != nil {
13673 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsCreateFuture", "Result", future.Response(), "Polling failure")
13674 return
13675 }
13676 if !done {
13677 f.Response.Response = future.Response()
13678 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsCreateFuture")
13679 return
13680 }
13681 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13682 if f.Response.Response, err = future.GetResult(sender); err == nil && f.Response.Response.StatusCode != http.StatusNoContent {
13683 f, err = client.CreateResponder(f.Response.Response)
13684 if err != nil {
13685 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsCreateFuture", "Result", f.Response.Response, "Failure responding to request")
13686 }
13687 }
13688 return
13689 }
13690
13691
13692
13693 type ReplicationFabricsDeleteFuture struct {
13694 azure.FutureAPI
13695
13696
13697 Result func(ReplicationFabricsClient) (autorest.Response, error)
13698 }
13699
13700
13701 func (future *ReplicationFabricsDeleteFuture) UnmarshalJSON(body []byte) error {
13702 var azFuture azure.Future
13703 if err := json.Unmarshal(body, &azFuture); err != nil {
13704 return err
13705 }
13706 future.FutureAPI = &azFuture
13707 future.Result = future.result
13708 return nil
13709 }
13710
13711
13712 func (future *ReplicationFabricsDeleteFuture) result(client ReplicationFabricsClient) (ar autorest.Response, err error) {
13713 var done bool
13714 done, err = future.DoneWithContext(context.Background(), client)
13715 if err != nil {
13716 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsDeleteFuture", "Result", future.Response(), "Polling failure")
13717 return
13718 }
13719 if !done {
13720 ar.Response = future.Response()
13721 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsDeleteFuture")
13722 return
13723 }
13724 ar.Response = future.Response()
13725 return
13726 }
13727
13728
13729
13730 type ReplicationFabricsMigrateToAadFuture struct {
13731 azure.FutureAPI
13732
13733
13734 Result func(ReplicationFabricsClient) (autorest.Response, error)
13735 }
13736
13737
13738 func (future *ReplicationFabricsMigrateToAadFuture) UnmarshalJSON(body []byte) error {
13739 var azFuture azure.Future
13740 if err := json.Unmarshal(body, &azFuture); err != nil {
13741 return err
13742 }
13743 future.FutureAPI = &azFuture
13744 future.Result = future.result
13745 return nil
13746 }
13747
13748
13749 func (future *ReplicationFabricsMigrateToAadFuture) result(client ReplicationFabricsClient) (ar autorest.Response, err error) {
13750 var done bool
13751 done, err = future.DoneWithContext(context.Background(), client)
13752 if err != nil {
13753 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsMigrateToAadFuture", "Result", future.Response(), "Polling failure")
13754 return
13755 }
13756 if !done {
13757 ar.Response = future.Response()
13758 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsMigrateToAadFuture")
13759 return
13760 }
13761 ar.Response = future.Response()
13762 return
13763 }
13764
13765
13766
13767 type ReplicationFabricsPurgeFuture struct {
13768 azure.FutureAPI
13769
13770
13771 Result func(ReplicationFabricsClient) (autorest.Response, error)
13772 }
13773
13774
13775 func (future *ReplicationFabricsPurgeFuture) UnmarshalJSON(body []byte) error {
13776 var azFuture azure.Future
13777 if err := json.Unmarshal(body, &azFuture); err != nil {
13778 return err
13779 }
13780 future.FutureAPI = &azFuture
13781 future.Result = future.result
13782 return nil
13783 }
13784
13785
13786 func (future *ReplicationFabricsPurgeFuture) result(client ReplicationFabricsClient) (ar autorest.Response, err error) {
13787 var done bool
13788 done, err = future.DoneWithContext(context.Background(), client)
13789 if err != nil {
13790 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsPurgeFuture", "Result", future.Response(), "Polling failure")
13791 return
13792 }
13793 if !done {
13794 ar.Response = future.Response()
13795 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsPurgeFuture")
13796 return
13797 }
13798 ar.Response = future.Response()
13799 return
13800 }
13801
13802
13803
13804 type ReplicationFabricsReassociateGatewayFuture struct {
13805 azure.FutureAPI
13806
13807
13808 Result func(ReplicationFabricsClient) (Fabric, error)
13809 }
13810
13811
13812 func (future *ReplicationFabricsReassociateGatewayFuture) UnmarshalJSON(body []byte) error {
13813 var azFuture azure.Future
13814 if err := json.Unmarshal(body, &azFuture); err != nil {
13815 return err
13816 }
13817 future.FutureAPI = &azFuture
13818 future.Result = future.result
13819 return nil
13820 }
13821
13822
13823 func (future *ReplicationFabricsReassociateGatewayFuture) result(client ReplicationFabricsClient) (f Fabric, err error) {
13824 var done bool
13825 done, err = future.DoneWithContext(context.Background(), client)
13826 if err != nil {
13827 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsReassociateGatewayFuture", "Result", future.Response(), "Polling failure")
13828 return
13829 }
13830 if !done {
13831 f.Response.Response = future.Response()
13832 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsReassociateGatewayFuture")
13833 return
13834 }
13835 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13836 if f.Response.Response, err = future.GetResult(sender); err == nil && f.Response.Response.StatusCode != http.StatusNoContent {
13837 f, err = client.ReassociateGatewayResponder(f.Response.Response)
13838 if err != nil {
13839 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsReassociateGatewayFuture", "Result", f.Response.Response, "Failure responding to request")
13840 }
13841 }
13842 return
13843 }
13844
13845
13846
13847 type ReplicationFabricsRenewCertificateFuture struct {
13848 azure.FutureAPI
13849
13850
13851 Result func(ReplicationFabricsClient) (Fabric, error)
13852 }
13853
13854
13855 func (future *ReplicationFabricsRenewCertificateFuture) UnmarshalJSON(body []byte) error {
13856 var azFuture azure.Future
13857 if err := json.Unmarshal(body, &azFuture); err != nil {
13858 return err
13859 }
13860 future.FutureAPI = &azFuture
13861 future.Result = future.result
13862 return nil
13863 }
13864
13865
13866 func (future *ReplicationFabricsRenewCertificateFuture) result(client ReplicationFabricsClient) (f Fabric, err error) {
13867 var done bool
13868 done, err = future.DoneWithContext(context.Background(), client)
13869 if err != nil {
13870 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsRenewCertificateFuture", "Result", future.Response(), "Polling failure")
13871 return
13872 }
13873 if !done {
13874 f.Response.Response = future.Response()
13875 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsRenewCertificateFuture")
13876 return
13877 }
13878 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13879 if f.Response.Response, err = future.GetResult(sender); err == nil && f.Response.Response.StatusCode != http.StatusNoContent {
13880 f, err = client.RenewCertificateResponder(f.Response.Response)
13881 if err != nil {
13882 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsRenewCertificateFuture", "Result", f.Response.Response, "Failure responding to request")
13883 }
13884 }
13885 return
13886 }
13887
13888
13889 type ReplicationGroupDetails struct {
13890
13891 InstanceType InstanceTypeBasicConfigurationSettings `json:"instanceType,omitempty"`
13892 }
13893
13894
13895 func (rgd ReplicationGroupDetails) MarshalJSON() ([]byte, error) {
13896 rgd.InstanceType = InstanceTypeReplicationGroupDetails
13897 objectMap := make(map[string]interface{})
13898 if rgd.InstanceType != "" {
13899 objectMap["instanceType"] = rgd.InstanceType
13900 }
13901 return json.Marshal(objectMap)
13902 }
13903
13904
13905 func (rgd ReplicationGroupDetails) AsHyperVVirtualMachineDetails() (*HyperVVirtualMachineDetails, bool) {
13906 return nil, false
13907 }
13908
13909
13910 func (rgd ReplicationGroupDetails) AsVMwareVirtualMachineDetails() (*VMwareVirtualMachineDetails, bool) {
13911 return nil, false
13912 }
13913
13914
13915 func (rgd ReplicationGroupDetails) AsReplicationGroupDetails() (*ReplicationGroupDetails, bool) {
13916 return &rgd, true
13917 }
13918
13919
13920 func (rgd ReplicationGroupDetails) AsConfigurationSettings() (*ConfigurationSettings, bool) {
13921 return nil, false
13922 }
13923
13924
13925 func (rgd ReplicationGroupDetails) AsBasicConfigurationSettings() (BasicConfigurationSettings, bool) {
13926 return &rgd, true
13927 }
13928
13929
13930
13931 type ReplicationJobsCancelFuture struct {
13932 azure.FutureAPI
13933
13934
13935 Result func(ReplicationJobsClient) (Job, error)
13936 }
13937
13938
13939 func (future *ReplicationJobsCancelFuture) UnmarshalJSON(body []byte) error {
13940 var azFuture azure.Future
13941 if err := json.Unmarshal(body, &azFuture); err != nil {
13942 return err
13943 }
13944 future.FutureAPI = &azFuture
13945 future.Result = future.result
13946 return nil
13947 }
13948
13949
13950 func (future *ReplicationJobsCancelFuture) result(client ReplicationJobsClient) (j Job, err error) {
13951 var done bool
13952 done, err = future.DoneWithContext(context.Background(), client)
13953 if err != nil {
13954 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsCancelFuture", "Result", future.Response(), "Polling failure")
13955 return
13956 }
13957 if !done {
13958 j.Response.Response = future.Response()
13959 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationJobsCancelFuture")
13960 return
13961 }
13962 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13963 if j.Response.Response, err = future.GetResult(sender); err == nil && j.Response.Response.StatusCode != http.StatusNoContent {
13964 j, err = client.CancelResponder(j.Response.Response)
13965 if err != nil {
13966 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsCancelFuture", "Result", j.Response.Response, "Failure responding to request")
13967 }
13968 }
13969 return
13970 }
13971
13972
13973
13974 type ReplicationJobsExportFuture struct {
13975 azure.FutureAPI
13976
13977
13978 Result func(ReplicationJobsClient) (Job, error)
13979 }
13980
13981
13982 func (future *ReplicationJobsExportFuture) UnmarshalJSON(body []byte) error {
13983 var azFuture azure.Future
13984 if err := json.Unmarshal(body, &azFuture); err != nil {
13985 return err
13986 }
13987 future.FutureAPI = &azFuture
13988 future.Result = future.result
13989 return nil
13990 }
13991
13992
13993 func (future *ReplicationJobsExportFuture) result(client ReplicationJobsClient) (j Job, err error) {
13994 var done bool
13995 done, err = future.DoneWithContext(context.Background(), client)
13996 if err != nil {
13997 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsExportFuture", "Result", future.Response(), "Polling failure")
13998 return
13999 }
14000 if !done {
14001 j.Response.Response = future.Response()
14002 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationJobsExportFuture")
14003 return
14004 }
14005 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14006 if j.Response.Response, err = future.GetResult(sender); err == nil && j.Response.Response.StatusCode != http.StatusNoContent {
14007 j, err = client.ExportResponder(j.Response.Response)
14008 if err != nil {
14009 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsExportFuture", "Result", j.Response.Response, "Failure responding to request")
14010 }
14011 }
14012 return
14013 }
14014
14015
14016
14017 type ReplicationJobsRestartFuture struct {
14018 azure.FutureAPI
14019
14020
14021 Result func(ReplicationJobsClient) (Job, error)
14022 }
14023
14024
14025 func (future *ReplicationJobsRestartFuture) UnmarshalJSON(body []byte) error {
14026 var azFuture azure.Future
14027 if err := json.Unmarshal(body, &azFuture); err != nil {
14028 return err
14029 }
14030 future.FutureAPI = &azFuture
14031 future.Result = future.result
14032 return nil
14033 }
14034
14035
14036 func (future *ReplicationJobsRestartFuture) result(client ReplicationJobsClient) (j Job, err error) {
14037 var done bool
14038 done, err = future.DoneWithContext(context.Background(), client)
14039 if err != nil {
14040 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsRestartFuture", "Result", future.Response(), "Polling failure")
14041 return
14042 }
14043 if !done {
14044 j.Response.Response = future.Response()
14045 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationJobsRestartFuture")
14046 return
14047 }
14048 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14049 if j.Response.Response, err = future.GetResult(sender); err == nil && j.Response.Response.StatusCode != http.StatusNoContent {
14050 j, err = client.RestartResponder(j.Response.Response)
14051 if err != nil {
14052 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsRestartFuture", "Result", j.Response.Response, "Failure responding to request")
14053 }
14054 }
14055 return
14056 }
14057
14058
14059
14060 type ReplicationJobsResumeFuture struct {
14061 azure.FutureAPI
14062
14063
14064 Result func(ReplicationJobsClient) (Job, error)
14065 }
14066
14067
14068 func (future *ReplicationJobsResumeFuture) UnmarshalJSON(body []byte) error {
14069 var azFuture azure.Future
14070 if err := json.Unmarshal(body, &azFuture); err != nil {
14071 return err
14072 }
14073 future.FutureAPI = &azFuture
14074 future.Result = future.result
14075 return nil
14076 }
14077
14078
14079 func (future *ReplicationJobsResumeFuture) result(client ReplicationJobsClient) (j Job, err error) {
14080 var done bool
14081 done, err = future.DoneWithContext(context.Background(), client)
14082 if err != nil {
14083 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsResumeFuture", "Result", future.Response(), "Polling failure")
14084 return
14085 }
14086 if !done {
14087 j.Response.Response = future.Response()
14088 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationJobsResumeFuture")
14089 return
14090 }
14091 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14092 if j.Response.Response, err = future.GetResult(sender); err == nil && j.Response.Response.StatusCode != http.StatusNoContent {
14093 j, err = client.ResumeResponder(j.Response.Response)
14094 if err != nil {
14095 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsResumeFuture", "Result", j.Response.Response, "Failure responding to request")
14096 }
14097 }
14098 return
14099 }
14100
14101
14102
14103 type ReplicationNetworkMappingsCreateFuture struct {
14104 azure.FutureAPI
14105
14106
14107 Result func(ReplicationNetworkMappingsClient) (NetworkMapping, error)
14108 }
14109
14110
14111 func (future *ReplicationNetworkMappingsCreateFuture) UnmarshalJSON(body []byte) error {
14112 var azFuture azure.Future
14113 if err := json.Unmarshal(body, &azFuture); err != nil {
14114 return err
14115 }
14116 future.FutureAPI = &azFuture
14117 future.Result = future.result
14118 return nil
14119 }
14120
14121
14122 func (future *ReplicationNetworkMappingsCreateFuture) result(client ReplicationNetworkMappingsClient) (nm NetworkMapping, err error) {
14123 var done bool
14124 done, err = future.DoneWithContext(context.Background(), client)
14125 if err != nil {
14126 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsCreateFuture", "Result", future.Response(), "Polling failure")
14127 return
14128 }
14129 if !done {
14130 nm.Response.Response = future.Response()
14131 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationNetworkMappingsCreateFuture")
14132 return
14133 }
14134 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14135 if nm.Response.Response, err = future.GetResult(sender); err == nil && nm.Response.Response.StatusCode != http.StatusNoContent {
14136 nm, err = client.CreateResponder(nm.Response.Response)
14137 if err != nil {
14138 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsCreateFuture", "Result", nm.Response.Response, "Failure responding to request")
14139 }
14140 }
14141 return
14142 }
14143
14144
14145
14146 type ReplicationNetworkMappingsDeleteFuture struct {
14147 azure.FutureAPI
14148
14149
14150 Result func(ReplicationNetworkMappingsClient) (autorest.Response, error)
14151 }
14152
14153
14154 func (future *ReplicationNetworkMappingsDeleteFuture) UnmarshalJSON(body []byte) error {
14155 var azFuture azure.Future
14156 if err := json.Unmarshal(body, &azFuture); err != nil {
14157 return err
14158 }
14159 future.FutureAPI = &azFuture
14160 future.Result = future.result
14161 return nil
14162 }
14163
14164
14165 func (future *ReplicationNetworkMappingsDeleteFuture) result(client ReplicationNetworkMappingsClient) (ar autorest.Response, err error) {
14166 var done bool
14167 done, err = future.DoneWithContext(context.Background(), client)
14168 if err != nil {
14169 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsDeleteFuture", "Result", future.Response(), "Polling failure")
14170 return
14171 }
14172 if !done {
14173 ar.Response = future.Response()
14174 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationNetworkMappingsDeleteFuture")
14175 return
14176 }
14177 ar.Response = future.Response()
14178 return
14179 }
14180
14181
14182
14183 type ReplicationNetworkMappingsUpdateFuture struct {
14184 azure.FutureAPI
14185
14186
14187 Result func(ReplicationNetworkMappingsClient) (NetworkMapping, error)
14188 }
14189
14190
14191 func (future *ReplicationNetworkMappingsUpdateFuture) UnmarshalJSON(body []byte) error {
14192 var azFuture azure.Future
14193 if err := json.Unmarshal(body, &azFuture); err != nil {
14194 return err
14195 }
14196 future.FutureAPI = &azFuture
14197 future.Result = future.result
14198 return nil
14199 }
14200
14201
14202 func (future *ReplicationNetworkMappingsUpdateFuture) result(client ReplicationNetworkMappingsClient) (nm NetworkMapping, err error) {
14203 var done bool
14204 done, err = future.DoneWithContext(context.Background(), client)
14205 if err != nil {
14206 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsUpdateFuture", "Result", future.Response(), "Polling failure")
14207 return
14208 }
14209 if !done {
14210 nm.Response.Response = future.Response()
14211 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationNetworkMappingsUpdateFuture")
14212 return
14213 }
14214 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14215 if nm.Response.Response, err = future.GetResult(sender); err == nil && nm.Response.Response.StatusCode != http.StatusNoContent {
14216 nm, err = client.UpdateResponder(nm.Response.Response)
14217 if err != nil {
14218 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsUpdateFuture", "Result", nm.Response.Response, "Failure responding to request")
14219 }
14220 }
14221 return
14222 }
14223
14224
14225
14226 type ReplicationPoliciesCreateFuture struct {
14227 azure.FutureAPI
14228
14229
14230 Result func(ReplicationPoliciesClient) (Policy, error)
14231 }
14232
14233
14234 func (future *ReplicationPoliciesCreateFuture) UnmarshalJSON(body []byte) error {
14235 var azFuture azure.Future
14236 if err := json.Unmarshal(body, &azFuture); err != nil {
14237 return err
14238 }
14239 future.FutureAPI = &azFuture
14240 future.Result = future.result
14241 return nil
14242 }
14243
14244
14245 func (future *ReplicationPoliciesCreateFuture) result(client ReplicationPoliciesClient) (p Policy, err error) {
14246 var done bool
14247 done, err = future.DoneWithContext(context.Background(), client)
14248 if err != nil {
14249 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesCreateFuture", "Result", future.Response(), "Polling failure")
14250 return
14251 }
14252 if !done {
14253 p.Response.Response = future.Response()
14254 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationPoliciesCreateFuture")
14255 return
14256 }
14257 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14258 if p.Response.Response, err = future.GetResult(sender); err == nil && p.Response.Response.StatusCode != http.StatusNoContent {
14259 p, err = client.CreateResponder(p.Response.Response)
14260 if err != nil {
14261 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesCreateFuture", "Result", p.Response.Response, "Failure responding to request")
14262 }
14263 }
14264 return
14265 }
14266
14267
14268
14269 type ReplicationPoliciesDeleteFuture struct {
14270 azure.FutureAPI
14271
14272
14273 Result func(ReplicationPoliciesClient) (autorest.Response, error)
14274 }
14275
14276
14277 func (future *ReplicationPoliciesDeleteFuture) UnmarshalJSON(body []byte) error {
14278 var azFuture azure.Future
14279 if err := json.Unmarshal(body, &azFuture); err != nil {
14280 return err
14281 }
14282 future.FutureAPI = &azFuture
14283 future.Result = future.result
14284 return nil
14285 }
14286
14287
14288 func (future *ReplicationPoliciesDeleteFuture) result(client ReplicationPoliciesClient) (ar autorest.Response, err error) {
14289 var done bool
14290 done, err = future.DoneWithContext(context.Background(), client)
14291 if err != nil {
14292 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
14293 return
14294 }
14295 if !done {
14296 ar.Response = future.Response()
14297 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationPoliciesDeleteFuture")
14298 return
14299 }
14300 ar.Response = future.Response()
14301 return
14302 }
14303
14304
14305
14306 type ReplicationPoliciesUpdateFuture struct {
14307 azure.FutureAPI
14308
14309
14310 Result func(ReplicationPoliciesClient) (Policy, error)
14311 }
14312
14313
14314 func (future *ReplicationPoliciesUpdateFuture) UnmarshalJSON(body []byte) error {
14315 var azFuture azure.Future
14316 if err := json.Unmarshal(body, &azFuture); err != nil {
14317 return err
14318 }
14319 future.FutureAPI = &azFuture
14320 future.Result = future.result
14321 return nil
14322 }
14323
14324
14325 func (future *ReplicationPoliciesUpdateFuture) result(client ReplicationPoliciesClient) (p Policy, err error) {
14326 var done bool
14327 done, err = future.DoneWithContext(context.Background(), client)
14328 if err != nil {
14329 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesUpdateFuture", "Result", future.Response(), "Polling failure")
14330 return
14331 }
14332 if !done {
14333 p.Response.Response = future.Response()
14334 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationPoliciesUpdateFuture")
14335 return
14336 }
14337 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14338 if p.Response.Response, err = future.GetResult(sender); err == nil && p.Response.Response.StatusCode != http.StatusNoContent {
14339 p, err = client.UpdateResponder(p.Response.Response)
14340 if err != nil {
14341 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesUpdateFuture", "Result", p.Response.Response, "Failure responding to request")
14342 }
14343 }
14344 return
14345 }
14346
14347
14348 type ReplicationProtectedItem struct {
14349 autorest.Response `json:"-"`
14350
14351 Properties *ReplicationProtectedItemProperties `json:"properties,omitempty"`
14352
14353 ID *string `json:"id,omitempty"`
14354
14355 Name *string `json:"name,omitempty"`
14356
14357 Type *string `json:"type,omitempty"`
14358
14359 Location *string `json:"location,omitempty"`
14360 }
14361
14362
14363 func (rpi ReplicationProtectedItem) MarshalJSON() ([]byte, error) {
14364 objectMap := make(map[string]interface{})
14365 if rpi.Properties != nil {
14366 objectMap["properties"] = rpi.Properties
14367 }
14368 if rpi.Location != nil {
14369 objectMap["location"] = rpi.Location
14370 }
14371 return json.Marshal(objectMap)
14372 }
14373
14374
14375 type ReplicationProtectedItemCollection struct {
14376 autorest.Response `json:"-"`
14377
14378 Value *[]ReplicationProtectedItem `json:"value,omitempty"`
14379
14380 NextLink *string `json:"nextLink,omitempty"`
14381 }
14382
14383
14384
14385 type ReplicationProtectedItemCollectionIterator struct {
14386 i int
14387 page ReplicationProtectedItemCollectionPage
14388 }
14389
14390
14391
14392 func (iter *ReplicationProtectedItemCollectionIterator) NextWithContext(ctx context.Context) (err error) {
14393 if tracing.IsEnabled() {
14394 ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectedItemCollectionIterator.NextWithContext")
14395 defer func() {
14396 sc := -1
14397 if iter.Response().Response.Response != nil {
14398 sc = iter.Response().Response.Response.StatusCode
14399 }
14400 tracing.EndSpan(ctx, sc, err)
14401 }()
14402 }
14403 iter.i++
14404 if iter.i < len(iter.page.Values()) {
14405 return nil
14406 }
14407 err = iter.page.NextWithContext(ctx)
14408 if err != nil {
14409 iter.i--
14410 return err
14411 }
14412 iter.i = 0
14413 return nil
14414 }
14415
14416
14417
14418
14419 func (iter *ReplicationProtectedItemCollectionIterator) Next() error {
14420 return iter.NextWithContext(context.Background())
14421 }
14422
14423
14424 func (iter ReplicationProtectedItemCollectionIterator) NotDone() bool {
14425 return iter.page.NotDone() && iter.i < len(iter.page.Values())
14426 }
14427
14428
14429 func (iter ReplicationProtectedItemCollectionIterator) Response() ReplicationProtectedItemCollection {
14430 return iter.page.Response()
14431 }
14432
14433
14434
14435 func (iter ReplicationProtectedItemCollectionIterator) Value() ReplicationProtectedItem {
14436 if !iter.page.NotDone() {
14437 return ReplicationProtectedItem{}
14438 }
14439 return iter.page.Values()[iter.i]
14440 }
14441
14442
14443 func NewReplicationProtectedItemCollectionIterator(page ReplicationProtectedItemCollectionPage) ReplicationProtectedItemCollectionIterator {
14444 return ReplicationProtectedItemCollectionIterator{page: page}
14445 }
14446
14447
14448 func (rpic ReplicationProtectedItemCollection) IsEmpty() bool {
14449 return rpic.Value == nil || len(*rpic.Value) == 0
14450 }
14451
14452
14453 func (rpic ReplicationProtectedItemCollection) hasNextLink() bool {
14454 return rpic.NextLink != nil && len(*rpic.NextLink) != 0
14455 }
14456
14457
14458
14459 func (rpic ReplicationProtectedItemCollection) replicationProtectedItemCollectionPreparer(ctx context.Context) (*http.Request, error) {
14460 if !rpic.hasNextLink() {
14461 return nil, nil
14462 }
14463 return autorest.Prepare((&http.Request{}).WithContext(ctx),
14464 autorest.AsJSON(),
14465 autorest.AsGet(),
14466 autorest.WithBaseURL(to.String(rpic.NextLink)))
14467 }
14468
14469
14470 type ReplicationProtectedItemCollectionPage struct {
14471 fn func(context.Context, ReplicationProtectedItemCollection) (ReplicationProtectedItemCollection, error)
14472 rpic ReplicationProtectedItemCollection
14473 }
14474
14475
14476
14477 func (page *ReplicationProtectedItemCollectionPage) NextWithContext(ctx context.Context) (err error) {
14478 if tracing.IsEnabled() {
14479 ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectedItemCollectionPage.NextWithContext")
14480 defer func() {
14481 sc := -1
14482 if page.Response().Response.Response != nil {
14483 sc = page.Response().Response.Response.StatusCode
14484 }
14485 tracing.EndSpan(ctx, sc, err)
14486 }()
14487 }
14488 for {
14489 next, err := page.fn(ctx, page.rpic)
14490 if err != nil {
14491 return err
14492 }
14493 page.rpic = next
14494 if !next.hasNextLink() || !next.IsEmpty() {
14495 break
14496 }
14497 }
14498 return nil
14499 }
14500
14501
14502
14503
14504 func (page *ReplicationProtectedItemCollectionPage) Next() error {
14505 return page.NextWithContext(context.Background())
14506 }
14507
14508
14509 func (page ReplicationProtectedItemCollectionPage) NotDone() bool {
14510 return !page.rpic.IsEmpty()
14511 }
14512
14513
14514 func (page ReplicationProtectedItemCollectionPage) Response() ReplicationProtectedItemCollection {
14515 return page.rpic
14516 }
14517
14518
14519 func (page ReplicationProtectedItemCollectionPage) Values() []ReplicationProtectedItem {
14520 if page.rpic.IsEmpty() {
14521 return nil
14522 }
14523 return *page.rpic.Value
14524 }
14525
14526
14527 func NewReplicationProtectedItemCollectionPage(cur ReplicationProtectedItemCollection, getNextPage func(context.Context, ReplicationProtectedItemCollection) (ReplicationProtectedItemCollection, error)) ReplicationProtectedItemCollectionPage {
14528 return ReplicationProtectedItemCollectionPage{
14529 fn: getNextPage,
14530 rpic: cur,
14531 }
14532 }
14533
14534
14535 type ReplicationProtectedItemProperties struct {
14536
14537 FriendlyName *string `json:"friendlyName,omitempty"`
14538
14539 ProtectedItemType *string `json:"protectedItemType,omitempty"`
14540
14541 ProtectableItemID *string `json:"protectableItemId,omitempty"`
14542
14543 RecoveryServicesProviderID *string `json:"recoveryServicesProviderId,omitempty"`
14544
14545 PrimaryFabricFriendlyName *string `json:"primaryFabricFriendlyName,omitempty"`
14546
14547 RecoveryFabricFriendlyName *string `json:"recoveryFabricFriendlyName,omitempty"`
14548
14549 RecoveryFabricID *string `json:"recoveryFabricId,omitempty"`
14550
14551 PrimaryProtectionContainerFriendlyName *string `json:"primaryProtectionContainerFriendlyName,omitempty"`
14552
14553 RecoveryProtectionContainerFriendlyName *string `json:"recoveryProtectionContainerFriendlyName,omitempty"`
14554
14555 ProtectionState *string `json:"protectionState,omitempty"`
14556
14557 ProtectionStateDescription *string `json:"protectionStateDescription,omitempty"`
14558
14559 ActiveLocation *string `json:"activeLocation,omitempty"`
14560
14561 TestFailoverState *string `json:"testFailoverState,omitempty"`
14562
14563 TestFailoverStateDescription *string `json:"testFailoverStateDescription,omitempty"`
14564
14565 AllowedOperations *[]string `json:"allowedOperations,omitempty"`
14566
14567 ReplicationHealth *string `json:"replicationHealth,omitempty"`
14568
14569 FailoverHealth *string `json:"failoverHealth,omitempty"`
14570
14571 ReplicationHealthErrors *[]HealthError `json:"replicationHealthErrors,omitempty"`
14572
14573 FailoverHealthErrors *[]HealthError `json:"failoverHealthErrors,omitempty"`
14574
14575 PolicyID *string `json:"policyId,omitempty"`
14576
14577 PolicyFriendlyName *string `json:"policyFriendlyName,omitempty"`
14578
14579 LastSuccessfulFailoverTime *date.Time `json:"lastSuccessfulFailoverTime,omitempty"`
14580
14581 LastSuccessfulTestFailoverTime *date.Time `json:"lastSuccessfulTestFailoverTime,omitempty"`
14582
14583 CurrentScenario *CurrentScenarioDetails `json:"currentScenario,omitempty"`
14584
14585 FailoverRecoveryPointID *string `json:"failoverRecoveryPointId,omitempty"`
14586
14587 ProviderSpecificDetails BasicReplicationProviderSpecificSettings `json:"providerSpecificDetails,omitempty"`
14588
14589 RecoveryContainerID *string `json:"recoveryContainerId,omitempty"`
14590 }
14591
14592
14593 func (rpip *ReplicationProtectedItemProperties) UnmarshalJSON(body []byte) error {
14594 var m map[string]*json.RawMessage
14595 err := json.Unmarshal(body, &m)
14596 if err != nil {
14597 return err
14598 }
14599 for k, v := range m {
14600 switch k {
14601 case "friendlyName":
14602 if v != nil {
14603 var friendlyName string
14604 err = json.Unmarshal(*v, &friendlyName)
14605 if err != nil {
14606 return err
14607 }
14608 rpip.FriendlyName = &friendlyName
14609 }
14610 case "protectedItemType":
14611 if v != nil {
14612 var protectedItemType string
14613 err = json.Unmarshal(*v, &protectedItemType)
14614 if err != nil {
14615 return err
14616 }
14617 rpip.ProtectedItemType = &protectedItemType
14618 }
14619 case "protectableItemId":
14620 if v != nil {
14621 var protectableItemID string
14622 err = json.Unmarshal(*v, &protectableItemID)
14623 if err != nil {
14624 return err
14625 }
14626 rpip.ProtectableItemID = &protectableItemID
14627 }
14628 case "recoveryServicesProviderId":
14629 if v != nil {
14630 var recoveryServicesProviderID string
14631 err = json.Unmarshal(*v, &recoveryServicesProviderID)
14632 if err != nil {
14633 return err
14634 }
14635 rpip.RecoveryServicesProviderID = &recoveryServicesProviderID
14636 }
14637 case "primaryFabricFriendlyName":
14638 if v != nil {
14639 var primaryFabricFriendlyName string
14640 err = json.Unmarshal(*v, &primaryFabricFriendlyName)
14641 if err != nil {
14642 return err
14643 }
14644 rpip.PrimaryFabricFriendlyName = &primaryFabricFriendlyName
14645 }
14646 case "recoveryFabricFriendlyName":
14647 if v != nil {
14648 var recoveryFabricFriendlyName string
14649 err = json.Unmarshal(*v, &recoveryFabricFriendlyName)
14650 if err != nil {
14651 return err
14652 }
14653 rpip.RecoveryFabricFriendlyName = &recoveryFabricFriendlyName
14654 }
14655 case "recoveryFabricId":
14656 if v != nil {
14657 var recoveryFabricID string
14658 err = json.Unmarshal(*v, &recoveryFabricID)
14659 if err != nil {
14660 return err
14661 }
14662 rpip.RecoveryFabricID = &recoveryFabricID
14663 }
14664 case "primaryProtectionContainerFriendlyName":
14665 if v != nil {
14666 var primaryProtectionContainerFriendlyName string
14667 err = json.Unmarshal(*v, &primaryProtectionContainerFriendlyName)
14668 if err != nil {
14669 return err
14670 }
14671 rpip.PrimaryProtectionContainerFriendlyName = &primaryProtectionContainerFriendlyName
14672 }
14673 case "recoveryProtectionContainerFriendlyName":
14674 if v != nil {
14675 var recoveryProtectionContainerFriendlyName string
14676 err = json.Unmarshal(*v, &recoveryProtectionContainerFriendlyName)
14677 if err != nil {
14678 return err
14679 }
14680 rpip.RecoveryProtectionContainerFriendlyName = &recoveryProtectionContainerFriendlyName
14681 }
14682 case "protectionState":
14683 if v != nil {
14684 var protectionState string
14685 err = json.Unmarshal(*v, &protectionState)
14686 if err != nil {
14687 return err
14688 }
14689 rpip.ProtectionState = &protectionState
14690 }
14691 case "protectionStateDescription":
14692 if v != nil {
14693 var protectionStateDescription string
14694 err = json.Unmarshal(*v, &protectionStateDescription)
14695 if err != nil {
14696 return err
14697 }
14698 rpip.ProtectionStateDescription = &protectionStateDescription
14699 }
14700 case "activeLocation":
14701 if v != nil {
14702 var activeLocation string
14703 err = json.Unmarshal(*v, &activeLocation)
14704 if err != nil {
14705 return err
14706 }
14707 rpip.ActiveLocation = &activeLocation
14708 }
14709 case "testFailoverState":
14710 if v != nil {
14711 var testFailoverState string
14712 err = json.Unmarshal(*v, &testFailoverState)
14713 if err != nil {
14714 return err
14715 }
14716 rpip.TestFailoverState = &testFailoverState
14717 }
14718 case "testFailoverStateDescription":
14719 if v != nil {
14720 var testFailoverStateDescription string
14721 err = json.Unmarshal(*v, &testFailoverStateDescription)
14722 if err != nil {
14723 return err
14724 }
14725 rpip.TestFailoverStateDescription = &testFailoverStateDescription
14726 }
14727 case "allowedOperations":
14728 if v != nil {
14729 var allowedOperations []string
14730 err = json.Unmarshal(*v, &allowedOperations)
14731 if err != nil {
14732 return err
14733 }
14734 rpip.AllowedOperations = &allowedOperations
14735 }
14736 case "replicationHealth":
14737 if v != nil {
14738 var replicationHealth string
14739 err = json.Unmarshal(*v, &replicationHealth)
14740 if err != nil {
14741 return err
14742 }
14743 rpip.ReplicationHealth = &replicationHealth
14744 }
14745 case "failoverHealth":
14746 if v != nil {
14747 var failoverHealth string
14748 err = json.Unmarshal(*v, &failoverHealth)
14749 if err != nil {
14750 return err
14751 }
14752 rpip.FailoverHealth = &failoverHealth
14753 }
14754 case "replicationHealthErrors":
14755 if v != nil {
14756 var replicationHealthErrors []HealthError
14757 err = json.Unmarshal(*v, &replicationHealthErrors)
14758 if err != nil {
14759 return err
14760 }
14761 rpip.ReplicationHealthErrors = &replicationHealthErrors
14762 }
14763 case "failoverHealthErrors":
14764 if v != nil {
14765 var failoverHealthErrors []HealthError
14766 err = json.Unmarshal(*v, &failoverHealthErrors)
14767 if err != nil {
14768 return err
14769 }
14770 rpip.FailoverHealthErrors = &failoverHealthErrors
14771 }
14772 case "policyId":
14773 if v != nil {
14774 var policyID string
14775 err = json.Unmarshal(*v, &policyID)
14776 if err != nil {
14777 return err
14778 }
14779 rpip.PolicyID = &policyID
14780 }
14781 case "policyFriendlyName":
14782 if v != nil {
14783 var policyFriendlyName string
14784 err = json.Unmarshal(*v, &policyFriendlyName)
14785 if err != nil {
14786 return err
14787 }
14788 rpip.PolicyFriendlyName = &policyFriendlyName
14789 }
14790 case "lastSuccessfulFailoverTime":
14791 if v != nil {
14792 var lastSuccessfulFailoverTime date.Time
14793 err = json.Unmarshal(*v, &lastSuccessfulFailoverTime)
14794 if err != nil {
14795 return err
14796 }
14797 rpip.LastSuccessfulFailoverTime = &lastSuccessfulFailoverTime
14798 }
14799 case "lastSuccessfulTestFailoverTime":
14800 if v != nil {
14801 var lastSuccessfulTestFailoverTime date.Time
14802 err = json.Unmarshal(*v, &lastSuccessfulTestFailoverTime)
14803 if err != nil {
14804 return err
14805 }
14806 rpip.LastSuccessfulTestFailoverTime = &lastSuccessfulTestFailoverTime
14807 }
14808 case "currentScenario":
14809 if v != nil {
14810 var currentScenario CurrentScenarioDetails
14811 err = json.Unmarshal(*v, ¤tScenario)
14812 if err != nil {
14813 return err
14814 }
14815 rpip.CurrentScenario = ¤tScenario
14816 }
14817 case "failoverRecoveryPointId":
14818 if v != nil {
14819 var failoverRecoveryPointID string
14820 err = json.Unmarshal(*v, &failoverRecoveryPointID)
14821 if err != nil {
14822 return err
14823 }
14824 rpip.FailoverRecoveryPointID = &failoverRecoveryPointID
14825 }
14826 case "providerSpecificDetails":
14827 if v != nil {
14828 providerSpecificDetails, err := unmarshalBasicReplicationProviderSpecificSettings(*v)
14829 if err != nil {
14830 return err
14831 }
14832 rpip.ProviderSpecificDetails = providerSpecificDetails
14833 }
14834 case "recoveryContainerId":
14835 if v != nil {
14836 var recoveryContainerID string
14837 err = json.Unmarshal(*v, &recoveryContainerID)
14838 if err != nil {
14839 return err
14840 }
14841 rpip.RecoveryContainerID = &recoveryContainerID
14842 }
14843 }
14844 }
14845
14846 return nil
14847 }
14848
14849
14850
14851 type ReplicationProtectedItemsApplyRecoveryPointFuture struct {
14852 azure.FutureAPI
14853
14854
14855 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error)
14856 }
14857
14858
14859 func (future *ReplicationProtectedItemsApplyRecoveryPointFuture) UnmarshalJSON(body []byte) error {
14860 var azFuture azure.Future
14861 if err := json.Unmarshal(body, &azFuture); err != nil {
14862 return err
14863 }
14864 future.FutureAPI = &azFuture
14865 future.Result = future.result
14866 return nil
14867 }
14868
14869
14870 func (future *ReplicationProtectedItemsApplyRecoveryPointFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
14871 var done bool
14872 done, err = future.DoneWithContext(context.Background(), client)
14873 if err != nil {
14874 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsApplyRecoveryPointFuture", "Result", future.Response(), "Polling failure")
14875 return
14876 }
14877 if !done {
14878 rpi.Response.Response = future.Response()
14879 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsApplyRecoveryPointFuture")
14880 return
14881 }
14882 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14883 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
14884 rpi, err = client.ApplyRecoveryPointResponder(rpi.Response.Response)
14885 if err != nil {
14886 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsApplyRecoveryPointFuture", "Result", rpi.Response.Response, "Failure responding to request")
14887 }
14888 }
14889 return
14890 }
14891
14892
14893
14894 type ReplicationProtectedItemsCreateFuture struct {
14895 azure.FutureAPI
14896
14897
14898 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error)
14899 }
14900
14901
14902 func (future *ReplicationProtectedItemsCreateFuture) UnmarshalJSON(body []byte) error {
14903 var azFuture azure.Future
14904 if err := json.Unmarshal(body, &azFuture); err != nil {
14905 return err
14906 }
14907 future.FutureAPI = &azFuture
14908 future.Result = future.result
14909 return nil
14910 }
14911
14912
14913 func (future *ReplicationProtectedItemsCreateFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
14914 var done bool
14915 done, err = future.DoneWithContext(context.Background(), client)
14916 if err != nil {
14917 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsCreateFuture", "Result", future.Response(), "Polling failure")
14918 return
14919 }
14920 if !done {
14921 rpi.Response.Response = future.Response()
14922 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsCreateFuture")
14923 return
14924 }
14925 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14926 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
14927 rpi, err = client.CreateResponder(rpi.Response.Response)
14928 if err != nil {
14929 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsCreateFuture", "Result", rpi.Response.Response, "Failure responding to request")
14930 }
14931 }
14932 return
14933 }
14934
14935
14936
14937 type ReplicationProtectedItemsDeleteFuture struct {
14938 azure.FutureAPI
14939
14940
14941 Result func(ReplicationProtectedItemsClient) (autorest.Response, error)
14942 }
14943
14944
14945 func (future *ReplicationProtectedItemsDeleteFuture) UnmarshalJSON(body []byte) error {
14946 var azFuture azure.Future
14947 if err := json.Unmarshal(body, &azFuture); err != nil {
14948 return err
14949 }
14950 future.FutureAPI = &azFuture
14951 future.Result = future.result
14952 return nil
14953 }
14954
14955
14956 func (future *ReplicationProtectedItemsDeleteFuture) result(client ReplicationProtectedItemsClient) (ar autorest.Response, err error) {
14957 var done bool
14958 done, err = future.DoneWithContext(context.Background(), client)
14959 if err != nil {
14960 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsDeleteFuture", "Result", future.Response(), "Polling failure")
14961 return
14962 }
14963 if !done {
14964 ar.Response = future.Response()
14965 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsDeleteFuture")
14966 return
14967 }
14968 ar.Response = future.Response()
14969 return
14970 }
14971
14972
14973
14974 type ReplicationProtectedItemsFailoverCommitFuture struct {
14975 azure.FutureAPI
14976
14977
14978 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error)
14979 }
14980
14981
14982 func (future *ReplicationProtectedItemsFailoverCommitFuture) UnmarshalJSON(body []byte) error {
14983 var azFuture azure.Future
14984 if err := json.Unmarshal(body, &azFuture); err != nil {
14985 return err
14986 }
14987 future.FutureAPI = &azFuture
14988 future.Result = future.result
14989 return nil
14990 }
14991
14992
14993 func (future *ReplicationProtectedItemsFailoverCommitFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
14994 var done bool
14995 done, err = future.DoneWithContext(context.Background(), client)
14996 if err != nil {
14997 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsFailoverCommitFuture", "Result", future.Response(), "Polling failure")
14998 return
14999 }
15000 if !done {
15001 rpi.Response.Response = future.Response()
15002 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsFailoverCommitFuture")
15003 return
15004 }
15005 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15006 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
15007 rpi, err = client.FailoverCommitResponder(rpi.Response.Response)
15008 if err != nil {
15009 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsFailoverCommitFuture", "Result", rpi.Response.Response, "Failure responding to request")
15010 }
15011 }
15012 return
15013 }
15014
15015
15016
15017 type ReplicationProtectedItemsPlannedFailoverFuture struct {
15018 azure.FutureAPI
15019
15020
15021 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error)
15022 }
15023
15024
15025 func (future *ReplicationProtectedItemsPlannedFailoverFuture) UnmarshalJSON(body []byte) error {
15026 var azFuture azure.Future
15027 if err := json.Unmarshal(body, &azFuture); err != nil {
15028 return err
15029 }
15030 future.FutureAPI = &azFuture
15031 future.Result = future.result
15032 return nil
15033 }
15034
15035
15036 func (future *ReplicationProtectedItemsPlannedFailoverFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
15037 var done bool
15038 done, err = future.DoneWithContext(context.Background(), client)
15039 if err != nil {
15040 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsPlannedFailoverFuture", "Result", future.Response(), "Polling failure")
15041 return
15042 }
15043 if !done {
15044 rpi.Response.Response = future.Response()
15045 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsPlannedFailoverFuture")
15046 return
15047 }
15048 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15049 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
15050 rpi, err = client.PlannedFailoverResponder(rpi.Response.Response)
15051 if err != nil {
15052 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsPlannedFailoverFuture", "Result", rpi.Response.Response, "Failure responding to request")
15053 }
15054 }
15055 return
15056 }
15057
15058
15059
15060 type ReplicationProtectedItemsPurgeFuture struct {
15061 azure.FutureAPI
15062
15063
15064 Result func(ReplicationProtectedItemsClient) (autorest.Response, error)
15065 }
15066
15067
15068 func (future *ReplicationProtectedItemsPurgeFuture) UnmarshalJSON(body []byte) error {
15069 var azFuture azure.Future
15070 if err := json.Unmarshal(body, &azFuture); err != nil {
15071 return err
15072 }
15073 future.FutureAPI = &azFuture
15074 future.Result = future.result
15075 return nil
15076 }
15077
15078
15079 func (future *ReplicationProtectedItemsPurgeFuture) result(client ReplicationProtectedItemsClient) (ar autorest.Response, err error) {
15080 var done bool
15081 done, err = future.DoneWithContext(context.Background(), client)
15082 if err != nil {
15083 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsPurgeFuture", "Result", future.Response(), "Polling failure")
15084 return
15085 }
15086 if !done {
15087 ar.Response = future.Response()
15088 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsPurgeFuture")
15089 return
15090 }
15091 ar.Response = future.Response()
15092 return
15093 }
15094
15095
15096
15097 type ReplicationProtectedItemsRepairReplicationFuture struct {
15098 azure.FutureAPI
15099
15100
15101 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error)
15102 }
15103
15104
15105 func (future *ReplicationProtectedItemsRepairReplicationFuture) UnmarshalJSON(body []byte) error {
15106 var azFuture azure.Future
15107 if err := json.Unmarshal(body, &azFuture); err != nil {
15108 return err
15109 }
15110 future.FutureAPI = &azFuture
15111 future.Result = future.result
15112 return nil
15113 }
15114
15115
15116 func (future *ReplicationProtectedItemsRepairReplicationFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
15117 var done bool
15118 done, err = future.DoneWithContext(context.Background(), client)
15119 if err != nil {
15120 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsRepairReplicationFuture", "Result", future.Response(), "Polling failure")
15121 return
15122 }
15123 if !done {
15124 rpi.Response.Response = future.Response()
15125 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsRepairReplicationFuture")
15126 return
15127 }
15128 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15129 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
15130 rpi, err = client.RepairReplicationResponder(rpi.Response.Response)
15131 if err != nil {
15132 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsRepairReplicationFuture", "Result", rpi.Response.Response, "Failure responding to request")
15133 }
15134 }
15135 return
15136 }
15137
15138
15139
15140 type ReplicationProtectedItemsReprotectFuture struct {
15141 azure.FutureAPI
15142
15143
15144 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error)
15145 }
15146
15147
15148 func (future *ReplicationProtectedItemsReprotectFuture) UnmarshalJSON(body []byte) error {
15149 var azFuture azure.Future
15150 if err := json.Unmarshal(body, &azFuture); err != nil {
15151 return err
15152 }
15153 future.FutureAPI = &azFuture
15154 future.Result = future.result
15155 return nil
15156 }
15157
15158
15159 func (future *ReplicationProtectedItemsReprotectFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
15160 var done bool
15161 done, err = future.DoneWithContext(context.Background(), client)
15162 if err != nil {
15163 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsReprotectFuture", "Result", future.Response(), "Polling failure")
15164 return
15165 }
15166 if !done {
15167 rpi.Response.Response = future.Response()
15168 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsReprotectFuture")
15169 return
15170 }
15171 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15172 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
15173 rpi, err = client.ReprotectResponder(rpi.Response.Response)
15174 if err != nil {
15175 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsReprotectFuture", "Result", rpi.Response.Response, "Failure responding to request")
15176 }
15177 }
15178 return
15179 }
15180
15181
15182
15183 type ReplicationProtectedItemsTestFailoverCleanupFuture struct {
15184 azure.FutureAPI
15185
15186
15187 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error)
15188 }
15189
15190
15191 func (future *ReplicationProtectedItemsTestFailoverCleanupFuture) UnmarshalJSON(body []byte) error {
15192 var azFuture azure.Future
15193 if err := json.Unmarshal(body, &azFuture); err != nil {
15194 return err
15195 }
15196 future.FutureAPI = &azFuture
15197 future.Result = future.result
15198 return nil
15199 }
15200
15201
15202 func (future *ReplicationProtectedItemsTestFailoverCleanupFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
15203 var done bool
15204 done, err = future.DoneWithContext(context.Background(), client)
15205 if err != nil {
15206 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsTestFailoverCleanupFuture", "Result", future.Response(), "Polling failure")
15207 return
15208 }
15209 if !done {
15210 rpi.Response.Response = future.Response()
15211 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsTestFailoverCleanupFuture")
15212 return
15213 }
15214 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15215 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
15216 rpi, err = client.TestFailoverCleanupResponder(rpi.Response.Response)
15217 if err != nil {
15218 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsTestFailoverCleanupFuture", "Result", rpi.Response.Response, "Failure responding to request")
15219 }
15220 }
15221 return
15222 }
15223
15224
15225
15226 type ReplicationProtectedItemsTestFailoverFuture struct {
15227 azure.FutureAPI
15228
15229
15230 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error)
15231 }
15232
15233
15234 func (future *ReplicationProtectedItemsTestFailoverFuture) UnmarshalJSON(body []byte) error {
15235 var azFuture azure.Future
15236 if err := json.Unmarshal(body, &azFuture); err != nil {
15237 return err
15238 }
15239 future.FutureAPI = &azFuture
15240 future.Result = future.result
15241 return nil
15242 }
15243
15244
15245 func (future *ReplicationProtectedItemsTestFailoverFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
15246 var done bool
15247 done, err = future.DoneWithContext(context.Background(), client)
15248 if err != nil {
15249 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsTestFailoverFuture", "Result", future.Response(), "Polling failure")
15250 return
15251 }
15252 if !done {
15253 rpi.Response.Response = future.Response()
15254 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsTestFailoverFuture")
15255 return
15256 }
15257 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15258 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
15259 rpi, err = client.TestFailoverResponder(rpi.Response.Response)
15260 if err != nil {
15261 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsTestFailoverFuture", "Result", rpi.Response.Response, "Failure responding to request")
15262 }
15263 }
15264 return
15265 }
15266
15267
15268
15269 type ReplicationProtectedItemsUnplannedFailoverFuture struct {
15270 azure.FutureAPI
15271
15272
15273 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error)
15274 }
15275
15276
15277 func (future *ReplicationProtectedItemsUnplannedFailoverFuture) UnmarshalJSON(body []byte) error {
15278 var azFuture azure.Future
15279 if err := json.Unmarshal(body, &azFuture); err != nil {
15280 return err
15281 }
15282 future.FutureAPI = &azFuture
15283 future.Result = future.result
15284 return nil
15285 }
15286
15287
15288 func (future *ReplicationProtectedItemsUnplannedFailoverFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
15289 var done bool
15290 done, err = future.DoneWithContext(context.Background(), client)
15291 if err != nil {
15292 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUnplannedFailoverFuture", "Result", future.Response(), "Polling failure")
15293 return
15294 }
15295 if !done {
15296 rpi.Response.Response = future.Response()
15297 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsUnplannedFailoverFuture")
15298 return
15299 }
15300 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15301 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
15302 rpi, err = client.UnplannedFailoverResponder(rpi.Response.Response)
15303 if err != nil {
15304 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUnplannedFailoverFuture", "Result", rpi.Response.Response, "Failure responding to request")
15305 }
15306 }
15307 return
15308 }
15309
15310
15311
15312 type ReplicationProtectedItemsUpdateFuture struct {
15313 azure.FutureAPI
15314
15315
15316 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error)
15317 }
15318
15319
15320 func (future *ReplicationProtectedItemsUpdateFuture) UnmarshalJSON(body []byte) error {
15321 var azFuture azure.Future
15322 if err := json.Unmarshal(body, &azFuture); err != nil {
15323 return err
15324 }
15325 future.FutureAPI = &azFuture
15326 future.Result = future.result
15327 return nil
15328 }
15329
15330
15331 func (future *ReplicationProtectedItemsUpdateFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
15332 var done bool
15333 done, err = future.DoneWithContext(context.Background(), client)
15334 if err != nil {
15335 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUpdateFuture", "Result", future.Response(), "Polling failure")
15336 return
15337 }
15338 if !done {
15339 rpi.Response.Response = future.Response()
15340 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsUpdateFuture")
15341 return
15342 }
15343 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15344 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
15345 rpi, err = client.UpdateResponder(rpi.Response.Response)
15346 if err != nil {
15347 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUpdateFuture", "Result", rpi.Response.Response, "Failure responding to request")
15348 }
15349 }
15350 return
15351 }
15352
15353
15354
15355 type ReplicationProtectedItemsUpdateMobilityServiceFuture struct {
15356 azure.FutureAPI
15357
15358
15359 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error)
15360 }
15361
15362
15363 func (future *ReplicationProtectedItemsUpdateMobilityServiceFuture) UnmarshalJSON(body []byte) error {
15364 var azFuture azure.Future
15365 if err := json.Unmarshal(body, &azFuture); err != nil {
15366 return err
15367 }
15368 future.FutureAPI = &azFuture
15369 future.Result = future.result
15370 return nil
15371 }
15372
15373
15374 func (future *ReplicationProtectedItemsUpdateMobilityServiceFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
15375 var done bool
15376 done, err = future.DoneWithContext(context.Background(), client)
15377 if err != nil {
15378 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUpdateMobilityServiceFuture", "Result", future.Response(), "Polling failure")
15379 return
15380 }
15381 if !done {
15382 rpi.Response.Response = future.Response()
15383 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsUpdateMobilityServiceFuture")
15384 return
15385 }
15386 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15387 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
15388 rpi, err = client.UpdateMobilityServiceResponder(rpi.Response.Response)
15389 if err != nil {
15390 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUpdateMobilityServiceFuture", "Result", rpi.Response.Response, "Failure responding to request")
15391 }
15392 }
15393 return
15394 }
15395
15396
15397
15398 type ReplicationProtectionContainerMappingsCreateFuture struct {
15399 azure.FutureAPI
15400
15401
15402 Result func(ReplicationProtectionContainerMappingsClient) (ProtectionContainerMapping, error)
15403 }
15404
15405
15406 func (future *ReplicationProtectionContainerMappingsCreateFuture) UnmarshalJSON(body []byte) error {
15407 var azFuture azure.Future
15408 if err := json.Unmarshal(body, &azFuture); err != nil {
15409 return err
15410 }
15411 future.FutureAPI = &azFuture
15412 future.Result = future.result
15413 return nil
15414 }
15415
15416
15417 func (future *ReplicationProtectionContainerMappingsCreateFuture) result(client ReplicationProtectionContainerMappingsClient) (pcm ProtectionContainerMapping, err error) {
15418 var done bool
15419 done, err = future.DoneWithContext(context.Background(), client)
15420 if err != nil {
15421 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsCreateFuture", "Result", future.Response(), "Polling failure")
15422 return
15423 }
15424 if !done {
15425 pcm.Response.Response = future.Response()
15426 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainerMappingsCreateFuture")
15427 return
15428 }
15429 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15430 if pcm.Response.Response, err = future.GetResult(sender); err == nil && pcm.Response.Response.StatusCode != http.StatusNoContent {
15431 pcm, err = client.CreateResponder(pcm.Response.Response)
15432 if err != nil {
15433 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsCreateFuture", "Result", pcm.Response.Response, "Failure responding to request")
15434 }
15435 }
15436 return
15437 }
15438
15439
15440
15441 type ReplicationProtectionContainerMappingsDeleteFuture struct {
15442 azure.FutureAPI
15443
15444
15445 Result func(ReplicationProtectionContainerMappingsClient) (autorest.Response, error)
15446 }
15447
15448
15449 func (future *ReplicationProtectionContainerMappingsDeleteFuture) UnmarshalJSON(body []byte) error {
15450 var azFuture azure.Future
15451 if err := json.Unmarshal(body, &azFuture); err != nil {
15452 return err
15453 }
15454 future.FutureAPI = &azFuture
15455 future.Result = future.result
15456 return nil
15457 }
15458
15459
15460 func (future *ReplicationProtectionContainerMappingsDeleteFuture) result(client ReplicationProtectionContainerMappingsClient) (ar autorest.Response, err error) {
15461 var done bool
15462 done, err = future.DoneWithContext(context.Background(), client)
15463 if err != nil {
15464 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsDeleteFuture", "Result", future.Response(), "Polling failure")
15465 return
15466 }
15467 if !done {
15468 ar.Response = future.Response()
15469 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainerMappingsDeleteFuture")
15470 return
15471 }
15472 ar.Response = future.Response()
15473 return
15474 }
15475
15476
15477
15478 type ReplicationProtectionContainerMappingsPurgeFuture struct {
15479 azure.FutureAPI
15480
15481
15482 Result func(ReplicationProtectionContainerMappingsClient) (autorest.Response, error)
15483 }
15484
15485
15486 func (future *ReplicationProtectionContainerMappingsPurgeFuture) UnmarshalJSON(body []byte) error {
15487 var azFuture azure.Future
15488 if err := json.Unmarshal(body, &azFuture); err != nil {
15489 return err
15490 }
15491 future.FutureAPI = &azFuture
15492 future.Result = future.result
15493 return nil
15494 }
15495
15496
15497 func (future *ReplicationProtectionContainerMappingsPurgeFuture) result(client ReplicationProtectionContainerMappingsClient) (ar autorest.Response, err error) {
15498 var done bool
15499 done, err = future.DoneWithContext(context.Background(), client)
15500 if err != nil {
15501 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsPurgeFuture", "Result", future.Response(), "Polling failure")
15502 return
15503 }
15504 if !done {
15505 ar.Response = future.Response()
15506 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainerMappingsPurgeFuture")
15507 return
15508 }
15509 ar.Response = future.Response()
15510 return
15511 }
15512
15513
15514
15515 type ReplicationProtectionContainersCreateFuture struct {
15516 azure.FutureAPI
15517
15518
15519 Result func(ReplicationProtectionContainersClient) (ProtectionContainer, error)
15520 }
15521
15522
15523 func (future *ReplicationProtectionContainersCreateFuture) UnmarshalJSON(body []byte) error {
15524 var azFuture azure.Future
15525 if err := json.Unmarshal(body, &azFuture); err != nil {
15526 return err
15527 }
15528 future.FutureAPI = &azFuture
15529 future.Result = future.result
15530 return nil
15531 }
15532
15533
15534 func (future *ReplicationProtectionContainersCreateFuture) result(client ReplicationProtectionContainersClient) (pc ProtectionContainer, err error) {
15535 var done bool
15536 done, err = future.DoneWithContext(context.Background(), client)
15537 if err != nil {
15538 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersCreateFuture", "Result", future.Response(), "Polling failure")
15539 return
15540 }
15541 if !done {
15542 pc.Response.Response = future.Response()
15543 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainersCreateFuture")
15544 return
15545 }
15546 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15547 if pc.Response.Response, err = future.GetResult(sender); err == nil && pc.Response.Response.StatusCode != http.StatusNoContent {
15548 pc, err = client.CreateResponder(pc.Response.Response)
15549 if err != nil {
15550 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersCreateFuture", "Result", pc.Response.Response, "Failure responding to request")
15551 }
15552 }
15553 return
15554 }
15555
15556
15557
15558 type ReplicationProtectionContainersDeleteFuture struct {
15559 azure.FutureAPI
15560
15561
15562 Result func(ReplicationProtectionContainersClient) (autorest.Response, error)
15563 }
15564
15565
15566 func (future *ReplicationProtectionContainersDeleteFuture) UnmarshalJSON(body []byte) error {
15567 var azFuture azure.Future
15568 if err := json.Unmarshal(body, &azFuture); err != nil {
15569 return err
15570 }
15571 future.FutureAPI = &azFuture
15572 future.Result = future.result
15573 return nil
15574 }
15575
15576
15577 func (future *ReplicationProtectionContainersDeleteFuture) result(client ReplicationProtectionContainersClient) (ar autorest.Response, err error) {
15578 var done bool
15579 done, err = future.DoneWithContext(context.Background(), client)
15580 if err != nil {
15581 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersDeleteFuture", "Result", future.Response(), "Polling failure")
15582 return
15583 }
15584 if !done {
15585 ar.Response = future.Response()
15586 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainersDeleteFuture")
15587 return
15588 }
15589 ar.Response = future.Response()
15590 return
15591 }
15592
15593
15594
15595 type ReplicationProtectionContainersDiscoverProtectableItemFuture struct {
15596 azure.FutureAPI
15597
15598
15599 Result func(ReplicationProtectionContainersClient) (ProtectionContainer, error)
15600 }
15601
15602
15603 func (future *ReplicationProtectionContainersDiscoverProtectableItemFuture) UnmarshalJSON(body []byte) error {
15604 var azFuture azure.Future
15605 if err := json.Unmarshal(body, &azFuture); err != nil {
15606 return err
15607 }
15608 future.FutureAPI = &azFuture
15609 future.Result = future.result
15610 return nil
15611 }
15612
15613
15614 func (future *ReplicationProtectionContainersDiscoverProtectableItemFuture) result(client ReplicationProtectionContainersClient) (pc ProtectionContainer, err error) {
15615 var done bool
15616 done, err = future.DoneWithContext(context.Background(), client)
15617 if err != nil {
15618 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersDiscoverProtectableItemFuture", "Result", future.Response(), "Polling failure")
15619 return
15620 }
15621 if !done {
15622 pc.Response.Response = future.Response()
15623 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainersDiscoverProtectableItemFuture")
15624 return
15625 }
15626 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15627 if pc.Response.Response, err = future.GetResult(sender); err == nil && pc.Response.Response.StatusCode != http.StatusNoContent {
15628 pc, err = client.DiscoverProtectableItemResponder(pc.Response.Response)
15629 if err != nil {
15630 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersDiscoverProtectableItemFuture", "Result", pc.Response.Response, "Failure responding to request")
15631 }
15632 }
15633 return
15634 }
15635
15636
15637
15638 type ReplicationProtectionContainersSwitchProtectionFuture struct {
15639 azure.FutureAPI
15640
15641
15642 Result func(ReplicationProtectionContainersClient) (ProtectionContainer, error)
15643 }
15644
15645
15646 func (future *ReplicationProtectionContainersSwitchProtectionFuture) UnmarshalJSON(body []byte) error {
15647 var azFuture azure.Future
15648 if err := json.Unmarshal(body, &azFuture); err != nil {
15649 return err
15650 }
15651 future.FutureAPI = &azFuture
15652 future.Result = future.result
15653 return nil
15654 }
15655
15656
15657 func (future *ReplicationProtectionContainersSwitchProtectionFuture) result(client ReplicationProtectionContainersClient) (pc ProtectionContainer, err error) {
15658 var done bool
15659 done, err = future.DoneWithContext(context.Background(), client)
15660 if err != nil {
15661 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersSwitchProtectionFuture", "Result", future.Response(), "Polling failure")
15662 return
15663 }
15664 if !done {
15665 pc.Response.Response = future.Response()
15666 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainersSwitchProtectionFuture")
15667 return
15668 }
15669 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15670 if pc.Response.Response, err = future.GetResult(sender); err == nil && pc.Response.Response.StatusCode != http.StatusNoContent {
15671 pc, err = client.SwitchProtectionResponder(pc.Response.Response)
15672 if err != nil {
15673 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersSwitchProtectionFuture", "Result", pc.Response.Response, "Failure responding to request")
15674 }
15675 }
15676 return
15677 }
15678
15679
15680 type ReplicationProviderContainerUnmappingInput struct {
15681
15682 InstanceType *string `json:"instanceType,omitempty"`
15683 }
15684
15685
15686 type BasicReplicationProviderSpecificContainerCreationInput interface {
15687 AsA2AContainerCreationInput() (*A2AContainerCreationInput, bool)
15688 AsReplicationProviderSpecificContainerCreationInput() (*ReplicationProviderSpecificContainerCreationInput, bool)
15689 }
15690
15691
15692 type ReplicationProviderSpecificContainerCreationInput struct {
15693
15694 InstanceType InstanceTypeBasicReplicationProviderSpecificContainerCreationInput `json:"instanceType,omitempty"`
15695 }
15696
15697 func unmarshalBasicReplicationProviderSpecificContainerCreationInput(body []byte) (BasicReplicationProviderSpecificContainerCreationInput, error) {
15698 var m map[string]interface{}
15699 err := json.Unmarshal(body, &m)
15700 if err != nil {
15701 return nil, err
15702 }
15703
15704 switch m["instanceType"] {
15705 case string(InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeA2A):
15706 var acci A2AContainerCreationInput
15707 err := json.Unmarshal(body, &acci)
15708 return acci, err
15709 default:
15710 var rpscci ReplicationProviderSpecificContainerCreationInput
15711 err := json.Unmarshal(body, &rpscci)
15712 return rpscci, err
15713 }
15714 }
15715 func unmarshalBasicReplicationProviderSpecificContainerCreationInputArray(body []byte) ([]BasicReplicationProviderSpecificContainerCreationInput, error) {
15716 var rawMessages []*json.RawMessage
15717 err := json.Unmarshal(body, &rawMessages)
15718 if err != nil {
15719 return nil, err
15720 }
15721
15722 rpscciArray := make([]BasicReplicationProviderSpecificContainerCreationInput, len(rawMessages))
15723
15724 for index, rawMessage := range rawMessages {
15725 rpscci, err := unmarshalBasicReplicationProviderSpecificContainerCreationInput(*rawMessage)
15726 if err != nil {
15727 return nil, err
15728 }
15729 rpscciArray[index] = rpscci
15730 }
15731 return rpscciArray, nil
15732 }
15733
15734
15735 func (rpscci ReplicationProviderSpecificContainerCreationInput) MarshalJSON() ([]byte, error) {
15736 rpscci.InstanceType = InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeReplicationProviderSpecificContainerCreationInput
15737 objectMap := make(map[string]interface{})
15738 if rpscci.InstanceType != "" {
15739 objectMap["instanceType"] = rpscci.InstanceType
15740 }
15741 return json.Marshal(objectMap)
15742 }
15743
15744
15745 func (rpscci ReplicationProviderSpecificContainerCreationInput) AsA2AContainerCreationInput() (*A2AContainerCreationInput, bool) {
15746 return nil, false
15747 }
15748
15749
15750 func (rpscci ReplicationProviderSpecificContainerCreationInput) AsReplicationProviderSpecificContainerCreationInput() (*ReplicationProviderSpecificContainerCreationInput, bool) {
15751 return &rpscci, true
15752 }
15753
15754
15755 func (rpscci ReplicationProviderSpecificContainerCreationInput) AsBasicReplicationProviderSpecificContainerCreationInput() (BasicReplicationProviderSpecificContainerCreationInput, bool) {
15756 return &rpscci, true
15757 }
15758
15759
15760 type ReplicationProviderSpecificContainerMappingInput struct {
15761
15762 InstanceType *string `json:"instanceType,omitempty"`
15763 }
15764
15765
15766 type BasicReplicationProviderSpecificSettings interface {
15767 AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool)
15768 AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool)
15769 AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool)
15770 AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool)
15771 AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool)
15772 AsInMageReplicationDetails() (*InMageReplicationDetails, bool)
15773 AsA2AReplicationDetails() (*A2AReplicationDetails, bool)
15774 AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool)
15775 }
15776
15777
15778 type ReplicationProviderSpecificSettings struct {
15779
15780 InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"`
15781 }
15782
15783 func unmarshalBasicReplicationProviderSpecificSettings(body []byte) (BasicReplicationProviderSpecificSettings, error) {
15784 var m map[string]interface{}
15785 err := json.Unmarshal(body, &m)
15786 if err != nil {
15787 return nil, err
15788 }
15789
15790 switch m["instanceType"] {
15791 case string(InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaBaseReplicationDetails):
15792 var hvrbrd HyperVReplicaBaseReplicationDetails
15793 err := json.Unmarshal(body, &hvrbrd)
15794 return hvrbrd, err
15795 case string(InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012):
15796 var hvrrd HyperVReplicaReplicationDetails
15797 err := json.Unmarshal(body, &hvrrd)
15798 return hvrrd, err
15799 case string(InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012R2):
15800 var hvrbrd HyperVReplicaBlueReplicationDetails
15801 err := json.Unmarshal(body, &hvrbrd)
15802 return hvrbrd, err
15803 case string(InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaAzure):
15804 var hvrard HyperVReplicaAzureReplicationDetails
15805 err := json.Unmarshal(body, &hvrard)
15806 return hvrard, err
15807 case string(InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMageAzureV2):
15808 var imavrd InMageAzureV2ReplicationDetails
15809 err := json.Unmarshal(body, &imavrd)
15810 return imavrd, err
15811 case string(InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMage):
15812 var imrd InMageReplicationDetails
15813 err := json.Unmarshal(body, &imrd)
15814 return imrd, err
15815 case string(InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeA2A):
15816 var ard A2AReplicationDetails
15817 err := json.Unmarshal(body, &ard)
15818 return ard, err
15819 default:
15820 var rpss ReplicationProviderSpecificSettings
15821 err := json.Unmarshal(body, &rpss)
15822 return rpss, err
15823 }
15824 }
15825 func unmarshalBasicReplicationProviderSpecificSettingsArray(body []byte) ([]BasicReplicationProviderSpecificSettings, error) {
15826 var rawMessages []*json.RawMessage
15827 err := json.Unmarshal(body, &rawMessages)
15828 if err != nil {
15829 return nil, err
15830 }
15831
15832 rpssArray := make([]BasicReplicationProviderSpecificSettings, len(rawMessages))
15833
15834 for index, rawMessage := range rawMessages {
15835 rpss, err := unmarshalBasicReplicationProviderSpecificSettings(*rawMessage)
15836 if err != nil {
15837 return nil, err
15838 }
15839 rpssArray[index] = rpss
15840 }
15841 return rpssArray, nil
15842 }
15843
15844
15845 func (rpss ReplicationProviderSpecificSettings) MarshalJSON() ([]byte, error) {
15846 rpss.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeReplicationProviderSpecificSettings
15847 objectMap := make(map[string]interface{})
15848 if rpss.InstanceType != "" {
15849 objectMap["instanceType"] = rpss.InstanceType
15850 }
15851 return json.Marshal(objectMap)
15852 }
15853
15854
15855 func (rpss ReplicationProviderSpecificSettings) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) {
15856 return nil, false
15857 }
15858
15859
15860 func (rpss ReplicationProviderSpecificSettings) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) {
15861 return nil, false
15862 }
15863
15864
15865 func (rpss ReplicationProviderSpecificSettings) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) {
15866 return nil, false
15867 }
15868
15869
15870 func (rpss ReplicationProviderSpecificSettings) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) {
15871 return nil, false
15872 }
15873
15874
15875 func (rpss ReplicationProviderSpecificSettings) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) {
15876 return nil, false
15877 }
15878
15879
15880 func (rpss ReplicationProviderSpecificSettings) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) {
15881 return nil, false
15882 }
15883
15884
15885 func (rpss ReplicationProviderSpecificSettings) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) {
15886 return nil, false
15887 }
15888
15889
15890 func (rpss ReplicationProviderSpecificSettings) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) {
15891 return &rpss, true
15892 }
15893
15894
15895 func (rpss ReplicationProviderSpecificSettings) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) {
15896 return &rpss, true
15897 }
15898
15899
15900
15901 type ReplicationRecoveryPlansCreateFuture struct {
15902 azure.FutureAPI
15903
15904
15905 Result func(ReplicationRecoveryPlansClient) (RecoveryPlan, error)
15906 }
15907
15908
15909 func (future *ReplicationRecoveryPlansCreateFuture) UnmarshalJSON(body []byte) error {
15910 var azFuture azure.Future
15911 if err := json.Unmarshal(body, &azFuture); err != nil {
15912 return err
15913 }
15914 future.FutureAPI = &azFuture
15915 future.Result = future.result
15916 return nil
15917 }
15918
15919
15920 func (future *ReplicationRecoveryPlansCreateFuture) result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
15921 var done bool
15922 done, err = future.DoneWithContext(context.Background(), client)
15923 if err != nil {
15924 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansCreateFuture", "Result", future.Response(), "Polling failure")
15925 return
15926 }
15927 if !done {
15928 rp.Response.Response = future.Response()
15929 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansCreateFuture")
15930 return
15931 }
15932 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15933 if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent {
15934 rp, err = client.CreateResponder(rp.Response.Response)
15935 if err != nil {
15936 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansCreateFuture", "Result", rp.Response.Response, "Failure responding to request")
15937 }
15938 }
15939 return
15940 }
15941
15942
15943
15944 type ReplicationRecoveryPlansDeleteFuture struct {
15945 azure.FutureAPI
15946
15947
15948 Result func(ReplicationRecoveryPlansClient) (autorest.Response, error)
15949 }
15950
15951
15952 func (future *ReplicationRecoveryPlansDeleteFuture) UnmarshalJSON(body []byte) error {
15953 var azFuture azure.Future
15954 if err := json.Unmarshal(body, &azFuture); err != nil {
15955 return err
15956 }
15957 future.FutureAPI = &azFuture
15958 future.Result = future.result
15959 return nil
15960 }
15961
15962
15963 func (future *ReplicationRecoveryPlansDeleteFuture) result(client ReplicationRecoveryPlansClient) (ar autorest.Response, err error) {
15964 var done bool
15965 done, err = future.DoneWithContext(context.Background(), client)
15966 if err != nil {
15967 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansDeleteFuture", "Result", future.Response(), "Polling failure")
15968 return
15969 }
15970 if !done {
15971 ar.Response = future.Response()
15972 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansDeleteFuture")
15973 return
15974 }
15975 ar.Response = future.Response()
15976 return
15977 }
15978
15979
15980
15981 type ReplicationRecoveryPlansFailoverCommitFuture struct {
15982 azure.FutureAPI
15983
15984
15985 Result func(ReplicationRecoveryPlansClient) (RecoveryPlan, error)
15986 }
15987
15988
15989 func (future *ReplicationRecoveryPlansFailoverCommitFuture) UnmarshalJSON(body []byte) error {
15990 var azFuture azure.Future
15991 if err := json.Unmarshal(body, &azFuture); err != nil {
15992 return err
15993 }
15994 future.FutureAPI = &azFuture
15995 future.Result = future.result
15996 return nil
15997 }
15998
15999
16000 func (future *ReplicationRecoveryPlansFailoverCommitFuture) result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
16001 var done bool
16002 done, err = future.DoneWithContext(context.Background(), client)
16003 if err != nil {
16004 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansFailoverCommitFuture", "Result", future.Response(), "Polling failure")
16005 return
16006 }
16007 if !done {
16008 rp.Response.Response = future.Response()
16009 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansFailoverCommitFuture")
16010 return
16011 }
16012 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16013 if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent {
16014 rp, err = client.FailoverCommitResponder(rp.Response.Response)
16015 if err != nil {
16016 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansFailoverCommitFuture", "Result", rp.Response.Response, "Failure responding to request")
16017 }
16018 }
16019 return
16020 }
16021
16022
16023
16024 type ReplicationRecoveryPlansPlannedFailoverFuture struct {
16025 azure.FutureAPI
16026
16027
16028 Result func(ReplicationRecoveryPlansClient) (RecoveryPlan, error)
16029 }
16030
16031
16032 func (future *ReplicationRecoveryPlansPlannedFailoverFuture) UnmarshalJSON(body []byte) error {
16033 var azFuture azure.Future
16034 if err := json.Unmarshal(body, &azFuture); err != nil {
16035 return err
16036 }
16037 future.FutureAPI = &azFuture
16038 future.Result = future.result
16039 return nil
16040 }
16041
16042
16043 func (future *ReplicationRecoveryPlansPlannedFailoverFuture) result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
16044 var done bool
16045 done, err = future.DoneWithContext(context.Background(), client)
16046 if err != nil {
16047 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansPlannedFailoverFuture", "Result", future.Response(), "Polling failure")
16048 return
16049 }
16050 if !done {
16051 rp.Response.Response = future.Response()
16052 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansPlannedFailoverFuture")
16053 return
16054 }
16055 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16056 if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent {
16057 rp, err = client.PlannedFailoverResponder(rp.Response.Response)
16058 if err != nil {
16059 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansPlannedFailoverFuture", "Result", rp.Response.Response, "Failure responding to request")
16060 }
16061 }
16062 return
16063 }
16064
16065
16066
16067 type ReplicationRecoveryPlansReprotectFuture struct {
16068 azure.FutureAPI
16069
16070
16071 Result func(ReplicationRecoveryPlansClient) (RecoveryPlan, error)
16072 }
16073
16074
16075 func (future *ReplicationRecoveryPlansReprotectFuture) UnmarshalJSON(body []byte) error {
16076 var azFuture azure.Future
16077 if err := json.Unmarshal(body, &azFuture); err != nil {
16078 return err
16079 }
16080 future.FutureAPI = &azFuture
16081 future.Result = future.result
16082 return nil
16083 }
16084
16085
16086 func (future *ReplicationRecoveryPlansReprotectFuture) result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
16087 var done bool
16088 done, err = future.DoneWithContext(context.Background(), client)
16089 if err != nil {
16090 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansReprotectFuture", "Result", future.Response(), "Polling failure")
16091 return
16092 }
16093 if !done {
16094 rp.Response.Response = future.Response()
16095 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansReprotectFuture")
16096 return
16097 }
16098 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16099 if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent {
16100 rp, err = client.ReprotectResponder(rp.Response.Response)
16101 if err != nil {
16102 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansReprotectFuture", "Result", rp.Response.Response, "Failure responding to request")
16103 }
16104 }
16105 return
16106 }
16107
16108
16109
16110 type ReplicationRecoveryPlansTestFailoverCleanupFuture struct {
16111 azure.FutureAPI
16112
16113
16114 Result func(ReplicationRecoveryPlansClient) (RecoveryPlan, error)
16115 }
16116
16117
16118 func (future *ReplicationRecoveryPlansTestFailoverCleanupFuture) UnmarshalJSON(body []byte) error {
16119 var azFuture azure.Future
16120 if err := json.Unmarshal(body, &azFuture); err != nil {
16121 return err
16122 }
16123 future.FutureAPI = &azFuture
16124 future.Result = future.result
16125 return nil
16126 }
16127
16128
16129 func (future *ReplicationRecoveryPlansTestFailoverCleanupFuture) result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
16130 var done bool
16131 done, err = future.DoneWithContext(context.Background(), client)
16132 if err != nil {
16133 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansTestFailoverCleanupFuture", "Result", future.Response(), "Polling failure")
16134 return
16135 }
16136 if !done {
16137 rp.Response.Response = future.Response()
16138 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansTestFailoverCleanupFuture")
16139 return
16140 }
16141 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16142 if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent {
16143 rp, err = client.TestFailoverCleanupResponder(rp.Response.Response)
16144 if err != nil {
16145 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansTestFailoverCleanupFuture", "Result", rp.Response.Response, "Failure responding to request")
16146 }
16147 }
16148 return
16149 }
16150
16151
16152
16153 type ReplicationRecoveryPlansTestFailoverFuture struct {
16154 azure.FutureAPI
16155
16156
16157 Result func(ReplicationRecoveryPlansClient) (RecoveryPlan, error)
16158 }
16159
16160
16161 func (future *ReplicationRecoveryPlansTestFailoverFuture) UnmarshalJSON(body []byte) error {
16162 var azFuture azure.Future
16163 if err := json.Unmarshal(body, &azFuture); err != nil {
16164 return err
16165 }
16166 future.FutureAPI = &azFuture
16167 future.Result = future.result
16168 return nil
16169 }
16170
16171
16172 func (future *ReplicationRecoveryPlansTestFailoverFuture) result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
16173 var done bool
16174 done, err = future.DoneWithContext(context.Background(), client)
16175 if err != nil {
16176 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansTestFailoverFuture", "Result", future.Response(), "Polling failure")
16177 return
16178 }
16179 if !done {
16180 rp.Response.Response = future.Response()
16181 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansTestFailoverFuture")
16182 return
16183 }
16184 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16185 if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent {
16186 rp, err = client.TestFailoverResponder(rp.Response.Response)
16187 if err != nil {
16188 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansTestFailoverFuture", "Result", rp.Response.Response, "Failure responding to request")
16189 }
16190 }
16191 return
16192 }
16193
16194
16195
16196 type ReplicationRecoveryPlansUnplannedFailoverFuture struct {
16197 azure.FutureAPI
16198
16199
16200 Result func(ReplicationRecoveryPlansClient) (RecoveryPlan, error)
16201 }
16202
16203
16204 func (future *ReplicationRecoveryPlansUnplannedFailoverFuture) UnmarshalJSON(body []byte) error {
16205 var azFuture azure.Future
16206 if err := json.Unmarshal(body, &azFuture); err != nil {
16207 return err
16208 }
16209 future.FutureAPI = &azFuture
16210 future.Result = future.result
16211 return nil
16212 }
16213
16214
16215 func (future *ReplicationRecoveryPlansUnplannedFailoverFuture) result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
16216 var done bool
16217 done, err = future.DoneWithContext(context.Background(), client)
16218 if err != nil {
16219 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansUnplannedFailoverFuture", "Result", future.Response(), "Polling failure")
16220 return
16221 }
16222 if !done {
16223 rp.Response.Response = future.Response()
16224 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansUnplannedFailoverFuture")
16225 return
16226 }
16227 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16228 if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent {
16229 rp, err = client.UnplannedFailoverResponder(rp.Response.Response)
16230 if err != nil {
16231 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansUnplannedFailoverFuture", "Result", rp.Response.Response, "Failure responding to request")
16232 }
16233 }
16234 return
16235 }
16236
16237
16238
16239 type ReplicationRecoveryPlansUpdateFuture struct {
16240 azure.FutureAPI
16241
16242
16243 Result func(ReplicationRecoveryPlansClient) (RecoveryPlan, error)
16244 }
16245
16246
16247 func (future *ReplicationRecoveryPlansUpdateFuture) UnmarshalJSON(body []byte) error {
16248 var azFuture azure.Future
16249 if err := json.Unmarshal(body, &azFuture); err != nil {
16250 return err
16251 }
16252 future.FutureAPI = &azFuture
16253 future.Result = future.result
16254 return nil
16255 }
16256
16257
16258 func (future *ReplicationRecoveryPlansUpdateFuture) result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
16259 var done bool
16260 done, err = future.DoneWithContext(context.Background(), client)
16261 if err != nil {
16262 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansUpdateFuture", "Result", future.Response(), "Polling failure")
16263 return
16264 }
16265 if !done {
16266 rp.Response.Response = future.Response()
16267 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansUpdateFuture")
16268 return
16269 }
16270 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16271 if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent {
16272 rp, err = client.UpdateResponder(rp.Response.Response)
16273 if err != nil {
16274 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansUpdateFuture", "Result", rp.Response.Response, "Failure responding to request")
16275 }
16276 }
16277 return
16278 }
16279
16280
16281
16282 type ReplicationRecoveryServicesProvidersDeleteFuture struct {
16283 azure.FutureAPI
16284
16285
16286 Result func(ReplicationRecoveryServicesProvidersClient) (autorest.Response, error)
16287 }
16288
16289
16290 func (future *ReplicationRecoveryServicesProvidersDeleteFuture) UnmarshalJSON(body []byte) error {
16291 var azFuture azure.Future
16292 if err := json.Unmarshal(body, &azFuture); err != nil {
16293 return err
16294 }
16295 future.FutureAPI = &azFuture
16296 future.Result = future.result
16297 return nil
16298 }
16299
16300
16301 func (future *ReplicationRecoveryServicesProvidersDeleteFuture) result(client ReplicationRecoveryServicesProvidersClient) (ar autorest.Response, err error) {
16302 var done bool
16303 done, err = future.DoneWithContext(context.Background(), client)
16304 if err != nil {
16305 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersDeleteFuture", "Result", future.Response(), "Polling failure")
16306 return
16307 }
16308 if !done {
16309 ar.Response = future.Response()
16310 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryServicesProvidersDeleteFuture")
16311 return
16312 }
16313 ar.Response = future.Response()
16314 return
16315 }
16316
16317
16318
16319 type ReplicationRecoveryServicesProvidersPurgeFuture struct {
16320 azure.FutureAPI
16321
16322
16323 Result func(ReplicationRecoveryServicesProvidersClient) (autorest.Response, error)
16324 }
16325
16326
16327 func (future *ReplicationRecoveryServicesProvidersPurgeFuture) UnmarshalJSON(body []byte) error {
16328 var azFuture azure.Future
16329 if err := json.Unmarshal(body, &azFuture); err != nil {
16330 return err
16331 }
16332 future.FutureAPI = &azFuture
16333 future.Result = future.result
16334 return nil
16335 }
16336
16337
16338 func (future *ReplicationRecoveryServicesProvidersPurgeFuture) result(client ReplicationRecoveryServicesProvidersClient) (ar autorest.Response, err error) {
16339 var done bool
16340 done, err = future.DoneWithContext(context.Background(), client)
16341 if err != nil {
16342 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersPurgeFuture", "Result", future.Response(), "Polling failure")
16343 return
16344 }
16345 if !done {
16346 ar.Response = future.Response()
16347 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryServicesProvidersPurgeFuture")
16348 return
16349 }
16350 ar.Response = future.Response()
16351 return
16352 }
16353
16354
16355
16356 type ReplicationRecoveryServicesProvidersRefreshProviderFuture struct {
16357 azure.FutureAPI
16358
16359
16360 Result func(ReplicationRecoveryServicesProvidersClient) (RecoveryServicesProvider, error)
16361 }
16362
16363
16364 func (future *ReplicationRecoveryServicesProvidersRefreshProviderFuture) UnmarshalJSON(body []byte) error {
16365 var azFuture azure.Future
16366 if err := json.Unmarshal(body, &azFuture); err != nil {
16367 return err
16368 }
16369 future.FutureAPI = &azFuture
16370 future.Result = future.result
16371 return nil
16372 }
16373
16374
16375 func (future *ReplicationRecoveryServicesProvidersRefreshProviderFuture) result(client ReplicationRecoveryServicesProvidersClient) (rsp RecoveryServicesProvider, err error) {
16376 var done bool
16377 done, err = future.DoneWithContext(context.Background(), client)
16378 if err != nil {
16379 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersRefreshProviderFuture", "Result", future.Response(), "Polling failure")
16380 return
16381 }
16382 if !done {
16383 rsp.Response.Response = future.Response()
16384 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryServicesProvidersRefreshProviderFuture")
16385 return
16386 }
16387 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16388 if rsp.Response.Response, err = future.GetResult(sender); err == nil && rsp.Response.Response.StatusCode != http.StatusNoContent {
16389 rsp, err = client.RefreshProviderResponder(rsp.Response.Response)
16390 if err != nil {
16391 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersRefreshProviderFuture", "Result", rsp.Response.Response, "Failure responding to request")
16392 }
16393 }
16394 return
16395 }
16396
16397
16398
16399 type ReplicationStorageClassificationMappingsCreateFuture struct {
16400 azure.FutureAPI
16401
16402
16403 Result func(ReplicationStorageClassificationMappingsClient) (StorageClassificationMapping, error)
16404 }
16405
16406
16407 func (future *ReplicationStorageClassificationMappingsCreateFuture) UnmarshalJSON(body []byte) error {
16408 var azFuture azure.Future
16409 if err := json.Unmarshal(body, &azFuture); err != nil {
16410 return err
16411 }
16412 future.FutureAPI = &azFuture
16413 future.Result = future.result
16414 return nil
16415 }
16416
16417
16418 func (future *ReplicationStorageClassificationMappingsCreateFuture) result(client ReplicationStorageClassificationMappingsClient) (scm StorageClassificationMapping, err error) {
16419 var done bool
16420 done, err = future.DoneWithContext(context.Background(), client)
16421 if err != nil {
16422 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsCreateFuture", "Result", future.Response(), "Polling failure")
16423 return
16424 }
16425 if !done {
16426 scm.Response.Response = future.Response()
16427 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationStorageClassificationMappingsCreateFuture")
16428 return
16429 }
16430 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16431 if scm.Response.Response, err = future.GetResult(sender); err == nil && scm.Response.Response.StatusCode != http.StatusNoContent {
16432 scm, err = client.CreateResponder(scm.Response.Response)
16433 if err != nil {
16434 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsCreateFuture", "Result", scm.Response.Response, "Failure responding to request")
16435 }
16436 }
16437 return
16438 }
16439
16440
16441
16442 type ReplicationStorageClassificationMappingsDeleteFuture struct {
16443 azure.FutureAPI
16444
16445
16446 Result func(ReplicationStorageClassificationMappingsClient) (autorest.Response, error)
16447 }
16448
16449
16450 func (future *ReplicationStorageClassificationMappingsDeleteFuture) UnmarshalJSON(body []byte) error {
16451 var azFuture azure.Future
16452 if err := json.Unmarshal(body, &azFuture); err != nil {
16453 return err
16454 }
16455 future.FutureAPI = &azFuture
16456 future.Result = future.result
16457 return nil
16458 }
16459
16460
16461 func (future *ReplicationStorageClassificationMappingsDeleteFuture) result(client ReplicationStorageClassificationMappingsClient) (ar autorest.Response, err error) {
16462 var done bool
16463 done, err = future.DoneWithContext(context.Background(), client)
16464 if err != nil {
16465 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsDeleteFuture", "Result", future.Response(), "Polling failure")
16466 return
16467 }
16468 if !done {
16469 ar.Response = future.Response()
16470 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationStorageClassificationMappingsDeleteFuture")
16471 return
16472 }
16473 ar.Response = future.Response()
16474 return
16475 }
16476
16477
16478
16479 type ReplicationvCentersCreateFuture struct {
16480 azure.FutureAPI
16481
16482
16483 Result func(ReplicationvCentersClient) (VCenter, error)
16484 }
16485
16486
16487 func (future *ReplicationvCentersCreateFuture) UnmarshalJSON(body []byte) error {
16488 var azFuture azure.Future
16489 if err := json.Unmarshal(body, &azFuture); err != nil {
16490 return err
16491 }
16492 future.FutureAPI = &azFuture
16493 future.Result = future.result
16494 return nil
16495 }
16496
16497
16498 func (future *ReplicationvCentersCreateFuture) result(client ReplicationvCentersClient) (vc VCenter, err error) {
16499 var done bool
16500 done, err = future.DoneWithContext(context.Background(), client)
16501 if err != nil {
16502 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersCreateFuture", "Result", future.Response(), "Polling failure")
16503 return
16504 }
16505 if !done {
16506 vc.Response.Response = future.Response()
16507 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationvCentersCreateFuture")
16508 return
16509 }
16510 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16511 if vc.Response.Response, err = future.GetResult(sender); err == nil && vc.Response.Response.StatusCode != http.StatusNoContent {
16512 vc, err = client.CreateResponder(vc.Response.Response)
16513 if err != nil {
16514 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersCreateFuture", "Result", vc.Response.Response, "Failure responding to request")
16515 }
16516 }
16517 return
16518 }
16519
16520
16521
16522 type ReplicationvCentersDeleteFuture struct {
16523 azure.FutureAPI
16524
16525
16526 Result func(ReplicationvCentersClient) (autorest.Response, error)
16527 }
16528
16529
16530 func (future *ReplicationvCentersDeleteFuture) UnmarshalJSON(body []byte) error {
16531 var azFuture azure.Future
16532 if err := json.Unmarshal(body, &azFuture); err != nil {
16533 return err
16534 }
16535 future.FutureAPI = &azFuture
16536 future.Result = future.result
16537 return nil
16538 }
16539
16540
16541 func (future *ReplicationvCentersDeleteFuture) result(client ReplicationvCentersClient) (ar autorest.Response, err error) {
16542 var done bool
16543 done, err = future.DoneWithContext(context.Background(), client)
16544 if err != nil {
16545 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersDeleteFuture", "Result", future.Response(), "Polling failure")
16546 return
16547 }
16548 if !done {
16549 ar.Response = future.Response()
16550 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationvCentersDeleteFuture")
16551 return
16552 }
16553 ar.Response = future.Response()
16554 return
16555 }
16556
16557
16558
16559 type ReplicationvCentersUpdateFuture struct {
16560 azure.FutureAPI
16561
16562
16563 Result func(ReplicationvCentersClient) (VCenter, error)
16564 }
16565
16566
16567 func (future *ReplicationvCentersUpdateFuture) UnmarshalJSON(body []byte) error {
16568 var azFuture azure.Future
16569 if err := json.Unmarshal(body, &azFuture); err != nil {
16570 return err
16571 }
16572 future.FutureAPI = &azFuture
16573 future.Result = future.result
16574 return nil
16575 }
16576
16577
16578 func (future *ReplicationvCentersUpdateFuture) result(client ReplicationvCentersClient) (vc VCenter, err error) {
16579 var done bool
16580 done, err = future.DoneWithContext(context.Background(), client)
16581 if err != nil {
16582 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersUpdateFuture", "Result", future.Response(), "Polling failure")
16583 return
16584 }
16585 if !done {
16586 vc.Response.Response = future.Response()
16587 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationvCentersUpdateFuture")
16588 return
16589 }
16590 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16591 if vc.Response.Response, err = future.GetResult(sender); err == nil && vc.Response.Response.StatusCode != http.StatusNoContent {
16592 vc, err = client.UpdateResponder(vc.Response.Response)
16593 if err != nil {
16594 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersUpdateFuture", "Result", vc.Response.Response, "Failure responding to request")
16595 }
16596 }
16597 return
16598 }
16599
16600
16601 type Resource struct {
16602
16603 ID *string `json:"id,omitempty"`
16604
16605 Name *string `json:"name,omitempty"`
16606
16607 Type *string `json:"type,omitempty"`
16608
16609 Location *string `json:"location,omitempty"`
16610 }
16611
16612
16613 func (r Resource) MarshalJSON() ([]byte, error) {
16614 objectMap := make(map[string]interface{})
16615 if r.Location != nil {
16616 objectMap["location"] = r.Location
16617 }
16618 return json.Marshal(objectMap)
16619 }
16620
16621
16622
16623 type ResourceHealthSummary struct {
16624
16625 ResourceCount *int32 `json:"resourceCount,omitempty"`
16626
16627 Issues *[]HealthErrorSummary `json:"issues,omitempty"`
16628 }
16629
16630
16631 type ResumeJobParams struct {
16632
16633 Properties *ResumeJobParamsProperties `json:"properties,omitempty"`
16634 }
16635
16636
16637 type ResumeJobParamsProperties struct {
16638
16639 Comments *string `json:"comments,omitempty"`
16640 }
16641
16642
16643 type RetentionVolume struct {
16644
16645 VolumeName *string `json:"volumeName,omitempty"`
16646
16647 CapacityInBytes *int64 `json:"capacityInBytes,omitempty"`
16648
16649 FreeSpaceInBytes *int64 `json:"freeSpaceInBytes,omitempty"`
16650
16651 ThresholdPercentage *int32 `json:"thresholdPercentage,omitempty"`
16652 }
16653
16654
16655 type ReverseReplicationInput struct {
16656
16657 Properties *ReverseReplicationInputProperties `json:"properties,omitempty"`
16658 }
16659
16660
16661 type ReverseReplicationInputProperties struct {
16662
16663 FailoverDirection *string `json:"failoverDirection,omitempty"`
16664
16665 ProviderSpecificDetails BasicReverseReplicationProviderSpecificInput `json:"providerSpecificDetails,omitempty"`
16666 }
16667
16668
16669 func (rrip *ReverseReplicationInputProperties) UnmarshalJSON(body []byte) error {
16670 var m map[string]*json.RawMessage
16671 err := json.Unmarshal(body, &m)
16672 if err != nil {
16673 return err
16674 }
16675 for k, v := range m {
16676 switch k {
16677 case "failoverDirection":
16678 if v != nil {
16679 var failoverDirection string
16680 err = json.Unmarshal(*v, &failoverDirection)
16681 if err != nil {
16682 return err
16683 }
16684 rrip.FailoverDirection = &failoverDirection
16685 }
16686 case "providerSpecificDetails":
16687 if v != nil {
16688 providerSpecificDetails, err := unmarshalBasicReverseReplicationProviderSpecificInput(*v)
16689 if err != nil {
16690 return err
16691 }
16692 rrip.ProviderSpecificDetails = providerSpecificDetails
16693 }
16694 }
16695 }
16696
16697 return nil
16698 }
16699
16700
16701 type BasicReverseReplicationProviderSpecificInput interface {
16702 AsHyperVReplicaAzureReprotectInput() (*HyperVReplicaAzureReprotectInput, bool)
16703 AsInMageAzureV2ReprotectInput() (*InMageAzureV2ReprotectInput, bool)
16704 AsInMageReprotectInput() (*InMageReprotectInput, bool)
16705 AsA2AReprotectInput() (*A2AReprotectInput, bool)
16706 AsReverseReplicationProviderSpecificInput() (*ReverseReplicationProviderSpecificInput, bool)
16707 }
16708
16709
16710 type ReverseReplicationProviderSpecificInput struct {
16711
16712 InstanceType InstanceTypeBasicReverseReplicationProviderSpecificInput `json:"instanceType,omitempty"`
16713 }
16714
16715 func unmarshalBasicReverseReplicationProviderSpecificInput(body []byte) (BasicReverseReplicationProviderSpecificInput, error) {
16716 var m map[string]interface{}
16717 err := json.Unmarshal(body, &m)
16718 if err != nil {
16719 return nil, err
16720 }
16721
16722 switch m["instanceType"] {
16723 case string(InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeHyperVReplicaAzure):
16724 var hvrari HyperVReplicaAzureReprotectInput
16725 err := json.Unmarshal(body, &hvrari)
16726 return hvrari, err
16727 case string(InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMageAzureV2):
16728 var imavri InMageAzureV2ReprotectInput
16729 err := json.Unmarshal(body, &imavri)
16730 return imavri, err
16731 case string(InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMage):
16732 var imri InMageReprotectInput
16733 err := json.Unmarshal(body, &imri)
16734 return imri, err
16735 case string(InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeA2A):
16736 var ari A2AReprotectInput
16737 err := json.Unmarshal(body, &ari)
16738 return ari, err
16739 default:
16740 var rrpsi ReverseReplicationProviderSpecificInput
16741 err := json.Unmarshal(body, &rrpsi)
16742 return rrpsi, err
16743 }
16744 }
16745 func unmarshalBasicReverseReplicationProviderSpecificInputArray(body []byte) ([]BasicReverseReplicationProviderSpecificInput, error) {
16746 var rawMessages []*json.RawMessage
16747 err := json.Unmarshal(body, &rawMessages)
16748 if err != nil {
16749 return nil, err
16750 }
16751
16752 rrpsiArray := make([]BasicReverseReplicationProviderSpecificInput, len(rawMessages))
16753
16754 for index, rawMessage := range rawMessages {
16755 rrpsi, err := unmarshalBasicReverseReplicationProviderSpecificInput(*rawMessage)
16756 if err != nil {
16757 return nil, err
16758 }
16759 rrpsiArray[index] = rrpsi
16760 }
16761 return rrpsiArray, nil
16762 }
16763
16764
16765 func (rrpsi ReverseReplicationProviderSpecificInput) MarshalJSON() ([]byte, error) {
16766 rrpsi.InstanceType = InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeReverseReplicationProviderSpecificInput
16767 objectMap := make(map[string]interface{})
16768 if rrpsi.InstanceType != "" {
16769 objectMap["instanceType"] = rrpsi.InstanceType
16770 }
16771 return json.Marshal(objectMap)
16772 }
16773
16774
16775 func (rrpsi ReverseReplicationProviderSpecificInput) AsHyperVReplicaAzureReprotectInput() (*HyperVReplicaAzureReprotectInput, bool) {
16776 return nil, false
16777 }
16778
16779
16780 func (rrpsi ReverseReplicationProviderSpecificInput) AsInMageAzureV2ReprotectInput() (*InMageAzureV2ReprotectInput, bool) {
16781 return nil, false
16782 }
16783
16784
16785 func (rrpsi ReverseReplicationProviderSpecificInput) AsInMageReprotectInput() (*InMageReprotectInput, bool) {
16786 return nil, false
16787 }
16788
16789
16790 func (rrpsi ReverseReplicationProviderSpecificInput) AsA2AReprotectInput() (*A2AReprotectInput, bool) {
16791 return nil, false
16792 }
16793
16794
16795 func (rrpsi ReverseReplicationProviderSpecificInput) AsReverseReplicationProviderSpecificInput() (*ReverseReplicationProviderSpecificInput, bool) {
16796 return &rrpsi, true
16797 }
16798
16799
16800 func (rrpsi ReverseReplicationProviderSpecificInput) AsBasicReverseReplicationProviderSpecificInput() (BasicReverseReplicationProviderSpecificInput, bool) {
16801 return &rrpsi, true
16802 }
16803
16804
16805 type RoleAssignment struct {
16806
16807 ID *string `json:"id,omitempty"`
16808
16809 Name *string `json:"name,omitempty"`
16810
16811 Scope *string `json:"scope,omitempty"`
16812
16813 PrincipalID *string `json:"principalId,omitempty"`
16814
16815 RoleDefinitionID *string `json:"roleDefinitionId,omitempty"`
16816 }
16817
16818
16819 type RunAsAccount struct {
16820
16821 AccountID *string `json:"accountId,omitempty"`
16822
16823 AccountName *string `json:"accountName,omitempty"`
16824 }
16825
16826
16827 type SanEnableProtectionInput struct {
16828
16829 InstanceType InstanceTypeBasicEnableProtectionProviderSpecificInput `json:"instanceType,omitempty"`
16830 }
16831
16832
16833 func (sepi SanEnableProtectionInput) MarshalJSON() ([]byte, error) {
16834 sepi.InstanceType = InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeSan
16835 objectMap := make(map[string]interface{})
16836 if sepi.InstanceType != "" {
16837 objectMap["instanceType"] = sepi.InstanceType
16838 }
16839 return json.Marshal(objectMap)
16840 }
16841
16842
16843 func (sepi SanEnableProtectionInput) AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool) {
16844 return nil, false
16845 }
16846
16847
16848 func (sepi SanEnableProtectionInput) AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool) {
16849 return &sepi, true
16850 }
16851
16852
16853 func (sepi SanEnableProtectionInput) AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool) {
16854 return nil, false
16855 }
16856
16857
16858 func (sepi SanEnableProtectionInput) AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool) {
16859 return nil, false
16860 }
16861
16862
16863 func (sepi SanEnableProtectionInput) AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool) {
16864 return nil, false
16865 }
16866
16867
16868 func (sepi SanEnableProtectionInput) AsEnableProtectionProviderSpecificInput() (*EnableProtectionProviderSpecificInput, bool) {
16869 return nil, false
16870 }
16871
16872
16873 func (sepi SanEnableProtectionInput) AsBasicEnableProtectionProviderSpecificInput() (BasicEnableProtectionProviderSpecificInput, bool) {
16874 return &sepi, true
16875 }
16876
16877
16878 type ScriptActionTaskDetails struct {
16879
16880 Name *string `json:"name,omitempty"`
16881
16882 Path *string `json:"path,omitempty"`
16883
16884 Output *string `json:"output,omitempty"`
16885
16886 IsPrimarySideScript *bool `json:"isPrimarySideScript,omitempty"`
16887
16888 InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"`
16889 }
16890
16891
16892 func (satd ScriptActionTaskDetails) MarshalJSON() ([]byte, error) {
16893 satd.InstanceType = InstanceTypeScriptActionTaskDetails
16894 objectMap := make(map[string]interface{})
16895 if satd.Name != nil {
16896 objectMap["name"] = satd.Name
16897 }
16898 if satd.Path != nil {
16899 objectMap["path"] = satd.Path
16900 }
16901 if satd.Output != nil {
16902 objectMap["output"] = satd.Output
16903 }
16904 if satd.IsPrimarySideScript != nil {
16905 objectMap["isPrimarySideScript"] = satd.IsPrimarySideScript
16906 }
16907 if satd.InstanceType != "" {
16908 objectMap["instanceType"] = satd.InstanceType
16909 }
16910 return json.Marshal(objectMap)
16911 }
16912
16913
16914 func (satd ScriptActionTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) {
16915 return nil, false
16916 }
16917
16918
16919 func (satd ScriptActionTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) {
16920 return nil, false
16921 }
16922
16923
16924 func (satd ScriptActionTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) {
16925 return nil, false
16926 }
16927
16928
16929 func (satd ScriptActionTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) {
16930 return nil, false
16931 }
16932
16933
16934 func (satd ScriptActionTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) {
16935 return &satd, true
16936 }
16937
16938
16939 func (satd ScriptActionTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) {
16940 return nil, false
16941 }
16942
16943
16944 func (satd ScriptActionTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) {
16945 return nil, false
16946 }
16947
16948
16949 func (satd ScriptActionTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) {
16950 return nil, false
16951 }
16952
16953
16954 func (satd ScriptActionTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) {
16955 return nil, false
16956 }
16957
16958
16959 func (satd ScriptActionTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) {
16960 return &satd, true
16961 }
16962
16963
16964 type ServiceError struct {
16965
16966 Code *string `json:"code,omitempty"`
16967
16968 Message *string `json:"message,omitempty"`
16969
16970 PossibleCauses *string `json:"possibleCauses,omitempty"`
16971
16972 RecommendedAction *string `json:"recommendedAction,omitempty"`
16973
16974 ActivityID *string `json:"activityId,omitempty"`
16975 }
16976
16977
16978 type StorageClassification struct {
16979 autorest.Response `json:"-"`
16980
16981 Properties *StorageClassificationProperties `json:"properties,omitempty"`
16982
16983 ID *string `json:"id,omitempty"`
16984
16985 Name *string `json:"name,omitempty"`
16986
16987 Type *string `json:"type,omitempty"`
16988
16989 Location *string `json:"location,omitempty"`
16990 }
16991
16992
16993 func (sc StorageClassification) MarshalJSON() ([]byte, error) {
16994 objectMap := make(map[string]interface{})
16995 if sc.Properties != nil {
16996 objectMap["properties"] = sc.Properties
16997 }
16998 if sc.Location != nil {
16999 objectMap["location"] = sc.Location
17000 }
17001 return json.Marshal(objectMap)
17002 }
17003
17004
17005 type StorageClassificationCollection struct {
17006 autorest.Response `json:"-"`
17007
17008 Value *[]StorageClassification `json:"value,omitempty"`
17009
17010 NextLink *string `json:"nextLink,omitempty"`
17011 }
17012
17013
17014
17015 type StorageClassificationCollectionIterator struct {
17016 i int
17017 page StorageClassificationCollectionPage
17018 }
17019
17020
17021
17022 func (iter *StorageClassificationCollectionIterator) NextWithContext(ctx context.Context) (err error) {
17023 if tracing.IsEnabled() {
17024 ctx = tracing.StartSpan(ctx, fqdn+"/StorageClassificationCollectionIterator.NextWithContext")
17025 defer func() {
17026 sc := -1
17027 if iter.Response().Response.Response != nil {
17028 sc = iter.Response().Response.Response.StatusCode
17029 }
17030 tracing.EndSpan(ctx, sc, err)
17031 }()
17032 }
17033 iter.i++
17034 if iter.i < len(iter.page.Values()) {
17035 return nil
17036 }
17037 err = iter.page.NextWithContext(ctx)
17038 if err != nil {
17039 iter.i--
17040 return err
17041 }
17042 iter.i = 0
17043 return nil
17044 }
17045
17046
17047
17048
17049 func (iter *StorageClassificationCollectionIterator) Next() error {
17050 return iter.NextWithContext(context.Background())
17051 }
17052
17053
17054 func (iter StorageClassificationCollectionIterator) NotDone() bool {
17055 return iter.page.NotDone() && iter.i < len(iter.page.Values())
17056 }
17057
17058
17059 func (iter StorageClassificationCollectionIterator) Response() StorageClassificationCollection {
17060 return iter.page.Response()
17061 }
17062
17063
17064
17065 func (iter StorageClassificationCollectionIterator) Value() StorageClassification {
17066 if !iter.page.NotDone() {
17067 return StorageClassification{}
17068 }
17069 return iter.page.Values()[iter.i]
17070 }
17071
17072
17073 func NewStorageClassificationCollectionIterator(page StorageClassificationCollectionPage) StorageClassificationCollectionIterator {
17074 return StorageClassificationCollectionIterator{page: page}
17075 }
17076
17077
17078 func (scc StorageClassificationCollection) IsEmpty() bool {
17079 return scc.Value == nil || len(*scc.Value) == 0
17080 }
17081
17082
17083 func (scc StorageClassificationCollection) hasNextLink() bool {
17084 return scc.NextLink != nil && len(*scc.NextLink) != 0
17085 }
17086
17087
17088
17089 func (scc StorageClassificationCollection) storageClassificationCollectionPreparer(ctx context.Context) (*http.Request, error) {
17090 if !scc.hasNextLink() {
17091 return nil, nil
17092 }
17093 return autorest.Prepare((&http.Request{}).WithContext(ctx),
17094 autorest.AsJSON(),
17095 autorest.AsGet(),
17096 autorest.WithBaseURL(to.String(scc.NextLink)))
17097 }
17098
17099
17100 type StorageClassificationCollectionPage struct {
17101 fn func(context.Context, StorageClassificationCollection) (StorageClassificationCollection, error)
17102 scc StorageClassificationCollection
17103 }
17104
17105
17106
17107 func (page *StorageClassificationCollectionPage) NextWithContext(ctx context.Context) (err error) {
17108 if tracing.IsEnabled() {
17109 ctx = tracing.StartSpan(ctx, fqdn+"/StorageClassificationCollectionPage.NextWithContext")
17110 defer func() {
17111 sc := -1
17112 if page.Response().Response.Response != nil {
17113 sc = page.Response().Response.Response.StatusCode
17114 }
17115 tracing.EndSpan(ctx, sc, err)
17116 }()
17117 }
17118 for {
17119 next, err := page.fn(ctx, page.scc)
17120 if err != nil {
17121 return err
17122 }
17123 page.scc = next
17124 if !next.hasNextLink() || !next.IsEmpty() {
17125 break
17126 }
17127 }
17128 return nil
17129 }
17130
17131
17132
17133
17134 func (page *StorageClassificationCollectionPage) Next() error {
17135 return page.NextWithContext(context.Background())
17136 }
17137
17138
17139 func (page StorageClassificationCollectionPage) NotDone() bool {
17140 return !page.scc.IsEmpty()
17141 }
17142
17143
17144 func (page StorageClassificationCollectionPage) Response() StorageClassificationCollection {
17145 return page.scc
17146 }
17147
17148
17149 func (page StorageClassificationCollectionPage) Values() []StorageClassification {
17150 if page.scc.IsEmpty() {
17151 return nil
17152 }
17153 return *page.scc.Value
17154 }
17155
17156
17157 func NewStorageClassificationCollectionPage(cur StorageClassificationCollection, getNextPage func(context.Context, StorageClassificationCollection) (StorageClassificationCollection, error)) StorageClassificationCollectionPage {
17158 return StorageClassificationCollectionPage{
17159 fn: getNextPage,
17160 scc: cur,
17161 }
17162 }
17163
17164
17165 type StorageClassificationMapping struct {
17166 autorest.Response `json:"-"`
17167
17168 Properties *StorageClassificationMappingProperties `json:"properties,omitempty"`
17169
17170 ID *string `json:"id,omitempty"`
17171
17172 Name *string `json:"name,omitempty"`
17173
17174 Type *string `json:"type,omitempty"`
17175
17176 Location *string `json:"location,omitempty"`
17177 }
17178
17179
17180 func (scm StorageClassificationMapping) MarshalJSON() ([]byte, error) {
17181 objectMap := make(map[string]interface{})
17182 if scm.Properties != nil {
17183 objectMap["properties"] = scm.Properties
17184 }
17185 if scm.Location != nil {
17186 objectMap["location"] = scm.Location
17187 }
17188 return json.Marshal(objectMap)
17189 }
17190
17191
17192 type StorageClassificationMappingCollection struct {
17193 autorest.Response `json:"-"`
17194
17195 Value *[]StorageClassificationMapping `json:"value,omitempty"`
17196
17197 NextLink *string `json:"nextLink,omitempty"`
17198 }
17199
17200
17201
17202 type StorageClassificationMappingCollectionIterator struct {
17203 i int
17204 page StorageClassificationMappingCollectionPage
17205 }
17206
17207
17208
17209 func (iter *StorageClassificationMappingCollectionIterator) NextWithContext(ctx context.Context) (err error) {
17210 if tracing.IsEnabled() {
17211 ctx = tracing.StartSpan(ctx, fqdn+"/StorageClassificationMappingCollectionIterator.NextWithContext")
17212 defer func() {
17213 sc := -1
17214 if iter.Response().Response.Response != nil {
17215 sc = iter.Response().Response.Response.StatusCode
17216 }
17217 tracing.EndSpan(ctx, sc, err)
17218 }()
17219 }
17220 iter.i++
17221 if iter.i < len(iter.page.Values()) {
17222 return nil
17223 }
17224 err = iter.page.NextWithContext(ctx)
17225 if err != nil {
17226 iter.i--
17227 return err
17228 }
17229 iter.i = 0
17230 return nil
17231 }
17232
17233
17234
17235
17236 func (iter *StorageClassificationMappingCollectionIterator) Next() error {
17237 return iter.NextWithContext(context.Background())
17238 }
17239
17240
17241 func (iter StorageClassificationMappingCollectionIterator) NotDone() bool {
17242 return iter.page.NotDone() && iter.i < len(iter.page.Values())
17243 }
17244
17245
17246 func (iter StorageClassificationMappingCollectionIterator) Response() StorageClassificationMappingCollection {
17247 return iter.page.Response()
17248 }
17249
17250
17251
17252 func (iter StorageClassificationMappingCollectionIterator) Value() StorageClassificationMapping {
17253 if !iter.page.NotDone() {
17254 return StorageClassificationMapping{}
17255 }
17256 return iter.page.Values()[iter.i]
17257 }
17258
17259
17260 func NewStorageClassificationMappingCollectionIterator(page StorageClassificationMappingCollectionPage) StorageClassificationMappingCollectionIterator {
17261 return StorageClassificationMappingCollectionIterator{page: page}
17262 }
17263
17264
17265 func (scmc StorageClassificationMappingCollection) IsEmpty() bool {
17266 return scmc.Value == nil || len(*scmc.Value) == 0
17267 }
17268
17269
17270 func (scmc StorageClassificationMappingCollection) hasNextLink() bool {
17271 return scmc.NextLink != nil && len(*scmc.NextLink) != 0
17272 }
17273
17274
17275
17276 func (scmc StorageClassificationMappingCollection) storageClassificationMappingCollectionPreparer(ctx context.Context) (*http.Request, error) {
17277 if !scmc.hasNextLink() {
17278 return nil, nil
17279 }
17280 return autorest.Prepare((&http.Request{}).WithContext(ctx),
17281 autorest.AsJSON(),
17282 autorest.AsGet(),
17283 autorest.WithBaseURL(to.String(scmc.NextLink)))
17284 }
17285
17286
17287 type StorageClassificationMappingCollectionPage struct {
17288 fn func(context.Context, StorageClassificationMappingCollection) (StorageClassificationMappingCollection, error)
17289 scmc StorageClassificationMappingCollection
17290 }
17291
17292
17293
17294 func (page *StorageClassificationMappingCollectionPage) NextWithContext(ctx context.Context) (err error) {
17295 if tracing.IsEnabled() {
17296 ctx = tracing.StartSpan(ctx, fqdn+"/StorageClassificationMappingCollectionPage.NextWithContext")
17297 defer func() {
17298 sc := -1
17299 if page.Response().Response.Response != nil {
17300 sc = page.Response().Response.Response.StatusCode
17301 }
17302 tracing.EndSpan(ctx, sc, err)
17303 }()
17304 }
17305 for {
17306 next, err := page.fn(ctx, page.scmc)
17307 if err != nil {
17308 return err
17309 }
17310 page.scmc = next
17311 if !next.hasNextLink() || !next.IsEmpty() {
17312 break
17313 }
17314 }
17315 return nil
17316 }
17317
17318
17319
17320
17321 func (page *StorageClassificationMappingCollectionPage) Next() error {
17322 return page.NextWithContext(context.Background())
17323 }
17324
17325
17326 func (page StorageClassificationMappingCollectionPage) NotDone() bool {
17327 return !page.scmc.IsEmpty()
17328 }
17329
17330
17331 func (page StorageClassificationMappingCollectionPage) Response() StorageClassificationMappingCollection {
17332 return page.scmc
17333 }
17334
17335
17336 func (page StorageClassificationMappingCollectionPage) Values() []StorageClassificationMapping {
17337 if page.scmc.IsEmpty() {
17338 return nil
17339 }
17340 return *page.scmc.Value
17341 }
17342
17343
17344 func NewStorageClassificationMappingCollectionPage(cur StorageClassificationMappingCollection, getNextPage func(context.Context, StorageClassificationMappingCollection) (StorageClassificationMappingCollection, error)) StorageClassificationMappingCollectionPage {
17345 return StorageClassificationMappingCollectionPage{
17346 fn: getNextPage,
17347 scmc: cur,
17348 }
17349 }
17350
17351
17352 type StorageClassificationMappingInput struct {
17353
17354 Properties *StorageMappingInputProperties `json:"properties,omitempty"`
17355 }
17356
17357
17358 type StorageClassificationMappingProperties struct {
17359
17360 TargetStorageClassificationID *string `json:"targetStorageClassificationId,omitempty"`
17361 }
17362
17363
17364 type StorageClassificationProperties struct {
17365
17366 FriendlyName *string `json:"friendlyName,omitempty"`
17367 }
17368
17369
17370 type StorageMappingInputProperties struct {
17371
17372 TargetStorageClassificationID *string `json:"targetStorageClassificationId,omitempty"`
17373 }
17374
17375
17376 type Subnet struct {
17377
17378 Name *string `json:"name,omitempty"`
17379
17380 FriendlyName *string `json:"friendlyName,omitempty"`
17381
17382 AddressList *[]string `json:"addressList,omitempty"`
17383 }
17384
17385
17386 type SwitchProtectionInput struct {
17387
17388 Properties *SwitchProtectionInputProperties `json:"properties,omitempty"`
17389 }
17390
17391
17392 type SwitchProtectionInputProperties struct {
17393
17394 ReplicationProtectedItemName *string `json:"replicationProtectedItemName,omitempty"`
17395
17396 ProviderSpecificDetails BasicSwitchProtectionProviderSpecificInput `json:"providerSpecificDetails,omitempty"`
17397 }
17398
17399
17400 func (spip *SwitchProtectionInputProperties) UnmarshalJSON(body []byte) error {
17401 var m map[string]*json.RawMessage
17402 err := json.Unmarshal(body, &m)
17403 if err != nil {
17404 return err
17405 }
17406 for k, v := range m {
17407 switch k {
17408 case "replicationProtectedItemName":
17409 if v != nil {
17410 var replicationProtectedItemName string
17411 err = json.Unmarshal(*v, &replicationProtectedItemName)
17412 if err != nil {
17413 return err
17414 }
17415 spip.ReplicationProtectedItemName = &replicationProtectedItemName
17416 }
17417 case "providerSpecificDetails":
17418 if v != nil {
17419 providerSpecificDetails, err := unmarshalBasicSwitchProtectionProviderSpecificInput(*v)
17420 if err != nil {
17421 return err
17422 }
17423 spip.ProviderSpecificDetails = providerSpecificDetails
17424 }
17425 }
17426 }
17427
17428 return nil
17429 }
17430
17431
17432 type SwitchProtectionJobDetails struct {
17433
17434 NewReplicationProtectedItemID *string `json:"newReplicationProtectedItemId,omitempty"`
17435
17436 AffectedObjectDetails map[string]*string `json:"affectedObjectDetails"`
17437
17438 InstanceType InstanceTypeBasicJobDetails `json:"instanceType,omitempty"`
17439 }
17440
17441
17442 func (spjd SwitchProtectionJobDetails) MarshalJSON() ([]byte, error) {
17443 spjd.InstanceType = InstanceTypeSwitchProtectionJobDetails
17444 objectMap := make(map[string]interface{})
17445 if spjd.NewReplicationProtectedItemID != nil {
17446 objectMap["newReplicationProtectedItemId"] = spjd.NewReplicationProtectedItemID
17447 }
17448 if spjd.AffectedObjectDetails != nil {
17449 objectMap["affectedObjectDetails"] = spjd.AffectedObjectDetails
17450 }
17451 if spjd.InstanceType != "" {
17452 objectMap["instanceType"] = spjd.InstanceType
17453 }
17454 return json.Marshal(objectMap)
17455 }
17456
17457
17458 func (spjd SwitchProtectionJobDetails) AsAsrJobDetails() (*AsrJobDetails, bool) {
17459 return nil, false
17460 }
17461
17462
17463 func (spjd SwitchProtectionJobDetails) AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool) {
17464 return nil, false
17465 }
17466
17467
17468 func (spjd SwitchProtectionJobDetails) AsFailoverJobDetails() (*FailoverJobDetails, bool) {
17469 return nil, false
17470 }
17471
17472
17473 func (spjd SwitchProtectionJobDetails) AsExportJobDetails() (*ExportJobDetails, bool) {
17474 return nil, false
17475 }
17476
17477
17478 func (spjd SwitchProtectionJobDetails) AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool) {
17479 return &spjd, true
17480 }
17481
17482
17483 func (spjd SwitchProtectionJobDetails) AsJobDetails() (*JobDetails, bool) {
17484 return nil, false
17485 }
17486
17487
17488 func (spjd SwitchProtectionJobDetails) AsBasicJobDetails() (BasicJobDetails, bool) {
17489 return &spjd, true
17490 }
17491
17492
17493 type BasicSwitchProtectionProviderSpecificInput interface {
17494 AsA2ASwitchProtectionInput() (*A2ASwitchProtectionInput, bool)
17495 AsSwitchProtectionProviderSpecificInput() (*SwitchProtectionProviderSpecificInput, bool)
17496 }
17497
17498
17499 type SwitchProtectionProviderSpecificInput struct {
17500
17501 InstanceType InstanceTypeBasicSwitchProtectionProviderSpecificInput `json:"instanceType,omitempty"`
17502 }
17503
17504 func unmarshalBasicSwitchProtectionProviderSpecificInput(body []byte) (BasicSwitchProtectionProviderSpecificInput, error) {
17505 var m map[string]interface{}
17506 err := json.Unmarshal(body, &m)
17507 if err != nil {
17508 return nil, err
17509 }
17510
17511 switch m["instanceType"] {
17512 case string(InstanceTypeBasicSwitchProtectionProviderSpecificInputInstanceTypeA2A):
17513 var aspi A2ASwitchProtectionInput
17514 err := json.Unmarshal(body, &aspi)
17515 return aspi, err
17516 default:
17517 var sppsi SwitchProtectionProviderSpecificInput
17518 err := json.Unmarshal(body, &sppsi)
17519 return sppsi, err
17520 }
17521 }
17522 func unmarshalBasicSwitchProtectionProviderSpecificInputArray(body []byte) ([]BasicSwitchProtectionProviderSpecificInput, error) {
17523 var rawMessages []*json.RawMessage
17524 err := json.Unmarshal(body, &rawMessages)
17525 if err != nil {
17526 return nil, err
17527 }
17528
17529 sppsiArray := make([]BasicSwitchProtectionProviderSpecificInput, len(rawMessages))
17530
17531 for index, rawMessage := range rawMessages {
17532 sppsi, err := unmarshalBasicSwitchProtectionProviderSpecificInput(*rawMessage)
17533 if err != nil {
17534 return nil, err
17535 }
17536 sppsiArray[index] = sppsi
17537 }
17538 return sppsiArray, nil
17539 }
17540
17541
17542 func (sppsi SwitchProtectionProviderSpecificInput) MarshalJSON() ([]byte, error) {
17543 sppsi.InstanceType = InstanceTypeBasicSwitchProtectionProviderSpecificInputInstanceTypeSwitchProtectionProviderSpecificInput
17544 objectMap := make(map[string]interface{})
17545 if sppsi.InstanceType != "" {
17546 objectMap["instanceType"] = sppsi.InstanceType
17547 }
17548 return json.Marshal(objectMap)
17549 }
17550
17551
17552 func (sppsi SwitchProtectionProviderSpecificInput) AsA2ASwitchProtectionInput() (*A2ASwitchProtectionInput, bool) {
17553 return nil, false
17554 }
17555
17556
17557 func (sppsi SwitchProtectionProviderSpecificInput) AsSwitchProtectionProviderSpecificInput() (*SwitchProtectionProviderSpecificInput, bool) {
17558 return &sppsi, true
17559 }
17560
17561
17562 func (sppsi SwitchProtectionProviderSpecificInput) AsBasicSwitchProtectionProviderSpecificInput() (BasicSwitchProtectionProviderSpecificInput, bool) {
17563 return &sppsi, true
17564 }
17565
17566
17567 type BasicTaskTypeDetails interface {
17568 AsJobTaskDetails() (*JobTaskDetails, bool)
17569 AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool)
17570 AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool)
17571 AsManualActionTaskDetails() (*ManualActionTaskDetails, bool)
17572 AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool)
17573 AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool)
17574 AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool)
17575 AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool)
17576 AsTaskTypeDetails() (*TaskTypeDetails, bool)
17577 }
17578
17579
17580 type TaskTypeDetails struct {
17581
17582 InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"`
17583 }
17584
17585 func unmarshalBasicTaskTypeDetails(body []byte) (BasicTaskTypeDetails, error) {
17586 var m map[string]interface{}
17587 err := json.Unmarshal(body, &m)
17588 if err != nil {
17589 return nil, err
17590 }
17591
17592 switch m["instanceType"] {
17593 case string(InstanceTypeJobTaskDetails):
17594 var jtd JobTaskDetails
17595 err := json.Unmarshal(body, &jtd)
17596 return jtd, err
17597 case string(InstanceTypeVirtualMachineTaskDetails):
17598 var vmtd VirtualMachineTaskDetails
17599 err := json.Unmarshal(body, &vmtd)
17600 return vmtd, err
17601 case string(InstanceTypeFabricReplicationGroupTaskDetails):
17602 var frgtd FabricReplicationGroupTaskDetails
17603 err := json.Unmarshal(body, &frgtd)
17604 return frgtd, err
17605 case string(InstanceTypeManualActionTaskDetails):
17606 var matd ManualActionTaskDetails
17607 err := json.Unmarshal(body, &matd)
17608 return matd, err
17609 case string(InstanceTypeScriptActionTaskDetails):
17610 var satd ScriptActionTaskDetails
17611 err := json.Unmarshal(body, &satd)
17612 return satd, err
17613 case string(InstanceTypeVMNicUpdatesTaskDetails):
17614 var vnutd VMNicUpdatesTaskDetails
17615 err := json.Unmarshal(body, &vnutd)
17616 return vnutd, err
17617 case string(InstanceTypeConsistencyCheckTaskDetails):
17618 var cctd ConsistencyCheckTaskDetails
17619 err := json.Unmarshal(body, &cctd)
17620 return cctd, err
17621 case string(InstanceTypeAutomationRunbookTaskDetails):
17622 var artd AutomationRunbookTaskDetails
17623 err := json.Unmarshal(body, &artd)
17624 return artd, err
17625 default:
17626 var ttd TaskTypeDetails
17627 err := json.Unmarshal(body, &ttd)
17628 return ttd, err
17629 }
17630 }
17631 func unmarshalBasicTaskTypeDetailsArray(body []byte) ([]BasicTaskTypeDetails, error) {
17632 var rawMessages []*json.RawMessage
17633 err := json.Unmarshal(body, &rawMessages)
17634 if err != nil {
17635 return nil, err
17636 }
17637
17638 ttdArray := make([]BasicTaskTypeDetails, len(rawMessages))
17639
17640 for index, rawMessage := range rawMessages {
17641 ttd, err := unmarshalBasicTaskTypeDetails(*rawMessage)
17642 if err != nil {
17643 return nil, err
17644 }
17645 ttdArray[index] = ttd
17646 }
17647 return ttdArray, nil
17648 }
17649
17650
17651 func (ttd TaskTypeDetails) MarshalJSON() ([]byte, error) {
17652 ttd.InstanceType = InstanceTypeTaskTypeDetails
17653 objectMap := make(map[string]interface{})
17654 if ttd.InstanceType != "" {
17655 objectMap["instanceType"] = ttd.InstanceType
17656 }
17657 return json.Marshal(objectMap)
17658 }
17659
17660
17661 func (ttd TaskTypeDetails) AsJobTaskDetails() (*JobTaskDetails, bool) {
17662 return nil, false
17663 }
17664
17665
17666 func (ttd TaskTypeDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) {
17667 return nil, false
17668 }
17669
17670
17671 func (ttd TaskTypeDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) {
17672 return nil, false
17673 }
17674
17675
17676 func (ttd TaskTypeDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) {
17677 return nil, false
17678 }
17679
17680
17681 func (ttd TaskTypeDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) {
17682 return nil, false
17683 }
17684
17685
17686 func (ttd TaskTypeDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) {
17687 return nil, false
17688 }
17689
17690
17691 func (ttd TaskTypeDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) {
17692 return nil, false
17693 }
17694
17695
17696 func (ttd TaskTypeDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) {
17697 return nil, false
17698 }
17699
17700
17701 func (ttd TaskTypeDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) {
17702 return &ttd, true
17703 }
17704
17705
17706 func (ttd TaskTypeDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) {
17707 return &ttd, true
17708 }
17709
17710
17711 type TestFailoverCleanupInput struct {
17712
17713 Properties *TestFailoverCleanupInputProperties `json:"properties,omitempty"`
17714 }
17715
17716
17717 type TestFailoverCleanupInputProperties struct {
17718
17719 Comments *string `json:"comments,omitempty"`
17720 }
17721
17722
17723 type TestFailoverInput struct {
17724
17725 Properties *TestFailoverInputProperties `json:"properties,omitempty"`
17726 }
17727
17728
17729 type TestFailoverInputProperties struct {
17730
17731 FailoverDirection *string `json:"failoverDirection,omitempty"`
17732
17733 NetworkType *string `json:"networkType,omitempty"`
17734
17735 NetworkID *string `json:"networkId,omitempty"`
17736
17737 SkipTestFailoverCleanup *string `json:"skipTestFailoverCleanup,omitempty"`
17738
17739 ProviderSpecificDetails BasicProviderSpecificFailoverInput `json:"providerSpecificDetails,omitempty"`
17740 }
17741
17742
17743 func (tfip *TestFailoverInputProperties) UnmarshalJSON(body []byte) error {
17744 var m map[string]*json.RawMessage
17745 err := json.Unmarshal(body, &m)
17746 if err != nil {
17747 return err
17748 }
17749 for k, v := range m {
17750 switch k {
17751 case "failoverDirection":
17752 if v != nil {
17753 var failoverDirection string
17754 err = json.Unmarshal(*v, &failoverDirection)
17755 if err != nil {
17756 return err
17757 }
17758 tfip.FailoverDirection = &failoverDirection
17759 }
17760 case "networkType":
17761 if v != nil {
17762 var networkType string
17763 err = json.Unmarshal(*v, &networkType)
17764 if err != nil {
17765 return err
17766 }
17767 tfip.NetworkType = &networkType
17768 }
17769 case "networkId":
17770 if v != nil {
17771 var networkID string
17772 err = json.Unmarshal(*v, &networkID)
17773 if err != nil {
17774 return err
17775 }
17776 tfip.NetworkID = &networkID
17777 }
17778 case "skipTestFailoverCleanup":
17779 if v != nil {
17780 var skipTestFailoverCleanup string
17781 err = json.Unmarshal(*v, &skipTestFailoverCleanup)
17782 if err != nil {
17783 return err
17784 }
17785 tfip.SkipTestFailoverCleanup = &skipTestFailoverCleanup
17786 }
17787 case "providerSpecificDetails":
17788 if v != nil {
17789 providerSpecificDetails, err := unmarshalBasicProviderSpecificFailoverInput(*v)
17790 if err != nil {
17791 return err
17792 }
17793 tfip.ProviderSpecificDetails = providerSpecificDetails
17794 }
17795 }
17796 }
17797
17798 return nil
17799 }
17800
17801
17802 type TestFailoverJobDetails struct {
17803
17804 TestFailoverStatus *string `json:"testFailoverStatus,omitempty"`
17805
17806 Comments *string `json:"comments,omitempty"`
17807
17808 NetworkName *string `json:"networkName,omitempty"`
17809
17810 NetworkFriendlyName *string `json:"networkFriendlyName,omitempty"`
17811
17812 NetworkType *string `json:"networkType,omitempty"`
17813
17814 ProtectedItemDetails *[]FailoverReplicationProtectedItemDetails `json:"protectedItemDetails,omitempty"`
17815
17816 AffectedObjectDetails map[string]*string `json:"affectedObjectDetails"`
17817
17818 InstanceType InstanceTypeBasicJobDetails `json:"instanceType,omitempty"`
17819 }
17820
17821
17822 func (tfjd TestFailoverJobDetails) MarshalJSON() ([]byte, error) {
17823 tfjd.InstanceType = InstanceTypeTestFailoverJobDetails
17824 objectMap := make(map[string]interface{})
17825 if tfjd.TestFailoverStatus != nil {
17826 objectMap["testFailoverStatus"] = tfjd.TestFailoverStatus
17827 }
17828 if tfjd.Comments != nil {
17829 objectMap["comments"] = tfjd.Comments
17830 }
17831 if tfjd.NetworkName != nil {
17832 objectMap["networkName"] = tfjd.NetworkName
17833 }
17834 if tfjd.NetworkFriendlyName != nil {
17835 objectMap["networkFriendlyName"] = tfjd.NetworkFriendlyName
17836 }
17837 if tfjd.NetworkType != nil {
17838 objectMap["networkType"] = tfjd.NetworkType
17839 }
17840 if tfjd.ProtectedItemDetails != nil {
17841 objectMap["protectedItemDetails"] = tfjd.ProtectedItemDetails
17842 }
17843 if tfjd.AffectedObjectDetails != nil {
17844 objectMap["affectedObjectDetails"] = tfjd.AffectedObjectDetails
17845 }
17846 if tfjd.InstanceType != "" {
17847 objectMap["instanceType"] = tfjd.InstanceType
17848 }
17849 return json.Marshal(objectMap)
17850 }
17851
17852
17853 func (tfjd TestFailoverJobDetails) AsAsrJobDetails() (*AsrJobDetails, bool) {
17854 return nil, false
17855 }
17856
17857
17858 func (tfjd TestFailoverJobDetails) AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool) {
17859 return &tfjd, true
17860 }
17861
17862
17863 func (tfjd TestFailoverJobDetails) AsFailoverJobDetails() (*FailoverJobDetails, bool) {
17864 return nil, false
17865 }
17866
17867
17868 func (tfjd TestFailoverJobDetails) AsExportJobDetails() (*ExportJobDetails, bool) {
17869 return nil, false
17870 }
17871
17872
17873 func (tfjd TestFailoverJobDetails) AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool) {
17874 return nil, false
17875 }
17876
17877
17878 func (tfjd TestFailoverJobDetails) AsJobDetails() (*JobDetails, bool) {
17879 return nil, false
17880 }
17881
17882
17883 func (tfjd TestFailoverJobDetails) AsBasicJobDetails() (BasicJobDetails, bool) {
17884 return &tfjd, true
17885 }
17886
17887
17888 type UnplannedFailoverInput struct {
17889
17890 Properties *UnplannedFailoverInputProperties `json:"properties,omitempty"`
17891 }
17892
17893
17894 type UnplannedFailoverInputProperties struct {
17895
17896 FailoverDirection *string `json:"failoverDirection,omitempty"`
17897
17898 SourceSiteOperations *string `json:"sourceSiteOperations,omitempty"`
17899
17900 ProviderSpecificDetails BasicProviderSpecificFailoverInput `json:"providerSpecificDetails,omitempty"`
17901 }
17902
17903
17904 func (ufip *UnplannedFailoverInputProperties) UnmarshalJSON(body []byte) error {
17905 var m map[string]*json.RawMessage
17906 err := json.Unmarshal(body, &m)
17907 if err != nil {
17908 return err
17909 }
17910 for k, v := range m {
17911 switch k {
17912 case "failoverDirection":
17913 if v != nil {
17914 var failoverDirection string
17915 err = json.Unmarshal(*v, &failoverDirection)
17916 if err != nil {
17917 return err
17918 }
17919 ufip.FailoverDirection = &failoverDirection
17920 }
17921 case "sourceSiteOperations":
17922 if v != nil {
17923 var sourceSiteOperations string
17924 err = json.Unmarshal(*v, &sourceSiteOperations)
17925 if err != nil {
17926 return err
17927 }
17928 ufip.SourceSiteOperations = &sourceSiteOperations
17929 }
17930 case "providerSpecificDetails":
17931 if v != nil {
17932 providerSpecificDetails, err := unmarshalBasicProviderSpecificFailoverInput(*v)
17933 if err != nil {
17934 return err
17935 }
17936 ufip.ProviderSpecificDetails = providerSpecificDetails
17937 }
17938 }
17939 }
17940
17941 return nil
17942 }
17943
17944
17945 type UpdateMobilityServiceRequest struct {
17946
17947 Properties *UpdateMobilityServiceRequestProperties `json:"properties,omitempty"`
17948 }
17949
17950
17951 type UpdateMobilityServiceRequestProperties struct {
17952
17953 RunAsAccountID *string `json:"runAsAccountId,omitempty"`
17954 }
17955
17956
17957 type UpdateNetworkMappingInput struct {
17958
17959 Properties *UpdateNetworkMappingInputProperties `json:"properties,omitempty"`
17960 }
17961
17962
17963 type UpdateNetworkMappingInputProperties struct {
17964
17965 RecoveryFabricName *string `json:"recoveryFabricName,omitempty"`
17966
17967 RecoveryNetworkID *string `json:"recoveryNetworkId,omitempty"`
17968
17969 FabricSpecificDetails BasicFabricSpecificUpdateNetworkMappingInput `json:"fabricSpecificDetails,omitempty"`
17970 }
17971
17972
17973 func (unmip *UpdateNetworkMappingInputProperties) UnmarshalJSON(body []byte) error {
17974 var m map[string]*json.RawMessage
17975 err := json.Unmarshal(body, &m)
17976 if err != nil {
17977 return err
17978 }
17979 for k, v := range m {
17980 switch k {
17981 case "recoveryFabricName":
17982 if v != nil {
17983 var recoveryFabricName string
17984 err = json.Unmarshal(*v, &recoveryFabricName)
17985 if err != nil {
17986 return err
17987 }
17988 unmip.RecoveryFabricName = &recoveryFabricName
17989 }
17990 case "recoveryNetworkId":
17991 if v != nil {
17992 var recoveryNetworkID string
17993 err = json.Unmarshal(*v, &recoveryNetworkID)
17994 if err != nil {
17995 return err
17996 }
17997 unmip.RecoveryNetworkID = &recoveryNetworkID
17998 }
17999 case "fabricSpecificDetails":
18000 if v != nil {
18001 fabricSpecificDetails, err := unmarshalBasicFabricSpecificUpdateNetworkMappingInput(*v)
18002 if err != nil {
18003 return err
18004 }
18005 unmip.FabricSpecificDetails = fabricSpecificDetails
18006 }
18007 }
18008 }
18009
18010 return nil
18011 }
18012
18013
18014 type UpdatePolicyInput struct {
18015
18016 Properties *UpdatePolicyInputProperties `json:"properties,omitempty"`
18017 }
18018
18019
18020 type UpdatePolicyInputProperties struct {
18021
18022 ReplicationProviderSettings BasicPolicyProviderSpecificInput `json:"replicationProviderSettings,omitempty"`
18023 }
18024
18025
18026 func (upip *UpdatePolicyInputProperties) UnmarshalJSON(body []byte) error {
18027 var m map[string]*json.RawMessage
18028 err := json.Unmarshal(body, &m)
18029 if err != nil {
18030 return err
18031 }
18032 for k, v := range m {
18033 switch k {
18034 case "replicationProviderSettings":
18035 if v != nil {
18036 replicationProviderSettings, err := unmarshalBasicPolicyProviderSpecificInput(*v)
18037 if err != nil {
18038 return err
18039 }
18040 upip.ReplicationProviderSettings = replicationProviderSettings
18041 }
18042 }
18043 }
18044
18045 return nil
18046 }
18047
18048
18049 type UpdateRecoveryPlanInput struct {
18050
18051 Properties *UpdateRecoveryPlanInputProperties `json:"properties,omitempty"`
18052 }
18053
18054
18055 type UpdateRecoveryPlanInputProperties struct {
18056
18057 Groups *[]RecoveryPlanGroup `json:"groups,omitempty"`
18058 }
18059
18060
18061 type UpdateReplicationProtectedItemInput struct {
18062
18063 Properties *UpdateReplicationProtectedItemInputProperties `json:"properties,omitempty"`
18064 }
18065
18066
18067 type UpdateReplicationProtectedItemInputProperties struct {
18068
18069 RecoveryAzureVMName *string `json:"recoveryAzureVMName,omitempty"`
18070
18071 RecoveryAzureVMSize *string `json:"recoveryAzureVMSize,omitempty"`
18072
18073 SelectedRecoveryAzureNetworkID *string `json:"selectedRecoveryAzureNetworkId,omitempty"`
18074
18075 EnableRDPOnTargetOption *string `json:"enableRDPOnTargetOption,omitempty"`
18076
18077 VMNics *[]VMNicInputDetails `json:"vmNics,omitempty"`
18078
18079 LicenseType LicenseType `json:"licenseType,omitempty"`
18080
18081 RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"`
18082
18083 ProviderSpecificDetails BasicUpdateReplicationProtectedItemProviderInput `json:"providerSpecificDetails,omitempty"`
18084 }
18085
18086
18087 func (urpiip *UpdateReplicationProtectedItemInputProperties) UnmarshalJSON(body []byte) error {
18088 var m map[string]*json.RawMessage
18089 err := json.Unmarshal(body, &m)
18090 if err != nil {
18091 return err
18092 }
18093 for k, v := range m {
18094 switch k {
18095 case "recoveryAzureVMName":
18096 if v != nil {
18097 var recoveryAzureVMName string
18098 err = json.Unmarshal(*v, &recoveryAzureVMName)
18099 if err != nil {
18100 return err
18101 }
18102 urpiip.RecoveryAzureVMName = &recoveryAzureVMName
18103 }
18104 case "recoveryAzureVMSize":
18105 if v != nil {
18106 var recoveryAzureVMSize string
18107 err = json.Unmarshal(*v, &recoveryAzureVMSize)
18108 if err != nil {
18109 return err
18110 }
18111 urpiip.RecoveryAzureVMSize = &recoveryAzureVMSize
18112 }
18113 case "selectedRecoveryAzureNetworkId":
18114 if v != nil {
18115 var selectedRecoveryAzureNetworkID string
18116 err = json.Unmarshal(*v, &selectedRecoveryAzureNetworkID)
18117 if err != nil {
18118 return err
18119 }
18120 urpiip.SelectedRecoveryAzureNetworkID = &selectedRecoveryAzureNetworkID
18121 }
18122 case "enableRDPOnTargetOption":
18123 if v != nil {
18124 var enableRDPOnTargetOption string
18125 err = json.Unmarshal(*v, &enableRDPOnTargetOption)
18126 if err != nil {
18127 return err
18128 }
18129 urpiip.EnableRDPOnTargetOption = &enableRDPOnTargetOption
18130 }
18131 case "vmNics":
18132 if v != nil {
18133 var VMNics []VMNicInputDetails
18134 err = json.Unmarshal(*v, &VMNics)
18135 if err != nil {
18136 return err
18137 }
18138 urpiip.VMNics = &VMNics
18139 }
18140 case "licenseType":
18141 if v != nil {
18142 var licenseType LicenseType
18143 err = json.Unmarshal(*v, &licenseType)
18144 if err != nil {
18145 return err
18146 }
18147 urpiip.LicenseType = licenseType
18148 }
18149 case "recoveryAvailabilitySetId":
18150 if v != nil {
18151 var recoveryAvailabilitySetID string
18152 err = json.Unmarshal(*v, &recoveryAvailabilitySetID)
18153 if err != nil {
18154 return err
18155 }
18156 urpiip.RecoveryAvailabilitySetID = &recoveryAvailabilitySetID
18157 }
18158 case "providerSpecificDetails":
18159 if v != nil {
18160 providerSpecificDetails, err := unmarshalBasicUpdateReplicationProtectedItemProviderInput(*v)
18161 if err != nil {
18162 return err
18163 }
18164 urpiip.ProviderSpecificDetails = providerSpecificDetails
18165 }
18166 }
18167 }
18168
18169 return nil
18170 }
18171
18172
18173 type BasicUpdateReplicationProtectedItemProviderInput interface {
18174 AsHyperVReplicaAzureUpdateReplicationProtectedItemInput() (*HyperVReplicaAzureUpdateReplicationProtectedItemInput, bool)
18175 AsInMageAzureV2UpdateReplicationProtectedItemInput() (*InMageAzureV2UpdateReplicationProtectedItemInput, bool)
18176 AsA2AUpdateReplicationProtectedItemInput() (*A2AUpdateReplicationProtectedItemInput, bool)
18177 AsUpdateReplicationProtectedItemProviderInput() (*UpdateReplicationProtectedItemProviderInput, bool)
18178 }
18179
18180
18181 type UpdateReplicationProtectedItemProviderInput struct {
18182
18183 InstanceType InstanceTypeBasicUpdateReplicationProtectedItemProviderInput `json:"instanceType,omitempty"`
18184 }
18185
18186 func unmarshalBasicUpdateReplicationProtectedItemProviderInput(body []byte) (BasicUpdateReplicationProtectedItemProviderInput, error) {
18187 var m map[string]interface{}
18188 err := json.Unmarshal(body, &m)
18189 if err != nil {
18190 return nil, err
18191 }
18192
18193 switch m["instanceType"] {
18194 case string(InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeHyperVReplicaAzure):
18195 var hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput
18196 err := json.Unmarshal(body, &hvraurpii)
18197 return hvraurpii, err
18198 case string(InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeInMageAzureV2):
18199 var imavurpii InMageAzureV2UpdateReplicationProtectedItemInput
18200 err := json.Unmarshal(body, &imavurpii)
18201 return imavurpii, err
18202 case string(InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeA2A):
18203 var aurpii A2AUpdateReplicationProtectedItemInput
18204 err := json.Unmarshal(body, &aurpii)
18205 return aurpii, err
18206 default:
18207 var urpipi UpdateReplicationProtectedItemProviderInput
18208 err := json.Unmarshal(body, &urpipi)
18209 return urpipi, err
18210 }
18211 }
18212 func unmarshalBasicUpdateReplicationProtectedItemProviderInputArray(body []byte) ([]BasicUpdateReplicationProtectedItemProviderInput, error) {
18213 var rawMessages []*json.RawMessage
18214 err := json.Unmarshal(body, &rawMessages)
18215 if err != nil {
18216 return nil, err
18217 }
18218
18219 urpipiArray := make([]BasicUpdateReplicationProtectedItemProviderInput, len(rawMessages))
18220
18221 for index, rawMessage := range rawMessages {
18222 urpipi, err := unmarshalBasicUpdateReplicationProtectedItemProviderInput(*rawMessage)
18223 if err != nil {
18224 return nil, err
18225 }
18226 urpipiArray[index] = urpipi
18227 }
18228 return urpipiArray, nil
18229 }
18230
18231
18232 func (urpipi UpdateReplicationProtectedItemProviderInput) MarshalJSON() ([]byte, error) {
18233 urpipi.InstanceType = InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeUpdateReplicationProtectedItemProviderInput
18234 objectMap := make(map[string]interface{})
18235 if urpipi.InstanceType != "" {
18236 objectMap["instanceType"] = urpipi.InstanceType
18237 }
18238 return json.Marshal(objectMap)
18239 }
18240
18241
18242 func (urpipi UpdateReplicationProtectedItemProviderInput) AsHyperVReplicaAzureUpdateReplicationProtectedItemInput() (*HyperVReplicaAzureUpdateReplicationProtectedItemInput, bool) {
18243 return nil, false
18244 }
18245
18246
18247 func (urpipi UpdateReplicationProtectedItemProviderInput) AsInMageAzureV2UpdateReplicationProtectedItemInput() (*InMageAzureV2UpdateReplicationProtectedItemInput, bool) {
18248 return nil, false
18249 }
18250
18251
18252 func (urpipi UpdateReplicationProtectedItemProviderInput) AsA2AUpdateReplicationProtectedItemInput() (*A2AUpdateReplicationProtectedItemInput, bool) {
18253 return nil, false
18254 }
18255
18256
18257 func (urpipi UpdateReplicationProtectedItemProviderInput) AsUpdateReplicationProtectedItemProviderInput() (*UpdateReplicationProtectedItemProviderInput, bool) {
18258 return &urpipi, true
18259 }
18260
18261
18262 func (urpipi UpdateReplicationProtectedItemProviderInput) AsBasicUpdateReplicationProtectedItemProviderInput() (BasicUpdateReplicationProtectedItemProviderInput, bool) {
18263 return &urpipi, true
18264 }
18265
18266
18267 type UpdateVCenterRequest struct {
18268
18269 Properties *UpdateVCenterRequestProperties `json:"properties,omitempty"`
18270 }
18271
18272
18273 type UpdateVCenterRequestProperties struct {
18274
18275 FriendlyName *string `json:"friendlyName,omitempty"`
18276
18277 IPAddress *string `json:"ipAddress,omitempty"`
18278
18279 ProcessServerID *string `json:"processServerId,omitempty"`
18280
18281 Port *string `json:"port,omitempty"`
18282
18283 RunAsAccountID *string `json:"runAsAccountId,omitempty"`
18284 }
18285
18286
18287 type VaultHealthDetails struct {
18288 autorest.Response `json:"-"`
18289
18290 Properties *VaultHealthProperties `json:"properties,omitempty"`
18291
18292 ID *string `json:"id,omitempty"`
18293
18294 Name *string `json:"name,omitempty"`
18295
18296 Type *string `json:"type,omitempty"`
18297
18298 Location *string `json:"location,omitempty"`
18299 }
18300
18301
18302 func (vhd VaultHealthDetails) MarshalJSON() ([]byte, error) {
18303 objectMap := make(map[string]interface{})
18304 if vhd.Properties != nil {
18305 objectMap["properties"] = vhd.Properties
18306 }
18307 if vhd.Location != nil {
18308 objectMap["location"] = vhd.Location
18309 }
18310 return json.Marshal(objectMap)
18311 }
18312
18313
18314 type VaultHealthProperties struct {
18315
18316 VaultErrors *[]HealthError `json:"vaultErrors,omitempty"`
18317
18318 ProtectedItemsHealth *ResourceHealthSummary `json:"protectedItemsHealth,omitempty"`
18319
18320 FabricsHealth *ResourceHealthSummary `json:"fabricsHealth,omitempty"`
18321 }
18322
18323
18324 type VCenter struct {
18325 autorest.Response `json:"-"`
18326
18327 Properties *VCenterProperties `json:"properties,omitempty"`
18328
18329 ID *string `json:"id,omitempty"`
18330
18331 Name *string `json:"name,omitempty"`
18332
18333 Type *string `json:"type,omitempty"`
18334
18335 Location *string `json:"location,omitempty"`
18336 }
18337
18338
18339 func (vc VCenter) MarshalJSON() ([]byte, error) {
18340 objectMap := make(map[string]interface{})
18341 if vc.Properties != nil {
18342 objectMap["properties"] = vc.Properties
18343 }
18344 if vc.Location != nil {
18345 objectMap["location"] = vc.Location
18346 }
18347 return json.Marshal(objectMap)
18348 }
18349
18350
18351 type VCenterCollection struct {
18352 autorest.Response `json:"-"`
18353
18354 Value *[]VCenter `json:"value,omitempty"`
18355
18356 NextLink *string `json:"nextLink,omitempty"`
18357 }
18358
18359
18360 type VCenterCollectionIterator struct {
18361 i int
18362 page VCenterCollectionPage
18363 }
18364
18365
18366
18367 func (iter *VCenterCollectionIterator) NextWithContext(ctx context.Context) (err error) {
18368 if tracing.IsEnabled() {
18369 ctx = tracing.StartSpan(ctx, fqdn+"/VCenterCollectionIterator.NextWithContext")
18370 defer func() {
18371 sc := -1
18372 if iter.Response().Response.Response != nil {
18373 sc = iter.Response().Response.Response.StatusCode
18374 }
18375 tracing.EndSpan(ctx, sc, err)
18376 }()
18377 }
18378 iter.i++
18379 if iter.i < len(iter.page.Values()) {
18380 return nil
18381 }
18382 err = iter.page.NextWithContext(ctx)
18383 if err != nil {
18384 iter.i--
18385 return err
18386 }
18387 iter.i = 0
18388 return nil
18389 }
18390
18391
18392
18393
18394 func (iter *VCenterCollectionIterator) Next() error {
18395 return iter.NextWithContext(context.Background())
18396 }
18397
18398
18399 func (iter VCenterCollectionIterator) NotDone() bool {
18400 return iter.page.NotDone() && iter.i < len(iter.page.Values())
18401 }
18402
18403
18404 func (iter VCenterCollectionIterator) Response() VCenterCollection {
18405 return iter.page.Response()
18406 }
18407
18408
18409
18410 func (iter VCenterCollectionIterator) Value() VCenter {
18411 if !iter.page.NotDone() {
18412 return VCenter{}
18413 }
18414 return iter.page.Values()[iter.i]
18415 }
18416
18417
18418 func NewVCenterCollectionIterator(page VCenterCollectionPage) VCenterCollectionIterator {
18419 return VCenterCollectionIterator{page: page}
18420 }
18421
18422
18423 func (vcc VCenterCollection) IsEmpty() bool {
18424 return vcc.Value == nil || len(*vcc.Value) == 0
18425 }
18426
18427
18428 func (vcc VCenterCollection) hasNextLink() bool {
18429 return vcc.NextLink != nil && len(*vcc.NextLink) != 0
18430 }
18431
18432
18433
18434 func (vcc VCenterCollection) vCenterCollectionPreparer(ctx context.Context) (*http.Request, error) {
18435 if !vcc.hasNextLink() {
18436 return nil, nil
18437 }
18438 return autorest.Prepare((&http.Request{}).WithContext(ctx),
18439 autorest.AsJSON(),
18440 autorest.AsGet(),
18441 autorest.WithBaseURL(to.String(vcc.NextLink)))
18442 }
18443
18444
18445 type VCenterCollectionPage struct {
18446 fn func(context.Context, VCenterCollection) (VCenterCollection, error)
18447 vcc VCenterCollection
18448 }
18449
18450
18451
18452 func (page *VCenterCollectionPage) NextWithContext(ctx context.Context) (err error) {
18453 if tracing.IsEnabled() {
18454 ctx = tracing.StartSpan(ctx, fqdn+"/VCenterCollectionPage.NextWithContext")
18455 defer func() {
18456 sc := -1
18457 if page.Response().Response.Response != nil {
18458 sc = page.Response().Response.Response.StatusCode
18459 }
18460 tracing.EndSpan(ctx, sc, err)
18461 }()
18462 }
18463 for {
18464 next, err := page.fn(ctx, page.vcc)
18465 if err != nil {
18466 return err
18467 }
18468 page.vcc = next
18469 if !next.hasNextLink() || !next.IsEmpty() {
18470 break
18471 }
18472 }
18473 return nil
18474 }
18475
18476
18477
18478
18479 func (page *VCenterCollectionPage) Next() error {
18480 return page.NextWithContext(context.Background())
18481 }
18482
18483
18484 func (page VCenterCollectionPage) NotDone() bool {
18485 return !page.vcc.IsEmpty()
18486 }
18487
18488
18489 func (page VCenterCollectionPage) Response() VCenterCollection {
18490 return page.vcc
18491 }
18492
18493
18494 func (page VCenterCollectionPage) Values() []VCenter {
18495 if page.vcc.IsEmpty() {
18496 return nil
18497 }
18498 return *page.vcc.Value
18499 }
18500
18501
18502 func NewVCenterCollectionPage(cur VCenterCollection, getNextPage func(context.Context, VCenterCollection) (VCenterCollection, error)) VCenterCollectionPage {
18503 return VCenterCollectionPage{
18504 fn: getNextPage,
18505 vcc: cur,
18506 }
18507 }
18508
18509
18510 type VCenterProperties struct {
18511
18512 FriendlyName *string `json:"friendlyName,omitempty"`
18513
18514 InternalID *string `json:"internalId,omitempty"`
18515
18516 LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"`
18517
18518 DiscoveryStatus *string `json:"discoveryStatus,omitempty"`
18519
18520 ProcessServerID *string `json:"processServerId,omitempty"`
18521
18522 IPAddress *string `json:"ipAddress,omitempty"`
18523
18524 InfrastructureID *string `json:"infrastructureId,omitempty"`
18525
18526 Port *string `json:"port,omitempty"`
18527
18528 RunAsAccountID *string `json:"runAsAccountId,omitempty"`
18529
18530 FabricArmResourceName *string `json:"fabricArmResourceName,omitempty"`
18531 }
18532
18533
18534 type VirtualMachineTaskDetails struct {
18535
18536 SkippedReason *string `json:"skippedReason,omitempty"`
18537
18538 SkippedReasonString *string `json:"skippedReasonString,omitempty"`
18539
18540 JobTask *JobEntity `json:"jobTask,omitempty"`
18541
18542 InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"`
18543 }
18544
18545
18546 func (vmtd VirtualMachineTaskDetails) MarshalJSON() ([]byte, error) {
18547 vmtd.InstanceType = InstanceTypeVirtualMachineTaskDetails
18548 objectMap := make(map[string]interface{})
18549 if vmtd.SkippedReason != nil {
18550 objectMap["skippedReason"] = vmtd.SkippedReason
18551 }
18552 if vmtd.SkippedReasonString != nil {
18553 objectMap["skippedReasonString"] = vmtd.SkippedReasonString
18554 }
18555 if vmtd.JobTask != nil {
18556 objectMap["jobTask"] = vmtd.JobTask
18557 }
18558 if vmtd.InstanceType != "" {
18559 objectMap["instanceType"] = vmtd.InstanceType
18560 }
18561 return json.Marshal(objectMap)
18562 }
18563
18564
18565 func (vmtd VirtualMachineTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) {
18566 return nil, false
18567 }
18568
18569
18570 func (vmtd VirtualMachineTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) {
18571 return &vmtd, true
18572 }
18573
18574
18575 func (vmtd VirtualMachineTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) {
18576 return nil, false
18577 }
18578
18579
18580 func (vmtd VirtualMachineTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) {
18581 return nil, false
18582 }
18583
18584
18585 func (vmtd VirtualMachineTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) {
18586 return nil, false
18587 }
18588
18589
18590 func (vmtd VirtualMachineTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) {
18591 return nil, false
18592 }
18593
18594
18595 func (vmtd VirtualMachineTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) {
18596 return nil, false
18597 }
18598
18599
18600 func (vmtd VirtualMachineTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) {
18601 return nil, false
18602 }
18603
18604
18605 func (vmtd VirtualMachineTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) {
18606 return nil, false
18607 }
18608
18609
18610 func (vmtd VirtualMachineTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) {
18611 return &vmtd, true
18612 }
18613
18614
18615 type VmmDetails struct {
18616
18617 InstanceType InstanceTypeBasicFabricSpecificDetails `json:"instanceType,omitempty"`
18618 }
18619
18620
18621 func (vd VmmDetails) MarshalJSON() ([]byte, error) {
18622 vd.InstanceType = InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMM
18623 objectMap := make(map[string]interface{})
18624 if vd.InstanceType != "" {
18625 objectMap["instanceType"] = vd.InstanceType
18626 }
18627 return json.Marshal(objectMap)
18628 }
18629
18630
18631 func (vd VmmDetails) AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool) {
18632 return nil, false
18633 }
18634
18635
18636 func (vd VmmDetails) AsVmmDetails() (*VmmDetails, bool) {
18637 return &vd, true
18638 }
18639
18640
18641 func (vd VmmDetails) AsHyperVSiteDetails() (*HyperVSiteDetails, bool) {
18642 return nil, false
18643 }
18644
18645
18646 func (vd VmmDetails) AsVMwareDetails() (*VMwareDetails, bool) {
18647 return nil, false
18648 }
18649
18650
18651 func (vd VmmDetails) AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool) {
18652 return nil, false
18653 }
18654
18655
18656 func (vd VmmDetails) AsFabricSpecificDetails() (*FabricSpecificDetails, bool) {
18657 return nil, false
18658 }
18659
18660
18661 func (vd VmmDetails) AsBasicFabricSpecificDetails() (BasicFabricSpecificDetails, bool) {
18662 return &vd, true
18663 }
18664
18665
18666
18667 type VmmToAzureCreateNetworkMappingInput struct {
18668
18669 InstanceType InstanceTypeBasicFabricSpecificCreateNetworkMappingInput `json:"instanceType,omitempty"`
18670 }
18671
18672
18673 func (vtacnmi VmmToAzureCreateNetworkMappingInput) MarshalJSON() ([]byte, error) {
18674 vtacnmi.InstanceType = InstanceTypeVmmToAzure
18675 objectMap := make(map[string]interface{})
18676 if vtacnmi.InstanceType != "" {
18677 objectMap["instanceType"] = vtacnmi.InstanceType
18678 }
18679 return json.Marshal(objectMap)
18680 }
18681
18682
18683 func (vtacnmi VmmToAzureCreateNetworkMappingInput) AsAzureToAzureCreateNetworkMappingInput() (*AzureToAzureCreateNetworkMappingInput, bool) {
18684 return nil, false
18685 }
18686
18687
18688 func (vtacnmi VmmToAzureCreateNetworkMappingInput) AsVmmToAzureCreateNetworkMappingInput() (*VmmToAzureCreateNetworkMappingInput, bool) {
18689 return &vtacnmi, true
18690 }
18691
18692
18693 func (vtacnmi VmmToAzureCreateNetworkMappingInput) AsVmmToVmmCreateNetworkMappingInput() (*VmmToVmmCreateNetworkMappingInput, bool) {
18694 return nil, false
18695 }
18696
18697
18698 func (vtacnmi VmmToAzureCreateNetworkMappingInput) AsFabricSpecificCreateNetworkMappingInput() (*FabricSpecificCreateNetworkMappingInput, bool) {
18699 return nil, false
18700 }
18701
18702
18703 func (vtacnmi VmmToAzureCreateNetworkMappingInput) AsBasicFabricSpecificCreateNetworkMappingInput() (BasicFabricSpecificCreateNetworkMappingInput, bool) {
18704 return &vtacnmi, true
18705 }
18706
18707
18708 type VmmToAzureNetworkMappingSettings struct {
18709
18710 InstanceType InstanceTypeBasicNetworkMappingFabricSpecificSettings `json:"instanceType,omitempty"`
18711 }
18712
18713
18714 func (vtanms VmmToAzureNetworkMappingSettings) MarshalJSON() ([]byte, error) {
18715 vtanms.InstanceType = InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToAzure
18716 objectMap := make(map[string]interface{})
18717 if vtanms.InstanceType != "" {
18718 objectMap["instanceType"] = vtanms.InstanceType
18719 }
18720 return json.Marshal(objectMap)
18721 }
18722
18723
18724 func (vtanms VmmToAzureNetworkMappingSettings) AsAzureToAzureNetworkMappingSettings() (*AzureToAzureNetworkMappingSettings, bool) {
18725 return nil, false
18726 }
18727
18728
18729 func (vtanms VmmToAzureNetworkMappingSettings) AsVmmToAzureNetworkMappingSettings() (*VmmToAzureNetworkMappingSettings, bool) {
18730 return &vtanms, true
18731 }
18732
18733
18734 func (vtanms VmmToAzureNetworkMappingSettings) AsVmmToVmmNetworkMappingSettings() (*VmmToVmmNetworkMappingSettings, bool) {
18735 return nil, false
18736 }
18737
18738
18739 func (vtanms VmmToAzureNetworkMappingSettings) AsNetworkMappingFabricSpecificSettings() (*NetworkMappingFabricSpecificSettings, bool) {
18740 return nil, false
18741 }
18742
18743
18744 func (vtanms VmmToAzureNetworkMappingSettings) AsBasicNetworkMappingFabricSpecificSettings() (BasicNetworkMappingFabricSpecificSettings, bool) {
18745 return &vtanms, true
18746 }
18747
18748
18749
18750 type VmmToAzureUpdateNetworkMappingInput struct {
18751
18752 InstanceType InstanceTypeBasicFabricSpecificUpdateNetworkMappingInput `json:"instanceType,omitempty"`
18753 }
18754
18755
18756 func (vtaunmi VmmToAzureUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) {
18757 vtaunmi.InstanceType = InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToAzure
18758 objectMap := make(map[string]interface{})
18759 if vtaunmi.InstanceType != "" {
18760 objectMap["instanceType"] = vtaunmi.InstanceType
18761 }
18762 return json.Marshal(objectMap)
18763 }
18764
18765
18766 func (vtaunmi VmmToAzureUpdateNetworkMappingInput) AsAzureToAzureUpdateNetworkMappingInput() (*AzureToAzureUpdateNetworkMappingInput, bool) {
18767 return nil, false
18768 }
18769
18770
18771 func (vtaunmi VmmToAzureUpdateNetworkMappingInput) AsVmmToAzureUpdateNetworkMappingInput() (*VmmToAzureUpdateNetworkMappingInput, bool) {
18772 return &vtaunmi, true
18773 }
18774
18775
18776 func (vtaunmi VmmToAzureUpdateNetworkMappingInput) AsVmmToVmmUpdateNetworkMappingInput() (*VmmToVmmUpdateNetworkMappingInput, bool) {
18777 return nil, false
18778 }
18779
18780
18781 func (vtaunmi VmmToAzureUpdateNetworkMappingInput) AsFabricSpecificUpdateNetworkMappingInput() (*FabricSpecificUpdateNetworkMappingInput, bool) {
18782 return nil, false
18783 }
18784
18785
18786 func (vtaunmi VmmToAzureUpdateNetworkMappingInput) AsBasicFabricSpecificUpdateNetworkMappingInput() (BasicFabricSpecificUpdateNetworkMappingInput, bool) {
18787 return &vtaunmi, true
18788 }
18789
18790
18791
18792 type VmmToVmmCreateNetworkMappingInput struct {
18793
18794 InstanceType InstanceTypeBasicFabricSpecificCreateNetworkMappingInput `json:"instanceType,omitempty"`
18795 }
18796
18797
18798 func (vtvcnmi VmmToVmmCreateNetworkMappingInput) MarshalJSON() ([]byte, error) {
18799 vtvcnmi.InstanceType = InstanceTypeVmmToVmm
18800 objectMap := make(map[string]interface{})
18801 if vtvcnmi.InstanceType != "" {
18802 objectMap["instanceType"] = vtvcnmi.InstanceType
18803 }
18804 return json.Marshal(objectMap)
18805 }
18806
18807
18808 func (vtvcnmi VmmToVmmCreateNetworkMappingInput) AsAzureToAzureCreateNetworkMappingInput() (*AzureToAzureCreateNetworkMappingInput, bool) {
18809 return nil, false
18810 }
18811
18812
18813 func (vtvcnmi VmmToVmmCreateNetworkMappingInput) AsVmmToAzureCreateNetworkMappingInput() (*VmmToAzureCreateNetworkMappingInput, bool) {
18814 return nil, false
18815 }
18816
18817
18818 func (vtvcnmi VmmToVmmCreateNetworkMappingInput) AsVmmToVmmCreateNetworkMappingInput() (*VmmToVmmCreateNetworkMappingInput, bool) {
18819 return &vtvcnmi, true
18820 }
18821
18822
18823 func (vtvcnmi VmmToVmmCreateNetworkMappingInput) AsFabricSpecificCreateNetworkMappingInput() (*FabricSpecificCreateNetworkMappingInput, bool) {
18824 return nil, false
18825 }
18826
18827
18828 func (vtvcnmi VmmToVmmCreateNetworkMappingInput) AsBasicFabricSpecificCreateNetworkMappingInput() (BasicFabricSpecificCreateNetworkMappingInput, bool) {
18829 return &vtvcnmi, true
18830 }
18831
18832
18833 type VmmToVmmNetworkMappingSettings struct {
18834
18835 InstanceType InstanceTypeBasicNetworkMappingFabricSpecificSettings `json:"instanceType,omitempty"`
18836 }
18837
18838
18839 func (vtvnms VmmToVmmNetworkMappingSettings) MarshalJSON() ([]byte, error) {
18840 vtvnms.InstanceType = InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToVmm
18841 objectMap := make(map[string]interface{})
18842 if vtvnms.InstanceType != "" {
18843 objectMap["instanceType"] = vtvnms.InstanceType
18844 }
18845 return json.Marshal(objectMap)
18846 }
18847
18848
18849 func (vtvnms VmmToVmmNetworkMappingSettings) AsAzureToAzureNetworkMappingSettings() (*AzureToAzureNetworkMappingSettings, bool) {
18850 return nil, false
18851 }
18852
18853
18854 func (vtvnms VmmToVmmNetworkMappingSettings) AsVmmToAzureNetworkMappingSettings() (*VmmToAzureNetworkMappingSettings, bool) {
18855 return nil, false
18856 }
18857
18858
18859 func (vtvnms VmmToVmmNetworkMappingSettings) AsVmmToVmmNetworkMappingSettings() (*VmmToVmmNetworkMappingSettings, bool) {
18860 return &vtvnms, true
18861 }
18862
18863
18864 func (vtvnms VmmToVmmNetworkMappingSettings) AsNetworkMappingFabricSpecificSettings() (*NetworkMappingFabricSpecificSettings, bool) {
18865 return nil, false
18866 }
18867
18868
18869 func (vtvnms VmmToVmmNetworkMappingSettings) AsBasicNetworkMappingFabricSpecificSettings() (BasicNetworkMappingFabricSpecificSettings, bool) {
18870 return &vtvnms, true
18871 }
18872
18873
18874
18875 type VmmToVmmUpdateNetworkMappingInput struct {
18876
18877 InstanceType InstanceTypeBasicFabricSpecificUpdateNetworkMappingInput `json:"instanceType,omitempty"`
18878 }
18879
18880
18881 func (vtvunmi VmmToVmmUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) {
18882 vtvunmi.InstanceType = InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToVmm
18883 objectMap := make(map[string]interface{})
18884 if vtvunmi.InstanceType != "" {
18885 objectMap["instanceType"] = vtvunmi.InstanceType
18886 }
18887 return json.Marshal(objectMap)
18888 }
18889
18890
18891 func (vtvunmi VmmToVmmUpdateNetworkMappingInput) AsAzureToAzureUpdateNetworkMappingInput() (*AzureToAzureUpdateNetworkMappingInput, bool) {
18892 return nil, false
18893 }
18894
18895
18896 func (vtvunmi VmmToVmmUpdateNetworkMappingInput) AsVmmToAzureUpdateNetworkMappingInput() (*VmmToAzureUpdateNetworkMappingInput, bool) {
18897 return nil, false
18898 }
18899
18900
18901 func (vtvunmi VmmToVmmUpdateNetworkMappingInput) AsVmmToVmmUpdateNetworkMappingInput() (*VmmToVmmUpdateNetworkMappingInput, bool) {
18902 return &vtvunmi, true
18903 }
18904
18905
18906 func (vtvunmi VmmToVmmUpdateNetworkMappingInput) AsFabricSpecificUpdateNetworkMappingInput() (*FabricSpecificUpdateNetworkMappingInput, bool) {
18907 return nil, false
18908 }
18909
18910
18911 func (vtvunmi VmmToVmmUpdateNetworkMappingInput) AsBasicFabricSpecificUpdateNetworkMappingInput() (BasicFabricSpecificUpdateNetworkMappingInput, bool) {
18912 return &vtvunmi, true
18913 }
18914
18915
18916 type VMNicDetails struct {
18917
18918 NicID *string `json:"nicId,omitempty"`
18919
18920 ReplicaNicID *string `json:"replicaNicId,omitempty"`
18921
18922 SourceNicArmID *string `json:"sourceNicArmId,omitempty"`
18923
18924 VMSubnetName *string `json:"vMSubnetName,omitempty"`
18925
18926 VMNetworkName *string `json:"vMNetworkName,omitempty"`
18927
18928 RecoveryVMNetworkID *string `json:"recoveryVMNetworkId,omitempty"`
18929
18930 RecoveryVMSubnetName *string `json:"recoveryVMSubnetName,omitempty"`
18931
18932 IPAddressType *string `json:"ipAddressType,omitempty"`
18933
18934 PrimaryNicStaticIPAddress *string `json:"primaryNicStaticIPAddress,omitempty"`
18935
18936 ReplicaNicStaticIPAddress *string `json:"replicaNicStaticIPAddress,omitempty"`
18937
18938 SelectionType *string `json:"selectionType,omitempty"`
18939
18940 RecoveryNicIPAddressType *string `json:"recoveryNicIpAddressType,omitempty"`
18941 }
18942
18943
18944 type VMNicInputDetails struct {
18945
18946 NicID *string `json:"nicId,omitempty"`
18947
18948 RecoveryVMSubnetName *string `json:"recoveryVMSubnetName,omitempty"`
18949
18950 ReplicaNicStaticIPAddress *string `json:"replicaNicStaticIPAddress,omitempty"`
18951
18952 SelectionType *string `json:"selectionType,omitempty"`
18953 }
18954
18955
18956 type VMNicUpdatesTaskDetails struct {
18957
18958 VMID *string `json:"vmId,omitempty"`
18959
18960 NicID *string `json:"nicId,omitempty"`
18961
18962 Name *string `json:"name,omitempty"`
18963
18964 InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"`
18965 }
18966
18967
18968 func (vnutd VMNicUpdatesTaskDetails) MarshalJSON() ([]byte, error) {
18969 vnutd.InstanceType = InstanceTypeVMNicUpdatesTaskDetails
18970 objectMap := make(map[string]interface{})
18971 if vnutd.VMID != nil {
18972 objectMap["vmId"] = vnutd.VMID
18973 }
18974 if vnutd.NicID != nil {
18975 objectMap["nicId"] = vnutd.NicID
18976 }
18977 if vnutd.Name != nil {
18978 objectMap["name"] = vnutd.Name
18979 }
18980 if vnutd.InstanceType != "" {
18981 objectMap["instanceType"] = vnutd.InstanceType
18982 }
18983 return json.Marshal(objectMap)
18984 }
18985
18986
18987 func (vnutd VMNicUpdatesTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) {
18988 return nil, false
18989 }
18990
18991
18992 func (vnutd VMNicUpdatesTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) {
18993 return nil, false
18994 }
18995
18996
18997 func (vnutd VMNicUpdatesTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) {
18998 return nil, false
18999 }
19000
19001
19002 func (vnutd VMNicUpdatesTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) {
19003 return nil, false
19004 }
19005
19006
19007 func (vnutd VMNicUpdatesTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) {
19008 return nil, false
19009 }
19010
19011
19012 func (vnutd VMNicUpdatesTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) {
19013 return &vnutd, true
19014 }
19015
19016
19017 func (vnutd VMNicUpdatesTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) {
19018 return nil, false
19019 }
19020
19021
19022 func (vnutd VMNicUpdatesTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) {
19023 return nil, false
19024 }
19025
19026
19027 func (vnutd VMNicUpdatesTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) {
19028 return nil, false
19029 }
19030
19031
19032 func (vnutd VMNicUpdatesTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) {
19033 return &vnutd, true
19034 }
19035
19036
19037 type VMwareCbtPolicyCreationInput struct {
19038
19039 RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"`
19040
19041 CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"`
19042
19043 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"`
19044
19045 InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"`
19046 }
19047
19048
19049 func (vmcpci VMwareCbtPolicyCreationInput) MarshalJSON() ([]byte, error) {
19050 vmcpci.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeVMwareCbt
19051 objectMap := make(map[string]interface{})
19052 if vmcpci.RecoveryPointHistory != nil {
19053 objectMap["recoveryPointHistory"] = vmcpci.RecoveryPointHistory
19054 }
19055 if vmcpci.CrashConsistentFrequencyInMinutes != nil {
19056 objectMap["crashConsistentFrequencyInMinutes"] = vmcpci.CrashConsistentFrequencyInMinutes
19057 }
19058 if vmcpci.AppConsistentFrequencyInMinutes != nil {
19059 objectMap["appConsistentFrequencyInMinutes"] = vmcpci.AppConsistentFrequencyInMinutes
19060 }
19061 if vmcpci.InstanceType != "" {
19062 objectMap["instanceType"] = vmcpci.InstanceType
19063 }
19064 return json.Marshal(objectMap)
19065 }
19066
19067
19068 func (vmcpci VMwareCbtPolicyCreationInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) {
19069 return nil, false
19070 }
19071
19072
19073 func (vmcpci VMwareCbtPolicyCreationInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) {
19074 return nil, false
19075 }
19076
19077
19078 func (vmcpci VMwareCbtPolicyCreationInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) {
19079 return nil, false
19080 }
19081
19082
19083 func (vmcpci VMwareCbtPolicyCreationInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) {
19084 return nil, false
19085 }
19086
19087
19088 func (vmcpci VMwareCbtPolicyCreationInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) {
19089 return nil, false
19090 }
19091
19092
19093 func (vmcpci VMwareCbtPolicyCreationInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) {
19094 return nil, false
19095 }
19096
19097
19098 func (vmcpci VMwareCbtPolicyCreationInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) {
19099 return &vmcpci, true
19100 }
19101
19102
19103 func (vmcpci VMwareCbtPolicyCreationInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) {
19104 return nil, false
19105 }
19106
19107
19108 func (vmcpci VMwareCbtPolicyCreationInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) {
19109 return &vmcpci, true
19110 }
19111
19112
19113 type VmwareCbtPolicyDetails struct {
19114
19115 RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"`
19116
19117 RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"`
19118
19119 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"`
19120
19121 CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"`
19122
19123 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"`
19124 }
19125
19126
19127 func (vcpd VmwareCbtPolicyDetails) MarshalJSON() ([]byte, error) {
19128 vcpd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt
19129 objectMap := make(map[string]interface{})
19130 if vcpd.RecoveryPointThresholdInMinutes != nil {
19131 objectMap["recoveryPointThresholdInMinutes"] = vcpd.RecoveryPointThresholdInMinutes
19132 }
19133 if vcpd.RecoveryPointHistory != nil {
19134 objectMap["recoveryPointHistory"] = vcpd.RecoveryPointHistory
19135 }
19136 if vcpd.AppConsistentFrequencyInMinutes != nil {
19137 objectMap["appConsistentFrequencyInMinutes"] = vcpd.AppConsistentFrequencyInMinutes
19138 }
19139 if vcpd.CrashConsistentFrequencyInMinutes != nil {
19140 objectMap["crashConsistentFrequencyInMinutes"] = vcpd.CrashConsistentFrequencyInMinutes
19141 }
19142 if vcpd.InstanceType != "" {
19143 objectMap["instanceType"] = vcpd.InstanceType
19144 }
19145 return json.Marshal(objectMap)
19146 }
19147
19148
19149 func (vcpd VmwareCbtPolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) {
19150 return nil, false
19151 }
19152
19153
19154 func (vcpd VmwareCbtPolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) {
19155 return nil, false
19156 }
19157
19158
19159 func (vcpd VmwareCbtPolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) {
19160 return nil, false
19161 }
19162
19163
19164 func (vcpd VmwareCbtPolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) {
19165 return nil, false
19166 }
19167
19168
19169 func (vcpd VmwareCbtPolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) {
19170 return nil, false
19171 }
19172
19173
19174 func (vcpd VmwareCbtPolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) {
19175 return nil, false
19176 }
19177
19178
19179 func (vcpd VmwareCbtPolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) {
19180 return nil, false
19181 }
19182
19183
19184 func (vcpd VmwareCbtPolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) {
19185 return nil, false
19186 }
19187
19188
19189 func (vcpd VmwareCbtPolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) {
19190 return nil, false
19191 }
19192
19193
19194 func (vcpd VmwareCbtPolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) {
19195 return &vcpd, true
19196 }
19197
19198
19199 func (vcpd VmwareCbtPolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) {
19200 return nil, false
19201 }
19202
19203
19204 func (vcpd VmwareCbtPolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) {
19205 return &vcpd, true
19206 }
19207
19208
19209 type VMwareDetails struct {
19210
19211 ProcessServers *[]ProcessServer `json:"processServers,omitempty"`
19212
19213 MasterTargetServers *[]MasterTargetServer `json:"masterTargetServers,omitempty"`
19214
19215 RunAsAccounts *[]RunAsAccount `json:"runAsAccounts,omitempty"`
19216
19217 ReplicationPairCount *string `json:"replicationPairCount,omitempty"`
19218
19219 ProcessServerCount *string `json:"processServerCount,omitempty"`
19220
19221 AgentCount *string `json:"agentCount,omitempty"`
19222
19223 ProtectedServers *string `json:"protectedServers,omitempty"`
19224
19225 SystemLoad *string `json:"systemLoad,omitempty"`
19226
19227 SystemLoadStatus *string `json:"systemLoadStatus,omitempty"`
19228
19229 CPULoad *string `json:"cpuLoad,omitempty"`
19230
19231 CPULoadStatus *string `json:"cpuLoadStatus,omitempty"`
19232
19233 TotalMemoryInBytes *int64 `json:"totalMemoryInBytes,omitempty"`
19234
19235 AvailableMemoryInBytes *int64 `json:"availableMemoryInBytes,omitempty"`
19236
19237 MemoryUsageStatus *string `json:"memoryUsageStatus,omitempty"`
19238
19239 TotalSpaceInBytes *int64 `json:"totalSpaceInBytes,omitempty"`
19240
19241 AvailableSpaceInBytes *int64 `json:"availableSpaceInBytes,omitempty"`
19242
19243 SpaceUsageStatus *string `json:"spaceUsageStatus,omitempty"`
19244
19245 WebLoad *string `json:"webLoad,omitempty"`
19246
19247 WebLoadStatus *string `json:"webLoadStatus,omitempty"`
19248
19249 DatabaseServerLoad *string `json:"databaseServerLoad,omitempty"`
19250
19251 DatabaseServerLoadStatus *string `json:"databaseServerLoadStatus,omitempty"`
19252
19253 CsServiceStatus *string `json:"csServiceStatus,omitempty"`
19254
19255 IPAddress *string `json:"ipAddress,omitempty"`
19256
19257 AgentVersion *string `json:"agentVersion,omitempty"`
19258
19259 HostName *string `json:"hostName,omitempty"`
19260
19261 LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"`
19262
19263 VersionStatus *string `json:"versionStatus,omitempty"`
19264
19265 SslCertExpiryDate *date.Time `json:"sslCertExpiryDate,omitempty"`
19266
19267 SslCertExpiryRemainingDays *int32 `json:"sslCertExpiryRemainingDays,omitempty"`
19268
19269 PsTemplateVersion *string `json:"psTemplateVersion,omitempty"`
19270
19271 InstanceType InstanceTypeBasicFabricSpecificDetails `json:"instanceType,omitempty"`
19272 }
19273
19274
19275 func (vmd VMwareDetails) MarshalJSON() ([]byte, error) {
19276 vmd.InstanceType = InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMware
19277 objectMap := make(map[string]interface{})
19278 if vmd.ProcessServers != nil {
19279 objectMap["processServers"] = vmd.ProcessServers
19280 }
19281 if vmd.MasterTargetServers != nil {
19282 objectMap["masterTargetServers"] = vmd.MasterTargetServers
19283 }
19284 if vmd.RunAsAccounts != nil {
19285 objectMap["runAsAccounts"] = vmd.RunAsAccounts
19286 }
19287 if vmd.ReplicationPairCount != nil {
19288 objectMap["replicationPairCount"] = vmd.ReplicationPairCount
19289 }
19290 if vmd.ProcessServerCount != nil {
19291 objectMap["processServerCount"] = vmd.ProcessServerCount
19292 }
19293 if vmd.AgentCount != nil {
19294 objectMap["agentCount"] = vmd.AgentCount
19295 }
19296 if vmd.ProtectedServers != nil {
19297 objectMap["protectedServers"] = vmd.ProtectedServers
19298 }
19299 if vmd.SystemLoad != nil {
19300 objectMap["systemLoad"] = vmd.SystemLoad
19301 }
19302 if vmd.SystemLoadStatus != nil {
19303 objectMap["systemLoadStatus"] = vmd.SystemLoadStatus
19304 }
19305 if vmd.CPULoad != nil {
19306 objectMap["cpuLoad"] = vmd.CPULoad
19307 }
19308 if vmd.CPULoadStatus != nil {
19309 objectMap["cpuLoadStatus"] = vmd.CPULoadStatus
19310 }
19311 if vmd.TotalMemoryInBytes != nil {
19312 objectMap["totalMemoryInBytes"] = vmd.TotalMemoryInBytes
19313 }
19314 if vmd.AvailableMemoryInBytes != nil {
19315 objectMap["availableMemoryInBytes"] = vmd.AvailableMemoryInBytes
19316 }
19317 if vmd.MemoryUsageStatus != nil {
19318 objectMap["memoryUsageStatus"] = vmd.MemoryUsageStatus
19319 }
19320 if vmd.TotalSpaceInBytes != nil {
19321 objectMap["totalSpaceInBytes"] = vmd.TotalSpaceInBytes
19322 }
19323 if vmd.AvailableSpaceInBytes != nil {
19324 objectMap["availableSpaceInBytes"] = vmd.AvailableSpaceInBytes
19325 }
19326 if vmd.SpaceUsageStatus != nil {
19327 objectMap["spaceUsageStatus"] = vmd.SpaceUsageStatus
19328 }
19329 if vmd.WebLoad != nil {
19330 objectMap["webLoad"] = vmd.WebLoad
19331 }
19332 if vmd.WebLoadStatus != nil {
19333 objectMap["webLoadStatus"] = vmd.WebLoadStatus
19334 }
19335 if vmd.DatabaseServerLoad != nil {
19336 objectMap["databaseServerLoad"] = vmd.DatabaseServerLoad
19337 }
19338 if vmd.DatabaseServerLoadStatus != nil {
19339 objectMap["databaseServerLoadStatus"] = vmd.DatabaseServerLoadStatus
19340 }
19341 if vmd.CsServiceStatus != nil {
19342 objectMap["csServiceStatus"] = vmd.CsServiceStatus
19343 }
19344 if vmd.IPAddress != nil {
19345 objectMap["ipAddress"] = vmd.IPAddress
19346 }
19347 if vmd.AgentVersion != nil {
19348 objectMap["agentVersion"] = vmd.AgentVersion
19349 }
19350 if vmd.HostName != nil {
19351 objectMap["hostName"] = vmd.HostName
19352 }
19353 if vmd.LastHeartbeat != nil {
19354 objectMap["lastHeartbeat"] = vmd.LastHeartbeat
19355 }
19356 if vmd.VersionStatus != nil {
19357 objectMap["versionStatus"] = vmd.VersionStatus
19358 }
19359 if vmd.SslCertExpiryDate != nil {
19360 objectMap["sslCertExpiryDate"] = vmd.SslCertExpiryDate
19361 }
19362 if vmd.SslCertExpiryRemainingDays != nil {
19363 objectMap["sslCertExpiryRemainingDays"] = vmd.SslCertExpiryRemainingDays
19364 }
19365 if vmd.PsTemplateVersion != nil {
19366 objectMap["psTemplateVersion"] = vmd.PsTemplateVersion
19367 }
19368 if vmd.InstanceType != "" {
19369 objectMap["instanceType"] = vmd.InstanceType
19370 }
19371 return json.Marshal(objectMap)
19372 }
19373
19374
19375 func (vmd VMwareDetails) AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool) {
19376 return nil, false
19377 }
19378
19379
19380 func (vmd VMwareDetails) AsVmmDetails() (*VmmDetails, bool) {
19381 return nil, false
19382 }
19383
19384
19385 func (vmd VMwareDetails) AsHyperVSiteDetails() (*HyperVSiteDetails, bool) {
19386 return nil, false
19387 }
19388
19389
19390 func (vmd VMwareDetails) AsVMwareDetails() (*VMwareDetails, bool) {
19391 return &vmd, true
19392 }
19393
19394
19395 func (vmd VMwareDetails) AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool) {
19396 return nil, false
19397 }
19398
19399
19400 func (vmd VMwareDetails) AsFabricSpecificDetails() (*FabricSpecificDetails, bool) {
19401 return nil, false
19402 }
19403
19404
19405 func (vmd VMwareDetails) AsBasicFabricSpecificDetails() (BasicFabricSpecificDetails, bool) {
19406 return &vmd, true
19407 }
19408
19409
19410 type VMwareV2FabricCreationInput struct {
19411
19412 InstanceType InstanceTypeBasicFabricSpecificCreationInput `json:"instanceType,omitempty"`
19413 }
19414
19415
19416 func (vmvfci VMwareV2FabricCreationInput) MarshalJSON() ([]byte, error) {
19417 vmvfci.InstanceType = InstanceTypeVMwareV2
19418 objectMap := make(map[string]interface{})
19419 if vmvfci.InstanceType != "" {
19420 objectMap["instanceType"] = vmvfci.InstanceType
19421 }
19422 return json.Marshal(objectMap)
19423 }
19424
19425
19426 func (vmvfci VMwareV2FabricCreationInput) AsAzureFabricCreationInput() (*AzureFabricCreationInput, bool) {
19427 return nil, false
19428 }
19429
19430
19431 func (vmvfci VMwareV2FabricCreationInput) AsVMwareV2FabricCreationInput() (*VMwareV2FabricCreationInput, bool) {
19432 return &vmvfci, true
19433 }
19434
19435
19436 func (vmvfci VMwareV2FabricCreationInput) AsFabricSpecificCreationInput() (*FabricSpecificCreationInput, bool) {
19437 return nil, false
19438 }
19439
19440
19441 func (vmvfci VMwareV2FabricCreationInput) AsBasicFabricSpecificCreationInput() (BasicFabricSpecificCreationInput, bool) {
19442 return &vmvfci, true
19443 }
19444
19445
19446 type VMwareV2FabricSpecificDetails struct {
19447
19448 SrsServiceEndpoint *string `json:"srsServiceEndpoint,omitempty"`
19449
19450 RcmServiceEndpoint *string `json:"rcmServiceEndpoint,omitempty"`
19451
19452 InstanceType InstanceTypeBasicFabricSpecificDetails `json:"instanceType,omitempty"`
19453 }
19454
19455
19456 func (vmvfsd VMwareV2FabricSpecificDetails) MarshalJSON() ([]byte, error) {
19457 vmvfsd.InstanceType = InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMwareV2
19458 objectMap := make(map[string]interface{})
19459 if vmvfsd.SrsServiceEndpoint != nil {
19460 objectMap["srsServiceEndpoint"] = vmvfsd.SrsServiceEndpoint
19461 }
19462 if vmvfsd.RcmServiceEndpoint != nil {
19463 objectMap["rcmServiceEndpoint"] = vmvfsd.RcmServiceEndpoint
19464 }
19465 if vmvfsd.InstanceType != "" {
19466 objectMap["instanceType"] = vmvfsd.InstanceType
19467 }
19468 return json.Marshal(objectMap)
19469 }
19470
19471
19472 func (vmvfsd VMwareV2FabricSpecificDetails) AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool) {
19473 return nil, false
19474 }
19475
19476
19477 func (vmvfsd VMwareV2FabricSpecificDetails) AsVmmDetails() (*VmmDetails, bool) {
19478 return nil, false
19479 }
19480
19481
19482 func (vmvfsd VMwareV2FabricSpecificDetails) AsHyperVSiteDetails() (*HyperVSiteDetails, bool) {
19483 return nil, false
19484 }
19485
19486
19487 func (vmvfsd VMwareV2FabricSpecificDetails) AsVMwareDetails() (*VMwareDetails, bool) {
19488 return nil, false
19489 }
19490
19491
19492 func (vmvfsd VMwareV2FabricSpecificDetails) AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool) {
19493 return &vmvfsd, true
19494 }
19495
19496
19497 func (vmvfsd VMwareV2FabricSpecificDetails) AsFabricSpecificDetails() (*FabricSpecificDetails, bool) {
19498 return nil, false
19499 }
19500
19501
19502 func (vmvfsd VMwareV2FabricSpecificDetails) AsBasicFabricSpecificDetails() (BasicFabricSpecificDetails, bool) {
19503 return &vmvfsd, true
19504 }
19505
19506
19507 type VMwareVirtualMachineDetails struct {
19508
19509 AgentGeneratedID *string `json:"agentGeneratedId,omitempty"`
19510
19511 AgentInstalled *string `json:"agentInstalled,omitempty"`
19512
19513 OsType *string `json:"osType,omitempty"`
19514
19515 AgentVersion *string `json:"agentVersion,omitempty"`
19516
19517 IPAddress *string `json:"ipAddress,omitempty"`
19518
19519 PoweredOn *string `json:"poweredOn,omitempty"`
19520
19521 VCenterInfrastructureID *string `json:"vCenterInfrastructureId,omitempty"`
19522
19523 DiscoveryType *string `json:"discoveryType,omitempty"`
19524
19525 DiskDetails *[]InMageDiskDetails `json:"diskDetails,omitempty"`
19526
19527 ValidationErrors *[]HealthError `json:"validationErrors,omitempty"`
19528
19529 InstanceType InstanceTypeBasicConfigurationSettings `json:"instanceType,omitempty"`
19530 }
19531
19532
19533 func (vmvmd VMwareVirtualMachineDetails) MarshalJSON() ([]byte, error) {
19534 vmvmd.InstanceType = InstanceTypeVMwareVirtualMachine
19535 objectMap := make(map[string]interface{})
19536 if vmvmd.AgentGeneratedID != nil {
19537 objectMap["agentGeneratedId"] = vmvmd.AgentGeneratedID
19538 }
19539 if vmvmd.AgentInstalled != nil {
19540 objectMap["agentInstalled"] = vmvmd.AgentInstalled
19541 }
19542 if vmvmd.OsType != nil {
19543 objectMap["osType"] = vmvmd.OsType
19544 }
19545 if vmvmd.AgentVersion != nil {
19546 objectMap["agentVersion"] = vmvmd.AgentVersion
19547 }
19548 if vmvmd.IPAddress != nil {
19549 objectMap["ipAddress"] = vmvmd.IPAddress
19550 }
19551 if vmvmd.PoweredOn != nil {
19552 objectMap["poweredOn"] = vmvmd.PoweredOn
19553 }
19554 if vmvmd.VCenterInfrastructureID != nil {
19555 objectMap["vCenterInfrastructureId"] = vmvmd.VCenterInfrastructureID
19556 }
19557 if vmvmd.DiscoveryType != nil {
19558 objectMap["discoveryType"] = vmvmd.DiscoveryType
19559 }
19560 if vmvmd.DiskDetails != nil {
19561 objectMap["diskDetails"] = vmvmd.DiskDetails
19562 }
19563 if vmvmd.ValidationErrors != nil {
19564 objectMap["validationErrors"] = vmvmd.ValidationErrors
19565 }
19566 if vmvmd.InstanceType != "" {
19567 objectMap["instanceType"] = vmvmd.InstanceType
19568 }
19569 return json.Marshal(objectMap)
19570 }
19571
19572
19573 func (vmvmd VMwareVirtualMachineDetails) AsHyperVVirtualMachineDetails() (*HyperVVirtualMachineDetails, bool) {
19574 return nil, false
19575 }
19576
19577
19578 func (vmvmd VMwareVirtualMachineDetails) AsVMwareVirtualMachineDetails() (*VMwareVirtualMachineDetails, bool) {
19579 return &vmvmd, true
19580 }
19581
19582
19583 func (vmvmd VMwareVirtualMachineDetails) AsReplicationGroupDetails() (*ReplicationGroupDetails, bool) {
19584 return nil, false
19585 }
19586
19587
19588 func (vmvmd VMwareVirtualMachineDetails) AsConfigurationSettings() (*ConfigurationSettings, bool) {
19589 return nil, false
19590 }
19591
19592
19593 func (vmvmd VMwareVirtualMachineDetails) AsBasicConfigurationSettings() (BasicConfigurationSettings, bool) {
19594 return &vmvmd, true
19595 }
19596
View as plain text