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/2018-01-10/siterecovery"
22
23
24 type A2AApplyRecoveryPointInput struct {
25
26 InstanceType InstanceType `json:"instanceType,omitempty"`
27 }
28
29
30 func (aarpi A2AApplyRecoveryPointInput) MarshalJSON() ([]byte, error) {
31 aarpi.InstanceType = InstanceTypeA2A
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) AsA2AApplyRecoveryPointInput() (*A2AApplyRecoveryPointInput, bool) {
41 return &aarpi, true
42 }
43
44
45 func (aarpi A2AApplyRecoveryPointInput) AsHyperVReplicaAzureApplyRecoveryPointInput() (*HyperVReplicaAzureApplyRecoveryPointInput, bool) {
46 return nil, false
47 }
48
49
50 func (aarpi A2AApplyRecoveryPointInput) AsInMageAzureV2ApplyRecoveryPointInput() (*InMageAzureV2ApplyRecoveryPointInput, bool) {
51 return nil, false
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) AsVMwareCbtContainerCreationInput() (*VMwareCbtContainerCreationInput, bool) {
87 return nil, false
88 }
89
90
91 func (acci A2AContainerCreationInput) AsReplicationProviderSpecificContainerCreationInput() (*ReplicationProviderSpecificContainerCreationInput, bool) {
92 return nil, false
93 }
94
95
96 func (acci A2AContainerCreationInput) AsBasicReplicationProviderSpecificContainerCreationInput() (BasicReplicationProviderSpecificContainerCreationInput, bool) {
97 return &acci, true
98 }
99
100
101 type A2AContainerMappingInput struct {
102
103 AgentAutoUpdateStatus AgentAutoUpdateStatus `json:"agentAutoUpdateStatus,omitempty"`
104
105 AutomationAccountArmID *string `json:"automationAccountArmId,omitempty"`
106
107 InstanceType InstanceTypeBasicReplicationProviderSpecificContainerMappingInput `json:"instanceType,omitempty"`
108 }
109
110
111 func (acmi A2AContainerMappingInput) MarshalJSON() ([]byte, error) {
112 acmi.InstanceType = InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeA2A
113 objectMap := make(map[string]interface{})
114 if acmi.AgentAutoUpdateStatus != "" {
115 objectMap["agentAutoUpdateStatus"] = acmi.AgentAutoUpdateStatus
116 }
117 if acmi.AutomationAccountArmID != nil {
118 objectMap["automationAccountArmId"] = acmi.AutomationAccountArmID
119 }
120 if acmi.InstanceType != "" {
121 objectMap["instanceType"] = acmi.InstanceType
122 }
123 return json.Marshal(objectMap)
124 }
125
126
127 func (acmi A2AContainerMappingInput) AsA2AContainerMappingInput() (*A2AContainerMappingInput, bool) {
128 return &acmi, true
129 }
130
131
132 func (acmi A2AContainerMappingInput) AsVMwareCbtContainerMappingInput() (*VMwareCbtContainerMappingInput, bool) {
133 return nil, false
134 }
135
136
137 func (acmi A2AContainerMappingInput) AsReplicationProviderSpecificContainerMappingInput() (*ReplicationProviderSpecificContainerMappingInput, bool) {
138 return nil, false
139 }
140
141
142 func (acmi A2AContainerMappingInput) AsBasicReplicationProviderSpecificContainerMappingInput() (BasicReplicationProviderSpecificContainerMappingInput, bool) {
143 return &acmi, true
144 }
145
146
147 type A2AEnableProtectionInput struct {
148
149 FabricObjectID *string `json:"fabricObjectId,omitempty"`
150
151 RecoveryContainerID *string `json:"recoveryContainerId,omitempty"`
152
153 RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"`
154
155 RecoveryCloudServiceID *string `json:"recoveryCloudServiceId,omitempty"`
156
157 RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"`
158
159 VMDisks *[]A2AVMDiskInputDetails `json:"vmDisks,omitempty"`
160
161 VMManagedDisks *[]A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"`
162
163 MultiVMGroupName *string `json:"multiVmGroupName,omitempty"`
164
165 RecoveryBootDiagStorageAccountID *string `json:"recoveryBootDiagStorageAccountId,omitempty"`
166
167 DiskEncryptionInfo *DiskEncryptionInfo `json:"diskEncryptionInfo,omitempty"`
168
169 InstanceType InstanceTypeBasicEnableProtectionProviderSpecificInput `json:"instanceType,omitempty"`
170 }
171
172
173 func (aepi A2AEnableProtectionInput) MarshalJSON() ([]byte, error) {
174 aepi.InstanceType = InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeA2A
175 objectMap := make(map[string]interface{})
176 if aepi.FabricObjectID != nil {
177 objectMap["fabricObjectId"] = aepi.FabricObjectID
178 }
179 if aepi.RecoveryContainerID != nil {
180 objectMap["recoveryContainerId"] = aepi.RecoveryContainerID
181 }
182 if aepi.RecoveryResourceGroupID != nil {
183 objectMap["recoveryResourceGroupId"] = aepi.RecoveryResourceGroupID
184 }
185 if aepi.RecoveryCloudServiceID != nil {
186 objectMap["recoveryCloudServiceId"] = aepi.RecoveryCloudServiceID
187 }
188 if aepi.RecoveryAvailabilitySetID != nil {
189 objectMap["recoveryAvailabilitySetId"] = aepi.RecoveryAvailabilitySetID
190 }
191 if aepi.VMDisks != nil {
192 objectMap["vmDisks"] = aepi.VMDisks
193 }
194 if aepi.VMManagedDisks != nil {
195 objectMap["vmManagedDisks"] = aepi.VMManagedDisks
196 }
197 if aepi.MultiVMGroupName != nil {
198 objectMap["multiVmGroupName"] = aepi.MultiVMGroupName
199 }
200 if aepi.RecoveryBootDiagStorageAccountID != nil {
201 objectMap["recoveryBootDiagStorageAccountId"] = aepi.RecoveryBootDiagStorageAccountID
202 }
203 if aepi.DiskEncryptionInfo != nil {
204 objectMap["diskEncryptionInfo"] = aepi.DiskEncryptionInfo
205 }
206 if aepi.InstanceType != "" {
207 objectMap["instanceType"] = aepi.InstanceType
208 }
209 return json.Marshal(objectMap)
210 }
211
212
213 func (aepi A2AEnableProtectionInput) AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool) {
214 return &aepi, true
215 }
216
217
218 func (aepi A2AEnableProtectionInput) AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool) {
219 return nil, false
220 }
221
222
223 func (aepi A2AEnableProtectionInput) AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool) {
224 return nil, false
225 }
226
227
228 func (aepi A2AEnableProtectionInput) AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool) {
229 return nil, false
230 }
231
232
233 func (aepi A2AEnableProtectionInput) AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool) {
234 return nil, false
235 }
236
237
238 func (aepi A2AEnableProtectionInput) AsEnableProtectionProviderSpecificInput() (*EnableProtectionProviderSpecificInput, bool) {
239 return nil, false
240 }
241
242
243 func (aepi A2AEnableProtectionInput) AsBasicEnableProtectionProviderSpecificInput() (BasicEnableProtectionProviderSpecificInput, bool) {
244 return &aepi, true
245 }
246
247
248 type A2AEventDetails struct {
249
250 ProtectedItemName *string `json:"protectedItemName,omitempty"`
251
252 FabricObjectID *string `json:"fabricObjectId,omitempty"`
253
254 FabricName *string `json:"fabricName,omitempty"`
255
256 FabricLocation *string `json:"fabricLocation,omitempty"`
257
258 RemoteFabricName *string `json:"remoteFabricName,omitempty"`
259
260 RemoteFabricLocation *string `json:"remoteFabricLocation,omitempty"`
261
262 InstanceType InstanceTypeBasicEventProviderSpecificDetails `json:"instanceType,omitempty"`
263 }
264
265
266 func (aed A2AEventDetails) MarshalJSON() ([]byte, error) {
267 aed.InstanceType = InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeA2A
268 objectMap := make(map[string]interface{})
269 if aed.ProtectedItemName != nil {
270 objectMap["protectedItemName"] = aed.ProtectedItemName
271 }
272 if aed.FabricObjectID != nil {
273 objectMap["fabricObjectId"] = aed.FabricObjectID
274 }
275 if aed.FabricName != nil {
276 objectMap["fabricName"] = aed.FabricName
277 }
278 if aed.FabricLocation != nil {
279 objectMap["fabricLocation"] = aed.FabricLocation
280 }
281 if aed.RemoteFabricName != nil {
282 objectMap["remoteFabricName"] = aed.RemoteFabricName
283 }
284 if aed.RemoteFabricLocation != nil {
285 objectMap["remoteFabricLocation"] = aed.RemoteFabricLocation
286 }
287 if aed.InstanceType != "" {
288 objectMap["instanceType"] = aed.InstanceType
289 }
290 return json.Marshal(objectMap)
291 }
292
293
294 func (aed A2AEventDetails) AsA2AEventDetails() (*A2AEventDetails, bool) {
295 return &aed, true
296 }
297
298
299 func (aed A2AEventDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) {
300 return nil, false
301 }
302
303
304 func (aed A2AEventDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) {
305 return nil, false
306 }
307
308
309 func (aed A2AEventDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) {
310 return nil, false
311 }
312
313
314 func (aed A2AEventDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) {
315 return nil, false
316 }
317
318
319 func (aed A2AEventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) {
320 return nil, false
321 }
322
323
324 func (aed A2AEventDetails) AsVMwareCbtEventDetails() (*VMwareCbtEventDetails, bool) {
325 return nil, false
326 }
327
328
329 func (aed A2AEventDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) {
330 return nil, false
331 }
332
333
334 func (aed A2AEventDetails) AsBasicEventProviderSpecificDetails() (BasicEventProviderSpecificDetails, bool) {
335 return &aed, true
336 }
337
338
339 type A2AFailoverProviderInput struct {
340
341 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
342
343 CloudServiceCreationOption *string `json:"cloudServiceCreationOption,omitempty"`
344
345 InstanceType InstanceTypeBasicProviderSpecificFailoverInput `json:"instanceType,omitempty"`
346 }
347
348
349 func (afpi A2AFailoverProviderInput) MarshalJSON() ([]byte, error) {
350 afpi.InstanceType = InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeA2A
351 objectMap := make(map[string]interface{})
352 if afpi.RecoveryPointID != nil {
353 objectMap["recoveryPointId"] = afpi.RecoveryPointID
354 }
355 if afpi.CloudServiceCreationOption != nil {
356 objectMap["cloudServiceCreationOption"] = afpi.CloudServiceCreationOption
357 }
358 if afpi.InstanceType != "" {
359 objectMap["instanceType"] = afpi.InstanceType
360 }
361 return json.Marshal(objectMap)
362 }
363
364
365 func (afpi A2AFailoverProviderInput) AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool) {
366 return &afpi, true
367 }
368
369
370 func (afpi A2AFailoverProviderInput) AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool) {
371 return nil, false
372 }
373
374
375 func (afpi A2AFailoverProviderInput) AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool) {
376 return nil, false
377 }
378
379
380 func (afpi A2AFailoverProviderInput) AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool) {
381 return nil, false
382 }
383
384
385 func (afpi A2AFailoverProviderInput) AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool) {
386 return nil, false
387 }
388
389
390 func (afpi A2AFailoverProviderInput) AsProviderSpecificFailoverInput() (*ProviderSpecificFailoverInput, bool) {
391 return nil, false
392 }
393
394
395 func (afpi A2AFailoverProviderInput) AsBasicProviderSpecificFailoverInput() (BasicProviderSpecificFailoverInput, bool) {
396 return &afpi, true
397 }
398
399
400 type A2APolicyCreationInput struct {
401
402 RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"`
403
404 CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"`
405
406 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"`
407
408 MultiVMSyncStatus SetMultiVMSyncStatus `json:"multiVmSyncStatus,omitempty"`
409
410 InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"`
411 }
412
413
414 func (apci A2APolicyCreationInput) MarshalJSON() ([]byte, error) {
415 apci.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeA2A
416 objectMap := make(map[string]interface{})
417 if apci.RecoveryPointHistory != nil {
418 objectMap["recoveryPointHistory"] = apci.RecoveryPointHistory
419 }
420 if apci.CrashConsistentFrequencyInMinutes != nil {
421 objectMap["crashConsistentFrequencyInMinutes"] = apci.CrashConsistentFrequencyInMinutes
422 }
423 if apci.AppConsistentFrequencyInMinutes != nil {
424 objectMap["appConsistentFrequencyInMinutes"] = apci.AppConsistentFrequencyInMinutes
425 }
426 if apci.MultiVMSyncStatus != "" {
427 objectMap["multiVmSyncStatus"] = apci.MultiVMSyncStatus
428 }
429 if apci.InstanceType != "" {
430 objectMap["instanceType"] = apci.InstanceType
431 }
432 return json.Marshal(objectMap)
433 }
434
435
436 func (apci A2APolicyCreationInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) {
437 return &apci, true
438 }
439
440
441 func (apci A2APolicyCreationInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) {
442 return nil, false
443 }
444
445
446 func (apci A2APolicyCreationInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) {
447 return nil, false
448 }
449
450
451 func (apci A2APolicyCreationInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) {
452 return nil, false
453 }
454
455
456 func (apci A2APolicyCreationInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) {
457 return nil, false
458 }
459
460
461 func (apci A2APolicyCreationInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) {
462 return nil, false
463 }
464
465
466 func (apci A2APolicyCreationInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) {
467 return nil, false
468 }
469
470
471 func (apci A2APolicyCreationInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) {
472 return nil, false
473 }
474
475
476 func (apci A2APolicyCreationInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) {
477 return &apci, true
478 }
479
480
481 type A2APolicyDetails struct {
482
483 RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"`
484
485 RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"`
486
487 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"`
488
489 MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"`
490
491 CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"`
492
493 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"`
494 }
495
496
497 func (apd A2APolicyDetails) MarshalJSON() ([]byte, error) {
498 apd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A
499 objectMap := make(map[string]interface{})
500 if apd.RecoveryPointThresholdInMinutes != nil {
501 objectMap["recoveryPointThresholdInMinutes"] = apd.RecoveryPointThresholdInMinutes
502 }
503 if apd.RecoveryPointHistory != nil {
504 objectMap["recoveryPointHistory"] = apd.RecoveryPointHistory
505 }
506 if apd.AppConsistentFrequencyInMinutes != nil {
507 objectMap["appConsistentFrequencyInMinutes"] = apd.AppConsistentFrequencyInMinutes
508 }
509 if apd.MultiVMSyncStatus != nil {
510 objectMap["multiVmSyncStatus"] = apd.MultiVMSyncStatus
511 }
512 if apd.CrashConsistentFrequencyInMinutes != nil {
513 objectMap["crashConsistentFrequencyInMinutes"] = apd.CrashConsistentFrequencyInMinutes
514 }
515 if apd.InstanceType != "" {
516 objectMap["instanceType"] = apd.InstanceType
517 }
518 return json.Marshal(objectMap)
519 }
520
521
522 func (apd A2APolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) {
523 return &apd, true
524 }
525
526
527 func (apd A2APolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) {
528 return nil, false
529 }
530
531
532 func (apd A2APolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) {
533 return nil, false
534 }
535
536
537 func (apd A2APolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) {
538 return nil, false
539 }
540
541
542 func (apd A2APolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) {
543 return nil, false
544 }
545
546
547 func (apd A2APolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) {
548 return nil, false
549 }
550
551
552 func (apd A2APolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) {
553 return nil, false
554 }
555
556
557 func (apd A2APolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) {
558 return nil, false
559 }
560
561
562 func (apd A2APolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) {
563 return nil, false
564 }
565
566
567 func (apd A2APolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) {
568 return nil, false
569 }
570
571
572 func (apd A2APolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) {
573 return nil, false
574 }
575
576
577 func (apd A2APolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) {
578 return &apd, true
579 }
580
581
582 type A2AProtectedDiskDetails struct {
583
584 DiskURI *string `json:"diskUri,omitempty"`
585
586 RecoveryAzureStorageAccountID *string `json:"recoveryAzureStorageAccountId,omitempty"`
587
588 PrimaryDiskAzureStorageAccountID *string `json:"primaryDiskAzureStorageAccountId,omitempty"`
589
590 RecoveryDiskURI *string `json:"recoveryDiskUri,omitempty"`
591
592 DiskName *string `json:"diskName,omitempty"`
593
594 DiskCapacityInBytes *int64 `json:"diskCapacityInBytes,omitempty"`
595
596 PrimaryStagingAzureStorageAccountID *string `json:"primaryStagingAzureStorageAccountId,omitempty"`
597
598 DiskType *string `json:"diskType,omitempty"`
599
600 ResyncRequired *bool `json:"resyncRequired,omitempty"`
601
602 MonitoringPercentageCompletion *int32 `json:"monitoringPercentageCompletion,omitempty"`
603
604 MonitoringJobType *string `json:"monitoringJobType,omitempty"`
605
606 DataPendingInStagingStorageAccountInMB *float64 `json:"dataPendingInStagingStorageAccountInMB,omitempty"`
607
608 DataPendingAtSourceAgentInMB *float64 `json:"dataPendingAtSourceAgentInMB,omitempty"`
609
610 IsDiskEncrypted *bool `json:"isDiskEncrypted,omitempty"`
611
612 SecretIdentifier *string `json:"secretIdentifier,omitempty"`
613
614 DekKeyVaultArmID *string `json:"dekKeyVaultArmId,omitempty"`
615
616 IsDiskKeyEncrypted *bool `json:"isDiskKeyEncrypted,omitempty"`
617
618 KeyIdentifier *string `json:"keyIdentifier,omitempty"`
619
620 KekKeyVaultArmID *string `json:"kekKeyVaultArmId,omitempty"`
621 }
622
623
624 type A2AProtectedManagedDiskDetails struct {
625
626 DiskID *string `json:"diskId,omitempty"`
627
628 RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"`
629
630 RecoveryTargetDiskID *string `json:"recoveryTargetDiskId,omitempty"`
631
632 RecoveryReplicaDiskID *string `json:"recoveryReplicaDiskId,omitempty"`
633
634 RecoveryReplicaDiskAccountType *string `json:"recoveryReplicaDiskAccountType,omitempty"`
635
636 RecoveryTargetDiskAccountType *string `json:"recoveryTargetDiskAccountType,omitempty"`
637
638 DiskName *string `json:"diskName,omitempty"`
639
640 DiskCapacityInBytes *int64 `json:"diskCapacityInBytes,omitempty"`
641
642 PrimaryStagingAzureStorageAccountID *string `json:"primaryStagingAzureStorageAccountId,omitempty"`
643
644 DiskType *string `json:"diskType,omitempty"`
645
646 ResyncRequired *bool `json:"resyncRequired,omitempty"`
647
648 MonitoringPercentageCompletion *int32 `json:"monitoringPercentageCompletion,omitempty"`
649
650 MonitoringJobType *string `json:"monitoringJobType,omitempty"`
651
652 DataPendingInStagingStorageAccountInMB *float64 `json:"dataPendingInStagingStorageAccountInMB,omitempty"`
653
654 DataPendingAtSourceAgentInMB *float64 `json:"dataPendingAtSourceAgentInMB,omitempty"`
655
656 IsDiskEncrypted *bool `json:"isDiskEncrypted,omitempty"`
657
658 SecretIdentifier *string `json:"secretIdentifier,omitempty"`
659
660 DekKeyVaultArmID *string `json:"dekKeyVaultArmId,omitempty"`
661
662 IsDiskKeyEncrypted *bool `json:"isDiskKeyEncrypted,omitempty"`
663
664 KeyIdentifier *string `json:"keyIdentifier,omitempty"`
665
666 KekKeyVaultArmID *string `json:"kekKeyVaultArmId,omitempty"`
667 }
668
669
670 type A2AProtectionContainerMappingDetails struct {
671
672 AgentAutoUpdateStatus AgentAutoUpdateStatus `json:"agentAutoUpdateStatus,omitempty"`
673
674 AutomationAccountArmID *string `json:"automationAccountArmId,omitempty"`
675
676 ScheduleName *string `json:"scheduleName,omitempty"`
677
678 JobScheduleName *string `json:"jobScheduleName,omitempty"`
679
680 InstanceType InstanceTypeBasicProtectionContainerMappingProviderSpecificDetails `json:"instanceType,omitempty"`
681 }
682
683
684 func (apcmd A2AProtectionContainerMappingDetails) MarshalJSON() ([]byte, error) {
685 apcmd.InstanceType = InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeA2A
686 objectMap := make(map[string]interface{})
687 if apcmd.AgentAutoUpdateStatus != "" {
688 objectMap["agentAutoUpdateStatus"] = apcmd.AgentAutoUpdateStatus
689 }
690 if apcmd.AutomationAccountArmID != nil {
691 objectMap["automationAccountArmId"] = apcmd.AutomationAccountArmID
692 }
693 if apcmd.ScheduleName != nil {
694 objectMap["scheduleName"] = apcmd.ScheduleName
695 }
696 if apcmd.JobScheduleName != nil {
697 objectMap["jobScheduleName"] = apcmd.JobScheduleName
698 }
699 if apcmd.InstanceType != "" {
700 objectMap["instanceType"] = apcmd.InstanceType
701 }
702 return json.Marshal(objectMap)
703 }
704
705
706 func (apcmd A2AProtectionContainerMappingDetails) AsA2AProtectionContainerMappingDetails() (*A2AProtectionContainerMappingDetails, bool) {
707 return &apcmd, true
708 }
709
710
711 func (apcmd A2AProtectionContainerMappingDetails) AsVMwareCbtProtectionContainerMappingDetails() (*VMwareCbtProtectionContainerMappingDetails, bool) {
712 return nil, false
713 }
714
715
716 func (apcmd A2AProtectionContainerMappingDetails) AsProtectionContainerMappingProviderSpecificDetails() (*ProtectionContainerMappingProviderSpecificDetails, bool) {
717 return nil, false
718 }
719
720
721 func (apcmd A2AProtectionContainerMappingDetails) AsBasicProtectionContainerMappingProviderSpecificDetails() (BasicProtectionContainerMappingProviderSpecificDetails, bool) {
722 return &apcmd, true
723 }
724
725
726 type A2ARecoveryPointDetails struct {
727
728 RecoveryPointSyncType RecoveryPointSyncType `json:"recoveryPointSyncType,omitempty"`
729
730 InstanceType InstanceTypeBasicProviderSpecificRecoveryPointDetails `json:"instanceType,omitempty"`
731 }
732
733
734 func (arpd A2ARecoveryPointDetails) MarshalJSON() ([]byte, error) {
735 arpd.InstanceType = InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeA2A
736 objectMap := make(map[string]interface{})
737 if arpd.RecoveryPointSyncType != "" {
738 objectMap["recoveryPointSyncType"] = arpd.RecoveryPointSyncType
739 }
740 if arpd.InstanceType != "" {
741 objectMap["instanceType"] = arpd.InstanceType
742 }
743 return json.Marshal(objectMap)
744 }
745
746
747 func (arpd A2ARecoveryPointDetails) AsA2ARecoveryPointDetails() (*A2ARecoveryPointDetails, bool) {
748 return &arpd, true
749 }
750
751
752 func (arpd A2ARecoveryPointDetails) AsInMageAzureV2RecoveryPointDetails() (*InMageAzureV2RecoveryPointDetails, bool) {
753 return nil, false
754 }
755
756
757 func (arpd A2ARecoveryPointDetails) AsProviderSpecificRecoveryPointDetails() (*ProviderSpecificRecoveryPointDetails, bool) {
758 return nil, false
759 }
760
761
762 func (arpd A2ARecoveryPointDetails) AsBasicProviderSpecificRecoveryPointDetails() (BasicProviderSpecificRecoveryPointDetails, bool) {
763 return &arpd, true
764 }
765
766
767 type A2AReplicationDetails struct {
768
769 FabricObjectID *string `json:"fabricObjectId,omitempty"`
770
771 MultiVMGroupID *string `json:"multiVmGroupId,omitempty"`
772
773 MultiVMGroupName *string `json:"multiVmGroupName,omitempty"`
774
775 MultiVMGroupCreateOption MultiVMGroupCreateOption `json:"multiVmGroupCreateOption,omitempty"`
776
777 ManagementID *string `json:"managementId,omitempty"`
778
779 ProtectedDisks *[]A2AProtectedDiskDetails `json:"protectedDisks,omitempty"`
780
781 ProtectedManagedDisks *[]A2AProtectedManagedDiskDetails `json:"protectedManagedDisks,omitempty"`
782
783 RecoveryBootDiagStorageAccountID *string `json:"recoveryBootDiagStorageAccountId,omitempty"`
784
785 PrimaryFabricLocation *string `json:"primaryFabricLocation,omitempty"`
786
787 RecoveryFabricLocation *string `json:"recoveryFabricLocation,omitempty"`
788
789 OsType *string `json:"osType,omitempty"`
790
791 RecoveryAzureVMSize *string `json:"recoveryAzureVMSize,omitempty"`
792
793 RecoveryAzureVMName *string `json:"recoveryAzureVMName,omitempty"`
794
795 RecoveryAzureResourceGroupID *string `json:"recoveryAzureResourceGroupId,omitempty"`
796
797 RecoveryCloudService *string `json:"recoveryCloudService,omitempty"`
798
799 RecoveryAvailabilitySet *string `json:"recoveryAvailabilitySet,omitempty"`
800
801 SelectedRecoveryAzureNetworkID *string `json:"selectedRecoveryAzureNetworkId,omitempty"`
802
803 VMNics *[]VMNicDetails `json:"vmNics,omitempty"`
804
805 VMSyncedConfigDetails *AzureToAzureVMSyncedConfigDetails `json:"vmSyncedConfigDetails,omitempty"`
806
807 MonitoringPercentageCompletion *int32 `json:"monitoringPercentageCompletion,omitempty"`
808
809 MonitoringJobType *string `json:"monitoringJobType,omitempty"`
810
811 LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"`
812
813 AgentVersion *string `json:"agentVersion,omitempty"`
814
815 IsReplicationAgentUpdateRequired *bool `json:"isReplicationAgentUpdateRequired,omitempty"`
816
817 RecoveryFabricObjectID *string `json:"recoveryFabricObjectId,omitempty"`
818
819 VMProtectionState *string `json:"vmProtectionState,omitempty"`
820
821 VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"`
822
823 LifecycleID *string `json:"lifecycleId,omitempty"`
824
825 TestFailoverRecoveryFabricObjectID *string `json:"testFailoverRecoveryFabricObjectId,omitempty"`
826
827 RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"`
828
829 LastRpoCalculatedTime *date.Time `json:"lastRpoCalculatedTime,omitempty"`
830
831 InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"`
832 }
833
834
835 func (ard A2AReplicationDetails) MarshalJSON() ([]byte, error) {
836 ard.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeA2A
837 objectMap := make(map[string]interface{})
838 if ard.FabricObjectID != nil {
839 objectMap["fabricObjectId"] = ard.FabricObjectID
840 }
841 if ard.MultiVMGroupID != nil {
842 objectMap["multiVmGroupId"] = ard.MultiVMGroupID
843 }
844 if ard.MultiVMGroupName != nil {
845 objectMap["multiVmGroupName"] = ard.MultiVMGroupName
846 }
847 if ard.MultiVMGroupCreateOption != "" {
848 objectMap["multiVmGroupCreateOption"] = ard.MultiVMGroupCreateOption
849 }
850 if ard.ManagementID != nil {
851 objectMap["managementId"] = ard.ManagementID
852 }
853 if ard.ProtectedDisks != nil {
854 objectMap["protectedDisks"] = ard.ProtectedDisks
855 }
856 if ard.ProtectedManagedDisks != nil {
857 objectMap["protectedManagedDisks"] = ard.ProtectedManagedDisks
858 }
859 if ard.RecoveryBootDiagStorageAccountID != nil {
860 objectMap["recoveryBootDiagStorageAccountId"] = ard.RecoveryBootDiagStorageAccountID
861 }
862 if ard.PrimaryFabricLocation != nil {
863 objectMap["primaryFabricLocation"] = ard.PrimaryFabricLocation
864 }
865 if ard.RecoveryFabricLocation != nil {
866 objectMap["recoveryFabricLocation"] = ard.RecoveryFabricLocation
867 }
868 if ard.OsType != nil {
869 objectMap["osType"] = ard.OsType
870 }
871 if ard.RecoveryAzureVMSize != nil {
872 objectMap["recoveryAzureVMSize"] = ard.RecoveryAzureVMSize
873 }
874 if ard.RecoveryAzureVMName != nil {
875 objectMap["recoveryAzureVMName"] = ard.RecoveryAzureVMName
876 }
877 if ard.RecoveryAzureResourceGroupID != nil {
878 objectMap["recoveryAzureResourceGroupId"] = ard.RecoveryAzureResourceGroupID
879 }
880 if ard.RecoveryCloudService != nil {
881 objectMap["recoveryCloudService"] = ard.RecoveryCloudService
882 }
883 if ard.RecoveryAvailabilitySet != nil {
884 objectMap["recoveryAvailabilitySet"] = ard.RecoveryAvailabilitySet
885 }
886 if ard.SelectedRecoveryAzureNetworkID != nil {
887 objectMap["selectedRecoveryAzureNetworkId"] = ard.SelectedRecoveryAzureNetworkID
888 }
889 if ard.VMNics != nil {
890 objectMap["vmNics"] = ard.VMNics
891 }
892 if ard.VMSyncedConfigDetails != nil {
893 objectMap["vmSyncedConfigDetails"] = ard.VMSyncedConfigDetails
894 }
895 if ard.MonitoringPercentageCompletion != nil {
896 objectMap["monitoringPercentageCompletion"] = ard.MonitoringPercentageCompletion
897 }
898 if ard.MonitoringJobType != nil {
899 objectMap["monitoringJobType"] = ard.MonitoringJobType
900 }
901 if ard.LastHeartbeat != nil {
902 objectMap["lastHeartbeat"] = ard.LastHeartbeat
903 }
904 if ard.AgentVersion != nil {
905 objectMap["agentVersion"] = ard.AgentVersion
906 }
907 if ard.IsReplicationAgentUpdateRequired != nil {
908 objectMap["isReplicationAgentUpdateRequired"] = ard.IsReplicationAgentUpdateRequired
909 }
910 if ard.RecoveryFabricObjectID != nil {
911 objectMap["recoveryFabricObjectId"] = ard.RecoveryFabricObjectID
912 }
913 if ard.VMProtectionState != nil {
914 objectMap["vmProtectionState"] = ard.VMProtectionState
915 }
916 if ard.VMProtectionStateDescription != nil {
917 objectMap["vmProtectionStateDescription"] = ard.VMProtectionStateDescription
918 }
919 if ard.LifecycleID != nil {
920 objectMap["lifecycleId"] = ard.LifecycleID
921 }
922 if ard.TestFailoverRecoveryFabricObjectID != nil {
923 objectMap["testFailoverRecoveryFabricObjectId"] = ard.TestFailoverRecoveryFabricObjectID
924 }
925 if ard.RpoInSeconds != nil {
926 objectMap["rpoInSeconds"] = ard.RpoInSeconds
927 }
928 if ard.LastRpoCalculatedTime != nil {
929 objectMap["lastRpoCalculatedTime"] = ard.LastRpoCalculatedTime
930 }
931 if ard.InstanceType != "" {
932 objectMap["instanceType"] = ard.InstanceType
933 }
934 return json.Marshal(objectMap)
935 }
936
937
938 func (ard A2AReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) {
939 return &ard, true
940 }
941
942
943 func (ard A2AReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) {
944 return nil, false
945 }
946
947
948 func (ard A2AReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) {
949 return nil, false
950 }
951
952
953 func (ard A2AReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) {
954 return nil, false
955 }
956
957
958 func (ard A2AReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) {
959 return nil, false
960 }
961
962
963 func (ard A2AReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) {
964 return nil, false
965 }
966
967
968 func (ard A2AReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) {
969 return nil, false
970 }
971
972
973 func (ard A2AReplicationDetails) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) {
974 return nil, false
975 }
976
977
978 func (ard A2AReplicationDetails) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) {
979 return &ard, true
980 }
981
982
983 type A2AReprotectInput struct {
984
985 RecoveryContainerID *string `json:"recoveryContainerId,omitempty"`
986
987 VMDisks *[]A2AVMDiskInputDetails `json:"vmDisks,omitempty"`
988
989 RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"`
990
991 RecoveryCloudServiceID *string `json:"recoveryCloudServiceId,omitempty"`
992
993 RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"`
994
995 PolicyID *string `json:"policyId,omitempty"`
996
997 InstanceType InstanceTypeBasicReverseReplicationProviderSpecificInput `json:"instanceType,omitempty"`
998 }
999
1000
1001 func (ari A2AReprotectInput) MarshalJSON() ([]byte, error) {
1002 ari.InstanceType = InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeA2A
1003 objectMap := make(map[string]interface{})
1004 if ari.RecoveryContainerID != nil {
1005 objectMap["recoveryContainerId"] = ari.RecoveryContainerID
1006 }
1007 if ari.VMDisks != nil {
1008 objectMap["vmDisks"] = ari.VMDisks
1009 }
1010 if ari.RecoveryResourceGroupID != nil {
1011 objectMap["recoveryResourceGroupId"] = ari.RecoveryResourceGroupID
1012 }
1013 if ari.RecoveryCloudServiceID != nil {
1014 objectMap["recoveryCloudServiceId"] = ari.RecoveryCloudServiceID
1015 }
1016 if ari.RecoveryAvailabilitySetID != nil {
1017 objectMap["recoveryAvailabilitySetId"] = ari.RecoveryAvailabilitySetID
1018 }
1019 if ari.PolicyID != nil {
1020 objectMap["policyId"] = ari.PolicyID
1021 }
1022 if ari.InstanceType != "" {
1023 objectMap["instanceType"] = ari.InstanceType
1024 }
1025 return json.Marshal(objectMap)
1026 }
1027
1028
1029 func (ari A2AReprotectInput) AsA2AReprotectInput() (*A2AReprotectInput, bool) {
1030 return &ari, true
1031 }
1032
1033
1034 func (ari A2AReprotectInput) AsHyperVReplicaAzureReprotectInput() (*HyperVReplicaAzureReprotectInput, bool) {
1035 return nil, false
1036 }
1037
1038
1039 func (ari A2AReprotectInput) AsInMageAzureV2ReprotectInput() (*InMageAzureV2ReprotectInput, bool) {
1040 return nil, false
1041 }
1042
1043
1044 func (ari A2AReprotectInput) AsInMageReprotectInput() (*InMageReprotectInput, bool) {
1045 return nil, false
1046 }
1047
1048
1049 func (ari A2AReprotectInput) AsReverseReplicationProviderSpecificInput() (*ReverseReplicationProviderSpecificInput, bool) {
1050 return nil, false
1051 }
1052
1053
1054 func (ari A2AReprotectInput) AsBasicReverseReplicationProviderSpecificInput() (BasicReverseReplicationProviderSpecificInput, bool) {
1055 return &ari, true
1056 }
1057
1058
1059 type A2ASwitchProtectionInput struct {
1060
1061 RecoveryContainerID *string `json:"recoveryContainerId,omitempty"`
1062
1063 VMDisks *[]A2AVMDiskInputDetails `json:"vmDisks,omitempty"`
1064
1065 VMManagedDisks *[]A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"`
1066
1067 RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"`
1068
1069 RecoveryCloudServiceID *string `json:"recoveryCloudServiceId,omitempty"`
1070
1071 RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"`
1072
1073 PolicyID *string `json:"policyId,omitempty"`
1074
1075 RecoveryBootDiagStorageAccountID *string `json:"recoveryBootDiagStorageAccountId,omitempty"`
1076
1077 DiskEncryptionInfo *DiskEncryptionInfo `json:"diskEncryptionInfo,omitempty"`
1078
1079 InstanceType InstanceTypeBasicSwitchProtectionProviderSpecificInput `json:"instanceType,omitempty"`
1080 }
1081
1082
1083 func (aspi A2ASwitchProtectionInput) MarshalJSON() ([]byte, error) {
1084 aspi.InstanceType = InstanceTypeBasicSwitchProtectionProviderSpecificInputInstanceTypeA2A
1085 objectMap := make(map[string]interface{})
1086 if aspi.RecoveryContainerID != nil {
1087 objectMap["recoveryContainerId"] = aspi.RecoveryContainerID
1088 }
1089 if aspi.VMDisks != nil {
1090 objectMap["vmDisks"] = aspi.VMDisks
1091 }
1092 if aspi.VMManagedDisks != nil {
1093 objectMap["vmManagedDisks"] = aspi.VMManagedDisks
1094 }
1095 if aspi.RecoveryResourceGroupID != nil {
1096 objectMap["recoveryResourceGroupId"] = aspi.RecoveryResourceGroupID
1097 }
1098 if aspi.RecoveryCloudServiceID != nil {
1099 objectMap["recoveryCloudServiceId"] = aspi.RecoveryCloudServiceID
1100 }
1101 if aspi.RecoveryAvailabilitySetID != nil {
1102 objectMap["recoveryAvailabilitySetId"] = aspi.RecoveryAvailabilitySetID
1103 }
1104 if aspi.PolicyID != nil {
1105 objectMap["policyId"] = aspi.PolicyID
1106 }
1107 if aspi.RecoveryBootDiagStorageAccountID != nil {
1108 objectMap["recoveryBootDiagStorageAccountId"] = aspi.RecoveryBootDiagStorageAccountID
1109 }
1110 if aspi.DiskEncryptionInfo != nil {
1111 objectMap["diskEncryptionInfo"] = aspi.DiskEncryptionInfo
1112 }
1113 if aspi.InstanceType != "" {
1114 objectMap["instanceType"] = aspi.InstanceType
1115 }
1116 return json.Marshal(objectMap)
1117 }
1118
1119
1120 func (aspi A2ASwitchProtectionInput) AsA2ASwitchProtectionInput() (*A2ASwitchProtectionInput, bool) {
1121 return &aspi, true
1122 }
1123
1124
1125 func (aspi A2ASwitchProtectionInput) AsSwitchProtectionProviderSpecificInput() (*SwitchProtectionProviderSpecificInput, bool) {
1126 return nil, false
1127 }
1128
1129
1130 func (aspi A2ASwitchProtectionInput) AsBasicSwitchProtectionProviderSpecificInput() (BasicSwitchProtectionProviderSpecificInput, bool) {
1131 return &aspi, true
1132 }
1133
1134
1135 type A2AUpdateContainerMappingInput struct {
1136
1137 AgentAutoUpdateStatus AgentAutoUpdateStatus `json:"agentAutoUpdateStatus,omitempty"`
1138
1139 AutomationAccountArmID *string `json:"automationAccountArmId,omitempty"`
1140
1141 InstanceType InstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingInput `json:"instanceType,omitempty"`
1142 }
1143
1144
1145 func (aucmi A2AUpdateContainerMappingInput) MarshalJSON() ([]byte, error) {
1146 aucmi.InstanceType = InstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingInputInstanceTypeA2A
1147 objectMap := make(map[string]interface{})
1148 if aucmi.AgentAutoUpdateStatus != "" {
1149 objectMap["agentAutoUpdateStatus"] = aucmi.AgentAutoUpdateStatus
1150 }
1151 if aucmi.AutomationAccountArmID != nil {
1152 objectMap["automationAccountArmId"] = aucmi.AutomationAccountArmID
1153 }
1154 if aucmi.InstanceType != "" {
1155 objectMap["instanceType"] = aucmi.InstanceType
1156 }
1157 return json.Marshal(objectMap)
1158 }
1159
1160
1161 func (aucmi A2AUpdateContainerMappingInput) AsA2AUpdateContainerMappingInput() (*A2AUpdateContainerMappingInput, bool) {
1162 return &aucmi, true
1163 }
1164
1165
1166 func (aucmi A2AUpdateContainerMappingInput) AsReplicationProviderSpecificUpdateContainerMappingInput() (*ReplicationProviderSpecificUpdateContainerMappingInput, bool) {
1167 return nil, false
1168 }
1169
1170
1171 func (aucmi A2AUpdateContainerMappingInput) AsBasicReplicationProviderSpecificUpdateContainerMappingInput() (BasicReplicationProviderSpecificUpdateContainerMappingInput, bool) {
1172 return &aucmi, true
1173 }
1174
1175
1176 type A2AUpdateReplicationProtectedItemInput struct {
1177
1178 RecoveryCloudServiceID *string `json:"recoveryCloudServiceId,omitempty"`
1179
1180 RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"`
1181
1182 ManagedDiskUpdateDetails *[]A2AVMManagedDiskUpdateDetails `json:"managedDiskUpdateDetails,omitempty"`
1183
1184 RecoveryBootDiagStorageAccountID *string `json:"recoveryBootDiagStorageAccountId,omitempty"`
1185
1186 DiskEncryptionInfo *DiskEncryptionInfo `json:"diskEncryptionInfo,omitempty"`
1187
1188 InstanceType InstanceTypeBasicUpdateReplicationProtectedItemProviderInput `json:"instanceType,omitempty"`
1189 }
1190
1191
1192 func (aurpii A2AUpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, error) {
1193 aurpii.InstanceType = InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeA2A
1194 objectMap := make(map[string]interface{})
1195 if aurpii.RecoveryCloudServiceID != nil {
1196 objectMap["recoveryCloudServiceId"] = aurpii.RecoveryCloudServiceID
1197 }
1198 if aurpii.RecoveryResourceGroupID != nil {
1199 objectMap["recoveryResourceGroupId"] = aurpii.RecoveryResourceGroupID
1200 }
1201 if aurpii.ManagedDiskUpdateDetails != nil {
1202 objectMap["managedDiskUpdateDetails"] = aurpii.ManagedDiskUpdateDetails
1203 }
1204 if aurpii.RecoveryBootDiagStorageAccountID != nil {
1205 objectMap["recoveryBootDiagStorageAccountId"] = aurpii.RecoveryBootDiagStorageAccountID
1206 }
1207 if aurpii.DiskEncryptionInfo != nil {
1208 objectMap["diskEncryptionInfo"] = aurpii.DiskEncryptionInfo
1209 }
1210 if aurpii.InstanceType != "" {
1211 objectMap["instanceType"] = aurpii.InstanceType
1212 }
1213 return json.Marshal(objectMap)
1214 }
1215
1216
1217 func (aurpii A2AUpdateReplicationProtectedItemInput) AsA2AUpdateReplicationProtectedItemInput() (*A2AUpdateReplicationProtectedItemInput, bool) {
1218 return &aurpii, true
1219 }
1220
1221
1222 func (aurpii A2AUpdateReplicationProtectedItemInput) AsHyperVReplicaAzureUpdateReplicationProtectedItemInput() (*HyperVReplicaAzureUpdateReplicationProtectedItemInput, bool) {
1223 return nil, false
1224 }
1225
1226
1227 func (aurpii A2AUpdateReplicationProtectedItemInput) AsInMageAzureV2UpdateReplicationProtectedItemInput() (*InMageAzureV2UpdateReplicationProtectedItemInput, bool) {
1228 return nil, false
1229 }
1230
1231
1232 func (aurpii A2AUpdateReplicationProtectedItemInput) AsUpdateReplicationProtectedItemProviderInput() (*UpdateReplicationProtectedItemProviderInput, bool) {
1233 return nil, false
1234 }
1235
1236
1237 func (aurpii A2AUpdateReplicationProtectedItemInput) AsBasicUpdateReplicationProtectedItemProviderInput() (BasicUpdateReplicationProtectedItemProviderInput, bool) {
1238 return &aurpii, true
1239 }
1240
1241
1242 type A2AVMDiskInputDetails struct {
1243
1244 DiskURI *string `json:"diskUri,omitempty"`
1245
1246 RecoveryAzureStorageAccountID *string `json:"recoveryAzureStorageAccountId,omitempty"`
1247
1248 PrimaryStagingAzureStorageAccountID *string `json:"primaryStagingAzureStorageAccountId,omitempty"`
1249 }
1250
1251
1252 type A2AVMManagedDiskInputDetails struct {
1253
1254 DiskID *string `json:"diskId,omitempty"`
1255
1256 PrimaryStagingAzureStorageAccountID *string `json:"primaryStagingAzureStorageAccountId,omitempty"`
1257
1258 RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"`
1259
1260 RecoveryReplicaDiskAccountType *string `json:"recoveryReplicaDiskAccountType,omitempty"`
1261
1262 RecoveryTargetDiskAccountType *string `json:"recoveryTargetDiskAccountType,omitempty"`
1263 }
1264
1265
1266 type A2AVMManagedDiskUpdateDetails struct {
1267
1268 DiskID *string `json:"diskId,omitempty"`
1269
1270 RecoveryTargetDiskAccountType *string `json:"recoveryTargetDiskAccountType,omitempty"`
1271
1272 RecoveryReplicaDiskAccountType *string `json:"recoveryReplicaDiskAccountType,omitempty"`
1273 }
1274
1275
1276 type AddRecoveryServicesProviderInput struct {
1277
1278 Properties *AddRecoveryServicesProviderInputProperties `json:"properties,omitempty"`
1279 }
1280
1281
1282 type AddRecoveryServicesProviderInputProperties struct {
1283
1284 MachineName *string `json:"machineName,omitempty"`
1285
1286 AuthenticationIdentityInput *IdentityProviderInput `json:"authenticationIdentityInput,omitempty"`
1287
1288 ResourceAccessIdentityInput *IdentityProviderInput `json:"resourceAccessIdentityInput,omitempty"`
1289 }
1290
1291
1292 type AddVCenterRequest struct {
1293
1294 Properties *AddVCenterRequestProperties `json:"properties,omitempty"`
1295 }
1296
1297
1298 type AddVCenterRequestProperties struct {
1299
1300 FriendlyName *string `json:"friendlyName,omitempty"`
1301
1302 IPAddress *string `json:"ipAddress,omitempty"`
1303
1304 ProcessServerID *string `json:"processServerId,omitempty"`
1305
1306 Port *string `json:"port,omitempty"`
1307
1308 RunAsAccountID *string `json:"runAsAccountId,omitempty"`
1309 }
1310
1311
1312 type Alert struct {
1313 autorest.Response `json:"-"`
1314
1315 Properties *AlertProperties `json:"properties,omitempty"`
1316
1317 ID *string `json:"id,omitempty"`
1318
1319 Name *string `json:"name,omitempty"`
1320
1321 Type *string `json:"type,omitempty"`
1322
1323 Location *string `json:"location,omitempty"`
1324 }
1325
1326
1327 func (a Alert) MarshalJSON() ([]byte, error) {
1328 objectMap := make(map[string]interface{})
1329 if a.Properties != nil {
1330 objectMap["properties"] = a.Properties
1331 }
1332 if a.Location != nil {
1333 objectMap["location"] = a.Location
1334 }
1335 return json.Marshal(objectMap)
1336 }
1337
1338
1339 type AlertCollection struct {
1340 autorest.Response `json:"-"`
1341
1342 Value *[]Alert `json:"value,omitempty"`
1343
1344 NextLink *string `json:"nextLink,omitempty"`
1345 }
1346
1347
1348 type AlertCollectionIterator struct {
1349 i int
1350 page AlertCollectionPage
1351 }
1352
1353
1354
1355 func (iter *AlertCollectionIterator) NextWithContext(ctx context.Context) (err error) {
1356 if tracing.IsEnabled() {
1357 ctx = tracing.StartSpan(ctx, fqdn+"/AlertCollectionIterator.NextWithContext")
1358 defer func() {
1359 sc := -1
1360 if iter.Response().Response.Response != nil {
1361 sc = iter.Response().Response.Response.StatusCode
1362 }
1363 tracing.EndSpan(ctx, sc, err)
1364 }()
1365 }
1366 iter.i++
1367 if iter.i < len(iter.page.Values()) {
1368 return nil
1369 }
1370 err = iter.page.NextWithContext(ctx)
1371 if err != nil {
1372 iter.i--
1373 return err
1374 }
1375 iter.i = 0
1376 return nil
1377 }
1378
1379
1380
1381
1382 func (iter *AlertCollectionIterator) Next() error {
1383 return iter.NextWithContext(context.Background())
1384 }
1385
1386
1387 func (iter AlertCollectionIterator) NotDone() bool {
1388 return iter.page.NotDone() && iter.i < len(iter.page.Values())
1389 }
1390
1391
1392 func (iter AlertCollectionIterator) Response() AlertCollection {
1393 return iter.page.Response()
1394 }
1395
1396
1397
1398 func (iter AlertCollectionIterator) Value() Alert {
1399 if !iter.page.NotDone() {
1400 return Alert{}
1401 }
1402 return iter.page.Values()[iter.i]
1403 }
1404
1405
1406 func NewAlertCollectionIterator(page AlertCollectionPage) AlertCollectionIterator {
1407 return AlertCollectionIterator{page: page}
1408 }
1409
1410
1411 func (ac AlertCollection) IsEmpty() bool {
1412 return ac.Value == nil || len(*ac.Value) == 0
1413 }
1414
1415
1416 func (ac AlertCollection) hasNextLink() bool {
1417 return ac.NextLink != nil && len(*ac.NextLink) != 0
1418 }
1419
1420
1421
1422 func (ac AlertCollection) alertCollectionPreparer(ctx context.Context) (*http.Request, error) {
1423 if !ac.hasNextLink() {
1424 return nil, nil
1425 }
1426 return autorest.Prepare((&http.Request{}).WithContext(ctx),
1427 autorest.AsJSON(),
1428 autorest.AsGet(),
1429 autorest.WithBaseURL(to.String(ac.NextLink)))
1430 }
1431
1432
1433 type AlertCollectionPage struct {
1434 fn func(context.Context, AlertCollection) (AlertCollection, error)
1435 ac AlertCollection
1436 }
1437
1438
1439
1440 func (page *AlertCollectionPage) NextWithContext(ctx context.Context) (err error) {
1441 if tracing.IsEnabled() {
1442 ctx = tracing.StartSpan(ctx, fqdn+"/AlertCollectionPage.NextWithContext")
1443 defer func() {
1444 sc := -1
1445 if page.Response().Response.Response != nil {
1446 sc = page.Response().Response.Response.StatusCode
1447 }
1448 tracing.EndSpan(ctx, sc, err)
1449 }()
1450 }
1451 for {
1452 next, err := page.fn(ctx, page.ac)
1453 if err != nil {
1454 return err
1455 }
1456 page.ac = next
1457 if !next.hasNextLink() || !next.IsEmpty() {
1458 break
1459 }
1460 }
1461 return nil
1462 }
1463
1464
1465
1466
1467 func (page *AlertCollectionPage) Next() error {
1468 return page.NextWithContext(context.Background())
1469 }
1470
1471
1472 func (page AlertCollectionPage) NotDone() bool {
1473 return !page.ac.IsEmpty()
1474 }
1475
1476
1477 func (page AlertCollectionPage) Response() AlertCollection {
1478 return page.ac
1479 }
1480
1481
1482 func (page AlertCollectionPage) Values() []Alert {
1483 if page.ac.IsEmpty() {
1484 return nil
1485 }
1486 return *page.ac.Value
1487 }
1488
1489
1490 func NewAlertCollectionPage(cur AlertCollection, getNextPage func(context.Context, AlertCollection) (AlertCollection, error)) AlertCollectionPage {
1491 return AlertCollectionPage{
1492 fn: getNextPage,
1493 ac: cur,
1494 }
1495 }
1496
1497
1498 type AlertProperties struct {
1499
1500 SendToOwners *string `json:"sendToOwners,omitempty"`
1501
1502 CustomEmailAddresses *[]string `json:"customEmailAddresses,omitempty"`
1503
1504 Locale *string `json:"locale,omitempty"`
1505 }
1506
1507
1508 type ApplyRecoveryPointInput struct {
1509
1510 Properties *ApplyRecoveryPointInputProperties `json:"properties,omitempty"`
1511 }
1512
1513
1514 type ApplyRecoveryPointInputProperties struct {
1515
1516 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
1517
1518 ProviderSpecificDetails BasicApplyRecoveryPointProviderSpecificInput `json:"providerSpecificDetails,omitempty"`
1519 }
1520
1521
1522 func (arpip *ApplyRecoveryPointInputProperties) UnmarshalJSON(body []byte) error {
1523 var m map[string]*json.RawMessage
1524 err := json.Unmarshal(body, &m)
1525 if err != nil {
1526 return err
1527 }
1528 for k, v := range m {
1529 switch k {
1530 case "recoveryPointId":
1531 if v != nil {
1532 var recoveryPointID string
1533 err = json.Unmarshal(*v, &recoveryPointID)
1534 if err != nil {
1535 return err
1536 }
1537 arpip.RecoveryPointID = &recoveryPointID
1538 }
1539 case "providerSpecificDetails":
1540 if v != nil {
1541 providerSpecificDetails, err := unmarshalBasicApplyRecoveryPointProviderSpecificInput(*v)
1542 if err != nil {
1543 return err
1544 }
1545 arpip.ProviderSpecificDetails = providerSpecificDetails
1546 }
1547 }
1548 }
1549
1550 return nil
1551 }
1552
1553
1554 type BasicApplyRecoveryPointProviderSpecificInput interface {
1555 AsA2AApplyRecoveryPointInput() (*A2AApplyRecoveryPointInput, bool)
1556 AsHyperVReplicaAzureApplyRecoveryPointInput() (*HyperVReplicaAzureApplyRecoveryPointInput, bool)
1557 AsInMageAzureV2ApplyRecoveryPointInput() (*InMageAzureV2ApplyRecoveryPointInput, bool)
1558 AsApplyRecoveryPointProviderSpecificInput() (*ApplyRecoveryPointProviderSpecificInput, bool)
1559 }
1560
1561
1562 type ApplyRecoveryPointProviderSpecificInput struct {
1563
1564 InstanceType InstanceType `json:"instanceType,omitempty"`
1565 }
1566
1567 func unmarshalBasicApplyRecoveryPointProviderSpecificInput(body []byte) (BasicApplyRecoveryPointProviderSpecificInput, error) {
1568 var m map[string]interface{}
1569 err := json.Unmarshal(body, &m)
1570 if err != nil {
1571 return nil, err
1572 }
1573
1574 switch m["instanceType"] {
1575 case string(InstanceTypeA2A):
1576 var aarpi A2AApplyRecoveryPointInput
1577 err := json.Unmarshal(body, &aarpi)
1578 return aarpi, err
1579 case string(InstanceTypeHyperVReplicaAzure):
1580 var hvraarpi HyperVReplicaAzureApplyRecoveryPointInput
1581 err := json.Unmarshal(body, &hvraarpi)
1582 return hvraarpi, err
1583 case string(InstanceTypeInMageAzureV2):
1584 var imavarpi InMageAzureV2ApplyRecoveryPointInput
1585 err := json.Unmarshal(body, &imavarpi)
1586 return imavarpi, err
1587 default:
1588 var arppsi ApplyRecoveryPointProviderSpecificInput
1589 err := json.Unmarshal(body, &arppsi)
1590 return arppsi, err
1591 }
1592 }
1593 func unmarshalBasicApplyRecoveryPointProviderSpecificInputArray(body []byte) ([]BasicApplyRecoveryPointProviderSpecificInput, error) {
1594 var rawMessages []*json.RawMessage
1595 err := json.Unmarshal(body, &rawMessages)
1596 if err != nil {
1597 return nil, err
1598 }
1599
1600 arppsiArray := make([]BasicApplyRecoveryPointProviderSpecificInput, len(rawMessages))
1601
1602 for index, rawMessage := range rawMessages {
1603 arppsi, err := unmarshalBasicApplyRecoveryPointProviderSpecificInput(*rawMessage)
1604 if err != nil {
1605 return nil, err
1606 }
1607 arppsiArray[index] = arppsi
1608 }
1609 return arppsiArray, nil
1610 }
1611
1612
1613 func (arppsi ApplyRecoveryPointProviderSpecificInput) MarshalJSON() ([]byte, error) {
1614 arppsi.InstanceType = InstanceTypeApplyRecoveryPointProviderSpecificInput
1615 objectMap := make(map[string]interface{})
1616 if arppsi.InstanceType != "" {
1617 objectMap["instanceType"] = arppsi.InstanceType
1618 }
1619 return json.Marshal(objectMap)
1620 }
1621
1622
1623 func (arppsi ApplyRecoveryPointProviderSpecificInput) AsA2AApplyRecoveryPointInput() (*A2AApplyRecoveryPointInput, bool) {
1624 return nil, false
1625 }
1626
1627
1628 func (arppsi ApplyRecoveryPointProviderSpecificInput) AsHyperVReplicaAzureApplyRecoveryPointInput() (*HyperVReplicaAzureApplyRecoveryPointInput, bool) {
1629 return nil, false
1630 }
1631
1632
1633 func (arppsi ApplyRecoveryPointProviderSpecificInput) AsInMageAzureV2ApplyRecoveryPointInput() (*InMageAzureV2ApplyRecoveryPointInput, bool) {
1634 return nil, false
1635 }
1636
1637
1638 func (arppsi ApplyRecoveryPointProviderSpecificInput) AsApplyRecoveryPointProviderSpecificInput() (*ApplyRecoveryPointProviderSpecificInput, bool) {
1639 return &arppsi, true
1640 }
1641
1642
1643 func (arppsi ApplyRecoveryPointProviderSpecificInput) AsBasicApplyRecoveryPointProviderSpecificInput() (BasicApplyRecoveryPointProviderSpecificInput, bool) {
1644 return &arppsi, true
1645 }
1646
1647
1648 type AsrJobDetails struct {
1649
1650 AffectedObjectDetails map[string]*string `json:"affectedObjectDetails"`
1651
1652 InstanceType InstanceTypeBasicJobDetails `json:"instanceType,omitempty"`
1653 }
1654
1655
1656 func (ajd AsrJobDetails) MarshalJSON() ([]byte, error) {
1657 ajd.InstanceType = InstanceTypeAsrJobDetails
1658 objectMap := make(map[string]interface{})
1659 if ajd.AffectedObjectDetails != nil {
1660 objectMap["affectedObjectDetails"] = ajd.AffectedObjectDetails
1661 }
1662 if ajd.InstanceType != "" {
1663 objectMap["instanceType"] = ajd.InstanceType
1664 }
1665 return json.Marshal(objectMap)
1666 }
1667
1668
1669 func (ajd AsrJobDetails) AsAsrJobDetails() (*AsrJobDetails, bool) {
1670 return &ajd, true
1671 }
1672
1673
1674 func (ajd AsrJobDetails) AsExportJobDetails() (*ExportJobDetails, bool) {
1675 return nil, false
1676 }
1677
1678
1679 func (ajd AsrJobDetails) AsFailoverJobDetails() (*FailoverJobDetails, bool) {
1680 return nil, false
1681 }
1682
1683
1684 func (ajd AsrJobDetails) AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool) {
1685 return nil, false
1686 }
1687
1688
1689 func (ajd AsrJobDetails) AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool) {
1690 return nil, false
1691 }
1692
1693
1694 func (ajd AsrJobDetails) AsJobDetails() (*JobDetails, bool) {
1695 return nil, false
1696 }
1697
1698
1699 func (ajd AsrJobDetails) AsBasicJobDetails() (BasicJobDetails, bool) {
1700 return &ajd, true
1701 }
1702
1703
1704 type ASRTask struct {
1705
1706 TaskID *string `json:"taskId,omitempty"`
1707
1708 Name *string `json:"name,omitempty"`
1709
1710 StartTime *date.Time `json:"startTime,omitempty"`
1711
1712 EndTime *date.Time `json:"endTime,omitempty"`
1713
1714 AllowedActions *[]string `json:"allowedActions,omitempty"`
1715
1716 FriendlyName *string `json:"friendlyName,omitempty"`
1717
1718 State *string `json:"state,omitempty"`
1719
1720 StateDescription *string `json:"stateDescription,omitempty"`
1721
1722 TaskType *string `json:"taskType,omitempty"`
1723
1724 CustomDetails BasicTaskTypeDetails `json:"customDetails,omitempty"`
1725
1726 GroupTaskCustomDetails BasicGroupTaskDetails `json:"groupTaskCustomDetails,omitempty"`
1727
1728 Errors *[]JobErrorDetails `json:"errors,omitempty"`
1729 }
1730
1731
1732 func (at *ASRTask) UnmarshalJSON(body []byte) error {
1733 var m map[string]*json.RawMessage
1734 err := json.Unmarshal(body, &m)
1735 if err != nil {
1736 return err
1737 }
1738 for k, v := range m {
1739 switch k {
1740 case "taskId":
1741 if v != nil {
1742 var taskID string
1743 err = json.Unmarshal(*v, &taskID)
1744 if err != nil {
1745 return err
1746 }
1747 at.TaskID = &taskID
1748 }
1749 case "name":
1750 if v != nil {
1751 var name string
1752 err = json.Unmarshal(*v, &name)
1753 if err != nil {
1754 return err
1755 }
1756 at.Name = &name
1757 }
1758 case "startTime":
1759 if v != nil {
1760 var startTime date.Time
1761 err = json.Unmarshal(*v, &startTime)
1762 if err != nil {
1763 return err
1764 }
1765 at.StartTime = &startTime
1766 }
1767 case "endTime":
1768 if v != nil {
1769 var endTime date.Time
1770 err = json.Unmarshal(*v, &endTime)
1771 if err != nil {
1772 return err
1773 }
1774 at.EndTime = &endTime
1775 }
1776 case "allowedActions":
1777 if v != nil {
1778 var allowedActions []string
1779 err = json.Unmarshal(*v, &allowedActions)
1780 if err != nil {
1781 return err
1782 }
1783 at.AllowedActions = &allowedActions
1784 }
1785 case "friendlyName":
1786 if v != nil {
1787 var friendlyName string
1788 err = json.Unmarshal(*v, &friendlyName)
1789 if err != nil {
1790 return err
1791 }
1792 at.FriendlyName = &friendlyName
1793 }
1794 case "state":
1795 if v != nil {
1796 var state string
1797 err = json.Unmarshal(*v, &state)
1798 if err != nil {
1799 return err
1800 }
1801 at.State = &state
1802 }
1803 case "stateDescription":
1804 if v != nil {
1805 var stateDescription string
1806 err = json.Unmarshal(*v, &stateDescription)
1807 if err != nil {
1808 return err
1809 }
1810 at.StateDescription = &stateDescription
1811 }
1812 case "taskType":
1813 if v != nil {
1814 var taskType string
1815 err = json.Unmarshal(*v, &taskType)
1816 if err != nil {
1817 return err
1818 }
1819 at.TaskType = &taskType
1820 }
1821 case "customDetails":
1822 if v != nil {
1823 customDetails, err := unmarshalBasicTaskTypeDetails(*v)
1824 if err != nil {
1825 return err
1826 }
1827 at.CustomDetails = customDetails
1828 }
1829 case "groupTaskCustomDetails":
1830 if v != nil {
1831 groupTaskCustomDetails, err := unmarshalBasicGroupTaskDetails(*v)
1832 if err != nil {
1833 return err
1834 }
1835 at.GroupTaskCustomDetails = groupTaskCustomDetails
1836 }
1837 case "errors":
1838 if v != nil {
1839 var errorsVar []JobErrorDetails
1840 err = json.Unmarshal(*v, &errorsVar)
1841 if err != nil {
1842 return err
1843 }
1844 at.Errors = &errorsVar
1845 }
1846 }
1847 }
1848
1849 return nil
1850 }
1851
1852
1853 type AutomationRunbookTaskDetails struct {
1854
1855 Name *string `json:"name,omitempty"`
1856
1857 CloudServiceName *string `json:"cloudServiceName,omitempty"`
1858
1859 SubscriptionID *string `json:"subscriptionId,omitempty"`
1860
1861 AccountName *string `json:"accountName,omitempty"`
1862
1863 RunbookID *string `json:"runbookId,omitempty"`
1864
1865 RunbookName *string `json:"runbookName,omitempty"`
1866
1867 JobID *string `json:"jobId,omitempty"`
1868
1869 JobOutput *string `json:"jobOutput,omitempty"`
1870
1871 IsPrimarySideScript *bool `json:"isPrimarySideScript,omitempty"`
1872
1873 InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"`
1874 }
1875
1876
1877 func (artd AutomationRunbookTaskDetails) MarshalJSON() ([]byte, error) {
1878 artd.InstanceType = InstanceTypeAutomationRunbookTaskDetails
1879 objectMap := make(map[string]interface{})
1880 if artd.Name != nil {
1881 objectMap["name"] = artd.Name
1882 }
1883 if artd.CloudServiceName != nil {
1884 objectMap["cloudServiceName"] = artd.CloudServiceName
1885 }
1886 if artd.SubscriptionID != nil {
1887 objectMap["subscriptionId"] = artd.SubscriptionID
1888 }
1889 if artd.AccountName != nil {
1890 objectMap["accountName"] = artd.AccountName
1891 }
1892 if artd.RunbookID != nil {
1893 objectMap["runbookId"] = artd.RunbookID
1894 }
1895 if artd.RunbookName != nil {
1896 objectMap["runbookName"] = artd.RunbookName
1897 }
1898 if artd.JobID != nil {
1899 objectMap["jobId"] = artd.JobID
1900 }
1901 if artd.JobOutput != nil {
1902 objectMap["jobOutput"] = artd.JobOutput
1903 }
1904 if artd.IsPrimarySideScript != nil {
1905 objectMap["isPrimarySideScript"] = artd.IsPrimarySideScript
1906 }
1907 if artd.InstanceType != "" {
1908 objectMap["instanceType"] = artd.InstanceType
1909 }
1910 return json.Marshal(objectMap)
1911 }
1912
1913
1914 func (artd AutomationRunbookTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) {
1915 return &artd, true
1916 }
1917
1918
1919 func (artd AutomationRunbookTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) {
1920 return nil, false
1921 }
1922
1923
1924 func (artd AutomationRunbookTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) {
1925 return nil, false
1926 }
1927
1928
1929 func (artd AutomationRunbookTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) {
1930 return nil, false
1931 }
1932
1933
1934 func (artd AutomationRunbookTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) {
1935 return nil, false
1936 }
1937
1938
1939 func (artd AutomationRunbookTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) {
1940 return nil, false
1941 }
1942
1943
1944 func (artd AutomationRunbookTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) {
1945 return nil, false
1946 }
1947
1948
1949 func (artd AutomationRunbookTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) {
1950 return nil, false
1951 }
1952
1953
1954 func (artd AutomationRunbookTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) {
1955 return nil, false
1956 }
1957
1958
1959 func (artd AutomationRunbookTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) {
1960 return &artd, true
1961 }
1962
1963
1964 type AzureFabricCreationInput struct {
1965
1966 Location *string `json:"location,omitempty"`
1967
1968 InstanceType InstanceTypeBasicFabricSpecificCreationInput `json:"instanceType,omitempty"`
1969 }
1970
1971
1972 func (afci AzureFabricCreationInput) MarshalJSON() ([]byte, error) {
1973 afci.InstanceType = InstanceTypeAzure
1974 objectMap := make(map[string]interface{})
1975 if afci.Location != nil {
1976 objectMap["location"] = afci.Location
1977 }
1978 if afci.InstanceType != "" {
1979 objectMap["instanceType"] = afci.InstanceType
1980 }
1981 return json.Marshal(objectMap)
1982 }
1983
1984
1985 func (afci AzureFabricCreationInput) AsAzureFabricCreationInput() (*AzureFabricCreationInput, bool) {
1986 return &afci, true
1987 }
1988
1989
1990 func (afci AzureFabricCreationInput) AsVMwareV2FabricCreationInput() (*VMwareV2FabricCreationInput, bool) {
1991 return nil, false
1992 }
1993
1994
1995 func (afci AzureFabricCreationInput) AsFabricSpecificCreationInput() (*FabricSpecificCreationInput, bool) {
1996 return nil, false
1997 }
1998
1999
2000 func (afci AzureFabricCreationInput) AsBasicFabricSpecificCreationInput() (BasicFabricSpecificCreationInput, bool) {
2001 return &afci, true
2002 }
2003
2004
2005 type AzureFabricSpecificDetails struct {
2006
2007 Location *string `json:"location,omitempty"`
2008
2009 ContainerIds *[]string `json:"containerIds,omitempty"`
2010
2011 InstanceType InstanceTypeBasicFabricSpecificDetails `json:"instanceType,omitempty"`
2012 }
2013
2014
2015 func (afsd AzureFabricSpecificDetails) MarshalJSON() ([]byte, error) {
2016 afsd.InstanceType = InstanceTypeBasicFabricSpecificDetailsInstanceTypeAzure
2017 objectMap := make(map[string]interface{})
2018 if afsd.Location != nil {
2019 objectMap["location"] = afsd.Location
2020 }
2021 if afsd.ContainerIds != nil {
2022 objectMap["containerIds"] = afsd.ContainerIds
2023 }
2024 if afsd.InstanceType != "" {
2025 objectMap["instanceType"] = afsd.InstanceType
2026 }
2027 return json.Marshal(objectMap)
2028 }
2029
2030
2031 func (afsd AzureFabricSpecificDetails) AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool) {
2032 return &afsd, true
2033 }
2034
2035
2036 func (afsd AzureFabricSpecificDetails) AsHyperVSiteDetails() (*HyperVSiteDetails, bool) {
2037 return nil, false
2038 }
2039
2040
2041 func (afsd AzureFabricSpecificDetails) AsVmmDetails() (*VmmDetails, bool) {
2042 return nil, false
2043 }
2044
2045
2046 func (afsd AzureFabricSpecificDetails) AsVMwareDetails() (*VMwareDetails, bool) {
2047 return nil, false
2048 }
2049
2050
2051 func (afsd AzureFabricSpecificDetails) AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool) {
2052 return nil, false
2053 }
2054
2055
2056 func (afsd AzureFabricSpecificDetails) AsFabricSpecificDetails() (*FabricSpecificDetails, bool) {
2057 return nil, false
2058 }
2059
2060
2061 func (afsd AzureFabricSpecificDetails) AsBasicFabricSpecificDetails() (BasicFabricSpecificDetails, bool) {
2062 return &afsd, true
2063 }
2064
2065
2066
2067 type AzureToAzureCreateNetworkMappingInput struct {
2068
2069 PrimaryNetworkID *string `json:"primaryNetworkId,omitempty"`
2070
2071 InstanceType InstanceTypeBasicFabricSpecificCreateNetworkMappingInput `json:"instanceType,omitempty"`
2072 }
2073
2074
2075 func (atacnmi AzureToAzureCreateNetworkMappingInput) MarshalJSON() ([]byte, error) {
2076 atacnmi.InstanceType = InstanceTypeAzureToAzure
2077 objectMap := make(map[string]interface{})
2078 if atacnmi.PrimaryNetworkID != nil {
2079 objectMap["primaryNetworkId"] = atacnmi.PrimaryNetworkID
2080 }
2081 if atacnmi.InstanceType != "" {
2082 objectMap["instanceType"] = atacnmi.InstanceType
2083 }
2084 return json.Marshal(objectMap)
2085 }
2086
2087
2088 func (atacnmi AzureToAzureCreateNetworkMappingInput) AsAzureToAzureCreateNetworkMappingInput() (*AzureToAzureCreateNetworkMappingInput, bool) {
2089 return &atacnmi, true
2090 }
2091
2092
2093 func (atacnmi AzureToAzureCreateNetworkMappingInput) AsVmmToAzureCreateNetworkMappingInput() (*VmmToAzureCreateNetworkMappingInput, bool) {
2094 return nil, false
2095 }
2096
2097
2098 func (atacnmi AzureToAzureCreateNetworkMappingInput) AsVmmToVmmCreateNetworkMappingInput() (*VmmToVmmCreateNetworkMappingInput, bool) {
2099 return nil, false
2100 }
2101
2102
2103 func (atacnmi AzureToAzureCreateNetworkMappingInput) AsFabricSpecificCreateNetworkMappingInput() (*FabricSpecificCreateNetworkMappingInput, bool) {
2104 return nil, false
2105 }
2106
2107
2108 func (atacnmi AzureToAzureCreateNetworkMappingInput) AsBasicFabricSpecificCreateNetworkMappingInput() (BasicFabricSpecificCreateNetworkMappingInput, bool) {
2109 return &atacnmi, true
2110 }
2111
2112
2113 type AzureToAzureNetworkMappingSettings struct {
2114
2115 PrimaryFabricLocation *string `json:"primaryFabricLocation,omitempty"`
2116
2117 RecoveryFabricLocation *string `json:"recoveryFabricLocation,omitempty"`
2118
2119 InstanceType InstanceTypeBasicNetworkMappingFabricSpecificSettings `json:"instanceType,omitempty"`
2120 }
2121
2122
2123 func (atanms AzureToAzureNetworkMappingSettings) MarshalJSON() ([]byte, error) {
2124 atanms.InstanceType = InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeAzureToAzure
2125 objectMap := make(map[string]interface{})
2126 if atanms.PrimaryFabricLocation != nil {
2127 objectMap["primaryFabricLocation"] = atanms.PrimaryFabricLocation
2128 }
2129 if atanms.RecoveryFabricLocation != nil {
2130 objectMap["recoveryFabricLocation"] = atanms.RecoveryFabricLocation
2131 }
2132 if atanms.InstanceType != "" {
2133 objectMap["instanceType"] = atanms.InstanceType
2134 }
2135 return json.Marshal(objectMap)
2136 }
2137
2138
2139 func (atanms AzureToAzureNetworkMappingSettings) AsAzureToAzureNetworkMappingSettings() (*AzureToAzureNetworkMappingSettings, bool) {
2140 return &atanms, true
2141 }
2142
2143
2144 func (atanms AzureToAzureNetworkMappingSettings) AsVmmToAzureNetworkMappingSettings() (*VmmToAzureNetworkMappingSettings, bool) {
2145 return nil, false
2146 }
2147
2148
2149 func (atanms AzureToAzureNetworkMappingSettings) AsVmmToVmmNetworkMappingSettings() (*VmmToVmmNetworkMappingSettings, bool) {
2150 return nil, false
2151 }
2152
2153
2154 func (atanms AzureToAzureNetworkMappingSettings) AsNetworkMappingFabricSpecificSettings() (*NetworkMappingFabricSpecificSettings, bool) {
2155 return nil, false
2156 }
2157
2158
2159 func (atanms AzureToAzureNetworkMappingSettings) AsBasicNetworkMappingFabricSpecificSettings() (BasicNetworkMappingFabricSpecificSettings, bool) {
2160 return &atanms, true
2161 }
2162
2163
2164 type AzureToAzureUpdateNetworkMappingInput struct {
2165
2166 PrimaryNetworkID *string `json:"primaryNetworkId,omitempty"`
2167
2168 InstanceType InstanceTypeBasicFabricSpecificUpdateNetworkMappingInput `json:"instanceType,omitempty"`
2169 }
2170
2171
2172 func (ataunmi AzureToAzureUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) {
2173 ataunmi.InstanceType = InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeAzureToAzure
2174 objectMap := make(map[string]interface{})
2175 if ataunmi.PrimaryNetworkID != nil {
2176 objectMap["primaryNetworkId"] = ataunmi.PrimaryNetworkID
2177 }
2178 if ataunmi.InstanceType != "" {
2179 objectMap["instanceType"] = ataunmi.InstanceType
2180 }
2181 return json.Marshal(objectMap)
2182 }
2183
2184
2185 func (ataunmi AzureToAzureUpdateNetworkMappingInput) AsAzureToAzureUpdateNetworkMappingInput() (*AzureToAzureUpdateNetworkMappingInput, bool) {
2186 return &ataunmi, true
2187 }
2188
2189
2190 func (ataunmi AzureToAzureUpdateNetworkMappingInput) AsVmmToAzureUpdateNetworkMappingInput() (*VmmToAzureUpdateNetworkMappingInput, bool) {
2191 return nil, false
2192 }
2193
2194
2195 func (ataunmi AzureToAzureUpdateNetworkMappingInput) AsVmmToVmmUpdateNetworkMappingInput() (*VmmToVmmUpdateNetworkMappingInput, bool) {
2196 return nil, false
2197 }
2198
2199
2200 func (ataunmi AzureToAzureUpdateNetworkMappingInput) AsFabricSpecificUpdateNetworkMappingInput() (*FabricSpecificUpdateNetworkMappingInput, bool) {
2201 return nil, false
2202 }
2203
2204
2205 func (ataunmi AzureToAzureUpdateNetworkMappingInput) AsBasicFabricSpecificUpdateNetworkMappingInput() (BasicFabricSpecificUpdateNetworkMappingInput, bool) {
2206 return &ataunmi, true
2207 }
2208
2209
2210 type AzureToAzureVMSyncedConfigDetails struct {
2211
2212 Tags map[string]*string `json:"tags"`
2213
2214 RoleAssignments *[]RoleAssignment `json:"roleAssignments,omitempty"`
2215
2216 InputEndpoints *[]InputEndpoint `json:"inputEndpoints,omitempty"`
2217 }
2218
2219
2220 func (atavscd AzureToAzureVMSyncedConfigDetails) MarshalJSON() ([]byte, error) {
2221 objectMap := make(map[string]interface{})
2222 if atavscd.Tags != nil {
2223 objectMap["tags"] = atavscd.Tags
2224 }
2225 if atavscd.RoleAssignments != nil {
2226 objectMap["roleAssignments"] = atavscd.RoleAssignments
2227 }
2228 if atavscd.InputEndpoints != nil {
2229 objectMap["inputEndpoints"] = atavscd.InputEndpoints
2230 }
2231 return json.Marshal(objectMap)
2232 }
2233
2234
2235 type AzureVMDiskDetails struct {
2236
2237 VhdType *string `json:"vhdType,omitempty"`
2238
2239 VhdID *string `json:"vhdId,omitempty"`
2240
2241 VhdName *string `json:"vhdName,omitempty"`
2242
2243 MaxSizeMB *string `json:"maxSizeMB,omitempty"`
2244
2245 TargetDiskLocation *string `json:"targetDiskLocation,omitempty"`
2246
2247 TargetDiskName *string `json:"targetDiskName,omitempty"`
2248
2249 LunID *string `json:"lunId,omitempty"`
2250 }
2251
2252
2253
2254 type ComputeSizeErrorDetails struct {
2255
2256 Message *string `json:"message,omitempty"`
2257
2258 Severity *string `json:"severity,omitempty"`
2259 }
2260
2261
2262 type BasicConfigurationSettings interface {
2263 AsHyperVVirtualMachineDetails() (*HyperVVirtualMachineDetails, bool)
2264 AsReplicationGroupDetails() (*ReplicationGroupDetails, bool)
2265 AsVmmVirtualMachineDetails() (*VmmVirtualMachineDetails, bool)
2266 AsVMwareVirtualMachineDetails() (*VMwareVirtualMachineDetails, bool)
2267 AsConfigurationSettings() (*ConfigurationSettings, bool)
2268 }
2269
2270
2271 type ConfigurationSettings struct {
2272
2273 InstanceType InstanceTypeBasicConfigurationSettings `json:"instanceType,omitempty"`
2274 }
2275
2276 func unmarshalBasicConfigurationSettings(body []byte) (BasicConfigurationSettings, error) {
2277 var m map[string]interface{}
2278 err := json.Unmarshal(body, &m)
2279 if err != nil {
2280 return nil, err
2281 }
2282
2283 switch m["instanceType"] {
2284 case string(InstanceTypeHyperVVirtualMachine):
2285 var hvvmd HyperVVirtualMachineDetails
2286 err := json.Unmarshal(body, &hvvmd)
2287 return hvvmd, err
2288 case string(InstanceTypeReplicationGroupDetails):
2289 var rgd ReplicationGroupDetails
2290 err := json.Unmarshal(body, &rgd)
2291 return rgd, err
2292 case string(InstanceTypeVmmVirtualMachine):
2293 var vvmd VmmVirtualMachineDetails
2294 err := json.Unmarshal(body, &vvmd)
2295 return vvmd, err
2296 case string(InstanceTypeVMwareVirtualMachine):
2297 var vmvmd VMwareVirtualMachineDetails
2298 err := json.Unmarshal(body, &vmvmd)
2299 return vmvmd, err
2300 default:
2301 var cs ConfigurationSettings
2302 err := json.Unmarshal(body, &cs)
2303 return cs, err
2304 }
2305 }
2306 func unmarshalBasicConfigurationSettingsArray(body []byte) ([]BasicConfigurationSettings, error) {
2307 var rawMessages []*json.RawMessage
2308 err := json.Unmarshal(body, &rawMessages)
2309 if err != nil {
2310 return nil, err
2311 }
2312
2313 csArray := make([]BasicConfigurationSettings, len(rawMessages))
2314
2315 for index, rawMessage := range rawMessages {
2316 cs, err := unmarshalBasicConfigurationSettings(*rawMessage)
2317 if err != nil {
2318 return nil, err
2319 }
2320 csArray[index] = cs
2321 }
2322 return csArray, nil
2323 }
2324
2325
2326 func (cs ConfigurationSettings) MarshalJSON() ([]byte, error) {
2327 cs.InstanceType = InstanceTypeConfigurationSettings
2328 objectMap := make(map[string]interface{})
2329 if cs.InstanceType != "" {
2330 objectMap["instanceType"] = cs.InstanceType
2331 }
2332 return json.Marshal(objectMap)
2333 }
2334
2335
2336 func (cs ConfigurationSettings) AsHyperVVirtualMachineDetails() (*HyperVVirtualMachineDetails, bool) {
2337 return nil, false
2338 }
2339
2340
2341 func (cs ConfigurationSettings) AsReplicationGroupDetails() (*ReplicationGroupDetails, bool) {
2342 return nil, false
2343 }
2344
2345
2346 func (cs ConfigurationSettings) AsVmmVirtualMachineDetails() (*VmmVirtualMachineDetails, bool) {
2347 return nil, false
2348 }
2349
2350
2351 func (cs ConfigurationSettings) AsVMwareVirtualMachineDetails() (*VMwareVirtualMachineDetails, bool) {
2352 return nil, false
2353 }
2354
2355
2356 func (cs ConfigurationSettings) AsConfigurationSettings() (*ConfigurationSettings, bool) {
2357 return &cs, true
2358 }
2359
2360
2361 func (cs ConfigurationSettings) AsBasicConfigurationSettings() (BasicConfigurationSettings, bool) {
2362 return &cs, true
2363 }
2364
2365
2366 type ConfigureAlertRequest struct {
2367
2368 Properties *ConfigureAlertRequestProperties `json:"properties,omitempty"`
2369 }
2370
2371
2372 type ConfigureAlertRequestProperties struct {
2373
2374 SendToOwners *string `json:"sendToOwners,omitempty"`
2375
2376 CustomEmailAddresses *[]string `json:"customEmailAddresses,omitempty"`
2377
2378 Locale *string `json:"locale,omitempty"`
2379 }
2380
2381
2382
2383 type ConsistencyCheckTaskDetails struct {
2384
2385 VMDetails *[]InconsistentVMDetails `json:"vmDetails,omitempty"`
2386
2387 InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"`
2388 }
2389
2390
2391 func (cctd ConsistencyCheckTaskDetails) MarshalJSON() ([]byte, error) {
2392 cctd.InstanceType = InstanceTypeConsistencyCheckTaskDetails
2393 objectMap := make(map[string]interface{})
2394 if cctd.VMDetails != nil {
2395 objectMap["vmDetails"] = cctd.VMDetails
2396 }
2397 if cctd.InstanceType != "" {
2398 objectMap["instanceType"] = cctd.InstanceType
2399 }
2400 return json.Marshal(objectMap)
2401 }
2402
2403
2404 func (cctd ConsistencyCheckTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) {
2405 return nil, false
2406 }
2407
2408
2409 func (cctd ConsistencyCheckTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) {
2410 return &cctd, true
2411 }
2412
2413
2414 func (cctd ConsistencyCheckTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) {
2415 return nil, false
2416 }
2417
2418
2419 func (cctd ConsistencyCheckTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) {
2420 return nil, false
2421 }
2422
2423
2424 func (cctd ConsistencyCheckTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) {
2425 return nil, false
2426 }
2427
2428
2429 func (cctd ConsistencyCheckTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) {
2430 return nil, false
2431 }
2432
2433
2434 func (cctd ConsistencyCheckTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) {
2435 return nil, false
2436 }
2437
2438
2439 func (cctd ConsistencyCheckTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) {
2440 return nil, false
2441 }
2442
2443
2444 func (cctd ConsistencyCheckTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) {
2445 return nil, false
2446 }
2447
2448
2449 func (cctd ConsistencyCheckTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) {
2450 return &cctd, true
2451 }
2452
2453
2454 type CreateNetworkMappingInput struct {
2455
2456 Properties *CreateNetworkMappingInputProperties `json:"properties,omitempty"`
2457 }
2458
2459
2460 type CreateNetworkMappingInputProperties struct {
2461
2462 RecoveryFabricName *string `json:"recoveryFabricName,omitempty"`
2463
2464 RecoveryNetworkID *string `json:"recoveryNetworkId,omitempty"`
2465
2466 FabricSpecificDetails BasicFabricSpecificCreateNetworkMappingInput `json:"fabricSpecificDetails,omitempty"`
2467 }
2468
2469
2470 func (cnmip *CreateNetworkMappingInputProperties) UnmarshalJSON(body []byte) error {
2471 var m map[string]*json.RawMessage
2472 err := json.Unmarshal(body, &m)
2473 if err != nil {
2474 return err
2475 }
2476 for k, v := range m {
2477 switch k {
2478 case "recoveryFabricName":
2479 if v != nil {
2480 var recoveryFabricName string
2481 err = json.Unmarshal(*v, &recoveryFabricName)
2482 if err != nil {
2483 return err
2484 }
2485 cnmip.RecoveryFabricName = &recoveryFabricName
2486 }
2487 case "recoveryNetworkId":
2488 if v != nil {
2489 var recoveryNetworkID string
2490 err = json.Unmarshal(*v, &recoveryNetworkID)
2491 if err != nil {
2492 return err
2493 }
2494 cnmip.RecoveryNetworkID = &recoveryNetworkID
2495 }
2496 case "fabricSpecificDetails":
2497 if v != nil {
2498 fabricSpecificDetails, err := unmarshalBasicFabricSpecificCreateNetworkMappingInput(*v)
2499 if err != nil {
2500 return err
2501 }
2502 cnmip.FabricSpecificDetails = fabricSpecificDetails
2503 }
2504 }
2505 }
2506
2507 return nil
2508 }
2509
2510
2511 type CreatePolicyInput struct {
2512
2513 Properties *CreatePolicyInputProperties `json:"properties,omitempty"`
2514 }
2515
2516
2517 type CreatePolicyInputProperties struct {
2518
2519 ProviderSpecificInput BasicPolicyProviderSpecificInput `json:"providerSpecificInput,omitempty"`
2520 }
2521
2522
2523 func (cpip *CreatePolicyInputProperties) UnmarshalJSON(body []byte) error {
2524 var m map[string]*json.RawMessage
2525 err := json.Unmarshal(body, &m)
2526 if err != nil {
2527 return err
2528 }
2529 for k, v := range m {
2530 switch k {
2531 case "providerSpecificInput":
2532 if v != nil {
2533 providerSpecificInput, err := unmarshalBasicPolicyProviderSpecificInput(*v)
2534 if err != nil {
2535 return err
2536 }
2537 cpip.ProviderSpecificInput = providerSpecificInput
2538 }
2539 }
2540 }
2541
2542 return nil
2543 }
2544
2545
2546 type CreateProtectionContainerInput struct {
2547
2548 Properties *CreateProtectionContainerInputProperties `json:"properties,omitempty"`
2549 }
2550
2551
2552 type CreateProtectionContainerInputProperties struct {
2553
2554 ProviderSpecificInput *[]BasicReplicationProviderSpecificContainerCreationInput `json:"providerSpecificInput,omitempty"`
2555 }
2556
2557
2558 func (cpcip *CreateProtectionContainerInputProperties) UnmarshalJSON(body []byte) error {
2559 var m map[string]*json.RawMessage
2560 err := json.Unmarshal(body, &m)
2561 if err != nil {
2562 return err
2563 }
2564 for k, v := range m {
2565 switch k {
2566 case "providerSpecificInput":
2567 if v != nil {
2568 providerSpecificInput, err := unmarshalBasicReplicationProviderSpecificContainerCreationInputArray(*v)
2569 if err != nil {
2570 return err
2571 }
2572 cpcip.ProviderSpecificInput = &providerSpecificInput
2573 }
2574 }
2575 }
2576
2577 return nil
2578 }
2579
2580
2581 type CreateProtectionContainerMappingInput struct {
2582
2583 Properties *CreateProtectionContainerMappingInputProperties `json:"properties,omitempty"`
2584 }
2585
2586
2587 type CreateProtectionContainerMappingInputProperties struct {
2588
2589 TargetProtectionContainerID *string `json:"targetProtectionContainerId,omitempty"`
2590
2591 PolicyID *string `json:"policyId,omitempty"`
2592
2593 ProviderSpecificInput BasicReplicationProviderSpecificContainerMappingInput `json:"providerSpecificInput,omitempty"`
2594 }
2595
2596
2597 func (cpcmip *CreateProtectionContainerMappingInputProperties) UnmarshalJSON(body []byte) error {
2598 var m map[string]*json.RawMessage
2599 err := json.Unmarshal(body, &m)
2600 if err != nil {
2601 return err
2602 }
2603 for k, v := range m {
2604 switch k {
2605 case "targetProtectionContainerId":
2606 if v != nil {
2607 var targetProtectionContainerID string
2608 err = json.Unmarshal(*v, &targetProtectionContainerID)
2609 if err != nil {
2610 return err
2611 }
2612 cpcmip.TargetProtectionContainerID = &targetProtectionContainerID
2613 }
2614 case "policyId":
2615 if v != nil {
2616 var policyID string
2617 err = json.Unmarshal(*v, &policyID)
2618 if err != nil {
2619 return err
2620 }
2621 cpcmip.PolicyID = &policyID
2622 }
2623 case "providerSpecificInput":
2624 if v != nil {
2625 providerSpecificInput, err := unmarshalBasicReplicationProviderSpecificContainerMappingInput(*v)
2626 if err != nil {
2627 return err
2628 }
2629 cpcmip.ProviderSpecificInput = providerSpecificInput
2630 }
2631 }
2632 }
2633
2634 return nil
2635 }
2636
2637
2638 type CreateRecoveryPlanInput struct {
2639
2640 Properties *CreateRecoveryPlanInputProperties `json:"properties,omitempty"`
2641 }
2642
2643
2644 type CreateRecoveryPlanInputProperties struct {
2645
2646 PrimaryFabricID *string `json:"primaryFabricId,omitempty"`
2647
2648 RecoveryFabricID *string `json:"recoveryFabricId,omitempty"`
2649
2650 FailoverDeploymentModel FailoverDeploymentModel `json:"failoverDeploymentModel,omitempty"`
2651
2652 Groups *[]RecoveryPlanGroup `json:"groups,omitempty"`
2653 }
2654
2655
2656 type CurrentJobDetails struct {
2657
2658 JobName *string `json:"jobName,omitempty"`
2659
2660 JobID *string `json:"jobId,omitempty"`
2661
2662 StartTime *date.Time `json:"startTime,omitempty"`
2663 }
2664
2665
2666 type CurrentScenarioDetails struct {
2667
2668 ScenarioName *string `json:"scenarioName,omitempty"`
2669
2670 JobID *string `json:"jobId,omitempty"`
2671
2672 StartTime *date.Time `json:"startTime,omitempty"`
2673 }
2674
2675
2676 type DataStore struct {
2677
2678 SymbolicName *string `json:"symbolicName,omitempty"`
2679
2680 UUID *string `json:"uuid,omitempty"`
2681
2682 Capacity *string `json:"capacity,omitempty"`
2683
2684 FreeSpace *string `json:"freeSpace,omitempty"`
2685
2686 Type *string `json:"type,omitempty"`
2687 }
2688
2689
2690 type DisableProtectionInput struct {
2691
2692 Properties *DisableProtectionInputProperties `json:"properties,omitempty"`
2693 }
2694
2695
2696 type DisableProtectionInputProperties struct {
2697
2698 DisableProtectionReason DisableProtectionReason `json:"disableProtectionReason,omitempty"`
2699
2700 ReplicationProviderInput BasicDisableProtectionProviderSpecificInput `json:"replicationProviderInput,omitempty"`
2701 }
2702
2703
2704 func (dpip *DisableProtectionInputProperties) UnmarshalJSON(body []byte) error {
2705 var m map[string]*json.RawMessage
2706 err := json.Unmarshal(body, &m)
2707 if err != nil {
2708 return err
2709 }
2710 for k, v := range m {
2711 switch k {
2712 case "disableProtectionReason":
2713 if v != nil {
2714 var disableProtectionReason DisableProtectionReason
2715 err = json.Unmarshal(*v, &disableProtectionReason)
2716 if err != nil {
2717 return err
2718 }
2719 dpip.DisableProtectionReason = disableProtectionReason
2720 }
2721 case "replicationProviderInput":
2722 if v != nil {
2723 replicationProviderInput, err := unmarshalBasicDisableProtectionProviderSpecificInput(*v)
2724 if err != nil {
2725 return err
2726 }
2727 dpip.ReplicationProviderInput = replicationProviderInput
2728 }
2729 }
2730 }
2731
2732 return nil
2733 }
2734
2735
2736 type BasicDisableProtectionProviderSpecificInput interface {
2737 AsInMageDisableProtectionProviderSpecificInput() (*InMageDisableProtectionProviderSpecificInput, bool)
2738 AsDisableProtectionProviderSpecificInput() (*DisableProtectionProviderSpecificInput, bool)
2739 }
2740
2741
2742 type DisableProtectionProviderSpecificInput struct {
2743
2744 InstanceType InstanceTypeBasicDisableProtectionProviderSpecificInput `json:"instanceType,omitempty"`
2745 }
2746
2747 func unmarshalBasicDisableProtectionProviderSpecificInput(body []byte) (BasicDisableProtectionProviderSpecificInput, error) {
2748 var m map[string]interface{}
2749 err := json.Unmarshal(body, &m)
2750 if err != nil {
2751 return nil, err
2752 }
2753
2754 switch m["instanceType"] {
2755 case string(InstanceTypeInMage):
2756 var imdppsi InMageDisableProtectionProviderSpecificInput
2757 err := json.Unmarshal(body, &imdppsi)
2758 return imdppsi, err
2759 default:
2760 var dppsi DisableProtectionProviderSpecificInput
2761 err := json.Unmarshal(body, &dppsi)
2762 return dppsi, err
2763 }
2764 }
2765 func unmarshalBasicDisableProtectionProviderSpecificInputArray(body []byte) ([]BasicDisableProtectionProviderSpecificInput, error) {
2766 var rawMessages []*json.RawMessage
2767 err := json.Unmarshal(body, &rawMessages)
2768 if err != nil {
2769 return nil, err
2770 }
2771
2772 dppsiArray := make([]BasicDisableProtectionProviderSpecificInput, len(rawMessages))
2773
2774 for index, rawMessage := range rawMessages {
2775 dppsi, err := unmarshalBasicDisableProtectionProviderSpecificInput(*rawMessage)
2776 if err != nil {
2777 return nil, err
2778 }
2779 dppsiArray[index] = dppsi
2780 }
2781 return dppsiArray, nil
2782 }
2783
2784
2785 func (dppsi DisableProtectionProviderSpecificInput) MarshalJSON() ([]byte, error) {
2786 dppsi.InstanceType = InstanceTypeDisableProtectionProviderSpecificInput
2787 objectMap := make(map[string]interface{})
2788 if dppsi.InstanceType != "" {
2789 objectMap["instanceType"] = dppsi.InstanceType
2790 }
2791 return json.Marshal(objectMap)
2792 }
2793
2794
2795 func (dppsi DisableProtectionProviderSpecificInput) AsInMageDisableProtectionProviderSpecificInput() (*InMageDisableProtectionProviderSpecificInput, bool) {
2796 return nil, false
2797 }
2798
2799
2800 func (dppsi DisableProtectionProviderSpecificInput) AsDisableProtectionProviderSpecificInput() (*DisableProtectionProviderSpecificInput, bool) {
2801 return &dppsi, true
2802 }
2803
2804
2805 func (dppsi DisableProtectionProviderSpecificInput) AsBasicDisableProtectionProviderSpecificInput() (BasicDisableProtectionProviderSpecificInput, bool) {
2806 return &dppsi, true
2807 }
2808
2809
2810 type DiscoverProtectableItemRequest struct {
2811
2812 Properties *DiscoverProtectableItemRequestProperties `json:"properties,omitempty"`
2813 }
2814
2815
2816 type DiscoverProtectableItemRequestProperties struct {
2817
2818 FriendlyName *string `json:"friendlyName,omitempty"`
2819
2820 IPAddress *string `json:"ipAddress,omitempty"`
2821
2822 OsType *string `json:"osType,omitempty"`
2823 }
2824
2825
2826 type DiskDetails struct {
2827
2828 MaxSizeMB *int64 `json:"maxSizeMB,omitempty"`
2829
2830 VhdType *string `json:"vhdType,omitempty"`
2831
2832 VhdID *string `json:"vhdId,omitempty"`
2833
2834 VhdName *string `json:"vhdName,omitempty"`
2835 }
2836
2837
2838 type DiskEncryptionInfo struct {
2839
2840 DiskEncryptionKeyInfo *DiskEncryptionKeyInfo `json:"diskEncryptionKeyInfo,omitempty"`
2841
2842 KeyEncryptionKeyInfo *KeyEncryptionKeyInfo `json:"keyEncryptionKeyInfo,omitempty"`
2843 }
2844
2845
2846 type DiskEncryptionKeyInfo struct {
2847
2848 SecretIdentifier *string `json:"secretIdentifier,omitempty"`
2849
2850 KeyVaultResourceArmID *string `json:"keyVaultResourceArmId,omitempty"`
2851 }
2852
2853
2854 type DiskVolumeDetails struct {
2855
2856 Label *string `json:"label,omitempty"`
2857
2858 Name *string `json:"name,omitempty"`
2859 }
2860
2861
2862
2863
2864 type Display struct {
2865
2866 Provider *string `json:"provider,omitempty"`
2867
2868 Resource *string `json:"resource,omitempty"`
2869
2870 Operation *string `json:"operation,omitempty"`
2871
2872 Description *string `json:"description,omitempty"`
2873 }
2874
2875
2876 type EnableMigrationInput struct {
2877
2878 Properties *EnableMigrationInputProperties `json:"properties,omitempty"`
2879 }
2880
2881
2882 type EnableMigrationInputProperties struct {
2883
2884 PolicyID *string `json:"policyId,omitempty"`
2885
2886 ProviderSpecificDetails BasicEnableMigrationProviderSpecificInput `json:"providerSpecificDetails,omitempty"`
2887 }
2888
2889
2890 func (emip *EnableMigrationInputProperties) UnmarshalJSON(body []byte) error {
2891 var m map[string]*json.RawMessage
2892 err := json.Unmarshal(body, &m)
2893 if err != nil {
2894 return err
2895 }
2896 for k, v := range m {
2897 switch k {
2898 case "policyId":
2899 if v != nil {
2900 var policyID string
2901 err = json.Unmarshal(*v, &policyID)
2902 if err != nil {
2903 return err
2904 }
2905 emip.PolicyID = &policyID
2906 }
2907 case "providerSpecificDetails":
2908 if v != nil {
2909 providerSpecificDetails, err := unmarshalBasicEnableMigrationProviderSpecificInput(*v)
2910 if err != nil {
2911 return err
2912 }
2913 emip.ProviderSpecificDetails = providerSpecificDetails
2914 }
2915 }
2916 }
2917
2918 return nil
2919 }
2920
2921
2922 type BasicEnableMigrationProviderSpecificInput interface {
2923 AsVMwareCbtEnableMigrationInput() (*VMwareCbtEnableMigrationInput, bool)
2924 AsEnableMigrationProviderSpecificInput() (*EnableMigrationProviderSpecificInput, bool)
2925 }
2926
2927
2928 type EnableMigrationProviderSpecificInput struct {
2929
2930 InstanceType InstanceTypeBasicEnableMigrationProviderSpecificInput `json:"instanceType,omitempty"`
2931 }
2932
2933 func unmarshalBasicEnableMigrationProviderSpecificInput(body []byte) (BasicEnableMigrationProviderSpecificInput, error) {
2934 var m map[string]interface{}
2935 err := json.Unmarshal(body, &m)
2936 if err != nil {
2937 return nil, err
2938 }
2939
2940 switch m["instanceType"] {
2941 case string(InstanceTypeVMwareCbt):
2942 var vmcemi VMwareCbtEnableMigrationInput
2943 err := json.Unmarshal(body, &vmcemi)
2944 return vmcemi, err
2945 default:
2946 var empsi EnableMigrationProviderSpecificInput
2947 err := json.Unmarshal(body, &empsi)
2948 return empsi, err
2949 }
2950 }
2951 func unmarshalBasicEnableMigrationProviderSpecificInputArray(body []byte) ([]BasicEnableMigrationProviderSpecificInput, error) {
2952 var rawMessages []*json.RawMessage
2953 err := json.Unmarshal(body, &rawMessages)
2954 if err != nil {
2955 return nil, err
2956 }
2957
2958 empsiArray := make([]BasicEnableMigrationProviderSpecificInput, len(rawMessages))
2959
2960 for index, rawMessage := range rawMessages {
2961 empsi, err := unmarshalBasicEnableMigrationProviderSpecificInput(*rawMessage)
2962 if err != nil {
2963 return nil, err
2964 }
2965 empsiArray[index] = empsi
2966 }
2967 return empsiArray, nil
2968 }
2969
2970
2971 func (empsi EnableMigrationProviderSpecificInput) MarshalJSON() ([]byte, error) {
2972 empsi.InstanceType = InstanceTypeEnableMigrationProviderSpecificInput
2973 objectMap := make(map[string]interface{})
2974 if empsi.InstanceType != "" {
2975 objectMap["instanceType"] = empsi.InstanceType
2976 }
2977 return json.Marshal(objectMap)
2978 }
2979
2980
2981 func (empsi EnableMigrationProviderSpecificInput) AsVMwareCbtEnableMigrationInput() (*VMwareCbtEnableMigrationInput, bool) {
2982 return nil, false
2983 }
2984
2985
2986 func (empsi EnableMigrationProviderSpecificInput) AsEnableMigrationProviderSpecificInput() (*EnableMigrationProviderSpecificInput, bool) {
2987 return &empsi, true
2988 }
2989
2990
2991 func (empsi EnableMigrationProviderSpecificInput) AsBasicEnableMigrationProviderSpecificInput() (BasicEnableMigrationProviderSpecificInput, bool) {
2992 return &empsi, true
2993 }
2994
2995
2996 type EnableProtectionInput struct {
2997
2998 Properties *EnableProtectionInputProperties `json:"properties,omitempty"`
2999 }
3000
3001
3002 type EnableProtectionInputProperties struct {
3003
3004 PolicyID *string `json:"policyId,omitempty"`
3005
3006 ProtectableItemID *string `json:"protectableItemId,omitempty"`
3007
3008 ProviderSpecificDetails BasicEnableProtectionProviderSpecificInput `json:"providerSpecificDetails,omitempty"`
3009 }
3010
3011
3012 func (epip *EnableProtectionInputProperties) UnmarshalJSON(body []byte) error {
3013 var m map[string]*json.RawMessage
3014 err := json.Unmarshal(body, &m)
3015 if err != nil {
3016 return err
3017 }
3018 for k, v := range m {
3019 switch k {
3020 case "policyId":
3021 if v != nil {
3022 var policyID string
3023 err = json.Unmarshal(*v, &policyID)
3024 if err != nil {
3025 return err
3026 }
3027 epip.PolicyID = &policyID
3028 }
3029 case "protectableItemId":
3030 if v != nil {
3031 var protectableItemID string
3032 err = json.Unmarshal(*v, &protectableItemID)
3033 if err != nil {
3034 return err
3035 }
3036 epip.ProtectableItemID = &protectableItemID
3037 }
3038 case "providerSpecificDetails":
3039 if v != nil {
3040 providerSpecificDetails, err := unmarshalBasicEnableProtectionProviderSpecificInput(*v)
3041 if err != nil {
3042 return err
3043 }
3044 epip.ProviderSpecificDetails = providerSpecificDetails
3045 }
3046 }
3047 }
3048
3049 return nil
3050 }
3051
3052
3053 type BasicEnableProtectionProviderSpecificInput interface {
3054 AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool)
3055 AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool)
3056 AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool)
3057 AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool)
3058 AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool)
3059 AsEnableProtectionProviderSpecificInput() (*EnableProtectionProviderSpecificInput, bool)
3060 }
3061
3062
3063 type EnableProtectionProviderSpecificInput struct {
3064
3065 InstanceType InstanceTypeBasicEnableProtectionProviderSpecificInput `json:"instanceType,omitempty"`
3066 }
3067
3068 func unmarshalBasicEnableProtectionProviderSpecificInput(body []byte) (BasicEnableProtectionProviderSpecificInput, error) {
3069 var m map[string]interface{}
3070 err := json.Unmarshal(body, &m)
3071 if err != nil {
3072 return nil, err
3073 }
3074
3075 switch m["instanceType"] {
3076 case string(InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeA2A):
3077 var aepi A2AEnableProtectionInput
3078 err := json.Unmarshal(body, &aepi)
3079 return aepi, err
3080 case string(InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeHyperVReplicaAzure):
3081 var hvraepi HyperVReplicaAzureEnableProtectionInput
3082 err := json.Unmarshal(body, &hvraepi)
3083 return hvraepi, err
3084 case string(InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMageAzureV2):
3085 var imavepi InMageAzureV2EnableProtectionInput
3086 err := json.Unmarshal(body, &imavepi)
3087 return imavepi, err
3088 case string(InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMage):
3089 var imepi InMageEnableProtectionInput
3090 err := json.Unmarshal(body, &imepi)
3091 return imepi, err
3092 case string(InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeSan):
3093 var sepi SanEnableProtectionInput
3094 err := json.Unmarshal(body, &sepi)
3095 return sepi, err
3096 default:
3097 var eppsi EnableProtectionProviderSpecificInput
3098 err := json.Unmarshal(body, &eppsi)
3099 return eppsi, err
3100 }
3101 }
3102 func unmarshalBasicEnableProtectionProviderSpecificInputArray(body []byte) ([]BasicEnableProtectionProviderSpecificInput, error) {
3103 var rawMessages []*json.RawMessage
3104 err := json.Unmarshal(body, &rawMessages)
3105 if err != nil {
3106 return nil, err
3107 }
3108
3109 eppsiArray := make([]BasicEnableProtectionProviderSpecificInput, len(rawMessages))
3110
3111 for index, rawMessage := range rawMessages {
3112 eppsi, err := unmarshalBasicEnableProtectionProviderSpecificInput(*rawMessage)
3113 if err != nil {
3114 return nil, err
3115 }
3116 eppsiArray[index] = eppsi
3117 }
3118 return eppsiArray, nil
3119 }
3120
3121
3122 func (eppsi EnableProtectionProviderSpecificInput) MarshalJSON() ([]byte, error) {
3123 eppsi.InstanceType = InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeEnableProtectionProviderSpecificInput
3124 objectMap := make(map[string]interface{})
3125 if eppsi.InstanceType != "" {
3126 objectMap["instanceType"] = eppsi.InstanceType
3127 }
3128 return json.Marshal(objectMap)
3129 }
3130
3131
3132 func (eppsi EnableProtectionProviderSpecificInput) AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool) {
3133 return nil, false
3134 }
3135
3136
3137 func (eppsi EnableProtectionProviderSpecificInput) AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool) {
3138 return nil, false
3139 }
3140
3141
3142 func (eppsi EnableProtectionProviderSpecificInput) AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool) {
3143 return nil, false
3144 }
3145
3146
3147 func (eppsi EnableProtectionProviderSpecificInput) AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool) {
3148 return nil, false
3149 }
3150
3151
3152 func (eppsi EnableProtectionProviderSpecificInput) AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool) {
3153 return nil, false
3154 }
3155
3156
3157 func (eppsi EnableProtectionProviderSpecificInput) AsEnableProtectionProviderSpecificInput() (*EnableProtectionProviderSpecificInput, bool) {
3158 return &eppsi, true
3159 }
3160
3161
3162 func (eppsi EnableProtectionProviderSpecificInput) AsBasicEnableProtectionProviderSpecificInput() (BasicEnableProtectionProviderSpecificInput, bool) {
3163 return &eppsi, true
3164 }
3165
3166
3167 type EncryptionDetails struct {
3168
3169 KekState *string `json:"kekState,omitempty"`
3170
3171 KekCertThumbprint *string `json:"kekCertThumbprint,omitempty"`
3172
3173 KekCertExpiryDate *date.Time `json:"kekCertExpiryDate,omitempty"`
3174 }
3175
3176
3177 type Event struct {
3178 autorest.Response `json:"-"`
3179
3180 Properties *EventProperties `json:"properties,omitempty"`
3181
3182 ID *string `json:"id,omitempty"`
3183
3184 Name *string `json:"name,omitempty"`
3185
3186 Type *string `json:"type,omitempty"`
3187
3188 Location *string `json:"location,omitempty"`
3189 }
3190
3191
3192 func (e Event) MarshalJSON() ([]byte, error) {
3193 objectMap := make(map[string]interface{})
3194 if e.Properties != nil {
3195 objectMap["properties"] = e.Properties
3196 }
3197 if e.Location != nil {
3198 objectMap["location"] = e.Location
3199 }
3200 return json.Marshal(objectMap)
3201 }
3202
3203
3204 type EventCollection struct {
3205 autorest.Response `json:"-"`
3206
3207 Value *[]Event `json:"value,omitempty"`
3208
3209 NextLink *string `json:"nextLink,omitempty"`
3210 }
3211
3212
3213 type EventCollectionIterator struct {
3214 i int
3215 page EventCollectionPage
3216 }
3217
3218
3219
3220 func (iter *EventCollectionIterator) NextWithContext(ctx context.Context) (err error) {
3221 if tracing.IsEnabled() {
3222 ctx = tracing.StartSpan(ctx, fqdn+"/EventCollectionIterator.NextWithContext")
3223 defer func() {
3224 sc := -1
3225 if iter.Response().Response.Response != nil {
3226 sc = iter.Response().Response.Response.StatusCode
3227 }
3228 tracing.EndSpan(ctx, sc, err)
3229 }()
3230 }
3231 iter.i++
3232 if iter.i < len(iter.page.Values()) {
3233 return nil
3234 }
3235 err = iter.page.NextWithContext(ctx)
3236 if err != nil {
3237 iter.i--
3238 return err
3239 }
3240 iter.i = 0
3241 return nil
3242 }
3243
3244
3245
3246
3247 func (iter *EventCollectionIterator) Next() error {
3248 return iter.NextWithContext(context.Background())
3249 }
3250
3251
3252 func (iter EventCollectionIterator) NotDone() bool {
3253 return iter.page.NotDone() && iter.i < len(iter.page.Values())
3254 }
3255
3256
3257 func (iter EventCollectionIterator) Response() EventCollection {
3258 return iter.page.Response()
3259 }
3260
3261
3262
3263 func (iter EventCollectionIterator) Value() Event {
3264 if !iter.page.NotDone() {
3265 return Event{}
3266 }
3267 return iter.page.Values()[iter.i]
3268 }
3269
3270
3271 func NewEventCollectionIterator(page EventCollectionPage) EventCollectionIterator {
3272 return EventCollectionIterator{page: page}
3273 }
3274
3275
3276 func (ec EventCollection) IsEmpty() bool {
3277 return ec.Value == nil || len(*ec.Value) == 0
3278 }
3279
3280
3281 func (ec EventCollection) hasNextLink() bool {
3282 return ec.NextLink != nil && len(*ec.NextLink) != 0
3283 }
3284
3285
3286
3287 func (ec EventCollection) eventCollectionPreparer(ctx context.Context) (*http.Request, error) {
3288 if !ec.hasNextLink() {
3289 return nil, nil
3290 }
3291 return autorest.Prepare((&http.Request{}).WithContext(ctx),
3292 autorest.AsJSON(),
3293 autorest.AsGet(),
3294 autorest.WithBaseURL(to.String(ec.NextLink)))
3295 }
3296
3297
3298 type EventCollectionPage struct {
3299 fn func(context.Context, EventCollection) (EventCollection, error)
3300 ec EventCollection
3301 }
3302
3303
3304
3305 func (page *EventCollectionPage) NextWithContext(ctx context.Context) (err error) {
3306 if tracing.IsEnabled() {
3307 ctx = tracing.StartSpan(ctx, fqdn+"/EventCollectionPage.NextWithContext")
3308 defer func() {
3309 sc := -1
3310 if page.Response().Response.Response != nil {
3311 sc = page.Response().Response.Response.StatusCode
3312 }
3313 tracing.EndSpan(ctx, sc, err)
3314 }()
3315 }
3316 for {
3317 next, err := page.fn(ctx, page.ec)
3318 if err != nil {
3319 return err
3320 }
3321 page.ec = next
3322 if !next.hasNextLink() || !next.IsEmpty() {
3323 break
3324 }
3325 }
3326 return nil
3327 }
3328
3329
3330
3331
3332 func (page *EventCollectionPage) Next() error {
3333 return page.NextWithContext(context.Background())
3334 }
3335
3336
3337 func (page EventCollectionPage) NotDone() bool {
3338 return !page.ec.IsEmpty()
3339 }
3340
3341
3342 func (page EventCollectionPage) Response() EventCollection {
3343 return page.ec
3344 }
3345
3346
3347 func (page EventCollectionPage) Values() []Event {
3348 if page.ec.IsEmpty() {
3349 return nil
3350 }
3351 return *page.ec.Value
3352 }
3353
3354
3355 func NewEventCollectionPage(cur EventCollection, getNextPage func(context.Context, EventCollection) (EventCollection, error)) EventCollectionPage {
3356 return EventCollectionPage{
3357 fn: getNextPage,
3358 ec: cur,
3359 }
3360 }
3361
3362
3363 type EventProperties struct {
3364
3365 EventCode *string `json:"eventCode,omitempty"`
3366
3367 Description *string `json:"description,omitempty"`
3368
3369 EventType *string `json:"eventType,omitempty"`
3370
3371 AffectedObjectFriendlyName *string `json:"affectedObjectFriendlyName,omitempty"`
3372
3373 AffectedObjectCorrelationID *string `json:"affectedObjectCorrelationId,omitempty"`
3374
3375 Severity *string `json:"severity,omitempty"`
3376
3377 TimeOfOccurrence *date.Time `json:"timeOfOccurrence,omitempty"`
3378
3379 FabricID *string `json:"fabricId,omitempty"`
3380
3381 ProviderSpecificDetails BasicEventProviderSpecificDetails `json:"providerSpecificDetails,omitempty"`
3382
3383 EventSpecificDetails BasicEventSpecificDetails `json:"eventSpecificDetails,omitempty"`
3384
3385 HealthErrors *[]HealthError `json:"healthErrors,omitempty"`
3386 }
3387
3388
3389 func (ep EventProperties) MarshalJSON() ([]byte, error) {
3390 objectMap := make(map[string]interface{})
3391 if ep.EventCode != nil {
3392 objectMap["eventCode"] = ep.EventCode
3393 }
3394 if ep.Description != nil {
3395 objectMap["description"] = ep.Description
3396 }
3397 if ep.EventType != nil {
3398 objectMap["eventType"] = ep.EventType
3399 }
3400 if ep.AffectedObjectFriendlyName != nil {
3401 objectMap["affectedObjectFriendlyName"] = ep.AffectedObjectFriendlyName
3402 }
3403 if ep.Severity != nil {
3404 objectMap["severity"] = ep.Severity
3405 }
3406 if ep.TimeOfOccurrence != nil {
3407 objectMap["timeOfOccurrence"] = ep.TimeOfOccurrence
3408 }
3409 if ep.FabricID != nil {
3410 objectMap["fabricId"] = ep.FabricID
3411 }
3412 objectMap["providerSpecificDetails"] = ep.ProviderSpecificDetails
3413 objectMap["eventSpecificDetails"] = ep.EventSpecificDetails
3414 if ep.HealthErrors != nil {
3415 objectMap["healthErrors"] = ep.HealthErrors
3416 }
3417 return json.Marshal(objectMap)
3418 }
3419
3420
3421 func (ep *EventProperties) UnmarshalJSON(body []byte) error {
3422 var m map[string]*json.RawMessage
3423 err := json.Unmarshal(body, &m)
3424 if err != nil {
3425 return err
3426 }
3427 for k, v := range m {
3428 switch k {
3429 case "eventCode":
3430 if v != nil {
3431 var eventCode string
3432 err = json.Unmarshal(*v, &eventCode)
3433 if err != nil {
3434 return err
3435 }
3436 ep.EventCode = &eventCode
3437 }
3438 case "description":
3439 if v != nil {
3440 var description string
3441 err = json.Unmarshal(*v, &description)
3442 if err != nil {
3443 return err
3444 }
3445 ep.Description = &description
3446 }
3447 case "eventType":
3448 if v != nil {
3449 var eventType string
3450 err = json.Unmarshal(*v, &eventType)
3451 if err != nil {
3452 return err
3453 }
3454 ep.EventType = &eventType
3455 }
3456 case "affectedObjectFriendlyName":
3457 if v != nil {
3458 var affectedObjectFriendlyName string
3459 err = json.Unmarshal(*v, &affectedObjectFriendlyName)
3460 if err != nil {
3461 return err
3462 }
3463 ep.AffectedObjectFriendlyName = &affectedObjectFriendlyName
3464 }
3465 case "affectedObjectCorrelationId":
3466 if v != nil {
3467 var affectedObjectCorrelationID string
3468 err = json.Unmarshal(*v, &affectedObjectCorrelationID)
3469 if err != nil {
3470 return err
3471 }
3472 ep.AffectedObjectCorrelationID = &affectedObjectCorrelationID
3473 }
3474 case "severity":
3475 if v != nil {
3476 var severity string
3477 err = json.Unmarshal(*v, &severity)
3478 if err != nil {
3479 return err
3480 }
3481 ep.Severity = &severity
3482 }
3483 case "timeOfOccurrence":
3484 if v != nil {
3485 var timeOfOccurrence date.Time
3486 err = json.Unmarshal(*v, &timeOfOccurrence)
3487 if err != nil {
3488 return err
3489 }
3490 ep.TimeOfOccurrence = &timeOfOccurrence
3491 }
3492 case "fabricId":
3493 if v != nil {
3494 var fabricID string
3495 err = json.Unmarshal(*v, &fabricID)
3496 if err != nil {
3497 return err
3498 }
3499 ep.FabricID = &fabricID
3500 }
3501 case "providerSpecificDetails":
3502 if v != nil {
3503 providerSpecificDetails, err := unmarshalBasicEventProviderSpecificDetails(*v)
3504 if err != nil {
3505 return err
3506 }
3507 ep.ProviderSpecificDetails = providerSpecificDetails
3508 }
3509 case "eventSpecificDetails":
3510 if v != nil {
3511 eventSpecificDetails, err := unmarshalBasicEventSpecificDetails(*v)
3512 if err != nil {
3513 return err
3514 }
3515 ep.EventSpecificDetails = eventSpecificDetails
3516 }
3517 case "healthErrors":
3518 if v != nil {
3519 var healthErrors []HealthError
3520 err = json.Unmarshal(*v, &healthErrors)
3521 if err != nil {
3522 return err
3523 }
3524 ep.HealthErrors = &healthErrors
3525 }
3526 }
3527 }
3528
3529 return nil
3530 }
3531
3532
3533 type BasicEventProviderSpecificDetails interface {
3534 AsA2AEventDetails() (*A2AEventDetails, bool)
3535 AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool)
3536 AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool)
3537 AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool)
3538 AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool)
3539 AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool)
3540 AsVMwareCbtEventDetails() (*VMwareCbtEventDetails, bool)
3541 AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool)
3542 }
3543
3544
3545 type EventProviderSpecificDetails struct {
3546
3547 InstanceType InstanceTypeBasicEventProviderSpecificDetails `json:"instanceType,omitempty"`
3548 }
3549
3550 func unmarshalBasicEventProviderSpecificDetails(body []byte) (BasicEventProviderSpecificDetails, error) {
3551 var m map[string]interface{}
3552 err := json.Unmarshal(body, &m)
3553 if err != nil {
3554 return nil, err
3555 }
3556
3557 switch m["instanceType"] {
3558 case string(InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeA2A):
3559 var aed A2AEventDetails
3560 err := json.Unmarshal(body, &aed)
3561 return aed, err
3562 case string(InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012):
3563 var hvr2ed HyperVReplica2012EventDetails
3564 err := json.Unmarshal(body, &hvr2ed)
3565 return hvr2ed, err
3566 case string(InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012R2):
3567 var hvr2ed HyperVReplica2012R2EventDetails
3568 err := json.Unmarshal(body, &hvr2ed)
3569 return hvr2ed, err
3570 case string(InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaAzure):
3571 var hvraed HyperVReplicaAzureEventDetails
3572 err := json.Unmarshal(body, &hvraed)
3573 return hvraed, err
3574 case string(InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaBaseEventDetails):
3575 var hvrbed HyperVReplicaBaseEventDetails
3576 err := json.Unmarshal(body, &hvrbed)
3577 return hvrbed, err
3578 case string(InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageAzureV2):
3579 var imaved InMageAzureV2EventDetails
3580 err := json.Unmarshal(body, &imaved)
3581 return imaved, err
3582 case string(InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeVMwareCbt):
3583 var vmced VMwareCbtEventDetails
3584 err := json.Unmarshal(body, &vmced)
3585 return vmced, err
3586 default:
3587 var epsd EventProviderSpecificDetails
3588 err := json.Unmarshal(body, &epsd)
3589 return epsd, err
3590 }
3591 }
3592 func unmarshalBasicEventProviderSpecificDetailsArray(body []byte) ([]BasicEventProviderSpecificDetails, error) {
3593 var rawMessages []*json.RawMessage
3594 err := json.Unmarshal(body, &rawMessages)
3595 if err != nil {
3596 return nil, err
3597 }
3598
3599 epsdArray := make([]BasicEventProviderSpecificDetails, len(rawMessages))
3600
3601 for index, rawMessage := range rawMessages {
3602 epsd, err := unmarshalBasicEventProviderSpecificDetails(*rawMessage)
3603 if err != nil {
3604 return nil, err
3605 }
3606 epsdArray[index] = epsd
3607 }
3608 return epsdArray, nil
3609 }
3610
3611
3612 func (epsd EventProviderSpecificDetails) MarshalJSON() ([]byte, error) {
3613 epsd.InstanceType = InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeEventProviderSpecificDetails
3614 objectMap := make(map[string]interface{})
3615 if epsd.InstanceType != "" {
3616 objectMap["instanceType"] = epsd.InstanceType
3617 }
3618 return json.Marshal(objectMap)
3619 }
3620
3621
3622 func (epsd EventProviderSpecificDetails) AsA2AEventDetails() (*A2AEventDetails, bool) {
3623 return nil, false
3624 }
3625
3626
3627 func (epsd EventProviderSpecificDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) {
3628 return nil, false
3629 }
3630
3631
3632 func (epsd EventProviderSpecificDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) {
3633 return nil, false
3634 }
3635
3636
3637 func (epsd EventProviderSpecificDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) {
3638 return nil, false
3639 }
3640
3641
3642 func (epsd EventProviderSpecificDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) {
3643 return nil, false
3644 }
3645
3646
3647 func (epsd EventProviderSpecificDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) {
3648 return nil, false
3649 }
3650
3651
3652 func (epsd EventProviderSpecificDetails) AsVMwareCbtEventDetails() (*VMwareCbtEventDetails, bool) {
3653 return nil, false
3654 }
3655
3656
3657 func (epsd EventProviderSpecificDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) {
3658 return &epsd, true
3659 }
3660
3661
3662 func (epsd EventProviderSpecificDetails) AsBasicEventProviderSpecificDetails() (BasicEventProviderSpecificDetails, bool) {
3663 return &epsd, true
3664 }
3665
3666
3667 type EventQueryParameter struct {
3668
3669 EventCode *string `json:"eventCode,omitempty"`
3670
3671 Severity *string `json:"severity,omitempty"`
3672
3673 EventType *string `json:"eventType,omitempty"`
3674
3675 FabricName *string `json:"fabricName,omitempty"`
3676
3677 AffectedObjectFriendlyName *string `json:"affectedObjectFriendlyName,omitempty"`
3678
3679 AffectedObjectCorrelationID *string `json:"affectedObjectCorrelationId,omitempty"`
3680
3681 StartTime *date.Time `json:"startTime,omitempty"`
3682
3683 EndTime *date.Time `json:"endTime,omitempty"`
3684 }
3685
3686
3687 func (eqp EventQueryParameter) MarshalJSON() ([]byte, error) {
3688 objectMap := make(map[string]interface{})
3689 if eqp.EventCode != nil {
3690 objectMap["eventCode"] = eqp.EventCode
3691 }
3692 if eqp.Severity != nil {
3693 objectMap["severity"] = eqp.Severity
3694 }
3695 if eqp.EventType != nil {
3696 objectMap["eventType"] = eqp.EventType
3697 }
3698 if eqp.FabricName != nil {
3699 objectMap["fabricName"] = eqp.FabricName
3700 }
3701 if eqp.AffectedObjectFriendlyName != nil {
3702 objectMap["affectedObjectFriendlyName"] = eqp.AffectedObjectFriendlyName
3703 }
3704 if eqp.StartTime != nil {
3705 objectMap["startTime"] = eqp.StartTime
3706 }
3707 if eqp.EndTime != nil {
3708 objectMap["endTime"] = eqp.EndTime
3709 }
3710 return json.Marshal(objectMap)
3711 }
3712
3713
3714 type BasicEventSpecificDetails interface {
3715 AsJobStatusEventDetails() (*JobStatusEventDetails, bool)
3716 AsEventSpecificDetails() (*EventSpecificDetails, bool)
3717 }
3718
3719
3720 type EventSpecificDetails struct {
3721
3722 InstanceType InstanceTypeBasicEventSpecificDetails `json:"instanceType,omitempty"`
3723 }
3724
3725 func unmarshalBasicEventSpecificDetails(body []byte) (BasicEventSpecificDetails, error) {
3726 var m map[string]interface{}
3727 err := json.Unmarshal(body, &m)
3728 if err != nil {
3729 return nil, err
3730 }
3731
3732 switch m["instanceType"] {
3733 case string(InstanceTypeJobStatus):
3734 var jsed JobStatusEventDetails
3735 err := json.Unmarshal(body, &jsed)
3736 return jsed, err
3737 default:
3738 var esd EventSpecificDetails
3739 err := json.Unmarshal(body, &esd)
3740 return esd, err
3741 }
3742 }
3743 func unmarshalBasicEventSpecificDetailsArray(body []byte) ([]BasicEventSpecificDetails, error) {
3744 var rawMessages []*json.RawMessage
3745 err := json.Unmarshal(body, &rawMessages)
3746 if err != nil {
3747 return nil, err
3748 }
3749
3750 esdArray := make([]BasicEventSpecificDetails, len(rawMessages))
3751
3752 for index, rawMessage := range rawMessages {
3753 esd, err := unmarshalBasicEventSpecificDetails(*rawMessage)
3754 if err != nil {
3755 return nil, err
3756 }
3757 esdArray[index] = esd
3758 }
3759 return esdArray, nil
3760 }
3761
3762
3763 func (esd EventSpecificDetails) MarshalJSON() ([]byte, error) {
3764 esd.InstanceType = InstanceTypeEventSpecificDetails
3765 objectMap := make(map[string]interface{})
3766 if esd.InstanceType != "" {
3767 objectMap["instanceType"] = esd.InstanceType
3768 }
3769 return json.Marshal(objectMap)
3770 }
3771
3772
3773 func (esd EventSpecificDetails) AsJobStatusEventDetails() (*JobStatusEventDetails, bool) {
3774 return nil, false
3775 }
3776
3777
3778 func (esd EventSpecificDetails) AsEventSpecificDetails() (*EventSpecificDetails, bool) {
3779 return &esd, true
3780 }
3781
3782
3783 func (esd EventSpecificDetails) AsBasicEventSpecificDetails() (BasicEventSpecificDetails, bool) {
3784 return &esd, true
3785 }
3786
3787
3788 type ExportJobDetails struct {
3789
3790 BlobURI *string `json:"blobUri,omitempty"`
3791
3792 SasToken *string `json:"sasToken,omitempty"`
3793
3794 AffectedObjectDetails map[string]*string `json:"affectedObjectDetails"`
3795
3796 InstanceType InstanceTypeBasicJobDetails `json:"instanceType,omitempty"`
3797 }
3798
3799
3800 func (ejd ExportJobDetails) MarshalJSON() ([]byte, error) {
3801 ejd.InstanceType = InstanceTypeExportJobDetails
3802 objectMap := make(map[string]interface{})
3803 if ejd.BlobURI != nil {
3804 objectMap["blobUri"] = ejd.BlobURI
3805 }
3806 if ejd.SasToken != nil {
3807 objectMap["sasToken"] = ejd.SasToken
3808 }
3809 if ejd.AffectedObjectDetails != nil {
3810 objectMap["affectedObjectDetails"] = ejd.AffectedObjectDetails
3811 }
3812 if ejd.InstanceType != "" {
3813 objectMap["instanceType"] = ejd.InstanceType
3814 }
3815 return json.Marshal(objectMap)
3816 }
3817
3818
3819 func (ejd ExportJobDetails) AsAsrJobDetails() (*AsrJobDetails, bool) {
3820 return nil, false
3821 }
3822
3823
3824 func (ejd ExportJobDetails) AsExportJobDetails() (*ExportJobDetails, bool) {
3825 return &ejd, true
3826 }
3827
3828
3829 func (ejd ExportJobDetails) AsFailoverJobDetails() (*FailoverJobDetails, bool) {
3830 return nil, false
3831 }
3832
3833
3834 func (ejd ExportJobDetails) AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool) {
3835 return nil, false
3836 }
3837
3838
3839 func (ejd ExportJobDetails) AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool) {
3840 return nil, false
3841 }
3842
3843
3844 func (ejd ExportJobDetails) AsJobDetails() (*JobDetails, bool) {
3845 return nil, false
3846 }
3847
3848
3849 func (ejd ExportJobDetails) AsBasicJobDetails() (BasicJobDetails, bool) {
3850 return &ejd, true
3851 }
3852
3853
3854 type Fabric struct {
3855 autorest.Response `json:"-"`
3856
3857 Properties *FabricProperties `json:"properties,omitempty"`
3858
3859 ID *string `json:"id,omitempty"`
3860
3861 Name *string `json:"name,omitempty"`
3862
3863 Type *string `json:"type,omitempty"`
3864
3865 Location *string `json:"location,omitempty"`
3866 }
3867
3868
3869 func (f Fabric) MarshalJSON() ([]byte, error) {
3870 objectMap := make(map[string]interface{})
3871 if f.Properties != nil {
3872 objectMap["properties"] = f.Properties
3873 }
3874 if f.Location != nil {
3875 objectMap["location"] = f.Location
3876 }
3877 return json.Marshal(objectMap)
3878 }
3879
3880
3881 type FabricCollection struct {
3882 autorest.Response `json:"-"`
3883
3884 Value *[]Fabric `json:"value,omitempty"`
3885
3886 NextLink *string `json:"nextLink,omitempty"`
3887 }
3888
3889
3890 type FabricCollectionIterator struct {
3891 i int
3892 page FabricCollectionPage
3893 }
3894
3895
3896
3897 func (iter *FabricCollectionIterator) NextWithContext(ctx context.Context) (err error) {
3898 if tracing.IsEnabled() {
3899 ctx = tracing.StartSpan(ctx, fqdn+"/FabricCollectionIterator.NextWithContext")
3900 defer func() {
3901 sc := -1
3902 if iter.Response().Response.Response != nil {
3903 sc = iter.Response().Response.Response.StatusCode
3904 }
3905 tracing.EndSpan(ctx, sc, err)
3906 }()
3907 }
3908 iter.i++
3909 if iter.i < len(iter.page.Values()) {
3910 return nil
3911 }
3912 err = iter.page.NextWithContext(ctx)
3913 if err != nil {
3914 iter.i--
3915 return err
3916 }
3917 iter.i = 0
3918 return nil
3919 }
3920
3921
3922
3923
3924 func (iter *FabricCollectionIterator) Next() error {
3925 return iter.NextWithContext(context.Background())
3926 }
3927
3928
3929 func (iter FabricCollectionIterator) NotDone() bool {
3930 return iter.page.NotDone() && iter.i < len(iter.page.Values())
3931 }
3932
3933
3934 func (iter FabricCollectionIterator) Response() FabricCollection {
3935 return iter.page.Response()
3936 }
3937
3938
3939
3940 func (iter FabricCollectionIterator) Value() Fabric {
3941 if !iter.page.NotDone() {
3942 return Fabric{}
3943 }
3944 return iter.page.Values()[iter.i]
3945 }
3946
3947
3948 func NewFabricCollectionIterator(page FabricCollectionPage) FabricCollectionIterator {
3949 return FabricCollectionIterator{page: page}
3950 }
3951
3952
3953 func (fc FabricCollection) IsEmpty() bool {
3954 return fc.Value == nil || len(*fc.Value) == 0
3955 }
3956
3957
3958 func (fc FabricCollection) hasNextLink() bool {
3959 return fc.NextLink != nil && len(*fc.NextLink) != 0
3960 }
3961
3962
3963
3964 func (fc FabricCollection) fabricCollectionPreparer(ctx context.Context) (*http.Request, error) {
3965 if !fc.hasNextLink() {
3966 return nil, nil
3967 }
3968 return autorest.Prepare((&http.Request{}).WithContext(ctx),
3969 autorest.AsJSON(),
3970 autorest.AsGet(),
3971 autorest.WithBaseURL(to.String(fc.NextLink)))
3972 }
3973
3974
3975 type FabricCollectionPage struct {
3976 fn func(context.Context, FabricCollection) (FabricCollection, error)
3977 fc FabricCollection
3978 }
3979
3980
3981
3982 func (page *FabricCollectionPage) NextWithContext(ctx context.Context) (err error) {
3983 if tracing.IsEnabled() {
3984 ctx = tracing.StartSpan(ctx, fqdn+"/FabricCollectionPage.NextWithContext")
3985 defer func() {
3986 sc := -1
3987 if page.Response().Response.Response != nil {
3988 sc = page.Response().Response.Response.StatusCode
3989 }
3990 tracing.EndSpan(ctx, sc, err)
3991 }()
3992 }
3993 for {
3994 next, err := page.fn(ctx, page.fc)
3995 if err != nil {
3996 return err
3997 }
3998 page.fc = next
3999 if !next.hasNextLink() || !next.IsEmpty() {
4000 break
4001 }
4002 }
4003 return nil
4004 }
4005
4006
4007
4008
4009 func (page *FabricCollectionPage) Next() error {
4010 return page.NextWithContext(context.Background())
4011 }
4012
4013
4014 func (page FabricCollectionPage) NotDone() bool {
4015 return !page.fc.IsEmpty()
4016 }
4017
4018
4019 func (page FabricCollectionPage) Response() FabricCollection {
4020 return page.fc
4021 }
4022
4023
4024 func (page FabricCollectionPage) Values() []Fabric {
4025 if page.fc.IsEmpty() {
4026 return nil
4027 }
4028 return *page.fc.Value
4029 }
4030
4031
4032 func NewFabricCollectionPage(cur FabricCollection, getNextPage func(context.Context, FabricCollection) (FabricCollection, error)) FabricCollectionPage {
4033 return FabricCollectionPage{
4034 fn: getNextPage,
4035 fc: cur,
4036 }
4037 }
4038
4039
4040 type FabricCreationInput struct {
4041
4042 Properties *FabricCreationInputProperties `json:"properties,omitempty"`
4043 }
4044
4045
4046 type FabricCreationInputProperties struct {
4047
4048 CustomDetails BasicFabricSpecificCreationInput `json:"customDetails,omitempty"`
4049 }
4050
4051
4052 func (fcip *FabricCreationInputProperties) UnmarshalJSON(body []byte) error {
4053 var m map[string]*json.RawMessage
4054 err := json.Unmarshal(body, &m)
4055 if err != nil {
4056 return err
4057 }
4058 for k, v := range m {
4059 switch k {
4060 case "customDetails":
4061 if v != nil {
4062 customDetails, err := unmarshalBasicFabricSpecificCreationInput(*v)
4063 if err != nil {
4064 return err
4065 }
4066 fcip.CustomDetails = customDetails
4067 }
4068 }
4069 }
4070
4071 return nil
4072 }
4073
4074
4075 type FabricProperties struct {
4076
4077 FriendlyName *string `json:"friendlyName,omitempty"`
4078
4079 EncryptionDetails *EncryptionDetails `json:"encryptionDetails,omitempty"`
4080
4081 RolloverEncryptionDetails *EncryptionDetails `json:"rolloverEncryptionDetails,omitempty"`
4082
4083 InternalIdentifier *string `json:"internalIdentifier,omitempty"`
4084
4085 BcdrState *string `json:"bcdrState,omitempty"`
4086
4087 CustomDetails BasicFabricSpecificDetails `json:"customDetails,omitempty"`
4088
4089 HealthErrorDetails *[]HealthError `json:"healthErrorDetails,omitempty"`
4090
4091 Health *string `json:"health,omitempty"`
4092 }
4093
4094
4095 func (fp *FabricProperties) UnmarshalJSON(body []byte) error {
4096 var m map[string]*json.RawMessage
4097 err := json.Unmarshal(body, &m)
4098 if err != nil {
4099 return err
4100 }
4101 for k, v := range m {
4102 switch k {
4103 case "friendlyName":
4104 if v != nil {
4105 var friendlyName string
4106 err = json.Unmarshal(*v, &friendlyName)
4107 if err != nil {
4108 return err
4109 }
4110 fp.FriendlyName = &friendlyName
4111 }
4112 case "encryptionDetails":
4113 if v != nil {
4114 var encryptionDetails EncryptionDetails
4115 err = json.Unmarshal(*v, &encryptionDetails)
4116 if err != nil {
4117 return err
4118 }
4119 fp.EncryptionDetails = &encryptionDetails
4120 }
4121 case "rolloverEncryptionDetails":
4122 if v != nil {
4123 var rolloverEncryptionDetails EncryptionDetails
4124 err = json.Unmarshal(*v, &rolloverEncryptionDetails)
4125 if err != nil {
4126 return err
4127 }
4128 fp.RolloverEncryptionDetails = &rolloverEncryptionDetails
4129 }
4130 case "internalIdentifier":
4131 if v != nil {
4132 var internalIdentifier string
4133 err = json.Unmarshal(*v, &internalIdentifier)
4134 if err != nil {
4135 return err
4136 }
4137 fp.InternalIdentifier = &internalIdentifier
4138 }
4139 case "bcdrState":
4140 if v != nil {
4141 var bcdrState string
4142 err = json.Unmarshal(*v, &bcdrState)
4143 if err != nil {
4144 return err
4145 }
4146 fp.BcdrState = &bcdrState
4147 }
4148 case "customDetails":
4149 if v != nil {
4150 customDetails, err := unmarshalBasicFabricSpecificDetails(*v)
4151 if err != nil {
4152 return err
4153 }
4154 fp.CustomDetails = customDetails
4155 }
4156 case "healthErrorDetails":
4157 if v != nil {
4158 var healthErrorDetails []HealthError
4159 err = json.Unmarshal(*v, &healthErrorDetails)
4160 if err != nil {
4161 return err
4162 }
4163 fp.HealthErrorDetails = &healthErrorDetails
4164 }
4165 case "health":
4166 if v != nil {
4167 var health string
4168 err = json.Unmarshal(*v, &health)
4169 if err != nil {
4170 return err
4171 }
4172 fp.Health = &health
4173 }
4174 }
4175 }
4176
4177 return nil
4178 }
4179
4180
4181 type FabricReplicationGroupTaskDetails struct {
4182
4183 SkippedReason *string `json:"skippedReason,omitempty"`
4184
4185 SkippedReasonString *string `json:"skippedReasonString,omitempty"`
4186
4187 JobTask *JobEntity `json:"jobTask,omitempty"`
4188
4189 InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"`
4190 }
4191
4192
4193 func (frgtd FabricReplicationGroupTaskDetails) MarshalJSON() ([]byte, error) {
4194 frgtd.InstanceType = InstanceTypeFabricReplicationGroupTaskDetails
4195 objectMap := make(map[string]interface{})
4196 if frgtd.SkippedReason != nil {
4197 objectMap["skippedReason"] = frgtd.SkippedReason
4198 }
4199 if frgtd.SkippedReasonString != nil {
4200 objectMap["skippedReasonString"] = frgtd.SkippedReasonString
4201 }
4202 if frgtd.JobTask != nil {
4203 objectMap["jobTask"] = frgtd.JobTask
4204 }
4205 if frgtd.InstanceType != "" {
4206 objectMap["instanceType"] = frgtd.InstanceType
4207 }
4208 return json.Marshal(objectMap)
4209 }
4210
4211
4212 func (frgtd FabricReplicationGroupTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) {
4213 return nil, false
4214 }
4215
4216
4217 func (frgtd FabricReplicationGroupTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) {
4218 return nil, false
4219 }
4220
4221
4222 func (frgtd FabricReplicationGroupTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) {
4223 return &frgtd, true
4224 }
4225
4226
4227 func (frgtd FabricReplicationGroupTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) {
4228 return nil, false
4229 }
4230
4231
4232 func (frgtd FabricReplicationGroupTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) {
4233 return nil, false
4234 }
4235
4236
4237 func (frgtd FabricReplicationGroupTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) {
4238 return nil, false
4239 }
4240
4241
4242 func (frgtd FabricReplicationGroupTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) {
4243 return nil, false
4244 }
4245
4246
4247 func (frgtd FabricReplicationGroupTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) {
4248 return nil, false
4249 }
4250
4251
4252 func (frgtd FabricReplicationGroupTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) {
4253 return nil, false
4254 }
4255
4256
4257 func (frgtd FabricReplicationGroupTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) {
4258 return &frgtd, true
4259 }
4260
4261
4262 type BasicFabricSpecificCreateNetworkMappingInput interface {
4263 AsAzureToAzureCreateNetworkMappingInput() (*AzureToAzureCreateNetworkMappingInput, bool)
4264 AsVmmToAzureCreateNetworkMappingInput() (*VmmToAzureCreateNetworkMappingInput, bool)
4265 AsVmmToVmmCreateNetworkMappingInput() (*VmmToVmmCreateNetworkMappingInput, bool)
4266 AsFabricSpecificCreateNetworkMappingInput() (*FabricSpecificCreateNetworkMappingInput, bool)
4267 }
4268
4269
4270 type FabricSpecificCreateNetworkMappingInput struct {
4271
4272 InstanceType InstanceTypeBasicFabricSpecificCreateNetworkMappingInput `json:"instanceType,omitempty"`
4273 }
4274
4275 func unmarshalBasicFabricSpecificCreateNetworkMappingInput(body []byte) (BasicFabricSpecificCreateNetworkMappingInput, error) {
4276 var m map[string]interface{}
4277 err := json.Unmarshal(body, &m)
4278 if err != nil {
4279 return nil, err
4280 }
4281
4282 switch m["instanceType"] {
4283 case string(InstanceTypeAzureToAzure):
4284 var atacnmi AzureToAzureCreateNetworkMappingInput
4285 err := json.Unmarshal(body, &atacnmi)
4286 return atacnmi, err
4287 case string(InstanceTypeVmmToAzure):
4288 var vtacnmi VmmToAzureCreateNetworkMappingInput
4289 err := json.Unmarshal(body, &vtacnmi)
4290 return vtacnmi, err
4291 case string(InstanceTypeVmmToVmm):
4292 var vtvcnmi VmmToVmmCreateNetworkMappingInput
4293 err := json.Unmarshal(body, &vtvcnmi)
4294 return vtvcnmi, err
4295 default:
4296 var fscnmi FabricSpecificCreateNetworkMappingInput
4297 err := json.Unmarshal(body, &fscnmi)
4298 return fscnmi, err
4299 }
4300 }
4301 func unmarshalBasicFabricSpecificCreateNetworkMappingInputArray(body []byte) ([]BasicFabricSpecificCreateNetworkMappingInput, error) {
4302 var rawMessages []*json.RawMessage
4303 err := json.Unmarshal(body, &rawMessages)
4304 if err != nil {
4305 return nil, err
4306 }
4307
4308 fscnmiArray := make([]BasicFabricSpecificCreateNetworkMappingInput, len(rawMessages))
4309
4310 for index, rawMessage := range rawMessages {
4311 fscnmi, err := unmarshalBasicFabricSpecificCreateNetworkMappingInput(*rawMessage)
4312 if err != nil {
4313 return nil, err
4314 }
4315 fscnmiArray[index] = fscnmi
4316 }
4317 return fscnmiArray, nil
4318 }
4319
4320
4321 func (fscnmi FabricSpecificCreateNetworkMappingInput) MarshalJSON() ([]byte, error) {
4322 fscnmi.InstanceType = InstanceTypeFabricSpecificCreateNetworkMappingInput
4323 objectMap := make(map[string]interface{})
4324 if fscnmi.InstanceType != "" {
4325 objectMap["instanceType"] = fscnmi.InstanceType
4326 }
4327 return json.Marshal(objectMap)
4328 }
4329
4330
4331 func (fscnmi FabricSpecificCreateNetworkMappingInput) AsAzureToAzureCreateNetworkMappingInput() (*AzureToAzureCreateNetworkMappingInput, bool) {
4332 return nil, false
4333 }
4334
4335
4336 func (fscnmi FabricSpecificCreateNetworkMappingInput) AsVmmToAzureCreateNetworkMappingInput() (*VmmToAzureCreateNetworkMappingInput, bool) {
4337 return nil, false
4338 }
4339
4340
4341 func (fscnmi FabricSpecificCreateNetworkMappingInput) AsVmmToVmmCreateNetworkMappingInput() (*VmmToVmmCreateNetworkMappingInput, bool) {
4342 return nil, false
4343 }
4344
4345
4346 func (fscnmi FabricSpecificCreateNetworkMappingInput) AsFabricSpecificCreateNetworkMappingInput() (*FabricSpecificCreateNetworkMappingInput, bool) {
4347 return &fscnmi, true
4348 }
4349
4350
4351 func (fscnmi FabricSpecificCreateNetworkMappingInput) AsBasicFabricSpecificCreateNetworkMappingInput() (BasicFabricSpecificCreateNetworkMappingInput, bool) {
4352 return &fscnmi, true
4353 }
4354
4355
4356 type BasicFabricSpecificCreationInput interface {
4357 AsAzureFabricCreationInput() (*AzureFabricCreationInput, bool)
4358 AsVMwareV2FabricCreationInput() (*VMwareV2FabricCreationInput, bool)
4359 AsFabricSpecificCreationInput() (*FabricSpecificCreationInput, bool)
4360 }
4361
4362
4363 type FabricSpecificCreationInput struct {
4364
4365 InstanceType InstanceTypeBasicFabricSpecificCreationInput `json:"instanceType,omitempty"`
4366 }
4367
4368 func unmarshalBasicFabricSpecificCreationInput(body []byte) (BasicFabricSpecificCreationInput, error) {
4369 var m map[string]interface{}
4370 err := json.Unmarshal(body, &m)
4371 if err != nil {
4372 return nil, err
4373 }
4374
4375 switch m["instanceType"] {
4376 case string(InstanceTypeAzure):
4377 var afci AzureFabricCreationInput
4378 err := json.Unmarshal(body, &afci)
4379 return afci, err
4380 case string(InstanceTypeVMwareV2):
4381 var vmvfci VMwareV2FabricCreationInput
4382 err := json.Unmarshal(body, &vmvfci)
4383 return vmvfci, err
4384 default:
4385 var fsci FabricSpecificCreationInput
4386 err := json.Unmarshal(body, &fsci)
4387 return fsci, err
4388 }
4389 }
4390 func unmarshalBasicFabricSpecificCreationInputArray(body []byte) ([]BasicFabricSpecificCreationInput, error) {
4391 var rawMessages []*json.RawMessage
4392 err := json.Unmarshal(body, &rawMessages)
4393 if err != nil {
4394 return nil, err
4395 }
4396
4397 fsciArray := make([]BasicFabricSpecificCreationInput, len(rawMessages))
4398
4399 for index, rawMessage := range rawMessages {
4400 fsci, err := unmarshalBasicFabricSpecificCreationInput(*rawMessage)
4401 if err != nil {
4402 return nil, err
4403 }
4404 fsciArray[index] = fsci
4405 }
4406 return fsciArray, nil
4407 }
4408
4409
4410 func (fsci FabricSpecificCreationInput) MarshalJSON() ([]byte, error) {
4411 fsci.InstanceType = InstanceTypeFabricSpecificCreationInput
4412 objectMap := make(map[string]interface{})
4413 if fsci.InstanceType != "" {
4414 objectMap["instanceType"] = fsci.InstanceType
4415 }
4416 return json.Marshal(objectMap)
4417 }
4418
4419
4420 func (fsci FabricSpecificCreationInput) AsAzureFabricCreationInput() (*AzureFabricCreationInput, bool) {
4421 return nil, false
4422 }
4423
4424
4425 func (fsci FabricSpecificCreationInput) AsVMwareV2FabricCreationInput() (*VMwareV2FabricCreationInput, bool) {
4426 return nil, false
4427 }
4428
4429
4430 func (fsci FabricSpecificCreationInput) AsFabricSpecificCreationInput() (*FabricSpecificCreationInput, bool) {
4431 return &fsci, true
4432 }
4433
4434
4435 func (fsci FabricSpecificCreationInput) AsBasicFabricSpecificCreationInput() (BasicFabricSpecificCreationInput, bool) {
4436 return &fsci, true
4437 }
4438
4439
4440 type BasicFabricSpecificDetails interface {
4441 AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool)
4442 AsHyperVSiteDetails() (*HyperVSiteDetails, bool)
4443 AsVmmDetails() (*VmmDetails, bool)
4444 AsVMwareDetails() (*VMwareDetails, bool)
4445 AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool)
4446 AsFabricSpecificDetails() (*FabricSpecificDetails, bool)
4447 }
4448
4449
4450 type FabricSpecificDetails struct {
4451
4452 InstanceType InstanceTypeBasicFabricSpecificDetails `json:"instanceType,omitempty"`
4453 }
4454
4455 func unmarshalBasicFabricSpecificDetails(body []byte) (BasicFabricSpecificDetails, error) {
4456 var m map[string]interface{}
4457 err := json.Unmarshal(body, &m)
4458 if err != nil {
4459 return nil, err
4460 }
4461
4462 switch m["instanceType"] {
4463 case string(InstanceTypeBasicFabricSpecificDetailsInstanceTypeAzure):
4464 var afsd AzureFabricSpecificDetails
4465 err := json.Unmarshal(body, &afsd)
4466 return afsd, err
4467 case string(InstanceTypeBasicFabricSpecificDetailsInstanceTypeHyperVSite):
4468 var hvsd HyperVSiteDetails
4469 err := json.Unmarshal(body, &hvsd)
4470 return hvsd, err
4471 case string(InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMM):
4472 var vd VmmDetails
4473 err := json.Unmarshal(body, &vd)
4474 return vd, err
4475 case string(InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMware):
4476 var vmd VMwareDetails
4477 err := json.Unmarshal(body, &vmd)
4478 return vmd, err
4479 case string(InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMwareV2):
4480 var vmvfsd VMwareV2FabricSpecificDetails
4481 err := json.Unmarshal(body, &vmvfsd)
4482 return vmvfsd, err
4483 default:
4484 var fsd FabricSpecificDetails
4485 err := json.Unmarshal(body, &fsd)
4486 return fsd, err
4487 }
4488 }
4489 func unmarshalBasicFabricSpecificDetailsArray(body []byte) ([]BasicFabricSpecificDetails, error) {
4490 var rawMessages []*json.RawMessage
4491 err := json.Unmarshal(body, &rawMessages)
4492 if err != nil {
4493 return nil, err
4494 }
4495
4496 fsdArray := make([]BasicFabricSpecificDetails, len(rawMessages))
4497
4498 for index, rawMessage := range rawMessages {
4499 fsd, err := unmarshalBasicFabricSpecificDetails(*rawMessage)
4500 if err != nil {
4501 return nil, err
4502 }
4503 fsdArray[index] = fsd
4504 }
4505 return fsdArray, nil
4506 }
4507
4508
4509 func (fsd FabricSpecificDetails) MarshalJSON() ([]byte, error) {
4510 fsd.InstanceType = InstanceTypeBasicFabricSpecificDetailsInstanceTypeFabricSpecificDetails
4511 objectMap := make(map[string]interface{})
4512 if fsd.InstanceType != "" {
4513 objectMap["instanceType"] = fsd.InstanceType
4514 }
4515 return json.Marshal(objectMap)
4516 }
4517
4518
4519 func (fsd FabricSpecificDetails) AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool) {
4520 return nil, false
4521 }
4522
4523
4524 func (fsd FabricSpecificDetails) AsHyperVSiteDetails() (*HyperVSiteDetails, bool) {
4525 return nil, false
4526 }
4527
4528
4529 func (fsd FabricSpecificDetails) AsVmmDetails() (*VmmDetails, bool) {
4530 return nil, false
4531 }
4532
4533
4534 func (fsd FabricSpecificDetails) AsVMwareDetails() (*VMwareDetails, bool) {
4535 return nil, false
4536 }
4537
4538
4539 func (fsd FabricSpecificDetails) AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool) {
4540 return nil, false
4541 }
4542
4543
4544 func (fsd FabricSpecificDetails) AsFabricSpecificDetails() (*FabricSpecificDetails, bool) {
4545 return &fsd, true
4546 }
4547
4548
4549 func (fsd FabricSpecificDetails) AsBasicFabricSpecificDetails() (BasicFabricSpecificDetails, bool) {
4550 return &fsd, true
4551 }
4552
4553
4554 type BasicFabricSpecificUpdateNetworkMappingInput interface {
4555 AsAzureToAzureUpdateNetworkMappingInput() (*AzureToAzureUpdateNetworkMappingInput, bool)
4556 AsVmmToAzureUpdateNetworkMappingInput() (*VmmToAzureUpdateNetworkMappingInput, bool)
4557 AsVmmToVmmUpdateNetworkMappingInput() (*VmmToVmmUpdateNetworkMappingInput, bool)
4558 AsFabricSpecificUpdateNetworkMappingInput() (*FabricSpecificUpdateNetworkMappingInput, bool)
4559 }
4560
4561
4562 type FabricSpecificUpdateNetworkMappingInput struct {
4563
4564 InstanceType InstanceTypeBasicFabricSpecificUpdateNetworkMappingInput `json:"instanceType,omitempty"`
4565 }
4566
4567 func unmarshalBasicFabricSpecificUpdateNetworkMappingInput(body []byte) (BasicFabricSpecificUpdateNetworkMappingInput, error) {
4568 var m map[string]interface{}
4569 err := json.Unmarshal(body, &m)
4570 if err != nil {
4571 return nil, err
4572 }
4573
4574 switch m["instanceType"] {
4575 case string(InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeAzureToAzure):
4576 var ataunmi AzureToAzureUpdateNetworkMappingInput
4577 err := json.Unmarshal(body, &ataunmi)
4578 return ataunmi, err
4579 case string(InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToAzure):
4580 var vtaunmi VmmToAzureUpdateNetworkMappingInput
4581 err := json.Unmarshal(body, &vtaunmi)
4582 return vtaunmi, err
4583 case string(InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToVmm):
4584 var vtvunmi VmmToVmmUpdateNetworkMappingInput
4585 err := json.Unmarshal(body, &vtvunmi)
4586 return vtvunmi, err
4587 default:
4588 var fsunmi FabricSpecificUpdateNetworkMappingInput
4589 err := json.Unmarshal(body, &fsunmi)
4590 return fsunmi, err
4591 }
4592 }
4593 func unmarshalBasicFabricSpecificUpdateNetworkMappingInputArray(body []byte) ([]BasicFabricSpecificUpdateNetworkMappingInput, error) {
4594 var rawMessages []*json.RawMessage
4595 err := json.Unmarshal(body, &rawMessages)
4596 if err != nil {
4597 return nil, err
4598 }
4599
4600 fsunmiArray := make([]BasicFabricSpecificUpdateNetworkMappingInput, len(rawMessages))
4601
4602 for index, rawMessage := range rawMessages {
4603 fsunmi, err := unmarshalBasicFabricSpecificUpdateNetworkMappingInput(*rawMessage)
4604 if err != nil {
4605 return nil, err
4606 }
4607 fsunmiArray[index] = fsunmi
4608 }
4609 return fsunmiArray, nil
4610 }
4611
4612
4613 func (fsunmi FabricSpecificUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) {
4614 fsunmi.InstanceType = InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeFabricSpecificUpdateNetworkMappingInput
4615 objectMap := make(map[string]interface{})
4616 if fsunmi.InstanceType != "" {
4617 objectMap["instanceType"] = fsunmi.InstanceType
4618 }
4619 return json.Marshal(objectMap)
4620 }
4621
4622
4623 func (fsunmi FabricSpecificUpdateNetworkMappingInput) AsAzureToAzureUpdateNetworkMappingInput() (*AzureToAzureUpdateNetworkMappingInput, bool) {
4624 return nil, false
4625 }
4626
4627
4628 func (fsunmi FabricSpecificUpdateNetworkMappingInput) AsVmmToAzureUpdateNetworkMappingInput() (*VmmToAzureUpdateNetworkMappingInput, bool) {
4629 return nil, false
4630 }
4631
4632
4633 func (fsunmi FabricSpecificUpdateNetworkMappingInput) AsVmmToVmmUpdateNetworkMappingInput() (*VmmToVmmUpdateNetworkMappingInput, bool) {
4634 return nil, false
4635 }
4636
4637
4638 func (fsunmi FabricSpecificUpdateNetworkMappingInput) AsFabricSpecificUpdateNetworkMappingInput() (*FabricSpecificUpdateNetworkMappingInput, bool) {
4639 return &fsunmi, true
4640 }
4641
4642
4643 func (fsunmi FabricSpecificUpdateNetworkMappingInput) AsBasicFabricSpecificUpdateNetworkMappingInput() (BasicFabricSpecificUpdateNetworkMappingInput, bool) {
4644 return &fsunmi, true
4645 }
4646
4647
4648 type FailoverJobDetails struct {
4649
4650 ProtectedItemDetails *[]FailoverReplicationProtectedItemDetails `json:"protectedItemDetails,omitempty"`
4651
4652 AffectedObjectDetails map[string]*string `json:"affectedObjectDetails"`
4653
4654 InstanceType InstanceTypeBasicJobDetails `json:"instanceType,omitempty"`
4655 }
4656
4657
4658 func (fjd FailoverJobDetails) MarshalJSON() ([]byte, error) {
4659 fjd.InstanceType = InstanceTypeFailoverJobDetails
4660 objectMap := make(map[string]interface{})
4661 if fjd.ProtectedItemDetails != nil {
4662 objectMap["protectedItemDetails"] = fjd.ProtectedItemDetails
4663 }
4664 if fjd.AffectedObjectDetails != nil {
4665 objectMap["affectedObjectDetails"] = fjd.AffectedObjectDetails
4666 }
4667 if fjd.InstanceType != "" {
4668 objectMap["instanceType"] = fjd.InstanceType
4669 }
4670 return json.Marshal(objectMap)
4671 }
4672
4673
4674 func (fjd FailoverJobDetails) AsAsrJobDetails() (*AsrJobDetails, bool) {
4675 return nil, false
4676 }
4677
4678
4679 func (fjd FailoverJobDetails) AsExportJobDetails() (*ExportJobDetails, bool) {
4680 return nil, false
4681 }
4682
4683
4684 func (fjd FailoverJobDetails) AsFailoverJobDetails() (*FailoverJobDetails, bool) {
4685 return &fjd, true
4686 }
4687
4688
4689 func (fjd FailoverJobDetails) AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool) {
4690 return nil, false
4691 }
4692
4693
4694 func (fjd FailoverJobDetails) AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool) {
4695 return nil, false
4696 }
4697
4698
4699 func (fjd FailoverJobDetails) AsJobDetails() (*JobDetails, bool) {
4700 return nil, false
4701 }
4702
4703
4704 func (fjd FailoverJobDetails) AsBasicJobDetails() (BasicJobDetails, bool) {
4705 return &fjd, true
4706 }
4707
4708
4709 type FailoverProcessServerRequest struct {
4710
4711 Properties *FailoverProcessServerRequestProperties `json:"properties,omitempty"`
4712 }
4713
4714
4715 type FailoverProcessServerRequestProperties struct {
4716
4717 ContainerName *string `json:"containerName,omitempty"`
4718
4719 SourceProcessServerID *string `json:"sourceProcessServerId,omitempty"`
4720
4721 TargetProcessServerID *string `json:"targetProcessServerId,omitempty"`
4722
4723 VmsToMigrate *[]string `json:"vmsToMigrate,omitempty"`
4724
4725 UpdateType *string `json:"updateType,omitempty"`
4726 }
4727
4728
4729 type FailoverReplicationProtectedItemDetails struct {
4730
4731 Name *string `json:"name,omitempty"`
4732
4733 FriendlyName *string `json:"friendlyName,omitempty"`
4734
4735 TestVMName *string `json:"testVmName,omitempty"`
4736
4737 TestVMFriendlyName *string `json:"testVmFriendlyName,omitempty"`
4738
4739 NetworkConnectionStatus *string `json:"networkConnectionStatus,omitempty"`
4740
4741 NetworkFriendlyName *string `json:"networkFriendlyName,omitempty"`
4742
4743 Subnet *string `json:"subnet,omitempty"`
4744
4745 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
4746
4747 RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"`
4748 }
4749
4750
4751
4752 type BasicGroupTaskDetails interface {
4753 AsInlineWorkflowTaskDetails() (*InlineWorkflowTaskDetails, bool)
4754 AsRecoveryPlanGroupTaskDetails() (*RecoveryPlanGroupTaskDetails, bool)
4755 AsRecoveryPlanShutdownGroupTaskDetails() (*RecoveryPlanShutdownGroupTaskDetails, bool)
4756 AsGroupTaskDetails() (*GroupTaskDetails, bool)
4757 }
4758
4759
4760
4761 type GroupTaskDetails struct {
4762
4763 ChildTasks *[]ASRTask `json:"childTasks,omitempty"`
4764
4765 InstanceType InstanceTypeBasicGroupTaskDetails `json:"instanceType,omitempty"`
4766 }
4767
4768 func unmarshalBasicGroupTaskDetails(body []byte) (BasicGroupTaskDetails, error) {
4769 var m map[string]interface{}
4770 err := json.Unmarshal(body, &m)
4771 if err != nil {
4772 return nil, err
4773 }
4774
4775 switch m["instanceType"] {
4776 case string(InstanceTypeInlineWorkflowTaskDetails):
4777 var iwtd InlineWorkflowTaskDetails
4778 err := json.Unmarshal(body, &iwtd)
4779 return iwtd, err
4780 case string(InstanceTypeRecoveryPlanGroupTaskDetails):
4781 var rpgtd RecoveryPlanGroupTaskDetails
4782 err := json.Unmarshal(body, &rpgtd)
4783 return rpgtd, err
4784 case string(InstanceTypeRecoveryPlanShutdownGroupTaskDetails):
4785 var rpsgtd RecoveryPlanShutdownGroupTaskDetails
4786 err := json.Unmarshal(body, &rpsgtd)
4787 return rpsgtd, err
4788 default:
4789 var gtd GroupTaskDetails
4790 err := json.Unmarshal(body, >d)
4791 return gtd, err
4792 }
4793 }
4794 func unmarshalBasicGroupTaskDetailsArray(body []byte) ([]BasicGroupTaskDetails, error) {
4795 var rawMessages []*json.RawMessage
4796 err := json.Unmarshal(body, &rawMessages)
4797 if err != nil {
4798 return nil, err
4799 }
4800
4801 gtdArray := make([]BasicGroupTaskDetails, len(rawMessages))
4802
4803 for index, rawMessage := range rawMessages {
4804 gtd, err := unmarshalBasicGroupTaskDetails(*rawMessage)
4805 if err != nil {
4806 return nil, err
4807 }
4808 gtdArray[index] = gtd
4809 }
4810 return gtdArray, nil
4811 }
4812
4813
4814 func (gtd GroupTaskDetails) MarshalJSON() ([]byte, error) {
4815 gtd.InstanceType = InstanceTypeGroupTaskDetails
4816 objectMap := make(map[string]interface{})
4817 if gtd.ChildTasks != nil {
4818 objectMap["childTasks"] = gtd.ChildTasks
4819 }
4820 if gtd.InstanceType != "" {
4821 objectMap["instanceType"] = gtd.InstanceType
4822 }
4823 return json.Marshal(objectMap)
4824 }
4825
4826
4827 func (gtd GroupTaskDetails) AsInlineWorkflowTaskDetails() (*InlineWorkflowTaskDetails, bool) {
4828 return nil, false
4829 }
4830
4831
4832 func (gtd GroupTaskDetails) AsRecoveryPlanGroupTaskDetails() (*RecoveryPlanGroupTaskDetails, bool) {
4833 return nil, false
4834 }
4835
4836
4837 func (gtd GroupTaskDetails) AsRecoveryPlanShutdownGroupTaskDetails() (*RecoveryPlanShutdownGroupTaskDetails, bool) {
4838 return nil, false
4839 }
4840
4841
4842 func (gtd GroupTaskDetails) AsGroupTaskDetails() (*GroupTaskDetails, bool) {
4843 return >d, true
4844 }
4845
4846
4847 func (gtd GroupTaskDetails) AsBasicGroupTaskDetails() (BasicGroupTaskDetails, bool) {
4848 return >d, true
4849 }
4850
4851
4852 type HealthError struct {
4853
4854 InnerHealthErrors *[]InnerHealthError `json:"innerHealthErrors,omitempty"`
4855
4856 ErrorSource *string `json:"errorSource,omitempty"`
4857
4858 ErrorType *string `json:"errorType,omitempty"`
4859
4860 ErrorLevel *string `json:"errorLevel,omitempty"`
4861
4862 ErrorCategory *string `json:"errorCategory,omitempty"`
4863
4864 ErrorCode *string `json:"errorCode,omitempty"`
4865
4866 SummaryMessage *string `json:"summaryMessage,omitempty"`
4867
4868 ErrorMessage *string `json:"errorMessage,omitempty"`
4869
4870 PossibleCauses *string `json:"possibleCauses,omitempty"`
4871
4872 RecommendedAction *string `json:"recommendedAction,omitempty"`
4873
4874 CreationTimeUtc *date.Time `json:"creationTimeUtc,omitempty"`
4875
4876 RecoveryProviderErrorMessage *string `json:"recoveryProviderErrorMessage,omitempty"`
4877
4878 EntityID *string `json:"entityId,omitempty"`
4879 }
4880
4881
4882 type HealthErrorSummary struct {
4883
4884 SummaryCode *string `json:"summaryCode,omitempty"`
4885
4886 Category HealthErrorCategory `json:"category,omitempty"`
4887
4888 Severity Severity `json:"severity,omitempty"`
4889
4890 SummaryMessage *string `json:"summaryMessage,omitempty"`
4891
4892 AffectedResourceType *string `json:"affectedResourceType,omitempty"`
4893
4894 AffectedResourceSubtype *string `json:"affectedResourceSubtype,omitempty"`
4895
4896 AffectedResourceCorrelationIds *[]string `json:"affectedResourceCorrelationIds,omitempty"`
4897 }
4898
4899
4900 type HyperVReplica2012EventDetails struct {
4901
4902 ContainerName *string `json:"containerName,omitempty"`
4903
4904 FabricName *string `json:"fabricName,omitempty"`
4905
4906 RemoteContainerName *string `json:"remoteContainerName,omitempty"`
4907
4908 RemoteFabricName *string `json:"remoteFabricName,omitempty"`
4909
4910 InstanceType InstanceTypeBasicEventProviderSpecificDetails `json:"instanceType,omitempty"`
4911 }
4912
4913
4914 func (hvr2ed HyperVReplica2012EventDetails) MarshalJSON() ([]byte, error) {
4915 hvr2ed.InstanceType = InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012
4916 objectMap := make(map[string]interface{})
4917 if hvr2ed.ContainerName != nil {
4918 objectMap["containerName"] = hvr2ed.ContainerName
4919 }
4920 if hvr2ed.FabricName != nil {
4921 objectMap["fabricName"] = hvr2ed.FabricName
4922 }
4923 if hvr2ed.RemoteContainerName != nil {
4924 objectMap["remoteContainerName"] = hvr2ed.RemoteContainerName
4925 }
4926 if hvr2ed.RemoteFabricName != nil {
4927 objectMap["remoteFabricName"] = hvr2ed.RemoteFabricName
4928 }
4929 if hvr2ed.InstanceType != "" {
4930 objectMap["instanceType"] = hvr2ed.InstanceType
4931 }
4932 return json.Marshal(objectMap)
4933 }
4934
4935
4936 func (hvr2ed HyperVReplica2012EventDetails) AsA2AEventDetails() (*A2AEventDetails, bool) {
4937 return nil, false
4938 }
4939
4940
4941 func (hvr2ed HyperVReplica2012EventDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) {
4942 return &hvr2ed, true
4943 }
4944
4945
4946 func (hvr2ed HyperVReplica2012EventDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) {
4947 return nil, false
4948 }
4949
4950
4951 func (hvr2ed HyperVReplica2012EventDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) {
4952 return nil, false
4953 }
4954
4955
4956 func (hvr2ed HyperVReplica2012EventDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) {
4957 return nil, false
4958 }
4959
4960
4961 func (hvr2ed HyperVReplica2012EventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) {
4962 return nil, false
4963 }
4964
4965
4966 func (hvr2ed HyperVReplica2012EventDetails) AsVMwareCbtEventDetails() (*VMwareCbtEventDetails, bool) {
4967 return nil, false
4968 }
4969
4970
4971 func (hvr2ed HyperVReplica2012EventDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) {
4972 return nil, false
4973 }
4974
4975
4976 func (hvr2ed HyperVReplica2012EventDetails) AsBasicEventProviderSpecificDetails() (BasicEventProviderSpecificDetails, bool) {
4977 return &hvr2ed, true
4978 }
4979
4980
4981 type HyperVReplica2012R2EventDetails struct {
4982
4983 ContainerName *string `json:"containerName,omitempty"`
4984
4985 FabricName *string `json:"fabricName,omitempty"`
4986
4987 RemoteContainerName *string `json:"remoteContainerName,omitempty"`
4988
4989 RemoteFabricName *string `json:"remoteFabricName,omitempty"`
4990
4991 InstanceType InstanceTypeBasicEventProviderSpecificDetails `json:"instanceType,omitempty"`
4992 }
4993
4994
4995 func (hvr2ed HyperVReplica2012R2EventDetails) MarshalJSON() ([]byte, error) {
4996 hvr2ed.InstanceType = InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012R2
4997 objectMap := make(map[string]interface{})
4998 if hvr2ed.ContainerName != nil {
4999 objectMap["containerName"] = hvr2ed.ContainerName
5000 }
5001 if hvr2ed.FabricName != nil {
5002 objectMap["fabricName"] = hvr2ed.FabricName
5003 }
5004 if hvr2ed.RemoteContainerName != nil {
5005 objectMap["remoteContainerName"] = hvr2ed.RemoteContainerName
5006 }
5007 if hvr2ed.RemoteFabricName != nil {
5008 objectMap["remoteFabricName"] = hvr2ed.RemoteFabricName
5009 }
5010 if hvr2ed.InstanceType != "" {
5011 objectMap["instanceType"] = hvr2ed.InstanceType
5012 }
5013 return json.Marshal(objectMap)
5014 }
5015
5016
5017 func (hvr2ed HyperVReplica2012R2EventDetails) AsA2AEventDetails() (*A2AEventDetails, bool) {
5018 return nil, false
5019 }
5020
5021
5022 func (hvr2ed HyperVReplica2012R2EventDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) {
5023 return nil, false
5024 }
5025
5026
5027 func (hvr2ed HyperVReplica2012R2EventDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) {
5028 return &hvr2ed, true
5029 }
5030
5031
5032 func (hvr2ed HyperVReplica2012R2EventDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) {
5033 return nil, false
5034 }
5035
5036
5037 func (hvr2ed HyperVReplica2012R2EventDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) {
5038 return nil, false
5039 }
5040
5041
5042 func (hvr2ed HyperVReplica2012R2EventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) {
5043 return nil, false
5044 }
5045
5046
5047 func (hvr2ed HyperVReplica2012R2EventDetails) AsVMwareCbtEventDetails() (*VMwareCbtEventDetails, bool) {
5048 return nil, false
5049 }
5050
5051
5052 func (hvr2ed HyperVReplica2012R2EventDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) {
5053 return nil, false
5054 }
5055
5056
5057 func (hvr2ed HyperVReplica2012R2EventDetails) AsBasicEventProviderSpecificDetails() (BasicEventProviderSpecificDetails, bool) {
5058 return &hvr2ed, true
5059 }
5060
5061
5062
5063 type HyperVReplicaAzureApplyRecoveryPointInput struct {
5064
5065 VaultLocation *string `json:"vaultLocation,omitempty"`
5066
5067 PrimaryKekCertificatePfx *string `json:"primaryKekCertificatePfx,omitempty"`
5068
5069 SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"`
5070
5071 InstanceType InstanceType `json:"instanceType,omitempty"`
5072 }
5073
5074
5075 func (hvraarpi HyperVReplicaAzureApplyRecoveryPointInput) MarshalJSON() ([]byte, error) {
5076 hvraarpi.InstanceType = InstanceTypeHyperVReplicaAzure
5077 objectMap := make(map[string]interface{})
5078 if hvraarpi.VaultLocation != nil {
5079 objectMap["vaultLocation"] = hvraarpi.VaultLocation
5080 }
5081 if hvraarpi.PrimaryKekCertificatePfx != nil {
5082 objectMap["primaryKekCertificatePfx"] = hvraarpi.PrimaryKekCertificatePfx
5083 }
5084 if hvraarpi.SecondaryKekCertificatePfx != nil {
5085 objectMap["secondaryKekCertificatePfx"] = hvraarpi.SecondaryKekCertificatePfx
5086 }
5087 if hvraarpi.InstanceType != "" {
5088 objectMap["instanceType"] = hvraarpi.InstanceType
5089 }
5090 return json.Marshal(objectMap)
5091 }
5092
5093
5094 func (hvraarpi HyperVReplicaAzureApplyRecoveryPointInput) AsA2AApplyRecoveryPointInput() (*A2AApplyRecoveryPointInput, bool) {
5095 return nil, false
5096 }
5097
5098
5099 func (hvraarpi HyperVReplicaAzureApplyRecoveryPointInput) AsHyperVReplicaAzureApplyRecoveryPointInput() (*HyperVReplicaAzureApplyRecoveryPointInput, bool) {
5100 return &hvraarpi, true
5101 }
5102
5103
5104 func (hvraarpi HyperVReplicaAzureApplyRecoveryPointInput) AsInMageAzureV2ApplyRecoveryPointInput() (*InMageAzureV2ApplyRecoveryPointInput, bool) {
5105 return nil, false
5106 }
5107
5108
5109 func (hvraarpi HyperVReplicaAzureApplyRecoveryPointInput) AsApplyRecoveryPointProviderSpecificInput() (*ApplyRecoveryPointProviderSpecificInput, bool) {
5110 return nil, false
5111 }
5112
5113
5114 func (hvraarpi HyperVReplicaAzureApplyRecoveryPointInput) AsBasicApplyRecoveryPointProviderSpecificInput() (BasicApplyRecoveryPointProviderSpecificInput, bool) {
5115 return &hvraarpi, true
5116 }
5117
5118
5119 type HyperVReplicaAzureEnableProtectionInput struct {
5120
5121 HvHostVMID *string `json:"hvHostVmId,omitempty"`
5122
5123 VMName *string `json:"vmName,omitempty"`
5124
5125 OsType *string `json:"osType,omitempty"`
5126
5127 VhdID *string `json:"vhdId,omitempty"`
5128
5129 TargetStorageAccountID *string `json:"targetStorageAccountId,omitempty"`
5130
5131 TargetAzureNetworkID *string `json:"targetAzureNetworkId,omitempty"`
5132
5133 TargetAzureSubnetID *string `json:"targetAzureSubnetId,omitempty"`
5134
5135 EnableRdpOnTargetOption *string `json:"enableRdpOnTargetOption,omitempty"`
5136
5137 TargetAzureVMName *string `json:"targetAzureVmName,omitempty"`
5138
5139 LogStorageAccountID *string `json:"logStorageAccountId,omitempty"`
5140
5141 DisksToInclude *[]string `json:"disksToInclude,omitempty"`
5142
5143 TargetAzureV1ResourceGroupID *string `json:"targetAzureV1ResourceGroupId,omitempty"`
5144
5145 TargetAzureV2ResourceGroupID *string `json:"targetAzureV2ResourceGroupId,omitempty"`
5146
5147 UseManagedDisks *string `json:"useManagedDisks,omitempty"`
5148
5149 InstanceType InstanceTypeBasicEnableProtectionProviderSpecificInput `json:"instanceType,omitempty"`
5150 }
5151
5152
5153 func (hvraepi HyperVReplicaAzureEnableProtectionInput) MarshalJSON() ([]byte, error) {
5154 hvraepi.InstanceType = InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeHyperVReplicaAzure
5155 objectMap := make(map[string]interface{})
5156 if hvraepi.HvHostVMID != nil {
5157 objectMap["hvHostVmId"] = hvraepi.HvHostVMID
5158 }
5159 if hvraepi.VMName != nil {
5160 objectMap["vmName"] = hvraepi.VMName
5161 }
5162 if hvraepi.OsType != nil {
5163 objectMap["osType"] = hvraepi.OsType
5164 }
5165 if hvraepi.VhdID != nil {
5166 objectMap["vhdId"] = hvraepi.VhdID
5167 }
5168 if hvraepi.TargetStorageAccountID != nil {
5169 objectMap["targetStorageAccountId"] = hvraepi.TargetStorageAccountID
5170 }
5171 if hvraepi.TargetAzureNetworkID != nil {
5172 objectMap["targetAzureNetworkId"] = hvraepi.TargetAzureNetworkID
5173 }
5174 if hvraepi.TargetAzureSubnetID != nil {
5175 objectMap["targetAzureSubnetId"] = hvraepi.TargetAzureSubnetID
5176 }
5177 if hvraepi.EnableRdpOnTargetOption != nil {
5178 objectMap["enableRdpOnTargetOption"] = hvraepi.EnableRdpOnTargetOption
5179 }
5180 if hvraepi.TargetAzureVMName != nil {
5181 objectMap["targetAzureVmName"] = hvraepi.TargetAzureVMName
5182 }
5183 if hvraepi.LogStorageAccountID != nil {
5184 objectMap["logStorageAccountId"] = hvraepi.LogStorageAccountID
5185 }
5186 if hvraepi.DisksToInclude != nil {
5187 objectMap["disksToInclude"] = hvraepi.DisksToInclude
5188 }
5189 if hvraepi.TargetAzureV1ResourceGroupID != nil {
5190 objectMap["targetAzureV1ResourceGroupId"] = hvraepi.TargetAzureV1ResourceGroupID
5191 }
5192 if hvraepi.TargetAzureV2ResourceGroupID != nil {
5193 objectMap["targetAzureV2ResourceGroupId"] = hvraepi.TargetAzureV2ResourceGroupID
5194 }
5195 if hvraepi.UseManagedDisks != nil {
5196 objectMap["useManagedDisks"] = hvraepi.UseManagedDisks
5197 }
5198 if hvraepi.InstanceType != "" {
5199 objectMap["instanceType"] = hvraepi.InstanceType
5200 }
5201 return json.Marshal(objectMap)
5202 }
5203
5204
5205 func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool) {
5206 return nil, false
5207 }
5208
5209
5210 func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool) {
5211 return &hvraepi, true
5212 }
5213
5214
5215 func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool) {
5216 return nil, false
5217 }
5218
5219
5220 func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool) {
5221 return nil, false
5222 }
5223
5224
5225 func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool) {
5226 return nil, false
5227 }
5228
5229
5230 func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsEnableProtectionProviderSpecificInput() (*EnableProtectionProviderSpecificInput, bool) {
5231 return nil, false
5232 }
5233
5234
5235 func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsBasicEnableProtectionProviderSpecificInput() (BasicEnableProtectionProviderSpecificInput, bool) {
5236 return &hvraepi, true
5237 }
5238
5239
5240 type HyperVReplicaAzureEventDetails struct {
5241
5242 ContainerName *string `json:"containerName,omitempty"`
5243
5244 FabricName *string `json:"fabricName,omitempty"`
5245
5246 RemoteContainerName *string `json:"remoteContainerName,omitempty"`
5247
5248 InstanceType InstanceTypeBasicEventProviderSpecificDetails `json:"instanceType,omitempty"`
5249 }
5250
5251
5252 func (hvraed HyperVReplicaAzureEventDetails) MarshalJSON() ([]byte, error) {
5253 hvraed.InstanceType = InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaAzure
5254 objectMap := make(map[string]interface{})
5255 if hvraed.ContainerName != nil {
5256 objectMap["containerName"] = hvraed.ContainerName
5257 }
5258 if hvraed.FabricName != nil {
5259 objectMap["fabricName"] = hvraed.FabricName
5260 }
5261 if hvraed.RemoteContainerName != nil {
5262 objectMap["remoteContainerName"] = hvraed.RemoteContainerName
5263 }
5264 if hvraed.InstanceType != "" {
5265 objectMap["instanceType"] = hvraed.InstanceType
5266 }
5267 return json.Marshal(objectMap)
5268 }
5269
5270
5271 func (hvraed HyperVReplicaAzureEventDetails) AsA2AEventDetails() (*A2AEventDetails, bool) {
5272 return nil, false
5273 }
5274
5275
5276 func (hvraed HyperVReplicaAzureEventDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) {
5277 return nil, false
5278 }
5279
5280
5281 func (hvraed HyperVReplicaAzureEventDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) {
5282 return nil, false
5283 }
5284
5285
5286 func (hvraed HyperVReplicaAzureEventDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) {
5287 return &hvraed, true
5288 }
5289
5290
5291 func (hvraed HyperVReplicaAzureEventDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) {
5292 return nil, false
5293 }
5294
5295
5296 func (hvraed HyperVReplicaAzureEventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) {
5297 return nil, false
5298 }
5299
5300
5301 func (hvraed HyperVReplicaAzureEventDetails) AsVMwareCbtEventDetails() (*VMwareCbtEventDetails, bool) {
5302 return nil, false
5303 }
5304
5305
5306 func (hvraed HyperVReplicaAzureEventDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) {
5307 return nil, false
5308 }
5309
5310
5311 func (hvraed HyperVReplicaAzureEventDetails) AsBasicEventProviderSpecificDetails() (BasicEventProviderSpecificDetails, bool) {
5312 return &hvraed, true
5313 }
5314
5315
5316 type HyperVReplicaAzureFailbackProviderInput struct {
5317
5318 DataSyncOption *string `json:"dataSyncOption,omitempty"`
5319
5320 RecoveryVMCreationOption *string `json:"recoveryVmCreationOption,omitempty"`
5321
5322 ProviderIDForAlternateRecovery *string `json:"providerIdForAlternateRecovery,omitempty"`
5323
5324 InstanceType InstanceTypeBasicProviderSpecificFailoverInput `json:"instanceType,omitempty"`
5325 }
5326
5327
5328 func (hvrafpi HyperVReplicaAzureFailbackProviderInput) MarshalJSON() ([]byte, error) {
5329 hvrafpi.InstanceType = InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback
5330 objectMap := make(map[string]interface{})
5331 if hvrafpi.DataSyncOption != nil {
5332 objectMap["dataSyncOption"] = hvrafpi.DataSyncOption
5333 }
5334 if hvrafpi.RecoveryVMCreationOption != nil {
5335 objectMap["recoveryVmCreationOption"] = hvrafpi.RecoveryVMCreationOption
5336 }
5337 if hvrafpi.ProviderIDForAlternateRecovery != nil {
5338 objectMap["providerIdForAlternateRecovery"] = hvrafpi.ProviderIDForAlternateRecovery
5339 }
5340 if hvrafpi.InstanceType != "" {
5341 objectMap["instanceType"] = hvrafpi.InstanceType
5342 }
5343 return json.Marshal(objectMap)
5344 }
5345
5346
5347 func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool) {
5348 return nil, false
5349 }
5350
5351
5352 func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool) {
5353 return &hvrafpi, true
5354 }
5355
5356
5357 func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool) {
5358 return nil, false
5359 }
5360
5361
5362 func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool) {
5363 return nil, false
5364 }
5365
5366
5367 func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool) {
5368 return nil, false
5369 }
5370
5371
5372 func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsProviderSpecificFailoverInput() (*ProviderSpecificFailoverInput, bool) {
5373 return nil, false
5374 }
5375
5376
5377 func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsBasicProviderSpecificFailoverInput() (BasicProviderSpecificFailoverInput, bool) {
5378 return &hvrafpi, true
5379 }
5380
5381
5382 type HyperVReplicaAzureFailoverProviderInput struct {
5383
5384 VaultLocation *string `json:"vaultLocation,omitempty"`
5385
5386 PrimaryKekCertificatePfx *string `json:"primaryKekCertificatePfx,omitempty"`
5387
5388 SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"`
5389
5390 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
5391
5392 InstanceType InstanceTypeBasicProviderSpecificFailoverInput `json:"instanceType,omitempty"`
5393 }
5394
5395
5396 func (hvrafpi HyperVReplicaAzureFailoverProviderInput) MarshalJSON() ([]byte, error) {
5397 hvrafpi.InstanceType = InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure
5398 objectMap := make(map[string]interface{})
5399 if hvrafpi.VaultLocation != nil {
5400 objectMap["vaultLocation"] = hvrafpi.VaultLocation
5401 }
5402 if hvrafpi.PrimaryKekCertificatePfx != nil {
5403 objectMap["primaryKekCertificatePfx"] = hvrafpi.PrimaryKekCertificatePfx
5404 }
5405 if hvrafpi.SecondaryKekCertificatePfx != nil {
5406 objectMap["secondaryKekCertificatePfx"] = hvrafpi.SecondaryKekCertificatePfx
5407 }
5408 if hvrafpi.RecoveryPointID != nil {
5409 objectMap["recoveryPointId"] = hvrafpi.RecoveryPointID
5410 }
5411 if hvrafpi.InstanceType != "" {
5412 objectMap["instanceType"] = hvrafpi.InstanceType
5413 }
5414 return json.Marshal(objectMap)
5415 }
5416
5417
5418 func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool) {
5419 return nil, false
5420 }
5421
5422
5423 func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool) {
5424 return nil, false
5425 }
5426
5427
5428 func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool) {
5429 return &hvrafpi, true
5430 }
5431
5432
5433 func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool) {
5434 return nil, false
5435 }
5436
5437
5438 func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool) {
5439 return nil, false
5440 }
5441
5442
5443 func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsProviderSpecificFailoverInput() (*ProviderSpecificFailoverInput, bool) {
5444 return nil, false
5445 }
5446
5447
5448 func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsBasicProviderSpecificFailoverInput() (BasicProviderSpecificFailoverInput, bool) {
5449 return &hvrafpi, true
5450 }
5451
5452
5453 type HyperVReplicaAzurePolicyDetails struct {
5454
5455 RecoveryPointHistoryDurationInHours *int32 `json:"recoveryPointHistoryDurationInHours,omitempty"`
5456
5457 ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"`
5458
5459 ReplicationInterval *int32 `json:"replicationInterval,omitempty"`
5460
5461 OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"`
5462
5463 Encryption *string `json:"encryption,omitempty"`
5464
5465 ActiveStorageAccountID *string `json:"activeStorageAccountId,omitempty"`
5466
5467 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"`
5468 }
5469
5470
5471 func (hvrapd HyperVReplicaAzurePolicyDetails) MarshalJSON() ([]byte, error) {
5472 hvrapd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure
5473 objectMap := make(map[string]interface{})
5474 if hvrapd.RecoveryPointHistoryDurationInHours != nil {
5475 objectMap["recoveryPointHistoryDurationInHours"] = hvrapd.RecoveryPointHistoryDurationInHours
5476 }
5477 if hvrapd.ApplicationConsistentSnapshotFrequencyInHours != nil {
5478 objectMap["applicationConsistentSnapshotFrequencyInHours"] = hvrapd.ApplicationConsistentSnapshotFrequencyInHours
5479 }
5480 if hvrapd.ReplicationInterval != nil {
5481 objectMap["replicationInterval"] = hvrapd.ReplicationInterval
5482 }
5483 if hvrapd.OnlineReplicationStartTime != nil {
5484 objectMap["onlineReplicationStartTime"] = hvrapd.OnlineReplicationStartTime
5485 }
5486 if hvrapd.Encryption != nil {
5487 objectMap["encryption"] = hvrapd.Encryption
5488 }
5489 if hvrapd.ActiveStorageAccountID != nil {
5490 objectMap["activeStorageAccountId"] = hvrapd.ActiveStorageAccountID
5491 }
5492 if hvrapd.InstanceType != "" {
5493 objectMap["instanceType"] = hvrapd.InstanceType
5494 }
5495 return json.Marshal(objectMap)
5496 }
5497
5498
5499 func (hvrapd HyperVReplicaAzurePolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) {
5500 return nil, false
5501 }
5502
5503
5504 func (hvrapd HyperVReplicaAzurePolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) {
5505 return &hvrapd, true
5506 }
5507
5508
5509 func (hvrapd HyperVReplicaAzurePolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) {
5510 return nil, false
5511 }
5512
5513
5514 func (hvrapd HyperVReplicaAzurePolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) {
5515 return nil, false
5516 }
5517
5518
5519 func (hvrapd HyperVReplicaAzurePolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) {
5520 return nil, false
5521 }
5522
5523
5524 func (hvrapd HyperVReplicaAzurePolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) {
5525 return nil, false
5526 }
5527
5528
5529 func (hvrapd HyperVReplicaAzurePolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) {
5530 return nil, false
5531 }
5532
5533
5534 func (hvrapd HyperVReplicaAzurePolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) {
5535 return nil, false
5536 }
5537
5538
5539 func (hvrapd HyperVReplicaAzurePolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) {
5540 return nil, false
5541 }
5542
5543
5544 func (hvrapd HyperVReplicaAzurePolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) {
5545 return nil, false
5546 }
5547
5548
5549 func (hvrapd HyperVReplicaAzurePolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) {
5550 return nil, false
5551 }
5552
5553
5554 func (hvrapd HyperVReplicaAzurePolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) {
5555 return &hvrapd, true
5556 }
5557
5558
5559 type HyperVReplicaAzurePolicyInput struct {
5560
5561 RecoveryPointHistoryDuration *int32 `json:"recoveryPointHistoryDuration,omitempty"`
5562
5563 ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"`
5564
5565 ReplicationInterval *int32 `json:"replicationInterval,omitempty"`
5566
5567 OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"`
5568
5569 StorageAccounts *[]string `json:"storageAccounts,omitempty"`
5570
5571 InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"`
5572 }
5573
5574
5575 func (hvrapi HyperVReplicaAzurePolicyInput) MarshalJSON() ([]byte, error) {
5576 hvrapi.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplicaAzure
5577 objectMap := make(map[string]interface{})
5578 if hvrapi.RecoveryPointHistoryDuration != nil {
5579 objectMap["recoveryPointHistoryDuration"] = hvrapi.RecoveryPointHistoryDuration
5580 }
5581 if hvrapi.ApplicationConsistentSnapshotFrequencyInHours != nil {
5582 objectMap["applicationConsistentSnapshotFrequencyInHours"] = hvrapi.ApplicationConsistentSnapshotFrequencyInHours
5583 }
5584 if hvrapi.ReplicationInterval != nil {
5585 objectMap["replicationInterval"] = hvrapi.ReplicationInterval
5586 }
5587 if hvrapi.OnlineReplicationStartTime != nil {
5588 objectMap["onlineReplicationStartTime"] = hvrapi.OnlineReplicationStartTime
5589 }
5590 if hvrapi.StorageAccounts != nil {
5591 objectMap["storageAccounts"] = hvrapi.StorageAccounts
5592 }
5593 if hvrapi.InstanceType != "" {
5594 objectMap["instanceType"] = hvrapi.InstanceType
5595 }
5596 return json.Marshal(objectMap)
5597 }
5598
5599
5600 func (hvrapi HyperVReplicaAzurePolicyInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) {
5601 return nil, false
5602 }
5603
5604
5605 func (hvrapi HyperVReplicaAzurePolicyInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) {
5606 return &hvrapi, true
5607 }
5608
5609
5610 func (hvrapi HyperVReplicaAzurePolicyInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) {
5611 return nil, false
5612 }
5613
5614
5615 func (hvrapi HyperVReplicaAzurePolicyInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) {
5616 return nil, false
5617 }
5618
5619
5620 func (hvrapi HyperVReplicaAzurePolicyInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) {
5621 return nil, false
5622 }
5623
5624
5625 func (hvrapi HyperVReplicaAzurePolicyInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) {
5626 return nil, false
5627 }
5628
5629
5630 func (hvrapi HyperVReplicaAzurePolicyInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) {
5631 return nil, false
5632 }
5633
5634
5635 func (hvrapi HyperVReplicaAzurePolicyInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) {
5636 return nil, false
5637 }
5638
5639
5640 func (hvrapi HyperVReplicaAzurePolicyInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) {
5641 return &hvrapi, true
5642 }
5643
5644
5645 type HyperVReplicaAzureReplicationDetails struct {
5646
5647 AzureVMDiskDetails *[]AzureVMDiskDetails `json:"azureVmDiskDetails,omitempty"`
5648
5649 RecoveryAzureVMName *string `json:"recoveryAzureVmName,omitempty"`
5650
5651 RecoveryAzureVMSize *string `json:"recoveryAzureVMSize,omitempty"`
5652
5653 RecoveryAzureStorageAccount *string `json:"recoveryAzureStorageAccount,omitempty"`
5654
5655 RecoveryAzureLogStorageAccountID *string `json:"recoveryAzureLogStorageAccountId,omitempty"`
5656
5657 LastReplicatedTime *date.Time `json:"lastReplicatedTime,omitempty"`
5658
5659 RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"`
5660
5661 LastRpoCalculatedTime *date.Time `json:"lastRpoCalculatedTime,omitempty"`
5662
5663 VMID *string `json:"vmId,omitempty"`
5664
5665 VMProtectionState *string `json:"vmProtectionState,omitempty"`
5666
5667 VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"`
5668
5669 InitialReplicationDetails *InitialReplicationDetails `json:"initialReplicationDetails,omitempty"`
5670
5671 VMNics *[]VMNicDetails `json:"vmNics,omitempty"`
5672
5673 SelectedRecoveryAzureNetworkID *string `json:"selectedRecoveryAzureNetworkId,omitempty"`
5674
5675 SelectedSourceNicID *string `json:"selectedSourceNicId,omitempty"`
5676
5677 Encryption *string `json:"encryption,omitempty"`
5678
5679 OSDetails *OSDetails `json:"oSDetails,omitempty"`
5680
5681 SourceVMRAMSizeInMB *int32 `json:"sourceVmRamSizeInMB,omitempty"`
5682
5683 SourceVMCPUCount *int32 `json:"sourceVmCpuCount,omitempty"`
5684
5685 EnableRdpOnTargetOption *string `json:"enableRdpOnTargetOption,omitempty"`
5686
5687 RecoveryAzureResourceGroupID *string `json:"recoveryAzureResourceGroupId,omitempty"`
5688
5689 RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"`
5690
5691 UseManagedDisks *string `json:"useManagedDisks,omitempty"`
5692
5693 LicenseType *string `json:"licenseType,omitempty"`
5694
5695 InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"`
5696 }
5697
5698
5699 func (hvrard HyperVReplicaAzureReplicationDetails) MarshalJSON() ([]byte, error) {
5700 hvrard.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaAzure
5701 objectMap := make(map[string]interface{})
5702 if hvrard.AzureVMDiskDetails != nil {
5703 objectMap["azureVmDiskDetails"] = hvrard.AzureVMDiskDetails
5704 }
5705 if hvrard.RecoveryAzureVMName != nil {
5706 objectMap["recoveryAzureVmName"] = hvrard.RecoveryAzureVMName
5707 }
5708 if hvrard.RecoveryAzureVMSize != nil {
5709 objectMap["recoveryAzureVMSize"] = hvrard.RecoveryAzureVMSize
5710 }
5711 if hvrard.RecoveryAzureStorageAccount != nil {
5712 objectMap["recoveryAzureStorageAccount"] = hvrard.RecoveryAzureStorageAccount
5713 }
5714 if hvrard.RecoveryAzureLogStorageAccountID != nil {
5715 objectMap["recoveryAzureLogStorageAccountId"] = hvrard.RecoveryAzureLogStorageAccountID
5716 }
5717 if hvrard.LastReplicatedTime != nil {
5718 objectMap["lastReplicatedTime"] = hvrard.LastReplicatedTime
5719 }
5720 if hvrard.RpoInSeconds != nil {
5721 objectMap["rpoInSeconds"] = hvrard.RpoInSeconds
5722 }
5723 if hvrard.LastRpoCalculatedTime != nil {
5724 objectMap["lastRpoCalculatedTime"] = hvrard.LastRpoCalculatedTime
5725 }
5726 if hvrard.VMID != nil {
5727 objectMap["vmId"] = hvrard.VMID
5728 }
5729 if hvrard.VMProtectionState != nil {
5730 objectMap["vmProtectionState"] = hvrard.VMProtectionState
5731 }
5732 if hvrard.VMProtectionStateDescription != nil {
5733 objectMap["vmProtectionStateDescription"] = hvrard.VMProtectionStateDescription
5734 }
5735 if hvrard.InitialReplicationDetails != nil {
5736 objectMap["initialReplicationDetails"] = hvrard.InitialReplicationDetails
5737 }
5738 if hvrard.VMNics != nil {
5739 objectMap["vmNics"] = hvrard.VMNics
5740 }
5741 if hvrard.SelectedRecoveryAzureNetworkID != nil {
5742 objectMap["selectedRecoveryAzureNetworkId"] = hvrard.SelectedRecoveryAzureNetworkID
5743 }
5744 if hvrard.SelectedSourceNicID != nil {
5745 objectMap["selectedSourceNicId"] = hvrard.SelectedSourceNicID
5746 }
5747 if hvrard.Encryption != nil {
5748 objectMap["encryption"] = hvrard.Encryption
5749 }
5750 if hvrard.OSDetails != nil {
5751 objectMap["oSDetails"] = hvrard.OSDetails
5752 }
5753 if hvrard.SourceVMRAMSizeInMB != nil {
5754 objectMap["sourceVmRamSizeInMB"] = hvrard.SourceVMRAMSizeInMB
5755 }
5756 if hvrard.SourceVMCPUCount != nil {
5757 objectMap["sourceVmCpuCount"] = hvrard.SourceVMCPUCount
5758 }
5759 if hvrard.EnableRdpOnTargetOption != nil {
5760 objectMap["enableRdpOnTargetOption"] = hvrard.EnableRdpOnTargetOption
5761 }
5762 if hvrard.RecoveryAzureResourceGroupID != nil {
5763 objectMap["recoveryAzureResourceGroupId"] = hvrard.RecoveryAzureResourceGroupID
5764 }
5765 if hvrard.RecoveryAvailabilitySetID != nil {
5766 objectMap["recoveryAvailabilitySetId"] = hvrard.RecoveryAvailabilitySetID
5767 }
5768 if hvrard.UseManagedDisks != nil {
5769 objectMap["useManagedDisks"] = hvrard.UseManagedDisks
5770 }
5771 if hvrard.LicenseType != nil {
5772 objectMap["licenseType"] = hvrard.LicenseType
5773 }
5774 if hvrard.InstanceType != "" {
5775 objectMap["instanceType"] = hvrard.InstanceType
5776 }
5777 return json.Marshal(objectMap)
5778 }
5779
5780
5781 func (hvrard HyperVReplicaAzureReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) {
5782 return nil, false
5783 }
5784
5785
5786 func (hvrard HyperVReplicaAzureReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) {
5787 return &hvrard, true
5788 }
5789
5790
5791 func (hvrard HyperVReplicaAzureReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) {
5792 return nil, false
5793 }
5794
5795
5796 func (hvrard HyperVReplicaAzureReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) {
5797 return nil, false
5798 }
5799
5800
5801 func (hvrard HyperVReplicaAzureReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) {
5802 return nil, false
5803 }
5804
5805
5806 func (hvrard HyperVReplicaAzureReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) {
5807 return nil, false
5808 }
5809
5810
5811 func (hvrard HyperVReplicaAzureReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) {
5812 return nil, false
5813 }
5814
5815
5816 func (hvrard HyperVReplicaAzureReplicationDetails) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) {
5817 return nil, false
5818 }
5819
5820
5821 func (hvrard HyperVReplicaAzureReplicationDetails) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) {
5822 return &hvrard, true
5823 }
5824
5825
5826 type HyperVReplicaAzureReprotectInput struct {
5827
5828 HvHostVMID *string `json:"hvHostVmId,omitempty"`
5829
5830 VMName *string `json:"vmName,omitempty"`
5831
5832 OsType *string `json:"osType,omitempty"`
5833
5834 VHDID *string `json:"vHDId,omitempty"`
5835
5836 StorageAccountID *string `json:"storageAccountId,omitempty"`
5837
5838 LogStorageAccountID *string `json:"logStorageAccountId,omitempty"`
5839
5840 InstanceType InstanceTypeBasicReverseReplicationProviderSpecificInput `json:"instanceType,omitempty"`
5841 }
5842
5843
5844 func (hvrari HyperVReplicaAzureReprotectInput) MarshalJSON() ([]byte, error) {
5845 hvrari.InstanceType = InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeHyperVReplicaAzure
5846 objectMap := make(map[string]interface{})
5847 if hvrari.HvHostVMID != nil {
5848 objectMap["hvHostVmId"] = hvrari.HvHostVMID
5849 }
5850 if hvrari.VMName != nil {
5851 objectMap["vmName"] = hvrari.VMName
5852 }
5853 if hvrari.OsType != nil {
5854 objectMap["osType"] = hvrari.OsType
5855 }
5856 if hvrari.VHDID != nil {
5857 objectMap["vHDId"] = hvrari.VHDID
5858 }
5859 if hvrari.StorageAccountID != nil {
5860 objectMap["storageAccountId"] = hvrari.StorageAccountID
5861 }
5862 if hvrari.LogStorageAccountID != nil {
5863 objectMap["logStorageAccountId"] = hvrari.LogStorageAccountID
5864 }
5865 if hvrari.InstanceType != "" {
5866 objectMap["instanceType"] = hvrari.InstanceType
5867 }
5868 return json.Marshal(objectMap)
5869 }
5870
5871
5872 func (hvrari HyperVReplicaAzureReprotectInput) AsA2AReprotectInput() (*A2AReprotectInput, bool) {
5873 return nil, false
5874 }
5875
5876
5877 func (hvrari HyperVReplicaAzureReprotectInput) AsHyperVReplicaAzureReprotectInput() (*HyperVReplicaAzureReprotectInput, bool) {
5878 return &hvrari, true
5879 }
5880
5881
5882 func (hvrari HyperVReplicaAzureReprotectInput) AsInMageAzureV2ReprotectInput() (*InMageAzureV2ReprotectInput, bool) {
5883 return nil, false
5884 }
5885
5886
5887 func (hvrari HyperVReplicaAzureReprotectInput) AsInMageReprotectInput() (*InMageReprotectInput, bool) {
5888 return nil, false
5889 }
5890
5891
5892 func (hvrari HyperVReplicaAzureReprotectInput) AsReverseReplicationProviderSpecificInput() (*ReverseReplicationProviderSpecificInput, bool) {
5893 return nil, false
5894 }
5895
5896
5897 func (hvrari HyperVReplicaAzureReprotectInput) AsBasicReverseReplicationProviderSpecificInput() (BasicReverseReplicationProviderSpecificInput, bool) {
5898 return &hvrari, true
5899 }
5900
5901
5902
5903 type HyperVReplicaAzureUpdateReplicationProtectedItemInput struct {
5904
5905 RecoveryAzureV1ResourceGroupID *string `json:"recoveryAzureV1ResourceGroupId,omitempty"`
5906
5907 RecoveryAzureV2ResourceGroupID *string `json:"recoveryAzureV2ResourceGroupId,omitempty"`
5908
5909 UseManagedDisks *string `json:"useManagedDisks,omitempty"`
5910
5911 InstanceType InstanceTypeBasicUpdateReplicationProtectedItemProviderInput `json:"instanceType,omitempty"`
5912 }
5913
5914
5915 func (hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, error) {
5916 hvraurpii.InstanceType = InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeHyperVReplicaAzure
5917 objectMap := make(map[string]interface{})
5918 if hvraurpii.RecoveryAzureV1ResourceGroupID != nil {
5919 objectMap["recoveryAzureV1ResourceGroupId"] = hvraurpii.RecoveryAzureV1ResourceGroupID
5920 }
5921 if hvraurpii.RecoveryAzureV2ResourceGroupID != nil {
5922 objectMap["recoveryAzureV2ResourceGroupId"] = hvraurpii.RecoveryAzureV2ResourceGroupID
5923 }
5924 if hvraurpii.UseManagedDisks != nil {
5925 objectMap["useManagedDisks"] = hvraurpii.UseManagedDisks
5926 }
5927 if hvraurpii.InstanceType != "" {
5928 objectMap["instanceType"] = hvraurpii.InstanceType
5929 }
5930 return json.Marshal(objectMap)
5931 }
5932
5933
5934 func (hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput) AsA2AUpdateReplicationProtectedItemInput() (*A2AUpdateReplicationProtectedItemInput, bool) {
5935 return nil, false
5936 }
5937
5938
5939 func (hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput) AsHyperVReplicaAzureUpdateReplicationProtectedItemInput() (*HyperVReplicaAzureUpdateReplicationProtectedItemInput, bool) {
5940 return &hvraurpii, true
5941 }
5942
5943
5944 func (hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput) AsInMageAzureV2UpdateReplicationProtectedItemInput() (*InMageAzureV2UpdateReplicationProtectedItemInput, bool) {
5945 return nil, false
5946 }
5947
5948
5949 func (hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput) AsUpdateReplicationProtectedItemProviderInput() (*UpdateReplicationProtectedItemProviderInput, bool) {
5950 return nil, false
5951 }
5952
5953
5954 func (hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput) AsBasicUpdateReplicationProtectedItemProviderInput() (BasicUpdateReplicationProtectedItemProviderInput, bool) {
5955 return &hvraurpii, true
5956 }
5957
5958
5959 type HyperVReplicaBaseEventDetails struct {
5960
5961 ContainerName *string `json:"containerName,omitempty"`
5962
5963 FabricName *string `json:"fabricName,omitempty"`
5964
5965 RemoteContainerName *string `json:"remoteContainerName,omitempty"`
5966
5967 RemoteFabricName *string `json:"remoteFabricName,omitempty"`
5968
5969 InstanceType InstanceTypeBasicEventProviderSpecificDetails `json:"instanceType,omitempty"`
5970 }
5971
5972
5973 func (hvrbed HyperVReplicaBaseEventDetails) MarshalJSON() ([]byte, error) {
5974 hvrbed.InstanceType = InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaBaseEventDetails
5975 objectMap := make(map[string]interface{})
5976 if hvrbed.ContainerName != nil {
5977 objectMap["containerName"] = hvrbed.ContainerName
5978 }
5979 if hvrbed.FabricName != nil {
5980 objectMap["fabricName"] = hvrbed.FabricName
5981 }
5982 if hvrbed.RemoteContainerName != nil {
5983 objectMap["remoteContainerName"] = hvrbed.RemoteContainerName
5984 }
5985 if hvrbed.RemoteFabricName != nil {
5986 objectMap["remoteFabricName"] = hvrbed.RemoteFabricName
5987 }
5988 if hvrbed.InstanceType != "" {
5989 objectMap["instanceType"] = hvrbed.InstanceType
5990 }
5991 return json.Marshal(objectMap)
5992 }
5993
5994
5995 func (hvrbed HyperVReplicaBaseEventDetails) AsA2AEventDetails() (*A2AEventDetails, bool) {
5996 return nil, false
5997 }
5998
5999
6000 func (hvrbed HyperVReplicaBaseEventDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) {
6001 return nil, false
6002 }
6003
6004
6005 func (hvrbed HyperVReplicaBaseEventDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) {
6006 return nil, false
6007 }
6008
6009
6010 func (hvrbed HyperVReplicaBaseEventDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) {
6011 return nil, false
6012 }
6013
6014
6015 func (hvrbed HyperVReplicaBaseEventDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) {
6016 return &hvrbed, true
6017 }
6018
6019
6020 func (hvrbed HyperVReplicaBaseEventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) {
6021 return nil, false
6022 }
6023
6024
6025 func (hvrbed HyperVReplicaBaseEventDetails) AsVMwareCbtEventDetails() (*VMwareCbtEventDetails, bool) {
6026 return nil, false
6027 }
6028
6029
6030 func (hvrbed HyperVReplicaBaseEventDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) {
6031 return nil, false
6032 }
6033
6034
6035 func (hvrbed HyperVReplicaBaseEventDetails) AsBasicEventProviderSpecificDetails() (BasicEventProviderSpecificDetails, bool) {
6036 return &hvrbed, true
6037 }
6038
6039
6040 type HyperVReplicaBasePolicyDetails struct {
6041
6042 RecoveryPoints *int32 `json:"recoveryPoints,omitempty"`
6043
6044 ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"`
6045
6046 Compression *string `json:"compression,omitempty"`
6047
6048 InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"`
6049
6050 OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"`
6051
6052 OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"`
6053
6054 OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"`
6055
6056 ReplicationPort *int32 `json:"replicationPort,omitempty"`
6057
6058 AllowedAuthenticationType *int32 `json:"allowedAuthenticationType,omitempty"`
6059
6060 ReplicaDeletionOption *string `json:"replicaDeletionOption,omitempty"`
6061
6062 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"`
6063 }
6064
6065
6066 func (hvrbpd HyperVReplicaBasePolicyDetails) MarshalJSON() ([]byte, error) {
6067 hvrbpd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails
6068 objectMap := make(map[string]interface{})
6069 if hvrbpd.RecoveryPoints != nil {
6070 objectMap["recoveryPoints"] = hvrbpd.RecoveryPoints
6071 }
6072 if hvrbpd.ApplicationConsistentSnapshotFrequencyInHours != nil {
6073 objectMap["applicationConsistentSnapshotFrequencyInHours"] = hvrbpd.ApplicationConsistentSnapshotFrequencyInHours
6074 }
6075 if hvrbpd.Compression != nil {
6076 objectMap["compression"] = hvrbpd.Compression
6077 }
6078 if hvrbpd.InitialReplicationMethod != nil {
6079 objectMap["initialReplicationMethod"] = hvrbpd.InitialReplicationMethod
6080 }
6081 if hvrbpd.OnlineReplicationStartTime != nil {
6082 objectMap["onlineReplicationStartTime"] = hvrbpd.OnlineReplicationStartTime
6083 }
6084 if hvrbpd.OfflineReplicationImportPath != nil {
6085 objectMap["offlineReplicationImportPath"] = hvrbpd.OfflineReplicationImportPath
6086 }
6087 if hvrbpd.OfflineReplicationExportPath != nil {
6088 objectMap["offlineReplicationExportPath"] = hvrbpd.OfflineReplicationExportPath
6089 }
6090 if hvrbpd.ReplicationPort != nil {
6091 objectMap["replicationPort"] = hvrbpd.ReplicationPort
6092 }
6093 if hvrbpd.AllowedAuthenticationType != nil {
6094 objectMap["allowedAuthenticationType"] = hvrbpd.AllowedAuthenticationType
6095 }
6096 if hvrbpd.ReplicaDeletionOption != nil {
6097 objectMap["replicaDeletionOption"] = hvrbpd.ReplicaDeletionOption
6098 }
6099 if hvrbpd.InstanceType != "" {
6100 objectMap["instanceType"] = hvrbpd.InstanceType
6101 }
6102 return json.Marshal(objectMap)
6103 }
6104
6105
6106 func (hvrbpd HyperVReplicaBasePolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) {
6107 return nil, false
6108 }
6109
6110
6111 func (hvrbpd HyperVReplicaBasePolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) {
6112 return nil, false
6113 }
6114
6115
6116 func (hvrbpd HyperVReplicaBasePolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) {
6117 return &hvrbpd, true
6118 }
6119
6120
6121 func (hvrbpd HyperVReplicaBasePolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) {
6122 return nil, false
6123 }
6124
6125
6126 func (hvrbpd HyperVReplicaBasePolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) {
6127 return nil, false
6128 }
6129
6130
6131 func (hvrbpd HyperVReplicaBasePolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) {
6132 return nil, false
6133 }
6134
6135
6136 func (hvrbpd HyperVReplicaBasePolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) {
6137 return nil, false
6138 }
6139
6140
6141 func (hvrbpd HyperVReplicaBasePolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) {
6142 return nil, false
6143 }
6144
6145
6146 func (hvrbpd HyperVReplicaBasePolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) {
6147 return nil, false
6148 }
6149
6150
6151 func (hvrbpd HyperVReplicaBasePolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) {
6152 return nil, false
6153 }
6154
6155
6156 func (hvrbpd HyperVReplicaBasePolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) {
6157 return nil, false
6158 }
6159
6160
6161 func (hvrbpd HyperVReplicaBasePolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) {
6162 return &hvrbpd, true
6163 }
6164
6165
6166 type HyperVReplicaBaseReplicationDetails struct {
6167
6168 LastReplicatedTime *date.Time `json:"lastReplicatedTime,omitempty"`
6169
6170 VMNics *[]VMNicDetails `json:"vmNics,omitempty"`
6171
6172 VMID *string `json:"vmId,omitempty"`
6173
6174 VMProtectionState *string `json:"vmProtectionState,omitempty"`
6175
6176 VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"`
6177
6178 InitialReplicationDetails *InitialReplicationDetails `json:"initialReplicationDetails,omitempty"`
6179
6180 VMDiskDetails *[]DiskDetails `json:"vMDiskDetails,omitempty"`
6181
6182 InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"`
6183 }
6184
6185
6186 func (hvrbrd HyperVReplicaBaseReplicationDetails) MarshalJSON() ([]byte, error) {
6187 hvrbrd.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaBaseReplicationDetails
6188 objectMap := make(map[string]interface{})
6189 if hvrbrd.LastReplicatedTime != nil {
6190 objectMap["lastReplicatedTime"] = hvrbrd.LastReplicatedTime
6191 }
6192 if hvrbrd.VMNics != nil {
6193 objectMap["vmNics"] = hvrbrd.VMNics
6194 }
6195 if hvrbrd.VMID != nil {
6196 objectMap["vmId"] = hvrbrd.VMID
6197 }
6198 if hvrbrd.VMProtectionState != nil {
6199 objectMap["vmProtectionState"] = hvrbrd.VMProtectionState
6200 }
6201 if hvrbrd.VMProtectionStateDescription != nil {
6202 objectMap["vmProtectionStateDescription"] = hvrbrd.VMProtectionStateDescription
6203 }
6204 if hvrbrd.InitialReplicationDetails != nil {
6205 objectMap["initialReplicationDetails"] = hvrbrd.InitialReplicationDetails
6206 }
6207 if hvrbrd.VMDiskDetails != nil {
6208 objectMap["vMDiskDetails"] = hvrbrd.VMDiskDetails
6209 }
6210 if hvrbrd.InstanceType != "" {
6211 objectMap["instanceType"] = hvrbrd.InstanceType
6212 }
6213 return json.Marshal(objectMap)
6214 }
6215
6216
6217 func (hvrbrd HyperVReplicaBaseReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) {
6218 return nil, false
6219 }
6220
6221
6222 func (hvrbrd HyperVReplicaBaseReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) {
6223 return nil, false
6224 }
6225
6226
6227 func (hvrbrd HyperVReplicaBaseReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) {
6228 return &hvrbrd, true
6229 }
6230
6231
6232 func (hvrbrd HyperVReplicaBaseReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) {
6233 return nil, false
6234 }
6235
6236
6237 func (hvrbrd HyperVReplicaBaseReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) {
6238 return nil, false
6239 }
6240
6241
6242 func (hvrbrd HyperVReplicaBaseReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) {
6243 return nil, false
6244 }
6245
6246
6247 func (hvrbrd HyperVReplicaBaseReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) {
6248 return nil, false
6249 }
6250
6251
6252 func (hvrbrd HyperVReplicaBaseReplicationDetails) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) {
6253 return nil, false
6254 }
6255
6256
6257 func (hvrbrd HyperVReplicaBaseReplicationDetails) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) {
6258 return &hvrbrd, true
6259 }
6260
6261
6262 type HyperVReplicaBluePolicyDetails struct {
6263
6264 ReplicationFrequencyInSeconds *int32 `json:"replicationFrequencyInSeconds,omitempty"`
6265
6266 RecoveryPoints *int32 `json:"recoveryPoints,omitempty"`
6267
6268 ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"`
6269
6270 Compression *string `json:"compression,omitempty"`
6271
6272 InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"`
6273
6274 OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"`
6275
6276 OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"`
6277
6278 OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"`
6279
6280 ReplicationPort *int32 `json:"replicationPort,omitempty"`
6281
6282 AllowedAuthenticationType *int32 `json:"allowedAuthenticationType,omitempty"`
6283
6284 ReplicaDeletionOption *string `json:"replicaDeletionOption,omitempty"`
6285
6286 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"`
6287 }
6288
6289
6290 func (hvrbpd HyperVReplicaBluePolicyDetails) MarshalJSON() ([]byte, error) {
6291 hvrbpd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2
6292 objectMap := make(map[string]interface{})
6293 if hvrbpd.ReplicationFrequencyInSeconds != nil {
6294 objectMap["replicationFrequencyInSeconds"] = hvrbpd.ReplicationFrequencyInSeconds
6295 }
6296 if hvrbpd.RecoveryPoints != nil {
6297 objectMap["recoveryPoints"] = hvrbpd.RecoveryPoints
6298 }
6299 if hvrbpd.ApplicationConsistentSnapshotFrequencyInHours != nil {
6300 objectMap["applicationConsistentSnapshotFrequencyInHours"] = hvrbpd.ApplicationConsistentSnapshotFrequencyInHours
6301 }
6302 if hvrbpd.Compression != nil {
6303 objectMap["compression"] = hvrbpd.Compression
6304 }
6305 if hvrbpd.InitialReplicationMethod != nil {
6306 objectMap["initialReplicationMethod"] = hvrbpd.InitialReplicationMethod
6307 }
6308 if hvrbpd.OnlineReplicationStartTime != nil {
6309 objectMap["onlineReplicationStartTime"] = hvrbpd.OnlineReplicationStartTime
6310 }
6311 if hvrbpd.OfflineReplicationImportPath != nil {
6312 objectMap["offlineReplicationImportPath"] = hvrbpd.OfflineReplicationImportPath
6313 }
6314 if hvrbpd.OfflineReplicationExportPath != nil {
6315 objectMap["offlineReplicationExportPath"] = hvrbpd.OfflineReplicationExportPath
6316 }
6317 if hvrbpd.ReplicationPort != nil {
6318 objectMap["replicationPort"] = hvrbpd.ReplicationPort
6319 }
6320 if hvrbpd.AllowedAuthenticationType != nil {
6321 objectMap["allowedAuthenticationType"] = hvrbpd.AllowedAuthenticationType
6322 }
6323 if hvrbpd.ReplicaDeletionOption != nil {
6324 objectMap["replicaDeletionOption"] = hvrbpd.ReplicaDeletionOption
6325 }
6326 if hvrbpd.InstanceType != "" {
6327 objectMap["instanceType"] = hvrbpd.InstanceType
6328 }
6329 return json.Marshal(objectMap)
6330 }
6331
6332
6333 func (hvrbpd HyperVReplicaBluePolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) {
6334 return nil, false
6335 }
6336
6337
6338 func (hvrbpd HyperVReplicaBluePolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) {
6339 return nil, false
6340 }
6341
6342
6343 func (hvrbpd HyperVReplicaBluePolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) {
6344 return nil, false
6345 }
6346
6347
6348 func (hvrbpd HyperVReplicaBluePolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) {
6349 return &hvrbpd, true
6350 }
6351
6352
6353 func (hvrbpd HyperVReplicaBluePolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) {
6354 return nil, false
6355 }
6356
6357
6358 func (hvrbpd HyperVReplicaBluePolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) {
6359 return nil, false
6360 }
6361
6362
6363 func (hvrbpd HyperVReplicaBluePolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) {
6364 return nil, false
6365 }
6366
6367
6368 func (hvrbpd HyperVReplicaBluePolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) {
6369 return nil, false
6370 }
6371
6372
6373 func (hvrbpd HyperVReplicaBluePolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) {
6374 return nil, false
6375 }
6376
6377
6378 func (hvrbpd HyperVReplicaBluePolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) {
6379 return nil, false
6380 }
6381
6382
6383 func (hvrbpd HyperVReplicaBluePolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) {
6384 return nil, false
6385 }
6386
6387
6388 func (hvrbpd HyperVReplicaBluePolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) {
6389 return &hvrbpd, true
6390 }
6391
6392
6393 type HyperVReplicaBluePolicyInput struct {
6394
6395 ReplicationFrequencyInSeconds *int32 `json:"replicationFrequencyInSeconds,omitempty"`
6396
6397 RecoveryPoints *int32 `json:"recoveryPoints,omitempty"`
6398
6399 ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"`
6400
6401 Compression *string `json:"compression,omitempty"`
6402
6403 InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"`
6404
6405 OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"`
6406
6407 OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"`
6408
6409 OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"`
6410
6411 ReplicationPort *int32 `json:"replicationPort,omitempty"`
6412
6413 AllowedAuthenticationType *int32 `json:"allowedAuthenticationType,omitempty"`
6414
6415 ReplicaDeletion *string `json:"replicaDeletion,omitempty"`
6416
6417 InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"`
6418 }
6419
6420
6421 func (hvrbpi HyperVReplicaBluePolicyInput) MarshalJSON() ([]byte, error) {
6422 hvrbpi.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012R2
6423 objectMap := make(map[string]interface{})
6424 if hvrbpi.ReplicationFrequencyInSeconds != nil {
6425 objectMap["replicationFrequencyInSeconds"] = hvrbpi.ReplicationFrequencyInSeconds
6426 }
6427 if hvrbpi.RecoveryPoints != nil {
6428 objectMap["recoveryPoints"] = hvrbpi.RecoveryPoints
6429 }
6430 if hvrbpi.ApplicationConsistentSnapshotFrequencyInHours != nil {
6431 objectMap["applicationConsistentSnapshotFrequencyInHours"] = hvrbpi.ApplicationConsistentSnapshotFrequencyInHours
6432 }
6433 if hvrbpi.Compression != nil {
6434 objectMap["compression"] = hvrbpi.Compression
6435 }
6436 if hvrbpi.InitialReplicationMethod != nil {
6437 objectMap["initialReplicationMethod"] = hvrbpi.InitialReplicationMethod
6438 }
6439 if hvrbpi.OnlineReplicationStartTime != nil {
6440 objectMap["onlineReplicationStartTime"] = hvrbpi.OnlineReplicationStartTime
6441 }
6442 if hvrbpi.OfflineReplicationImportPath != nil {
6443 objectMap["offlineReplicationImportPath"] = hvrbpi.OfflineReplicationImportPath
6444 }
6445 if hvrbpi.OfflineReplicationExportPath != nil {
6446 objectMap["offlineReplicationExportPath"] = hvrbpi.OfflineReplicationExportPath
6447 }
6448 if hvrbpi.ReplicationPort != nil {
6449 objectMap["replicationPort"] = hvrbpi.ReplicationPort
6450 }
6451 if hvrbpi.AllowedAuthenticationType != nil {
6452 objectMap["allowedAuthenticationType"] = hvrbpi.AllowedAuthenticationType
6453 }
6454 if hvrbpi.ReplicaDeletion != nil {
6455 objectMap["replicaDeletion"] = hvrbpi.ReplicaDeletion
6456 }
6457 if hvrbpi.InstanceType != "" {
6458 objectMap["instanceType"] = hvrbpi.InstanceType
6459 }
6460 return json.Marshal(objectMap)
6461 }
6462
6463
6464 func (hvrbpi HyperVReplicaBluePolicyInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) {
6465 return nil, false
6466 }
6467
6468
6469 func (hvrbpi HyperVReplicaBluePolicyInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) {
6470 return nil, false
6471 }
6472
6473
6474 func (hvrbpi HyperVReplicaBluePolicyInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) {
6475 return &hvrbpi, true
6476 }
6477
6478
6479 func (hvrbpi HyperVReplicaBluePolicyInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) {
6480 return nil, false
6481 }
6482
6483
6484 func (hvrbpi HyperVReplicaBluePolicyInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) {
6485 return nil, false
6486 }
6487
6488
6489 func (hvrbpi HyperVReplicaBluePolicyInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) {
6490 return nil, false
6491 }
6492
6493
6494 func (hvrbpi HyperVReplicaBluePolicyInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) {
6495 return nil, false
6496 }
6497
6498
6499 func (hvrbpi HyperVReplicaBluePolicyInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) {
6500 return nil, false
6501 }
6502
6503
6504 func (hvrbpi HyperVReplicaBluePolicyInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) {
6505 return &hvrbpi, true
6506 }
6507
6508
6509 type HyperVReplicaBlueReplicationDetails struct {
6510
6511 LastReplicatedTime *date.Time `json:"lastReplicatedTime,omitempty"`
6512
6513 VMNics *[]VMNicDetails `json:"vmNics,omitempty"`
6514
6515 VMID *string `json:"vmId,omitempty"`
6516
6517 VMProtectionState *string `json:"vmProtectionState,omitempty"`
6518
6519 VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"`
6520
6521 InitialReplicationDetails *InitialReplicationDetails `json:"initialReplicationDetails,omitempty"`
6522
6523 VMDiskDetails *[]DiskDetails `json:"vMDiskDetails,omitempty"`
6524
6525 InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"`
6526 }
6527
6528
6529 func (hvrbrd HyperVReplicaBlueReplicationDetails) MarshalJSON() ([]byte, error) {
6530 hvrbrd.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012R2
6531 objectMap := make(map[string]interface{})
6532 if hvrbrd.LastReplicatedTime != nil {
6533 objectMap["lastReplicatedTime"] = hvrbrd.LastReplicatedTime
6534 }
6535 if hvrbrd.VMNics != nil {
6536 objectMap["vmNics"] = hvrbrd.VMNics
6537 }
6538 if hvrbrd.VMID != nil {
6539 objectMap["vmId"] = hvrbrd.VMID
6540 }
6541 if hvrbrd.VMProtectionState != nil {
6542 objectMap["vmProtectionState"] = hvrbrd.VMProtectionState
6543 }
6544 if hvrbrd.VMProtectionStateDescription != nil {
6545 objectMap["vmProtectionStateDescription"] = hvrbrd.VMProtectionStateDescription
6546 }
6547 if hvrbrd.InitialReplicationDetails != nil {
6548 objectMap["initialReplicationDetails"] = hvrbrd.InitialReplicationDetails
6549 }
6550 if hvrbrd.VMDiskDetails != nil {
6551 objectMap["vMDiskDetails"] = hvrbrd.VMDiskDetails
6552 }
6553 if hvrbrd.InstanceType != "" {
6554 objectMap["instanceType"] = hvrbrd.InstanceType
6555 }
6556 return json.Marshal(objectMap)
6557 }
6558
6559
6560 func (hvrbrd HyperVReplicaBlueReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) {
6561 return nil, false
6562 }
6563
6564
6565 func (hvrbrd HyperVReplicaBlueReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) {
6566 return nil, false
6567 }
6568
6569
6570 func (hvrbrd HyperVReplicaBlueReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) {
6571 return nil, false
6572 }
6573
6574
6575 func (hvrbrd HyperVReplicaBlueReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) {
6576 return &hvrbrd, true
6577 }
6578
6579
6580 func (hvrbrd HyperVReplicaBlueReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) {
6581 return nil, false
6582 }
6583
6584
6585 func (hvrbrd HyperVReplicaBlueReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) {
6586 return nil, false
6587 }
6588
6589
6590 func (hvrbrd HyperVReplicaBlueReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) {
6591 return nil, false
6592 }
6593
6594
6595 func (hvrbrd HyperVReplicaBlueReplicationDetails) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) {
6596 return nil, false
6597 }
6598
6599
6600 func (hvrbrd HyperVReplicaBlueReplicationDetails) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) {
6601 return &hvrbrd, true
6602 }
6603
6604
6605 type HyperVReplicaPolicyDetails struct {
6606
6607 RecoveryPoints *int32 `json:"recoveryPoints,omitempty"`
6608
6609 ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"`
6610
6611 Compression *string `json:"compression,omitempty"`
6612
6613 InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"`
6614
6615 OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"`
6616
6617 OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"`
6618
6619 OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"`
6620
6621 ReplicationPort *int32 `json:"replicationPort,omitempty"`
6622
6623 AllowedAuthenticationType *int32 `json:"allowedAuthenticationType,omitempty"`
6624
6625 ReplicaDeletionOption *string `json:"replicaDeletionOption,omitempty"`
6626
6627 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"`
6628 }
6629
6630
6631 func (hvrpd HyperVReplicaPolicyDetails) MarshalJSON() ([]byte, error) {
6632 hvrpd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012
6633 objectMap := make(map[string]interface{})
6634 if hvrpd.RecoveryPoints != nil {
6635 objectMap["recoveryPoints"] = hvrpd.RecoveryPoints
6636 }
6637 if hvrpd.ApplicationConsistentSnapshotFrequencyInHours != nil {
6638 objectMap["applicationConsistentSnapshotFrequencyInHours"] = hvrpd.ApplicationConsistentSnapshotFrequencyInHours
6639 }
6640 if hvrpd.Compression != nil {
6641 objectMap["compression"] = hvrpd.Compression
6642 }
6643 if hvrpd.InitialReplicationMethod != nil {
6644 objectMap["initialReplicationMethod"] = hvrpd.InitialReplicationMethod
6645 }
6646 if hvrpd.OnlineReplicationStartTime != nil {
6647 objectMap["onlineReplicationStartTime"] = hvrpd.OnlineReplicationStartTime
6648 }
6649 if hvrpd.OfflineReplicationImportPath != nil {
6650 objectMap["offlineReplicationImportPath"] = hvrpd.OfflineReplicationImportPath
6651 }
6652 if hvrpd.OfflineReplicationExportPath != nil {
6653 objectMap["offlineReplicationExportPath"] = hvrpd.OfflineReplicationExportPath
6654 }
6655 if hvrpd.ReplicationPort != nil {
6656 objectMap["replicationPort"] = hvrpd.ReplicationPort
6657 }
6658 if hvrpd.AllowedAuthenticationType != nil {
6659 objectMap["allowedAuthenticationType"] = hvrpd.AllowedAuthenticationType
6660 }
6661 if hvrpd.ReplicaDeletionOption != nil {
6662 objectMap["replicaDeletionOption"] = hvrpd.ReplicaDeletionOption
6663 }
6664 if hvrpd.InstanceType != "" {
6665 objectMap["instanceType"] = hvrpd.InstanceType
6666 }
6667 return json.Marshal(objectMap)
6668 }
6669
6670
6671 func (hvrpd HyperVReplicaPolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) {
6672 return nil, false
6673 }
6674
6675
6676 func (hvrpd HyperVReplicaPolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) {
6677 return nil, false
6678 }
6679
6680
6681 func (hvrpd HyperVReplicaPolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) {
6682 return nil, false
6683 }
6684
6685
6686 func (hvrpd HyperVReplicaPolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) {
6687 return nil, false
6688 }
6689
6690
6691 func (hvrpd HyperVReplicaPolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) {
6692 return &hvrpd, true
6693 }
6694
6695
6696 func (hvrpd HyperVReplicaPolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) {
6697 return nil, false
6698 }
6699
6700
6701 func (hvrpd HyperVReplicaPolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) {
6702 return nil, false
6703 }
6704
6705
6706 func (hvrpd HyperVReplicaPolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) {
6707 return nil, false
6708 }
6709
6710
6711 func (hvrpd HyperVReplicaPolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) {
6712 return nil, false
6713 }
6714
6715
6716 func (hvrpd HyperVReplicaPolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) {
6717 return nil, false
6718 }
6719
6720
6721 func (hvrpd HyperVReplicaPolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) {
6722 return nil, false
6723 }
6724
6725
6726 func (hvrpd HyperVReplicaPolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) {
6727 return &hvrpd, true
6728 }
6729
6730
6731 type HyperVReplicaPolicyInput struct {
6732
6733 RecoveryPoints *int32 `json:"recoveryPoints,omitempty"`
6734
6735 ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"`
6736
6737 Compression *string `json:"compression,omitempty"`
6738
6739 InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"`
6740
6741 OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"`
6742
6743 OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"`
6744
6745 OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"`
6746
6747 ReplicationPort *int32 `json:"replicationPort,omitempty"`
6748
6749 AllowedAuthenticationType *int32 `json:"allowedAuthenticationType,omitempty"`
6750
6751 ReplicaDeletion *string `json:"replicaDeletion,omitempty"`
6752
6753 InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"`
6754 }
6755
6756
6757 func (hvrpi HyperVReplicaPolicyInput) MarshalJSON() ([]byte, error) {
6758 hvrpi.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012
6759 objectMap := make(map[string]interface{})
6760 if hvrpi.RecoveryPoints != nil {
6761 objectMap["recoveryPoints"] = hvrpi.RecoveryPoints
6762 }
6763 if hvrpi.ApplicationConsistentSnapshotFrequencyInHours != nil {
6764 objectMap["applicationConsistentSnapshotFrequencyInHours"] = hvrpi.ApplicationConsistentSnapshotFrequencyInHours
6765 }
6766 if hvrpi.Compression != nil {
6767 objectMap["compression"] = hvrpi.Compression
6768 }
6769 if hvrpi.InitialReplicationMethod != nil {
6770 objectMap["initialReplicationMethod"] = hvrpi.InitialReplicationMethod
6771 }
6772 if hvrpi.OnlineReplicationStartTime != nil {
6773 objectMap["onlineReplicationStartTime"] = hvrpi.OnlineReplicationStartTime
6774 }
6775 if hvrpi.OfflineReplicationImportPath != nil {
6776 objectMap["offlineReplicationImportPath"] = hvrpi.OfflineReplicationImportPath
6777 }
6778 if hvrpi.OfflineReplicationExportPath != nil {
6779 objectMap["offlineReplicationExportPath"] = hvrpi.OfflineReplicationExportPath
6780 }
6781 if hvrpi.ReplicationPort != nil {
6782 objectMap["replicationPort"] = hvrpi.ReplicationPort
6783 }
6784 if hvrpi.AllowedAuthenticationType != nil {
6785 objectMap["allowedAuthenticationType"] = hvrpi.AllowedAuthenticationType
6786 }
6787 if hvrpi.ReplicaDeletion != nil {
6788 objectMap["replicaDeletion"] = hvrpi.ReplicaDeletion
6789 }
6790 if hvrpi.InstanceType != "" {
6791 objectMap["instanceType"] = hvrpi.InstanceType
6792 }
6793 return json.Marshal(objectMap)
6794 }
6795
6796
6797 func (hvrpi HyperVReplicaPolicyInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) {
6798 return nil, false
6799 }
6800
6801
6802 func (hvrpi HyperVReplicaPolicyInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) {
6803 return nil, false
6804 }
6805
6806
6807 func (hvrpi HyperVReplicaPolicyInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) {
6808 return nil, false
6809 }
6810
6811
6812 func (hvrpi HyperVReplicaPolicyInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) {
6813 return &hvrpi, true
6814 }
6815
6816
6817 func (hvrpi HyperVReplicaPolicyInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) {
6818 return nil, false
6819 }
6820
6821
6822 func (hvrpi HyperVReplicaPolicyInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) {
6823 return nil, false
6824 }
6825
6826
6827 func (hvrpi HyperVReplicaPolicyInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) {
6828 return nil, false
6829 }
6830
6831
6832 func (hvrpi HyperVReplicaPolicyInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) {
6833 return nil, false
6834 }
6835
6836
6837 func (hvrpi HyperVReplicaPolicyInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) {
6838 return &hvrpi, true
6839 }
6840
6841
6842 type HyperVReplicaReplicationDetails struct {
6843
6844 LastReplicatedTime *date.Time `json:"lastReplicatedTime,omitempty"`
6845
6846 VMNics *[]VMNicDetails `json:"vmNics,omitempty"`
6847
6848 VMID *string `json:"vmId,omitempty"`
6849
6850 VMProtectionState *string `json:"vmProtectionState,omitempty"`
6851
6852 VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"`
6853
6854 InitialReplicationDetails *InitialReplicationDetails `json:"initialReplicationDetails,omitempty"`
6855
6856 VMDiskDetails *[]DiskDetails `json:"vMDiskDetails,omitempty"`
6857
6858 InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"`
6859 }
6860
6861
6862 func (hvrrd HyperVReplicaReplicationDetails) MarshalJSON() ([]byte, error) {
6863 hvrrd.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012
6864 objectMap := make(map[string]interface{})
6865 if hvrrd.LastReplicatedTime != nil {
6866 objectMap["lastReplicatedTime"] = hvrrd.LastReplicatedTime
6867 }
6868 if hvrrd.VMNics != nil {
6869 objectMap["vmNics"] = hvrrd.VMNics
6870 }
6871 if hvrrd.VMID != nil {
6872 objectMap["vmId"] = hvrrd.VMID
6873 }
6874 if hvrrd.VMProtectionState != nil {
6875 objectMap["vmProtectionState"] = hvrrd.VMProtectionState
6876 }
6877 if hvrrd.VMProtectionStateDescription != nil {
6878 objectMap["vmProtectionStateDescription"] = hvrrd.VMProtectionStateDescription
6879 }
6880 if hvrrd.InitialReplicationDetails != nil {
6881 objectMap["initialReplicationDetails"] = hvrrd.InitialReplicationDetails
6882 }
6883 if hvrrd.VMDiskDetails != nil {
6884 objectMap["vMDiskDetails"] = hvrrd.VMDiskDetails
6885 }
6886 if hvrrd.InstanceType != "" {
6887 objectMap["instanceType"] = hvrrd.InstanceType
6888 }
6889 return json.Marshal(objectMap)
6890 }
6891
6892
6893 func (hvrrd HyperVReplicaReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) {
6894 return nil, false
6895 }
6896
6897
6898 func (hvrrd HyperVReplicaReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) {
6899 return nil, false
6900 }
6901
6902
6903 func (hvrrd HyperVReplicaReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) {
6904 return nil, false
6905 }
6906
6907
6908 func (hvrrd HyperVReplicaReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) {
6909 return nil, false
6910 }
6911
6912
6913 func (hvrrd HyperVReplicaReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) {
6914 return &hvrrd, true
6915 }
6916
6917
6918 func (hvrrd HyperVReplicaReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) {
6919 return nil, false
6920 }
6921
6922
6923 func (hvrrd HyperVReplicaReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) {
6924 return nil, false
6925 }
6926
6927
6928 func (hvrrd HyperVReplicaReplicationDetails) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) {
6929 return nil, false
6930 }
6931
6932
6933 func (hvrrd HyperVReplicaReplicationDetails) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) {
6934 return &hvrrd, true
6935 }
6936
6937
6938 type HyperVSiteDetails struct {
6939
6940 InstanceType InstanceTypeBasicFabricSpecificDetails `json:"instanceType,omitempty"`
6941 }
6942
6943
6944 func (hvsd HyperVSiteDetails) MarshalJSON() ([]byte, error) {
6945 hvsd.InstanceType = InstanceTypeBasicFabricSpecificDetailsInstanceTypeHyperVSite
6946 objectMap := make(map[string]interface{})
6947 if hvsd.InstanceType != "" {
6948 objectMap["instanceType"] = hvsd.InstanceType
6949 }
6950 return json.Marshal(objectMap)
6951 }
6952
6953
6954 func (hvsd HyperVSiteDetails) AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool) {
6955 return nil, false
6956 }
6957
6958
6959 func (hvsd HyperVSiteDetails) AsHyperVSiteDetails() (*HyperVSiteDetails, bool) {
6960 return &hvsd, true
6961 }
6962
6963
6964 func (hvsd HyperVSiteDetails) AsVmmDetails() (*VmmDetails, bool) {
6965 return nil, false
6966 }
6967
6968
6969 func (hvsd HyperVSiteDetails) AsVMwareDetails() (*VMwareDetails, bool) {
6970 return nil, false
6971 }
6972
6973
6974 func (hvsd HyperVSiteDetails) AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool) {
6975 return nil, false
6976 }
6977
6978
6979 func (hvsd HyperVSiteDetails) AsFabricSpecificDetails() (*FabricSpecificDetails, bool) {
6980 return nil, false
6981 }
6982
6983
6984 func (hvsd HyperVSiteDetails) AsBasicFabricSpecificDetails() (BasicFabricSpecificDetails, bool) {
6985 return &hvsd, true
6986 }
6987
6988
6989 type HyperVVirtualMachineDetails struct {
6990
6991 SourceItemID *string `json:"sourceItemId,omitempty"`
6992
6993 Generation *string `json:"generation,omitempty"`
6994
6995 OsDetails *OSDetails `json:"osDetails,omitempty"`
6996
6997 DiskDetails *[]DiskDetails `json:"diskDetails,omitempty"`
6998
6999 HasPhysicalDisk PresenceStatus `json:"hasPhysicalDisk,omitempty"`
7000
7001 HasFibreChannelAdapter PresenceStatus `json:"hasFibreChannelAdapter,omitempty"`
7002
7003 HasSharedVhd PresenceStatus `json:"hasSharedVhd,omitempty"`
7004
7005 InstanceType InstanceTypeBasicConfigurationSettings `json:"instanceType,omitempty"`
7006 }
7007
7008
7009 func (hvvmd HyperVVirtualMachineDetails) MarshalJSON() ([]byte, error) {
7010 hvvmd.InstanceType = InstanceTypeHyperVVirtualMachine
7011 objectMap := make(map[string]interface{})
7012 if hvvmd.SourceItemID != nil {
7013 objectMap["sourceItemId"] = hvvmd.SourceItemID
7014 }
7015 if hvvmd.Generation != nil {
7016 objectMap["generation"] = hvvmd.Generation
7017 }
7018 if hvvmd.OsDetails != nil {
7019 objectMap["osDetails"] = hvvmd.OsDetails
7020 }
7021 if hvvmd.DiskDetails != nil {
7022 objectMap["diskDetails"] = hvvmd.DiskDetails
7023 }
7024 if hvvmd.HasPhysicalDisk != "" {
7025 objectMap["hasPhysicalDisk"] = hvvmd.HasPhysicalDisk
7026 }
7027 if hvvmd.HasFibreChannelAdapter != "" {
7028 objectMap["hasFibreChannelAdapter"] = hvvmd.HasFibreChannelAdapter
7029 }
7030 if hvvmd.HasSharedVhd != "" {
7031 objectMap["hasSharedVhd"] = hvvmd.HasSharedVhd
7032 }
7033 if hvvmd.InstanceType != "" {
7034 objectMap["instanceType"] = hvvmd.InstanceType
7035 }
7036 return json.Marshal(objectMap)
7037 }
7038
7039
7040 func (hvvmd HyperVVirtualMachineDetails) AsHyperVVirtualMachineDetails() (*HyperVVirtualMachineDetails, bool) {
7041 return &hvvmd, true
7042 }
7043
7044
7045 func (hvvmd HyperVVirtualMachineDetails) AsReplicationGroupDetails() (*ReplicationGroupDetails, bool) {
7046 return nil, false
7047 }
7048
7049
7050 func (hvvmd HyperVVirtualMachineDetails) AsVmmVirtualMachineDetails() (*VmmVirtualMachineDetails, bool) {
7051 return nil, false
7052 }
7053
7054
7055 func (hvvmd HyperVVirtualMachineDetails) AsVMwareVirtualMachineDetails() (*VMwareVirtualMachineDetails, bool) {
7056 return nil, false
7057 }
7058
7059
7060 func (hvvmd HyperVVirtualMachineDetails) AsConfigurationSettings() (*ConfigurationSettings, bool) {
7061 return nil, false
7062 }
7063
7064
7065 func (hvvmd HyperVVirtualMachineDetails) AsBasicConfigurationSettings() (BasicConfigurationSettings, bool) {
7066 return &hvvmd, true
7067 }
7068
7069
7070 type IdentityProviderDetails struct {
7071
7072 TenantID *string `json:"tenantId,omitempty"`
7073
7074 ApplicationID *string `json:"applicationId,omitempty"`
7075
7076 ObjectID *string `json:"objectId,omitempty"`
7077
7078 Audience *string `json:"audience,omitempty"`
7079
7080 AadAuthority *string `json:"aadAuthority,omitempty"`
7081 }
7082
7083
7084 type IdentityProviderInput struct {
7085
7086 TenantID *string `json:"tenantId,omitempty"`
7087
7088 ApplicationID *string `json:"applicationId,omitempty"`
7089
7090 ObjectID *string `json:"objectId,omitempty"`
7091
7092 Audience *string `json:"audience,omitempty"`
7093
7094 AadAuthority *string `json:"aadAuthority,omitempty"`
7095 }
7096
7097
7098
7099 type InconsistentVMDetails struct {
7100
7101 VMName *string `json:"vmName,omitempty"`
7102
7103 CloudName *string `json:"cloudName,omitempty"`
7104
7105 Details *[]string `json:"details,omitempty"`
7106
7107 ErrorIds *[]string `json:"errorIds,omitempty"`
7108 }
7109
7110
7111 type InitialReplicationDetails struct {
7112
7113 InitialReplicationType *string `json:"initialReplicationType,omitempty"`
7114
7115 InitialReplicationProgressPercentage *string `json:"initialReplicationProgressPercentage,omitempty"`
7116 }
7117
7118
7119 type InlineWorkflowTaskDetails struct {
7120
7121 WorkflowIds *[]string `json:"workflowIds,omitempty"`
7122
7123 ChildTasks *[]ASRTask `json:"childTasks,omitempty"`
7124
7125 InstanceType InstanceTypeBasicGroupTaskDetails `json:"instanceType,omitempty"`
7126 }
7127
7128
7129 func (iwtd InlineWorkflowTaskDetails) MarshalJSON() ([]byte, error) {
7130 iwtd.InstanceType = InstanceTypeInlineWorkflowTaskDetails
7131 objectMap := make(map[string]interface{})
7132 if iwtd.WorkflowIds != nil {
7133 objectMap["workflowIds"] = iwtd.WorkflowIds
7134 }
7135 if iwtd.ChildTasks != nil {
7136 objectMap["childTasks"] = iwtd.ChildTasks
7137 }
7138 if iwtd.InstanceType != "" {
7139 objectMap["instanceType"] = iwtd.InstanceType
7140 }
7141 return json.Marshal(objectMap)
7142 }
7143
7144
7145 func (iwtd InlineWorkflowTaskDetails) AsInlineWorkflowTaskDetails() (*InlineWorkflowTaskDetails, bool) {
7146 return &iwtd, true
7147 }
7148
7149
7150 func (iwtd InlineWorkflowTaskDetails) AsRecoveryPlanGroupTaskDetails() (*RecoveryPlanGroupTaskDetails, bool) {
7151 return nil, false
7152 }
7153
7154
7155 func (iwtd InlineWorkflowTaskDetails) AsRecoveryPlanShutdownGroupTaskDetails() (*RecoveryPlanShutdownGroupTaskDetails, bool) {
7156 return nil, false
7157 }
7158
7159
7160 func (iwtd InlineWorkflowTaskDetails) AsGroupTaskDetails() (*GroupTaskDetails, bool) {
7161 return nil, false
7162 }
7163
7164
7165 func (iwtd InlineWorkflowTaskDetails) AsBasicGroupTaskDetails() (BasicGroupTaskDetails, bool) {
7166 return &iwtd, true
7167 }
7168
7169
7170 type InMageAgentDetails struct {
7171
7172 AgentVersion *string `json:"agentVersion,omitempty"`
7173
7174 AgentUpdateStatus *string `json:"agentUpdateStatus,omitempty"`
7175
7176 PostUpdateRebootStatus *string `json:"postUpdateRebootStatus,omitempty"`
7177
7178 AgentExpiryDate *date.Time `json:"agentExpiryDate,omitempty"`
7179 }
7180
7181
7182 type InMageAgentVersionDetails struct {
7183
7184 PostUpdateRebootStatus *string `json:"postUpdateRebootStatus,omitempty"`
7185
7186 Version *string `json:"version,omitempty"`
7187
7188 ExpiryDate *date.Time `json:"expiryDate,omitempty"`
7189
7190 Status AgentVersionStatus `json:"status,omitempty"`
7191 }
7192
7193
7194 type InMageAzureV2ApplyRecoveryPointInput struct {
7195
7196 VaultLocation *string `json:"vaultLocation,omitempty"`
7197
7198 InstanceType InstanceType `json:"instanceType,omitempty"`
7199 }
7200
7201
7202 func (imavarpi InMageAzureV2ApplyRecoveryPointInput) MarshalJSON() ([]byte, error) {
7203 imavarpi.InstanceType = InstanceTypeInMageAzureV2
7204 objectMap := make(map[string]interface{})
7205 if imavarpi.VaultLocation != nil {
7206 objectMap["vaultLocation"] = imavarpi.VaultLocation
7207 }
7208 if imavarpi.InstanceType != "" {
7209 objectMap["instanceType"] = imavarpi.InstanceType
7210 }
7211 return json.Marshal(objectMap)
7212 }
7213
7214
7215 func (imavarpi InMageAzureV2ApplyRecoveryPointInput) AsA2AApplyRecoveryPointInput() (*A2AApplyRecoveryPointInput, bool) {
7216 return nil, false
7217 }
7218
7219
7220 func (imavarpi InMageAzureV2ApplyRecoveryPointInput) AsHyperVReplicaAzureApplyRecoveryPointInput() (*HyperVReplicaAzureApplyRecoveryPointInput, bool) {
7221 return nil, false
7222 }
7223
7224
7225 func (imavarpi InMageAzureV2ApplyRecoveryPointInput) AsInMageAzureV2ApplyRecoveryPointInput() (*InMageAzureV2ApplyRecoveryPointInput, bool) {
7226 return &imavarpi, true
7227 }
7228
7229
7230 func (imavarpi InMageAzureV2ApplyRecoveryPointInput) AsApplyRecoveryPointProviderSpecificInput() (*ApplyRecoveryPointProviderSpecificInput, bool) {
7231 return nil, false
7232 }
7233
7234
7235 func (imavarpi InMageAzureV2ApplyRecoveryPointInput) AsBasicApplyRecoveryPointProviderSpecificInput() (BasicApplyRecoveryPointProviderSpecificInput, bool) {
7236 return &imavarpi, true
7237 }
7238
7239
7240 type InMageAzureV2EnableProtectionInput struct {
7241
7242 MasterTargetID *string `json:"masterTargetId,omitempty"`
7243
7244 ProcessServerID *string `json:"processServerId,omitempty"`
7245
7246 StorageAccountID *string `json:"storageAccountId,omitempty"`
7247
7248 RunAsAccountID *string `json:"runAsAccountId,omitempty"`
7249
7250 MultiVMGroupID *string `json:"multiVmGroupId,omitempty"`
7251
7252 MultiVMGroupName *string `json:"multiVmGroupName,omitempty"`
7253
7254 DisksToInclude *[]string `json:"disksToInclude,omitempty"`
7255
7256 TargetAzureNetworkID *string `json:"targetAzureNetworkId,omitempty"`
7257
7258 TargetAzureSubnetID *string `json:"targetAzureSubnetId,omitempty"`
7259
7260 EnableRdpOnTargetOption *string `json:"enableRdpOnTargetOption,omitempty"`
7261
7262 TargetAzureVMName *string `json:"targetAzureVmName,omitempty"`
7263
7264 LogStorageAccountID *string `json:"logStorageAccountId,omitempty"`
7265
7266 TargetAzureV1ResourceGroupID *string `json:"targetAzureV1ResourceGroupId,omitempty"`
7267
7268 TargetAzureV2ResourceGroupID *string `json:"targetAzureV2ResourceGroupId,omitempty"`
7269
7270 UseManagedDisks *string `json:"useManagedDisks,omitempty"`
7271
7272 InstanceType InstanceTypeBasicEnableProtectionProviderSpecificInput `json:"instanceType,omitempty"`
7273 }
7274
7275
7276 func (imavepi InMageAzureV2EnableProtectionInput) MarshalJSON() ([]byte, error) {
7277 imavepi.InstanceType = InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMageAzureV2
7278 objectMap := make(map[string]interface{})
7279 if imavepi.MasterTargetID != nil {
7280 objectMap["masterTargetId"] = imavepi.MasterTargetID
7281 }
7282 if imavepi.ProcessServerID != nil {
7283 objectMap["processServerId"] = imavepi.ProcessServerID
7284 }
7285 if imavepi.StorageAccountID != nil {
7286 objectMap["storageAccountId"] = imavepi.StorageAccountID
7287 }
7288 if imavepi.RunAsAccountID != nil {
7289 objectMap["runAsAccountId"] = imavepi.RunAsAccountID
7290 }
7291 if imavepi.MultiVMGroupID != nil {
7292 objectMap["multiVmGroupId"] = imavepi.MultiVMGroupID
7293 }
7294 if imavepi.MultiVMGroupName != nil {
7295 objectMap["multiVmGroupName"] = imavepi.MultiVMGroupName
7296 }
7297 if imavepi.DisksToInclude != nil {
7298 objectMap["disksToInclude"] = imavepi.DisksToInclude
7299 }
7300 if imavepi.TargetAzureNetworkID != nil {
7301 objectMap["targetAzureNetworkId"] = imavepi.TargetAzureNetworkID
7302 }
7303 if imavepi.TargetAzureSubnetID != nil {
7304 objectMap["targetAzureSubnetId"] = imavepi.TargetAzureSubnetID
7305 }
7306 if imavepi.EnableRdpOnTargetOption != nil {
7307 objectMap["enableRdpOnTargetOption"] = imavepi.EnableRdpOnTargetOption
7308 }
7309 if imavepi.TargetAzureVMName != nil {
7310 objectMap["targetAzureVmName"] = imavepi.TargetAzureVMName
7311 }
7312 if imavepi.LogStorageAccountID != nil {
7313 objectMap["logStorageAccountId"] = imavepi.LogStorageAccountID
7314 }
7315 if imavepi.TargetAzureV1ResourceGroupID != nil {
7316 objectMap["targetAzureV1ResourceGroupId"] = imavepi.TargetAzureV1ResourceGroupID
7317 }
7318 if imavepi.TargetAzureV2ResourceGroupID != nil {
7319 objectMap["targetAzureV2ResourceGroupId"] = imavepi.TargetAzureV2ResourceGroupID
7320 }
7321 if imavepi.UseManagedDisks != nil {
7322 objectMap["useManagedDisks"] = imavepi.UseManagedDisks
7323 }
7324 if imavepi.InstanceType != "" {
7325 objectMap["instanceType"] = imavepi.InstanceType
7326 }
7327 return json.Marshal(objectMap)
7328 }
7329
7330
7331 func (imavepi InMageAzureV2EnableProtectionInput) AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool) {
7332 return nil, false
7333 }
7334
7335
7336 func (imavepi InMageAzureV2EnableProtectionInput) AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool) {
7337 return nil, false
7338 }
7339
7340
7341 func (imavepi InMageAzureV2EnableProtectionInput) AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool) {
7342 return &imavepi, true
7343 }
7344
7345
7346 func (imavepi InMageAzureV2EnableProtectionInput) AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool) {
7347 return nil, false
7348 }
7349
7350
7351 func (imavepi InMageAzureV2EnableProtectionInput) AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool) {
7352 return nil, false
7353 }
7354
7355
7356 func (imavepi InMageAzureV2EnableProtectionInput) AsEnableProtectionProviderSpecificInput() (*EnableProtectionProviderSpecificInput, bool) {
7357 return nil, false
7358 }
7359
7360
7361 func (imavepi InMageAzureV2EnableProtectionInput) AsBasicEnableProtectionProviderSpecificInput() (BasicEnableProtectionProviderSpecificInput, bool) {
7362 return &imavepi, true
7363 }
7364
7365
7366 type InMageAzureV2EventDetails struct {
7367
7368 EventType *string `json:"eventType,omitempty"`
7369
7370 Category *string `json:"category,omitempty"`
7371
7372 Component *string `json:"component,omitempty"`
7373
7374 CorrectiveAction *string `json:"correctiveAction,omitempty"`
7375
7376 Details *string `json:"details,omitempty"`
7377
7378 Summary *string `json:"summary,omitempty"`
7379
7380 SiteName *string `json:"siteName,omitempty"`
7381
7382 InstanceType InstanceTypeBasicEventProviderSpecificDetails `json:"instanceType,omitempty"`
7383 }
7384
7385
7386 func (imaved InMageAzureV2EventDetails) MarshalJSON() ([]byte, error) {
7387 imaved.InstanceType = InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageAzureV2
7388 objectMap := make(map[string]interface{})
7389 if imaved.EventType != nil {
7390 objectMap["eventType"] = imaved.EventType
7391 }
7392 if imaved.Category != nil {
7393 objectMap["category"] = imaved.Category
7394 }
7395 if imaved.Component != nil {
7396 objectMap["component"] = imaved.Component
7397 }
7398 if imaved.CorrectiveAction != nil {
7399 objectMap["correctiveAction"] = imaved.CorrectiveAction
7400 }
7401 if imaved.Details != nil {
7402 objectMap["details"] = imaved.Details
7403 }
7404 if imaved.Summary != nil {
7405 objectMap["summary"] = imaved.Summary
7406 }
7407 if imaved.SiteName != nil {
7408 objectMap["siteName"] = imaved.SiteName
7409 }
7410 if imaved.InstanceType != "" {
7411 objectMap["instanceType"] = imaved.InstanceType
7412 }
7413 return json.Marshal(objectMap)
7414 }
7415
7416
7417 func (imaved InMageAzureV2EventDetails) AsA2AEventDetails() (*A2AEventDetails, bool) {
7418 return nil, false
7419 }
7420
7421
7422 func (imaved InMageAzureV2EventDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) {
7423 return nil, false
7424 }
7425
7426
7427 func (imaved InMageAzureV2EventDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) {
7428 return nil, false
7429 }
7430
7431
7432 func (imaved InMageAzureV2EventDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) {
7433 return nil, false
7434 }
7435
7436
7437 func (imaved InMageAzureV2EventDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) {
7438 return nil, false
7439 }
7440
7441
7442 func (imaved InMageAzureV2EventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) {
7443 return &imaved, true
7444 }
7445
7446
7447 func (imaved InMageAzureV2EventDetails) AsVMwareCbtEventDetails() (*VMwareCbtEventDetails, bool) {
7448 return nil, false
7449 }
7450
7451
7452 func (imaved InMageAzureV2EventDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) {
7453 return nil, false
7454 }
7455
7456
7457 func (imaved InMageAzureV2EventDetails) AsBasicEventProviderSpecificDetails() (BasicEventProviderSpecificDetails, bool) {
7458 return &imaved, true
7459 }
7460
7461
7462 type InMageAzureV2FailoverProviderInput struct {
7463
7464 VaultLocation *string `json:"vaultLocation,omitempty"`
7465
7466 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
7467
7468 InstanceType InstanceTypeBasicProviderSpecificFailoverInput `json:"instanceType,omitempty"`
7469 }
7470
7471
7472 func (imavfpi InMageAzureV2FailoverProviderInput) MarshalJSON() ([]byte, error) {
7473 imavfpi.InstanceType = InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMageAzureV2
7474 objectMap := make(map[string]interface{})
7475 if imavfpi.VaultLocation != nil {
7476 objectMap["vaultLocation"] = imavfpi.VaultLocation
7477 }
7478 if imavfpi.RecoveryPointID != nil {
7479 objectMap["recoveryPointId"] = imavfpi.RecoveryPointID
7480 }
7481 if imavfpi.InstanceType != "" {
7482 objectMap["instanceType"] = imavfpi.InstanceType
7483 }
7484 return json.Marshal(objectMap)
7485 }
7486
7487
7488 func (imavfpi InMageAzureV2FailoverProviderInput) AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool) {
7489 return nil, false
7490 }
7491
7492
7493 func (imavfpi InMageAzureV2FailoverProviderInput) AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool) {
7494 return nil, false
7495 }
7496
7497
7498 func (imavfpi InMageAzureV2FailoverProviderInput) AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool) {
7499 return nil, false
7500 }
7501
7502
7503 func (imavfpi InMageAzureV2FailoverProviderInput) AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool) {
7504 return &imavfpi, true
7505 }
7506
7507
7508 func (imavfpi InMageAzureV2FailoverProviderInput) AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool) {
7509 return nil, false
7510 }
7511
7512
7513 func (imavfpi InMageAzureV2FailoverProviderInput) AsProviderSpecificFailoverInput() (*ProviderSpecificFailoverInput, bool) {
7514 return nil, false
7515 }
7516
7517
7518 func (imavfpi InMageAzureV2FailoverProviderInput) AsBasicProviderSpecificFailoverInput() (BasicProviderSpecificFailoverInput, bool) {
7519 return &imavfpi, true
7520 }
7521
7522
7523 type InMageAzureV2PolicyDetails struct {
7524
7525 CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"`
7526
7527 RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"`
7528
7529 RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"`
7530
7531 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"`
7532
7533 MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"`
7534
7535 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"`
7536 }
7537
7538
7539 func (imavpd InMageAzureV2PolicyDetails) MarshalJSON() ([]byte, error) {
7540 imavpd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2
7541 objectMap := make(map[string]interface{})
7542 if imavpd.CrashConsistentFrequencyInMinutes != nil {
7543 objectMap["crashConsistentFrequencyInMinutes"] = imavpd.CrashConsistentFrequencyInMinutes
7544 }
7545 if imavpd.RecoveryPointThresholdInMinutes != nil {
7546 objectMap["recoveryPointThresholdInMinutes"] = imavpd.RecoveryPointThresholdInMinutes
7547 }
7548 if imavpd.RecoveryPointHistory != nil {
7549 objectMap["recoveryPointHistory"] = imavpd.RecoveryPointHistory
7550 }
7551 if imavpd.AppConsistentFrequencyInMinutes != nil {
7552 objectMap["appConsistentFrequencyInMinutes"] = imavpd.AppConsistentFrequencyInMinutes
7553 }
7554 if imavpd.MultiVMSyncStatus != nil {
7555 objectMap["multiVmSyncStatus"] = imavpd.MultiVMSyncStatus
7556 }
7557 if imavpd.InstanceType != "" {
7558 objectMap["instanceType"] = imavpd.InstanceType
7559 }
7560 return json.Marshal(objectMap)
7561 }
7562
7563
7564 func (imavpd InMageAzureV2PolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) {
7565 return nil, false
7566 }
7567
7568
7569 func (imavpd InMageAzureV2PolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) {
7570 return nil, false
7571 }
7572
7573
7574 func (imavpd InMageAzureV2PolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) {
7575 return nil, false
7576 }
7577
7578
7579 func (imavpd InMageAzureV2PolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) {
7580 return nil, false
7581 }
7582
7583
7584 func (imavpd InMageAzureV2PolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) {
7585 return nil, false
7586 }
7587
7588
7589 func (imavpd InMageAzureV2PolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) {
7590 return &imavpd, true
7591 }
7592
7593
7594 func (imavpd InMageAzureV2PolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) {
7595 return nil, false
7596 }
7597
7598
7599 func (imavpd InMageAzureV2PolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) {
7600 return nil, false
7601 }
7602
7603
7604 func (imavpd InMageAzureV2PolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) {
7605 return nil, false
7606 }
7607
7608
7609 func (imavpd InMageAzureV2PolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) {
7610 return nil, false
7611 }
7612
7613
7614 func (imavpd InMageAzureV2PolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) {
7615 return nil, false
7616 }
7617
7618
7619 func (imavpd InMageAzureV2PolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) {
7620 return &imavpd, true
7621 }
7622
7623
7624 type InMageAzureV2PolicyInput struct {
7625
7626 RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"`
7627
7628 RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"`
7629
7630 CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"`
7631
7632 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"`
7633
7634 MultiVMSyncStatus SetMultiVMSyncStatus `json:"multiVmSyncStatus,omitempty"`
7635
7636 InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"`
7637 }
7638
7639
7640 func (imavpi InMageAzureV2PolicyInput) MarshalJSON() ([]byte, error) {
7641 imavpi.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMageAzureV2
7642 objectMap := make(map[string]interface{})
7643 if imavpi.RecoveryPointThresholdInMinutes != nil {
7644 objectMap["recoveryPointThresholdInMinutes"] = imavpi.RecoveryPointThresholdInMinutes
7645 }
7646 if imavpi.RecoveryPointHistory != nil {
7647 objectMap["recoveryPointHistory"] = imavpi.RecoveryPointHistory
7648 }
7649 if imavpi.CrashConsistentFrequencyInMinutes != nil {
7650 objectMap["crashConsistentFrequencyInMinutes"] = imavpi.CrashConsistentFrequencyInMinutes
7651 }
7652 if imavpi.AppConsistentFrequencyInMinutes != nil {
7653 objectMap["appConsistentFrequencyInMinutes"] = imavpi.AppConsistentFrequencyInMinutes
7654 }
7655 if imavpi.MultiVMSyncStatus != "" {
7656 objectMap["multiVmSyncStatus"] = imavpi.MultiVMSyncStatus
7657 }
7658 if imavpi.InstanceType != "" {
7659 objectMap["instanceType"] = imavpi.InstanceType
7660 }
7661 return json.Marshal(objectMap)
7662 }
7663
7664
7665 func (imavpi InMageAzureV2PolicyInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) {
7666 return nil, false
7667 }
7668
7669
7670 func (imavpi InMageAzureV2PolicyInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) {
7671 return nil, false
7672 }
7673
7674
7675 func (imavpi InMageAzureV2PolicyInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) {
7676 return nil, false
7677 }
7678
7679
7680 func (imavpi InMageAzureV2PolicyInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) {
7681 return nil, false
7682 }
7683
7684
7685 func (imavpi InMageAzureV2PolicyInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) {
7686 return &imavpi, true
7687 }
7688
7689
7690 func (imavpi InMageAzureV2PolicyInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) {
7691 return nil, false
7692 }
7693
7694
7695 func (imavpi InMageAzureV2PolicyInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) {
7696 return nil, false
7697 }
7698
7699
7700 func (imavpi InMageAzureV2PolicyInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) {
7701 return nil, false
7702 }
7703
7704
7705 func (imavpi InMageAzureV2PolicyInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) {
7706 return &imavpi, true
7707 }
7708
7709
7710 type InMageAzureV2ProtectedDiskDetails struct {
7711
7712 DiskID *string `json:"diskId,omitempty"`
7713
7714 DiskName *string `json:"diskName,omitempty"`
7715
7716 ProtectionStage *string `json:"protectionStage,omitempty"`
7717
7718 HealthErrorCode *string `json:"healthErrorCode,omitempty"`
7719
7720 RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"`
7721
7722 ResyncRequired *string `json:"resyncRequired,omitempty"`
7723
7724 ResyncProgressPercentage *int32 `json:"resyncProgressPercentage,omitempty"`
7725
7726 ResyncDurationInSeconds *int64 `json:"resyncDurationInSeconds,omitempty"`
7727
7728 DiskCapacityInBytes *int64 `json:"diskCapacityInBytes,omitempty"`
7729
7730 FileSystemCapacityInBytes *int64 `json:"fileSystemCapacityInBytes,omitempty"`
7731
7732 SourceDataInMegaBytes *float64 `json:"sourceDataInMegaBytes,omitempty"`
7733
7734 PsDataInMegaBytes *float64 `json:"psDataInMegaBytes,omitempty"`
7735
7736 TargetDataInMegaBytes *float64 `json:"targetDataInMegaBytes,omitempty"`
7737
7738 DiskResized *string `json:"diskResized,omitempty"`
7739
7740 LastRpoCalculatedTime *date.Time `json:"lastRpoCalculatedTime,omitempty"`
7741 }
7742
7743
7744 type InMageAzureV2RecoveryPointDetails struct {
7745
7746 IsMultiVMSyncPoint *string `json:"isMultiVmSyncPoint,omitempty"`
7747
7748 InstanceType InstanceTypeBasicProviderSpecificRecoveryPointDetails `json:"instanceType,omitempty"`
7749 }
7750
7751
7752 func (imavrpd InMageAzureV2RecoveryPointDetails) MarshalJSON() ([]byte, error) {
7753 imavrpd.InstanceType = InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeInMageAzureV2
7754 objectMap := make(map[string]interface{})
7755 if imavrpd.IsMultiVMSyncPoint != nil {
7756 objectMap["isMultiVmSyncPoint"] = imavrpd.IsMultiVMSyncPoint
7757 }
7758 if imavrpd.InstanceType != "" {
7759 objectMap["instanceType"] = imavrpd.InstanceType
7760 }
7761 return json.Marshal(objectMap)
7762 }
7763
7764
7765 func (imavrpd InMageAzureV2RecoveryPointDetails) AsA2ARecoveryPointDetails() (*A2ARecoveryPointDetails, bool) {
7766 return nil, false
7767 }
7768
7769
7770 func (imavrpd InMageAzureV2RecoveryPointDetails) AsInMageAzureV2RecoveryPointDetails() (*InMageAzureV2RecoveryPointDetails, bool) {
7771 return &imavrpd, true
7772 }
7773
7774
7775 func (imavrpd InMageAzureV2RecoveryPointDetails) AsProviderSpecificRecoveryPointDetails() (*ProviderSpecificRecoveryPointDetails, bool) {
7776 return nil, false
7777 }
7778
7779
7780 func (imavrpd InMageAzureV2RecoveryPointDetails) AsBasicProviderSpecificRecoveryPointDetails() (BasicProviderSpecificRecoveryPointDetails, bool) {
7781 return &imavrpd, true
7782 }
7783
7784
7785 type InMageAzureV2ReplicationDetails struct {
7786
7787 InfrastructureVMID *string `json:"infrastructureVmId,omitempty"`
7788
7789 VCenterInfrastructureID *string `json:"vCenterInfrastructureId,omitempty"`
7790
7791 ProtectionStage *string `json:"protectionStage,omitempty"`
7792
7793 VMID *string `json:"vmId,omitempty"`
7794
7795 VMProtectionState *string `json:"vmProtectionState,omitempty"`
7796
7797 VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"`
7798
7799 ResyncProgressPercentage *int32 `json:"resyncProgressPercentage,omitempty"`
7800
7801 RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"`
7802
7803 CompressedDataRateInMB *float64 `json:"compressedDataRateInMB,omitempty"`
7804
7805 UncompressedDataRateInMB *float64 `json:"uncompressedDataRateInMB,omitempty"`
7806
7807 IPAddress *string `json:"ipAddress,omitempty"`
7808
7809 AgentVersion *string `json:"agentVersion,omitempty"`
7810
7811 AgentExpiryDate *date.Time `json:"agentExpiryDate,omitempty"`
7812
7813 IsAgentUpdateRequired *string `json:"isAgentUpdateRequired,omitempty"`
7814
7815 IsRebootAfterUpdateRequired *string `json:"isRebootAfterUpdateRequired,omitempty"`
7816
7817 LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"`
7818
7819 ProcessServerID *string `json:"processServerId,omitempty"`
7820
7821 MultiVMGroupID *string `json:"multiVmGroupId,omitempty"`
7822
7823 MultiVMGroupName *string `json:"multiVmGroupName,omitempty"`
7824
7825 MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"`
7826
7827 ProtectedDisks *[]InMageAzureV2ProtectedDiskDetails `json:"protectedDisks,omitempty"`
7828
7829 DiskResized *string `json:"diskResized,omitempty"`
7830
7831 MasterTargetID *string `json:"masterTargetId,omitempty"`
7832
7833 SourceVMCPUCount *int32 `json:"sourceVmCpuCount,omitempty"`
7834
7835 SourceVMRAMSizeInMB *int32 `json:"sourceVmRamSizeInMB,omitempty"`
7836
7837 OsType *string `json:"osType,omitempty"`
7838
7839 VhdName *string `json:"vhdName,omitempty"`
7840
7841 OsDiskID *string `json:"osDiskId,omitempty"`
7842
7843 AzureVMDiskDetails *[]AzureVMDiskDetails `json:"azureVMDiskDetails,omitempty"`
7844
7845 RecoveryAzureVMName *string `json:"recoveryAzureVMName,omitempty"`
7846
7847 RecoveryAzureVMSize *string `json:"recoveryAzureVMSize,omitempty"`
7848
7849 RecoveryAzureStorageAccount *string `json:"recoveryAzureStorageAccount,omitempty"`
7850
7851 RecoveryAzureLogStorageAccountID *string `json:"recoveryAzureLogStorageAccountId,omitempty"`
7852
7853 VMNics *[]VMNicDetails `json:"vmNics,omitempty"`
7854
7855 SelectedRecoveryAzureNetworkID *string `json:"selectedRecoveryAzureNetworkId,omitempty"`
7856
7857 SelectedSourceNicID *string `json:"selectedSourceNicId,omitempty"`
7858
7859 DiscoveryType *string `json:"discoveryType,omitempty"`
7860
7861 EnableRdpOnTargetOption *string `json:"enableRdpOnTargetOption,omitempty"`
7862
7863 Datastores *[]string `json:"datastores,omitempty"`
7864
7865 TargetVMID *string `json:"targetVmId,omitempty"`
7866
7867 RecoveryAzureResourceGroupID *string `json:"recoveryAzureResourceGroupId,omitempty"`
7868
7869 RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"`
7870
7871 UseManagedDisks *string `json:"useManagedDisks,omitempty"`
7872
7873 LicenseType *string `json:"licenseType,omitempty"`
7874
7875 ValidationErrors *[]HealthError `json:"validationErrors,omitempty"`
7876
7877 LastRpoCalculatedTime *date.Time `json:"lastRpoCalculatedTime,omitempty"`
7878
7879 LastUpdateReceivedTime *date.Time `json:"lastUpdateReceivedTime,omitempty"`
7880
7881 ReplicaID *string `json:"replicaId,omitempty"`
7882
7883 OsVersion *string `json:"osVersion,omitempty"`
7884
7885 InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"`
7886 }
7887
7888
7889 func (imavrd InMageAzureV2ReplicationDetails) MarshalJSON() ([]byte, error) {
7890 imavrd.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMageAzureV2
7891 objectMap := make(map[string]interface{})
7892 if imavrd.InfrastructureVMID != nil {
7893 objectMap["infrastructureVmId"] = imavrd.InfrastructureVMID
7894 }
7895 if imavrd.VCenterInfrastructureID != nil {
7896 objectMap["vCenterInfrastructureId"] = imavrd.VCenterInfrastructureID
7897 }
7898 if imavrd.ProtectionStage != nil {
7899 objectMap["protectionStage"] = imavrd.ProtectionStage
7900 }
7901 if imavrd.VMID != nil {
7902 objectMap["vmId"] = imavrd.VMID
7903 }
7904 if imavrd.VMProtectionState != nil {
7905 objectMap["vmProtectionState"] = imavrd.VMProtectionState
7906 }
7907 if imavrd.VMProtectionStateDescription != nil {
7908 objectMap["vmProtectionStateDescription"] = imavrd.VMProtectionStateDescription
7909 }
7910 if imavrd.ResyncProgressPercentage != nil {
7911 objectMap["resyncProgressPercentage"] = imavrd.ResyncProgressPercentage
7912 }
7913 if imavrd.RpoInSeconds != nil {
7914 objectMap["rpoInSeconds"] = imavrd.RpoInSeconds
7915 }
7916 if imavrd.CompressedDataRateInMB != nil {
7917 objectMap["compressedDataRateInMB"] = imavrd.CompressedDataRateInMB
7918 }
7919 if imavrd.UncompressedDataRateInMB != nil {
7920 objectMap["uncompressedDataRateInMB"] = imavrd.UncompressedDataRateInMB
7921 }
7922 if imavrd.IPAddress != nil {
7923 objectMap["ipAddress"] = imavrd.IPAddress
7924 }
7925 if imavrd.AgentVersion != nil {
7926 objectMap["agentVersion"] = imavrd.AgentVersion
7927 }
7928 if imavrd.AgentExpiryDate != nil {
7929 objectMap["agentExpiryDate"] = imavrd.AgentExpiryDate
7930 }
7931 if imavrd.IsAgentUpdateRequired != nil {
7932 objectMap["isAgentUpdateRequired"] = imavrd.IsAgentUpdateRequired
7933 }
7934 if imavrd.IsRebootAfterUpdateRequired != nil {
7935 objectMap["isRebootAfterUpdateRequired"] = imavrd.IsRebootAfterUpdateRequired
7936 }
7937 if imavrd.LastHeartbeat != nil {
7938 objectMap["lastHeartbeat"] = imavrd.LastHeartbeat
7939 }
7940 if imavrd.ProcessServerID != nil {
7941 objectMap["processServerId"] = imavrd.ProcessServerID
7942 }
7943 if imavrd.MultiVMGroupID != nil {
7944 objectMap["multiVmGroupId"] = imavrd.MultiVMGroupID
7945 }
7946 if imavrd.MultiVMGroupName != nil {
7947 objectMap["multiVmGroupName"] = imavrd.MultiVMGroupName
7948 }
7949 if imavrd.MultiVMSyncStatus != nil {
7950 objectMap["multiVmSyncStatus"] = imavrd.MultiVMSyncStatus
7951 }
7952 if imavrd.ProtectedDisks != nil {
7953 objectMap["protectedDisks"] = imavrd.ProtectedDisks
7954 }
7955 if imavrd.DiskResized != nil {
7956 objectMap["diskResized"] = imavrd.DiskResized
7957 }
7958 if imavrd.MasterTargetID != nil {
7959 objectMap["masterTargetId"] = imavrd.MasterTargetID
7960 }
7961 if imavrd.SourceVMCPUCount != nil {
7962 objectMap["sourceVmCpuCount"] = imavrd.SourceVMCPUCount
7963 }
7964 if imavrd.SourceVMRAMSizeInMB != nil {
7965 objectMap["sourceVmRamSizeInMB"] = imavrd.SourceVMRAMSizeInMB
7966 }
7967 if imavrd.OsType != nil {
7968 objectMap["osType"] = imavrd.OsType
7969 }
7970 if imavrd.VhdName != nil {
7971 objectMap["vhdName"] = imavrd.VhdName
7972 }
7973 if imavrd.OsDiskID != nil {
7974 objectMap["osDiskId"] = imavrd.OsDiskID
7975 }
7976 if imavrd.AzureVMDiskDetails != nil {
7977 objectMap["azureVMDiskDetails"] = imavrd.AzureVMDiskDetails
7978 }
7979 if imavrd.RecoveryAzureVMName != nil {
7980 objectMap["recoveryAzureVMName"] = imavrd.RecoveryAzureVMName
7981 }
7982 if imavrd.RecoveryAzureVMSize != nil {
7983 objectMap["recoveryAzureVMSize"] = imavrd.RecoveryAzureVMSize
7984 }
7985 if imavrd.RecoveryAzureStorageAccount != nil {
7986 objectMap["recoveryAzureStorageAccount"] = imavrd.RecoveryAzureStorageAccount
7987 }
7988 if imavrd.RecoveryAzureLogStorageAccountID != nil {
7989 objectMap["recoveryAzureLogStorageAccountId"] = imavrd.RecoveryAzureLogStorageAccountID
7990 }
7991 if imavrd.VMNics != nil {
7992 objectMap["vmNics"] = imavrd.VMNics
7993 }
7994 if imavrd.SelectedRecoveryAzureNetworkID != nil {
7995 objectMap["selectedRecoveryAzureNetworkId"] = imavrd.SelectedRecoveryAzureNetworkID
7996 }
7997 if imavrd.SelectedSourceNicID != nil {
7998 objectMap["selectedSourceNicId"] = imavrd.SelectedSourceNicID
7999 }
8000 if imavrd.DiscoveryType != nil {
8001 objectMap["discoveryType"] = imavrd.DiscoveryType
8002 }
8003 if imavrd.EnableRdpOnTargetOption != nil {
8004 objectMap["enableRdpOnTargetOption"] = imavrd.EnableRdpOnTargetOption
8005 }
8006 if imavrd.Datastores != nil {
8007 objectMap["datastores"] = imavrd.Datastores
8008 }
8009 if imavrd.TargetVMID != nil {
8010 objectMap["targetVmId"] = imavrd.TargetVMID
8011 }
8012 if imavrd.RecoveryAzureResourceGroupID != nil {
8013 objectMap["recoveryAzureResourceGroupId"] = imavrd.RecoveryAzureResourceGroupID
8014 }
8015 if imavrd.RecoveryAvailabilitySetID != nil {
8016 objectMap["recoveryAvailabilitySetId"] = imavrd.RecoveryAvailabilitySetID
8017 }
8018 if imavrd.UseManagedDisks != nil {
8019 objectMap["useManagedDisks"] = imavrd.UseManagedDisks
8020 }
8021 if imavrd.LicenseType != nil {
8022 objectMap["licenseType"] = imavrd.LicenseType
8023 }
8024 if imavrd.ValidationErrors != nil {
8025 objectMap["validationErrors"] = imavrd.ValidationErrors
8026 }
8027 if imavrd.LastRpoCalculatedTime != nil {
8028 objectMap["lastRpoCalculatedTime"] = imavrd.LastRpoCalculatedTime
8029 }
8030 if imavrd.LastUpdateReceivedTime != nil {
8031 objectMap["lastUpdateReceivedTime"] = imavrd.LastUpdateReceivedTime
8032 }
8033 if imavrd.ReplicaID != nil {
8034 objectMap["replicaId"] = imavrd.ReplicaID
8035 }
8036 if imavrd.OsVersion != nil {
8037 objectMap["osVersion"] = imavrd.OsVersion
8038 }
8039 if imavrd.InstanceType != "" {
8040 objectMap["instanceType"] = imavrd.InstanceType
8041 }
8042 return json.Marshal(objectMap)
8043 }
8044
8045
8046 func (imavrd InMageAzureV2ReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) {
8047 return nil, false
8048 }
8049
8050
8051 func (imavrd InMageAzureV2ReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) {
8052 return nil, false
8053 }
8054
8055
8056 func (imavrd InMageAzureV2ReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) {
8057 return nil, false
8058 }
8059
8060
8061 func (imavrd InMageAzureV2ReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) {
8062 return nil, false
8063 }
8064
8065
8066 func (imavrd InMageAzureV2ReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) {
8067 return nil, false
8068 }
8069
8070
8071 func (imavrd InMageAzureV2ReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) {
8072 return &imavrd, true
8073 }
8074
8075
8076 func (imavrd InMageAzureV2ReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) {
8077 return nil, false
8078 }
8079
8080
8081 func (imavrd InMageAzureV2ReplicationDetails) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) {
8082 return nil, false
8083 }
8084
8085
8086 func (imavrd InMageAzureV2ReplicationDetails) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) {
8087 return &imavrd, true
8088 }
8089
8090
8091 type InMageAzureV2ReprotectInput struct {
8092
8093 MasterTargetID *string `json:"masterTargetId,omitempty"`
8094
8095 ProcessServerID *string `json:"processServerId,omitempty"`
8096
8097 StorageAccountID *string `json:"storageAccountId,omitempty"`
8098
8099 RunAsAccountID *string `json:"runAsAccountId,omitempty"`
8100
8101 PolicyID *string `json:"policyId,omitempty"`
8102
8103 LogStorageAccountID *string `json:"logStorageAccountId,omitempty"`
8104
8105 DisksToInclude *[]string `json:"disksToInclude,omitempty"`
8106
8107 InstanceType InstanceTypeBasicReverseReplicationProviderSpecificInput `json:"instanceType,omitempty"`
8108 }
8109
8110
8111 func (imavri InMageAzureV2ReprotectInput) MarshalJSON() ([]byte, error) {
8112 imavri.InstanceType = InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMageAzureV2
8113 objectMap := make(map[string]interface{})
8114 if imavri.MasterTargetID != nil {
8115 objectMap["masterTargetId"] = imavri.MasterTargetID
8116 }
8117 if imavri.ProcessServerID != nil {
8118 objectMap["processServerId"] = imavri.ProcessServerID
8119 }
8120 if imavri.StorageAccountID != nil {
8121 objectMap["storageAccountId"] = imavri.StorageAccountID
8122 }
8123 if imavri.RunAsAccountID != nil {
8124 objectMap["runAsAccountId"] = imavri.RunAsAccountID
8125 }
8126 if imavri.PolicyID != nil {
8127 objectMap["policyId"] = imavri.PolicyID
8128 }
8129 if imavri.LogStorageAccountID != nil {
8130 objectMap["logStorageAccountId"] = imavri.LogStorageAccountID
8131 }
8132 if imavri.DisksToInclude != nil {
8133 objectMap["disksToInclude"] = imavri.DisksToInclude
8134 }
8135 if imavri.InstanceType != "" {
8136 objectMap["instanceType"] = imavri.InstanceType
8137 }
8138 return json.Marshal(objectMap)
8139 }
8140
8141
8142 func (imavri InMageAzureV2ReprotectInput) AsA2AReprotectInput() (*A2AReprotectInput, bool) {
8143 return nil, false
8144 }
8145
8146
8147 func (imavri InMageAzureV2ReprotectInput) AsHyperVReplicaAzureReprotectInput() (*HyperVReplicaAzureReprotectInput, bool) {
8148 return nil, false
8149 }
8150
8151
8152 func (imavri InMageAzureV2ReprotectInput) AsInMageAzureV2ReprotectInput() (*InMageAzureV2ReprotectInput, bool) {
8153 return &imavri, true
8154 }
8155
8156
8157 func (imavri InMageAzureV2ReprotectInput) AsInMageReprotectInput() (*InMageReprotectInput, bool) {
8158 return nil, false
8159 }
8160
8161
8162 func (imavri InMageAzureV2ReprotectInput) AsReverseReplicationProviderSpecificInput() (*ReverseReplicationProviderSpecificInput, bool) {
8163 return nil, false
8164 }
8165
8166
8167 func (imavri InMageAzureV2ReprotectInput) AsBasicReverseReplicationProviderSpecificInput() (BasicReverseReplicationProviderSpecificInput, bool) {
8168 return &imavri, true
8169 }
8170
8171
8172
8173 type InMageAzureV2UpdateReplicationProtectedItemInput struct {
8174
8175 RecoveryAzureV1ResourceGroupID *string `json:"recoveryAzureV1ResourceGroupId,omitempty"`
8176
8177 RecoveryAzureV2ResourceGroupID *string `json:"recoveryAzureV2ResourceGroupId,omitempty"`
8178
8179 UseManagedDisks *string `json:"useManagedDisks,omitempty"`
8180
8181 InstanceType InstanceTypeBasicUpdateReplicationProtectedItemProviderInput `json:"instanceType,omitempty"`
8182 }
8183
8184
8185 func (imavurpii InMageAzureV2UpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, error) {
8186 imavurpii.InstanceType = InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeInMageAzureV2
8187 objectMap := make(map[string]interface{})
8188 if imavurpii.RecoveryAzureV1ResourceGroupID != nil {
8189 objectMap["recoveryAzureV1ResourceGroupId"] = imavurpii.RecoveryAzureV1ResourceGroupID
8190 }
8191 if imavurpii.RecoveryAzureV2ResourceGroupID != nil {
8192 objectMap["recoveryAzureV2ResourceGroupId"] = imavurpii.RecoveryAzureV2ResourceGroupID
8193 }
8194 if imavurpii.UseManagedDisks != nil {
8195 objectMap["useManagedDisks"] = imavurpii.UseManagedDisks
8196 }
8197 if imavurpii.InstanceType != "" {
8198 objectMap["instanceType"] = imavurpii.InstanceType
8199 }
8200 return json.Marshal(objectMap)
8201 }
8202
8203
8204 func (imavurpii InMageAzureV2UpdateReplicationProtectedItemInput) AsA2AUpdateReplicationProtectedItemInput() (*A2AUpdateReplicationProtectedItemInput, bool) {
8205 return nil, false
8206 }
8207
8208
8209 func (imavurpii InMageAzureV2UpdateReplicationProtectedItemInput) AsHyperVReplicaAzureUpdateReplicationProtectedItemInput() (*HyperVReplicaAzureUpdateReplicationProtectedItemInput, bool) {
8210 return nil, false
8211 }
8212
8213
8214 func (imavurpii InMageAzureV2UpdateReplicationProtectedItemInput) AsInMageAzureV2UpdateReplicationProtectedItemInput() (*InMageAzureV2UpdateReplicationProtectedItemInput, bool) {
8215 return &imavurpii, true
8216 }
8217
8218
8219 func (imavurpii InMageAzureV2UpdateReplicationProtectedItemInput) AsUpdateReplicationProtectedItemProviderInput() (*UpdateReplicationProtectedItemProviderInput, bool) {
8220 return nil, false
8221 }
8222
8223
8224 func (imavurpii InMageAzureV2UpdateReplicationProtectedItemInput) AsBasicUpdateReplicationProtectedItemProviderInput() (BasicUpdateReplicationProtectedItemProviderInput, bool) {
8225 return &imavurpii, true
8226 }
8227
8228
8229 type InMageBasePolicyDetails struct {
8230
8231 RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"`
8232
8233 RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"`
8234
8235 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"`
8236
8237 MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"`
8238
8239 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"`
8240 }
8241
8242
8243 func (imbpd InMageBasePolicyDetails) MarshalJSON() ([]byte, error) {
8244 imbpd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails
8245 objectMap := make(map[string]interface{})
8246 if imbpd.RecoveryPointThresholdInMinutes != nil {
8247 objectMap["recoveryPointThresholdInMinutes"] = imbpd.RecoveryPointThresholdInMinutes
8248 }
8249 if imbpd.RecoveryPointHistory != nil {
8250 objectMap["recoveryPointHistory"] = imbpd.RecoveryPointHistory
8251 }
8252 if imbpd.AppConsistentFrequencyInMinutes != nil {
8253 objectMap["appConsistentFrequencyInMinutes"] = imbpd.AppConsistentFrequencyInMinutes
8254 }
8255 if imbpd.MultiVMSyncStatus != nil {
8256 objectMap["multiVmSyncStatus"] = imbpd.MultiVMSyncStatus
8257 }
8258 if imbpd.InstanceType != "" {
8259 objectMap["instanceType"] = imbpd.InstanceType
8260 }
8261 return json.Marshal(objectMap)
8262 }
8263
8264
8265 func (imbpd InMageBasePolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) {
8266 return nil, false
8267 }
8268
8269
8270 func (imbpd InMageBasePolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) {
8271 return nil, false
8272 }
8273
8274
8275 func (imbpd InMageBasePolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) {
8276 return nil, false
8277 }
8278
8279
8280 func (imbpd InMageBasePolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) {
8281 return nil, false
8282 }
8283
8284
8285 func (imbpd InMageBasePolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) {
8286 return nil, false
8287 }
8288
8289
8290 func (imbpd InMageBasePolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) {
8291 return nil, false
8292 }
8293
8294
8295 func (imbpd InMageBasePolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) {
8296 return &imbpd, true
8297 }
8298
8299
8300 func (imbpd InMageBasePolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) {
8301 return nil, false
8302 }
8303
8304
8305 func (imbpd InMageBasePolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) {
8306 return nil, false
8307 }
8308
8309
8310 func (imbpd InMageBasePolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) {
8311 return nil, false
8312 }
8313
8314
8315 func (imbpd InMageBasePolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) {
8316 return nil, false
8317 }
8318
8319
8320 func (imbpd InMageBasePolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) {
8321 return &imbpd, true
8322 }
8323
8324
8325 type InMageDisableProtectionProviderSpecificInput struct {
8326
8327 ReplicaVMDeletionStatus *string `json:"replicaVmDeletionStatus,omitempty"`
8328
8329 InstanceType InstanceTypeBasicDisableProtectionProviderSpecificInput `json:"instanceType,omitempty"`
8330 }
8331
8332
8333 func (imdppsi InMageDisableProtectionProviderSpecificInput) MarshalJSON() ([]byte, error) {
8334 imdppsi.InstanceType = InstanceTypeInMage
8335 objectMap := make(map[string]interface{})
8336 if imdppsi.ReplicaVMDeletionStatus != nil {
8337 objectMap["replicaVmDeletionStatus"] = imdppsi.ReplicaVMDeletionStatus
8338 }
8339 if imdppsi.InstanceType != "" {
8340 objectMap["instanceType"] = imdppsi.InstanceType
8341 }
8342 return json.Marshal(objectMap)
8343 }
8344
8345
8346 func (imdppsi InMageDisableProtectionProviderSpecificInput) AsInMageDisableProtectionProviderSpecificInput() (*InMageDisableProtectionProviderSpecificInput, bool) {
8347 return &imdppsi, true
8348 }
8349
8350
8351 func (imdppsi InMageDisableProtectionProviderSpecificInput) AsDisableProtectionProviderSpecificInput() (*DisableProtectionProviderSpecificInput, bool) {
8352 return nil, false
8353 }
8354
8355
8356 func (imdppsi InMageDisableProtectionProviderSpecificInput) AsBasicDisableProtectionProviderSpecificInput() (BasicDisableProtectionProviderSpecificInput, bool) {
8357 return &imdppsi, true
8358 }
8359
8360
8361 type InMageDiskDetails struct {
8362
8363 DiskID *string `json:"diskId,omitempty"`
8364
8365 DiskName *string `json:"diskName,omitempty"`
8366
8367 DiskSizeInMB *string `json:"diskSizeInMB,omitempty"`
8368
8369 DiskType *string `json:"diskType,omitempty"`
8370
8371 DiskConfiguration *string `json:"diskConfiguration,omitempty"`
8372
8373 VolumeList *[]DiskVolumeDetails `json:"volumeList,omitempty"`
8374 }
8375
8376
8377
8378 type InMageDiskExclusionInput struct {
8379
8380 VolumeOptions *[]InMageVolumeExclusionOptions `json:"volumeOptions,omitempty"`
8381
8382 DiskSignatureOptions *[]InMageDiskSignatureExclusionOptions `json:"diskSignatureOptions,omitempty"`
8383 }
8384
8385
8386
8387 type InMageDiskSignatureExclusionOptions struct {
8388
8389 DiskSignature *string `json:"diskSignature,omitempty"`
8390 }
8391
8392
8393 type InMageEnableProtectionInput struct {
8394
8395 VMFriendlyName *string `json:"vmFriendlyName,omitempty"`
8396
8397 MasterTargetID *string `json:"masterTargetId,omitempty"`
8398
8399 ProcessServerID *string `json:"processServerId,omitempty"`
8400
8401 RetentionDrive *string `json:"retentionDrive,omitempty"`
8402
8403 RunAsAccountID *string `json:"runAsAccountId,omitempty"`
8404
8405 MultiVMGroupID *string `json:"multiVmGroupId,omitempty"`
8406
8407 MultiVMGroupName *string `json:"multiVmGroupName,omitempty"`
8408
8409 DatastoreName *string `json:"datastoreName,omitempty"`
8410
8411 DiskExclusionInput *InMageDiskExclusionInput `json:"diskExclusionInput,omitempty"`
8412
8413 DisksToInclude *[]string `json:"disksToInclude,omitempty"`
8414
8415 InstanceType InstanceTypeBasicEnableProtectionProviderSpecificInput `json:"instanceType,omitempty"`
8416 }
8417
8418
8419 func (imepi InMageEnableProtectionInput) MarshalJSON() ([]byte, error) {
8420 imepi.InstanceType = InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMage
8421 objectMap := make(map[string]interface{})
8422 if imepi.VMFriendlyName != nil {
8423 objectMap["vmFriendlyName"] = imepi.VMFriendlyName
8424 }
8425 if imepi.MasterTargetID != nil {
8426 objectMap["masterTargetId"] = imepi.MasterTargetID
8427 }
8428 if imepi.ProcessServerID != nil {
8429 objectMap["processServerId"] = imepi.ProcessServerID
8430 }
8431 if imepi.RetentionDrive != nil {
8432 objectMap["retentionDrive"] = imepi.RetentionDrive
8433 }
8434 if imepi.RunAsAccountID != nil {
8435 objectMap["runAsAccountId"] = imepi.RunAsAccountID
8436 }
8437 if imepi.MultiVMGroupID != nil {
8438 objectMap["multiVmGroupId"] = imepi.MultiVMGroupID
8439 }
8440 if imepi.MultiVMGroupName != nil {
8441 objectMap["multiVmGroupName"] = imepi.MultiVMGroupName
8442 }
8443 if imepi.DatastoreName != nil {
8444 objectMap["datastoreName"] = imepi.DatastoreName
8445 }
8446 if imepi.DiskExclusionInput != nil {
8447 objectMap["diskExclusionInput"] = imepi.DiskExclusionInput
8448 }
8449 if imepi.DisksToInclude != nil {
8450 objectMap["disksToInclude"] = imepi.DisksToInclude
8451 }
8452 if imepi.InstanceType != "" {
8453 objectMap["instanceType"] = imepi.InstanceType
8454 }
8455 return json.Marshal(objectMap)
8456 }
8457
8458
8459 func (imepi InMageEnableProtectionInput) AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool) {
8460 return nil, false
8461 }
8462
8463
8464 func (imepi InMageEnableProtectionInput) AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool) {
8465 return nil, false
8466 }
8467
8468
8469 func (imepi InMageEnableProtectionInput) AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool) {
8470 return nil, false
8471 }
8472
8473
8474 func (imepi InMageEnableProtectionInput) AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool) {
8475 return &imepi, true
8476 }
8477
8478
8479 func (imepi InMageEnableProtectionInput) AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool) {
8480 return nil, false
8481 }
8482
8483
8484 func (imepi InMageEnableProtectionInput) AsEnableProtectionProviderSpecificInput() (*EnableProtectionProviderSpecificInput, bool) {
8485 return nil, false
8486 }
8487
8488
8489 func (imepi InMageEnableProtectionInput) AsBasicEnableProtectionProviderSpecificInput() (BasicEnableProtectionProviderSpecificInput, bool) {
8490 return &imepi, true
8491 }
8492
8493
8494 type InMageFailoverProviderInput struct {
8495
8496 RecoveryPointType RecoveryPointType `json:"recoveryPointType,omitempty"`
8497
8498 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
8499
8500 InstanceType InstanceTypeBasicProviderSpecificFailoverInput `json:"instanceType,omitempty"`
8501 }
8502
8503
8504 func (imfpi InMageFailoverProviderInput) MarshalJSON() ([]byte, error) {
8505 imfpi.InstanceType = InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMage
8506 objectMap := make(map[string]interface{})
8507 if imfpi.RecoveryPointType != "" {
8508 objectMap["recoveryPointType"] = imfpi.RecoveryPointType
8509 }
8510 if imfpi.RecoveryPointID != nil {
8511 objectMap["recoveryPointId"] = imfpi.RecoveryPointID
8512 }
8513 if imfpi.InstanceType != "" {
8514 objectMap["instanceType"] = imfpi.InstanceType
8515 }
8516 return json.Marshal(objectMap)
8517 }
8518
8519
8520 func (imfpi InMageFailoverProviderInput) AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool) {
8521 return nil, false
8522 }
8523
8524
8525 func (imfpi InMageFailoverProviderInput) AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool) {
8526 return nil, false
8527 }
8528
8529
8530 func (imfpi InMageFailoverProviderInput) AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool) {
8531 return nil, false
8532 }
8533
8534
8535 func (imfpi InMageFailoverProviderInput) AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool) {
8536 return nil, false
8537 }
8538
8539
8540 func (imfpi InMageFailoverProviderInput) AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool) {
8541 return &imfpi, true
8542 }
8543
8544
8545 func (imfpi InMageFailoverProviderInput) AsProviderSpecificFailoverInput() (*ProviderSpecificFailoverInput, bool) {
8546 return nil, false
8547 }
8548
8549
8550 func (imfpi InMageFailoverProviderInput) AsBasicProviderSpecificFailoverInput() (BasicProviderSpecificFailoverInput, bool) {
8551 return &imfpi, true
8552 }
8553
8554
8555 type InMagePolicyDetails struct {
8556
8557 RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"`
8558
8559 RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"`
8560
8561 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"`
8562
8563 MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"`
8564
8565 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"`
8566 }
8567
8568
8569 func (impd InMagePolicyDetails) MarshalJSON() ([]byte, error) {
8570 impd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage
8571 objectMap := make(map[string]interface{})
8572 if impd.RecoveryPointThresholdInMinutes != nil {
8573 objectMap["recoveryPointThresholdInMinutes"] = impd.RecoveryPointThresholdInMinutes
8574 }
8575 if impd.RecoveryPointHistory != nil {
8576 objectMap["recoveryPointHistory"] = impd.RecoveryPointHistory
8577 }
8578 if impd.AppConsistentFrequencyInMinutes != nil {
8579 objectMap["appConsistentFrequencyInMinutes"] = impd.AppConsistentFrequencyInMinutes
8580 }
8581 if impd.MultiVMSyncStatus != nil {
8582 objectMap["multiVmSyncStatus"] = impd.MultiVMSyncStatus
8583 }
8584 if impd.InstanceType != "" {
8585 objectMap["instanceType"] = impd.InstanceType
8586 }
8587 return json.Marshal(objectMap)
8588 }
8589
8590
8591 func (impd InMagePolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) {
8592 return nil, false
8593 }
8594
8595
8596 func (impd InMagePolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) {
8597 return nil, false
8598 }
8599
8600
8601 func (impd InMagePolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) {
8602 return nil, false
8603 }
8604
8605
8606 func (impd InMagePolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) {
8607 return nil, false
8608 }
8609
8610
8611 func (impd InMagePolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) {
8612 return nil, false
8613 }
8614
8615
8616 func (impd InMagePolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) {
8617 return nil, false
8618 }
8619
8620
8621 func (impd InMagePolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) {
8622 return nil, false
8623 }
8624
8625
8626 func (impd InMagePolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) {
8627 return &impd, true
8628 }
8629
8630
8631 func (impd InMagePolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) {
8632 return nil, false
8633 }
8634
8635
8636 func (impd InMagePolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) {
8637 return nil, false
8638 }
8639
8640
8641 func (impd InMagePolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) {
8642 return nil, false
8643 }
8644
8645
8646 func (impd InMagePolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) {
8647 return &impd, true
8648 }
8649
8650
8651 type InMagePolicyInput struct {
8652
8653 RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"`
8654
8655 RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"`
8656
8657 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"`
8658
8659 MultiVMSyncStatus SetMultiVMSyncStatus `json:"multiVmSyncStatus,omitempty"`
8660
8661 InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"`
8662 }
8663
8664
8665 func (impi InMagePolicyInput) MarshalJSON() ([]byte, error) {
8666 impi.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMage
8667 objectMap := make(map[string]interface{})
8668 if impi.RecoveryPointThresholdInMinutes != nil {
8669 objectMap["recoveryPointThresholdInMinutes"] = impi.RecoveryPointThresholdInMinutes
8670 }
8671 if impi.RecoveryPointHistory != nil {
8672 objectMap["recoveryPointHistory"] = impi.RecoveryPointHistory
8673 }
8674 if impi.AppConsistentFrequencyInMinutes != nil {
8675 objectMap["appConsistentFrequencyInMinutes"] = impi.AppConsistentFrequencyInMinutes
8676 }
8677 if impi.MultiVMSyncStatus != "" {
8678 objectMap["multiVmSyncStatus"] = impi.MultiVMSyncStatus
8679 }
8680 if impi.InstanceType != "" {
8681 objectMap["instanceType"] = impi.InstanceType
8682 }
8683 return json.Marshal(objectMap)
8684 }
8685
8686
8687 func (impi InMagePolicyInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) {
8688 return nil, false
8689 }
8690
8691
8692 func (impi InMagePolicyInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) {
8693 return nil, false
8694 }
8695
8696
8697 func (impi InMagePolicyInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) {
8698 return nil, false
8699 }
8700
8701
8702 func (impi InMagePolicyInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) {
8703 return nil, false
8704 }
8705
8706
8707 func (impi InMagePolicyInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) {
8708 return nil, false
8709 }
8710
8711
8712 func (impi InMagePolicyInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) {
8713 return &impi, true
8714 }
8715
8716
8717 func (impi InMagePolicyInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) {
8718 return nil, false
8719 }
8720
8721
8722 func (impi InMagePolicyInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) {
8723 return nil, false
8724 }
8725
8726
8727 func (impi InMagePolicyInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) {
8728 return &impi, true
8729 }
8730
8731
8732 type InMageProtectedDiskDetails struct {
8733
8734 DiskID *string `json:"diskId,omitempty"`
8735
8736 DiskName *string `json:"diskName,omitempty"`
8737
8738 ProtectionStage *string `json:"protectionStage,omitempty"`
8739
8740 HealthErrorCode *string `json:"healthErrorCode,omitempty"`
8741
8742 RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"`
8743
8744 ResyncRequired *string `json:"resyncRequired,omitempty"`
8745
8746 ResyncProgressPercentage *int32 `json:"resyncProgressPercentage,omitempty"`
8747
8748 ResyncDurationInSeconds *int64 `json:"resyncDurationInSeconds,omitempty"`
8749
8750 DiskCapacityInBytes *int64 `json:"diskCapacityInBytes,omitempty"`
8751
8752 FileSystemCapacityInBytes *int64 `json:"fileSystemCapacityInBytes,omitempty"`
8753
8754 SourceDataInMB *float64 `json:"sourceDataInMB,omitempty"`
8755
8756 PsDataInMB *float64 `json:"psDataInMB,omitempty"`
8757
8758 TargetDataInMB *float64 `json:"targetDataInMB,omitempty"`
8759
8760 DiskResized *string `json:"diskResized,omitempty"`
8761
8762 LastRpoCalculatedTime *date.Time `json:"lastRpoCalculatedTime,omitempty"`
8763 }
8764
8765
8766 type InMageReplicationDetails struct {
8767
8768 ActiveSiteType *string `json:"activeSiteType,omitempty"`
8769
8770 SourceVMCPUCount *int32 `json:"sourceVmCpuCount,omitempty"`
8771
8772 SourceVMRAMSizeInMB *int32 `json:"sourceVmRamSizeInMB,omitempty"`
8773
8774 OsDetails *OSDiskDetails `json:"osDetails,omitempty"`
8775
8776 ProtectionStage *string `json:"protectionStage,omitempty"`
8777
8778 VMID *string `json:"vmId,omitempty"`
8779
8780 VMProtectionState *string `json:"vmProtectionState,omitempty"`
8781
8782 VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"`
8783
8784 ResyncDetails *InitialReplicationDetails `json:"resyncDetails,omitempty"`
8785
8786 RetentionWindowStart *date.Time `json:"retentionWindowStart,omitempty"`
8787
8788 RetentionWindowEnd *date.Time `json:"retentionWindowEnd,omitempty"`
8789
8790 CompressedDataRateInMB *float64 `json:"compressedDataRateInMB,omitempty"`
8791
8792 UncompressedDataRateInMB *float64 `json:"uncompressedDataRateInMB,omitempty"`
8793
8794 RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"`
8795
8796 ProtectedDisks *[]InMageProtectedDiskDetails `json:"protectedDisks,omitempty"`
8797
8798 IPAddress *string `json:"ipAddress,omitempty"`
8799
8800 LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"`
8801
8802 ProcessServerID *string `json:"processServerId,omitempty"`
8803
8804 MasterTargetID *string `json:"masterTargetId,omitempty"`
8805
8806 ConsistencyPoints map[string]*date.Time `json:"consistencyPoints"`
8807
8808 DiskResized *string `json:"diskResized,omitempty"`
8809
8810 RebootAfterUpdateStatus *string `json:"rebootAfterUpdateStatus,omitempty"`
8811
8812 MultiVMGroupID *string `json:"multiVmGroupId,omitempty"`
8813
8814 MultiVMGroupName *string `json:"multiVmGroupName,omitempty"`
8815
8816 MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"`
8817
8818 AgentDetails *InMageAgentDetails `json:"agentDetails,omitempty"`
8819
8820 VCenterInfrastructureID *string `json:"vCenterInfrastructureId,omitempty"`
8821
8822 InfrastructureVMID *string `json:"infrastructureVmId,omitempty"`
8823
8824 VMNics *[]VMNicDetails `json:"vmNics,omitempty"`
8825
8826 DiscoveryType *string `json:"discoveryType,omitempty"`
8827
8828 AzureStorageAccountID *string `json:"azureStorageAccountId,omitempty"`
8829
8830 Datastores *[]string `json:"datastores,omitempty"`
8831
8832 ValidationErrors *[]HealthError `json:"validationErrors,omitempty"`
8833
8834 LastRpoCalculatedTime *date.Time `json:"lastRpoCalculatedTime,omitempty"`
8835
8836 LastUpdateReceivedTime *date.Time `json:"lastUpdateReceivedTime,omitempty"`
8837
8838 ReplicaID *string `json:"replicaId,omitempty"`
8839
8840 OsVersion *string `json:"osVersion,omitempty"`
8841
8842 InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"`
8843 }
8844
8845
8846 func (imrd InMageReplicationDetails) MarshalJSON() ([]byte, error) {
8847 imrd.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMage
8848 objectMap := make(map[string]interface{})
8849 if imrd.ActiveSiteType != nil {
8850 objectMap["activeSiteType"] = imrd.ActiveSiteType
8851 }
8852 if imrd.SourceVMCPUCount != nil {
8853 objectMap["sourceVmCpuCount"] = imrd.SourceVMCPUCount
8854 }
8855 if imrd.SourceVMRAMSizeInMB != nil {
8856 objectMap["sourceVmRamSizeInMB"] = imrd.SourceVMRAMSizeInMB
8857 }
8858 if imrd.OsDetails != nil {
8859 objectMap["osDetails"] = imrd.OsDetails
8860 }
8861 if imrd.ProtectionStage != nil {
8862 objectMap["protectionStage"] = imrd.ProtectionStage
8863 }
8864 if imrd.VMID != nil {
8865 objectMap["vmId"] = imrd.VMID
8866 }
8867 if imrd.VMProtectionState != nil {
8868 objectMap["vmProtectionState"] = imrd.VMProtectionState
8869 }
8870 if imrd.VMProtectionStateDescription != nil {
8871 objectMap["vmProtectionStateDescription"] = imrd.VMProtectionStateDescription
8872 }
8873 if imrd.ResyncDetails != nil {
8874 objectMap["resyncDetails"] = imrd.ResyncDetails
8875 }
8876 if imrd.RetentionWindowStart != nil {
8877 objectMap["retentionWindowStart"] = imrd.RetentionWindowStart
8878 }
8879 if imrd.RetentionWindowEnd != nil {
8880 objectMap["retentionWindowEnd"] = imrd.RetentionWindowEnd
8881 }
8882 if imrd.CompressedDataRateInMB != nil {
8883 objectMap["compressedDataRateInMB"] = imrd.CompressedDataRateInMB
8884 }
8885 if imrd.UncompressedDataRateInMB != nil {
8886 objectMap["uncompressedDataRateInMB"] = imrd.UncompressedDataRateInMB
8887 }
8888 if imrd.RpoInSeconds != nil {
8889 objectMap["rpoInSeconds"] = imrd.RpoInSeconds
8890 }
8891 if imrd.ProtectedDisks != nil {
8892 objectMap["protectedDisks"] = imrd.ProtectedDisks
8893 }
8894 if imrd.IPAddress != nil {
8895 objectMap["ipAddress"] = imrd.IPAddress
8896 }
8897 if imrd.LastHeartbeat != nil {
8898 objectMap["lastHeartbeat"] = imrd.LastHeartbeat
8899 }
8900 if imrd.ProcessServerID != nil {
8901 objectMap["processServerId"] = imrd.ProcessServerID
8902 }
8903 if imrd.MasterTargetID != nil {
8904 objectMap["masterTargetId"] = imrd.MasterTargetID
8905 }
8906 if imrd.ConsistencyPoints != nil {
8907 objectMap["consistencyPoints"] = imrd.ConsistencyPoints
8908 }
8909 if imrd.DiskResized != nil {
8910 objectMap["diskResized"] = imrd.DiskResized
8911 }
8912 if imrd.RebootAfterUpdateStatus != nil {
8913 objectMap["rebootAfterUpdateStatus"] = imrd.RebootAfterUpdateStatus
8914 }
8915 if imrd.MultiVMGroupID != nil {
8916 objectMap["multiVmGroupId"] = imrd.MultiVMGroupID
8917 }
8918 if imrd.MultiVMGroupName != nil {
8919 objectMap["multiVmGroupName"] = imrd.MultiVMGroupName
8920 }
8921 if imrd.MultiVMSyncStatus != nil {
8922 objectMap["multiVmSyncStatus"] = imrd.MultiVMSyncStatus
8923 }
8924 if imrd.AgentDetails != nil {
8925 objectMap["agentDetails"] = imrd.AgentDetails
8926 }
8927 if imrd.VCenterInfrastructureID != nil {
8928 objectMap["vCenterInfrastructureId"] = imrd.VCenterInfrastructureID
8929 }
8930 if imrd.InfrastructureVMID != nil {
8931 objectMap["infrastructureVmId"] = imrd.InfrastructureVMID
8932 }
8933 if imrd.VMNics != nil {
8934 objectMap["vmNics"] = imrd.VMNics
8935 }
8936 if imrd.DiscoveryType != nil {
8937 objectMap["discoveryType"] = imrd.DiscoveryType
8938 }
8939 if imrd.AzureStorageAccountID != nil {
8940 objectMap["azureStorageAccountId"] = imrd.AzureStorageAccountID
8941 }
8942 if imrd.Datastores != nil {
8943 objectMap["datastores"] = imrd.Datastores
8944 }
8945 if imrd.ValidationErrors != nil {
8946 objectMap["validationErrors"] = imrd.ValidationErrors
8947 }
8948 if imrd.LastRpoCalculatedTime != nil {
8949 objectMap["lastRpoCalculatedTime"] = imrd.LastRpoCalculatedTime
8950 }
8951 if imrd.LastUpdateReceivedTime != nil {
8952 objectMap["lastUpdateReceivedTime"] = imrd.LastUpdateReceivedTime
8953 }
8954 if imrd.ReplicaID != nil {
8955 objectMap["replicaId"] = imrd.ReplicaID
8956 }
8957 if imrd.OsVersion != nil {
8958 objectMap["osVersion"] = imrd.OsVersion
8959 }
8960 if imrd.InstanceType != "" {
8961 objectMap["instanceType"] = imrd.InstanceType
8962 }
8963 return json.Marshal(objectMap)
8964 }
8965
8966
8967 func (imrd InMageReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) {
8968 return nil, false
8969 }
8970
8971
8972 func (imrd InMageReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) {
8973 return nil, false
8974 }
8975
8976
8977 func (imrd InMageReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) {
8978 return nil, false
8979 }
8980
8981
8982 func (imrd InMageReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) {
8983 return nil, false
8984 }
8985
8986
8987 func (imrd InMageReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) {
8988 return nil, false
8989 }
8990
8991
8992 func (imrd InMageReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) {
8993 return nil, false
8994 }
8995
8996
8997 func (imrd InMageReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) {
8998 return &imrd, true
8999 }
9000
9001
9002 func (imrd InMageReplicationDetails) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) {
9003 return nil, false
9004 }
9005
9006
9007 func (imrd InMageReplicationDetails) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) {
9008 return &imrd, true
9009 }
9010
9011
9012 type InMageReprotectInput struct {
9013
9014 MasterTargetID *string `json:"masterTargetId,omitempty"`
9015
9016 ProcessServerID *string `json:"processServerId,omitempty"`
9017
9018 RetentionDrive *string `json:"retentionDrive,omitempty"`
9019
9020 RunAsAccountID *string `json:"runAsAccountId,omitempty"`
9021
9022 DatastoreName *string `json:"datastoreName,omitempty"`
9023
9024 DiskExclusionInput *InMageDiskExclusionInput `json:"diskExclusionInput,omitempty"`
9025
9026 ProfileID *string `json:"profileId,omitempty"`
9027
9028 DisksToInclude *[]string `json:"disksToInclude,omitempty"`
9029
9030 InstanceType InstanceTypeBasicReverseReplicationProviderSpecificInput `json:"instanceType,omitempty"`
9031 }
9032
9033
9034 func (imri InMageReprotectInput) MarshalJSON() ([]byte, error) {
9035 imri.InstanceType = InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMage
9036 objectMap := make(map[string]interface{})
9037 if imri.MasterTargetID != nil {
9038 objectMap["masterTargetId"] = imri.MasterTargetID
9039 }
9040 if imri.ProcessServerID != nil {
9041 objectMap["processServerId"] = imri.ProcessServerID
9042 }
9043 if imri.RetentionDrive != nil {
9044 objectMap["retentionDrive"] = imri.RetentionDrive
9045 }
9046 if imri.RunAsAccountID != nil {
9047 objectMap["runAsAccountId"] = imri.RunAsAccountID
9048 }
9049 if imri.DatastoreName != nil {
9050 objectMap["datastoreName"] = imri.DatastoreName
9051 }
9052 if imri.DiskExclusionInput != nil {
9053 objectMap["diskExclusionInput"] = imri.DiskExclusionInput
9054 }
9055 if imri.ProfileID != nil {
9056 objectMap["profileId"] = imri.ProfileID
9057 }
9058 if imri.DisksToInclude != nil {
9059 objectMap["disksToInclude"] = imri.DisksToInclude
9060 }
9061 if imri.InstanceType != "" {
9062 objectMap["instanceType"] = imri.InstanceType
9063 }
9064 return json.Marshal(objectMap)
9065 }
9066
9067
9068 func (imri InMageReprotectInput) AsA2AReprotectInput() (*A2AReprotectInput, bool) {
9069 return nil, false
9070 }
9071
9072
9073 func (imri InMageReprotectInput) AsHyperVReplicaAzureReprotectInput() (*HyperVReplicaAzureReprotectInput, bool) {
9074 return nil, false
9075 }
9076
9077
9078 func (imri InMageReprotectInput) AsInMageAzureV2ReprotectInput() (*InMageAzureV2ReprotectInput, bool) {
9079 return nil, false
9080 }
9081
9082
9083 func (imri InMageReprotectInput) AsInMageReprotectInput() (*InMageReprotectInput, bool) {
9084 return &imri, true
9085 }
9086
9087
9088 func (imri InMageReprotectInput) AsReverseReplicationProviderSpecificInput() (*ReverseReplicationProviderSpecificInput, bool) {
9089 return nil, false
9090 }
9091
9092
9093 func (imri InMageReprotectInput) AsBasicReverseReplicationProviderSpecificInput() (BasicReverseReplicationProviderSpecificInput, bool) {
9094 return &imri, true
9095 }
9096
9097
9098
9099 type InMageVolumeExclusionOptions struct {
9100
9101 VolumeLabel *string `json:"volumeLabel,omitempty"`
9102
9103 OnlyExcludeIfSingleVolume *string `json:"onlyExcludeIfSingleVolume,omitempty"`
9104 }
9105
9106
9107
9108
9109
9110 type InnerHealthError struct {
9111
9112 ErrorSource *string `json:"errorSource,omitempty"`
9113
9114 ErrorType *string `json:"errorType,omitempty"`
9115
9116 ErrorLevel *string `json:"errorLevel,omitempty"`
9117
9118 ErrorCategory *string `json:"errorCategory,omitempty"`
9119
9120 ErrorCode *string `json:"errorCode,omitempty"`
9121
9122 SummaryMessage *string `json:"summaryMessage,omitempty"`
9123
9124 ErrorMessage *string `json:"errorMessage,omitempty"`
9125
9126 PossibleCauses *string `json:"possibleCauses,omitempty"`
9127
9128 RecommendedAction *string `json:"recommendedAction,omitempty"`
9129
9130 CreationTimeUtc *date.Time `json:"creationTimeUtc,omitempty"`
9131
9132 RecoveryProviderErrorMessage *string `json:"recoveryProviderErrorMessage,omitempty"`
9133
9134 EntityID *string `json:"entityId,omitempty"`
9135 }
9136
9137
9138 type InputEndpoint struct {
9139
9140 EndpointName *string `json:"endpointName,omitempty"`
9141
9142 PrivatePort *int32 `json:"privatePort,omitempty"`
9143
9144 PublicPort *int32 `json:"publicPort,omitempty"`
9145
9146 Protocol *string `json:"protocol,omitempty"`
9147 }
9148
9149
9150 type Job struct {
9151 autorest.Response `json:"-"`
9152
9153 Properties *JobProperties `json:"properties,omitempty"`
9154
9155 ID *string `json:"id,omitempty"`
9156
9157 Name *string `json:"name,omitempty"`
9158
9159 Type *string `json:"type,omitempty"`
9160
9161 Location *string `json:"location,omitempty"`
9162 }
9163
9164
9165 func (j Job) MarshalJSON() ([]byte, error) {
9166 objectMap := make(map[string]interface{})
9167 if j.Properties != nil {
9168 objectMap["properties"] = j.Properties
9169 }
9170 if j.Location != nil {
9171 objectMap["location"] = j.Location
9172 }
9173 return json.Marshal(objectMap)
9174 }
9175
9176
9177 type JobCollection struct {
9178 autorest.Response `json:"-"`
9179
9180 Value *[]Job `json:"value,omitempty"`
9181
9182 NextLink *string `json:"nextLink,omitempty"`
9183 }
9184
9185
9186 type JobCollectionIterator struct {
9187 i int
9188 page JobCollectionPage
9189 }
9190
9191
9192
9193 func (iter *JobCollectionIterator) NextWithContext(ctx context.Context) (err error) {
9194 if tracing.IsEnabled() {
9195 ctx = tracing.StartSpan(ctx, fqdn+"/JobCollectionIterator.NextWithContext")
9196 defer func() {
9197 sc := -1
9198 if iter.Response().Response.Response != nil {
9199 sc = iter.Response().Response.Response.StatusCode
9200 }
9201 tracing.EndSpan(ctx, sc, err)
9202 }()
9203 }
9204 iter.i++
9205 if iter.i < len(iter.page.Values()) {
9206 return nil
9207 }
9208 err = iter.page.NextWithContext(ctx)
9209 if err != nil {
9210 iter.i--
9211 return err
9212 }
9213 iter.i = 0
9214 return nil
9215 }
9216
9217
9218
9219
9220 func (iter *JobCollectionIterator) Next() error {
9221 return iter.NextWithContext(context.Background())
9222 }
9223
9224
9225 func (iter JobCollectionIterator) NotDone() bool {
9226 return iter.page.NotDone() && iter.i < len(iter.page.Values())
9227 }
9228
9229
9230 func (iter JobCollectionIterator) Response() JobCollection {
9231 return iter.page.Response()
9232 }
9233
9234
9235
9236 func (iter JobCollectionIterator) Value() Job {
9237 if !iter.page.NotDone() {
9238 return Job{}
9239 }
9240 return iter.page.Values()[iter.i]
9241 }
9242
9243
9244 func NewJobCollectionIterator(page JobCollectionPage) JobCollectionIterator {
9245 return JobCollectionIterator{page: page}
9246 }
9247
9248
9249 func (jc JobCollection) IsEmpty() bool {
9250 return jc.Value == nil || len(*jc.Value) == 0
9251 }
9252
9253
9254 func (jc JobCollection) hasNextLink() bool {
9255 return jc.NextLink != nil && len(*jc.NextLink) != 0
9256 }
9257
9258
9259
9260 func (jc JobCollection) jobCollectionPreparer(ctx context.Context) (*http.Request, error) {
9261 if !jc.hasNextLink() {
9262 return nil, nil
9263 }
9264 return autorest.Prepare((&http.Request{}).WithContext(ctx),
9265 autorest.AsJSON(),
9266 autorest.AsGet(),
9267 autorest.WithBaseURL(to.String(jc.NextLink)))
9268 }
9269
9270
9271 type JobCollectionPage struct {
9272 fn func(context.Context, JobCollection) (JobCollection, error)
9273 jc JobCollection
9274 }
9275
9276
9277
9278 func (page *JobCollectionPage) NextWithContext(ctx context.Context) (err error) {
9279 if tracing.IsEnabled() {
9280 ctx = tracing.StartSpan(ctx, fqdn+"/JobCollectionPage.NextWithContext")
9281 defer func() {
9282 sc := -1
9283 if page.Response().Response.Response != nil {
9284 sc = page.Response().Response.Response.StatusCode
9285 }
9286 tracing.EndSpan(ctx, sc, err)
9287 }()
9288 }
9289 for {
9290 next, err := page.fn(ctx, page.jc)
9291 if err != nil {
9292 return err
9293 }
9294 page.jc = next
9295 if !next.hasNextLink() || !next.IsEmpty() {
9296 break
9297 }
9298 }
9299 return nil
9300 }
9301
9302
9303
9304
9305 func (page *JobCollectionPage) Next() error {
9306 return page.NextWithContext(context.Background())
9307 }
9308
9309
9310 func (page JobCollectionPage) NotDone() bool {
9311 return !page.jc.IsEmpty()
9312 }
9313
9314
9315 func (page JobCollectionPage) Response() JobCollection {
9316 return page.jc
9317 }
9318
9319
9320 func (page JobCollectionPage) Values() []Job {
9321 if page.jc.IsEmpty() {
9322 return nil
9323 }
9324 return *page.jc.Value
9325 }
9326
9327
9328 func NewJobCollectionPage(cur JobCollection, getNextPage func(context.Context, JobCollection) (JobCollection, error)) JobCollectionPage {
9329 return JobCollectionPage{
9330 fn: getNextPage,
9331 jc: cur,
9332 }
9333 }
9334
9335
9336 type BasicJobDetails interface {
9337 AsAsrJobDetails() (*AsrJobDetails, bool)
9338 AsExportJobDetails() (*ExportJobDetails, bool)
9339 AsFailoverJobDetails() (*FailoverJobDetails, bool)
9340 AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool)
9341 AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool)
9342 AsJobDetails() (*JobDetails, bool)
9343 }
9344
9345
9346 type JobDetails struct {
9347
9348 AffectedObjectDetails map[string]*string `json:"affectedObjectDetails"`
9349
9350 InstanceType InstanceTypeBasicJobDetails `json:"instanceType,omitempty"`
9351 }
9352
9353 func unmarshalBasicJobDetails(body []byte) (BasicJobDetails, error) {
9354 var m map[string]interface{}
9355 err := json.Unmarshal(body, &m)
9356 if err != nil {
9357 return nil, err
9358 }
9359
9360 switch m["instanceType"] {
9361 case string(InstanceTypeAsrJobDetails):
9362 var ajd AsrJobDetails
9363 err := json.Unmarshal(body, &ajd)
9364 return ajd, err
9365 case string(InstanceTypeExportJobDetails):
9366 var ejd ExportJobDetails
9367 err := json.Unmarshal(body, &ejd)
9368 return ejd, err
9369 case string(InstanceTypeFailoverJobDetails):
9370 var fjd FailoverJobDetails
9371 err := json.Unmarshal(body, &fjd)
9372 return fjd, err
9373 case string(InstanceTypeSwitchProtectionJobDetails):
9374 var spjd SwitchProtectionJobDetails
9375 err := json.Unmarshal(body, &spjd)
9376 return spjd, err
9377 case string(InstanceTypeTestFailoverJobDetails):
9378 var tfjd TestFailoverJobDetails
9379 err := json.Unmarshal(body, &tfjd)
9380 return tfjd, err
9381 default:
9382 var jd JobDetails
9383 err := json.Unmarshal(body, &jd)
9384 return jd, err
9385 }
9386 }
9387 func unmarshalBasicJobDetailsArray(body []byte) ([]BasicJobDetails, error) {
9388 var rawMessages []*json.RawMessage
9389 err := json.Unmarshal(body, &rawMessages)
9390 if err != nil {
9391 return nil, err
9392 }
9393
9394 jdArray := make([]BasicJobDetails, len(rawMessages))
9395
9396 for index, rawMessage := range rawMessages {
9397 jd, err := unmarshalBasicJobDetails(*rawMessage)
9398 if err != nil {
9399 return nil, err
9400 }
9401 jdArray[index] = jd
9402 }
9403 return jdArray, nil
9404 }
9405
9406
9407 func (jd JobDetails) MarshalJSON() ([]byte, error) {
9408 jd.InstanceType = InstanceTypeJobDetails
9409 objectMap := make(map[string]interface{})
9410 if jd.AffectedObjectDetails != nil {
9411 objectMap["affectedObjectDetails"] = jd.AffectedObjectDetails
9412 }
9413 if jd.InstanceType != "" {
9414 objectMap["instanceType"] = jd.InstanceType
9415 }
9416 return json.Marshal(objectMap)
9417 }
9418
9419
9420 func (jd JobDetails) AsAsrJobDetails() (*AsrJobDetails, bool) {
9421 return nil, false
9422 }
9423
9424
9425 func (jd JobDetails) AsExportJobDetails() (*ExportJobDetails, bool) {
9426 return nil, false
9427 }
9428
9429
9430 func (jd JobDetails) AsFailoverJobDetails() (*FailoverJobDetails, bool) {
9431 return nil, false
9432 }
9433
9434
9435 func (jd JobDetails) AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool) {
9436 return nil, false
9437 }
9438
9439
9440 func (jd JobDetails) AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool) {
9441 return nil, false
9442 }
9443
9444
9445 func (jd JobDetails) AsJobDetails() (*JobDetails, bool) {
9446 return &jd, true
9447 }
9448
9449
9450 func (jd JobDetails) AsBasicJobDetails() (BasicJobDetails, bool) {
9451 return &jd, true
9452 }
9453
9454
9455 type JobEntity struct {
9456
9457 JobID *string `json:"jobId,omitempty"`
9458
9459 JobFriendlyName *string `json:"jobFriendlyName,omitempty"`
9460
9461 TargetObjectID *string `json:"targetObjectId,omitempty"`
9462
9463 TargetObjectName *string `json:"targetObjectName,omitempty"`
9464
9465 TargetInstanceType *string `json:"targetInstanceType,omitempty"`
9466
9467 JobScenarioName *string `json:"jobScenarioName,omitempty"`
9468 }
9469
9470
9471 type JobErrorDetails struct {
9472
9473 ServiceErrorDetails *ServiceError `json:"serviceErrorDetails,omitempty"`
9474
9475 ProviderErrorDetails *ProviderError `json:"providerErrorDetails,omitempty"`
9476
9477 ErrorLevel *string `json:"errorLevel,omitempty"`
9478
9479 CreationTime *date.Time `json:"creationTime,omitempty"`
9480
9481 TaskID *string `json:"taskId,omitempty"`
9482 }
9483
9484
9485 type JobProperties struct {
9486
9487 ActivityID *string `json:"activityId,omitempty"`
9488
9489 ScenarioName *string `json:"scenarioName,omitempty"`
9490
9491 FriendlyName *string `json:"friendlyName,omitempty"`
9492
9493 State *string `json:"state,omitempty"`
9494
9495 StateDescription *string `json:"stateDescription,omitempty"`
9496
9497 Tasks *[]ASRTask `json:"tasks,omitempty"`
9498
9499 Errors *[]JobErrorDetails `json:"errors,omitempty"`
9500
9501 StartTime *date.Time `json:"startTime,omitempty"`
9502
9503 EndTime *date.Time `json:"endTime,omitempty"`
9504
9505 AllowedActions *[]string `json:"allowedActions,omitempty"`
9506
9507 TargetObjectID *string `json:"targetObjectId,omitempty"`
9508
9509 TargetObjectName *string `json:"targetObjectName,omitempty"`
9510
9511 TargetInstanceType *string `json:"targetInstanceType,omitempty"`
9512
9513 CustomDetails BasicJobDetails `json:"customDetails,omitempty"`
9514 }
9515
9516
9517 func (jp *JobProperties) UnmarshalJSON(body []byte) error {
9518 var m map[string]*json.RawMessage
9519 err := json.Unmarshal(body, &m)
9520 if err != nil {
9521 return err
9522 }
9523 for k, v := range m {
9524 switch k {
9525 case "activityId":
9526 if v != nil {
9527 var activityID string
9528 err = json.Unmarshal(*v, &activityID)
9529 if err != nil {
9530 return err
9531 }
9532 jp.ActivityID = &activityID
9533 }
9534 case "scenarioName":
9535 if v != nil {
9536 var scenarioName string
9537 err = json.Unmarshal(*v, &scenarioName)
9538 if err != nil {
9539 return err
9540 }
9541 jp.ScenarioName = &scenarioName
9542 }
9543 case "friendlyName":
9544 if v != nil {
9545 var friendlyName string
9546 err = json.Unmarshal(*v, &friendlyName)
9547 if err != nil {
9548 return err
9549 }
9550 jp.FriendlyName = &friendlyName
9551 }
9552 case "state":
9553 if v != nil {
9554 var state string
9555 err = json.Unmarshal(*v, &state)
9556 if err != nil {
9557 return err
9558 }
9559 jp.State = &state
9560 }
9561 case "stateDescription":
9562 if v != nil {
9563 var stateDescription string
9564 err = json.Unmarshal(*v, &stateDescription)
9565 if err != nil {
9566 return err
9567 }
9568 jp.StateDescription = &stateDescription
9569 }
9570 case "tasks":
9571 if v != nil {
9572 var tasks []ASRTask
9573 err = json.Unmarshal(*v, &tasks)
9574 if err != nil {
9575 return err
9576 }
9577 jp.Tasks = &tasks
9578 }
9579 case "errors":
9580 if v != nil {
9581 var errorsVar []JobErrorDetails
9582 err = json.Unmarshal(*v, &errorsVar)
9583 if err != nil {
9584 return err
9585 }
9586 jp.Errors = &errorsVar
9587 }
9588 case "startTime":
9589 if v != nil {
9590 var startTime date.Time
9591 err = json.Unmarshal(*v, &startTime)
9592 if err != nil {
9593 return err
9594 }
9595 jp.StartTime = &startTime
9596 }
9597 case "endTime":
9598 if v != nil {
9599 var endTime date.Time
9600 err = json.Unmarshal(*v, &endTime)
9601 if err != nil {
9602 return err
9603 }
9604 jp.EndTime = &endTime
9605 }
9606 case "allowedActions":
9607 if v != nil {
9608 var allowedActions []string
9609 err = json.Unmarshal(*v, &allowedActions)
9610 if err != nil {
9611 return err
9612 }
9613 jp.AllowedActions = &allowedActions
9614 }
9615 case "targetObjectId":
9616 if v != nil {
9617 var targetObjectID string
9618 err = json.Unmarshal(*v, &targetObjectID)
9619 if err != nil {
9620 return err
9621 }
9622 jp.TargetObjectID = &targetObjectID
9623 }
9624 case "targetObjectName":
9625 if v != nil {
9626 var targetObjectName string
9627 err = json.Unmarshal(*v, &targetObjectName)
9628 if err != nil {
9629 return err
9630 }
9631 jp.TargetObjectName = &targetObjectName
9632 }
9633 case "targetInstanceType":
9634 if v != nil {
9635 var targetInstanceType string
9636 err = json.Unmarshal(*v, &targetInstanceType)
9637 if err != nil {
9638 return err
9639 }
9640 jp.TargetInstanceType = &targetInstanceType
9641 }
9642 case "customDetails":
9643 if v != nil {
9644 customDetails, err := unmarshalBasicJobDetails(*v)
9645 if err != nil {
9646 return err
9647 }
9648 jp.CustomDetails = customDetails
9649 }
9650 }
9651 }
9652
9653 return nil
9654 }
9655
9656
9657 type JobQueryParameter struct {
9658
9659 StartTime *string `json:"startTime,omitempty"`
9660
9661 EndTime *string `json:"endTime,omitempty"`
9662
9663 FabricID *string `json:"fabricId,omitempty"`
9664
9665 AffectedObjectTypes *string `json:"affectedObjectTypes,omitempty"`
9666
9667 JobStatus *string `json:"jobStatus,omitempty"`
9668 }
9669
9670
9671 type JobStatusEventDetails struct {
9672
9673 JobID *string `json:"jobId,omitempty"`
9674
9675 JobFriendlyName *string `json:"jobFriendlyName,omitempty"`
9676
9677 JobStatus *string `json:"jobStatus,omitempty"`
9678
9679 AffectedObjectType *string `json:"affectedObjectType,omitempty"`
9680
9681 InstanceType InstanceTypeBasicEventSpecificDetails `json:"instanceType,omitempty"`
9682 }
9683
9684
9685 func (jsed JobStatusEventDetails) MarshalJSON() ([]byte, error) {
9686 jsed.InstanceType = InstanceTypeJobStatus
9687 objectMap := make(map[string]interface{})
9688 if jsed.JobID != nil {
9689 objectMap["jobId"] = jsed.JobID
9690 }
9691 if jsed.JobFriendlyName != nil {
9692 objectMap["jobFriendlyName"] = jsed.JobFriendlyName
9693 }
9694 if jsed.JobStatus != nil {
9695 objectMap["jobStatus"] = jsed.JobStatus
9696 }
9697 if jsed.AffectedObjectType != nil {
9698 objectMap["affectedObjectType"] = jsed.AffectedObjectType
9699 }
9700 if jsed.InstanceType != "" {
9701 objectMap["instanceType"] = jsed.InstanceType
9702 }
9703 return json.Marshal(objectMap)
9704 }
9705
9706
9707 func (jsed JobStatusEventDetails) AsJobStatusEventDetails() (*JobStatusEventDetails, bool) {
9708 return &jsed, true
9709 }
9710
9711
9712 func (jsed JobStatusEventDetails) AsEventSpecificDetails() (*EventSpecificDetails, bool) {
9713 return nil, false
9714 }
9715
9716
9717 func (jsed JobStatusEventDetails) AsBasicEventSpecificDetails() (BasicEventSpecificDetails, bool) {
9718 return &jsed, true
9719 }
9720
9721
9722
9723 type JobTaskDetails struct {
9724
9725 JobTask *JobEntity `json:"jobTask,omitempty"`
9726
9727 InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"`
9728 }
9729
9730
9731 func (jtd JobTaskDetails) MarshalJSON() ([]byte, error) {
9732 jtd.InstanceType = InstanceTypeJobTaskDetails
9733 objectMap := make(map[string]interface{})
9734 if jtd.JobTask != nil {
9735 objectMap["jobTask"] = jtd.JobTask
9736 }
9737 if jtd.InstanceType != "" {
9738 objectMap["instanceType"] = jtd.InstanceType
9739 }
9740 return json.Marshal(objectMap)
9741 }
9742
9743
9744 func (jtd JobTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) {
9745 return nil, false
9746 }
9747
9748
9749 func (jtd JobTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) {
9750 return nil, false
9751 }
9752
9753
9754 func (jtd JobTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) {
9755 return nil, false
9756 }
9757
9758
9759 func (jtd JobTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) {
9760 return &jtd, true
9761 }
9762
9763
9764 func (jtd JobTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) {
9765 return nil, false
9766 }
9767
9768
9769 func (jtd JobTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) {
9770 return nil, false
9771 }
9772
9773
9774 func (jtd JobTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) {
9775 return nil, false
9776 }
9777
9778
9779 func (jtd JobTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) {
9780 return nil, false
9781 }
9782
9783
9784 func (jtd JobTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) {
9785 return nil, false
9786 }
9787
9788
9789 func (jtd JobTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) {
9790 return &jtd, true
9791 }
9792
9793
9794 type KeyEncryptionKeyInfo struct {
9795
9796 KeyIdentifier *string `json:"keyIdentifier,omitempty"`
9797
9798 KeyVaultResourceArmID *string `json:"keyVaultResourceArmId,omitempty"`
9799 }
9800
9801
9802 type LogicalNetwork struct {
9803 autorest.Response `json:"-"`
9804
9805 Properties *LogicalNetworkProperties `json:"properties,omitempty"`
9806
9807 ID *string `json:"id,omitempty"`
9808
9809 Name *string `json:"name,omitempty"`
9810
9811 Type *string `json:"type,omitempty"`
9812
9813 Location *string `json:"location,omitempty"`
9814 }
9815
9816
9817 func (ln LogicalNetwork) MarshalJSON() ([]byte, error) {
9818 objectMap := make(map[string]interface{})
9819 if ln.Properties != nil {
9820 objectMap["properties"] = ln.Properties
9821 }
9822 if ln.Location != nil {
9823 objectMap["location"] = ln.Location
9824 }
9825 return json.Marshal(objectMap)
9826 }
9827
9828
9829 type LogicalNetworkCollection struct {
9830 autorest.Response `json:"-"`
9831
9832 Value *[]LogicalNetwork `json:"value,omitempty"`
9833
9834 NextLink *string `json:"nextLink,omitempty"`
9835 }
9836
9837
9838 type LogicalNetworkCollectionIterator struct {
9839 i int
9840 page LogicalNetworkCollectionPage
9841 }
9842
9843
9844
9845 func (iter *LogicalNetworkCollectionIterator) NextWithContext(ctx context.Context) (err error) {
9846 if tracing.IsEnabled() {
9847 ctx = tracing.StartSpan(ctx, fqdn+"/LogicalNetworkCollectionIterator.NextWithContext")
9848 defer func() {
9849 sc := -1
9850 if iter.Response().Response.Response != nil {
9851 sc = iter.Response().Response.Response.StatusCode
9852 }
9853 tracing.EndSpan(ctx, sc, err)
9854 }()
9855 }
9856 iter.i++
9857 if iter.i < len(iter.page.Values()) {
9858 return nil
9859 }
9860 err = iter.page.NextWithContext(ctx)
9861 if err != nil {
9862 iter.i--
9863 return err
9864 }
9865 iter.i = 0
9866 return nil
9867 }
9868
9869
9870
9871
9872 func (iter *LogicalNetworkCollectionIterator) Next() error {
9873 return iter.NextWithContext(context.Background())
9874 }
9875
9876
9877 func (iter LogicalNetworkCollectionIterator) NotDone() bool {
9878 return iter.page.NotDone() && iter.i < len(iter.page.Values())
9879 }
9880
9881
9882 func (iter LogicalNetworkCollectionIterator) Response() LogicalNetworkCollection {
9883 return iter.page.Response()
9884 }
9885
9886
9887
9888 func (iter LogicalNetworkCollectionIterator) Value() LogicalNetwork {
9889 if !iter.page.NotDone() {
9890 return LogicalNetwork{}
9891 }
9892 return iter.page.Values()[iter.i]
9893 }
9894
9895
9896 func NewLogicalNetworkCollectionIterator(page LogicalNetworkCollectionPage) LogicalNetworkCollectionIterator {
9897 return LogicalNetworkCollectionIterator{page: page}
9898 }
9899
9900
9901 func (lnc LogicalNetworkCollection) IsEmpty() bool {
9902 return lnc.Value == nil || len(*lnc.Value) == 0
9903 }
9904
9905
9906 func (lnc LogicalNetworkCollection) hasNextLink() bool {
9907 return lnc.NextLink != nil && len(*lnc.NextLink) != 0
9908 }
9909
9910
9911
9912 func (lnc LogicalNetworkCollection) logicalNetworkCollectionPreparer(ctx context.Context) (*http.Request, error) {
9913 if !lnc.hasNextLink() {
9914 return nil, nil
9915 }
9916 return autorest.Prepare((&http.Request{}).WithContext(ctx),
9917 autorest.AsJSON(),
9918 autorest.AsGet(),
9919 autorest.WithBaseURL(to.String(lnc.NextLink)))
9920 }
9921
9922
9923 type LogicalNetworkCollectionPage struct {
9924 fn func(context.Context, LogicalNetworkCollection) (LogicalNetworkCollection, error)
9925 lnc LogicalNetworkCollection
9926 }
9927
9928
9929
9930 func (page *LogicalNetworkCollectionPage) NextWithContext(ctx context.Context) (err error) {
9931 if tracing.IsEnabled() {
9932 ctx = tracing.StartSpan(ctx, fqdn+"/LogicalNetworkCollectionPage.NextWithContext")
9933 defer func() {
9934 sc := -1
9935 if page.Response().Response.Response != nil {
9936 sc = page.Response().Response.Response.StatusCode
9937 }
9938 tracing.EndSpan(ctx, sc, err)
9939 }()
9940 }
9941 for {
9942 next, err := page.fn(ctx, page.lnc)
9943 if err != nil {
9944 return err
9945 }
9946 page.lnc = next
9947 if !next.hasNextLink() || !next.IsEmpty() {
9948 break
9949 }
9950 }
9951 return nil
9952 }
9953
9954
9955
9956
9957 func (page *LogicalNetworkCollectionPage) Next() error {
9958 return page.NextWithContext(context.Background())
9959 }
9960
9961
9962 func (page LogicalNetworkCollectionPage) NotDone() bool {
9963 return !page.lnc.IsEmpty()
9964 }
9965
9966
9967 func (page LogicalNetworkCollectionPage) Response() LogicalNetworkCollection {
9968 return page.lnc
9969 }
9970
9971
9972 func (page LogicalNetworkCollectionPage) Values() []LogicalNetwork {
9973 if page.lnc.IsEmpty() {
9974 return nil
9975 }
9976 return *page.lnc.Value
9977 }
9978
9979
9980 func NewLogicalNetworkCollectionPage(cur LogicalNetworkCollection, getNextPage func(context.Context, LogicalNetworkCollection) (LogicalNetworkCollection, error)) LogicalNetworkCollectionPage {
9981 return LogicalNetworkCollectionPage{
9982 fn: getNextPage,
9983 lnc: cur,
9984 }
9985 }
9986
9987
9988 type LogicalNetworkProperties struct {
9989
9990 FriendlyName *string `json:"friendlyName,omitempty"`
9991
9992 NetworkVirtualizationStatus *string `json:"networkVirtualizationStatus,omitempty"`
9993
9994 LogicalNetworkUsage *string `json:"logicalNetworkUsage,omitempty"`
9995
9996 LogicalNetworkDefinitionsStatus *string `json:"logicalNetworkDefinitionsStatus,omitempty"`
9997 }
9998
9999
10000 type ManualActionTaskDetails struct {
10001
10002 Name *string `json:"name,omitempty"`
10003
10004 Instructions *string `json:"instructions,omitempty"`
10005
10006 Observation *string `json:"observation,omitempty"`
10007
10008 InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"`
10009 }
10010
10011
10012 func (matd ManualActionTaskDetails) MarshalJSON() ([]byte, error) {
10013 matd.InstanceType = InstanceTypeManualActionTaskDetails
10014 objectMap := make(map[string]interface{})
10015 if matd.Name != nil {
10016 objectMap["name"] = matd.Name
10017 }
10018 if matd.Instructions != nil {
10019 objectMap["instructions"] = matd.Instructions
10020 }
10021 if matd.Observation != nil {
10022 objectMap["observation"] = matd.Observation
10023 }
10024 if matd.InstanceType != "" {
10025 objectMap["instanceType"] = matd.InstanceType
10026 }
10027 return json.Marshal(objectMap)
10028 }
10029
10030
10031 func (matd ManualActionTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) {
10032 return nil, false
10033 }
10034
10035
10036 func (matd ManualActionTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) {
10037 return nil, false
10038 }
10039
10040
10041 func (matd ManualActionTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) {
10042 return nil, false
10043 }
10044
10045
10046 func (matd ManualActionTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) {
10047 return nil, false
10048 }
10049
10050
10051 func (matd ManualActionTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) {
10052 return &matd, true
10053 }
10054
10055
10056 func (matd ManualActionTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) {
10057 return nil, false
10058 }
10059
10060
10061 func (matd ManualActionTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) {
10062 return nil, false
10063 }
10064
10065
10066 func (matd ManualActionTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) {
10067 return nil, false
10068 }
10069
10070
10071 func (matd ManualActionTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) {
10072 return nil, false
10073 }
10074
10075
10076 func (matd ManualActionTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) {
10077 return &matd, true
10078 }
10079
10080
10081 type MasterTargetServer struct {
10082
10083 ID *string `json:"id,omitempty"`
10084
10085 IPAddress *string `json:"ipAddress,omitempty"`
10086
10087 Name *string `json:"name,omitempty"`
10088
10089 OsType *string `json:"osType,omitempty"`
10090
10091 AgentVersion *string `json:"agentVersion,omitempty"`
10092
10093 LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"`
10094
10095 VersionStatus *string `json:"versionStatus,omitempty"`
10096
10097 RetentionVolumes *[]RetentionVolume `json:"retentionVolumes,omitempty"`
10098
10099 DataStores *[]DataStore `json:"dataStores,omitempty"`
10100
10101 ValidationErrors *[]HealthError `json:"validationErrors,omitempty"`
10102
10103 HealthErrors *[]HealthError `json:"healthErrors,omitempty"`
10104
10105 DiskCount *int32 `json:"diskCount,omitempty"`
10106
10107 OsVersion *string `json:"osVersion,omitempty"`
10108
10109 AgentExpiryDate *date.Time `json:"agentExpiryDate,omitempty"`
10110
10111 MarsAgentVersion *string `json:"marsAgentVersion,omitempty"`
10112
10113 MarsAgentExpiryDate *date.Time `json:"marsAgentExpiryDate,omitempty"`
10114
10115 AgentVersionDetails *VersionDetails `json:"agentVersionDetails,omitempty"`
10116
10117 MarsAgentVersionDetails *VersionDetails `json:"marsAgentVersionDetails,omitempty"`
10118 }
10119
10120
10121 type MigrateInput struct {
10122
10123 Properties *MigrateInputProperties `json:"properties,omitempty"`
10124 }
10125
10126
10127 type MigrateInputProperties struct {
10128
10129 ProviderSpecificDetails BasicMigrateProviderSpecificInput `json:"providerSpecificDetails,omitempty"`
10130 }
10131
10132
10133 func (mip *MigrateInputProperties) UnmarshalJSON(body []byte) error {
10134 var m map[string]*json.RawMessage
10135 err := json.Unmarshal(body, &m)
10136 if err != nil {
10137 return err
10138 }
10139 for k, v := range m {
10140 switch k {
10141 case "providerSpecificDetails":
10142 if v != nil {
10143 providerSpecificDetails, err := unmarshalBasicMigrateProviderSpecificInput(*v)
10144 if err != nil {
10145 return err
10146 }
10147 mip.ProviderSpecificDetails = providerSpecificDetails
10148 }
10149 }
10150 }
10151
10152 return nil
10153 }
10154
10155
10156 type BasicMigrateProviderSpecificInput interface {
10157 AsVMwareCbtMigrateInput() (*VMwareCbtMigrateInput, bool)
10158 AsMigrateProviderSpecificInput() (*MigrateProviderSpecificInput, bool)
10159 }
10160
10161
10162 type MigrateProviderSpecificInput struct {
10163
10164 InstanceType InstanceTypeBasicMigrateProviderSpecificInput `json:"instanceType,omitempty"`
10165 }
10166
10167 func unmarshalBasicMigrateProviderSpecificInput(body []byte) (BasicMigrateProviderSpecificInput, error) {
10168 var m map[string]interface{}
10169 err := json.Unmarshal(body, &m)
10170 if err != nil {
10171 return nil, err
10172 }
10173
10174 switch m["instanceType"] {
10175 case string(InstanceTypeBasicMigrateProviderSpecificInputInstanceTypeVMwareCbt):
10176 var vmcmi VMwareCbtMigrateInput
10177 err := json.Unmarshal(body, &vmcmi)
10178 return vmcmi, err
10179 default:
10180 var mpsi MigrateProviderSpecificInput
10181 err := json.Unmarshal(body, &mpsi)
10182 return mpsi, err
10183 }
10184 }
10185 func unmarshalBasicMigrateProviderSpecificInputArray(body []byte) ([]BasicMigrateProviderSpecificInput, error) {
10186 var rawMessages []*json.RawMessage
10187 err := json.Unmarshal(body, &rawMessages)
10188 if err != nil {
10189 return nil, err
10190 }
10191
10192 mpsiArray := make([]BasicMigrateProviderSpecificInput, len(rawMessages))
10193
10194 for index, rawMessage := range rawMessages {
10195 mpsi, err := unmarshalBasicMigrateProviderSpecificInput(*rawMessage)
10196 if err != nil {
10197 return nil, err
10198 }
10199 mpsiArray[index] = mpsi
10200 }
10201 return mpsiArray, nil
10202 }
10203
10204
10205 func (mpsi MigrateProviderSpecificInput) MarshalJSON() ([]byte, error) {
10206 mpsi.InstanceType = InstanceTypeBasicMigrateProviderSpecificInputInstanceTypeMigrateProviderSpecificInput
10207 objectMap := make(map[string]interface{})
10208 if mpsi.InstanceType != "" {
10209 objectMap["instanceType"] = mpsi.InstanceType
10210 }
10211 return json.Marshal(objectMap)
10212 }
10213
10214
10215 func (mpsi MigrateProviderSpecificInput) AsVMwareCbtMigrateInput() (*VMwareCbtMigrateInput, bool) {
10216 return nil, false
10217 }
10218
10219
10220 func (mpsi MigrateProviderSpecificInput) AsMigrateProviderSpecificInput() (*MigrateProviderSpecificInput, bool) {
10221 return &mpsi, true
10222 }
10223
10224
10225 func (mpsi MigrateProviderSpecificInput) AsBasicMigrateProviderSpecificInput() (BasicMigrateProviderSpecificInput, bool) {
10226 return &mpsi, true
10227 }
10228
10229
10230 type MigrationItem struct {
10231 autorest.Response `json:"-"`
10232
10233 Properties *MigrationItemProperties `json:"properties,omitempty"`
10234
10235 ID *string `json:"id,omitempty"`
10236
10237 Name *string `json:"name,omitempty"`
10238
10239 Type *string `json:"type,omitempty"`
10240
10241 Location *string `json:"location,omitempty"`
10242 }
10243
10244
10245 func (mi MigrationItem) MarshalJSON() ([]byte, error) {
10246 objectMap := make(map[string]interface{})
10247 if mi.Properties != nil {
10248 objectMap["properties"] = mi.Properties
10249 }
10250 if mi.Location != nil {
10251 objectMap["location"] = mi.Location
10252 }
10253 return json.Marshal(objectMap)
10254 }
10255
10256
10257 type MigrationItemCollection struct {
10258 autorest.Response `json:"-"`
10259
10260 Value *[]MigrationItem `json:"value,omitempty"`
10261
10262 NextLink *string `json:"nextLink,omitempty"`
10263 }
10264
10265
10266 type MigrationItemCollectionIterator struct {
10267 i int
10268 page MigrationItemCollectionPage
10269 }
10270
10271
10272
10273 func (iter *MigrationItemCollectionIterator) NextWithContext(ctx context.Context) (err error) {
10274 if tracing.IsEnabled() {
10275 ctx = tracing.StartSpan(ctx, fqdn+"/MigrationItemCollectionIterator.NextWithContext")
10276 defer func() {
10277 sc := -1
10278 if iter.Response().Response.Response != nil {
10279 sc = iter.Response().Response.Response.StatusCode
10280 }
10281 tracing.EndSpan(ctx, sc, err)
10282 }()
10283 }
10284 iter.i++
10285 if iter.i < len(iter.page.Values()) {
10286 return nil
10287 }
10288 err = iter.page.NextWithContext(ctx)
10289 if err != nil {
10290 iter.i--
10291 return err
10292 }
10293 iter.i = 0
10294 return nil
10295 }
10296
10297
10298
10299
10300 func (iter *MigrationItemCollectionIterator) Next() error {
10301 return iter.NextWithContext(context.Background())
10302 }
10303
10304
10305 func (iter MigrationItemCollectionIterator) NotDone() bool {
10306 return iter.page.NotDone() && iter.i < len(iter.page.Values())
10307 }
10308
10309
10310 func (iter MigrationItemCollectionIterator) Response() MigrationItemCollection {
10311 return iter.page.Response()
10312 }
10313
10314
10315
10316 func (iter MigrationItemCollectionIterator) Value() MigrationItem {
10317 if !iter.page.NotDone() {
10318 return MigrationItem{}
10319 }
10320 return iter.page.Values()[iter.i]
10321 }
10322
10323
10324 func NewMigrationItemCollectionIterator(page MigrationItemCollectionPage) MigrationItemCollectionIterator {
10325 return MigrationItemCollectionIterator{page: page}
10326 }
10327
10328
10329 func (mic MigrationItemCollection) IsEmpty() bool {
10330 return mic.Value == nil || len(*mic.Value) == 0
10331 }
10332
10333
10334 func (mic MigrationItemCollection) hasNextLink() bool {
10335 return mic.NextLink != nil && len(*mic.NextLink) != 0
10336 }
10337
10338
10339
10340 func (mic MigrationItemCollection) migrationItemCollectionPreparer(ctx context.Context) (*http.Request, error) {
10341 if !mic.hasNextLink() {
10342 return nil, nil
10343 }
10344 return autorest.Prepare((&http.Request{}).WithContext(ctx),
10345 autorest.AsJSON(),
10346 autorest.AsGet(),
10347 autorest.WithBaseURL(to.String(mic.NextLink)))
10348 }
10349
10350
10351 type MigrationItemCollectionPage struct {
10352 fn func(context.Context, MigrationItemCollection) (MigrationItemCollection, error)
10353 mic MigrationItemCollection
10354 }
10355
10356
10357
10358 func (page *MigrationItemCollectionPage) NextWithContext(ctx context.Context) (err error) {
10359 if tracing.IsEnabled() {
10360 ctx = tracing.StartSpan(ctx, fqdn+"/MigrationItemCollectionPage.NextWithContext")
10361 defer func() {
10362 sc := -1
10363 if page.Response().Response.Response != nil {
10364 sc = page.Response().Response.Response.StatusCode
10365 }
10366 tracing.EndSpan(ctx, sc, err)
10367 }()
10368 }
10369 for {
10370 next, err := page.fn(ctx, page.mic)
10371 if err != nil {
10372 return err
10373 }
10374 page.mic = next
10375 if !next.hasNextLink() || !next.IsEmpty() {
10376 break
10377 }
10378 }
10379 return nil
10380 }
10381
10382
10383
10384
10385 func (page *MigrationItemCollectionPage) Next() error {
10386 return page.NextWithContext(context.Background())
10387 }
10388
10389
10390 func (page MigrationItemCollectionPage) NotDone() bool {
10391 return !page.mic.IsEmpty()
10392 }
10393
10394
10395 func (page MigrationItemCollectionPage) Response() MigrationItemCollection {
10396 return page.mic
10397 }
10398
10399
10400 func (page MigrationItemCollectionPage) Values() []MigrationItem {
10401 if page.mic.IsEmpty() {
10402 return nil
10403 }
10404 return *page.mic.Value
10405 }
10406
10407
10408 func NewMigrationItemCollectionPage(cur MigrationItemCollection, getNextPage func(context.Context, MigrationItemCollection) (MigrationItemCollection, error)) MigrationItemCollectionPage {
10409 return MigrationItemCollectionPage{
10410 fn: getNextPage,
10411 mic: cur,
10412 }
10413 }
10414
10415
10416 type MigrationItemProperties struct {
10417
10418 MachineName *string `json:"machineName,omitempty"`
10419
10420 PolicyID *string `json:"policyId,omitempty"`
10421
10422 PolicyFriendlyName *string `json:"policyFriendlyName,omitempty"`
10423
10424 MigrationState MigrationState `json:"migrationState,omitempty"`
10425
10426 MigrationStateDescription *string `json:"migrationStateDescription,omitempty"`
10427
10428 LastTestMigrationTime *date.Time `json:"lastTestMigrationTime,omitempty"`
10429
10430 LastTestMigrationStatus *string `json:"lastTestMigrationStatus,omitempty"`
10431
10432 TestMigrateState TestMigrationState `json:"testMigrateState,omitempty"`
10433
10434 TestMigrateStateDescription *string `json:"testMigrateStateDescription,omitempty"`
10435
10436 Health ProtectionHealth `json:"health,omitempty"`
10437
10438 HealthErrors *[]HealthError `json:"healthErrors,omitempty"`
10439
10440 AllowedOperations *[]MigrationItemOperation `json:"allowedOperations,omitempty"`
10441
10442 CurrentJob *CurrentJobDetails `json:"currentJob,omitempty"`
10443
10444 EventCorrelationID *string `json:"eventCorrelationId,omitempty"`
10445
10446 ProviderSpecificDetails BasicMigrationProviderSpecificSettings `json:"providerSpecificDetails,omitempty"`
10447 }
10448
10449
10450 func (mip MigrationItemProperties) MarshalJSON() ([]byte, error) {
10451 objectMap := make(map[string]interface{})
10452 objectMap["providerSpecificDetails"] = mip.ProviderSpecificDetails
10453 return json.Marshal(objectMap)
10454 }
10455
10456
10457 func (mip *MigrationItemProperties) UnmarshalJSON(body []byte) error {
10458 var m map[string]*json.RawMessage
10459 err := json.Unmarshal(body, &m)
10460 if err != nil {
10461 return err
10462 }
10463 for k, v := range m {
10464 switch k {
10465 case "machineName":
10466 if v != nil {
10467 var machineName string
10468 err = json.Unmarshal(*v, &machineName)
10469 if err != nil {
10470 return err
10471 }
10472 mip.MachineName = &machineName
10473 }
10474 case "policyId":
10475 if v != nil {
10476 var policyID string
10477 err = json.Unmarshal(*v, &policyID)
10478 if err != nil {
10479 return err
10480 }
10481 mip.PolicyID = &policyID
10482 }
10483 case "policyFriendlyName":
10484 if v != nil {
10485 var policyFriendlyName string
10486 err = json.Unmarshal(*v, &policyFriendlyName)
10487 if err != nil {
10488 return err
10489 }
10490 mip.PolicyFriendlyName = &policyFriendlyName
10491 }
10492 case "migrationState":
10493 if v != nil {
10494 var migrationState MigrationState
10495 err = json.Unmarshal(*v, &migrationState)
10496 if err != nil {
10497 return err
10498 }
10499 mip.MigrationState = migrationState
10500 }
10501 case "migrationStateDescription":
10502 if v != nil {
10503 var migrationStateDescription string
10504 err = json.Unmarshal(*v, &migrationStateDescription)
10505 if err != nil {
10506 return err
10507 }
10508 mip.MigrationStateDescription = &migrationStateDescription
10509 }
10510 case "lastTestMigrationTime":
10511 if v != nil {
10512 var lastTestMigrationTime date.Time
10513 err = json.Unmarshal(*v, &lastTestMigrationTime)
10514 if err != nil {
10515 return err
10516 }
10517 mip.LastTestMigrationTime = &lastTestMigrationTime
10518 }
10519 case "lastTestMigrationStatus":
10520 if v != nil {
10521 var lastTestMigrationStatus string
10522 err = json.Unmarshal(*v, &lastTestMigrationStatus)
10523 if err != nil {
10524 return err
10525 }
10526 mip.LastTestMigrationStatus = &lastTestMigrationStatus
10527 }
10528 case "testMigrateState":
10529 if v != nil {
10530 var testMigrateState TestMigrationState
10531 err = json.Unmarshal(*v, &testMigrateState)
10532 if err != nil {
10533 return err
10534 }
10535 mip.TestMigrateState = testMigrateState
10536 }
10537 case "testMigrateStateDescription":
10538 if v != nil {
10539 var testMigrateStateDescription string
10540 err = json.Unmarshal(*v, &testMigrateStateDescription)
10541 if err != nil {
10542 return err
10543 }
10544 mip.TestMigrateStateDescription = &testMigrateStateDescription
10545 }
10546 case "health":
10547 if v != nil {
10548 var health ProtectionHealth
10549 err = json.Unmarshal(*v, &health)
10550 if err != nil {
10551 return err
10552 }
10553 mip.Health = health
10554 }
10555 case "healthErrors":
10556 if v != nil {
10557 var healthErrors []HealthError
10558 err = json.Unmarshal(*v, &healthErrors)
10559 if err != nil {
10560 return err
10561 }
10562 mip.HealthErrors = &healthErrors
10563 }
10564 case "allowedOperations":
10565 if v != nil {
10566 var allowedOperations []MigrationItemOperation
10567 err = json.Unmarshal(*v, &allowedOperations)
10568 if err != nil {
10569 return err
10570 }
10571 mip.AllowedOperations = &allowedOperations
10572 }
10573 case "currentJob":
10574 if v != nil {
10575 var currentJob CurrentJobDetails
10576 err = json.Unmarshal(*v, ¤tJob)
10577 if err != nil {
10578 return err
10579 }
10580 mip.CurrentJob = ¤tJob
10581 }
10582 case "eventCorrelationId":
10583 if v != nil {
10584 var eventCorrelationID string
10585 err = json.Unmarshal(*v, &eventCorrelationID)
10586 if err != nil {
10587 return err
10588 }
10589 mip.EventCorrelationID = &eventCorrelationID
10590 }
10591 case "providerSpecificDetails":
10592 if v != nil {
10593 providerSpecificDetails, err := unmarshalBasicMigrationProviderSpecificSettings(*v)
10594 if err != nil {
10595 return err
10596 }
10597 mip.ProviderSpecificDetails = providerSpecificDetails
10598 }
10599 }
10600 }
10601
10602 return nil
10603 }
10604
10605
10606 type MigrationItemsQueryParameter struct {
10607
10608 SourceFabricName *string `json:"sourceFabricName,omitempty"`
10609
10610 InstanceType *string `json:"instanceType,omitempty"`
10611 }
10612
10613
10614 type BasicMigrationProviderSpecificSettings interface {
10615 AsVMwareCbtMigrationDetails() (*VMwareCbtMigrationDetails, bool)
10616 AsMigrationProviderSpecificSettings() (*MigrationProviderSpecificSettings, bool)
10617 }
10618
10619
10620 type MigrationProviderSpecificSettings struct {
10621
10622 InstanceType InstanceTypeBasicMigrationProviderSpecificSettings `json:"instanceType,omitempty"`
10623 }
10624
10625 func unmarshalBasicMigrationProviderSpecificSettings(body []byte) (BasicMigrationProviderSpecificSettings, error) {
10626 var m map[string]interface{}
10627 err := json.Unmarshal(body, &m)
10628 if err != nil {
10629 return nil, err
10630 }
10631
10632 switch m["instanceType"] {
10633 case string(InstanceTypeBasicMigrationProviderSpecificSettingsInstanceTypeVMwareCbt):
10634 var vmcmd VMwareCbtMigrationDetails
10635 err := json.Unmarshal(body, &vmcmd)
10636 return vmcmd, err
10637 default:
10638 var mpss MigrationProviderSpecificSettings
10639 err := json.Unmarshal(body, &mpss)
10640 return mpss, err
10641 }
10642 }
10643 func unmarshalBasicMigrationProviderSpecificSettingsArray(body []byte) ([]BasicMigrationProviderSpecificSettings, error) {
10644 var rawMessages []*json.RawMessage
10645 err := json.Unmarshal(body, &rawMessages)
10646 if err != nil {
10647 return nil, err
10648 }
10649
10650 mpssArray := make([]BasicMigrationProviderSpecificSettings, len(rawMessages))
10651
10652 for index, rawMessage := range rawMessages {
10653 mpss, err := unmarshalBasicMigrationProviderSpecificSettings(*rawMessage)
10654 if err != nil {
10655 return nil, err
10656 }
10657 mpssArray[index] = mpss
10658 }
10659 return mpssArray, nil
10660 }
10661
10662
10663 func (mpss MigrationProviderSpecificSettings) MarshalJSON() ([]byte, error) {
10664 mpss.InstanceType = InstanceTypeBasicMigrationProviderSpecificSettingsInstanceTypeMigrationProviderSpecificSettings
10665 objectMap := make(map[string]interface{})
10666 if mpss.InstanceType != "" {
10667 objectMap["instanceType"] = mpss.InstanceType
10668 }
10669 return json.Marshal(objectMap)
10670 }
10671
10672
10673 func (mpss MigrationProviderSpecificSettings) AsVMwareCbtMigrationDetails() (*VMwareCbtMigrationDetails, bool) {
10674 return nil, false
10675 }
10676
10677
10678 func (mpss MigrationProviderSpecificSettings) AsMigrationProviderSpecificSettings() (*MigrationProviderSpecificSettings, bool) {
10679 return &mpss, true
10680 }
10681
10682
10683 func (mpss MigrationProviderSpecificSettings) AsBasicMigrationProviderSpecificSettings() (BasicMigrationProviderSpecificSettings, bool) {
10684 return &mpss, true
10685 }
10686
10687
10688 type MigrationRecoveryPoint struct {
10689 autorest.Response `json:"-"`
10690
10691 Properties *MigrationRecoveryPointProperties `json:"properties,omitempty"`
10692
10693 ID *string `json:"id,omitempty"`
10694
10695 Name *string `json:"name,omitempty"`
10696
10697 Type *string `json:"type,omitempty"`
10698
10699 Location *string `json:"location,omitempty"`
10700 }
10701
10702
10703 func (mrp MigrationRecoveryPoint) MarshalJSON() ([]byte, error) {
10704 objectMap := make(map[string]interface{})
10705 if mrp.Properties != nil {
10706 objectMap["properties"] = mrp.Properties
10707 }
10708 if mrp.Location != nil {
10709 objectMap["location"] = mrp.Location
10710 }
10711 return json.Marshal(objectMap)
10712 }
10713
10714
10715 type MigrationRecoveryPointCollection struct {
10716 autorest.Response `json:"-"`
10717
10718 Value *[]MigrationRecoveryPoint `json:"value,omitempty"`
10719
10720 NextLink *string `json:"nextLink,omitempty"`
10721 }
10722
10723
10724
10725 type MigrationRecoveryPointCollectionIterator struct {
10726 i int
10727 page MigrationRecoveryPointCollectionPage
10728 }
10729
10730
10731
10732 func (iter *MigrationRecoveryPointCollectionIterator) NextWithContext(ctx context.Context) (err error) {
10733 if tracing.IsEnabled() {
10734 ctx = tracing.StartSpan(ctx, fqdn+"/MigrationRecoveryPointCollectionIterator.NextWithContext")
10735 defer func() {
10736 sc := -1
10737 if iter.Response().Response.Response != nil {
10738 sc = iter.Response().Response.Response.StatusCode
10739 }
10740 tracing.EndSpan(ctx, sc, err)
10741 }()
10742 }
10743 iter.i++
10744 if iter.i < len(iter.page.Values()) {
10745 return nil
10746 }
10747 err = iter.page.NextWithContext(ctx)
10748 if err != nil {
10749 iter.i--
10750 return err
10751 }
10752 iter.i = 0
10753 return nil
10754 }
10755
10756
10757
10758
10759 func (iter *MigrationRecoveryPointCollectionIterator) Next() error {
10760 return iter.NextWithContext(context.Background())
10761 }
10762
10763
10764 func (iter MigrationRecoveryPointCollectionIterator) NotDone() bool {
10765 return iter.page.NotDone() && iter.i < len(iter.page.Values())
10766 }
10767
10768
10769 func (iter MigrationRecoveryPointCollectionIterator) Response() MigrationRecoveryPointCollection {
10770 return iter.page.Response()
10771 }
10772
10773
10774
10775 func (iter MigrationRecoveryPointCollectionIterator) Value() MigrationRecoveryPoint {
10776 if !iter.page.NotDone() {
10777 return MigrationRecoveryPoint{}
10778 }
10779 return iter.page.Values()[iter.i]
10780 }
10781
10782
10783 func NewMigrationRecoveryPointCollectionIterator(page MigrationRecoveryPointCollectionPage) MigrationRecoveryPointCollectionIterator {
10784 return MigrationRecoveryPointCollectionIterator{page: page}
10785 }
10786
10787
10788 func (mrpc MigrationRecoveryPointCollection) IsEmpty() bool {
10789 return mrpc.Value == nil || len(*mrpc.Value) == 0
10790 }
10791
10792
10793 func (mrpc MigrationRecoveryPointCollection) hasNextLink() bool {
10794 return mrpc.NextLink != nil && len(*mrpc.NextLink) != 0
10795 }
10796
10797
10798
10799 func (mrpc MigrationRecoveryPointCollection) migrationRecoveryPointCollectionPreparer(ctx context.Context) (*http.Request, error) {
10800 if !mrpc.hasNextLink() {
10801 return nil, nil
10802 }
10803 return autorest.Prepare((&http.Request{}).WithContext(ctx),
10804 autorest.AsJSON(),
10805 autorest.AsGet(),
10806 autorest.WithBaseURL(to.String(mrpc.NextLink)))
10807 }
10808
10809
10810 type MigrationRecoveryPointCollectionPage struct {
10811 fn func(context.Context, MigrationRecoveryPointCollection) (MigrationRecoveryPointCollection, error)
10812 mrpc MigrationRecoveryPointCollection
10813 }
10814
10815
10816
10817 func (page *MigrationRecoveryPointCollectionPage) NextWithContext(ctx context.Context) (err error) {
10818 if tracing.IsEnabled() {
10819 ctx = tracing.StartSpan(ctx, fqdn+"/MigrationRecoveryPointCollectionPage.NextWithContext")
10820 defer func() {
10821 sc := -1
10822 if page.Response().Response.Response != nil {
10823 sc = page.Response().Response.Response.StatusCode
10824 }
10825 tracing.EndSpan(ctx, sc, err)
10826 }()
10827 }
10828 for {
10829 next, err := page.fn(ctx, page.mrpc)
10830 if err != nil {
10831 return err
10832 }
10833 page.mrpc = next
10834 if !next.hasNextLink() || !next.IsEmpty() {
10835 break
10836 }
10837 }
10838 return nil
10839 }
10840
10841
10842
10843
10844 func (page *MigrationRecoveryPointCollectionPage) Next() error {
10845 return page.NextWithContext(context.Background())
10846 }
10847
10848
10849 func (page MigrationRecoveryPointCollectionPage) NotDone() bool {
10850 return !page.mrpc.IsEmpty()
10851 }
10852
10853
10854 func (page MigrationRecoveryPointCollectionPage) Response() MigrationRecoveryPointCollection {
10855 return page.mrpc
10856 }
10857
10858
10859 func (page MigrationRecoveryPointCollectionPage) Values() []MigrationRecoveryPoint {
10860 if page.mrpc.IsEmpty() {
10861 return nil
10862 }
10863 return *page.mrpc.Value
10864 }
10865
10866
10867 func NewMigrationRecoveryPointCollectionPage(cur MigrationRecoveryPointCollection, getNextPage func(context.Context, MigrationRecoveryPointCollection) (MigrationRecoveryPointCollection, error)) MigrationRecoveryPointCollectionPage {
10868 return MigrationRecoveryPointCollectionPage{
10869 fn: getNextPage,
10870 mrpc: cur,
10871 }
10872 }
10873
10874
10875 type MigrationRecoveryPointProperties struct {
10876
10877 RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"`
10878
10879 RecoveryPointType MigrationRecoveryPointType `json:"recoveryPointType,omitempty"`
10880 }
10881
10882
10883 func (mrpp MigrationRecoveryPointProperties) MarshalJSON() ([]byte, error) {
10884 objectMap := make(map[string]interface{})
10885 return json.Marshal(objectMap)
10886 }
10887
10888
10889 type MobilityServiceUpdate struct {
10890
10891 Version *string `json:"version,omitempty"`
10892
10893 RebootStatus *string `json:"rebootStatus,omitempty"`
10894
10895 OsType *string `json:"osType,omitempty"`
10896 }
10897
10898
10899 type Network struct {
10900 autorest.Response `json:"-"`
10901
10902 Properties *NetworkProperties `json:"properties,omitempty"`
10903
10904 ID *string `json:"id,omitempty"`
10905
10906 Name *string `json:"name,omitempty"`
10907
10908 Type *string `json:"type,omitempty"`
10909
10910 Location *string `json:"location,omitempty"`
10911 }
10912
10913
10914 func (n Network) MarshalJSON() ([]byte, error) {
10915 objectMap := make(map[string]interface{})
10916 if n.Properties != nil {
10917 objectMap["properties"] = n.Properties
10918 }
10919 if n.Location != nil {
10920 objectMap["location"] = n.Location
10921 }
10922 return json.Marshal(objectMap)
10923 }
10924
10925
10926 type NetworkCollection struct {
10927 autorest.Response `json:"-"`
10928
10929 Value *[]Network `json:"value,omitempty"`
10930
10931 NextLink *string `json:"nextLink,omitempty"`
10932 }
10933
10934
10935 type NetworkCollectionIterator struct {
10936 i int
10937 page NetworkCollectionPage
10938 }
10939
10940
10941
10942 func (iter *NetworkCollectionIterator) NextWithContext(ctx context.Context) (err error) {
10943 if tracing.IsEnabled() {
10944 ctx = tracing.StartSpan(ctx, fqdn+"/NetworkCollectionIterator.NextWithContext")
10945 defer func() {
10946 sc := -1
10947 if iter.Response().Response.Response != nil {
10948 sc = iter.Response().Response.Response.StatusCode
10949 }
10950 tracing.EndSpan(ctx, sc, err)
10951 }()
10952 }
10953 iter.i++
10954 if iter.i < len(iter.page.Values()) {
10955 return nil
10956 }
10957 err = iter.page.NextWithContext(ctx)
10958 if err != nil {
10959 iter.i--
10960 return err
10961 }
10962 iter.i = 0
10963 return nil
10964 }
10965
10966
10967
10968
10969 func (iter *NetworkCollectionIterator) Next() error {
10970 return iter.NextWithContext(context.Background())
10971 }
10972
10973
10974 func (iter NetworkCollectionIterator) NotDone() bool {
10975 return iter.page.NotDone() && iter.i < len(iter.page.Values())
10976 }
10977
10978
10979 func (iter NetworkCollectionIterator) Response() NetworkCollection {
10980 return iter.page.Response()
10981 }
10982
10983
10984
10985 func (iter NetworkCollectionIterator) Value() Network {
10986 if !iter.page.NotDone() {
10987 return Network{}
10988 }
10989 return iter.page.Values()[iter.i]
10990 }
10991
10992
10993 func NewNetworkCollectionIterator(page NetworkCollectionPage) NetworkCollectionIterator {
10994 return NetworkCollectionIterator{page: page}
10995 }
10996
10997
10998 func (nc NetworkCollection) IsEmpty() bool {
10999 return nc.Value == nil || len(*nc.Value) == 0
11000 }
11001
11002
11003 func (nc NetworkCollection) hasNextLink() bool {
11004 return nc.NextLink != nil && len(*nc.NextLink) != 0
11005 }
11006
11007
11008
11009 func (nc NetworkCollection) networkCollectionPreparer(ctx context.Context) (*http.Request, error) {
11010 if !nc.hasNextLink() {
11011 return nil, nil
11012 }
11013 return autorest.Prepare((&http.Request{}).WithContext(ctx),
11014 autorest.AsJSON(),
11015 autorest.AsGet(),
11016 autorest.WithBaseURL(to.String(nc.NextLink)))
11017 }
11018
11019
11020 type NetworkCollectionPage struct {
11021 fn func(context.Context, NetworkCollection) (NetworkCollection, error)
11022 nc NetworkCollection
11023 }
11024
11025
11026
11027 func (page *NetworkCollectionPage) NextWithContext(ctx context.Context) (err error) {
11028 if tracing.IsEnabled() {
11029 ctx = tracing.StartSpan(ctx, fqdn+"/NetworkCollectionPage.NextWithContext")
11030 defer func() {
11031 sc := -1
11032 if page.Response().Response.Response != nil {
11033 sc = page.Response().Response.Response.StatusCode
11034 }
11035 tracing.EndSpan(ctx, sc, err)
11036 }()
11037 }
11038 for {
11039 next, err := page.fn(ctx, page.nc)
11040 if err != nil {
11041 return err
11042 }
11043 page.nc = next
11044 if !next.hasNextLink() || !next.IsEmpty() {
11045 break
11046 }
11047 }
11048 return nil
11049 }
11050
11051
11052
11053
11054 func (page *NetworkCollectionPage) Next() error {
11055 return page.NextWithContext(context.Background())
11056 }
11057
11058
11059 func (page NetworkCollectionPage) NotDone() bool {
11060 return !page.nc.IsEmpty()
11061 }
11062
11063
11064 func (page NetworkCollectionPage) Response() NetworkCollection {
11065 return page.nc
11066 }
11067
11068
11069 func (page NetworkCollectionPage) Values() []Network {
11070 if page.nc.IsEmpty() {
11071 return nil
11072 }
11073 return *page.nc.Value
11074 }
11075
11076
11077 func NewNetworkCollectionPage(cur NetworkCollection, getNextPage func(context.Context, NetworkCollection) (NetworkCollection, error)) NetworkCollectionPage {
11078 return NetworkCollectionPage{
11079 fn: getNextPage,
11080 nc: cur,
11081 }
11082 }
11083
11084
11085
11086
11087
11088
11089 type NetworkMapping struct {
11090 autorest.Response `json:"-"`
11091
11092 Properties *NetworkMappingProperties `json:"properties,omitempty"`
11093
11094 ID *string `json:"id,omitempty"`
11095
11096 Name *string `json:"name,omitempty"`
11097
11098 Type *string `json:"type,omitempty"`
11099
11100 Location *string `json:"location,omitempty"`
11101 }
11102
11103
11104 func (nm NetworkMapping) MarshalJSON() ([]byte, error) {
11105 objectMap := make(map[string]interface{})
11106 if nm.Properties != nil {
11107 objectMap["properties"] = nm.Properties
11108 }
11109 if nm.Location != nil {
11110 objectMap["location"] = nm.Location
11111 }
11112 return json.Marshal(objectMap)
11113 }
11114
11115
11116
11117
11118
11119 type NetworkMappingCollection struct {
11120 autorest.Response `json:"-"`
11121
11122 Value *[]NetworkMapping `json:"value,omitempty"`
11123
11124 NextLink *string `json:"nextLink,omitempty"`
11125 }
11126
11127
11128 type NetworkMappingCollectionIterator struct {
11129 i int
11130 page NetworkMappingCollectionPage
11131 }
11132
11133
11134
11135 func (iter *NetworkMappingCollectionIterator) NextWithContext(ctx context.Context) (err error) {
11136 if tracing.IsEnabled() {
11137 ctx = tracing.StartSpan(ctx, fqdn+"/NetworkMappingCollectionIterator.NextWithContext")
11138 defer func() {
11139 sc := -1
11140 if iter.Response().Response.Response != nil {
11141 sc = iter.Response().Response.Response.StatusCode
11142 }
11143 tracing.EndSpan(ctx, sc, err)
11144 }()
11145 }
11146 iter.i++
11147 if iter.i < len(iter.page.Values()) {
11148 return nil
11149 }
11150 err = iter.page.NextWithContext(ctx)
11151 if err != nil {
11152 iter.i--
11153 return err
11154 }
11155 iter.i = 0
11156 return nil
11157 }
11158
11159
11160
11161
11162 func (iter *NetworkMappingCollectionIterator) Next() error {
11163 return iter.NextWithContext(context.Background())
11164 }
11165
11166
11167 func (iter NetworkMappingCollectionIterator) NotDone() bool {
11168 return iter.page.NotDone() && iter.i < len(iter.page.Values())
11169 }
11170
11171
11172 func (iter NetworkMappingCollectionIterator) Response() NetworkMappingCollection {
11173 return iter.page.Response()
11174 }
11175
11176
11177
11178 func (iter NetworkMappingCollectionIterator) Value() NetworkMapping {
11179 if !iter.page.NotDone() {
11180 return NetworkMapping{}
11181 }
11182 return iter.page.Values()[iter.i]
11183 }
11184
11185
11186 func NewNetworkMappingCollectionIterator(page NetworkMappingCollectionPage) NetworkMappingCollectionIterator {
11187 return NetworkMappingCollectionIterator{page: page}
11188 }
11189
11190
11191 func (nmc NetworkMappingCollection) IsEmpty() bool {
11192 return nmc.Value == nil || len(*nmc.Value) == 0
11193 }
11194
11195
11196 func (nmc NetworkMappingCollection) hasNextLink() bool {
11197 return nmc.NextLink != nil && len(*nmc.NextLink) != 0
11198 }
11199
11200
11201
11202 func (nmc NetworkMappingCollection) networkMappingCollectionPreparer(ctx context.Context) (*http.Request, error) {
11203 if !nmc.hasNextLink() {
11204 return nil, nil
11205 }
11206 return autorest.Prepare((&http.Request{}).WithContext(ctx),
11207 autorest.AsJSON(),
11208 autorest.AsGet(),
11209 autorest.WithBaseURL(to.String(nmc.NextLink)))
11210 }
11211
11212
11213 type NetworkMappingCollectionPage struct {
11214 fn func(context.Context, NetworkMappingCollection) (NetworkMappingCollection, error)
11215 nmc NetworkMappingCollection
11216 }
11217
11218
11219
11220 func (page *NetworkMappingCollectionPage) NextWithContext(ctx context.Context) (err error) {
11221 if tracing.IsEnabled() {
11222 ctx = tracing.StartSpan(ctx, fqdn+"/NetworkMappingCollectionPage.NextWithContext")
11223 defer func() {
11224 sc := -1
11225 if page.Response().Response.Response != nil {
11226 sc = page.Response().Response.Response.StatusCode
11227 }
11228 tracing.EndSpan(ctx, sc, err)
11229 }()
11230 }
11231 for {
11232 next, err := page.fn(ctx, page.nmc)
11233 if err != nil {
11234 return err
11235 }
11236 page.nmc = next
11237 if !next.hasNextLink() || !next.IsEmpty() {
11238 break
11239 }
11240 }
11241 return nil
11242 }
11243
11244
11245
11246
11247 func (page *NetworkMappingCollectionPage) Next() error {
11248 return page.NextWithContext(context.Background())
11249 }
11250
11251
11252 func (page NetworkMappingCollectionPage) NotDone() bool {
11253 return !page.nmc.IsEmpty()
11254 }
11255
11256
11257 func (page NetworkMappingCollectionPage) Response() NetworkMappingCollection {
11258 return page.nmc
11259 }
11260
11261
11262 func (page NetworkMappingCollectionPage) Values() []NetworkMapping {
11263 if page.nmc.IsEmpty() {
11264 return nil
11265 }
11266 return *page.nmc.Value
11267 }
11268
11269
11270 func NewNetworkMappingCollectionPage(cur NetworkMappingCollection, getNextPage func(context.Context, NetworkMappingCollection) (NetworkMappingCollection, error)) NetworkMappingCollectionPage {
11271 return NetworkMappingCollectionPage{
11272 fn: getNextPage,
11273 nmc: cur,
11274 }
11275 }
11276
11277
11278 type BasicNetworkMappingFabricSpecificSettings interface {
11279 AsAzureToAzureNetworkMappingSettings() (*AzureToAzureNetworkMappingSettings, bool)
11280 AsVmmToAzureNetworkMappingSettings() (*VmmToAzureNetworkMappingSettings, bool)
11281 AsVmmToVmmNetworkMappingSettings() (*VmmToVmmNetworkMappingSettings, bool)
11282 AsNetworkMappingFabricSpecificSettings() (*NetworkMappingFabricSpecificSettings, bool)
11283 }
11284
11285
11286 type NetworkMappingFabricSpecificSettings struct {
11287
11288 InstanceType InstanceTypeBasicNetworkMappingFabricSpecificSettings `json:"instanceType,omitempty"`
11289 }
11290
11291 func unmarshalBasicNetworkMappingFabricSpecificSettings(body []byte) (BasicNetworkMappingFabricSpecificSettings, error) {
11292 var m map[string]interface{}
11293 err := json.Unmarshal(body, &m)
11294 if err != nil {
11295 return nil, err
11296 }
11297
11298 switch m["instanceType"] {
11299 case string(InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeAzureToAzure):
11300 var atanms AzureToAzureNetworkMappingSettings
11301 err := json.Unmarshal(body, &atanms)
11302 return atanms, err
11303 case string(InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToAzure):
11304 var vtanms VmmToAzureNetworkMappingSettings
11305 err := json.Unmarshal(body, &vtanms)
11306 return vtanms, err
11307 case string(InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToVmm):
11308 var vtvnms VmmToVmmNetworkMappingSettings
11309 err := json.Unmarshal(body, &vtvnms)
11310 return vtvnms, err
11311 default:
11312 var nmfss NetworkMappingFabricSpecificSettings
11313 err := json.Unmarshal(body, &nmfss)
11314 return nmfss, err
11315 }
11316 }
11317 func unmarshalBasicNetworkMappingFabricSpecificSettingsArray(body []byte) ([]BasicNetworkMappingFabricSpecificSettings, error) {
11318 var rawMessages []*json.RawMessage
11319 err := json.Unmarshal(body, &rawMessages)
11320 if err != nil {
11321 return nil, err
11322 }
11323
11324 nmfssArray := make([]BasicNetworkMappingFabricSpecificSettings, len(rawMessages))
11325
11326 for index, rawMessage := range rawMessages {
11327 nmfss, err := unmarshalBasicNetworkMappingFabricSpecificSettings(*rawMessage)
11328 if err != nil {
11329 return nil, err
11330 }
11331 nmfssArray[index] = nmfss
11332 }
11333 return nmfssArray, nil
11334 }
11335
11336
11337 func (nmfss NetworkMappingFabricSpecificSettings) MarshalJSON() ([]byte, error) {
11338 nmfss.InstanceType = InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeNetworkMappingFabricSpecificSettings
11339 objectMap := make(map[string]interface{})
11340 if nmfss.InstanceType != "" {
11341 objectMap["instanceType"] = nmfss.InstanceType
11342 }
11343 return json.Marshal(objectMap)
11344 }
11345
11346
11347 func (nmfss NetworkMappingFabricSpecificSettings) AsAzureToAzureNetworkMappingSettings() (*AzureToAzureNetworkMappingSettings, bool) {
11348 return nil, false
11349 }
11350
11351
11352 func (nmfss NetworkMappingFabricSpecificSettings) AsVmmToAzureNetworkMappingSettings() (*VmmToAzureNetworkMappingSettings, bool) {
11353 return nil, false
11354 }
11355
11356
11357 func (nmfss NetworkMappingFabricSpecificSettings) AsVmmToVmmNetworkMappingSettings() (*VmmToVmmNetworkMappingSettings, bool) {
11358 return nil, false
11359 }
11360
11361
11362 func (nmfss NetworkMappingFabricSpecificSettings) AsNetworkMappingFabricSpecificSettings() (*NetworkMappingFabricSpecificSettings, bool) {
11363 return &nmfss, true
11364 }
11365
11366
11367 func (nmfss NetworkMappingFabricSpecificSettings) AsBasicNetworkMappingFabricSpecificSettings() (BasicNetworkMappingFabricSpecificSettings, bool) {
11368 return &nmfss, true
11369 }
11370
11371
11372 type NetworkMappingProperties struct {
11373
11374 State *string `json:"state,omitempty"`
11375
11376 PrimaryNetworkFriendlyName *string `json:"primaryNetworkFriendlyName,omitempty"`
11377
11378 PrimaryNetworkID *string `json:"primaryNetworkId,omitempty"`
11379
11380 PrimaryFabricFriendlyName *string `json:"primaryFabricFriendlyName,omitempty"`
11381
11382 RecoveryNetworkFriendlyName *string `json:"recoveryNetworkFriendlyName,omitempty"`
11383
11384 RecoveryNetworkID *string `json:"recoveryNetworkId,omitempty"`
11385
11386 RecoveryFabricArmID *string `json:"recoveryFabricArmId,omitempty"`
11387
11388 RecoveryFabricFriendlyName *string `json:"recoveryFabricFriendlyName,omitempty"`
11389
11390 FabricSpecificSettings BasicNetworkMappingFabricSpecificSettings `json:"fabricSpecificSettings,omitempty"`
11391 }
11392
11393
11394 func (nmp *NetworkMappingProperties) UnmarshalJSON(body []byte) error {
11395 var m map[string]*json.RawMessage
11396 err := json.Unmarshal(body, &m)
11397 if err != nil {
11398 return err
11399 }
11400 for k, v := range m {
11401 switch k {
11402 case "state":
11403 if v != nil {
11404 var state string
11405 err = json.Unmarshal(*v, &state)
11406 if err != nil {
11407 return err
11408 }
11409 nmp.State = &state
11410 }
11411 case "primaryNetworkFriendlyName":
11412 if v != nil {
11413 var primaryNetworkFriendlyName string
11414 err = json.Unmarshal(*v, &primaryNetworkFriendlyName)
11415 if err != nil {
11416 return err
11417 }
11418 nmp.PrimaryNetworkFriendlyName = &primaryNetworkFriendlyName
11419 }
11420 case "primaryNetworkId":
11421 if v != nil {
11422 var primaryNetworkID string
11423 err = json.Unmarshal(*v, &primaryNetworkID)
11424 if err != nil {
11425 return err
11426 }
11427 nmp.PrimaryNetworkID = &primaryNetworkID
11428 }
11429 case "primaryFabricFriendlyName":
11430 if v != nil {
11431 var primaryFabricFriendlyName string
11432 err = json.Unmarshal(*v, &primaryFabricFriendlyName)
11433 if err != nil {
11434 return err
11435 }
11436 nmp.PrimaryFabricFriendlyName = &primaryFabricFriendlyName
11437 }
11438 case "recoveryNetworkFriendlyName":
11439 if v != nil {
11440 var recoveryNetworkFriendlyName string
11441 err = json.Unmarshal(*v, &recoveryNetworkFriendlyName)
11442 if err != nil {
11443 return err
11444 }
11445 nmp.RecoveryNetworkFriendlyName = &recoveryNetworkFriendlyName
11446 }
11447 case "recoveryNetworkId":
11448 if v != nil {
11449 var recoveryNetworkID string
11450 err = json.Unmarshal(*v, &recoveryNetworkID)
11451 if err != nil {
11452 return err
11453 }
11454 nmp.RecoveryNetworkID = &recoveryNetworkID
11455 }
11456 case "recoveryFabricArmId":
11457 if v != nil {
11458 var recoveryFabricArmID string
11459 err = json.Unmarshal(*v, &recoveryFabricArmID)
11460 if err != nil {
11461 return err
11462 }
11463 nmp.RecoveryFabricArmID = &recoveryFabricArmID
11464 }
11465 case "recoveryFabricFriendlyName":
11466 if v != nil {
11467 var recoveryFabricFriendlyName string
11468 err = json.Unmarshal(*v, &recoveryFabricFriendlyName)
11469 if err != nil {
11470 return err
11471 }
11472 nmp.RecoveryFabricFriendlyName = &recoveryFabricFriendlyName
11473 }
11474 case "fabricSpecificSettings":
11475 if v != nil {
11476 fabricSpecificSettings, err := unmarshalBasicNetworkMappingFabricSpecificSettings(*v)
11477 if err != nil {
11478 return err
11479 }
11480 nmp.FabricSpecificSettings = fabricSpecificSettings
11481 }
11482 }
11483 }
11484
11485 return nil
11486 }
11487
11488
11489 type NetworkProperties struct {
11490
11491 FabricType *string `json:"fabricType,omitempty"`
11492
11493 Subnets *[]Subnet `json:"subnets,omitempty"`
11494
11495 FriendlyName *string `json:"friendlyName,omitempty"`
11496
11497 NetworkType *string `json:"networkType,omitempty"`
11498 }
11499
11500
11501 type OperationsDiscovery struct {
11502
11503 Name *string `json:"name,omitempty"`
11504
11505 Display *Display `json:"display,omitempty"`
11506
11507 Origin *string `json:"origin,omitempty"`
11508
11509 Properties interface{} `json:"properties,omitempty"`
11510 }
11511
11512
11513 type OperationsDiscoveryCollection struct {
11514 autorest.Response `json:"-"`
11515
11516 Value *[]OperationsDiscovery `json:"value,omitempty"`
11517
11518 NextLink *string `json:"nextLink,omitempty"`
11519 }
11520
11521
11522
11523 type OperationsDiscoveryCollectionIterator struct {
11524 i int
11525 page OperationsDiscoveryCollectionPage
11526 }
11527
11528
11529
11530 func (iter *OperationsDiscoveryCollectionIterator) NextWithContext(ctx context.Context) (err error) {
11531 if tracing.IsEnabled() {
11532 ctx = tracing.StartSpan(ctx, fqdn+"/OperationsDiscoveryCollectionIterator.NextWithContext")
11533 defer func() {
11534 sc := -1
11535 if iter.Response().Response.Response != nil {
11536 sc = iter.Response().Response.Response.StatusCode
11537 }
11538 tracing.EndSpan(ctx, sc, err)
11539 }()
11540 }
11541 iter.i++
11542 if iter.i < len(iter.page.Values()) {
11543 return nil
11544 }
11545 err = iter.page.NextWithContext(ctx)
11546 if err != nil {
11547 iter.i--
11548 return err
11549 }
11550 iter.i = 0
11551 return nil
11552 }
11553
11554
11555
11556
11557 func (iter *OperationsDiscoveryCollectionIterator) Next() error {
11558 return iter.NextWithContext(context.Background())
11559 }
11560
11561
11562 func (iter OperationsDiscoveryCollectionIterator) NotDone() bool {
11563 return iter.page.NotDone() && iter.i < len(iter.page.Values())
11564 }
11565
11566
11567 func (iter OperationsDiscoveryCollectionIterator) Response() OperationsDiscoveryCollection {
11568 return iter.page.Response()
11569 }
11570
11571
11572
11573 func (iter OperationsDiscoveryCollectionIterator) Value() OperationsDiscovery {
11574 if !iter.page.NotDone() {
11575 return OperationsDiscovery{}
11576 }
11577 return iter.page.Values()[iter.i]
11578 }
11579
11580
11581 func NewOperationsDiscoveryCollectionIterator(page OperationsDiscoveryCollectionPage) OperationsDiscoveryCollectionIterator {
11582 return OperationsDiscoveryCollectionIterator{page: page}
11583 }
11584
11585
11586 func (odc OperationsDiscoveryCollection) IsEmpty() bool {
11587 return odc.Value == nil || len(*odc.Value) == 0
11588 }
11589
11590
11591 func (odc OperationsDiscoveryCollection) hasNextLink() bool {
11592 return odc.NextLink != nil && len(*odc.NextLink) != 0
11593 }
11594
11595
11596
11597 func (odc OperationsDiscoveryCollection) operationsDiscoveryCollectionPreparer(ctx context.Context) (*http.Request, error) {
11598 if !odc.hasNextLink() {
11599 return nil, nil
11600 }
11601 return autorest.Prepare((&http.Request{}).WithContext(ctx),
11602 autorest.AsJSON(),
11603 autorest.AsGet(),
11604 autorest.WithBaseURL(to.String(odc.NextLink)))
11605 }
11606
11607
11608 type OperationsDiscoveryCollectionPage struct {
11609 fn func(context.Context, OperationsDiscoveryCollection) (OperationsDiscoveryCollection, error)
11610 odc OperationsDiscoveryCollection
11611 }
11612
11613
11614
11615 func (page *OperationsDiscoveryCollectionPage) NextWithContext(ctx context.Context) (err error) {
11616 if tracing.IsEnabled() {
11617 ctx = tracing.StartSpan(ctx, fqdn+"/OperationsDiscoveryCollectionPage.NextWithContext")
11618 defer func() {
11619 sc := -1
11620 if page.Response().Response.Response != nil {
11621 sc = page.Response().Response.Response.StatusCode
11622 }
11623 tracing.EndSpan(ctx, sc, err)
11624 }()
11625 }
11626 for {
11627 next, err := page.fn(ctx, page.odc)
11628 if err != nil {
11629 return err
11630 }
11631 page.odc = next
11632 if !next.hasNextLink() || !next.IsEmpty() {
11633 break
11634 }
11635 }
11636 return nil
11637 }
11638
11639
11640
11641
11642 func (page *OperationsDiscoveryCollectionPage) Next() error {
11643 return page.NextWithContext(context.Background())
11644 }
11645
11646
11647 func (page OperationsDiscoveryCollectionPage) NotDone() bool {
11648 return !page.odc.IsEmpty()
11649 }
11650
11651
11652 func (page OperationsDiscoveryCollectionPage) Response() OperationsDiscoveryCollection {
11653 return page.odc
11654 }
11655
11656
11657 func (page OperationsDiscoveryCollectionPage) Values() []OperationsDiscovery {
11658 if page.odc.IsEmpty() {
11659 return nil
11660 }
11661 return *page.odc.Value
11662 }
11663
11664
11665 func NewOperationsDiscoveryCollectionPage(cur OperationsDiscoveryCollection, getNextPage func(context.Context, OperationsDiscoveryCollection) (OperationsDiscoveryCollection, error)) OperationsDiscoveryCollectionPage {
11666 return OperationsDiscoveryCollectionPage{
11667 fn: getNextPage,
11668 odc: cur,
11669 }
11670 }
11671
11672
11673 type OSDetails struct {
11674
11675 OsType *string `json:"osType,omitempty"`
11676
11677 ProductType *string `json:"productType,omitempty"`
11678
11679 OsEdition *string `json:"osEdition,omitempty"`
11680
11681 OSVersion *string `json:"oSVersion,omitempty"`
11682
11683 OSMajorVersion *string `json:"oSMajorVersion,omitempty"`
11684
11685 OSMinorVersion *string `json:"oSMinorVersion,omitempty"`
11686 }
11687
11688
11689 type OSDiskDetails struct {
11690
11691 OsVhdID *string `json:"osVhdId,omitempty"`
11692
11693 OsType *string `json:"osType,omitempty"`
11694
11695 VhdName *string `json:"vhdName,omitempty"`
11696 }
11697
11698
11699 type PlannedFailoverInput struct {
11700
11701 Properties *PlannedFailoverInputProperties `json:"properties,omitempty"`
11702 }
11703
11704
11705 type PlannedFailoverInputProperties struct {
11706
11707 FailoverDirection *string `json:"failoverDirection,omitempty"`
11708
11709 ProviderSpecificDetails BasicProviderSpecificFailoverInput `json:"providerSpecificDetails,omitempty"`
11710 }
11711
11712
11713 func (pfip *PlannedFailoverInputProperties) UnmarshalJSON(body []byte) error {
11714 var m map[string]*json.RawMessage
11715 err := json.Unmarshal(body, &m)
11716 if err != nil {
11717 return err
11718 }
11719 for k, v := range m {
11720 switch k {
11721 case "failoverDirection":
11722 if v != nil {
11723 var failoverDirection string
11724 err = json.Unmarshal(*v, &failoverDirection)
11725 if err != nil {
11726 return err
11727 }
11728 pfip.FailoverDirection = &failoverDirection
11729 }
11730 case "providerSpecificDetails":
11731 if v != nil {
11732 providerSpecificDetails, err := unmarshalBasicProviderSpecificFailoverInput(*v)
11733 if err != nil {
11734 return err
11735 }
11736 pfip.ProviderSpecificDetails = providerSpecificDetails
11737 }
11738 }
11739 }
11740
11741 return nil
11742 }
11743
11744
11745 type Policy struct {
11746 autorest.Response `json:"-"`
11747
11748 Properties *PolicyProperties `json:"properties,omitempty"`
11749
11750 ID *string `json:"id,omitempty"`
11751
11752 Name *string `json:"name,omitempty"`
11753
11754 Type *string `json:"type,omitempty"`
11755
11756 Location *string `json:"location,omitempty"`
11757 }
11758
11759
11760 func (p Policy) MarshalJSON() ([]byte, error) {
11761 objectMap := make(map[string]interface{})
11762 if p.Properties != nil {
11763 objectMap["properties"] = p.Properties
11764 }
11765 if p.Location != nil {
11766 objectMap["location"] = p.Location
11767 }
11768 return json.Marshal(objectMap)
11769 }
11770
11771
11772 type PolicyCollection struct {
11773 autorest.Response `json:"-"`
11774
11775 Value *[]Policy `json:"value,omitempty"`
11776
11777 NextLink *string `json:"nextLink,omitempty"`
11778 }
11779
11780
11781 type PolicyCollectionIterator struct {
11782 i int
11783 page PolicyCollectionPage
11784 }
11785
11786
11787
11788 func (iter *PolicyCollectionIterator) NextWithContext(ctx context.Context) (err error) {
11789 if tracing.IsEnabled() {
11790 ctx = tracing.StartSpan(ctx, fqdn+"/PolicyCollectionIterator.NextWithContext")
11791 defer func() {
11792 sc := -1
11793 if iter.Response().Response.Response != nil {
11794 sc = iter.Response().Response.Response.StatusCode
11795 }
11796 tracing.EndSpan(ctx, sc, err)
11797 }()
11798 }
11799 iter.i++
11800 if iter.i < len(iter.page.Values()) {
11801 return nil
11802 }
11803 err = iter.page.NextWithContext(ctx)
11804 if err != nil {
11805 iter.i--
11806 return err
11807 }
11808 iter.i = 0
11809 return nil
11810 }
11811
11812
11813
11814
11815 func (iter *PolicyCollectionIterator) Next() error {
11816 return iter.NextWithContext(context.Background())
11817 }
11818
11819
11820 func (iter PolicyCollectionIterator) NotDone() bool {
11821 return iter.page.NotDone() && iter.i < len(iter.page.Values())
11822 }
11823
11824
11825 func (iter PolicyCollectionIterator) Response() PolicyCollection {
11826 return iter.page.Response()
11827 }
11828
11829
11830
11831 func (iter PolicyCollectionIterator) Value() Policy {
11832 if !iter.page.NotDone() {
11833 return Policy{}
11834 }
11835 return iter.page.Values()[iter.i]
11836 }
11837
11838
11839 func NewPolicyCollectionIterator(page PolicyCollectionPage) PolicyCollectionIterator {
11840 return PolicyCollectionIterator{page: page}
11841 }
11842
11843
11844 func (pc PolicyCollection) IsEmpty() bool {
11845 return pc.Value == nil || len(*pc.Value) == 0
11846 }
11847
11848
11849 func (pc PolicyCollection) hasNextLink() bool {
11850 return pc.NextLink != nil && len(*pc.NextLink) != 0
11851 }
11852
11853
11854
11855 func (pc PolicyCollection) policyCollectionPreparer(ctx context.Context) (*http.Request, error) {
11856 if !pc.hasNextLink() {
11857 return nil, nil
11858 }
11859 return autorest.Prepare((&http.Request{}).WithContext(ctx),
11860 autorest.AsJSON(),
11861 autorest.AsGet(),
11862 autorest.WithBaseURL(to.String(pc.NextLink)))
11863 }
11864
11865
11866 type PolicyCollectionPage struct {
11867 fn func(context.Context, PolicyCollection) (PolicyCollection, error)
11868 pc PolicyCollection
11869 }
11870
11871
11872
11873 func (page *PolicyCollectionPage) NextWithContext(ctx context.Context) (err error) {
11874 if tracing.IsEnabled() {
11875 ctx = tracing.StartSpan(ctx, fqdn+"/PolicyCollectionPage.NextWithContext")
11876 defer func() {
11877 sc := -1
11878 if page.Response().Response.Response != nil {
11879 sc = page.Response().Response.Response.StatusCode
11880 }
11881 tracing.EndSpan(ctx, sc, err)
11882 }()
11883 }
11884 for {
11885 next, err := page.fn(ctx, page.pc)
11886 if err != nil {
11887 return err
11888 }
11889 page.pc = next
11890 if !next.hasNextLink() || !next.IsEmpty() {
11891 break
11892 }
11893 }
11894 return nil
11895 }
11896
11897
11898
11899
11900 func (page *PolicyCollectionPage) Next() error {
11901 return page.NextWithContext(context.Background())
11902 }
11903
11904
11905 func (page PolicyCollectionPage) NotDone() bool {
11906 return !page.pc.IsEmpty()
11907 }
11908
11909
11910 func (page PolicyCollectionPage) Response() PolicyCollection {
11911 return page.pc
11912 }
11913
11914
11915 func (page PolicyCollectionPage) Values() []Policy {
11916 if page.pc.IsEmpty() {
11917 return nil
11918 }
11919 return *page.pc.Value
11920 }
11921
11922
11923 func NewPolicyCollectionPage(cur PolicyCollection, getNextPage func(context.Context, PolicyCollection) (PolicyCollection, error)) PolicyCollectionPage {
11924 return PolicyCollectionPage{
11925 fn: getNextPage,
11926 pc: cur,
11927 }
11928 }
11929
11930
11931 type PolicyProperties struct {
11932
11933 FriendlyName *string `json:"friendlyName,omitempty"`
11934
11935 ProviderSpecificDetails BasicPolicyProviderSpecificDetails `json:"providerSpecificDetails,omitempty"`
11936 }
11937
11938
11939 func (pp *PolicyProperties) UnmarshalJSON(body []byte) error {
11940 var m map[string]*json.RawMessage
11941 err := json.Unmarshal(body, &m)
11942 if err != nil {
11943 return err
11944 }
11945 for k, v := range m {
11946 switch k {
11947 case "friendlyName":
11948 if v != nil {
11949 var friendlyName string
11950 err = json.Unmarshal(*v, &friendlyName)
11951 if err != nil {
11952 return err
11953 }
11954 pp.FriendlyName = &friendlyName
11955 }
11956 case "providerSpecificDetails":
11957 if v != nil {
11958 providerSpecificDetails, err := unmarshalBasicPolicyProviderSpecificDetails(*v)
11959 if err != nil {
11960 return err
11961 }
11962 pp.ProviderSpecificDetails = providerSpecificDetails
11963 }
11964 }
11965 }
11966
11967 return nil
11968 }
11969
11970
11971 type BasicPolicyProviderSpecificDetails interface {
11972 AsA2APolicyDetails() (*A2APolicyDetails, bool)
11973 AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool)
11974 AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool)
11975 AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool)
11976 AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool)
11977 AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool)
11978 AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool)
11979 AsInMagePolicyDetails() (*InMagePolicyDetails, bool)
11980 AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool)
11981 AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool)
11982 AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool)
11983 }
11984
11985
11986 type PolicyProviderSpecificDetails struct {
11987
11988 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"`
11989 }
11990
11991 func unmarshalBasicPolicyProviderSpecificDetails(body []byte) (BasicPolicyProviderSpecificDetails, error) {
11992 var m map[string]interface{}
11993 err := json.Unmarshal(body, &m)
11994 if err != nil {
11995 return nil, err
11996 }
11997
11998 switch m["instanceType"] {
11999 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A):
12000 var apd A2APolicyDetails
12001 err := json.Unmarshal(body, &apd)
12002 return apd, err
12003 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure):
12004 var hvrapd HyperVReplicaAzurePolicyDetails
12005 err := json.Unmarshal(body, &hvrapd)
12006 return hvrapd, err
12007 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails):
12008 var hvrbpd HyperVReplicaBasePolicyDetails
12009 err := json.Unmarshal(body, &hvrbpd)
12010 return hvrbpd, err
12011 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2):
12012 var hvrbpd HyperVReplicaBluePolicyDetails
12013 err := json.Unmarshal(body, &hvrbpd)
12014 return hvrbpd, err
12015 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012):
12016 var hvrpd HyperVReplicaPolicyDetails
12017 err := json.Unmarshal(body, &hvrpd)
12018 return hvrpd, err
12019 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2):
12020 var imavpd InMageAzureV2PolicyDetails
12021 err := json.Unmarshal(body, &imavpd)
12022 return imavpd, err
12023 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails):
12024 var imbpd InMageBasePolicyDetails
12025 err := json.Unmarshal(body, &imbpd)
12026 return imbpd, err
12027 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage):
12028 var impd InMagePolicyDetails
12029 err := json.Unmarshal(body, &impd)
12030 return impd, err
12031 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration):
12032 var rampd RcmAzureMigrationPolicyDetails
12033 err := json.Unmarshal(body, &rampd)
12034 return rampd, err
12035 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt):
12036 var vcpd VmwareCbtPolicyDetails
12037 err := json.Unmarshal(body, &vcpd)
12038 return vcpd, err
12039 default:
12040 var ppsd PolicyProviderSpecificDetails
12041 err := json.Unmarshal(body, &ppsd)
12042 return ppsd, err
12043 }
12044 }
12045 func unmarshalBasicPolicyProviderSpecificDetailsArray(body []byte) ([]BasicPolicyProviderSpecificDetails, error) {
12046 var rawMessages []*json.RawMessage
12047 err := json.Unmarshal(body, &rawMessages)
12048 if err != nil {
12049 return nil, err
12050 }
12051
12052 ppsdArray := make([]BasicPolicyProviderSpecificDetails, len(rawMessages))
12053
12054 for index, rawMessage := range rawMessages {
12055 ppsd, err := unmarshalBasicPolicyProviderSpecificDetails(*rawMessage)
12056 if err != nil {
12057 return nil, err
12058 }
12059 ppsdArray[index] = ppsd
12060 }
12061 return ppsdArray, nil
12062 }
12063
12064
12065 func (ppsd PolicyProviderSpecificDetails) MarshalJSON() ([]byte, error) {
12066 ppsd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypePolicyProviderSpecificDetails
12067 objectMap := make(map[string]interface{})
12068 if ppsd.InstanceType != "" {
12069 objectMap["instanceType"] = ppsd.InstanceType
12070 }
12071 return json.Marshal(objectMap)
12072 }
12073
12074
12075 func (ppsd PolicyProviderSpecificDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) {
12076 return nil, false
12077 }
12078
12079
12080 func (ppsd PolicyProviderSpecificDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) {
12081 return nil, false
12082 }
12083
12084
12085 func (ppsd PolicyProviderSpecificDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) {
12086 return nil, false
12087 }
12088
12089
12090 func (ppsd PolicyProviderSpecificDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) {
12091 return nil, false
12092 }
12093
12094
12095 func (ppsd PolicyProviderSpecificDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) {
12096 return nil, false
12097 }
12098
12099
12100 func (ppsd PolicyProviderSpecificDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) {
12101 return nil, false
12102 }
12103
12104
12105 func (ppsd PolicyProviderSpecificDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) {
12106 return nil, false
12107 }
12108
12109
12110 func (ppsd PolicyProviderSpecificDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) {
12111 return nil, false
12112 }
12113
12114
12115 func (ppsd PolicyProviderSpecificDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) {
12116 return nil, false
12117 }
12118
12119
12120 func (ppsd PolicyProviderSpecificDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) {
12121 return nil, false
12122 }
12123
12124
12125 func (ppsd PolicyProviderSpecificDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) {
12126 return &ppsd, true
12127 }
12128
12129
12130 func (ppsd PolicyProviderSpecificDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) {
12131 return &ppsd, true
12132 }
12133
12134
12135 type BasicPolicyProviderSpecificInput interface {
12136 AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool)
12137 AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool)
12138 AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool)
12139 AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool)
12140 AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool)
12141 AsInMagePolicyInput() (*InMagePolicyInput, bool)
12142 AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool)
12143 AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool)
12144 }
12145
12146
12147 type PolicyProviderSpecificInput struct {
12148
12149 InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"`
12150 }
12151
12152 func unmarshalBasicPolicyProviderSpecificInput(body []byte) (BasicPolicyProviderSpecificInput, error) {
12153 var m map[string]interface{}
12154 err := json.Unmarshal(body, &m)
12155 if err != nil {
12156 return nil, err
12157 }
12158
12159 switch m["instanceType"] {
12160 case string(InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeA2A):
12161 var apci A2APolicyCreationInput
12162 err := json.Unmarshal(body, &apci)
12163 return apci, err
12164 case string(InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplicaAzure):
12165 var hvrapi HyperVReplicaAzurePolicyInput
12166 err := json.Unmarshal(body, &hvrapi)
12167 return hvrapi, err
12168 case string(InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012R2):
12169 var hvrbpi HyperVReplicaBluePolicyInput
12170 err := json.Unmarshal(body, &hvrbpi)
12171 return hvrbpi, err
12172 case string(InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012):
12173 var hvrpi HyperVReplicaPolicyInput
12174 err := json.Unmarshal(body, &hvrpi)
12175 return hvrpi, err
12176 case string(InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMageAzureV2):
12177 var imavpi InMageAzureV2PolicyInput
12178 err := json.Unmarshal(body, &imavpi)
12179 return imavpi, err
12180 case string(InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMage):
12181 var impi InMagePolicyInput
12182 err := json.Unmarshal(body, &impi)
12183 return impi, err
12184 case string(InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeVMwareCbt):
12185 var vmcpci VMwareCbtPolicyCreationInput
12186 err := json.Unmarshal(body, &vmcpci)
12187 return vmcpci, err
12188 default:
12189 var ppsi PolicyProviderSpecificInput
12190 err := json.Unmarshal(body, &ppsi)
12191 return ppsi, err
12192 }
12193 }
12194 func unmarshalBasicPolicyProviderSpecificInputArray(body []byte) ([]BasicPolicyProviderSpecificInput, error) {
12195 var rawMessages []*json.RawMessage
12196 err := json.Unmarshal(body, &rawMessages)
12197 if err != nil {
12198 return nil, err
12199 }
12200
12201 ppsiArray := make([]BasicPolicyProviderSpecificInput, len(rawMessages))
12202
12203 for index, rawMessage := range rawMessages {
12204 ppsi, err := unmarshalBasicPolicyProviderSpecificInput(*rawMessage)
12205 if err != nil {
12206 return nil, err
12207 }
12208 ppsiArray[index] = ppsi
12209 }
12210 return ppsiArray, nil
12211 }
12212
12213
12214 func (ppsi PolicyProviderSpecificInput) MarshalJSON() ([]byte, error) {
12215 ppsi.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypePolicyProviderSpecificInput
12216 objectMap := make(map[string]interface{})
12217 if ppsi.InstanceType != "" {
12218 objectMap["instanceType"] = ppsi.InstanceType
12219 }
12220 return json.Marshal(objectMap)
12221 }
12222
12223
12224 func (ppsi PolicyProviderSpecificInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) {
12225 return nil, false
12226 }
12227
12228
12229 func (ppsi PolicyProviderSpecificInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) {
12230 return nil, false
12231 }
12232
12233
12234 func (ppsi PolicyProviderSpecificInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) {
12235 return nil, false
12236 }
12237
12238
12239 func (ppsi PolicyProviderSpecificInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) {
12240 return nil, false
12241 }
12242
12243
12244 func (ppsi PolicyProviderSpecificInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) {
12245 return nil, false
12246 }
12247
12248
12249 func (ppsi PolicyProviderSpecificInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) {
12250 return nil, false
12251 }
12252
12253
12254 func (ppsi PolicyProviderSpecificInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) {
12255 return nil, false
12256 }
12257
12258
12259 func (ppsi PolicyProviderSpecificInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) {
12260 return &ppsi, true
12261 }
12262
12263
12264 func (ppsi PolicyProviderSpecificInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) {
12265 return &ppsi, true
12266 }
12267
12268
12269 type ProcessServer struct {
12270
12271 FriendlyName *string `json:"friendlyName,omitempty"`
12272
12273 ID *string `json:"id,omitempty"`
12274
12275 IPAddress *string `json:"ipAddress,omitempty"`
12276
12277 OsType *string `json:"osType,omitempty"`
12278
12279 AgentVersion *string `json:"agentVersion,omitempty"`
12280
12281 LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"`
12282
12283 VersionStatus *string `json:"versionStatus,omitempty"`
12284
12285 MobilityServiceUpdates *[]MobilityServiceUpdate `json:"mobilityServiceUpdates,omitempty"`
12286
12287 HostID *string `json:"hostId,omitempty"`
12288
12289 MachineCount *string `json:"machineCount,omitempty"`
12290
12291 ReplicationPairCount *string `json:"replicationPairCount,omitempty"`
12292
12293 SystemLoad *string `json:"systemLoad,omitempty"`
12294
12295 SystemLoadStatus *string `json:"systemLoadStatus,omitempty"`
12296
12297 CPULoad *string `json:"cpuLoad,omitempty"`
12298
12299 CPULoadStatus *string `json:"cpuLoadStatus,omitempty"`
12300
12301 TotalMemoryInBytes *int64 `json:"totalMemoryInBytes,omitempty"`
12302
12303 AvailableMemoryInBytes *int64 `json:"availableMemoryInBytes,omitempty"`
12304
12305 MemoryUsageStatus *string `json:"memoryUsageStatus,omitempty"`
12306
12307 TotalSpaceInBytes *int64 `json:"totalSpaceInBytes,omitempty"`
12308
12309 AvailableSpaceInBytes *int64 `json:"availableSpaceInBytes,omitempty"`
12310
12311 SpaceUsageStatus *string `json:"spaceUsageStatus,omitempty"`
12312
12313 PsServiceStatus *string `json:"psServiceStatus,omitempty"`
12314
12315 SslCertExpiryDate *date.Time `json:"sslCertExpiryDate,omitempty"`
12316
12317 SslCertExpiryRemainingDays *int32 `json:"sslCertExpiryRemainingDays,omitempty"`
12318
12319 OsVersion *string `json:"osVersion,omitempty"`
12320
12321 HealthErrors *[]HealthError `json:"healthErrors,omitempty"`
12322
12323 AgentExpiryDate *date.Time `json:"agentExpiryDate,omitempty"`
12324
12325 AgentVersionDetails *VersionDetails `json:"agentVersionDetails,omitempty"`
12326 }
12327
12328
12329 type ProtectableItem struct {
12330 autorest.Response `json:"-"`
12331
12332 Properties *ProtectableItemProperties `json:"properties,omitempty"`
12333
12334 ID *string `json:"id,omitempty"`
12335
12336 Name *string `json:"name,omitempty"`
12337
12338 Type *string `json:"type,omitempty"`
12339
12340 Location *string `json:"location,omitempty"`
12341 }
12342
12343
12344 func (pi ProtectableItem) MarshalJSON() ([]byte, error) {
12345 objectMap := make(map[string]interface{})
12346 if pi.Properties != nil {
12347 objectMap["properties"] = pi.Properties
12348 }
12349 if pi.Location != nil {
12350 objectMap["location"] = pi.Location
12351 }
12352 return json.Marshal(objectMap)
12353 }
12354
12355
12356 type ProtectableItemCollection struct {
12357 autorest.Response `json:"-"`
12358
12359 Value *[]ProtectableItem `json:"value,omitempty"`
12360
12361 NextLink *string `json:"nextLink,omitempty"`
12362 }
12363
12364
12365 type ProtectableItemCollectionIterator struct {
12366 i int
12367 page ProtectableItemCollectionPage
12368 }
12369
12370
12371
12372 func (iter *ProtectableItemCollectionIterator) NextWithContext(ctx context.Context) (err error) {
12373 if tracing.IsEnabled() {
12374 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableItemCollectionIterator.NextWithContext")
12375 defer func() {
12376 sc := -1
12377 if iter.Response().Response.Response != nil {
12378 sc = iter.Response().Response.Response.StatusCode
12379 }
12380 tracing.EndSpan(ctx, sc, err)
12381 }()
12382 }
12383 iter.i++
12384 if iter.i < len(iter.page.Values()) {
12385 return nil
12386 }
12387 err = iter.page.NextWithContext(ctx)
12388 if err != nil {
12389 iter.i--
12390 return err
12391 }
12392 iter.i = 0
12393 return nil
12394 }
12395
12396
12397
12398
12399 func (iter *ProtectableItemCollectionIterator) Next() error {
12400 return iter.NextWithContext(context.Background())
12401 }
12402
12403
12404 func (iter ProtectableItemCollectionIterator) NotDone() bool {
12405 return iter.page.NotDone() && iter.i < len(iter.page.Values())
12406 }
12407
12408
12409 func (iter ProtectableItemCollectionIterator) Response() ProtectableItemCollection {
12410 return iter.page.Response()
12411 }
12412
12413
12414
12415 func (iter ProtectableItemCollectionIterator) Value() ProtectableItem {
12416 if !iter.page.NotDone() {
12417 return ProtectableItem{}
12418 }
12419 return iter.page.Values()[iter.i]
12420 }
12421
12422
12423 func NewProtectableItemCollectionIterator(page ProtectableItemCollectionPage) ProtectableItemCollectionIterator {
12424 return ProtectableItemCollectionIterator{page: page}
12425 }
12426
12427
12428 func (pic ProtectableItemCollection) IsEmpty() bool {
12429 return pic.Value == nil || len(*pic.Value) == 0
12430 }
12431
12432
12433 func (pic ProtectableItemCollection) hasNextLink() bool {
12434 return pic.NextLink != nil && len(*pic.NextLink) != 0
12435 }
12436
12437
12438
12439 func (pic ProtectableItemCollection) protectableItemCollectionPreparer(ctx context.Context) (*http.Request, error) {
12440 if !pic.hasNextLink() {
12441 return nil, nil
12442 }
12443 return autorest.Prepare((&http.Request{}).WithContext(ctx),
12444 autorest.AsJSON(),
12445 autorest.AsGet(),
12446 autorest.WithBaseURL(to.String(pic.NextLink)))
12447 }
12448
12449
12450 type ProtectableItemCollectionPage struct {
12451 fn func(context.Context, ProtectableItemCollection) (ProtectableItemCollection, error)
12452 pic ProtectableItemCollection
12453 }
12454
12455
12456
12457 func (page *ProtectableItemCollectionPage) NextWithContext(ctx context.Context) (err error) {
12458 if tracing.IsEnabled() {
12459 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableItemCollectionPage.NextWithContext")
12460 defer func() {
12461 sc := -1
12462 if page.Response().Response.Response != nil {
12463 sc = page.Response().Response.Response.StatusCode
12464 }
12465 tracing.EndSpan(ctx, sc, err)
12466 }()
12467 }
12468 for {
12469 next, err := page.fn(ctx, page.pic)
12470 if err != nil {
12471 return err
12472 }
12473 page.pic = next
12474 if !next.hasNextLink() || !next.IsEmpty() {
12475 break
12476 }
12477 }
12478 return nil
12479 }
12480
12481
12482
12483
12484 func (page *ProtectableItemCollectionPage) Next() error {
12485 return page.NextWithContext(context.Background())
12486 }
12487
12488
12489 func (page ProtectableItemCollectionPage) NotDone() bool {
12490 return !page.pic.IsEmpty()
12491 }
12492
12493
12494 func (page ProtectableItemCollectionPage) Response() ProtectableItemCollection {
12495 return page.pic
12496 }
12497
12498
12499 func (page ProtectableItemCollectionPage) Values() []ProtectableItem {
12500 if page.pic.IsEmpty() {
12501 return nil
12502 }
12503 return *page.pic.Value
12504 }
12505
12506
12507 func NewProtectableItemCollectionPage(cur ProtectableItemCollection, getNextPage func(context.Context, ProtectableItemCollection) (ProtectableItemCollection, error)) ProtectableItemCollectionPage {
12508 return ProtectableItemCollectionPage{
12509 fn: getNextPage,
12510 pic: cur,
12511 }
12512 }
12513
12514
12515 type ProtectableItemProperties struct {
12516
12517 FriendlyName *string `json:"friendlyName,omitempty"`
12518
12519 ProtectionStatus *string `json:"protectionStatus,omitempty"`
12520
12521 ReplicationProtectedItemID *string `json:"replicationProtectedItemId,omitempty"`
12522
12523 RecoveryServicesProviderID *string `json:"recoveryServicesProviderId,omitempty"`
12524
12525 ProtectionReadinessErrors *[]string `json:"protectionReadinessErrors,omitempty"`
12526
12527 SupportedReplicationProviders *[]string `json:"supportedReplicationProviders,omitempty"`
12528
12529 CustomDetails BasicConfigurationSettings `json:"customDetails,omitempty"`
12530 }
12531
12532
12533 func (pip *ProtectableItemProperties) UnmarshalJSON(body []byte) error {
12534 var m map[string]*json.RawMessage
12535 err := json.Unmarshal(body, &m)
12536 if err != nil {
12537 return err
12538 }
12539 for k, v := range m {
12540 switch k {
12541 case "friendlyName":
12542 if v != nil {
12543 var friendlyName string
12544 err = json.Unmarshal(*v, &friendlyName)
12545 if err != nil {
12546 return err
12547 }
12548 pip.FriendlyName = &friendlyName
12549 }
12550 case "protectionStatus":
12551 if v != nil {
12552 var protectionStatus string
12553 err = json.Unmarshal(*v, &protectionStatus)
12554 if err != nil {
12555 return err
12556 }
12557 pip.ProtectionStatus = &protectionStatus
12558 }
12559 case "replicationProtectedItemId":
12560 if v != nil {
12561 var replicationProtectedItemID string
12562 err = json.Unmarshal(*v, &replicationProtectedItemID)
12563 if err != nil {
12564 return err
12565 }
12566 pip.ReplicationProtectedItemID = &replicationProtectedItemID
12567 }
12568 case "recoveryServicesProviderId":
12569 if v != nil {
12570 var recoveryServicesProviderID string
12571 err = json.Unmarshal(*v, &recoveryServicesProviderID)
12572 if err != nil {
12573 return err
12574 }
12575 pip.RecoveryServicesProviderID = &recoveryServicesProviderID
12576 }
12577 case "protectionReadinessErrors":
12578 if v != nil {
12579 var protectionReadinessErrors []string
12580 err = json.Unmarshal(*v, &protectionReadinessErrors)
12581 if err != nil {
12582 return err
12583 }
12584 pip.ProtectionReadinessErrors = &protectionReadinessErrors
12585 }
12586 case "supportedReplicationProviders":
12587 if v != nil {
12588 var supportedReplicationProviders []string
12589 err = json.Unmarshal(*v, &supportedReplicationProviders)
12590 if err != nil {
12591 return err
12592 }
12593 pip.SupportedReplicationProviders = &supportedReplicationProviders
12594 }
12595 case "customDetails":
12596 if v != nil {
12597 customDetails, err := unmarshalBasicConfigurationSettings(*v)
12598 if err != nil {
12599 return err
12600 }
12601 pip.CustomDetails = customDetails
12602 }
12603 }
12604 }
12605
12606 return nil
12607 }
12608
12609
12610 type ProtectableItemQueryParameter struct {
12611
12612 State *string `json:"state,omitempty"`
12613 }
12614
12615
12616 type ProtectedItemsQueryParameter struct {
12617
12618 SourceFabricName *string `json:"sourceFabricName,omitempty"`
12619
12620 RecoveryPlanName *string `json:"recoveryPlanName,omitempty"`
12621
12622 VCenterName *string `json:"vCenterName,omitempty"`
12623
12624 InstanceType *string `json:"instanceType,omitempty"`
12625
12626 MultiVMGroupCreateOption MultiVMGroupCreateOption `json:"multiVmGroupCreateOption,omitempty"`
12627 }
12628
12629
12630 type ProtectionContainer struct {
12631 autorest.Response `json:"-"`
12632
12633 Properties *ProtectionContainerProperties `json:"properties,omitempty"`
12634
12635 ID *string `json:"id,omitempty"`
12636
12637 Name *string `json:"name,omitempty"`
12638
12639 Type *string `json:"type,omitempty"`
12640
12641 Location *string `json:"location,omitempty"`
12642 }
12643
12644
12645 func (pc ProtectionContainer) MarshalJSON() ([]byte, error) {
12646 objectMap := make(map[string]interface{})
12647 if pc.Properties != nil {
12648 objectMap["properties"] = pc.Properties
12649 }
12650 if pc.Location != nil {
12651 objectMap["location"] = pc.Location
12652 }
12653 return json.Marshal(objectMap)
12654 }
12655
12656
12657 type ProtectionContainerCollection struct {
12658 autorest.Response `json:"-"`
12659
12660 Value *[]ProtectionContainer `json:"value,omitempty"`
12661
12662 NextLink *string `json:"nextLink,omitempty"`
12663 }
12664
12665
12666
12667 type ProtectionContainerCollectionIterator struct {
12668 i int
12669 page ProtectionContainerCollectionPage
12670 }
12671
12672
12673
12674 func (iter *ProtectionContainerCollectionIterator) NextWithContext(ctx context.Context) (err error) {
12675 if tracing.IsEnabled() {
12676 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerCollectionIterator.NextWithContext")
12677 defer func() {
12678 sc := -1
12679 if iter.Response().Response.Response != nil {
12680 sc = iter.Response().Response.Response.StatusCode
12681 }
12682 tracing.EndSpan(ctx, sc, err)
12683 }()
12684 }
12685 iter.i++
12686 if iter.i < len(iter.page.Values()) {
12687 return nil
12688 }
12689 err = iter.page.NextWithContext(ctx)
12690 if err != nil {
12691 iter.i--
12692 return err
12693 }
12694 iter.i = 0
12695 return nil
12696 }
12697
12698
12699
12700
12701 func (iter *ProtectionContainerCollectionIterator) Next() error {
12702 return iter.NextWithContext(context.Background())
12703 }
12704
12705
12706 func (iter ProtectionContainerCollectionIterator) NotDone() bool {
12707 return iter.page.NotDone() && iter.i < len(iter.page.Values())
12708 }
12709
12710
12711 func (iter ProtectionContainerCollectionIterator) Response() ProtectionContainerCollection {
12712 return iter.page.Response()
12713 }
12714
12715
12716
12717 func (iter ProtectionContainerCollectionIterator) Value() ProtectionContainer {
12718 if !iter.page.NotDone() {
12719 return ProtectionContainer{}
12720 }
12721 return iter.page.Values()[iter.i]
12722 }
12723
12724
12725 func NewProtectionContainerCollectionIterator(page ProtectionContainerCollectionPage) ProtectionContainerCollectionIterator {
12726 return ProtectionContainerCollectionIterator{page: page}
12727 }
12728
12729
12730 func (pcc ProtectionContainerCollection) IsEmpty() bool {
12731 return pcc.Value == nil || len(*pcc.Value) == 0
12732 }
12733
12734
12735 func (pcc ProtectionContainerCollection) hasNextLink() bool {
12736 return pcc.NextLink != nil && len(*pcc.NextLink) != 0
12737 }
12738
12739
12740
12741 func (pcc ProtectionContainerCollection) protectionContainerCollectionPreparer(ctx context.Context) (*http.Request, error) {
12742 if !pcc.hasNextLink() {
12743 return nil, nil
12744 }
12745 return autorest.Prepare((&http.Request{}).WithContext(ctx),
12746 autorest.AsJSON(),
12747 autorest.AsGet(),
12748 autorest.WithBaseURL(to.String(pcc.NextLink)))
12749 }
12750
12751
12752 type ProtectionContainerCollectionPage struct {
12753 fn func(context.Context, ProtectionContainerCollection) (ProtectionContainerCollection, error)
12754 pcc ProtectionContainerCollection
12755 }
12756
12757
12758
12759 func (page *ProtectionContainerCollectionPage) NextWithContext(ctx context.Context) (err error) {
12760 if tracing.IsEnabled() {
12761 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerCollectionPage.NextWithContext")
12762 defer func() {
12763 sc := -1
12764 if page.Response().Response.Response != nil {
12765 sc = page.Response().Response.Response.StatusCode
12766 }
12767 tracing.EndSpan(ctx, sc, err)
12768 }()
12769 }
12770 for {
12771 next, err := page.fn(ctx, page.pcc)
12772 if err != nil {
12773 return err
12774 }
12775 page.pcc = next
12776 if !next.hasNextLink() || !next.IsEmpty() {
12777 break
12778 }
12779 }
12780 return nil
12781 }
12782
12783
12784
12785
12786 func (page *ProtectionContainerCollectionPage) Next() error {
12787 return page.NextWithContext(context.Background())
12788 }
12789
12790
12791 func (page ProtectionContainerCollectionPage) NotDone() bool {
12792 return !page.pcc.IsEmpty()
12793 }
12794
12795
12796 func (page ProtectionContainerCollectionPage) Response() ProtectionContainerCollection {
12797 return page.pcc
12798 }
12799
12800
12801 func (page ProtectionContainerCollectionPage) Values() []ProtectionContainer {
12802 if page.pcc.IsEmpty() {
12803 return nil
12804 }
12805 return *page.pcc.Value
12806 }
12807
12808
12809 func NewProtectionContainerCollectionPage(cur ProtectionContainerCollection, getNextPage func(context.Context, ProtectionContainerCollection) (ProtectionContainerCollection, error)) ProtectionContainerCollectionPage {
12810 return ProtectionContainerCollectionPage{
12811 fn: getNextPage,
12812 pcc: cur,
12813 }
12814 }
12815
12816
12817 type ProtectionContainerFabricSpecificDetails struct {
12818
12819 InstanceType *string `json:"instanceType,omitempty"`
12820 }
12821
12822
12823 func (pcfsd ProtectionContainerFabricSpecificDetails) MarshalJSON() ([]byte, error) {
12824 objectMap := make(map[string]interface{})
12825 return json.Marshal(objectMap)
12826 }
12827
12828
12829 type ProtectionContainerMapping struct {
12830 autorest.Response `json:"-"`
12831
12832 Properties *ProtectionContainerMappingProperties `json:"properties,omitempty"`
12833
12834 ID *string `json:"id,omitempty"`
12835
12836 Name *string `json:"name,omitempty"`
12837
12838 Type *string `json:"type,omitempty"`
12839
12840 Location *string `json:"location,omitempty"`
12841 }
12842
12843
12844 func (pcm ProtectionContainerMapping) MarshalJSON() ([]byte, error) {
12845 objectMap := make(map[string]interface{})
12846 if pcm.Properties != nil {
12847 objectMap["properties"] = pcm.Properties
12848 }
12849 if pcm.Location != nil {
12850 objectMap["location"] = pcm.Location
12851 }
12852 return json.Marshal(objectMap)
12853 }
12854
12855
12856 type ProtectionContainerMappingCollection struct {
12857 autorest.Response `json:"-"`
12858
12859 Value *[]ProtectionContainerMapping `json:"value,omitempty"`
12860
12861 NextLink *string `json:"nextLink,omitempty"`
12862 }
12863
12864
12865
12866 type ProtectionContainerMappingCollectionIterator struct {
12867 i int
12868 page ProtectionContainerMappingCollectionPage
12869 }
12870
12871
12872
12873 func (iter *ProtectionContainerMappingCollectionIterator) NextWithContext(ctx context.Context) (err error) {
12874 if tracing.IsEnabled() {
12875 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerMappingCollectionIterator.NextWithContext")
12876 defer func() {
12877 sc := -1
12878 if iter.Response().Response.Response != nil {
12879 sc = iter.Response().Response.Response.StatusCode
12880 }
12881 tracing.EndSpan(ctx, sc, err)
12882 }()
12883 }
12884 iter.i++
12885 if iter.i < len(iter.page.Values()) {
12886 return nil
12887 }
12888 err = iter.page.NextWithContext(ctx)
12889 if err != nil {
12890 iter.i--
12891 return err
12892 }
12893 iter.i = 0
12894 return nil
12895 }
12896
12897
12898
12899
12900 func (iter *ProtectionContainerMappingCollectionIterator) Next() error {
12901 return iter.NextWithContext(context.Background())
12902 }
12903
12904
12905 func (iter ProtectionContainerMappingCollectionIterator) NotDone() bool {
12906 return iter.page.NotDone() && iter.i < len(iter.page.Values())
12907 }
12908
12909
12910 func (iter ProtectionContainerMappingCollectionIterator) Response() ProtectionContainerMappingCollection {
12911 return iter.page.Response()
12912 }
12913
12914
12915
12916 func (iter ProtectionContainerMappingCollectionIterator) Value() ProtectionContainerMapping {
12917 if !iter.page.NotDone() {
12918 return ProtectionContainerMapping{}
12919 }
12920 return iter.page.Values()[iter.i]
12921 }
12922
12923
12924 func NewProtectionContainerMappingCollectionIterator(page ProtectionContainerMappingCollectionPage) ProtectionContainerMappingCollectionIterator {
12925 return ProtectionContainerMappingCollectionIterator{page: page}
12926 }
12927
12928
12929 func (pcmc ProtectionContainerMappingCollection) IsEmpty() bool {
12930 return pcmc.Value == nil || len(*pcmc.Value) == 0
12931 }
12932
12933
12934 func (pcmc ProtectionContainerMappingCollection) hasNextLink() bool {
12935 return pcmc.NextLink != nil && len(*pcmc.NextLink) != 0
12936 }
12937
12938
12939
12940 func (pcmc ProtectionContainerMappingCollection) protectionContainerMappingCollectionPreparer(ctx context.Context) (*http.Request, error) {
12941 if !pcmc.hasNextLink() {
12942 return nil, nil
12943 }
12944 return autorest.Prepare((&http.Request{}).WithContext(ctx),
12945 autorest.AsJSON(),
12946 autorest.AsGet(),
12947 autorest.WithBaseURL(to.String(pcmc.NextLink)))
12948 }
12949
12950
12951 type ProtectionContainerMappingCollectionPage struct {
12952 fn func(context.Context, ProtectionContainerMappingCollection) (ProtectionContainerMappingCollection, error)
12953 pcmc ProtectionContainerMappingCollection
12954 }
12955
12956
12957
12958 func (page *ProtectionContainerMappingCollectionPage) NextWithContext(ctx context.Context) (err error) {
12959 if tracing.IsEnabled() {
12960 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerMappingCollectionPage.NextWithContext")
12961 defer func() {
12962 sc := -1
12963 if page.Response().Response.Response != nil {
12964 sc = page.Response().Response.Response.StatusCode
12965 }
12966 tracing.EndSpan(ctx, sc, err)
12967 }()
12968 }
12969 for {
12970 next, err := page.fn(ctx, page.pcmc)
12971 if err != nil {
12972 return err
12973 }
12974 page.pcmc = next
12975 if !next.hasNextLink() || !next.IsEmpty() {
12976 break
12977 }
12978 }
12979 return nil
12980 }
12981
12982
12983
12984
12985 func (page *ProtectionContainerMappingCollectionPage) Next() error {
12986 return page.NextWithContext(context.Background())
12987 }
12988
12989
12990 func (page ProtectionContainerMappingCollectionPage) NotDone() bool {
12991 return !page.pcmc.IsEmpty()
12992 }
12993
12994
12995 func (page ProtectionContainerMappingCollectionPage) Response() ProtectionContainerMappingCollection {
12996 return page.pcmc
12997 }
12998
12999
13000 func (page ProtectionContainerMappingCollectionPage) Values() []ProtectionContainerMapping {
13001 if page.pcmc.IsEmpty() {
13002 return nil
13003 }
13004 return *page.pcmc.Value
13005 }
13006
13007
13008 func NewProtectionContainerMappingCollectionPage(cur ProtectionContainerMappingCollection, getNextPage func(context.Context, ProtectionContainerMappingCollection) (ProtectionContainerMappingCollection, error)) ProtectionContainerMappingCollectionPage {
13009 return ProtectionContainerMappingCollectionPage{
13010 fn: getNextPage,
13011 pcmc: cur,
13012 }
13013 }
13014
13015
13016 type ProtectionContainerMappingProperties struct {
13017
13018 TargetProtectionContainerID *string `json:"targetProtectionContainerId,omitempty"`
13019
13020 TargetProtectionContainerFriendlyName *string `json:"targetProtectionContainerFriendlyName,omitempty"`
13021
13022 ProviderSpecificDetails BasicProtectionContainerMappingProviderSpecificDetails `json:"providerSpecificDetails,omitempty"`
13023
13024 Health *string `json:"health,omitempty"`
13025
13026 HealthErrorDetails *[]HealthError `json:"healthErrorDetails,omitempty"`
13027
13028 PolicyID *string `json:"policyId,omitempty"`
13029
13030 State *string `json:"state,omitempty"`
13031
13032 SourceProtectionContainerFriendlyName *string `json:"sourceProtectionContainerFriendlyName,omitempty"`
13033
13034 SourceFabricFriendlyName *string `json:"sourceFabricFriendlyName,omitempty"`
13035
13036 TargetFabricFriendlyName *string `json:"targetFabricFriendlyName,omitempty"`
13037
13038 PolicyFriendlyName *string `json:"policyFriendlyName,omitempty"`
13039 }
13040
13041
13042 func (pcmp *ProtectionContainerMappingProperties) UnmarshalJSON(body []byte) error {
13043 var m map[string]*json.RawMessage
13044 err := json.Unmarshal(body, &m)
13045 if err != nil {
13046 return err
13047 }
13048 for k, v := range m {
13049 switch k {
13050 case "targetProtectionContainerId":
13051 if v != nil {
13052 var targetProtectionContainerID string
13053 err = json.Unmarshal(*v, &targetProtectionContainerID)
13054 if err != nil {
13055 return err
13056 }
13057 pcmp.TargetProtectionContainerID = &targetProtectionContainerID
13058 }
13059 case "targetProtectionContainerFriendlyName":
13060 if v != nil {
13061 var targetProtectionContainerFriendlyName string
13062 err = json.Unmarshal(*v, &targetProtectionContainerFriendlyName)
13063 if err != nil {
13064 return err
13065 }
13066 pcmp.TargetProtectionContainerFriendlyName = &targetProtectionContainerFriendlyName
13067 }
13068 case "providerSpecificDetails":
13069 if v != nil {
13070 providerSpecificDetails, err := unmarshalBasicProtectionContainerMappingProviderSpecificDetails(*v)
13071 if err != nil {
13072 return err
13073 }
13074 pcmp.ProviderSpecificDetails = providerSpecificDetails
13075 }
13076 case "health":
13077 if v != nil {
13078 var health string
13079 err = json.Unmarshal(*v, &health)
13080 if err != nil {
13081 return err
13082 }
13083 pcmp.Health = &health
13084 }
13085 case "healthErrorDetails":
13086 if v != nil {
13087 var healthErrorDetails []HealthError
13088 err = json.Unmarshal(*v, &healthErrorDetails)
13089 if err != nil {
13090 return err
13091 }
13092 pcmp.HealthErrorDetails = &healthErrorDetails
13093 }
13094 case "policyId":
13095 if v != nil {
13096 var policyID string
13097 err = json.Unmarshal(*v, &policyID)
13098 if err != nil {
13099 return err
13100 }
13101 pcmp.PolicyID = &policyID
13102 }
13103 case "state":
13104 if v != nil {
13105 var state string
13106 err = json.Unmarshal(*v, &state)
13107 if err != nil {
13108 return err
13109 }
13110 pcmp.State = &state
13111 }
13112 case "sourceProtectionContainerFriendlyName":
13113 if v != nil {
13114 var sourceProtectionContainerFriendlyName string
13115 err = json.Unmarshal(*v, &sourceProtectionContainerFriendlyName)
13116 if err != nil {
13117 return err
13118 }
13119 pcmp.SourceProtectionContainerFriendlyName = &sourceProtectionContainerFriendlyName
13120 }
13121 case "sourceFabricFriendlyName":
13122 if v != nil {
13123 var sourceFabricFriendlyName string
13124 err = json.Unmarshal(*v, &sourceFabricFriendlyName)
13125 if err != nil {
13126 return err
13127 }
13128 pcmp.SourceFabricFriendlyName = &sourceFabricFriendlyName
13129 }
13130 case "targetFabricFriendlyName":
13131 if v != nil {
13132 var targetFabricFriendlyName string
13133 err = json.Unmarshal(*v, &targetFabricFriendlyName)
13134 if err != nil {
13135 return err
13136 }
13137 pcmp.TargetFabricFriendlyName = &targetFabricFriendlyName
13138 }
13139 case "policyFriendlyName":
13140 if v != nil {
13141 var policyFriendlyName string
13142 err = json.Unmarshal(*v, &policyFriendlyName)
13143 if err != nil {
13144 return err
13145 }
13146 pcmp.PolicyFriendlyName = &policyFriendlyName
13147 }
13148 }
13149 }
13150
13151 return nil
13152 }
13153
13154
13155 type BasicProtectionContainerMappingProviderSpecificDetails interface {
13156 AsA2AProtectionContainerMappingDetails() (*A2AProtectionContainerMappingDetails, bool)
13157 AsVMwareCbtProtectionContainerMappingDetails() (*VMwareCbtProtectionContainerMappingDetails, bool)
13158 AsProtectionContainerMappingProviderSpecificDetails() (*ProtectionContainerMappingProviderSpecificDetails, bool)
13159 }
13160
13161
13162 type ProtectionContainerMappingProviderSpecificDetails struct {
13163
13164 InstanceType InstanceTypeBasicProtectionContainerMappingProviderSpecificDetails `json:"instanceType,omitempty"`
13165 }
13166
13167 func unmarshalBasicProtectionContainerMappingProviderSpecificDetails(body []byte) (BasicProtectionContainerMappingProviderSpecificDetails, error) {
13168 var m map[string]interface{}
13169 err := json.Unmarshal(body, &m)
13170 if err != nil {
13171 return nil, err
13172 }
13173
13174 switch m["instanceType"] {
13175 case string(InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeA2A):
13176 var apcmd A2AProtectionContainerMappingDetails
13177 err := json.Unmarshal(body, &apcmd)
13178 return apcmd, err
13179 case string(InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeVMwareCbt):
13180 var vmcpcmd VMwareCbtProtectionContainerMappingDetails
13181 err := json.Unmarshal(body, &vmcpcmd)
13182 return vmcpcmd, err
13183 default:
13184 var pcmpsd ProtectionContainerMappingProviderSpecificDetails
13185 err := json.Unmarshal(body, &pcmpsd)
13186 return pcmpsd, err
13187 }
13188 }
13189 func unmarshalBasicProtectionContainerMappingProviderSpecificDetailsArray(body []byte) ([]BasicProtectionContainerMappingProviderSpecificDetails, error) {
13190 var rawMessages []*json.RawMessage
13191 err := json.Unmarshal(body, &rawMessages)
13192 if err != nil {
13193 return nil, err
13194 }
13195
13196 pcmpsdArray := make([]BasicProtectionContainerMappingProviderSpecificDetails, len(rawMessages))
13197
13198 for index, rawMessage := range rawMessages {
13199 pcmpsd, err := unmarshalBasicProtectionContainerMappingProviderSpecificDetails(*rawMessage)
13200 if err != nil {
13201 return nil, err
13202 }
13203 pcmpsdArray[index] = pcmpsd
13204 }
13205 return pcmpsdArray, nil
13206 }
13207
13208
13209 func (pcmpsd ProtectionContainerMappingProviderSpecificDetails) MarshalJSON() ([]byte, error) {
13210 pcmpsd.InstanceType = InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeProtectionContainerMappingProviderSpecificDetails
13211 objectMap := make(map[string]interface{})
13212 if pcmpsd.InstanceType != "" {
13213 objectMap["instanceType"] = pcmpsd.InstanceType
13214 }
13215 return json.Marshal(objectMap)
13216 }
13217
13218
13219 func (pcmpsd ProtectionContainerMappingProviderSpecificDetails) AsA2AProtectionContainerMappingDetails() (*A2AProtectionContainerMappingDetails, bool) {
13220 return nil, false
13221 }
13222
13223
13224 func (pcmpsd ProtectionContainerMappingProviderSpecificDetails) AsVMwareCbtProtectionContainerMappingDetails() (*VMwareCbtProtectionContainerMappingDetails, bool) {
13225 return nil, false
13226 }
13227
13228
13229 func (pcmpsd ProtectionContainerMappingProviderSpecificDetails) AsProtectionContainerMappingProviderSpecificDetails() (*ProtectionContainerMappingProviderSpecificDetails, bool) {
13230 return &pcmpsd, true
13231 }
13232
13233
13234 func (pcmpsd ProtectionContainerMappingProviderSpecificDetails) AsBasicProtectionContainerMappingProviderSpecificDetails() (BasicProtectionContainerMappingProviderSpecificDetails, bool) {
13235 return &pcmpsd, true
13236 }
13237
13238
13239 type ProtectionContainerProperties struct {
13240
13241 FabricFriendlyName *string `json:"fabricFriendlyName,omitempty"`
13242
13243 FriendlyName *string `json:"friendlyName,omitempty"`
13244
13245 FabricType *string `json:"fabricType,omitempty"`
13246
13247 ProtectedItemCount *int32 `json:"protectedItemCount,omitempty"`
13248
13249 PairingStatus *string `json:"pairingStatus,omitempty"`
13250
13251 Role *string `json:"role,omitempty"`
13252
13253 FabricSpecificDetails *ProtectionContainerFabricSpecificDetails `json:"fabricSpecificDetails,omitempty"`
13254 }
13255
13256
13257 type ProviderError struct {
13258
13259 ErrorCode *int32 `json:"errorCode,omitempty"`
13260
13261 ErrorMessage *string `json:"errorMessage,omitempty"`
13262
13263 ErrorID *string `json:"errorId,omitempty"`
13264
13265 PossibleCauses *string `json:"possibleCauses,omitempty"`
13266
13267 RecommendedAction *string `json:"recommendedAction,omitempty"`
13268 }
13269
13270
13271 type BasicProviderSpecificFailoverInput interface {
13272 AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool)
13273 AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool)
13274 AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool)
13275 AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool)
13276 AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool)
13277 AsProviderSpecificFailoverInput() (*ProviderSpecificFailoverInput, bool)
13278 }
13279
13280
13281 type ProviderSpecificFailoverInput struct {
13282
13283 InstanceType InstanceTypeBasicProviderSpecificFailoverInput `json:"instanceType,omitempty"`
13284 }
13285
13286 func unmarshalBasicProviderSpecificFailoverInput(body []byte) (BasicProviderSpecificFailoverInput, error) {
13287 var m map[string]interface{}
13288 err := json.Unmarshal(body, &m)
13289 if err != nil {
13290 return nil, err
13291 }
13292
13293 switch m["instanceType"] {
13294 case string(InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeA2A):
13295 var afpi A2AFailoverProviderInput
13296 err := json.Unmarshal(body, &afpi)
13297 return afpi, err
13298 case string(InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback):
13299 var hvrafpi HyperVReplicaAzureFailbackProviderInput
13300 err := json.Unmarshal(body, &hvrafpi)
13301 return hvrafpi, err
13302 case string(InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure):
13303 var hvrafpi HyperVReplicaAzureFailoverProviderInput
13304 err := json.Unmarshal(body, &hvrafpi)
13305 return hvrafpi, err
13306 case string(InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMageAzureV2):
13307 var imavfpi InMageAzureV2FailoverProviderInput
13308 err := json.Unmarshal(body, &imavfpi)
13309 return imavfpi, err
13310 case string(InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMage):
13311 var imfpi InMageFailoverProviderInput
13312 err := json.Unmarshal(body, &imfpi)
13313 return imfpi, err
13314 default:
13315 var psfi ProviderSpecificFailoverInput
13316 err := json.Unmarshal(body, &psfi)
13317 return psfi, err
13318 }
13319 }
13320 func unmarshalBasicProviderSpecificFailoverInputArray(body []byte) ([]BasicProviderSpecificFailoverInput, error) {
13321 var rawMessages []*json.RawMessage
13322 err := json.Unmarshal(body, &rawMessages)
13323 if err != nil {
13324 return nil, err
13325 }
13326
13327 psfiArray := make([]BasicProviderSpecificFailoverInput, len(rawMessages))
13328
13329 for index, rawMessage := range rawMessages {
13330 psfi, err := unmarshalBasicProviderSpecificFailoverInput(*rawMessage)
13331 if err != nil {
13332 return nil, err
13333 }
13334 psfiArray[index] = psfi
13335 }
13336 return psfiArray, nil
13337 }
13338
13339
13340 func (psfi ProviderSpecificFailoverInput) MarshalJSON() ([]byte, error) {
13341 psfi.InstanceType = InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeProviderSpecificFailoverInput
13342 objectMap := make(map[string]interface{})
13343 if psfi.InstanceType != "" {
13344 objectMap["instanceType"] = psfi.InstanceType
13345 }
13346 return json.Marshal(objectMap)
13347 }
13348
13349
13350 func (psfi ProviderSpecificFailoverInput) AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool) {
13351 return nil, false
13352 }
13353
13354
13355 func (psfi ProviderSpecificFailoverInput) AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool) {
13356 return nil, false
13357 }
13358
13359
13360 func (psfi ProviderSpecificFailoverInput) AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool) {
13361 return nil, false
13362 }
13363
13364
13365 func (psfi ProviderSpecificFailoverInput) AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool) {
13366 return nil, false
13367 }
13368
13369
13370 func (psfi ProviderSpecificFailoverInput) AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool) {
13371 return nil, false
13372 }
13373
13374
13375 func (psfi ProviderSpecificFailoverInput) AsProviderSpecificFailoverInput() (*ProviderSpecificFailoverInput, bool) {
13376 return &psfi, true
13377 }
13378
13379
13380 func (psfi ProviderSpecificFailoverInput) AsBasicProviderSpecificFailoverInput() (BasicProviderSpecificFailoverInput, bool) {
13381 return &psfi, true
13382 }
13383
13384
13385 type BasicProviderSpecificRecoveryPointDetails interface {
13386 AsA2ARecoveryPointDetails() (*A2ARecoveryPointDetails, bool)
13387 AsInMageAzureV2RecoveryPointDetails() (*InMageAzureV2RecoveryPointDetails, bool)
13388 AsProviderSpecificRecoveryPointDetails() (*ProviderSpecificRecoveryPointDetails, bool)
13389 }
13390
13391
13392 type ProviderSpecificRecoveryPointDetails struct {
13393
13394 InstanceType InstanceTypeBasicProviderSpecificRecoveryPointDetails `json:"instanceType,omitempty"`
13395 }
13396
13397 func unmarshalBasicProviderSpecificRecoveryPointDetails(body []byte) (BasicProviderSpecificRecoveryPointDetails, error) {
13398 var m map[string]interface{}
13399 err := json.Unmarshal(body, &m)
13400 if err != nil {
13401 return nil, err
13402 }
13403
13404 switch m["instanceType"] {
13405 case string(InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeA2A):
13406 var arpd A2ARecoveryPointDetails
13407 err := json.Unmarshal(body, &arpd)
13408 return arpd, err
13409 case string(InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeInMageAzureV2):
13410 var imavrpd InMageAzureV2RecoveryPointDetails
13411 err := json.Unmarshal(body, &imavrpd)
13412 return imavrpd, err
13413 default:
13414 var psrpd ProviderSpecificRecoveryPointDetails
13415 err := json.Unmarshal(body, &psrpd)
13416 return psrpd, err
13417 }
13418 }
13419 func unmarshalBasicProviderSpecificRecoveryPointDetailsArray(body []byte) ([]BasicProviderSpecificRecoveryPointDetails, error) {
13420 var rawMessages []*json.RawMessage
13421 err := json.Unmarshal(body, &rawMessages)
13422 if err != nil {
13423 return nil, err
13424 }
13425
13426 psrpdArray := make([]BasicProviderSpecificRecoveryPointDetails, len(rawMessages))
13427
13428 for index, rawMessage := range rawMessages {
13429 psrpd, err := unmarshalBasicProviderSpecificRecoveryPointDetails(*rawMessage)
13430 if err != nil {
13431 return nil, err
13432 }
13433 psrpdArray[index] = psrpd
13434 }
13435 return psrpdArray, nil
13436 }
13437
13438
13439 func (psrpd ProviderSpecificRecoveryPointDetails) MarshalJSON() ([]byte, error) {
13440 psrpd.InstanceType = InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeProviderSpecificRecoveryPointDetails
13441 objectMap := make(map[string]interface{})
13442 if psrpd.InstanceType != "" {
13443 objectMap["instanceType"] = psrpd.InstanceType
13444 }
13445 return json.Marshal(objectMap)
13446 }
13447
13448
13449 func (psrpd ProviderSpecificRecoveryPointDetails) AsA2ARecoveryPointDetails() (*A2ARecoveryPointDetails, bool) {
13450 return nil, false
13451 }
13452
13453
13454 func (psrpd ProviderSpecificRecoveryPointDetails) AsInMageAzureV2RecoveryPointDetails() (*InMageAzureV2RecoveryPointDetails, bool) {
13455 return nil, false
13456 }
13457
13458
13459 func (psrpd ProviderSpecificRecoveryPointDetails) AsProviderSpecificRecoveryPointDetails() (*ProviderSpecificRecoveryPointDetails, bool) {
13460 return &psrpd, true
13461 }
13462
13463
13464 func (psrpd ProviderSpecificRecoveryPointDetails) AsBasicProviderSpecificRecoveryPointDetails() (BasicProviderSpecificRecoveryPointDetails, bool) {
13465 return &psrpd, true
13466 }
13467
13468
13469 type RcmAzureMigrationPolicyDetails struct {
13470
13471 RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"`
13472
13473 RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"`
13474
13475 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"`
13476
13477 MultiVMSyncStatus MultiVMSyncStatus `json:"multiVmSyncStatus,omitempty"`
13478
13479 CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"`
13480
13481 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"`
13482 }
13483
13484
13485 func (rampd RcmAzureMigrationPolicyDetails) MarshalJSON() ([]byte, error) {
13486 rampd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration
13487 objectMap := make(map[string]interface{})
13488 if rampd.RecoveryPointThresholdInMinutes != nil {
13489 objectMap["recoveryPointThresholdInMinutes"] = rampd.RecoveryPointThresholdInMinutes
13490 }
13491 if rampd.RecoveryPointHistory != nil {
13492 objectMap["recoveryPointHistory"] = rampd.RecoveryPointHistory
13493 }
13494 if rampd.AppConsistentFrequencyInMinutes != nil {
13495 objectMap["appConsistentFrequencyInMinutes"] = rampd.AppConsistentFrequencyInMinutes
13496 }
13497 if rampd.MultiVMSyncStatus != "" {
13498 objectMap["multiVmSyncStatus"] = rampd.MultiVMSyncStatus
13499 }
13500 if rampd.CrashConsistentFrequencyInMinutes != nil {
13501 objectMap["crashConsistentFrequencyInMinutes"] = rampd.CrashConsistentFrequencyInMinutes
13502 }
13503 if rampd.InstanceType != "" {
13504 objectMap["instanceType"] = rampd.InstanceType
13505 }
13506 return json.Marshal(objectMap)
13507 }
13508
13509
13510 func (rampd RcmAzureMigrationPolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) {
13511 return nil, false
13512 }
13513
13514
13515 func (rampd RcmAzureMigrationPolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) {
13516 return nil, false
13517 }
13518
13519
13520 func (rampd RcmAzureMigrationPolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) {
13521 return nil, false
13522 }
13523
13524
13525 func (rampd RcmAzureMigrationPolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) {
13526 return nil, false
13527 }
13528
13529
13530 func (rampd RcmAzureMigrationPolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) {
13531 return nil, false
13532 }
13533
13534
13535 func (rampd RcmAzureMigrationPolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) {
13536 return nil, false
13537 }
13538
13539
13540 func (rampd RcmAzureMigrationPolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) {
13541 return nil, false
13542 }
13543
13544
13545 func (rampd RcmAzureMigrationPolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) {
13546 return nil, false
13547 }
13548
13549
13550 func (rampd RcmAzureMigrationPolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) {
13551 return &rampd, true
13552 }
13553
13554
13555 func (rampd RcmAzureMigrationPolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) {
13556 return nil, false
13557 }
13558
13559
13560 func (rampd RcmAzureMigrationPolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) {
13561 return nil, false
13562 }
13563
13564
13565 func (rampd RcmAzureMigrationPolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) {
13566 return &rampd, true
13567 }
13568
13569
13570 type RecoveryPlan struct {
13571 autorest.Response `json:"-"`
13572
13573 Properties *RecoveryPlanProperties `json:"properties,omitempty"`
13574
13575 ID *string `json:"id,omitempty"`
13576
13577 Name *string `json:"name,omitempty"`
13578
13579 Type *string `json:"type,omitempty"`
13580
13581 Location *string `json:"location,omitempty"`
13582 }
13583
13584
13585 func (rp RecoveryPlan) MarshalJSON() ([]byte, error) {
13586 objectMap := make(map[string]interface{})
13587 if rp.Properties != nil {
13588 objectMap["properties"] = rp.Properties
13589 }
13590 if rp.Location != nil {
13591 objectMap["location"] = rp.Location
13592 }
13593 return json.Marshal(objectMap)
13594 }
13595
13596
13597 type RecoveryPlanA2AFailoverInput struct {
13598
13599 RecoveryPointType A2ARpRecoveryPointType `json:"recoveryPointType,omitempty"`
13600
13601 CloudServiceCreationOption *string `json:"cloudServiceCreationOption,omitempty"`
13602
13603 MultiVMSyncPointOption MultiVMSyncPointOption `json:"multiVmSyncPointOption,omitempty"`
13604
13605 InstanceType InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput `json:"instanceType,omitempty"`
13606 }
13607
13608
13609 func (rpafi RecoveryPlanA2AFailoverInput) MarshalJSON() ([]byte, error) {
13610 rpafi.InstanceType = InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeA2A
13611 objectMap := make(map[string]interface{})
13612 if rpafi.RecoveryPointType != "" {
13613 objectMap["recoveryPointType"] = rpafi.RecoveryPointType
13614 }
13615 if rpafi.CloudServiceCreationOption != nil {
13616 objectMap["cloudServiceCreationOption"] = rpafi.CloudServiceCreationOption
13617 }
13618 if rpafi.MultiVMSyncPointOption != "" {
13619 objectMap["multiVmSyncPointOption"] = rpafi.MultiVMSyncPointOption
13620 }
13621 if rpafi.InstanceType != "" {
13622 objectMap["instanceType"] = rpafi.InstanceType
13623 }
13624 return json.Marshal(objectMap)
13625 }
13626
13627
13628 func (rpafi RecoveryPlanA2AFailoverInput) AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) {
13629 return &rpafi, true
13630 }
13631
13632
13633 func (rpafi RecoveryPlanA2AFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool) {
13634 return nil, false
13635 }
13636
13637
13638 func (rpafi RecoveryPlanA2AFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool) {
13639 return nil, false
13640 }
13641
13642
13643 func (rpafi RecoveryPlanA2AFailoverInput) AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool) {
13644 return nil, false
13645 }
13646
13647
13648 func (rpafi RecoveryPlanA2AFailoverInput) AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool) {
13649 return nil, false
13650 }
13651
13652
13653 func (rpafi RecoveryPlanA2AFailoverInput) AsRecoveryPlanProviderSpecificFailoverInput() (*RecoveryPlanProviderSpecificFailoverInput, bool) {
13654 return nil, false
13655 }
13656
13657
13658 func (rpafi RecoveryPlanA2AFailoverInput) AsBasicRecoveryPlanProviderSpecificFailoverInput() (BasicRecoveryPlanProviderSpecificFailoverInput, bool) {
13659 return &rpafi, true
13660 }
13661
13662
13663 type RecoveryPlanAction struct {
13664
13665 ActionName *string `json:"actionName,omitempty"`
13666
13667 FailoverTypes *[]ReplicationProtectedItemOperation `json:"failoverTypes,omitempty"`
13668
13669 FailoverDirections *[]PossibleOperationsDirections `json:"failoverDirections,omitempty"`
13670
13671 CustomDetails BasicRecoveryPlanActionDetails `json:"customDetails,omitempty"`
13672 }
13673
13674
13675 func (rpa *RecoveryPlanAction) UnmarshalJSON(body []byte) error {
13676 var m map[string]*json.RawMessage
13677 err := json.Unmarshal(body, &m)
13678 if err != nil {
13679 return err
13680 }
13681 for k, v := range m {
13682 switch k {
13683 case "actionName":
13684 if v != nil {
13685 var actionName string
13686 err = json.Unmarshal(*v, &actionName)
13687 if err != nil {
13688 return err
13689 }
13690 rpa.ActionName = &actionName
13691 }
13692 case "failoverTypes":
13693 if v != nil {
13694 var failoverTypes []ReplicationProtectedItemOperation
13695 err = json.Unmarshal(*v, &failoverTypes)
13696 if err != nil {
13697 return err
13698 }
13699 rpa.FailoverTypes = &failoverTypes
13700 }
13701 case "failoverDirections":
13702 if v != nil {
13703 var failoverDirections []PossibleOperationsDirections
13704 err = json.Unmarshal(*v, &failoverDirections)
13705 if err != nil {
13706 return err
13707 }
13708 rpa.FailoverDirections = &failoverDirections
13709 }
13710 case "customDetails":
13711 if v != nil {
13712 customDetails, err := unmarshalBasicRecoveryPlanActionDetails(*v)
13713 if err != nil {
13714 return err
13715 }
13716 rpa.CustomDetails = customDetails
13717 }
13718 }
13719 }
13720
13721 return nil
13722 }
13723
13724
13725 type BasicRecoveryPlanActionDetails interface {
13726 AsRecoveryPlanAutomationRunbookActionDetails() (*RecoveryPlanAutomationRunbookActionDetails, bool)
13727 AsRecoveryPlanManualActionDetails() (*RecoveryPlanManualActionDetails, bool)
13728 AsRecoveryPlanScriptActionDetails() (*RecoveryPlanScriptActionDetails, bool)
13729 AsRecoveryPlanActionDetails() (*RecoveryPlanActionDetails, bool)
13730 }
13731
13732
13733 type RecoveryPlanActionDetails struct {
13734
13735 InstanceType InstanceTypeBasicRecoveryPlanActionDetails `json:"instanceType,omitempty"`
13736 }
13737
13738 func unmarshalBasicRecoveryPlanActionDetails(body []byte) (BasicRecoveryPlanActionDetails, error) {
13739 var m map[string]interface{}
13740 err := json.Unmarshal(body, &m)
13741 if err != nil {
13742 return nil, err
13743 }
13744
13745 switch m["instanceType"] {
13746 case string(InstanceTypeAutomationRunbookActionDetails):
13747 var rparad RecoveryPlanAutomationRunbookActionDetails
13748 err := json.Unmarshal(body, &rparad)
13749 return rparad, err
13750 case string(InstanceTypeManualActionDetails):
13751 var rpmad RecoveryPlanManualActionDetails
13752 err := json.Unmarshal(body, &rpmad)
13753 return rpmad, err
13754 case string(InstanceTypeScriptActionDetails):
13755 var rpsad RecoveryPlanScriptActionDetails
13756 err := json.Unmarshal(body, &rpsad)
13757 return rpsad, err
13758 default:
13759 var rpad RecoveryPlanActionDetails
13760 err := json.Unmarshal(body, &rpad)
13761 return rpad, err
13762 }
13763 }
13764 func unmarshalBasicRecoveryPlanActionDetailsArray(body []byte) ([]BasicRecoveryPlanActionDetails, error) {
13765 var rawMessages []*json.RawMessage
13766 err := json.Unmarshal(body, &rawMessages)
13767 if err != nil {
13768 return nil, err
13769 }
13770
13771 rpadArray := make([]BasicRecoveryPlanActionDetails, len(rawMessages))
13772
13773 for index, rawMessage := range rawMessages {
13774 rpad, err := unmarshalBasicRecoveryPlanActionDetails(*rawMessage)
13775 if err != nil {
13776 return nil, err
13777 }
13778 rpadArray[index] = rpad
13779 }
13780 return rpadArray, nil
13781 }
13782
13783
13784 func (rpad RecoveryPlanActionDetails) MarshalJSON() ([]byte, error) {
13785 rpad.InstanceType = InstanceTypeRecoveryPlanActionDetails
13786 objectMap := make(map[string]interface{})
13787 if rpad.InstanceType != "" {
13788 objectMap["instanceType"] = rpad.InstanceType
13789 }
13790 return json.Marshal(objectMap)
13791 }
13792
13793
13794 func (rpad RecoveryPlanActionDetails) AsRecoveryPlanAutomationRunbookActionDetails() (*RecoveryPlanAutomationRunbookActionDetails, bool) {
13795 return nil, false
13796 }
13797
13798
13799 func (rpad RecoveryPlanActionDetails) AsRecoveryPlanManualActionDetails() (*RecoveryPlanManualActionDetails, bool) {
13800 return nil, false
13801 }
13802
13803
13804 func (rpad RecoveryPlanActionDetails) AsRecoveryPlanScriptActionDetails() (*RecoveryPlanScriptActionDetails, bool) {
13805 return nil, false
13806 }
13807
13808
13809 func (rpad RecoveryPlanActionDetails) AsRecoveryPlanActionDetails() (*RecoveryPlanActionDetails, bool) {
13810 return &rpad, true
13811 }
13812
13813
13814 func (rpad RecoveryPlanActionDetails) AsBasicRecoveryPlanActionDetails() (BasicRecoveryPlanActionDetails, bool) {
13815 return &rpad, true
13816 }
13817
13818
13819 type RecoveryPlanAutomationRunbookActionDetails struct {
13820
13821 RunbookID *string `json:"runbookId,omitempty"`
13822
13823 Timeout *string `json:"timeout,omitempty"`
13824
13825 FabricLocation RecoveryPlanActionLocation `json:"fabricLocation,omitempty"`
13826
13827 InstanceType InstanceTypeBasicRecoveryPlanActionDetails `json:"instanceType,omitempty"`
13828 }
13829
13830
13831 func (rparad RecoveryPlanAutomationRunbookActionDetails) MarshalJSON() ([]byte, error) {
13832 rparad.InstanceType = InstanceTypeAutomationRunbookActionDetails
13833 objectMap := make(map[string]interface{})
13834 if rparad.RunbookID != nil {
13835 objectMap["runbookId"] = rparad.RunbookID
13836 }
13837 if rparad.Timeout != nil {
13838 objectMap["timeout"] = rparad.Timeout
13839 }
13840 if rparad.FabricLocation != "" {
13841 objectMap["fabricLocation"] = rparad.FabricLocation
13842 }
13843 if rparad.InstanceType != "" {
13844 objectMap["instanceType"] = rparad.InstanceType
13845 }
13846 return json.Marshal(objectMap)
13847 }
13848
13849
13850 func (rparad RecoveryPlanAutomationRunbookActionDetails) AsRecoveryPlanAutomationRunbookActionDetails() (*RecoveryPlanAutomationRunbookActionDetails, bool) {
13851 return &rparad, true
13852 }
13853
13854
13855 func (rparad RecoveryPlanAutomationRunbookActionDetails) AsRecoveryPlanManualActionDetails() (*RecoveryPlanManualActionDetails, bool) {
13856 return nil, false
13857 }
13858
13859
13860 func (rparad RecoveryPlanAutomationRunbookActionDetails) AsRecoveryPlanScriptActionDetails() (*RecoveryPlanScriptActionDetails, bool) {
13861 return nil, false
13862 }
13863
13864
13865 func (rparad RecoveryPlanAutomationRunbookActionDetails) AsRecoveryPlanActionDetails() (*RecoveryPlanActionDetails, bool) {
13866 return nil, false
13867 }
13868
13869
13870 func (rparad RecoveryPlanAutomationRunbookActionDetails) AsBasicRecoveryPlanActionDetails() (BasicRecoveryPlanActionDetails, bool) {
13871 return &rparad, true
13872 }
13873
13874
13875 type RecoveryPlanCollection struct {
13876 autorest.Response `json:"-"`
13877
13878 Value *[]RecoveryPlan `json:"value,omitempty"`
13879
13880 NextLink *string `json:"nextLink,omitempty"`
13881 }
13882
13883
13884 type RecoveryPlanCollectionIterator struct {
13885 i int
13886 page RecoveryPlanCollectionPage
13887 }
13888
13889
13890
13891 func (iter *RecoveryPlanCollectionIterator) NextWithContext(ctx context.Context) (err error) {
13892 if tracing.IsEnabled() {
13893 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPlanCollectionIterator.NextWithContext")
13894 defer func() {
13895 sc := -1
13896 if iter.Response().Response.Response != nil {
13897 sc = iter.Response().Response.Response.StatusCode
13898 }
13899 tracing.EndSpan(ctx, sc, err)
13900 }()
13901 }
13902 iter.i++
13903 if iter.i < len(iter.page.Values()) {
13904 return nil
13905 }
13906 err = iter.page.NextWithContext(ctx)
13907 if err != nil {
13908 iter.i--
13909 return err
13910 }
13911 iter.i = 0
13912 return nil
13913 }
13914
13915
13916
13917
13918 func (iter *RecoveryPlanCollectionIterator) Next() error {
13919 return iter.NextWithContext(context.Background())
13920 }
13921
13922
13923 func (iter RecoveryPlanCollectionIterator) NotDone() bool {
13924 return iter.page.NotDone() && iter.i < len(iter.page.Values())
13925 }
13926
13927
13928 func (iter RecoveryPlanCollectionIterator) Response() RecoveryPlanCollection {
13929 return iter.page.Response()
13930 }
13931
13932
13933
13934 func (iter RecoveryPlanCollectionIterator) Value() RecoveryPlan {
13935 if !iter.page.NotDone() {
13936 return RecoveryPlan{}
13937 }
13938 return iter.page.Values()[iter.i]
13939 }
13940
13941
13942 func NewRecoveryPlanCollectionIterator(page RecoveryPlanCollectionPage) RecoveryPlanCollectionIterator {
13943 return RecoveryPlanCollectionIterator{page: page}
13944 }
13945
13946
13947 func (RPCVar RecoveryPlanCollection) IsEmpty() bool {
13948 return RPCVar.Value == nil || len(*RPCVar.Value) == 0
13949 }
13950
13951
13952 func (RPCVar RecoveryPlanCollection) hasNextLink() bool {
13953 return RPCVar.NextLink != nil && len(*RPCVar.NextLink) != 0
13954 }
13955
13956
13957
13958 func (RPCVar RecoveryPlanCollection) recoveryPlanCollectionPreparer(ctx context.Context) (*http.Request, error) {
13959 if !RPCVar.hasNextLink() {
13960 return nil, nil
13961 }
13962 return autorest.Prepare((&http.Request{}).WithContext(ctx),
13963 autorest.AsJSON(),
13964 autorest.AsGet(),
13965 autorest.WithBaseURL(to.String(RPCVar.NextLink)))
13966 }
13967
13968
13969 type RecoveryPlanCollectionPage struct {
13970 fn func(context.Context, RecoveryPlanCollection) (RecoveryPlanCollection, error)
13971 RPCVar RecoveryPlanCollection
13972 }
13973
13974
13975
13976 func (page *RecoveryPlanCollectionPage) NextWithContext(ctx context.Context) (err error) {
13977 if tracing.IsEnabled() {
13978 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPlanCollectionPage.NextWithContext")
13979 defer func() {
13980 sc := -1
13981 if page.Response().Response.Response != nil {
13982 sc = page.Response().Response.Response.StatusCode
13983 }
13984 tracing.EndSpan(ctx, sc, err)
13985 }()
13986 }
13987 for {
13988 next, err := page.fn(ctx, page.RPCVar)
13989 if err != nil {
13990 return err
13991 }
13992 page.RPCVar = next
13993 if !next.hasNextLink() || !next.IsEmpty() {
13994 break
13995 }
13996 }
13997 return nil
13998 }
13999
14000
14001
14002
14003 func (page *RecoveryPlanCollectionPage) Next() error {
14004 return page.NextWithContext(context.Background())
14005 }
14006
14007
14008 func (page RecoveryPlanCollectionPage) NotDone() bool {
14009 return !page.RPCVar.IsEmpty()
14010 }
14011
14012
14013 func (page RecoveryPlanCollectionPage) Response() RecoveryPlanCollection {
14014 return page.RPCVar
14015 }
14016
14017
14018 func (page RecoveryPlanCollectionPage) Values() []RecoveryPlan {
14019 if page.RPCVar.IsEmpty() {
14020 return nil
14021 }
14022 return *page.RPCVar.Value
14023 }
14024
14025
14026 func NewRecoveryPlanCollectionPage(cur RecoveryPlanCollection, getNextPage func(context.Context, RecoveryPlanCollection) (RecoveryPlanCollection, error)) RecoveryPlanCollectionPage {
14027 return RecoveryPlanCollectionPage{
14028 fn: getNextPage,
14029 RPCVar: cur,
14030 }
14031 }
14032
14033
14034 type RecoveryPlanGroup struct {
14035
14036 GroupType RecoveryPlanGroupType `json:"groupType,omitempty"`
14037
14038 ReplicationProtectedItems *[]RecoveryPlanProtectedItem `json:"replicationProtectedItems,omitempty"`
14039
14040 StartGroupActions *[]RecoveryPlanAction `json:"startGroupActions,omitempty"`
14041
14042 EndGroupActions *[]RecoveryPlanAction `json:"endGroupActions,omitempty"`
14043 }
14044
14045
14046 type RecoveryPlanGroupTaskDetails struct {
14047
14048 Name *string `json:"name,omitempty"`
14049
14050 GroupID *string `json:"groupId,omitempty"`
14051
14052 RpGroupType *string `json:"rpGroupType,omitempty"`
14053
14054 ChildTasks *[]ASRTask `json:"childTasks,omitempty"`
14055
14056 InstanceType InstanceTypeBasicGroupTaskDetails `json:"instanceType,omitempty"`
14057 }
14058
14059
14060 func (rpgtd RecoveryPlanGroupTaskDetails) MarshalJSON() ([]byte, error) {
14061 rpgtd.InstanceType = InstanceTypeRecoveryPlanGroupTaskDetails
14062 objectMap := make(map[string]interface{})
14063 if rpgtd.Name != nil {
14064 objectMap["name"] = rpgtd.Name
14065 }
14066 if rpgtd.GroupID != nil {
14067 objectMap["groupId"] = rpgtd.GroupID
14068 }
14069 if rpgtd.RpGroupType != nil {
14070 objectMap["rpGroupType"] = rpgtd.RpGroupType
14071 }
14072 if rpgtd.ChildTasks != nil {
14073 objectMap["childTasks"] = rpgtd.ChildTasks
14074 }
14075 if rpgtd.InstanceType != "" {
14076 objectMap["instanceType"] = rpgtd.InstanceType
14077 }
14078 return json.Marshal(objectMap)
14079 }
14080
14081
14082 func (rpgtd RecoveryPlanGroupTaskDetails) AsInlineWorkflowTaskDetails() (*InlineWorkflowTaskDetails, bool) {
14083 return nil, false
14084 }
14085
14086
14087 func (rpgtd RecoveryPlanGroupTaskDetails) AsRecoveryPlanGroupTaskDetails() (*RecoveryPlanGroupTaskDetails, bool) {
14088 return &rpgtd, true
14089 }
14090
14091
14092 func (rpgtd RecoveryPlanGroupTaskDetails) AsRecoveryPlanShutdownGroupTaskDetails() (*RecoveryPlanShutdownGroupTaskDetails, bool) {
14093 return nil, false
14094 }
14095
14096
14097 func (rpgtd RecoveryPlanGroupTaskDetails) AsGroupTaskDetails() (*GroupTaskDetails, bool) {
14098 return nil, false
14099 }
14100
14101
14102 func (rpgtd RecoveryPlanGroupTaskDetails) AsBasicGroupTaskDetails() (BasicGroupTaskDetails, bool) {
14103 return &rpgtd, true
14104 }
14105
14106
14107 type RecoveryPlanHyperVReplicaAzureFailbackInput struct {
14108
14109 DataSyncOption DataSyncStatus `json:"dataSyncOption,omitempty"`
14110
14111 RecoveryVMCreationOption AlternateLocationRecoveryOption `json:"recoveryVmCreationOption,omitempty"`
14112
14113 InstanceType InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput `json:"instanceType,omitempty"`
14114 }
14115
14116
14117 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) MarshalJSON() ([]byte, error) {
14118 rphvrafi.InstanceType = InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback
14119 objectMap := make(map[string]interface{})
14120 if rphvrafi.DataSyncOption != "" {
14121 objectMap["dataSyncOption"] = rphvrafi.DataSyncOption
14122 }
14123 if rphvrafi.RecoveryVMCreationOption != "" {
14124 objectMap["recoveryVmCreationOption"] = rphvrafi.RecoveryVMCreationOption
14125 }
14126 if rphvrafi.InstanceType != "" {
14127 objectMap["instanceType"] = rphvrafi.InstanceType
14128 }
14129 return json.Marshal(objectMap)
14130 }
14131
14132
14133 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) {
14134 return nil, false
14135 }
14136
14137
14138 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool) {
14139 return &rphvrafi, true
14140 }
14141
14142
14143 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool) {
14144 return nil, false
14145 }
14146
14147
14148 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool) {
14149 return nil, false
14150 }
14151
14152
14153 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool) {
14154 return nil, false
14155 }
14156
14157
14158 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsRecoveryPlanProviderSpecificFailoverInput() (*RecoveryPlanProviderSpecificFailoverInput, bool) {
14159 return nil, false
14160 }
14161
14162
14163 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsBasicRecoveryPlanProviderSpecificFailoverInput() (BasicRecoveryPlanProviderSpecificFailoverInput, bool) {
14164 return &rphvrafi, true
14165 }
14166
14167
14168 type RecoveryPlanHyperVReplicaAzureFailoverInput struct {
14169
14170 VaultLocation *string `json:"vaultLocation,omitempty"`
14171
14172 PrimaryKekCertificatePfx *string `json:"primaryKekCertificatePfx,omitempty"`
14173
14174 SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"`
14175
14176 RecoveryPointType HyperVReplicaAzureRpRecoveryPointType `json:"recoveryPointType,omitempty"`
14177
14178 InstanceType InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput `json:"instanceType,omitempty"`
14179 }
14180
14181
14182 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) MarshalJSON() ([]byte, error) {
14183 rphvrafi.InstanceType = InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure
14184 objectMap := make(map[string]interface{})
14185 if rphvrafi.VaultLocation != nil {
14186 objectMap["vaultLocation"] = rphvrafi.VaultLocation
14187 }
14188 if rphvrafi.PrimaryKekCertificatePfx != nil {
14189 objectMap["primaryKekCertificatePfx"] = rphvrafi.PrimaryKekCertificatePfx
14190 }
14191 if rphvrafi.SecondaryKekCertificatePfx != nil {
14192 objectMap["secondaryKekCertificatePfx"] = rphvrafi.SecondaryKekCertificatePfx
14193 }
14194 if rphvrafi.RecoveryPointType != "" {
14195 objectMap["recoveryPointType"] = rphvrafi.RecoveryPointType
14196 }
14197 if rphvrafi.InstanceType != "" {
14198 objectMap["instanceType"] = rphvrafi.InstanceType
14199 }
14200 return json.Marshal(objectMap)
14201 }
14202
14203
14204 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) {
14205 return nil, false
14206 }
14207
14208
14209 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool) {
14210 return nil, false
14211 }
14212
14213
14214 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool) {
14215 return &rphvrafi, true
14216 }
14217
14218
14219 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool) {
14220 return nil, false
14221 }
14222
14223
14224 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool) {
14225 return nil, false
14226 }
14227
14228
14229 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsRecoveryPlanProviderSpecificFailoverInput() (*RecoveryPlanProviderSpecificFailoverInput, bool) {
14230 return nil, false
14231 }
14232
14233
14234 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsBasicRecoveryPlanProviderSpecificFailoverInput() (BasicRecoveryPlanProviderSpecificFailoverInput, bool) {
14235 return &rphvrafi, true
14236 }
14237
14238
14239 type RecoveryPlanInMageAzureV2FailoverInput struct {
14240
14241 VaultLocation *string `json:"vaultLocation,omitempty"`
14242
14243 RecoveryPointType InMageV2RpRecoveryPointType `json:"recoveryPointType,omitempty"`
14244
14245 UseMultiVMSyncPoint *string `json:"useMultiVmSyncPoint,omitempty"`
14246
14247 InstanceType InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput `json:"instanceType,omitempty"`
14248 }
14249
14250
14251 func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) MarshalJSON() ([]byte, error) {
14252 rpimavfi.InstanceType = InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMageAzureV2
14253 objectMap := make(map[string]interface{})
14254 if rpimavfi.VaultLocation != nil {
14255 objectMap["vaultLocation"] = rpimavfi.VaultLocation
14256 }
14257 if rpimavfi.RecoveryPointType != "" {
14258 objectMap["recoveryPointType"] = rpimavfi.RecoveryPointType
14259 }
14260 if rpimavfi.UseMultiVMSyncPoint != nil {
14261 objectMap["useMultiVmSyncPoint"] = rpimavfi.UseMultiVMSyncPoint
14262 }
14263 if rpimavfi.InstanceType != "" {
14264 objectMap["instanceType"] = rpimavfi.InstanceType
14265 }
14266 return json.Marshal(objectMap)
14267 }
14268
14269
14270 func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) {
14271 return nil, false
14272 }
14273
14274
14275 func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool) {
14276 return nil, false
14277 }
14278
14279
14280 func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool) {
14281 return nil, false
14282 }
14283
14284
14285 func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool) {
14286 return &rpimavfi, true
14287 }
14288
14289
14290 func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool) {
14291 return nil, false
14292 }
14293
14294
14295 func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsRecoveryPlanProviderSpecificFailoverInput() (*RecoveryPlanProviderSpecificFailoverInput, bool) {
14296 return nil, false
14297 }
14298
14299
14300 func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsBasicRecoveryPlanProviderSpecificFailoverInput() (BasicRecoveryPlanProviderSpecificFailoverInput, bool) {
14301 return &rpimavfi, true
14302 }
14303
14304
14305 type RecoveryPlanInMageFailoverInput struct {
14306
14307 RecoveryPointType RpInMageRecoveryPointType `json:"recoveryPointType,omitempty"`
14308
14309 InstanceType InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput `json:"instanceType,omitempty"`
14310 }
14311
14312
14313 func (rpimfi RecoveryPlanInMageFailoverInput) MarshalJSON() ([]byte, error) {
14314 rpimfi.InstanceType = InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMage
14315 objectMap := make(map[string]interface{})
14316 if rpimfi.RecoveryPointType != "" {
14317 objectMap["recoveryPointType"] = rpimfi.RecoveryPointType
14318 }
14319 if rpimfi.InstanceType != "" {
14320 objectMap["instanceType"] = rpimfi.InstanceType
14321 }
14322 return json.Marshal(objectMap)
14323 }
14324
14325
14326 func (rpimfi RecoveryPlanInMageFailoverInput) AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) {
14327 return nil, false
14328 }
14329
14330
14331 func (rpimfi RecoveryPlanInMageFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool) {
14332 return nil, false
14333 }
14334
14335
14336 func (rpimfi RecoveryPlanInMageFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool) {
14337 return nil, false
14338 }
14339
14340
14341 func (rpimfi RecoveryPlanInMageFailoverInput) AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool) {
14342 return nil, false
14343 }
14344
14345
14346 func (rpimfi RecoveryPlanInMageFailoverInput) AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool) {
14347 return &rpimfi, true
14348 }
14349
14350
14351 func (rpimfi RecoveryPlanInMageFailoverInput) AsRecoveryPlanProviderSpecificFailoverInput() (*RecoveryPlanProviderSpecificFailoverInput, bool) {
14352 return nil, false
14353 }
14354
14355
14356 func (rpimfi RecoveryPlanInMageFailoverInput) AsBasicRecoveryPlanProviderSpecificFailoverInput() (BasicRecoveryPlanProviderSpecificFailoverInput, bool) {
14357 return &rpimfi, true
14358 }
14359
14360
14361 type RecoveryPlanManualActionDetails struct {
14362
14363 Description *string `json:"description,omitempty"`
14364
14365 InstanceType InstanceTypeBasicRecoveryPlanActionDetails `json:"instanceType,omitempty"`
14366 }
14367
14368
14369 func (rpmad RecoveryPlanManualActionDetails) MarshalJSON() ([]byte, error) {
14370 rpmad.InstanceType = InstanceTypeManualActionDetails
14371 objectMap := make(map[string]interface{})
14372 if rpmad.Description != nil {
14373 objectMap["description"] = rpmad.Description
14374 }
14375 if rpmad.InstanceType != "" {
14376 objectMap["instanceType"] = rpmad.InstanceType
14377 }
14378 return json.Marshal(objectMap)
14379 }
14380
14381
14382 func (rpmad RecoveryPlanManualActionDetails) AsRecoveryPlanAutomationRunbookActionDetails() (*RecoveryPlanAutomationRunbookActionDetails, bool) {
14383 return nil, false
14384 }
14385
14386
14387 func (rpmad RecoveryPlanManualActionDetails) AsRecoveryPlanManualActionDetails() (*RecoveryPlanManualActionDetails, bool) {
14388 return &rpmad, true
14389 }
14390
14391
14392 func (rpmad RecoveryPlanManualActionDetails) AsRecoveryPlanScriptActionDetails() (*RecoveryPlanScriptActionDetails, bool) {
14393 return nil, false
14394 }
14395
14396
14397 func (rpmad RecoveryPlanManualActionDetails) AsRecoveryPlanActionDetails() (*RecoveryPlanActionDetails, bool) {
14398 return nil, false
14399 }
14400
14401
14402 func (rpmad RecoveryPlanManualActionDetails) AsBasicRecoveryPlanActionDetails() (BasicRecoveryPlanActionDetails, bool) {
14403 return &rpmad, true
14404 }
14405
14406
14407 type RecoveryPlanPlannedFailoverInput struct {
14408
14409 Properties *RecoveryPlanPlannedFailoverInputProperties `json:"properties,omitempty"`
14410 }
14411
14412
14413 type RecoveryPlanPlannedFailoverInputProperties struct {
14414
14415 FailoverDirection PossibleOperationsDirections `json:"failoverDirection,omitempty"`
14416
14417 ProviderSpecificDetails *[]BasicRecoveryPlanProviderSpecificFailoverInput `json:"providerSpecificDetails,omitempty"`
14418 }
14419
14420
14421 func (rppfip *RecoveryPlanPlannedFailoverInputProperties) UnmarshalJSON(body []byte) error {
14422 var m map[string]*json.RawMessage
14423 err := json.Unmarshal(body, &m)
14424 if err != nil {
14425 return err
14426 }
14427 for k, v := range m {
14428 switch k {
14429 case "failoverDirection":
14430 if v != nil {
14431 var failoverDirection PossibleOperationsDirections
14432 err = json.Unmarshal(*v, &failoverDirection)
14433 if err != nil {
14434 return err
14435 }
14436 rppfip.FailoverDirection = failoverDirection
14437 }
14438 case "providerSpecificDetails":
14439 if v != nil {
14440 providerSpecificDetails, err := unmarshalBasicRecoveryPlanProviderSpecificFailoverInputArray(*v)
14441 if err != nil {
14442 return err
14443 }
14444 rppfip.ProviderSpecificDetails = &providerSpecificDetails
14445 }
14446 }
14447 }
14448
14449 return nil
14450 }
14451
14452
14453 type RecoveryPlanProperties struct {
14454
14455 FriendlyName *string `json:"friendlyName,omitempty"`
14456
14457 PrimaryFabricID *string `json:"primaryFabricId,omitempty"`
14458
14459 PrimaryFabricFriendlyName *string `json:"primaryFabricFriendlyName,omitempty"`
14460
14461 RecoveryFabricID *string `json:"recoveryFabricId,omitempty"`
14462
14463 RecoveryFabricFriendlyName *string `json:"recoveryFabricFriendlyName,omitempty"`
14464
14465 FailoverDeploymentModel *string `json:"failoverDeploymentModel,omitempty"`
14466
14467 ReplicationProviders *[]string `json:"replicationProviders,omitempty"`
14468
14469 AllowedOperations *[]string `json:"allowedOperations,omitempty"`
14470
14471 LastPlannedFailoverTime *date.Time `json:"lastPlannedFailoverTime,omitempty"`
14472
14473 LastUnplannedFailoverTime *date.Time `json:"lastUnplannedFailoverTime,omitempty"`
14474
14475 LastTestFailoverTime *date.Time `json:"lastTestFailoverTime,omitempty"`
14476
14477 CurrentScenario *CurrentScenarioDetails `json:"currentScenario,omitempty"`
14478
14479 CurrentScenarioStatus *string `json:"currentScenarioStatus,omitempty"`
14480
14481 CurrentScenarioStatusDescription *string `json:"currentScenarioStatusDescription,omitempty"`
14482
14483 Groups *[]RecoveryPlanGroup `json:"groups,omitempty"`
14484 }
14485
14486
14487 type RecoveryPlanProtectedItem struct {
14488
14489 ID *string `json:"id,omitempty"`
14490
14491 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
14492 }
14493
14494
14495 type BasicRecoveryPlanProviderSpecificFailoverInput interface {
14496 AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool)
14497 AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool)
14498 AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool)
14499 AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool)
14500 AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool)
14501 AsRecoveryPlanProviderSpecificFailoverInput() (*RecoveryPlanProviderSpecificFailoverInput, bool)
14502 }
14503
14504
14505 type RecoveryPlanProviderSpecificFailoverInput struct {
14506
14507 InstanceType InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput `json:"instanceType,omitempty"`
14508 }
14509
14510 func unmarshalBasicRecoveryPlanProviderSpecificFailoverInput(body []byte) (BasicRecoveryPlanProviderSpecificFailoverInput, error) {
14511 var m map[string]interface{}
14512 err := json.Unmarshal(body, &m)
14513 if err != nil {
14514 return nil, err
14515 }
14516
14517 switch m["instanceType"] {
14518 case string(InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeA2A):
14519 var rpafi RecoveryPlanA2AFailoverInput
14520 err := json.Unmarshal(body, &rpafi)
14521 return rpafi, err
14522 case string(InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback):
14523 var rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput
14524 err := json.Unmarshal(body, &rphvrafi)
14525 return rphvrafi, err
14526 case string(InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure):
14527 var rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput
14528 err := json.Unmarshal(body, &rphvrafi)
14529 return rphvrafi, err
14530 case string(InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMageAzureV2):
14531 var rpimavfi RecoveryPlanInMageAzureV2FailoverInput
14532 err := json.Unmarshal(body, &rpimavfi)
14533 return rpimavfi, err
14534 case string(InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMage):
14535 var rpimfi RecoveryPlanInMageFailoverInput
14536 err := json.Unmarshal(body, &rpimfi)
14537 return rpimfi, err
14538 default:
14539 var rppsfi RecoveryPlanProviderSpecificFailoverInput
14540 err := json.Unmarshal(body, &rppsfi)
14541 return rppsfi, err
14542 }
14543 }
14544 func unmarshalBasicRecoveryPlanProviderSpecificFailoverInputArray(body []byte) ([]BasicRecoveryPlanProviderSpecificFailoverInput, error) {
14545 var rawMessages []*json.RawMessage
14546 err := json.Unmarshal(body, &rawMessages)
14547 if err != nil {
14548 return nil, err
14549 }
14550
14551 rppsfiArray := make([]BasicRecoveryPlanProviderSpecificFailoverInput, len(rawMessages))
14552
14553 for index, rawMessage := range rawMessages {
14554 rppsfi, err := unmarshalBasicRecoveryPlanProviderSpecificFailoverInput(*rawMessage)
14555 if err != nil {
14556 return nil, err
14557 }
14558 rppsfiArray[index] = rppsfi
14559 }
14560 return rppsfiArray, nil
14561 }
14562
14563
14564 func (rppsfi RecoveryPlanProviderSpecificFailoverInput) MarshalJSON() ([]byte, error) {
14565 rppsfi.InstanceType = InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeRecoveryPlanProviderSpecificFailoverInput
14566 objectMap := make(map[string]interface{})
14567 if rppsfi.InstanceType != "" {
14568 objectMap["instanceType"] = rppsfi.InstanceType
14569 }
14570 return json.Marshal(objectMap)
14571 }
14572
14573
14574 func (rppsfi RecoveryPlanProviderSpecificFailoverInput) AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) {
14575 return nil, false
14576 }
14577
14578
14579 func (rppsfi RecoveryPlanProviderSpecificFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool) {
14580 return nil, false
14581 }
14582
14583
14584 func (rppsfi RecoveryPlanProviderSpecificFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool) {
14585 return nil, false
14586 }
14587
14588
14589 func (rppsfi RecoveryPlanProviderSpecificFailoverInput) AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool) {
14590 return nil, false
14591 }
14592
14593
14594 func (rppsfi RecoveryPlanProviderSpecificFailoverInput) AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool) {
14595 return nil, false
14596 }
14597
14598
14599 func (rppsfi RecoveryPlanProviderSpecificFailoverInput) AsRecoveryPlanProviderSpecificFailoverInput() (*RecoveryPlanProviderSpecificFailoverInput, bool) {
14600 return &rppsfi, true
14601 }
14602
14603
14604 func (rppsfi RecoveryPlanProviderSpecificFailoverInput) AsBasicRecoveryPlanProviderSpecificFailoverInput() (BasicRecoveryPlanProviderSpecificFailoverInput, bool) {
14605 return &rppsfi, true
14606 }
14607
14608
14609 type RecoveryPlanScriptActionDetails struct {
14610
14611 Path *string `json:"path,omitempty"`
14612
14613 Timeout *string `json:"timeout,omitempty"`
14614
14615 FabricLocation RecoveryPlanActionLocation `json:"fabricLocation,omitempty"`
14616
14617 InstanceType InstanceTypeBasicRecoveryPlanActionDetails `json:"instanceType,omitempty"`
14618 }
14619
14620
14621 func (rpsad RecoveryPlanScriptActionDetails) MarshalJSON() ([]byte, error) {
14622 rpsad.InstanceType = InstanceTypeScriptActionDetails
14623 objectMap := make(map[string]interface{})
14624 if rpsad.Path != nil {
14625 objectMap["path"] = rpsad.Path
14626 }
14627 if rpsad.Timeout != nil {
14628 objectMap["timeout"] = rpsad.Timeout
14629 }
14630 if rpsad.FabricLocation != "" {
14631 objectMap["fabricLocation"] = rpsad.FabricLocation
14632 }
14633 if rpsad.InstanceType != "" {
14634 objectMap["instanceType"] = rpsad.InstanceType
14635 }
14636 return json.Marshal(objectMap)
14637 }
14638
14639
14640 func (rpsad RecoveryPlanScriptActionDetails) AsRecoveryPlanAutomationRunbookActionDetails() (*RecoveryPlanAutomationRunbookActionDetails, bool) {
14641 return nil, false
14642 }
14643
14644
14645 func (rpsad RecoveryPlanScriptActionDetails) AsRecoveryPlanManualActionDetails() (*RecoveryPlanManualActionDetails, bool) {
14646 return nil, false
14647 }
14648
14649
14650 func (rpsad RecoveryPlanScriptActionDetails) AsRecoveryPlanScriptActionDetails() (*RecoveryPlanScriptActionDetails, bool) {
14651 return &rpsad, true
14652 }
14653
14654
14655 func (rpsad RecoveryPlanScriptActionDetails) AsRecoveryPlanActionDetails() (*RecoveryPlanActionDetails, bool) {
14656 return nil, false
14657 }
14658
14659
14660 func (rpsad RecoveryPlanScriptActionDetails) AsBasicRecoveryPlanActionDetails() (BasicRecoveryPlanActionDetails, bool) {
14661 return &rpsad, true
14662 }
14663
14664
14665
14666 type RecoveryPlanShutdownGroupTaskDetails struct {
14667
14668 Name *string `json:"name,omitempty"`
14669
14670 GroupID *string `json:"groupId,omitempty"`
14671
14672 RpGroupType *string `json:"rpGroupType,omitempty"`
14673
14674 ChildTasks *[]ASRTask `json:"childTasks,omitempty"`
14675
14676 InstanceType InstanceTypeBasicGroupTaskDetails `json:"instanceType,omitempty"`
14677 }
14678
14679
14680 func (rpsgtd RecoveryPlanShutdownGroupTaskDetails) MarshalJSON() ([]byte, error) {
14681 rpsgtd.InstanceType = InstanceTypeRecoveryPlanShutdownGroupTaskDetails
14682 objectMap := make(map[string]interface{})
14683 if rpsgtd.Name != nil {
14684 objectMap["name"] = rpsgtd.Name
14685 }
14686 if rpsgtd.GroupID != nil {
14687 objectMap["groupId"] = rpsgtd.GroupID
14688 }
14689 if rpsgtd.RpGroupType != nil {
14690 objectMap["rpGroupType"] = rpsgtd.RpGroupType
14691 }
14692 if rpsgtd.ChildTasks != nil {
14693 objectMap["childTasks"] = rpsgtd.ChildTasks
14694 }
14695 if rpsgtd.InstanceType != "" {
14696 objectMap["instanceType"] = rpsgtd.InstanceType
14697 }
14698 return json.Marshal(objectMap)
14699 }
14700
14701
14702 func (rpsgtd RecoveryPlanShutdownGroupTaskDetails) AsInlineWorkflowTaskDetails() (*InlineWorkflowTaskDetails, bool) {
14703 return nil, false
14704 }
14705
14706
14707 func (rpsgtd RecoveryPlanShutdownGroupTaskDetails) AsRecoveryPlanGroupTaskDetails() (*RecoveryPlanGroupTaskDetails, bool) {
14708 return nil, false
14709 }
14710
14711
14712 func (rpsgtd RecoveryPlanShutdownGroupTaskDetails) AsRecoveryPlanShutdownGroupTaskDetails() (*RecoveryPlanShutdownGroupTaskDetails, bool) {
14713 return &rpsgtd, true
14714 }
14715
14716
14717 func (rpsgtd RecoveryPlanShutdownGroupTaskDetails) AsGroupTaskDetails() (*GroupTaskDetails, bool) {
14718 return nil, false
14719 }
14720
14721
14722 func (rpsgtd RecoveryPlanShutdownGroupTaskDetails) AsBasicGroupTaskDetails() (BasicGroupTaskDetails, bool) {
14723 return &rpsgtd, true
14724 }
14725
14726
14727 type RecoveryPlanTestFailoverCleanupInput struct {
14728
14729 Properties *RecoveryPlanTestFailoverCleanupInputProperties `json:"properties,omitempty"`
14730 }
14731
14732
14733 type RecoveryPlanTestFailoverCleanupInputProperties struct {
14734
14735 Comments *string `json:"comments,omitempty"`
14736 }
14737
14738
14739 type RecoveryPlanTestFailoverInput struct {
14740
14741 Properties *RecoveryPlanTestFailoverInputProperties `json:"properties,omitempty"`
14742 }
14743
14744
14745 type RecoveryPlanTestFailoverInputProperties struct {
14746
14747 FailoverDirection PossibleOperationsDirections `json:"failoverDirection,omitempty"`
14748
14749 NetworkType *string `json:"networkType,omitempty"`
14750
14751 NetworkID *string `json:"networkId,omitempty"`
14752
14753 SkipTestFailoverCleanup *string `json:"skipTestFailoverCleanup,omitempty"`
14754
14755 ProviderSpecificDetails *[]BasicRecoveryPlanProviderSpecificFailoverInput `json:"providerSpecificDetails,omitempty"`
14756 }
14757
14758
14759 func (rptfip *RecoveryPlanTestFailoverInputProperties) UnmarshalJSON(body []byte) error {
14760 var m map[string]*json.RawMessage
14761 err := json.Unmarshal(body, &m)
14762 if err != nil {
14763 return err
14764 }
14765 for k, v := range m {
14766 switch k {
14767 case "failoverDirection":
14768 if v != nil {
14769 var failoverDirection PossibleOperationsDirections
14770 err = json.Unmarshal(*v, &failoverDirection)
14771 if err != nil {
14772 return err
14773 }
14774 rptfip.FailoverDirection = failoverDirection
14775 }
14776 case "networkType":
14777 if v != nil {
14778 var networkType string
14779 err = json.Unmarshal(*v, &networkType)
14780 if err != nil {
14781 return err
14782 }
14783 rptfip.NetworkType = &networkType
14784 }
14785 case "networkId":
14786 if v != nil {
14787 var networkID string
14788 err = json.Unmarshal(*v, &networkID)
14789 if err != nil {
14790 return err
14791 }
14792 rptfip.NetworkID = &networkID
14793 }
14794 case "skipTestFailoverCleanup":
14795 if v != nil {
14796 var skipTestFailoverCleanup string
14797 err = json.Unmarshal(*v, &skipTestFailoverCleanup)
14798 if err != nil {
14799 return err
14800 }
14801 rptfip.SkipTestFailoverCleanup = &skipTestFailoverCleanup
14802 }
14803 case "providerSpecificDetails":
14804 if v != nil {
14805 providerSpecificDetails, err := unmarshalBasicRecoveryPlanProviderSpecificFailoverInputArray(*v)
14806 if err != nil {
14807 return err
14808 }
14809 rptfip.ProviderSpecificDetails = &providerSpecificDetails
14810 }
14811 }
14812 }
14813
14814 return nil
14815 }
14816
14817
14818 type RecoveryPlanUnplannedFailoverInput struct {
14819
14820 Properties *RecoveryPlanUnplannedFailoverInputProperties `json:"properties,omitempty"`
14821 }
14822
14823
14824 type RecoveryPlanUnplannedFailoverInputProperties struct {
14825
14826 FailoverDirection PossibleOperationsDirections `json:"failoverDirection,omitempty"`
14827
14828 SourceSiteOperations SourceSiteOperations `json:"sourceSiteOperations,omitempty"`
14829
14830 ProviderSpecificDetails *[]BasicRecoveryPlanProviderSpecificFailoverInput `json:"providerSpecificDetails,omitempty"`
14831 }
14832
14833
14834 func (rpufip *RecoveryPlanUnplannedFailoverInputProperties) UnmarshalJSON(body []byte) error {
14835 var m map[string]*json.RawMessage
14836 err := json.Unmarshal(body, &m)
14837 if err != nil {
14838 return err
14839 }
14840 for k, v := range m {
14841 switch k {
14842 case "failoverDirection":
14843 if v != nil {
14844 var failoverDirection PossibleOperationsDirections
14845 err = json.Unmarshal(*v, &failoverDirection)
14846 if err != nil {
14847 return err
14848 }
14849 rpufip.FailoverDirection = failoverDirection
14850 }
14851 case "sourceSiteOperations":
14852 if v != nil {
14853 var sourceSiteOperations SourceSiteOperations
14854 err = json.Unmarshal(*v, &sourceSiteOperations)
14855 if err != nil {
14856 return err
14857 }
14858 rpufip.SourceSiteOperations = sourceSiteOperations
14859 }
14860 case "providerSpecificDetails":
14861 if v != nil {
14862 providerSpecificDetails, err := unmarshalBasicRecoveryPlanProviderSpecificFailoverInputArray(*v)
14863 if err != nil {
14864 return err
14865 }
14866 rpufip.ProviderSpecificDetails = &providerSpecificDetails
14867 }
14868 }
14869 }
14870
14871 return nil
14872 }
14873
14874
14875 type RecoveryPoint struct {
14876 autorest.Response `json:"-"`
14877
14878 Properties *RecoveryPointProperties `json:"properties,omitempty"`
14879
14880 ID *string `json:"id,omitempty"`
14881
14882 Name *string `json:"name,omitempty"`
14883
14884 Type *string `json:"type,omitempty"`
14885
14886 Location *string `json:"location,omitempty"`
14887 }
14888
14889
14890 func (rp RecoveryPoint) MarshalJSON() ([]byte, error) {
14891 objectMap := make(map[string]interface{})
14892 if rp.Properties != nil {
14893 objectMap["properties"] = rp.Properties
14894 }
14895 if rp.Location != nil {
14896 objectMap["location"] = rp.Location
14897 }
14898 return json.Marshal(objectMap)
14899 }
14900
14901
14902 type RecoveryPointCollection struct {
14903 autorest.Response `json:"-"`
14904
14905 Value *[]RecoveryPoint `json:"value,omitempty"`
14906
14907 NextLink *string `json:"nextLink,omitempty"`
14908 }
14909
14910
14911 type RecoveryPointCollectionIterator struct {
14912 i int
14913 page RecoveryPointCollectionPage
14914 }
14915
14916
14917
14918 func (iter *RecoveryPointCollectionIterator) NextWithContext(ctx context.Context) (err error) {
14919 if tracing.IsEnabled() {
14920 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPointCollectionIterator.NextWithContext")
14921 defer func() {
14922 sc := -1
14923 if iter.Response().Response.Response != nil {
14924 sc = iter.Response().Response.Response.StatusCode
14925 }
14926 tracing.EndSpan(ctx, sc, err)
14927 }()
14928 }
14929 iter.i++
14930 if iter.i < len(iter.page.Values()) {
14931 return nil
14932 }
14933 err = iter.page.NextWithContext(ctx)
14934 if err != nil {
14935 iter.i--
14936 return err
14937 }
14938 iter.i = 0
14939 return nil
14940 }
14941
14942
14943
14944
14945 func (iter *RecoveryPointCollectionIterator) Next() error {
14946 return iter.NextWithContext(context.Background())
14947 }
14948
14949
14950 func (iter RecoveryPointCollectionIterator) NotDone() bool {
14951 return iter.page.NotDone() && iter.i < len(iter.page.Values())
14952 }
14953
14954
14955 func (iter RecoveryPointCollectionIterator) Response() RecoveryPointCollection {
14956 return iter.page.Response()
14957 }
14958
14959
14960
14961 func (iter RecoveryPointCollectionIterator) Value() RecoveryPoint {
14962 if !iter.page.NotDone() {
14963 return RecoveryPoint{}
14964 }
14965 return iter.page.Values()[iter.i]
14966 }
14967
14968
14969 func NewRecoveryPointCollectionIterator(page RecoveryPointCollectionPage) RecoveryPointCollectionIterator {
14970 return RecoveryPointCollectionIterator{page: page}
14971 }
14972
14973
14974 func (RPCVar RecoveryPointCollection) IsEmpty() bool {
14975 return RPCVar.Value == nil || len(*RPCVar.Value) == 0
14976 }
14977
14978
14979 func (RPCVar RecoveryPointCollection) hasNextLink() bool {
14980 return RPCVar.NextLink != nil && len(*RPCVar.NextLink) != 0
14981 }
14982
14983
14984
14985 func (RPCVar RecoveryPointCollection) recoveryPointCollectionPreparer(ctx context.Context) (*http.Request, error) {
14986 if !RPCVar.hasNextLink() {
14987 return nil, nil
14988 }
14989 return autorest.Prepare((&http.Request{}).WithContext(ctx),
14990 autorest.AsJSON(),
14991 autorest.AsGet(),
14992 autorest.WithBaseURL(to.String(RPCVar.NextLink)))
14993 }
14994
14995
14996 type RecoveryPointCollectionPage struct {
14997 fn func(context.Context, RecoveryPointCollection) (RecoveryPointCollection, error)
14998 RPCVar RecoveryPointCollection
14999 }
15000
15001
15002
15003 func (page *RecoveryPointCollectionPage) NextWithContext(ctx context.Context) (err error) {
15004 if tracing.IsEnabled() {
15005 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPointCollectionPage.NextWithContext")
15006 defer func() {
15007 sc := -1
15008 if page.Response().Response.Response != nil {
15009 sc = page.Response().Response.Response.StatusCode
15010 }
15011 tracing.EndSpan(ctx, sc, err)
15012 }()
15013 }
15014 for {
15015 next, err := page.fn(ctx, page.RPCVar)
15016 if err != nil {
15017 return err
15018 }
15019 page.RPCVar = next
15020 if !next.hasNextLink() || !next.IsEmpty() {
15021 break
15022 }
15023 }
15024 return nil
15025 }
15026
15027
15028
15029
15030 func (page *RecoveryPointCollectionPage) Next() error {
15031 return page.NextWithContext(context.Background())
15032 }
15033
15034
15035 func (page RecoveryPointCollectionPage) NotDone() bool {
15036 return !page.RPCVar.IsEmpty()
15037 }
15038
15039
15040 func (page RecoveryPointCollectionPage) Response() RecoveryPointCollection {
15041 return page.RPCVar
15042 }
15043
15044
15045 func (page RecoveryPointCollectionPage) Values() []RecoveryPoint {
15046 if page.RPCVar.IsEmpty() {
15047 return nil
15048 }
15049 return *page.RPCVar.Value
15050 }
15051
15052
15053 func NewRecoveryPointCollectionPage(cur RecoveryPointCollection, getNextPage func(context.Context, RecoveryPointCollection) (RecoveryPointCollection, error)) RecoveryPointCollectionPage {
15054 return RecoveryPointCollectionPage{
15055 fn: getNextPage,
15056 RPCVar: cur,
15057 }
15058 }
15059
15060
15061 type RecoveryPointProperties struct {
15062
15063 RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"`
15064
15065 RecoveryPointType *string `json:"recoveryPointType,omitempty"`
15066
15067 ProviderSpecificDetails BasicProviderSpecificRecoveryPointDetails `json:"providerSpecificDetails,omitempty"`
15068 }
15069
15070
15071 func (rpp *RecoveryPointProperties) UnmarshalJSON(body []byte) error {
15072 var m map[string]*json.RawMessage
15073 err := json.Unmarshal(body, &m)
15074 if err != nil {
15075 return err
15076 }
15077 for k, v := range m {
15078 switch k {
15079 case "recoveryPointTime":
15080 if v != nil {
15081 var recoveryPointTime date.Time
15082 err = json.Unmarshal(*v, &recoveryPointTime)
15083 if err != nil {
15084 return err
15085 }
15086 rpp.RecoveryPointTime = &recoveryPointTime
15087 }
15088 case "recoveryPointType":
15089 if v != nil {
15090 var recoveryPointType string
15091 err = json.Unmarshal(*v, &recoveryPointType)
15092 if err != nil {
15093 return err
15094 }
15095 rpp.RecoveryPointType = &recoveryPointType
15096 }
15097 case "providerSpecificDetails":
15098 if v != nil {
15099 providerSpecificDetails, err := unmarshalBasicProviderSpecificRecoveryPointDetails(*v)
15100 if err != nil {
15101 return err
15102 }
15103 rpp.ProviderSpecificDetails = providerSpecificDetails
15104 }
15105 }
15106 }
15107
15108 return nil
15109 }
15110
15111
15112 type RecoveryServicesProvider struct {
15113 autorest.Response `json:"-"`
15114
15115 Properties *RecoveryServicesProviderProperties `json:"properties,omitempty"`
15116
15117 ID *string `json:"id,omitempty"`
15118
15119 Name *string `json:"name,omitempty"`
15120
15121 Type *string `json:"type,omitempty"`
15122
15123 Location *string `json:"location,omitempty"`
15124 }
15125
15126
15127 func (rsp RecoveryServicesProvider) MarshalJSON() ([]byte, error) {
15128 objectMap := make(map[string]interface{})
15129 if rsp.Properties != nil {
15130 objectMap["properties"] = rsp.Properties
15131 }
15132 if rsp.Location != nil {
15133 objectMap["location"] = rsp.Location
15134 }
15135 return json.Marshal(objectMap)
15136 }
15137
15138
15139 type RecoveryServicesProviderCollection struct {
15140 autorest.Response `json:"-"`
15141
15142 Value *[]RecoveryServicesProvider `json:"value,omitempty"`
15143
15144 NextLink *string `json:"nextLink,omitempty"`
15145 }
15146
15147
15148
15149 type RecoveryServicesProviderCollectionIterator struct {
15150 i int
15151 page RecoveryServicesProviderCollectionPage
15152 }
15153
15154
15155
15156 func (iter *RecoveryServicesProviderCollectionIterator) NextWithContext(ctx context.Context) (err error) {
15157 if tracing.IsEnabled() {
15158 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryServicesProviderCollectionIterator.NextWithContext")
15159 defer func() {
15160 sc := -1
15161 if iter.Response().Response.Response != nil {
15162 sc = iter.Response().Response.Response.StatusCode
15163 }
15164 tracing.EndSpan(ctx, sc, err)
15165 }()
15166 }
15167 iter.i++
15168 if iter.i < len(iter.page.Values()) {
15169 return nil
15170 }
15171 err = iter.page.NextWithContext(ctx)
15172 if err != nil {
15173 iter.i--
15174 return err
15175 }
15176 iter.i = 0
15177 return nil
15178 }
15179
15180
15181
15182
15183 func (iter *RecoveryServicesProviderCollectionIterator) Next() error {
15184 return iter.NextWithContext(context.Background())
15185 }
15186
15187
15188 func (iter RecoveryServicesProviderCollectionIterator) NotDone() bool {
15189 return iter.page.NotDone() && iter.i < len(iter.page.Values())
15190 }
15191
15192
15193 func (iter RecoveryServicesProviderCollectionIterator) Response() RecoveryServicesProviderCollection {
15194 return iter.page.Response()
15195 }
15196
15197
15198
15199 func (iter RecoveryServicesProviderCollectionIterator) Value() RecoveryServicesProvider {
15200 if !iter.page.NotDone() {
15201 return RecoveryServicesProvider{}
15202 }
15203 return iter.page.Values()[iter.i]
15204 }
15205
15206
15207 func NewRecoveryServicesProviderCollectionIterator(page RecoveryServicesProviderCollectionPage) RecoveryServicesProviderCollectionIterator {
15208 return RecoveryServicesProviderCollectionIterator{page: page}
15209 }
15210
15211
15212 func (rspc RecoveryServicesProviderCollection) IsEmpty() bool {
15213 return rspc.Value == nil || len(*rspc.Value) == 0
15214 }
15215
15216
15217 func (rspc RecoveryServicesProviderCollection) hasNextLink() bool {
15218 return rspc.NextLink != nil && len(*rspc.NextLink) != 0
15219 }
15220
15221
15222
15223 func (rspc RecoveryServicesProviderCollection) recoveryServicesProviderCollectionPreparer(ctx context.Context) (*http.Request, error) {
15224 if !rspc.hasNextLink() {
15225 return nil, nil
15226 }
15227 return autorest.Prepare((&http.Request{}).WithContext(ctx),
15228 autorest.AsJSON(),
15229 autorest.AsGet(),
15230 autorest.WithBaseURL(to.String(rspc.NextLink)))
15231 }
15232
15233
15234 type RecoveryServicesProviderCollectionPage struct {
15235 fn func(context.Context, RecoveryServicesProviderCollection) (RecoveryServicesProviderCollection, error)
15236 rspc RecoveryServicesProviderCollection
15237 }
15238
15239
15240
15241 func (page *RecoveryServicesProviderCollectionPage) NextWithContext(ctx context.Context) (err error) {
15242 if tracing.IsEnabled() {
15243 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryServicesProviderCollectionPage.NextWithContext")
15244 defer func() {
15245 sc := -1
15246 if page.Response().Response.Response != nil {
15247 sc = page.Response().Response.Response.StatusCode
15248 }
15249 tracing.EndSpan(ctx, sc, err)
15250 }()
15251 }
15252 for {
15253 next, err := page.fn(ctx, page.rspc)
15254 if err != nil {
15255 return err
15256 }
15257 page.rspc = next
15258 if !next.hasNextLink() || !next.IsEmpty() {
15259 break
15260 }
15261 }
15262 return nil
15263 }
15264
15265
15266
15267
15268 func (page *RecoveryServicesProviderCollectionPage) Next() error {
15269 return page.NextWithContext(context.Background())
15270 }
15271
15272
15273 func (page RecoveryServicesProviderCollectionPage) NotDone() bool {
15274 return !page.rspc.IsEmpty()
15275 }
15276
15277
15278 func (page RecoveryServicesProviderCollectionPage) Response() RecoveryServicesProviderCollection {
15279 return page.rspc
15280 }
15281
15282
15283 func (page RecoveryServicesProviderCollectionPage) Values() []RecoveryServicesProvider {
15284 if page.rspc.IsEmpty() {
15285 return nil
15286 }
15287 return *page.rspc.Value
15288 }
15289
15290
15291 func NewRecoveryServicesProviderCollectionPage(cur RecoveryServicesProviderCollection, getNextPage func(context.Context, RecoveryServicesProviderCollection) (RecoveryServicesProviderCollection, error)) RecoveryServicesProviderCollectionPage {
15292 return RecoveryServicesProviderCollectionPage{
15293 fn: getNextPage,
15294 rspc: cur,
15295 }
15296 }
15297
15298
15299 type RecoveryServicesProviderProperties struct {
15300
15301 FabricType *string `json:"fabricType,omitempty"`
15302
15303 FriendlyName *string `json:"friendlyName,omitempty"`
15304
15305 ProviderVersion *string `json:"providerVersion,omitempty"`
15306
15307 ServerVersion *string `json:"serverVersion,omitempty"`
15308
15309 ProviderVersionState *string `json:"providerVersionState,omitempty"`
15310
15311 ProviderVersionExpiryDate *date.Time `json:"providerVersionExpiryDate,omitempty"`
15312
15313 FabricFriendlyName *string `json:"fabricFriendlyName,omitempty"`
15314
15315 LastHeartBeat *date.Time `json:"lastHeartBeat,omitempty"`
15316
15317 ConnectionStatus *string `json:"connectionStatus,omitempty"`
15318
15319 ProtectedItemCount *int32 `json:"protectedItemCount,omitempty"`
15320
15321 AllowedScenarios *[]string `json:"allowedScenarios,omitempty"`
15322
15323 HealthErrorDetails *[]HealthError `json:"healthErrorDetails,omitempty"`
15324
15325 DraIdentifier *string `json:"draIdentifier,omitempty"`
15326
15327 AuthenticationIdentityDetails *IdentityProviderDetails `json:"authenticationIdentityDetails,omitempty"`
15328
15329 ResourceAccessIdentityDetails *IdentityProviderDetails `json:"resourceAccessIdentityDetails,omitempty"`
15330
15331 ProviderVersionDetails *VersionDetails `json:"providerVersionDetails,omitempty"`
15332 }
15333
15334
15335 type RemoveProtectionContainerMappingInput struct {
15336
15337 Properties *RemoveProtectionContainerMappingInputProperties `json:"properties,omitempty"`
15338 }
15339
15340
15341 type RemoveProtectionContainerMappingInputProperties struct {
15342
15343 ProviderSpecificInput *ReplicationProviderContainerUnmappingInput `json:"providerSpecificInput,omitempty"`
15344 }
15345
15346
15347 type RenewCertificateInput struct {
15348
15349 Properties *RenewCertificateInputProperties `json:"properties,omitempty"`
15350 }
15351
15352
15353 type RenewCertificateInputProperties struct {
15354
15355 RenewCertificateType *string `json:"renewCertificateType,omitempty"`
15356 }
15357
15358
15359
15360 type ReplicationFabricsCheckConsistencyFuture struct {
15361 azure.FutureAPI
15362
15363
15364 Result func(ReplicationFabricsClient) (Fabric, error)
15365 }
15366
15367
15368 func (future *ReplicationFabricsCheckConsistencyFuture) UnmarshalJSON(body []byte) error {
15369 var azFuture azure.Future
15370 if err := json.Unmarshal(body, &azFuture); err != nil {
15371 return err
15372 }
15373 future.FutureAPI = &azFuture
15374 future.Result = future.result
15375 return nil
15376 }
15377
15378
15379 func (future *ReplicationFabricsCheckConsistencyFuture) result(client ReplicationFabricsClient) (f Fabric, err error) {
15380 var done bool
15381 done, err = future.DoneWithContext(context.Background(), client)
15382 if err != nil {
15383 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsCheckConsistencyFuture", "Result", future.Response(), "Polling failure")
15384 return
15385 }
15386 if !done {
15387 f.Response.Response = future.Response()
15388 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsCheckConsistencyFuture")
15389 return
15390 }
15391 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15392 if f.Response.Response, err = future.GetResult(sender); err == nil && f.Response.Response.StatusCode != http.StatusNoContent {
15393 f, err = client.CheckConsistencyResponder(f.Response.Response)
15394 if err != nil {
15395 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsCheckConsistencyFuture", "Result", f.Response.Response, "Failure responding to request")
15396 }
15397 }
15398 return
15399 }
15400
15401
15402
15403 type ReplicationFabricsCreateFuture struct {
15404 azure.FutureAPI
15405
15406
15407 Result func(ReplicationFabricsClient) (Fabric, error)
15408 }
15409
15410
15411 func (future *ReplicationFabricsCreateFuture) UnmarshalJSON(body []byte) error {
15412 var azFuture azure.Future
15413 if err := json.Unmarshal(body, &azFuture); err != nil {
15414 return err
15415 }
15416 future.FutureAPI = &azFuture
15417 future.Result = future.result
15418 return nil
15419 }
15420
15421
15422 func (future *ReplicationFabricsCreateFuture) result(client ReplicationFabricsClient) (f Fabric, err error) {
15423 var done bool
15424 done, err = future.DoneWithContext(context.Background(), client)
15425 if err != nil {
15426 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsCreateFuture", "Result", future.Response(), "Polling failure")
15427 return
15428 }
15429 if !done {
15430 f.Response.Response = future.Response()
15431 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsCreateFuture")
15432 return
15433 }
15434 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15435 if f.Response.Response, err = future.GetResult(sender); err == nil && f.Response.Response.StatusCode != http.StatusNoContent {
15436 f, err = client.CreateResponder(f.Response.Response)
15437 if err != nil {
15438 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsCreateFuture", "Result", f.Response.Response, "Failure responding to request")
15439 }
15440 }
15441 return
15442 }
15443
15444
15445
15446 type ReplicationFabricsDeleteFuture struct {
15447 azure.FutureAPI
15448
15449
15450 Result func(ReplicationFabricsClient) (autorest.Response, error)
15451 }
15452
15453
15454 func (future *ReplicationFabricsDeleteFuture) UnmarshalJSON(body []byte) error {
15455 var azFuture azure.Future
15456 if err := json.Unmarshal(body, &azFuture); err != nil {
15457 return err
15458 }
15459 future.FutureAPI = &azFuture
15460 future.Result = future.result
15461 return nil
15462 }
15463
15464
15465 func (future *ReplicationFabricsDeleteFuture) result(client ReplicationFabricsClient) (ar autorest.Response, err error) {
15466 var done bool
15467 done, err = future.DoneWithContext(context.Background(), client)
15468 if err != nil {
15469 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsDeleteFuture", "Result", future.Response(), "Polling failure")
15470 return
15471 }
15472 if !done {
15473 ar.Response = future.Response()
15474 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsDeleteFuture")
15475 return
15476 }
15477 ar.Response = future.Response()
15478 return
15479 }
15480
15481
15482
15483 type ReplicationFabricsMigrateToAadFuture struct {
15484 azure.FutureAPI
15485
15486
15487 Result func(ReplicationFabricsClient) (autorest.Response, error)
15488 }
15489
15490
15491 func (future *ReplicationFabricsMigrateToAadFuture) UnmarshalJSON(body []byte) error {
15492 var azFuture azure.Future
15493 if err := json.Unmarshal(body, &azFuture); err != nil {
15494 return err
15495 }
15496 future.FutureAPI = &azFuture
15497 future.Result = future.result
15498 return nil
15499 }
15500
15501
15502 func (future *ReplicationFabricsMigrateToAadFuture) result(client ReplicationFabricsClient) (ar autorest.Response, err error) {
15503 var done bool
15504 done, err = future.DoneWithContext(context.Background(), client)
15505 if err != nil {
15506 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsMigrateToAadFuture", "Result", future.Response(), "Polling failure")
15507 return
15508 }
15509 if !done {
15510 ar.Response = future.Response()
15511 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsMigrateToAadFuture")
15512 return
15513 }
15514 ar.Response = future.Response()
15515 return
15516 }
15517
15518
15519
15520 type ReplicationFabricsPurgeFuture struct {
15521 azure.FutureAPI
15522
15523
15524 Result func(ReplicationFabricsClient) (autorest.Response, error)
15525 }
15526
15527
15528 func (future *ReplicationFabricsPurgeFuture) UnmarshalJSON(body []byte) error {
15529 var azFuture azure.Future
15530 if err := json.Unmarshal(body, &azFuture); err != nil {
15531 return err
15532 }
15533 future.FutureAPI = &azFuture
15534 future.Result = future.result
15535 return nil
15536 }
15537
15538
15539 func (future *ReplicationFabricsPurgeFuture) result(client ReplicationFabricsClient) (ar autorest.Response, err error) {
15540 var done bool
15541 done, err = future.DoneWithContext(context.Background(), client)
15542 if err != nil {
15543 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsPurgeFuture", "Result", future.Response(), "Polling failure")
15544 return
15545 }
15546 if !done {
15547 ar.Response = future.Response()
15548 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsPurgeFuture")
15549 return
15550 }
15551 ar.Response = future.Response()
15552 return
15553 }
15554
15555
15556
15557 type ReplicationFabricsReassociateGatewayFuture struct {
15558 azure.FutureAPI
15559
15560
15561 Result func(ReplicationFabricsClient) (Fabric, error)
15562 }
15563
15564
15565 func (future *ReplicationFabricsReassociateGatewayFuture) UnmarshalJSON(body []byte) error {
15566 var azFuture azure.Future
15567 if err := json.Unmarshal(body, &azFuture); err != nil {
15568 return err
15569 }
15570 future.FutureAPI = &azFuture
15571 future.Result = future.result
15572 return nil
15573 }
15574
15575
15576 func (future *ReplicationFabricsReassociateGatewayFuture) result(client ReplicationFabricsClient) (f Fabric, err error) {
15577 var done bool
15578 done, err = future.DoneWithContext(context.Background(), client)
15579 if err != nil {
15580 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsReassociateGatewayFuture", "Result", future.Response(), "Polling failure")
15581 return
15582 }
15583 if !done {
15584 f.Response.Response = future.Response()
15585 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsReassociateGatewayFuture")
15586 return
15587 }
15588 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15589 if f.Response.Response, err = future.GetResult(sender); err == nil && f.Response.Response.StatusCode != http.StatusNoContent {
15590 f, err = client.ReassociateGatewayResponder(f.Response.Response)
15591 if err != nil {
15592 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsReassociateGatewayFuture", "Result", f.Response.Response, "Failure responding to request")
15593 }
15594 }
15595 return
15596 }
15597
15598
15599
15600 type ReplicationFabricsRenewCertificateFuture struct {
15601 azure.FutureAPI
15602
15603
15604 Result func(ReplicationFabricsClient) (Fabric, error)
15605 }
15606
15607
15608 func (future *ReplicationFabricsRenewCertificateFuture) UnmarshalJSON(body []byte) error {
15609 var azFuture azure.Future
15610 if err := json.Unmarshal(body, &azFuture); err != nil {
15611 return err
15612 }
15613 future.FutureAPI = &azFuture
15614 future.Result = future.result
15615 return nil
15616 }
15617
15618
15619 func (future *ReplicationFabricsRenewCertificateFuture) result(client ReplicationFabricsClient) (f Fabric, err error) {
15620 var done bool
15621 done, err = future.DoneWithContext(context.Background(), client)
15622 if err != nil {
15623 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsRenewCertificateFuture", "Result", future.Response(), "Polling failure")
15624 return
15625 }
15626 if !done {
15627 f.Response.Response = future.Response()
15628 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsRenewCertificateFuture")
15629 return
15630 }
15631 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15632 if f.Response.Response, err = future.GetResult(sender); err == nil && f.Response.Response.StatusCode != http.StatusNoContent {
15633 f, err = client.RenewCertificateResponder(f.Response.Response)
15634 if err != nil {
15635 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsRenewCertificateFuture", "Result", f.Response.Response, "Failure responding to request")
15636 }
15637 }
15638 return
15639 }
15640
15641
15642 type ReplicationGroupDetails struct {
15643
15644 InstanceType InstanceTypeBasicConfigurationSettings `json:"instanceType,omitempty"`
15645 }
15646
15647
15648 func (rgd ReplicationGroupDetails) MarshalJSON() ([]byte, error) {
15649 rgd.InstanceType = InstanceTypeReplicationGroupDetails
15650 objectMap := make(map[string]interface{})
15651 if rgd.InstanceType != "" {
15652 objectMap["instanceType"] = rgd.InstanceType
15653 }
15654 return json.Marshal(objectMap)
15655 }
15656
15657
15658 func (rgd ReplicationGroupDetails) AsHyperVVirtualMachineDetails() (*HyperVVirtualMachineDetails, bool) {
15659 return nil, false
15660 }
15661
15662
15663 func (rgd ReplicationGroupDetails) AsReplicationGroupDetails() (*ReplicationGroupDetails, bool) {
15664 return &rgd, true
15665 }
15666
15667
15668 func (rgd ReplicationGroupDetails) AsVmmVirtualMachineDetails() (*VmmVirtualMachineDetails, bool) {
15669 return nil, false
15670 }
15671
15672
15673 func (rgd ReplicationGroupDetails) AsVMwareVirtualMachineDetails() (*VMwareVirtualMachineDetails, bool) {
15674 return nil, false
15675 }
15676
15677
15678 func (rgd ReplicationGroupDetails) AsConfigurationSettings() (*ConfigurationSettings, bool) {
15679 return nil, false
15680 }
15681
15682
15683 func (rgd ReplicationGroupDetails) AsBasicConfigurationSettings() (BasicConfigurationSettings, bool) {
15684 return &rgd, true
15685 }
15686
15687
15688
15689 type ReplicationJobsCancelFuture struct {
15690 azure.FutureAPI
15691
15692
15693 Result func(ReplicationJobsClient) (Job, error)
15694 }
15695
15696
15697 func (future *ReplicationJobsCancelFuture) UnmarshalJSON(body []byte) error {
15698 var azFuture azure.Future
15699 if err := json.Unmarshal(body, &azFuture); err != nil {
15700 return err
15701 }
15702 future.FutureAPI = &azFuture
15703 future.Result = future.result
15704 return nil
15705 }
15706
15707
15708 func (future *ReplicationJobsCancelFuture) result(client ReplicationJobsClient) (j Job, err error) {
15709 var done bool
15710 done, err = future.DoneWithContext(context.Background(), client)
15711 if err != nil {
15712 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsCancelFuture", "Result", future.Response(), "Polling failure")
15713 return
15714 }
15715 if !done {
15716 j.Response.Response = future.Response()
15717 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationJobsCancelFuture")
15718 return
15719 }
15720 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15721 if j.Response.Response, err = future.GetResult(sender); err == nil && j.Response.Response.StatusCode != http.StatusNoContent {
15722 j, err = client.CancelResponder(j.Response.Response)
15723 if err != nil {
15724 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsCancelFuture", "Result", j.Response.Response, "Failure responding to request")
15725 }
15726 }
15727 return
15728 }
15729
15730
15731
15732 type ReplicationJobsExportFuture struct {
15733 azure.FutureAPI
15734
15735
15736 Result func(ReplicationJobsClient) (Job, error)
15737 }
15738
15739
15740 func (future *ReplicationJobsExportFuture) UnmarshalJSON(body []byte) error {
15741 var azFuture azure.Future
15742 if err := json.Unmarshal(body, &azFuture); err != nil {
15743 return err
15744 }
15745 future.FutureAPI = &azFuture
15746 future.Result = future.result
15747 return nil
15748 }
15749
15750
15751 func (future *ReplicationJobsExportFuture) result(client ReplicationJobsClient) (j Job, err error) {
15752 var done bool
15753 done, err = future.DoneWithContext(context.Background(), client)
15754 if err != nil {
15755 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsExportFuture", "Result", future.Response(), "Polling failure")
15756 return
15757 }
15758 if !done {
15759 j.Response.Response = future.Response()
15760 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationJobsExportFuture")
15761 return
15762 }
15763 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15764 if j.Response.Response, err = future.GetResult(sender); err == nil && j.Response.Response.StatusCode != http.StatusNoContent {
15765 j, err = client.ExportResponder(j.Response.Response)
15766 if err != nil {
15767 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsExportFuture", "Result", j.Response.Response, "Failure responding to request")
15768 }
15769 }
15770 return
15771 }
15772
15773
15774
15775 type ReplicationJobsRestartFuture struct {
15776 azure.FutureAPI
15777
15778
15779 Result func(ReplicationJobsClient) (Job, error)
15780 }
15781
15782
15783 func (future *ReplicationJobsRestartFuture) UnmarshalJSON(body []byte) error {
15784 var azFuture azure.Future
15785 if err := json.Unmarshal(body, &azFuture); err != nil {
15786 return err
15787 }
15788 future.FutureAPI = &azFuture
15789 future.Result = future.result
15790 return nil
15791 }
15792
15793
15794 func (future *ReplicationJobsRestartFuture) result(client ReplicationJobsClient) (j Job, err error) {
15795 var done bool
15796 done, err = future.DoneWithContext(context.Background(), client)
15797 if err != nil {
15798 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsRestartFuture", "Result", future.Response(), "Polling failure")
15799 return
15800 }
15801 if !done {
15802 j.Response.Response = future.Response()
15803 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationJobsRestartFuture")
15804 return
15805 }
15806 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15807 if j.Response.Response, err = future.GetResult(sender); err == nil && j.Response.Response.StatusCode != http.StatusNoContent {
15808 j, err = client.RestartResponder(j.Response.Response)
15809 if err != nil {
15810 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsRestartFuture", "Result", j.Response.Response, "Failure responding to request")
15811 }
15812 }
15813 return
15814 }
15815
15816
15817
15818 type ReplicationJobsResumeFuture struct {
15819 azure.FutureAPI
15820
15821
15822 Result func(ReplicationJobsClient) (Job, error)
15823 }
15824
15825
15826 func (future *ReplicationJobsResumeFuture) UnmarshalJSON(body []byte) error {
15827 var azFuture azure.Future
15828 if err := json.Unmarshal(body, &azFuture); err != nil {
15829 return err
15830 }
15831 future.FutureAPI = &azFuture
15832 future.Result = future.result
15833 return nil
15834 }
15835
15836
15837 func (future *ReplicationJobsResumeFuture) result(client ReplicationJobsClient) (j Job, err error) {
15838 var done bool
15839 done, err = future.DoneWithContext(context.Background(), client)
15840 if err != nil {
15841 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsResumeFuture", "Result", future.Response(), "Polling failure")
15842 return
15843 }
15844 if !done {
15845 j.Response.Response = future.Response()
15846 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationJobsResumeFuture")
15847 return
15848 }
15849 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15850 if j.Response.Response, err = future.GetResult(sender); err == nil && j.Response.Response.StatusCode != http.StatusNoContent {
15851 j, err = client.ResumeResponder(j.Response.Response)
15852 if err != nil {
15853 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsResumeFuture", "Result", j.Response.Response, "Failure responding to request")
15854 }
15855 }
15856 return
15857 }
15858
15859
15860
15861 type ReplicationMigrationItemsCreateFuture struct {
15862 azure.FutureAPI
15863
15864
15865 Result func(ReplicationMigrationItemsClient) (MigrationItem, error)
15866 }
15867
15868
15869 func (future *ReplicationMigrationItemsCreateFuture) UnmarshalJSON(body []byte) error {
15870 var azFuture azure.Future
15871 if err := json.Unmarshal(body, &azFuture); err != nil {
15872 return err
15873 }
15874 future.FutureAPI = &azFuture
15875 future.Result = future.result
15876 return nil
15877 }
15878
15879
15880 func (future *ReplicationMigrationItemsCreateFuture) result(client ReplicationMigrationItemsClient) (mi MigrationItem, err error) {
15881 var done bool
15882 done, err = future.DoneWithContext(context.Background(), client)
15883 if err != nil {
15884 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsCreateFuture", "Result", future.Response(), "Polling failure")
15885 return
15886 }
15887 if !done {
15888 mi.Response.Response = future.Response()
15889 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationMigrationItemsCreateFuture")
15890 return
15891 }
15892 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15893 if mi.Response.Response, err = future.GetResult(sender); err == nil && mi.Response.Response.StatusCode != http.StatusNoContent {
15894 mi, err = client.CreateResponder(mi.Response.Response)
15895 if err != nil {
15896 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsCreateFuture", "Result", mi.Response.Response, "Failure responding to request")
15897 }
15898 }
15899 return
15900 }
15901
15902
15903
15904 type ReplicationMigrationItemsDeleteFuture struct {
15905 azure.FutureAPI
15906
15907
15908 Result func(ReplicationMigrationItemsClient) (autorest.Response, error)
15909 }
15910
15911
15912 func (future *ReplicationMigrationItemsDeleteFuture) UnmarshalJSON(body []byte) error {
15913 var azFuture azure.Future
15914 if err := json.Unmarshal(body, &azFuture); err != nil {
15915 return err
15916 }
15917 future.FutureAPI = &azFuture
15918 future.Result = future.result
15919 return nil
15920 }
15921
15922
15923 func (future *ReplicationMigrationItemsDeleteFuture) result(client ReplicationMigrationItemsClient) (ar autorest.Response, err error) {
15924 var done bool
15925 done, err = future.DoneWithContext(context.Background(), client)
15926 if err != nil {
15927 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsDeleteFuture", "Result", future.Response(), "Polling failure")
15928 return
15929 }
15930 if !done {
15931 ar.Response = future.Response()
15932 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationMigrationItemsDeleteFuture")
15933 return
15934 }
15935 ar.Response = future.Response()
15936 return
15937 }
15938
15939
15940
15941 type ReplicationMigrationItemsMigrateFuture struct {
15942 azure.FutureAPI
15943
15944
15945 Result func(ReplicationMigrationItemsClient) (MigrationItem, error)
15946 }
15947
15948
15949 func (future *ReplicationMigrationItemsMigrateFuture) UnmarshalJSON(body []byte) error {
15950 var azFuture azure.Future
15951 if err := json.Unmarshal(body, &azFuture); err != nil {
15952 return err
15953 }
15954 future.FutureAPI = &azFuture
15955 future.Result = future.result
15956 return nil
15957 }
15958
15959
15960 func (future *ReplicationMigrationItemsMigrateFuture) result(client ReplicationMigrationItemsClient) (mi MigrationItem, err error) {
15961 var done bool
15962 done, err = future.DoneWithContext(context.Background(), client)
15963 if err != nil {
15964 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsMigrateFuture", "Result", future.Response(), "Polling failure")
15965 return
15966 }
15967 if !done {
15968 mi.Response.Response = future.Response()
15969 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationMigrationItemsMigrateFuture")
15970 return
15971 }
15972 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15973 if mi.Response.Response, err = future.GetResult(sender); err == nil && mi.Response.Response.StatusCode != http.StatusNoContent {
15974 mi, err = client.MigrateResponder(mi.Response.Response)
15975 if err != nil {
15976 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsMigrateFuture", "Result", mi.Response.Response, "Failure responding to request")
15977 }
15978 }
15979 return
15980 }
15981
15982
15983
15984 type ReplicationMigrationItemsResyncFuture struct {
15985 azure.FutureAPI
15986
15987
15988 Result func(ReplicationMigrationItemsClient) (MigrationItem, error)
15989 }
15990
15991
15992 func (future *ReplicationMigrationItemsResyncFuture) UnmarshalJSON(body []byte) error {
15993 var azFuture azure.Future
15994 if err := json.Unmarshal(body, &azFuture); err != nil {
15995 return err
15996 }
15997 future.FutureAPI = &azFuture
15998 future.Result = future.result
15999 return nil
16000 }
16001
16002
16003 func (future *ReplicationMigrationItemsResyncFuture) result(client ReplicationMigrationItemsClient) (mi MigrationItem, err error) {
16004 var done bool
16005 done, err = future.DoneWithContext(context.Background(), client)
16006 if err != nil {
16007 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsResyncFuture", "Result", future.Response(), "Polling failure")
16008 return
16009 }
16010 if !done {
16011 mi.Response.Response = future.Response()
16012 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationMigrationItemsResyncFuture")
16013 return
16014 }
16015 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16016 if mi.Response.Response, err = future.GetResult(sender); err == nil && mi.Response.Response.StatusCode != http.StatusNoContent {
16017 mi, err = client.ResyncResponder(mi.Response.Response)
16018 if err != nil {
16019 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsResyncFuture", "Result", mi.Response.Response, "Failure responding to request")
16020 }
16021 }
16022 return
16023 }
16024
16025
16026
16027 type ReplicationMigrationItemsTestMigrateCleanupFuture struct {
16028 azure.FutureAPI
16029
16030
16031 Result func(ReplicationMigrationItemsClient) (MigrationItem, error)
16032 }
16033
16034
16035 func (future *ReplicationMigrationItemsTestMigrateCleanupFuture) UnmarshalJSON(body []byte) error {
16036 var azFuture azure.Future
16037 if err := json.Unmarshal(body, &azFuture); err != nil {
16038 return err
16039 }
16040 future.FutureAPI = &azFuture
16041 future.Result = future.result
16042 return nil
16043 }
16044
16045
16046 func (future *ReplicationMigrationItemsTestMigrateCleanupFuture) result(client ReplicationMigrationItemsClient) (mi MigrationItem, err error) {
16047 var done bool
16048 done, err = future.DoneWithContext(context.Background(), client)
16049 if err != nil {
16050 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsTestMigrateCleanupFuture", "Result", future.Response(), "Polling failure")
16051 return
16052 }
16053 if !done {
16054 mi.Response.Response = future.Response()
16055 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationMigrationItemsTestMigrateCleanupFuture")
16056 return
16057 }
16058 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16059 if mi.Response.Response, err = future.GetResult(sender); err == nil && mi.Response.Response.StatusCode != http.StatusNoContent {
16060 mi, err = client.TestMigrateCleanupResponder(mi.Response.Response)
16061 if err != nil {
16062 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsTestMigrateCleanupFuture", "Result", mi.Response.Response, "Failure responding to request")
16063 }
16064 }
16065 return
16066 }
16067
16068
16069
16070 type ReplicationMigrationItemsTestMigrateFuture struct {
16071 azure.FutureAPI
16072
16073
16074 Result func(ReplicationMigrationItemsClient) (MigrationItem, error)
16075 }
16076
16077
16078 func (future *ReplicationMigrationItemsTestMigrateFuture) UnmarshalJSON(body []byte) error {
16079 var azFuture azure.Future
16080 if err := json.Unmarshal(body, &azFuture); err != nil {
16081 return err
16082 }
16083 future.FutureAPI = &azFuture
16084 future.Result = future.result
16085 return nil
16086 }
16087
16088
16089 func (future *ReplicationMigrationItemsTestMigrateFuture) result(client ReplicationMigrationItemsClient) (mi MigrationItem, err error) {
16090 var done bool
16091 done, err = future.DoneWithContext(context.Background(), client)
16092 if err != nil {
16093 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsTestMigrateFuture", "Result", future.Response(), "Polling failure")
16094 return
16095 }
16096 if !done {
16097 mi.Response.Response = future.Response()
16098 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationMigrationItemsTestMigrateFuture")
16099 return
16100 }
16101 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16102 if mi.Response.Response, err = future.GetResult(sender); err == nil && mi.Response.Response.StatusCode != http.StatusNoContent {
16103 mi, err = client.TestMigrateResponder(mi.Response.Response)
16104 if err != nil {
16105 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsTestMigrateFuture", "Result", mi.Response.Response, "Failure responding to request")
16106 }
16107 }
16108 return
16109 }
16110
16111
16112
16113 type ReplicationMigrationItemsUpdateFuture struct {
16114 azure.FutureAPI
16115
16116
16117 Result func(ReplicationMigrationItemsClient) (MigrationItem, error)
16118 }
16119
16120
16121 func (future *ReplicationMigrationItemsUpdateFuture) UnmarshalJSON(body []byte) error {
16122 var azFuture azure.Future
16123 if err := json.Unmarshal(body, &azFuture); err != nil {
16124 return err
16125 }
16126 future.FutureAPI = &azFuture
16127 future.Result = future.result
16128 return nil
16129 }
16130
16131
16132 func (future *ReplicationMigrationItemsUpdateFuture) result(client ReplicationMigrationItemsClient) (mi MigrationItem, err error) {
16133 var done bool
16134 done, err = future.DoneWithContext(context.Background(), client)
16135 if err != nil {
16136 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsUpdateFuture", "Result", future.Response(), "Polling failure")
16137 return
16138 }
16139 if !done {
16140 mi.Response.Response = future.Response()
16141 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationMigrationItemsUpdateFuture")
16142 return
16143 }
16144 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16145 if mi.Response.Response, err = future.GetResult(sender); err == nil && mi.Response.Response.StatusCode != http.StatusNoContent {
16146 mi, err = client.UpdateResponder(mi.Response.Response)
16147 if err != nil {
16148 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsUpdateFuture", "Result", mi.Response.Response, "Failure responding to request")
16149 }
16150 }
16151 return
16152 }
16153
16154
16155
16156 type ReplicationNetworkMappingsCreateFuture struct {
16157 azure.FutureAPI
16158
16159
16160 Result func(ReplicationNetworkMappingsClient) (NetworkMapping, error)
16161 }
16162
16163
16164 func (future *ReplicationNetworkMappingsCreateFuture) UnmarshalJSON(body []byte) error {
16165 var azFuture azure.Future
16166 if err := json.Unmarshal(body, &azFuture); err != nil {
16167 return err
16168 }
16169 future.FutureAPI = &azFuture
16170 future.Result = future.result
16171 return nil
16172 }
16173
16174
16175 func (future *ReplicationNetworkMappingsCreateFuture) result(client ReplicationNetworkMappingsClient) (nm NetworkMapping, err error) {
16176 var done bool
16177 done, err = future.DoneWithContext(context.Background(), client)
16178 if err != nil {
16179 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsCreateFuture", "Result", future.Response(), "Polling failure")
16180 return
16181 }
16182 if !done {
16183 nm.Response.Response = future.Response()
16184 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationNetworkMappingsCreateFuture")
16185 return
16186 }
16187 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16188 if nm.Response.Response, err = future.GetResult(sender); err == nil && nm.Response.Response.StatusCode != http.StatusNoContent {
16189 nm, err = client.CreateResponder(nm.Response.Response)
16190 if err != nil {
16191 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsCreateFuture", "Result", nm.Response.Response, "Failure responding to request")
16192 }
16193 }
16194 return
16195 }
16196
16197
16198
16199 type ReplicationNetworkMappingsDeleteFuture struct {
16200 azure.FutureAPI
16201
16202
16203 Result func(ReplicationNetworkMappingsClient) (autorest.Response, error)
16204 }
16205
16206
16207 func (future *ReplicationNetworkMappingsDeleteFuture) UnmarshalJSON(body []byte) error {
16208 var azFuture azure.Future
16209 if err := json.Unmarshal(body, &azFuture); err != nil {
16210 return err
16211 }
16212 future.FutureAPI = &azFuture
16213 future.Result = future.result
16214 return nil
16215 }
16216
16217
16218 func (future *ReplicationNetworkMappingsDeleteFuture) result(client ReplicationNetworkMappingsClient) (ar autorest.Response, err error) {
16219 var done bool
16220 done, err = future.DoneWithContext(context.Background(), client)
16221 if err != nil {
16222 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsDeleteFuture", "Result", future.Response(), "Polling failure")
16223 return
16224 }
16225 if !done {
16226 ar.Response = future.Response()
16227 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationNetworkMappingsDeleteFuture")
16228 return
16229 }
16230 ar.Response = future.Response()
16231 return
16232 }
16233
16234
16235
16236 type ReplicationNetworkMappingsUpdateFuture struct {
16237 azure.FutureAPI
16238
16239
16240 Result func(ReplicationNetworkMappingsClient) (NetworkMapping, error)
16241 }
16242
16243
16244 func (future *ReplicationNetworkMappingsUpdateFuture) UnmarshalJSON(body []byte) error {
16245 var azFuture azure.Future
16246 if err := json.Unmarshal(body, &azFuture); err != nil {
16247 return err
16248 }
16249 future.FutureAPI = &azFuture
16250 future.Result = future.result
16251 return nil
16252 }
16253
16254
16255 func (future *ReplicationNetworkMappingsUpdateFuture) result(client ReplicationNetworkMappingsClient) (nm NetworkMapping, err error) {
16256 var done bool
16257 done, err = future.DoneWithContext(context.Background(), client)
16258 if err != nil {
16259 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsUpdateFuture", "Result", future.Response(), "Polling failure")
16260 return
16261 }
16262 if !done {
16263 nm.Response.Response = future.Response()
16264 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationNetworkMappingsUpdateFuture")
16265 return
16266 }
16267 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16268 if nm.Response.Response, err = future.GetResult(sender); err == nil && nm.Response.Response.StatusCode != http.StatusNoContent {
16269 nm, err = client.UpdateResponder(nm.Response.Response)
16270 if err != nil {
16271 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsUpdateFuture", "Result", nm.Response.Response, "Failure responding to request")
16272 }
16273 }
16274 return
16275 }
16276
16277
16278
16279 type ReplicationPoliciesCreateFuture struct {
16280 azure.FutureAPI
16281
16282
16283 Result func(ReplicationPoliciesClient) (Policy, error)
16284 }
16285
16286
16287 func (future *ReplicationPoliciesCreateFuture) UnmarshalJSON(body []byte) error {
16288 var azFuture azure.Future
16289 if err := json.Unmarshal(body, &azFuture); err != nil {
16290 return err
16291 }
16292 future.FutureAPI = &azFuture
16293 future.Result = future.result
16294 return nil
16295 }
16296
16297
16298 func (future *ReplicationPoliciesCreateFuture) result(client ReplicationPoliciesClient) (p Policy, err error) {
16299 var done bool
16300 done, err = future.DoneWithContext(context.Background(), client)
16301 if err != nil {
16302 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesCreateFuture", "Result", future.Response(), "Polling failure")
16303 return
16304 }
16305 if !done {
16306 p.Response.Response = future.Response()
16307 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationPoliciesCreateFuture")
16308 return
16309 }
16310 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16311 if p.Response.Response, err = future.GetResult(sender); err == nil && p.Response.Response.StatusCode != http.StatusNoContent {
16312 p, err = client.CreateResponder(p.Response.Response)
16313 if err != nil {
16314 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesCreateFuture", "Result", p.Response.Response, "Failure responding to request")
16315 }
16316 }
16317 return
16318 }
16319
16320
16321
16322 type ReplicationPoliciesDeleteFuture struct {
16323 azure.FutureAPI
16324
16325
16326 Result func(ReplicationPoliciesClient) (autorest.Response, error)
16327 }
16328
16329
16330 func (future *ReplicationPoliciesDeleteFuture) UnmarshalJSON(body []byte) error {
16331 var azFuture azure.Future
16332 if err := json.Unmarshal(body, &azFuture); err != nil {
16333 return err
16334 }
16335 future.FutureAPI = &azFuture
16336 future.Result = future.result
16337 return nil
16338 }
16339
16340
16341 func (future *ReplicationPoliciesDeleteFuture) result(client ReplicationPoliciesClient) (ar autorest.Response, err error) {
16342 var done bool
16343 done, err = future.DoneWithContext(context.Background(), client)
16344 if err != nil {
16345 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
16346 return
16347 }
16348 if !done {
16349 ar.Response = future.Response()
16350 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationPoliciesDeleteFuture")
16351 return
16352 }
16353 ar.Response = future.Response()
16354 return
16355 }
16356
16357
16358
16359 type ReplicationPoliciesUpdateFuture struct {
16360 azure.FutureAPI
16361
16362
16363 Result func(ReplicationPoliciesClient) (Policy, error)
16364 }
16365
16366
16367 func (future *ReplicationPoliciesUpdateFuture) UnmarshalJSON(body []byte) error {
16368 var azFuture azure.Future
16369 if err := json.Unmarshal(body, &azFuture); err != nil {
16370 return err
16371 }
16372 future.FutureAPI = &azFuture
16373 future.Result = future.result
16374 return nil
16375 }
16376
16377
16378 func (future *ReplicationPoliciesUpdateFuture) result(client ReplicationPoliciesClient) (p Policy, err error) {
16379 var done bool
16380 done, err = future.DoneWithContext(context.Background(), client)
16381 if err != nil {
16382 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesUpdateFuture", "Result", future.Response(), "Polling failure")
16383 return
16384 }
16385 if !done {
16386 p.Response.Response = future.Response()
16387 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationPoliciesUpdateFuture")
16388 return
16389 }
16390 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16391 if p.Response.Response, err = future.GetResult(sender); err == nil && p.Response.Response.StatusCode != http.StatusNoContent {
16392 p, err = client.UpdateResponder(p.Response.Response)
16393 if err != nil {
16394 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesUpdateFuture", "Result", p.Response.Response, "Failure responding to request")
16395 }
16396 }
16397 return
16398 }
16399
16400
16401 type ReplicationProtectedItem struct {
16402 autorest.Response `json:"-"`
16403
16404 Properties *ReplicationProtectedItemProperties `json:"properties,omitempty"`
16405
16406 ID *string `json:"id,omitempty"`
16407
16408 Name *string `json:"name,omitempty"`
16409
16410 Type *string `json:"type,omitempty"`
16411
16412 Location *string `json:"location,omitempty"`
16413 }
16414
16415
16416 func (rpi ReplicationProtectedItem) MarshalJSON() ([]byte, error) {
16417 objectMap := make(map[string]interface{})
16418 if rpi.Properties != nil {
16419 objectMap["properties"] = rpi.Properties
16420 }
16421 if rpi.Location != nil {
16422 objectMap["location"] = rpi.Location
16423 }
16424 return json.Marshal(objectMap)
16425 }
16426
16427
16428 type ReplicationProtectedItemCollection struct {
16429 autorest.Response `json:"-"`
16430
16431 Value *[]ReplicationProtectedItem `json:"value,omitempty"`
16432
16433 NextLink *string `json:"nextLink,omitempty"`
16434 }
16435
16436
16437
16438 type ReplicationProtectedItemCollectionIterator struct {
16439 i int
16440 page ReplicationProtectedItemCollectionPage
16441 }
16442
16443
16444
16445 func (iter *ReplicationProtectedItemCollectionIterator) NextWithContext(ctx context.Context) (err error) {
16446 if tracing.IsEnabled() {
16447 ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectedItemCollectionIterator.NextWithContext")
16448 defer func() {
16449 sc := -1
16450 if iter.Response().Response.Response != nil {
16451 sc = iter.Response().Response.Response.StatusCode
16452 }
16453 tracing.EndSpan(ctx, sc, err)
16454 }()
16455 }
16456 iter.i++
16457 if iter.i < len(iter.page.Values()) {
16458 return nil
16459 }
16460 err = iter.page.NextWithContext(ctx)
16461 if err != nil {
16462 iter.i--
16463 return err
16464 }
16465 iter.i = 0
16466 return nil
16467 }
16468
16469
16470
16471
16472 func (iter *ReplicationProtectedItemCollectionIterator) Next() error {
16473 return iter.NextWithContext(context.Background())
16474 }
16475
16476
16477 func (iter ReplicationProtectedItemCollectionIterator) NotDone() bool {
16478 return iter.page.NotDone() && iter.i < len(iter.page.Values())
16479 }
16480
16481
16482 func (iter ReplicationProtectedItemCollectionIterator) Response() ReplicationProtectedItemCollection {
16483 return iter.page.Response()
16484 }
16485
16486
16487
16488 func (iter ReplicationProtectedItemCollectionIterator) Value() ReplicationProtectedItem {
16489 if !iter.page.NotDone() {
16490 return ReplicationProtectedItem{}
16491 }
16492 return iter.page.Values()[iter.i]
16493 }
16494
16495
16496 func NewReplicationProtectedItemCollectionIterator(page ReplicationProtectedItemCollectionPage) ReplicationProtectedItemCollectionIterator {
16497 return ReplicationProtectedItemCollectionIterator{page: page}
16498 }
16499
16500
16501 func (rpic ReplicationProtectedItemCollection) IsEmpty() bool {
16502 return rpic.Value == nil || len(*rpic.Value) == 0
16503 }
16504
16505
16506 func (rpic ReplicationProtectedItemCollection) hasNextLink() bool {
16507 return rpic.NextLink != nil && len(*rpic.NextLink) != 0
16508 }
16509
16510
16511
16512 func (rpic ReplicationProtectedItemCollection) replicationProtectedItemCollectionPreparer(ctx context.Context) (*http.Request, error) {
16513 if !rpic.hasNextLink() {
16514 return nil, nil
16515 }
16516 return autorest.Prepare((&http.Request{}).WithContext(ctx),
16517 autorest.AsJSON(),
16518 autorest.AsGet(),
16519 autorest.WithBaseURL(to.String(rpic.NextLink)))
16520 }
16521
16522
16523 type ReplicationProtectedItemCollectionPage struct {
16524 fn func(context.Context, ReplicationProtectedItemCollection) (ReplicationProtectedItemCollection, error)
16525 rpic ReplicationProtectedItemCollection
16526 }
16527
16528
16529
16530 func (page *ReplicationProtectedItemCollectionPage) NextWithContext(ctx context.Context) (err error) {
16531 if tracing.IsEnabled() {
16532 ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectedItemCollectionPage.NextWithContext")
16533 defer func() {
16534 sc := -1
16535 if page.Response().Response.Response != nil {
16536 sc = page.Response().Response.Response.StatusCode
16537 }
16538 tracing.EndSpan(ctx, sc, err)
16539 }()
16540 }
16541 for {
16542 next, err := page.fn(ctx, page.rpic)
16543 if err != nil {
16544 return err
16545 }
16546 page.rpic = next
16547 if !next.hasNextLink() || !next.IsEmpty() {
16548 break
16549 }
16550 }
16551 return nil
16552 }
16553
16554
16555
16556
16557 func (page *ReplicationProtectedItemCollectionPage) Next() error {
16558 return page.NextWithContext(context.Background())
16559 }
16560
16561
16562 func (page ReplicationProtectedItemCollectionPage) NotDone() bool {
16563 return !page.rpic.IsEmpty()
16564 }
16565
16566
16567 func (page ReplicationProtectedItemCollectionPage) Response() ReplicationProtectedItemCollection {
16568 return page.rpic
16569 }
16570
16571
16572 func (page ReplicationProtectedItemCollectionPage) Values() []ReplicationProtectedItem {
16573 if page.rpic.IsEmpty() {
16574 return nil
16575 }
16576 return *page.rpic.Value
16577 }
16578
16579
16580 func NewReplicationProtectedItemCollectionPage(cur ReplicationProtectedItemCollection, getNextPage func(context.Context, ReplicationProtectedItemCollection) (ReplicationProtectedItemCollection, error)) ReplicationProtectedItemCollectionPage {
16581 return ReplicationProtectedItemCollectionPage{
16582 fn: getNextPage,
16583 rpic: cur,
16584 }
16585 }
16586
16587
16588 type ReplicationProtectedItemProperties struct {
16589
16590 FriendlyName *string `json:"friendlyName,omitempty"`
16591
16592 ProtectedItemType *string `json:"protectedItemType,omitempty"`
16593
16594 ProtectableItemID *string `json:"protectableItemId,omitempty"`
16595
16596 RecoveryServicesProviderID *string `json:"recoveryServicesProviderId,omitempty"`
16597
16598 PrimaryFabricFriendlyName *string `json:"primaryFabricFriendlyName,omitempty"`
16599
16600 PrimaryFabricProvider *string `json:"primaryFabricProvider,omitempty"`
16601
16602 RecoveryFabricFriendlyName *string `json:"recoveryFabricFriendlyName,omitempty"`
16603
16604 RecoveryFabricID *string `json:"recoveryFabricId,omitempty"`
16605
16606 PrimaryProtectionContainerFriendlyName *string `json:"primaryProtectionContainerFriendlyName,omitempty"`
16607
16608 RecoveryProtectionContainerFriendlyName *string `json:"recoveryProtectionContainerFriendlyName,omitempty"`
16609
16610 ProtectionState *string `json:"protectionState,omitempty"`
16611
16612 ProtectionStateDescription *string `json:"protectionStateDescription,omitempty"`
16613
16614 ActiveLocation *string `json:"activeLocation,omitempty"`
16615
16616 TestFailoverState *string `json:"testFailoverState,omitempty"`
16617
16618 TestFailoverStateDescription *string `json:"testFailoverStateDescription,omitempty"`
16619
16620 AllowedOperations *[]string `json:"allowedOperations,omitempty"`
16621
16622 ReplicationHealth *string `json:"replicationHealth,omitempty"`
16623
16624 FailoverHealth *string `json:"failoverHealth,omitempty"`
16625
16626 HealthErrors *[]HealthError `json:"healthErrors,omitempty"`
16627
16628 PolicyID *string `json:"policyId,omitempty"`
16629
16630 PolicyFriendlyName *string `json:"policyFriendlyName,omitempty"`
16631
16632 LastSuccessfulFailoverTime *date.Time `json:"lastSuccessfulFailoverTime,omitempty"`
16633
16634 LastSuccessfulTestFailoverTime *date.Time `json:"lastSuccessfulTestFailoverTime,omitempty"`
16635
16636 CurrentScenario *CurrentScenarioDetails `json:"currentScenario,omitempty"`
16637
16638 FailoverRecoveryPointID *string `json:"failoverRecoveryPointId,omitempty"`
16639
16640 ProviderSpecificDetails BasicReplicationProviderSpecificSettings `json:"providerSpecificDetails,omitempty"`
16641
16642 RecoveryContainerID *string `json:"recoveryContainerId,omitempty"`
16643 }
16644
16645
16646 func (rpip *ReplicationProtectedItemProperties) UnmarshalJSON(body []byte) error {
16647 var m map[string]*json.RawMessage
16648 err := json.Unmarshal(body, &m)
16649 if err != nil {
16650 return err
16651 }
16652 for k, v := range m {
16653 switch k {
16654 case "friendlyName":
16655 if v != nil {
16656 var friendlyName string
16657 err = json.Unmarshal(*v, &friendlyName)
16658 if err != nil {
16659 return err
16660 }
16661 rpip.FriendlyName = &friendlyName
16662 }
16663 case "protectedItemType":
16664 if v != nil {
16665 var protectedItemType string
16666 err = json.Unmarshal(*v, &protectedItemType)
16667 if err != nil {
16668 return err
16669 }
16670 rpip.ProtectedItemType = &protectedItemType
16671 }
16672 case "protectableItemId":
16673 if v != nil {
16674 var protectableItemID string
16675 err = json.Unmarshal(*v, &protectableItemID)
16676 if err != nil {
16677 return err
16678 }
16679 rpip.ProtectableItemID = &protectableItemID
16680 }
16681 case "recoveryServicesProviderId":
16682 if v != nil {
16683 var recoveryServicesProviderID string
16684 err = json.Unmarshal(*v, &recoveryServicesProviderID)
16685 if err != nil {
16686 return err
16687 }
16688 rpip.RecoveryServicesProviderID = &recoveryServicesProviderID
16689 }
16690 case "primaryFabricFriendlyName":
16691 if v != nil {
16692 var primaryFabricFriendlyName string
16693 err = json.Unmarshal(*v, &primaryFabricFriendlyName)
16694 if err != nil {
16695 return err
16696 }
16697 rpip.PrimaryFabricFriendlyName = &primaryFabricFriendlyName
16698 }
16699 case "primaryFabricProvider":
16700 if v != nil {
16701 var primaryFabricProvider string
16702 err = json.Unmarshal(*v, &primaryFabricProvider)
16703 if err != nil {
16704 return err
16705 }
16706 rpip.PrimaryFabricProvider = &primaryFabricProvider
16707 }
16708 case "recoveryFabricFriendlyName":
16709 if v != nil {
16710 var recoveryFabricFriendlyName string
16711 err = json.Unmarshal(*v, &recoveryFabricFriendlyName)
16712 if err != nil {
16713 return err
16714 }
16715 rpip.RecoveryFabricFriendlyName = &recoveryFabricFriendlyName
16716 }
16717 case "recoveryFabricId":
16718 if v != nil {
16719 var recoveryFabricID string
16720 err = json.Unmarshal(*v, &recoveryFabricID)
16721 if err != nil {
16722 return err
16723 }
16724 rpip.RecoveryFabricID = &recoveryFabricID
16725 }
16726 case "primaryProtectionContainerFriendlyName":
16727 if v != nil {
16728 var primaryProtectionContainerFriendlyName string
16729 err = json.Unmarshal(*v, &primaryProtectionContainerFriendlyName)
16730 if err != nil {
16731 return err
16732 }
16733 rpip.PrimaryProtectionContainerFriendlyName = &primaryProtectionContainerFriendlyName
16734 }
16735 case "recoveryProtectionContainerFriendlyName":
16736 if v != nil {
16737 var recoveryProtectionContainerFriendlyName string
16738 err = json.Unmarshal(*v, &recoveryProtectionContainerFriendlyName)
16739 if err != nil {
16740 return err
16741 }
16742 rpip.RecoveryProtectionContainerFriendlyName = &recoveryProtectionContainerFriendlyName
16743 }
16744 case "protectionState":
16745 if v != nil {
16746 var protectionState string
16747 err = json.Unmarshal(*v, &protectionState)
16748 if err != nil {
16749 return err
16750 }
16751 rpip.ProtectionState = &protectionState
16752 }
16753 case "protectionStateDescription":
16754 if v != nil {
16755 var protectionStateDescription string
16756 err = json.Unmarshal(*v, &protectionStateDescription)
16757 if err != nil {
16758 return err
16759 }
16760 rpip.ProtectionStateDescription = &protectionStateDescription
16761 }
16762 case "activeLocation":
16763 if v != nil {
16764 var activeLocation string
16765 err = json.Unmarshal(*v, &activeLocation)
16766 if err != nil {
16767 return err
16768 }
16769 rpip.ActiveLocation = &activeLocation
16770 }
16771 case "testFailoverState":
16772 if v != nil {
16773 var testFailoverState string
16774 err = json.Unmarshal(*v, &testFailoverState)
16775 if err != nil {
16776 return err
16777 }
16778 rpip.TestFailoverState = &testFailoverState
16779 }
16780 case "testFailoverStateDescription":
16781 if v != nil {
16782 var testFailoverStateDescription string
16783 err = json.Unmarshal(*v, &testFailoverStateDescription)
16784 if err != nil {
16785 return err
16786 }
16787 rpip.TestFailoverStateDescription = &testFailoverStateDescription
16788 }
16789 case "allowedOperations":
16790 if v != nil {
16791 var allowedOperations []string
16792 err = json.Unmarshal(*v, &allowedOperations)
16793 if err != nil {
16794 return err
16795 }
16796 rpip.AllowedOperations = &allowedOperations
16797 }
16798 case "replicationHealth":
16799 if v != nil {
16800 var replicationHealth string
16801 err = json.Unmarshal(*v, &replicationHealth)
16802 if err != nil {
16803 return err
16804 }
16805 rpip.ReplicationHealth = &replicationHealth
16806 }
16807 case "failoverHealth":
16808 if v != nil {
16809 var failoverHealth string
16810 err = json.Unmarshal(*v, &failoverHealth)
16811 if err != nil {
16812 return err
16813 }
16814 rpip.FailoverHealth = &failoverHealth
16815 }
16816 case "healthErrors":
16817 if v != nil {
16818 var healthErrors []HealthError
16819 err = json.Unmarshal(*v, &healthErrors)
16820 if err != nil {
16821 return err
16822 }
16823 rpip.HealthErrors = &healthErrors
16824 }
16825 case "policyId":
16826 if v != nil {
16827 var policyID string
16828 err = json.Unmarshal(*v, &policyID)
16829 if err != nil {
16830 return err
16831 }
16832 rpip.PolicyID = &policyID
16833 }
16834 case "policyFriendlyName":
16835 if v != nil {
16836 var policyFriendlyName string
16837 err = json.Unmarshal(*v, &policyFriendlyName)
16838 if err != nil {
16839 return err
16840 }
16841 rpip.PolicyFriendlyName = &policyFriendlyName
16842 }
16843 case "lastSuccessfulFailoverTime":
16844 if v != nil {
16845 var lastSuccessfulFailoverTime date.Time
16846 err = json.Unmarshal(*v, &lastSuccessfulFailoverTime)
16847 if err != nil {
16848 return err
16849 }
16850 rpip.LastSuccessfulFailoverTime = &lastSuccessfulFailoverTime
16851 }
16852 case "lastSuccessfulTestFailoverTime":
16853 if v != nil {
16854 var lastSuccessfulTestFailoverTime date.Time
16855 err = json.Unmarshal(*v, &lastSuccessfulTestFailoverTime)
16856 if err != nil {
16857 return err
16858 }
16859 rpip.LastSuccessfulTestFailoverTime = &lastSuccessfulTestFailoverTime
16860 }
16861 case "currentScenario":
16862 if v != nil {
16863 var currentScenario CurrentScenarioDetails
16864 err = json.Unmarshal(*v, ¤tScenario)
16865 if err != nil {
16866 return err
16867 }
16868 rpip.CurrentScenario = ¤tScenario
16869 }
16870 case "failoverRecoveryPointId":
16871 if v != nil {
16872 var failoverRecoveryPointID string
16873 err = json.Unmarshal(*v, &failoverRecoveryPointID)
16874 if err != nil {
16875 return err
16876 }
16877 rpip.FailoverRecoveryPointID = &failoverRecoveryPointID
16878 }
16879 case "providerSpecificDetails":
16880 if v != nil {
16881 providerSpecificDetails, err := unmarshalBasicReplicationProviderSpecificSettings(*v)
16882 if err != nil {
16883 return err
16884 }
16885 rpip.ProviderSpecificDetails = providerSpecificDetails
16886 }
16887 case "recoveryContainerId":
16888 if v != nil {
16889 var recoveryContainerID string
16890 err = json.Unmarshal(*v, &recoveryContainerID)
16891 if err != nil {
16892 return err
16893 }
16894 rpip.RecoveryContainerID = &recoveryContainerID
16895 }
16896 }
16897 }
16898
16899 return nil
16900 }
16901
16902
16903
16904 type ReplicationProtectedItemsApplyRecoveryPointFuture struct {
16905 azure.FutureAPI
16906
16907
16908 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error)
16909 }
16910
16911
16912 func (future *ReplicationProtectedItemsApplyRecoveryPointFuture) UnmarshalJSON(body []byte) error {
16913 var azFuture azure.Future
16914 if err := json.Unmarshal(body, &azFuture); err != nil {
16915 return err
16916 }
16917 future.FutureAPI = &azFuture
16918 future.Result = future.result
16919 return nil
16920 }
16921
16922
16923 func (future *ReplicationProtectedItemsApplyRecoveryPointFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
16924 var done bool
16925 done, err = future.DoneWithContext(context.Background(), client)
16926 if err != nil {
16927 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsApplyRecoveryPointFuture", "Result", future.Response(), "Polling failure")
16928 return
16929 }
16930 if !done {
16931 rpi.Response.Response = future.Response()
16932 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsApplyRecoveryPointFuture")
16933 return
16934 }
16935 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16936 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
16937 rpi, err = client.ApplyRecoveryPointResponder(rpi.Response.Response)
16938 if err != nil {
16939 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsApplyRecoveryPointFuture", "Result", rpi.Response.Response, "Failure responding to request")
16940 }
16941 }
16942 return
16943 }
16944
16945
16946
16947 type ReplicationProtectedItemsCreateFuture struct {
16948 azure.FutureAPI
16949
16950
16951 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error)
16952 }
16953
16954
16955 func (future *ReplicationProtectedItemsCreateFuture) UnmarshalJSON(body []byte) error {
16956 var azFuture azure.Future
16957 if err := json.Unmarshal(body, &azFuture); err != nil {
16958 return err
16959 }
16960 future.FutureAPI = &azFuture
16961 future.Result = future.result
16962 return nil
16963 }
16964
16965
16966 func (future *ReplicationProtectedItemsCreateFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
16967 var done bool
16968 done, err = future.DoneWithContext(context.Background(), client)
16969 if err != nil {
16970 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsCreateFuture", "Result", future.Response(), "Polling failure")
16971 return
16972 }
16973 if !done {
16974 rpi.Response.Response = future.Response()
16975 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsCreateFuture")
16976 return
16977 }
16978 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16979 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
16980 rpi, err = client.CreateResponder(rpi.Response.Response)
16981 if err != nil {
16982 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsCreateFuture", "Result", rpi.Response.Response, "Failure responding to request")
16983 }
16984 }
16985 return
16986 }
16987
16988
16989
16990 type ReplicationProtectedItemsDeleteFuture struct {
16991 azure.FutureAPI
16992
16993
16994 Result func(ReplicationProtectedItemsClient) (autorest.Response, error)
16995 }
16996
16997
16998 func (future *ReplicationProtectedItemsDeleteFuture) UnmarshalJSON(body []byte) error {
16999 var azFuture azure.Future
17000 if err := json.Unmarshal(body, &azFuture); err != nil {
17001 return err
17002 }
17003 future.FutureAPI = &azFuture
17004 future.Result = future.result
17005 return nil
17006 }
17007
17008
17009 func (future *ReplicationProtectedItemsDeleteFuture) result(client ReplicationProtectedItemsClient) (ar autorest.Response, err error) {
17010 var done bool
17011 done, err = future.DoneWithContext(context.Background(), client)
17012 if err != nil {
17013 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsDeleteFuture", "Result", future.Response(), "Polling failure")
17014 return
17015 }
17016 if !done {
17017 ar.Response = future.Response()
17018 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsDeleteFuture")
17019 return
17020 }
17021 ar.Response = future.Response()
17022 return
17023 }
17024
17025
17026
17027 type ReplicationProtectedItemsFailoverCommitFuture struct {
17028 azure.FutureAPI
17029
17030
17031 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error)
17032 }
17033
17034
17035 func (future *ReplicationProtectedItemsFailoverCommitFuture) UnmarshalJSON(body []byte) error {
17036 var azFuture azure.Future
17037 if err := json.Unmarshal(body, &azFuture); err != nil {
17038 return err
17039 }
17040 future.FutureAPI = &azFuture
17041 future.Result = future.result
17042 return nil
17043 }
17044
17045
17046 func (future *ReplicationProtectedItemsFailoverCommitFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
17047 var done bool
17048 done, err = future.DoneWithContext(context.Background(), client)
17049 if err != nil {
17050 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsFailoverCommitFuture", "Result", future.Response(), "Polling failure")
17051 return
17052 }
17053 if !done {
17054 rpi.Response.Response = future.Response()
17055 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsFailoverCommitFuture")
17056 return
17057 }
17058 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17059 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
17060 rpi, err = client.FailoverCommitResponder(rpi.Response.Response)
17061 if err != nil {
17062 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsFailoverCommitFuture", "Result", rpi.Response.Response, "Failure responding to request")
17063 }
17064 }
17065 return
17066 }
17067
17068
17069
17070 type ReplicationProtectedItemsPlannedFailoverFuture struct {
17071 azure.FutureAPI
17072
17073
17074 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error)
17075 }
17076
17077
17078 func (future *ReplicationProtectedItemsPlannedFailoverFuture) UnmarshalJSON(body []byte) error {
17079 var azFuture azure.Future
17080 if err := json.Unmarshal(body, &azFuture); err != nil {
17081 return err
17082 }
17083 future.FutureAPI = &azFuture
17084 future.Result = future.result
17085 return nil
17086 }
17087
17088
17089 func (future *ReplicationProtectedItemsPlannedFailoverFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
17090 var done bool
17091 done, err = future.DoneWithContext(context.Background(), client)
17092 if err != nil {
17093 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsPlannedFailoverFuture", "Result", future.Response(), "Polling failure")
17094 return
17095 }
17096 if !done {
17097 rpi.Response.Response = future.Response()
17098 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsPlannedFailoverFuture")
17099 return
17100 }
17101 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17102 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
17103 rpi, err = client.PlannedFailoverResponder(rpi.Response.Response)
17104 if err != nil {
17105 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsPlannedFailoverFuture", "Result", rpi.Response.Response, "Failure responding to request")
17106 }
17107 }
17108 return
17109 }
17110
17111
17112
17113 type ReplicationProtectedItemsPurgeFuture struct {
17114 azure.FutureAPI
17115
17116
17117 Result func(ReplicationProtectedItemsClient) (autorest.Response, error)
17118 }
17119
17120
17121 func (future *ReplicationProtectedItemsPurgeFuture) UnmarshalJSON(body []byte) error {
17122 var azFuture azure.Future
17123 if err := json.Unmarshal(body, &azFuture); err != nil {
17124 return err
17125 }
17126 future.FutureAPI = &azFuture
17127 future.Result = future.result
17128 return nil
17129 }
17130
17131
17132 func (future *ReplicationProtectedItemsPurgeFuture) result(client ReplicationProtectedItemsClient) (ar autorest.Response, err error) {
17133 var done bool
17134 done, err = future.DoneWithContext(context.Background(), client)
17135 if err != nil {
17136 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsPurgeFuture", "Result", future.Response(), "Polling failure")
17137 return
17138 }
17139 if !done {
17140 ar.Response = future.Response()
17141 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsPurgeFuture")
17142 return
17143 }
17144 ar.Response = future.Response()
17145 return
17146 }
17147
17148
17149
17150 type ReplicationProtectedItemsRepairReplicationFuture struct {
17151 azure.FutureAPI
17152
17153
17154 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error)
17155 }
17156
17157
17158 func (future *ReplicationProtectedItemsRepairReplicationFuture) UnmarshalJSON(body []byte) error {
17159 var azFuture azure.Future
17160 if err := json.Unmarshal(body, &azFuture); err != nil {
17161 return err
17162 }
17163 future.FutureAPI = &azFuture
17164 future.Result = future.result
17165 return nil
17166 }
17167
17168
17169 func (future *ReplicationProtectedItemsRepairReplicationFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
17170 var done bool
17171 done, err = future.DoneWithContext(context.Background(), client)
17172 if err != nil {
17173 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsRepairReplicationFuture", "Result", future.Response(), "Polling failure")
17174 return
17175 }
17176 if !done {
17177 rpi.Response.Response = future.Response()
17178 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsRepairReplicationFuture")
17179 return
17180 }
17181 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17182 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
17183 rpi, err = client.RepairReplicationResponder(rpi.Response.Response)
17184 if err != nil {
17185 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsRepairReplicationFuture", "Result", rpi.Response.Response, "Failure responding to request")
17186 }
17187 }
17188 return
17189 }
17190
17191
17192
17193 type ReplicationProtectedItemsReprotectFuture struct {
17194 azure.FutureAPI
17195
17196
17197 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error)
17198 }
17199
17200
17201 func (future *ReplicationProtectedItemsReprotectFuture) UnmarshalJSON(body []byte) error {
17202 var azFuture azure.Future
17203 if err := json.Unmarshal(body, &azFuture); err != nil {
17204 return err
17205 }
17206 future.FutureAPI = &azFuture
17207 future.Result = future.result
17208 return nil
17209 }
17210
17211
17212 func (future *ReplicationProtectedItemsReprotectFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
17213 var done bool
17214 done, err = future.DoneWithContext(context.Background(), client)
17215 if err != nil {
17216 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsReprotectFuture", "Result", future.Response(), "Polling failure")
17217 return
17218 }
17219 if !done {
17220 rpi.Response.Response = future.Response()
17221 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsReprotectFuture")
17222 return
17223 }
17224 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17225 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
17226 rpi, err = client.ReprotectResponder(rpi.Response.Response)
17227 if err != nil {
17228 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsReprotectFuture", "Result", rpi.Response.Response, "Failure responding to request")
17229 }
17230 }
17231 return
17232 }
17233
17234
17235
17236 type ReplicationProtectedItemsTestFailoverCleanupFuture struct {
17237 azure.FutureAPI
17238
17239
17240 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error)
17241 }
17242
17243
17244 func (future *ReplicationProtectedItemsTestFailoverCleanupFuture) UnmarshalJSON(body []byte) error {
17245 var azFuture azure.Future
17246 if err := json.Unmarshal(body, &azFuture); err != nil {
17247 return err
17248 }
17249 future.FutureAPI = &azFuture
17250 future.Result = future.result
17251 return nil
17252 }
17253
17254
17255 func (future *ReplicationProtectedItemsTestFailoverCleanupFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
17256 var done bool
17257 done, err = future.DoneWithContext(context.Background(), client)
17258 if err != nil {
17259 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsTestFailoverCleanupFuture", "Result", future.Response(), "Polling failure")
17260 return
17261 }
17262 if !done {
17263 rpi.Response.Response = future.Response()
17264 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsTestFailoverCleanupFuture")
17265 return
17266 }
17267 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17268 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
17269 rpi, err = client.TestFailoverCleanupResponder(rpi.Response.Response)
17270 if err != nil {
17271 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsTestFailoverCleanupFuture", "Result", rpi.Response.Response, "Failure responding to request")
17272 }
17273 }
17274 return
17275 }
17276
17277
17278
17279 type ReplicationProtectedItemsTestFailoverFuture struct {
17280 azure.FutureAPI
17281
17282
17283 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error)
17284 }
17285
17286
17287 func (future *ReplicationProtectedItemsTestFailoverFuture) UnmarshalJSON(body []byte) error {
17288 var azFuture azure.Future
17289 if err := json.Unmarshal(body, &azFuture); err != nil {
17290 return err
17291 }
17292 future.FutureAPI = &azFuture
17293 future.Result = future.result
17294 return nil
17295 }
17296
17297
17298 func (future *ReplicationProtectedItemsTestFailoverFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
17299 var done bool
17300 done, err = future.DoneWithContext(context.Background(), client)
17301 if err != nil {
17302 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsTestFailoverFuture", "Result", future.Response(), "Polling failure")
17303 return
17304 }
17305 if !done {
17306 rpi.Response.Response = future.Response()
17307 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsTestFailoverFuture")
17308 return
17309 }
17310 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17311 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
17312 rpi, err = client.TestFailoverResponder(rpi.Response.Response)
17313 if err != nil {
17314 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsTestFailoverFuture", "Result", rpi.Response.Response, "Failure responding to request")
17315 }
17316 }
17317 return
17318 }
17319
17320
17321
17322 type ReplicationProtectedItemsUnplannedFailoverFuture struct {
17323 azure.FutureAPI
17324
17325
17326 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error)
17327 }
17328
17329
17330 func (future *ReplicationProtectedItemsUnplannedFailoverFuture) UnmarshalJSON(body []byte) error {
17331 var azFuture azure.Future
17332 if err := json.Unmarshal(body, &azFuture); err != nil {
17333 return err
17334 }
17335 future.FutureAPI = &azFuture
17336 future.Result = future.result
17337 return nil
17338 }
17339
17340
17341 func (future *ReplicationProtectedItemsUnplannedFailoverFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
17342 var done bool
17343 done, err = future.DoneWithContext(context.Background(), client)
17344 if err != nil {
17345 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUnplannedFailoverFuture", "Result", future.Response(), "Polling failure")
17346 return
17347 }
17348 if !done {
17349 rpi.Response.Response = future.Response()
17350 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsUnplannedFailoverFuture")
17351 return
17352 }
17353 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17354 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
17355 rpi, err = client.UnplannedFailoverResponder(rpi.Response.Response)
17356 if err != nil {
17357 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUnplannedFailoverFuture", "Result", rpi.Response.Response, "Failure responding to request")
17358 }
17359 }
17360 return
17361 }
17362
17363
17364
17365 type ReplicationProtectedItemsUpdateFuture struct {
17366 azure.FutureAPI
17367
17368
17369 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error)
17370 }
17371
17372
17373 func (future *ReplicationProtectedItemsUpdateFuture) UnmarshalJSON(body []byte) error {
17374 var azFuture azure.Future
17375 if err := json.Unmarshal(body, &azFuture); err != nil {
17376 return err
17377 }
17378 future.FutureAPI = &azFuture
17379 future.Result = future.result
17380 return nil
17381 }
17382
17383
17384 func (future *ReplicationProtectedItemsUpdateFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
17385 var done bool
17386 done, err = future.DoneWithContext(context.Background(), client)
17387 if err != nil {
17388 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUpdateFuture", "Result", future.Response(), "Polling failure")
17389 return
17390 }
17391 if !done {
17392 rpi.Response.Response = future.Response()
17393 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsUpdateFuture")
17394 return
17395 }
17396 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17397 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
17398 rpi, err = client.UpdateResponder(rpi.Response.Response)
17399 if err != nil {
17400 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUpdateFuture", "Result", rpi.Response.Response, "Failure responding to request")
17401 }
17402 }
17403 return
17404 }
17405
17406
17407
17408 type ReplicationProtectedItemsUpdateMobilityServiceFuture struct {
17409 azure.FutureAPI
17410
17411
17412 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error)
17413 }
17414
17415
17416 func (future *ReplicationProtectedItemsUpdateMobilityServiceFuture) UnmarshalJSON(body []byte) error {
17417 var azFuture azure.Future
17418 if err := json.Unmarshal(body, &azFuture); err != nil {
17419 return err
17420 }
17421 future.FutureAPI = &azFuture
17422 future.Result = future.result
17423 return nil
17424 }
17425
17426
17427 func (future *ReplicationProtectedItemsUpdateMobilityServiceFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
17428 var done bool
17429 done, err = future.DoneWithContext(context.Background(), client)
17430 if err != nil {
17431 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUpdateMobilityServiceFuture", "Result", future.Response(), "Polling failure")
17432 return
17433 }
17434 if !done {
17435 rpi.Response.Response = future.Response()
17436 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsUpdateMobilityServiceFuture")
17437 return
17438 }
17439 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17440 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
17441 rpi, err = client.UpdateMobilityServiceResponder(rpi.Response.Response)
17442 if err != nil {
17443 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUpdateMobilityServiceFuture", "Result", rpi.Response.Response, "Failure responding to request")
17444 }
17445 }
17446 return
17447 }
17448
17449
17450
17451 type ReplicationProtectionContainerMappingsCreateFuture struct {
17452 azure.FutureAPI
17453
17454
17455 Result func(ReplicationProtectionContainerMappingsClient) (ProtectionContainerMapping, error)
17456 }
17457
17458
17459 func (future *ReplicationProtectionContainerMappingsCreateFuture) UnmarshalJSON(body []byte) error {
17460 var azFuture azure.Future
17461 if err := json.Unmarshal(body, &azFuture); err != nil {
17462 return err
17463 }
17464 future.FutureAPI = &azFuture
17465 future.Result = future.result
17466 return nil
17467 }
17468
17469
17470 func (future *ReplicationProtectionContainerMappingsCreateFuture) result(client ReplicationProtectionContainerMappingsClient) (pcm ProtectionContainerMapping, err error) {
17471 var done bool
17472 done, err = future.DoneWithContext(context.Background(), client)
17473 if err != nil {
17474 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsCreateFuture", "Result", future.Response(), "Polling failure")
17475 return
17476 }
17477 if !done {
17478 pcm.Response.Response = future.Response()
17479 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainerMappingsCreateFuture")
17480 return
17481 }
17482 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17483 if pcm.Response.Response, err = future.GetResult(sender); err == nil && pcm.Response.Response.StatusCode != http.StatusNoContent {
17484 pcm, err = client.CreateResponder(pcm.Response.Response)
17485 if err != nil {
17486 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsCreateFuture", "Result", pcm.Response.Response, "Failure responding to request")
17487 }
17488 }
17489 return
17490 }
17491
17492
17493
17494 type ReplicationProtectionContainerMappingsDeleteFuture struct {
17495 azure.FutureAPI
17496
17497
17498 Result func(ReplicationProtectionContainerMappingsClient) (autorest.Response, error)
17499 }
17500
17501
17502 func (future *ReplicationProtectionContainerMappingsDeleteFuture) UnmarshalJSON(body []byte) error {
17503 var azFuture azure.Future
17504 if err := json.Unmarshal(body, &azFuture); err != nil {
17505 return err
17506 }
17507 future.FutureAPI = &azFuture
17508 future.Result = future.result
17509 return nil
17510 }
17511
17512
17513 func (future *ReplicationProtectionContainerMappingsDeleteFuture) result(client ReplicationProtectionContainerMappingsClient) (ar autorest.Response, err error) {
17514 var done bool
17515 done, err = future.DoneWithContext(context.Background(), client)
17516 if err != nil {
17517 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsDeleteFuture", "Result", future.Response(), "Polling failure")
17518 return
17519 }
17520 if !done {
17521 ar.Response = future.Response()
17522 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainerMappingsDeleteFuture")
17523 return
17524 }
17525 ar.Response = future.Response()
17526 return
17527 }
17528
17529
17530
17531 type ReplicationProtectionContainerMappingsPurgeFuture struct {
17532 azure.FutureAPI
17533
17534
17535 Result func(ReplicationProtectionContainerMappingsClient) (autorest.Response, error)
17536 }
17537
17538
17539 func (future *ReplicationProtectionContainerMappingsPurgeFuture) UnmarshalJSON(body []byte) error {
17540 var azFuture azure.Future
17541 if err := json.Unmarshal(body, &azFuture); err != nil {
17542 return err
17543 }
17544 future.FutureAPI = &azFuture
17545 future.Result = future.result
17546 return nil
17547 }
17548
17549
17550 func (future *ReplicationProtectionContainerMappingsPurgeFuture) result(client ReplicationProtectionContainerMappingsClient) (ar autorest.Response, err error) {
17551 var done bool
17552 done, err = future.DoneWithContext(context.Background(), client)
17553 if err != nil {
17554 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsPurgeFuture", "Result", future.Response(), "Polling failure")
17555 return
17556 }
17557 if !done {
17558 ar.Response = future.Response()
17559 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainerMappingsPurgeFuture")
17560 return
17561 }
17562 ar.Response = future.Response()
17563 return
17564 }
17565
17566
17567
17568 type ReplicationProtectionContainerMappingsUpdateFuture struct {
17569 azure.FutureAPI
17570
17571
17572 Result func(ReplicationProtectionContainerMappingsClient) (ProtectionContainerMapping, error)
17573 }
17574
17575
17576 func (future *ReplicationProtectionContainerMappingsUpdateFuture) UnmarshalJSON(body []byte) error {
17577 var azFuture azure.Future
17578 if err := json.Unmarshal(body, &azFuture); err != nil {
17579 return err
17580 }
17581 future.FutureAPI = &azFuture
17582 future.Result = future.result
17583 return nil
17584 }
17585
17586
17587 func (future *ReplicationProtectionContainerMappingsUpdateFuture) result(client ReplicationProtectionContainerMappingsClient) (pcm ProtectionContainerMapping, err error) {
17588 var done bool
17589 done, err = future.DoneWithContext(context.Background(), client)
17590 if err != nil {
17591 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsUpdateFuture", "Result", future.Response(), "Polling failure")
17592 return
17593 }
17594 if !done {
17595 pcm.Response.Response = future.Response()
17596 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainerMappingsUpdateFuture")
17597 return
17598 }
17599 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17600 if pcm.Response.Response, err = future.GetResult(sender); err == nil && pcm.Response.Response.StatusCode != http.StatusNoContent {
17601 pcm, err = client.UpdateResponder(pcm.Response.Response)
17602 if err != nil {
17603 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsUpdateFuture", "Result", pcm.Response.Response, "Failure responding to request")
17604 }
17605 }
17606 return
17607 }
17608
17609
17610
17611 type ReplicationProtectionContainersCreateFuture struct {
17612 azure.FutureAPI
17613
17614
17615 Result func(ReplicationProtectionContainersClient) (ProtectionContainer, error)
17616 }
17617
17618
17619 func (future *ReplicationProtectionContainersCreateFuture) UnmarshalJSON(body []byte) error {
17620 var azFuture azure.Future
17621 if err := json.Unmarshal(body, &azFuture); err != nil {
17622 return err
17623 }
17624 future.FutureAPI = &azFuture
17625 future.Result = future.result
17626 return nil
17627 }
17628
17629
17630 func (future *ReplicationProtectionContainersCreateFuture) result(client ReplicationProtectionContainersClient) (pc ProtectionContainer, err error) {
17631 var done bool
17632 done, err = future.DoneWithContext(context.Background(), client)
17633 if err != nil {
17634 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersCreateFuture", "Result", future.Response(), "Polling failure")
17635 return
17636 }
17637 if !done {
17638 pc.Response.Response = future.Response()
17639 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainersCreateFuture")
17640 return
17641 }
17642 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17643 if pc.Response.Response, err = future.GetResult(sender); err == nil && pc.Response.Response.StatusCode != http.StatusNoContent {
17644 pc, err = client.CreateResponder(pc.Response.Response)
17645 if err != nil {
17646 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersCreateFuture", "Result", pc.Response.Response, "Failure responding to request")
17647 }
17648 }
17649 return
17650 }
17651
17652
17653
17654 type ReplicationProtectionContainersDeleteFuture struct {
17655 azure.FutureAPI
17656
17657
17658 Result func(ReplicationProtectionContainersClient) (autorest.Response, error)
17659 }
17660
17661
17662 func (future *ReplicationProtectionContainersDeleteFuture) UnmarshalJSON(body []byte) error {
17663 var azFuture azure.Future
17664 if err := json.Unmarshal(body, &azFuture); err != nil {
17665 return err
17666 }
17667 future.FutureAPI = &azFuture
17668 future.Result = future.result
17669 return nil
17670 }
17671
17672
17673 func (future *ReplicationProtectionContainersDeleteFuture) result(client ReplicationProtectionContainersClient) (ar autorest.Response, err error) {
17674 var done bool
17675 done, err = future.DoneWithContext(context.Background(), client)
17676 if err != nil {
17677 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersDeleteFuture", "Result", future.Response(), "Polling failure")
17678 return
17679 }
17680 if !done {
17681 ar.Response = future.Response()
17682 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainersDeleteFuture")
17683 return
17684 }
17685 ar.Response = future.Response()
17686 return
17687 }
17688
17689
17690
17691 type ReplicationProtectionContainersDiscoverProtectableItemFuture struct {
17692 azure.FutureAPI
17693
17694
17695 Result func(ReplicationProtectionContainersClient) (ProtectionContainer, error)
17696 }
17697
17698
17699 func (future *ReplicationProtectionContainersDiscoverProtectableItemFuture) UnmarshalJSON(body []byte) error {
17700 var azFuture azure.Future
17701 if err := json.Unmarshal(body, &azFuture); err != nil {
17702 return err
17703 }
17704 future.FutureAPI = &azFuture
17705 future.Result = future.result
17706 return nil
17707 }
17708
17709
17710 func (future *ReplicationProtectionContainersDiscoverProtectableItemFuture) result(client ReplicationProtectionContainersClient) (pc ProtectionContainer, err error) {
17711 var done bool
17712 done, err = future.DoneWithContext(context.Background(), client)
17713 if err != nil {
17714 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersDiscoverProtectableItemFuture", "Result", future.Response(), "Polling failure")
17715 return
17716 }
17717 if !done {
17718 pc.Response.Response = future.Response()
17719 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainersDiscoverProtectableItemFuture")
17720 return
17721 }
17722 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17723 if pc.Response.Response, err = future.GetResult(sender); err == nil && pc.Response.Response.StatusCode != http.StatusNoContent {
17724 pc, err = client.DiscoverProtectableItemResponder(pc.Response.Response)
17725 if err != nil {
17726 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersDiscoverProtectableItemFuture", "Result", pc.Response.Response, "Failure responding to request")
17727 }
17728 }
17729 return
17730 }
17731
17732
17733
17734 type ReplicationProtectionContainersSwitchProtectionFuture struct {
17735 azure.FutureAPI
17736
17737
17738 Result func(ReplicationProtectionContainersClient) (ProtectionContainer, error)
17739 }
17740
17741
17742 func (future *ReplicationProtectionContainersSwitchProtectionFuture) UnmarshalJSON(body []byte) error {
17743 var azFuture azure.Future
17744 if err := json.Unmarshal(body, &azFuture); err != nil {
17745 return err
17746 }
17747 future.FutureAPI = &azFuture
17748 future.Result = future.result
17749 return nil
17750 }
17751
17752
17753 func (future *ReplicationProtectionContainersSwitchProtectionFuture) result(client ReplicationProtectionContainersClient) (pc ProtectionContainer, err error) {
17754 var done bool
17755 done, err = future.DoneWithContext(context.Background(), client)
17756 if err != nil {
17757 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersSwitchProtectionFuture", "Result", future.Response(), "Polling failure")
17758 return
17759 }
17760 if !done {
17761 pc.Response.Response = future.Response()
17762 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainersSwitchProtectionFuture")
17763 return
17764 }
17765 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17766 if pc.Response.Response, err = future.GetResult(sender); err == nil && pc.Response.Response.StatusCode != http.StatusNoContent {
17767 pc, err = client.SwitchProtectionResponder(pc.Response.Response)
17768 if err != nil {
17769 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersSwitchProtectionFuture", "Result", pc.Response.Response, "Failure responding to request")
17770 }
17771 }
17772 return
17773 }
17774
17775
17776 type ReplicationProviderContainerUnmappingInput struct {
17777
17778 InstanceType *string `json:"instanceType,omitempty"`
17779 }
17780
17781
17782 type BasicReplicationProviderSpecificContainerCreationInput interface {
17783 AsA2AContainerCreationInput() (*A2AContainerCreationInput, bool)
17784 AsVMwareCbtContainerCreationInput() (*VMwareCbtContainerCreationInput, bool)
17785 AsReplicationProviderSpecificContainerCreationInput() (*ReplicationProviderSpecificContainerCreationInput, bool)
17786 }
17787
17788
17789 type ReplicationProviderSpecificContainerCreationInput struct {
17790
17791 InstanceType InstanceTypeBasicReplicationProviderSpecificContainerCreationInput `json:"instanceType,omitempty"`
17792 }
17793
17794 func unmarshalBasicReplicationProviderSpecificContainerCreationInput(body []byte) (BasicReplicationProviderSpecificContainerCreationInput, error) {
17795 var m map[string]interface{}
17796 err := json.Unmarshal(body, &m)
17797 if err != nil {
17798 return nil, err
17799 }
17800
17801 switch m["instanceType"] {
17802 case string(InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeA2A):
17803 var acci A2AContainerCreationInput
17804 err := json.Unmarshal(body, &acci)
17805 return acci, err
17806 case string(InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeVMwareCbt):
17807 var vmccci VMwareCbtContainerCreationInput
17808 err := json.Unmarshal(body, &vmccci)
17809 return vmccci, err
17810 default:
17811 var rpscci ReplicationProviderSpecificContainerCreationInput
17812 err := json.Unmarshal(body, &rpscci)
17813 return rpscci, err
17814 }
17815 }
17816 func unmarshalBasicReplicationProviderSpecificContainerCreationInputArray(body []byte) ([]BasicReplicationProviderSpecificContainerCreationInput, error) {
17817 var rawMessages []*json.RawMessage
17818 err := json.Unmarshal(body, &rawMessages)
17819 if err != nil {
17820 return nil, err
17821 }
17822
17823 rpscciArray := make([]BasicReplicationProviderSpecificContainerCreationInput, len(rawMessages))
17824
17825 for index, rawMessage := range rawMessages {
17826 rpscci, err := unmarshalBasicReplicationProviderSpecificContainerCreationInput(*rawMessage)
17827 if err != nil {
17828 return nil, err
17829 }
17830 rpscciArray[index] = rpscci
17831 }
17832 return rpscciArray, nil
17833 }
17834
17835
17836 func (rpscci ReplicationProviderSpecificContainerCreationInput) MarshalJSON() ([]byte, error) {
17837 rpscci.InstanceType = InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeReplicationProviderSpecificContainerCreationInput
17838 objectMap := make(map[string]interface{})
17839 if rpscci.InstanceType != "" {
17840 objectMap["instanceType"] = rpscci.InstanceType
17841 }
17842 return json.Marshal(objectMap)
17843 }
17844
17845
17846 func (rpscci ReplicationProviderSpecificContainerCreationInput) AsA2AContainerCreationInput() (*A2AContainerCreationInput, bool) {
17847 return nil, false
17848 }
17849
17850
17851 func (rpscci ReplicationProviderSpecificContainerCreationInput) AsVMwareCbtContainerCreationInput() (*VMwareCbtContainerCreationInput, bool) {
17852 return nil, false
17853 }
17854
17855
17856 func (rpscci ReplicationProviderSpecificContainerCreationInput) AsReplicationProviderSpecificContainerCreationInput() (*ReplicationProviderSpecificContainerCreationInput, bool) {
17857 return &rpscci, true
17858 }
17859
17860
17861 func (rpscci ReplicationProviderSpecificContainerCreationInput) AsBasicReplicationProviderSpecificContainerCreationInput() (BasicReplicationProviderSpecificContainerCreationInput, bool) {
17862 return &rpscci, true
17863 }
17864
17865
17866 type BasicReplicationProviderSpecificContainerMappingInput interface {
17867 AsA2AContainerMappingInput() (*A2AContainerMappingInput, bool)
17868 AsVMwareCbtContainerMappingInput() (*VMwareCbtContainerMappingInput, bool)
17869 AsReplicationProviderSpecificContainerMappingInput() (*ReplicationProviderSpecificContainerMappingInput, bool)
17870 }
17871
17872
17873 type ReplicationProviderSpecificContainerMappingInput struct {
17874
17875 InstanceType InstanceTypeBasicReplicationProviderSpecificContainerMappingInput `json:"instanceType,omitempty"`
17876 }
17877
17878 func unmarshalBasicReplicationProviderSpecificContainerMappingInput(body []byte) (BasicReplicationProviderSpecificContainerMappingInput, error) {
17879 var m map[string]interface{}
17880 err := json.Unmarshal(body, &m)
17881 if err != nil {
17882 return nil, err
17883 }
17884
17885 switch m["instanceType"] {
17886 case string(InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeA2A):
17887 var acmi A2AContainerMappingInput
17888 err := json.Unmarshal(body, &acmi)
17889 return acmi, err
17890 case string(InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeVMwareCbt):
17891 var vmccmi VMwareCbtContainerMappingInput
17892 err := json.Unmarshal(body, &vmccmi)
17893 return vmccmi, err
17894 default:
17895 var rpscmi ReplicationProviderSpecificContainerMappingInput
17896 err := json.Unmarshal(body, &rpscmi)
17897 return rpscmi, err
17898 }
17899 }
17900 func unmarshalBasicReplicationProviderSpecificContainerMappingInputArray(body []byte) ([]BasicReplicationProviderSpecificContainerMappingInput, error) {
17901 var rawMessages []*json.RawMessage
17902 err := json.Unmarshal(body, &rawMessages)
17903 if err != nil {
17904 return nil, err
17905 }
17906
17907 rpscmiArray := make([]BasicReplicationProviderSpecificContainerMappingInput, len(rawMessages))
17908
17909 for index, rawMessage := range rawMessages {
17910 rpscmi, err := unmarshalBasicReplicationProviderSpecificContainerMappingInput(*rawMessage)
17911 if err != nil {
17912 return nil, err
17913 }
17914 rpscmiArray[index] = rpscmi
17915 }
17916 return rpscmiArray, nil
17917 }
17918
17919
17920 func (rpscmi ReplicationProviderSpecificContainerMappingInput) MarshalJSON() ([]byte, error) {
17921 rpscmi.InstanceType = InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeReplicationProviderSpecificContainerMappingInput
17922 objectMap := make(map[string]interface{})
17923 if rpscmi.InstanceType != "" {
17924 objectMap["instanceType"] = rpscmi.InstanceType
17925 }
17926 return json.Marshal(objectMap)
17927 }
17928
17929
17930 func (rpscmi ReplicationProviderSpecificContainerMappingInput) AsA2AContainerMappingInput() (*A2AContainerMappingInput, bool) {
17931 return nil, false
17932 }
17933
17934
17935 func (rpscmi ReplicationProviderSpecificContainerMappingInput) AsVMwareCbtContainerMappingInput() (*VMwareCbtContainerMappingInput, bool) {
17936 return nil, false
17937 }
17938
17939
17940 func (rpscmi ReplicationProviderSpecificContainerMappingInput) AsReplicationProviderSpecificContainerMappingInput() (*ReplicationProviderSpecificContainerMappingInput, bool) {
17941 return &rpscmi, true
17942 }
17943
17944
17945 func (rpscmi ReplicationProviderSpecificContainerMappingInput) AsBasicReplicationProviderSpecificContainerMappingInput() (BasicReplicationProviderSpecificContainerMappingInput, bool) {
17946 return &rpscmi, true
17947 }
17948
17949
17950 type BasicReplicationProviderSpecificSettings interface {
17951 AsA2AReplicationDetails() (*A2AReplicationDetails, bool)
17952 AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool)
17953 AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool)
17954 AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool)
17955 AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool)
17956 AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool)
17957 AsInMageReplicationDetails() (*InMageReplicationDetails, bool)
17958 AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool)
17959 }
17960
17961
17962 type ReplicationProviderSpecificSettings struct {
17963
17964 InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"`
17965 }
17966
17967 func unmarshalBasicReplicationProviderSpecificSettings(body []byte) (BasicReplicationProviderSpecificSettings, error) {
17968 var m map[string]interface{}
17969 err := json.Unmarshal(body, &m)
17970 if err != nil {
17971 return nil, err
17972 }
17973
17974 switch m["instanceType"] {
17975 case string(InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeA2A):
17976 var ard A2AReplicationDetails
17977 err := json.Unmarshal(body, &ard)
17978 return ard, err
17979 case string(InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaAzure):
17980 var hvrard HyperVReplicaAzureReplicationDetails
17981 err := json.Unmarshal(body, &hvrard)
17982 return hvrard, err
17983 case string(InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaBaseReplicationDetails):
17984 var hvrbrd HyperVReplicaBaseReplicationDetails
17985 err := json.Unmarshal(body, &hvrbrd)
17986 return hvrbrd, err
17987 case string(InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012R2):
17988 var hvrbrd HyperVReplicaBlueReplicationDetails
17989 err := json.Unmarshal(body, &hvrbrd)
17990 return hvrbrd, err
17991 case string(InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012):
17992 var hvrrd HyperVReplicaReplicationDetails
17993 err := json.Unmarshal(body, &hvrrd)
17994 return hvrrd, err
17995 case string(InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMageAzureV2):
17996 var imavrd InMageAzureV2ReplicationDetails
17997 err := json.Unmarshal(body, &imavrd)
17998 return imavrd, err
17999 case string(InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMage):
18000 var imrd InMageReplicationDetails
18001 err := json.Unmarshal(body, &imrd)
18002 return imrd, err
18003 default:
18004 var rpss ReplicationProviderSpecificSettings
18005 err := json.Unmarshal(body, &rpss)
18006 return rpss, err
18007 }
18008 }
18009 func unmarshalBasicReplicationProviderSpecificSettingsArray(body []byte) ([]BasicReplicationProviderSpecificSettings, error) {
18010 var rawMessages []*json.RawMessage
18011 err := json.Unmarshal(body, &rawMessages)
18012 if err != nil {
18013 return nil, err
18014 }
18015
18016 rpssArray := make([]BasicReplicationProviderSpecificSettings, len(rawMessages))
18017
18018 for index, rawMessage := range rawMessages {
18019 rpss, err := unmarshalBasicReplicationProviderSpecificSettings(*rawMessage)
18020 if err != nil {
18021 return nil, err
18022 }
18023 rpssArray[index] = rpss
18024 }
18025 return rpssArray, nil
18026 }
18027
18028
18029 func (rpss ReplicationProviderSpecificSettings) MarshalJSON() ([]byte, error) {
18030 rpss.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeReplicationProviderSpecificSettings
18031 objectMap := make(map[string]interface{})
18032 if rpss.InstanceType != "" {
18033 objectMap["instanceType"] = rpss.InstanceType
18034 }
18035 return json.Marshal(objectMap)
18036 }
18037
18038
18039 func (rpss ReplicationProviderSpecificSettings) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) {
18040 return nil, false
18041 }
18042
18043
18044 func (rpss ReplicationProviderSpecificSettings) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) {
18045 return nil, false
18046 }
18047
18048
18049 func (rpss ReplicationProviderSpecificSettings) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) {
18050 return nil, false
18051 }
18052
18053
18054 func (rpss ReplicationProviderSpecificSettings) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) {
18055 return nil, false
18056 }
18057
18058
18059 func (rpss ReplicationProviderSpecificSettings) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) {
18060 return nil, false
18061 }
18062
18063
18064 func (rpss ReplicationProviderSpecificSettings) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) {
18065 return nil, false
18066 }
18067
18068
18069 func (rpss ReplicationProviderSpecificSettings) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) {
18070 return nil, false
18071 }
18072
18073
18074 func (rpss ReplicationProviderSpecificSettings) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) {
18075 return &rpss, true
18076 }
18077
18078
18079 func (rpss ReplicationProviderSpecificSettings) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) {
18080 return &rpss, true
18081 }
18082
18083
18084 type BasicReplicationProviderSpecificUpdateContainerMappingInput interface {
18085 AsA2AUpdateContainerMappingInput() (*A2AUpdateContainerMappingInput, bool)
18086 AsReplicationProviderSpecificUpdateContainerMappingInput() (*ReplicationProviderSpecificUpdateContainerMappingInput, bool)
18087 }
18088
18089
18090
18091 type ReplicationProviderSpecificUpdateContainerMappingInput struct {
18092
18093 InstanceType InstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingInput `json:"instanceType,omitempty"`
18094 }
18095
18096 func unmarshalBasicReplicationProviderSpecificUpdateContainerMappingInput(body []byte) (BasicReplicationProviderSpecificUpdateContainerMappingInput, error) {
18097 var m map[string]interface{}
18098 err := json.Unmarshal(body, &m)
18099 if err != nil {
18100 return nil, err
18101 }
18102
18103 switch m["instanceType"] {
18104 case string(InstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingInputInstanceTypeA2A):
18105 var aucmi A2AUpdateContainerMappingInput
18106 err := json.Unmarshal(body, &aucmi)
18107 return aucmi, err
18108 default:
18109 var rpsucmi ReplicationProviderSpecificUpdateContainerMappingInput
18110 err := json.Unmarshal(body, &rpsucmi)
18111 return rpsucmi, err
18112 }
18113 }
18114 func unmarshalBasicReplicationProviderSpecificUpdateContainerMappingInputArray(body []byte) ([]BasicReplicationProviderSpecificUpdateContainerMappingInput, error) {
18115 var rawMessages []*json.RawMessage
18116 err := json.Unmarshal(body, &rawMessages)
18117 if err != nil {
18118 return nil, err
18119 }
18120
18121 rpsucmiArray := make([]BasicReplicationProviderSpecificUpdateContainerMappingInput, len(rawMessages))
18122
18123 for index, rawMessage := range rawMessages {
18124 rpsucmi, err := unmarshalBasicReplicationProviderSpecificUpdateContainerMappingInput(*rawMessage)
18125 if err != nil {
18126 return nil, err
18127 }
18128 rpsucmiArray[index] = rpsucmi
18129 }
18130 return rpsucmiArray, nil
18131 }
18132
18133
18134 func (rpsucmi ReplicationProviderSpecificUpdateContainerMappingInput) MarshalJSON() ([]byte, error) {
18135 rpsucmi.InstanceType = InstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingInputInstanceTypeReplicationProviderSpecificUpdateContainerMappingInput
18136 objectMap := make(map[string]interface{})
18137 if rpsucmi.InstanceType != "" {
18138 objectMap["instanceType"] = rpsucmi.InstanceType
18139 }
18140 return json.Marshal(objectMap)
18141 }
18142
18143
18144 func (rpsucmi ReplicationProviderSpecificUpdateContainerMappingInput) AsA2AUpdateContainerMappingInput() (*A2AUpdateContainerMappingInput, bool) {
18145 return nil, false
18146 }
18147
18148
18149 func (rpsucmi ReplicationProviderSpecificUpdateContainerMappingInput) AsReplicationProviderSpecificUpdateContainerMappingInput() (*ReplicationProviderSpecificUpdateContainerMappingInput, bool) {
18150 return &rpsucmi, true
18151 }
18152
18153
18154 func (rpsucmi ReplicationProviderSpecificUpdateContainerMappingInput) AsBasicReplicationProviderSpecificUpdateContainerMappingInput() (BasicReplicationProviderSpecificUpdateContainerMappingInput, bool) {
18155 return &rpsucmi, true
18156 }
18157
18158
18159
18160 type ReplicationRecoveryPlansCreateFuture struct {
18161 azure.FutureAPI
18162
18163
18164 Result func(ReplicationRecoveryPlansClient) (RecoveryPlan, error)
18165 }
18166
18167
18168 func (future *ReplicationRecoveryPlansCreateFuture) UnmarshalJSON(body []byte) error {
18169 var azFuture azure.Future
18170 if err := json.Unmarshal(body, &azFuture); err != nil {
18171 return err
18172 }
18173 future.FutureAPI = &azFuture
18174 future.Result = future.result
18175 return nil
18176 }
18177
18178
18179 func (future *ReplicationRecoveryPlansCreateFuture) result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
18180 var done bool
18181 done, err = future.DoneWithContext(context.Background(), client)
18182 if err != nil {
18183 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansCreateFuture", "Result", future.Response(), "Polling failure")
18184 return
18185 }
18186 if !done {
18187 rp.Response.Response = future.Response()
18188 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansCreateFuture")
18189 return
18190 }
18191 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18192 if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent {
18193 rp, err = client.CreateResponder(rp.Response.Response)
18194 if err != nil {
18195 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansCreateFuture", "Result", rp.Response.Response, "Failure responding to request")
18196 }
18197 }
18198 return
18199 }
18200
18201
18202
18203 type ReplicationRecoveryPlansDeleteFuture struct {
18204 azure.FutureAPI
18205
18206
18207 Result func(ReplicationRecoveryPlansClient) (autorest.Response, error)
18208 }
18209
18210
18211 func (future *ReplicationRecoveryPlansDeleteFuture) UnmarshalJSON(body []byte) error {
18212 var azFuture azure.Future
18213 if err := json.Unmarshal(body, &azFuture); err != nil {
18214 return err
18215 }
18216 future.FutureAPI = &azFuture
18217 future.Result = future.result
18218 return nil
18219 }
18220
18221
18222 func (future *ReplicationRecoveryPlansDeleteFuture) result(client ReplicationRecoveryPlansClient) (ar autorest.Response, err error) {
18223 var done bool
18224 done, err = future.DoneWithContext(context.Background(), client)
18225 if err != nil {
18226 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansDeleteFuture", "Result", future.Response(), "Polling failure")
18227 return
18228 }
18229 if !done {
18230 ar.Response = future.Response()
18231 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansDeleteFuture")
18232 return
18233 }
18234 ar.Response = future.Response()
18235 return
18236 }
18237
18238
18239
18240 type ReplicationRecoveryPlansFailoverCommitFuture struct {
18241 azure.FutureAPI
18242
18243
18244 Result func(ReplicationRecoveryPlansClient) (RecoveryPlan, error)
18245 }
18246
18247
18248 func (future *ReplicationRecoveryPlansFailoverCommitFuture) UnmarshalJSON(body []byte) error {
18249 var azFuture azure.Future
18250 if err := json.Unmarshal(body, &azFuture); err != nil {
18251 return err
18252 }
18253 future.FutureAPI = &azFuture
18254 future.Result = future.result
18255 return nil
18256 }
18257
18258
18259 func (future *ReplicationRecoveryPlansFailoverCommitFuture) result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
18260 var done bool
18261 done, err = future.DoneWithContext(context.Background(), client)
18262 if err != nil {
18263 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansFailoverCommitFuture", "Result", future.Response(), "Polling failure")
18264 return
18265 }
18266 if !done {
18267 rp.Response.Response = future.Response()
18268 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansFailoverCommitFuture")
18269 return
18270 }
18271 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18272 if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent {
18273 rp, err = client.FailoverCommitResponder(rp.Response.Response)
18274 if err != nil {
18275 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansFailoverCommitFuture", "Result", rp.Response.Response, "Failure responding to request")
18276 }
18277 }
18278 return
18279 }
18280
18281
18282
18283 type ReplicationRecoveryPlansPlannedFailoverFuture struct {
18284 azure.FutureAPI
18285
18286
18287 Result func(ReplicationRecoveryPlansClient) (RecoveryPlan, error)
18288 }
18289
18290
18291 func (future *ReplicationRecoveryPlansPlannedFailoverFuture) UnmarshalJSON(body []byte) error {
18292 var azFuture azure.Future
18293 if err := json.Unmarshal(body, &azFuture); err != nil {
18294 return err
18295 }
18296 future.FutureAPI = &azFuture
18297 future.Result = future.result
18298 return nil
18299 }
18300
18301
18302 func (future *ReplicationRecoveryPlansPlannedFailoverFuture) result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
18303 var done bool
18304 done, err = future.DoneWithContext(context.Background(), client)
18305 if err != nil {
18306 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansPlannedFailoverFuture", "Result", future.Response(), "Polling failure")
18307 return
18308 }
18309 if !done {
18310 rp.Response.Response = future.Response()
18311 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansPlannedFailoverFuture")
18312 return
18313 }
18314 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18315 if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent {
18316 rp, err = client.PlannedFailoverResponder(rp.Response.Response)
18317 if err != nil {
18318 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansPlannedFailoverFuture", "Result", rp.Response.Response, "Failure responding to request")
18319 }
18320 }
18321 return
18322 }
18323
18324
18325
18326 type ReplicationRecoveryPlansReprotectFuture struct {
18327 azure.FutureAPI
18328
18329
18330 Result func(ReplicationRecoveryPlansClient) (RecoveryPlan, error)
18331 }
18332
18333
18334 func (future *ReplicationRecoveryPlansReprotectFuture) UnmarshalJSON(body []byte) error {
18335 var azFuture azure.Future
18336 if err := json.Unmarshal(body, &azFuture); err != nil {
18337 return err
18338 }
18339 future.FutureAPI = &azFuture
18340 future.Result = future.result
18341 return nil
18342 }
18343
18344
18345 func (future *ReplicationRecoveryPlansReprotectFuture) result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
18346 var done bool
18347 done, err = future.DoneWithContext(context.Background(), client)
18348 if err != nil {
18349 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansReprotectFuture", "Result", future.Response(), "Polling failure")
18350 return
18351 }
18352 if !done {
18353 rp.Response.Response = future.Response()
18354 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansReprotectFuture")
18355 return
18356 }
18357 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18358 if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent {
18359 rp, err = client.ReprotectResponder(rp.Response.Response)
18360 if err != nil {
18361 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansReprotectFuture", "Result", rp.Response.Response, "Failure responding to request")
18362 }
18363 }
18364 return
18365 }
18366
18367
18368
18369 type ReplicationRecoveryPlansTestFailoverCleanupFuture struct {
18370 azure.FutureAPI
18371
18372
18373 Result func(ReplicationRecoveryPlansClient) (RecoveryPlan, error)
18374 }
18375
18376
18377 func (future *ReplicationRecoveryPlansTestFailoverCleanupFuture) UnmarshalJSON(body []byte) error {
18378 var azFuture azure.Future
18379 if err := json.Unmarshal(body, &azFuture); err != nil {
18380 return err
18381 }
18382 future.FutureAPI = &azFuture
18383 future.Result = future.result
18384 return nil
18385 }
18386
18387
18388 func (future *ReplicationRecoveryPlansTestFailoverCleanupFuture) result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
18389 var done bool
18390 done, err = future.DoneWithContext(context.Background(), client)
18391 if err != nil {
18392 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansTestFailoverCleanupFuture", "Result", future.Response(), "Polling failure")
18393 return
18394 }
18395 if !done {
18396 rp.Response.Response = future.Response()
18397 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansTestFailoverCleanupFuture")
18398 return
18399 }
18400 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18401 if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent {
18402 rp, err = client.TestFailoverCleanupResponder(rp.Response.Response)
18403 if err != nil {
18404 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansTestFailoverCleanupFuture", "Result", rp.Response.Response, "Failure responding to request")
18405 }
18406 }
18407 return
18408 }
18409
18410
18411
18412 type ReplicationRecoveryPlansTestFailoverFuture struct {
18413 azure.FutureAPI
18414
18415
18416 Result func(ReplicationRecoveryPlansClient) (RecoveryPlan, error)
18417 }
18418
18419
18420 func (future *ReplicationRecoveryPlansTestFailoverFuture) UnmarshalJSON(body []byte) error {
18421 var azFuture azure.Future
18422 if err := json.Unmarshal(body, &azFuture); err != nil {
18423 return err
18424 }
18425 future.FutureAPI = &azFuture
18426 future.Result = future.result
18427 return nil
18428 }
18429
18430
18431 func (future *ReplicationRecoveryPlansTestFailoverFuture) result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
18432 var done bool
18433 done, err = future.DoneWithContext(context.Background(), client)
18434 if err != nil {
18435 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansTestFailoverFuture", "Result", future.Response(), "Polling failure")
18436 return
18437 }
18438 if !done {
18439 rp.Response.Response = future.Response()
18440 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansTestFailoverFuture")
18441 return
18442 }
18443 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18444 if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent {
18445 rp, err = client.TestFailoverResponder(rp.Response.Response)
18446 if err != nil {
18447 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansTestFailoverFuture", "Result", rp.Response.Response, "Failure responding to request")
18448 }
18449 }
18450 return
18451 }
18452
18453
18454
18455 type ReplicationRecoveryPlansUnplannedFailoverFuture struct {
18456 azure.FutureAPI
18457
18458
18459 Result func(ReplicationRecoveryPlansClient) (RecoveryPlan, error)
18460 }
18461
18462
18463 func (future *ReplicationRecoveryPlansUnplannedFailoverFuture) UnmarshalJSON(body []byte) error {
18464 var azFuture azure.Future
18465 if err := json.Unmarshal(body, &azFuture); err != nil {
18466 return err
18467 }
18468 future.FutureAPI = &azFuture
18469 future.Result = future.result
18470 return nil
18471 }
18472
18473
18474 func (future *ReplicationRecoveryPlansUnplannedFailoverFuture) result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
18475 var done bool
18476 done, err = future.DoneWithContext(context.Background(), client)
18477 if err != nil {
18478 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansUnplannedFailoverFuture", "Result", future.Response(), "Polling failure")
18479 return
18480 }
18481 if !done {
18482 rp.Response.Response = future.Response()
18483 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansUnplannedFailoverFuture")
18484 return
18485 }
18486 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18487 if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent {
18488 rp, err = client.UnplannedFailoverResponder(rp.Response.Response)
18489 if err != nil {
18490 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansUnplannedFailoverFuture", "Result", rp.Response.Response, "Failure responding to request")
18491 }
18492 }
18493 return
18494 }
18495
18496
18497
18498 type ReplicationRecoveryPlansUpdateFuture struct {
18499 azure.FutureAPI
18500
18501
18502 Result func(ReplicationRecoveryPlansClient) (RecoveryPlan, error)
18503 }
18504
18505
18506 func (future *ReplicationRecoveryPlansUpdateFuture) UnmarshalJSON(body []byte) error {
18507 var azFuture azure.Future
18508 if err := json.Unmarshal(body, &azFuture); err != nil {
18509 return err
18510 }
18511 future.FutureAPI = &azFuture
18512 future.Result = future.result
18513 return nil
18514 }
18515
18516
18517 func (future *ReplicationRecoveryPlansUpdateFuture) result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
18518 var done bool
18519 done, err = future.DoneWithContext(context.Background(), client)
18520 if err != nil {
18521 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansUpdateFuture", "Result", future.Response(), "Polling failure")
18522 return
18523 }
18524 if !done {
18525 rp.Response.Response = future.Response()
18526 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansUpdateFuture")
18527 return
18528 }
18529 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18530 if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent {
18531 rp, err = client.UpdateResponder(rp.Response.Response)
18532 if err != nil {
18533 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansUpdateFuture", "Result", rp.Response.Response, "Failure responding to request")
18534 }
18535 }
18536 return
18537 }
18538
18539
18540
18541 type ReplicationRecoveryServicesProvidersCreateFuture struct {
18542 azure.FutureAPI
18543
18544
18545 Result func(ReplicationRecoveryServicesProvidersClient) (RecoveryServicesProvider, error)
18546 }
18547
18548
18549 func (future *ReplicationRecoveryServicesProvidersCreateFuture) UnmarshalJSON(body []byte) error {
18550 var azFuture azure.Future
18551 if err := json.Unmarshal(body, &azFuture); err != nil {
18552 return err
18553 }
18554 future.FutureAPI = &azFuture
18555 future.Result = future.result
18556 return nil
18557 }
18558
18559
18560 func (future *ReplicationRecoveryServicesProvidersCreateFuture) result(client ReplicationRecoveryServicesProvidersClient) (rsp RecoveryServicesProvider, err error) {
18561 var done bool
18562 done, err = future.DoneWithContext(context.Background(), client)
18563 if err != nil {
18564 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersCreateFuture", "Result", future.Response(), "Polling failure")
18565 return
18566 }
18567 if !done {
18568 rsp.Response.Response = future.Response()
18569 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryServicesProvidersCreateFuture")
18570 return
18571 }
18572 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18573 if rsp.Response.Response, err = future.GetResult(sender); err == nil && rsp.Response.Response.StatusCode != http.StatusNoContent {
18574 rsp, err = client.CreateResponder(rsp.Response.Response)
18575 if err != nil {
18576 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersCreateFuture", "Result", rsp.Response.Response, "Failure responding to request")
18577 }
18578 }
18579 return
18580 }
18581
18582
18583
18584 type ReplicationRecoveryServicesProvidersDeleteFuture struct {
18585 azure.FutureAPI
18586
18587
18588 Result func(ReplicationRecoveryServicesProvidersClient) (autorest.Response, error)
18589 }
18590
18591
18592 func (future *ReplicationRecoveryServicesProvidersDeleteFuture) UnmarshalJSON(body []byte) error {
18593 var azFuture azure.Future
18594 if err := json.Unmarshal(body, &azFuture); err != nil {
18595 return err
18596 }
18597 future.FutureAPI = &azFuture
18598 future.Result = future.result
18599 return nil
18600 }
18601
18602
18603 func (future *ReplicationRecoveryServicesProvidersDeleteFuture) result(client ReplicationRecoveryServicesProvidersClient) (ar autorest.Response, err error) {
18604 var done bool
18605 done, err = future.DoneWithContext(context.Background(), client)
18606 if err != nil {
18607 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersDeleteFuture", "Result", future.Response(), "Polling failure")
18608 return
18609 }
18610 if !done {
18611 ar.Response = future.Response()
18612 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryServicesProvidersDeleteFuture")
18613 return
18614 }
18615 ar.Response = future.Response()
18616 return
18617 }
18618
18619
18620
18621 type ReplicationRecoveryServicesProvidersPurgeFuture struct {
18622 azure.FutureAPI
18623
18624
18625 Result func(ReplicationRecoveryServicesProvidersClient) (autorest.Response, error)
18626 }
18627
18628
18629 func (future *ReplicationRecoveryServicesProvidersPurgeFuture) UnmarshalJSON(body []byte) error {
18630 var azFuture azure.Future
18631 if err := json.Unmarshal(body, &azFuture); err != nil {
18632 return err
18633 }
18634 future.FutureAPI = &azFuture
18635 future.Result = future.result
18636 return nil
18637 }
18638
18639
18640 func (future *ReplicationRecoveryServicesProvidersPurgeFuture) result(client ReplicationRecoveryServicesProvidersClient) (ar autorest.Response, err error) {
18641 var done bool
18642 done, err = future.DoneWithContext(context.Background(), client)
18643 if err != nil {
18644 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersPurgeFuture", "Result", future.Response(), "Polling failure")
18645 return
18646 }
18647 if !done {
18648 ar.Response = future.Response()
18649 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryServicesProvidersPurgeFuture")
18650 return
18651 }
18652 ar.Response = future.Response()
18653 return
18654 }
18655
18656
18657
18658 type ReplicationRecoveryServicesProvidersRefreshProviderFuture struct {
18659 azure.FutureAPI
18660
18661
18662 Result func(ReplicationRecoveryServicesProvidersClient) (RecoveryServicesProvider, error)
18663 }
18664
18665
18666 func (future *ReplicationRecoveryServicesProvidersRefreshProviderFuture) UnmarshalJSON(body []byte) error {
18667 var azFuture azure.Future
18668 if err := json.Unmarshal(body, &azFuture); err != nil {
18669 return err
18670 }
18671 future.FutureAPI = &azFuture
18672 future.Result = future.result
18673 return nil
18674 }
18675
18676
18677 func (future *ReplicationRecoveryServicesProvidersRefreshProviderFuture) result(client ReplicationRecoveryServicesProvidersClient) (rsp RecoveryServicesProvider, err error) {
18678 var done bool
18679 done, err = future.DoneWithContext(context.Background(), client)
18680 if err != nil {
18681 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersRefreshProviderFuture", "Result", future.Response(), "Polling failure")
18682 return
18683 }
18684 if !done {
18685 rsp.Response.Response = future.Response()
18686 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryServicesProvidersRefreshProviderFuture")
18687 return
18688 }
18689 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18690 if rsp.Response.Response, err = future.GetResult(sender); err == nil && rsp.Response.Response.StatusCode != http.StatusNoContent {
18691 rsp, err = client.RefreshProviderResponder(rsp.Response.Response)
18692 if err != nil {
18693 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersRefreshProviderFuture", "Result", rsp.Response.Response, "Failure responding to request")
18694 }
18695 }
18696 return
18697 }
18698
18699
18700
18701 type ReplicationStorageClassificationMappingsCreateFuture struct {
18702 azure.FutureAPI
18703
18704
18705 Result func(ReplicationStorageClassificationMappingsClient) (StorageClassificationMapping, error)
18706 }
18707
18708
18709 func (future *ReplicationStorageClassificationMappingsCreateFuture) UnmarshalJSON(body []byte) error {
18710 var azFuture azure.Future
18711 if err := json.Unmarshal(body, &azFuture); err != nil {
18712 return err
18713 }
18714 future.FutureAPI = &azFuture
18715 future.Result = future.result
18716 return nil
18717 }
18718
18719
18720 func (future *ReplicationStorageClassificationMappingsCreateFuture) result(client ReplicationStorageClassificationMappingsClient) (scm StorageClassificationMapping, err error) {
18721 var done bool
18722 done, err = future.DoneWithContext(context.Background(), client)
18723 if err != nil {
18724 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsCreateFuture", "Result", future.Response(), "Polling failure")
18725 return
18726 }
18727 if !done {
18728 scm.Response.Response = future.Response()
18729 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationStorageClassificationMappingsCreateFuture")
18730 return
18731 }
18732 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18733 if scm.Response.Response, err = future.GetResult(sender); err == nil && scm.Response.Response.StatusCode != http.StatusNoContent {
18734 scm, err = client.CreateResponder(scm.Response.Response)
18735 if err != nil {
18736 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsCreateFuture", "Result", scm.Response.Response, "Failure responding to request")
18737 }
18738 }
18739 return
18740 }
18741
18742
18743
18744 type ReplicationStorageClassificationMappingsDeleteFuture struct {
18745 azure.FutureAPI
18746
18747
18748 Result func(ReplicationStorageClassificationMappingsClient) (autorest.Response, error)
18749 }
18750
18751
18752 func (future *ReplicationStorageClassificationMappingsDeleteFuture) UnmarshalJSON(body []byte) error {
18753 var azFuture azure.Future
18754 if err := json.Unmarshal(body, &azFuture); err != nil {
18755 return err
18756 }
18757 future.FutureAPI = &azFuture
18758 future.Result = future.result
18759 return nil
18760 }
18761
18762
18763 func (future *ReplicationStorageClassificationMappingsDeleteFuture) result(client ReplicationStorageClassificationMappingsClient) (ar autorest.Response, err error) {
18764 var done bool
18765 done, err = future.DoneWithContext(context.Background(), client)
18766 if err != nil {
18767 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsDeleteFuture", "Result", future.Response(), "Polling failure")
18768 return
18769 }
18770 if !done {
18771 ar.Response = future.Response()
18772 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationStorageClassificationMappingsDeleteFuture")
18773 return
18774 }
18775 ar.Response = future.Response()
18776 return
18777 }
18778
18779
18780
18781 type ReplicationVaultHealthRefreshFuture struct {
18782 azure.FutureAPI
18783
18784
18785 Result func(ReplicationVaultHealthClient) (VaultHealthDetails, error)
18786 }
18787
18788
18789 func (future *ReplicationVaultHealthRefreshFuture) UnmarshalJSON(body []byte) error {
18790 var azFuture azure.Future
18791 if err := json.Unmarshal(body, &azFuture); err != nil {
18792 return err
18793 }
18794 future.FutureAPI = &azFuture
18795 future.Result = future.result
18796 return nil
18797 }
18798
18799
18800 func (future *ReplicationVaultHealthRefreshFuture) result(client ReplicationVaultHealthClient) (vhd VaultHealthDetails, err error) {
18801 var done bool
18802 done, err = future.DoneWithContext(context.Background(), client)
18803 if err != nil {
18804 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationVaultHealthRefreshFuture", "Result", future.Response(), "Polling failure")
18805 return
18806 }
18807 if !done {
18808 vhd.Response.Response = future.Response()
18809 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationVaultHealthRefreshFuture")
18810 return
18811 }
18812 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18813 if vhd.Response.Response, err = future.GetResult(sender); err == nil && vhd.Response.Response.StatusCode != http.StatusNoContent {
18814 vhd, err = client.RefreshResponder(vhd.Response.Response)
18815 if err != nil {
18816 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationVaultHealthRefreshFuture", "Result", vhd.Response.Response, "Failure responding to request")
18817 }
18818 }
18819 return
18820 }
18821
18822
18823
18824 type ReplicationvCentersCreateFuture struct {
18825 azure.FutureAPI
18826
18827
18828 Result func(ReplicationvCentersClient) (VCenter, error)
18829 }
18830
18831
18832 func (future *ReplicationvCentersCreateFuture) UnmarshalJSON(body []byte) error {
18833 var azFuture azure.Future
18834 if err := json.Unmarshal(body, &azFuture); err != nil {
18835 return err
18836 }
18837 future.FutureAPI = &azFuture
18838 future.Result = future.result
18839 return nil
18840 }
18841
18842
18843 func (future *ReplicationvCentersCreateFuture) result(client ReplicationvCentersClient) (vc VCenter, err error) {
18844 var done bool
18845 done, err = future.DoneWithContext(context.Background(), client)
18846 if err != nil {
18847 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersCreateFuture", "Result", future.Response(), "Polling failure")
18848 return
18849 }
18850 if !done {
18851 vc.Response.Response = future.Response()
18852 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationvCentersCreateFuture")
18853 return
18854 }
18855 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18856 if vc.Response.Response, err = future.GetResult(sender); err == nil && vc.Response.Response.StatusCode != http.StatusNoContent {
18857 vc, err = client.CreateResponder(vc.Response.Response)
18858 if err != nil {
18859 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersCreateFuture", "Result", vc.Response.Response, "Failure responding to request")
18860 }
18861 }
18862 return
18863 }
18864
18865
18866
18867 type ReplicationvCentersDeleteFuture struct {
18868 azure.FutureAPI
18869
18870
18871 Result func(ReplicationvCentersClient) (autorest.Response, error)
18872 }
18873
18874
18875 func (future *ReplicationvCentersDeleteFuture) UnmarshalJSON(body []byte) error {
18876 var azFuture azure.Future
18877 if err := json.Unmarshal(body, &azFuture); err != nil {
18878 return err
18879 }
18880 future.FutureAPI = &azFuture
18881 future.Result = future.result
18882 return nil
18883 }
18884
18885
18886 func (future *ReplicationvCentersDeleteFuture) result(client ReplicationvCentersClient) (ar autorest.Response, err error) {
18887 var done bool
18888 done, err = future.DoneWithContext(context.Background(), client)
18889 if err != nil {
18890 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersDeleteFuture", "Result", future.Response(), "Polling failure")
18891 return
18892 }
18893 if !done {
18894 ar.Response = future.Response()
18895 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationvCentersDeleteFuture")
18896 return
18897 }
18898 ar.Response = future.Response()
18899 return
18900 }
18901
18902
18903
18904 type ReplicationvCentersUpdateFuture struct {
18905 azure.FutureAPI
18906
18907
18908 Result func(ReplicationvCentersClient) (VCenter, error)
18909 }
18910
18911
18912 func (future *ReplicationvCentersUpdateFuture) UnmarshalJSON(body []byte) error {
18913 var azFuture azure.Future
18914 if err := json.Unmarshal(body, &azFuture); err != nil {
18915 return err
18916 }
18917 future.FutureAPI = &azFuture
18918 future.Result = future.result
18919 return nil
18920 }
18921
18922
18923 func (future *ReplicationvCentersUpdateFuture) result(client ReplicationvCentersClient) (vc VCenter, err error) {
18924 var done bool
18925 done, err = future.DoneWithContext(context.Background(), client)
18926 if err != nil {
18927 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersUpdateFuture", "Result", future.Response(), "Polling failure")
18928 return
18929 }
18930 if !done {
18931 vc.Response.Response = future.Response()
18932 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationvCentersUpdateFuture")
18933 return
18934 }
18935 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18936 if vc.Response.Response, err = future.GetResult(sender); err == nil && vc.Response.Response.StatusCode != http.StatusNoContent {
18937 vc, err = client.UpdateResponder(vc.Response.Response)
18938 if err != nil {
18939 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersUpdateFuture", "Result", vc.Response.Response, "Failure responding to request")
18940 }
18941 }
18942 return
18943 }
18944
18945
18946 type Resource struct {
18947
18948 ID *string `json:"id,omitempty"`
18949
18950 Name *string `json:"name,omitempty"`
18951
18952 Type *string `json:"type,omitempty"`
18953
18954 Location *string `json:"location,omitempty"`
18955 }
18956
18957
18958 func (r Resource) MarshalJSON() ([]byte, error) {
18959 objectMap := make(map[string]interface{})
18960 if r.Location != nil {
18961 objectMap["location"] = r.Location
18962 }
18963 return json.Marshal(objectMap)
18964 }
18965
18966
18967
18968 type ResourceHealthSummary struct {
18969
18970 ResourceCount *int32 `json:"resourceCount,omitempty"`
18971
18972 Issues *[]HealthErrorSummary `json:"issues,omitempty"`
18973
18974 CategorizedResourceCounts map[string]*int32 `json:"categorizedResourceCounts"`
18975 }
18976
18977
18978 func (RHS ResourceHealthSummary) MarshalJSON() ([]byte, error) {
18979 objectMap := make(map[string]interface{})
18980 if RHS.ResourceCount != nil {
18981 objectMap["resourceCount"] = RHS.ResourceCount
18982 }
18983 if RHS.Issues != nil {
18984 objectMap["issues"] = RHS.Issues
18985 }
18986 if RHS.CategorizedResourceCounts != nil {
18987 objectMap["categorizedResourceCounts"] = RHS.CategorizedResourceCounts
18988 }
18989 return json.Marshal(objectMap)
18990 }
18991
18992
18993 type ResumeJobParams struct {
18994
18995 Properties *ResumeJobParamsProperties `json:"properties,omitempty"`
18996 }
18997
18998
18999 type ResumeJobParamsProperties struct {
19000
19001 Comments *string `json:"comments,omitempty"`
19002 }
19003
19004
19005 type ResyncInput struct {
19006
19007 Properties *ResyncInputProperties `json:"properties,omitempty"`
19008 }
19009
19010
19011 type ResyncInputProperties struct {
19012
19013 ProviderSpecificDetails BasicResyncProviderSpecificInput `json:"providerSpecificDetails,omitempty"`
19014 }
19015
19016
19017 func (rip *ResyncInputProperties) UnmarshalJSON(body []byte) error {
19018 var m map[string]*json.RawMessage
19019 err := json.Unmarshal(body, &m)
19020 if err != nil {
19021 return err
19022 }
19023 for k, v := range m {
19024 switch k {
19025 case "providerSpecificDetails":
19026 if v != nil {
19027 providerSpecificDetails, err := unmarshalBasicResyncProviderSpecificInput(*v)
19028 if err != nil {
19029 return err
19030 }
19031 rip.ProviderSpecificDetails = providerSpecificDetails
19032 }
19033 }
19034 }
19035
19036 return nil
19037 }
19038
19039
19040 type BasicResyncProviderSpecificInput interface {
19041 AsVMwareCbtResyncInput() (*VMwareCbtResyncInput, bool)
19042 AsResyncProviderSpecificInput() (*ResyncProviderSpecificInput, bool)
19043 }
19044
19045
19046 type ResyncProviderSpecificInput struct {
19047
19048 InstanceType InstanceTypeBasicResyncProviderSpecificInput `json:"instanceType,omitempty"`
19049 }
19050
19051 func unmarshalBasicResyncProviderSpecificInput(body []byte) (BasicResyncProviderSpecificInput, error) {
19052 var m map[string]interface{}
19053 err := json.Unmarshal(body, &m)
19054 if err != nil {
19055 return nil, err
19056 }
19057
19058 switch m["instanceType"] {
19059 case string(InstanceTypeBasicResyncProviderSpecificInputInstanceTypeVMwareCbt):
19060 var vmcri VMwareCbtResyncInput
19061 err := json.Unmarshal(body, &vmcri)
19062 return vmcri, err
19063 default:
19064 var rpsi ResyncProviderSpecificInput
19065 err := json.Unmarshal(body, &rpsi)
19066 return rpsi, err
19067 }
19068 }
19069 func unmarshalBasicResyncProviderSpecificInputArray(body []byte) ([]BasicResyncProviderSpecificInput, error) {
19070 var rawMessages []*json.RawMessage
19071 err := json.Unmarshal(body, &rawMessages)
19072 if err != nil {
19073 return nil, err
19074 }
19075
19076 rpsiArray := make([]BasicResyncProviderSpecificInput, len(rawMessages))
19077
19078 for index, rawMessage := range rawMessages {
19079 rpsi, err := unmarshalBasicResyncProviderSpecificInput(*rawMessage)
19080 if err != nil {
19081 return nil, err
19082 }
19083 rpsiArray[index] = rpsi
19084 }
19085 return rpsiArray, nil
19086 }
19087
19088
19089 func (rpsi ResyncProviderSpecificInput) MarshalJSON() ([]byte, error) {
19090 rpsi.InstanceType = InstanceTypeBasicResyncProviderSpecificInputInstanceTypeResyncProviderSpecificInput
19091 objectMap := make(map[string]interface{})
19092 if rpsi.InstanceType != "" {
19093 objectMap["instanceType"] = rpsi.InstanceType
19094 }
19095 return json.Marshal(objectMap)
19096 }
19097
19098
19099 func (rpsi ResyncProviderSpecificInput) AsVMwareCbtResyncInput() (*VMwareCbtResyncInput, bool) {
19100 return nil, false
19101 }
19102
19103
19104 func (rpsi ResyncProviderSpecificInput) AsResyncProviderSpecificInput() (*ResyncProviderSpecificInput, bool) {
19105 return &rpsi, true
19106 }
19107
19108
19109 func (rpsi ResyncProviderSpecificInput) AsBasicResyncProviderSpecificInput() (BasicResyncProviderSpecificInput, bool) {
19110 return &rpsi, true
19111 }
19112
19113
19114 type RetentionVolume struct {
19115
19116 VolumeName *string `json:"volumeName,omitempty"`
19117
19118 CapacityInBytes *int64 `json:"capacityInBytes,omitempty"`
19119
19120 FreeSpaceInBytes *int64 `json:"freeSpaceInBytes,omitempty"`
19121
19122 ThresholdPercentage *int32 `json:"thresholdPercentage,omitempty"`
19123 }
19124
19125
19126 type ReverseReplicationInput struct {
19127
19128 Properties *ReverseReplicationInputProperties `json:"properties,omitempty"`
19129 }
19130
19131
19132 type ReverseReplicationInputProperties struct {
19133
19134 FailoverDirection *string `json:"failoverDirection,omitempty"`
19135
19136 ProviderSpecificDetails BasicReverseReplicationProviderSpecificInput `json:"providerSpecificDetails,omitempty"`
19137 }
19138
19139
19140 func (rrip *ReverseReplicationInputProperties) UnmarshalJSON(body []byte) error {
19141 var m map[string]*json.RawMessage
19142 err := json.Unmarshal(body, &m)
19143 if err != nil {
19144 return err
19145 }
19146 for k, v := range m {
19147 switch k {
19148 case "failoverDirection":
19149 if v != nil {
19150 var failoverDirection string
19151 err = json.Unmarshal(*v, &failoverDirection)
19152 if err != nil {
19153 return err
19154 }
19155 rrip.FailoverDirection = &failoverDirection
19156 }
19157 case "providerSpecificDetails":
19158 if v != nil {
19159 providerSpecificDetails, err := unmarshalBasicReverseReplicationProviderSpecificInput(*v)
19160 if err != nil {
19161 return err
19162 }
19163 rrip.ProviderSpecificDetails = providerSpecificDetails
19164 }
19165 }
19166 }
19167
19168 return nil
19169 }
19170
19171
19172 type BasicReverseReplicationProviderSpecificInput interface {
19173 AsA2AReprotectInput() (*A2AReprotectInput, bool)
19174 AsHyperVReplicaAzureReprotectInput() (*HyperVReplicaAzureReprotectInput, bool)
19175 AsInMageAzureV2ReprotectInput() (*InMageAzureV2ReprotectInput, bool)
19176 AsInMageReprotectInput() (*InMageReprotectInput, bool)
19177 AsReverseReplicationProviderSpecificInput() (*ReverseReplicationProviderSpecificInput, bool)
19178 }
19179
19180
19181 type ReverseReplicationProviderSpecificInput struct {
19182
19183 InstanceType InstanceTypeBasicReverseReplicationProviderSpecificInput `json:"instanceType,omitempty"`
19184 }
19185
19186 func unmarshalBasicReverseReplicationProviderSpecificInput(body []byte) (BasicReverseReplicationProviderSpecificInput, error) {
19187 var m map[string]interface{}
19188 err := json.Unmarshal(body, &m)
19189 if err != nil {
19190 return nil, err
19191 }
19192
19193 switch m["instanceType"] {
19194 case string(InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeA2A):
19195 var ari A2AReprotectInput
19196 err := json.Unmarshal(body, &ari)
19197 return ari, err
19198 case string(InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeHyperVReplicaAzure):
19199 var hvrari HyperVReplicaAzureReprotectInput
19200 err := json.Unmarshal(body, &hvrari)
19201 return hvrari, err
19202 case string(InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMageAzureV2):
19203 var imavri InMageAzureV2ReprotectInput
19204 err := json.Unmarshal(body, &imavri)
19205 return imavri, err
19206 case string(InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMage):
19207 var imri InMageReprotectInput
19208 err := json.Unmarshal(body, &imri)
19209 return imri, err
19210 default:
19211 var rrpsi ReverseReplicationProviderSpecificInput
19212 err := json.Unmarshal(body, &rrpsi)
19213 return rrpsi, err
19214 }
19215 }
19216 func unmarshalBasicReverseReplicationProviderSpecificInputArray(body []byte) ([]BasicReverseReplicationProviderSpecificInput, error) {
19217 var rawMessages []*json.RawMessage
19218 err := json.Unmarshal(body, &rawMessages)
19219 if err != nil {
19220 return nil, err
19221 }
19222
19223 rrpsiArray := make([]BasicReverseReplicationProviderSpecificInput, len(rawMessages))
19224
19225 for index, rawMessage := range rawMessages {
19226 rrpsi, err := unmarshalBasicReverseReplicationProviderSpecificInput(*rawMessage)
19227 if err != nil {
19228 return nil, err
19229 }
19230 rrpsiArray[index] = rrpsi
19231 }
19232 return rrpsiArray, nil
19233 }
19234
19235
19236 func (rrpsi ReverseReplicationProviderSpecificInput) MarshalJSON() ([]byte, error) {
19237 rrpsi.InstanceType = InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeReverseReplicationProviderSpecificInput
19238 objectMap := make(map[string]interface{})
19239 if rrpsi.InstanceType != "" {
19240 objectMap["instanceType"] = rrpsi.InstanceType
19241 }
19242 return json.Marshal(objectMap)
19243 }
19244
19245
19246 func (rrpsi ReverseReplicationProviderSpecificInput) AsA2AReprotectInput() (*A2AReprotectInput, bool) {
19247 return nil, false
19248 }
19249
19250
19251 func (rrpsi ReverseReplicationProviderSpecificInput) AsHyperVReplicaAzureReprotectInput() (*HyperVReplicaAzureReprotectInput, bool) {
19252 return nil, false
19253 }
19254
19255
19256 func (rrpsi ReverseReplicationProviderSpecificInput) AsInMageAzureV2ReprotectInput() (*InMageAzureV2ReprotectInput, bool) {
19257 return nil, false
19258 }
19259
19260
19261 func (rrpsi ReverseReplicationProviderSpecificInput) AsInMageReprotectInput() (*InMageReprotectInput, bool) {
19262 return nil, false
19263 }
19264
19265
19266 func (rrpsi ReverseReplicationProviderSpecificInput) AsReverseReplicationProviderSpecificInput() (*ReverseReplicationProviderSpecificInput, bool) {
19267 return &rrpsi, true
19268 }
19269
19270
19271 func (rrpsi ReverseReplicationProviderSpecificInput) AsBasicReverseReplicationProviderSpecificInput() (BasicReverseReplicationProviderSpecificInput, bool) {
19272 return &rrpsi, true
19273 }
19274
19275
19276 type RoleAssignment struct {
19277
19278 ID *string `json:"id,omitempty"`
19279
19280 Name *string `json:"name,omitempty"`
19281
19282 Scope *string `json:"scope,omitempty"`
19283
19284 PrincipalID *string `json:"principalId,omitempty"`
19285
19286 RoleDefinitionID *string `json:"roleDefinitionId,omitempty"`
19287 }
19288
19289
19290 type RunAsAccount struct {
19291
19292 AccountID *string `json:"accountId,omitempty"`
19293
19294 AccountName *string `json:"accountName,omitempty"`
19295 }
19296
19297
19298 type SanEnableProtectionInput struct {
19299
19300 InstanceType InstanceTypeBasicEnableProtectionProviderSpecificInput `json:"instanceType,omitempty"`
19301 }
19302
19303
19304 func (sepi SanEnableProtectionInput) MarshalJSON() ([]byte, error) {
19305 sepi.InstanceType = InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeSan
19306 objectMap := make(map[string]interface{})
19307 if sepi.InstanceType != "" {
19308 objectMap["instanceType"] = sepi.InstanceType
19309 }
19310 return json.Marshal(objectMap)
19311 }
19312
19313
19314 func (sepi SanEnableProtectionInput) AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool) {
19315 return nil, false
19316 }
19317
19318
19319 func (sepi SanEnableProtectionInput) AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool) {
19320 return nil, false
19321 }
19322
19323
19324 func (sepi SanEnableProtectionInput) AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool) {
19325 return nil, false
19326 }
19327
19328
19329 func (sepi SanEnableProtectionInput) AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool) {
19330 return nil, false
19331 }
19332
19333
19334 func (sepi SanEnableProtectionInput) AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool) {
19335 return &sepi, true
19336 }
19337
19338
19339 func (sepi SanEnableProtectionInput) AsEnableProtectionProviderSpecificInput() (*EnableProtectionProviderSpecificInput, bool) {
19340 return nil, false
19341 }
19342
19343
19344 func (sepi SanEnableProtectionInput) AsBasicEnableProtectionProviderSpecificInput() (BasicEnableProtectionProviderSpecificInput, bool) {
19345 return &sepi, true
19346 }
19347
19348
19349 type ScriptActionTaskDetails struct {
19350
19351 Name *string `json:"name,omitempty"`
19352
19353 Path *string `json:"path,omitempty"`
19354
19355 Output *string `json:"output,omitempty"`
19356
19357 IsPrimarySideScript *bool `json:"isPrimarySideScript,omitempty"`
19358
19359 InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"`
19360 }
19361
19362
19363 func (satd ScriptActionTaskDetails) MarshalJSON() ([]byte, error) {
19364 satd.InstanceType = InstanceTypeScriptActionTaskDetails
19365 objectMap := make(map[string]interface{})
19366 if satd.Name != nil {
19367 objectMap["name"] = satd.Name
19368 }
19369 if satd.Path != nil {
19370 objectMap["path"] = satd.Path
19371 }
19372 if satd.Output != nil {
19373 objectMap["output"] = satd.Output
19374 }
19375 if satd.IsPrimarySideScript != nil {
19376 objectMap["isPrimarySideScript"] = satd.IsPrimarySideScript
19377 }
19378 if satd.InstanceType != "" {
19379 objectMap["instanceType"] = satd.InstanceType
19380 }
19381 return json.Marshal(objectMap)
19382 }
19383
19384
19385 func (satd ScriptActionTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) {
19386 return nil, false
19387 }
19388
19389
19390 func (satd ScriptActionTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) {
19391 return nil, false
19392 }
19393
19394
19395 func (satd ScriptActionTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) {
19396 return nil, false
19397 }
19398
19399
19400 func (satd ScriptActionTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) {
19401 return nil, false
19402 }
19403
19404
19405 func (satd ScriptActionTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) {
19406 return nil, false
19407 }
19408
19409
19410 func (satd ScriptActionTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) {
19411 return &satd, true
19412 }
19413
19414
19415 func (satd ScriptActionTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) {
19416 return nil, false
19417 }
19418
19419
19420 func (satd ScriptActionTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) {
19421 return nil, false
19422 }
19423
19424
19425 func (satd ScriptActionTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) {
19426 return nil, false
19427 }
19428
19429
19430 func (satd ScriptActionTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) {
19431 return &satd, true
19432 }
19433
19434
19435 type ServiceError struct {
19436
19437 Code *string `json:"code,omitempty"`
19438
19439 Message *string `json:"message,omitempty"`
19440
19441 PossibleCauses *string `json:"possibleCauses,omitempty"`
19442
19443 RecommendedAction *string `json:"recommendedAction,omitempty"`
19444
19445 ActivityID *string `json:"activityId,omitempty"`
19446 }
19447
19448
19449 type StorageClassification struct {
19450 autorest.Response `json:"-"`
19451
19452 Properties *StorageClassificationProperties `json:"properties,omitempty"`
19453
19454 ID *string `json:"id,omitempty"`
19455
19456 Name *string `json:"name,omitempty"`
19457
19458 Type *string `json:"type,omitempty"`
19459
19460 Location *string `json:"location,omitempty"`
19461 }
19462
19463
19464 func (sc StorageClassification) MarshalJSON() ([]byte, error) {
19465 objectMap := make(map[string]interface{})
19466 if sc.Properties != nil {
19467 objectMap["properties"] = sc.Properties
19468 }
19469 if sc.Location != nil {
19470 objectMap["location"] = sc.Location
19471 }
19472 return json.Marshal(objectMap)
19473 }
19474
19475
19476 type StorageClassificationCollection struct {
19477 autorest.Response `json:"-"`
19478
19479 Value *[]StorageClassification `json:"value,omitempty"`
19480
19481 NextLink *string `json:"nextLink,omitempty"`
19482 }
19483
19484
19485
19486 type StorageClassificationCollectionIterator struct {
19487 i int
19488 page StorageClassificationCollectionPage
19489 }
19490
19491
19492
19493 func (iter *StorageClassificationCollectionIterator) NextWithContext(ctx context.Context) (err error) {
19494 if tracing.IsEnabled() {
19495 ctx = tracing.StartSpan(ctx, fqdn+"/StorageClassificationCollectionIterator.NextWithContext")
19496 defer func() {
19497 sc := -1
19498 if iter.Response().Response.Response != nil {
19499 sc = iter.Response().Response.Response.StatusCode
19500 }
19501 tracing.EndSpan(ctx, sc, err)
19502 }()
19503 }
19504 iter.i++
19505 if iter.i < len(iter.page.Values()) {
19506 return nil
19507 }
19508 err = iter.page.NextWithContext(ctx)
19509 if err != nil {
19510 iter.i--
19511 return err
19512 }
19513 iter.i = 0
19514 return nil
19515 }
19516
19517
19518
19519
19520 func (iter *StorageClassificationCollectionIterator) Next() error {
19521 return iter.NextWithContext(context.Background())
19522 }
19523
19524
19525 func (iter StorageClassificationCollectionIterator) NotDone() bool {
19526 return iter.page.NotDone() && iter.i < len(iter.page.Values())
19527 }
19528
19529
19530 func (iter StorageClassificationCollectionIterator) Response() StorageClassificationCollection {
19531 return iter.page.Response()
19532 }
19533
19534
19535
19536 func (iter StorageClassificationCollectionIterator) Value() StorageClassification {
19537 if !iter.page.NotDone() {
19538 return StorageClassification{}
19539 }
19540 return iter.page.Values()[iter.i]
19541 }
19542
19543
19544 func NewStorageClassificationCollectionIterator(page StorageClassificationCollectionPage) StorageClassificationCollectionIterator {
19545 return StorageClassificationCollectionIterator{page: page}
19546 }
19547
19548
19549 func (scc StorageClassificationCollection) IsEmpty() bool {
19550 return scc.Value == nil || len(*scc.Value) == 0
19551 }
19552
19553
19554 func (scc StorageClassificationCollection) hasNextLink() bool {
19555 return scc.NextLink != nil && len(*scc.NextLink) != 0
19556 }
19557
19558
19559
19560 func (scc StorageClassificationCollection) storageClassificationCollectionPreparer(ctx context.Context) (*http.Request, error) {
19561 if !scc.hasNextLink() {
19562 return nil, nil
19563 }
19564 return autorest.Prepare((&http.Request{}).WithContext(ctx),
19565 autorest.AsJSON(),
19566 autorest.AsGet(),
19567 autorest.WithBaseURL(to.String(scc.NextLink)))
19568 }
19569
19570
19571 type StorageClassificationCollectionPage struct {
19572 fn func(context.Context, StorageClassificationCollection) (StorageClassificationCollection, error)
19573 scc StorageClassificationCollection
19574 }
19575
19576
19577
19578 func (page *StorageClassificationCollectionPage) NextWithContext(ctx context.Context) (err error) {
19579 if tracing.IsEnabled() {
19580 ctx = tracing.StartSpan(ctx, fqdn+"/StorageClassificationCollectionPage.NextWithContext")
19581 defer func() {
19582 sc := -1
19583 if page.Response().Response.Response != nil {
19584 sc = page.Response().Response.Response.StatusCode
19585 }
19586 tracing.EndSpan(ctx, sc, err)
19587 }()
19588 }
19589 for {
19590 next, err := page.fn(ctx, page.scc)
19591 if err != nil {
19592 return err
19593 }
19594 page.scc = next
19595 if !next.hasNextLink() || !next.IsEmpty() {
19596 break
19597 }
19598 }
19599 return nil
19600 }
19601
19602
19603
19604
19605 func (page *StorageClassificationCollectionPage) Next() error {
19606 return page.NextWithContext(context.Background())
19607 }
19608
19609
19610 func (page StorageClassificationCollectionPage) NotDone() bool {
19611 return !page.scc.IsEmpty()
19612 }
19613
19614
19615 func (page StorageClassificationCollectionPage) Response() StorageClassificationCollection {
19616 return page.scc
19617 }
19618
19619
19620 func (page StorageClassificationCollectionPage) Values() []StorageClassification {
19621 if page.scc.IsEmpty() {
19622 return nil
19623 }
19624 return *page.scc.Value
19625 }
19626
19627
19628 func NewStorageClassificationCollectionPage(cur StorageClassificationCollection, getNextPage func(context.Context, StorageClassificationCollection) (StorageClassificationCollection, error)) StorageClassificationCollectionPage {
19629 return StorageClassificationCollectionPage{
19630 fn: getNextPage,
19631 scc: cur,
19632 }
19633 }
19634
19635
19636 type StorageClassificationMapping struct {
19637 autorest.Response `json:"-"`
19638
19639 Properties *StorageClassificationMappingProperties `json:"properties,omitempty"`
19640
19641 ID *string `json:"id,omitempty"`
19642
19643 Name *string `json:"name,omitempty"`
19644
19645 Type *string `json:"type,omitempty"`
19646
19647 Location *string `json:"location,omitempty"`
19648 }
19649
19650
19651 func (scm StorageClassificationMapping) MarshalJSON() ([]byte, error) {
19652 objectMap := make(map[string]interface{})
19653 if scm.Properties != nil {
19654 objectMap["properties"] = scm.Properties
19655 }
19656 if scm.Location != nil {
19657 objectMap["location"] = scm.Location
19658 }
19659 return json.Marshal(objectMap)
19660 }
19661
19662
19663 type StorageClassificationMappingCollection struct {
19664 autorest.Response `json:"-"`
19665
19666 Value *[]StorageClassificationMapping `json:"value,omitempty"`
19667
19668 NextLink *string `json:"nextLink,omitempty"`
19669 }
19670
19671
19672
19673 type StorageClassificationMappingCollectionIterator struct {
19674 i int
19675 page StorageClassificationMappingCollectionPage
19676 }
19677
19678
19679
19680 func (iter *StorageClassificationMappingCollectionIterator) NextWithContext(ctx context.Context) (err error) {
19681 if tracing.IsEnabled() {
19682 ctx = tracing.StartSpan(ctx, fqdn+"/StorageClassificationMappingCollectionIterator.NextWithContext")
19683 defer func() {
19684 sc := -1
19685 if iter.Response().Response.Response != nil {
19686 sc = iter.Response().Response.Response.StatusCode
19687 }
19688 tracing.EndSpan(ctx, sc, err)
19689 }()
19690 }
19691 iter.i++
19692 if iter.i < len(iter.page.Values()) {
19693 return nil
19694 }
19695 err = iter.page.NextWithContext(ctx)
19696 if err != nil {
19697 iter.i--
19698 return err
19699 }
19700 iter.i = 0
19701 return nil
19702 }
19703
19704
19705
19706
19707 func (iter *StorageClassificationMappingCollectionIterator) Next() error {
19708 return iter.NextWithContext(context.Background())
19709 }
19710
19711
19712 func (iter StorageClassificationMappingCollectionIterator) NotDone() bool {
19713 return iter.page.NotDone() && iter.i < len(iter.page.Values())
19714 }
19715
19716
19717 func (iter StorageClassificationMappingCollectionIterator) Response() StorageClassificationMappingCollection {
19718 return iter.page.Response()
19719 }
19720
19721
19722
19723 func (iter StorageClassificationMappingCollectionIterator) Value() StorageClassificationMapping {
19724 if !iter.page.NotDone() {
19725 return StorageClassificationMapping{}
19726 }
19727 return iter.page.Values()[iter.i]
19728 }
19729
19730
19731 func NewStorageClassificationMappingCollectionIterator(page StorageClassificationMappingCollectionPage) StorageClassificationMappingCollectionIterator {
19732 return StorageClassificationMappingCollectionIterator{page: page}
19733 }
19734
19735
19736 func (scmc StorageClassificationMappingCollection) IsEmpty() bool {
19737 return scmc.Value == nil || len(*scmc.Value) == 0
19738 }
19739
19740
19741 func (scmc StorageClassificationMappingCollection) hasNextLink() bool {
19742 return scmc.NextLink != nil && len(*scmc.NextLink) != 0
19743 }
19744
19745
19746
19747 func (scmc StorageClassificationMappingCollection) storageClassificationMappingCollectionPreparer(ctx context.Context) (*http.Request, error) {
19748 if !scmc.hasNextLink() {
19749 return nil, nil
19750 }
19751 return autorest.Prepare((&http.Request{}).WithContext(ctx),
19752 autorest.AsJSON(),
19753 autorest.AsGet(),
19754 autorest.WithBaseURL(to.String(scmc.NextLink)))
19755 }
19756
19757
19758 type StorageClassificationMappingCollectionPage struct {
19759 fn func(context.Context, StorageClassificationMappingCollection) (StorageClassificationMappingCollection, error)
19760 scmc StorageClassificationMappingCollection
19761 }
19762
19763
19764
19765 func (page *StorageClassificationMappingCollectionPage) NextWithContext(ctx context.Context) (err error) {
19766 if tracing.IsEnabled() {
19767 ctx = tracing.StartSpan(ctx, fqdn+"/StorageClassificationMappingCollectionPage.NextWithContext")
19768 defer func() {
19769 sc := -1
19770 if page.Response().Response.Response != nil {
19771 sc = page.Response().Response.Response.StatusCode
19772 }
19773 tracing.EndSpan(ctx, sc, err)
19774 }()
19775 }
19776 for {
19777 next, err := page.fn(ctx, page.scmc)
19778 if err != nil {
19779 return err
19780 }
19781 page.scmc = next
19782 if !next.hasNextLink() || !next.IsEmpty() {
19783 break
19784 }
19785 }
19786 return nil
19787 }
19788
19789
19790
19791
19792 func (page *StorageClassificationMappingCollectionPage) Next() error {
19793 return page.NextWithContext(context.Background())
19794 }
19795
19796
19797 func (page StorageClassificationMappingCollectionPage) NotDone() bool {
19798 return !page.scmc.IsEmpty()
19799 }
19800
19801
19802 func (page StorageClassificationMappingCollectionPage) Response() StorageClassificationMappingCollection {
19803 return page.scmc
19804 }
19805
19806
19807 func (page StorageClassificationMappingCollectionPage) Values() []StorageClassificationMapping {
19808 if page.scmc.IsEmpty() {
19809 return nil
19810 }
19811 return *page.scmc.Value
19812 }
19813
19814
19815 func NewStorageClassificationMappingCollectionPage(cur StorageClassificationMappingCollection, getNextPage func(context.Context, StorageClassificationMappingCollection) (StorageClassificationMappingCollection, error)) StorageClassificationMappingCollectionPage {
19816 return StorageClassificationMappingCollectionPage{
19817 fn: getNextPage,
19818 scmc: cur,
19819 }
19820 }
19821
19822
19823 type StorageClassificationMappingInput struct {
19824
19825 Properties *StorageMappingInputProperties `json:"properties,omitempty"`
19826 }
19827
19828
19829 type StorageClassificationMappingProperties struct {
19830
19831 TargetStorageClassificationID *string `json:"targetStorageClassificationId,omitempty"`
19832 }
19833
19834
19835 type StorageClassificationProperties struct {
19836
19837 FriendlyName *string `json:"friendlyName,omitempty"`
19838 }
19839
19840
19841 type StorageMappingInputProperties struct {
19842
19843 TargetStorageClassificationID *string `json:"targetStorageClassificationId,omitempty"`
19844 }
19845
19846
19847 type Subnet struct {
19848
19849 Name *string `json:"name,omitempty"`
19850
19851 FriendlyName *string `json:"friendlyName,omitempty"`
19852
19853 AddressList *[]string `json:"addressList,omitempty"`
19854 }
19855
19856
19857 type SwitchProtectionInput struct {
19858
19859 Properties *SwitchProtectionInputProperties `json:"properties,omitempty"`
19860 }
19861
19862
19863 type SwitchProtectionInputProperties struct {
19864
19865 ReplicationProtectedItemName *string `json:"replicationProtectedItemName,omitempty"`
19866
19867 ProviderSpecificDetails BasicSwitchProtectionProviderSpecificInput `json:"providerSpecificDetails,omitempty"`
19868 }
19869
19870
19871 func (spip *SwitchProtectionInputProperties) UnmarshalJSON(body []byte) error {
19872 var m map[string]*json.RawMessage
19873 err := json.Unmarshal(body, &m)
19874 if err != nil {
19875 return err
19876 }
19877 for k, v := range m {
19878 switch k {
19879 case "replicationProtectedItemName":
19880 if v != nil {
19881 var replicationProtectedItemName string
19882 err = json.Unmarshal(*v, &replicationProtectedItemName)
19883 if err != nil {
19884 return err
19885 }
19886 spip.ReplicationProtectedItemName = &replicationProtectedItemName
19887 }
19888 case "providerSpecificDetails":
19889 if v != nil {
19890 providerSpecificDetails, err := unmarshalBasicSwitchProtectionProviderSpecificInput(*v)
19891 if err != nil {
19892 return err
19893 }
19894 spip.ProviderSpecificDetails = providerSpecificDetails
19895 }
19896 }
19897 }
19898
19899 return nil
19900 }
19901
19902
19903 type SwitchProtectionJobDetails struct {
19904
19905 NewReplicationProtectedItemID *string `json:"newReplicationProtectedItemId,omitempty"`
19906
19907 AffectedObjectDetails map[string]*string `json:"affectedObjectDetails"`
19908
19909 InstanceType InstanceTypeBasicJobDetails `json:"instanceType,omitempty"`
19910 }
19911
19912
19913 func (spjd SwitchProtectionJobDetails) MarshalJSON() ([]byte, error) {
19914 spjd.InstanceType = InstanceTypeSwitchProtectionJobDetails
19915 objectMap := make(map[string]interface{})
19916 if spjd.NewReplicationProtectedItemID != nil {
19917 objectMap["newReplicationProtectedItemId"] = spjd.NewReplicationProtectedItemID
19918 }
19919 if spjd.AffectedObjectDetails != nil {
19920 objectMap["affectedObjectDetails"] = spjd.AffectedObjectDetails
19921 }
19922 if spjd.InstanceType != "" {
19923 objectMap["instanceType"] = spjd.InstanceType
19924 }
19925 return json.Marshal(objectMap)
19926 }
19927
19928
19929 func (spjd SwitchProtectionJobDetails) AsAsrJobDetails() (*AsrJobDetails, bool) {
19930 return nil, false
19931 }
19932
19933
19934 func (spjd SwitchProtectionJobDetails) AsExportJobDetails() (*ExportJobDetails, bool) {
19935 return nil, false
19936 }
19937
19938
19939 func (spjd SwitchProtectionJobDetails) AsFailoverJobDetails() (*FailoverJobDetails, bool) {
19940 return nil, false
19941 }
19942
19943
19944 func (spjd SwitchProtectionJobDetails) AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool) {
19945 return &spjd, true
19946 }
19947
19948
19949 func (spjd SwitchProtectionJobDetails) AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool) {
19950 return nil, false
19951 }
19952
19953
19954 func (spjd SwitchProtectionJobDetails) AsJobDetails() (*JobDetails, bool) {
19955 return nil, false
19956 }
19957
19958
19959 func (spjd SwitchProtectionJobDetails) AsBasicJobDetails() (BasicJobDetails, bool) {
19960 return &spjd, true
19961 }
19962
19963
19964 type BasicSwitchProtectionProviderSpecificInput interface {
19965 AsA2ASwitchProtectionInput() (*A2ASwitchProtectionInput, bool)
19966 AsSwitchProtectionProviderSpecificInput() (*SwitchProtectionProviderSpecificInput, bool)
19967 }
19968
19969
19970 type SwitchProtectionProviderSpecificInput struct {
19971
19972 InstanceType InstanceTypeBasicSwitchProtectionProviderSpecificInput `json:"instanceType,omitempty"`
19973 }
19974
19975 func unmarshalBasicSwitchProtectionProviderSpecificInput(body []byte) (BasicSwitchProtectionProviderSpecificInput, error) {
19976 var m map[string]interface{}
19977 err := json.Unmarshal(body, &m)
19978 if err != nil {
19979 return nil, err
19980 }
19981
19982 switch m["instanceType"] {
19983 case string(InstanceTypeBasicSwitchProtectionProviderSpecificInputInstanceTypeA2A):
19984 var aspi A2ASwitchProtectionInput
19985 err := json.Unmarshal(body, &aspi)
19986 return aspi, err
19987 default:
19988 var sppsi SwitchProtectionProviderSpecificInput
19989 err := json.Unmarshal(body, &sppsi)
19990 return sppsi, err
19991 }
19992 }
19993 func unmarshalBasicSwitchProtectionProviderSpecificInputArray(body []byte) ([]BasicSwitchProtectionProviderSpecificInput, error) {
19994 var rawMessages []*json.RawMessage
19995 err := json.Unmarshal(body, &rawMessages)
19996 if err != nil {
19997 return nil, err
19998 }
19999
20000 sppsiArray := make([]BasicSwitchProtectionProviderSpecificInput, len(rawMessages))
20001
20002 for index, rawMessage := range rawMessages {
20003 sppsi, err := unmarshalBasicSwitchProtectionProviderSpecificInput(*rawMessage)
20004 if err != nil {
20005 return nil, err
20006 }
20007 sppsiArray[index] = sppsi
20008 }
20009 return sppsiArray, nil
20010 }
20011
20012
20013 func (sppsi SwitchProtectionProviderSpecificInput) MarshalJSON() ([]byte, error) {
20014 sppsi.InstanceType = InstanceTypeBasicSwitchProtectionProviderSpecificInputInstanceTypeSwitchProtectionProviderSpecificInput
20015 objectMap := make(map[string]interface{})
20016 if sppsi.InstanceType != "" {
20017 objectMap["instanceType"] = sppsi.InstanceType
20018 }
20019 return json.Marshal(objectMap)
20020 }
20021
20022
20023 func (sppsi SwitchProtectionProviderSpecificInput) AsA2ASwitchProtectionInput() (*A2ASwitchProtectionInput, bool) {
20024 return nil, false
20025 }
20026
20027
20028 func (sppsi SwitchProtectionProviderSpecificInput) AsSwitchProtectionProviderSpecificInput() (*SwitchProtectionProviderSpecificInput, bool) {
20029 return &sppsi, true
20030 }
20031
20032
20033 func (sppsi SwitchProtectionProviderSpecificInput) AsBasicSwitchProtectionProviderSpecificInput() (BasicSwitchProtectionProviderSpecificInput, bool) {
20034 return &sppsi, true
20035 }
20036
20037
20038 type TargetComputeSize struct {
20039
20040 ID *string `json:"id,omitempty"`
20041
20042 Name *string `json:"name,omitempty"`
20043
20044 Type *string `json:"type,omitempty"`
20045
20046 Properties *TargetComputeSizeProperties `json:"properties,omitempty"`
20047 }
20048
20049
20050 type TargetComputeSizeCollection struct {
20051 autorest.Response `json:"-"`
20052
20053 Value *[]TargetComputeSize `json:"value,omitempty"`
20054
20055 NextLink *string `json:"nextLink,omitempty"`
20056 }
20057
20058
20059 type TargetComputeSizeCollectionIterator struct {
20060 i int
20061 page TargetComputeSizeCollectionPage
20062 }
20063
20064
20065
20066 func (iter *TargetComputeSizeCollectionIterator) NextWithContext(ctx context.Context) (err error) {
20067 if tracing.IsEnabled() {
20068 ctx = tracing.StartSpan(ctx, fqdn+"/TargetComputeSizeCollectionIterator.NextWithContext")
20069 defer func() {
20070 sc := -1
20071 if iter.Response().Response.Response != nil {
20072 sc = iter.Response().Response.Response.StatusCode
20073 }
20074 tracing.EndSpan(ctx, sc, err)
20075 }()
20076 }
20077 iter.i++
20078 if iter.i < len(iter.page.Values()) {
20079 return nil
20080 }
20081 err = iter.page.NextWithContext(ctx)
20082 if err != nil {
20083 iter.i--
20084 return err
20085 }
20086 iter.i = 0
20087 return nil
20088 }
20089
20090
20091
20092
20093 func (iter *TargetComputeSizeCollectionIterator) Next() error {
20094 return iter.NextWithContext(context.Background())
20095 }
20096
20097
20098 func (iter TargetComputeSizeCollectionIterator) NotDone() bool {
20099 return iter.page.NotDone() && iter.i < len(iter.page.Values())
20100 }
20101
20102
20103 func (iter TargetComputeSizeCollectionIterator) Response() TargetComputeSizeCollection {
20104 return iter.page.Response()
20105 }
20106
20107
20108
20109 func (iter TargetComputeSizeCollectionIterator) Value() TargetComputeSize {
20110 if !iter.page.NotDone() {
20111 return TargetComputeSize{}
20112 }
20113 return iter.page.Values()[iter.i]
20114 }
20115
20116
20117 func NewTargetComputeSizeCollectionIterator(page TargetComputeSizeCollectionPage) TargetComputeSizeCollectionIterator {
20118 return TargetComputeSizeCollectionIterator{page: page}
20119 }
20120
20121
20122 func (tcsc TargetComputeSizeCollection) IsEmpty() bool {
20123 return tcsc.Value == nil || len(*tcsc.Value) == 0
20124 }
20125
20126
20127 func (tcsc TargetComputeSizeCollection) hasNextLink() bool {
20128 return tcsc.NextLink != nil && len(*tcsc.NextLink) != 0
20129 }
20130
20131
20132
20133 func (tcsc TargetComputeSizeCollection) targetComputeSizeCollectionPreparer(ctx context.Context) (*http.Request, error) {
20134 if !tcsc.hasNextLink() {
20135 return nil, nil
20136 }
20137 return autorest.Prepare((&http.Request{}).WithContext(ctx),
20138 autorest.AsJSON(),
20139 autorest.AsGet(),
20140 autorest.WithBaseURL(to.String(tcsc.NextLink)))
20141 }
20142
20143
20144 type TargetComputeSizeCollectionPage struct {
20145 fn func(context.Context, TargetComputeSizeCollection) (TargetComputeSizeCollection, error)
20146 tcsc TargetComputeSizeCollection
20147 }
20148
20149
20150
20151 func (page *TargetComputeSizeCollectionPage) NextWithContext(ctx context.Context) (err error) {
20152 if tracing.IsEnabled() {
20153 ctx = tracing.StartSpan(ctx, fqdn+"/TargetComputeSizeCollectionPage.NextWithContext")
20154 defer func() {
20155 sc := -1
20156 if page.Response().Response.Response != nil {
20157 sc = page.Response().Response.Response.StatusCode
20158 }
20159 tracing.EndSpan(ctx, sc, err)
20160 }()
20161 }
20162 for {
20163 next, err := page.fn(ctx, page.tcsc)
20164 if err != nil {
20165 return err
20166 }
20167 page.tcsc = next
20168 if !next.hasNextLink() || !next.IsEmpty() {
20169 break
20170 }
20171 }
20172 return nil
20173 }
20174
20175
20176
20177
20178 func (page *TargetComputeSizeCollectionPage) Next() error {
20179 return page.NextWithContext(context.Background())
20180 }
20181
20182
20183 func (page TargetComputeSizeCollectionPage) NotDone() bool {
20184 return !page.tcsc.IsEmpty()
20185 }
20186
20187
20188 func (page TargetComputeSizeCollectionPage) Response() TargetComputeSizeCollection {
20189 return page.tcsc
20190 }
20191
20192
20193 func (page TargetComputeSizeCollectionPage) Values() []TargetComputeSize {
20194 if page.tcsc.IsEmpty() {
20195 return nil
20196 }
20197 return *page.tcsc.Value
20198 }
20199
20200
20201 func NewTargetComputeSizeCollectionPage(cur TargetComputeSizeCollection, getNextPage func(context.Context, TargetComputeSizeCollection) (TargetComputeSizeCollection, error)) TargetComputeSizeCollectionPage {
20202 return TargetComputeSizeCollectionPage{
20203 fn: getNextPage,
20204 tcsc: cur,
20205 }
20206 }
20207
20208
20209 type TargetComputeSizeProperties struct {
20210
20211 Name *string `json:"name,omitempty"`
20212
20213 FriendlyName *string `json:"friendlyName,omitempty"`
20214
20215 CPUCoresCount *int32 `json:"cpuCoresCount,omitempty"`
20216
20217 MemoryInGB *float64 `json:"memoryInGB,omitempty"`
20218
20219 MaxDataDiskCount *int32 `json:"maxDataDiskCount,omitempty"`
20220
20221 MaxNicsCount *int32 `json:"maxNicsCount,omitempty"`
20222
20223 Errors *[]ComputeSizeErrorDetails `json:"errors,omitempty"`
20224
20225 HighIopsSupported *string `json:"highIopsSupported,omitempty"`
20226 }
20227
20228
20229 type BasicTaskTypeDetails interface {
20230 AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool)
20231 AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool)
20232 AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool)
20233 AsJobTaskDetails() (*JobTaskDetails, bool)
20234 AsManualActionTaskDetails() (*ManualActionTaskDetails, bool)
20235 AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool)
20236 AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool)
20237 AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool)
20238 AsTaskTypeDetails() (*TaskTypeDetails, bool)
20239 }
20240
20241
20242 type TaskTypeDetails struct {
20243
20244 InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"`
20245 }
20246
20247 func unmarshalBasicTaskTypeDetails(body []byte) (BasicTaskTypeDetails, error) {
20248 var m map[string]interface{}
20249 err := json.Unmarshal(body, &m)
20250 if err != nil {
20251 return nil, err
20252 }
20253
20254 switch m["instanceType"] {
20255 case string(InstanceTypeAutomationRunbookTaskDetails):
20256 var artd AutomationRunbookTaskDetails
20257 err := json.Unmarshal(body, &artd)
20258 return artd, err
20259 case string(InstanceTypeConsistencyCheckTaskDetails):
20260 var cctd ConsistencyCheckTaskDetails
20261 err := json.Unmarshal(body, &cctd)
20262 return cctd, err
20263 case string(InstanceTypeFabricReplicationGroupTaskDetails):
20264 var frgtd FabricReplicationGroupTaskDetails
20265 err := json.Unmarshal(body, &frgtd)
20266 return frgtd, err
20267 case string(InstanceTypeJobTaskDetails):
20268 var jtd JobTaskDetails
20269 err := json.Unmarshal(body, &jtd)
20270 return jtd, err
20271 case string(InstanceTypeManualActionTaskDetails):
20272 var matd ManualActionTaskDetails
20273 err := json.Unmarshal(body, &matd)
20274 return matd, err
20275 case string(InstanceTypeScriptActionTaskDetails):
20276 var satd ScriptActionTaskDetails
20277 err := json.Unmarshal(body, &satd)
20278 return satd, err
20279 case string(InstanceTypeVirtualMachineTaskDetails):
20280 var vmtd VirtualMachineTaskDetails
20281 err := json.Unmarshal(body, &vmtd)
20282 return vmtd, err
20283 case string(InstanceTypeVMNicUpdatesTaskDetails):
20284 var vnutd VMNicUpdatesTaskDetails
20285 err := json.Unmarshal(body, &vnutd)
20286 return vnutd, err
20287 default:
20288 var ttd TaskTypeDetails
20289 err := json.Unmarshal(body, &ttd)
20290 return ttd, err
20291 }
20292 }
20293 func unmarshalBasicTaskTypeDetailsArray(body []byte) ([]BasicTaskTypeDetails, error) {
20294 var rawMessages []*json.RawMessage
20295 err := json.Unmarshal(body, &rawMessages)
20296 if err != nil {
20297 return nil, err
20298 }
20299
20300 ttdArray := make([]BasicTaskTypeDetails, len(rawMessages))
20301
20302 for index, rawMessage := range rawMessages {
20303 ttd, err := unmarshalBasicTaskTypeDetails(*rawMessage)
20304 if err != nil {
20305 return nil, err
20306 }
20307 ttdArray[index] = ttd
20308 }
20309 return ttdArray, nil
20310 }
20311
20312
20313 func (ttd TaskTypeDetails) MarshalJSON() ([]byte, error) {
20314 ttd.InstanceType = InstanceTypeTaskTypeDetails
20315 objectMap := make(map[string]interface{})
20316 if ttd.InstanceType != "" {
20317 objectMap["instanceType"] = ttd.InstanceType
20318 }
20319 return json.Marshal(objectMap)
20320 }
20321
20322
20323 func (ttd TaskTypeDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) {
20324 return nil, false
20325 }
20326
20327
20328 func (ttd TaskTypeDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) {
20329 return nil, false
20330 }
20331
20332
20333 func (ttd TaskTypeDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) {
20334 return nil, false
20335 }
20336
20337
20338 func (ttd TaskTypeDetails) AsJobTaskDetails() (*JobTaskDetails, bool) {
20339 return nil, false
20340 }
20341
20342
20343 func (ttd TaskTypeDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) {
20344 return nil, false
20345 }
20346
20347
20348 func (ttd TaskTypeDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) {
20349 return nil, false
20350 }
20351
20352
20353 func (ttd TaskTypeDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) {
20354 return nil, false
20355 }
20356
20357
20358 func (ttd TaskTypeDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) {
20359 return nil, false
20360 }
20361
20362
20363 func (ttd TaskTypeDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) {
20364 return &ttd, true
20365 }
20366
20367
20368 func (ttd TaskTypeDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) {
20369 return &ttd, true
20370 }
20371
20372
20373 type TestFailoverCleanupInput struct {
20374
20375 Properties *TestFailoverCleanupInputProperties `json:"properties,omitempty"`
20376 }
20377
20378
20379 type TestFailoverCleanupInputProperties struct {
20380
20381 Comments *string `json:"comments,omitempty"`
20382 }
20383
20384
20385 type TestFailoverInput struct {
20386
20387 Properties *TestFailoverInputProperties `json:"properties,omitempty"`
20388 }
20389
20390
20391 type TestFailoverInputProperties struct {
20392
20393 FailoverDirection *string `json:"failoverDirection,omitempty"`
20394
20395 NetworkType *string `json:"networkType,omitempty"`
20396
20397 NetworkID *string `json:"networkId,omitempty"`
20398
20399 SkipTestFailoverCleanup *string `json:"skipTestFailoverCleanup,omitempty"`
20400
20401 ProviderSpecificDetails BasicProviderSpecificFailoverInput `json:"providerSpecificDetails,omitempty"`
20402 }
20403
20404
20405 func (tfip *TestFailoverInputProperties) UnmarshalJSON(body []byte) error {
20406 var m map[string]*json.RawMessage
20407 err := json.Unmarshal(body, &m)
20408 if err != nil {
20409 return err
20410 }
20411 for k, v := range m {
20412 switch k {
20413 case "failoverDirection":
20414 if v != nil {
20415 var failoverDirection string
20416 err = json.Unmarshal(*v, &failoverDirection)
20417 if err != nil {
20418 return err
20419 }
20420 tfip.FailoverDirection = &failoverDirection
20421 }
20422 case "networkType":
20423 if v != nil {
20424 var networkType string
20425 err = json.Unmarshal(*v, &networkType)
20426 if err != nil {
20427 return err
20428 }
20429 tfip.NetworkType = &networkType
20430 }
20431 case "networkId":
20432 if v != nil {
20433 var networkID string
20434 err = json.Unmarshal(*v, &networkID)
20435 if err != nil {
20436 return err
20437 }
20438 tfip.NetworkID = &networkID
20439 }
20440 case "skipTestFailoverCleanup":
20441 if v != nil {
20442 var skipTestFailoverCleanup string
20443 err = json.Unmarshal(*v, &skipTestFailoverCleanup)
20444 if err != nil {
20445 return err
20446 }
20447 tfip.SkipTestFailoverCleanup = &skipTestFailoverCleanup
20448 }
20449 case "providerSpecificDetails":
20450 if v != nil {
20451 providerSpecificDetails, err := unmarshalBasicProviderSpecificFailoverInput(*v)
20452 if err != nil {
20453 return err
20454 }
20455 tfip.ProviderSpecificDetails = providerSpecificDetails
20456 }
20457 }
20458 }
20459
20460 return nil
20461 }
20462
20463
20464 type TestFailoverJobDetails struct {
20465
20466 TestFailoverStatus *string `json:"testFailoverStatus,omitempty"`
20467
20468 Comments *string `json:"comments,omitempty"`
20469
20470 NetworkName *string `json:"networkName,omitempty"`
20471
20472 NetworkFriendlyName *string `json:"networkFriendlyName,omitempty"`
20473
20474 NetworkType *string `json:"networkType,omitempty"`
20475
20476 ProtectedItemDetails *[]FailoverReplicationProtectedItemDetails `json:"protectedItemDetails,omitempty"`
20477
20478 AffectedObjectDetails map[string]*string `json:"affectedObjectDetails"`
20479
20480 InstanceType InstanceTypeBasicJobDetails `json:"instanceType,omitempty"`
20481 }
20482
20483
20484 func (tfjd TestFailoverJobDetails) MarshalJSON() ([]byte, error) {
20485 tfjd.InstanceType = InstanceTypeTestFailoverJobDetails
20486 objectMap := make(map[string]interface{})
20487 if tfjd.TestFailoverStatus != nil {
20488 objectMap["testFailoverStatus"] = tfjd.TestFailoverStatus
20489 }
20490 if tfjd.Comments != nil {
20491 objectMap["comments"] = tfjd.Comments
20492 }
20493 if tfjd.NetworkName != nil {
20494 objectMap["networkName"] = tfjd.NetworkName
20495 }
20496 if tfjd.NetworkFriendlyName != nil {
20497 objectMap["networkFriendlyName"] = tfjd.NetworkFriendlyName
20498 }
20499 if tfjd.NetworkType != nil {
20500 objectMap["networkType"] = tfjd.NetworkType
20501 }
20502 if tfjd.ProtectedItemDetails != nil {
20503 objectMap["protectedItemDetails"] = tfjd.ProtectedItemDetails
20504 }
20505 if tfjd.AffectedObjectDetails != nil {
20506 objectMap["affectedObjectDetails"] = tfjd.AffectedObjectDetails
20507 }
20508 if tfjd.InstanceType != "" {
20509 objectMap["instanceType"] = tfjd.InstanceType
20510 }
20511 return json.Marshal(objectMap)
20512 }
20513
20514
20515 func (tfjd TestFailoverJobDetails) AsAsrJobDetails() (*AsrJobDetails, bool) {
20516 return nil, false
20517 }
20518
20519
20520 func (tfjd TestFailoverJobDetails) AsExportJobDetails() (*ExportJobDetails, bool) {
20521 return nil, false
20522 }
20523
20524
20525 func (tfjd TestFailoverJobDetails) AsFailoverJobDetails() (*FailoverJobDetails, bool) {
20526 return nil, false
20527 }
20528
20529
20530 func (tfjd TestFailoverJobDetails) AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool) {
20531 return nil, false
20532 }
20533
20534
20535 func (tfjd TestFailoverJobDetails) AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool) {
20536 return &tfjd, true
20537 }
20538
20539
20540 func (tfjd TestFailoverJobDetails) AsJobDetails() (*JobDetails, bool) {
20541 return nil, false
20542 }
20543
20544
20545 func (tfjd TestFailoverJobDetails) AsBasicJobDetails() (BasicJobDetails, bool) {
20546 return &tfjd, true
20547 }
20548
20549
20550 type TestMigrateCleanupInput struct {
20551
20552 Properties *TestMigrateCleanupInputProperties `json:"properties,omitempty"`
20553 }
20554
20555
20556 type TestMigrateCleanupInputProperties struct {
20557
20558 Comments *string `json:"comments,omitempty"`
20559 }
20560
20561
20562 type TestMigrateInput struct {
20563
20564 Properties *TestMigrateInputProperties `json:"properties,omitempty"`
20565 }
20566
20567
20568 type TestMigrateInputProperties struct {
20569
20570 ProviderSpecificDetails BasicTestMigrateProviderSpecificInput `json:"providerSpecificDetails,omitempty"`
20571 }
20572
20573
20574 func (tmip *TestMigrateInputProperties) UnmarshalJSON(body []byte) error {
20575 var m map[string]*json.RawMessage
20576 err := json.Unmarshal(body, &m)
20577 if err != nil {
20578 return err
20579 }
20580 for k, v := range m {
20581 switch k {
20582 case "providerSpecificDetails":
20583 if v != nil {
20584 providerSpecificDetails, err := unmarshalBasicTestMigrateProviderSpecificInput(*v)
20585 if err != nil {
20586 return err
20587 }
20588 tmip.ProviderSpecificDetails = providerSpecificDetails
20589 }
20590 }
20591 }
20592
20593 return nil
20594 }
20595
20596
20597 type BasicTestMigrateProviderSpecificInput interface {
20598 AsVMwareCbtTestMigrateInput() (*VMwareCbtTestMigrateInput, bool)
20599 AsTestMigrateProviderSpecificInput() (*TestMigrateProviderSpecificInput, bool)
20600 }
20601
20602
20603 type TestMigrateProviderSpecificInput struct {
20604
20605 InstanceType InstanceTypeBasicTestMigrateProviderSpecificInput `json:"instanceType,omitempty"`
20606 }
20607
20608 func unmarshalBasicTestMigrateProviderSpecificInput(body []byte) (BasicTestMigrateProviderSpecificInput, error) {
20609 var m map[string]interface{}
20610 err := json.Unmarshal(body, &m)
20611 if err != nil {
20612 return nil, err
20613 }
20614
20615 switch m["instanceType"] {
20616 case string(InstanceTypeBasicTestMigrateProviderSpecificInputInstanceTypeVMwareCbt):
20617 var vmctmi VMwareCbtTestMigrateInput
20618 err := json.Unmarshal(body, &vmctmi)
20619 return vmctmi, err
20620 default:
20621 var tmpsi TestMigrateProviderSpecificInput
20622 err := json.Unmarshal(body, &tmpsi)
20623 return tmpsi, err
20624 }
20625 }
20626 func unmarshalBasicTestMigrateProviderSpecificInputArray(body []byte) ([]BasicTestMigrateProviderSpecificInput, error) {
20627 var rawMessages []*json.RawMessage
20628 err := json.Unmarshal(body, &rawMessages)
20629 if err != nil {
20630 return nil, err
20631 }
20632
20633 tmpsiArray := make([]BasicTestMigrateProviderSpecificInput, len(rawMessages))
20634
20635 for index, rawMessage := range rawMessages {
20636 tmpsi, err := unmarshalBasicTestMigrateProviderSpecificInput(*rawMessage)
20637 if err != nil {
20638 return nil, err
20639 }
20640 tmpsiArray[index] = tmpsi
20641 }
20642 return tmpsiArray, nil
20643 }
20644
20645
20646 func (tmpsi TestMigrateProviderSpecificInput) MarshalJSON() ([]byte, error) {
20647 tmpsi.InstanceType = InstanceTypeBasicTestMigrateProviderSpecificInputInstanceTypeTestMigrateProviderSpecificInput
20648 objectMap := make(map[string]interface{})
20649 if tmpsi.InstanceType != "" {
20650 objectMap["instanceType"] = tmpsi.InstanceType
20651 }
20652 return json.Marshal(objectMap)
20653 }
20654
20655
20656 func (tmpsi TestMigrateProviderSpecificInput) AsVMwareCbtTestMigrateInput() (*VMwareCbtTestMigrateInput, bool) {
20657 return nil, false
20658 }
20659
20660
20661 func (tmpsi TestMigrateProviderSpecificInput) AsTestMigrateProviderSpecificInput() (*TestMigrateProviderSpecificInput, bool) {
20662 return &tmpsi, true
20663 }
20664
20665
20666 func (tmpsi TestMigrateProviderSpecificInput) AsBasicTestMigrateProviderSpecificInput() (BasicTestMigrateProviderSpecificInput, bool) {
20667 return &tmpsi, true
20668 }
20669
20670
20671 type UnplannedFailoverInput struct {
20672
20673 Properties *UnplannedFailoverInputProperties `json:"properties,omitempty"`
20674 }
20675
20676
20677 type UnplannedFailoverInputProperties struct {
20678
20679 FailoverDirection *string `json:"failoverDirection,omitempty"`
20680
20681 SourceSiteOperations *string `json:"sourceSiteOperations,omitempty"`
20682
20683 ProviderSpecificDetails BasicProviderSpecificFailoverInput `json:"providerSpecificDetails,omitempty"`
20684 }
20685
20686
20687 func (ufip *UnplannedFailoverInputProperties) UnmarshalJSON(body []byte) error {
20688 var m map[string]*json.RawMessage
20689 err := json.Unmarshal(body, &m)
20690 if err != nil {
20691 return err
20692 }
20693 for k, v := range m {
20694 switch k {
20695 case "failoverDirection":
20696 if v != nil {
20697 var failoverDirection string
20698 err = json.Unmarshal(*v, &failoverDirection)
20699 if err != nil {
20700 return err
20701 }
20702 ufip.FailoverDirection = &failoverDirection
20703 }
20704 case "sourceSiteOperations":
20705 if v != nil {
20706 var sourceSiteOperations string
20707 err = json.Unmarshal(*v, &sourceSiteOperations)
20708 if err != nil {
20709 return err
20710 }
20711 ufip.SourceSiteOperations = &sourceSiteOperations
20712 }
20713 case "providerSpecificDetails":
20714 if v != nil {
20715 providerSpecificDetails, err := unmarshalBasicProviderSpecificFailoverInput(*v)
20716 if err != nil {
20717 return err
20718 }
20719 ufip.ProviderSpecificDetails = providerSpecificDetails
20720 }
20721 }
20722 }
20723
20724 return nil
20725 }
20726
20727
20728 type UpdateMigrationItemInput struct {
20729
20730 Properties *UpdateMigrationItemInputProperties `json:"properties,omitempty"`
20731 }
20732
20733
20734 type UpdateMigrationItemInputProperties struct {
20735
20736 ProviderSpecificDetails BasicUpdateMigrationItemProviderSpecificInput `json:"providerSpecificDetails,omitempty"`
20737 }
20738
20739
20740 func (umiip *UpdateMigrationItemInputProperties) UnmarshalJSON(body []byte) error {
20741 var m map[string]*json.RawMessage
20742 err := json.Unmarshal(body, &m)
20743 if err != nil {
20744 return err
20745 }
20746 for k, v := range m {
20747 switch k {
20748 case "providerSpecificDetails":
20749 if v != nil {
20750 providerSpecificDetails, err := unmarshalBasicUpdateMigrationItemProviderSpecificInput(*v)
20751 if err != nil {
20752 return err
20753 }
20754 umiip.ProviderSpecificDetails = providerSpecificDetails
20755 }
20756 }
20757 }
20758
20759 return nil
20760 }
20761
20762
20763 type BasicUpdateMigrationItemProviderSpecificInput interface {
20764 AsVMwareCbtUpdateMigrationItemInput() (*VMwareCbtUpdateMigrationItemInput, bool)
20765 AsUpdateMigrationItemProviderSpecificInput() (*UpdateMigrationItemProviderSpecificInput, bool)
20766 }
20767
20768
20769 type UpdateMigrationItemProviderSpecificInput struct {
20770
20771 InstanceType InstanceTypeBasicUpdateMigrationItemProviderSpecificInput `json:"instanceType,omitempty"`
20772 }
20773
20774 func unmarshalBasicUpdateMigrationItemProviderSpecificInput(body []byte) (BasicUpdateMigrationItemProviderSpecificInput, error) {
20775 var m map[string]interface{}
20776 err := json.Unmarshal(body, &m)
20777 if err != nil {
20778 return nil, err
20779 }
20780
20781 switch m["instanceType"] {
20782 case string(InstanceTypeBasicUpdateMigrationItemProviderSpecificInputInstanceTypeVMwareCbt):
20783 var vmcumii VMwareCbtUpdateMigrationItemInput
20784 err := json.Unmarshal(body, &vmcumii)
20785 return vmcumii, err
20786 default:
20787 var umipsi UpdateMigrationItemProviderSpecificInput
20788 err := json.Unmarshal(body, &umipsi)
20789 return umipsi, err
20790 }
20791 }
20792 func unmarshalBasicUpdateMigrationItemProviderSpecificInputArray(body []byte) ([]BasicUpdateMigrationItemProviderSpecificInput, error) {
20793 var rawMessages []*json.RawMessage
20794 err := json.Unmarshal(body, &rawMessages)
20795 if err != nil {
20796 return nil, err
20797 }
20798
20799 umipsiArray := make([]BasicUpdateMigrationItemProviderSpecificInput, len(rawMessages))
20800
20801 for index, rawMessage := range rawMessages {
20802 umipsi, err := unmarshalBasicUpdateMigrationItemProviderSpecificInput(*rawMessage)
20803 if err != nil {
20804 return nil, err
20805 }
20806 umipsiArray[index] = umipsi
20807 }
20808 return umipsiArray, nil
20809 }
20810
20811
20812 func (umipsi UpdateMigrationItemProviderSpecificInput) MarshalJSON() ([]byte, error) {
20813 umipsi.InstanceType = InstanceTypeBasicUpdateMigrationItemProviderSpecificInputInstanceTypeUpdateMigrationItemProviderSpecificInput
20814 objectMap := make(map[string]interface{})
20815 if umipsi.InstanceType != "" {
20816 objectMap["instanceType"] = umipsi.InstanceType
20817 }
20818 return json.Marshal(objectMap)
20819 }
20820
20821
20822 func (umipsi UpdateMigrationItemProviderSpecificInput) AsVMwareCbtUpdateMigrationItemInput() (*VMwareCbtUpdateMigrationItemInput, bool) {
20823 return nil, false
20824 }
20825
20826
20827 func (umipsi UpdateMigrationItemProviderSpecificInput) AsUpdateMigrationItemProviderSpecificInput() (*UpdateMigrationItemProviderSpecificInput, bool) {
20828 return &umipsi, true
20829 }
20830
20831
20832 func (umipsi UpdateMigrationItemProviderSpecificInput) AsBasicUpdateMigrationItemProviderSpecificInput() (BasicUpdateMigrationItemProviderSpecificInput, bool) {
20833 return &umipsi, true
20834 }
20835
20836
20837 type UpdateMobilityServiceRequest struct {
20838
20839 Properties *UpdateMobilityServiceRequestProperties `json:"properties,omitempty"`
20840 }
20841
20842
20843 type UpdateMobilityServiceRequestProperties struct {
20844
20845 RunAsAccountID *string `json:"runAsAccountId,omitempty"`
20846 }
20847
20848
20849 type UpdateNetworkMappingInput struct {
20850
20851 Properties *UpdateNetworkMappingInputProperties `json:"properties,omitempty"`
20852 }
20853
20854
20855 type UpdateNetworkMappingInputProperties struct {
20856
20857 RecoveryFabricName *string `json:"recoveryFabricName,omitempty"`
20858
20859 RecoveryNetworkID *string `json:"recoveryNetworkId,omitempty"`
20860
20861 FabricSpecificDetails BasicFabricSpecificUpdateNetworkMappingInput `json:"fabricSpecificDetails,omitempty"`
20862 }
20863
20864
20865 func (unmip *UpdateNetworkMappingInputProperties) UnmarshalJSON(body []byte) error {
20866 var m map[string]*json.RawMessage
20867 err := json.Unmarshal(body, &m)
20868 if err != nil {
20869 return err
20870 }
20871 for k, v := range m {
20872 switch k {
20873 case "recoveryFabricName":
20874 if v != nil {
20875 var recoveryFabricName string
20876 err = json.Unmarshal(*v, &recoveryFabricName)
20877 if err != nil {
20878 return err
20879 }
20880 unmip.RecoveryFabricName = &recoveryFabricName
20881 }
20882 case "recoveryNetworkId":
20883 if v != nil {
20884 var recoveryNetworkID string
20885 err = json.Unmarshal(*v, &recoveryNetworkID)
20886 if err != nil {
20887 return err
20888 }
20889 unmip.RecoveryNetworkID = &recoveryNetworkID
20890 }
20891 case "fabricSpecificDetails":
20892 if v != nil {
20893 fabricSpecificDetails, err := unmarshalBasicFabricSpecificUpdateNetworkMappingInput(*v)
20894 if err != nil {
20895 return err
20896 }
20897 unmip.FabricSpecificDetails = fabricSpecificDetails
20898 }
20899 }
20900 }
20901
20902 return nil
20903 }
20904
20905
20906 type UpdatePolicyInput struct {
20907
20908 Properties *UpdatePolicyInputProperties `json:"properties,omitempty"`
20909 }
20910
20911
20912 type UpdatePolicyInputProperties struct {
20913
20914 ReplicationProviderSettings BasicPolicyProviderSpecificInput `json:"replicationProviderSettings,omitempty"`
20915 }
20916
20917
20918 func (upip *UpdatePolicyInputProperties) UnmarshalJSON(body []byte) error {
20919 var m map[string]*json.RawMessage
20920 err := json.Unmarshal(body, &m)
20921 if err != nil {
20922 return err
20923 }
20924 for k, v := range m {
20925 switch k {
20926 case "replicationProviderSettings":
20927 if v != nil {
20928 replicationProviderSettings, err := unmarshalBasicPolicyProviderSpecificInput(*v)
20929 if err != nil {
20930 return err
20931 }
20932 upip.ReplicationProviderSettings = replicationProviderSettings
20933 }
20934 }
20935 }
20936
20937 return nil
20938 }
20939
20940
20941 type UpdateProtectionContainerMappingInput struct {
20942
20943 Properties *UpdateProtectionContainerMappingInputProperties `json:"properties,omitempty"`
20944 }
20945
20946
20947 type UpdateProtectionContainerMappingInputProperties struct {
20948
20949 ProviderSpecificInput BasicReplicationProviderSpecificUpdateContainerMappingInput `json:"providerSpecificInput,omitempty"`
20950 }
20951
20952
20953 func (upcmip *UpdateProtectionContainerMappingInputProperties) UnmarshalJSON(body []byte) error {
20954 var m map[string]*json.RawMessage
20955 err := json.Unmarshal(body, &m)
20956 if err != nil {
20957 return err
20958 }
20959 for k, v := range m {
20960 switch k {
20961 case "providerSpecificInput":
20962 if v != nil {
20963 providerSpecificInput, err := unmarshalBasicReplicationProviderSpecificUpdateContainerMappingInput(*v)
20964 if err != nil {
20965 return err
20966 }
20967 upcmip.ProviderSpecificInput = providerSpecificInput
20968 }
20969 }
20970 }
20971
20972 return nil
20973 }
20974
20975
20976 type UpdateRecoveryPlanInput struct {
20977
20978 Properties *UpdateRecoveryPlanInputProperties `json:"properties,omitempty"`
20979 }
20980
20981
20982 type UpdateRecoveryPlanInputProperties struct {
20983
20984 Groups *[]RecoveryPlanGroup `json:"groups,omitempty"`
20985 }
20986
20987
20988 type UpdateReplicationProtectedItemInput struct {
20989
20990 Properties *UpdateReplicationProtectedItemInputProperties `json:"properties,omitempty"`
20991 }
20992
20993
20994 type UpdateReplicationProtectedItemInputProperties struct {
20995
20996 RecoveryAzureVMName *string `json:"recoveryAzureVMName,omitempty"`
20997
20998 RecoveryAzureVMSize *string `json:"recoveryAzureVMSize,omitempty"`
20999
21000 SelectedRecoveryAzureNetworkID *string `json:"selectedRecoveryAzureNetworkId,omitempty"`
21001
21002 SelectedSourceNicID *string `json:"selectedSourceNicId,omitempty"`
21003
21004 EnableRdpOnTargetOption *string `json:"enableRdpOnTargetOption,omitempty"`
21005
21006 VMNics *[]VMNicInputDetails `json:"vmNics,omitempty"`
21007
21008 LicenseType LicenseType `json:"licenseType,omitempty"`
21009
21010 RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"`
21011
21012 ProviderSpecificDetails BasicUpdateReplicationProtectedItemProviderInput `json:"providerSpecificDetails,omitempty"`
21013 }
21014
21015
21016 func (urpiip *UpdateReplicationProtectedItemInputProperties) UnmarshalJSON(body []byte) error {
21017 var m map[string]*json.RawMessage
21018 err := json.Unmarshal(body, &m)
21019 if err != nil {
21020 return err
21021 }
21022 for k, v := range m {
21023 switch k {
21024 case "recoveryAzureVMName":
21025 if v != nil {
21026 var recoveryAzureVMName string
21027 err = json.Unmarshal(*v, &recoveryAzureVMName)
21028 if err != nil {
21029 return err
21030 }
21031 urpiip.RecoveryAzureVMName = &recoveryAzureVMName
21032 }
21033 case "recoveryAzureVMSize":
21034 if v != nil {
21035 var recoveryAzureVMSize string
21036 err = json.Unmarshal(*v, &recoveryAzureVMSize)
21037 if err != nil {
21038 return err
21039 }
21040 urpiip.RecoveryAzureVMSize = &recoveryAzureVMSize
21041 }
21042 case "selectedRecoveryAzureNetworkId":
21043 if v != nil {
21044 var selectedRecoveryAzureNetworkID string
21045 err = json.Unmarshal(*v, &selectedRecoveryAzureNetworkID)
21046 if err != nil {
21047 return err
21048 }
21049 urpiip.SelectedRecoveryAzureNetworkID = &selectedRecoveryAzureNetworkID
21050 }
21051 case "selectedSourceNicId":
21052 if v != nil {
21053 var selectedSourceNicID string
21054 err = json.Unmarshal(*v, &selectedSourceNicID)
21055 if err != nil {
21056 return err
21057 }
21058 urpiip.SelectedSourceNicID = &selectedSourceNicID
21059 }
21060 case "enableRdpOnTargetOption":
21061 if v != nil {
21062 var enableRdpOnTargetOption string
21063 err = json.Unmarshal(*v, &enableRdpOnTargetOption)
21064 if err != nil {
21065 return err
21066 }
21067 urpiip.EnableRdpOnTargetOption = &enableRdpOnTargetOption
21068 }
21069 case "vmNics":
21070 if v != nil {
21071 var VMNics []VMNicInputDetails
21072 err = json.Unmarshal(*v, &VMNics)
21073 if err != nil {
21074 return err
21075 }
21076 urpiip.VMNics = &VMNics
21077 }
21078 case "licenseType":
21079 if v != nil {
21080 var licenseType LicenseType
21081 err = json.Unmarshal(*v, &licenseType)
21082 if err != nil {
21083 return err
21084 }
21085 urpiip.LicenseType = licenseType
21086 }
21087 case "recoveryAvailabilitySetId":
21088 if v != nil {
21089 var recoveryAvailabilitySetID string
21090 err = json.Unmarshal(*v, &recoveryAvailabilitySetID)
21091 if err != nil {
21092 return err
21093 }
21094 urpiip.RecoveryAvailabilitySetID = &recoveryAvailabilitySetID
21095 }
21096 case "providerSpecificDetails":
21097 if v != nil {
21098 providerSpecificDetails, err := unmarshalBasicUpdateReplicationProtectedItemProviderInput(*v)
21099 if err != nil {
21100 return err
21101 }
21102 urpiip.ProviderSpecificDetails = providerSpecificDetails
21103 }
21104 }
21105 }
21106
21107 return nil
21108 }
21109
21110
21111 type BasicUpdateReplicationProtectedItemProviderInput interface {
21112 AsA2AUpdateReplicationProtectedItemInput() (*A2AUpdateReplicationProtectedItemInput, bool)
21113 AsHyperVReplicaAzureUpdateReplicationProtectedItemInput() (*HyperVReplicaAzureUpdateReplicationProtectedItemInput, bool)
21114 AsInMageAzureV2UpdateReplicationProtectedItemInput() (*InMageAzureV2UpdateReplicationProtectedItemInput, bool)
21115 AsUpdateReplicationProtectedItemProviderInput() (*UpdateReplicationProtectedItemProviderInput, bool)
21116 }
21117
21118
21119 type UpdateReplicationProtectedItemProviderInput struct {
21120
21121 InstanceType InstanceTypeBasicUpdateReplicationProtectedItemProviderInput `json:"instanceType,omitempty"`
21122 }
21123
21124 func unmarshalBasicUpdateReplicationProtectedItemProviderInput(body []byte) (BasicUpdateReplicationProtectedItemProviderInput, error) {
21125 var m map[string]interface{}
21126 err := json.Unmarshal(body, &m)
21127 if err != nil {
21128 return nil, err
21129 }
21130
21131 switch m["instanceType"] {
21132 case string(InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeA2A):
21133 var aurpii A2AUpdateReplicationProtectedItemInput
21134 err := json.Unmarshal(body, &aurpii)
21135 return aurpii, err
21136 case string(InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeHyperVReplicaAzure):
21137 var hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput
21138 err := json.Unmarshal(body, &hvraurpii)
21139 return hvraurpii, err
21140 case string(InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeInMageAzureV2):
21141 var imavurpii InMageAzureV2UpdateReplicationProtectedItemInput
21142 err := json.Unmarshal(body, &imavurpii)
21143 return imavurpii, err
21144 default:
21145 var urpipi UpdateReplicationProtectedItemProviderInput
21146 err := json.Unmarshal(body, &urpipi)
21147 return urpipi, err
21148 }
21149 }
21150 func unmarshalBasicUpdateReplicationProtectedItemProviderInputArray(body []byte) ([]BasicUpdateReplicationProtectedItemProviderInput, error) {
21151 var rawMessages []*json.RawMessage
21152 err := json.Unmarshal(body, &rawMessages)
21153 if err != nil {
21154 return nil, err
21155 }
21156
21157 urpipiArray := make([]BasicUpdateReplicationProtectedItemProviderInput, len(rawMessages))
21158
21159 for index, rawMessage := range rawMessages {
21160 urpipi, err := unmarshalBasicUpdateReplicationProtectedItemProviderInput(*rawMessage)
21161 if err != nil {
21162 return nil, err
21163 }
21164 urpipiArray[index] = urpipi
21165 }
21166 return urpipiArray, nil
21167 }
21168
21169
21170 func (urpipi UpdateReplicationProtectedItemProviderInput) MarshalJSON() ([]byte, error) {
21171 urpipi.InstanceType = InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeUpdateReplicationProtectedItemProviderInput
21172 objectMap := make(map[string]interface{})
21173 if urpipi.InstanceType != "" {
21174 objectMap["instanceType"] = urpipi.InstanceType
21175 }
21176 return json.Marshal(objectMap)
21177 }
21178
21179
21180 func (urpipi UpdateReplicationProtectedItemProviderInput) AsA2AUpdateReplicationProtectedItemInput() (*A2AUpdateReplicationProtectedItemInput, bool) {
21181 return nil, false
21182 }
21183
21184
21185 func (urpipi UpdateReplicationProtectedItemProviderInput) AsHyperVReplicaAzureUpdateReplicationProtectedItemInput() (*HyperVReplicaAzureUpdateReplicationProtectedItemInput, bool) {
21186 return nil, false
21187 }
21188
21189
21190 func (urpipi UpdateReplicationProtectedItemProviderInput) AsInMageAzureV2UpdateReplicationProtectedItemInput() (*InMageAzureV2UpdateReplicationProtectedItemInput, bool) {
21191 return nil, false
21192 }
21193
21194
21195 func (urpipi UpdateReplicationProtectedItemProviderInput) AsUpdateReplicationProtectedItemProviderInput() (*UpdateReplicationProtectedItemProviderInput, bool) {
21196 return &urpipi, true
21197 }
21198
21199
21200 func (urpipi UpdateReplicationProtectedItemProviderInput) AsBasicUpdateReplicationProtectedItemProviderInput() (BasicUpdateReplicationProtectedItemProviderInput, bool) {
21201 return &urpipi, true
21202 }
21203
21204
21205 type UpdateVCenterRequest struct {
21206
21207 Properties *UpdateVCenterRequestProperties `json:"properties,omitempty"`
21208 }
21209
21210
21211 type UpdateVCenterRequestProperties struct {
21212
21213 FriendlyName *string `json:"friendlyName,omitempty"`
21214
21215 IPAddress *string `json:"ipAddress,omitempty"`
21216
21217 ProcessServerID *string `json:"processServerId,omitempty"`
21218
21219 Port *string `json:"port,omitempty"`
21220
21221 RunAsAccountID *string `json:"runAsAccountId,omitempty"`
21222 }
21223
21224
21225 type VaultHealthDetails struct {
21226 autorest.Response `json:"-"`
21227
21228 Properties *VaultHealthProperties `json:"properties,omitempty"`
21229
21230 ID *string `json:"id,omitempty"`
21231
21232 Name *string `json:"name,omitempty"`
21233
21234 Type *string `json:"type,omitempty"`
21235
21236 Location *string `json:"location,omitempty"`
21237 }
21238
21239
21240 func (vhd VaultHealthDetails) MarshalJSON() ([]byte, error) {
21241 objectMap := make(map[string]interface{})
21242 if vhd.Properties != nil {
21243 objectMap["properties"] = vhd.Properties
21244 }
21245 if vhd.Location != nil {
21246 objectMap["location"] = vhd.Location
21247 }
21248 return json.Marshal(objectMap)
21249 }
21250
21251
21252 type VaultHealthProperties struct {
21253
21254 VaultErrors *[]HealthError `json:"vaultErrors,omitempty"`
21255
21256 ProtectedItemsHealth *ResourceHealthSummary `json:"protectedItemsHealth,omitempty"`
21257
21258 FabricsHealth *ResourceHealthSummary `json:"fabricsHealth,omitempty"`
21259
21260 ContainersHealth *ResourceHealthSummary `json:"containersHealth,omitempty"`
21261 }
21262
21263
21264 type VCenter struct {
21265 autorest.Response `json:"-"`
21266
21267 Properties *VCenterProperties `json:"properties,omitempty"`
21268
21269 ID *string `json:"id,omitempty"`
21270
21271 Name *string `json:"name,omitempty"`
21272
21273 Type *string `json:"type,omitempty"`
21274
21275 Location *string `json:"location,omitempty"`
21276 }
21277
21278
21279 func (vc VCenter) MarshalJSON() ([]byte, error) {
21280 objectMap := make(map[string]interface{})
21281 if vc.Properties != nil {
21282 objectMap["properties"] = vc.Properties
21283 }
21284 if vc.Location != nil {
21285 objectMap["location"] = vc.Location
21286 }
21287 return json.Marshal(objectMap)
21288 }
21289
21290
21291 type VCenterCollection struct {
21292 autorest.Response `json:"-"`
21293
21294 Value *[]VCenter `json:"value,omitempty"`
21295
21296 NextLink *string `json:"nextLink,omitempty"`
21297 }
21298
21299
21300 type VCenterCollectionIterator struct {
21301 i int
21302 page VCenterCollectionPage
21303 }
21304
21305
21306
21307 func (iter *VCenterCollectionIterator) NextWithContext(ctx context.Context) (err error) {
21308 if tracing.IsEnabled() {
21309 ctx = tracing.StartSpan(ctx, fqdn+"/VCenterCollectionIterator.NextWithContext")
21310 defer func() {
21311 sc := -1
21312 if iter.Response().Response.Response != nil {
21313 sc = iter.Response().Response.Response.StatusCode
21314 }
21315 tracing.EndSpan(ctx, sc, err)
21316 }()
21317 }
21318 iter.i++
21319 if iter.i < len(iter.page.Values()) {
21320 return nil
21321 }
21322 err = iter.page.NextWithContext(ctx)
21323 if err != nil {
21324 iter.i--
21325 return err
21326 }
21327 iter.i = 0
21328 return nil
21329 }
21330
21331
21332
21333
21334 func (iter *VCenterCollectionIterator) Next() error {
21335 return iter.NextWithContext(context.Background())
21336 }
21337
21338
21339 func (iter VCenterCollectionIterator) NotDone() bool {
21340 return iter.page.NotDone() && iter.i < len(iter.page.Values())
21341 }
21342
21343
21344 func (iter VCenterCollectionIterator) Response() VCenterCollection {
21345 return iter.page.Response()
21346 }
21347
21348
21349
21350 func (iter VCenterCollectionIterator) Value() VCenter {
21351 if !iter.page.NotDone() {
21352 return VCenter{}
21353 }
21354 return iter.page.Values()[iter.i]
21355 }
21356
21357
21358 func NewVCenterCollectionIterator(page VCenterCollectionPage) VCenterCollectionIterator {
21359 return VCenterCollectionIterator{page: page}
21360 }
21361
21362
21363 func (vcc VCenterCollection) IsEmpty() bool {
21364 return vcc.Value == nil || len(*vcc.Value) == 0
21365 }
21366
21367
21368 func (vcc VCenterCollection) hasNextLink() bool {
21369 return vcc.NextLink != nil && len(*vcc.NextLink) != 0
21370 }
21371
21372
21373
21374 func (vcc VCenterCollection) vCenterCollectionPreparer(ctx context.Context) (*http.Request, error) {
21375 if !vcc.hasNextLink() {
21376 return nil, nil
21377 }
21378 return autorest.Prepare((&http.Request{}).WithContext(ctx),
21379 autorest.AsJSON(),
21380 autorest.AsGet(),
21381 autorest.WithBaseURL(to.String(vcc.NextLink)))
21382 }
21383
21384
21385 type VCenterCollectionPage struct {
21386 fn func(context.Context, VCenterCollection) (VCenterCollection, error)
21387 vcc VCenterCollection
21388 }
21389
21390
21391
21392 func (page *VCenterCollectionPage) NextWithContext(ctx context.Context) (err error) {
21393 if tracing.IsEnabled() {
21394 ctx = tracing.StartSpan(ctx, fqdn+"/VCenterCollectionPage.NextWithContext")
21395 defer func() {
21396 sc := -1
21397 if page.Response().Response.Response != nil {
21398 sc = page.Response().Response.Response.StatusCode
21399 }
21400 tracing.EndSpan(ctx, sc, err)
21401 }()
21402 }
21403 for {
21404 next, err := page.fn(ctx, page.vcc)
21405 if err != nil {
21406 return err
21407 }
21408 page.vcc = next
21409 if !next.hasNextLink() || !next.IsEmpty() {
21410 break
21411 }
21412 }
21413 return nil
21414 }
21415
21416
21417
21418
21419 func (page *VCenterCollectionPage) Next() error {
21420 return page.NextWithContext(context.Background())
21421 }
21422
21423
21424 func (page VCenterCollectionPage) NotDone() bool {
21425 return !page.vcc.IsEmpty()
21426 }
21427
21428
21429 func (page VCenterCollectionPage) Response() VCenterCollection {
21430 return page.vcc
21431 }
21432
21433
21434 func (page VCenterCollectionPage) Values() []VCenter {
21435 if page.vcc.IsEmpty() {
21436 return nil
21437 }
21438 return *page.vcc.Value
21439 }
21440
21441
21442 func NewVCenterCollectionPage(cur VCenterCollection, getNextPage func(context.Context, VCenterCollection) (VCenterCollection, error)) VCenterCollectionPage {
21443 return VCenterCollectionPage{
21444 fn: getNextPage,
21445 vcc: cur,
21446 }
21447 }
21448
21449
21450 type VCenterProperties struct {
21451
21452 FriendlyName *string `json:"friendlyName,omitempty"`
21453
21454 InternalID *string `json:"internalId,omitempty"`
21455
21456 LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"`
21457
21458 DiscoveryStatus *string `json:"discoveryStatus,omitempty"`
21459
21460 ProcessServerID *string `json:"processServerId,omitempty"`
21461
21462 IPAddress *string `json:"ipAddress,omitempty"`
21463
21464 InfrastructureID *string `json:"infrastructureId,omitempty"`
21465
21466 Port *string `json:"port,omitempty"`
21467
21468 RunAsAccountID *string `json:"runAsAccountId,omitempty"`
21469
21470 FabricArmResourceName *string `json:"fabricArmResourceName,omitempty"`
21471
21472 HealthErrors *[]HealthError `json:"healthErrors,omitempty"`
21473 }
21474
21475
21476 type VersionDetails struct {
21477
21478 Version *string `json:"version,omitempty"`
21479
21480 ExpiryDate *date.Time `json:"expiryDate,omitempty"`
21481
21482 Status AgentVersionStatus `json:"status,omitempty"`
21483 }
21484
21485
21486 type VirtualMachineTaskDetails struct {
21487
21488 SkippedReason *string `json:"skippedReason,omitempty"`
21489
21490 SkippedReasonString *string `json:"skippedReasonString,omitempty"`
21491
21492 JobTask *JobEntity `json:"jobTask,omitempty"`
21493
21494 InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"`
21495 }
21496
21497
21498 func (vmtd VirtualMachineTaskDetails) MarshalJSON() ([]byte, error) {
21499 vmtd.InstanceType = InstanceTypeVirtualMachineTaskDetails
21500 objectMap := make(map[string]interface{})
21501 if vmtd.SkippedReason != nil {
21502 objectMap["skippedReason"] = vmtd.SkippedReason
21503 }
21504 if vmtd.SkippedReasonString != nil {
21505 objectMap["skippedReasonString"] = vmtd.SkippedReasonString
21506 }
21507 if vmtd.JobTask != nil {
21508 objectMap["jobTask"] = vmtd.JobTask
21509 }
21510 if vmtd.InstanceType != "" {
21511 objectMap["instanceType"] = vmtd.InstanceType
21512 }
21513 return json.Marshal(objectMap)
21514 }
21515
21516
21517 func (vmtd VirtualMachineTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) {
21518 return nil, false
21519 }
21520
21521
21522 func (vmtd VirtualMachineTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) {
21523 return nil, false
21524 }
21525
21526
21527 func (vmtd VirtualMachineTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) {
21528 return nil, false
21529 }
21530
21531
21532 func (vmtd VirtualMachineTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) {
21533 return nil, false
21534 }
21535
21536
21537 func (vmtd VirtualMachineTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) {
21538 return nil, false
21539 }
21540
21541
21542 func (vmtd VirtualMachineTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) {
21543 return nil, false
21544 }
21545
21546
21547 func (vmtd VirtualMachineTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) {
21548 return &vmtd, true
21549 }
21550
21551
21552 func (vmtd VirtualMachineTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) {
21553 return nil, false
21554 }
21555
21556
21557 func (vmtd VirtualMachineTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) {
21558 return nil, false
21559 }
21560
21561
21562 func (vmtd VirtualMachineTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) {
21563 return &vmtd, true
21564 }
21565
21566
21567 type VmmDetails struct {
21568
21569 InstanceType InstanceTypeBasicFabricSpecificDetails `json:"instanceType,omitempty"`
21570 }
21571
21572
21573 func (vd VmmDetails) MarshalJSON() ([]byte, error) {
21574 vd.InstanceType = InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMM
21575 objectMap := make(map[string]interface{})
21576 if vd.InstanceType != "" {
21577 objectMap["instanceType"] = vd.InstanceType
21578 }
21579 return json.Marshal(objectMap)
21580 }
21581
21582
21583 func (vd VmmDetails) AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool) {
21584 return nil, false
21585 }
21586
21587
21588 func (vd VmmDetails) AsHyperVSiteDetails() (*HyperVSiteDetails, bool) {
21589 return nil, false
21590 }
21591
21592
21593 func (vd VmmDetails) AsVmmDetails() (*VmmDetails, bool) {
21594 return &vd, true
21595 }
21596
21597
21598 func (vd VmmDetails) AsVMwareDetails() (*VMwareDetails, bool) {
21599 return nil, false
21600 }
21601
21602
21603 func (vd VmmDetails) AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool) {
21604 return nil, false
21605 }
21606
21607
21608 func (vd VmmDetails) AsFabricSpecificDetails() (*FabricSpecificDetails, bool) {
21609 return nil, false
21610 }
21611
21612
21613 func (vd VmmDetails) AsBasicFabricSpecificDetails() (BasicFabricSpecificDetails, bool) {
21614 return &vd, true
21615 }
21616
21617
21618
21619 type VmmToAzureCreateNetworkMappingInput struct {
21620
21621 InstanceType InstanceTypeBasicFabricSpecificCreateNetworkMappingInput `json:"instanceType,omitempty"`
21622 }
21623
21624
21625 func (vtacnmi VmmToAzureCreateNetworkMappingInput) MarshalJSON() ([]byte, error) {
21626 vtacnmi.InstanceType = InstanceTypeVmmToAzure
21627 objectMap := make(map[string]interface{})
21628 if vtacnmi.InstanceType != "" {
21629 objectMap["instanceType"] = vtacnmi.InstanceType
21630 }
21631 return json.Marshal(objectMap)
21632 }
21633
21634
21635 func (vtacnmi VmmToAzureCreateNetworkMappingInput) AsAzureToAzureCreateNetworkMappingInput() (*AzureToAzureCreateNetworkMappingInput, bool) {
21636 return nil, false
21637 }
21638
21639
21640 func (vtacnmi VmmToAzureCreateNetworkMappingInput) AsVmmToAzureCreateNetworkMappingInput() (*VmmToAzureCreateNetworkMappingInput, bool) {
21641 return &vtacnmi, true
21642 }
21643
21644
21645 func (vtacnmi VmmToAzureCreateNetworkMappingInput) AsVmmToVmmCreateNetworkMappingInput() (*VmmToVmmCreateNetworkMappingInput, bool) {
21646 return nil, false
21647 }
21648
21649
21650 func (vtacnmi VmmToAzureCreateNetworkMappingInput) AsFabricSpecificCreateNetworkMappingInput() (*FabricSpecificCreateNetworkMappingInput, bool) {
21651 return nil, false
21652 }
21653
21654
21655 func (vtacnmi VmmToAzureCreateNetworkMappingInput) AsBasicFabricSpecificCreateNetworkMappingInput() (BasicFabricSpecificCreateNetworkMappingInput, bool) {
21656 return &vtacnmi, true
21657 }
21658
21659
21660 type VmmToAzureNetworkMappingSettings struct {
21661
21662 InstanceType InstanceTypeBasicNetworkMappingFabricSpecificSettings `json:"instanceType,omitempty"`
21663 }
21664
21665
21666 func (vtanms VmmToAzureNetworkMappingSettings) MarshalJSON() ([]byte, error) {
21667 vtanms.InstanceType = InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToAzure
21668 objectMap := make(map[string]interface{})
21669 if vtanms.InstanceType != "" {
21670 objectMap["instanceType"] = vtanms.InstanceType
21671 }
21672 return json.Marshal(objectMap)
21673 }
21674
21675
21676 func (vtanms VmmToAzureNetworkMappingSettings) AsAzureToAzureNetworkMappingSettings() (*AzureToAzureNetworkMappingSettings, bool) {
21677 return nil, false
21678 }
21679
21680
21681 func (vtanms VmmToAzureNetworkMappingSettings) AsVmmToAzureNetworkMappingSettings() (*VmmToAzureNetworkMappingSettings, bool) {
21682 return &vtanms, true
21683 }
21684
21685
21686 func (vtanms VmmToAzureNetworkMappingSettings) AsVmmToVmmNetworkMappingSettings() (*VmmToVmmNetworkMappingSettings, bool) {
21687 return nil, false
21688 }
21689
21690
21691 func (vtanms VmmToAzureNetworkMappingSettings) AsNetworkMappingFabricSpecificSettings() (*NetworkMappingFabricSpecificSettings, bool) {
21692 return nil, false
21693 }
21694
21695
21696 func (vtanms VmmToAzureNetworkMappingSettings) AsBasicNetworkMappingFabricSpecificSettings() (BasicNetworkMappingFabricSpecificSettings, bool) {
21697 return &vtanms, true
21698 }
21699
21700
21701
21702 type VmmToAzureUpdateNetworkMappingInput struct {
21703
21704 InstanceType InstanceTypeBasicFabricSpecificUpdateNetworkMappingInput `json:"instanceType,omitempty"`
21705 }
21706
21707
21708 func (vtaunmi VmmToAzureUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) {
21709 vtaunmi.InstanceType = InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToAzure
21710 objectMap := make(map[string]interface{})
21711 if vtaunmi.InstanceType != "" {
21712 objectMap["instanceType"] = vtaunmi.InstanceType
21713 }
21714 return json.Marshal(objectMap)
21715 }
21716
21717
21718 func (vtaunmi VmmToAzureUpdateNetworkMappingInput) AsAzureToAzureUpdateNetworkMappingInput() (*AzureToAzureUpdateNetworkMappingInput, bool) {
21719 return nil, false
21720 }
21721
21722
21723 func (vtaunmi VmmToAzureUpdateNetworkMappingInput) AsVmmToAzureUpdateNetworkMappingInput() (*VmmToAzureUpdateNetworkMappingInput, bool) {
21724 return &vtaunmi, true
21725 }
21726
21727
21728 func (vtaunmi VmmToAzureUpdateNetworkMappingInput) AsVmmToVmmUpdateNetworkMappingInput() (*VmmToVmmUpdateNetworkMappingInput, bool) {
21729 return nil, false
21730 }
21731
21732
21733 func (vtaunmi VmmToAzureUpdateNetworkMappingInput) AsFabricSpecificUpdateNetworkMappingInput() (*FabricSpecificUpdateNetworkMappingInput, bool) {
21734 return nil, false
21735 }
21736
21737
21738 func (vtaunmi VmmToAzureUpdateNetworkMappingInput) AsBasicFabricSpecificUpdateNetworkMappingInput() (BasicFabricSpecificUpdateNetworkMappingInput, bool) {
21739 return &vtaunmi, true
21740 }
21741
21742
21743
21744 type VmmToVmmCreateNetworkMappingInput struct {
21745
21746 InstanceType InstanceTypeBasicFabricSpecificCreateNetworkMappingInput `json:"instanceType,omitempty"`
21747 }
21748
21749
21750 func (vtvcnmi VmmToVmmCreateNetworkMappingInput) MarshalJSON() ([]byte, error) {
21751 vtvcnmi.InstanceType = InstanceTypeVmmToVmm
21752 objectMap := make(map[string]interface{})
21753 if vtvcnmi.InstanceType != "" {
21754 objectMap["instanceType"] = vtvcnmi.InstanceType
21755 }
21756 return json.Marshal(objectMap)
21757 }
21758
21759
21760 func (vtvcnmi VmmToVmmCreateNetworkMappingInput) AsAzureToAzureCreateNetworkMappingInput() (*AzureToAzureCreateNetworkMappingInput, bool) {
21761 return nil, false
21762 }
21763
21764
21765 func (vtvcnmi VmmToVmmCreateNetworkMappingInput) AsVmmToAzureCreateNetworkMappingInput() (*VmmToAzureCreateNetworkMappingInput, bool) {
21766 return nil, false
21767 }
21768
21769
21770 func (vtvcnmi VmmToVmmCreateNetworkMappingInput) AsVmmToVmmCreateNetworkMappingInput() (*VmmToVmmCreateNetworkMappingInput, bool) {
21771 return &vtvcnmi, true
21772 }
21773
21774
21775 func (vtvcnmi VmmToVmmCreateNetworkMappingInput) AsFabricSpecificCreateNetworkMappingInput() (*FabricSpecificCreateNetworkMappingInput, bool) {
21776 return nil, false
21777 }
21778
21779
21780 func (vtvcnmi VmmToVmmCreateNetworkMappingInput) AsBasicFabricSpecificCreateNetworkMappingInput() (BasicFabricSpecificCreateNetworkMappingInput, bool) {
21781 return &vtvcnmi, true
21782 }
21783
21784
21785 type VmmToVmmNetworkMappingSettings struct {
21786
21787 InstanceType InstanceTypeBasicNetworkMappingFabricSpecificSettings `json:"instanceType,omitempty"`
21788 }
21789
21790
21791 func (vtvnms VmmToVmmNetworkMappingSettings) MarshalJSON() ([]byte, error) {
21792 vtvnms.InstanceType = InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToVmm
21793 objectMap := make(map[string]interface{})
21794 if vtvnms.InstanceType != "" {
21795 objectMap["instanceType"] = vtvnms.InstanceType
21796 }
21797 return json.Marshal(objectMap)
21798 }
21799
21800
21801 func (vtvnms VmmToVmmNetworkMappingSettings) AsAzureToAzureNetworkMappingSettings() (*AzureToAzureNetworkMappingSettings, bool) {
21802 return nil, false
21803 }
21804
21805
21806 func (vtvnms VmmToVmmNetworkMappingSettings) AsVmmToAzureNetworkMappingSettings() (*VmmToAzureNetworkMappingSettings, bool) {
21807 return nil, false
21808 }
21809
21810
21811 func (vtvnms VmmToVmmNetworkMappingSettings) AsVmmToVmmNetworkMappingSettings() (*VmmToVmmNetworkMappingSettings, bool) {
21812 return &vtvnms, true
21813 }
21814
21815
21816 func (vtvnms VmmToVmmNetworkMappingSettings) AsNetworkMappingFabricSpecificSettings() (*NetworkMappingFabricSpecificSettings, bool) {
21817 return nil, false
21818 }
21819
21820
21821 func (vtvnms VmmToVmmNetworkMappingSettings) AsBasicNetworkMappingFabricSpecificSettings() (BasicNetworkMappingFabricSpecificSettings, bool) {
21822 return &vtvnms, true
21823 }
21824
21825
21826
21827 type VmmToVmmUpdateNetworkMappingInput struct {
21828
21829 InstanceType InstanceTypeBasicFabricSpecificUpdateNetworkMappingInput `json:"instanceType,omitempty"`
21830 }
21831
21832
21833 func (vtvunmi VmmToVmmUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) {
21834 vtvunmi.InstanceType = InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToVmm
21835 objectMap := make(map[string]interface{})
21836 if vtvunmi.InstanceType != "" {
21837 objectMap["instanceType"] = vtvunmi.InstanceType
21838 }
21839 return json.Marshal(objectMap)
21840 }
21841
21842
21843 func (vtvunmi VmmToVmmUpdateNetworkMappingInput) AsAzureToAzureUpdateNetworkMappingInput() (*AzureToAzureUpdateNetworkMappingInput, bool) {
21844 return nil, false
21845 }
21846
21847
21848 func (vtvunmi VmmToVmmUpdateNetworkMappingInput) AsVmmToAzureUpdateNetworkMappingInput() (*VmmToAzureUpdateNetworkMappingInput, bool) {
21849 return nil, false
21850 }
21851
21852
21853 func (vtvunmi VmmToVmmUpdateNetworkMappingInput) AsVmmToVmmUpdateNetworkMappingInput() (*VmmToVmmUpdateNetworkMappingInput, bool) {
21854 return &vtvunmi, true
21855 }
21856
21857
21858 func (vtvunmi VmmToVmmUpdateNetworkMappingInput) AsFabricSpecificUpdateNetworkMappingInput() (*FabricSpecificUpdateNetworkMappingInput, bool) {
21859 return nil, false
21860 }
21861
21862
21863 func (vtvunmi VmmToVmmUpdateNetworkMappingInput) AsBasicFabricSpecificUpdateNetworkMappingInput() (BasicFabricSpecificUpdateNetworkMappingInput, bool) {
21864 return &vtvunmi, true
21865 }
21866
21867
21868 type VmmVirtualMachineDetails struct {
21869
21870 SourceItemID *string `json:"sourceItemId,omitempty"`
21871
21872 Generation *string `json:"generation,omitempty"`
21873
21874 OsDetails *OSDetails `json:"osDetails,omitempty"`
21875
21876 DiskDetails *[]DiskDetails `json:"diskDetails,omitempty"`
21877
21878 HasPhysicalDisk PresenceStatus `json:"hasPhysicalDisk,omitempty"`
21879
21880 HasFibreChannelAdapter PresenceStatus `json:"hasFibreChannelAdapter,omitempty"`
21881
21882 HasSharedVhd PresenceStatus `json:"hasSharedVhd,omitempty"`
21883
21884 InstanceType InstanceTypeBasicConfigurationSettings `json:"instanceType,omitempty"`
21885 }
21886
21887
21888 func (vvmd VmmVirtualMachineDetails) MarshalJSON() ([]byte, error) {
21889 vvmd.InstanceType = InstanceTypeVmmVirtualMachine
21890 objectMap := make(map[string]interface{})
21891 if vvmd.SourceItemID != nil {
21892 objectMap["sourceItemId"] = vvmd.SourceItemID
21893 }
21894 if vvmd.Generation != nil {
21895 objectMap["generation"] = vvmd.Generation
21896 }
21897 if vvmd.OsDetails != nil {
21898 objectMap["osDetails"] = vvmd.OsDetails
21899 }
21900 if vvmd.DiskDetails != nil {
21901 objectMap["diskDetails"] = vvmd.DiskDetails
21902 }
21903 if vvmd.HasPhysicalDisk != "" {
21904 objectMap["hasPhysicalDisk"] = vvmd.HasPhysicalDisk
21905 }
21906 if vvmd.HasFibreChannelAdapter != "" {
21907 objectMap["hasFibreChannelAdapter"] = vvmd.HasFibreChannelAdapter
21908 }
21909 if vvmd.HasSharedVhd != "" {
21910 objectMap["hasSharedVhd"] = vvmd.HasSharedVhd
21911 }
21912 if vvmd.InstanceType != "" {
21913 objectMap["instanceType"] = vvmd.InstanceType
21914 }
21915 return json.Marshal(objectMap)
21916 }
21917
21918
21919 func (vvmd VmmVirtualMachineDetails) AsHyperVVirtualMachineDetails() (*HyperVVirtualMachineDetails, bool) {
21920 return nil, false
21921 }
21922
21923
21924 func (vvmd VmmVirtualMachineDetails) AsReplicationGroupDetails() (*ReplicationGroupDetails, bool) {
21925 return nil, false
21926 }
21927
21928
21929 func (vvmd VmmVirtualMachineDetails) AsVmmVirtualMachineDetails() (*VmmVirtualMachineDetails, bool) {
21930 return &vvmd, true
21931 }
21932
21933
21934 func (vvmd VmmVirtualMachineDetails) AsVMwareVirtualMachineDetails() (*VMwareVirtualMachineDetails, bool) {
21935 return nil, false
21936 }
21937
21938
21939 func (vvmd VmmVirtualMachineDetails) AsConfigurationSettings() (*ConfigurationSettings, bool) {
21940 return nil, false
21941 }
21942
21943
21944 func (vvmd VmmVirtualMachineDetails) AsBasicConfigurationSettings() (BasicConfigurationSettings, bool) {
21945 return &vvmd, true
21946 }
21947
21948
21949 type VMNicDetails struct {
21950
21951 NicID *string `json:"nicId,omitempty"`
21952
21953 ReplicaNicID *string `json:"replicaNicId,omitempty"`
21954
21955 SourceNicArmID *string `json:"sourceNicArmId,omitempty"`
21956
21957 VMSubnetName *string `json:"vMSubnetName,omitempty"`
21958
21959 VMNetworkName *string `json:"vMNetworkName,omitempty"`
21960
21961 RecoveryVMNetworkID *string `json:"recoveryVMNetworkId,omitempty"`
21962
21963 RecoveryVMSubnetName *string `json:"recoveryVMSubnetName,omitempty"`
21964
21965 IPAddressType *string `json:"ipAddressType,omitempty"`
21966
21967 PrimaryNicStaticIPAddress *string `json:"primaryNicStaticIPAddress,omitempty"`
21968
21969 ReplicaNicStaticIPAddress *string `json:"replicaNicStaticIPAddress,omitempty"`
21970
21971 SelectionType *string `json:"selectionType,omitempty"`
21972
21973 RecoveryNicIPAddressType *string `json:"recoveryNicIpAddressType,omitempty"`
21974
21975 EnableAcceleratedNetworkingOnRecovery *bool `json:"enableAcceleratedNetworkingOnRecovery,omitempty"`
21976 }
21977
21978
21979 type VMNicInputDetails struct {
21980
21981 NicID *string `json:"nicId,omitempty"`
21982
21983 RecoveryVMSubnetName *string `json:"recoveryVMSubnetName,omitempty"`
21984
21985 ReplicaNicStaticIPAddress *string `json:"replicaNicStaticIPAddress,omitempty"`
21986
21987 SelectionType *string `json:"selectionType,omitempty"`
21988
21989 EnableAcceleratedNetworkingOnRecovery *bool `json:"enableAcceleratedNetworkingOnRecovery,omitempty"`
21990 }
21991
21992
21993 type VMNicUpdatesTaskDetails struct {
21994
21995 VMID *string `json:"vmId,omitempty"`
21996
21997 NicID *string `json:"nicId,omitempty"`
21998
21999 Name *string `json:"name,omitempty"`
22000
22001 InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"`
22002 }
22003
22004
22005 func (vnutd VMNicUpdatesTaskDetails) MarshalJSON() ([]byte, error) {
22006 vnutd.InstanceType = InstanceTypeVMNicUpdatesTaskDetails
22007 objectMap := make(map[string]interface{})
22008 if vnutd.VMID != nil {
22009 objectMap["vmId"] = vnutd.VMID
22010 }
22011 if vnutd.NicID != nil {
22012 objectMap["nicId"] = vnutd.NicID
22013 }
22014 if vnutd.Name != nil {
22015 objectMap["name"] = vnutd.Name
22016 }
22017 if vnutd.InstanceType != "" {
22018 objectMap["instanceType"] = vnutd.InstanceType
22019 }
22020 return json.Marshal(objectMap)
22021 }
22022
22023
22024 func (vnutd VMNicUpdatesTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) {
22025 return nil, false
22026 }
22027
22028
22029 func (vnutd VMNicUpdatesTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) {
22030 return nil, false
22031 }
22032
22033
22034 func (vnutd VMNicUpdatesTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) {
22035 return nil, false
22036 }
22037
22038
22039 func (vnutd VMNicUpdatesTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) {
22040 return nil, false
22041 }
22042
22043
22044 func (vnutd VMNicUpdatesTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) {
22045 return nil, false
22046 }
22047
22048
22049 func (vnutd VMNicUpdatesTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) {
22050 return nil, false
22051 }
22052
22053
22054 func (vnutd VMNicUpdatesTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) {
22055 return nil, false
22056 }
22057
22058
22059 func (vnutd VMNicUpdatesTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) {
22060 return &vnutd, true
22061 }
22062
22063
22064 func (vnutd VMNicUpdatesTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) {
22065 return nil, false
22066 }
22067
22068
22069 func (vnutd VMNicUpdatesTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) {
22070 return &vnutd, true
22071 }
22072
22073
22074 type VMwareCbtContainerCreationInput struct {
22075
22076 InstanceType InstanceTypeBasicReplicationProviderSpecificContainerCreationInput `json:"instanceType,omitempty"`
22077 }
22078
22079
22080 func (vmccci VMwareCbtContainerCreationInput) MarshalJSON() ([]byte, error) {
22081 vmccci.InstanceType = InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeVMwareCbt
22082 objectMap := make(map[string]interface{})
22083 if vmccci.InstanceType != "" {
22084 objectMap["instanceType"] = vmccci.InstanceType
22085 }
22086 return json.Marshal(objectMap)
22087 }
22088
22089
22090 func (vmccci VMwareCbtContainerCreationInput) AsA2AContainerCreationInput() (*A2AContainerCreationInput, bool) {
22091 return nil, false
22092 }
22093
22094
22095 func (vmccci VMwareCbtContainerCreationInput) AsVMwareCbtContainerCreationInput() (*VMwareCbtContainerCreationInput, bool) {
22096 return &vmccci, true
22097 }
22098
22099
22100 func (vmccci VMwareCbtContainerCreationInput) AsReplicationProviderSpecificContainerCreationInput() (*ReplicationProviderSpecificContainerCreationInput, bool) {
22101 return nil, false
22102 }
22103
22104
22105 func (vmccci VMwareCbtContainerCreationInput) AsBasicReplicationProviderSpecificContainerCreationInput() (BasicReplicationProviderSpecificContainerCreationInput, bool) {
22106 return &vmccci, true
22107 }
22108
22109
22110 type VMwareCbtContainerMappingInput struct {
22111
22112 KeyVaultID *string `json:"keyVaultId,omitempty"`
22113
22114 KeyVaultURI *string `json:"keyVaultUri,omitempty"`
22115
22116 StorageAccountID *string `json:"storageAccountId,omitempty"`
22117
22118 StorageAccountSasSecretName *string `json:"storageAccountSasSecretName,omitempty"`
22119
22120 ServiceBusConnectionStringSecretName *string `json:"serviceBusConnectionStringSecretName,omitempty"`
22121
22122 TargetLocation *string `json:"targetLocation,omitempty"`
22123
22124 InstanceType InstanceTypeBasicReplicationProviderSpecificContainerMappingInput `json:"instanceType,omitempty"`
22125 }
22126
22127
22128 func (vmccmi VMwareCbtContainerMappingInput) MarshalJSON() ([]byte, error) {
22129 vmccmi.InstanceType = InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeVMwareCbt
22130 objectMap := make(map[string]interface{})
22131 if vmccmi.KeyVaultID != nil {
22132 objectMap["keyVaultId"] = vmccmi.KeyVaultID
22133 }
22134 if vmccmi.KeyVaultURI != nil {
22135 objectMap["keyVaultUri"] = vmccmi.KeyVaultURI
22136 }
22137 if vmccmi.StorageAccountID != nil {
22138 objectMap["storageAccountId"] = vmccmi.StorageAccountID
22139 }
22140 if vmccmi.StorageAccountSasSecretName != nil {
22141 objectMap["storageAccountSasSecretName"] = vmccmi.StorageAccountSasSecretName
22142 }
22143 if vmccmi.ServiceBusConnectionStringSecretName != nil {
22144 objectMap["serviceBusConnectionStringSecretName"] = vmccmi.ServiceBusConnectionStringSecretName
22145 }
22146 if vmccmi.TargetLocation != nil {
22147 objectMap["targetLocation"] = vmccmi.TargetLocation
22148 }
22149 if vmccmi.InstanceType != "" {
22150 objectMap["instanceType"] = vmccmi.InstanceType
22151 }
22152 return json.Marshal(objectMap)
22153 }
22154
22155
22156 func (vmccmi VMwareCbtContainerMappingInput) AsA2AContainerMappingInput() (*A2AContainerMappingInput, bool) {
22157 return nil, false
22158 }
22159
22160
22161 func (vmccmi VMwareCbtContainerMappingInput) AsVMwareCbtContainerMappingInput() (*VMwareCbtContainerMappingInput, bool) {
22162 return &vmccmi, true
22163 }
22164
22165
22166 func (vmccmi VMwareCbtContainerMappingInput) AsReplicationProviderSpecificContainerMappingInput() (*ReplicationProviderSpecificContainerMappingInput, bool) {
22167 return nil, false
22168 }
22169
22170
22171 func (vmccmi VMwareCbtContainerMappingInput) AsBasicReplicationProviderSpecificContainerMappingInput() (BasicReplicationProviderSpecificContainerMappingInput, bool) {
22172 return &vmccmi, true
22173 }
22174
22175
22176 type VMwareCbtDiskInput struct {
22177
22178 DiskID *string `json:"diskId,omitempty"`
22179
22180 IsOSDisk *string `json:"isOSDisk,omitempty"`
22181
22182 LogStorageAccountID *string `json:"logStorageAccountId,omitempty"`
22183
22184 LogStorageAccountSasSecretName *string `json:"logStorageAccountSasSecretName,omitempty"`
22185
22186 DiskType DiskAccountType `json:"diskType,omitempty"`
22187
22188 DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`
22189 }
22190
22191
22192 type VMwareCbtEnableMigrationInput struct {
22193
22194 VmwareMachineID *string `json:"vmwareMachineId,omitempty"`
22195
22196 DisksToInclude *[]VMwareCbtDiskInput `json:"disksToInclude,omitempty"`
22197
22198 LicenseType LicenseType `json:"licenseType,omitempty"`
22199
22200 DataMoverRunAsAccountID *string `json:"dataMoverRunAsAccountId,omitempty"`
22201
22202 SnapshotRunAsAccountID *string `json:"snapshotRunAsAccountId,omitempty"`
22203
22204 TargetVMName *string `json:"targetVmName,omitempty"`
22205
22206 TargetVMSize *string `json:"targetVmSize,omitempty"`
22207
22208 TargetResourceGroupID *string `json:"targetResourceGroupId,omitempty"`
22209
22210 TargetNetworkID *string `json:"targetNetworkId,omitempty"`
22211
22212 TargetSubnetName *string `json:"targetSubnetName,omitempty"`
22213
22214 TargetAvailabilitySetID *string `json:"targetAvailabilitySetId,omitempty"`
22215
22216 TargetAvailabilityZone *string `json:"targetAvailabilityZone,omitempty"`
22217
22218 TargetBootDiagnosticsStorageAccountID *string `json:"targetBootDiagnosticsStorageAccountId,omitempty"`
22219
22220 PerformAutoResync *string `json:"performAutoResync,omitempty"`
22221
22222 InstanceType InstanceTypeBasicEnableMigrationProviderSpecificInput `json:"instanceType,omitempty"`
22223 }
22224
22225
22226 func (vmcemi VMwareCbtEnableMigrationInput) MarshalJSON() ([]byte, error) {
22227 vmcemi.InstanceType = InstanceTypeVMwareCbt
22228 objectMap := make(map[string]interface{})
22229 if vmcemi.VmwareMachineID != nil {
22230 objectMap["vmwareMachineId"] = vmcemi.VmwareMachineID
22231 }
22232 if vmcemi.DisksToInclude != nil {
22233 objectMap["disksToInclude"] = vmcemi.DisksToInclude
22234 }
22235 if vmcemi.LicenseType != "" {
22236 objectMap["licenseType"] = vmcemi.LicenseType
22237 }
22238 if vmcemi.DataMoverRunAsAccountID != nil {
22239 objectMap["dataMoverRunAsAccountId"] = vmcemi.DataMoverRunAsAccountID
22240 }
22241 if vmcemi.SnapshotRunAsAccountID != nil {
22242 objectMap["snapshotRunAsAccountId"] = vmcemi.SnapshotRunAsAccountID
22243 }
22244 if vmcemi.TargetVMName != nil {
22245 objectMap["targetVmName"] = vmcemi.TargetVMName
22246 }
22247 if vmcemi.TargetVMSize != nil {
22248 objectMap["targetVmSize"] = vmcemi.TargetVMSize
22249 }
22250 if vmcemi.TargetResourceGroupID != nil {
22251 objectMap["targetResourceGroupId"] = vmcemi.TargetResourceGroupID
22252 }
22253 if vmcemi.TargetNetworkID != nil {
22254 objectMap["targetNetworkId"] = vmcemi.TargetNetworkID
22255 }
22256 if vmcemi.TargetSubnetName != nil {
22257 objectMap["targetSubnetName"] = vmcemi.TargetSubnetName
22258 }
22259 if vmcemi.TargetAvailabilitySetID != nil {
22260 objectMap["targetAvailabilitySetId"] = vmcemi.TargetAvailabilitySetID
22261 }
22262 if vmcemi.TargetAvailabilityZone != nil {
22263 objectMap["targetAvailabilityZone"] = vmcemi.TargetAvailabilityZone
22264 }
22265 if vmcemi.TargetBootDiagnosticsStorageAccountID != nil {
22266 objectMap["targetBootDiagnosticsStorageAccountId"] = vmcemi.TargetBootDiagnosticsStorageAccountID
22267 }
22268 if vmcemi.PerformAutoResync != nil {
22269 objectMap["performAutoResync"] = vmcemi.PerformAutoResync
22270 }
22271 if vmcemi.InstanceType != "" {
22272 objectMap["instanceType"] = vmcemi.InstanceType
22273 }
22274 return json.Marshal(objectMap)
22275 }
22276
22277
22278 func (vmcemi VMwareCbtEnableMigrationInput) AsVMwareCbtEnableMigrationInput() (*VMwareCbtEnableMigrationInput, bool) {
22279 return &vmcemi, true
22280 }
22281
22282
22283 func (vmcemi VMwareCbtEnableMigrationInput) AsEnableMigrationProviderSpecificInput() (*EnableMigrationProviderSpecificInput, bool) {
22284 return nil, false
22285 }
22286
22287
22288 func (vmcemi VMwareCbtEnableMigrationInput) AsBasicEnableMigrationProviderSpecificInput() (BasicEnableMigrationProviderSpecificInput, bool) {
22289 return &vmcemi, true
22290 }
22291
22292
22293 type VMwareCbtEventDetails struct {
22294
22295 MigrationItemName *string `json:"migrationItemName,omitempty"`
22296
22297 InstanceType InstanceTypeBasicEventProviderSpecificDetails `json:"instanceType,omitempty"`
22298 }
22299
22300
22301 func (vmced VMwareCbtEventDetails) MarshalJSON() ([]byte, error) {
22302 vmced.InstanceType = InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeVMwareCbt
22303 objectMap := make(map[string]interface{})
22304 if vmced.InstanceType != "" {
22305 objectMap["instanceType"] = vmced.InstanceType
22306 }
22307 return json.Marshal(objectMap)
22308 }
22309
22310
22311 func (vmced VMwareCbtEventDetails) AsA2AEventDetails() (*A2AEventDetails, bool) {
22312 return nil, false
22313 }
22314
22315
22316 func (vmced VMwareCbtEventDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) {
22317 return nil, false
22318 }
22319
22320
22321 func (vmced VMwareCbtEventDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) {
22322 return nil, false
22323 }
22324
22325
22326 func (vmced VMwareCbtEventDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) {
22327 return nil, false
22328 }
22329
22330
22331 func (vmced VMwareCbtEventDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) {
22332 return nil, false
22333 }
22334
22335
22336 func (vmced VMwareCbtEventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) {
22337 return nil, false
22338 }
22339
22340
22341 func (vmced VMwareCbtEventDetails) AsVMwareCbtEventDetails() (*VMwareCbtEventDetails, bool) {
22342 return &vmced, true
22343 }
22344
22345
22346 func (vmced VMwareCbtEventDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) {
22347 return nil, false
22348 }
22349
22350
22351 func (vmced VMwareCbtEventDetails) AsBasicEventProviderSpecificDetails() (BasicEventProviderSpecificDetails, bool) {
22352 return &vmced, true
22353 }
22354
22355
22356 type VMwareCbtMigrateInput struct {
22357
22358 PerformShutdown *string `json:"performShutdown,omitempty"`
22359
22360 InstanceType InstanceTypeBasicMigrateProviderSpecificInput `json:"instanceType,omitempty"`
22361 }
22362
22363
22364 func (vmcmi VMwareCbtMigrateInput) MarshalJSON() ([]byte, error) {
22365 vmcmi.InstanceType = InstanceTypeBasicMigrateProviderSpecificInputInstanceTypeVMwareCbt
22366 objectMap := make(map[string]interface{})
22367 if vmcmi.PerformShutdown != nil {
22368 objectMap["performShutdown"] = vmcmi.PerformShutdown
22369 }
22370 if vmcmi.InstanceType != "" {
22371 objectMap["instanceType"] = vmcmi.InstanceType
22372 }
22373 return json.Marshal(objectMap)
22374 }
22375
22376
22377 func (vmcmi VMwareCbtMigrateInput) AsVMwareCbtMigrateInput() (*VMwareCbtMigrateInput, bool) {
22378 return &vmcmi, true
22379 }
22380
22381
22382 func (vmcmi VMwareCbtMigrateInput) AsMigrateProviderSpecificInput() (*MigrateProviderSpecificInput, bool) {
22383 return nil, false
22384 }
22385
22386
22387 func (vmcmi VMwareCbtMigrateInput) AsBasicMigrateProviderSpecificInput() (BasicMigrateProviderSpecificInput, bool) {
22388 return &vmcmi, true
22389 }
22390
22391
22392 type VMwareCbtMigrationDetails struct {
22393
22394 VmwareMachineID *string `json:"vmwareMachineId,omitempty"`
22395
22396 OsType *string `json:"osType,omitempty"`
22397
22398 FirmwareType *string `json:"firmwareType,omitempty"`
22399
22400 TargetGeneration *string `json:"targetGeneration,omitempty"`
22401
22402 LicenseType *string `json:"licenseType,omitempty"`
22403
22404 DataMoverRunAsAccountID *string `json:"dataMoverRunAsAccountId,omitempty"`
22405
22406 SnapshotRunAsAccountID *string `json:"snapshotRunAsAccountId,omitempty"`
22407
22408 TargetVMName *string `json:"targetVmName,omitempty"`
22409
22410 TargetVMSize *string `json:"targetVmSize,omitempty"`
22411
22412 TargetLocation *string `json:"targetLocation,omitempty"`
22413
22414 TargetResourceGroupID *string `json:"targetResourceGroupId,omitempty"`
22415
22416 TargetAvailabilitySetID *string `json:"targetAvailabilitySetId,omitempty"`
22417
22418 TargetAvailabilityZone *string `json:"targetAvailabilityZone,omitempty"`
22419
22420 TargetBootDiagnosticsStorageAccountID *string `json:"targetBootDiagnosticsStorageAccountId,omitempty"`
22421
22422 ProtectedDisks *[]VMwareCbtProtectedDiskDetails `json:"protectedDisks,omitempty"`
22423
22424 TargetNetworkID *string `json:"targetNetworkId,omitempty"`
22425
22426 VMNics *[]VMwareCbtNicDetails `json:"vmNics,omitempty"`
22427
22428 MigrationRecoveryPointID *string `json:"migrationRecoveryPointId,omitempty"`
22429
22430 LastRecoveryPointReceived *date.Time `json:"lastRecoveryPointReceived,omitempty"`
22431
22432 LastRecoveryPointID *string `json:"lastRecoveryPointId,omitempty"`
22433
22434 InitialSeedingProgressPercentage *int32 `json:"initialSeedingProgressPercentage,omitempty"`
22435
22436 MigrationProgressPercentage *int32 `json:"migrationProgressPercentage,omitempty"`
22437
22438 ResyncProgressPercentage *int32 `json:"resyncProgressPercentage,omitempty"`
22439
22440 ResyncRequired *string `json:"resyncRequired,omitempty"`
22441
22442 ResyncState ResyncState `json:"resyncState,omitempty"`
22443
22444 PerformAutoResync *string `json:"performAutoResync,omitempty"`
22445
22446 InstanceType InstanceTypeBasicMigrationProviderSpecificSettings `json:"instanceType,omitempty"`
22447 }
22448
22449
22450 func (vmcmd VMwareCbtMigrationDetails) MarshalJSON() ([]byte, error) {
22451 vmcmd.InstanceType = InstanceTypeBasicMigrationProviderSpecificSettingsInstanceTypeVMwareCbt
22452 objectMap := make(map[string]interface{})
22453 if vmcmd.LicenseType != nil {
22454 objectMap["licenseType"] = vmcmd.LicenseType
22455 }
22456 if vmcmd.TargetVMName != nil {
22457 objectMap["targetVmName"] = vmcmd.TargetVMName
22458 }
22459 if vmcmd.TargetVMSize != nil {
22460 objectMap["targetVmSize"] = vmcmd.TargetVMSize
22461 }
22462 if vmcmd.TargetResourceGroupID != nil {
22463 objectMap["targetResourceGroupId"] = vmcmd.TargetResourceGroupID
22464 }
22465 if vmcmd.TargetAvailabilitySetID != nil {
22466 objectMap["targetAvailabilitySetId"] = vmcmd.TargetAvailabilitySetID
22467 }
22468 if vmcmd.TargetAvailabilityZone != nil {
22469 objectMap["targetAvailabilityZone"] = vmcmd.TargetAvailabilityZone
22470 }
22471 if vmcmd.TargetBootDiagnosticsStorageAccountID != nil {
22472 objectMap["targetBootDiagnosticsStorageAccountId"] = vmcmd.TargetBootDiagnosticsStorageAccountID
22473 }
22474 if vmcmd.ProtectedDisks != nil {
22475 objectMap["protectedDisks"] = vmcmd.ProtectedDisks
22476 }
22477 if vmcmd.TargetNetworkID != nil {
22478 objectMap["targetNetworkId"] = vmcmd.TargetNetworkID
22479 }
22480 if vmcmd.VMNics != nil {
22481 objectMap["vmNics"] = vmcmd.VMNics
22482 }
22483 if vmcmd.PerformAutoResync != nil {
22484 objectMap["performAutoResync"] = vmcmd.PerformAutoResync
22485 }
22486 if vmcmd.InstanceType != "" {
22487 objectMap["instanceType"] = vmcmd.InstanceType
22488 }
22489 return json.Marshal(objectMap)
22490 }
22491
22492
22493 func (vmcmd VMwareCbtMigrationDetails) AsVMwareCbtMigrationDetails() (*VMwareCbtMigrationDetails, bool) {
22494 return &vmcmd, true
22495 }
22496
22497
22498 func (vmcmd VMwareCbtMigrationDetails) AsMigrationProviderSpecificSettings() (*MigrationProviderSpecificSettings, bool) {
22499 return nil, false
22500 }
22501
22502
22503 func (vmcmd VMwareCbtMigrationDetails) AsBasicMigrationProviderSpecificSettings() (BasicMigrationProviderSpecificSettings, bool) {
22504 return &vmcmd, true
22505 }
22506
22507
22508 type VMwareCbtNicDetails struct {
22509
22510 NicID *string `json:"nicId,omitempty"`
22511
22512 IsPrimaryNic *string `json:"isPrimaryNic,omitempty"`
22513
22514 SourceIPAddress *string `json:"sourceIPAddress,omitempty"`
22515
22516 SourceIPAddressType EthernetAddressType `json:"sourceIPAddressType,omitempty"`
22517
22518 SourceNetworkID *string `json:"sourceNetworkId,omitempty"`
22519
22520 TargetIPAddress *string `json:"targetIPAddress,omitempty"`
22521
22522 TargetIPAddressType EthernetAddressType `json:"targetIPAddressType,omitempty"`
22523
22524 TargetSubnetName *string `json:"targetSubnetName,omitempty"`
22525
22526 IsSelectedForMigration *string `json:"isSelectedForMigration,omitempty"`
22527 }
22528
22529
22530 func (vmcnd VMwareCbtNicDetails) MarshalJSON() ([]byte, error) {
22531 objectMap := make(map[string]interface{})
22532 if vmcnd.IsPrimaryNic != nil {
22533 objectMap["isPrimaryNic"] = vmcnd.IsPrimaryNic
22534 }
22535 if vmcnd.TargetIPAddress != nil {
22536 objectMap["targetIPAddress"] = vmcnd.TargetIPAddress
22537 }
22538 if vmcnd.TargetIPAddressType != "" {
22539 objectMap["targetIPAddressType"] = vmcnd.TargetIPAddressType
22540 }
22541 if vmcnd.TargetSubnetName != nil {
22542 objectMap["targetSubnetName"] = vmcnd.TargetSubnetName
22543 }
22544 if vmcnd.IsSelectedForMigration != nil {
22545 objectMap["isSelectedForMigration"] = vmcnd.IsSelectedForMigration
22546 }
22547 return json.Marshal(objectMap)
22548 }
22549
22550
22551 type VMwareCbtNicInput struct {
22552
22553 NicID *string `json:"nicId,omitempty"`
22554
22555 IsPrimaryNic *string `json:"isPrimaryNic,omitempty"`
22556
22557 TargetSubnetName *string `json:"targetSubnetName,omitempty"`
22558
22559 TargetStaticIPAddress *string `json:"targetStaticIPAddress,omitempty"`
22560
22561 IsSelectedForMigration *string `json:"isSelectedForMigration,omitempty"`
22562 }
22563
22564
22565 type VMwareCbtPolicyCreationInput struct {
22566
22567 RecoveryPointHistoryInMinutes *int32 `json:"recoveryPointHistoryInMinutes,omitempty"`
22568
22569 CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"`
22570
22571 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"`
22572
22573 InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"`
22574 }
22575
22576
22577 func (vmcpci VMwareCbtPolicyCreationInput) MarshalJSON() ([]byte, error) {
22578 vmcpci.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeVMwareCbt
22579 objectMap := make(map[string]interface{})
22580 if vmcpci.RecoveryPointHistoryInMinutes != nil {
22581 objectMap["recoveryPointHistoryInMinutes"] = vmcpci.RecoveryPointHistoryInMinutes
22582 }
22583 if vmcpci.CrashConsistentFrequencyInMinutes != nil {
22584 objectMap["crashConsistentFrequencyInMinutes"] = vmcpci.CrashConsistentFrequencyInMinutes
22585 }
22586 if vmcpci.AppConsistentFrequencyInMinutes != nil {
22587 objectMap["appConsistentFrequencyInMinutes"] = vmcpci.AppConsistentFrequencyInMinutes
22588 }
22589 if vmcpci.InstanceType != "" {
22590 objectMap["instanceType"] = vmcpci.InstanceType
22591 }
22592 return json.Marshal(objectMap)
22593 }
22594
22595
22596 func (vmcpci VMwareCbtPolicyCreationInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) {
22597 return nil, false
22598 }
22599
22600
22601 func (vmcpci VMwareCbtPolicyCreationInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) {
22602 return nil, false
22603 }
22604
22605
22606 func (vmcpci VMwareCbtPolicyCreationInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) {
22607 return nil, false
22608 }
22609
22610
22611 func (vmcpci VMwareCbtPolicyCreationInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) {
22612 return nil, false
22613 }
22614
22615
22616 func (vmcpci VMwareCbtPolicyCreationInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) {
22617 return nil, false
22618 }
22619
22620
22621 func (vmcpci VMwareCbtPolicyCreationInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) {
22622 return nil, false
22623 }
22624
22625
22626 func (vmcpci VMwareCbtPolicyCreationInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) {
22627 return &vmcpci, true
22628 }
22629
22630
22631 func (vmcpci VMwareCbtPolicyCreationInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) {
22632 return nil, false
22633 }
22634
22635
22636 func (vmcpci VMwareCbtPolicyCreationInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) {
22637 return &vmcpci, true
22638 }
22639
22640
22641 type VmwareCbtPolicyDetails struct {
22642
22643 RecoveryPointHistoryInMinutes *int32 `json:"recoveryPointHistoryInMinutes,omitempty"`
22644
22645 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"`
22646
22647 CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"`
22648
22649 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"`
22650 }
22651
22652
22653 func (vcpd VmwareCbtPolicyDetails) MarshalJSON() ([]byte, error) {
22654 vcpd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt
22655 objectMap := make(map[string]interface{})
22656 if vcpd.RecoveryPointHistoryInMinutes != nil {
22657 objectMap["recoveryPointHistoryInMinutes"] = vcpd.RecoveryPointHistoryInMinutes
22658 }
22659 if vcpd.AppConsistentFrequencyInMinutes != nil {
22660 objectMap["appConsistentFrequencyInMinutes"] = vcpd.AppConsistentFrequencyInMinutes
22661 }
22662 if vcpd.CrashConsistentFrequencyInMinutes != nil {
22663 objectMap["crashConsistentFrequencyInMinutes"] = vcpd.CrashConsistentFrequencyInMinutes
22664 }
22665 if vcpd.InstanceType != "" {
22666 objectMap["instanceType"] = vcpd.InstanceType
22667 }
22668 return json.Marshal(objectMap)
22669 }
22670
22671
22672 func (vcpd VmwareCbtPolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) {
22673 return nil, false
22674 }
22675
22676
22677 func (vcpd VmwareCbtPolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) {
22678 return nil, false
22679 }
22680
22681
22682 func (vcpd VmwareCbtPolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) {
22683 return nil, false
22684 }
22685
22686
22687 func (vcpd VmwareCbtPolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) {
22688 return nil, false
22689 }
22690
22691
22692 func (vcpd VmwareCbtPolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) {
22693 return nil, false
22694 }
22695
22696
22697 func (vcpd VmwareCbtPolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) {
22698 return nil, false
22699 }
22700
22701
22702 func (vcpd VmwareCbtPolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) {
22703 return nil, false
22704 }
22705
22706
22707 func (vcpd VmwareCbtPolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) {
22708 return nil, false
22709 }
22710
22711
22712 func (vcpd VmwareCbtPolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) {
22713 return nil, false
22714 }
22715
22716
22717 func (vcpd VmwareCbtPolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) {
22718 return &vcpd, true
22719 }
22720
22721
22722 func (vcpd VmwareCbtPolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) {
22723 return nil, false
22724 }
22725
22726
22727 func (vcpd VmwareCbtPolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) {
22728 return &vcpd, true
22729 }
22730
22731
22732 type VMwareCbtProtectedDiskDetails struct {
22733
22734 DiskID *string `json:"diskId,omitempty"`
22735
22736 DiskName *string `json:"diskName,omitempty"`
22737
22738 DiskPath *string `json:"diskPath,omitempty"`
22739
22740 IsOSDisk *string `json:"isOSDisk,omitempty"`
22741
22742 CapacityInBytes *int64 `json:"capacityInBytes,omitempty"`
22743
22744 LogStorageAccountID *string `json:"logStorageAccountId,omitempty"`
22745
22746 LogStorageAccountSasSecretName *string `json:"logStorageAccountSasSecretName,omitempty"`
22747
22748 DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`
22749
22750 SeedManagedDiskID *string `json:"seedManagedDiskId,omitempty"`
22751
22752 TargetManagedDiskID *string `json:"targetManagedDiskId,omitempty"`
22753
22754 DiskType DiskAccountType `json:"diskType,omitempty"`
22755 }
22756
22757
22758 func (vmcpdd VMwareCbtProtectedDiskDetails) MarshalJSON() ([]byte, error) {
22759 objectMap := make(map[string]interface{})
22760 if vmcpdd.DiskType != "" {
22761 objectMap["diskType"] = vmcpdd.DiskType
22762 }
22763 return json.Marshal(objectMap)
22764 }
22765
22766
22767 type VMwareCbtProtectionContainerMappingDetails struct {
22768
22769 KeyVaultID *string `json:"keyVaultId,omitempty"`
22770
22771 KeyVaultURI *string `json:"keyVaultUri,omitempty"`
22772
22773 StorageAccountID *string `json:"storageAccountId,omitempty"`
22774
22775 StorageAccountSasSecretName *string `json:"storageAccountSasSecretName,omitempty"`
22776
22777 ServiceBusConnectionStringSecretName *string `json:"serviceBusConnectionStringSecretName,omitempty"`
22778
22779 TargetLocation *string `json:"targetLocation,omitempty"`
22780
22781 InstanceType InstanceTypeBasicProtectionContainerMappingProviderSpecificDetails `json:"instanceType,omitempty"`
22782 }
22783
22784
22785 func (vmcpcmd VMwareCbtProtectionContainerMappingDetails) MarshalJSON() ([]byte, error) {
22786 vmcpcmd.InstanceType = InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeVMwareCbt
22787 objectMap := make(map[string]interface{})
22788 if vmcpcmd.InstanceType != "" {
22789 objectMap["instanceType"] = vmcpcmd.InstanceType
22790 }
22791 return json.Marshal(objectMap)
22792 }
22793
22794
22795 func (vmcpcmd VMwareCbtProtectionContainerMappingDetails) AsA2AProtectionContainerMappingDetails() (*A2AProtectionContainerMappingDetails, bool) {
22796 return nil, false
22797 }
22798
22799
22800 func (vmcpcmd VMwareCbtProtectionContainerMappingDetails) AsVMwareCbtProtectionContainerMappingDetails() (*VMwareCbtProtectionContainerMappingDetails, bool) {
22801 return &vmcpcmd, true
22802 }
22803
22804
22805 func (vmcpcmd VMwareCbtProtectionContainerMappingDetails) AsProtectionContainerMappingProviderSpecificDetails() (*ProtectionContainerMappingProviderSpecificDetails, bool) {
22806 return nil, false
22807 }
22808
22809
22810 func (vmcpcmd VMwareCbtProtectionContainerMappingDetails) AsBasicProtectionContainerMappingProviderSpecificDetails() (BasicProtectionContainerMappingProviderSpecificDetails, bool) {
22811 return &vmcpcmd, true
22812 }
22813
22814
22815 type VMwareCbtResyncInput struct {
22816
22817 SkipCbtReset *string `json:"skipCbtReset,omitempty"`
22818
22819 InstanceType InstanceTypeBasicResyncProviderSpecificInput `json:"instanceType,omitempty"`
22820 }
22821
22822
22823 func (vmcri VMwareCbtResyncInput) MarshalJSON() ([]byte, error) {
22824 vmcri.InstanceType = InstanceTypeBasicResyncProviderSpecificInputInstanceTypeVMwareCbt
22825 objectMap := make(map[string]interface{})
22826 if vmcri.SkipCbtReset != nil {
22827 objectMap["skipCbtReset"] = vmcri.SkipCbtReset
22828 }
22829 if vmcri.InstanceType != "" {
22830 objectMap["instanceType"] = vmcri.InstanceType
22831 }
22832 return json.Marshal(objectMap)
22833 }
22834
22835
22836 func (vmcri VMwareCbtResyncInput) AsVMwareCbtResyncInput() (*VMwareCbtResyncInput, bool) {
22837 return &vmcri, true
22838 }
22839
22840
22841 func (vmcri VMwareCbtResyncInput) AsResyncProviderSpecificInput() (*ResyncProviderSpecificInput, bool) {
22842 return nil, false
22843 }
22844
22845
22846 func (vmcri VMwareCbtResyncInput) AsBasicResyncProviderSpecificInput() (BasicResyncProviderSpecificInput, bool) {
22847 return &vmcri, true
22848 }
22849
22850
22851 type VMwareCbtTestMigrateInput struct {
22852
22853 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
22854
22855 NetworkID *string `json:"networkId,omitempty"`
22856
22857 InstanceType InstanceTypeBasicTestMigrateProviderSpecificInput `json:"instanceType,omitempty"`
22858 }
22859
22860
22861 func (vmctmi VMwareCbtTestMigrateInput) MarshalJSON() ([]byte, error) {
22862 vmctmi.InstanceType = InstanceTypeBasicTestMigrateProviderSpecificInputInstanceTypeVMwareCbt
22863 objectMap := make(map[string]interface{})
22864 if vmctmi.RecoveryPointID != nil {
22865 objectMap["recoveryPointId"] = vmctmi.RecoveryPointID
22866 }
22867 if vmctmi.NetworkID != nil {
22868 objectMap["networkId"] = vmctmi.NetworkID
22869 }
22870 if vmctmi.InstanceType != "" {
22871 objectMap["instanceType"] = vmctmi.InstanceType
22872 }
22873 return json.Marshal(objectMap)
22874 }
22875
22876
22877 func (vmctmi VMwareCbtTestMigrateInput) AsVMwareCbtTestMigrateInput() (*VMwareCbtTestMigrateInput, bool) {
22878 return &vmctmi, true
22879 }
22880
22881
22882 func (vmctmi VMwareCbtTestMigrateInput) AsTestMigrateProviderSpecificInput() (*TestMigrateProviderSpecificInput, bool) {
22883 return nil, false
22884 }
22885
22886
22887 func (vmctmi VMwareCbtTestMigrateInput) AsBasicTestMigrateProviderSpecificInput() (BasicTestMigrateProviderSpecificInput, bool) {
22888 return &vmctmi, true
22889 }
22890
22891
22892 type VMwareCbtUpdateMigrationItemInput struct {
22893
22894 TargetVMName *string `json:"targetVmName,omitempty"`
22895
22896 TargetVMSize *string `json:"targetVmSize,omitempty"`
22897
22898 TargetResourceGroupID *string `json:"targetResourceGroupId,omitempty"`
22899
22900 TargetAvailabilitySetID *string `json:"targetAvailabilitySetId,omitempty"`
22901
22902 TargetAvailabilityZone *string `json:"targetAvailabilityZone,omitempty"`
22903
22904 TargetBootDiagnosticsStorageAccountID *string `json:"targetBootDiagnosticsStorageAccountId,omitempty"`
22905
22906 TargetNetworkID *string `json:"targetNetworkId,omitempty"`
22907
22908 VMNics *[]VMwareCbtNicInput `json:"vmNics,omitempty"`
22909
22910 LicenseType LicenseType `json:"licenseType,omitempty"`
22911
22912 PerformAutoResync *string `json:"performAutoResync,omitempty"`
22913
22914 InstanceType InstanceTypeBasicUpdateMigrationItemProviderSpecificInput `json:"instanceType,omitempty"`
22915 }
22916
22917
22918 func (vmcumii VMwareCbtUpdateMigrationItemInput) MarshalJSON() ([]byte, error) {
22919 vmcumii.InstanceType = InstanceTypeBasicUpdateMigrationItemProviderSpecificInputInstanceTypeVMwareCbt
22920 objectMap := make(map[string]interface{})
22921 if vmcumii.TargetVMName != nil {
22922 objectMap["targetVmName"] = vmcumii.TargetVMName
22923 }
22924 if vmcumii.TargetVMSize != nil {
22925 objectMap["targetVmSize"] = vmcumii.TargetVMSize
22926 }
22927 if vmcumii.TargetResourceGroupID != nil {
22928 objectMap["targetResourceGroupId"] = vmcumii.TargetResourceGroupID
22929 }
22930 if vmcumii.TargetAvailabilitySetID != nil {
22931 objectMap["targetAvailabilitySetId"] = vmcumii.TargetAvailabilitySetID
22932 }
22933 if vmcumii.TargetAvailabilityZone != nil {
22934 objectMap["targetAvailabilityZone"] = vmcumii.TargetAvailabilityZone
22935 }
22936 if vmcumii.TargetBootDiagnosticsStorageAccountID != nil {
22937 objectMap["targetBootDiagnosticsStorageAccountId"] = vmcumii.TargetBootDiagnosticsStorageAccountID
22938 }
22939 if vmcumii.TargetNetworkID != nil {
22940 objectMap["targetNetworkId"] = vmcumii.TargetNetworkID
22941 }
22942 if vmcumii.VMNics != nil {
22943 objectMap["vmNics"] = vmcumii.VMNics
22944 }
22945 if vmcumii.LicenseType != "" {
22946 objectMap["licenseType"] = vmcumii.LicenseType
22947 }
22948 if vmcumii.PerformAutoResync != nil {
22949 objectMap["performAutoResync"] = vmcumii.PerformAutoResync
22950 }
22951 if vmcumii.InstanceType != "" {
22952 objectMap["instanceType"] = vmcumii.InstanceType
22953 }
22954 return json.Marshal(objectMap)
22955 }
22956
22957
22958 func (vmcumii VMwareCbtUpdateMigrationItemInput) AsVMwareCbtUpdateMigrationItemInput() (*VMwareCbtUpdateMigrationItemInput, bool) {
22959 return &vmcumii, true
22960 }
22961
22962
22963 func (vmcumii VMwareCbtUpdateMigrationItemInput) AsUpdateMigrationItemProviderSpecificInput() (*UpdateMigrationItemProviderSpecificInput, bool) {
22964 return nil, false
22965 }
22966
22967
22968 func (vmcumii VMwareCbtUpdateMigrationItemInput) AsBasicUpdateMigrationItemProviderSpecificInput() (BasicUpdateMigrationItemProviderSpecificInput, bool) {
22969 return &vmcumii, true
22970 }
22971
22972
22973 type VMwareDetails struct {
22974
22975 ProcessServers *[]ProcessServer `json:"processServers,omitempty"`
22976
22977 MasterTargetServers *[]MasterTargetServer `json:"masterTargetServers,omitempty"`
22978
22979 RunAsAccounts *[]RunAsAccount `json:"runAsAccounts,omitempty"`
22980
22981 ReplicationPairCount *string `json:"replicationPairCount,omitempty"`
22982
22983 ProcessServerCount *string `json:"processServerCount,omitempty"`
22984
22985 AgentCount *string `json:"agentCount,omitempty"`
22986
22987 ProtectedServers *string `json:"protectedServers,omitempty"`
22988
22989 SystemLoad *string `json:"systemLoad,omitempty"`
22990
22991 SystemLoadStatus *string `json:"systemLoadStatus,omitempty"`
22992
22993 CPULoad *string `json:"cpuLoad,omitempty"`
22994
22995 CPULoadStatus *string `json:"cpuLoadStatus,omitempty"`
22996
22997 TotalMemoryInBytes *int64 `json:"totalMemoryInBytes,omitempty"`
22998
22999 AvailableMemoryInBytes *int64 `json:"availableMemoryInBytes,omitempty"`
23000
23001 MemoryUsageStatus *string `json:"memoryUsageStatus,omitempty"`
23002
23003 TotalSpaceInBytes *int64 `json:"totalSpaceInBytes,omitempty"`
23004
23005 AvailableSpaceInBytes *int64 `json:"availableSpaceInBytes,omitempty"`
23006
23007 SpaceUsageStatus *string `json:"spaceUsageStatus,omitempty"`
23008
23009 WebLoad *string `json:"webLoad,omitempty"`
23010
23011 WebLoadStatus *string `json:"webLoadStatus,omitempty"`
23012
23013 DatabaseServerLoad *string `json:"databaseServerLoad,omitempty"`
23014
23015 DatabaseServerLoadStatus *string `json:"databaseServerLoadStatus,omitempty"`
23016
23017 CsServiceStatus *string `json:"csServiceStatus,omitempty"`
23018
23019 IPAddress *string `json:"ipAddress,omitempty"`
23020
23021 AgentVersion *string `json:"agentVersion,omitempty"`
23022
23023 HostName *string `json:"hostName,omitempty"`
23024
23025 LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"`
23026
23027 VersionStatus *string `json:"versionStatus,omitempty"`
23028
23029 SslCertExpiryDate *date.Time `json:"sslCertExpiryDate,omitempty"`
23030
23031 SslCertExpiryRemainingDays *int32 `json:"sslCertExpiryRemainingDays,omitempty"`
23032
23033 PsTemplateVersion *string `json:"psTemplateVersion,omitempty"`
23034
23035 AgentExpiryDate *date.Time `json:"agentExpiryDate,omitempty"`
23036
23037 AgentVersionDetails *VersionDetails `json:"agentVersionDetails,omitempty"`
23038
23039 InstanceType InstanceTypeBasicFabricSpecificDetails `json:"instanceType,omitempty"`
23040 }
23041
23042
23043 func (vmd VMwareDetails) MarshalJSON() ([]byte, error) {
23044 vmd.InstanceType = InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMware
23045 objectMap := make(map[string]interface{})
23046 if vmd.ProcessServers != nil {
23047 objectMap["processServers"] = vmd.ProcessServers
23048 }
23049 if vmd.MasterTargetServers != nil {
23050 objectMap["masterTargetServers"] = vmd.MasterTargetServers
23051 }
23052 if vmd.RunAsAccounts != nil {
23053 objectMap["runAsAccounts"] = vmd.RunAsAccounts
23054 }
23055 if vmd.ReplicationPairCount != nil {
23056 objectMap["replicationPairCount"] = vmd.ReplicationPairCount
23057 }
23058 if vmd.ProcessServerCount != nil {
23059 objectMap["processServerCount"] = vmd.ProcessServerCount
23060 }
23061 if vmd.AgentCount != nil {
23062 objectMap["agentCount"] = vmd.AgentCount
23063 }
23064 if vmd.ProtectedServers != nil {
23065 objectMap["protectedServers"] = vmd.ProtectedServers
23066 }
23067 if vmd.SystemLoad != nil {
23068 objectMap["systemLoad"] = vmd.SystemLoad
23069 }
23070 if vmd.SystemLoadStatus != nil {
23071 objectMap["systemLoadStatus"] = vmd.SystemLoadStatus
23072 }
23073 if vmd.CPULoad != nil {
23074 objectMap["cpuLoad"] = vmd.CPULoad
23075 }
23076 if vmd.CPULoadStatus != nil {
23077 objectMap["cpuLoadStatus"] = vmd.CPULoadStatus
23078 }
23079 if vmd.TotalMemoryInBytes != nil {
23080 objectMap["totalMemoryInBytes"] = vmd.TotalMemoryInBytes
23081 }
23082 if vmd.AvailableMemoryInBytes != nil {
23083 objectMap["availableMemoryInBytes"] = vmd.AvailableMemoryInBytes
23084 }
23085 if vmd.MemoryUsageStatus != nil {
23086 objectMap["memoryUsageStatus"] = vmd.MemoryUsageStatus
23087 }
23088 if vmd.TotalSpaceInBytes != nil {
23089 objectMap["totalSpaceInBytes"] = vmd.TotalSpaceInBytes
23090 }
23091 if vmd.AvailableSpaceInBytes != nil {
23092 objectMap["availableSpaceInBytes"] = vmd.AvailableSpaceInBytes
23093 }
23094 if vmd.SpaceUsageStatus != nil {
23095 objectMap["spaceUsageStatus"] = vmd.SpaceUsageStatus
23096 }
23097 if vmd.WebLoad != nil {
23098 objectMap["webLoad"] = vmd.WebLoad
23099 }
23100 if vmd.WebLoadStatus != nil {
23101 objectMap["webLoadStatus"] = vmd.WebLoadStatus
23102 }
23103 if vmd.DatabaseServerLoad != nil {
23104 objectMap["databaseServerLoad"] = vmd.DatabaseServerLoad
23105 }
23106 if vmd.DatabaseServerLoadStatus != nil {
23107 objectMap["databaseServerLoadStatus"] = vmd.DatabaseServerLoadStatus
23108 }
23109 if vmd.CsServiceStatus != nil {
23110 objectMap["csServiceStatus"] = vmd.CsServiceStatus
23111 }
23112 if vmd.IPAddress != nil {
23113 objectMap["ipAddress"] = vmd.IPAddress
23114 }
23115 if vmd.AgentVersion != nil {
23116 objectMap["agentVersion"] = vmd.AgentVersion
23117 }
23118 if vmd.HostName != nil {
23119 objectMap["hostName"] = vmd.HostName
23120 }
23121 if vmd.LastHeartbeat != nil {
23122 objectMap["lastHeartbeat"] = vmd.LastHeartbeat
23123 }
23124 if vmd.VersionStatus != nil {
23125 objectMap["versionStatus"] = vmd.VersionStatus
23126 }
23127 if vmd.SslCertExpiryDate != nil {
23128 objectMap["sslCertExpiryDate"] = vmd.SslCertExpiryDate
23129 }
23130 if vmd.SslCertExpiryRemainingDays != nil {
23131 objectMap["sslCertExpiryRemainingDays"] = vmd.SslCertExpiryRemainingDays
23132 }
23133 if vmd.PsTemplateVersion != nil {
23134 objectMap["psTemplateVersion"] = vmd.PsTemplateVersion
23135 }
23136 if vmd.AgentExpiryDate != nil {
23137 objectMap["agentExpiryDate"] = vmd.AgentExpiryDate
23138 }
23139 if vmd.AgentVersionDetails != nil {
23140 objectMap["agentVersionDetails"] = vmd.AgentVersionDetails
23141 }
23142 if vmd.InstanceType != "" {
23143 objectMap["instanceType"] = vmd.InstanceType
23144 }
23145 return json.Marshal(objectMap)
23146 }
23147
23148
23149 func (vmd VMwareDetails) AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool) {
23150 return nil, false
23151 }
23152
23153
23154 func (vmd VMwareDetails) AsHyperVSiteDetails() (*HyperVSiteDetails, bool) {
23155 return nil, false
23156 }
23157
23158
23159 func (vmd VMwareDetails) AsVmmDetails() (*VmmDetails, bool) {
23160 return nil, false
23161 }
23162
23163
23164 func (vmd VMwareDetails) AsVMwareDetails() (*VMwareDetails, bool) {
23165 return &vmd, true
23166 }
23167
23168
23169 func (vmd VMwareDetails) AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool) {
23170 return nil, false
23171 }
23172
23173
23174 func (vmd VMwareDetails) AsFabricSpecificDetails() (*FabricSpecificDetails, bool) {
23175 return nil, false
23176 }
23177
23178
23179 func (vmd VMwareDetails) AsBasicFabricSpecificDetails() (BasicFabricSpecificDetails, bool) {
23180 return &vmd, true
23181 }
23182
23183
23184 type VMwareV2FabricCreationInput struct {
23185
23186 VmwareSiteID *string `json:"vmwareSiteId,omitempty"`
23187
23188 PhysicalSiteID *string `json:"physicalSiteId,omitempty"`
23189
23190 MigrationSolutionID *string `json:"migrationSolutionId,omitempty"`
23191
23192 InstanceType InstanceTypeBasicFabricSpecificCreationInput `json:"instanceType,omitempty"`
23193 }
23194
23195
23196 func (vmvfci VMwareV2FabricCreationInput) MarshalJSON() ([]byte, error) {
23197 vmvfci.InstanceType = InstanceTypeVMwareV2
23198 objectMap := make(map[string]interface{})
23199 if vmvfci.VmwareSiteID != nil {
23200 objectMap["vmwareSiteId"] = vmvfci.VmwareSiteID
23201 }
23202 if vmvfci.PhysicalSiteID != nil {
23203 objectMap["physicalSiteId"] = vmvfci.PhysicalSiteID
23204 }
23205 if vmvfci.MigrationSolutionID != nil {
23206 objectMap["migrationSolutionId"] = vmvfci.MigrationSolutionID
23207 }
23208 if vmvfci.InstanceType != "" {
23209 objectMap["instanceType"] = vmvfci.InstanceType
23210 }
23211 return json.Marshal(objectMap)
23212 }
23213
23214
23215 func (vmvfci VMwareV2FabricCreationInput) AsAzureFabricCreationInput() (*AzureFabricCreationInput, bool) {
23216 return nil, false
23217 }
23218
23219
23220 func (vmvfci VMwareV2FabricCreationInput) AsVMwareV2FabricCreationInput() (*VMwareV2FabricCreationInput, bool) {
23221 return &vmvfci, true
23222 }
23223
23224
23225 func (vmvfci VMwareV2FabricCreationInput) AsFabricSpecificCreationInput() (*FabricSpecificCreationInput, bool) {
23226 return nil, false
23227 }
23228
23229
23230 func (vmvfci VMwareV2FabricCreationInput) AsBasicFabricSpecificCreationInput() (BasicFabricSpecificCreationInput, bool) {
23231 return &vmvfci, true
23232 }
23233
23234
23235 type VMwareV2FabricSpecificDetails struct {
23236
23237 VmwareSiteID *string `json:"vmwareSiteId,omitempty"`
23238
23239 PhysicalSiteID *string `json:"physicalSiteId,omitempty"`
23240
23241 MigrationSolutionID *string `json:"migrationSolutionId,omitempty"`
23242
23243 ServiceEndpoint *string `json:"serviceEndpoint,omitempty"`
23244
23245 ServiceResourceID *string `json:"serviceResourceId,omitempty"`
23246
23247 InstanceType InstanceTypeBasicFabricSpecificDetails `json:"instanceType,omitempty"`
23248 }
23249
23250
23251 func (vmvfsd VMwareV2FabricSpecificDetails) MarshalJSON() ([]byte, error) {
23252 vmvfsd.InstanceType = InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMwareV2
23253 objectMap := make(map[string]interface{})
23254 if vmvfsd.InstanceType != "" {
23255 objectMap["instanceType"] = vmvfsd.InstanceType
23256 }
23257 return json.Marshal(objectMap)
23258 }
23259
23260
23261 func (vmvfsd VMwareV2FabricSpecificDetails) AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool) {
23262 return nil, false
23263 }
23264
23265
23266 func (vmvfsd VMwareV2FabricSpecificDetails) AsHyperVSiteDetails() (*HyperVSiteDetails, bool) {
23267 return nil, false
23268 }
23269
23270
23271 func (vmvfsd VMwareV2FabricSpecificDetails) AsVmmDetails() (*VmmDetails, bool) {
23272 return nil, false
23273 }
23274
23275
23276 func (vmvfsd VMwareV2FabricSpecificDetails) AsVMwareDetails() (*VMwareDetails, bool) {
23277 return nil, false
23278 }
23279
23280
23281 func (vmvfsd VMwareV2FabricSpecificDetails) AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool) {
23282 return &vmvfsd, true
23283 }
23284
23285
23286 func (vmvfsd VMwareV2FabricSpecificDetails) AsFabricSpecificDetails() (*FabricSpecificDetails, bool) {
23287 return nil, false
23288 }
23289
23290
23291 func (vmvfsd VMwareV2FabricSpecificDetails) AsBasicFabricSpecificDetails() (BasicFabricSpecificDetails, bool) {
23292 return &vmvfsd, true
23293 }
23294
23295
23296 type VMwareVirtualMachineDetails struct {
23297
23298 AgentGeneratedID *string `json:"agentGeneratedId,omitempty"`
23299
23300 AgentInstalled *string `json:"agentInstalled,omitempty"`
23301
23302 OsType *string `json:"osType,omitempty"`
23303
23304 AgentVersion *string `json:"agentVersion,omitempty"`
23305
23306 IPAddress *string `json:"ipAddress,omitempty"`
23307
23308 PoweredOn *string `json:"poweredOn,omitempty"`
23309
23310 VCenterInfrastructureID *string `json:"vCenterInfrastructureId,omitempty"`
23311
23312 DiscoveryType *string `json:"discoveryType,omitempty"`
23313
23314 DiskDetails *[]InMageDiskDetails `json:"diskDetails,omitempty"`
23315
23316 ValidationErrors *[]HealthError `json:"validationErrors,omitempty"`
23317
23318 InstanceType InstanceTypeBasicConfigurationSettings `json:"instanceType,omitempty"`
23319 }
23320
23321
23322 func (vmvmd VMwareVirtualMachineDetails) MarshalJSON() ([]byte, error) {
23323 vmvmd.InstanceType = InstanceTypeVMwareVirtualMachine
23324 objectMap := make(map[string]interface{})
23325 if vmvmd.AgentGeneratedID != nil {
23326 objectMap["agentGeneratedId"] = vmvmd.AgentGeneratedID
23327 }
23328 if vmvmd.AgentInstalled != nil {
23329 objectMap["agentInstalled"] = vmvmd.AgentInstalled
23330 }
23331 if vmvmd.OsType != nil {
23332 objectMap["osType"] = vmvmd.OsType
23333 }
23334 if vmvmd.AgentVersion != nil {
23335 objectMap["agentVersion"] = vmvmd.AgentVersion
23336 }
23337 if vmvmd.IPAddress != nil {
23338 objectMap["ipAddress"] = vmvmd.IPAddress
23339 }
23340 if vmvmd.PoweredOn != nil {
23341 objectMap["poweredOn"] = vmvmd.PoweredOn
23342 }
23343 if vmvmd.VCenterInfrastructureID != nil {
23344 objectMap["vCenterInfrastructureId"] = vmvmd.VCenterInfrastructureID
23345 }
23346 if vmvmd.DiscoveryType != nil {
23347 objectMap["discoveryType"] = vmvmd.DiscoveryType
23348 }
23349 if vmvmd.DiskDetails != nil {
23350 objectMap["diskDetails"] = vmvmd.DiskDetails
23351 }
23352 if vmvmd.ValidationErrors != nil {
23353 objectMap["validationErrors"] = vmvmd.ValidationErrors
23354 }
23355 if vmvmd.InstanceType != "" {
23356 objectMap["instanceType"] = vmvmd.InstanceType
23357 }
23358 return json.Marshal(objectMap)
23359 }
23360
23361
23362 func (vmvmd VMwareVirtualMachineDetails) AsHyperVVirtualMachineDetails() (*HyperVVirtualMachineDetails, bool) {
23363 return nil, false
23364 }
23365
23366
23367 func (vmvmd VMwareVirtualMachineDetails) AsReplicationGroupDetails() (*ReplicationGroupDetails, bool) {
23368 return nil, false
23369 }
23370
23371
23372 func (vmvmd VMwareVirtualMachineDetails) AsVmmVirtualMachineDetails() (*VmmVirtualMachineDetails, bool) {
23373 return nil, false
23374 }
23375
23376
23377 func (vmvmd VMwareVirtualMachineDetails) AsVMwareVirtualMachineDetails() (*VMwareVirtualMachineDetails, bool) {
23378 return &vmvmd, true
23379 }
23380
23381
23382 func (vmvmd VMwareVirtualMachineDetails) AsConfigurationSettings() (*ConfigurationSettings, bool) {
23383 return nil, false
23384 }
23385
23386
23387 func (vmvmd VMwareVirtualMachineDetails) AsBasicConfigurationSettings() (BasicConfigurationSettings, bool) {
23388 return &vmvmd, true
23389 }
23390
View as plain text