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-07-10/siterecovery"
22
23
24 type A2AAddDisksInput struct {
25
26 VMDisks *[]A2AVMDiskInputDetails `json:"vmDisks,omitempty"`
27
28 VMManagedDisks *[]A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"`
29
30 InstanceType InstanceType `json:"instanceType,omitempty"`
31 }
32
33
34 func (aadi A2AAddDisksInput) MarshalJSON() ([]byte, error) {
35 aadi.InstanceType = InstanceTypeA2A
36 objectMap := make(map[string]interface{})
37 if aadi.VMDisks != nil {
38 objectMap["vmDisks"] = aadi.VMDisks
39 }
40 if aadi.VMManagedDisks != nil {
41 objectMap["vmManagedDisks"] = aadi.VMManagedDisks
42 }
43 if aadi.InstanceType != "" {
44 objectMap["instanceType"] = aadi.InstanceType
45 }
46 return json.Marshal(objectMap)
47 }
48
49
50 func (aadi A2AAddDisksInput) AsA2AAddDisksInput() (*A2AAddDisksInput, bool) {
51 return &aadi, true
52 }
53
54
55 func (aadi A2AAddDisksInput) AsAddDisksProviderSpecificInput() (*AddDisksProviderSpecificInput, bool) {
56 return nil, false
57 }
58
59
60 func (aadi A2AAddDisksInput) AsBasicAddDisksProviderSpecificInput() (BasicAddDisksProviderSpecificInput, bool) {
61 return &aadi, true
62 }
63
64
65 type A2AApplyRecoveryPointInput struct {
66
67 InstanceType InstanceTypeBasicApplyRecoveryPointProviderSpecificInput `json:"instanceType,omitempty"`
68 }
69
70
71 func (aarpi A2AApplyRecoveryPointInput) MarshalJSON() ([]byte, error) {
72 aarpi.InstanceType = InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeA2A
73 objectMap := make(map[string]interface{})
74 if aarpi.InstanceType != "" {
75 objectMap["instanceType"] = aarpi.InstanceType
76 }
77 return json.Marshal(objectMap)
78 }
79
80
81 func (aarpi A2AApplyRecoveryPointInput) AsA2AApplyRecoveryPointInput() (*A2AApplyRecoveryPointInput, bool) {
82 return &aarpi, true
83 }
84
85
86 func (aarpi A2AApplyRecoveryPointInput) AsHyperVReplicaAzureApplyRecoveryPointInput() (*HyperVReplicaAzureApplyRecoveryPointInput, bool) {
87 return nil, false
88 }
89
90
91 func (aarpi A2AApplyRecoveryPointInput) AsInMageAzureV2ApplyRecoveryPointInput() (*InMageAzureV2ApplyRecoveryPointInput, bool) {
92 return nil, false
93 }
94
95
96 func (aarpi A2AApplyRecoveryPointInput) AsInMageRcmApplyRecoveryPointInput() (*InMageRcmApplyRecoveryPointInput, bool) {
97 return nil, false
98 }
99
100
101 func (aarpi A2AApplyRecoveryPointInput) AsApplyRecoveryPointProviderSpecificInput() (*ApplyRecoveryPointProviderSpecificInput, bool) {
102 return nil, false
103 }
104
105
106 func (aarpi A2AApplyRecoveryPointInput) AsBasicApplyRecoveryPointProviderSpecificInput() (BasicApplyRecoveryPointProviderSpecificInput, bool) {
107 return &aarpi, true
108 }
109
110
111 type A2AContainerCreationInput struct {
112
113 InstanceType InstanceTypeBasicReplicationProviderSpecificContainerCreationInput `json:"instanceType,omitempty"`
114 }
115
116
117 func (acci A2AContainerCreationInput) MarshalJSON() ([]byte, error) {
118 acci.InstanceType = InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeA2A
119 objectMap := make(map[string]interface{})
120 if acci.InstanceType != "" {
121 objectMap["instanceType"] = acci.InstanceType
122 }
123 return json.Marshal(objectMap)
124 }
125
126
127 func (acci A2AContainerCreationInput) AsA2AContainerCreationInput() (*A2AContainerCreationInput, bool) {
128 return &acci, true
129 }
130
131
132 func (acci A2AContainerCreationInput) AsVMwareCbtContainerCreationInput() (*VMwareCbtContainerCreationInput, bool) {
133 return nil, false
134 }
135
136
137 func (acci A2AContainerCreationInput) AsReplicationProviderSpecificContainerCreationInput() (*ReplicationProviderSpecificContainerCreationInput, bool) {
138 return nil, false
139 }
140
141
142 func (acci A2AContainerCreationInput) AsBasicReplicationProviderSpecificContainerCreationInput() (BasicReplicationProviderSpecificContainerCreationInput, bool) {
143 return &acci, true
144 }
145
146
147 type A2AContainerMappingInput struct {
148
149 AgentAutoUpdateStatus AgentAutoUpdateStatus `json:"agentAutoUpdateStatus,omitempty"`
150
151 AutomationAccountArmID *string `json:"automationAccountArmId,omitempty"`
152
153 InstanceType InstanceTypeBasicReplicationProviderSpecificContainerMappingInput `json:"instanceType,omitempty"`
154 }
155
156
157 func (acmi A2AContainerMappingInput) MarshalJSON() ([]byte, error) {
158 acmi.InstanceType = InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeA2A
159 objectMap := make(map[string]interface{})
160 if acmi.AgentAutoUpdateStatus != "" {
161 objectMap["agentAutoUpdateStatus"] = acmi.AgentAutoUpdateStatus
162 }
163 if acmi.AutomationAccountArmID != nil {
164 objectMap["automationAccountArmId"] = acmi.AutomationAccountArmID
165 }
166 if acmi.InstanceType != "" {
167 objectMap["instanceType"] = acmi.InstanceType
168 }
169 return json.Marshal(objectMap)
170 }
171
172
173 func (acmi A2AContainerMappingInput) AsA2AContainerMappingInput() (*A2AContainerMappingInput, bool) {
174 return &acmi, true
175 }
176
177
178 func (acmi A2AContainerMappingInput) AsVMwareCbtContainerMappingInput() (*VMwareCbtContainerMappingInput, bool) {
179 return nil, false
180 }
181
182
183 func (acmi A2AContainerMappingInput) AsReplicationProviderSpecificContainerMappingInput() (*ReplicationProviderSpecificContainerMappingInput, bool) {
184 return nil, false
185 }
186
187
188 func (acmi A2AContainerMappingInput) AsBasicReplicationProviderSpecificContainerMappingInput() (BasicReplicationProviderSpecificContainerMappingInput, bool) {
189 return &acmi, true
190 }
191
192
193 type A2ACreateProtectionIntentInput struct {
194
195 FabricObjectID *string `json:"fabricObjectId,omitempty"`
196
197 PrimaryLocation *string `json:"primaryLocation,omitempty"`
198
199 RecoveryLocation *string `json:"recoveryLocation,omitempty"`
200
201 RecoverySubscriptionID *string `json:"recoverySubscriptionId,omitempty"`
202
203 RecoveryAvailabilityType A2ARecoveryAvailabilityType `json:"recoveryAvailabilityType,omitempty"`
204
205 ProtectionProfileCustomInput BasicProtectionProfileCustomDetails `json:"protectionProfileCustomInput,omitempty"`
206
207 RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"`
208
209 PrimaryStagingStorageAccountCustomInput BasicStorageAccountCustomDetails `json:"primaryStagingStorageAccountCustomInput,omitempty"`
210
211 RecoveryAvailabilitySetCustomInput BasicRecoveryAvailabilitySetCustomDetails `json:"recoveryAvailabilitySetCustomInput,omitempty"`
212
213 RecoveryVirtualNetworkCustomInput BasicRecoveryVirtualNetworkCustomDetails `json:"recoveryVirtualNetworkCustomInput,omitempty"`
214
215 RecoveryProximityPlacementGroupCustomInput BasicRecoveryProximityPlacementGroupCustomDetails `json:"recoveryProximityPlacementGroupCustomInput,omitempty"`
216
217 AutoProtectionOfDataDisk AutoProtectionOfDataDisk `json:"autoProtectionOfDataDisk,omitempty"`
218
219 VMDisks *[]A2AProtectionIntentDiskInputDetails `json:"vmDisks,omitempty"`
220
221 VMManagedDisks *[]A2AProtectionIntentManagedDiskInputDetails `json:"vmManagedDisks,omitempty"`
222
223 MultiVMGroupName *string `json:"multiVmGroupName,omitempty"`
224
225 MultiVMGroupID *string `json:"multiVmGroupId,omitempty"`
226
227 RecoveryBootDiagStorageAccount BasicStorageAccountCustomDetails `json:"recoveryBootDiagStorageAccount,omitempty"`
228
229 DiskEncryptionInfo *DiskEncryptionInfo `json:"diskEncryptionInfo,omitempty"`
230
231 RecoveryAvailabilityZone *string `json:"recoveryAvailabilityZone,omitempty"`
232
233 InstanceType InstanceTypeBasicCreateProtectionIntentProviderSpecificDetails `json:"instanceType,omitempty"`
234 }
235
236
237 func (acpii A2ACreateProtectionIntentInput) MarshalJSON() ([]byte, error) {
238 acpii.InstanceType = InstanceTypeBasicCreateProtectionIntentProviderSpecificDetailsInstanceTypeA2A
239 objectMap := make(map[string]interface{})
240 if acpii.FabricObjectID != nil {
241 objectMap["fabricObjectId"] = acpii.FabricObjectID
242 }
243 if acpii.PrimaryLocation != nil {
244 objectMap["primaryLocation"] = acpii.PrimaryLocation
245 }
246 if acpii.RecoveryLocation != nil {
247 objectMap["recoveryLocation"] = acpii.RecoveryLocation
248 }
249 if acpii.RecoverySubscriptionID != nil {
250 objectMap["recoverySubscriptionId"] = acpii.RecoverySubscriptionID
251 }
252 if acpii.RecoveryAvailabilityType != "" {
253 objectMap["recoveryAvailabilityType"] = acpii.RecoveryAvailabilityType
254 }
255 objectMap["protectionProfileCustomInput"] = acpii.ProtectionProfileCustomInput
256 if acpii.RecoveryResourceGroupID != nil {
257 objectMap["recoveryResourceGroupId"] = acpii.RecoveryResourceGroupID
258 }
259 objectMap["primaryStagingStorageAccountCustomInput"] = acpii.PrimaryStagingStorageAccountCustomInput
260 objectMap["recoveryAvailabilitySetCustomInput"] = acpii.RecoveryAvailabilitySetCustomInput
261 objectMap["recoveryVirtualNetworkCustomInput"] = acpii.RecoveryVirtualNetworkCustomInput
262 objectMap["recoveryProximityPlacementGroupCustomInput"] = acpii.RecoveryProximityPlacementGroupCustomInput
263 if acpii.AutoProtectionOfDataDisk != "" {
264 objectMap["autoProtectionOfDataDisk"] = acpii.AutoProtectionOfDataDisk
265 }
266 if acpii.VMDisks != nil {
267 objectMap["vmDisks"] = acpii.VMDisks
268 }
269 if acpii.VMManagedDisks != nil {
270 objectMap["vmManagedDisks"] = acpii.VMManagedDisks
271 }
272 if acpii.MultiVMGroupName != nil {
273 objectMap["multiVmGroupName"] = acpii.MultiVMGroupName
274 }
275 if acpii.MultiVMGroupID != nil {
276 objectMap["multiVmGroupId"] = acpii.MultiVMGroupID
277 }
278 objectMap["recoveryBootDiagStorageAccount"] = acpii.RecoveryBootDiagStorageAccount
279 if acpii.DiskEncryptionInfo != nil {
280 objectMap["diskEncryptionInfo"] = acpii.DiskEncryptionInfo
281 }
282 if acpii.RecoveryAvailabilityZone != nil {
283 objectMap["recoveryAvailabilityZone"] = acpii.RecoveryAvailabilityZone
284 }
285 if acpii.InstanceType != "" {
286 objectMap["instanceType"] = acpii.InstanceType
287 }
288 return json.Marshal(objectMap)
289 }
290
291
292 func (acpii A2ACreateProtectionIntentInput) AsA2ACreateProtectionIntentInput() (*A2ACreateProtectionIntentInput, bool) {
293 return &acpii, true
294 }
295
296
297 func (acpii A2ACreateProtectionIntentInput) AsCreateProtectionIntentProviderSpecificDetails() (*CreateProtectionIntentProviderSpecificDetails, bool) {
298 return nil, false
299 }
300
301
302 func (acpii A2ACreateProtectionIntentInput) AsBasicCreateProtectionIntentProviderSpecificDetails() (BasicCreateProtectionIntentProviderSpecificDetails, bool) {
303 return &acpii, true
304 }
305
306
307 func (acpii *A2ACreateProtectionIntentInput) UnmarshalJSON(body []byte) error {
308 var m map[string]*json.RawMessage
309 err := json.Unmarshal(body, &m)
310 if err != nil {
311 return err
312 }
313 for k, v := range m {
314 switch k {
315 case "fabricObjectId":
316 if v != nil {
317 var fabricObjectID string
318 err = json.Unmarshal(*v, &fabricObjectID)
319 if err != nil {
320 return err
321 }
322 acpii.FabricObjectID = &fabricObjectID
323 }
324 case "primaryLocation":
325 if v != nil {
326 var primaryLocation string
327 err = json.Unmarshal(*v, &primaryLocation)
328 if err != nil {
329 return err
330 }
331 acpii.PrimaryLocation = &primaryLocation
332 }
333 case "recoveryLocation":
334 if v != nil {
335 var recoveryLocation string
336 err = json.Unmarshal(*v, &recoveryLocation)
337 if err != nil {
338 return err
339 }
340 acpii.RecoveryLocation = &recoveryLocation
341 }
342 case "recoverySubscriptionId":
343 if v != nil {
344 var recoverySubscriptionID string
345 err = json.Unmarshal(*v, &recoverySubscriptionID)
346 if err != nil {
347 return err
348 }
349 acpii.RecoverySubscriptionID = &recoverySubscriptionID
350 }
351 case "recoveryAvailabilityType":
352 if v != nil {
353 var recoveryAvailabilityType A2ARecoveryAvailabilityType
354 err = json.Unmarshal(*v, &recoveryAvailabilityType)
355 if err != nil {
356 return err
357 }
358 acpii.RecoveryAvailabilityType = recoveryAvailabilityType
359 }
360 case "protectionProfileCustomInput":
361 if v != nil {
362 protectionProfileCustomInput, err := unmarshalBasicProtectionProfileCustomDetails(*v)
363 if err != nil {
364 return err
365 }
366 acpii.ProtectionProfileCustomInput = protectionProfileCustomInput
367 }
368 case "recoveryResourceGroupId":
369 if v != nil {
370 var recoveryResourceGroupID string
371 err = json.Unmarshal(*v, &recoveryResourceGroupID)
372 if err != nil {
373 return err
374 }
375 acpii.RecoveryResourceGroupID = &recoveryResourceGroupID
376 }
377 case "primaryStagingStorageAccountCustomInput":
378 if v != nil {
379 primaryStagingStorageAccountCustomInput, err := unmarshalBasicStorageAccountCustomDetails(*v)
380 if err != nil {
381 return err
382 }
383 acpii.PrimaryStagingStorageAccountCustomInput = primaryStagingStorageAccountCustomInput
384 }
385 case "recoveryAvailabilitySetCustomInput":
386 if v != nil {
387 recoveryAvailabilitySetCustomInput, err := unmarshalBasicRecoveryAvailabilitySetCustomDetails(*v)
388 if err != nil {
389 return err
390 }
391 acpii.RecoveryAvailabilitySetCustomInput = recoveryAvailabilitySetCustomInput
392 }
393 case "recoveryVirtualNetworkCustomInput":
394 if v != nil {
395 recoveryVirtualNetworkCustomInput, err := unmarshalBasicRecoveryVirtualNetworkCustomDetails(*v)
396 if err != nil {
397 return err
398 }
399 acpii.RecoveryVirtualNetworkCustomInput = recoveryVirtualNetworkCustomInput
400 }
401 case "recoveryProximityPlacementGroupCustomInput":
402 if v != nil {
403 recoveryProximityPlacementGroupCustomInput, err := unmarshalBasicRecoveryProximityPlacementGroupCustomDetails(*v)
404 if err != nil {
405 return err
406 }
407 acpii.RecoveryProximityPlacementGroupCustomInput = recoveryProximityPlacementGroupCustomInput
408 }
409 case "autoProtectionOfDataDisk":
410 if v != nil {
411 var autoProtectionOfDataDisk AutoProtectionOfDataDisk
412 err = json.Unmarshal(*v, &autoProtectionOfDataDisk)
413 if err != nil {
414 return err
415 }
416 acpii.AutoProtectionOfDataDisk = autoProtectionOfDataDisk
417 }
418 case "vmDisks":
419 if v != nil {
420 var VMDisks []A2AProtectionIntentDiskInputDetails
421 err = json.Unmarshal(*v, &VMDisks)
422 if err != nil {
423 return err
424 }
425 acpii.VMDisks = &VMDisks
426 }
427 case "vmManagedDisks":
428 if v != nil {
429 var VMManagedDisks []A2AProtectionIntentManagedDiskInputDetails
430 err = json.Unmarshal(*v, &VMManagedDisks)
431 if err != nil {
432 return err
433 }
434 acpii.VMManagedDisks = &VMManagedDisks
435 }
436 case "multiVmGroupName":
437 if v != nil {
438 var multiVMGroupName string
439 err = json.Unmarshal(*v, &multiVMGroupName)
440 if err != nil {
441 return err
442 }
443 acpii.MultiVMGroupName = &multiVMGroupName
444 }
445 case "multiVmGroupId":
446 if v != nil {
447 var multiVMGroupID string
448 err = json.Unmarshal(*v, &multiVMGroupID)
449 if err != nil {
450 return err
451 }
452 acpii.MultiVMGroupID = &multiVMGroupID
453 }
454 case "recoveryBootDiagStorageAccount":
455 if v != nil {
456 recoveryBootDiagStorageAccount, err := unmarshalBasicStorageAccountCustomDetails(*v)
457 if err != nil {
458 return err
459 }
460 acpii.RecoveryBootDiagStorageAccount = recoveryBootDiagStorageAccount
461 }
462 case "diskEncryptionInfo":
463 if v != nil {
464 var diskEncryptionInfo DiskEncryptionInfo
465 err = json.Unmarshal(*v, &diskEncryptionInfo)
466 if err != nil {
467 return err
468 }
469 acpii.DiskEncryptionInfo = &diskEncryptionInfo
470 }
471 case "recoveryAvailabilityZone":
472 if v != nil {
473 var recoveryAvailabilityZone string
474 err = json.Unmarshal(*v, &recoveryAvailabilityZone)
475 if err != nil {
476 return err
477 }
478 acpii.RecoveryAvailabilityZone = &recoveryAvailabilityZone
479 }
480 case "instanceType":
481 if v != nil {
482 var instanceType InstanceTypeBasicCreateProtectionIntentProviderSpecificDetails
483 err = json.Unmarshal(*v, &instanceType)
484 if err != nil {
485 return err
486 }
487 acpii.InstanceType = instanceType
488 }
489 }
490 }
491
492 return nil
493 }
494
495
496 type A2AEnableProtectionInput struct {
497
498 FabricObjectID *string `json:"fabricObjectId,omitempty"`
499
500 RecoveryContainerID *string `json:"recoveryContainerId,omitempty"`
501
502 RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"`
503
504 RecoveryCloudServiceID *string `json:"recoveryCloudServiceId,omitempty"`
505
506 RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"`
507
508 RecoveryProximityPlacementGroupID *string `json:"recoveryProximityPlacementGroupId,omitempty"`
509
510 VMDisks *[]A2AVMDiskInputDetails `json:"vmDisks,omitempty"`
511
512 VMManagedDisks *[]A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"`
513
514 MultiVMGroupName *string `json:"multiVmGroupName,omitempty"`
515
516 RecoveryBootDiagStorageAccountID *string `json:"recoveryBootDiagStorageAccountId,omitempty"`
517
518 DiskEncryptionInfo *DiskEncryptionInfo `json:"diskEncryptionInfo,omitempty"`
519
520 RecoveryAvailabilityZone *string `json:"recoveryAvailabilityZone,omitempty"`
521
522 RecoveryAzureNetworkID *string `json:"recoveryAzureNetworkId,omitempty"`
523
524 RecoverySubnetName *string `json:"recoverySubnetName,omitempty"`
525
526 InstanceType InstanceTypeBasicEnableProtectionProviderSpecificInput `json:"instanceType,omitempty"`
527 }
528
529
530 func (aepi A2AEnableProtectionInput) MarshalJSON() ([]byte, error) {
531 aepi.InstanceType = InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeA2A
532 objectMap := make(map[string]interface{})
533 if aepi.FabricObjectID != nil {
534 objectMap["fabricObjectId"] = aepi.FabricObjectID
535 }
536 if aepi.RecoveryContainerID != nil {
537 objectMap["recoveryContainerId"] = aepi.RecoveryContainerID
538 }
539 if aepi.RecoveryResourceGroupID != nil {
540 objectMap["recoveryResourceGroupId"] = aepi.RecoveryResourceGroupID
541 }
542 if aepi.RecoveryCloudServiceID != nil {
543 objectMap["recoveryCloudServiceId"] = aepi.RecoveryCloudServiceID
544 }
545 if aepi.RecoveryAvailabilitySetID != nil {
546 objectMap["recoveryAvailabilitySetId"] = aepi.RecoveryAvailabilitySetID
547 }
548 if aepi.RecoveryProximityPlacementGroupID != nil {
549 objectMap["recoveryProximityPlacementGroupId"] = aepi.RecoveryProximityPlacementGroupID
550 }
551 if aepi.VMDisks != nil {
552 objectMap["vmDisks"] = aepi.VMDisks
553 }
554 if aepi.VMManagedDisks != nil {
555 objectMap["vmManagedDisks"] = aepi.VMManagedDisks
556 }
557 if aepi.MultiVMGroupName != nil {
558 objectMap["multiVmGroupName"] = aepi.MultiVMGroupName
559 }
560 if aepi.RecoveryBootDiagStorageAccountID != nil {
561 objectMap["recoveryBootDiagStorageAccountId"] = aepi.RecoveryBootDiagStorageAccountID
562 }
563 if aepi.DiskEncryptionInfo != nil {
564 objectMap["diskEncryptionInfo"] = aepi.DiskEncryptionInfo
565 }
566 if aepi.RecoveryAvailabilityZone != nil {
567 objectMap["recoveryAvailabilityZone"] = aepi.RecoveryAvailabilityZone
568 }
569 if aepi.RecoveryAzureNetworkID != nil {
570 objectMap["recoveryAzureNetworkId"] = aepi.RecoveryAzureNetworkID
571 }
572 if aepi.RecoverySubnetName != nil {
573 objectMap["recoverySubnetName"] = aepi.RecoverySubnetName
574 }
575 if aepi.InstanceType != "" {
576 objectMap["instanceType"] = aepi.InstanceType
577 }
578 return json.Marshal(objectMap)
579 }
580
581
582 func (aepi A2AEnableProtectionInput) AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool) {
583 return &aepi, true
584 }
585
586
587 func (aepi A2AEnableProtectionInput) AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool) {
588 return nil, false
589 }
590
591
592 func (aepi A2AEnableProtectionInput) AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool) {
593 return nil, false
594 }
595
596
597 func (aepi A2AEnableProtectionInput) AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool) {
598 return nil, false
599 }
600
601
602 func (aepi A2AEnableProtectionInput) AsInMageRcmEnableProtectionInput() (*InMageRcmEnableProtectionInput, bool) {
603 return nil, false
604 }
605
606
607 func (aepi A2AEnableProtectionInput) AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool) {
608 return nil, false
609 }
610
611
612 func (aepi A2AEnableProtectionInput) AsEnableProtectionProviderSpecificInput() (*EnableProtectionProviderSpecificInput, bool) {
613 return nil, false
614 }
615
616
617 func (aepi A2AEnableProtectionInput) AsBasicEnableProtectionProviderSpecificInput() (BasicEnableProtectionProviderSpecificInput, bool) {
618 return &aepi, true
619 }
620
621
622 type A2AEventDetails struct {
623
624 ProtectedItemName *string `json:"protectedItemName,omitempty"`
625
626 FabricObjectID *string `json:"fabricObjectId,omitempty"`
627
628 FabricName *string `json:"fabricName,omitempty"`
629
630 FabricLocation *string `json:"fabricLocation,omitempty"`
631
632 RemoteFabricName *string `json:"remoteFabricName,omitempty"`
633
634 RemoteFabricLocation *string `json:"remoteFabricLocation,omitempty"`
635
636 InstanceType InstanceTypeBasicEventProviderSpecificDetails `json:"instanceType,omitempty"`
637 }
638
639
640 func (aed A2AEventDetails) MarshalJSON() ([]byte, error) {
641 aed.InstanceType = InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeA2A
642 objectMap := make(map[string]interface{})
643 if aed.ProtectedItemName != nil {
644 objectMap["protectedItemName"] = aed.ProtectedItemName
645 }
646 if aed.FabricObjectID != nil {
647 objectMap["fabricObjectId"] = aed.FabricObjectID
648 }
649 if aed.FabricName != nil {
650 objectMap["fabricName"] = aed.FabricName
651 }
652 if aed.FabricLocation != nil {
653 objectMap["fabricLocation"] = aed.FabricLocation
654 }
655 if aed.RemoteFabricName != nil {
656 objectMap["remoteFabricName"] = aed.RemoteFabricName
657 }
658 if aed.RemoteFabricLocation != nil {
659 objectMap["remoteFabricLocation"] = aed.RemoteFabricLocation
660 }
661 if aed.InstanceType != "" {
662 objectMap["instanceType"] = aed.InstanceType
663 }
664 return json.Marshal(objectMap)
665 }
666
667
668 func (aed A2AEventDetails) AsA2AEventDetails() (*A2AEventDetails, bool) {
669 return &aed, true
670 }
671
672
673 func (aed A2AEventDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) {
674 return nil, false
675 }
676
677
678 func (aed A2AEventDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) {
679 return nil, false
680 }
681
682
683 func (aed A2AEventDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) {
684 return nil, false
685 }
686
687
688 func (aed A2AEventDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) {
689 return nil, false
690 }
691
692
693 func (aed A2AEventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) {
694 return nil, false
695 }
696
697
698 func (aed A2AEventDetails) AsInMageRcmEventDetails() (*InMageRcmEventDetails, bool) {
699 return nil, false
700 }
701
702
703 func (aed A2AEventDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) {
704 return nil, false
705 }
706
707
708 func (aed A2AEventDetails) AsBasicEventProviderSpecificDetails() (BasicEventProviderSpecificDetails, bool) {
709 return &aed, true
710 }
711
712
713 type A2AFailoverProviderInput struct {
714
715 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
716
717 CloudServiceCreationOption *string `json:"cloudServiceCreationOption,omitempty"`
718
719 InstanceType InstanceTypeBasicProviderSpecificFailoverInput `json:"instanceType,omitempty"`
720 }
721
722
723 func (afpi A2AFailoverProviderInput) MarshalJSON() ([]byte, error) {
724 afpi.InstanceType = InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeA2A
725 objectMap := make(map[string]interface{})
726 if afpi.RecoveryPointID != nil {
727 objectMap["recoveryPointId"] = afpi.RecoveryPointID
728 }
729 if afpi.CloudServiceCreationOption != nil {
730 objectMap["cloudServiceCreationOption"] = afpi.CloudServiceCreationOption
731 }
732 if afpi.InstanceType != "" {
733 objectMap["instanceType"] = afpi.InstanceType
734 }
735 return json.Marshal(objectMap)
736 }
737
738
739 func (afpi A2AFailoverProviderInput) AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool) {
740 return &afpi, true
741 }
742
743
744 func (afpi A2AFailoverProviderInput) AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool) {
745 return nil, false
746 }
747
748
749 func (afpi A2AFailoverProviderInput) AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool) {
750 return nil, false
751 }
752
753
754 func (afpi A2AFailoverProviderInput) AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool) {
755 return nil, false
756 }
757
758
759 func (afpi A2AFailoverProviderInput) AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool) {
760 return nil, false
761 }
762
763
764 func (afpi A2AFailoverProviderInput) AsProviderSpecificFailoverInput() (*ProviderSpecificFailoverInput, bool) {
765 return nil, false
766 }
767
768
769 func (afpi A2AFailoverProviderInput) AsBasicProviderSpecificFailoverInput() (BasicProviderSpecificFailoverInput, bool) {
770 return &afpi, true
771 }
772
773
774 type A2APolicyCreationInput struct {
775
776 RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"`
777
778 CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"`
779
780 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"`
781
782 MultiVMSyncStatus SetMultiVMSyncStatus `json:"multiVmSyncStatus,omitempty"`
783
784 InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"`
785 }
786
787
788 func (apci A2APolicyCreationInput) MarshalJSON() ([]byte, error) {
789 apci.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeA2A
790 objectMap := make(map[string]interface{})
791 if apci.RecoveryPointHistory != nil {
792 objectMap["recoveryPointHistory"] = apci.RecoveryPointHistory
793 }
794 if apci.CrashConsistentFrequencyInMinutes != nil {
795 objectMap["crashConsistentFrequencyInMinutes"] = apci.CrashConsistentFrequencyInMinutes
796 }
797 if apci.AppConsistentFrequencyInMinutes != nil {
798 objectMap["appConsistentFrequencyInMinutes"] = apci.AppConsistentFrequencyInMinutes
799 }
800 if apci.MultiVMSyncStatus != "" {
801 objectMap["multiVmSyncStatus"] = apci.MultiVMSyncStatus
802 }
803 if apci.InstanceType != "" {
804 objectMap["instanceType"] = apci.InstanceType
805 }
806 return json.Marshal(objectMap)
807 }
808
809
810 func (apci A2APolicyCreationInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) {
811 return &apci, true
812 }
813
814
815 func (apci A2APolicyCreationInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) {
816 return nil, false
817 }
818
819
820 func (apci A2APolicyCreationInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) {
821 return nil, false
822 }
823
824
825 func (apci A2APolicyCreationInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) {
826 return nil, false
827 }
828
829
830 func (apci A2APolicyCreationInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) {
831 return nil, false
832 }
833
834
835 func (apci A2APolicyCreationInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) {
836 return nil, false
837 }
838
839
840 func (apci A2APolicyCreationInput) AsInMageRcmPolicyCreationInput() (*InMageRcmPolicyCreationInput, bool) {
841 return nil, false
842 }
843
844
845 func (apci A2APolicyCreationInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) {
846 return nil, false
847 }
848
849
850 func (apci A2APolicyCreationInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) {
851 return nil, false
852 }
853
854
855 func (apci A2APolicyCreationInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) {
856 return &apci, true
857 }
858
859
860 type A2APolicyDetails struct {
861
862 RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"`
863
864 RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"`
865
866 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"`
867
868 MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"`
869
870 CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"`
871
872 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"`
873 }
874
875
876 func (apd A2APolicyDetails) MarshalJSON() ([]byte, error) {
877 apd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A
878 objectMap := make(map[string]interface{})
879 if apd.RecoveryPointThresholdInMinutes != nil {
880 objectMap["recoveryPointThresholdInMinutes"] = apd.RecoveryPointThresholdInMinutes
881 }
882 if apd.RecoveryPointHistory != nil {
883 objectMap["recoveryPointHistory"] = apd.RecoveryPointHistory
884 }
885 if apd.AppConsistentFrequencyInMinutes != nil {
886 objectMap["appConsistentFrequencyInMinutes"] = apd.AppConsistentFrequencyInMinutes
887 }
888 if apd.MultiVMSyncStatus != nil {
889 objectMap["multiVmSyncStatus"] = apd.MultiVMSyncStatus
890 }
891 if apd.CrashConsistentFrequencyInMinutes != nil {
892 objectMap["crashConsistentFrequencyInMinutes"] = apd.CrashConsistentFrequencyInMinutes
893 }
894 if apd.InstanceType != "" {
895 objectMap["instanceType"] = apd.InstanceType
896 }
897 return json.Marshal(objectMap)
898 }
899
900
901 func (apd A2APolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) {
902 return &apd, true
903 }
904
905
906 func (apd A2APolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) {
907 return nil, false
908 }
909
910
911 func (apd A2APolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) {
912 return nil, false
913 }
914
915
916 func (apd A2APolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) {
917 return nil, false
918 }
919
920
921 func (apd A2APolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) {
922 return nil, false
923 }
924
925
926 func (apd A2APolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) {
927 return nil, false
928 }
929
930
931 func (apd A2APolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) {
932 return nil, false
933 }
934
935
936 func (apd A2APolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) {
937 return nil, false
938 }
939
940
941 func (apd A2APolicyDetails) AsInMageRcmPolicyDetails() (*InMageRcmPolicyDetails, bool) {
942 return nil, false
943 }
944
945
946 func (apd A2APolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) {
947 return nil, false
948 }
949
950
951 func (apd A2APolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) {
952 return nil, false
953 }
954
955
956 func (apd A2APolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) {
957 return nil, false
958 }
959
960
961 func (apd A2APolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) {
962 return &apd, true
963 }
964
965
966 type A2AProtectedDiskDetails struct {
967
968 DiskURI *string `json:"diskUri,omitempty"`
969
970 RecoveryAzureStorageAccountID *string `json:"recoveryAzureStorageAccountId,omitempty"`
971
972 PrimaryDiskAzureStorageAccountID *string `json:"primaryDiskAzureStorageAccountId,omitempty"`
973
974 RecoveryDiskURI *string `json:"recoveryDiskUri,omitempty"`
975
976 DiskName *string `json:"diskName,omitempty"`
977
978 DiskCapacityInBytes *int64 `json:"diskCapacityInBytes,omitempty"`
979
980 PrimaryStagingAzureStorageAccountID *string `json:"primaryStagingAzureStorageAccountId,omitempty"`
981
982 DiskType *string `json:"diskType,omitempty"`
983
984 ResyncRequired *bool `json:"resyncRequired,omitempty"`
985
986 MonitoringPercentageCompletion *int32 `json:"monitoringPercentageCompletion,omitempty"`
987
988 MonitoringJobType *string `json:"monitoringJobType,omitempty"`
989
990 DataPendingInStagingStorageAccountInMB *float64 `json:"dataPendingInStagingStorageAccountInMB,omitempty"`
991
992 DataPendingAtSourceAgentInMB *float64 `json:"dataPendingAtSourceAgentInMB,omitempty"`
993
994 DiskState *string `json:"diskState,omitempty"`
995
996 AllowedDiskLevelOperation *[]string `json:"allowedDiskLevelOperation,omitempty"`
997
998 IsDiskEncrypted *bool `json:"isDiskEncrypted,omitempty"`
999
1000 SecretIdentifier *string `json:"secretIdentifier,omitempty"`
1001
1002 DekKeyVaultArmID *string `json:"dekKeyVaultArmId,omitempty"`
1003
1004 IsDiskKeyEncrypted *bool `json:"isDiskKeyEncrypted,omitempty"`
1005
1006 KeyIdentifier *string `json:"keyIdentifier,omitempty"`
1007
1008 KekKeyVaultArmID *string `json:"kekKeyVaultArmId,omitempty"`
1009 }
1010
1011
1012 type A2AProtectedManagedDiskDetails struct {
1013
1014 DiskID *string `json:"diskId,omitempty"`
1015
1016 RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"`
1017
1018 RecoveryTargetDiskID *string `json:"recoveryTargetDiskId,omitempty"`
1019
1020 RecoveryReplicaDiskID *string `json:"recoveryReplicaDiskId,omitempty"`
1021
1022 RecoveryReplicaDiskAccountType *string `json:"recoveryReplicaDiskAccountType,omitempty"`
1023
1024 RecoveryTargetDiskAccountType *string `json:"recoveryTargetDiskAccountType,omitempty"`
1025
1026 RecoveryDiskEncryptionSetID *string `json:"recoveryDiskEncryptionSetId,omitempty"`
1027
1028 DiskName *string `json:"diskName,omitempty"`
1029
1030 DiskCapacityInBytes *int64 `json:"diskCapacityInBytes,omitempty"`
1031
1032 PrimaryStagingAzureStorageAccountID *string `json:"primaryStagingAzureStorageAccountId,omitempty"`
1033
1034 DiskType *string `json:"diskType,omitempty"`
1035
1036 ResyncRequired *bool `json:"resyncRequired,omitempty"`
1037
1038 MonitoringPercentageCompletion *int32 `json:"monitoringPercentageCompletion,omitempty"`
1039
1040 MonitoringJobType *string `json:"monitoringJobType,omitempty"`
1041
1042 DataPendingInStagingStorageAccountInMB *float64 `json:"dataPendingInStagingStorageAccountInMB,omitempty"`
1043
1044 DataPendingAtSourceAgentInMB *float64 `json:"dataPendingAtSourceAgentInMB,omitempty"`
1045
1046 DiskState *string `json:"diskState,omitempty"`
1047
1048 AllowedDiskLevelOperation *[]string `json:"allowedDiskLevelOperation,omitempty"`
1049
1050 IsDiskEncrypted *bool `json:"isDiskEncrypted,omitempty"`
1051
1052 SecretIdentifier *string `json:"secretIdentifier,omitempty"`
1053
1054 DekKeyVaultArmID *string `json:"dekKeyVaultArmId,omitempty"`
1055
1056 IsDiskKeyEncrypted *bool `json:"isDiskKeyEncrypted,omitempty"`
1057
1058 KeyIdentifier *string `json:"keyIdentifier,omitempty"`
1059
1060 KekKeyVaultArmID *string `json:"kekKeyVaultArmId,omitempty"`
1061
1062 FailoverDiskName *string `json:"failoverDiskName,omitempty"`
1063
1064 TfoDiskName *string `json:"tfoDiskName,omitempty"`
1065 }
1066
1067
1068 type A2AProtectionContainerMappingDetails struct {
1069
1070 AgentAutoUpdateStatus AgentAutoUpdateStatus `json:"agentAutoUpdateStatus,omitempty"`
1071
1072 AutomationAccountArmID *string `json:"automationAccountArmId,omitempty"`
1073
1074 ScheduleName *string `json:"scheduleName,omitempty"`
1075
1076 JobScheduleName *string `json:"jobScheduleName,omitempty"`
1077
1078 InstanceType InstanceTypeBasicProtectionContainerMappingProviderSpecificDetails `json:"instanceType,omitempty"`
1079 }
1080
1081
1082 func (apcmd A2AProtectionContainerMappingDetails) MarshalJSON() ([]byte, error) {
1083 apcmd.InstanceType = InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeA2A
1084 objectMap := make(map[string]interface{})
1085 if apcmd.AgentAutoUpdateStatus != "" {
1086 objectMap["agentAutoUpdateStatus"] = apcmd.AgentAutoUpdateStatus
1087 }
1088 if apcmd.AutomationAccountArmID != nil {
1089 objectMap["automationAccountArmId"] = apcmd.AutomationAccountArmID
1090 }
1091 if apcmd.ScheduleName != nil {
1092 objectMap["scheduleName"] = apcmd.ScheduleName
1093 }
1094 if apcmd.JobScheduleName != nil {
1095 objectMap["jobScheduleName"] = apcmd.JobScheduleName
1096 }
1097 if apcmd.InstanceType != "" {
1098 objectMap["instanceType"] = apcmd.InstanceType
1099 }
1100 return json.Marshal(objectMap)
1101 }
1102
1103
1104 func (apcmd A2AProtectionContainerMappingDetails) AsA2AProtectionContainerMappingDetails() (*A2AProtectionContainerMappingDetails, bool) {
1105 return &apcmd, true
1106 }
1107
1108
1109 func (apcmd A2AProtectionContainerMappingDetails) AsVMwareCbtProtectionContainerMappingDetails() (*VMwareCbtProtectionContainerMappingDetails, bool) {
1110 return nil, false
1111 }
1112
1113
1114 func (apcmd A2AProtectionContainerMappingDetails) AsProtectionContainerMappingProviderSpecificDetails() (*ProtectionContainerMappingProviderSpecificDetails, bool) {
1115 return nil, false
1116 }
1117
1118
1119 func (apcmd A2AProtectionContainerMappingDetails) AsBasicProtectionContainerMappingProviderSpecificDetails() (BasicProtectionContainerMappingProviderSpecificDetails, bool) {
1120 return &apcmd, true
1121 }
1122
1123
1124 type A2AProtectionIntentDiskInputDetails struct {
1125
1126 DiskURI *string `json:"diskUri,omitempty"`
1127
1128 RecoveryAzureStorageAccountCustomInput BasicStorageAccountCustomDetails `json:"recoveryAzureStorageAccountCustomInput,omitempty"`
1129
1130 PrimaryStagingStorageAccountCustomInput BasicStorageAccountCustomDetails `json:"primaryStagingStorageAccountCustomInput,omitempty"`
1131 }
1132
1133
1134 func (apidid *A2AProtectionIntentDiskInputDetails) UnmarshalJSON(body []byte) error {
1135 var m map[string]*json.RawMessage
1136 err := json.Unmarshal(body, &m)
1137 if err != nil {
1138 return err
1139 }
1140 for k, v := range m {
1141 switch k {
1142 case "diskUri":
1143 if v != nil {
1144 var diskURI string
1145 err = json.Unmarshal(*v, &diskURI)
1146 if err != nil {
1147 return err
1148 }
1149 apidid.DiskURI = &diskURI
1150 }
1151 case "recoveryAzureStorageAccountCustomInput":
1152 if v != nil {
1153 recoveryAzureStorageAccountCustomInput, err := unmarshalBasicStorageAccountCustomDetails(*v)
1154 if err != nil {
1155 return err
1156 }
1157 apidid.RecoveryAzureStorageAccountCustomInput = recoveryAzureStorageAccountCustomInput
1158 }
1159 case "primaryStagingStorageAccountCustomInput":
1160 if v != nil {
1161 primaryStagingStorageAccountCustomInput, err := unmarshalBasicStorageAccountCustomDetails(*v)
1162 if err != nil {
1163 return err
1164 }
1165 apidid.PrimaryStagingStorageAccountCustomInput = primaryStagingStorageAccountCustomInput
1166 }
1167 }
1168 }
1169
1170 return nil
1171 }
1172
1173
1174 type A2AProtectionIntentManagedDiskInputDetails struct {
1175
1176 DiskID *string `json:"diskId,omitempty"`
1177
1178 PrimaryStagingStorageAccountCustomInput BasicStorageAccountCustomDetails `json:"primaryStagingStorageAccountCustomInput,omitempty"`
1179
1180 RecoveryResourceGroupCustomInput BasicRecoveryResourceGroupCustomDetails `json:"recoveryResourceGroupCustomInput,omitempty"`
1181
1182 RecoveryReplicaDiskAccountType *string `json:"recoveryReplicaDiskAccountType,omitempty"`
1183
1184 RecoveryTargetDiskAccountType *string `json:"recoveryTargetDiskAccountType,omitempty"`
1185
1186 RecoveryDiskEncryptionSetID *string `json:"recoveryDiskEncryptionSetId,omitempty"`
1187
1188 DiskEncryptionInfo *DiskEncryptionInfo `json:"diskEncryptionInfo,omitempty"`
1189 }
1190
1191
1192 func (apimdid *A2AProtectionIntentManagedDiskInputDetails) UnmarshalJSON(body []byte) error {
1193 var m map[string]*json.RawMessage
1194 err := json.Unmarshal(body, &m)
1195 if err != nil {
1196 return err
1197 }
1198 for k, v := range m {
1199 switch k {
1200 case "diskId":
1201 if v != nil {
1202 var diskID string
1203 err = json.Unmarshal(*v, &diskID)
1204 if err != nil {
1205 return err
1206 }
1207 apimdid.DiskID = &diskID
1208 }
1209 case "primaryStagingStorageAccountCustomInput":
1210 if v != nil {
1211 primaryStagingStorageAccountCustomInput, err := unmarshalBasicStorageAccountCustomDetails(*v)
1212 if err != nil {
1213 return err
1214 }
1215 apimdid.PrimaryStagingStorageAccountCustomInput = primaryStagingStorageAccountCustomInput
1216 }
1217 case "recoveryResourceGroupCustomInput":
1218 if v != nil {
1219 recoveryResourceGroupCustomInput, err := unmarshalBasicRecoveryResourceGroupCustomDetails(*v)
1220 if err != nil {
1221 return err
1222 }
1223 apimdid.RecoveryResourceGroupCustomInput = recoveryResourceGroupCustomInput
1224 }
1225 case "recoveryReplicaDiskAccountType":
1226 if v != nil {
1227 var recoveryReplicaDiskAccountType string
1228 err = json.Unmarshal(*v, &recoveryReplicaDiskAccountType)
1229 if err != nil {
1230 return err
1231 }
1232 apimdid.RecoveryReplicaDiskAccountType = &recoveryReplicaDiskAccountType
1233 }
1234 case "recoveryTargetDiskAccountType":
1235 if v != nil {
1236 var recoveryTargetDiskAccountType string
1237 err = json.Unmarshal(*v, &recoveryTargetDiskAccountType)
1238 if err != nil {
1239 return err
1240 }
1241 apimdid.RecoveryTargetDiskAccountType = &recoveryTargetDiskAccountType
1242 }
1243 case "recoveryDiskEncryptionSetId":
1244 if v != nil {
1245 var recoveryDiskEncryptionSetID string
1246 err = json.Unmarshal(*v, &recoveryDiskEncryptionSetID)
1247 if err != nil {
1248 return err
1249 }
1250 apimdid.RecoveryDiskEncryptionSetID = &recoveryDiskEncryptionSetID
1251 }
1252 case "diskEncryptionInfo":
1253 if v != nil {
1254 var diskEncryptionInfo DiskEncryptionInfo
1255 err = json.Unmarshal(*v, &diskEncryptionInfo)
1256 if err != nil {
1257 return err
1258 }
1259 apimdid.DiskEncryptionInfo = &diskEncryptionInfo
1260 }
1261 }
1262 }
1263
1264 return nil
1265 }
1266
1267
1268 type A2ARecoveryPointDetails struct {
1269
1270 RecoveryPointSyncType RecoveryPointSyncType `json:"recoveryPointSyncType,omitempty"`
1271
1272 Disks *[]string `json:"disks,omitempty"`
1273
1274 InstanceType InstanceTypeBasicProviderSpecificRecoveryPointDetails `json:"instanceType,omitempty"`
1275 }
1276
1277
1278 func (arpd A2ARecoveryPointDetails) MarshalJSON() ([]byte, error) {
1279 arpd.InstanceType = InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeA2A
1280 objectMap := make(map[string]interface{})
1281 if arpd.RecoveryPointSyncType != "" {
1282 objectMap["recoveryPointSyncType"] = arpd.RecoveryPointSyncType
1283 }
1284 if arpd.Disks != nil {
1285 objectMap["disks"] = arpd.Disks
1286 }
1287 if arpd.InstanceType != "" {
1288 objectMap["instanceType"] = arpd.InstanceType
1289 }
1290 return json.Marshal(objectMap)
1291 }
1292
1293
1294 func (arpd A2ARecoveryPointDetails) AsA2ARecoveryPointDetails() (*A2ARecoveryPointDetails, bool) {
1295 return &arpd, true
1296 }
1297
1298
1299 func (arpd A2ARecoveryPointDetails) AsInMageAzureV2RecoveryPointDetails() (*InMageAzureV2RecoveryPointDetails, bool) {
1300 return nil, false
1301 }
1302
1303
1304 func (arpd A2ARecoveryPointDetails) AsInMageRcmRecoveryPointDetails() (*InMageRcmRecoveryPointDetails, bool) {
1305 return nil, false
1306 }
1307
1308
1309 func (arpd A2ARecoveryPointDetails) AsProviderSpecificRecoveryPointDetails() (*ProviderSpecificRecoveryPointDetails, bool) {
1310 return nil, false
1311 }
1312
1313
1314 func (arpd A2ARecoveryPointDetails) AsBasicProviderSpecificRecoveryPointDetails() (BasicProviderSpecificRecoveryPointDetails, bool) {
1315 return &arpd, true
1316 }
1317
1318
1319 type A2ARemoveDisksInput struct {
1320
1321 VMDisksUris *[]string `json:"vmDisksUris,omitempty"`
1322
1323 VMManagedDisksIds *[]string `json:"vmManagedDisksIds,omitempty"`
1324
1325 InstanceType InstanceTypeBasicRemoveDisksProviderSpecificInput `json:"instanceType,omitempty"`
1326 }
1327
1328
1329 func (ardi A2ARemoveDisksInput) MarshalJSON() ([]byte, error) {
1330 ardi.InstanceType = InstanceTypeBasicRemoveDisksProviderSpecificInputInstanceTypeA2A
1331 objectMap := make(map[string]interface{})
1332 if ardi.VMDisksUris != nil {
1333 objectMap["vmDisksUris"] = ardi.VMDisksUris
1334 }
1335 if ardi.VMManagedDisksIds != nil {
1336 objectMap["vmManagedDisksIds"] = ardi.VMManagedDisksIds
1337 }
1338 if ardi.InstanceType != "" {
1339 objectMap["instanceType"] = ardi.InstanceType
1340 }
1341 return json.Marshal(objectMap)
1342 }
1343
1344
1345 func (ardi A2ARemoveDisksInput) AsA2ARemoveDisksInput() (*A2ARemoveDisksInput, bool) {
1346 return &ardi, true
1347 }
1348
1349
1350 func (ardi A2ARemoveDisksInput) AsRemoveDisksProviderSpecificInput() (*RemoveDisksProviderSpecificInput, bool) {
1351 return nil, false
1352 }
1353
1354
1355 func (ardi A2ARemoveDisksInput) AsBasicRemoveDisksProviderSpecificInput() (BasicRemoveDisksProviderSpecificInput, bool) {
1356 return &ardi, true
1357 }
1358
1359
1360 type A2AReplicationDetails struct {
1361
1362 FabricObjectID *string `json:"fabricObjectId,omitempty"`
1363
1364 InitialPrimaryFabricLocation *string `json:"initialPrimaryFabricLocation,omitempty"`
1365
1366 InitialRecoveryFabricLocation *string `json:"initialRecoveryFabricLocation,omitempty"`
1367
1368 InitialPrimaryZone *string `json:"initialPrimaryZone,omitempty"`
1369
1370 InitialRecoveryZone *string `json:"initialRecoveryZone,omitempty"`
1371
1372 MultiVMGroupID *string `json:"multiVmGroupId,omitempty"`
1373
1374 MultiVMGroupName *string `json:"multiVmGroupName,omitempty"`
1375
1376 MultiVMGroupCreateOption MultiVMGroupCreateOption `json:"multiVmGroupCreateOption,omitempty"`
1377
1378 ManagementID *string `json:"managementId,omitempty"`
1379
1380 ProtectedDisks *[]A2AProtectedDiskDetails `json:"protectedDisks,omitempty"`
1381
1382 UnprotectedDisks *[]A2AUnprotectedDiskDetails `json:"unprotectedDisks,omitempty"`
1383
1384 ProtectedManagedDisks *[]A2AProtectedManagedDiskDetails `json:"protectedManagedDisks,omitempty"`
1385
1386 RecoveryBootDiagStorageAccountID *string `json:"recoveryBootDiagStorageAccountId,omitempty"`
1387
1388 PrimaryFabricLocation *string `json:"primaryFabricLocation,omitempty"`
1389
1390 RecoveryFabricLocation *string `json:"recoveryFabricLocation,omitempty"`
1391
1392 OsType *string `json:"osType,omitempty"`
1393
1394 RecoveryAzureVMSize *string `json:"recoveryAzureVMSize,omitempty"`
1395
1396 RecoveryAzureVMName *string `json:"recoveryAzureVMName,omitempty"`
1397
1398 RecoveryAzureResourceGroupID *string `json:"recoveryAzureResourceGroupId,omitempty"`
1399
1400 RecoveryCloudService *string `json:"recoveryCloudService,omitempty"`
1401
1402 RecoveryAvailabilitySet *string `json:"recoveryAvailabilitySet,omitempty"`
1403
1404 SelectedRecoveryAzureNetworkID *string `json:"selectedRecoveryAzureNetworkId,omitempty"`
1405
1406 SelectedTfoAzureNetworkID *string `json:"selectedTfoAzureNetworkId,omitempty"`
1407
1408 VMNics *[]VMNicDetails `json:"vmNics,omitempty"`
1409
1410 VMSyncedConfigDetails *AzureToAzureVMSyncedConfigDetails `json:"vmSyncedConfigDetails,omitempty"`
1411
1412 MonitoringPercentageCompletion *int32 `json:"monitoringPercentageCompletion,omitempty"`
1413
1414 MonitoringJobType *string `json:"monitoringJobType,omitempty"`
1415
1416 LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"`
1417
1418 AgentVersion *string `json:"agentVersion,omitempty"`
1419
1420 IsReplicationAgentUpdateRequired *bool `json:"isReplicationAgentUpdateRequired,omitempty"`
1421
1422 RecoveryFabricObjectID *string `json:"recoveryFabricObjectId,omitempty"`
1423
1424 VMProtectionState *string `json:"vmProtectionState,omitempty"`
1425
1426 VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"`
1427
1428 LifecycleID *string `json:"lifecycleId,omitempty"`
1429
1430 TestFailoverRecoveryFabricObjectID *string `json:"testFailoverRecoveryFabricObjectId,omitempty"`
1431
1432 RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"`
1433
1434 LastRpoCalculatedTime *date.Time `json:"lastRpoCalculatedTime,omitempty"`
1435
1436 RecoveryAvailabilityZone *string `json:"recoveryAvailabilityZone,omitempty"`
1437
1438 VMEncryptionType VMEncryptionType `json:"vmEncryptionType,omitempty"`
1439
1440 TfoAzureVMName *string `json:"tfoAzureVMName,omitempty"`
1441
1442 RecoveryProximityPlacementGroupID *string `json:"recoveryProximityPlacementGroupId,omitempty"`
1443
1444 InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"`
1445 }
1446
1447
1448 func (ard A2AReplicationDetails) MarshalJSON() ([]byte, error) {
1449 ard.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeA2A
1450 objectMap := make(map[string]interface{})
1451 if ard.FabricObjectID != nil {
1452 objectMap["fabricObjectId"] = ard.FabricObjectID
1453 }
1454 if ard.MultiVMGroupID != nil {
1455 objectMap["multiVmGroupId"] = ard.MultiVMGroupID
1456 }
1457 if ard.MultiVMGroupName != nil {
1458 objectMap["multiVmGroupName"] = ard.MultiVMGroupName
1459 }
1460 if ard.MultiVMGroupCreateOption != "" {
1461 objectMap["multiVmGroupCreateOption"] = ard.MultiVMGroupCreateOption
1462 }
1463 if ard.ManagementID != nil {
1464 objectMap["managementId"] = ard.ManagementID
1465 }
1466 if ard.ProtectedDisks != nil {
1467 objectMap["protectedDisks"] = ard.ProtectedDisks
1468 }
1469 if ard.UnprotectedDisks != nil {
1470 objectMap["unprotectedDisks"] = ard.UnprotectedDisks
1471 }
1472 if ard.ProtectedManagedDisks != nil {
1473 objectMap["protectedManagedDisks"] = ard.ProtectedManagedDisks
1474 }
1475 if ard.RecoveryBootDiagStorageAccountID != nil {
1476 objectMap["recoveryBootDiagStorageAccountId"] = ard.RecoveryBootDiagStorageAccountID
1477 }
1478 if ard.PrimaryFabricLocation != nil {
1479 objectMap["primaryFabricLocation"] = ard.PrimaryFabricLocation
1480 }
1481 if ard.RecoveryFabricLocation != nil {
1482 objectMap["recoveryFabricLocation"] = ard.RecoveryFabricLocation
1483 }
1484 if ard.OsType != nil {
1485 objectMap["osType"] = ard.OsType
1486 }
1487 if ard.RecoveryAzureVMSize != nil {
1488 objectMap["recoveryAzureVMSize"] = ard.RecoveryAzureVMSize
1489 }
1490 if ard.RecoveryAzureVMName != nil {
1491 objectMap["recoveryAzureVMName"] = ard.RecoveryAzureVMName
1492 }
1493 if ard.RecoveryAzureResourceGroupID != nil {
1494 objectMap["recoveryAzureResourceGroupId"] = ard.RecoveryAzureResourceGroupID
1495 }
1496 if ard.RecoveryCloudService != nil {
1497 objectMap["recoveryCloudService"] = ard.RecoveryCloudService
1498 }
1499 if ard.RecoveryAvailabilitySet != nil {
1500 objectMap["recoveryAvailabilitySet"] = ard.RecoveryAvailabilitySet
1501 }
1502 if ard.SelectedRecoveryAzureNetworkID != nil {
1503 objectMap["selectedRecoveryAzureNetworkId"] = ard.SelectedRecoveryAzureNetworkID
1504 }
1505 if ard.SelectedTfoAzureNetworkID != nil {
1506 objectMap["selectedTfoAzureNetworkId"] = ard.SelectedTfoAzureNetworkID
1507 }
1508 if ard.VMNics != nil {
1509 objectMap["vmNics"] = ard.VMNics
1510 }
1511 if ard.VMSyncedConfigDetails != nil {
1512 objectMap["vmSyncedConfigDetails"] = ard.VMSyncedConfigDetails
1513 }
1514 if ard.MonitoringPercentageCompletion != nil {
1515 objectMap["monitoringPercentageCompletion"] = ard.MonitoringPercentageCompletion
1516 }
1517 if ard.MonitoringJobType != nil {
1518 objectMap["monitoringJobType"] = ard.MonitoringJobType
1519 }
1520 if ard.LastHeartbeat != nil {
1521 objectMap["lastHeartbeat"] = ard.LastHeartbeat
1522 }
1523 if ard.AgentVersion != nil {
1524 objectMap["agentVersion"] = ard.AgentVersion
1525 }
1526 if ard.IsReplicationAgentUpdateRequired != nil {
1527 objectMap["isReplicationAgentUpdateRequired"] = ard.IsReplicationAgentUpdateRequired
1528 }
1529 if ard.RecoveryFabricObjectID != nil {
1530 objectMap["recoveryFabricObjectId"] = ard.RecoveryFabricObjectID
1531 }
1532 if ard.VMProtectionState != nil {
1533 objectMap["vmProtectionState"] = ard.VMProtectionState
1534 }
1535 if ard.VMProtectionStateDescription != nil {
1536 objectMap["vmProtectionStateDescription"] = ard.VMProtectionStateDescription
1537 }
1538 if ard.LifecycleID != nil {
1539 objectMap["lifecycleId"] = ard.LifecycleID
1540 }
1541 if ard.TestFailoverRecoveryFabricObjectID != nil {
1542 objectMap["testFailoverRecoveryFabricObjectId"] = ard.TestFailoverRecoveryFabricObjectID
1543 }
1544 if ard.RpoInSeconds != nil {
1545 objectMap["rpoInSeconds"] = ard.RpoInSeconds
1546 }
1547 if ard.LastRpoCalculatedTime != nil {
1548 objectMap["lastRpoCalculatedTime"] = ard.LastRpoCalculatedTime
1549 }
1550 if ard.RecoveryAvailabilityZone != nil {
1551 objectMap["recoveryAvailabilityZone"] = ard.RecoveryAvailabilityZone
1552 }
1553 if ard.TfoAzureVMName != nil {
1554 objectMap["tfoAzureVMName"] = ard.TfoAzureVMName
1555 }
1556 if ard.RecoveryProximityPlacementGroupID != nil {
1557 objectMap["recoveryProximityPlacementGroupId"] = ard.RecoveryProximityPlacementGroupID
1558 }
1559 if ard.InstanceType != "" {
1560 objectMap["instanceType"] = ard.InstanceType
1561 }
1562 return json.Marshal(objectMap)
1563 }
1564
1565
1566 func (ard A2AReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) {
1567 return &ard, true
1568 }
1569
1570
1571 func (ard A2AReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) {
1572 return nil, false
1573 }
1574
1575
1576 func (ard A2AReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) {
1577 return nil, false
1578 }
1579
1580
1581 func (ard A2AReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) {
1582 return nil, false
1583 }
1584
1585
1586 func (ard A2AReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) {
1587 return nil, false
1588 }
1589
1590
1591 func (ard A2AReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) {
1592 return nil, false
1593 }
1594
1595
1596 func (ard A2AReplicationDetails) AsInMageRcmReplicationDetails() (*InMageRcmReplicationDetails, bool) {
1597 return nil, false
1598 }
1599
1600
1601 func (ard A2AReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) {
1602 return nil, false
1603 }
1604
1605
1606 func (ard A2AReplicationDetails) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) {
1607 return nil, false
1608 }
1609
1610
1611 func (ard A2AReplicationDetails) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) {
1612 return &ard, true
1613 }
1614
1615
1616 type A2AReplicationIntentDetails struct {
1617
1618 FabricObjectID *string `json:"fabricObjectId,omitempty"`
1619
1620 PolicyID *string `json:"policyId,omitempty"`
1621
1622 PrimaryLocation *string `json:"primaryLocation,omitempty"`
1623
1624 RecoveryLocation *string `json:"recoveryLocation,omitempty"`
1625
1626 RecoverySubscriptionID *string `json:"recoverySubscriptionId,omitempty"`
1627
1628 PrimaryFabricFriendlyName *string `json:"primaryFabricFriendlyName,omitempty"`
1629
1630 RecoveryFabricFriendlyName *string `json:"recoveryFabricFriendlyName,omitempty"`
1631
1632 PrimaryContainerFriendlyName *string `json:"primaryContainerFriendlyName,omitempty"`
1633
1634 RecoveryContainerFriendlyName *string `json:"recoveryContainerFriendlyName,omitempty"`
1635
1636 RecoveryAvailabilityType *string `json:"recoveryAvailabilityType,omitempty"`
1637
1638 VMDisks *[]A2AVMDiskDetails `json:"vmDisks,omitempty"`
1639
1640 VMManagedDisks *[]A2AVMManagedDiskDetails `json:"vmManagedDisks,omitempty"`
1641
1642 RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"`
1643
1644 RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"`
1645
1646 RecoveryVirtualNetworkID *string `json:"recoveryVirtualNetworkId,omitempty"`
1647
1648 RecoveryProximityPlacementGroupID *string `json:"recoveryProximityPlacementGroupId,omitempty"`
1649
1650 AutoProtectionOfDataDiskStatus AutoProtectionOfDataDiskStatus `json:"autoProtectionOfDataDiskStatus,omitempty"`
1651
1652 MultiVMGroupName *string `json:"multiVmGroupName,omitempty"`
1653
1654 MultiVMGroupID *string `json:"multiVmGroupId,omitempty"`
1655
1656 RecoveryBootDiagStorageAccountID *string `json:"recoveryBootDiagStorageAccountId,omitempty"`
1657
1658 DiskEncryptionInfo *DiskEncryptionInfo `json:"diskEncryptionInfo,omitempty"`
1659
1660 RecoveryAvailabilityZone *string `json:"recoveryAvailabilityZone,omitempty"`
1661
1662 InstanceType InstanceTypeBasicReplicationProtectionIntentProviderSpecificSettings `json:"instanceType,omitempty"`
1663 }
1664
1665
1666 func (arid A2AReplicationIntentDetails) MarshalJSON() ([]byte, error) {
1667 arid.InstanceType = InstanceTypeBasicReplicationProtectionIntentProviderSpecificSettingsInstanceTypeA2A
1668 objectMap := make(map[string]interface{})
1669 if arid.FabricObjectID != nil {
1670 objectMap["fabricObjectId"] = arid.FabricObjectID
1671 }
1672 if arid.PolicyID != nil {
1673 objectMap["policyId"] = arid.PolicyID
1674 }
1675 if arid.PrimaryLocation != nil {
1676 objectMap["primaryLocation"] = arid.PrimaryLocation
1677 }
1678 if arid.RecoveryLocation != nil {
1679 objectMap["recoveryLocation"] = arid.RecoveryLocation
1680 }
1681 if arid.RecoverySubscriptionID != nil {
1682 objectMap["recoverySubscriptionId"] = arid.RecoverySubscriptionID
1683 }
1684 if arid.PrimaryFabricFriendlyName != nil {
1685 objectMap["primaryFabricFriendlyName"] = arid.PrimaryFabricFriendlyName
1686 }
1687 if arid.RecoveryFabricFriendlyName != nil {
1688 objectMap["recoveryFabricFriendlyName"] = arid.RecoveryFabricFriendlyName
1689 }
1690 if arid.PrimaryContainerFriendlyName != nil {
1691 objectMap["primaryContainerFriendlyName"] = arid.PrimaryContainerFriendlyName
1692 }
1693 if arid.RecoveryContainerFriendlyName != nil {
1694 objectMap["recoveryContainerFriendlyName"] = arid.RecoveryContainerFriendlyName
1695 }
1696 if arid.RecoveryAvailabilityType != nil {
1697 objectMap["recoveryAvailabilityType"] = arid.RecoveryAvailabilityType
1698 }
1699 if arid.VMDisks != nil {
1700 objectMap["vmDisks"] = arid.VMDisks
1701 }
1702 if arid.VMManagedDisks != nil {
1703 objectMap["vmManagedDisks"] = arid.VMManagedDisks
1704 }
1705 if arid.RecoveryResourceGroupID != nil {
1706 objectMap["recoveryResourceGroupId"] = arid.RecoveryResourceGroupID
1707 }
1708 if arid.RecoveryAvailabilitySetID != nil {
1709 objectMap["recoveryAvailabilitySetId"] = arid.RecoveryAvailabilitySetID
1710 }
1711 if arid.RecoveryVirtualNetworkID != nil {
1712 objectMap["recoveryVirtualNetworkId"] = arid.RecoveryVirtualNetworkID
1713 }
1714 if arid.RecoveryProximityPlacementGroupID != nil {
1715 objectMap["recoveryProximityPlacementGroupId"] = arid.RecoveryProximityPlacementGroupID
1716 }
1717 if arid.AutoProtectionOfDataDiskStatus != "" {
1718 objectMap["autoProtectionOfDataDiskStatus"] = arid.AutoProtectionOfDataDiskStatus
1719 }
1720 if arid.MultiVMGroupName != nil {
1721 objectMap["multiVmGroupName"] = arid.MultiVMGroupName
1722 }
1723 if arid.MultiVMGroupID != nil {
1724 objectMap["multiVmGroupId"] = arid.MultiVMGroupID
1725 }
1726 if arid.RecoveryBootDiagStorageAccountID != nil {
1727 objectMap["recoveryBootDiagStorageAccountId"] = arid.RecoveryBootDiagStorageAccountID
1728 }
1729 if arid.DiskEncryptionInfo != nil {
1730 objectMap["diskEncryptionInfo"] = arid.DiskEncryptionInfo
1731 }
1732 if arid.RecoveryAvailabilityZone != nil {
1733 objectMap["recoveryAvailabilityZone"] = arid.RecoveryAvailabilityZone
1734 }
1735 if arid.InstanceType != "" {
1736 objectMap["instanceType"] = arid.InstanceType
1737 }
1738 return json.Marshal(objectMap)
1739 }
1740
1741
1742 func (arid A2AReplicationIntentDetails) AsA2AReplicationIntentDetails() (*A2AReplicationIntentDetails, bool) {
1743 return &arid, true
1744 }
1745
1746
1747 func (arid A2AReplicationIntentDetails) AsReplicationProtectionIntentProviderSpecificSettings() (*ReplicationProtectionIntentProviderSpecificSettings, bool) {
1748 return nil, false
1749 }
1750
1751
1752 func (arid A2AReplicationIntentDetails) AsBasicReplicationProtectionIntentProviderSpecificSettings() (BasicReplicationProtectionIntentProviderSpecificSettings, bool) {
1753 return &arid, true
1754 }
1755
1756
1757 type A2AReprotectInput struct {
1758
1759 RecoveryContainerID *string `json:"recoveryContainerId,omitempty"`
1760
1761 VMDisks *[]A2AVMDiskInputDetails `json:"vmDisks,omitempty"`
1762
1763 RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"`
1764
1765 RecoveryCloudServiceID *string `json:"recoveryCloudServiceId,omitempty"`
1766
1767 RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"`
1768
1769 PolicyID *string `json:"policyId,omitempty"`
1770
1771 InstanceType InstanceTypeBasicReverseReplicationProviderSpecificInput `json:"instanceType,omitempty"`
1772 }
1773
1774
1775 func (ari A2AReprotectInput) MarshalJSON() ([]byte, error) {
1776 ari.InstanceType = InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeA2A
1777 objectMap := make(map[string]interface{})
1778 if ari.RecoveryContainerID != nil {
1779 objectMap["recoveryContainerId"] = ari.RecoveryContainerID
1780 }
1781 if ari.VMDisks != nil {
1782 objectMap["vmDisks"] = ari.VMDisks
1783 }
1784 if ari.RecoveryResourceGroupID != nil {
1785 objectMap["recoveryResourceGroupId"] = ari.RecoveryResourceGroupID
1786 }
1787 if ari.RecoveryCloudServiceID != nil {
1788 objectMap["recoveryCloudServiceId"] = ari.RecoveryCloudServiceID
1789 }
1790 if ari.RecoveryAvailabilitySetID != nil {
1791 objectMap["recoveryAvailabilitySetId"] = ari.RecoveryAvailabilitySetID
1792 }
1793 if ari.PolicyID != nil {
1794 objectMap["policyId"] = ari.PolicyID
1795 }
1796 if ari.InstanceType != "" {
1797 objectMap["instanceType"] = ari.InstanceType
1798 }
1799 return json.Marshal(objectMap)
1800 }
1801
1802
1803 func (ari A2AReprotectInput) AsA2AReprotectInput() (*A2AReprotectInput, bool) {
1804 return &ari, true
1805 }
1806
1807
1808 func (ari A2AReprotectInput) AsHyperVReplicaAzureReprotectInput() (*HyperVReplicaAzureReprotectInput, bool) {
1809 return nil, false
1810 }
1811
1812
1813 func (ari A2AReprotectInput) AsInMageAzureV2ReprotectInput() (*InMageAzureV2ReprotectInput, bool) {
1814 return nil, false
1815 }
1816
1817
1818 func (ari A2AReprotectInput) AsInMageReprotectInput() (*InMageReprotectInput, bool) {
1819 return nil, false
1820 }
1821
1822
1823 func (ari A2AReprotectInput) AsReverseReplicationProviderSpecificInput() (*ReverseReplicationProviderSpecificInput, bool) {
1824 return nil, false
1825 }
1826
1827
1828 func (ari A2AReprotectInput) AsBasicReverseReplicationProviderSpecificInput() (BasicReverseReplicationProviderSpecificInput, bool) {
1829 return &ari, true
1830 }
1831
1832
1833 type A2ASwitchProtectionInput struct {
1834
1835 RecoveryContainerID *string `json:"recoveryContainerId,omitempty"`
1836
1837 VMDisks *[]A2AVMDiskInputDetails `json:"vmDisks,omitempty"`
1838
1839 VMManagedDisks *[]A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"`
1840
1841 RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"`
1842
1843 RecoveryCloudServiceID *string `json:"recoveryCloudServiceId,omitempty"`
1844
1845 RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"`
1846
1847 RecoveryProximityPlacementGroupID *string `json:"recoveryProximityPlacementGroupId,omitempty"`
1848
1849 PolicyID *string `json:"policyId,omitempty"`
1850
1851 RecoveryBootDiagStorageAccountID *string `json:"recoveryBootDiagStorageAccountId,omitempty"`
1852
1853 DiskEncryptionInfo *DiskEncryptionInfo `json:"diskEncryptionInfo,omitempty"`
1854
1855 InstanceType InstanceTypeBasicSwitchProtectionProviderSpecificInput `json:"instanceType,omitempty"`
1856 }
1857
1858
1859 func (aspi A2ASwitchProtectionInput) MarshalJSON() ([]byte, error) {
1860 aspi.InstanceType = InstanceTypeBasicSwitchProtectionProviderSpecificInputInstanceTypeA2A
1861 objectMap := make(map[string]interface{})
1862 if aspi.RecoveryContainerID != nil {
1863 objectMap["recoveryContainerId"] = aspi.RecoveryContainerID
1864 }
1865 if aspi.VMDisks != nil {
1866 objectMap["vmDisks"] = aspi.VMDisks
1867 }
1868 if aspi.VMManagedDisks != nil {
1869 objectMap["vmManagedDisks"] = aspi.VMManagedDisks
1870 }
1871 if aspi.RecoveryResourceGroupID != nil {
1872 objectMap["recoveryResourceGroupId"] = aspi.RecoveryResourceGroupID
1873 }
1874 if aspi.RecoveryCloudServiceID != nil {
1875 objectMap["recoveryCloudServiceId"] = aspi.RecoveryCloudServiceID
1876 }
1877 if aspi.RecoveryAvailabilitySetID != nil {
1878 objectMap["recoveryAvailabilitySetId"] = aspi.RecoveryAvailabilitySetID
1879 }
1880 if aspi.RecoveryProximityPlacementGroupID != nil {
1881 objectMap["recoveryProximityPlacementGroupId"] = aspi.RecoveryProximityPlacementGroupID
1882 }
1883 if aspi.PolicyID != nil {
1884 objectMap["policyId"] = aspi.PolicyID
1885 }
1886 if aspi.RecoveryBootDiagStorageAccountID != nil {
1887 objectMap["recoveryBootDiagStorageAccountId"] = aspi.RecoveryBootDiagStorageAccountID
1888 }
1889 if aspi.DiskEncryptionInfo != nil {
1890 objectMap["diskEncryptionInfo"] = aspi.DiskEncryptionInfo
1891 }
1892 if aspi.InstanceType != "" {
1893 objectMap["instanceType"] = aspi.InstanceType
1894 }
1895 return json.Marshal(objectMap)
1896 }
1897
1898
1899 func (aspi A2ASwitchProtectionInput) AsA2ASwitchProtectionInput() (*A2ASwitchProtectionInput, bool) {
1900 return &aspi, true
1901 }
1902
1903
1904 func (aspi A2ASwitchProtectionInput) AsSwitchProtectionProviderSpecificInput() (*SwitchProtectionProviderSpecificInput, bool) {
1905 return nil, false
1906 }
1907
1908
1909 func (aspi A2ASwitchProtectionInput) AsBasicSwitchProtectionProviderSpecificInput() (BasicSwitchProtectionProviderSpecificInput, bool) {
1910 return &aspi, true
1911 }
1912
1913
1914 type A2ATestFailoverInput struct {
1915
1916 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
1917
1918 CloudServiceCreationOption *string `json:"cloudServiceCreationOption,omitempty"`
1919
1920 InstanceType InstanceTypeBasicTestFailoverProviderSpecificInput `json:"instanceType,omitempty"`
1921 }
1922
1923
1924 func (atfi A2ATestFailoverInput) MarshalJSON() ([]byte, error) {
1925 atfi.InstanceType = InstanceTypeBasicTestFailoverProviderSpecificInputInstanceTypeA2A
1926 objectMap := make(map[string]interface{})
1927 if atfi.RecoveryPointID != nil {
1928 objectMap["recoveryPointId"] = atfi.RecoveryPointID
1929 }
1930 if atfi.CloudServiceCreationOption != nil {
1931 objectMap["cloudServiceCreationOption"] = atfi.CloudServiceCreationOption
1932 }
1933 if atfi.InstanceType != "" {
1934 objectMap["instanceType"] = atfi.InstanceType
1935 }
1936 return json.Marshal(objectMap)
1937 }
1938
1939
1940 func (atfi A2ATestFailoverInput) AsA2ATestFailoverInput() (*A2ATestFailoverInput, bool) {
1941 return &atfi, true
1942 }
1943
1944
1945 func (atfi A2ATestFailoverInput) AsHyperVReplicaAzureTestFailoverInput() (*HyperVReplicaAzureTestFailoverInput, bool) {
1946 return nil, false
1947 }
1948
1949
1950 func (atfi A2ATestFailoverInput) AsInMageAzureV2TestFailoverInput() (*InMageAzureV2TestFailoverInput, bool) {
1951 return nil, false
1952 }
1953
1954
1955 func (atfi A2ATestFailoverInput) AsInMageRcmTestFailoverInput() (*InMageRcmTestFailoverInput, bool) {
1956 return nil, false
1957 }
1958
1959
1960 func (atfi A2ATestFailoverInput) AsInMageTestFailoverInput() (*InMageTestFailoverInput, bool) {
1961 return nil, false
1962 }
1963
1964
1965 func (atfi A2ATestFailoverInput) AsTestFailoverProviderSpecificInput() (*TestFailoverProviderSpecificInput, bool) {
1966 return nil, false
1967 }
1968
1969
1970 func (atfi A2ATestFailoverInput) AsBasicTestFailoverProviderSpecificInput() (BasicTestFailoverProviderSpecificInput, bool) {
1971 return &atfi, true
1972 }
1973
1974
1975 type A2AUnplannedFailoverInput struct {
1976
1977 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
1978
1979 CloudServiceCreationOption *string `json:"cloudServiceCreationOption,omitempty"`
1980
1981 InstanceType InstanceTypeBasicUnplannedFailoverProviderSpecificInput `json:"instanceType,omitempty"`
1982 }
1983
1984
1985 func (aufi A2AUnplannedFailoverInput) MarshalJSON() ([]byte, error) {
1986 aufi.InstanceType = InstanceTypeBasicUnplannedFailoverProviderSpecificInputInstanceTypeA2A
1987 objectMap := make(map[string]interface{})
1988 if aufi.RecoveryPointID != nil {
1989 objectMap["recoveryPointId"] = aufi.RecoveryPointID
1990 }
1991 if aufi.CloudServiceCreationOption != nil {
1992 objectMap["cloudServiceCreationOption"] = aufi.CloudServiceCreationOption
1993 }
1994 if aufi.InstanceType != "" {
1995 objectMap["instanceType"] = aufi.InstanceType
1996 }
1997 return json.Marshal(objectMap)
1998 }
1999
2000
2001 func (aufi A2AUnplannedFailoverInput) AsA2AUnplannedFailoverInput() (*A2AUnplannedFailoverInput, bool) {
2002 return &aufi, true
2003 }
2004
2005
2006 func (aufi A2AUnplannedFailoverInput) AsHyperVReplicaAzureUnplannedFailoverInput() (*HyperVReplicaAzureUnplannedFailoverInput, bool) {
2007 return nil, false
2008 }
2009
2010
2011 func (aufi A2AUnplannedFailoverInput) AsInMageAzureV2UnplannedFailoverInput() (*InMageAzureV2UnplannedFailoverInput, bool) {
2012 return nil, false
2013 }
2014
2015
2016 func (aufi A2AUnplannedFailoverInput) AsInMageRcmUnplannedFailoverInput() (*InMageRcmUnplannedFailoverInput, bool) {
2017 return nil, false
2018 }
2019
2020
2021 func (aufi A2AUnplannedFailoverInput) AsInMageUnplannedFailoverInput() (*InMageUnplannedFailoverInput, bool) {
2022 return nil, false
2023 }
2024
2025
2026 func (aufi A2AUnplannedFailoverInput) AsUnplannedFailoverProviderSpecificInput() (*UnplannedFailoverProviderSpecificInput, bool) {
2027 return nil, false
2028 }
2029
2030
2031 func (aufi A2AUnplannedFailoverInput) AsBasicUnplannedFailoverProviderSpecificInput() (BasicUnplannedFailoverProviderSpecificInput, bool) {
2032 return &aufi, true
2033 }
2034
2035
2036 type A2AUnprotectedDiskDetails struct {
2037
2038 DiskLunID *int32 `json:"diskLunId,omitempty"`
2039 }
2040
2041
2042 type A2AUpdateContainerMappingInput struct {
2043
2044 AgentAutoUpdateStatus AgentAutoUpdateStatus `json:"agentAutoUpdateStatus,omitempty"`
2045
2046 AutomationAccountArmID *string `json:"automationAccountArmId,omitempty"`
2047
2048 InstanceType InstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingInput `json:"instanceType,omitempty"`
2049 }
2050
2051
2052 func (aucmi A2AUpdateContainerMappingInput) MarshalJSON() ([]byte, error) {
2053 aucmi.InstanceType = InstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingInputInstanceTypeA2A
2054 objectMap := make(map[string]interface{})
2055 if aucmi.AgentAutoUpdateStatus != "" {
2056 objectMap["agentAutoUpdateStatus"] = aucmi.AgentAutoUpdateStatus
2057 }
2058 if aucmi.AutomationAccountArmID != nil {
2059 objectMap["automationAccountArmId"] = aucmi.AutomationAccountArmID
2060 }
2061 if aucmi.InstanceType != "" {
2062 objectMap["instanceType"] = aucmi.InstanceType
2063 }
2064 return json.Marshal(objectMap)
2065 }
2066
2067
2068 func (aucmi A2AUpdateContainerMappingInput) AsA2AUpdateContainerMappingInput() (*A2AUpdateContainerMappingInput, bool) {
2069 return &aucmi, true
2070 }
2071
2072
2073 func (aucmi A2AUpdateContainerMappingInput) AsReplicationProviderSpecificUpdateContainerMappingInput() (*ReplicationProviderSpecificUpdateContainerMappingInput, bool) {
2074 return nil, false
2075 }
2076
2077
2078 func (aucmi A2AUpdateContainerMappingInput) AsBasicReplicationProviderSpecificUpdateContainerMappingInput() (BasicReplicationProviderSpecificUpdateContainerMappingInput, bool) {
2079 return &aucmi, true
2080 }
2081
2082
2083 type A2AUpdateReplicationProtectedItemInput struct {
2084
2085 RecoveryCloudServiceID *string `json:"recoveryCloudServiceId,omitempty"`
2086
2087 RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"`
2088
2089 ManagedDiskUpdateDetails *[]A2AVMManagedDiskUpdateDetails `json:"managedDiskUpdateDetails,omitempty"`
2090
2091 RecoveryBootDiagStorageAccountID *string `json:"recoveryBootDiagStorageAccountId,omitempty"`
2092
2093 DiskEncryptionInfo *DiskEncryptionInfo `json:"diskEncryptionInfo,omitempty"`
2094
2095 RecoveryProximityPlacementGroupID *string `json:"recoveryProximityPlacementGroupId,omitempty"`
2096
2097 TfoAzureVMName *string `json:"tfoAzureVMName,omitempty"`
2098
2099 InstanceType InstanceTypeBasicUpdateReplicationProtectedItemProviderInput `json:"instanceType,omitempty"`
2100 }
2101
2102
2103 func (aurpii A2AUpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, error) {
2104 aurpii.InstanceType = InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeA2A
2105 objectMap := make(map[string]interface{})
2106 if aurpii.RecoveryCloudServiceID != nil {
2107 objectMap["recoveryCloudServiceId"] = aurpii.RecoveryCloudServiceID
2108 }
2109 if aurpii.RecoveryResourceGroupID != nil {
2110 objectMap["recoveryResourceGroupId"] = aurpii.RecoveryResourceGroupID
2111 }
2112 if aurpii.ManagedDiskUpdateDetails != nil {
2113 objectMap["managedDiskUpdateDetails"] = aurpii.ManagedDiskUpdateDetails
2114 }
2115 if aurpii.RecoveryBootDiagStorageAccountID != nil {
2116 objectMap["recoveryBootDiagStorageAccountId"] = aurpii.RecoveryBootDiagStorageAccountID
2117 }
2118 if aurpii.DiskEncryptionInfo != nil {
2119 objectMap["diskEncryptionInfo"] = aurpii.DiskEncryptionInfo
2120 }
2121 if aurpii.RecoveryProximityPlacementGroupID != nil {
2122 objectMap["recoveryProximityPlacementGroupId"] = aurpii.RecoveryProximityPlacementGroupID
2123 }
2124 if aurpii.TfoAzureVMName != nil {
2125 objectMap["tfoAzureVMName"] = aurpii.TfoAzureVMName
2126 }
2127 if aurpii.InstanceType != "" {
2128 objectMap["instanceType"] = aurpii.InstanceType
2129 }
2130 return json.Marshal(objectMap)
2131 }
2132
2133
2134 func (aurpii A2AUpdateReplicationProtectedItemInput) AsA2AUpdateReplicationProtectedItemInput() (*A2AUpdateReplicationProtectedItemInput, bool) {
2135 return &aurpii, true
2136 }
2137
2138
2139 func (aurpii A2AUpdateReplicationProtectedItemInput) AsHyperVReplicaAzureUpdateReplicationProtectedItemInput() (*HyperVReplicaAzureUpdateReplicationProtectedItemInput, bool) {
2140 return nil, false
2141 }
2142
2143
2144 func (aurpii A2AUpdateReplicationProtectedItemInput) AsInMageAzureV2UpdateReplicationProtectedItemInput() (*InMageAzureV2UpdateReplicationProtectedItemInput, bool) {
2145 return nil, false
2146 }
2147
2148
2149 func (aurpii A2AUpdateReplicationProtectedItemInput) AsInMageRcmUpdateReplicationProtectedItemInput() (*InMageRcmUpdateReplicationProtectedItemInput, bool) {
2150 return nil, false
2151 }
2152
2153
2154 func (aurpii A2AUpdateReplicationProtectedItemInput) AsUpdateReplicationProtectedItemProviderInput() (*UpdateReplicationProtectedItemProviderInput, bool) {
2155 return nil, false
2156 }
2157
2158
2159 func (aurpii A2AUpdateReplicationProtectedItemInput) AsBasicUpdateReplicationProtectedItemProviderInput() (BasicUpdateReplicationProtectedItemProviderInput, bool) {
2160 return &aurpii, true
2161 }
2162
2163
2164 type A2AVMDiskDetails struct {
2165
2166 DiskURI *string `json:"diskUri,omitempty"`
2167
2168 RecoveryAzureStorageAccountID *string `json:"recoveryAzureStorageAccountId,omitempty"`
2169
2170 PrimaryStagingAzureStorageAccountID *string `json:"primaryStagingAzureStorageAccountId,omitempty"`
2171 }
2172
2173
2174 type A2AVMDiskInputDetails struct {
2175
2176 DiskURI *string `json:"diskUri,omitempty"`
2177
2178 RecoveryAzureStorageAccountID *string `json:"recoveryAzureStorageAccountId,omitempty"`
2179
2180 PrimaryStagingAzureStorageAccountID *string `json:"primaryStagingAzureStorageAccountId,omitempty"`
2181 }
2182
2183
2184 type A2AVMManagedDiskDetails struct {
2185
2186 DiskID *string `json:"diskId,omitempty"`
2187
2188 PrimaryStagingAzureStorageAccountID *string `json:"primaryStagingAzureStorageAccountId,omitempty"`
2189
2190 RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"`
2191
2192 RecoveryReplicaDiskAccountType *string `json:"recoveryReplicaDiskAccountType,omitempty"`
2193
2194 RecoveryTargetDiskAccountType *string `json:"recoveryTargetDiskAccountType,omitempty"`
2195
2196 RecoveryDiskEncryptionSetID *string `json:"recoveryDiskEncryptionSetId,omitempty"`
2197
2198 DiskEncryptionInfo *DiskEncryptionInfo `json:"diskEncryptionInfo,omitempty"`
2199 }
2200
2201
2202 type A2AVMManagedDiskInputDetails struct {
2203
2204 DiskID *string `json:"diskId,omitempty"`
2205
2206 PrimaryStagingAzureStorageAccountID *string `json:"primaryStagingAzureStorageAccountId,omitempty"`
2207
2208 RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"`
2209
2210 RecoveryReplicaDiskAccountType *string `json:"recoveryReplicaDiskAccountType,omitempty"`
2211
2212 RecoveryTargetDiskAccountType *string `json:"recoveryTargetDiskAccountType,omitempty"`
2213
2214 RecoveryDiskEncryptionSetID *string `json:"recoveryDiskEncryptionSetId,omitempty"`
2215
2216 DiskEncryptionInfo *DiskEncryptionInfo `json:"diskEncryptionInfo,omitempty"`
2217 }
2218
2219
2220 type A2AVMManagedDiskUpdateDetails struct {
2221
2222 DiskID *string `json:"diskId,omitempty"`
2223
2224 RecoveryTargetDiskAccountType *string `json:"recoveryTargetDiskAccountType,omitempty"`
2225
2226 RecoveryReplicaDiskAccountType *string `json:"recoveryReplicaDiskAccountType,omitempty"`
2227
2228 DiskEncryptionInfo *DiskEncryptionInfo `json:"diskEncryptionInfo,omitempty"`
2229
2230 FailoverDiskName *string `json:"failoverDiskName,omitempty"`
2231
2232 TfoDiskName *string `json:"tfoDiskName,omitempty"`
2233 }
2234
2235
2236 type AddDisksInput struct {
2237
2238 Properties *AddDisksInputProperties `json:"properties,omitempty"`
2239 }
2240
2241
2242 type AddDisksInputProperties struct {
2243
2244 ProviderSpecificDetails BasicAddDisksProviderSpecificInput `json:"providerSpecificDetails,omitempty"`
2245 }
2246
2247
2248 func (adip *AddDisksInputProperties) UnmarshalJSON(body []byte) error {
2249 var m map[string]*json.RawMessage
2250 err := json.Unmarshal(body, &m)
2251 if err != nil {
2252 return err
2253 }
2254 for k, v := range m {
2255 switch k {
2256 case "providerSpecificDetails":
2257 if v != nil {
2258 providerSpecificDetails, err := unmarshalBasicAddDisksProviderSpecificInput(*v)
2259 if err != nil {
2260 return err
2261 }
2262 adip.ProviderSpecificDetails = providerSpecificDetails
2263 }
2264 }
2265 }
2266
2267 return nil
2268 }
2269
2270
2271 type BasicAddDisksProviderSpecificInput interface {
2272 AsA2AAddDisksInput() (*A2AAddDisksInput, bool)
2273 AsAddDisksProviderSpecificInput() (*AddDisksProviderSpecificInput, bool)
2274 }
2275
2276
2277 type AddDisksProviderSpecificInput struct {
2278
2279 InstanceType InstanceType `json:"instanceType,omitempty"`
2280 }
2281
2282 func unmarshalBasicAddDisksProviderSpecificInput(body []byte) (BasicAddDisksProviderSpecificInput, error) {
2283 var m map[string]interface{}
2284 err := json.Unmarshal(body, &m)
2285 if err != nil {
2286 return nil, err
2287 }
2288
2289 switch m["instanceType"] {
2290 case string(InstanceTypeA2A):
2291 var aadi A2AAddDisksInput
2292 err := json.Unmarshal(body, &aadi)
2293 return aadi, err
2294 default:
2295 var adpsi AddDisksProviderSpecificInput
2296 err := json.Unmarshal(body, &adpsi)
2297 return adpsi, err
2298 }
2299 }
2300 func unmarshalBasicAddDisksProviderSpecificInputArray(body []byte) ([]BasicAddDisksProviderSpecificInput, error) {
2301 var rawMessages []*json.RawMessage
2302 err := json.Unmarshal(body, &rawMessages)
2303 if err != nil {
2304 return nil, err
2305 }
2306
2307 adpsiArray := make([]BasicAddDisksProviderSpecificInput, len(rawMessages))
2308
2309 for index, rawMessage := range rawMessages {
2310 adpsi, err := unmarshalBasicAddDisksProviderSpecificInput(*rawMessage)
2311 if err != nil {
2312 return nil, err
2313 }
2314 adpsiArray[index] = adpsi
2315 }
2316 return adpsiArray, nil
2317 }
2318
2319
2320 func (adpsi AddDisksProviderSpecificInput) MarshalJSON() ([]byte, error) {
2321 adpsi.InstanceType = InstanceTypeAddDisksProviderSpecificInput
2322 objectMap := make(map[string]interface{})
2323 if adpsi.InstanceType != "" {
2324 objectMap["instanceType"] = adpsi.InstanceType
2325 }
2326 return json.Marshal(objectMap)
2327 }
2328
2329
2330 func (adpsi AddDisksProviderSpecificInput) AsA2AAddDisksInput() (*A2AAddDisksInput, bool) {
2331 return nil, false
2332 }
2333
2334
2335 func (adpsi AddDisksProviderSpecificInput) AsAddDisksProviderSpecificInput() (*AddDisksProviderSpecificInput, bool) {
2336 return &adpsi, true
2337 }
2338
2339
2340 func (adpsi AddDisksProviderSpecificInput) AsBasicAddDisksProviderSpecificInput() (BasicAddDisksProviderSpecificInput, bool) {
2341 return &adpsi, true
2342 }
2343
2344
2345 type AddRecoveryServicesProviderInput struct {
2346
2347 Properties *AddRecoveryServicesProviderInputProperties `json:"properties,omitempty"`
2348 }
2349
2350
2351 type AddRecoveryServicesProviderInputProperties struct {
2352
2353 MachineName *string `json:"machineName,omitempty"`
2354
2355 MachineID *string `json:"machineId,omitempty"`
2356
2357 AuthenticationIdentityInput *IdentityProviderInput `json:"authenticationIdentityInput,omitempty"`
2358
2359 ResourceAccessIdentityInput *IdentityProviderInput `json:"resourceAccessIdentityInput,omitempty"`
2360
2361 DataPlaneAuthenticationIdentityInput *IdentityProviderInput `json:"dataPlaneAuthenticationIdentityInput,omitempty"`
2362 }
2363
2364
2365 type AddVCenterRequest struct {
2366
2367 Properties *AddVCenterRequestProperties `json:"properties,omitempty"`
2368 }
2369
2370
2371 type AddVCenterRequestProperties struct {
2372
2373 FriendlyName *string `json:"friendlyName,omitempty"`
2374
2375 IPAddress *string `json:"ipAddress,omitempty"`
2376
2377 ProcessServerID *string `json:"processServerId,omitempty"`
2378
2379 Port *string `json:"port,omitempty"`
2380
2381 RunAsAccountID *string `json:"runAsAccountId,omitempty"`
2382 }
2383
2384
2385 type AgentDetails struct {
2386
2387 AgentID *string `json:"agentId,omitempty"`
2388
2389 MachineID *string `json:"machineId,omitempty"`
2390
2391 BiosID *string `json:"biosId,omitempty"`
2392
2393 Fqdn *string `json:"fqdn,omitempty"`
2394
2395 Disks *[]AgentDiskDetails `json:"disks,omitempty"`
2396 }
2397
2398
2399 func (ad AgentDetails) MarshalJSON() ([]byte, error) {
2400 objectMap := make(map[string]interface{})
2401 return json.Marshal(objectMap)
2402 }
2403
2404
2405 type AgentDiskDetails struct {
2406
2407 DiskID *string `json:"diskId,omitempty"`
2408
2409 DiskName *string `json:"diskName,omitempty"`
2410
2411 IsOSDisk *string `json:"isOSDisk,omitempty"`
2412
2413 CapacityInBytes *int64 `json:"capacityInBytes,omitempty"`
2414
2415 LunID *int32 `json:"lunId,omitempty"`
2416 }
2417
2418
2419 func (add AgentDiskDetails) MarshalJSON() ([]byte, error) {
2420 objectMap := make(map[string]interface{})
2421 return json.Marshal(objectMap)
2422 }
2423
2424
2425 type Alert struct {
2426 autorest.Response `json:"-"`
2427
2428 Properties *AlertProperties `json:"properties,omitempty"`
2429
2430 ID *string `json:"id,omitempty"`
2431
2432 Name *string `json:"name,omitempty"`
2433
2434 Type *string `json:"type,omitempty"`
2435
2436 Location *string `json:"location,omitempty"`
2437 }
2438
2439
2440 func (a Alert) MarshalJSON() ([]byte, error) {
2441 objectMap := make(map[string]interface{})
2442 if a.Properties != nil {
2443 objectMap["properties"] = a.Properties
2444 }
2445 if a.Location != nil {
2446 objectMap["location"] = a.Location
2447 }
2448 return json.Marshal(objectMap)
2449 }
2450
2451
2452 type AlertCollection struct {
2453 autorest.Response `json:"-"`
2454
2455 Value *[]Alert `json:"value,omitempty"`
2456
2457 NextLink *string `json:"nextLink,omitempty"`
2458 }
2459
2460
2461 type AlertCollectionIterator struct {
2462 i int
2463 page AlertCollectionPage
2464 }
2465
2466
2467
2468 func (iter *AlertCollectionIterator) NextWithContext(ctx context.Context) (err error) {
2469 if tracing.IsEnabled() {
2470 ctx = tracing.StartSpan(ctx, fqdn+"/AlertCollectionIterator.NextWithContext")
2471 defer func() {
2472 sc := -1
2473 if iter.Response().Response.Response != nil {
2474 sc = iter.Response().Response.Response.StatusCode
2475 }
2476 tracing.EndSpan(ctx, sc, err)
2477 }()
2478 }
2479 iter.i++
2480 if iter.i < len(iter.page.Values()) {
2481 return nil
2482 }
2483 err = iter.page.NextWithContext(ctx)
2484 if err != nil {
2485 iter.i--
2486 return err
2487 }
2488 iter.i = 0
2489 return nil
2490 }
2491
2492
2493
2494
2495 func (iter *AlertCollectionIterator) Next() error {
2496 return iter.NextWithContext(context.Background())
2497 }
2498
2499
2500 func (iter AlertCollectionIterator) NotDone() bool {
2501 return iter.page.NotDone() && iter.i < len(iter.page.Values())
2502 }
2503
2504
2505 func (iter AlertCollectionIterator) Response() AlertCollection {
2506 return iter.page.Response()
2507 }
2508
2509
2510
2511 func (iter AlertCollectionIterator) Value() Alert {
2512 if !iter.page.NotDone() {
2513 return Alert{}
2514 }
2515 return iter.page.Values()[iter.i]
2516 }
2517
2518
2519 func NewAlertCollectionIterator(page AlertCollectionPage) AlertCollectionIterator {
2520 return AlertCollectionIterator{page: page}
2521 }
2522
2523
2524 func (ac AlertCollection) IsEmpty() bool {
2525 return ac.Value == nil || len(*ac.Value) == 0
2526 }
2527
2528
2529 func (ac AlertCollection) hasNextLink() bool {
2530 return ac.NextLink != nil && len(*ac.NextLink) != 0
2531 }
2532
2533
2534
2535 func (ac AlertCollection) alertCollectionPreparer(ctx context.Context) (*http.Request, error) {
2536 if !ac.hasNextLink() {
2537 return nil, nil
2538 }
2539 return autorest.Prepare((&http.Request{}).WithContext(ctx),
2540 autorest.AsJSON(),
2541 autorest.AsGet(),
2542 autorest.WithBaseURL(to.String(ac.NextLink)))
2543 }
2544
2545
2546 type AlertCollectionPage struct {
2547 fn func(context.Context, AlertCollection) (AlertCollection, error)
2548 ac AlertCollection
2549 }
2550
2551
2552
2553 func (page *AlertCollectionPage) NextWithContext(ctx context.Context) (err error) {
2554 if tracing.IsEnabled() {
2555 ctx = tracing.StartSpan(ctx, fqdn+"/AlertCollectionPage.NextWithContext")
2556 defer func() {
2557 sc := -1
2558 if page.Response().Response.Response != nil {
2559 sc = page.Response().Response.Response.StatusCode
2560 }
2561 tracing.EndSpan(ctx, sc, err)
2562 }()
2563 }
2564 for {
2565 next, err := page.fn(ctx, page.ac)
2566 if err != nil {
2567 return err
2568 }
2569 page.ac = next
2570 if !next.hasNextLink() || !next.IsEmpty() {
2571 break
2572 }
2573 }
2574 return nil
2575 }
2576
2577
2578
2579
2580 func (page *AlertCollectionPage) Next() error {
2581 return page.NextWithContext(context.Background())
2582 }
2583
2584
2585 func (page AlertCollectionPage) NotDone() bool {
2586 return !page.ac.IsEmpty()
2587 }
2588
2589
2590 func (page AlertCollectionPage) Response() AlertCollection {
2591 return page.ac
2592 }
2593
2594
2595 func (page AlertCollectionPage) Values() []Alert {
2596 if page.ac.IsEmpty() {
2597 return nil
2598 }
2599 return *page.ac.Value
2600 }
2601
2602
2603 func NewAlertCollectionPage(cur AlertCollection, getNextPage func(context.Context, AlertCollection) (AlertCollection, error)) AlertCollectionPage {
2604 return AlertCollectionPage{
2605 fn: getNextPage,
2606 ac: cur,
2607 }
2608 }
2609
2610
2611 type AlertProperties struct {
2612
2613 SendToOwners *string `json:"sendToOwners,omitempty"`
2614
2615 CustomEmailAddresses *[]string `json:"customEmailAddresses,omitempty"`
2616
2617 Locale *string `json:"locale,omitempty"`
2618 }
2619
2620
2621 type ApplyRecoveryPointInput struct {
2622
2623 Properties *ApplyRecoveryPointInputProperties `json:"properties,omitempty"`
2624 }
2625
2626
2627 type ApplyRecoveryPointInputProperties struct {
2628
2629 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
2630
2631 ProviderSpecificDetails BasicApplyRecoveryPointProviderSpecificInput `json:"providerSpecificDetails,omitempty"`
2632 }
2633
2634
2635 func (arpip *ApplyRecoveryPointInputProperties) UnmarshalJSON(body []byte) error {
2636 var m map[string]*json.RawMessage
2637 err := json.Unmarshal(body, &m)
2638 if err != nil {
2639 return err
2640 }
2641 for k, v := range m {
2642 switch k {
2643 case "recoveryPointId":
2644 if v != nil {
2645 var recoveryPointID string
2646 err = json.Unmarshal(*v, &recoveryPointID)
2647 if err != nil {
2648 return err
2649 }
2650 arpip.RecoveryPointID = &recoveryPointID
2651 }
2652 case "providerSpecificDetails":
2653 if v != nil {
2654 providerSpecificDetails, err := unmarshalBasicApplyRecoveryPointProviderSpecificInput(*v)
2655 if err != nil {
2656 return err
2657 }
2658 arpip.ProviderSpecificDetails = providerSpecificDetails
2659 }
2660 }
2661 }
2662
2663 return nil
2664 }
2665
2666
2667 type BasicApplyRecoveryPointProviderSpecificInput interface {
2668 AsA2AApplyRecoveryPointInput() (*A2AApplyRecoveryPointInput, bool)
2669 AsHyperVReplicaAzureApplyRecoveryPointInput() (*HyperVReplicaAzureApplyRecoveryPointInput, bool)
2670 AsInMageAzureV2ApplyRecoveryPointInput() (*InMageAzureV2ApplyRecoveryPointInput, bool)
2671 AsInMageRcmApplyRecoveryPointInput() (*InMageRcmApplyRecoveryPointInput, bool)
2672 AsApplyRecoveryPointProviderSpecificInput() (*ApplyRecoveryPointProviderSpecificInput, bool)
2673 }
2674
2675
2676 type ApplyRecoveryPointProviderSpecificInput struct {
2677
2678 InstanceType InstanceTypeBasicApplyRecoveryPointProviderSpecificInput `json:"instanceType,omitempty"`
2679 }
2680
2681 func unmarshalBasicApplyRecoveryPointProviderSpecificInput(body []byte) (BasicApplyRecoveryPointProviderSpecificInput, error) {
2682 var m map[string]interface{}
2683 err := json.Unmarshal(body, &m)
2684 if err != nil {
2685 return nil, err
2686 }
2687
2688 switch m["instanceType"] {
2689 case string(InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeA2A):
2690 var aarpi A2AApplyRecoveryPointInput
2691 err := json.Unmarshal(body, &aarpi)
2692 return aarpi, err
2693 case string(InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeHyperVReplicaAzure):
2694 var hvraarpi HyperVReplicaAzureApplyRecoveryPointInput
2695 err := json.Unmarshal(body, &hvraarpi)
2696 return hvraarpi, err
2697 case string(InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeInMageAzureV2):
2698 var imavarpi InMageAzureV2ApplyRecoveryPointInput
2699 err := json.Unmarshal(body, &imavarpi)
2700 return imavarpi, err
2701 case string(InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeInMageRcm):
2702 var imrarpi InMageRcmApplyRecoveryPointInput
2703 err := json.Unmarshal(body, &imrarpi)
2704 return imrarpi, err
2705 default:
2706 var arppsi ApplyRecoveryPointProviderSpecificInput
2707 err := json.Unmarshal(body, &arppsi)
2708 return arppsi, err
2709 }
2710 }
2711 func unmarshalBasicApplyRecoveryPointProviderSpecificInputArray(body []byte) ([]BasicApplyRecoveryPointProviderSpecificInput, error) {
2712 var rawMessages []*json.RawMessage
2713 err := json.Unmarshal(body, &rawMessages)
2714 if err != nil {
2715 return nil, err
2716 }
2717
2718 arppsiArray := make([]BasicApplyRecoveryPointProviderSpecificInput, len(rawMessages))
2719
2720 for index, rawMessage := range rawMessages {
2721 arppsi, err := unmarshalBasicApplyRecoveryPointProviderSpecificInput(*rawMessage)
2722 if err != nil {
2723 return nil, err
2724 }
2725 arppsiArray[index] = arppsi
2726 }
2727 return arppsiArray, nil
2728 }
2729
2730
2731 func (arppsi ApplyRecoveryPointProviderSpecificInput) MarshalJSON() ([]byte, error) {
2732 arppsi.InstanceType = InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeApplyRecoveryPointProviderSpecificInput
2733 objectMap := make(map[string]interface{})
2734 if arppsi.InstanceType != "" {
2735 objectMap["instanceType"] = arppsi.InstanceType
2736 }
2737 return json.Marshal(objectMap)
2738 }
2739
2740
2741 func (arppsi ApplyRecoveryPointProviderSpecificInput) AsA2AApplyRecoveryPointInput() (*A2AApplyRecoveryPointInput, bool) {
2742 return nil, false
2743 }
2744
2745
2746 func (arppsi ApplyRecoveryPointProviderSpecificInput) AsHyperVReplicaAzureApplyRecoveryPointInput() (*HyperVReplicaAzureApplyRecoveryPointInput, bool) {
2747 return nil, false
2748 }
2749
2750
2751 func (arppsi ApplyRecoveryPointProviderSpecificInput) AsInMageAzureV2ApplyRecoveryPointInput() (*InMageAzureV2ApplyRecoveryPointInput, bool) {
2752 return nil, false
2753 }
2754
2755
2756 func (arppsi ApplyRecoveryPointProviderSpecificInput) AsInMageRcmApplyRecoveryPointInput() (*InMageRcmApplyRecoveryPointInput, bool) {
2757 return nil, false
2758 }
2759
2760
2761 func (arppsi ApplyRecoveryPointProviderSpecificInput) AsApplyRecoveryPointProviderSpecificInput() (*ApplyRecoveryPointProviderSpecificInput, bool) {
2762 return &arppsi, true
2763 }
2764
2765
2766 func (arppsi ApplyRecoveryPointProviderSpecificInput) AsBasicApplyRecoveryPointProviderSpecificInput() (BasicApplyRecoveryPointProviderSpecificInput, bool) {
2767 return &arppsi, true
2768 }
2769
2770
2771 type AsrJobDetails struct {
2772
2773 AffectedObjectDetails map[string]*string `json:"affectedObjectDetails"`
2774
2775 InstanceType InstanceTypeBasicJobDetails `json:"instanceType,omitempty"`
2776 }
2777
2778
2779 func (ajd AsrJobDetails) MarshalJSON() ([]byte, error) {
2780 ajd.InstanceType = InstanceTypeAsrJobDetails
2781 objectMap := make(map[string]interface{})
2782 if ajd.AffectedObjectDetails != nil {
2783 objectMap["affectedObjectDetails"] = ajd.AffectedObjectDetails
2784 }
2785 if ajd.InstanceType != "" {
2786 objectMap["instanceType"] = ajd.InstanceType
2787 }
2788 return json.Marshal(objectMap)
2789 }
2790
2791
2792 func (ajd AsrJobDetails) AsAsrJobDetails() (*AsrJobDetails, bool) {
2793 return &ajd, true
2794 }
2795
2796
2797 func (ajd AsrJobDetails) AsExportJobDetails() (*ExportJobDetails, bool) {
2798 return nil, false
2799 }
2800
2801
2802 func (ajd AsrJobDetails) AsFailoverJobDetails() (*FailoverJobDetails, bool) {
2803 return nil, false
2804 }
2805
2806
2807 func (ajd AsrJobDetails) AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool) {
2808 return nil, false
2809 }
2810
2811
2812 func (ajd AsrJobDetails) AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool) {
2813 return nil, false
2814 }
2815
2816
2817 func (ajd AsrJobDetails) AsJobDetails() (*JobDetails, bool) {
2818 return nil, false
2819 }
2820
2821
2822 func (ajd AsrJobDetails) AsBasicJobDetails() (BasicJobDetails, bool) {
2823 return &ajd, true
2824 }
2825
2826
2827 type ASRTask struct {
2828
2829 TaskID *string `json:"taskId,omitempty"`
2830
2831 Name *string `json:"name,omitempty"`
2832
2833 StartTime *date.Time `json:"startTime,omitempty"`
2834
2835 EndTime *date.Time `json:"endTime,omitempty"`
2836
2837 AllowedActions *[]string `json:"allowedActions,omitempty"`
2838
2839 FriendlyName *string `json:"friendlyName,omitempty"`
2840
2841 State *string `json:"state,omitempty"`
2842
2843 StateDescription *string `json:"stateDescription,omitempty"`
2844
2845 TaskType *string `json:"taskType,omitempty"`
2846
2847 CustomDetails BasicTaskTypeDetails `json:"customDetails,omitempty"`
2848
2849 GroupTaskCustomDetails BasicGroupTaskDetails `json:"groupTaskCustomDetails,omitempty"`
2850
2851 Errors *[]JobErrorDetails `json:"errors,omitempty"`
2852 }
2853
2854
2855 func (at *ASRTask) UnmarshalJSON(body []byte) error {
2856 var m map[string]*json.RawMessage
2857 err := json.Unmarshal(body, &m)
2858 if err != nil {
2859 return err
2860 }
2861 for k, v := range m {
2862 switch k {
2863 case "taskId":
2864 if v != nil {
2865 var taskID string
2866 err = json.Unmarshal(*v, &taskID)
2867 if err != nil {
2868 return err
2869 }
2870 at.TaskID = &taskID
2871 }
2872 case "name":
2873 if v != nil {
2874 var name string
2875 err = json.Unmarshal(*v, &name)
2876 if err != nil {
2877 return err
2878 }
2879 at.Name = &name
2880 }
2881 case "startTime":
2882 if v != nil {
2883 var startTime date.Time
2884 err = json.Unmarshal(*v, &startTime)
2885 if err != nil {
2886 return err
2887 }
2888 at.StartTime = &startTime
2889 }
2890 case "endTime":
2891 if v != nil {
2892 var endTime date.Time
2893 err = json.Unmarshal(*v, &endTime)
2894 if err != nil {
2895 return err
2896 }
2897 at.EndTime = &endTime
2898 }
2899 case "allowedActions":
2900 if v != nil {
2901 var allowedActions []string
2902 err = json.Unmarshal(*v, &allowedActions)
2903 if err != nil {
2904 return err
2905 }
2906 at.AllowedActions = &allowedActions
2907 }
2908 case "friendlyName":
2909 if v != nil {
2910 var friendlyName string
2911 err = json.Unmarshal(*v, &friendlyName)
2912 if err != nil {
2913 return err
2914 }
2915 at.FriendlyName = &friendlyName
2916 }
2917 case "state":
2918 if v != nil {
2919 var state string
2920 err = json.Unmarshal(*v, &state)
2921 if err != nil {
2922 return err
2923 }
2924 at.State = &state
2925 }
2926 case "stateDescription":
2927 if v != nil {
2928 var stateDescription string
2929 err = json.Unmarshal(*v, &stateDescription)
2930 if err != nil {
2931 return err
2932 }
2933 at.StateDescription = &stateDescription
2934 }
2935 case "taskType":
2936 if v != nil {
2937 var taskType string
2938 err = json.Unmarshal(*v, &taskType)
2939 if err != nil {
2940 return err
2941 }
2942 at.TaskType = &taskType
2943 }
2944 case "customDetails":
2945 if v != nil {
2946 customDetails, err := unmarshalBasicTaskTypeDetails(*v)
2947 if err != nil {
2948 return err
2949 }
2950 at.CustomDetails = customDetails
2951 }
2952 case "groupTaskCustomDetails":
2953 if v != nil {
2954 groupTaskCustomDetails, err := unmarshalBasicGroupTaskDetails(*v)
2955 if err != nil {
2956 return err
2957 }
2958 at.GroupTaskCustomDetails = groupTaskCustomDetails
2959 }
2960 case "errors":
2961 if v != nil {
2962 var errorsVar []JobErrorDetails
2963 err = json.Unmarshal(*v, &errorsVar)
2964 if err != nil {
2965 return err
2966 }
2967 at.Errors = &errorsVar
2968 }
2969 }
2970 }
2971
2972 return nil
2973 }
2974
2975
2976 type AutomationRunbookTaskDetails struct {
2977
2978 Name *string `json:"name,omitempty"`
2979
2980 CloudServiceName *string `json:"cloudServiceName,omitempty"`
2981
2982 SubscriptionID *string `json:"subscriptionId,omitempty"`
2983
2984 AccountName *string `json:"accountName,omitempty"`
2985
2986 RunbookID *string `json:"runbookId,omitempty"`
2987
2988 RunbookName *string `json:"runbookName,omitempty"`
2989
2990 JobID *string `json:"jobId,omitempty"`
2991
2992 JobOutput *string `json:"jobOutput,omitempty"`
2993
2994 IsPrimarySideScript *bool `json:"isPrimarySideScript,omitempty"`
2995
2996 InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"`
2997 }
2998
2999
3000 func (artd AutomationRunbookTaskDetails) MarshalJSON() ([]byte, error) {
3001 artd.InstanceType = InstanceTypeAutomationRunbookTaskDetails
3002 objectMap := make(map[string]interface{})
3003 if artd.Name != nil {
3004 objectMap["name"] = artd.Name
3005 }
3006 if artd.CloudServiceName != nil {
3007 objectMap["cloudServiceName"] = artd.CloudServiceName
3008 }
3009 if artd.SubscriptionID != nil {
3010 objectMap["subscriptionId"] = artd.SubscriptionID
3011 }
3012 if artd.AccountName != nil {
3013 objectMap["accountName"] = artd.AccountName
3014 }
3015 if artd.RunbookID != nil {
3016 objectMap["runbookId"] = artd.RunbookID
3017 }
3018 if artd.RunbookName != nil {
3019 objectMap["runbookName"] = artd.RunbookName
3020 }
3021 if artd.JobID != nil {
3022 objectMap["jobId"] = artd.JobID
3023 }
3024 if artd.JobOutput != nil {
3025 objectMap["jobOutput"] = artd.JobOutput
3026 }
3027 if artd.IsPrimarySideScript != nil {
3028 objectMap["isPrimarySideScript"] = artd.IsPrimarySideScript
3029 }
3030 if artd.InstanceType != "" {
3031 objectMap["instanceType"] = artd.InstanceType
3032 }
3033 return json.Marshal(objectMap)
3034 }
3035
3036
3037 func (artd AutomationRunbookTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) {
3038 return &artd, true
3039 }
3040
3041
3042 func (artd AutomationRunbookTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) {
3043 return nil, false
3044 }
3045
3046
3047 func (artd AutomationRunbookTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) {
3048 return nil, false
3049 }
3050
3051
3052 func (artd AutomationRunbookTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) {
3053 return nil, false
3054 }
3055
3056
3057 func (artd AutomationRunbookTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) {
3058 return nil, false
3059 }
3060
3061
3062 func (artd AutomationRunbookTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) {
3063 return nil, false
3064 }
3065
3066
3067 func (artd AutomationRunbookTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) {
3068 return nil, false
3069 }
3070
3071
3072 func (artd AutomationRunbookTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) {
3073 return nil, false
3074 }
3075
3076
3077 func (artd AutomationRunbookTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) {
3078 return nil, false
3079 }
3080
3081
3082 func (artd AutomationRunbookTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) {
3083 return &artd, true
3084 }
3085
3086
3087 type AzureFabricCreationInput struct {
3088
3089 Location *string `json:"location,omitempty"`
3090
3091 InstanceType InstanceTypeBasicFabricSpecificCreationInput `json:"instanceType,omitempty"`
3092 }
3093
3094
3095 func (afci AzureFabricCreationInput) MarshalJSON() ([]byte, error) {
3096 afci.InstanceType = InstanceTypeAzure
3097 objectMap := make(map[string]interface{})
3098 if afci.Location != nil {
3099 objectMap["location"] = afci.Location
3100 }
3101 if afci.InstanceType != "" {
3102 objectMap["instanceType"] = afci.InstanceType
3103 }
3104 return json.Marshal(objectMap)
3105 }
3106
3107
3108 func (afci AzureFabricCreationInput) AsAzureFabricCreationInput() (*AzureFabricCreationInput, bool) {
3109 return &afci, true
3110 }
3111
3112
3113 func (afci AzureFabricCreationInput) AsInMageRcmFabricCreationInput() (*InMageRcmFabricCreationInput, bool) {
3114 return nil, false
3115 }
3116
3117
3118 func (afci AzureFabricCreationInput) AsVMwareV2FabricCreationInput() (*VMwareV2FabricCreationInput, bool) {
3119 return nil, false
3120 }
3121
3122
3123 func (afci AzureFabricCreationInput) AsFabricSpecificCreationInput() (*FabricSpecificCreationInput, bool) {
3124 return nil, false
3125 }
3126
3127
3128 func (afci AzureFabricCreationInput) AsBasicFabricSpecificCreationInput() (BasicFabricSpecificCreationInput, bool) {
3129 return &afci, true
3130 }
3131
3132
3133 type AzureFabricSpecificDetails struct {
3134
3135 Location *string `json:"location,omitempty"`
3136
3137 ContainerIds *[]string `json:"containerIds,omitempty"`
3138
3139 InstanceType InstanceTypeBasicFabricSpecificDetails `json:"instanceType,omitempty"`
3140 }
3141
3142
3143 func (afsd AzureFabricSpecificDetails) MarshalJSON() ([]byte, error) {
3144 afsd.InstanceType = InstanceTypeBasicFabricSpecificDetailsInstanceTypeAzure
3145 objectMap := make(map[string]interface{})
3146 if afsd.Location != nil {
3147 objectMap["location"] = afsd.Location
3148 }
3149 if afsd.ContainerIds != nil {
3150 objectMap["containerIds"] = afsd.ContainerIds
3151 }
3152 if afsd.InstanceType != "" {
3153 objectMap["instanceType"] = afsd.InstanceType
3154 }
3155 return json.Marshal(objectMap)
3156 }
3157
3158
3159 func (afsd AzureFabricSpecificDetails) AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool) {
3160 return &afsd, true
3161 }
3162
3163
3164 func (afsd AzureFabricSpecificDetails) AsHyperVSiteDetails() (*HyperVSiteDetails, bool) {
3165 return nil, false
3166 }
3167
3168
3169 func (afsd AzureFabricSpecificDetails) AsInMageRcmFabricSpecificDetails() (*InMageRcmFabricSpecificDetails, bool) {
3170 return nil, false
3171 }
3172
3173
3174 func (afsd AzureFabricSpecificDetails) AsVmmDetails() (*VmmDetails, bool) {
3175 return nil, false
3176 }
3177
3178
3179 func (afsd AzureFabricSpecificDetails) AsVMwareDetails() (*VMwareDetails, bool) {
3180 return nil, false
3181 }
3182
3183
3184 func (afsd AzureFabricSpecificDetails) AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool) {
3185 return nil, false
3186 }
3187
3188
3189 func (afsd AzureFabricSpecificDetails) AsFabricSpecificDetails() (*FabricSpecificDetails, bool) {
3190 return nil, false
3191 }
3192
3193
3194 func (afsd AzureFabricSpecificDetails) AsBasicFabricSpecificDetails() (BasicFabricSpecificDetails, bool) {
3195 return &afsd, true
3196 }
3197
3198
3199
3200 type AzureToAzureCreateNetworkMappingInput struct {
3201
3202 PrimaryNetworkID *string `json:"primaryNetworkId,omitempty"`
3203
3204 InstanceType InstanceTypeBasicFabricSpecificCreateNetworkMappingInput `json:"instanceType,omitempty"`
3205 }
3206
3207
3208 func (atacnmi AzureToAzureCreateNetworkMappingInput) MarshalJSON() ([]byte, error) {
3209 atacnmi.InstanceType = InstanceTypeAzureToAzure
3210 objectMap := make(map[string]interface{})
3211 if atacnmi.PrimaryNetworkID != nil {
3212 objectMap["primaryNetworkId"] = atacnmi.PrimaryNetworkID
3213 }
3214 if atacnmi.InstanceType != "" {
3215 objectMap["instanceType"] = atacnmi.InstanceType
3216 }
3217 return json.Marshal(objectMap)
3218 }
3219
3220
3221 func (atacnmi AzureToAzureCreateNetworkMappingInput) AsAzureToAzureCreateNetworkMappingInput() (*AzureToAzureCreateNetworkMappingInput, bool) {
3222 return &atacnmi, true
3223 }
3224
3225
3226 func (atacnmi AzureToAzureCreateNetworkMappingInput) AsVmmToAzureCreateNetworkMappingInput() (*VmmToAzureCreateNetworkMappingInput, bool) {
3227 return nil, false
3228 }
3229
3230
3231 func (atacnmi AzureToAzureCreateNetworkMappingInput) AsVmmToVmmCreateNetworkMappingInput() (*VmmToVmmCreateNetworkMappingInput, bool) {
3232 return nil, false
3233 }
3234
3235
3236 func (atacnmi AzureToAzureCreateNetworkMappingInput) AsFabricSpecificCreateNetworkMappingInput() (*FabricSpecificCreateNetworkMappingInput, bool) {
3237 return nil, false
3238 }
3239
3240
3241 func (atacnmi AzureToAzureCreateNetworkMappingInput) AsBasicFabricSpecificCreateNetworkMappingInput() (BasicFabricSpecificCreateNetworkMappingInput, bool) {
3242 return &atacnmi, true
3243 }
3244
3245
3246 type AzureToAzureNetworkMappingSettings struct {
3247
3248 PrimaryFabricLocation *string `json:"primaryFabricLocation,omitempty"`
3249
3250 RecoveryFabricLocation *string `json:"recoveryFabricLocation,omitempty"`
3251
3252 InstanceType InstanceTypeBasicNetworkMappingFabricSpecificSettings `json:"instanceType,omitempty"`
3253 }
3254
3255
3256 func (atanms AzureToAzureNetworkMappingSettings) MarshalJSON() ([]byte, error) {
3257 atanms.InstanceType = InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeAzureToAzure
3258 objectMap := make(map[string]interface{})
3259 if atanms.PrimaryFabricLocation != nil {
3260 objectMap["primaryFabricLocation"] = atanms.PrimaryFabricLocation
3261 }
3262 if atanms.RecoveryFabricLocation != nil {
3263 objectMap["recoveryFabricLocation"] = atanms.RecoveryFabricLocation
3264 }
3265 if atanms.InstanceType != "" {
3266 objectMap["instanceType"] = atanms.InstanceType
3267 }
3268 return json.Marshal(objectMap)
3269 }
3270
3271
3272 func (atanms AzureToAzureNetworkMappingSettings) AsAzureToAzureNetworkMappingSettings() (*AzureToAzureNetworkMappingSettings, bool) {
3273 return &atanms, true
3274 }
3275
3276
3277 func (atanms AzureToAzureNetworkMappingSettings) AsVmmToAzureNetworkMappingSettings() (*VmmToAzureNetworkMappingSettings, bool) {
3278 return nil, false
3279 }
3280
3281
3282 func (atanms AzureToAzureNetworkMappingSettings) AsVmmToVmmNetworkMappingSettings() (*VmmToVmmNetworkMappingSettings, bool) {
3283 return nil, false
3284 }
3285
3286
3287 func (atanms AzureToAzureNetworkMappingSettings) AsNetworkMappingFabricSpecificSettings() (*NetworkMappingFabricSpecificSettings, bool) {
3288 return nil, false
3289 }
3290
3291
3292 func (atanms AzureToAzureNetworkMappingSettings) AsBasicNetworkMappingFabricSpecificSettings() (BasicNetworkMappingFabricSpecificSettings, bool) {
3293 return &atanms, true
3294 }
3295
3296
3297 type AzureToAzureUpdateNetworkMappingInput struct {
3298
3299 PrimaryNetworkID *string `json:"primaryNetworkId,omitempty"`
3300
3301 InstanceType InstanceTypeBasicFabricSpecificUpdateNetworkMappingInput `json:"instanceType,omitempty"`
3302 }
3303
3304
3305 func (ataunmi AzureToAzureUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) {
3306 ataunmi.InstanceType = InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeAzureToAzure
3307 objectMap := make(map[string]interface{})
3308 if ataunmi.PrimaryNetworkID != nil {
3309 objectMap["primaryNetworkId"] = ataunmi.PrimaryNetworkID
3310 }
3311 if ataunmi.InstanceType != "" {
3312 objectMap["instanceType"] = ataunmi.InstanceType
3313 }
3314 return json.Marshal(objectMap)
3315 }
3316
3317
3318 func (ataunmi AzureToAzureUpdateNetworkMappingInput) AsAzureToAzureUpdateNetworkMappingInput() (*AzureToAzureUpdateNetworkMappingInput, bool) {
3319 return &ataunmi, true
3320 }
3321
3322
3323 func (ataunmi AzureToAzureUpdateNetworkMappingInput) AsVmmToAzureUpdateNetworkMappingInput() (*VmmToAzureUpdateNetworkMappingInput, bool) {
3324 return nil, false
3325 }
3326
3327
3328 func (ataunmi AzureToAzureUpdateNetworkMappingInput) AsVmmToVmmUpdateNetworkMappingInput() (*VmmToVmmUpdateNetworkMappingInput, bool) {
3329 return nil, false
3330 }
3331
3332
3333 func (ataunmi AzureToAzureUpdateNetworkMappingInput) AsFabricSpecificUpdateNetworkMappingInput() (*FabricSpecificUpdateNetworkMappingInput, bool) {
3334 return nil, false
3335 }
3336
3337
3338 func (ataunmi AzureToAzureUpdateNetworkMappingInput) AsBasicFabricSpecificUpdateNetworkMappingInput() (BasicFabricSpecificUpdateNetworkMappingInput, bool) {
3339 return &ataunmi, true
3340 }
3341
3342
3343 type AzureToAzureVMSyncedConfigDetails struct {
3344
3345 Tags map[string]*string `json:"tags"`
3346
3347 InputEndpoints *[]InputEndpoint `json:"inputEndpoints,omitempty"`
3348 }
3349
3350
3351 func (atavscd AzureToAzureVMSyncedConfigDetails) MarshalJSON() ([]byte, error) {
3352 objectMap := make(map[string]interface{})
3353 if atavscd.Tags != nil {
3354 objectMap["tags"] = atavscd.Tags
3355 }
3356 if atavscd.InputEndpoints != nil {
3357 objectMap["inputEndpoints"] = atavscd.InputEndpoints
3358 }
3359 return json.Marshal(objectMap)
3360 }
3361
3362
3363 type AzureVMDiskDetails struct {
3364
3365 VhdType *string `json:"vhdType,omitempty"`
3366
3367 VhdID *string `json:"vhdId,omitempty"`
3368
3369 DiskID *string `json:"diskId,omitempty"`
3370
3371 VhdName *string `json:"vhdName,omitempty"`
3372
3373 MaxSizeMB *string `json:"maxSizeMB,omitempty"`
3374
3375 TargetDiskLocation *string `json:"targetDiskLocation,omitempty"`
3376
3377 TargetDiskName *string `json:"targetDiskName,omitempty"`
3378
3379 LunID *string `json:"lunId,omitempty"`
3380
3381 DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`
3382 }
3383
3384
3385
3386 type ComputeSizeErrorDetails struct {
3387
3388 Message *string `json:"message,omitempty"`
3389
3390 Severity *string `json:"severity,omitempty"`
3391 }
3392
3393
3394 type BasicConfigurationSettings interface {
3395 AsHyperVVirtualMachineDetails() (*HyperVVirtualMachineDetails, bool)
3396 AsReplicationGroupDetails() (*ReplicationGroupDetails, bool)
3397 AsVmmVirtualMachineDetails() (*VmmVirtualMachineDetails, bool)
3398 AsVMwareVirtualMachineDetails() (*VMwareVirtualMachineDetails, bool)
3399 AsConfigurationSettings() (*ConfigurationSettings, bool)
3400 }
3401
3402
3403 type ConfigurationSettings struct {
3404
3405 InstanceType InstanceTypeBasicConfigurationSettings `json:"instanceType,omitempty"`
3406 }
3407
3408 func unmarshalBasicConfigurationSettings(body []byte) (BasicConfigurationSettings, error) {
3409 var m map[string]interface{}
3410 err := json.Unmarshal(body, &m)
3411 if err != nil {
3412 return nil, err
3413 }
3414
3415 switch m["instanceType"] {
3416 case string(InstanceTypeHyperVVirtualMachine):
3417 var hvvmd HyperVVirtualMachineDetails
3418 err := json.Unmarshal(body, &hvvmd)
3419 return hvvmd, err
3420 case string(InstanceTypeReplicationGroupDetails):
3421 var rgd ReplicationGroupDetails
3422 err := json.Unmarshal(body, &rgd)
3423 return rgd, err
3424 case string(InstanceTypeVmmVirtualMachine):
3425 var vvmd VmmVirtualMachineDetails
3426 err := json.Unmarshal(body, &vvmd)
3427 return vvmd, err
3428 case string(InstanceTypeVMwareVirtualMachine):
3429 var vmvmd VMwareVirtualMachineDetails
3430 err := json.Unmarshal(body, &vmvmd)
3431 return vmvmd, err
3432 default:
3433 var cs ConfigurationSettings
3434 err := json.Unmarshal(body, &cs)
3435 return cs, err
3436 }
3437 }
3438 func unmarshalBasicConfigurationSettingsArray(body []byte) ([]BasicConfigurationSettings, error) {
3439 var rawMessages []*json.RawMessage
3440 err := json.Unmarshal(body, &rawMessages)
3441 if err != nil {
3442 return nil, err
3443 }
3444
3445 csArray := make([]BasicConfigurationSettings, len(rawMessages))
3446
3447 for index, rawMessage := range rawMessages {
3448 cs, err := unmarshalBasicConfigurationSettings(*rawMessage)
3449 if err != nil {
3450 return nil, err
3451 }
3452 csArray[index] = cs
3453 }
3454 return csArray, nil
3455 }
3456
3457
3458 func (cs ConfigurationSettings) MarshalJSON() ([]byte, error) {
3459 cs.InstanceType = InstanceTypeConfigurationSettings
3460 objectMap := make(map[string]interface{})
3461 if cs.InstanceType != "" {
3462 objectMap["instanceType"] = cs.InstanceType
3463 }
3464 return json.Marshal(objectMap)
3465 }
3466
3467
3468 func (cs ConfigurationSettings) AsHyperVVirtualMachineDetails() (*HyperVVirtualMachineDetails, bool) {
3469 return nil, false
3470 }
3471
3472
3473 func (cs ConfigurationSettings) AsReplicationGroupDetails() (*ReplicationGroupDetails, bool) {
3474 return nil, false
3475 }
3476
3477
3478 func (cs ConfigurationSettings) AsVmmVirtualMachineDetails() (*VmmVirtualMachineDetails, bool) {
3479 return nil, false
3480 }
3481
3482
3483 func (cs ConfigurationSettings) AsVMwareVirtualMachineDetails() (*VMwareVirtualMachineDetails, bool) {
3484 return nil, false
3485 }
3486
3487
3488 func (cs ConfigurationSettings) AsConfigurationSettings() (*ConfigurationSettings, bool) {
3489 return &cs, true
3490 }
3491
3492
3493 func (cs ConfigurationSettings) AsBasicConfigurationSettings() (BasicConfigurationSettings, bool) {
3494 return &cs, true
3495 }
3496
3497
3498 type ConfigureAlertRequest struct {
3499
3500 Properties *ConfigureAlertRequestProperties `json:"properties,omitempty"`
3501 }
3502
3503
3504 type ConfigureAlertRequestProperties struct {
3505
3506 SendToOwners *string `json:"sendToOwners,omitempty"`
3507
3508 CustomEmailAddresses *[]string `json:"customEmailAddresses,omitempty"`
3509
3510 Locale *string `json:"locale,omitempty"`
3511 }
3512
3513
3514
3515 type ConsistencyCheckTaskDetails struct {
3516
3517 VMDetails *[]InconsistentVMDetails `json:"vmDetails,omitempty"`
3518
3519 InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"`
3520 }
3521
3522
3523 func (cctd ConsistencyCheckTaskDetails) MarshalJSON() ([]byte, error) {
3524 cctd.InstanceType = InstanceTypeConsistencyCheckTaskDetails
3525 objectMap := make(map[string]interface{})
3526 if cctd.VMDetails != nil {
3527 objectMap["vmDetails"] = cctd.VMDetails
3528 }
3529 if cctd.InstanceType != "" {
3530 objectMap["instanceType"] = cctd.InstanceType
3531 }
3532 return json.Marshal(objectMap)
3533 }
3534
3535
3536 func (cctd ConsistencyCheckTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) {
3537 return nil, false
3538 }
3539
3540
3541 func (cctd ConsistencyCheckTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) {
3542 return &cctd, true
3543 }
3544
3545
3546 func (cctd ConsistencyCheckTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) {
3547 return nil, false
3548 }
3549
3550
3551 func (cctd ConsistencyCheckTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) {
3552 return nil, false
3553 }
3554
3555
3556 func (cctd ConsistencyCheckTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) {
3557 return nil, false
3558 }
3559
3560
3561 func (cctd ConsistencyCheckTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) {
3562 return nil, false
3563 }
3564
3565
3566 func (cctd ConsistencyCheckTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) {
3567 return nil, false
3568 }
3569
3570
3571 func (cctd ConsistencyCheckTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) {
3572 return nil, false
3573 }
3574
3575
3576 func (cctd ConsistencyCheckTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) {
3577 return nil, false
3578 }
3579
3580
3581 func (cctd ConsistencyCheckTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) {
3582 return &cctd, true
3583 }
3584
3585
3586 type CreateNetworkMappingInput struct {
3587
3588 Properties *CreateNetworkMappingInputProperties `json:"properties,omitempty"`
3589 }
3590
3591
3592 type CreateNetworkMappingInputProperties struct {
3593
3594 RecoveryFabricName *string `json:"recoveryFabricName,omitempty"`
3595
3596 RecoveryNetworkID *string `json:"recoveryNetworkId,omitempty"`
3597
3598 FabricSpecificDetails BasicFabricSpecificCreateNetworkMappingInput `json:"fabricSpecificDetails,omitempty"`
3599 }
3600
3601
3602 func (cnmip *CreateNetworkMappingInputProperties) UnmarshalJSON(body []byte) error {
3603 var m map[string]*json.RawMessage
3604 err := json.Unmarshal(body, &m)
3605 if err != nil {
3606 return err
3607 }
3608 for k, v := range m {
3609 switch k {
3610 case "recoveryFabricName":
3611 if v != nil {
3612 var recoveryFabricName string
3613 err = json.Unmarshal(*v, &recoveryFabricName)
3614 if err != nil {
3615 return err
3616 }
3617 cnmip.RecoveryFabricName = &recoveryFabricName
3618 }
3619 case "recoveryNetworkId":
3620 if v != nil {
3621 var recoveryNetworkID string
3622 err = json.Unmarshal(*v, &recoveryNetworkID)
3623 if err != nil {
3624 return err
3625 }
3626 cnmip.RecoveryNetworkID = &recoveryNetworkID
3627 }
3628 case "fabricSpecificDetails":
3629 if v != nil {
3630 fabricSpecificDetails, err := unmarshalBasicFabricSpecificCreateNetworkMappingInput(*v)
3631 if err != nil {
3632 return err
3633 }
3634 cnmip.FabricSpecificDetails = fabricSpecificDetails
3635 }
3636 }
3637 }
3638
3639 return nil
3640 }
3641
3642
3643 type CreatePolicyInput struct {
3644
3645 Properties *CreatePolicyInputProperties `json:"properties,omitempty"`
3646 }
3647
3648
3649 type CreatePolicyInputProperties struct {
3650
3651 ProviderSpecificInput BasicPolicyProviderSpecificInput `json:"providerSpecificInput,omitempty"`
3652 }
3653
3654
3655 func (cpip *CreatePolicyInputProperties) UnmarshalJSON(body []byte) error {
3656 var m map[string]*json.RawMessage
3657 err := json.Unmarshal(body, &m)
3658 if err != nil {
3659 return err
3660 }
3661 for k, v := range m {
3662 switch k {
3663 case "providerSpecificInput":
3664 if v != nil {
3665 providerSpecificInput, err := unmarshalBasicPolicyProviderSpecificInput(*v)
3666 if err != nil {
3667 return err
3668 }
3669 cpip.ProviderSpecificInput = providerSpecificInput
3670 }
3671 }
3672 }
3673
3674 return nil
3675 }
3676
3677
3678 type CreateProtectionContainerInput struct {
3679
3680 Properties *CreateProtectionContainerInputProperties `json:"properties,omitempty"`
3681 }
3682
3683
3684 type CreateProtectionContainerInputProperties struct {
3685
3686 ProviderSpecificInput *[]BasicReplicationProviderSpecificContainerCreationInput `json:"providerSpecificInput,omitempty"`
3687 }
3688
3689
3690 func (cpcip *CreateProtectionContainerInputProperties) UnmarshalJSON(body []byte) error {
3691 var m map[string]*json.RawMessage
3692 err := json.Unmarshal(body, &m)
3693 if err != nil {
3694 return err
3695 }
3696 for k, v := range m {
3697 switch k {
3698 case "providerSpecificInput":
3699 if v != nil {
3700 providerSpecificInput, err := unmarshalBasicReplicationProviderSpecificContainerCreationInputArray(*v)
3701 if err != nil {
3702 return err
3703 }
3704 cpcip.ProviderSpecificInput = &providerSpecificInput
3705 }
3706 }
3707 }
3708
3709 return nil
3710 }
3711
3712
3713 type CreateProtectionContainerMappingInput struct {
3714
3715 Properties *CreateProtectionContainerMappingInputProperties `json:"properties,omitempty"`
3716 }
3717
3718
3719 type CreateProtectionContainerMappingInputProperties struct {
3720
3721 TargetProtectionContainerID *string `json:"targetProtectionContainerId,omitempty"`
3722
3723 PolicyID *string `json:"policyId,omitempty"`
3724
3725 ProviderSpecificInput BasicReplicationProviderSpecificContainerMappingInput `json:"providerSpecificInput,omitempty"`
3726 }
3727
3728
3729 func (cpcmip *CreateProtectionContainerMappingInputProperties) UnmarshalJSON(body []byte) error {
3730 var m map[string]*json.RawMessage
3731 err := json.Unmarshal(body, &m)
3732 if err != nil {
3733 return err
3734 }
3735 for k, v := range m {
3736 switch k {
3737 case "targetProtectionContainerId":
3738 if v != nil {
3739 var targetProtectionContainerID string
3740 err = json.Unmarshal(*v, &targetProtectionContainerID)
3741 if err != nil {
3742 return err
3743 }
3744 cpcmip.TargetProtectionContainerID = &targetProtectionContainerID
3745 }
3746 case "policyId":
3747 if v != nil {
3748 var policyID string
3749 err = json.Unmarshal(*v, &policyID)
3750 if err != nil {
3751 return err
3752 }
3753 cpcmip.PolicyID = &policyID
3754 }
3755 case "providerSpecificInput":
3756 if v != nil {
3757 providerSpecificInput, err := unmarshalBasicReplicationProviderSpecificContainerMappingInput(*v)
3758 if err != nil {
3759 return err
3760 }
3761 cpcmip.ProviderSpecificInput = providerSpecificInput
3762 }
3763 }
3764 }
3765
3766 return nil
3767 }
3768
3769
3770 type CreateProtectionIntentInput struct {
3771
3772 Properties *CreateProtectionIntentProperties `json:"properties,omitempty"`
3773 }
3774
3775
3776 type CreateProtectionIntentProperties struct {
3777
3778 ProviderSpecificDetails BasicCreateProtectionIntentProviderSpecificDetails `json:"providerSpecificDetails,omitempty"`
3779 }
3780
3781
3782 func (cpip *CreateProtectionIntentProperties) UnmarshalJSON(body []byte) error {
3783 var m map[string]*json.RawMessage
3784 err := json.Unmarshal(body, &m)
3785 if err != nil {
3786 return err
3787 }
3788 for k, v := range m {
3789 switch k {
3790 case "providerSpecificDetails":
3791 if v != nil {
3792 providerSpecificDetails, err := unmarshalBasicCreateProtectionIntentProviderSpecificDetails(*v)
3793 if err != nil {
3794 return err
3795 }
3796 cpip.ProviderSpecificDetails = providerSpecificDetails
3797 }
3798 }
3799 }
3800
3801 return nil
3802 }
3803
3804
3805 type BasicCreateProtectionIntentProviderSpecificDetails interface {
3806 AsA2ACreateProtectionIntentInput() (*A2ACreateProtectionIntentInput, bool)
3807 AsCreateProtectionIntentProviderSpecificDetails() (*CreateProtectionIntentProviderSpecificDetails, bool)
3808 }
3809
3810
3811 type CreateProtectionIntentProviderSpecificDetails struct {
3812
3813 InstanceType InstanceTypeBasicCreateProtectionIntentProviderSpecificDetails `json:"instanceType,omitempty"`
3814 }
3815
3816 func unmarshalBasicCreateProtectionIntentProviderSpecificDetails(body []byte) (BasicCreateProtectionIntentProviderSpecificDetails, error) {
3817 var m map[string]interface{}
3818 err := json.Unmarshal(body, &m)
3819 if err != nil {
3820 return nil, err
3821 }
3822
3823 switch m["instanceType"] {
3824 case string(InstanceTypeBasicCreateProtectionIntentProviderSpecificDetailsInstanceTypeA2A):
3825 var acpii A2ACreateProtectionIntentInput
3826 err := json.Unmarshal(body, &acpii)
3827 return acpii, err
3828 default:
3829 var cpipsd CreateProtectionIntentProviderSpecificDetails
3830 err := json.Unmarshal(body, &cpipsd)
3831 return cpipsd, err
3832 }
3833 }
3834 func unmarshalBasicCreateProtectionIntentProviderSpecificDetailsArray(body []byte) ([]BasicCreateProtectionIntentProviderSpecificDetails, error) {
3835 var rawMessages []*json.RawMessage
3836 err := json.Unmarshal(body, &rawMessages)
3837 if err != nil {
3838 return nil, err
3839 }
3840
3841 cpipsdArray := make([]BasicCreateProtectionIntentProviderSpecificDetails, len(rawMessages))
3842
3843 for index, rawMessage := range rawMessages {
3844 cpipsd, err := unmarshalBasicCreateProtectionIntentProviderSpecificDetails(*rawMessage)
3845 if err != nil {
3846 return nil, err
3847 }
3848 cpipsdArray[index] = cpipsd
3849 }
3850 return cpipsdArray, nil
3851 }
3852
3853
3854 func (cpipsd CreateProtectionIntentProviderSpecificDetails) MarshalJSON() ([]byte, error) {
3855 cpipsd.InstanceType = InstanceTypeBasicCreateProtectionIntentProviderSpecificDetailsInstanceTypeCreateProtectionIntentProviderSpecificDetails
3856 objectMap := make(map[string]interface{})
3857 if cpipsd.InstanceType != "" {
3858 objectMap["instanceType"] = cpipsd.InstanceType
3859 }
3860 return json.Marshal(objectMap)
3861 }
3862
3863
3864 func (cpipsd CreateProtectionIntentProviderSpecificDetails) AsA2ACreateProtectionIntentInput() (*A2ACreateProtectionIntentInput, bool) {
3865 return nil, false
3866 }
3867
3868
3869 func (cpipsd CreateProtectionIntentProviderSpecificDetails) AsCreateProtectionIntentProviderSpecificDetails() (*CreateProtectionIntentProviderSpecificDetails, bool) {
3870 return &cpipsd, true
3871 }
3872
3873
3874 func (cpipsd CreateProtectionIntentProviderSpecificDetails) AsBasicCreateProtectionIntentProviderSpecificDetails() (BasicCreateProtectionIntentProviderSpecificDetails, bool) {
3875 return &cpipsd, true
3876 }
3877
3878
3879 type CreateRecoveryPlanInput struct {
3880
3881 Properties *CreateRecoveryPlanInputProperties `json:"properties,omitempty"`
3882 }
3883
3884
3885 type CreateRecoveryPlanInputProperties struct {
3886
3887 PrimaryFabricID *string `json:"primaryFabricId,omitempty"`
3888
3889 RecoveryFabricID *string `json:"recoveryFabricId,omitempty"`
3890
3891 FailoverDeploymentModel FailoverDeploymentModel `json:"failoverDeploymentModel,omitempty"`
3892
3893 Groups *[]RecoveryPlanGroup `json:"groups,omitempty"`
3894
3895 ProviderSpecificInput *[]BasicRecoveryPlanProviderSpecificInput `json:"providerSpecificInput,omitempty"`
3896 }
3897
3898
3899 func (crpip *CreateRecoveryPlanInputProperties) UnmarshalJSON(body []byte) error {
3900 var m map[string]*json.RawMessage
3901 err := json.Unmarshal(body, &m)
3902 if err != nil {
3903 return err
3904 }
3905 for k, v := range m {
3906 switch k {
3907 case "primaryFabricId":
3908 if v != nil {
3909 var primaryFabricID string
3910 err = json.Unmarshal(*v, &primaryFabricID)
3911 if err != nil {
3912 return err
3913 }
3914 crpip.PrimaryFabricID = &primaryFabricID
3915 }
3916 case "recoveryFabricId":
3917 if v != nil {
3918 var recoveryFabricID string
3919 err = json.Unmarshal(*v, &recoveryFabricID)
3920 if err != nil {
3921 return err
3922 }
3923 crpip.RecoveryFabricID = &recoveryFabricID
3924 }
3925 case "failoverDeploymentModel":
3926 if v != nil {
3927 var failoverDeploymentModel FailoverDeploymentModel
3928 err = json.Unmarshal(*v, &failoverDeploymentModel)
3929 if err != nil {
3930 return err
3931 }
3932 crpip.FailoverDeploymentModel = failoverDeploymentModel
3933 }
3934 case "groups":
3935 if v != nil {
3936 var groups []RecoveryPlanGroup
3937 err = json.Unmarshal(*v, &groups)
3938 if err != nil {
3939 return err
3940 }
3941 crpip.Groups = &groups
3942 }
3943 case "providerSpecificInput":
3944 if v != nil {
3945 providerSpecificInput, err := unmarshalBasicRecoveryPlanProviderSpecificInputArray(*v)
3946 if err != nil {
3947 return err
3948 }
3949 crpip.ProviderSpecificInput = &providerSpecificInput
3950 }
3951 }
3952 }
3953
3954 return nil
3955 }
3956
3957
3958 type CurrentJobDetails struct {
3959
3960 JobName *string `json:"jobName,omitempty"`
3961
3962 JobID *string `json:"jobId,omitempty"`
3963
3964 StartTime *date.Time `json:"startTime,omitempty"`
3965 }
3966
3967
3968 type CurrentScenarioDetails struct {
3969
3970 ScenarioName *string `json:"scenarioName,omitempty"`
3971
3972 JobID *string `json:"jobId,omitempty"`
3973
3974 StartTime *date.Time `json:"startTime,omitempty"`
3975 }
3976
3977
3978 type DataStore struct {
3979
3980 SymbolicName *string `json:"symbolicName,omitempty"`
3981
3982 UUID *string `json:"uuid,omitempty"`
3983
3984 Capacity *string `json:"capacity,omitempty"`
3985
3986 FreeSpace *string `json:"freeSpace,omitempty"`
3987
3988 Type *string `json:"type,omitempty"`
3989 }
3990
3991
3992 type DisableProtectionInput struct {
3993
3994 Properties *DisableProtectionInputProperties `json:"properties,omitempty"`
3995 }
3996
3997
3998 type DisableProtectionInputProperties struct {
3999
4000 DisableProtectionReason DisableProtectionReason `json:"disableProtectionReason,omitempty"`
4001
4002 ReplicationProviderInput BasicDisableProtectionProviderSpecificInput `json:"replicationProviderInput,omitempty"`
4003 }
4004
4005
4006 func (dpip *DisableProtectionInputProperties) UnmarshalJSON(body []byte) error {
4007 var m map[string]*json.RawMessage
4008 err := json.Unmarshal(body, &m)
4009 if err != nil {
4010 return err
4011 }
4012 for k, v := range m {
4013 switch k {
4014 case "disableProtectionReason":
4015 if v != nil {
4016 var disableProtectionReason DisableProtectionReason
4017 err = json.Unmarshal(*v, &disableProtectionReason)
4018 if err != nil {
4019 return err
4020 }
4021 dpip.DisableProtectionReason = disableProtectionReason
4022 }
4023 case "replicationProviderInput":
4024 if v != nil {
4025 replicationProviderInput, err := unmarshalBasicDisableProtectionProviderSpecificInput(*v)
4026 if err != nil {
4027 return err
4028 }
4029 dpip.ReplicationProviderInput = replicationProviderInput
4030 }
4031 }
4032 }
4033
4034 return nil
4035 }
4036
4037
4038 type BasicDisableProtectionProviderSpecificInput interface {
4039 AsInMageDisableProtectionProviderSpecificInput() (*InMageDisableProtectionProviderSpecificInput, bool)
4040 AsDisableProtectionProviderSpecificInput() (*DisableProtectionProviderSpecificInput, bool)
4041 }
4042
4043
4044 type DisableProtectionProviderSpecificInput struct {
4045
4046 InstanceType InstanceTypeBasicDisableProtectionProviderSpecificInput `json:"instanceType,omitempty"`
4047 }
4048
4049 func unmarshalBasicDisableProtectionProviderSpecificInput(body []byte) (BasicDisableProtectionProviderSpecificInput, error) {
4050 var m map[string]interface{}
4051 err := json.Unmarshal(body, &m)
4052 if err != nil {
4053 return nil, err
4054 }
4055
4056 switch m["instanceType"] {
4057 case string(InstanceTypeInMage):
4058 var imdppsi InMageDisableProtectionProviderSpecificInput
4059 err := json.Unmarshal(body, &imdppsi)
4060 return imdppsi, err
4061 default:
4062 var dppsi DisableProtectionProviderSpecificInput
4063 err := json.Unmarshal(body, &dppsi)
4064 return dppsi, err
4065 }
4066 }
4067 func unmarshalBasicDisableProtectionProviderSpecificInputArray(body []byte) ([]BasicDisableProtectionProviderSpecificInput, error) {
4068 var rawMessages []*json.RawMessage
4069 err := json.Unmarshal(body, &rawMessages)
4070 if err != nil {
4071 return nil, err
4072 }
4073
4074 dppsiArray := make([]BasicDisableProtectionProviderSpecificInput, len(rawMessages))
4075
4076 for index, rawMessage := range rawMessages {
4077 dppsi, err := unmarshalBasicDisableProtectionProviderSpecificInput(*rawMessage)
4078 if err != nil {
4079 return nil, err
4080 }
4081 dppsiArray[index] = dppsi
4082 }
4083 return dppsiArray, nil
4084 }
4085
4086
4087 func (dppsi DisableProtectionProviderSpecificInput) MarshalJSON() ([]byte, error) {
4088 dppsi.InstanceType = InstanceTypeDisableProtectionProviderSpecificInput
4089 objectMap := make(map[string]interface{})
4090 if dppsi.InstanceType != "" {
4091 objectMap["instanceType"] = dppsi.InstanceType
4092 }
4093 return json.Marshal(objectMap)
4094 }
4095
4096
4097 func (dppsi DisableProtectionProviderSpecificInput) AsInMageDisableProtectionProviderSpecificInput() (*InMageDisableProtectionProviderSpecificInput, bool) {
4098 return nil, false
4099 }
4100
4101
4102 func (dppsi DisableProtectionProviderSpecificInput) AsDisableProtectionProviderSpecificInput() (*DisableProtectionProviderSpecificInput, bool) {
4103 return &dppsi, true
4104 }
4105
4106
4107 func (dppsi DisableProtectionProviderSpecificInput) AsBasicDisableProtectionProviderSpecificInput() (BasicDisableProtectionProviderSpecificInput, bool) {
4108 return &dppsi, true
4109 }
4110
4111
4112 type DiscoverProtectableItemRequest struct {
4113
4114 Properties *DiscoverProtectableItemRequestProperties `json:"properties,omitempty"`
4115 }
4116
4117
4118 type DiscoverProtectableItemRequestProperties struct {
4119
4120 FriendlyName *string `json:"friendlyName,omitempty"`
4121
4122 IPAddress *string `json:"ipAddress,omitempty"`
4123
4124 OsType *string `json:"osType,omitempty"`
4125 }
4126
4127
4128 type DiskDetails struct {
4129
4130 MaxSizeMB *int64 `json:"maxSizeMB,omitempty"`
4131
4132 VhdType *string `json:"vhdType,omitempty"`
4133
4134 VhdID *string `json:"vhdId,omitempty"`
4135
4136 VhdName *string `json:"vhdName,omitempty"`
4137 }
4138
4139
4140 type DiskEncryptionInfo struct {
4141
4142 DiskEncryptionKeyInfo *DiskEncryptionKeyInfo `json:"diskEncryptionKeyInfo,omitempty"`
4143
4144 KeyEncryptionKeyInfo *KeyEncryptionKeyInfo `json:"keyEncryptionKeyInfo,omitempty"`
4145 }
4146
4147
4148 type DiskEncryptionKeyInfo struct {
4149
4150 SecretIdentifier *string `json:"secretIdentifier,omitempty"`
4151
4152 KeyVaultResourceArmID *string `json:"keyVaultResourceArmId,omitempty"`
4153 }
4154
4155
4156 type DiskVolumeDetails struct {
4157
4158 Label *string `json:"label,omitempty"`
4159
4160 Name *string `json:"name,omitempty"`
4161 }
4162
4163
4164
4165
4166 type Display struct {
4167
4168 Provider *string `json:"provider,omitempty"`
4169
4170 Resource *string `json:"resource,omitempty"`
4171
4172 Operation *string `json:"operation,omitempty"`
4173
4174 Description *string `json:"description,omitempty"`
4175 }
4176
4177
4178 type DraDetails struct {
4179
4180 ID *string `json:"id,omitempty"`
4181
4182 Name *string `json:"name,omitempty"`
4183
4184 Version *string `json:"version,omitempty"`
4185
4186 LastHeartbeatUtc *date.Time `json:"lastHeartbeatUtc,omitempty"`
4187
4188 Health ProtectionHealth `json:"health,omitempty"`
4189
4190 HealthErrors *[]HealthError `json:"healthErrors,omitempty"`
4191 }
4192
4193
4194 func (dd DraDetails) MarshalJSON() ([]byte, error) {
4195 objectMap := make(map[string]interface{})
4196 return json.Marshal(objectMap)
4197 }
4198
4199
4200 type EnableMigrationInput struct {
4201
4202 Properties *EnableMigrationInputProperties `json:"properties,omitempty"`
4203 }
4204
4205
4206 type EnableMigrationInputProperties struct {
4207
4208 PolicyID *string `json:"policyId,omitempty"`
4209
4210 ProviderSpecificDetails BasicEnableMigrationProviderSpecificInput `json:"providerSpecificDetails,omitempty"`
4211 }
4212
4213
4214 func (emip *EnableMigrationInputProperties) UnmarshalJSON(body []byte) error {
4215 var m map[string]*json.RawMessage
4216 err := json.Unmarshal(body, &m)
4217 if err != nil {
4218 return err
4219 }
4220 for k, v := range m {
4221 switch k {
4222 case "policyId":
4223 if v != nil {
4224 var policyID string
4225 err = json.Unmarshal(*v, &policyID)
4226 if err != nil {
4227 return err
4228 }
4229 emip.PolicyID = &policyID
4230 }
4231 case "providerSpecificDetails":
4232 if v != nil {
4233 providerSpecificDetails, err := unmarshalBasicEnableMigrationProviderSpecificInput(*v)
4234 if err != nil {
4235 return err
4236 }
4237 emip.ProviderSpecificDetails = providerSpecificDetails
4238 }
4239 }
4240 }
4241
4242 return nil
4243 }
4244
4245
4246 type BasicEnableMigrationProviderSpecificInput interface {
4247 AsVMwareCbtEnableMigrationInput() (*VMwareCbtEnableMigrationInput, bool)
4248 AsEnableMigrationProviderSpecificInput() (*EnableMigrationProviderSpecificInput, bool)
4249 }
4250
4251
4252 type EnableMigrationProviderSpecificInput struct {
4253
4254 InstanceType InstanceTypeBasicEnableMigrationProviderSpecificInput `json:"instanceType,omitempty"`
4255 }
4256
4257 func unmarshalBasicEnableMigrationProviderSpecificInput(body []byte) (BasicEnableMigrationProviderSpecificInput, error) {
4258 var m map[string]interface{}
4259 err := json.Unmarshal(body, &m)
4260 if err != nil {
4261 return nil, err
4262 }
4263
4264 switch m["instanceType"] {
4265 case string(InstanceTypeVMwareCbt):
4266 var vmcemi VMwareCbtEnableMigrationInput
4267 err := json.Unmarshal(body, &vmcemi)
4268 return vmcemi, err
4269 default:
4270 var empsi EnableMigrationProviderSpecificInput
4271 err := json.Unmarshal(body, &empsi)
4272 return empsi, err
4273 }
4274 }
4275 func unmarshalBasicEnableMigrationProviderSpecificInputArray(body []byte) ([]BasicEnableMigrationProviderSpecificInput, error) {
4276 var rawMessages []*json.RawMessage
4277 err := json.Unmarshal(body, &rawMessages)
4278 if err != nil {
4279 return nil, err
4280 }
4281
4282 empsiArray := make([]BasicEnableMigrationProviderSpecificInput, len(rawMessages))
4283
4284 for index, rawMessage := range rawMessages {
4285 empsi, err := unmarshalBasicEnableMigrationProviderSpecificInput(*rawMessage)
4286 if err != nil {
4287 return nil, err
4288 }
4289 empsiArray[index] = empsi
4290 }
4291 return empsiArray, nil
4292 }
4293
4294
4295 func (empsi EnableMigrationProviderSpecificInput) MarshalJSON() ([]byte, error) {
4296 empsi.InstanceType = InstanceTypeEnableMigrationProviderSpecificInput
4297 objectMap := make(map[string]interface{})
4298 if empsi.InstanceType != "" {
4299 objectMap["instanceType"] = empsi.InstanceType
4300 }
4301 return json.Marshal(objectMap)
4302 }
4303
4304
4305 func (empsi EnableMigrationProviderSpecificInput) AsVMwareCbtEnableMigrationInput() (*VMwareCbtEnableMigrationInput, bool) {
4306 return nil, false
4307 }
4308
4309
4310 func (empsi EnableMigrationProviderSpecificInput) AsEnableMigrationProviderSpecificInput() (*EnableMigrationProviderSpecificInput, bool) {
4311 return &empsi, true
4312 }
4313
4314
4315 func (empsi EnableMigrationProviderSpecificInput) AsBasicEnableMigrationProviderSpecificInput() (BasicEnableMigrationProviderSpecificInput, bool) {
4316 return &empsi, true
4317 }
4318
4319
4320 type EnableProtectionInput struct {
4321
4322 Properties *EnableProtectionInputProperties `json:"properties,omitempty"`
4323 }
4324
4325
4326 type EnableProtectionInputProperties struct {
4327
4328 PolicyID *string `json:"policyId,omitempty"`
4329
4330 ProtectableItemID *string `json:"protectableItemId,omitempty"`
4331
4332 ProviderSpecificDetails BasicEnableProtectionProviderSpecificInput `json:"providerSpecificDetails,omitempty"`
4333 }
4334
4335
4336 func (epip *EnableProtectionInputProperties) UnmarshalJSON(body []byte) error {
4337 var m map[string]*json.RawMessage
4338 err := json.Unmarshal(body, &m)
4339 if err != nil {
4340 return err
4341 }
4342 for k, v := range m {
4343 switch k {
4344 case "policyId":
4345 if v != nil {
4346 var policyID string
4347 err = json.Unmarshal(*v, &policyID)
4348 if err != nil {
4349 return err
4350 }
4351 epip.PolicyID = &policyID
4352 }
4353 case "protectableItemId":
4354 if v != nil {
4355 var protectableItemID string
4356 err = json.Unmarshal(*v, &protectableItemID)
4357 if err != nil {
4358 return err
4359 }
4360 epip.ProtectableItemID = &protectableItemID
4361 }
4362 case "providerSpecificDetails":
4363 if v != nil {
4364 providerSpecificDetails, err := unmarshalBasicEnableProtectionProviderSpecificInput(*v)
4365 if err != nil {
4366 return err
4367 }
4368 epip.ProviderSpecificDetails = providerSpecificDetails
4369 }
4370 }
4371 }
4372
4373 return nil
4374 }
4375
4376
4377 type BasicEnableProtectionProviderSpecificInput interface {
4378 AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool)
4379 AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool)
4380 AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool)
4381 AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool)
4382 AsInMageRcmEnableProtectionInput() (*InMageRcmEnableProtectionInput, bool)
4383 AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool)
4384 AsEnableProtectionProviderSpecificInput() (*EnableProtectionProviderSpecificInput, bool)
4385 }
4386
4387
4388 type EnableProtectionProviderSpecificInput struct {
4389
4390 InstanceType InstanceTypeBasicEnableProtectionProviderSpecificInput `json:"instanceType,omitempty"`
4391 }
4392
4393 func unmarshalBasicEnableProtectionProviderSpecificInput(body []byte) (BasicEnableProtectionProviderSpecificInput, error) {
4394 var m map[string]interface{}
4395 err := json.Unmarshal(body, &m)
4396 if err != nil {
4397 return nil, err
4398 }
4399
4400 switch m["instanceType"] {
4401 case string(InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeA2A):
4402 var aepi A2AEnableProtectionInput
4403 err := json.Unmarshal(body, &aepi)
4404 return aepi, err
4405 case string(InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeHyperVReplicaAzure):
4406 var hvraepi HyperVReplicaAzureEnableProtectionInput
4407 err := json.Unmarshal(body, &hvraepi)
4408 return hvraepi, err
4409 case string(InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMageAzureV2):
4410 var imavepi InMageAzureV2EnableProtectionInput
4411 err := json.Unmarshal(body, &imavepi)
4412 return imavepi, err
4413 case string(InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMage):
4414 var imepi InMageEnableProtectionInput
4415 err := json.Unmarshal(body, &imepi)
4416 return imepi, err
4417 case string(InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMageRcm):
4418 var imrepi InMageRcmEnableProtectionInput
4419 err := json.Unmarshal(body, &imrepi)
4420 return imrepi, err
4421 case string(InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeSan):
4422 var sepi SanEnableProtectionInput
4423 err := json.Unmarshal(body, &sepi)
4424 return sepi, err
4425 default:
4426 var eppsi EnableProtectionProviderSpecificInput
4427 err := json.Unmarshal(body, &eppsi)
4428 return eppsi, err
4429 }
4430 }
4431 func unmarshalBasicEnableProtectionProviderSpecificInputArray(body []byte) ([]BasicEnableProtectionProviderSpecificInput, error) {
4432 var rawMessages []*json.RawMessage
4433 err := json.Unmarshal(body, &rawMessages)
4434 if err != nil {
4435 return nil, err
4436 }
4437
4438 eppsiArray := make([]BasicEnableProtectionProviderSpecificInput, len(rawMessages))
4439
4440 for index, rawMessage := range rawMessages {
4441 eppsi, err := unmarshalBasicEnableProtectionProviderSpecificInput(*rawMessage)
4442 if err != nil {
4443 return nil, err
4444 }
4445 eppsiArray[index] = eppsi
4446 }
4447 return eppsiArray, nil
4448 }
4449
4450
4451 func (eppsi EnableProtectionProviderSpecificInput) MarshalJSON() ([]byte, error) {
4452 eppsi.InstanceType = InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeEnableProtectionProviderSpecificInput
4453 objectMap := make(map[string]interface{})
4454 if eppsi.InstanceType != "" {
4455 objectMap["instanceType"] = eppsi.InstanceType
4456 }
4457 return json.Marshal(objectMap)
4458 }
4459
4460
4461 func (eppsi EnableProtectionProviderSpecificInput) AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool) {
4462 return nil, false
4463 }
4464
4465
4466 func (eppsi EnableProtectionProviderSpecificInput) AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool) {
4467 return nil, false
4468 }
4469
4470
4471 func (eppsi EnableProtectionProviderSpecificInput) AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool) {
4472 return nil, false
4473 }
4474
4475
4476 func (eppsi EnableProtectionProviderSpecificInput) AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool) {
4477 return nil, false
4478 }
4479
4480
4481 func (eppsi EnableProtectionProviderSpecificInput) AsInMageRcmEnableProtectionInput() (*InMageRcmEnableProtectionInput, bool) {
4482 return nil, false
4483 }
4484
4485
4486 func (eppsi EnableProtectionProviderSpecificInput) AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool) {
4487 return nil, false
4488 }
4489
4490
4491 func (eppsi EnableProtectionProviderSpecificInput) AsEnableProtectionProviderSpecificInput() (*EnableProtectionProviderSpecificInput, bool) {
4492 return &eppsi, true
4493 }
4494
4495
4496 func (eppsi EnableProtectionProviderSpecificInput) AsBasicEnableProtectionProviderSpecificInput() (BasicEnableProtectionProviderSpecificInput, bool) {
4497 return &eppsi, true
4498 }
4499
4500
4501 type EncryptionDetails struct {
4502
4503 KekState *string `json:"kekState,omitempty"`
4504
4505 KekCertThumbprint *string `json:"kekCertThumbprint,omitempty"`
4506
4507 KekCertExpiryDate *date.Time `json:"kekCertExpiryDate,omitempty"`
4508 }
4509
4510
4511 type Event struct {
4512 autorest.Response `json:"-"`
4513
4514 Properties *EventProperties `json:"properties,omitempty"`
4515
4516 ID *string `json:"id,omitempty"`
4517
4518 Name *string `json:"name,omitempty"`
4519
4520 Type *string `json:"type,omitempty"`
4521
4522 Location *string `json:"location,omitempty"`
4523 }
4524
4525
4526 func (e Event) MarshalJSON() ([]byte, error) {
4527 objectMap := make(map[string]interface{})
4528 if e.Properties != nil {
4529 objectMap["properties"] = e.Properties
4530 }
4531 if e.Location != nil {
4532 objectMap["location"] = e.Location
4533 }
4534 return json.Marshal(objectMap)
4535 }
4536
4537
4538 type EventCollection struct {
4539 autorest.Response `json:"-"`
4540
4541 Value *[]Event `json:"value,omitempty"`
4542
4543 NextLink *string `json:"nextLink,omitempty"`
4544 }
4545
4546
4547 type EventCollectionIterator struct {
4548 i int
4549 page EventCollectionPage
4550 }
4551
4552
4553
4554 func (iter *EventCollectionIterator) NextWithContext(ctx context.Context) (err error) {
4555 if tracing.IsEnabled() {
4556 ctx = tracing.StartSpan(ctx, fqdn+"/EventCollectionIterator.NextWithContext")
4557 defer func() {
4558 sc := -1
4559 if iter.Response().Response.Response != nil {
4560 sc = iter.Response().Response.Response.StatusCode
4561 }
4562 tracing.EndSpan(ctx, sc, err)
4563 }()
4564 }
4565 iter.i++
4566 if iter.i < len(iter.page.Values()) {
4567 return nil
4568 }
4569 err = iter.page.NextWithContext(ctx)
4570 if err != nil {
4571 iter.i--
4572 return err
4573 }
4574 iter.i = 0
4575 return nil
4576 }
4577
4578
4579
4580
4581 func (iter *EventCollectionIterator) Next() error {
4582 return iter.NextWithContext(context.Background())
4583 }
4584
4585
4586 func (iter EventCollectionIterator) NotDone() bool {
4587 return iter.page.NotDone() && iter.i < len(iter.page.Values())
4588 }
4589
4590
4591 func (iter EventCollectionIterator) Response() EventCollection {
4592 return iter.page.Response()
4593 }
4594
4595
4596
4597 func (iter EventCollectionIterator) Value() Event {
4598 if !iter.page.NotDone() {
4599 return Event{}
4600 }
4601 return iter.page.Values()[iter.i]
4602 }
4603
4604
4605 func NewEventCollectionIterator(page EventCollectionPage) EventCollectionIterator {
4606 return EventCollectionIterator{page: page}
4607 }
4608
4609
4610 func (ec EventCollection) IsEmpty() bool {
4611 return ec.Value == nil || len(*ec.Value) == 0
4612 }
4613
4614
4615 func (ec EventCollection) hasNextLink() bool {
4616 return ec.NextLink != nil && len(*ec.NextLink) != 0
4617 }
4618
4619
4620
4621 func (ec EventCollection) eventCollectionPreparer(ctx context.Context) (*http.Request, error) {
4622 if !ec.hasNextLink() {
4623 return nil, nil
4624 }
4625 return autorest.Prepare((&http.Request{}).WithContext(ctx),
4626 autorest.AsJSON(),
4627 autorest.AsGet(),
4628 autorest.WithBaseURL(to.String(ec.NextLink)))
4629 }
4630
4631
4632 type EventCollectionPage struct {
4633 fn func(context.Context, EventCollection) (EventCollection, error)
4634 ec EventCollection
4635 }
4636
4637
4638
4639 func (page *EventCollectionPage) NextWithContext(ctx context.Context) (err error) {
4640 if tracing.IsEnabled() {
4641 ctx = tracing.StartSpan(ctx, fqdn+"/EventCollectionPage.NextWithContext")
4642 defer func() {
4643 sc := -1
4644 if page.Response().Response.Response != nil {
4645 sc = page.Response().Response.Response.StatusCode
4646 }
4647 tracing.EndSpan(ctx, sc, err)
4648 }()
4649 }
4650 for {
4651 next, err := page.fn(ctx, page.ec)
4652 if err != nil {
4653 return err
4654 }
4655 page.ec = next
4656 if !next.hasNextLink() || !next.IsEmpty() {
4657 break
4658 }
4659 }
4660 return nil
4661 }
4662
4663
4664
4665
4666 func (page *EventCollectionPage) Next() error {
4667 return page.NextWithContext(context.Background())
4668 }
4669
4670
4671 func (page EventCollectionPage) NotDone() bool {
4672 return !page.ec.IsEmpty()
4673 }
4674
4675
4676 func (page EventCollectionPage) Response() EventCollection {
4677 return page.ec
4678 }
4679
4680
4681 func (page EventCollectionPage) Values() []Event {
4682 if page.ec.IsEmpty() {
4683 return nil
4684 }
4685 return *page.ec.Value
4686 }
4687
4688
4689 func NewEventCollectionPage(cur EventCollection, getNextPage func(context.Context, EventCollection) (EventCollection, error)) EventCollectionPage {
4690 return EventCollectionPage{
4691 fn: getNextPage,
4692 ec: cur,
4693 }
4694 }
4695
4696
4697 type EventProperties struct {
4698
4699 EventCode *string `json:"eventCode,omitempty"`
4700
4701 Description *string `json:"description,omitempty"`
4702
4703 EventType *string `json:"eventType,omitempty"`
4704
4705 AffectedObjectFriendlyName *string `json:"affectedObjectFriendlyName,omitempty"`
4706
4707 Severity *string `json:"severity,omitempty"`
4708
4709 TimeOfOccurrence *date.Time `json:"timeOfOccurrence,omitempty"`
4710
4711 FabricID *string `json:"fabricId,omitempty"`
4712
4713 ProviderSpecificDetails BasicEventProviderSpecificDetails `json:"providerSpecificDetails,omitempty"`
4714
4715 EventSpecificDetails BasicEventSpecificDetails `json:"eventSpecificDetails,omitempty"`
4716
4717 HealthErrors *[]HealthError `json:"healthErrors,omitempty"`
4718 }
4719
4720
4721 func (ep *EventProperties) UnmarshalJSON(body []byte) error {
4722 var m map[string]*json.RawMessage
4723 err := json.Unmarshal(body, &m)
4724 if err != nil {
4725 return err
4726 }
4727 for k, v := range m {
4728 switch k {
4729 case "eventCode":
4730 if v != nil {
4731 var eventCode string
4732 err = json.Unmarshal(*v, &eventCode)
4733 if err != nil {
4734 return err
4735 }
4736 ep.EventCode = &eventCode
4737 }
4738 case "description":
4739 if v != nil {
4740 var description string
4741 err = json.Unmarshal(*v, &description)
4742 if err != nil {
4743 return err
4744 }
4745 ep.Description = &description
4746 }
4747 case "eventType":
4748 if v != nil {
4749 var eventType string
4750 err = json.Unmarshal(*v, &eventType)
4751 if err != nil {
4752 return err
4753 }
4754 ep.EventType = &eventType
4755 }
4756 case "affectedObjectFriendlyName":
4757 if v != nil {
4758 var affectedObjectFriendlyName string
4759 err = json.Unmarshal(*v, &affectedObjectFriendlyName)
4760 if err != nil {
4761 return err
4762 }
4763 ep.AffectedObjectFriendlyName = &affectedObjectFriendlyName
4764 }
4765 case "severity":
4766 if v != nil {
4767 var severity string
4768 err = json.Unmarshal(*v, &severity)
4769 if err != nil {
4770 return err
4771 }
4772 ep.Severity = &severity
4773 }
4774 case "timeOfOccurrence":
4775 if v != nil {
4776 var timeOfOccurrence date.Time
4777 err = json.Unmarshal(*v, &timeOfOccurrence)
4778 if err != nil {
4779 return err
4780 }
4781 ep.TimeOfOccurrence = &timeOfOccurrence
4782 }
4783 case "fabricId":
4784 if v != nil {
4785 var fabricID string
4786 err = json.Unmarshal(*v, &fabricID)
4787 if err != nil {
4788 return err
4789 }
4790 ep.FabricID = &fabricID
4791 }
4792 case "providerSpecificDetails":
4793 if v != nil {
4794 providerSpecificDetails, err := unmarshalBasicEventProviderSpecificDetails(*v)
4795 if err != nil {
4796 return err
4797 }
4798 ep.ProviderSpecificDetails = providerSpecificDetails
4799 }
4800 case "eventSpecificDetails":
4801 if v != nil {
4802 eventSpecificDetails, err := unmarshalBasicEventSpecificDetails(*v)
4803 if err != nil {
4804 return err
4805 }
4806 ep.EventSpecificDetails = eventSpecificDetails
4807 }
4808 case "healthErrors":
4809 if v != nil {
4810 var healthErrors []HealthError
4811 err = json.Unmarshal(*v, &healthErrors)
4812 if err != nil {
4813 return err
4814 }
4815 ep.HealthErrors = &healthErrors
4816 }
4817 }
4818 }
4819
4820 return nil
4821 }
4822
4823
4824 type BasicEventProviderSpecificDetails interface {
4825 AsA2AEventDetails() (*A2AEventDetails, bool)
4826 AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool)
4827 AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool)
4828 AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool)
4829 AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool)
4830 AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool)
4831 AsInMageRcmEventDetails() (*InMageRcmEventDetails, bool)
4832 AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool)
4833 }
4834
4835
4836 type EventProviderSpecificDetails struct {
4837
4838 InstanceType InstanceTypeBasicEventProviderSpecificDetails `json:"instanceType,omitempty"`
4839 }
4840
4841 func unmarshalBasicEventProviderSpecificDetails(body []byte) (BasicEventProviderSpecificDetails, error) {
4842 var m map[string]interface{}
4843 err := json.Unmarshal(body, &m)
4844 if err != nil {
4845 return nil, err
4846 }
4847
4848 switch m["instanceType"] {
4849 case string(InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeA2A):
4850 var aed A2AEventDetails
4851 err := json.Unmarshal(body, &aed)
4852 return aed, err
4853 case string(InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012):
4854 var hvr2ed HyperVReplica2012EventDetails
4855 err := json.Unmarshal(body, &hvr2ed)
4856 return hvr2ed, err
4857 case string(InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012R2):
4858 var hvr2ed HyperVReplica2012R2EventDetails
4859 err := json.Unmarshal(body, &hvr2ed)
4860 return hvr2ed, err
4861 case string(InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaAzure):
4862 var hvraed HyperVReplicaAzureEventDetails
4863 err := json.Unmarshal(body, &hvraed)
4864 return hvraed, err
4865 case string(InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaBaseEventDetails):
4866 var hvrbed HyperVReplicaBaseEventDetails
4867 err := json.Unmarshal(body, &hvrbed)
4868 return hvrbed, err
4869 case string(InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageAzureV2):
4870 var imaved InMageAzureV2EventDetails
4871 err := json.Unmarshal(body, &imaved)
4872 return imaved, err
4873 case string(InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageRcm):
4874 var imred InMageRcmEventDetails
4875 err := json.Unmarshal(body, &imred)
4876 return imred, err
4877 default:
4878 var epsd EventProviderSpecificDetails
4879 err := json.Unmarshal(body, &epsd)
4880 return epsd, err
4881 }
4882 }
4883 func unmarshalBasicEventProviderSpecificDetailsArray(body []byte) ([]BasicEventProviderSpecificDetails, error) {
4884 var rawMessages []*json.RawMessage
4885 err := json.Unmarshal(body, &rawMessages)
4886 if err != nil {
4887 return nil, err
4888 }
4889
4890 epsdArray := make([]BasicEventProviderSpecificDetails, len(rawMessages))
4891
4892 for index, rawMessage := range rawMessages {
4893 epsd, err := unmarshalBasicEventProviderSpecificDetails(*rawMessage)
4894 if err != nil {
4895 return nil, err
4896 }
4897 epsdArray[index] = epsd
4898 }
4899 return epsdArray, nil
4900 }
4901
4902
4903 func (epsd EventProviderSpecificDetails) MarshalJSON() ([]byte, error) {
4904 epsd.InstanceType = InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeEventProviderSpecificDetails
4905 objectMap := make(map[string]interface{})
4906 if epsd.InstanceType != "" {
4907 objectMap["instanceType"] = epsd.InstanceType
4908 }
4909 return json.Marshal(objectMap)
4910 }
4911
4912
4913 func (epsd EventProviderSpecificDetails) AsA2AEventDetails() (*A2AEventDetails, bool) {
4914 return nil, false
4915 }
4916
4917
4918 func (epsd EventProviderSpecificDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) {
4919 return nil, false
4920 }
4921
4922
4923 func (epsd EventProviderSpecificDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) {
4924 return nil, false
4925 }
4926
4927
4928 func (epsd EventProviderSpecificDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) {
4929 return nil, false
4930 }
4931
4932
4933 func (epsd EventProviderSpecificDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) {
4934 return nil, false
4935 }
4936
4937
4938 func (epsd EventProviderSpecificDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) {
4939 return nil, false
4940 }
4941
4942
4943 func (epsd EventProviderSpecificDetails) AsInMageRcmEventDetails() (*InMageRcmEventDetails, bool) {
4944 return nil, false
4945 }
4946
4947
4948 func (epsd EventProviderSpecificDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) {
4949 return &epsd, true
4950 }
4951
4952
4953 func (epsd EventProviderSpecificDetails) AsBasicEventProviderSpecificDetails() (BasicEventProviderSpecificDetails, bool) {
4954 return &epsd, true
4955 }
4956
4957
4958 type EventQueryParameter struct {
4959
4960 EventCode *string `json:"eventCode,omitempty"`
4961
4962 Severity *string `json:"severity,omitempty"`
4963
4964 EventType *string `json:"eventType,omitempty"`
4965
4966 FabricName *string `json:"fabricName,omitempty"`
4967
4968 AffectedObjectFriendlyName *string `json:"affectedObjectFriendlyName,omitempty"`
4969
4970 StartTime *date.Time `json:"startTime,omitempty"`
4971
4972 EndTime *date.Time `json:"endTime,omitempty"`
4973 }
4974
4975
4976 type BasicEventSpecificDetails interface {
4977 AsJobStatusEventDetails() (*JobStatusEventDetails, bool)
4978 AsEventSpecificDetails() (*EventSpecificDetails, bool)
4979 }
4980
4981
4982 type EventSpecificDetails struct {
4983
4984 InstanceType InstanceTypeBasicEventSpecificDetails `json:"instanceType,omitempty"`
4985 }
4986
4987 func unmarshalBasicEventSpecificDetails(body []byte) (BasicEventSpecificDetails, error) {
4988 var m map[string]interface{}
4989 err := json.Unmarshal(body, &m)
4990 if err != nil {
4991 return nil, err
4992 }
4993
4994 switch m["instanceType"] {
4995 case string(InstanceTypeJobStatus):
4996 var jsed JobStatusEventDetails
4997 err := json.Unmarshal(body, &jsed)
4998 return jsed, err
4999 default:
5000 var esd EventSpecificDetails
5001 err := json.Unmarshal(body, &esd)
5002 return esd, err
5003 }
5004 }
5005 func unmarshalBasicEventSpecificDetailsArray(body []byte) ([]BasicEventSpecificDetails, error) {
5006 var rawMessages []*json.RawMessage
5007 err := json.Unmarshal(body, &rawMessages)
5008 if err != nil {
5009 return nil, err
5010 }
5011
5012 esdArray := make([]BasicEventSpecificDetails, len(rawMessages))
5013
5014 for index, rawMessage := range rawMessages {
5015 esd, err := unmarshalBasicEventSpecificDetails(*rawMessage)
5016 if err != nil {
5017 return nil, err
5018 }
5019 esdArray[index] = esd
5020 }
5021 return esdArray, nil
5022 }
5023
5024
5025 func (esd EventSpecificDetails) MarshalJSON() ([]byte, error) {
5026 esd.InstanceType = InstanceTypeEventSpecificDetails
5027 objectMap := make(map[string]interface{})
5028 if esd.InstanceType != "" {
5029 objectMap["instanceType"] = esd.InstanceType
5030 }
5031 return json.Marshal(objectMap)
5032 }
5033
5034
5035 func (esd EventSpecificDetails) AsJobStatusEventDetails() (*JobStatusEventDetails, bool) {
5036 return nil, false
5037 }
5038
5039
5040 func (esd EventSpecificDetails) AsEventSpecificDetails() (*EventSpecificDetails, bool) {
5041 return &esd, true
5042 }
5043
5044
5045 func (esd EventSpecificDetails) AsBasicEventSpecificDetails() (BasicEventSpecificDetails, bool) {
5046 return &esd, true
5047 }
5048
5049
5050 type ExistingProtectionProfile struct {
5051
5052 ProtectionProfileID *string `json:"protectionProfileId,omitempty"`
5053
5054 ResourceType ResourceType `json:"resourceType,omitempty"`
5055 }
5056
5057
5058 func (epp ExistingProtectionProfile) MarshalJSON() ([]byte, error) {
5059 epp.ResourceType = ResourceTypeExisting
5060 objectMap := make(map[string]interface{})
5061 if epp.ProtectionProfileID != nil {
5062 objectMap["protectionProfileId"] = epp.ProtectionProfileID
5063 }
5064 if epp.ResourceType != "" {
5065 objectMap["resourceType"] = epp.ResourceType
5066 }
5067 return json.Marshal(objectMap)
5068 }
5069
5070
5071 func (epp ExistingProtectionProfile) AsExistingProtectionProfile() (*ExistingProtectionProfile, bool) {
5072 return &epp, true
5073 }
5074
5075
5076 func (epp ExistingProtectionProfile) AsNewProtectionProfile() (*NewProtectionProfile, bool) {
5077 return nil, false
5078 }
5079
5080
5081 func (epp ExistingProtectionProfile) AsProtectionProfileCustomDetails() (*ProtectionProfileCustomDetails, bool) {
5082 return nil, false
5083 }
5084
5085
5086 func (epp ExistingProtectionProfile) AsBasicProtectionProfileCustomDetails() (BasicProtectionProfileCustomDetails, bool) {
5087 return &epp, true
5088 }
5089
5090
5091 type ExistingRecoveryAvailabilitySet struct {
5092
5093 RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"`
5094
5095 ResourceType ResourceTypeBasicRecoveryAvailabilitySetCustomDetails `json:"resourceType,omitempty"`
5096 }
5097
5098
5099 func (eras ExistingRecoveryAvailabilitySet) MarshalJSON() ([]byte, error) {
5100 eras.ResourceType = ResourceTypeBasicRecoveryAvailabilitySetCustomDetailsResourceTypeExisting
5101 objectMap := make(map[string]interface{})
5102 if eras.RecoveryAvailabilitySetID != nil {
5103 objectMap["recoveryAvailabilitySetId"] = eras.RecoveryAvailabilitySetID
5104 }
5105 if eras.ResourceType != "" {
5106 objectMap["resourceType"] = eras.ResourceType
5107 }
5108 return json.Marshal(objectMap)
5109 }
5110
5111
5112 func (eras ExistingRecoveryAvailabilitySet) AsExistingRecoveryAvailabilitySet() (*ExistingRecoveryAvailabilitySet, bool) {
5113 return &eras, true
5114 }
5115
5116
5117 func (eras ExistingRecoveryAvailabilitySet) AsRecoveryAvailabilitySetCustomDetails() (*RecoveryAvailabilitySetCustomDetails, bool) {
5118 return nil, false
5119 }
5120
5121
5122 func (eras ExistingRecoveryAvailabilitySet) AsBasicRecoveryAvailabilitySetCustomDetails() (BasicRecoveryAvailabilitySetCustomDetails, bool) {
5123 return &eras, true
5124 }
5125
5126
5127 type ExistingRecoveryProximityPlacementGroup struct {
5128
5129 RecoveryProximityPlacementGroupID *string `json:"recoveryProximityPlacementGroupId,omitempty"`
5130
5131 ResourceType ResourceTypeBasicRecoveryProximityPlacementGroupCustomDetails `json:"resourceType,omitempty"`
5132 }
5133
5134
5135 func (erppg ExistingRecoveryProximityPlacementGroup) MarshalJSON() ([]byte, error) {
5136 erppg.ResourceType = ResourceTypeBasicRecoveryProximityPlacementGroupCustomDetailsResourceTypeExisting
5137 objectMap := make(map[string]interface{})
5138 if erppg.RecoveryProximityPlacementGroupID != nil {
5139 objectMap["recoveryProximityPlacementGroupId"] = erppg.RecoveryProximityPlacementGroupID
5140 }
5141 if erppg.ResourceType != "" {
5142 objectMap["resourceType"] = erppg.ResourceType
5143 }
5144 return json.Marshal(objectMap)
5145 }
5146
5147
5148 func (erppg ExistingRecoveryProximityPlacementGroup) AsExistingRecoveryProximityPlacementGroup() (*ExistingRecoveryProximityPlacementGroup, bool) {
5149 return &erppg, true
5150 }
5151
5152
5153 func (erppg ExistingRecoveryProximityPlacementGroup) AsRecoveryProximityPlacementGroupCustomDetails() (*RecoveryProximityPlacementGroupCustomDetails, bool) {
5154 return nil, false
5155 }
5156
5157
5158 func (erppg ExistingRecoveryProximityPlacementGroup) AsBasicRecoveryProximityPlacementGroupCustomDetails() (BasicRecoveryProximityPlacementGroupCustomDetails, bool) {
5159 return &erppg, true
5160 }
5161
5162
5163 type ExistingRecoveryRecoveryResourceGroup struct {
5164
5165 RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"`
5166
5167 ResourceType ResourceTypeBasicRecoveryResourceGroupCustomDetails `json:"resourceType,omitempty"`
5168 }
5169
5170
5171 func (errrg ExistingRecoveryRecoveryResourceGroup) MarshalJSON() ([]byte, error) {
5172 errrg.ResourceType = ResourceTypeBasicRecoveryResourceGroupCustomDetailsResourceTypeExisting
5173 objectMap := make(map[string]interface{})
5174 if errrg.RecoveryResourceGroupID != nil {
5175 objectMap["recoveryResourceGroupId"] = errrg.RecoveryResourceGroupID
5176 }
5177 if errrg.ResourceType != "" {
5178 objectMap["resourceType"] = errrg.ResourceType
5179 }
5180 return json.Marshal(objectMap)
5181 }
5182
5183
5184 func (errrg ExistingRecoveryRecoveryResourceGroup) AsExistingRecoveryRecoveryResourceGroup() (*ExistingRecoveryRecoveryResourceGroup, bool) {
5185 return &errrg, true
5186 }
5187
5188
5189 func (errrg ExistingRecoveryRecoveryResourceGroup) AsRecoveryResourceGroupCustomDetails() (*RecoveryResourceGroupCustomDetails, bool) {
5190 return nil, false
5191 }
5192
5193
5194 func (errrg ExistingRecoveryRecoveryResourceGroup) AsBasicRecoveryResourceGroupCustomDetails() (BasicRecoveryResourceGroupCustomDetails, bool) {
5195 return &errrg, true
5196 }
5197
5198
5199 type ExistingRecoveryVirtualNetwork struct {
5200
5201 RecoveryVirtualNetworkID *string `json:"recoveryVirtualNetworkId,omitempty"`
5202
5203 RecoverySubnetName *string `json:"recoverySubnetName,omitempty"`
5204
5205 ResourceType ResourceTypeBasicRecoveryVirtualNetworkCustomDetails `json:"resourceType,omitempty"`
5206 }
5207
5208
5209 func (ervn ExistingRecoveryVirtualNetwork) MarshalJSON() ([]byte, error) {
5210 ervn.ResourceType = ResourceTypeBasicRecoveryVirtualNetworkCustomDetailsResourceTypeExisting
5211 objectMap := make(map[string]interface{})
5212 if ervn.RecoveryVirtualNetworkID != nil {
5213 objectMap["recoveryVirtualNetworkId"] = ervn.RecoveryVirtualNetworkID
5214 }
5215 if ervn.RecoverySubnetName != nil {
5216 objectMap["recoverySubnetName"] = ervn.RecoverySubnetName
5217 }
5218 if ervn.ResourceType != "" {
5219 objectMap["resourceType"] = ervn.ResourceType
5220 }
5221 return json.Marshal(objectMap)
5222 }
5223
5224
5225 func (ervn ExistingRecoveryVirtualNetwork) AsExistingRecoveryVirtualNetwork() (*ExistingRecoveryVirtualNetwork, bool) {
5226 return &ervn, true
5227 }
5228
5229
5230 func (ervn ExistingRecoveryVirtualNetwork) AsRecoveryVirtualNetworkCustomDetails() (*RecoveryVirtualNetworkCustomDetails, bool) {
5231 return nil, false
5232 }
5233
5234
5235 func (ervn ExistingRecoveryVirtualNetwork) AsBasicRecoveryVirtualNetworkCustomDetails() (BasicRecoveryVirtualNetworkCustomDetails, bool) {
5236 return &ervn, true
5237 }
5238
5239
5240 type ExistingStorageAccount struct {
5241
5242 AzureStorageAccountID *string `json:"azureStorageAccountId,omitempty"`
5243
5244 ResourceType ResourceTypeBasicStorageAccountCustomDetails `json:"resourceType,omitempty"`
5245 }
5246
5247
5248 func (esa ExistingStorageAccount) MarshalJSON() ([]byte, error) {
5249 esa.ResourceType = ResourceTypeBasicStorageAccountCustomDetailsResourceTypeExisting
5250 objectMap := make(map[string]interface{})
5251 if esa.AzureStorageAccountID != nil {
5252 objectMap["azureStorageAccountId"] = esa.AzureStorageAccountID
5253 }
5254 if esa.ResourceType != "" {
5255 objectMap["resourceType"] = esa.ResourceType
5256 }
5257 return json.Marshal(objectMap)
5258 }
5259
5260
5261 func (esa ExistingStorageAccount) AsExistingStorageAccount() (*ExistingStorageAccount, bool) {
5262 return &esa, true
5263 }
5264
5265
5266 func (esa ExistingStorageAccount) AsStorageAccountCustomDetails() (*StorageAccountCustomDetails, bool) {
5267 return nil, false
5268 }
5269
5270
5271 func (esa ExistingStorageAccount) AsBasicStorageAccountCustomDetails() (BasicStorageAccountCustomDetails, bool) {
5272 return &esa, true
5273 }
5274
5275
5276 type ExportJobDetails struct {
5277
5278 BlobURI *string `json:"blobUri,omitempty"`
5279
5280 SasToken *string `json:"sasToken,omitempty"`
5281
5282 AffectedObjectDetails map[string]*string `json:"affectedObjectDetails"`
5283
5284 InstanceType InstanceTypeBasicJobDetails `json:"instanceType,omitempty"`
5285 }
5286
5287
5288 func (ejd ExportJobDetails) MarshalJSON() ([]byte, error) {
5289 ejd.InstanceType = InstanceTypeExportJobDetails
5290 objectMap := make(map[string]interface{})
5291 if ejd.BlobURI != nil {
5292 objectMap["blobUri"] = ejd.BlobURI
5293 }
5294 if ejd.SasToken != nil {
5295 objectMap["sasToken"] = ejd.SasToken
5296 }
5297 if ejd.AffectedObjectDetails != nil {
5298 objectMap["affectedObjectDetails"] = ejd.AffectedObjectDetails
5299 }
5300 if ejd.InstanceType != "" {
5301 objectMap["instanceType"] = ejd.InstanceType
5302 }
5303 return json.Marshal(objectMap)
5304 }
5305
5306
5307 func (ejd ExportJobDetails) AsAsrJobDetails() (*AsrJobDetails, bool) {
5308 return nil, false
5309 }
5310
5311
5312 func (ejd ExportJobDetails) AsExportJobDetails() (*ExportJobDetails, bool) {
5313 return &ejd, true
5314 }
5315
5316
5317 func (ejd ExportJobDetails) AsFailoverJobDetails() (*FailoverJobDetails, bool) {
5318 return nil, false
5319 }
5320
5321
5322 func (ejd ExportJobDetails) AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool) {
5323 return nil, false
5324 }
5325
5326
5327 func (ejd ExportJobDetails) AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool) {
5328 return nil, false
5329 }
5330
5331
5332 func (ejd ExportJobDetails) AsJobDetails() (*JobDetails, bool) {
5333 return nil, false
5334 }
5335
5336
5337 func (ejd ExportJobDetails) AsBasicJobDetails() (BasicJobDetails, bool) {
5338 return &ejd, true
5339 }
5340
5341
5342 type Fabric struct {
5343 autorest.Response `json:"-"`
5344
5345 Properties *FabricProperties `json:"properties,omitempty"`
5346
5347 ID *string `json:"id,omitempty"`
5348
5349 Name *string `json:"name,omitempty"`
5350
5351 Type *string `json:"type,omitempty"`
5352
5353 Location *string `json:"location,omitempty"`
5354 }
5355
5356
5357 func (f Fabric) MarshalJSON() ([]byte, error) {
5358 objectMap := make(map[string]interface{})
5359 if f.Properties != nil {
5360 objectMap["properties"] = f.Properties
5361 }
5362 if f.Location != nil {
5363 objectMap["location"] = f.Location
5364 }
5365 return json.Marshal(objectMap)
5366 }
5367
5368
5369 type FabricCollection struct {
5370 autorest.Response `json:"-"`
5371
5372 Value *[]Fabric `json:"value,omitempty"`
5373
5374 NextLink *string `json:"nextLink,omitempty"`
5375 }
5376
5377
5378 type FabricCollectionIterator struct {
5379 i int
5380 page FabricCollectionPage
5381 }
5382
5383
5384
5385 func (iter *FabricCollectionIterator) NextWithContext(ctx context.Context) (err error) {
5386 if tracing.IsEnabled() {
5387 ctx = tracing.StartSpan(ctx, fqdn+"/FabricCollectionIterator.NextWithContext")
5388 defer func() {
5389 sc := -1
5390 if iter.Response().Response.Response != nil {
5391 sc = iter.Response().Response.Response.StatusCode
5392 }
5393 tracing.EndSpan(ctx, sc, err)
5394 }()
5395 }
5396 iter.i++
5397 if iter.i < len(iter.page.Values()) {
5398 return nil
5399 }
5400 err = iter.page.NextWithContext(ctx)
5401 if err != nil {
5402 iter.i--
5403 return err
5404 }
5405 iter.i = 0
5406 return nil
5407 }
5408
5409
5410
5411
5412 func (iter *FabricCollectionIterator) Next() error {
5413 return iter.NextWithContext(context.Background())
5414 }
5415
5416
5417 func (iter FabricCollectionIterator) NotDone() bool {
5418 return iter.page.NotDone() && iter.i < len(iter.page.Values())
5419 }
5420
5421
5422 func (iter FabricCollectionIterator) Response() FabricCollection {
5423 return iter.page.Response()
5424 }
5425
5426
5427
5428 func (iter FabricCollectionIterator) Value() Fabric {
5429 if !iter.page.NotDone() {
5430 return Fabric{}
5431 }
5432 return iter.page.Values()[iter.i]
5433 }
5434
5435
5436 func NewFabricCollectionIterator(page FabricCollectionPage) FabricCollectionIterator {
5437 return FabricCollectionIterator{page: page}
5438 }
5439
5440
5441 func (fc FabricCollection) IsEmpty() bool {
5442 return fc.Value == nil || len(*fc.Value) == 0
5443 }
5444
5445
5446 func (fc FabricCollection) hasNextLink() bool {
5447 return fc.NextLink != nil && len(*fc.NextLink) != 0
5448 }
5449
5450
5451
5452 func (fc FabricCollection) fabricCollectionPreparer(ctx context.Context) (*http.Request, error) {
5453 if !fc.hasNextLink() {
5454 return nil, nil
5455 }
5456 return autorest.Prepare((&http.Request{}).WithContext(ctx),
5457 autorest.AsJSON(),
5458 autorest.AsGet(),
5459 autorest.WithBaseURL(to.String(fc.NextLink)))
5460 }
5461
5462
5463 type FabricCollectionPage struct {
5464 fn func(context.Context, FabricCollection) (FabricCollection, error)
5465 fc FabricCollection
5466 }
5467
5468
5469
5470 func (page *FabricCollectionPage) NextWithContext(ctx context.Context) (err error) {
5471 if tracing.IsEnabled() {
5472 ctx = tracing.StartSpan(ctx, fqdn+"/FabricCollectionPage.NextWithContext")
5473 defer func() {
5474 sc := -1
5475 if page.Response().Response.Response != nil {
5476 sc = page.Response().Response.Response.StatusCode
5477 }
5478 tracing.EndSpan(ctx, sc, err)
5479 }()
5480 }
5481 for {
5482 next, err := page.fn(ctx, page.fc)
5483 if err != nil {
5484 return err
5485 }
5486 page.fc = next
5487 if !next.hasNextLink() || !next.IsEmpty() {
5488 break
5489 }
5490 }
5491 return nil
5492 }
5493
5494
5495
5496
5497 func (page *FabricCollectionPage) Next() error {
5498 return page.NextWithContext(context.Background())
5499 }
5500
5501
5502 func (page FabricCollectionPage) NotDone() bool {
5503 return !page.fc.IsEmpty()
5504 }
5505
5506
5507 func (page FabricCollectionPage) Response() FabricCollection {
5508 return page.fc
5509 }
5510
5511
5512 func (page FabricCollectionPage) Values() []Fabric {
5513 if page.fc.IsEmpty() {
5514 return nil
5515 }
5516 return *page.fc.Value
5517 }
5518
5519
5520 func NewFabricCollectionPage(cur FabricCollection, getNextPage func(context.Context, FabricCollection) (FabricCollection, error)) FabricCollectionPage {
5521 return FabricCollectionPage{
5522 fn: getNextPage,
5523 fc: cur,
5524 }
5525 }
5526
5527
5528 type FabricCreationInput struct {
5529
5530 Properties *FabricCreationInputProperties `json:"properties,omitempty"`
5531 }
5532
5533
5534 type FabricCreationInputProperties struct {
5535
5536 CustomDetails BasicFabricSpecificCreationInput `json:"customDetails,omitempty"`
5537 }
5538
5539
5540 func (fcip *FabricCreationInputProperties) UnmarshalJSON(body []byte) error {
5541 var m map[string]*json.RawMessage
5542 err := json.Unmarshal(body, &m)
5543 if err != nil {
5544 return err
5545 }
5546 for k, v := range m {
5547 switch k {
5548 case "customDetails":
5549 if v != nil {
5550 customDetails, err := unmarshalBasicFabricSpecificCreationInput(*v)
5551 if err != nil {
5552 return err
5553 }
5554 fcip.CustomDetails = customDetails
5555 }
5556 }
5557 }
5558
5559 return nil
5560 }
5561
5562
5563 type FabricProperties struct {
5564
5565 FriendlyName *string `json:"friendlyName,omitempty"`
5566
5567 EncryptionDetails *EncryptionDetails `json:"encryptionDetails,omitempty"`
5568
5569 RolloverEncryptionDetails *EncryptionDetails `json:"rolloverEncryptionDetails,omitempty"`
5570
5571 InternalIdentifier *string `json:"internalIdentifier,omitempty"`
5572
5573 BcdrState *string `json:"bcdrState,omitempty"`
5574
5575 CustomDetails BasicFabricSpecificDetails `json:"customDetails,omitempty"`
5576
5577 HealthErrorDetails *[]HealthError `json:"healthErrorDetails,omitempty"`
5578
5579 Health *string `json:"health,omitempty"`
5580 }
5581
5582
5583 func (fp *FabricProperties) UnmarshalJSON(body []byte) error {
5584 var m map[string]*json.RawMessage
5585 err := json.Unmarshal(body, &m)
5586 if err != nil {
5587 return err
5588 }
5589 for k, v := range m {
5590 switch k {
5591 case "friendlyName":
5592 if v != nil {
5593 var friendlyName string
5594 err = json.Unmarshal(*v, &friendlyName)
5595 if err != nil {
5596 return err
5597 }
5598 fp.FriendlyName = &friendlyName
5599 }
5600 case "encryptionDetails":
5601 if v != nil {
5602 var encryptionDetails EncryptionDetails
5603 err = json.Unmarshal(*v, &encryptionDetails)
5604 if err != nil {
5605 return err
5606 }
5607 fp.EncryptionDetails = &encryptionDetails
5608 }
5609 case "rolloverEncryptionDetails":
5610 if v != nil {
5611 var rolloverEncryptionDetails EncryptionDetails
5612 err = json.Unmarshal(*v, &rolloverEncryptionDetails)
5613 if err != nil {
5614 return err
5615 }
5616 fp.RolloverEncryptionDetails = &rolloverEncryptionDetails
5617 }
5618 case "internalIdentifier":
5619 if v != nil {
5620 var internalIdentifier string
5621 err = json.Unmarshal(*v, &internalIdentifier)
5622 if err != nil {
5623 return err
5624 }
5625 fp.InternalIdentifier = &internalIdentifier
5626 }
5627 case "bcdrState":
5628 if v != nil {
5629 var bcdrState string
5630 err = json.Unmarshal(*v, &bcdrState)
5631 if err != nil {
5632 return err
5633 }
5634 fp.BcdrState = &bcdrState
5635 }
5636 case "customDetails":
5637 if v != nil {
5638 customDetails, err := unmarshalBasicFabricSpecificDetails(*v)
5639 if err != nil {
5640 return err
5641 }
5642 fp.CustomDetails = customDetails
5643 }
5644 case "healthErrorDetails":
5645 if v != nil {
5646 var healthErrorDetails []HealthError
5647 err = json.Unmarshal(*v, &healthErrorDetails)
5648 if err != nil {
5649 return err
5650 }
5651 fp.HealthErrorDetails = &healthErrorDetails
5652 }
5653 case "health":
5654 if v != nil {
5655 var health string
5656 err = json.Unmarshal(*v, &health)
5657 if err != nil {
5658 return err
5659 }
5660 fp.Health = &health
5661 }
5662 }
5663 }
5664
5665 return nil
5666 }
5667
5668
5669 type FabricReplicationGroupTaskDetails struct {
5670
5671 SkippedReason *string `json:"skippedReason,omitempty"`
5672
5673 SkippedReasonString *string `json:"skippedReasonString,omitempty"`
5674
5675 JobTask *JobEntity `json:"jobTask,omitempty"`
5676
5677 InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"`
5678 }
5679
5680
5681 func (frgtd FabricReplicationGroupTaskDetails) MarshalJSON() ([]byte, error) {
5682 frgtd.InstanceType = InstanceTypeFabricReplicationGroupTaskDetails
5683 objectMap := make(map[string]interface{})
5684 if frgtd.SkippedReason != nil {
5685 objectMap["skippedReason"] = frgtd.SkippedReason
5686 }
5687 if frgtd.SkippedReasonString != nil {
5688 objectMap["skippedReasonString"] = frgtd.SkippedReasonString
5689 }
5690 if frgtd.JobTask != nil {
5691 objectMap["jobTask"] = frgtd.JobTask
5692 }
5693 if frgtd.InstanceType != "" {
5694 objectMap["instanceType"] = frgtd.InstanceType
5695 }
5696 return json.Marshal(objectMap)
5697 }
5698
5699
5700 func (frgtd FabricReplicationGroupTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) {
5701 return nil, false
5702 }
5703
5704
5705 func (frgtd FabricReplicationGroupTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) {
5706 return nil, false
5707 }
5708
5709
5710 func (frgtd FabricReplicationGroupTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) {
5711 return &frgtd, true
5712 }
5713
5714
5715 func (frgtd FabricReplicationGroupTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) {
5716 return nil, false
5717 }
5718
5719
5720 func (frgtd FabricReplicationGroupTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) {
5721 return nil, false
5722 }
5723
5724
5725 func (frgtd FabricReplicationGroupTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) {
5726 return nil, false
5727 }
5728
5729
5730 func (frgtd FabricReplicationGroupTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) {
5731 return nil, false
5732 }
5733
5734
5735 func (frgtd FabricReplicationGroupTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) {
5736 return nil, false
5737 }
5738
5739
5740 func (frgtd FabricReplicationGroupTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) {
5741 return nil, false
5742 }
5743
5744
5745 func (frgtd FabricReplicationGroupTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) {
5746 return &frgtd, true
5747 }
5748
5749
5750 type BasicFabricSpecificCreateNetworkMappingInput interface {
5751 AsAzureToAzureCreateNetworkMappingInput() (*AzureToAzureCreateNetworkMappingInput, bool)
5752 AsVmmToAzureCreateNetworkMappingInput() (*VmmToAzureCreateNetworkMappingInput, bool)
5753 AsVmmToVmmCreateNetworkMappingInput() (*VmmToVmmCreateNetworkMappingInput, bool)
5754 AsFabricSpecificCreateNetworkMappingInput() (*FabricSpecificCreateNetworkMappingInput, bool)
5755 }
5756
5757
5758 type FabricSpecificCreateNetworkMappingInput struct {
5759
5760 InstanceType InstanceTypeBasicFabricSpecificCreateNetworkMappingInput `json:"instanceType,omitempty"`
5761 }
5762
5763 func unmarshalBasicFabricSpecificCreateNetworkMappingInput(body []byte) (BasicFabricSpecificCreateNetworkMappingInput, error) {
5764 var m map[string]interface{}
5765 err := json.Unmarshal(body, &m)
5766 if err != nil {
5767 return nil, err
5768 }
5769
5770 switch m["instanceType"] {
5771 case string(InstanceTypeAzureToAzure):
5772 var atacnmi AzureToAzureCreateNetworkMappingInput
5773 err := json.Unmarshal(body, &atacnmi)
5774 return atacnmi, err
5775 case string(InstanceTypeVmmToAzure):
5776 var vtacnmi VmmToAzureCreateNetworkMappingInput
5777 err := json.Unmarshal(body, &vtacnmi)
5778 return vtacnmi, err
5779 case string(InstanceTypeVmmToVmm):
5780 var vtvcnmi VmmToVmmCreateNetworkMappingInput
5781 err := json.Unmarshal(body, &vtvcnmi)
5782 return vtvcnmi, err
5783 default:
5784 var fscnmi FabricSpecificCreateNetworkMappingInput
5785 err := json.Unmarshal(body, &fscnmi)
5786 return fscnmi, err
5787 }
5788 }
5789 func unmarshalBasicFabricSpecificCreateNetworkMappingInputArray(body []byte) ([]BasicFabricSpecificCreateNetworkMappingInput, error) {
5790 var rawMessages []*json.RawMessage
5791 err := json.Unmarshal(body, &rawMessages)
5792 if err != nil {
5793 return nil, err
5794 }
5795
5796 fscnmiArray := make([]BasicFabricSpecificCreateNetworkMappingInput, len(rawMessages))
5797
5798 for index, rawMessage := range rawMessages {
5799 fscnmi, err := unmarshalBasicFabricSpecificCreateNetworkMappingInput(*rawMessage)
5800 if err != nil {
5801 return nil, err
5802 }
5803 fscnmiArray[index] = fscnmi
5804 }
5805 return fscnmiArray, nil
5806 }
5807
5808
5809 func (fscnmi FabricSpecificCreateNetworkMappingInput) MarshalJSON() ([]byte, error) {
5810 fscnmi.InstanceType = InstanceTypeFabricSpecificCreateNetworkMappingInput
5811 objectMap := make(map[string]interface{})
5812 if fscnmi.InstanceType != "" {
5813 objectMap["instanceType"] = fscnmi.InstanceType
5814 }
5815 return json.Marshal(objectMap)
5816 }
5817
5818
5819 func (fscnmi FabricSpecificCreateNetworkMappingInput) AsAzureToAzureCreateNetworkMappingInput() (*AzureToAzureCreateNetworkMappingInput, bool) {
5820 return nil, false
5821 }
5822
5823
5824 func (fscnmi FabricSpecificCreateNetworkMappingInput) AsVmmToAzureCreateNetworkMappingInput() (*VmmToAzureCreateNetworkMappingInput, bool) {
5825 return nil, false
5826 }
5827
5828
5829 func (fscnmi FabricSpecificCreateNetworkMappingInput) AsVmmToVmmCreateNetworkMappingInput() (*VmmToVmmCreateNetworkMappingInput, bool) {
5830 return nil, false
5831 }
5832
5833
5834 func (fscnmi FabricSpecificCreateNetworkMappingInput) AsFabricSpecificCreateNetworkMappingInput() (*FabricSpecificCreateNetworkMappingInput, bool) {
5835 return &fscnmi, true
5836 }
5837
5838
5839 func (fscnmi FabricSpecificCreateNetworkMappingInput) AsBasicFabricSpecificCreateNetworkMappingInput() (BasicFabricSpecificCreateNetworkMappingInput, bool) {
5840 return &fscnmi, true
5841 }
5842
5843
5844 type BasicFabricSpecificCreationInput interface {
5845 AsAzureFabricCreationInput() (*AzureFabricCreationInput, bool)
5846 AsInMageRcmFabricCreationInput() (*InMageRcmFabricCreationInput, bool)
5847 AsVMwareV2FabricCreationInput() (*VMwareV2FabricCreationInput, bool)
5848 AsFabricSpecificCreationInput() (*FabricSpecificCreationInput, bool)
5849 }
5850
5851
5852 type FabricSpecificCreationInput struct {
5853
5854 InstanceType InstanceTypeBasicFabricSpecificCreationInput `json:"instanceType,omitempty"`
5855 }
5856
5857 func unmarshalBasicFabricSpecificCreationInput(body []byte) (BasicFabricSpecificCreationInput, error) {
5858 var m map[string]interface{}
5859 err := json.Unmarshal(body, &m)
5860 if err != nil {
5861 return nil, err
5862 }
5863
5864 switch m["instanceType"] {
5865 case string(InstanceTypeAzure):
5866 var afci AzureFabricCreationInput
5867 err := json.Unmarshal(body, &afci)
5868 return afci, err
5869 case string(InstanceTypeInMageRcm):
5870 var imrfci InMageRcmFabricCreationInput
5871 err := json.Unmarshal(body, &imrfci)
5872 return imrfci, err
5873 case string(InstanceTypeVMwareV2):
5874 var vmvfci VMwareV2FabricCreationInput
5875 err := json.Unmarshal(body, &vmvfci)
5876 return vmvfci, err
5877 default:
5878 var fsci FabricSpecificCreationInput
5879 err := json.Unmarshal(body, &fsci)
5880 return fsci, err
5881 }
5882 }
5883 func unmarshalBasicFabricSpecificCreationInputArray(body []byte) ([]BasicFabricSpecificCreationInput, error) {
5884 var rawMessages []*json.RawMessage
5885 err := json.Unmarshal(body, &rawMessages)
5886 if err != nil {
5887 return nil, err
5888 }
5889
5890 fsciArray := make([]BasicFabricSpecificCreationInput, len(rawMessages))
5891
5892 for index, rawMessage := range rawMessages {
5893 fsci, err := unmarshalBasicFabricSpecificCreationInput(*rawMessage)
5894 if err != nil {
5895 return nil, err
5896 }
5897 fsciArray[index] = fsci
5898 }
5899 return fsciArray, nil
5900 }
5901
5902
5903 func (fsci FabricSpecificCreationInput) MarshalJSON() ([]byte, error) {
5904 fsci.InstanceType = InstanceTypeFabricSpecificCreationInput
5905 objectMap := make(map[string]interface{})
5906 if fsci.InstanceType != "" {
5907 objectMap["instanceType"] = fsci.InstanceType
5908 }
5909 return json.Marshal(objectMap)
5910 }
5911
5912
5913 func (fsci FabricSpecificCreationInput) AsAzureFabricCreationInput() (*AzureFabricCreationInput, bool) {
5914 return nil, false
5915 }
5916
5917
5918 func (fsci FabricSpecificCreationInput) AsInMageRcmFabricCreationInput() (*InMageRcmFabricCreationInput, bool) {
5919 return nil, false
5920 }
5921
5922
5923 func (fsci FabricSpecificCreationInput) AsVMwareV2FabricCreationInput() (*VMwareV2FabricCreationInput, bool) {
5924 return nil, false
5925 }
5926
5927
5928 func (fsci FabricSpecificCreationInput) AsFabricSpecificCreationInput() (*FabricSpecificCreationInput, bool) {
5929 return &fsci, true
5930 }
5931
5932
5933 func (fsci FabricSpecificCreationInput) AsBasicFabricSpecificCreationInput() (BasicFabricSpecificCreationInput, bool) {
5934 return &fsci, true
5935 }
5936
5937
5938 type BasicFabricSpecificDetails interface {
5939 AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool)
5940 AsHyperVSiteDetails() (*HyperVSiteDetails, bool)
5941 AsInMageRcmFabricSpecificDetails() (*InMageRcmFabricSpecificDetails, bool)
5942 AsVmmDetails() (*VmmDetails, bool)
5943 AsVMwareDetails() (*VMwareDetails, bool)
5944 AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool)
5945 AsFabricSpecificDetails() (*FabricSpecificDetails, bool)
5946 }
5947
5948
5949 type FabricSpecificDetails struct {
5950
5951 InstanceType InstanceTypeBasicFabricSpecificDetails `json:"instanceType,omitempty"`
5952 }
5953
5954 func unmarshalBasicFabricSpecificDetails(body []byte) (BasicFabricSpecificDetails, error) {
5955 var m map[string]interface{}
5956 err := json.Unmarshal(body, &m)
5957 if err != nil {
5958 return nil, err
5959 }
5960
5961 switch m["instanceType"] {
5962 case string(InstanceTypeBasicFabricSpecificDetailsInstanceTypeAzure):
5963 var afsd AzureFabricSpecificDetails
5964 err := json.Unmarshal(body, &afsd)
5965 return afsd, err
5966 case string(InstanceTypeBasicFabricSpecificDetailsInstanceTypeHyperVSite):
5967 var hvsd HyperVSiteDetails
5968 err := json.Unmarshal(body, &hvsd)
5969 return hvsd, err
5970 case string(InstanceTypeBasicFabricSpecificDetailsInstanceTypeInMageRcm):
5971 var imrfsd InMageRcmFabricSpecificDetails
5972 err := json.Unmarshal(body, &imrfsd)
5973 return imrfsd, err
5974 case string(InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMM):
5975 var vd VmmDetails
5976 err := json.Unmarshal(body, &vd)
5977 return vd, err
5978 case string(InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMware):
5979 var vmd VMwareDetails
5980 err := json.Unmarshal(body, &vmd)
5981 return vmd, err
5982 case string(InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMwareV2):
5983 var vmvfsd VMwareV2FabricSpecificDetails
5984 err := json.Unmarshal(body, &vmvfsd)
5985 return vmvfsd, err
5986 default:
5987 var fsd FabricSpecificDetails
5988 err := json.Unmarshal(body, &fsd)
5989 return fsd, err
5990 }
5991 }
5992 func unmarshalBasicFabricSpecificDetailsArray(body []byte) ([]BasicFabricSpecificDetails, error) {
5993 var rawMessages []*json.RawMessage
5994 err := json.Unmarshal(body, &rawMessages)
5995 if err != nil {
5996 return nil, err
5997 }
5998
5999 fsdArray := make([]BasicFabricSpecificDetails, len(rawMessages))
6000
6001 for index, rawMessage := range rawMessages {
6002 fsd, err := unmarshalBasicFabricSpecificDetails(*rawMessage)
6003 if err != nil {
6004 return nil, err
6005 }
6006 fsdArray[index] = fsd
6007 }
6008 return fsdArray, nil
6009 }
6010
6011
6012 func (fsd FabricSpecificDetails) MarshalJSON() ([]byte, error) {
6013 fsd.InstanceType = InstanceTypeBasicFabricSpecificDetailsInstanceTypeFabricSpecificDetails
6014 objectMap := make(map[string]interface{})
6015 if fsd.InstanceType != "" {
6016 objectMap["instanceType"] = fsd.InstanceType
6017 }
6018 return json.Marshal(objectMap)
6019 }
6020
6021
6022 func (fsd FabricSpecificDetails) AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool) {
6023 return nil, false
6024 }
6025
6026
6027 func (fsd FabricSpecificDetails) AsHyperVSiteDetails() (*HyperVSiteDetails, bool) {
6028 return nil, false
6029 }
6030
6031
6032 func (fsd FabricSpecificDetails) AsInMageRcmFabricSpecificDetails() (*InMageRcmFabricSpecificDetails, bool) {
6033 return nil, false
6034 }
6035
6036
6037 func (fsd FabricSpecificDetails) AsVmmDetails() (*VmmDetails, bool) {
6038 return nil, false
6039 }
6040
6041
6042 func (fsd FabricSpecificDetails) AsVMwareDetails() (*VMwareDetails, bool) {
6043 return nil, false
6044 }
6045
6046
6047 func (fsd FabricSpecificDetails) AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool) {
6048 return nil, false
6049 }
6050
6051
6052 func (fsd FabricSpecificDetails) AsFabricSpecificDetails() (*FabricSpecificDetails, bool) {
6053 return &fsd, true
6054 }
6055
6056
6057 func (fsd FabricSpecificDetails) AsBasicFabricSpecificDetails() (BasicFabricSpecificDetails, bool) {
6058 return &fsd, true
6059 }
6060
6061
6062 type BasicFabricSpecificUpdateNetworkMappingInput interface {
6063 AsAzureToAzureUpdateNetworkMappingInput() (*AzureToAzureUpdateNetworkMappingInput, bool)
6064 AsVmmToAzureUpdateNetworkMappingInput() (*VmmToAzureUpdateNetworkMappingInput, bool)
6065 AsVmmToVmmUpdateNetworkMappingInput() (*VmmToVmmUpdateNetworkMappingInput, bool)
6066 AsFabricSpecificUpdateNetworkMappingInput() (*FabricSpecificUpdateNetworkMappingInput, bool)
6067 }
6068
6069
6070 type FabricSpecificUpdateNetworkMappingInput struct {
6071
6072 InstanceType InstanceTypeBasicFabricSpecificUpdateNetworkMappingInput `json:"instanceType,omitempty"`
6073 }
6074
6075 func unmarshalBasicFabricSpecificUpdateNetworkMappingInput(body []byte) (BasicFabricSpecificUpdateNetworkMappingInput, error) {
6076 var m map[string]interface{}
6077 err := json.Unmarshal(body, &m)
6078 if err != nil {
6079 return nil, err
6080 }
6081
6082 switch m["instanceType"] {
6083 case string(InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeAzureToAzure):
6084 var ataunmi AzureToAzureUpdateNetworkMappingInput
6085 err := json.Unmarshal(body, &ataunmi)
6086 return ataunmi, err
6087 case string(InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToAzure):
6088 var vtaunmi VmmToAzureUpdateNetworkMappingInput
6089 err := json.Unmarshal(body, &vtaunmi)
6090 return vtaunmi, err
6091 case string(InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToVmm):
6092 var vtvunmi VmmToVmmUpdateNetworkMappingInput
6093 err := json.Unmarshal(body, &vtvunmi)
6094 return vtvunmi, err
6095 default:
6096 var fsunmi FabricSpecificUpdateNetworkMappingInput
6097 err := json.Unmarshal(body, &fsunmi)
6098 return fsunmi, err
6099 }
6100 }
6101 func unmarshalBasicFabricSpecificUpdateNetworkMappingInputArray(body []byte) ([]BasicFabricSpecificUpdateNetworkMappingInput, error) {
6102 var rawMessages []*json.RawMessage
6103 err := json.Unmarshal(body, &rawMessages)
6104 if err != nil {
6105 return nil, err
6106 }
6107
6108 fsunmiArray := make([]BasicFabricSpecificUpdateNetworkMappingInput, len(rawMessages))
6109
6110 for index, rawMessage := range rawMessages {
6111 fsunmi, err := unmarshalBasicFabricSpecificUpdateNetworkMappingInput(*rawMessage)
6112 if err != nil {
6113 return nil, err
6114 }
6115 fsunmiArray[index] = fsunmi
6116 }
6117 return fsunmiArray, nil
6118 }
6119
6120
6121 func (fsunmi FabricSpecificUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) {
6122 fsunmi.InstanceType = InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeFabricSpecificUpdateNetworkMappingInput
6123 objectMap := make(map[string]interface{})
6124 if fsunmi.InstanceType != "" {
6125 objectMap["instanceType"] = fsunmi.InstanceType
6126 }
6127 return json.Marshal(objectMap)
6128 }
6129
6130
6131 func (fsunmi FabricSpecificUpdateNetworkMappingInput) AsAzureToAzureUpdateNetworkMappingInput() (*AzureToAzureUpdateNetworkMappingInput, bool) {
6132 return nil, false
6133 }
6134
6135
6136 func (fsunmi FabricSpecificUpdateNetworkMappingInput) AsVmmToAzureUpdateNetworkMappingInput() (*VmmToAzureUpdateNetworkMappingInput, bool) {
6137 return nil, false
6138 }
6139
6140
6141 func (fsunmi FabricSpecificUpdateNetworkMappingInput) AsVmmToVmmUpdateNetworkMappingInput() (*VmmToVmmUpdateNetworkMappingInput, bool) {
6142 return nil, false
6143 }
6144
6145
6146 func (fsunmi FabricSpecificUpdateNetworkMappingInput) AsFabricSpecificUpdateNetworkMappingInput() (*FabricSpecificUpdateNetworkMappingInput, bool) {
6147 return &fsunmi, true
6148 }
6149
6150
6151 func (fsunmi FabricSpecificUpdateNetworkMappingInput) AsBasicFabricSpecificUpdateNetworkMappingInput() (BasicFabricSpecificUpdateNetworkMappingInput, bool) {
6152 return &fsunmi, true
6153 }
6154
6155
6156 type FailoverJobDetails struct {
6157
6158 ProtectedItemDetails *[]FailoverReplicationProtectedItemDetails `json:"protectedItemDetails,omitempty"`
6159
6160 AffectedObjectDetails map[string]*string `json:"affectedObjectDetails"`
6161
6162 InstanceType InstanceTypeBasicJobDetails `json:"instanceType,omitempty"`
6163 }
6164
6165
6166 func (fjd FailoverJobDetails) MarshalJSON() ([]byte, error) {
6167 fjd.InstanceType = InstanceTypeFailoverJobDetails
6168 objectMap := make(map[string]interface{})
6169 if fjd.ProtectedItemDetails != nil {
6170 objectMap["protectedItemDetails"] = fjd.ProtectedItemDetails
6171 }
6172 if fjd.AffectedObjectDetails != nil {
6173 objectMap["affectedObjectDetails"] = fjd.AffectedObjectDetails
6174 }
6175 if fjd.InstanceType != "" {
6176 objectMap["instanceType"] = fjd.InstanceType
6177 }
6178 return json.Marshal(objectMap)
6179 }
6180
6181
6182 func (fjd FailoverJobDetails) AsAsrJobDetails() (*AsrJobDetails, bool) {
6183 return nil, false
6184 }
6185
6186
6187 func (fjd FailoverJobDetails) AsExportJobDetails() (*ExportJobDetails, bool) {
6188 return nil, false
6189 }
6190
6191
6192 func (fjd FailoverJobDetails) AsFailoverJobDetails() (*FailoverJobDetails, bool) {
6193 return &fjd, true
6194 }
6195
6196
6197 func (fjd FailoverJobDetails) AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool) {
6198 return nil, false
6199 }
6200
6201
6202 func (fjd FailoverJobDetails) AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool) {
6203 return nil, false
6204 }
6205
6206
6207 func (fjd FailoverJobDetails) AsJobDetails() (*JobDetails, bool) {
6208 return nil, false
6209 }
6210
6211
6212 func (fjd FailoverJobDetails) AsBasicJobDetails() (BasicJobDetails, bool) {
6213 return &fjd, true
6214 }
6215
6216
6217 type FailoverProcessServerRequest struct {
6218
6219 Properties *FailoverProcessServerRequestProperties `json:"properties,omitempty"`
6220 }
6221
6222
6223 type FailoverProcessServerRequestProperties struct {
6224
6225 ContainerName *string `json:"containerName,omitempty"`
6226
6227 SourceProcessServerID *string `json:"sourceProcessServerId,omitempty"`
6228
6229 TargetProcessServerID *string `json:"targetProcessServerId,omitempty"`
6230
6231 VmsToMigrate *[]string `json:"vmsToMigrate,omitempty"`
6232
6233 UpdateType *string `json:"updateType,omitempty"`
6234 }
6235
6236
6237 type FailoverReplicationProtectedItemDetails struct {
6238
6239 Name *string `json:"name,omitempty"`
6240
6241 FriendlyName *string `json:"friendlyName,omitempty"`
6242
6243 TestVMName *string `json:"testVmName,omitempty"`
6244
6245 TestVMFriendlyName *string `json:"testVmFriendlyName,omitempty"`
6246
6247 NetworkConnectionStatus *string `json:"networkConnectionStatus,omitempty"`
6248
6249 NetworkFriendlyName *string `json:"networkFriendlyName,omitempty"`
6250
6251 Subnet *string `json:"subnet,omitempty"`
6252
6253 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
6254
6255 RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"`
6256 }
6257
6258
6259
6260 type BasicGroupTaskDetails interface {
6261 AsInlineWorkflowTaskDetails() (*InlineWorkflowTaskDetails, bool)
6262 AsRecoveryPlanGroupTaskDetails() (*RecoveryPlanGroupTaskDetails, bool)
6263 AsRecoveryPlanShutdownGroupTaskDetails() (*RecoveryPlanShutdownGroupTaskDetails, bool)
6264 AsGroupTaskDetails() (*GroupTaskDetails, bool)
6265 }
6266
6267
6268
6269 type GroupTaskDetails struct {
6270
6271 ChildTasks *[]ASRTask `json:"childTasks,omitempty"`
6272
6273 InstanceType InstanceTypeBasicGroupTaskDetails `json:"instanceType,omitempty"`
6274 }
6275
6276 func unmarshalBasicGroupTaskDetails(body []byte) (BasicGroupTaskDetails, error) {
6277 var m map[string]interface{}
6278 err := json.Unmarshal(body, &m)
6279 if err != nil {
6280 return nil, err
6281 }
6282
6283 switch m["instanceType"] {
6284 case string(InstanceTypeInlineWorkflowTaskDetails):
6285 var iwtd InlineWorkflowTaskDetails
6286 err := json.Unmarshal(body, &iwtd)
6287 return iwtd, err
6288 case string(InstanceTypeRecoveryPlanGroupTaskDetails):
6289 var rpgtd RecoveryPlanGroupTaskDetails
6290 err := json.Unmarshal(body, &rpgtd)
6291 return rpgtd, err
6292 case string(InstanceTypeRecoveryPlanShutdownGroupTaskDetails):
6293 var rpsgtd RecoveryPlanShutdownGroupTaskDetails
6294 err := json.Unmarshal(body, &rpsgtd)
6295 return rpsgtd, err
6296 default:
6297 var gtd GroupTaskDetails
6298 err := json.Unmarshal(body, >d)
6299 return gtd, err
6300 }
6301 }
6302 func unmarshalBasicGroupTaskDetailsArray(body []byte) ([]BasicGroupTaskDetails, error) {
6303 var rawMessages []*json.RawMessage
6304 err := json.Unmarshal(body, &rawMessages)
6305 if err != nil {
6306 return nil, err
6307 }
6308
6309 gtdArray := make([]BasicGroupTaskDetails, len(rawMessages))
6310
6311 for index, rawMessage := range rawMessages {
6312 gtd, err := unmarshalBasicGroupTaskDetails(*rawMessage)
6313 if err != nil {
6314 return nil, err
6315 }
6316 gtdArray[index] = gtd
6317 }
6318 return gtdArray, nil
6319 }
6320
6321
6322 func (gtd GroupTaskDetails) MarshalJSON() ([]byte, error) {
6323 gtd.InstanceType = InstanceTypeGroupTaskDetails
6324 objectMap := make(map[string]interface{})
6325 if gtd.ChildTasks != nil {
6326 objectMap["childTasks"] = gtd.ChildTasks
6327 }
6328 if gtd.InstanceType != "" {
6329 objectMap["instanceType"] = gtd.InstanceType
6330 }
6331 return json.Marshal(objectMap)
6332 }
6333
6334
6335 func (gtd GroupTaskDetails) AsInlineWorkflowTaskDetails() (*InlineWorkflowTaskDetails, bool) {
6336 return nil, false
6337 }
6338
6339
6340 func (gtd GroupTaskDetails) AsRecoveryPlanGroupTaskDetails() (*RecoveryPlanGroupTaskDetails, bool) {
6341 return nil, false
6342 }
6343
6344
6345 func (gtd GroupTaskDetails) AsRecoveryPlanShutdownGroupTaskDetails() (*RecoveryPlanShutdownGroupTaskDetails, bool) {
6346 return nil, false
6347 }
6348
6349
6350 func (gtd GroupTaskDetails) AsGroupTaskDetails() (*GroupTaskDetails, bool) {
6351 return >d, true
6352 }
6353
6354
6355 func (gtd GroupTaskDetails) AsBasicGroupTaskDetails() (BasicGroupTaskDetails, bool) {
6356 return >d, true
6357 }
6358
6359
6360 type HealthError struct {
6361
6362 InnerHealthErrors *[]InnerHealthError `json:"innerHealthErrors,omitempty"`
6363
6364 ErrorSource *string `json:"errorSource,omitempty"`
6365
6366 ErrorType *string `json:"errorType,omitempty"`
6367
6368 ErrorLevel *string `json:"errorLevel,omitempty"`
6369
6370 ErrorCategory *string `json:"errorCategory,omitempty"`
6371
6372 ErrorCode *string `json:"errorCode,omitempty"`
6373
6374 SummaryMessage *string `json:"summaryMessage,omitempty"`
6375
6376 ErrorMessage *string `json:"errorMessage,omitempty"`
6377
6378 PossibleCauses *string `json:"possibleCauses,omitempty"`
6379
6380 RecommendedAction *string `json:"recommendedAction,omitempty"`
6381
6382 CreationTimeUtc *date.Time `json:"creationTimeUtc,omitempty"`
6383
6384 RecoveryProviderErrorMessage *string `json:"recoveryProviderErrorMessage,omitempty"`
6385
6386 EntityID *string `json:"entityId,omitempty"`
6387
6388 ErrorID *string `json:"errorId,omitempty"`
6389
6390 CustomerResolvability HealthErrorCustomerResolvability `json:"customerResolvability,omitempty"`
6391 }
6392
6393
6394 type HealthErrorSummary struct {
6395
6396 SummaryCode *string `json:"summaryCode,omitempty"`
6397
6398 Category HealthErrorCategory `json:"category,omitempty"`
6399
6400 Severity Severity `json:"severity,omitempty"`
6401
6402 SummaryMessage *string `json:"summaryMessage,omitempty"`
6403
6404 AffectedResourceType *string `json:"affectedResourceType,omitempty"`
6405
6406 AffectedResourceSubtype *string `json:"affectedResourceSubtype,omitempty"`
6407
6408 AffectedResourceCorrelationIds *[]string `json:"affectedResourceCorrelationIds,omitempty"`
6409 }
6410
6411
6412 type HyperVReplica2012EventDetails struct {
6413
6414 ContainerName *string `json:"containerName,omitempty"`
6415
6416 FabricName *string `json:"fabricName,omitempty"`
6417
6418 RemoteContainerName *string `json:"remoteContainerName,omitempty"`
6419
6420 RemoteFabricName *string `json:"remoteFabricName,omitempty"`
6421
6422 InstanceType InstanceTypeBasicEventProviderSpecificDetails `json:"instanceType,omitempty"`
6423 }
6424
6425
6426 func (hvr2ed HyperVReplica2012EventDetails) MarshalJSON() ([]byte, error) {
6427 hvr2ed.InstanceType = InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012
6428 objectMap := make(map[string]interface{})
6429 if hvr2ed.ContainerName != nil {
6430 objectMap["containerName"] = hvr2ed.ContainerName
6431 }
6432 if hvr2ed.FabricName != nil {
6433 objectMap["fabricName"] = hvr2ed.FabricName
6434 }
6435 if hvr2ed.RemoteContainerName != nil {
6436 objectMap["remoteContainerName"] = hvr2ed.RemoteContainerName
6437 }
6438 if hvr2ed.RemoteFabricName != nil {
6439 objectMap["remoteFabricName"] = hvr2ed.RemoteFabricName
6440 }
6441 if hvr2ed.InstanceType != "" {
6442 objectMap["instanceType"] = hvr2ed.InstanceType
6443 }
6444 return json.Marshal(objectMap)
6445 }
6446
6447
6448 func (hvr2ed HyperVReplica2012EventDetails) AsA2AEventDetails() (*A2AEventDetails, bool) {
6449 return nil, false
6450 }
6451
6452
6453 func (hvr2ed HyperVReplica2012EventDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) {
6454 return &hvr2ed, true
6455 }
6456
6457
6458 func (hvr2ed HyperVReplica2012EventDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) {
6459 return nil, false
6460 }
6461
6462
6463 func (hvr2ed HyperVReplica2012EventDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) {
6464 return nil, false
6465 }
6466
6467
6468 func (hvr2ed HyperVReplica2012EventDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) {
6469 return nil, false
6470 }
6471
6472
6473 func (hvr2ed HyperVReplica2012EventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) {
6474 return nil, false
6475 }
6476
6477
6478 func (hvr2ed HyperVReplica2012EventDetails) AsInMageRcmEventDetails() (*InMageRcmEventDetails, bool) {
6479 return nil, false
6480 }
6481
6482
6483 func (hvr2ed HyperVReplica2012EventDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) {
6484 return nil, false
6485 }
6486
6487
6488 func (hvr2ed HyperVReplica2012EventDetails) AsBasicEventProviderSpecificDetails() (BasicEventProviderSpecificDetails, bool) {
6489 return &hvr2ed, true
6490 }
6491
6492
6493 type HyperVReplica2012R2EventDetails struct {
6494
6495 ContainerName *string `json:"containerName,omitempty"`
6496
6497 FabricName *string `json:"fabricName,omitempty"`
6498
6499 RemoteContainerName *string `json:"remoteContainerName,omitempty"`
6500
6501 RemoteFabricName *string `json:"remoteFabricName,omitempty"`
6502
6503 InstanceType InstanceTypeBasicEventProviderSpecificDetails `json:"instanceType,omitempty"`
6504 }
6505
6506
6507 func (hvr2ed HyperVReplica2012R2EventDetails) MarshalJSON() ([]byte, error) {
6508 hvr2ed.InstanceType = InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012R2
6509 objectMap := make(map[string]interface{})
6510 if hvr2ed.ContainerName != nil {
6511 objectMap["containerName"] = hvr2ed.ContainerName
6512 }
6513 if hvr2ed.FabricName != nil {
6514 objectMap["fabricName"] = hvr2ed.FabricName
6515 }
6516 if hvr2ed.RemoteContainerName != nil {
6517 objectMap["remoteContainerName"] = hvr2ed.RemoteContainerName
6518 }
6519 if hvr2ed.RemoteFabricName != nil {
6520 objectMap["remoteFabricName"] = hvr2ed.RemoteFabricName
6521 }
6522 if hvr2ed.InstanceType != "" {
6523 objectMap["instanceType"] = hvr2ed.InstanceType
6524 }
6525 return json.Marshal(objectMap)
6526 }
6527
6528
6529 func (hvr2ed HyperVReplica2012R2EventDetails) AsA2AEventDetails() (*A2AEventDetails, bool) {
6530 return nil, false
6531 }
6532
6533
6534 func (hvr2ed HyperVReplica2012R2EventDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) {
6535 return nil, false
6536 }
6537
6538
6539 func (hvr2ed HyperVReplica2012R2EventDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) {
6540 return &hvr2ed, true
6541 }
6542
6543
6544 func (hvr2ed HyperVReplica2012R2EventDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) {
6545 return nil, false
6546 }
6547
6548
6549 func (hvr2ed HyperVReplica2012R2EventDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) {
6550 return nil, false
6551 }
6552
6553
6554 func (hvr2ed HyperVReplica2012R2EventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) {
6555 return nil, false
6556 }
6557
6558
6559 func (hvr2ed HyperVReplica2012R2EventDetails) AsInMageRcmEventDetails() (*InMageRcmEventDetails, bool) {
6560 return nil, false
6561 }
6562
6563
6564 func (hvr2ed HyperVReplica2012R2EventDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) {
6565 return nil, false
6566 }
6567
6568
6569 func (hvr2ed HyperVReplica2012R2EventDetails) AsBasicEventProviderSpecificDetails() (BasicEventProviderSpecificDetails, bool) {
6570 return &hvr2ed, true
6571 }
6572
6573
6574
6575 type HyperVReplicaAzureApplyRecoveryPointInput struct {
6576
6577 VaultLocation *string `json:"vaultLocation,omitempty"`
6578
6579 PrimaryKekCertificatePfx *string `json:"primaryKekCertificatePfx,omitempty"`
6580
6581 SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"`
6582
6583 InstanceType InstanceTypeBasicApplyRecoveryPointProviderSpecificInput `json:"instanceType,omitempty"`
6584 }
6585
6586
6587 func (hvraarpi HyperVReplicaAzureApplyRecoveryPointInput) MarshalJSON() ([]byte, error) {
6588 hvraarpi.InstanceType = InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeHyperVReplicaAzure
6589 objectMap := make(map[string]interface{})
6590 if hvraarpi.VaultLocation != nil {
6591 objectMap["vaultLocation"] = hvraarpi.VaultLocation
6592 }
6593 if hvraarpi.PrimaryKekCertificatePfx != nil {
6594 objectMap["primaryKekCertificatePfx"] = hvraarpi.PrimaryKekCertificatePfx
6595 }
6596 if hvraarpi.SecondaryKekCertificatePfx != nil {
6597 objectMap["secondaryKekCertificatePfx"] = hvraarpi.SecondaryKekCertificatePfx
6598 }
6599 if hvraarpi.InstanceType != "" {
6600 objectMap["instanceType"] = hvraarpi.InstanceType
6601 }
6602 return json.Marshal(objectMap)
6603 }
6604
6605
6606 func (hvraarpi HyperVReplicaAzureApplyRecoveryPointInput) AsA2AApplyRecoveryPointInput() (*A2AApplyRecoveryPointInput, bool) {
6607 return nil, false
6608 }
6609
6610
6611 func (hvraarpi HyperVReplicaAzureApplyRecoveryPointInput) AsHyperVReplicaAzureApplyRecoveryPointInput() (*HyperVReplicaAzureApplyRecoveryPointInput, bool) {
6612 return &hvraarpi, true
6613 }
6614
6615
6616 func (hvraarpi HyperVReplicaAzureApplyRecoveryPointInput) AsInMageAzureV2ApplyRecoveryPointInput() (*InMageAzureV2ApplyRecoveryPointInput, bool) {
6617 return nil, false
6618 }
6619
6620
6621 func (hvraarpi HyperVReplicaAzureApplyRecoveryPointInput) AsInMageRcmApplyRecoveryPointInput() (*InMageRcmApplyRecoveryPointInput, bool) {
6622 return nil, false
6623 }
6624
6625
6626 func (hvraarpi HyperVReplicaAzureApplyRecoveryPointInput) AsApplyRecoveryPointProviderSpecificInput() (*ApplyRecoveryPointProviderSpecificInput, bool) {
6627 return nil, false
6628 }
6629
6630
6631 func (hvraarpi HyperVReplicaAzureApplyRecoveryPointInput) AsBasicApplyRecoveryPointProviderSpecificInput() (BasicApplyRecoveryPointProviderSpecificInput, bool) {
6632 return &hvraarpi, true
6633 }
6634
6635
6636 type HyperVReplicaAzureEnableProtectionInput struct {
6637
6638 HvHostVMID *string `json:"hvHostVmId,omitempty"`
6639
6640 VMName *string `json:"vmName,omitempty"`
6641
6642 OsType *string `json:"osType,omitempty"`
6643
6644 VhdID *string `json:"vhdId,omitempty"`
6645
6646 TargetStorageAccountID *string `json:"targetStorageAccountId,omitempty"`
6647
6648 TargetAzureNetworkID *string `json:"targetAzureNetworkId,omitempty"`
6649
6650 TargetAzureSubnetID *string `json:"targetAzureSubnetId,omitempty"`
6651
6652 EnableRdpOnTargetOption *string `json:"enableRdpOnTargetOption,omitempty"`
6653
6654 TargetAzureVMName *string `json:"targetAzureVmName,omitempty"`
6655
6656 LogStorageAccountID *string `json:"logStorageAccountId,omitempty"`
6657
6658 DisksToInclude *[]string `json:"disksToInclude,omitempty"`
6659
6660 TargetAzureV1ResourceGroupID *string `json:"targetAzureV1ResourceGroupId,omitempty"`
6661
6662 TargetAzureV2ResourceGroupID *string `json:"targetAzureV2ResourceGroupId,omitempty"`
6663
6664 UseManagedDisks *string `json:"useManagedDisks,omitempty"`
6665
6666 TargetAvailabilityZone *string `json:"targetAvailabilityZone,omitempty"`
6667
6668 TargetProximityPlacementGroupID *string `json:"targetProximityPlacementGroupId,omitempty"`
6669
6670 InstanceType InstanceTypeBasicEnableProtectionProviderSpecificInput `json:"instanceType,omitempty"`
6671 }
6672
6673
6674 func (hvraepi HyperVReplicaAzureEnableProtectionInput) MarshalJSON() ([]byte, error) {
6675 hvraepi.InstanceType = InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeHyperVReplicaAzure
6676 objectMap := make(map[string]interface{})
6677 if hvraepi.HvHostVMID != nil {
6678 objectMap["hvHostVmId"] = hvraepi.HvHostVMID
6679 }
6680 if hvraepi.VMName != nil {
6681 objectMap["vmName"] = hvraepi.VMName
6682 }
6683 if hvraepi.OsType != nil {
6684 objectMap["osType"] = hvraepi.OsType
6685 }
6686 if hvraepi.VhdID != nil {
6687 objectMap["vhdId"] = hvraepi.VhdID
6688 }
6689 if hvraepi.TargetStorageAccountID != nil {
6690 objectMap["targetStorageAccountId"] = hvraepi.TargetStorageAccountID
6691 }
6692 if hvraepi.TargetAzureNetworkID != nil {
6693 objectMap["targetAzureNetworkId"] = hvraepi.TargetAzureNetworkID
6694 }
6695 if hvraepi.TargetAzureSubnetID != nil {
6696 objectMap["targetAzureSubnetId"] = hvraepi.TargetAzureSubnetID
6697 }
6698 if hvraepi.EnableRdpOnTargetOption != nil {
6699 objectMap["enableRdpOnTargetOption"] = hvraepi.EnableRdpOnTargetOption
6700 }
6701 if hvraepi.TargetAzureVMName != nil {
6702 objectMap["targetAzureVmName"] = hvraepi.TargetAzureVMName
6703 }
6704 if hvraepi.LogStorageAccountID != nil {
6705 objectMap["logStorageAccountId"] = hvraepi.LogStorageAccountID
6706 }
6707 if hvraepi.DisksToInclude != nil {
6708 objectMap["disksToInclude"] = hvraepi.DisksToInclude
6709 }
6710 if hvraepi.TargetAzureV1ResourceGroupID != nil {
6711 objectMap["targetAzureV1ResourceGroupId"] = hvraepi.TargetAzureV1ResourceGroupID
6712 }
6713 if hvraepi.TargetAzureV2ResourceGroupID != nil {
6714 objectMap["targetAzureV2ResourceGroupId"] = hvraepi.TargetAzureV2ResourceGroupID
6715 }
6716 if hvraepi.UseManagedDisks != nil {
6717 objectMap["useManagedDisks"] = hvraepi.UseManagedDisks
6718 }
6719 if hvraepi.TargetAvailabilityZone != nil {
6720 objectMap["targetAvailabilityZone"] = hvraepi.TargetAvailabilityZone
6721 }
6722 if hvraepi.TargetProximityPlacementGroupID != nil {
6723 objectMap["targetProximityPlacementGroupId"] = hvraepi.TargetProximityPlacementGroupID
6724 }
6725 if hvraepi.InstanceType != "" {
6726 objectMap["instanceType"] = hvraepi.InstanceType
6727 }
6728 return json.Marshal(objectMap)
6729 }
6730
6731
6732 func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool) {
6733 return nil, false
6734 }
6735
6736
6737 func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool) {
6738 return &hvraepi, true
6739 }
6740
6741
6742 func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool) {
6743 return nil, false
6744 }
6745
6746
6747 func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool) {
6748 return nil, false
6749 }
6750
6751
6752 func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsInMageRcmEnableProtectionInput() (*InMageRcmEnableProtectionInput, bool) {
6753 return nil, false
6754 }
6755
6756
6757 func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool) {
6758 return nil, false
6759 }
6760
6761
6762 func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsEnableProtectionProviderSpecificInput() (*EnableProtectionProviderSpecificInput, bool) {
6763 return nil, false
6764 }
6765
6766
6767 func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsBasicEnableProtectionProviderSpecificInput() (BasicEnableProtectionProviderSpecificInput, bool) {
6768 return &hvraepi, true
6769 }
6770
6771
6772 type HyperVReplicaAzureEventDetails struct {
6773
6774 ContainerName *string `json:"containerName,omitempty"`
6775
6776 FabricName *string `json:"fabricName,omitempty"`
6777
6778 RemoteContainerName *string `json:"remoteContainerName,omitempty"`
6779
6780 InstanceType InstanceTypeBasicEventProviderSpecificDetails `json:"instanceType,omitempty"`
6781 }
6782
6783
6784 func (hvraed HyperVReplicaAzureEventDetails) MarshalJSON() ([]byte, error) {
6785 hvraed.InstanceType = InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaAzure
6786 objectMap := make(map[string]interface{})
6787 if hvraed.ContainerName != nil {
6788 objectMap["containerName"] = hvraed.ContainerName
6789 }
6790 if hvraed.FabricName != nil {
6791 objectMap["fabricName"] = hvraed.FabricName
6792 }
6793 if hvraed.RemoteContainerName != nil {
6794 objectMap["remoteContainerName"] = hvraed.RemoteContainerName
6795 }
6796 if hvraed.InstanceType != "" {
6797 objectMap["instanceType"] = hvraed.InstanceType
6798 }
6799 return json.Marshal(objectMap)
6800 }
6801
6802
6803 func (hvraed HyperVReplicaAzureEventDetails) AsA2AEventDetails() (*A2AEventDetails, bool) {
6804 return nil, false
6805 }
6806
6807
6808 func (hvraed HyperVReplicaAzureEventDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) {
6809 return nil, false
6810 }
6811
6812
6813 func (hvraed HyperVReplicaAzureEventDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) {
6814 return nil, false
6815 }
6816
6817
6818 func (hvraed HyperVReplicaAzureEventDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) {
6819 return &hvraed, true
6820 }
6821
6822
6823 func (hvraed HyperVReplicaAzureEventDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) {
6824 return nil, false
6825 }
6826
6827
6828 func (hvraed HyperVReplicaAzureEventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) {
6829 return nil, false
6830 }
6831
6832
6833 func (hvraed HyperVReplicaAzureEventDetails) AsInMageRcmEventDetails() (*InMageRcmEventDetails, bool) {
6834 return nil, false
6835 }
6836
6837
6838 func (hvraed HyperVReplicaAzureEventDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) {
6839 return nil, false
6840 }
6841
6842
6843 func (hvraed HyperVReplicaAzureEventDetails) AsBasicEventProviderSpecificDetails() (BasicEventProviderSpecificDetails, bool) {
6844 return &hvraed, true
6845 }
6846
6847
6848 type HyperVReplicaAzureFailbackProviderInput struct {
6849
6850 DataSyncOption *string `json:"dataSyncOption,omitempty"`
6851
6852 RecoveryVMCreationOption *string `json:"recoveryVmCreationOption,omitempty"`
6853
6854 ProviderIDForAlternateRecovery *string `json:"providerIdForAlternateRecovery,omitempty"`
6855
6856 InstanceType InstanceTypeBasicProviderSpecificFailoverInput `json:"instanceType,omitempty"`
6857 }
6858
6859
6860 func (hvrafpi HyperVReplicaAzureFailbackProviderInput) MarshalJSON() ([]byte, error) {
6861 hvrafpi.InstanceType = InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback
6862 objectMap := make(map[string]interface{})
6863 if hvrafpi.DataSyncOption != nil {
6864 objectMap["dataSyncOption"] = hvrafpi.DataSyncOption
6865 }
6866 if hvrafpi.RecoveryVMCreationOption != nil {
6867 objectMap["recoveryVmCreationOption"] = hvrafpi.RecoveryVMCreationOption
6868 }
6869 if hvrafpi.ProviderIDForAlternateRecovery != nil {
6870 objectMap["providerIdForAlternateRecovery"] = hvrafpi.ProviderIDForAlternateRecovery
6871 }
6872 if hvrafpi.InstanceType != "" {
6873 objectMap["instanceType"] = hvrafpi.InstanceType
6874 }
6875 return json.Marshal(objectMap)
6876 }
6877
6878
6879 func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool) {
6880 return nil, false
6881 }
6882
6883
6884 func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool) {
6885 return &hvrafpi, true
6886 }
6887
6888
6889 func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool) {
6890 return nil, false
6891 }
6892
6893
6894 func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool) {
6895 return nil, false
6896 }
6897
6898
6899 func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool) {
6900 return nil, false
6901 }
6902
6903
6904 func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsProviderSpecificFailoverInput() (*ProviderSpecificFailoverInput, bool) {
6905 return nil, false
6906 }
6907
6908
6909 func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsBasicProviderSpecificFailoverInput() (BasicProviderSpecificFailoverInput, bool) {
6910 return &hvrafpi, true
6911 }
6912
6913
6914 type HyperVReplicaAzureFailoverProviderInput struct {
6915
6916 VaultLocation *string `json:"vaultLocation,omitempty"`
6917
6918 PrimaryKekCertificatePfx *string `json:"primaryKekCertificatePfx,omitempty"`
6919
6920 SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"`
6921
6922 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
6923
6924 InstanceType InstanceTypeBasicProviderSpecificFailoverInput `json:"instanceType,omitempty"`
6925 }
6926
6927
6928 func (hvrafpi HyperVReplicaAzureFailoverProviderInput) MarshalJSON() ([]byte, error) {
6929 hvrafpi.InstanceType = InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure
6930 objectMap := make(map[string]interface{})
6931 if hvrafpi.VaultLocation != nil {
6932 objectMap["vaultLocation"] = hvrafpi.VaultLocation
6933 }
6934 if hvrafpi.PrimaryKekCertificatePfx != nil {
6935 objectMap["primaryKekCertificatePfx"] = hvrafpi.PrimaryKekCertificatePfx
6936 }
6937 if hvrafpi.SecondaryKekCertificatePfx != nil {
6938 objectMap["secondaryKekCertificatePfx"] = hvrafpi.SecondaryKekCertificatePfx
6939 }
6940 if hvrafpi.RecoveryPointID != nil {
6941 objectMap["recoveryPointId"] = hvrafpi.RecoveryPointID
6942 }
6943 if hvrafpi.InstanceType != "" {
6944 objectMap["instanceType"] = hvrafpi.InstanceType
6945 }
6946 return json.Marshal(objectMap)
6947 }
6948
6949
6950 func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool) {
6951 return nil, false
6952 }
6953
6954
6955 func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool) {
6956 return nil, false
6957 }
6958
6959
6960 func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool) {
6961 return &hvrafpi, true
6962 }
6963
6964
6965 func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool) {
6966 return nil, false
6967 }
6968
6969
6970 func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool) {
6971 return nil, false
6972 }
6973
6974
6975 func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsProviderSpecificFailoverInput() (*ProviderSpecificFailoverInput, bool) {
6976 return nil, false
6977 }
6978
6979
6980 func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsBasicProviderSpecificFailoverInput() (BasicProviderSpecificFailoverInput, bool) {
6981 return &hvrafpi, true
6982 }
6983
6984
6985 type HyperVReplicaAzurePolicyDetails struct {
6986
6987 RecoveryPointHistoryDurationInHours *int32 `json:"recoveryPointHistoryDurationInHours,omitempty"`
6988
6989 ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"`
6990
6991 ReplicationInterval *int32 `json:"replicationInterval,omitempty"`
6992
6993 OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"`
6994
6995 Encryption *string `json:"encryption,omitempty"`
6996
6997 ActiveStorageAccountID *string `json:"activeStorageAccountId,omitempty"`
6998
6999 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"`
7000 }
7001
7002
7003 func (hvrapd HyperVReplicaAzurePolicyDetails) MarshalJSON() ([]byte, error) {
7004 hvrapd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure
7005 objectMap := make(map[string]interface{})
7006 if hvrapd.RecoveryPointHistoryDurationInHours != nil {
7007 objectMap["recoveryPointHistoryDurationInHours"] = hvrapd.RecoveryPointHistoryDurationInHours
7008 }
7009 if hvrapd.ApplicationConsistentSnapshotFrequencyInHours != nil {
7010 objectMap["applicationConsistentSnapshotFrequencyInHours"] = hvrapd.ApplicationConsistentSnapshotFrequencyInHours
7011 }
7012 if hvrapd.ReplicationInterval != nil {
7013 objectMap["replicationInterval"] = hvrapd.ReplicationInterval
7014 }
7015 if hvrapd.OnlineReplicationStartTime != nil {
7016 objectMap["onlineReplicationStartTime"] = hvrapd.OnlineReplicationStartTime
7017 }
7018 if hvrapd.Encryption != nil {
7019 objectMap["encryption"] = hvrapd.Encryption
7020 }
7021 if hvrapd.ActiveStorageAccountID != nil {
7022 objectMap["activeStorageAccountId"] = hvrapd.ActiveStorageAccountID
7023 }
7024 if hvrapd.InstanceType != "" {
7025 objectMap["instanceType"] = hvrapd.InstanceType
7026 }
7027 return json.Marshal(objectMap)
7028 }
7029
7030
7031 func (hvrapd HyperVReplicaAzurePolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) {
7032 return nil, false
7033 }
7034
7035
7036 func (hvrapd HyperVReplicaAzurePolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) {
7037 return &hvrapd, true
7038 }
7039
7040
7041 func (hvrapd HyperVReplicaAzurePolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) {
7042 return nil, false
7043 }
7044
7045
7046 func (hvrapd HyperVReplicaAzurePolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) {
7047 return nil, false
7048 }
7049
7050
7051 func (hvrapd HyperVReplicaAzurePolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) {
7052 return nil, false
7053 }
7054
7055
7056 func (hvrapd HyperVReplicaAzurePolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) {
7057 return nil, false
7058 }
7059
7060
7061 func (hvrapd HyperVReplicaAzurePolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) {
7062 return nil, false
7063 }
7064
7065
7066 func (hvrapd HyperVReplicaAzurePolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) {
7067 return nil, false
7068 }
7069
7070
7071 func (hvrapd HyperVReplicaAzurePolicyDetails) AsInMageRcmPolicyDetails() (*InMageRcmPolicyDetails, bool) {
7072 return nil, false
7073 }
7074
7075
7076 func (hvrapd HyperVReplicaAzurePolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) {
7077 return nil, false
7078 }
7079
7080
7081 func (hvrapd HyperVReplicaAzurePolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) {
7082 return nil, false
7083 }
7084
7085
7086 func (hvrapd HyperVReplicaAzurePolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) {
7087 return nil, false
7088 }
7089
7090
7091 func (hvrapd HyperVReplicaAzurePolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) {
7092 return &hvrapd, true
7093 }
7094
7095
7096 type HyperVReplicaAzurePolicyInput struct {
7097
7098 RecoveryPointHistoryDuration *int32 `json:"recoveryPointHistoryDuration,omitempty"`
7099
7100 ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"`
7101
7102 ReplicationInterval *int32 `json:"replicationInterval,omitempty"`
7103
7104 OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"`
7105
7106 StorageAccounts *[]string `json:"storageAccounts,omitempty"`
7107
7108 InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"`
7109 }
7110
7111
7112 func (hvrapi HyperVReplicaAzurePolicyInput) MarshalJSON() ([]byte, error) {
7113 hvrapi.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplicaAzure
7114 objectMap := make(map[string]interface{})
7115 if hvrapi.RecoveryPointHistoryDuration != nil {
7116 objectMap["recoveryPointHistoryDuration"] = hvrapi.RecoveryPointHistoryDuration
7117 }
7118 if hvrapi.ApplicationConsistentSnapshotFrequencyInHours != nil {
7119 objectMap["applicationConsistentSnapshotFrequencyInHours"] = hvrapi.ApplicationConsistentSnapshotFrequencyInHours
7120 }
7121 if hvrapi.ReplicationInterval != nil {
7122 objectMap["replicationInterval"] = hvrapi.ReplicationInterval
7123 }
7124 if hvrapi.OnlineReplicationStartTime != nil {
7125 objectMap["onlineReplicationStartTime"] = hvrapi.OnlineReplicationStartTime
7126 }
7127 if hvrapi.StorageAccounts != nil {
7128 objectMap["storageAccounts"] = hvrapi.StorageAccounts
7129 }
7130 if hvrapi.InstanceType != "" {
7131 objectMap["instanceType"] = hvrapi.InstanceType
7132 }
7133 return json.Marshal(objectMap)
7134 }
7135
7136
7137 func (hvrapi HyperVReplicaAzurePolicyInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) {
7138 return nil, false
7139 }
7140
7141
7142 func (hvrapi HyperVReplicaAzurePolicyInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) {
7143 return &hvrapi, true
7144 }
7145
7146
7147 func (hvrapi HyperVReplicaAzurePolicyInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) {
7148 return nil, false
7149 }
7150
7151
7152 func (hvrapi HyperVReplicaAzurePolicyInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) {
7153 return nil, false
7154 }
7155
7156
7157 func (hvrapi HyperVReplicaAzurePolicyInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) {
7158 return nil, false
7159 }
7160
7161
7162 func (hvrapi HyperVReplicaAzurePolicyInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) {
7163 return nil, false
7164 }
7165
7166
7167 func (hvrapi HyperVReplicaAzurePolicyInput) AsInMageRcmPolicyCreationInput() (*InMageRcmPolicyCreationInput, bool) {
7168 return nil, false
7169 }
7170
7171
7172 func (hvrapi HyperVReplicaAzurePolicyInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) {
7173 return nil, false
7174 }
7175
7176
7177 func (hvrapi HyperVReplicaAzurePolicyInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) {
7178 return nil, false
7179 }
7180
7181
7182 func (hvrapi HyperVReplicaAzurePolicyInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) {
7183 return &hvrapi, true
7184 }
7185
7186
7187 type HyperVReplicaAzureReplicationDetails struct {
7188
7189 AzureVMDiskDetails *[]AzureVMDiskDetails `json:"azureVmDiskDetails,omitempty"`
7190
7191 RecoveryAzureVMName *string `json:"recoveryAzureVmName,omitempty"`
7192
7193 RecoveryAzureVMSize *string `json:"recoveryAzureVMSize,omitempty"`
7194
7195 RecoveryAzureStorageAccount *string `json:"recoveryAzureStorageAccount,omitempty"`
7196
7197 RecoveryAzureLogStorageAccountID *string `json:"recoveryAzureLogStorageAccountId,omitempty"`
7198
7199 LastReplicatedTime *date.Time `json:"lastReplicatedTime,omitempty"`
7200
7201 RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"`
7202
7203 LastRpoCalculatedTime *date.Time `json:"lastRpoCalculatedTime,omitempty"`
7204
7205 VMID *string `json:"vmId,omitempty"`
7206
7207 VMProtectionState *string `json:"vmProtectionState,omitempty"`
7208
7209 VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"`
7210
7211 InitialReplicationDetails *InitialReplicationDetails `json:"initialReplicationDetails,omitempty"`
7212
7213 VMNics *[]VMNicDetails `json:"vmNics,omitempty"`
7214
7215 SelectedRecoveryAzureNetworkID *string `json:"selectedRecoveryAzureNetworkId,omitempty"`
7216
7217 SelectedSourceNicID *string `json:"selectedSourceNicId,omitempty"`
7218
7219 Encryption *string `json:"encryption,omitempty"`
7220
7221 OSDetails *OSDetails `json:"oSDetails,omitempty"`
7222
7223 SourceVMRAMSizeInMB *int32 `json:"sourceVmRamSizeInMB,omitempty"`
7224
7225 SourceVMCPUCount *int32 `json:"sourceVmCpuCount,omitempty"`
7226
7227 EnableRdpOnTargetOption *string `json:"enableRdpOnTargetOption,omitempty"`
7228
7229 RecoveryAzureResourceGroupID *string `json:"recoveryAzureResourceGroupId,omitempty"`
7230
7231 RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"`
7232
7233 TargetAvailabilityZone *string `json:"targetAvailabilityZone,omitempty"`
7234
7235 TargetProximityPlacementGroupID *string `json:"targetProximityPlacementGroupId,omitempty"`
7236
7237 UseManagedDisks *string `json:"useManagedDisks,omitempty"`
7238
7239 LicenseType *string `json:"licenseType,omitempty"`
7240
7241 InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"`
7242 }
7243
7244
7245 func (hvrard HyperVReplicaAzureReplicationDetails) MarshalJSON() ([]byte, error) {
7246 hvrard.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaAzure
7247 objectMap := make(map[string]interface{})
7248 if hvrard.AzureVMDiskDetails != nil {
7249 objectMap["azureVmDiskDetails"] = hvrard.AzureVMDiskDetails
7250 }
7251 if hvrard.RecoveryAzureVMName != nil {
7252 objectMap["recoveryAzureVmName"] = hvrard.RecoveryAzureVMName
7253 }
7254 if hvrard.RecoveryAzureVMSize != nil {
7255 objectMap["recoveryAzureVMSize"] = hvrard.RecoveryAzureVMSize
7256 }
7257 if hvrard.RecoveryAzureStorageAccount != nil {
7258 objectMap["recoveryAzureStorageAccount"] = hvrard.RecoveryAzureStorageAccount
7259 }
7260 if hvrard.RecoveryAzureLogStorageAccountID != nil {
7261 objectMap["recoveryAzureLogStorageAccountId"] = hvrard.RecoveryAzureLogStorageAccountID
7262 }
7263 if hvrard.LastReplicatedTime != nil {
7264 objectMap["lastReplicatedTime"] = hvrard.LastReplicatedTime
7265 }
7266 if hvrard.RpoInSeconds != nil {
7267 objectMap["rpoInSeconds"] = hvrard.RpoInSeconds
7268 }
7269 if hvrard.LastRpoCalculatedTime != nil {
7270 objectMap["lastRpoCalculatedTime"] = hvrard.LastRpoCalculatedTime
7271 }
7272 if hvrard.VMID != nil {
7273 objectMap["vmId"] = hvrard.VMID
7274 }
7275 if hvrard.VMProtectionState != nil {
7276 objectMap["vmProtectionState"] = hvrard.VMProtectionState
7277 }
7278 if hvrard.VMProtectionStateDescription != nil {
7279 objectMap["vmProtectionStateDescription"] = hvrard.VMProtectionStateDescription
7280 }
7281 if hvrard.InitialReplicationDetails != nil {
7282 objectMap["initialReplicationDetails"] = hvrard.InitialReplicationDetails
7283 }
7284 if hvrard.VMNics != nil {
7285 objectMap["vmNics"] = hvrard.VMNics
7286 }
7287 if hvrard.SelectedRecoveryAzureNetworkID != nil {
7288 objectMap["selectedRecoveryAzureNetworkId"] = hvrard.SelectedRecoveryAzureNetworkID
7289 }
7290 if hvrard.SelectedSourceNicID != nil {
7291 objectMap["selectedSourceNicId"] = hvrard.SelectedSourceNicID
7292 }
7293 if hvrard.Encryption != nil {
7294 objectMap["encryption"] = hvrard.Encryption
7295 }
7296 if hvrard.OSDetails != nil {
7297 objectMap["oSDetails"] = hvrard.OSDetails
7298 }
7299 if hvrard.SourceVMRAMSizeInMB != nil {
7300 objectMap["sourceVmRamSizeInMB"] = hvrard.SourceVMRAMSizeInMB
7301 }
7302 if hvrard.SourceVMCPUCount != nil {
7303 objectMap["sourceVmCpuCount"] = hvrard.SourceVMCPUCount
7304 }
7305 if hvrard.EnableRdpOnTargetOption != nil {
7306 objectMap["enableRdpOnTargetOption"] = hvrard.EnableRdpOnTargetOption
7307 }
7308 if hvrard.RecoveryAzureResourceGroupID != nil {
7309 objectMap["recoveryAzureResourceGroupId"] = hvrard.RecoveryAzureResourceGroupID
7310 }
7311 if hvrard.RecoveryAvailabilitySetID != nil {
7312 objectMap["recoveryAvailabilitySetId"] = hvrard.RecoveryAvailabilitySetID
7313 }
7314 if hvrard.TargetAvailabilityZone != nil {
7315 objectMap["targetAvailabilityZone"] = hvrard.TargetAvailabilityZone
7316 }
7317 if hvrard.TargetProximityPlacementGroupID != nil {
7318 objectMap["targetProximityPlacementGroupId"] = hvrard.TargetProximityPlacementGroupID
7319 }
7320 if hvrard.UseManagedDisks != nil {
7321 objectMap["useManagedDisks"] = hvrard.UseManagedDisks
7322 }
7323 if hvrard.LicenseType != nil {
7324 objectMap["licenseType"] = hvrard.LicenseType
7325 }
7326 if hvrard.InstanceType != "" {
7327 objectMap["instanceType"] = hvrard.InstanceType
7328 }
7329 return json.Marshal(objectMap)
7330 }
7331
7332
7333 func (hvrard HyperVReplicaAzureReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) {
7334 return nil, false
7335 }
7336
7337
7338 func (hvrard HyperVReplicaAzureReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) {
7339 return &hvrard, true
7340 }
7341
7342
7343 func (hvrard HyperVReplicaAzureReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) {
7344 return nil, false
7345 }
7346
7347
7348 func (hvrard HyperVReplicaAzureReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) {
7349 return nil, false
7350 }
7351
7352
7353 func (hvrard HyperVReplicaAzureReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) {
7354 return nil, false
7355 }
7356
7357
7358 func (hvrard HyperVReplicaAzureReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) {
7359 return nil, false
7360 }
7361
7362
7363 func (hvrard HyperVReplicaAzureReplicationDetails) AsInMageRcmReplicationDetails() (*InMageRcmReplicationDetails, bool) {
7364 return nil, false
7365 }
7366
7367
7368 func (hvrard HyperVReplicaAzureReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) {
7369 return nil, false
7370 }
7371
7372
7373 func (hvrard HyperVReplicaAzureReplicationDetails) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) {
7374 return nil, false
7375 }
7376
7377
7378 func (hvrard HyperVReplicaAzureReplicationDetails) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) {
7379 return &hvrard, true
7380 }
7381
7382
7383 type HyperVReplicaAzureReprotectInput struct {
7384
7385 HvHostVMID *string `json:"hvHostVmId,omitempty"`
7386
7387 VMName *string `json:"vmName,omitempty"`
7388
7389 OsType *string `json:"osType,omitempty"`
7390
7391 VHDID *string `json:"vHDId,omitempty"`
7392
7393 StorageAccountID *string `json:"storageAccountId,omitempty"`
7394
7395 LogStorageAccountID *string `json:"logStorageAccountId,omitempty"`
7396
7397 InstanceType InstanceTypeBasicReverseReplicationProviderSpecificInput `json:"instanceType,omitempty"`
7398 }
7399
7400
7401 func (hvrari HyperVReplicaAzureReprotectInput) MarshalJSON() ([]byte, error) {
7402 hvrari.InstanceType = InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeHyperVReplicaAzure
7403 objectMap := make(map[string]interface{})
7404 if hvrari.HvHostVMID != nil {
7405 objectMap["hvHostVmId"] = hvrari.HvHostVMID
7406 }
7407 if hvrari.VMName != nil {
7408 objectMap["vmName"] = hvrari.VMName
7409 }
7410 if hvrari.OsType != nil {
7411 objectMap["osType"] = hvrari.OsType
7412 }
7413 if hvrari.VHDID != nil {
7414 objectMap["vHDId"] = hvrari.VHDID
7415 }
7416 if hvrari.StorageAccountID != nil {
7417 objectMap["storageAccountId"] = hvrari.StorageAccountID
7418 }
7419 if hvrari.LogStorageAccountID != nil {
7420 objectMap["logStorageAccountId"] = hvrari.LogStorageAccountID
7421 }
7422 if hvrari.InstanceType != "" {
7423 objectMap["instanceType"] = hvrari.InstanceType
7424 }
7425 return json.Marshal(objectMap)
7426 }
7427
7428
7429 func (hvrari HyperVReplicaAzureReprotectInput) AsA2AReprotectInput() (*A2AReprotectInput, bool) {
7430 return nil, false
7431 }
7432
7433
7434 func (hvrari HyperVReplicaAzureReprotectInput) AsHyperVReplicaAzureReprotectInput() (*HyperVReplicaAzureReprotectInput, bool) {
7435 return &hvrari, true
7436 }
7437
7438
7439 func (hvrari HyperVReplicaAzureReprotectInput) AsInMageAzureV2ReprotectInput() (*InMageAzureV2ReprotectInput, bool) {
7440 return nil, false
7441 }
7442
7443
7444 func (hvrari HyperVReplicaAzureReprotectInput) AsInMageReprotectInput() (*InMageReprotectInput, bool) {
7445 return nil, false
7446 }
7447
7448
7449 func (hvrari HyperVReplicaAzureReprotectInput) AsReverseReplicationProviderSpecificInput() (*ReverseReplicationProviderSpecificInput, bool) {
7450 return nil, false
7451 }
7452
7453
7454 func (hvrari HyperVReplicaAzureReprotectInput) AsBasicReverseReplicationProviderSpecificInput() (BasicReverseReplicationProviderSpecificInput, bool) {
7455 return &hvrari, true
7456 }
7457
7458
7459 type HyperVReplicaAzureTestFailoverInput struct {
7460
7461 VaultLocation *string `json:"vaultLocation,omitempty"`
7462
7463 PrimaryKekCertificatePfx *string `json:"primaryKekCertificatePfx,omitempty"`
7464
7465 SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"`
7466
7467 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
7468
7469 InstanceType InstanceTypeBasicTestFailoverProviderSpecificInput `json:"instanceType,omitempty"`
7470 }
7471
7472
7473 func (hvratfi HyperVReplicaAzureTestFailoverInput) MarshalJSON() ([]byte, error) {
7474 hvratfi.InstanceType = InstanceTypeBasicTestFailoverProviderSpecificInputInstanceTypeHyperVReplicaAzure
7475 objectMap := make(map[string]interface{})
7476 if hvratfi.VaultLocation != nil {
7477 objectMap["vaultLocation"] = hvratfi.VaultLocation
7478 }
7479 if hvratfi.PrimaryKekCertificatePfx != nil {
7480 objectMap["primaryKekCertificatePfx"] = hvratfi.PrimaryKekCertificatePfx
7481 }
7482 if hvratfi.SecondaryKekCertificatePfx != nil {
7483 objectMap["secondaryKekCertificatePfx"] = hvratfi.SecondaryKekCertificatePfx
7484 }
7485 if hvratfi.RecoveryPointID != nil {
7486 objectMap["recoveryPointId"] = hvratfi.RecoveryPointID
7487 }
7488 if hvratfi.InstanceType != "" {
7489 objectMap["instanceType"] = hvratfi.InstanceType
7490 }
7491 return json.Marshal(objectMap)
7492 }
7493
7494
7495 func (hvratfi HyperVReplicaAzureTestFailoverInput) AsA2ATestFailoverInput() (*A2ATestFailoverInput, bool) {
7496 return nil, false
7497 }
7498
7499
7500 func (hvratfi HyperVReplicaAzureTestFailoverInput) AsHyperVReplicaAzureTestFailoverInput() (*HyperVReplicaAzureTestFailoverInput, bool) {
7501 return &hvratfi, true
7502 }
7503
7504
7505 func (hvratfi HyperVReplicaAzureTestFailoverInput) AsInMageAzureV2TestFailoverInput() (*InMageAzureV2TestFailoverInput, bool) {
7506 return nil, false
7507 }
7508
7509
7510 func (hvratfi HyperVReplicaAzureTestFailoverInput) AsInMageRcmTestFailoverInput() (*InMageRcmTestFailoverInput, bool) {
7511 return nil, false
7512 }
7513
7514
7515 func (hvratfi HyperVReplicaAzureTestFailoverInput) AsInMageTestFailoverInput() (*InMageTestFailoverInput, bool) {
7516 return nil, false
7517 }
7518
7519
7520 func (hvratfi HyperVReplicaAzureTestFailoverInput) AsTestFailoverProviderSpecificInput() (*TestFailoverProviderSpecificInput, bool) {
7521 return nil, false
7522 }
7523
7524
7525 func (hvratfi HyperVReplicaAzureTestFailoverInput) AsBasicTestFailoverProviderSpecificInput() (BasicTestFailoverProviderSpecificInput, bool) {
7526 return &hvratfi, true
7527 }
7528
7529
7530 type HyperVReplicaAzureUnplannedFailoverInput struct {
7531
7532 VaultLocation *string `json:"vaultLocation,omitempty"`
7533
7534 PrimaryKekCertificatePfx *string `json:"primaryKekCertificatePfx,omitempty"`
7535
7536 SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"`
7537
7538 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
7539
7540 InstanceType InstanceTypeBasicUnplannedFailoverProviderSpecificInput `json:"instanceType,omitempty"`
7541 }
7542
7543
7544 func (hvraufi HyperVReplicaAzureUnplannedFailoverInput) MarshalJSON() ([]byte, error) {
7545 hvraufi.InstanceType = InstanceTypeBasicUnplannedFailoverProviderSpecificInputInstanceTypeHyperVReplicaAzure
7546 objectMap := make(map[string]interface{})
7547 if hvraufi.VaultLocation != nil {
7548 objectMap["vaultLocation"] = hvraufi.VaultLocation
7549 }
7550 if hvraufi.PrimaryKekCertificatePfx != nil {
7551 objectMap["primaryKekCertificatePfx"] = hvraufi.PrimaryKekCertificatePfx
7552 }
7553 if hvraufi.SecondaryKekCertificatePfx != nil {
7554 objectMap["secondaryKekCertificatePfx"] = hvraufi.SecondaryKekCertificatePfx
7555 }
7556 if hvraufi.RecoveryPointID != nil {
7557 objectMap["recoveryPointId"] = hvraufi.RecoveryPointID
7558 }
7559 if hvraufi.InstanceType != "" {
7560 objectMap["instanceType"] = hvraufi.InstanceType
7561 }
7562 return json.Marshal(objectMap)
7563 }
7564
7565
7566 func (hvraufi HyperVReplicaAzureUnplannedFailoverInput) AsA2AUnplannedFailoverInput() (*A2AUnplannedFailoverInput, bool) {
7567 return nil, false
7568 }
7569
7570
7571 func (hvraufi HyperVReplicaAzureUnplannedFailoverInput) AsHyperVReplicaAzureUnplannedFailoverInput() (*HyperVReplicaAzureUnplannedFailoverInput, bool) {
7572 return &hvraufi, true
7573 }
7574
7575
7576 func (hvraufi HyperVReplicaAzureUnplannedFailoverInput) AsInMageAzureV2UnplannedFailoverInput() (*InMageAzureV2UnplannedFailoverInput, bool) {
7577 return nil, false
7578 }
7579
7580
7581 func (hvraufi HyperVReplicaAzureUnplannedFailoverInput) AsInMageRcmUnplannedFailoverInput() (*InMageRcmUnplannedFailoverInput, bool) {
7582 return nil, false
7583 }
7584
7585
7586 func (hvraufi HyperVReplicaAzureUnplannedFailoverInput) AsInMageUnplannedFailoverInput() (*InMageUnplannedFailoverInput, bool) {
7587 return nil, false
7588 }
7589
7590
7591 func (hvraufi HyperVReplicaAzureUnplannedFailoverInput) AsUnplannedFailoverProviderSpecificInput() (*UnplannedFailoverProviderSpecificInput, bool) {
7592 return nil, false
7593 }
7594
7595
7596 func (hvraufi HyperVReplicaAzureUnplannedFailoverInput) AsBasicUnplannedFailoverProviderSpecificInput() (BasicUnplannedFailoverProviderSpecificInput, bool) {
7597 return &hvraufi, true
7598 }
7599
7600
7601
7602 type HyperVReplicaAzureUpdateReplicationProtectedItemInput struct {
7603
7604 RecoveryAzureV1ResourceGroupID *string `json:"recoveryAzureV1ResourceGroupId,omitempty"`
7605
7606 RecoveryAzureV2ResourceGroupID *string `json:"recoveryAzureV2ResourceGroupId,omitempty"`
7607
7608 UseManagedDisks *string `json:"useManagedDisks,omitempty"`
7609
7610 DiskIDToDiskEncryptionMap map[string]*string `json:"diskIdToDiskEncryptionMap"`
7611
7612 TargetProximityPlacementGroupID *string `json:"targetProximityPlacementGroupId,omitempty"`
7613
7614 TargetAvailabilityZone *string `json:"targetAvailabilityZone,omitempty"`
7615
7616 InstanceType InstanceTypeBasicUpdateReplicationProtectedItemProviderInput `json:"instanceType,omitempty"`
7617 }
7618
7619
7620 func (hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, error) {
7621 hvraurpii.InstanceType = InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeHyperVReplicaAzure
7622 objectMap := make(map[string]interface{})
7623 if hvraurpii.RecoveryAzureV1ResourceGroupID != nil {
7624 objectMap["recoveryAzureV1ResourceGroupId"] = hvraurpii.RecoveryAzureV1ResourceGroupID
7625 }
7626 if hvraurpii.RecoveryAzureV2ResourceGroupID != nil {
7627 objectMap["recoveryAzureV2ResourceGroupId"] = hvraurpii.RecoveryAzureV2ResourceGroupID
7628 }
7629 if hvraurpii.UseManagedDisks != nil {
7630 objectMap["useManagedDisks"] = hvraurpii.UseManagedDisks
7631 }
7632 if hvraurpii.DiskIDToDiskEncryptionMap != nil {
7633 objectMap["diskIdToDiskEncryptionMap"] = hvraurpii.DiskIDToDiskEncryptionMap
7634 }
7635 if hvraurpii.TargetProximityPlacementGroupID != nil {
7636 objectMap["targetProximityPlacementGroupId"] = hvraurpii.TargetProximityPlacementGroupID
7637 }
7638 if hvraurpii.TargetAvailabilityZone != nil {
7639 objectMap["targetAvailabilityZone"] = hvraurpii.TargetAvailabilityZone
7640 }
7641 if hvraurpii.InstanceType != "" {
7642 objectMap["instanceType"] = hvraurpii.InstanceType
7643 }
7644 return json.Marshal(objectMap)
7645 }
7646
7647
7648 func (hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput) AsA2AUpdateReplicationProtectedItemInput() (*A2AUpdateReplicationProtectedItemInput, bool) {
7649 return nil, false
7650 }
7651
7652
7653 func (hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput) AsHyperVReplicaAzureUpdateReplicationProtectedItemInput() (*HyperVReplicaAzureUpdateReplicationProtectedItemInput, bool) {
7654 return &hvraurpii, true
7655 }
7656
7657
7658 func (hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput) AsInMageAzureV2UpdateReplicationProtectedItemInput() (*InMageAzureV2UpdateReplicationProtectedItemInput, bool) {
7659 return nil, false
7660 }
7661
7662
7663 func (hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput) AsInMageRcmUpdateReplicationProtectedItemInput() (*InMageRcmUpdateReplicationProtectedItemInput, bool) {
7664 return nil, false
7665 }
7666
7667
7668 func (hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput) AsUpdateReplicationProtectedItemProviderInput() (*UpdateReplicationProtectedItemProviderInput, bool) {
7669 return nil, false
7670 }
7671
7672
7673 func (hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput) AsBasicUpdateReplicationProtectedItemProviderInput() (BasicUpdateReplicationProtectedItemProviderInput, bool) {
7674 return &hvraurpii, true
7675 }
7676
7677
7678 type HyperVReplicaBaseEventDetails struct {
7679
7680 ContainerName *string `json:"containerName,omitempty"`
7681
7682 FabricName *string `json:"fabricName,omitempty"`
7683
7684 RemoteContainerName *string `json:"remoteContainerName,omitempty"`
7685
7686 RemoteFabricName *string `json:"remoteFabricName,omitempty"`
7687
7688 InstanceType InstanceTypeBasicEventProviderSpecificDetails `json:"instanceType,omitempty"`
7689 }
7690
7691
7692 func (hvrbed HyperVReplicaBaseEventDetails) MarshalJSON() ([]byte, error) {
7693 hvrbed.InstanceType = InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaBaseEventDetails
7694 objectMap := make(map[string]interface{})
7695 if hvrbed.ContainerName != nil {
7696 objectMap["containerName"] = hvrbed.ContainerName
7697 }
7698 if hvrbed.FabricName != nil {
7699 objectMap["fabricName"] = hvrbed.FabricName
7700 }
7701 if hvrbed.RemoteContainerName != nil {
7702 objectMap["remoteContainerName"] = hvrbed.RemoteContainerName
7703 }
7704 if hvrbed.RemoteFabricName != nil {
7705 objectMap["remoteFabricName"] = hvrbed.RemoteFabricName
7706 }
7707 if hvrbed.InstanceType != "" {
7708 objectMap["instanceType"] = hvrbed.InstanceType
7709 }
7710 return json.Marshal(objectMap)
7711 }
7712
7713
7714 func (hvrbed HyperVReplicaBaseEventDetails) AsA2AEventDetails() (*A2AEventDetails, bool) {
7715 return nil, false
7716 }
7717
7718
7719 func (hvrbed HyperVReplicaBaseEventDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) {
7720 return nil, false
7721 }
7722
7723
7724 func (hvrbed HyperVReplicaBaseEventDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) {
7725 return nil, false
7726 }
7727
7728
7729 func (hvrbed HyperVReplicaBaseEventDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) {
7730 return nil, false
7731 }
7732
7733
7734 func (hvrbed HyperVReplicaBaseEventDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) {
7735 return &hvrbed, true
7736 }
7737
7738
7739 func (hvrbed HyperVReplicaBaseEventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) {
7740 return nil, false
7741 }
7742
7743
7744 func (hvrbed HyperVReplicaBaseEventDetails) AsInMageRcmEventDetails() (*InMageRcmEventDetails, bool) {
7745 return nil, false
7746 }
7747
7748
7749 func (hvrbed HyperVReplicaBaseEventDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) {
7750 return nil, false
7751 }
7752
7753
7754 func (hvrbed HyperVReplicaBaseEventDetails) AsBasicEventProviderSpecificDetails() (BasicEventProviderSpecificDetails, bool) {
7755 return &hvrbed, true
7756 }
7757
7758
7759 type HyperVReplicaBasePolicyDetails struct {
7760
7761 RecoveryPoints *int32 `json:"recoveryPoints,omitempty"`
7762
7763 ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"`
7764
7765 Compression *string `json:"compression,omitempty"`
7766
7767 InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"`
7768
7769 OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"`
7770
7771 OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"`
7772
7773 OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"`
7774
7775 ReplicationPort *int32 `json:"replicationPort,omitempty"`
7776
7777 AllowedAuthenticationType *int32 `json:"allowedAuthenticationType,omitempty"`
7778
7779 ReplicaDeletionOption *string `json:"replicaDeletionOption,omitempty"`
7780
7781 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"`
7782 }
7783
7784
7785 func (hvrbpd HyperVReplicaBasePolicyDetails) MarshalJSON() ([]byte, error) {
7786 hvrbpd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails
7787 objectMap := make(map[string]interface{})
7788 if hvrbpd.RecoveryPoints != nil {
7789 objectMap["recoveryPoints"] = hvrbpd.RecoveryPoints
7790 }
7791 if hvrbpd.ApplicationConsistentSnapshotFrequencyInHours != nil {
7792 objectMap["applicationConsistentSnapshotFrequencyInHours"] = hvrbpd.ApplicationConsistentSnapshotFrequencyInHours
7793 }
7794 if hvrbpd.Compression != nil {
7795 objectMap["compression"] = hvrbpd.Compression
7796 }
7797 if hvrbpd.InitialReplicationMethod != nil {
7798 objectMap["initialReplicationMethod"] = hvrbpd.InitialReplicationMethod
7799 }
7800 if hvrbpd.OnlineReplicationStartTime != nil {
7801 objectMap["onlineReplicationStartTime"] = hvrbpd.OnlineReplicationStartTime
7802 }
7803 if hvrbpd.OfflineReplicationImportPath != nil {
7804 objectMap["offlineReplicationImportPath"] = hvrbpd.OfflineReplicationImportPath
7805 }
7806 if hvrbpd.OfflineReplicationExportPath != nil {
7807 objectMap["offlineReplicationExportPath"] = hvrbpd.OfflineReplicationExportPath
7808 }
7809 if hvrbpd.ReplicationPort != nil {
7810 objectMap["replicationPort"] = hvrbpd.ReplicationPort
7811 }
7812 if hvrbpd.AllowedAuthenticationType != nil {
7813 objectMap["allowedAuthenticationType"] = hvrbpd.AllowedAuthenticationType
7814 }
7815 if hvrbpd.ReplicaDeletionOption != nil {
7816 objectMap["replicaDeletionOption"] = hvrbpd.ReplicaDeletionOption
7817 }
7818 if hvrbpd.InstanceType != "" {
7819 objectMap["instanceType"] = hvrbpd.InstanceType
7820 }
7821 return json.Marshal(objectMap)
7822 }
7823
7824
7825 func (hvrbpd HyperVReplicaBasePolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) {
7826 return nil, false
7827 }
7828
7829
7830 func (hvrbpd HyperVReplicaBasePolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) {
7831 return nil, false
7832 }
7833
7834
7835 func (hvrbpd HyperVReplicaBasePolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) {
7836 return &hvrbpd, true
7837 }
7838
7839
7840 func (hvrbpd HyperVReplicaBasePolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) {
7841 return nil, false
7842 }
7843
7844
7845 func (hvrbpd HyperVReplicaBasePolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) {
7846 return nil, false
7847 }
7848
7849
7850 func (hvrbpd HyperVReplicaBasePolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) {
7851 return nil, false
7852 }
7853
7854
7855 func (hvrbpd HyperVReplicaBasePolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) {
7856 return nil, false
7857 }
7858
7859
7860 func (hvrbpd HyperVReplicaBasePolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) {
7861 return nil, false
7862 }
7863
7864
7865 func (hvrbpd HyperVReplicaBasePolicyDetails) AsInMageRcmPolicyDetails() (*InMageRcmPolicyDetails, bool) {
7866 return nil, false
7867 }
7868
7869
7870 func (hvrbpd HyperVReplicaBasePolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) {
7871 return nil, false
7872 }
7873
7874
7875 func (hvrbpd HyperVReplicaBasePolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) {
7876 return nil, false
7877 }
7878
7879
7880 func (hvrbpd HyperVReplicaBasePolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) {
7881 return nil, false
7882 }
7883
7884
7885 func (hvrbpd HyperVReplicaBasePolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) {
7886 return &hvrbpd, true
7887 }
7888
7889
7890 type HyperVReplicaBaseReplicationDetails struct {
7891
7892 LastReplicatedTime *date.Time `json:"lastReplicatedTime,omitempty"`
7893
7894 VMNics *[]VMNicDetails `json:"vmNics,omitempty"`
7895
7896 VMID *string `json:"vmId,omitempty"`
7897
7898 VMProtectionState *string `json:"vmProtectionState,omitempty"`
7899
7900 VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"`
7901
7902 InitialReplicationDetails *InitialReplicationDetails `json:"initialReplicationDetails,omitempty"`
7903
7904 VMDiskDetails *[]DiskDetails `json:"vMDiskDetails,omitempty"`
7905
7906 InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"`
7907 }
7908
7909
7910 func (hvrbrd HyperVReplicaBaseReplicationDetails) MarshalJSON() ([]byte, error) {
7911 hvrbrd.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaBaseReplicationDetails
7912 objectMap := make(map[string]interface{})
7913 if hvrbrd.LastReplicatedTime != nil {
7914 objectMap["lastReplicatedTime"] = hvrbrd.LastReplicatedTime
7915 }
7916 if hvrbrd.VMNics != nil {
7917 objectMap["vmNics"] = hvrbrd.VMNics
7918 }
7919 if hvrbrd.VMID != nil {
7920 objectMap["vmId"] = hvrbrd.VMID
7921 }
7922 if hvrbrd.VMProtectionState != nil {
7923 objectMap["vmProtectionState"] = hvrbrd.VMProtectionState
7924 }
7925 if hvrbrd.VMProtectionStateDescription != nil {
7926 objectMap["vmProtectionStateDescription"] = hvrbrd.VMProtectionStateDescription
7927 }
7928 if hvrbrd.InitialReplicationDetails != nil {
7929 objectMap["initialReplicationDetails"] = hvrbrd.InitialReplicationDetails
7930 }
7931 if hvrbrd.VMDiskDetails != nil {
7932 objectMap["vMDiskDetails"] = hvrbrd.VMDiskDetails
7933 }
7934 if hvrbrd.InstanceType != "" {
7935 objectMap["instanceType"] = hvrbrd.InstanceType
7936 }
7937 return json.Marshal(objectMap)
7938 }
7939
7940
7941 func (hvrbrd HyperVReplicaBaseReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) {
7942 return nil, false
7943 }
7944
7945
7946 func (hvrbrd HyperVReplicaBaseReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) {
7947 return nil, false
7948 }
7949
7950
7951 func (hvrbrd HyperVReplicaBaseReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) {
7952 return &hvrbrd, true
7953 }
7954
7955
7956 func (hvrbrd HyperVReplicaBaseReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) {
7957 return nil, false
7958 }
7959
7960
7961 func (hvrbrd HyperVReplicaBaseReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) {
7962 return nil, false
7963 }
7964
7965
7966 func (hvrbrd HyperVReplicaBaseReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) {
7967 return nil, false
7968 }
7969
7970
7971 func (hvrbrd HyperVReplicaBaseReplicationDetails) AsInMageRcmReplicationDetails() (*InMageRcmReplicationDetails, bool) {
7972 return nil, false
7973 }
7974
7975
7976 func (hvrbrd HyperVReplicaBaseReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) {
7977 return nil, false
7978 }
7979
7980
7981 func (hvrbrd HyperVReplicaBaseReplicationDetails) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) {
7982 return nil, false
7983 }
7984
7985
7986 func (hvrbrd HyperVReplicaBaseReplicationDetails) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) {
7987 return &hvrbrd, true
7988 }
7989
7990
7991 type HyperVReplicaBluePolicyDetails struct {
7992
7993 ReplicationFrequencyInSeconds *int32 `json:"replicationFrequencyInSeconds,omitempty"`
7994
7995 RecoveryPoints *int32 `json:"recoveryPoints,omitempty"`
7996
7997 ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"`
7998
7999 Compression *string `json:"compression,omitempty"`
8000
8001 InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"`
8002
8003 OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"`
8004
8005 OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"`
8006
8007 OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"`
8008
8009 ReplicationPort *int32 `json:"replicationPort,omitempty"`
8010
8011 AllowedAuthenticationType *int32 `json:"allowedAuthenticationType,omitempty"`
8012
8013 ReplicaDeletionOption *string `json:"replicaDeletionOption,omitempty"`
8014
8015 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"`
8016 }
8017
8018
8019 func (hvrbpd HyperVReplicaBluePolicyDetails) MarshalJSON() ([]byte, error) {
8020 hvrbpd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2
8021 objectMap := make(map[string]interface{})
8022 if hvrbpd.ReplicationFrequencyInSeconds != nil {
8023 objectMap["replicationFrequencyInSeconds"] = hvrbpd.ReplicationFrequencyInSeconds
8024 }
8025 if hvrbpd.RecoveryPoints != nil {
8026 objectMap["recoveryPoints"] = hvrbpd.RecoveryPoints
8027 }
8028 if hvrbpd.ApplicationConsistentSnapshotFrequencyInHours != nil {
8029 objectMap["applicationConsistentSnapshotFrequencyInHours"] = hvrbpd.ApplicationConsistentSnapshotFrequencyInHours
8030 }
8031 if hvrbpd.Compression != nil {
8032 objectMap["compression"] = hvrbpd.Compression
8033 }
8034 if hvrbpd.InitialReplicationMethod != nil {
8035 objectMap["initialReplicationMethod"] = hvrbpd.InitialReplicationMethod
8036 }
8037 if hvrbpd.OnlineReplicationStartTime != nil {
8038 objectMap["onlineReplicationStartTime"] = hvrbpd.OnlineReplicationStartTime
8039 }
8040 if hvrbpd.OfflineReplicationImportPath != nil {
8041 objectMap["offlineReplicationImportPath"] = hvrbpd.OfflineReplicationImportPath
8042 }
8043 if hvrbpd.OfflineReplicationExportPath != nil {
8044 objectMap["offlineReplicationExportPath"] = hvrbpd.OfflineReplicationExportPath
8045 }
8046 if hvrbpd.ReplicationPort != nil {
8047 objectMap["replicationPort"] = hvrbpd.ReplicationPort
8048 }
8049 if hvrbpd.AllowedAuthenticationType != nil {
8050 objectMap["allowedAuthenticationType"] = hvrbpd.AllowedAuthenticationType
8051 }
8052 if hvrbpd.ReplicaDeletionOption != nil {
8053 objectMap["replicaDeletionOption"] = hvrbpd.ReplicaDeletionOption
8054 }
8055 if hvrbpd.InstanceType != "" {
8056 objectMap["instanceType"] = hvrbpd.InstanceType
8057 }
8058 return json.Marshal(objectMap)
8059 }
8060
8061
8062 func (hvrbpd HyperVReplicaBluePolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) {
8063 return nil, false
8064 }
8065
8066
8067 func (hvrbpd HyperVReplicaBluePolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) {
8068 return nil, false
8069 }
8070
8071
8072 func (hvrbpd HyperVReplicaBluePolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) {
8073 return nil, false
8074 }
8075
8076
8077 func (hvrbpd HyperVReplicaBluePolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) {
8078 return &hvrbpd, true
8079 }
8080
8081
8082 func (hvrbpd HyperVReplicaBluePolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) {
8083 return nil, false
8084 }
8085
8086
8087 func (hvrbpd HyperVReplicaBluePolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) {
8088 return nil, false
8089 }
8090
8091
8092 func (hvrbpd HyperVReplicaBluePolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) {
8093 return nil, false
8094 }
8095
8096
8097 func (hvrbpd HyperVReplicaBluePolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) {
8098 return nil, false
8099 }
8100
8101
8102 func (hvrbpd HyperVReplicaBluePolicyDetails) AsInMageRcmPolicyDetails() (*InMageRcmPolicyDetails, bool) {
8103 return nil, false
8104 }
8105
8106
8107 func (hvrbpd HyperVReplicaBluePolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) {
8108 return nil, false
8109 }
8110
8111
8112 func (hvrbpd HyperVReplicaBluePolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) {
8113 return nil, false
8114 }
8115
8116
8117 func (hvrbpd HyperVReplicaBluePolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) {
8118 return nil, false
8119 }
8120
8121
8122 func (hvrbpd HyperVReplicaBluePolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) {
8123 return &hvrbpd, true
8124 }
8125
8126
8127 type HyperVReplicaBluePolicyInput struct {
8128
8129 ReplicationFrequencyInSeconds *int32 `json:"replicationFrequencyInSeconds,omitempty"`
8130
8131 RecoveryPoints *int32 `json:"recoveryPoints,omitempty"`
8132
8133 ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"`
8134
8135 Compression *string `json:"compression,omitempty"`
8136
8137 InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"`
8138
8139 OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"`
8140
8141 OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"`
8142
8143 OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"`
8144
8145 ReplicationPort *int32 `json:"replicationPort,omitempty"`
8146
8147 AllowedAuthenticationType *int32 `json:"allowedAuthenticationType,omitempty"`
8148
8149 ReplicaDeletion *string `json:"replicaDeletion,omitempty"`
8150
8151 InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"`
8152 }
8153
8154
8155 func (hvrbpi HyperVReplicaBluePolicyInput) MarshalJSON() ([]byte, error) {
8156 hvrbpi.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012R2
8157 objectMap := make(map[string]interface{})
8158 if hvrbpi.ReplicationFrequencyInSeconds != nil {
8159 objectMap["replicationFrequencyInSeconds"] = hvrbpi.ReplicationFrequencyInSeconds
8160 }
8161 if hvrbpi.RecoveryPoints != nil {
8162 objectMap["recoveryPoints"] = hvrbpi.RecoveryPoints
8163 }
8164 if hvrbpi.ApplicationConsistentSnapshotFrequencyInHours != nil {
8165 objectMap["applicationConsistentSnapshotFrequencyInHours"] = hvrbpi.ApplicationConsistentSnapshotFrequencyInHours
8166 }
8167 if hvrbpi.Compression != nil {
8168 objectMap["compression"] = hvrbpi.Compression
8169 }
8170 if hvrbpi.InitialReplicationMethod != nil {
8171 objectMap["initialReplicationMethod"] = hvrbpi.InitialReplicationMethod
8172 }
8173 if hvrbpi.OnlineReplicationStartTime != nil {
8174 objectMap["onlineReplicationStartTime"] = hvrbpi.OnlineReplicationStartTime
8175 }
8176 if hvrbpi.OfflineReplicationImportPath != nil {
8177 objectMap["offlineReplicationImportPath"] = hvrbpi.OfflineReplicationImportPath
8178 }
8179 if hvrbpi.OfflineReplicationExportPath != nil {
8180 objectMap["offlineReplicationExportPath"] = hvrbpi.OfflineReplicationExportPath
8181 }
8182 if hvrbpi.ReplicationPort != nil {
8183 objectMap["replicationPort"] = hvrbpi.ReplicationPort
8184 }
8185 if hvrbpi.AllowedAuthenticationType != nil {
8186 objectMap["allowedAuthenticationType"] = hvrbpi.AllowedAuthenticationType
8187 }
8188 if hvrbpi.ReplicaDeletion != nil {
8189 objectMap["replicaDeletion"] = hvrbpi.ReplicaDeletion
8190 }
8191 if hvrbpi.InstanceType != "" {
8192 objectMap["instanceType"] = hvrbpi.InstanceType
8193 }
8194 return json.Marshal(objectMap)
8195 }
8196
8197
8198 func (hvrbpi HyperVReplicaBluePolicyInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) {
8199 return nil, false
8200 }
8201
8202
8203 func (hvrbpi HyperVReplicaBluePolicyInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) {
8204 return nil, false
8205 }
8206
8207
8208 func (hvrbpi HyperVReplicaBluePolicyInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) {
8209 return &hvrbpi, true
8210 }
8211
8212
8213 func (hvrbpi HyperVReplicaBluePolicyInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) {
8214 return nil, false
8215 }
8216
8217
8218 func (hvrbpi HyperVReplicaBluePolicyInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) {
8219 return nil, false
8220 }
8221
8222
8223 func (hvrbpi HyperVReplicaBluePolicyInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) {
8224 return nil, false
8225 }
8226
8227
8228 func (hvrbpi HyperVReplicaBluePolicyInput) AsInMageRcmPolicyCreationInput() (*InMageRcmPolicyCreationInput, bool) {
8229 return nil, false
8230 }
8231
8232
8233 func (hvrbpi HyperVReplicaBluePolicyInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) {
8234 return nil, false
8235 }
8236
8237
8238 func (hvrbpi HyperVReplicaBluePolicyInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) {
8239 return nil, false
8240 }
8241
8242
8243 func (hvrbpi HyperVReplicaBluePolicyInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) {
8244 return &hvrbpi, true
8245 }
8246
8247
8248 type HyperVReplicaBlueReplicationDetails struct {
8249
8250 LastReplicatedTime *date.Time `json:"lastReplicatedTime,omitempty"`
8251
8252 VMNics *[]VMNicDetails `json:"vmNics,omitempty"`
8253
8254 VMID *string `json:"vmId,omitempty"`
8255
8256 VMProtectionState *string `json:"vmProtectionState,omitempty"`
8257
8258 VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"`
8259
8260 InitialReplicationDetails *InitialReplicationDetails `json:"initialReplicationDetails,omitempty"`
8261
8262 VMDiskDetails *[]DiskDetails `json:"vMDiskDetails,omitempty"`
8263
8264 InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"`
8265 }
8266
8267
8268 func (hvrbrd HyperVReplicaBlueReplicationDetails) MarshalJSON() ([]byte, error) {
8269 hvrbrd.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012R2
8270 objectMap := make(map[string]interface{})
8271 if hvrbrd.LastReplicatedTime != nil {
8272 objectMap["lastReplicatedTime"] = hvrbrd.LastReplicatedTime
8273 }
8274 if hvrbrd.VMNics != nil {
8275 objectMap["vmNics"] = hvrbrd.VMNics
8276 }
8277 if hvrbrd.VMID != nil {
8278 objectMap["vmId"] = hvrbrd.VMID
8279 }
8280 if hvrbrd.VMProtectionState != nil {
8281 objectMap["vmProtectionState"] = hvrbrd.VMProtectionState
8282 }
8283 if hvrbrd.VMProtectionStateDescription != nil {
8284 objectMap["vmProtectionStateDescription"] = hvrbrd.VMProtectionStateDescription
8285 }
8286 if hvrbrd.InitialReplicationDetails != nil {
8287 objectMap["initialReplicationDetails"] = hvrbrd.InitialReplicationDetails
8288 }
8289 if hvrbrd.VMDiskDetails != nil {
8290 objectMap["vMDiskDetails"] = hvrbrd.VMDiskDetails
8291 }
8292 if hvrbrd.InstanceType != "" {
8293 objectMap["instanceType"] = hvrbrd.InstanceType
8294 }
8295 return json.Marshal(objectMap)
8296 }
8297
8298
8299 func (hvrbrd HyperVReplicaBlueReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) {
8300 return nil, false
8301 }
8302
8303
8304 func (hvrbrd HyperVReplicaBlueReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) {
8305 return nil, false
8306 }
8307
8308
8309 func (hvrbrd HyperVReplicaBlueReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) {
8310 return nil, false
8311 }
8312
8313
8314 func (hvrbrd HyperVReplicaBlueReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) {
8315 return &hvrbrd, true
8316 }
8317
8318
8319 func (hvrbrd HyperVReplicaBlueReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) {
8320 return nil, false
8321 }
8322
8323
8324 func (hvrbrd HyperVReplicaBlueReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) {
8325 return nil, false
8326 }
8327
8328
8329 func (hvrbrd HyperVReplicaBlueReplicationDetails) AsInMageRcmReplicationDetails() (*InMageRcmReplicationDetails, bool) {
8330 return nil, false
8331 }
8332
8333
8334 func (hvrbrd HyperVReplicaBlueReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) {
8335 return nil, false
8336 }
8337
8338
8339 func (hvrbrd HyperVReplicaBlueReplicationDetails) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) {
8340 return nil, false
8341 }
8342
8343
8344 func (hvrbrd HyperVReplicaBlueReplicationDetails) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) {
8345 return &hvrbrd, true
8346 }
8347
8348
8349 type HyperVReplicaPolicyDetails struct {
8350
8351 RecoveryPoints *int32 `json:"recoveryPoints,omitempty"`
8352
8353 ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"`
8354
8355 Compression *string `json:"compression,omitempty"`
8356
8357 InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"`
8358
8359 OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"`
8360
8361 OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"`
8362
8363 OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"`
8364
8365 ReplicationPort *int32 `json:"replicationPort,omitempty"`
8366
8367 AllowedAuthenticationType *int32 `json:"allowedAuthenticationType,omitempty"`
8368
8369 ReplicaDeletionOption *string `json:"replicaDeletionOption,omitempty"`
8370
8371 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"`
8372 }
8373
8374
8375 func (hvrpd HyperVReplicaPolicyDetails) MarshalJSON() ([]byte, error) {
8376 hvrpd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012
8377 objectMap := make(map[string]interface{})
8378 if hvrpd.RecoveryPoints != nil {
8379 objectMap["recoveryPoints"] = hvrpd.RecoveryPoints
8380 }
8381 if hvrpd.ApplicationConsistentSnapshotFrequencyInHours != nil {
8382 objectMap["applicationConsistentSnapshotFrequencyInHours"] = hvrpd.ApplicationConsistentSnapshotFrequencyInHours
8383 }
8384 if hvrpd.Compression != nil {
8385 objectMap["compression"] = hvrpd.Compression
8386 }
8387 if hvrpd.InitialReplicationMethod != nil {
8388 objectMap["initialReplicationMethod"] = hvrpd.InitialReplicationMethod
8389 }
8390 if hvrpd.OnlineReplicationStartTime != nil {
8391 objectMap["onlineReplicationStartTime"] = hvrpd.OnlineReplicationStartTime
8392 }
8393 if hvrpd.OfflineReplicationImportPath != nil {
8394 objectMap["offlineReplicationImportPath"] = hvrpd.OfflineReplicationImportPath
8395 }
8396 if hvrpd.OfflineReplicationExportPath != nil {
8397 objectMap["offlineReplicationExportPath"] = hvrpd.OfflineReplicationExportPath
8398 }
8399 if hvrpd.ReplicationPort != nil {
8400 objectMap["replicationPort"] = hvrpd.ReplicationPort
8401 }
8402 if hvrpd.AllowedAuthenticationType != nil {
8403 objectMap["allowedAuthenticationType"] = hvrpd.AllowedAuthenticationType
8404 }
8405 if hvrpd.ReplicaDeletionOption != nil {
8406 objectMap["replicaDeletionOption"] = hvrpd.ReplicaDeletionOption
8407 }
8408 if hvrpd.InstanceType != "" {
8409 objectMap["instanceType"] = hvrpd.InstanceType
8410 }
8411 return json.Marshal(objectMap)
8412 }
8413
8414
8415 func (hvrpd HyperVReplicaPolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) {
8416 return nil, false
8417 }
8418
8419
8420 func (hvrpd HyperVReplicaPolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) {
8421 return nil, false
8422 }
8423
8424
8425 func (hvrpd HyperVReplicaPolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) {
8426 return nil, false
8427 }
8428
8429
8430 func (hvrpd HyperVReplicaPolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) {
8431 return nil, false
8432 }
8433
8434
8435 func (hvrpd HyperVReplicaPolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) {
8436 return &hvrpd, true
8437 }
8438
8439
8440 func (hvrpd HyperVReplicaPolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) {
8441 return nil, false
8442 }
8443
8444
8445 func (hvrpd HyperVReplicaPolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) {
8446 return nil, false
8447 }
8448
8449
8450 func (hvrpd HyperVReplicaPolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) {
8451 return nil, false
8452 }
8453
8454
8455 func (hvrpd HyperVReplicaPolicyDetails) AsInMageRcmPolicyDetails() (*InMageRcmPolicyDetails, bool) {
8456 return nil, false
8457 }
8458
8459
8460 func (hvrpd HyperVReplicaPolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) {
8461 return nil, false
8462 }
8463
8464
8465 func (hvrpd HyperVReplicaPolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) {
8466 return nil, false
8467 }
8468
8469
8470 func (hvrpd HyperVReplicaPolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) {
8471 return nil, false
8472 }
8473
8474
8475 func (hvrpd HyperVReplicaPolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) {
8476 return &hvrpd, true
8477 }
8478
8479
8480 type HyperVReplicaPolicyInput struct {
8481
8482 RecoveryPoints *int32 `json:"recoveryPoints,omitempty"`
8483
8484 ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"`
8485
8486 Compression *string `json:"compression,omitempty"`
8487
8488 InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"`
8489
8490 OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"`
8491
8492 OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"`
8493
8494 OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"`
8495
8496 ReplicationPort *int32 `json:"replicationPort,omitempty"`
8497
8498 AllowedAuthenticationType *int32 `json:"allowedAuthenticationType,omitempty"`
8499
8500 ReplicaDeletion *string `json:"replicaDeletion,omitempty"`
8501
8502 InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"`
8503 }
8504
8505
8506 func (hvrpi HyperVReplicaPolicyInput) MarshalJSON() ([]byte, error) {
8507 hvrpi.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012
8508 objectMap := make(map[string]interface{})
8509 if hvrpi.RecoveryPoints != nil {
8510 objectMap["recoveryPoints"] = hvrpi.RecoveryPoints
8511 }
8512 if hvrpi.ApplicationConsistentSnapshotFrequencyInHours != nil {
8513 objectMap["applicationConsistentSnapshotFrequencyInHours"] = hvrpi.ApplicationConsistentSnapshotFrequencyInHours
8514 }
8515 if hvrpi.Compression != nil {
8516 objectMap["compression"] = hvrpi.Compression
8517 }
8518 if hvrpi.InitialReplicationMethod != nil {
8519 objectMap["initialReplicationMethod"] = hvrpi.InitialReplicationMethod
8520 }
8521 if hvrpi.OnlineReplicationStartTime != nil {
8522 objectMap["onlineReplicationStartTime"] = hvrpi.OnlineReplicationStartTime
8523 }
8524 if hvrpi.OfflineReplicationImportPath != nil {
8525 objectMap["offlineReplicationImportPath"] = hvrpi.OfflineReplicationImportPath
8526 }
8527 if hvrpi.OfflineReplicationExportPath != nil {
8528 objectMap["offlineReplicationExportPath"] = hvrpi.OfflineReplicationExportPath
8529 }
8530 if hvrpi.ReplicationPort != nil {
8531 objectMap["replicationPort"] = hvrpi.ReplicationPort
8532 }
8533 if hvrpi.AllowedAuthenticationType != nil {
8534 objectMap["allowedAuthenticationType"] = hvrpi.AllowedAuthenticationType
8535 }
8536 if hvrpi.ReplicaDeletion != nil {
8537 objectMap["replicaDeletion"] = hvrpi.ReplicaDeletion
8538 }
8539 if hvrpi.InstanceType != "" {
8540 objectMap["instanceType"] = hvrpi.InstanceType
8541 }
8542 return json.Marshal(objectMap)
8543 }
8544
8545
8546 func (hvrpi HyperVReplicaPolicyInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) {
8547 return nil, false
8548 }
8549
8550
8551 func (hvrpi HyperVReplicaPolicyInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) {
8552 return nil, false
8553 }
8554
8555
8556 func (hvrpi HyperVReplicaPolicyInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) {
8557 return nil, false
8558 }
8559
8560
8561 func (hvrpi HyperVReplicaPolicyInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) {
8562 return &hvrpi, true
8563 }
8564
8565
8566 func (hvrpi HyperVReplicaPolicyInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) {
8567 return nil, false
8568 }
8569
8570
8571 func (hvrpi HyperVReplicaPolicyInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) {
8572 return nil, false
8573 }
8574
8575
8576 func (hvrpi HyperVReplicaPolicyInput) AsInMageRcmPolicyCreationInput() (*InMageRcmPolicyCreationInput, bool) {
8577 return nil, false
8578 }
8579
8580
8581 func (hvrpi HyperVReplicaPolicyInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) {
8582 return nil, false
8583 }
8584
8585
8586 func (hvrpi HyperVReplicaPolicyInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) {
8587 return nil, false
8588 }
8589
8590
8591 func (hvrpi HyperVReplicaPolicyInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) {
8592 return &hvrpi, true
8593 }
8594
8595
8596 type HyperVReplicaReplicationDetails struct {
8597
8598 LastReplicatedTime *date.Time `json:"lastReplicatedTime,omitempty"`
8599
8600 VMNics *[]VMNicDetails `json:"vmNics,omitempty"`
8601
8602 VMID *string `json:"vmId,omitempty"`
8603
8604 VMProtectionState *string `json:"vmProtectionState,omitempty"`
8605
8606 VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"`
8607
8608 InitialReplicationDetails *InitialReplicationDetails `json:"initialReplicationDetails,omitempty"`
8609
8610 VMDiskDetails *[]DiskDetails `json:"vMDiskDetails,omitempty"`
8611
8612 InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"`
8613 }
8614
8615
8616 func (hvrrd HyperVReplicaReplicationDetails) MarshalJSON() ([]byte, error) {
8617 hvrrd.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012
8618 objectMap := make(map[string]interface{})
8619 if hvrrd.LastReplicatedTime != nil {
8620 objectMap["lastReplicatedTime"] = hvrrd.LastReplicatedTime
8621 }
8622 if hvrrd.VMNics != nil {
8623 objectMap["vmNics"] = hvrrd.VMNics
8624 }
8625 if hvrrd.VMID != nil {
8626 objectMap["vmId"] = hvrrd.VMID
8627 }
8628 if hvrrd.VMProtectionState != nil {
8629 objectMap["vmProtectionState"] = hvrrd.VMProtectionState
8630 }
8631 if hvrrd.VMProtectionStateDescription != nil {
8632 objectMap["vmProtectionStateDescription"] = hvrrd.VMProtectionStateDescription
8633 }
8634 if hvrrd.InitialReplicationDetails != nil {
8635 objectMap["initialReplicationDetails"] = hvrrd.InitialReplicationDetails
8636 }
8637 if hvrrd.VMDiskDetails != nil {
8638 objectMap["vMDiskDetails"] = hvrrd.VMDiskDetails
8639 }
8640 if hvrrd.InstanceType != "" {
8641 objectMap["instanceType"] = hvrrd.InstanceType
8642 }
8643 return json.Marshal(objectMap)
8644 }
8645
8646
8647 func (hvrrd HyperVReplicaReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) {
8648 return nil, false
8649 }
8650
8651
8652 func (hvrrd HyperVReplicaReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) {
8653 return nil, false
8654 }
8655
8656
8657 func (hvrrd HyperVReplicaReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) {
8658 return nil, false
8659 }
8660
8661
8662 func (hvrrd HyperVReplicaReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) {
8663 return nil, false
8664 }
8665
8666
8667 func (hvrrd HyperVReplicaReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) {
8668 return &hvrrd, true
8669 }
8670
8671
8672 func (hvrrd HyperVReplicaReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) {
8673 return nil, false
8674 }
8675
8676
8677 func (hvrrd HyperVReplicaReplicationDetails) AsInMageRcmReplicationDetails() (*InMageRcmReplicationDetails, bool) {
8678 return nil, false
8679 }
8680
8681
8682 func (hvrrd HyperVReplicaReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) {
8683 return nil, false
8684 }
8685
8686
8687 func (hvrrd HyperVReplicaReplicationDetails) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) {
8688 return nil, false
8689 }
8690
8691
8692 func (hvrrd HyperVReplicaReplicationDetails) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) {
8693 return &hvrrd, true
8694 }
8695
8696
8697 type HyperVSiteDetails struct {
8698
8699 InstanceType InstanceTypeBasicFabricSpecificDetails `json:"instanceType,omitempty"`
8700 }
8701
8702
8703 func (hvsd HyperVSiteDetails) MarshalJSON() ([]byte, error) {
8704 hvsd.InstanceType = InstanceTypeBasicFabricSpecificDetailsInstanceTypeHyperVSite
8705 objectMap := make(map[string]interface{})
8706 if hvsd.InstanceType != "" {
8707 objectMap["instanceType"] = hvsd.InstanceType
8708 }
8709 return json.Marshal(objectMap)
8710 }
8711
8712
8713 func (hvsd HyperVSiteDetails) AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool) {
8714 return nil, false
8715 }
8716
8717
8718 func (hvsd HyperVSiteDetails) AsHyperVSiteDetails() (*HyperVSiteDetails, bool) {
8719 return &hvsd, true
8720 }
8721
8722
8723 func (hvsd HyperVSiteDetails) AsInMageRcmFabricSpecificDetails() (*InMageRcmFabricSpecificDetails, bool) {
8724 return nil, false
8725 }
8726
8727
8728 func (hvsd HyperVSiteDetails) AsVmmDetails() (*VmmDetails, bool) {
8729 return nil, false
8730 }
8731
8732
8733 func (hvsd HyperVSiteDetails) AsVMwareDetails() (*VMwareDetails, bool) {
8734 return nil, false
8735 }
8736
8737
8738 func (hvsd HyperVSiteDetails) AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool) {
8739 return nil, false
8740 }
8741
8742
8743 func (hvsd HyperVSiteDetails) AsFabricSpecificDetails() (*FabricSpecificDetails, bool) {
8744 return nil, false
8745 }
8746
8747
8748 func (hvsd HyperVSiteDetails) AsBasicFabricSpecificDetails() (BasicFabricSpecificDetails, bool) {
8749 return &hvsd, true
8750 }
8751
8752
8753 type HyperVVirtualMachineDetails struct {
8754
8755 SourceItemID *string `json:"sourceItemId,omitempty"`
8756
8757 Generation *string `json:"generation,omitempty"`
8758
8759 OsDetails *OSDetails `json:"osDetails,omitempty"`
8760
8761 DiskDetails *[]DiskDetails `json:"diskDetails,omitempty"`
8762
8763 HasPhysicalDisk PresenceStatus `json:"hasPhysicalDisk,omitempty"`
8764
8765 HasFibreChannelAdapter PresenceStatus `json:"hasFibreChannelAdapter,omitempty"`
8766
8767 HasSharedVhd PresenceStatus `json:"hasSharedVhd,omitempty"`
8768
8769 InstanceType InstanceTypeBasicConfigurationSettings `json:"instanceType,omitempty"`
8770 }
8771
8772
8773 func (hvvmd HyperVVirtualMachineDetails) MarshalJSON() ([]byte, error) {
8774 hvvmd.InstanceType = InstanceTypeHyperVVirtualMachine
8775 objectMap := make(map[string]interface{})
8776 if hvvmd.SourceItemID != nil {
8777 objectMap["sourceItemId"] = hvvmd.SourceItemID
8778 }
8779 if hvvmd.Generation != nil {
8780 objectMap["generation"] = hvvmd.Generation
8781 }
8782 if hvvmd.OsDetails != nil {
8783 objectMap["osDetails"] = hvvmd.OsDetails
8784 }
8785 if hvvmd.DiskDetails != nil {
8786 objectMap["diskDetails"] = hvvmd.DiskDetails
8787 }
8788 if hvvmd.HasPhysicalDisk != "" {
8789 objectMap["hasPhysicalDisk"] = hvvmd.HasPhysicalDisk
8790 }
8791 if hvvmd.HasFibreChannelAdapter != "" {
8792 objectMap["hasFibreChannelAdapter"] = hvvmd.HasFibreChannelAdapter
8793 }
8794 if hvvmd.HasSharedVhd != "" {
8795 objectMap["hasSharedVhd"] = hvvmd.HasSharedVhd
8796 }
8797 if hvvmd.InstanceType != "" {
8798 objectMap["instanceType"] = hvvmd.InstanceType
8799 }
8800 return json.Marshal(objectMap)
8801 }
8802
8803
8804 func (hvvmd HyperVVirtualMachineDetails) AsHyperVVirtualMachineDetails() (*HyperVVirtualMachineDetails, bool) {
8805 return &hvvmd, true
8806 }
8807
8808
8809 func (hvvmd HyperVVirtualMachineDetails) AsReplicationGroupDetails() (*ReplicationGroupDetails, bool) {
8810 return nil, false
8811 }
8812
8813
8814 func (hvvmd HyperVVirtualMachineDetails) AsVmmVirtualMachineDetails() (*VmmVirtualMachineDetails, bool) {
8815 return nil, false
8816 }
8817
8818
8819 func (hvvmd HyperVVirtualMachineDetails) AsVMwareVirtualMachineDetails() (*VMwareVirtualMachineDetails, bool) {
8820 return nil, false
8821 }
8822
8823
8824 func (hvvmd HyperVVirtualMachineDetails) AsConfigurationSettings() (*ConfigurationSettings, bool) {
8825 return nil, false
8826 }
8827
8828
8829 func (hvvmd HyperVVirtualMachineDetails) AsBasicConfigurationSettings() (BasicConfigurationSettings, bool) {
8830 return &hvvmd, true
8831 }
8832
8833
8834 type IdentityProviderDetails struct {
8835
8836 TenantID *string `json:"tenantId,omitempty"`
8837
8838 ApplicationID *string `json:"applicationId,omitempty"`
8839
8840 ObjectID *string `json:"objectId,omitempty"`
8841
8842 Audience *string `json:"audience,omitempty"`
8843
8844 AadAuthority *string `json:"aadAuthority,omitempty"`
8845 }
8846
8847
8848 type IdentityProviderInput struct {
8849
8850 TenantID *string `json:"tenantId,omitempty"`
8851
8852 ApplicationID *string `json:"applicationId,omitempty"`
8853
8854 ObjectID *string `json:"objectId,omitempty"`
8855
8856 Audience *string `json:"audience,omitempty"`
8857
8858 AadAuthority *string `json:"aadAuthority,omitempty"`
8859 }
8860
8861
8862
8863 type InconsistentVMDetails struct {
8864
8865 VMName *string `json:"vmName,omitempty"`
8866
8867 CloudName *string `json:"cloudName,omitempty"`
8868
8869 Details *[]string `json:"details,omitempty"`
8870
8871 ErrorIds *[]string `json:"errorIds,omitempty"`
8872 }
8873
8874
8875 type InitialReplicationDetails struct {
8876
8877 InitialReplicationType *string `json:"initialReplicationType,omitempty"`
8878
8879 InitialReplicationProgressPercentage *string `json:"initialReplicationProgressPercentage,omitempty"`
8880 }
8881
8882
8883 type InlineWorkflowTaskDetails struct {
8884
8885 WorkflowIds *[]string `json:"workflowIds,omitempty"`
8886
8887 ChildTasks *[]ASRTask `json:"childTasks,omitempty"`
8888
8889 InstanceType InstanceTypeBasicGroupTaskDetails `json:"instanceType,omitempty"`
8890 }
8891
8892
8893 func (iwtd InlineWorkflowTaskDetails) MarshalJSON() ([]byte, error) {
8894 iwtd.InstanceType = InstanceTypeInlineWorkflowTaskDetails
8895 objectMap := make(map[string]interface{})
8896 if iwtd.WorkflowIds != nil {
8897 objectMap["workflowIds"] = iwtd.WorkflowIds
8898 }
8899 if iwtd.ChildTasks != nil {
8900 objectMap["childTasks"] = iwtd.ChildTasks
8901 }
8902 if iwtd.InstanceType != "" {
8903 objectMap["instanceType"] = iwtd.InstanceType
8904 }
8905 return json.Marshal(objectMap)
8906 }
8907
8908
8909 func (iwtd InlineWorkflowTaskDetails) AsInlineWorkflowTaskDetails() (*InlineWorkflowTaskDetails, bool) {
8910 return &iwtd, true
8911 }
8912
8913
8914 func (iwtd InlineWorkflowTaskDetails) AsRecoveryPlanGroupTaskDetails() (*RecoveryPlanGroupTaskDetails, bool) {
8915 return nil, false
8916 }
8917
8918
8919 func (iwtd InlineWorkflowTaskDetails) AsRecoveryPlanShutdownGroupTaskDetails() (*RecoveryPlanShutdownGroupTaskDetails, bool) {
8920 return nil, false
8921 }
8922
8923
8924 func (iwtd InlineWorkflowTaskDetails) AsGroupTaskDetails() (*GroupTaskDetails, bool) {
8925 return nil, false
8926 }
8927
8928
8929 func (iwtd InlineWorkflowTaskDetails) AsBasicGroupTaskDetails() (BasicGroupTaskDetails, bool) {
8930 return &iwtd, true
8931 }
8932
8933
8934 type InMageAgentDetails struct {
8935
8936 AgentVersion *string `json:"agentVersion,omitempty"`
8937
8938 AgentUpdateStatus *string `json:"agentUpdateStatus,omitempty"`
8939
8940 PostUpdateRebootStatus *string `json:"postUpdateRebootStatus,omitempty"`
8941
8942 AgentExpiryDate *date.Time `json:"agentExpiryDate,omitempty"`
8943 }
8944
8945
8946 type InMageAgentVersionDetails struct {
8947
8948 PostUpdateRebootStatus *string `json:"postUpdateRebootStatus,omitempty"`
8949
8950 Version *string `json:"version,omitempty"`
8951
8952 ExpiryDate *date.Time `json:"expiryDate,omitempty"`
8953
8954 Status AgentVersionStatus `json:"status,omitempty"`
8955 }
8956
8957
8958 type InMageAzureV2ApplyRecoveryPointInput struct {
8959
8960 VaultLocation *string `json:"vaultLocation,omitempty"`
8961
8962 InstanceType InstanceTypeBasicApplyRecoveryPointProviderSpecificInput `json:"instanceType,omitempty"`
8963 }
8964
8965
8966 func (imavarpi InMageAzureV2ApplyRecoveryPointInput) MarshalJSON() ([]byte, error) {
8967 imavarpi.InstanceType = InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeInMageAzureV2
8968 objectMap := make(map[string]interface{})
8969 if imavarpi.VaultLocation != nil {
8970 objectMap["vaultLocation"] = imavarpi.VaultLocation
8971 }
8972 if imavarpi.InstanceType != "" {
8973 objectMap["instanceType"] = imavarpi.InstanceType
8974 }
8975 return json.Marshal(objectMap)
8976 }
8977
8978
8979 func (imavarpi InMageAzureV2ApplyRecoveryPointInput) AsA2AApplyRecoveryPointInput() (*A2AApplyRecoveryPointInput, bool) {
8980 return nil, false
8981 }
8982
8983
8984 func (imavarpi InMageAzureV2ApplyRecoveryPointInput) AsHyperVReplicaAzureApplyRecoveryPointInput() (*HyperVReplicaAzureApplyRecoveryPointInput, bool) {
8985 return nil, false
8986 }
8987
8988
8989 func (imavarpi InMageAzureV2ApplyRecoveryPointInput) AsInMageAzureV2ApplyRecoveryPointInput() (*InMageAzureV2ApplyRecoveryPointInput, bool) {
8990 return &imavarpi, true
8991 }
8992
8993
8994 func (imavarpi InMageAzureV2ApplyRecoveryPointInput) AsInMageRcmApplyRecoveryPointInput() (*InMageRcmApplyRecoveryPointInput, bool) {
8995 return nil, false
8996 }
8997
8998
8999 func (imavarpi InMageAzureV2ApplyRecoveryPointInput) AsApplyRecoveryPointProviderSpecificInput() (*ApplyRecoveryPointProviderSpecificInput, bool) {
9000 return nil, false
9001 }
9002
9003
9004 func (imavarpi InMageAzureV2ApplyRecoveryPointInput) AsBasicApplyRecoveryPointProviderSpecificInput() (BasicApplyRecoveryPointProviderSpecificInput, bool) {
9005 return &imavarpi, true
9006 }
9007
9008
9009 type InMageAzureV2DiskInputDetails struct {
9010
9011 DiskID *string `json:"diskId,omitempty"`
9012
9013 LogStorageAccountID *string `json:"logStorageAccountId,omitempty"`
9014
9015 DiskType DiskAccountType `json:"diskType,omitempty"`
9016
9017 DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`
9018 }
9019
9020
9021 type InMageAzureV2EnableProtectionInput struct {
9022
9023 MasterTargetID *string `json:"masterTargetId,omitempty"`
9024
9025 ProcessServerID *string `json:"processServerId,omitempty"`
9026
9027 StorageAccountID *string `json:"storageAccountId,omitempty"`
9028
9029 RunAsAccountID *string `json:"runAsAccountId,omitempty"`
9030
9031 MultiVMGroupID *string `json:"multiVmGroupId,omitempty"`
9032
9033 MultiVMGroupName *string `json:"multiVmGroupName,omitempty"`
9034
9035 DisksToInclude *[]InMageAzureV2DiskInputDetails `json:"disksToInclude,omitempty"`
9036
9037 TargetAzureNetworkID *string `json:"targetAzureNetworkId,omitempty"`
9038
9039 TargetAzureSubnetID *string `json:"targetAzureSubnetId,omitempty"`
9040
9041 EnableRdpOnTargetOption *string `json:"enableRdpOnTargetOption,omitempty"`
9042
9043 TargetAzureVMName *string `json:"targetAzureVmName,omitempty"`
9044
9045 LogStorageAccountID *string `json:"logStorageAccountId,omitempty"`
9046
9047 TargetAzureV1ResourceGroupID *string `json:"targetAzureV1ResourceGroupId,omitempty"`
9048
9049 TargetAzureV2ResourceGroupID *string `json:"targetAzureV2ResourceGroupId,omitempty"`
9050
9051 DiskType DiskAccountType `json:"diskType,omitempty"`
9052
9053 DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`
9054
9055 TargetAvailabilityZone *string `json:"targetAvailabilityZone,omitempty"`
9056
9057 TargetProximityPlacementGroupID *string `json:"targetProximityPlacementGroupId,omitempty"`
9058
9059 InstanceType InstanceTypeBasicEnableProtectionProviderSpecificInput `json:"instanceType,omitempty"`
9060 }
9061
9062
9063 func (imavepi InMageAzureV2EnableProtectionInput) MarshalJSON() ([]byte, error) {
9064 imavepi.InstanceType = InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMageAzureV2
9065 objectMap := make(map[string]interface{})
9066 if imavepi.MasterTargetID != nil {
9067 objectMap["masterTargetId"] = imavepi.MasterTargetID
9068 }
9069 if imavepi.ProcessServerID != nil {
9070 objectMap["processServerId"] = imavepi.ProcessServerID
9071 }
9072 if imavepi.StorageAccountID != nil {
9073 objectMap["storageAccountId"] = imavepi.StorageAccountID
9074 }
9075 if imavepi.RunAsAccountID != nil {
9076 objectMap["runAsAccountId"] = imavepi.RunAsAccountID
9077 }
9078 if imavepi.MultiVMGroupID != nil {
9079 objectMap["multiVmGroupId"] = imavepi.MultiVMGroupID
9080 }
9081 if imavepi.MultiVMGroupName != nil {
9082 objectMap["multiVmGroupName"] = imavepi.MultiVMGroupName
9083 }
9084 if imavepi.DisksToInclude != nil {
9085 objectMap["disksToInclude"] = imavepi.DisksToInclude
9086 }
9087 if imavepi.TargetAzureNetworkID != nil {
9088 objectMap["targetAzureNetworkId"] = imavepi.TargetAzureNetworkID
9089 }
9090 if imavepi.TargetAzureSubnetID != nil {
9091 objectMap["targetAzureSubnetId"] = imavepi.TargetAzureSubnetID
9092 }
9093 if imavepi.EnableRdpOnTargetOption != nil {
9094 objectMap["enableRdpOnTargetOption"] = imavepi.EnableRdpOnTargetOption
9095 }
9096 if imavepi.TargetAzureVMName != nil {
9097 objectMap["targetAzureVmName"] = imavepi.TargetAzureVMName
9098 }
9099 if imavepi.LogStorageAccountID != nil {
9100 objectMap["logStorageAccountId"] = imavepi.LogStorageAccountID
9101 }
9102 if imavepi.TargetAzureV1ResourceGroupID != nil {
9103 objectMap["targetAzureV1ResourceGroupId"] = imavepi.TargetAzureV1ResourceGroupID
9104 }
9105 if imavepi.TargetAzureV2ResourceGroupID != nil {
9106 objectMap["targetAzureV2ResourceGroupId"] = imavepi.TargetAzureV2ResourceGroupID
9107 }
9108 if imavepi.DiskType != "" {
9109 objectMap["diskType"] = imavepi.DiskType
9110 }
9111 if imavepi.DiskEncryptionSetID != nil {
9112 objectMap["diskEncryptionSetId"] = imavepi.DiskEncryptionSetID
9113 }
9114 if imavepi.TargetAvailabilityZone != nil {
9115 objectMap["targetAvailabilityZone"] = imavepi.TargetAvailabilityZone
9116 }
9117 if imavepi.TargetProximityPlacementGroupID != nil {
9118 objectMap["targetProximityPlacementGroupId"] = imavepi.TargetProximityPlacementGroupID
9119 }
9120 if imavepi.InstanceType != "" {
9121 objectMap["instanceType"] = imavepi.InstanceType
9122 }
9123 return json.Marshal(objectMap)
9124 }
9125
9126
9127 func (imavepi InMageAzureV2EnableProtectionInput) AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool) {
9128 return nil, false
9129 }
9130
9131
9132 func (imavepi InMageAzureV2EnableProtectionInput) AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool) {
9133 return nil, false
9134 }
9135
9136
9137 func (imavepi InMageAzureV2EnableProtectionInput) AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool) {
9138 return &imavepi, true
9139 }
9140
9141
9142 func (imavepi InMageAzureV2EnableProtectionInput) AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool) {
9143 return nil, false
9144 }
9145
9146
9147 func (imavepi InMageAzureV2EnableProtectionInput) AsInMageRcmEnableProtectionInput() (*InMageRcmEnableProtectionInput, bool) {
9148 return nil, false
9149 }
9150
9151
9152 func (imavepi InMageAzureV2EnableProtectionInput) AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool) {
9153 return nil, false
9154 }
9155
9156
9157 func (imavepi InMageAzureV2EnableProtectionInput) AsEnableProtectionProviderSpecificInput() (*EnableProtectionProviderSpecificInput, bool) {
9158 return nil, false
9159 }
9160
9161
9162 func (imavepi InMageAzureV2EnableProtectionInput) AsBasicEnableProtectionProviderSpecificInput() (BasicEnableProtectionProviderSpecificInput, bool) {
9163 return &imavepi, true
9164 }
9165
9166
9167 type InMageAzureV2EventDetails struct {
9168
9169 EventType *string `json:"eventType,omitempty"`
9170
9171 Category *string `json:"category,omitempty"`
9172
9173 Component *string `json:"component,omitempty"`
9174
9175 CorrectiveAction *string `json:"correctiveAction,omitempty"`
9176
9177 Details *string `json:"details,omitempty"`
9178
9179 Summary *string `json:"summary,omitempty"`
9180
9181 SiteName *string `json:"siteName,omitempty"`
9182
9183 InstanceType InstanceTypeBasicEventProviderSpecificDetails `json:"instanceType,omitempty"`
9184 }
9185
9186
9187 func (imaved InMageAzureV2EventDetails) MarshalJSON() ([]byte, error) {
9188 imaved.InstanceType = InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageAzureV2
9189 objectMap := make(map[string]interface{})
9190 if imaved.EventType != nil {
9191 objectMap["eventType"] = imaved.EventType
9192 }
9193 if imaved.Category != nil {
9194 objectMap["category"] = imaved.Category
9195 }
9196 if imaved.Component != nil {
9197 objectMap["component"] = imaved.Component
9198 }
9199 if imaved.CorrectiveAction != nil {
9200 objectMap["correctiveAction"] = imaved.CorrectiveAction
9201 }
9202 if imaved.Details != nil {
9203 objectMap["details"] = imaved.Details
9204 }
9205 if imaved.Summary != nil {
9206 objectMap["summary"] = imaved.Summary
9207 }
9208 if imaved.SiteName != nil {
9209 objectMap["siteName"] = imaved.SiteName
9210 }
9211 if imaved.InstanceType != "" {
9212 objectMap["instanceType"] = imaved.InstanceType
9213 }
9214 return json.Marshal(objectMap)
9215 }
9216
9217
9218 func (imaved InMageAzureV2EventDetails) AsA2AEventDetails() (*A2AEventDetails, bool) {
9219 return nil, false
9220 }
9221
9222
9223 func (imaved InMageAzureV2EventDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) {
9224 return nil, false
9225 }
9226
9227
9228 func (imaved InMageAzureV2EventDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) {
9229 return nil, false
9230 }
9231
9232
9233 func (imaved InMageAzureV2EventDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) {
9234 return nil, false
9235 }
9236
9237
9238 func (imaved InMageAzureV2EventDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) {
9239 return nil, false
9240 }
9241
9242
9243 func (imaved InMageAzureV2EventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) {
9244 return &imaved, true
9245 }
9246
9247
9248 func (imaved InMageAzureV2EventDetails) AsInMageRcmEventDetails() (*InMageRcmEventDetails, bool) {
9249 return nil, false
9250 }
9251
9252
9253 func (imaved InMageAzureV2EventDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) {
9254 return nil, false
9255 }
9256
9257
9258 func (imaved InMageAzureV2EventDetails) AsBasicEventProviderSpecificDetails() (BasicEventProviderSpecificDetails, bool) {
9259 return &imaved, true
9260 }
9261
9262
9263 type InMageAzureV2FailoverProviderInput struct {
9264
9265 VaultLocation *string `json:"vaultLocation,omitempty"`
9266
9267 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
9268
9269 InstanceType InstanceTypeBasicProviderSpecificFailoverInput `json:"instanceType,omitempty"`
9270 }
9271
9272
9273 func (imavfpi InMageAzureV2FailoverProviderInput) MarshalJSON() ([]byte, error) {
9274 imavfpi.InstanceType = InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMageAzureV2
9275 objectMap := make(map[string]interface{})
9276 if imavfpi.VaultLocation != nil {
9277 objectMap["vaultLocation"] = imavfpi.VaultLocation
9278 }
9279 if imavfpi.RecoveryPointID != nil {
9280 objectMap["recoveryPointId"] = imavfpi.RecoveryPointID
9281 }
9282 if imavfpi.InstanceType != "" {
9283 objectMap["instanceType"] = imavfpi.InstanceType
9284 }
9285 return json.Marshal(objectMap)
9286 }
9287
9288
9289 func (imavfpi InMageAzureV2FailoverProviderInput) AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool) {
9290 return nil, false
9291 }
9292
9293
9294 func (imavfpi InMageAzureV2FailoverProviderInput) AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool) {
9295 return nil, false
9296 }
9297
9298
9299 func (imavfpi InMageAzureV2FailoverProviderInput) AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool) {
9300 return nil, false
9301 }
9302
9303
9304 func (imavfpi InMageAzureV2FailoverProviderInput) AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool) {
9305 return &imavfpi, true
9306 }
9307
9308
9309 func (imavfpi InMageAzureV2FailoverProviderInput) AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool) {
9310 return nil, false
9311 }
9312
9313
9314 func (imavfpi InMageAzureV2FailoverProviderInput) AsProviderSpecificFailoverInput() (*ProviderSpecificFailoverInput, bool) {
9315 return nil, false
9316 }
9317
9318
9319 func (imavfpi InMageAzureV2FailoverProviderInput) AsBasicProviderSpecificFailoverInput() (BasicProviderSpecificFailoverInput, bool) {
9320 return &imavfpi, true
9321 }
9322
9323
9324 type InMageAzureV2ManagedDiskDetails struct {
9325
9326 DiskID *string `json:"diskId,omitempty"`
9327
9328 SeedManagedDiskID *string `json:"seedManagedDiskId,omitempty"`
9329
9330 ReplicaDiskType *string `json:"replicaDiskType,omitempty"`
9331 }
9332
9333
9334 type InMageAzureV2PolicyDetails struct {
9335
9336 CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"`
9337
9338 RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"`
9339
9340 RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"`
9341
9342 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"`
9343
9344 MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"`
9345
9346 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"`
9347 }
9348
9349
9350 func (imavpd InMageAzureV2PolicyDetails) MarshalJSON() ([]byte, error) {
9351 imavpd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2
9352 objectMap := make(map[string]interface{})
9353 if imavpd.CrashConsistentFrequencyInMinutes != nil {
9354 objectMap["crashConsistentFrequencyInMinutes"] = imavpd.CrashConsistentFrequencyInMinutes
9355 }
9356 if imavpd.RecoveryPointThresholdInMinutes != nil {
9357 objectMap["recoveryPointThresholdInMinutes"] = imavpd.RecoveryPointThresholdInMinutes
9358 }
9359 if imavpd.RecoveryPointHistory != nil {
9360 objectMap["recoveryPointHistory"] = imavpd.RecoveryPointHistory
9361 }
9362 if imavpd.AppConsistentFrequencyInMinutes != nil {
9363 objectMap["appConsistentFrequencyInMinutes"] = imavpd.AppConsistentFrequencyInMinutes
9364 }
9365 if imavpd.MultiVMSyncStatus != nil {
9366 objectMap["multiVmSyncStatus"] = imavpd.MultiVMSyncStatus
9367 }
9368 if imavpd.InstanceType != "" {
9369 objectMap["instanceType"] = imavpd.InstanceType
9370 }
9371 return json.Marshal(objectMap)
9372 }
9373
9374
9375 func (imavpd InMageAzureV2PolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) {
9376 return nil, false
9377 }
9378
9379
9380 func (imavpd InMageAzureV2PolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) {
9381 return nil, false
9382 }
9383
9384
9385 func (imavpd InMageAzureV2PolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) {
9386 return nil, false
9387 }
9388
9389
9390 func (imavpd InMageAzureV2PolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) {
9391 return nil, false
9392 }
9393
9394
9395 func (imavpd InMageAzureV2PolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) {
9396 return nil, false
9397 }
9398
9399
9400 func (imavpd InMageAzureV2PolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) {
9401 return &imavpd, true
9402 }
9403
9404
9405 func (imavpd InMageAzureV2PolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) {
9406 return nil, false
9407 }
9408
9409
9410 func (imavpd InMageAzureV2PolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) {
9411 return nil, false
9412 }
9413
9414
9415 func (imavpd InMageAzureV2PolicyDetails) AsInMageRcmPolicyDetails() (*InMageRcmPolicyDetails, bool) {
9416 return nil, false
9417 }
9418
9419
9420 func (imavpd InMageAzureV2PolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) {
9421 return nil, false
9422 }
9423
9424
9425 func (imavpd InMageAzureV2PolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) {
9426 return nil, false
9427 }
9428
9429
9430 func (imavpd InMageAzureV2PolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) {
9431 return nil, false
9432 }
9433
9434
9435 func (imavpd InMageAzureV2PolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) {
9436 return &imavpd, true
9437 }
9438
9439
9440 type InMageAzureV2PolicyInput struct {
9441
9442 RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"`
9443
9444 RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"`
9445
9446 CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"`
9447
9448 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"`
9449
9450 MultiVMSyncStatus SetMultiVMSyncStatus `json:"multiVmSyncStatus,omitempty"`
9451
9452 InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"`
9453 }
9454
9455
9456 func (imavpi InMageAzureV2PolicyInput) MarshalJSON() ([]byte, error) {
9457 imavpi.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMageAzureV2
9458 objectMap := make(map[string]interface{})
9459 if imavpi.RecoveryPointThresholdInMinutes != nil {
9460 objectMap["recoveryPointThresholdInMinutes"] = imavpi.RecoveryPointThresholdInMinutes
9461 }
9462 if imavpi.RecoveryPointHistory != nil {
9463 objectMap["recoveryPointHistory"] = imavpi.RecoveryPointHistory
9464 }
9465 if imavpi.CrashConsistentFrequencyInMinutes != nil {
9466 objectMap["crashConsistentFrequencyInMinutes"] = imavpi.CrashConsistentFrequencyInMinutes
9467 }
9468 if imavpi.AppConsistentFrequencyInMinutes != nil {
9469 objectMap["appConsistentFrequencyInMinutes"] = imavpi.AppConsistentFrequencyInMinutes
9470 }
9471 if imavpi.MultiVMSyncStatus != "" {
9472 objectMap["multiVmSyncStatus"] = imavpi.MultiVMSyncStatus
9473 }
9474 if imavpi.InstanceType != "" {
9475 objectMap["instanceType"] = imavpi.InstanceType
9476 }
9477 return json.Marshal(objectMap)
9478 }
9479
9480
9481 func (imavpi InMageAzureV2PolicyInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) {
9482 return nil, false
9483 }
9484
9485
9486 func (imavpi InMageAzureV2PolicyInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) {
9487 return nil, false
9488 }
9489
9490
9491 func (imavpi InMageAzureV2PolicyInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) {
9492 return nil, false
9493 }
9494
9495
9496 func (imavpi InMageAzureV2PolicyInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) {
9497 return nil, false
9498 }
9499
9500
9501 func (imavpi InMageAzureV2PolicyInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) {
9502 return &imavpi, true
9503 }
9504
9505
9506 func (imavpi InMageAzureV2PolicyInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) {
9507 return nil, false
9508 }
9509
9510
9511 func (imavpi InMageAzureV2PolicyInput) AsInMageRcmPolicyCreationInput() (*InMageRcmPolicyCreationInput, bool) {
9512 return nil, false
9513 }
9514
9515
9516 func (imavpi InMageAzureV2PolicyInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) {
9517 return nil, false
9518 }
9519
9520
9521 func (imavpi InMageAzureV2PolicyInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) {
9522 return nil, false
9523 }
9524
9525
9526 func (imavpi InMageAzureV2PolicyInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) {
9527 return &imavpi, true
9528 }
9529
9530
9531 type InMageAzureV2ProtectedDiskDetails struct {
9532
9533 DiskID *string `json:"diskId,omitempty"`
9534
9535 DiskName *string `json:"diskName,omitempty"`
9536
9537 ProtectionStage *string `json:"protectionStage,omitempty"`
9538
9539 HealthErrorCode *string `json:"healthErrorCode,omitempty"`
9540
9541 RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"`
9542
9543 ResyncRequired *string `json:"resyncRequired,omitempty"`
9544
9545 ResyncProgressPercentage *int32 `json:"resyncProgressPercentage,omitempty"`
9546
9547 ResyncDurationInSeconds *int64 `json:"resyncDurationInSeconds,omitempty"`
9548
9549 DiskCapacityInBytes *int64 `json:"diskCapacityInBytes,omitempty"`
9550
9551 FileSystemCapacityInBytes *int64 `json:"fileSystemCapacityInBytes,omitempty"`
9552
9553 SourceDataInMegaBytes *float64 `json:"sourceDataInMegaBytes,omitempty"`
9554
9555 PsDataInMegaBytes *float64 `json:"psDataInMegaBytes,omitempty"`
9556
9557 TargetDataInMegaBytes *float64 `json:"targetDataInMegaBytes,omitempty"`
9558
9559 DiskResized *string `json:"diskResized,omitempty"`
9560
9561 LastRpoCalculatedTime *date.Time `json:"lastRpoCalculatedTime,omitempty"`
9562 }
9563
9564
9565 type InMageAzureV2RecoveryPointDetails struct {
9566
9567 IsMultiVMSyncPoint *string `json:"isMultiVmSyncPoint,omitempty"`
9568
9569 InstanceType InstanceTypeBasicProviderSpecificRecoveryPointDetails `json:"instanceType,omitempty"`
9570 }
9571
9572
9573 func (imavrpd InMageAzureV2RecoveryPointDetails) MarshalJSON() ([]byte, error) {
9574 imavrpd.InstanceType = InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeInMageAzureV2
9575 objectMap := make(map[string]interface{})
9576 if imavrpd.IsMultiVMSyncPoint != nil {
9577 objectMap["isMultiVmSyncPoint"] = imavrpd.IsMultiVMSyncPoint
9578 }
9579 if imavrpd.InstanceType != "" {
9580 objectMap["instanceType"] = imavrpd.InstanceType
9581 }
9582 return json.Marshal(objectMap)
9583 }
9584
9585
9586 func (imavrpd InMageAzureV2RecoveryPointDetails) AsA2ARecoveryPointDetails() (*A2ARecoveryPointDetails, bool) {
9587 return nil, false
9588 }
9589
9590
9591 func (imavrpd InMageAzureV2RecoveryPointDetails) AsInMageAzureV2RecoveryPointDetails() (*InMageAzureV2RecoveryPointDetails, bool) {
9592 return &imavrpd, true
9593 }
9594
9595
9596 func (imavrpd InMageAzureV2RecoveryPointDetails) AsInMageRcmRecoveryPointDetails() (*InMageRcmRecoveryPointDetails, bool) {
9597 return nil, false
9598 }
9599
9600
9601 func (imavrpd InMageAzureV2RecoveryPointDetails) AsProviderSpecificRecoveryPointDetails() (*ProviderSpecificRecoveryPointDetails, bool) {
9602 return nil, false
9603 }
9604
9605
9606 func (imavrpd InMageAzureV2RecoveryPointDetails) AsBasicProviderSpecificRecoveryPointDetails() (BasicProviderSpecificRecoveryPointDetails, bool) {
9607 return &imavrpd, true
9608 }
9609
9610
9611 type InMageAzureV2ReplicationDetails struct {
9612
9613 InfrastructureVMID *string `json:"infrastructureVmId,omitempty"`
9614
9615 VCenterInfrastructureID *string `json:"vCenterInfrastructureId,omitempty"`
9616
9617 ProtectionStage *string `json:"protectionStage,omitempty"`
9618
9619 VMID *string `json:"vmId,omitempty"`
9620
9621 VMProtectionState *string `json:"vmProtectionState,omitempty"`
9622
9623 VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"`
9624
9625 ResyncProgressPercentage *int32 `json:"resyncProgressPercentage,omitempty"`
9626
9627 RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"`
9628
9629 CompressedDataRateInMB *float64 `json:"compressedDataRateInMB,omitempty"`
9630
9631 UncompressedDataRateInMB *float64 `json:"uncompressedDataRateInMB,omitempty"`
9632
9633 IPAddress *string `json:"ipAddress,omitempty"`
9634
9635 AgentVersion *string `json:"agentVersion,omitempty"`
9636
9637 AgentExpiryDate *date.Time `json:"agentExpiryDate,omitempty"`
9638
9639 IsAgentUpdateRequired *string `json:"isAgentUpdateRequired,omitempty"`
9640
9641 IsRebootAfterUpdateRequired *string `json:"isRebootAfterUpdateRequired,omitempty"`
9642
9643 LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"`
9644
9645 ProcessServerID *string `json:"processServerId,omitempty"`
9646
9647 ProcessServerName *string `json:"processServerName,omitempty"`
9648
9649 MultiVMGroupID *string `json:"multiVmGroupId,omitempty"`
9650
9651 MultiVMGroupName *string `json:"multiVmGroupName,omitempty"`
9652
9653 MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"`
9654
9655 ProtectedDisks *[]InMageAzureV2ProtectedDiskDetails `json:"protectedDisks,omitempty"`
9656
9657 DiskResized *string `json:"diskResized,omitempty"`
9658
9659 MasterTargetID *string `json:"masterTargetId,omitempty"`
9660
9661 SourceVMCPUCount *int32 `json:"sourceVmCpuCount,omitempty"`
9662
9663 SourceVMRAMSizeInMB *int32 `json:"sourceVmRamSizeInMB,omitempty"`
9664
9665 OsType *string `json:"osType,omitempty"`
9666
9667 VhdName *string `json:"vhdName,omitempty"`
9668
9669 OsDiskID *string `json:"osDiskId,omitempty"`
9670
9671 AzureVMDiskDetails *[]AzureVMDiskDetails `json:"azureVMDiskDetails,omitempty"`
9672
9673 RecoveryAzureVMName *string `json:"recoveryAzureVMName,omitempty"`
9674
9675 RecoveryAzureVMSize *string `json:"recoveryAzureVMSize,omitempty"`
9676
9677 RecoveryAzureStorageAccount *string `json:"recoveryAzureStorageAccount,omitempty"`
9678
9679 RecoveryAzureLogStorageAccountID *string `json:"recoveryAzureLogStorageAccountId,omitempty"`
9680
9681 VMNics *[]VMNicDetails `json:"vmNics,omitempty"`
9682
9683 SelectedRecoveryAzureNetworkID *string `json:"selectedRecoveryAzureNetworkId,omitempty"`
9684
9685 SelectedTfoAzureNetworkID *string `json:"selectedTfoAzureNetworkId,omitempty"`
9686
9687 SelectedSourceNicID *string `json:"selectedSourceNicId,omitempty"`
9688
9689 DiscoveryType *string `json:"discoveryType,omitempty"`
9690
9691 EnableRdpOnTargetOption *string `json:"enableRdpOnTargetOption,omitempty"`
9692
9693 Datastores *[]string `json:"datastores,omitempty"`
9694
9695 TargetVMID *string `json:"targetVmId,omitempty"`
9696
9697 RecoveryAzureResourceGroupID *string `json:"recoveryAzureResourceGroupId,omitempty"`
9698
9699 RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"`
9700
9701 TargetAvailabilityZone *string `json:"targetAvailabilityZone,omitempty"`
9702
9703 TargetProximityPlacementGroupID *string `json:"targetProximityPlacementGroupId,omitempty"`
9704
9705 UseManagedDisks *string `json:"useManagedDisks,omitempty"`
9706
9707 LicenseType *string `json:"licenseType,omitempty"`
9708
9709 ValidationErrors *[]HealthError `json:"validationErrors,omitempty"`
9710
9711 LastRpoCalculatedTime *date.Time `json:"lastRpoCalculatedTime,omitempty"`
9712
9713 LastUpdateReceivedTime *date.Time `json:"lastUpdateReceivedTime,omitempty"`
9714
9715 ReplicaID *string `json:"replicaId,omitempty"`
9716
9717 OsVersion *string `json:"osVersion,omitempty"`
9718
9719 ProtectedManagedDisks *[]InMageAzureV2ManagedDiskDetails `json:"protectedManagedDisks,omitempty"`
9720
9721 InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"`
9722 }
9723
9724
9725 func (imavrd InMageAzureV2ReplicationDetails) MarshalJSON() ([]byte, error) {
9726 imavrd.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMageAzureV2
9727 objectMap := make(map[string]interface{})
9728 if imavrd.InfrastructureVMID != nil {
9729 objectMap["infrastructureVmId"] = imavrd.InfrastructureVMID
9730 }
9731 if imavrd.VCenterInfrastructureID != nil {
9732 objectMap["vCenterInfrastructureId"] = imavrd.VCenterInfrastructureID
9733 }
9734 if imavrd.ProtectionStage != nil {
9735 objectMap["protectionStage"] = imavrd.ProtectionStage
9736 }
9737 if imavrd.VMID != nil {
9738 objectMap["vmId"] = imavrd.VMID
9739 }
9740 if imavrd.VMProtectionState != nil {
9741 objectMap["vmProtectionState"] = imavrd.VMProtectionState
9742 }
9743 if imavrd.VMProtectionStateDescription != nil {
9744 objectMap["vmProtectionStateDescription"] = imavrd.VMProtectionStateDescription
9745 }
9746 if imavrd.ResyncProgressPercentage != nil {
9747 objectMap["resyncProgressPercentage"] = imavrd.ResyncProgressPercentage
9748 }
9749 if imavrd.RpoInSeconds != nil {
9750 objectMap["rpoInSeconds"] = imavrd.RpoInSeconds
9751 }
9752 if imavrd.CompressedDataRateInMB != nil {
9753 objectMap["compressedDataRateInMB"] = imavrd.CompressedDataRateInMB
9754 }
9755 if imavrd.UncompressedDataRateInMB != nil {
9756 objectMap["uncompressedDataRateInMB"] = imavrd.UncompressedDataRateInMB
9757 }
9758 if imavrd.IPAddress != nil {
9759 objectMap["ipAddress"] = imavrd.IPAddress
9760 }
9761 if imavrd.AgentVersion != nil {
9762 objectMap["agentVersion"] = imavrd.AgentVersion
9763 }
9764 if imavrd.AgentExpiryDate != nil {
9765 objectMap["agentExpiryDate"] = imavrd.AgentExpiryDate
9766 }
9767 if imavrd.IsAgentUpdateRequired != nil {
9768 objectMap["isAgentUpdateRequired"] = imavrd.IsAgentUpdateRequired
9769 }
9770 if imavrd.IsRebootAfterUpdateRequired != nil {
9771 objectMap["isRebootAfterUpdateRequired"] = imavrd.IsRebootAfterUpdateRequired
9772 }
9773 if imavrd.LastHeartbeat != nil {
9774 objectMap["lastHeartbeat"] = imavrd.LastHeartbeat
9775 }
9776 if imavrd.ProcessServerID != nil {
9777 objectMap["processServerId"] = imavrd.ProcessServerID
9778 }
9779 if imavrd.MultiVMGroupID != nil {
9780 objectMap["multiVmGroupId"] = imavrd.MultiVMGroupID
9781 }
9782 if imavrd.MultiVMGroupName != nil {
9783 objectMap["multiVmGroupName"] = imavrd.MultiVMGroupName
9784 }
9785 if imavrd.MultiVMSyncStatus != nil {
9786 objectMap["multiVmSyncStatus"] = imavrd.MultiVMSyncStatus
9787 }
9788 if imavrd.ProtectedDisks != nil {
9789 objectMap["protectedDisks"] = imavrd.ProtectedDisks
9790 }
9791 if imavrd.DiskResized != nil {
9792 objectMap["diskResized"] = imavrd.DiskResized
9793 }
9794 if imavrd.MasterTargetID != nil {
9795 objectMap["masterTargetId"] = imavrd.MasterTargetID
9796 }
9797 if imavrd.SourceVMCPUCount != nil {
9798 objectMap["sourceVmCpuCount"] = imavrd.SourceVMCPUCount
9799 }
9800 if imavrd.SourceVMRAMSizeInMB != nil {
9801 objectMap["sourceVmRamSizeInMB"] = imavrd.SourceVMRAMSizeInMB
9802 }
9803 if imavrd.OsType != nil {
9804 objectMap["osType"] = imavrd.OsType
9805 }
9806 if imavrd.VhdName != nil {
9807 objectMap["vhdName"] = imavrd.VhdName
9808 }
9809 if imavrd.OsDiskID != nil {
9810 objectMap["osDiskId"] = imavrd.OsDiskID
9811 }
9812 if imavrd.AzureVMDiskDetails != nil {
9813 objectMap["azureVMDiskDetails"] = imavrd.AzureVMDiskDetails
9814 }
9815 if imavrd.RecoveryAzureVMName != nil {
9816 objectMap["recoveryAzureVMName"] = imavrd.RecoveryAzureVMName
9817 }
9818 if imavrd.RecoveryAzureVMSize != nil {
9819 objectMap["recoveryAzureVMSize"] = imavrd.RecoveryAzureVMSize
9820 }
9821 if imavrd.RecoveryAzureStorageAccount != nil {
9822 objectMap["recoveryAzureStorageAccount"] = imavrd.RecoveryAzureStorageAccount
9823 }
9824 if imavrd.RecoveryAzureLogStorageAccountID != nil {
9825 objectMap["recoveryAzureLogStorageAccountId"] = imavrd.RecoveryAzureLogStorageAccountID
9826 }
9827 if imavrd.VMNics != nil {
9828 objectMap["vmNics"] = imavrd.VMNics
9829 }
9830 if imavrd.SelectedRecoveryAzureNetworkID != nil {
9831 objectMap["selectedRecoveryAzureNetworkId"] = imavrd.SelectedRecoveryAzureNetworkID
9832 }
9833 if imavrd.SelectedTfoAzureNetworkID != nil {
9834 objectMap["selectedTfoAzureNetworkId"] = imavrd.SelectedTfoAzureNetworkID
9835 }
9836 if imavrd.SelectedSourceNicID != nil {
9837 objectMap["selectedSourceNicId"] = imavrd.SelectedSourceNicID
9838 }
9839 if imavrd.DiscoveryType != nil {
9840 objectMap["discoveryType"] = imavrd.DiscoveryType
9841 }
9842 if imavrd.EnableRdpOnTargetOption != nil {
9843 objectMap["enableRdpOnTargetOption"] = imavrd.EnableRdpOnTargetOption
9844 }
9845 if imavrd.Datastores != nil {
9846 objectMap["datastores"] = imavrd.Datastores
9847 }
9848 if imavrd.TargetVMID != nil {
9849 objectMap["targetVmId"] = imavrd.TargetVMID
9850 }
9851 if imavrd.RecoveryAzureResourceGroupID != nil {
9852 objectMap["recoveryAzureResourceGroupId"] = imavrd.RecoveryAzureResourceGroupID
9853 }
9854 if imavrd.RecoveryAvailabilitySetID != nil {
9855 objectMap["recoveryAvailabilitySetId"] = imavrd.RecoveryAvailabilitySetID
9856 }
9857 if imavrd.TargetAvailabilityZone != nil {
9858 objectMap["targetAvailabilityZone"] = imavrd.TargetAvailabilityZone
9859 }
9860 if imavrd.TargetProximityPlacementGroupID != nil {
9861 objectMap["targetProximityPlacementGroupId"] = imavrd.TargetProximityPlacementGroupID
9862 }
9863 if imavrd.UseManagedDisks != nil {
9864 objectMap["useManagedDisks"] = imavrd.UseManagedDisks
9865 }
9866 if imavrd.LicenseType != nil {
9867 objectMap["licenseType"] = imavrd.LicenseType
9868 }
9869 if imavrd.ValidationErrors != nil {
9870 objectMap["validationErrors"] = imavrd.ValidationErrors
9871 }
9872 if imavrd.LastRpoCalculatedTime != nil {
9873 objectMap["lastRpoCalculatedTime"] = imavrd.LastRpoCalculatedTime
9874 }
9875 if imavrd.LastUpdateReceivedTime != nil {
9876 objectMap["lastUpdateReceivedTime"] = imavrd.LastUpdateReceivedTime
9877 }
9878 if imavrd.ReplicaID != nil {
9879 objectMap["replicaId"] = imavrd.ReplicaID
9880 }
9881 if imavrd.OsVersion != nil {
9882 objectMap["osVersion"] = imavrd.OsVersion
9883 }
9884 if imavrd.ProtectedManagedDisks != nil {
9885 objectMap["protectedManagedDisks"] = imavrd.ProtectedManagedDisks
9886 }
9887 if imavrd.InstanceType != "" {
9888 objectMap["instanceType"] = imavrd.InstanceType
9889 }
9890 return json.Marshal(objectMap)
9891 }
9892
9893
9894 func (imavrd InMageAzureV2ReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) {
9895 return nil, false
9896 }
9897
9898
9899 func (imavrd InMageAzureV2ReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) {
9900 return nil, false
9901 }
9902
9903
9904 func (imavrd InMageAzureV2ReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) {
9905 return nil, false
9906 }
9907
9908
9909 func (imavrd InMageAzureV2ReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) {
9910 return nil, false
9911 }
9912
9913
9914 func (imavrd InMageAzureV2ReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) {
9915 return nil, false
9916 }
9917
9918
9919 func (imavrd InMageAzureV2ReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) {
9920 return &imavrd, true
9921 }
9922
9923
9924 func (imavrd InMageAzureV2ReplicationDetails) AsInMageRcmReplicationDetails() (*InMageRcmReplicationDetails, bool) {
9925 return nil, false
9926 }
9927
9928
9929 func (imavrd InMageAzureV2ReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) {
9930 return nil, false
9931 }
9932
9933
9934 func (imavrd InMageAzureV2ReplicationDetails) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) {
9935 return nil, false
9936 }
9937
9938
9939 func (imavrd InMageAzureV2ReplicationDetails) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) {
9940 return &imavrd, true
9941 }
9942
9943
9944 type InMageAzureV2ReprotectInput struct {
9945
9946 MasterTargetID *string `json:"masterTargetId,omitempty"`
9947
9948 ProcessServerID *string `json:"processServerId,omitempty"`
9949
9950 StorageAccountID *string `json:"storageAccountId,omitempty"`
9951
9952 RunAsAccountID *string `json:"runAsAccountId,omitempty"`
9953
9954 PolicyID *string `json:"policyId,omitempty"`
9955
9956 LogStorageAccountID *string `json:"logStorageAccountId,omitempty"`
9957
9958 DisksToInclude *[]string `json:"disksToInclude,omitempty"`
9959
9960 InstanceType InstanceTypeBasicReverseReplicationProviderSpecificInput `json:"instanceType,omitempty"`
9961 }
9962
9963
9964 func (imavri InMageAzureV2ReprotectInput) MarshalJSON() ([]byte, error) {
9965 imavri.InstanceType = InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMageAzureV2
9966 objectMap := make(map[string]interface{})
9967 if imavri.MasterTargetID != nil {
9968 objectMap["masterTargetId"] = imavri.MasterTargetID
9969 }
9970 if imavri.ProcessServerID != nil {
9971 objectMap["processServerId"] = imavri.ProcessServerID
9972 }
9973 if imavri.StorageAccountID != nil {
9974 objectMap["storageAccountId"] = imavri.StorageAccountID
9975 }
9976 if imavri.RunAsAccountID != nil {
9977 objectMap["runAsAccountId"] = imavri.RunAsAccountID
9978 }
9979 if imavri.PolicyID != nil {
9980 objectMap["policyId"] = imavri.PolicyID
9981 }
9982 if imavri.LogStorageAccountID != nil {
9983 objectMap["logStorageAccountId"] = imavri.LogStorageAccountID
9984 }
9985 if imavri.DisksToInclude != nil {
9986 objectMap["disksToInclude"] = imavri.DisksToInclude
9987 }
9988 if imavri.InstanceType != "" {
9989 objectMap["instanceType"] = imavri.InstanceType
9990 }
9991 return json.Marshal(objectMap)
9992 }
9993
9994
9995 func (imavri InMageAzureV2ReprotectInput) AsA2AReprotectInput() (*A2AReprotectInput, bool) {
9996 return nil, false
9997 }
9998
9999
10000 func (imavri InMageAzureV2ReprotectInput) AsHyperVReplicaAzureReprotectInput() (*HyperVReplicaAzureReprotectInput, bool) {
10001 return nil, false
10002 }
10003
10004
10005 func (imavri InMageAzureV2ReprotectInput) AsInMageAzureV2ReprotectInput() (*InMageAzureV2ReprotectInput, bool) {
10006 return &imavri, true
10007 }
10008
10009
10010 func (imavri InMageAzureV2ReprotectInput) AsInMageReprotectInput() (*InMageReprotectInput, bool) {
10011 return nil, false
10012 }
10013
10014
10015 func (imavri InMageAzureV2ReprotectInput) AsReverseReplicationProviderSpecificInput() (*ReverseReplicationProviderSpecificInput, bool) {
10016 return nil, false
10017 }
10018
10019
10020 func (imavri InMageAzureV2ReprotectInput) AsBasicReverseReplicationProviderSpecificInput() (BasicReverseReplicationProviderSpecificInput, bool) {
10021 return &imavri, true
10022 }
10023
10024
10025 type InMageAzureV2TestFailoverInput struct {
10026
10027 VaultLocation *string `json:"vaultLocation,omitempty"`
10028
10029 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
10030
10031 InstanceType InstanceTypeBasicTestFailoverProviderSpecificInput `json:"instanceType,omitempty"`
10032 }
10033
10034
10035 func (imavtfi InMageAzureV2TestFailoverInput) MarshalJSON() ([]byte, error) {
10036 imavtfi.InstanceType = InstanceTypeBasicTestFailoverProviderSpecificInputInstanceTypeInMageAzureV2
10037 objectMap := make(map[string]interface{})
10038 if imavtfi.VaultLocation != nil {
10039 objectMap["vaultLocation"] = imavtfi.VaultLocation
10040 }
10041 if imavtfi.RecoveryPointID != nil {
10042 objectMap["recoveryPointId"] = imavtfi.RecoveryPointID
10043 }
10044 if imavtfi.InstanceType != "" {
10045 objectMap["instanceType"] = imavtfi.InstanceType
10046 }
10047 return json.Marshal(objectMap)
10048 }
10049
10050
10051 func (imavtfi InMageAzureV2TestFailoverInput) AsA2ATestFailoverInput() (*A2ATestFailoverInput, bool) {
10052 return nil, false
10053 }
10054
10055
10056 func (imavtfi InMageAzureV2TestFailoverInput) AsHyperVReplicaAzureTestFailoverInput() (*HyperVReplicaAzureTestFailoverInput, bool) {
10057 return nil, false
10058 }
10059
10060
10061 func (imavtfi InMageAzureV2TestFailoverInput) AsInMageAzureV2TestFailoverInput() (*InMageAzureV2TestFailoverInput, bool) {
10062 return &imavtfi, true
10063 }
10064
10065
10066 func (imavtfi InMageAzureV2TestFailoverInput) AsInMageRcmTestFailoverInput() (*InMageRcmTestFailoverInput, bool) {
10067 return nil, false
10068 }
10069
10070
10071 func (imavtfi InMageAzureV2TestFailoverInput) AsInMageTestFailoverInput() (*InMageTestFailoverInput, bool) {
10072 return nil, false
10073 }
10074
10075
10076 func (imavtfi InMageAzureV2TestFailoverInput) AsTestFailoverProviderSpecificInput() (*TestFailoverProviderSpecificInput, bool) {
10077 return nil, false
10078 }
10079
10080
10081 func (imavtfi InMageAzureV2TestFailoverInput) AsBasicTestFailoverProviderSpecificInput() (BasicTestFailoverProviderSpecificInput, bool) {
10082 return &imavtfi, true
10083 }
10084
10085
10086 type InMageAzureV2UnplannedFailoverInput struct {
10087
10088 VaultLocation *string `json:"vaultLocation,omitempty"`
10089
10090 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
10091
10092 InstanceType InstanceTypeBasicUnplannedFailoverProviderSpecificInput `json:"instanceType,omitempty"`
10093 }
10094
10095
10096 func (imavufi InMageAzureV2UnplannedFailoverInput) MarshalJSON() ([]byte, error) {
10097 imavufi.InstanceType = InstanceTypeBasicUnplannedFailoverProviderSpecificInputInstanceTypeInMageAzureV2
10098 objectMap := make(map[string]interface{})
10099 if imavufi.VaultLocation != nil {
10100 objectMap["vaultLocation"] = imavufi.VaultLocation
10101 }
10102 if imavufi.RecoveryPointID != nil {
10103 objectMap["recoveryPointId"] = imavufi.RecoveryPointID
10104 }
10105 if imavufi.InstanceType != "" {
10106 objectMap["instanceType"] = imavufi.InstanceType
10107 }
10108 return json.Marshal(objectMap)
10109 }
10110
10111
10112 func (imavufi InMageAzureV2UnplannedFailoverInput) AsA2AUnplannedFailoverInput() (*A2AUnplannedFailoverInput, bool) {
10113 return nil, false
10114 }
10115
10116
10117 func (imavufi InMageAzureV2UnplannedFailoverInput) AsHyperVReplicaAzureUnplannedFailoverInput() (*HyperVReplicaAzureUnplannedFailoverInput, bool) {
10118 return nil, false
10119 }
10120
10121
10122 func (imavufi InMageAzureV2UnplannedFailoverInput) AsInMageAzureV2UnplannedFailoverInput() (*InMageAzureV2UnplannedFailoverInput, bool) {
10123 return &imavufi, true
10124 }
10125
10126
10127 func (imavufi InMageAzureV2UnplannedFailoverInput) AsInMageRcmUnplannedFailoverInput() (*InMageRcmUnplannedFailoverInput, bool) {
10128 return nil, false
10129 }
10130
10131
10132 func (imavufi InMageAzureV2UnplannedFailoverInput) AsInMageUnplannedFailoverInput() (*InMageUnplannedFailoverInput, bool) {
10133 return nil, false
10134 }
10135
10136
10137 func (imavufi InMageAzureV2UnplannedFailoverInput) AsUnplannedFailoverProviderSpecificInput() (*UnplannedFailoverProviderSpecificInput, bool) {
10138 return nil, false
10139 }
10140
10141
10142 func (imavufi InMageAzureV2UnplannedFailoverInput) AsBasicUnplannedFailoverProviderSpecificInput() (BasicUnplannedFailoverProviderSpecificInput, bool) {
10143 return &imavufi, true
10144 }
10145
10146
10147
10148 type InMageAzureV2UpdateReplicationProtectedItemInput struct {
10149
10150 RecoveryAzureV1ResourceGroupID *string `json:"recoveryAzureV1ResourceGroupId,omitempty"`
10151
10152 RecoveryAzureV2ResourceGroupID *string `json:"recoveryAzureV2ResourceGroupId,omitempty"`
10153
10154 UseManagedDisks *string `json:"useManagedDisks,omitempty"`
10155
10156 TargetProximityPlacementGroupID *string `json:"targetProximityPlacementGroupId,omitempty"`
10157
10158 TargetAvailabilityZone *string `json:"targetAvailabilityZone,omitempty"`
10159
10160 InstanceType InstanceTypeBasicUpdateReplicationProtectedItemProviderInput `json:"instanceType,omitempty"`
10161 }
10162
10163
10164 func (imavurpii InMageAzureV2UpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, error) {
10165 imavurpii.InstanceType = InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeInMageAzureV2
10166 objectMap := make(map[string]interface{})
10167 if imavurpii.RecoveryAzureV1ResourceGroupID != nil {
10168 objectMap["recoveryAzureV1ResourceGroupId"] = imavurpii.RecoveryAzureV1ResourceGroupID
10169 }
10170 if imavurpii.RecoveryAzureV2ResourceGroupID != nil {
10171 objectMap["recoveryAzureV2ResourceGroupId"] = imavurpii.RecoveryAzureV2ResourceGroupID
10172 }
10173 if imavurpii.UseManagedDisks != nil {
10174 objectMap["useManagedDisks"] = imavurpii.UseManagedDisks
10175 }
10176 if imavurpii.TargetProximityPlacementGroupID != nil {
10177 objectMap["targetProximityPlacementGroupId"] = imavurpii.TargetProximityPlacementGroupID
10178 }
10179 if imavurpii.TargetAvailabilityZone != nil {
10180 objectMap["targetAvailabilityZone"] = imavurpii.TargetAvailabilityZone
10181 }
10182 if imavurpii.InstanceType != "" {
10183 objectMap["instanceType"] = imavurpii.InstanceType
10184 }
10185 return json.Marshal(objectMap)
10186 }
10187
10188
10189 func (imavurpii InMageAzureV2UpdateReplicationProtectedItemInput) AsA2AUpdateReplicationProtectedItemInput() (*A2AUpdateReplicationProtectedItemInput, bool) {
10190 return nil, false
10191 }
10192
10193
10194 func (imavurpii InMageAzureV2UpdateReplicationProtectedItemInput) AsHyperVReplicaAzureUpdateReplicationProtectedItemInput() (*HyperVReplicaAzureUpdateReplicationProtectedItemInput, bool) {
10195 return nil, false
10196 }
10197
10198
10199 func (imavurpii InMageAzureV2UpdateReplicationProtectedItemInput) AsInMageAzureV2UpdateReplicationProtectedItemInput() (*InMageAzureV2UpdateReplicationProtectedItemInput, bool) {
10200 return &imavurpii, true
10201 }
10202
10203
10204 func (imavurpii InMageAzureV2UpdateReplicationProtectedItemInput) AsInMageRcmUpdateReplicationProtectedItemInput() (*InMageRcmUpdateReplicationProtectedItemInput, bool) {
10205 return nil, false
10206 }
10207
10208
10209 func (imavurpii InMageAzureV2UpdateReplicationProtectedItemInput) AsUpdateReplicationProtectedItemProviderInput() (*UpdateReplicationProtectedItemProviderInput, bool) {
10210 return nil, false
10211 }
10212
10213
10214 func (imavurpii InMageAzureV2UpdateReplicationProtectedItemInput) AsBasicUpdateReplicationProtectedItemProviderInput() (BasicUpdateReplicationProtectedItemProviderInput, bool) {
10215 return &imavurpii, true
10216 }
10217
10218
10219 type InMageBasePolicyDetails struct {
10220
10221 RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"`
10222
10223 RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"`
10224
10225 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"`
10226
10227 MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"`
10228
10229 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"`
10230 }
10231
10232
10233 func (imbpd InMageBasePolicyDetails) MarshalJSON() ([]byte, error) {
10234 imbpd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails
10235 objectMap := make(map[string]interface{})
10236 if imbpd.RecoveryPointThresholdInMinutes != nil {
10237 objectMap["recoveryPointThresholdInMinutes"] = imbpd.RecoveryPointThresholdInMinutes
10238 }
10239 if imbpd.RecoveryPointHistory != nil {
10240 objectMap["recoveryPointHistory"] = imbpd.RecoveryPointHistory
10241 }
10242 if imbpd.AppConsistentFrequencyInMinutes != nil {
10243 objectMap["appConsistentFrequencyInMinutes"] = imbpd.AppConsistentFrequencyInMinutes
10244 }
10245 if imbpd.MultiVMSyncStatus != nil {
10246 objectMap["multiVmSyncStatus"] = imbpd.MultiVMSyncStatus
10247 }
10248 if imbpd.InstanceType != "" {
10249 objectMap["instanceType"] = imbpd.InstanceType
10250 }
10251 return json.Marshal(objectMap)
10252 }
10253
10254
10255 func (imbpd InMageBasePolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) {
10256 return nil, false
10257 }
10258
10259
10260 func (imbpd InMageBasePolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) {
10261 return nil, false
10262 }
10263
10264
10265 func (imbpd InMageBasePolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) {
10266 return nil, false
10267 }
10268
10269
10270 func (imbpd InMageBasePolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) {
10271 return nil, false
10272 }
10273
10274
10275 func (imbpd InMageBasePolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) {
10276 return nil, false
10277 }
10278
10279
10280 func (imbpd InMageBasePolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) {
10281 return nil, false
10282 }
10283
10284
10285 func (imbpd InMageBasePolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) {
10286 return &imbpd, true
10287 }
10288
10289
10290 func (imbpd InMageBasePolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) {
10291 return nil, false
10292 }
10293
10294
10295 func (imbpd InMageBasePolicyDetails) AsInMageRcmPolicyDetails() (*InMageRcmPolicyDetails, bool) {
10296 return nil, false
10297 }
10298
10299
10300 func (imbpd InMageBasePolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) {
10301 return nil, false
10302 }
10303
10304
10305 func (imbpd InMageBasePolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) {
10306 return nil, false
10307 }
10308
10309
10310 func (imbpd InMageBasePolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) {
10311 return nil, false
10312 }
10313
10314
10315 func (imbpd InMageBasePolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) {
10316 return &imbpd, true
10317 }
10318
10319
10320 type InMageDisableProtectionProviderSpecificInput struct {
10321
10322 ReplicaVMDeletionStatus *string `json:"replicaVmDeletionStatus,omitempty"`
10323
10324 InstanceType InstanceTypeBasicDisableProtectionProviderSpecificInput `json:"instanceType,omitempty"`
10325 }
10326
10327
10328 func (imdppsi InMageDisableProtectionProviderSpecificInput) MarshalJSON() ([]byte, error) {
10329 imdppsi.InstanceType = InstanceTypeInMage
10330 objectMap := make(map[string]interface{})
10331 if imdppsi.ReplicaVMDeletionStatus != nil {
10332 objectMap["replicaVmDeletionStatus"] = imdppsi.ReplicaVMDeletionStatus
10333 }
10334 if imdppsi.InstanceType != "" {
10335 objectMap["instanceType"] = imdppsi.InstanceType
10336 }
10337 return json.Marshal(objectMap)
10338 }
10339
10340
10341 func (imdppsi InMageDisableProtectionProviderSpecificInput) AsInMageDisableProtectionProviderSpecificInput() (*InMageDisableProtectionProviderSpecificInput, bool) {
10342 return &imdppsi, true
10343 }
10344
10345
10346 func (imdppsi InMageDisableProtectionProviderSpecificInput) AsDisableProtectionProviderSpecificInput() (*DisableProtectionProviderSpecificInput, bool) {
10347 return nil, false
10348 }
10349
10350
10351 func (imdppsi InMageDisableProtectionProviderSpecificInput) AsBasicDisableProtectionProviderSpecificInput() (BasicDisableProtectionProviderSpecificInput, bool) {
10352 return &imdppsi, true
10353 }
10354
10355
10356 type InMageDiskDetails struct {
10357
10358 DiskID *string `json:"diskId,omitempty"`
10359
10360 DiskName *string `json:"diskName,omitempty"`
10361
10362 DiskSizeInMB *string `json:"diskSizeInMB,omitempty"`
10363
10364 DiskType *string `json:"diskType,omitempty"`
10365
10366 DiskConfiguration *string `json:"diskConfiguration,omitempty"`
10367
10368 VolumeList *[]DiskVolumeDetails `json:"volumeList,omitempty"`
10369 }
10370
10371
10372
10373 type InMageDiskExclusionInput struct {
10374
10375 VolumeOptions *[]InMageVolumeExclusionOptions `json:"volumeOptions,omitempty"`
10376
10377 DiskSignatureOptions *[]InMageDiskSignatureExclusionOptions `json:"diskSignatureOptions,omitempty"`
10378 }
10379
10380
10381
10382 type InMageDiskSignatureExclusionOptions struct {
10383
10384 DiskSignature *string `json:"diskSignature,omitempty"`
10385 }
10386
10387
10388 type InMageEnableProtectionInput struct {
10389
10390 VMFriendlyName *string `json:"vmFriendlyName,omitempty"`
10391
10392 MasterTargetID *string `json:"masterTargetId,omitempty"`
10393
10394 ProcessServerID *string `json:"processServerId,omitempty"`
10395
10396 RetentionDrive *string `json:"retentionDrive,omitempty"`
10397
10398 RunAsAccountID *string `json:"runAsAccountId,omitempty"`
10399
10400 MultiVMGroupID *string `json:"multiVmGroupId,omitempty"`
10401
10402 MultiVMGroupName *string `json:"multiVmGroupName,omitempty"`
10403
10404 DatastoreName *string `json:"datastoreName,omitempty"`
10405
10406 DiskExclusionInput *InMageDiskExclusionInput `json:"diskExclusionInput,omitempty"`
10407
10408 DisksToInclude *[]string `json:"disksToInclude,omitempty"`
10409
10410 InstanceType InstanceTypeBasicEnableProtectionProviderSpecificInput `json:"instanceType,omitempty"`
10411 }
10412
10413
10414 func (imepi InMageEnableProtectionInput) MarshalJSON() ([]byte, error) {
10415 imepi.InstanceType = InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMage
10416 objectMap := make(map[string]interface{})
10417 if imepi.VMFriendlyName != nil {
10418 objectMap["vmFriendlyName"] = imepi.VMFriendlyName
10419 }
10420 if imepi.MasterTargetID != nil {
10421 objectMap["masterTargetId"] = imepi.MasterTargetID
10422 }
10423 if imepi.ProcessServerID != nil {
10424 objectMap["processServerId"] = imepi.ProcessServerID
10425 }
10426 if imepi.RetentionDrive != nil {
10427 objectMap["retentionDrive"] = imepi.RetentionDrive
10428 }
10429 if imepi.RunAsAccountID != nil {
10430 objectMap["runAsAccountId"] = imepi.RunAsAccountID
10431 }
10432 if imepi.MultiVMGroupID != nil {
10433 objectMap["multiVmGroupId"] = imepi.MultiVMGroupID
10434 }
10435 if imepi.MultiVMGroupName != nil {
10436 objectMap["multiVmGroupName"] = imepi.MultiVMGroupName
10437 }
10438 if imepi.DatastoreName != nil {
10439 objectMap["datastoreName"] = imepi.DatastoreName
10440 }
10441 if imepi.DiskExclusionInput != nil {
10442 objectMap["diskExclusionInput"] = imepi.DiskExclusionInput
10443 }
10444 if imepi.DisksToInclude != nil {
10445 objectMap["disksToInclude"] = imepi.DisksToInclude
10446 }
10447 if imepi.InstanceType != "" {
10448 objectMap["instanceType"] = imepi.InstanceType
10449 }
10450 return json.Marshal(objectMap)
10451 }
10452
10453
10454 func (imepi InMageEnableProtectionInput) AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool) {
10455 return nil, false
10456 }
10457
10458
10459 func (imepi InMageEnableProtectionInput) AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool) {
10460 return nil, false
10461 }
10462
10463
10464 func (imepi InMageEnableProtectionInput) AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool) {
10465 return nil, false
10466 }
10467
10468
10469 func (imepi InMageEnableProtectionInput) AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool) {
10470 return &imepi, true
10471 }
10472
10473
10474 func (imepi InMageEnableProtectionInput) AsInMageRcmEnableProtectionInput() (*InMageRcmEnableProtectionInput, bool) {
10475 return nil, false
10476 }
10477
10478
10479 func (imepi InMageEnableProtectionInput) AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool) {
10480 return nil, false
10481 }
10482
10483
10484 func (imepi InMageEnableProtectionInput) AsEnableProtectionProviderSpecificInput() (*EnableProtectionProviderSpecificInput, bool) {
10485 return nil, false
10486 }
10487
10488
10489 func (imepi InMageEnableProtectionInput) AsBasicEnableProtectionProviderSpecificInput() (BasicEnableProtectionProviderSpecificInput, bool) {
10490 return &imepi, true
10491 }
10492
10493
10494 type InMageFailoverProviderInput struct {
10495
10496 RecoveryPointType RecoveryPointType `json:"recoveryPointType,omitempty"`
10497
10498 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
10499
10500 InstanceType InstanceTypeBasicProviderSpecificFailoverInput `json:"instanceType,omitempty"`
10501 }
10502
10503
10504 func (imfpi InMageFailoverProviderInput) MarshalJSON() ([]byte, error) {
10505 imfpi.InstanceType = InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMage
10506 objectMap := make(map[string]interface{})
10507 if imfpi.RecoveryPointType != "" {
10508 objectMap["recoveryPointType"] = imfpi.RecoveryPointType
10509 }
10510 if imfpi.RecoveryPointID != nil {
10511 objectMap["recoveryPointId"] = imfpi.RecoveryPointID
10512 }
10513 if imfpi.InstanceType != "" {
10514 objectMap["instanceType"] = imfpi.InstanceType
10515 }
10516 return json.Marshal(objectMap)
10517 }
10518
10519
10520 func (imfpi InMageFailoverProviderInput) AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool) {
10521 return nil, false
10522 }
10523
10524
10525 func (imfpi InMageFailoverProviderInput) AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool) {
10526 return nil, false
10527 }
10528
10529
10530 func (imfpi InMageFailoverProviderInput) AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool) {
10531 return nil, false
10532 }
10533
10534
10535 func (imfpi InMageFailoverProviderInput) AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool) {
10536 return nil, false
10537 }
10538
10539
10540 func (imfpi InMageFailoverProviderInput) AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool) {
10541 return &imfpi, true
10542 }
10543
10544
10545 func (imfpi InMageFailoverProviderInput) AsProviderSpecificFailoverInput() (*ProviderSpecificFailoverInput, bool) {
10546 return nil, false
10547 }
10548
10549
10550 func (imfpi InMageFailoverProviderInput) AsBasicProviderSpecificFailoverInput() (BasicProviderSpecificFailoverInput, bool) {
10551 return &imfpi, true
10552 }
10553
10554
10555 type InMagePolicyDetails struct {
10556
10557 RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"`
10558
10559 RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"`
10560
10561 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"`
10562
10563 MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"`
10564
10565 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"`
10566 }
10567
10568
10569 func (impd InMagePolicyDetails) MarshalJSON() ([]byte, error) {
10570 impd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage
10571 objectMap := make(map[string]interface{})
10572 if impd.RecoveryPointThresholdInMinutes != nil {
10573 objectMap["recoveryPointThresholdInMinutes"] = impd.RecoveryPointThresholdInMinutes
10574 }
10575 if impd.RecoveryPointHistory != nil {
10576 objectMap["recoveryPointHistory"] = impd.RecoveryPointHistory
10577 }
10578 if impd.AppConsistentFrequencyInMinutes != nil {
10579 objectMap["appConsistentFrequencyInMinutes"] = impd.AppConsistentFrequencyInMinutes
10580 }
10581 if impd.MultiVMSyncStatus != nil {
10582 objectMap["multiVmSyncStatus"] = impd.MultiVMSyncStatus
10583 }
10584 if impd.InstanceType != "" {
10585 objectMap["instanceType"] = impd.InstanceType
10586 }
10587 return json.Marshal(objectMap)
10588 }
10589
10590
10591 func (impd InMagePolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) {
10592 return nil, false
10593 }
10594
10595
10596 func (impd InMagePolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) {
10597 return nil, false
10598 }
10599
10600
10601 func (impd InMagePolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) {
10602 return nil, false
10603 }
10604
10605
10606 func (impd InMagePolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) {
10607 return nil, false
10608 }
10609
10610
10611 func (impd InMagePolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) {
10612 return nil, false
10613 }
10614
10615
10616 func (impd InMagePolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) {
10617 return nil, false
10618 }
10619
10620
10621 func (impd InMagePolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) {
10622 return nil, false
10623 }
10624
10625
10626 func (impd InMagePolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) {
10627 return &impd, true
10628 }
10629
10630
10631 func (impd InMagePolicyDetails) AsInMageRcmPolicyDetails() (*InMageRcmPolicyDetails, bool) {
10632 return nil, false
10633 }
10634
10635
10636 func (impd InMagePolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) {
10637 return nil, false
10638 }
10639
10640
10641 func (impd InMagePolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) {
10642 return nil, false
10643 }
10644
10645
10646 func (impd InMagePolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) {
10647 return nil, false
10648 }
10649
10650
10651 func (impd InMagePolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) {
10652 return &impd, true
10653 }
10654
10655
10656 type InMagePolicyInput struct {
10657
10658 RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"`
10659
10660 RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"`
10661
10662 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"`
10663
10664 MultiVMSyncStatus SetMultiVMSyncStatus `json:"multiVmSyncStatus,omitempty"`
10665
10666 InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"`
10667 }
10668
10669
10670 func (impi InMagePolicyInput) MarshalJSON() ([]byte, error) {
10671 impi.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMage
10672 objectMap := make(map[string]interface{})
10673 if impi.RecoveryPointThresholdInMinutes != nil {
10674 objectMap["recoveryPointThresholdInMinutes"] = impi.RecoveryPointThresholdInMinutes
10675 }
10676 if impi.RecoveryPointHistory != nil {
10677 objectMap["recoveryPointHistory"] = impi.RecoveryPointHistory
10678 }
10679 if impi.AppConsistentFrequencyInMinutes != nil {
10680 objectMap["appConsistentFrequencyInMinutes"] = impi.AppConsistentFrequencyInMinutes
10681 }
10682 if impi.MultiVMSyncStatus != "" {
10683 objectMap["multiVmSyncStatus"] = impi.MultiVMSyncStatus
10684 }
10685 if impi.InstanceType != "" {
10686 objectMap["instanceType"] = impi.InstanceType
10687 }
10688 return json.Marshal(objectMap)
10689 }
10690
10691
10692 func (impi InMagePolicyInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) {
10693 return nil, false
10694 }
10695
10696
10697 func (impi InMagePolicyInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) {
10698 return nil, false
10699 }
10700
10701
10702 func (impi InMagePolicyInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) {
10703 return nil, false
10704 }
10705
10706
10707 func (impi InMagePolicyInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) {
10708 return nil, false
10709 }
10710
10711
10712 func (impi InMagePolicyInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) {
10713 return nil, false
10714 }
10715
10716
10717 func (impi InMagePolicyInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) {
10718 return &impi, true
10719 }
10720
10721
10722 func (impi InMagePolicyInput) AsInMageRcmPolicyCreationInput() (*InMageRcmPolicyCreationInput, bool) {
10723 return nil, false
10724 }
10725
10726
10727 func (impi InMagePolicyInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) {
10728 return nil, false
10729 }
10730
10731
10732 func (impi InMagePolicyInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) {
10733 return nil, false
10734 }
10735
10736
10737 func (impi InMagePolicyInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) {
10738 return &impi, true
10739 }
10740
10741
10742 type InMageProtectedDiskDetails struct {
10743
10744 DiskID *string `json:"diskId,omitempty"`
10745
10746 DiskName *string `json:"diskName,omitempty"`
10747
10748 ProtectionStage *string `json:"protectionStage,omitempty"`
10749
10750 HealthErrorCode *string `json:"healthErrorCode,omitempty"`
10751
10752 RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"`
10753
10754 ResyncRequired *string `json:"resyncRequired,omitempty"`
10755
10756 ResyncProgressPercentage *int32 `json:"resyncProgressPercentage,omitempty"`
10757
10758 ResyncDurationInSeconds *int64 `json:"resyncDurationInSeconds,omitempty"`
10759
10760 DiskCapacityInBytes *int64 `json:"diskCapacityInBytes,omitempty"`
10761
10762 FileSystemCapacityInBytes *int64 `json:"fileSystemCapacityInBytes,omitempty"`
10763
10764 SourceDataInMB *float64 `json:"sourceDataInMB,omitempty"`
10765
10766 PsDataInMB *float64 `json:"psDataInMB,omitempty"`
10767
10768 TargetDataInMB *float64 `json:"targetDataInMB,omitempty"`
10769
10770 DiskResized *string `json:"diskResized,omitempty"`
10771
10772 LastRpoCalculatedTime *date.Time `json:"lastRpoCalculatedTime,omitempty"`
10773 }
10774
10775
10776 type InMageRcmAgentUpgradeBlockingErrorDetails struct {
10777
10778 ErrorCode *string `json:"errorCode,omitempty"`
10779
10780 ErrorMessage *string `json:"errorMessage,omitempty"`
10781
10782 PossibleCauses *string `json:"possibleCauses,omitempty"`
10783
10784 RecommendedAction *string `json:"recommendedAction,omitempty"`
10785
10786 ErrorMessageParameters map[string]*string `json:"errorMessageParameters"`
10787
10788 ErrorTags map[string]*string `json:"errorTags"`
10789 }
10790
10791
10792 func (imraubed InMageRcmAgentUpgradeBlockingErrorDetails) MarshalJSON() ([]byte, error) {
10793 objectMap := make(map[string]interface{})
10794 return json.Marshal(objectMap)
10795 }
10796
10797
10798 type InMageRcmApplyRecoveryPointInput struct {
10799
10800 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
10801
10802 InstanceType InstanceTypeBasicApplyRecoveryPointProviderSpecificInput `json:"instanceType,omitempty"`
10803 }
10804
10805
10806 func (imrarpi InMageRcmApplyRecoveryPointInput) MarshalJSON() ([]byte, error) {
10807 imrarpi.InstanceType = InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeInMageRcm
10808 objectMap := make(map[string]interface{})
10809 if imrarpi.RecoveryPointID != nil {
10810 objectMap["recoveryPointId"] = imrarpi.RecoveryPointID
10811 }
10812 if imrarpi.InstanceType != "" {
10813 objectMap["instanceType"] = imrarpi.InstanceType
10814 }
10815 return json.Marshal(objectMap)
10816 }
10817
10818
10819 func (imrarpi InMageRcmApplyRecoveryPointInput) AsA2AApplyRecoveryPointInput() (*A2AApplyRecoveryPointInput, bool) {
10820 return nil, false
10821 }
10822
10823
10824 func (imrarpi InMageRcmApplyRecoveryPointInput) AsHyperVReplicaAzureApplyRecoveryPointInput() (*HyperVReplicaAzureApplyRecoveryPointInput, bool) {
10825 return nil, false
10826 }
10827
10828
10829 func (imrarpi InMageRcmApplyRecoveryPointInput) AsInMageAzureV2ApplyRecoveryPointInput() (*InMageAzureV2ApplyRecoveryPointInput, bool) {
10830 return nil, false
10831 }
10832
10833
10834 func (imrarpi InMageRcmApplyRecoveryPointInput) AsInMageRcmApplyRecoveryPointInput() (*InMageRcmApplyRecoveryPointInput, bool) {
10835 return &imrarpi, true
10836 }
10837
10838
10839 func (imrarpi InMageRcmApplyRecoveryPointInput) AsApplyRecoveryPointProviderSpecificInput() (*ApplyRecoveryPointProviderSpecificInput, bool) {
10840 return nil, false
10841 }
10842
10843
10844 func (imrarpi InMageRcmApplyRecoveryPointInput) AsBasicApplyRecoveryPointProviderSpecificInput() (BasicApplyRecoveryPointProviderSpecificInput, bool) {
10845 return &imrarpi, true
10846 }
10847
10848
10849 type InMageRcmDiskInput struct {
10850
10851 DiskID *string `json:"diskId,omitempty"`
10852
10853 LogStorageAccountID *string `json:"logStorageAccountId,omitempty"`
10854
10855 DiskType DiskAccountType `json:"diskType,omitempty"`
10856
10857 DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`
10858 }
10859
10860
10861 type InMageRcmDisksDefaultInput struct {
10862
10863 LogStorageAccountID *string `json:"logStorageAccountId,omitempty"`
10864
10865 DiskType DiskAccountType `json:"diskType,omitempty"`
10866
10867 DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`
10868 }
10869
10870
10871 type InMageRcmEnableProtectionInput struct {
10872
10873 FabricDiscoveryMachineID *string `json:"fabricDiscoveryMachineId,omitempty"`
10874
10875 DisksToInclude *[]InMageRcmDiskInput `json:"disksToInclude,omitempty"`
10876
10877 DisksDefault *InMageRcmDisksDefaultInput `json:"disksDefault,omitempty"`
10878
10879 TargetResourceGroupID *string `json:"targetResourceGroupId,omitempty"`
10880
10881 TargetNetworkID *string `json:"targetNetworkId,omitempty"`
10882
10883 TestNetworkID *string `json:"testNetworkId,omitempty"`
10884
10885 TargetSubnetName *string `json:"targetSubnetName,omitempty"`
10886
10887 TestSubnetName *string `json:"testSubnetName,omitempty"`
10888
10889 TargetVMName *string `json:"targetVmName,omitempty"`
10890
10891 TargetVMSize *string `json:"targetVmSize,omitempty"`
10892
10893 LicenseType LicenseType `json:"licenseType,omitempty"`
10894
10895 TargetAvailabilitySetID *string `json:"targetAvailabilitySetId,omitempty"`
10896
10897 TargetAvailabilityZone *string `json:"targetAvailabilityZone,omitempty"`
10898
10899 TargetProximityPlacementGroupID *string `json:"targetProximityPlacementGroupId,omitempty"`
10900
10901 TargetBootDiagnosticsStorageAccountID *string `json:"targetBootDiagnosticsStorageAccountId,omitempty"`
10902
10903 RunAsAccountID *string `json:"runAsAccountId,omitempty"`
10904
10905 ProcessServerID *string `json:"processServerId,omitempty"`
10906
10907 MultiVMGroupName *string `json:"multiVmGroupName,omitempty"`
10908
10909 InstanceType InstanceTypeBasicEnableProtectionProviderSpecificInput `json:"instanceType,omitempty"`
10910 }
10911
10912
10913 func (imrepi InMageRcmEnableProtectionInput) MarshalJSON() ([]byte, error) {
10914 imrepi.InstanceType = InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMageRcm
10915 objectMap := make(map[string]interface{})
10916 if imrepi.FabricDiscoveryMachineID != nil {
10917 objectMap["fabricDiscoveryMachineId"] = imrepi.FabricDiscoveryMachineID
10918 }
10919 if imrepi.DisksToInclude != nil {
10920 objectMap["disksToInclude"] = imrepi.DisksToInclude
10921 }
10922 if imrepi.DisksDefault != nil {
10923 objectMap["disksDefault"] = imrepi.DisksDefault
10924 }
10925 if imrepi.TargetResourceGroupID != nil {
10926 objectMap["targetResourceGroupId"] = imrepi.TargetResourceGroupID
10927 }
10928 if imrepi.TargetNetworkID != nil {
10929 objectMap["targetNetworkId"] = imrepi.TargetNetworkID
10930 }
10931 if imrepi.TestNetworkID != nil {
10932 objectMap["testNetworkId"] = imrepi.TestNetworkID
10933 }
10934 if imrepi.TargetSubnetName != nil {
10935 objectMap["targetSubnetName"] = imrepi.TargetSubnetName
10936 }
10937 if imrepi.TestSubnetName != nil {
10938 objectMap["testSubnetName"] = imrepi.TestSubnetName
10939 }
10940 if imrepi.TargetVMName != nil {
10941 objectMap["targetVmName"] = imrepi.TargetVMName
10942 }
10943 if imrepi.TargetVMSize != nil {
10944 objectMap["targetVmSize"] = imrepi.TargetVMSize
10945 }
10946 if imrepi.LicenseType != "" {
10947 objectMap["licenseType"] = imrepi.LicenseType
10948 }
10949 if imrepi.TargetAvailabilitySetID != nil {
10950 objectMap["targetAvailabilitySetId"] = imrepi.TargetAvailabilitySetID
10951 }
10952 if imrepi.TargetAvailabilityZone != nil {
10953 objectMap["targetAvailabilityZone"] = imrepi.TargetAvailabilityZone
10954 }
10955 if imrepi.TargetProximityPlacementGroupID != nil {
10956 objectMap["targetProximityPlacementGroupId"] = imrepi.TargetProximityPlacementGroupID
10957 }
10958 if imrepi.TargetBootDiagnosticsStorageAccountID != nil {
10959 objectMap["targetBootDiagnosticsStorageAccountId"] = imrepi.TargetBootDiagnosticsStorageAccountID
10960 }
10961 if imrepi.RunAsAccountID != nil {
10962 objectMap["runAsAccountId"] = imrepi.RunAsAccountID
10963 }
10964 if imrepi.ProcessServerID != nil {
10965 objectMap["processServerId"] = imrepi.ProcessServerID
10966 }
10967 if imrepi.MultiVMGroupName != nil {
10968 objectMap["multiVmGroupName"] = imrepi.MultiVMGroupName
10969 }
10970 if imrepi.InstanceType != "" {
10971 objectMap["instanceType"] = imrepi.InstanceType
10972 }
10973 return json.Marshal(objectMap)
10974 }
10975
10976
10977 func (imrepi InMageRcmEnableProtectionInput) AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool) {
10978 return nil, false
10979 }
10980
10981
10982 func (imrepi InMageRcmEnableProtectionInput) AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool) {
10983 return nil, false
10984 }
10985
10986
10987 func (imrepi InMageRcmEnableProtectionInput) AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool) {
10988 return nil, false
10989 }
10990
10991
10992 func (imrepi InMageRcmEnableProtectionInput) AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool) {
10993 return nil, false
10994 }
10995
10996
10997 func (imrepi InMageRcmEnableProtectionInput) AsInMageRcmEnableProtectionInput() (*InMageRcmEnableProtectionInput, bool) {
10998 return &imrepi, true
10999 }
11000
11001
11002 func (imrepi InMageRcmEnableProtectionInput) AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool) {
11003 return nil, false
11004 }
11005
11006
11007 func (imrepi InMageRcmEnableProtectionInput) AsEnableProtectionProviderSpecificInput() (*EnableProtectionProviderSpecificInput, bool) {
11008 return nil, false
11009 }
11010
11011
11012 func (imrepi InMageRcmEnableProtectionInput) AsBasicEnableProtectionProviderSpecificInput() (BasicEnableProtectionProviderSpecificInput, bool) {
11013 return &imrepi, true
11014 }
11015
11016
11017 type InMageRcmEventDetails struct {
11018
11019 ProtectedItemName *string `json:"protectedItemName,omitempty"`
11020
11021 InstanceType InstanceTypeBasicEventProviderSpecificDetails `json:"instanceType,omitempty"`
11022 }
11023
11024
11025 func (imred InMageRcmEventDetails) MarshalJSON() ([]byte, error) {
11026 imred.InstanceType = InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageRcm
11027 objectMap := make(map[string]interface{})
11028 if imred.InstanceType != "" {
11029 objectMap["instanceType"] = imred.InstanceType
11030 }
11031 return json.Marshal(objectMap)
11032 }
11033
11034
11035 func (imred InMageRcmEventDetails) AsA2AEventDetails() (*A2AEventDetails, bool) {
11036 return nil, false
11037 }
11038
11039
11040 func (imred InMageRcmEventDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) {
11041 return nil, false
11042 }
11043
11044
11045 func (imred InMageRcmEventDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) {
11046 return nil, false
11047 }
11048
11049
11050 func (imred InMageRcmEventDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) {
11051 return nil, false
11052 }
11053
11054
11055 func (imred InMageRcmEventDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) {
11056 return nil, false
11057 }
11058
11059
11060 func (imred InMageRcmEventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) {
11061 return nil, false
11062 }
11063
11064
11065 func (imred InMageRcmEventDetails) AsInMageRcmEventDetails() (*InMageRcmEventDetails, bool) {
11066 return &imred, true
11067 }
11068
11069
11070 func (imred InMageRcmEventDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) {
11071 return nil, false
11072 }
11073
11074
11075 func (imred InMageRcmEventDetails) AsBasicEventProviderSpecificDetails() (BasicEventProviderSpecificDetails, bool) {
11076 return &imred, true
11077 }
11078
11079
11080 type InMageRcmFabricCreationInput struct {
11081
11082 VmwareSiteID *string `json:"vmwareSiteId,omitempty"`
11083
11084 PhysicalSiteID *string `json:"physicalSiteId,omitempty"`
11085
11086 SourceAgentIdentity *IdentityProviderInput `json:"sourceAgentIdentity,omitempty"`
11087
11088 AuthCertificate *string `json:"authCertificate,omitempty"`
11089
11090 InstanceType InstanceTypeBasicFabricSpecificCreationInput `json:"instanceType,omitempty"`
11091 }
11092
11093
11094 func (imrfci InMageRcmFabricCreationInput) MarshalJSON() ([]byte, error) {
11095 imrfci.InstanceType = InstanceTypeInMageRcm
11096 objectMap := make(map[string]interface{})
11097 if imrfci.VmwareSiteID != nil {
11098 objectMap["vmwareSiteId"] = imrfci.VmwareSiteID
11099 }
11100 if imrfci.PhysicalSiteID != nil {
11101 objectMap["physicalSiteId"] = imrfci.PhysicalSiteID
11102 }
11103 if imrfci.SourceAgentIdentity != nil {
11104 objectMap["sourceAgentIdentity"] = imrfci.SourceAgentIdentity
11105 }
11106 if imrfci.AuthCertificate != nil {
11107 objectMap["authCertificate"] = imrfci.AuthCertificate
11108 }
11109 if imrfci.InstanceType != "" {
11110 objectMap["instanceType"] = imrfci.InstanceType
11111 }
11112 return json.Marshal(objectMap)
11113 }
11114
11115
11116 func (imrfci InMageRcmFabricCreationInput) AsAzureFabricCreationInput() (*AzureFabricCreationInput, bool) {
11117 return nil, false
11118 }
11119
11120
11121 func (imrfci InMageRcmFabricCreationInput) AsInMageRcmFabricCreationInput() (*InMageRcmFabricCreationInput, bool) {
11122 return &imrfci, true
11123 }
11124
11125
11126 func (imrfci InMageRcmFabricCreationInput) AsVMwareV2FabricCreationInput() (*VMwareV2FabricCreationInput, bool) {
11127 return nil, false
11128 }
11129
11130
11131 func (imrfci InMageRcmFabricCreationInput) AsFabricSpecificCreationInput() (*FabricSpecificCreationInput, bool) {
11132 return nil, false
11133 }
11134
11135
11136 func (imrfci InMageRcmFabricCreationInput) AsBasicFabricSpecificCreationInput() (BasicFabricSpecificCreationInput, bool) {
11137 return &imrfci, true
11138 }
11139
11140
11141 type InMageRcmFabricSpecificDetails struct {
11142
11143 VmwareSiteID *string `json:"vmwareSiteId,omitempty"`
11144
11145 PhysicalSiteID *string `json:"physicalSiteId,omitempty"`
11146
11147 ServiceEndpoint *string `json:"serviceEndpoint,omitempty"`
11148
11149 ServiceResourceID *string `json:"serviceResourceId,omitempty"`
11150
11151 ServiceContainerID *string `json:"serviceContainerId,omitempty"`
11152
11153 DataPlaneURI *string `json:"dataPlaneUri,omitempty"`
11154
11155 ControlPlaneURI *string `json:"controlPlaneUri,omitempty"`
11156
11157 ProcessServers *[]ProcessServerDetails `json:"processServers,omitempty"`
11158
11159 RcmProxies *[]RcmProxyDetails `json:"rcmProxies,omitempty"`
11160
11161 PushInstallers *[]PushInstallerDetails `json:"pushInstallers,omitempty"`
11162
11163 ReplicationAgents *[]ReplicationAgentDetails `json:"replicationAgents,omitempty"`
11164
11165 ReprotectAgents *[]ReprotectAgentDetails `json:"reprotectAgents,omitempty"`
11166
11167 Dras *[]DraDetails `json:"dras,omitempty"`
11168
11169 AgentDetails *[]AgentDetails `json:"agentDetails,omitempty"`
11170
11171 InstanceType InstanceTypeBasicFabricSpecificDetails `json:"instanceType,omitempty"`
11172 }
11173
11174
11175 func (imrfsd InMageRcmFabricSpecificDetails) MarshalJSON() ([]byte, error) {
11176 imrfsd.InstanceType = InstanceTypeBasicFabricSpecificDetailsInstanceTypeInMageRcm
11177 objectMap := make(map[string]interface{})
11178 if imrfsd.InstanceType != "" {
11179 objectMap["instanceType"] = imrfsd.InstanceType
11180 }
11181 return json.Marshal(objectMap)
11182 }
11183
11184
11185 func (imrfsd InMageRcmFabricSpecificDetails) AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool) {
11186 return nil, false
11187 }
11188
11189
11190 func (imrfsd InMageRcmFabricSpecificDetails) AsHyperVSiteDetails() (*HyperVSiteDetails, bool) {
11191 return nil, false
11192 }
11193
11194
11195 func (imrfsd InMageRcmFabricSpecificDetails) AsInMageRcmFabricSpecificDetails() (*InMageRcmFabricSpecificDetails, bool) {
11196 return &imrfsd, true
11197 }
11198
11199
11200 func (imrfsd InMageRcmFabricSpecificDetails) AsVmmDetails() (*VmmDetails, bool) {
11201 return nil, false
11202 }
11203
11204
11205 func (imrfsd InMageRcmFabricSpecificDetails) AsVMwareDetails() (*VMwareDetails, bool) {
11206 return nil, false
11207 }
11208
11209
11210 func (imrfsd InMageRcmFabricSpecificDetails) AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool) {
11211 return nil, false
11212 }
11213
11214
11215 func (imrfsd InMageRcmFabricSpecificDetails) AsFabricSpecificDetails() (*FabricSpecificDetails, bool) {
11216 return nil, false
11217 }
11218
11219
11220 func (imrfsd InMageRcmFabricSpecificDetails) AsBasicFabricSpecificDetails() (BasicFabricSpecificDetails, bool) {
11221 return &imrfsd, true
11222 }
11223
11224
11225 type InMageRcmLastAgentUpgradeErrorDetails struct {
11226
11227 ErrorCode *string `json:"errorCode,omitempty"`
11228
11229 ErrorMessage *string `json:"errorMessage,omitempty"`
11230
11231 PossibleCauses *string `json:"possibleCauses,omitempty"`
11232
11233 RecommendedAction *string `json:"recommendedAction,omitempty"`
11234
11235 ErrorMessageParameters map[string]*string `json:"errorMessageParameters"`
11236
11237 ErrorTags map[string]*string `json:"errorTags"`
11238 }
11239
11240
11241 func (imrlaued InMageRcmLastAgentUpgradeErrorDetails) MarshalJSON() ([]byte, error) {
11242 objectMap := make(map[string]interface{})
11243 return json.Marshal(objectMap)
11244 }
11245
11246
11247 type InMageRcmMobilityAgentDetails struct {
11248
11249 Version *string `json:"version,omitempty"`
11250
11251 LatestVersion *string `json:"latestVersion,omitempty"`
11252
11253 DriverVersion *string `json:"driverVersion,omitempty"`
11254
11255 LatestUpgradableVersionWithoutReboot *string `json:"latestUpgradableVersionWithoutReboot,omitempty"`
11256
11257 AgentVersionExpiryDate *date.Time `json:"agentVersionExpiryDate,omitempty"`
11258
11259 DriverVersionExpiryDate *date.Time `json:"driverVersionExpiryDate,omitempty"`
11260
11261 LastHeartbeatUtc *date.Time `json:"lastHeartbeatUtc,omitempty"`
11262
11263 ReasonsBlockingUpgrade *[]AgentUpgradeBlockedReason `json:"reasonsBlockingUpgrade,omitempty"`
11264
11265 IsUpgradeable *string `json:"isUpgradeable,omitempty"`
11266 }
11267
11268
11269 func (imrmad InMageRcmMobilityAgentDetails) MarshalJSON() ([]byte, error) {
11270 objectMap := make(map[string]interface{})
11271 return json.Marshal(objectMap)
11272 }
11273
11274
11275 type InMageRcmNicDetails struct {
11276
11277 NicID *string `json:"nicId,omitempty"`
11278
11279 IsPrimaryNic *string `json:"isPrimaryNic,omitempty"`
11280
11281 IsSelectedForFailover *string `json:"isSelectedForFailover,omitempty"`
11282
11283 SourceIPAddress *string `json:"sourceIPAddress,omitempty"`
11284
11285 SourceIPAddressType EthernetAddressType `json:"sourceIPAddressType,omitempty"`
11286
11287 SourceNetworkID *string `json:"sourceNetworkId,omitempty"`
11288
11289 SourceSubnetName *string `json:"sourceSubnetName,omitempty"`
11290
11291 TargetIPAddress *string `json:"targetIPAddress,omitempty"`
11292
11293 TargetIPAddressType EthernetAddressType `json:"targetIPAddressType,omitempty"`
11294
11295 TargetSubnetName *string `json:"targetSubnetName,omitempty"`
11296
11297 TestSubnetName *string `json:"testSubnetName,omitempty"`
11298
11299 TestIPAddress *string `json:"testIPAddress,omitempty"`
11300
11301 TestIPAddressType EthernetAddressType `json:"testIPAddressType,omitempty"`
11302 }
11303
11304
11305 func (imrnd InMageRcmNicDetails) MarshalJSON() ([]byte, error) {
11306 objectMap := make(map[string]interface{})
11307 return json.Marshal(objectMap)
11308 }
11309
11310
11311 type InMageRcmNicInput struct {
11312
11313 NicID *string `json:"nicId,omitempty"`
11314
11315 IsPrimaryNic *string `json:"isPrimaryNic,omitempty"`
11316
11317 IsSelectedForFailover *string `json:"isSelectedForFailover,omitempty"`
11318
11319 TargetSubnetName *string `json:"targetSubnetName,omitempty"`
11320
11321 TargetStaticIPAddress *string `json:"targetStaticIPAddress,omitempty"`
11322
11323 TestSubnetName *string `json:"testSubnetName,omitempty"`
11324
11325 TestStaticIPAddress *string `json:"testStaticIPAddress,omitempty"`
11326 }
11327
11328
11329 type InMageRcmPolicyCreationInput struct {
11330
11331 RecoveryPointHistoryInMinutes *int32 `json:"recoveryPointHistoryInMinutes,omitempty"`
11332
11333 CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"`
11334
11335 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"`
11336
11337 EnableMultiVMSync *string `json:"enableMultiVmSync,omitempty"`
11338
11339 InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"`
11340 }
11341
11342
11343 func (imrpci InMageRcmPolicyCreationInput) MarshalJSON() ([]byte, error) {
11344 imrpci.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMageRcm
11345 objectMap := make(map[string]interface{})
11346 if imrpci.RecoveryPointHistoryInMinutes != nil {
11347 objectMap["recoveryPointHistoryInMinutes"] = imrpci.RecoveryPointHistoryInMinutes
11348 }
11349 if imrpci.CrashConsistentFrequencyInMinutes != nil {
11350 objectMap["crashConsistentFrequencyInMinutes"] = imrpci.CrashConsistentFrequencyInMinutes
11351 }
11352 if imrpci.AppConsistentFrequencyInMinutes != nil {
11353 objectMap["appConsistentFrequencyInMinutes"] = imrpci.AppConsistentFrequencyInMinutes
11354 }
11355 if imrpci.EnableMultiVMSync != nil {
11356 objectMap["enableMultiVmSync"] = imrpci.EnableMultiVMSync
11357 }
11358 if imrpci.InstanceType != "" {
11359 objectMap["instanceType"] = imrpci.InstanceType
11360 }
11361 return json.Marshal(objectMap)
11362 }
11363
11364
11365 func (imrpci InMageRcmPolicyCreationInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) {
11366 return nil, false
11367 }
11368
11369
11370 func (imrpci InMageRcmPolicyCreationInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) {
11371 return nil, false
11372 }
11373
11374
11375 func (imrpci InMageRcmPolicyCreationInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) {
11376 return nil, false
11377 }
11378
11379
11380 func (imrpci InMageRcmPolicyCreationInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) {
11381 return nil, false
11382 }
11383
11384
11385 func (imrpci InMageRcmPolicyCreationInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) {
11386 return nil, false
11387 }
11388
11389
11390 func (imrpci InMageRcmPolicyCreationInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) {
11391 return nil, false
11392 }
11393
11394
11395 func (imrpci InMageRcmPolicyCreationInput) AsInMageRcmPolicyCreationInput() (*InMageRcmPolicyCreationInput, bool) {
11396 return &imrpci, true
11397 }
11398
11399
11400 func (imrpci InMageRcmPolicyCreationInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) {
11401 return nil, false
11402 }
11403
11404
11405 func (imrpci InMageRcmPolicyCreationInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) {
11406 return nil, false
11407 }
11408
11409
11410 func (imrpci InMageRcmPolicyCreationInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) {
11411 return &imrpci, true
11412 }
11413
11414
11415 type InMageRcmPolicyDetails struct {
11416
11417 RecoveryPointHistoryInMinutes *int32 `json:"recoveryPointHistoryInMinutes,omitempty"`
11418
11419 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"`
11420
11421 CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"`
11422
11423 EnableMultiVMSync *string `json:"enableMultiVmSync,omitempty"`
11424
11425 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"`
11426 }
11427
11428
11429 func (imrpd InMageRcmPolicyDetails) MarshalJSON() ([]byte, error) {
11430 imrpd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageRcm
11431 objectMap := make(map[string]interface{})
11432 if imrpd.InstanceType != "" {
11433 objectMap["instanceType"] = imrpd.InstanceType
11434 }
11435 return json.Marshal(objectMap)
11436 }
11437
11438
11439 func (imrpd InMageRcmPolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) {
11440 return nil, false
11441 }
11442
11443
11444 func (imrpd InMageRcmPolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) {
11445 return nil, false
11446 }
11447
11448
11449 func (imrpd InMageRcmPolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) {
11450 return nil, false
11451 }
11452
11453
11454 func (imrpd InMageRcmPolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) {
11455 return nil, false
11456 }
11457
11458
11459 func (imrpd InMageRcmPolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) {
11460 return nil, false
11461 }
11462
11463
11464 func (imrpd InMageRcmPolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) {
11465 return nil, false
11466 }
11467
11468
11469 func (imrpd InMageRcmPolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) {
11470 return nil, false
11471 }
11472
11473
11474 func (imrpd InMageRcmPolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) {
11475 return nil, false
11476 }
11477
11478
11479 func (imrpd InMageRcmPolicyDetails) AsInMageRcmPolicyDetails() (*InMageRcmPolicyDetails, bool) {
11480 return &imrpd, true
11481 }
11482
11483
11484 func (imrpd InMageRcmPolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) {
11485 return nil, false
11486 }
11487
11488
11489 func (imrpd InMageRcmPolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) {
11490 return nil, false
11491 }
11492
11493
11494 func (imrpd InMageRcmPolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) {
11495 return nil, false
11496 }
11497
11498
11499 func (imrpd InMageRcmPolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) {
11500 return &imrpd, true
11501 }
11502
11503
11504 type InMageRcmProtectedDiskDetails struct {
11505
11506 DiskID *string `json:"diskId,omitempty"`
11507
11508 DiskName *string `json:"diskName,omitempty"`
11509
11510 IsOSDisk *string `json:"isOSDisk,omitempty"`
11511
11512 CapacityInBytes *int64 `json:"capacityInBytes,omitempty"`
11513
11514 LogStorageAccountID *string `json:"logStorageAccountId,omitempty"`
11515
11516 DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`
11517
11518 SeedManagedDiskID *string `json:"seedManagedDiskId,omitempty"`
11519
11520 TargetManagedDiskID *string `json:"targetManagedDiskId,omitempty"`
11521
11522 DiskType DiskAccountType `json:"diskType,omitempty"`
11523 }
11524
11525
11526 func (imrpdd InMageRcmProtectedDiskDetails) MarshalJSON() ([]byte, error) {
11527 objectMap := make(map[string]interface{})
11528 return json.Marshal(objectMap)
11529 }
11530
11531
11532 type InMageRcmRecoveryPointDetails struct {
11533
11534 IsMultiVMSyncPoint *string `json:"isMultiVmSyncPoint,omitempty"`
11535
11536 InstanceType InstanceTypeBasicProviderSpecificRecoveryPointDetails `json:"instanceType,omitempty"`
11537 }
11538
11539
11540 func (imrrpd InMageRcmRecoveryPointDetails) MarshalJSON() ([]byte, error) {
11541 imrrpd.InstanceType = InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeInMageRcm
11542 objectMap := make(map[string]interface{})
11543 if imrrpd.InstanceType != "" {
11544 objectMap["instanceType"] = imrrpd.InstanceType
11545 }
11546 return json.Marshal(objectMap)
11547 }
11548
11549
11550 func (imrrpd InMageRcmRecoveryPointDetails) AsA2ARecoveryPointDetails() (*A2ARecoveryPointDetails, bool) {
11551 return nil, false
11552 }
11553
11554
11555 func (imrrpd InMageRcmRecoveryPointDetails) AsInMageAzureV2RecoveryPointDetails() (*InMageAzureV2RecoveryPointDetails, bool) {
11556 return nil, false
11557 }
11558
11559
11560 func (imrrpd InMageRcmRecoveryPointDetails) AsInMageRcmRecoveryPointDetails() (*InMageRcmRecoveryPointDetails, bool) {
11561 return &imrrpd, true
11562 }
11563
11564
11565 func (imrrpd InMageRcmRecoveryPointDetails) AsProviderSpecificRecoveryPointDetails() (*ProviderSpecificRecoveryPointDetails, bool) {
11566 return nil, false
11567 }
11568
11569
11570 func (imrrpd InMageRcmRecoveryPointDetails) AsBasicProviderSpecificRecoveryPointDetails() (BasicProviderSpecificRecoveryPointDetails, bool) {
11571 return &imrrpd, true
11572 }
11573
11574
11575 type InMageRcmReplicationDetails struct {
11576
11577 InternalIdentifier *string `json:"internalIdentifier,omitempty"`
11578
11579 FabricDiscoveryMachineID *string `json:"fabricDiscoveryMachineId,omitempty"`
11580
11581 MultiVMGroupName *string `json:"multiVmGroupName,omitempty"`
11582
11583 DiscoveryType *string `json:"discoveryType,omitempty"`
11584
11585 ProcessServerID *string `json:"processServerId,omitempty"`
11586
11587 ProcessorCoreCount *int32 `json:"processorCoreCount,omitempty"`
11588
11589 AllocatedMemoryInMB *float64 `json:"allocatedMemoryInMB,omitempty"`
11590
11591 ProcessServerName *string `json:"processServerName,omitempty"`
11592
11593 RunAsAccountID *string `json:"runAsAccountId,omitempty"`
11594
11595 OsType *string `json:"osType,omitempty"`
11596
11597 FirmwareType *string `json:"firmwareType,omitempty"`
11598
11599 TargetGeneration *string `json:"targetGeneration,omitempty"`
11600
11601 LicenseType *string `json:"licenseType,omitempty"`
11602
11603 TargetVMName *string `json:"targetVmName,omitempty"`
11604
11605 TargetVMSize *string `json:"targetVmSize,omitempty"`
11606
11607 TargetResourceGroupID *string `json:"targetResourceGroupId,omitempty"`
11608
11609 TargetAvailabilitySetID *string `json:"targetAvailabilitySetId,omitempty"`
11610
11611 TargetAvailabilityZone *string `json:"targetAvailabilityZone,omitempty"`
11612
11613 TargetProximityPlacementGroupID *string `json:"targetProximityPlacementGroupId,omitempty"`
11614
11615 TargetBootDiagnosticsStorageAccountID *string `json:"targetBootDiagnosticsStorageAccountId,omitempty"`
11616
11617 TargetNetworkID *string `json:"targetNetworkId,omitempty"`
11618
11619 TestNetworkID *string `json:"testNetworkId,omitempty"`
11620
11621 FailoverRecoveryPointID *string `json:"failoverRecoveryPointId,omitempty"`
11622
11623 LastRecoveryPointReceived *date.Time `json:"lastRecoveryPointReceived,omitempty"`
11624
11625 LastRpoInSeconds *int64 `json:"lastRpoInSeconds,omitempty"`
11626
11627 LastRpoCalculatedTime *date.Time `json:"lastRpoCalculatedTime,omitempty"`
11628
11629 LastRecoveryPointID *string `json:"lastRecoveryPointId,omitempty"`
11630
11631 InitialReplicationProgressPercentage *int32 `json:"initialReplicationProgressPercentage,omitempty"`
11632
11633 InitialReplicationProcessedBytes *int64 `json:"initialReplicationProcessedBytes,omitempty"`
11634
11635 InitialReplicationTransferredBytes *int64 `json:"initialReplicationTransferredBytes,omitempty"`
11636
11637 ResyncProgressPercentage *int32 `json:"resyncProgressPercentage,omitempty"`
11638
11639 ResyncProcessedBytes *int64 `json:"resyncProcessedBytes,omitempty"`
11640
11641 ResyncTransferredBytes *int64 `json:"resyncTransferredBytes,omitempty"`
11642
11643 ResyncRequired *string `json:"resyncRequired,omitempty"`
11644
11645 ResyncState ResyncState `json:"resyncState,omitempty"`
11646
11647 AgentUpgradeState MobilityAgentUpgradeState `json:"agentUpgradeState,omitempty"`
11648
11649 LastAgentUpgradeType *string `json:"lastAgentUpgradeType,omitempty"`
11650
11651 LastAgentUpgradeFailedJobID *string `json:"lastAgentUpgradeFailedJobId,omitempty"`
11652
11653 ProtectedDisks *[]InMageRcmProtectedDiskDetails `json:"protectedDisks,omitempty"`
11654
11655 IsLastUpgradeSuccessful *string `json:"isLastUpgradeSuccessful,omitempty"`
11656
11657 MobilityAgentDetails *InMageRcmMobilityAgentDetails `json:"mobilityAgentDetails,omitempty"`
11658
11659 LastAgentUpgradeErrorDetails *[]InMageRcmLastAgentUpgradeErrorDetails `json:"lastAgentUpgradeErrorDetails,omitempty"`
11660
11661 AgentUpgradeBlockingErrorDetails *[]InMageRcmAgentUpgradeBlockingErrorDetails `json:"agentUpgradeBlockingErrorDetails,omitempty"`
11662
11663 VMNics *[]InMageRcmNicDetails `json:"vmNics,omitempty"`
11664
11665 InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"`
11666 }
11667
11668
11669 func (imrrd InMageRcmReplicationDetails) MarshalJSON() ([]byte, error) {
11670 imrrd.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMageRcm
11671 objectMap := make(map[string]interface{})
11672 if imrrd.InstanceType != "" {
11673 objectMap["instanceType"] = imrrd.InstanceType
11674 }
11675 return json.Marshal(objectMap)
11676 }
11677
11678
11679 func (imrrd InMageRcmReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) {
11680 return nil, false
11681 }
11682
11683
11684 func (imrrd InMageRcmReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) {
11685 return nil, false
11686 }
11687
11688
11689 func (imrrd InMageRcmReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) {
11690 return nil, false
11691 }
11692
11693
11694 func (imrrd InMageRcmReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) {
11695 return nil, false
11696 }
11697
11698
11699 func (imrrd InMageRcmReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) {
11700 return nil, false
11701 }
11702
11703
11704 func (imrrd InMageRcmReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) {
11705 return nil, false
11706 }
11707
11708
11709 func (imrrd InMageRcmReplicationDetails) AsInMageRcmReplicationDetails() (*InMageRcmReplicationDetails, bool) {
11710 return &imrrd, true
11711 }
11712
11713
11714 func (imrrd InMageRcmReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) {
11715 return nil, false
11716 }
11717
11718
11719 func (imrrd InMageRcmReplicationDetails) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) {
11720 return nil, false
11721 }
11722
11723
11724 func (imrrd InMageRcmReplicationDetails) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) {
11725 return &imrrd, true
11726 }
11727
11728
11729 type InMageRcmTestFailoverInput struct {
11730
11731 NetworkID *string `json:"networkId,omitempty"`
11732
11733 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
11734
11735 InstanceType InstanceTypeBasicTestFailoverProviderSpecificInput `json:"instanceType,omitempty"`
11736 }
11737
11738
11739 func (imrtfi InMageRcmTestFailoverInput) MarshalJSON() ([]byte, error) {
11740 imrtfi.InstanceType = InstanceTypeBasicTestFailoverProviderSpecificInputInstanceTypeInMageRcm
11741 objectMap := make(map[string]interface{})
11742 if imrtfi.NetworkID != nil {
11743 objectMap["networkId"] = imrtfi.NetworkID
11744 }
11745 if imrtfi.RecoveryPointID != nil {
11746 objectMap["recoveryPointId"] = imrtfi.RecoveryPointID
11747 }
11748 if imrtfi.InstanceType != "" {
11749 objectMap["instanceType"] = imrtfi.InstanceType
11750 }
11751 return json.Marshal(objectMap)
11752 }
11753
11754
11755 func (imrtfi InMageRcmTestFailoverInput) AsA2ATestFailoverInput() (*A2ATestFailoverInput, bool) {
11756 return nil, false
11757 }
11758
11759
11760 func (imrtfi InMageRcmTestFailoverInput) AsHyperVReplicaAzureTestFailoverInput() (*HyperVReplicaAzureTestFailoverInput, bool) {
11761 return nil, false
11762 }
11763
11764
11765 func (imrtfi InMageRcmTestFailoverInput) AsInMageAzureV2TestFailoverInput() (*InMageAzureV2TestFailoverInput, bool) {
11766 return nil, false
11767 }
11768
11769
11770 func (imrtfi InMageRcmTestFailoverInput) AsInMageRcmTestFailoverInput() (*InMageRcmTestFailoverInput, bool) {
11771 return &imrtfi, true
11772 }
11773
11774
11775 func (imrtfi InMageRcmTestFailoverInput) AsInMageTestFailoverInput() (*InMageTestFailoverInput, bool) {
11776 return nil, false
11777 }
11778
11779
11780 func (imrtfi InMageRcmTestFailoverInput) AsTestFailoverProviderSpecificInput() (*TestFailoverProviderSpecificInput, bool) {
11781 return nil, false
11782 }
11783
11784
11785 func (imrtfi InMageRcmTestFailoverInput) AsBasicTestFailoverProviderSpecificInput() (BasicTestFailoverProviderSpecificInput, bool) {
11786 return &imrtfi, true
11787 }
11788
11789
11790 type InMageRcmUnplannedFailoverInput struct {
11791
11792 PerformShutdown *string `json:"performShutdown,omitempty"`
11793
11794 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
11795
11796 InstanceType InstanceTypeBasicUnplannedFailoverProviderSpecificInput `json:"instanceType,omitempty"`
11797 }
11798
11799
11800 func (imrufi InMageRcmUnplannedFailoverInput) MarshalJSON() ([]byte, error) {
11801 imrufi.InstanceType = InstanceTypeBasicUnplannedFailoverProviderSpecificInputInstanceTypeInMageRcm
11802 objectMap := make(map[string]interface{})
11803 if imrufi.PerformShutdown != nil {
11804 objectMap["performShutdown"] = imrufi.PerformShutdown
11805 }
11806 if imrufi.RecoveryPointID != nil {
11807 objectMap["recoveryPointId"] = imrufi.RecoveryPointID
11808 }
11809 if imrufi.InstanceType != "" {
11810 objectMap["instanceType"] = imrufi.InstanceType
11811 }
11812 return json.Marshal(objectMap)
11813 }
11814
11815
11816 func (imrufi InMageRcmUnplannedFailoverInput) AsA2AUnplannedFailoverInput() (*A2AUnplannedFailoverInput, bool) {
11817 return nil, false
11818 }
11819
11820
11821 func (imrufi InMageRcmUnplannedFailoverInput) AsHyperVReplicaAzureUnplannedFailoverInput() (*HyperVReplicaAzureUnplannedFailoverInput, bool) {
11822 return nil, false
11823 }
11824
11825
11826 func (imrufi InMageRcmUnplannedFailoverInput) AsInMageAzureV2UnplannedFailoverInput() (*InMageAzureV2UnplannedFailoverInput, bool) {
11827 return nil, false
11828 }
11829
11830
11831 func (imrufi InMageRcmUnplannedFailoverInput) AsInMageRcmUnplannedFailoverInput() (*InMageRcmUnplannedFailoverInput, bool) {
11832 return &imrufi, true
11833 }
11834
11835
11836 func (imrufi InMageRcmUnplannedFailoverInput) AsInMageUnplannedFailoverInput() (*InMageUnplannedFailoverInput, bool) {
11837 return nil, false
11838 }
11839
11840
11841 func (imrufi InMageRcmUnplannedFailoverInput) AsUnplannedFailoverProviderSpecificInput() (*UnplannedFailoverProviderSpecificInput, bool) {
11842 return nil, false
11843 }
11844
11845
11846 func (imrufi InMageRcmUnplannedFailoverInput) AsBasicUnplannedFailoverProviderSpecificInput() (BasicUnplannedFailoverProviderSpecificInput, bool) {
11847 return &imrufi, true
11848 }
11849
11850
11851
11852 type InMageRcmUpdateReplicationProtectedItemInput struct {
11853
11854 TargetVMName *string `json:"targetVmName,omitempty"`
11855
11856 TargetVMSize *string `json:"targetVmSize,omitempty"`
11857
11858 TargetResourceGroupID *string `json:"targetResourceGroupId,omitempty"`
11859
11860 TargetAvailabilitySetID *string `json:"targetAvailabilitySetId,omitempty"`
11861
11862 TargetAvailabilityZone *string `json:"targetAvailabilityZone,omitempty"`
11863
11864 TargetProximityPlacementGroupID *string `json:"targetProximityPlacementGroupId,omitempty"`
11865
11866 TargetBootDiagnosticsStorageAccountID *string `json:"targetBootDiagnosticsStorageAccountId,omitempty"`
11867
11868 TargetNetworkID *string `json:"targetNetworkId,omitempty"`
11869
11870 TestNetworkID *string `json:"testNetworkId,omitempty"`
11871
11872 VMNics *[]InMageRcmNicInput `json:"vmNics,omitempty"`
11873
11874 LicenseType LicenseType `json:"licenseType,omitempty"`
11875
11876 InstanceType InstanceTypeBasicUpdateReplicationProtectedItemProviderInput `json:"instanceType,omitempty"`
11877 }
11878
11879
11880 func (imrurpii InMageRcmUpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, error) {
11881 imrurpii.InstanceType = InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeInMageRcm
11882 objectMap := make(map[string]interface{})
11883 if imrurpii.TargetVMName != nil {
11884 objectMap["targetVmName"] = imrurpii.TargetVMName
11885 }
11886 if imrurpii.TargetVMSize != nil {
11887 objectMap["targetVmSize"] = imrurpii.TargetVMSize
11888 }
11889 if imrurpii.TargetResourceGroupID != nil {
11890 objectMap["targetResourceGroupId"] = imrurpii.TargetResourceGroupID
11891 }
11892 if imrurpii.TargetAvailabilitySetID != nil {
11893 objectMap["targetAvailabilitySetId"] = imrurpii.TargetAvailabilitySetID
11894 }
11895 if imrurpii.TargetAvailabilityZone != nil {
11896 objectMap["targetAvailabilityZone"] = imrurpii.TargetAvailabilityZone
11897 }
11898 if imrurpii.TargetProximityPlacementGroupID != nil {
11899 objectMap["targetProximityPlacementGroupId"] = imrurpii.TargetProximityPlacementGroupID
11900 }
11901 if imrurpii.TargetBootDiagnosticsStorageAccountID != nil {
11902 objectMap["targetBootDiagnosticsStorageAccountId"] = imrurpii.TargetBootDiagnosticsStorageAccountID
11903 }
11904 if imrurpii.TargetNetworkID != nil {
11905 objectMap["targetNetworkId"] = imrurpii.TargetNetworkID
11906 }
11907 if imrurpii.TestNetworkID != nil {
11908 objectMap["testNetworkId"] = imrurpii.TestNetworkID
11909 }
11910 if imrurpii.VMNics != nil {
11911 objectMap["vmNics"] = imrurpii.VMNics
11912 }
11913 if imrurpii.LicenseType != "" {
11914 objectMap["licenseType"] = imrurpii.LicenseType
11915 }
11916 if imrurpii.InstanceType != "" {
11917 objectMap["instanceType"] = imrurpii.InstanceType
11918 }
11919 return json.Marshal(objectMap)
11920 }
11921
11922
11923 func (imrurpii InMageRcmUpdateReplicationProtectedItemInput) AsA2AUpdateReplicationProtectedItemInput() (*A2AUpdateReplicationProtectedItemInput, bool) {
11924 return nil, false
11925 }
11926
11927
11928 func (imrurpii InMageRcmUpdateReplicationProtectedItemInput) AsHyperVReplicaAzureUpdateReplicationProtectedItemInput() (*HyperVReplicaAzureUpdateReplicationProtectedItemInput, bool) {
11929 return nil, false
11930 }
11931
11932
11933 func (imrurpii InMageRcmUpdateReplicationProtectedItemInput) AsInMageAzureV2UpdateReplicationProtectedItemInput() (*InMageAzureV2UpdateReplicationProtectedItemInput, bool) {
11934 return nil, false
11935 }
11936
11937
11938 func (imrurpii InMageRcmUpdateReplicationProtectedItemInput) AsInMageRcmUpdateReplicationProtectedItemInput() (*InMageRcmUpdateReplicationProtectedItemInput, bool) {
11939 return &imrurpii, true
11940 }
11941
11942
11943 func (imrurpii InMageRcmUpdateReplicationProtectedItemInput) AsUpdateReplicationProtectedItemProviderInput() (*UpdateReplicationProtectedItemProviderInput, bool) {
11944 return nil, false
11945 }
11946
11947
11948 func (imrurpii InMageRcmUpdateReplicationProtectedItemInput) AsBasicUpdateReplicationProtectedItemProviderInput() (BasicUpdateReplicationProtectedItemProviderInput, bool) {
11949 return &imrurpii, true
11950 }
11951
11952
11953 type InMageReplicationDetails struct {
11954
11955 ActiveSiteType *string `json:"activeSiteType,omitempty"`
11956
11957 SourceVMCPUCount *int32 `json:"sourceVmCpuCount,omitempty"`
11958
11959 SourceVMRAMSizeInMB *int32 `json:"sourceVmRamSizeInMB,omitempty"`
11960
11961 OsDetails *OSDiskDetails `json:"osDetails,omitempty"`
11962
11963 ProtectionStage *string `json:"protectionStage,omitempty"`
11964
11965 VMID *string `json:"vmId,omitempty"`
11966
11967 VMProtectionState *string `json:"vmProtectionState,omitempty"`
11968
11969 VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"`
11970
11971 ResyncDetails *InitialReplicationDetails `json:"resyncDetails,omitempty"`
11972
11973 RetentionWindowStart *date.Time `json:"retentionWindowStart,omitempty"`
11974
11975 RetentionWindowEnd *date.Time `json:"retentionWindowEnd,omitempty"`
11976
11977 CompressedDataRateInMB *float64 `json:"compressedDataRateInMB,omitempty"`
11978
11979 UncompressedDataRateInMB *float64 `json:"uncompressedDataRateInMB,omitempty"`
11980
11981 RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"`
11982
11983 ProtectedDisks *[]InMageProtectedDiskDetails `json:"protectedDisks,omitempty"`
11984
11985 IPAddress *string `json:"ipAddress,omitempty"`
11986
11987 LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"`
11988
11989 ProcessServerID *string `json:"processServerId,omitempty"`
11990
11991 MasterTargetID *string `json:"masterTargetId,omitempty"`
11992
11993 ConsistencyPoints map[string]*date.Time `json:"consistencyPoints"`
11994
11995 DiskResized *string `json:"diskResized,omitempty"`
11996
11997 RebootAfterUpdateStatus *string `json:"rebootAfterUpdateStatus,omitempty"`
11998
11999 MultiVMGroupID *string `json:"multiVmGroupId,omitempty"`
12000
12001 MultiVMGroupName *string `json:"multiVmGroupName,omitempty"`
12002
12003 MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"`
12004
12005 AgentDetails *InMageAgentDetails `json:"agentDetails,omitempty"`
12006
12007 VCenterInfrastructureID *string `json:"vCenterInfrastructureId,omitempty"`
12008
12009 InfrastructureVMID *string `json:"infrastructureVmId,omitempty"`
12010
12011 VMNics *[]VMNicDetails `json:"vmNics,omitempty"`
12012
12013 DiscoveryType *string `json:"discoveryType,omitempty"`
12014
12015 AzureStorageAccountID *string `json:"azureStorageAccountId,omitempty"`
12016
12017 Datastores *[]string `json:"datastores,omitempty"`
12018
12019 ValidationErrors *[]HealthError `json:"validationErrors,omitempty"`
12020
12021 LastRpoCalculatedTime *date.Time `json:"lastRpoCalculatedTime,omitempty"`
12022
12023 LastUpdateReceivedTime *date.Time `json:"lastUpdateReceivedTime,omitempty"`
12024
12025 ReplicaID *string `json:"replicaId,omitempty"`
12026
12027 OsVersion *string `json:"osVersion,omitempty"`
12028
12029 InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"`
12030 }
12031
12032
12033 func (imrd InMageReplicationDetails) MarshalJSON() ([]byte, error) {
12034 imrd.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMage
12035 objectMap := make(map[string]interface{})
12036 if imrd.ActiveSiteType != nil {
12037 objectMap["activeSiteType"] = imrd.ActiveSiteType
12038 }
12039 if imrd.SourceVMCPUCount != nil {
12040 objectMap["sourceVmCpuCount"] = imrd.SourceVMCPUCount
12041 }
12042 if imrd.SourceVMRAMSizeInMB != nil {
12043 objectMap["sourceVmRamSizeInMB"] = imrd.SourceVMRAMSizeInMB
12044 }
12045 if imrd.OsDetails != nil {
12046 objectMap["osDetails"] = imrd.OsDetails
12047 }
12048 if imrd.ProtectionStage != nil {
12049 objectMap["protectionStage"] = imrd.ProtectionStage
12050 }
12051 if imrd.VMID != nil {
12052 objectMap["vmId"] = imrd.VMID
12053 }
12054 if imrd.VMProtectionState != nil {
12055 objectMap["vmProtectionState"] = imrd.VMProtectionState
12056 }
12057 if imrd.VMProtectionStateDescription != nil {
12058 objectMap["vmProtectionStateDescription"] = imrd.VMProtectionStateDescription
12059 }
12060 if imrd.ResyncDetails != nil {
12061 objectMap["resyncDetails"] = imrd.ResyncDetails
12062 }
12063 if imrd.RetentionWindowStart != nil {
12064 objectMap["retentionWindowStart"] = imrd.RetentionWindowStart
12065 }
12066 if imrd.RetentionWindowEnd != nil {
12067 objectMap["retentionWindowEnd"] = imrd.RetentionWindowEnd
12068 }
12069 if imrd.CompressedDataRateInMB != nil {
12070 objectMap["compressedDataRateInMB"] = imrd.CompressedDataRateInMB
12071 }
12072 if imrd.UncompressedDataRateInMB != nil {
12073 objectMap["uncompressedDataRateInMB"] = imrd.UncompressedDataRateInMB
12074 }
12075 if imrd.RpoInSeconds != nil {
12076 objectMap["rpoInSeconds"] = imrd.RpoInSeconds
12077 }
12078 if imrd.ProtectedDisks != nil {
12079 objectMap["protectedDisks"] = imrd.ProtectedDisks
12080 }
12081 if imrd.IPAddress != nil {
12082 objectMap["ipAddress"] = imrd.IPAddress
12083 }
12084 if imrd.LastHeartbeat != nil {
12085 objectMap["lastHeartbeat"] = imrd.LastHeartbeat
12086 }
12087 if imrd.ProcessServerID != nil {
12088 objectMap["processServerId"] = imrd.ProcessServerID
12089 }
12090 if imrd.MasterTargetID != nil {
12091 objectMap["masterTargetId"] = imrd.MasterTargetID
12092 }
12093 if imrd.ConsistencyPoints != nil {
12094 objectMap["consistencyPoints"] = imrd.ConsistencyPoints
12095 }
12096 if imrd.DiskResized != nil {
12097 objectMap["diskResized"] = imrd.DiskResized
12098 }
12099 if imrd.RebootAfterUpdateStatus != nil {
12100 objectMap["rebootAfterUpdateStatus"] = imrd.RebootAfterUpdateStatus
12101 }
12102 if imrd.MultiVMGroupID != nil {
12103 objectMap["multiVmGroupId"] = imrd.MultiVMGroupID
12104 }
12105 if imrd.MultiVMGroupName != nil {
12106 objectMap["multiVmGroupName"] = imrd.MultiVMGroupName
12107 }
12108 if imrd.MultiVMSyncStatus != nil {
12109 objectMap["multiVmSyncStatus"] = imrd.MultiVMSyncStatus
12110 }
12111 if imrd.AgentDetails != nil {
12112 objectMap["agentDetails"] = imrd.AgentDetails
12113 }
12114 if imrd.VCenterInfrastructureID != nil {
12115 objectMap["vCenterInfrastructureId"] = imrd.VCenterInfrastructureID
12116 }
12117 if imrd.InfrastructureVMID != nil {
12118 objectMap["infrastructureVmId"] = imrd.InfrastructureVMID
12119 }
12120 if imrd.VMNics != nil {
12121 objectMap["vmNics"] = imrd.VMNics
12122 }
12123 if imrd.DiscoveryType != nil {
12124 objectMap["discoveryType"] = imrd.DiscoveryType
12125 }
12126 if imrd.AzureStorageAccountID != nil {
12127 objectMap["azureStorageAccountId"] = imrd.AzureStorageAccountID
12128 }
12129 if imrd.Datastores != nil {
12130 objectMap["datastores"] = imrd.Datastores
12131 }
12132 if imrd.ValidationErrors != nil {
12133 objectMap["validationErrors"] = imrd.ValidationErrors
12134 }
12135 if imrd.LastRpoCalculatedTime != nil {
12136 objectMap["lastRpoCalculatedTime"] = imrd.LastRpoCalculatedTime
12137 }
12138 if imrd.LastUpdateReceivedTime != nil {
12139 objectMap["lastUpdateReceivedTime"] = imrd.LastUpdateReceivedTime
12140 }
12141 if imrd.ReplicaID != nil {
12142 objectMap["replicaId"] = imrd.ReplicaID
12143 }
12144 if imrd.OsVersion != nil {
12145 objectMap["osVersion"] = imrd.OsVersion
12146 }
12147 if imrd.InstanceType != "" {
12148 objectMap["instanceType"] = imrd.InstanceType
12149 }
12150 return json.Marshal(objectMap)
12151 }
12152
12153
12154 func (imrd InMageReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) {
12155 return nil, false
12156 }
12157
12158
12159 func (imrd InMageReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) {
12160 return nil, false
12161 }
12162
12163
12164 func (imrd InMageReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) {
12165 return nil, false
12166 }
12167
12168
12169 func (imrd InMageReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) {
12170 return nil, false
12171 }
12172
12173
12174 func (imrd InMageReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) {
12175 return nil, false
12176 }
12177
12178
12179 func (imrd InMageReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) {
12180 return nil, false
12181 }
12182
12183
12184 func (imrd InMageReplicationDetails) AsInMageRcmReplicationDetails() (*InMageRcmReplicationDetails, bool) {
12185 return nil, false
12186 }
12187
12188
12189 func (imrd InMageReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) {
12190 return &imrd, true
12191 }
12192
12193
12194 func (imrd InMageReplicationDetails) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) {
12195 return nil, false
12196 }
12197
12198
12199 func (imrd InMageReplicationDetails) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) {
12200 return &imrd, true
12201 }
12202
12203
12204 type InMageReprotectInput struct {
12205
12206 MasterTargetID *string `json:"masterTargetId,omitempty"`
12207
12208 ProcessServerID *string `json:"processServerId,omitempty"`
12209
12210 RetentionDrive *string `json:"retentionDrive,omitempty"`
12211
12212 RunAsAccountID *string `json:"runAsAccountId,omitempty"`
12213
12214 DatastoreName *string `json:"datastoreName,omitempty"`
12215
12216 DiskExclusionInput *InMageDiskExclusionInput `json:"diskExclusionInput,omitempty"`
12217
12218 ProfileID *string `json:"profileId,omitempty"`
12219
12220 DisksToInclude *[]string `json:"disksToInclude,omitempty"`
12221
12222 InstanceType InstanceTypeBasicReverseReplicationProviderSpecificInput `json:"instanceType,omitempty"`
12223 }
12224
12225
12226 func (imri InMageReprotectInput) MarshalJSON() ([]byte, error) {
12227 imri.InstanceType = InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMage
12228 objectMap := make(map[string]interface{})
12229 if imri.MasterTargetID != nil {
12230 objectMap["masterTargetId"] = imri.MasterTargetID
12231 }
12232 if imri.ProcessServerID != nil {
12233 objectMap["processServerId"] = imri.ProcessServerID
12234 }
12235 if imri.RetentionDrive != nil {
12236 objectMap["retentionDrive"] = imri.RetentionDrive
12237 }
12238 if imri.RunAsAccountID != nil {
12239 objectMap["runAsAccountId"] = imri.RunAsAccountID
12240 }
12241 if imri.DatastoreName != nil {
12242 objectMap["datastoreName"] = imri.DatastoreName
12243 }
12244 if imri.DiskExclusionInput != nil {
12245 objectMap["diskExclusionInput"] = imri.DiskExclusionInput
12246 }
12247 if imri.ProfileID != nil {
12248 objectMap["profileId"] = imri.ProfileID
12249 }
12250 if imri.DisksToInclude != nil {
12251 objectMap["disksToInclude"] = imri.DisksToInclude
12252 }
12253 if imri.InstanceType != "" {
12254 objectMap["instanceType"] = imri.InstanceType
12255 }
12256 return json.Marshal(objectMap)
12257 }
12258
12259
12260 func (imri InMageReprotectInput) AsA2AReprotectInput() (*A2AReprotectInput, bool) {
12261 return nil, false
12262 }
12263
12264
12265 func (imri InMageReprotectInput) AsHyperVReplicaAzureReprotectInput() (*HyperVReplicaAzureReprotectInput, bool) {
12266 return nil, false
12267 }
12268
12269
12270 func (imri InMageReprotectInput) AsInMageAzureV2ReprotectInput() (*InMageAzureV2ReprotectInput, bool) {
12271 return nil, false
12272 }
12273
12274
12275 func (imri InMageReprotectInput) AsInMageReprotectInput() (*InMageReprotectInput, bool) {
12276 return &imri, true
12277 }
12278
12279
12280 func (imri InMageReprotectInput) AsReverseReplicationProviderSpecificInput() (*ReverseReplicationProviderSpecificInput, bool) {
12281 return nil, false
12282 }
12283
12284
12285 func (imri InMageReprotectInput) AsBasicReverseReplicationProviderSpecificInput() (BasicReverseReplicationProviderSpecificInput, bool) {
12286 return &imri, true
12287 }
12288
12289
12290 type InMageTestFailoverInput struct {
12291
12292 RecoveryPointType RecoveryPointType `json:"recoveryPointType,omitempty"`
12293
12294 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
12295
12296 InstanceType InstanceTypeBasicTestFailoverProviderSpecificInput `json:"instanceType,omitempty"`
12297 }
12298
12299
12300 func (imtfi InMageTestFailoverInput) MarshalJSON() ([]byte, error) {
12301 imtfi.InstanceType = InstanceTypeBasicTestFailoverProviderSpecificInputInstanceTypeInMage
12302 objectMap := make(map[string]interface{})
12303 if imtfi.RecoveryPointType != "" {
12304 objectMap["recoveryPointType"] = imtfi.RecoveryPointType
12305 }
12306 if imtfi.RecoveryPointID != nil {
12307 objectMap["recoveryPointId"] = imtfi.RecoveryPointID
12308 }
12309 if imtfi.InstanceType != "" {
12310 objectMap["instanceType"] = imtfi.InstanceType
12311 }
12312 return json.Marshal(objectMap)
12313 }
12314
12315
12316 func (imtfi InMageTestFailoverInput) AsA2ATestFailoverInput() (*A2ATestFailoverInput, bool) {
12317 return nil, false
12318 }
12319
12320
12321 func (imtfi InMageTestFailoverInput) AsHyperVReplicaAzureTestFailoverInput() (*HyperVReplicaAzureTestFailoverInput, bool) {
12322 return nil, false
12323 }
12324
12325
12326 func (imtfi InMageTestFailoverInput) AsInMageAzureV2TestFailoverInput() (*InMageAzureV2TestFailoverInput, bool) {
12327 return nil, false
12328 }
12329
12330
12331 func (imtfi InMageTestFailoverInput) AsInMageRcmTestFailoverInput() (*InMageRcmTestFailoverInput, bool) {
12332 return nil, false
12333 }
12334
12335
12336 func (imtfi InMageTestFailoverInput) AsInMageTestFailoverInput() (*InMageTestFailoverInput, bool) {
12337 return &imtfi, true
12338 }
12339
12340
12341 func (imtfi InMageTestFailoverInput) AsTestFailoverProviderSpecificInput() (*TestFailoverProviderSpecificInput, bool) {
12342 return nil, false
12343 }
12344
12345
12346 func (imtfi InMageTestFailoverInput) AsBasicTestFailoverProviderSpecificInput() (BasicTestFailoverProviderSpecificInput, bool) {
12347 return &imtfi, true
12348 }
12349
12350
12351 type InMageUnplannedFailoverInput struct {
12352
12353 RecoveryPointType RecoveryPointType `json:"recoveryPointType,omitempty"`
12354
12355 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
12356
12357 InstanceType InstanceTypeBasicUnplannedFailoverProviderSpecificInput `json:"instanceType,omitempty"`
12358 }
12359
12360
12361 func (imufi InMageUnplannedFailoverInput) MarshalJSON() ([]byte, error) {
12362 imufi.InstanceType = InstanceTypeBasicUnplannedFailoverProviderSpecificInputInstanceTypeInMage
12363 objectMap := make(map[string]interface{})
12364 if imufi.RecoveryPointType != "" {
12365 objectMap["recoveryPointType"] = imufi.RecoveryPointType
12366 }
12367 if imufi.RecoveryPointID != nil {
12368 objectMap["recoveryPointId"] = imufi.RecoveryPointID
12369 }
12370 if imufi.InstanceType != "" {
12371 objectMap["instanceType"] = imufi.InstanceType
12372 }
12373 return json.Marshal(objectMap)
12374 }
12375
12376
12377 func (imufi InMageUnplannedFailoverInput) AsA2AUnplannedFailoverInput() (*A2AUnplannedFailoverInput, bool) {
12378 return nil, false
12379 }
12380
12381
12382 func (imufi InMageUnplannedFailoverInput) AsHyperVReplicaAzureUnplannedFailoverInput() (*HyperVReplicaAzureUnplannedFailoverInput, bool) {
12383 return nil, false
12384 }
12385
12386
12387 func (imufi InMageUnplannedFailoverInput) AsInMageAzureV2UnplannedFailoverInput() (*InMageAzureV2UnplannedFailoverInput, bool) {
12388 return nil, false
12389 }
12390
12391
12392 func (imufi InMageUnplannedFailoverInput) AsInMageRcmUnplannedFailoverInput() (*InMageRcmUnplannedFailoverInput, bool) {
12393 return nil, false
12394 }
12395
12396
12397 func (imufi InMageUnplannedFailoverInput) AsInMageUnplannedFailoverInput() (*InMageUnplannedFailoverInput, bool) {
12398 return &imufi, true
12399 }
12400
12401
12402 func (imufi InMageUnplannedFailoverInput) AsUnplannedFailoverProviderSpecificInput() (*UnplannedFailoverProviderSpecificInput, bool) {
12403 return nil, false
12404 }
12405
12406
12407 func (imufi InMageUnplannedFailoverInput) AsBasicUnplannedFailoverProviderSpecificInput() (BasicUnplannedFailoverProviderSpecificInput, bool) {
12408 return &imufi, true
12409 }
12410
12411
12412
12413 type InMageVolumeExclusionOptions struct {
12414
12415 VolumeLabel *string `json:"volumeLabel,omitempty"`
12416
12417 OnlyExcludeIfSingleVolume *string `json:"onlyExcludeIfSingleVolume,omitempty"`
12418 }
12419
12420
12421
12422
12423
12424 type InnerHealthError struct {
12425
12426 ErrorSource *string `json:"errorSource,omitempty"`
12427
12428 ErrorType *string `json:"errorType,omitempty"`
12429
12430 ErrorLevel *string `json:"errorLevel,omitempty"`
12431
12432 ErrorCategory *string `json:"errorCategory,omitempty"`
12433
12434 ErrorCode *string `json:"errorCode,omitempty"`
12435
12436 SummaryMessage *string `json:"summaryMessage,omitempty"`
12437
12438 ErrorMessage *string `json:"errorMessage,omitempty"`
12439
12440 PossibleCauses *string `json:"possibleCauses,omitempty"`
12441
12442 RecommendedAction *string `json:"recommendedAction,omitempty"`
12443
12444 CreationTimeUtc *date.Time `json:"creationTimeUtc,omitempty"`
12445
12446 RecoveryProviderErrorMessage *string `json:"recoveryProviderErrorMessage,omitempty"`
12447
12448 EntityID *string `json:"entityId,omitempty"`
12449 }
12450
12451
12452 type InputEndpoint struct {
12453
12454 EndpointName *string `json:"endpointName,omitempty"`
12455
12456 PrivatePort *int32 `json:"privatePort,omitempty"`
12457
12458 PublicPort *int32 `json:"publicPort,omitempty"`
12459
12460 Protocol *string `json:"protocol,omitempty"`
12461 }
12462
12463
12464 type IPConfig struct {
12465
12466 StaticIPAddress *string `json:"staticIPAddress,omitempty"`
12467
12468 PublicIPAddressID *string `json:"publicIpAddressId,omitempty"`
12469
12470 LBBackendAddressPoolIds *[]string `json:"lBBackendAddressPoolIds,omitempty"`
12471 }
12472
12473
12474 type Job struct {
12475 autorest.Response `json:"-"`
12476
12477 Properties *JobProperties `json:"properties,omitempty"`
12478
12479 ID *string `json:"id,omitempty"`
12480
12481 Name *string `json:"name,omitempty"`
12482
12483 Type *string `json:"type,omitempty"`
12484
12485 Location *string `json:"location,omitempty"`
12486 }
12487
12488
12489 func (j Job) MarshalJSON() ([]byte, error) {
12490 objectMap := make(map[string]interface{})
12491 if j.Properties != nil {
12492 objectMap["properties"] = j.Properties
12493 }
12494 if j.Location != nil {
12495 objectMap["location"] = j.Location
12496 }
12497 return json.Marshal(objectMap)
12498 }
12499
12500
12501 type JobCollection struct {
12502 autorest.Response `json:"-"`
12503
12504 Value *[]Job `json:"value,omitempty"`
12505
12506 NextLink *string `json:"nextLink,omitempty"`
12507 }
12508
12509
12510 type JobCollectionIterator struct {
12511 i int
12512 page JobCollectionPage
12513 }
12514
12515
12516
12517 func (iter *JobCollectionIterator) NextWithContext(ctx context.Context) (err error) {
12518 if tracing.IsEnabled() {
12519 ctx = tracing.StartSpan(ctx, fqdn+"/JobCollectionIterator.NextWithContext")
12520 defer func() {
12521 sc := -1
12522 if iter.Response().Response.Response != nil {
12523 sc = iter.Response().Response.Response.StatusCode
12524 }
12525 tracing.EndSpan(ctx, sc, err)
12526 }()
12527 }
12528 iter.i++
12529 if iter.i < len(iter.page.Values()) {
12530 return nil
12531 }
12532 err = iter.page.NextWithContext(ctx)
12533 if err != nil {
12534 iter.i--
12535 return err
12536 }
12537 iter.i = 0
12538 return nil
12539 }
12540
12541
12542
12543
12544 func (iter *JobCollectionIterator) Next() error {
12545 return iter.NextWithContext(context.Background())
12546 }
12547
12548
12549 func (iter JobCollectionIterator) NotDone() bool {
12550 return iter.page.NotDone() && iter.i < len(iter.page.Values())
12551 }
12552
12553
12554 func (iter JobCollectionIterator) Response() JobCollection {
12555 return iter.page.Response()
12556 }
12557
12558
12559
12560 func (iter JobCollectionIterator) Value() Job {
12561 if !iter.page.NotDone() {
12562 return Job{}
12563 }
12564 return iter.page.Values()[iter.i]
12565 }
12566
12567
12568 func NewJobCollectionIterator(page JobCollectionPage) JobCollectionIterator {
12569 return JobCollectionIterator{page: page}
12570 }
12571
12572
12573 func (jc JobCollection) IsEmpty() bool {
12574 return jc.Value == nil || len(*jc.Value) == 0
12575 }
12576
12577
12578 func (jc JobCollection) hasNextLink() bool {
12579 return jc.NextLink != nil && len(*jc.NextLink) != 0
12580 }
12581
12582
12583
12584 func (jc JobCollection) jobCollectionPreparer(ctx context.Context) (*http.Request, error) {
12585 if !jc.hasNextLink() {
12586 return nil, nil
12587 }
12588 return autorest.Prepare((&http.Request{}).WithContext(ctx),
12589 autorest.AsJSON(),
12590 autorest.AsGet(),
12591 autorest.WithBaseURL(to.String(jc.NextLink)))
12592 }
12593
12594
12595 type JobCollectionPage struct {
12596 fn func(context.Context, JobCollection) (JobCollection, error)
12597 jc JobCollection
12598 }
12599
12600
12601
12602 func (page *JobCollectionPage) NextWithContext(ctx context.Context) (err error) {
12603 if tracing.IsEnabled() {
12604 ctx = tracing.StartSpan(ctx, fqdn+"/JobCollectionPage.NextWithContext")
12605 defer func() {
12606 sc := -1
12607 if page.Response().Response.Response != nil {
12608 sc = page.Response().Response.Response.StatusCode
12609 }
12610 tracing.EndSpan(ctx, sc, err)
12611 }()
12612 }
12613 for {
12614 next, err := page.fn(ctx, page.jc)
12615 if err != nil {
12616 return err
12617 }
12618 page.jc = next
12619 if !next.hasNextLink() || !next.IsEmpty() {
12620 break
12621 }
12622 }
12623 return nil
12624 }
12625
12626
12627
12628
12629 func (page *JobCollectionPage) Next() error {
12630 return page.NextWithContext(context.Background())
12631 }
12632
12633
12634 func (page JobCollectionPage) NotDone() bool {
12635 return !page.jc.IsEmpty()
12636 }
12637
12638
12639 func (page JobCollectionPage) Response() JobCollection {
12640 return page.jc
12641 }
12642
12643
12644 func (page JobCollectionPage) Values() []Job {
12645 if page.jc.IsEmpty() {
12646 return nil
12647 }
12648 return *page.jc.Value
12649 }
12650
12651
12652 func NewJobCollectionPage(cur JobCollection, getNextPage func(context.Context, JobCollection) (JobCollection, error)) JobCollectionPage {
12653 return JobCollectionPage{
12654 fn: getNextPage,
12655 jc: cur,
12656 }
12657 }
12658
12659
12660 type BasicJobDetails interface {
12661 AsAsrJobDetails() (*AsrJobDetails, bool)
12662 AsExportJobDetails() (*ExportJobDetails, bool)
12663 AsFailoverJobDetails() (*FailoverJobDetails, bool)
12664 AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool)
12665 AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool)
12666 AsJobDetails() (*JobDetails, bool)
12667 }
12668
12669
12670 type JobDetails struct {
12671
12672 AffectedObjectDetails map[string]*string `json:"affectedObjectDetails"`
12673
12674 InstanceType InstanceTypeBasicJobDetails `json:"instanceType,omitempty"`
12675 }
12676
12677 func unmarshalBasicJobDetails(body []byte) (BasicJobDetails, error) {
12678 var m map[string]interface{}
12679 err := json.Unmarshal(body, &m)
12680 if err != nil {
12681 return nil, err
12682 }
12683
12684 switch m["instanceType"] {
12685 case string(InstanceTypeAsrJobDetails):
12686 var ajd AsrJobDetails
12687 err := json.Unmarshal(body, &ajd)
12688 return ajd, err
12689 case string(InstanceTypeExportJobDetails):
12690 var ejd ExportJobDetails
12691 err := json.Unmarshal(body, &ejd)
12692 return ejd, err
12693 case string(InstanceTypeFailoverJobDetails):
12694 var fjd FailoverJobDetails
12695 err := json.Unmarshal(body, &fjd)
12696 return fjd, err
12697 case string(InstanceTypeSwitchProtectionJobDetails):
12698 var spjd SwitchProtectionJobDetails
12699 err := json.Unmarshal(body, &spjd)
12700 return spjd, err
12701 case string(InstanceTypeTestFailoverJobDetails):
12702 var tfjd TestFailoverJobDetails
12703 err := json.Unmarshal(body, &tfjd)
12704 return tfjd, err
12705 default:
12706 var jd JobDetails
12707 err := json.Unmarshal(body, &jd)
12708 return jd, err
12709 }
12710 }
12711 func unmarshalBasicJobDetailsArray(body []byte) ([]BasicJobDetails, error) {
12712 var rawMessages []*json.RawMessage
12713 err := json.Unmarshal(body, &rawMessages)
12714 if err != nil {
12715 return nil, err
12716 }
12717
12718 jdArray := make([]BasicJobDetails, len(rawMessages))
12719
12720 for index, rawMessage := range rawMessages {
12721 jd, err := unmarshalBasicJobDetails(*rawMessage)
12722 if err != nil {
12723 return nil, err
12724 }
12725 jdArray[index] = jd
12726 }
12727 return jdArray, nil
12728 }
12729
12730
12731 func (jd JobDetails) MarshalJSON() ([]byte, error) {
12732 jd.InstanceType = InstanceTypeJobDetails
12733 objectMap := make(map[string]interface{})
12734 if jd.AffectedObjectDetails != nil {
12735 objectMap["affectedObjectDetails"] = jd.AffectedObjectDetails
12736 }
12737 if jd.InstanceType != "" {
12738 objectMap["instanceType"] = jd.InstanceType
12739 }
12740 return json.Marshal(objectMap)
12741 }
12742
12743
12744 func (jd JobDetails) AsAsrJobDetails() (*AsrJobDetails, bool) {
12745 return nil, false
12746 }
12747
12748
12749 func (jd JobDetails) AsExportJobDetails() (*ExportJobDetails, bool) {
12750 return nil, false
12751 }
12752
12753
12754 func (jd JobDetails) AsFailoverJobDetails() (*FailoverJobDetails, bool) {
12755 return nil, false
12756 }
12757
12758
12759 func (jd JobDetails) AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool) {
12760 return nil, false
12761 }
12762
12763
12764 func (jd JobDetails) AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool) {
12765 return nil, false
12766 }
12767
12768
12769 func (jd JobDetails) AsJobDetails() (*JobDetails, bool) {
12770 return &jd, true
12771 }
12772
12773
12774 func (jd JobDetails) AsBasicJobDetails() (BasicJobDetails, bool) {
12775 return &jd, true
12776 }
12777
12778
12779 type JobEntity struct {
12780
12781 JobID *string `json:"jobId,omitempty"`
12782
12783 JobFriendlyName *string `json:"jobFriendlyName,omitempty"`
12784
12785 TargetObjectID *string `json:"targetObjectId,omitempty"`
12786
12787 TargetObjectName *string `json:"targetObjectName,omitempty"`
12788
12789 TargetInstanceType *string `json:"targetInstanceType,omitempty"`
12790
12791 JobScenarioName *string `json:"jobScenarioName,omitempty"`
12792 }
12793
12794
12795 type JobErrorDetails struct {
12796
12797 ServiceErrorDetails *ServiceError `json:"serviceErrorDetails,omitempty"`
12798
12799 ProviderErrorDetails *ProviderError `json:"providerErrorDetails,omitempty"`
12800
12801 ErrorLevel *string `json:"errorLevel,omitempty"`
12802
12803 CreationTime *date.Time `json:"creationTime,omitempty"`
12804
12805 TaskID *string `json:"taskId,omitempty"`
12806 }
12807
12808
12809 type JobProperties struct {
12810
12811 ActivityID *string `json:"activityId,omitempty"`
12812
12813 ScenarioName *string `json:"scenarioName,omitempty"`
12814
12815 FriendlyName *string `json:"friendlyName,omitempty"`
12816
12817 State *string `json:"state,omitempty"`
12818
12819 StateDescription *string `json:"stateDescription,omitempty"`
12820
12821 Tasks *[]ASRTask `json:"tasks,omitempty"`
12822
12823 Errors *[]JobErrorDetails `json:"errors,omitempty"`
12824
12825 StartTime *date.Time `json:"startTime,omitempty"`
12826
12827 EndTime *date.Time `json:"endTime,omitempty"`
12828
12829 AllowedActions *[]string `json:"allowedActions,omitempty"`
12830
12831 TargetObjectID *string `json:"targetObjectId,omitempty"`
12832
12833 TargetObjectName *string `json:"targetObjectName,omitempty"`
12834
12835 TargetInstanceType *string `json:"targetInstanceType,omitempty"`
12836
12837 CustomDetails BasicJobDetails `json:"customDetails,omitempty"`
12838 }
12839
12840
12841 func (jp *JobProperties) UnmarshalJSON(body []byte) error {
12842 var m map[string]*json.RawMessage
12843 err := json.Unmarshal(body, &m)
12844 if err != nil {
12845 return err
12846 }
12847 for k, v := range m {
12848 switch k {
12849 case "activityId":
12850 if v != nil {
12851 var activityID string
12852 err = json.Unmarshal(*v, &activityID)
12853 if err != nil {
12854 return err
12855 }
12856 jp.ActivityID = &activityID
12857 }
12858 case "scenarioName":
12859 if v != nil {
12860 var scenarioName string
12861 err = json.Unmarshal(*v, &scenarioName)
12862 if err != nil {
12863 return err
12864 }
12865 jp.ScenarioName = &scenarioName
12866 }
12867 case "friendlyName":
12868 if v != nil {
12869 var friendlyName string
12870 err = json.Unmarshal(*v, &friendlyName)
12871 if err != nil {
12872 return err
12873 }
12874 jp.FriendlyName = &friendlyName
12875 }
12876 case "state":
12877 if v != nil {
12878 var state string
12879 err = json.Unmarshal(*v, &state)
12880 if err != nil {
12881 return err
12882 }
12883 jp.State = &state
12884 }
12885 case "stateDescription":
12886 if v != nil {
12887 var stateDescription string
12888 err = json.Unmarshal(*v, &stateDescription)
12889 if err != nil {
12890 return err
12891 }
12892 jp.StateDescription = &stateDescription
12893 }
12894 case "tasks":
12895 if v != nil {
12896 var tasks []ASRTask
12897 err = json.Unmarshal(*v, &tasks)
12898 if err != nil {
12899 return err
12900 }
12901 jp.Tasks = &tasks
12902 }
12903 case "errors":
12904 if v != nil {
12905 var errorsVar []JobErrorDetails
12906 err = json.Unmarshal(*v, &errorsVar)
12907 if err != nil {
12908 return err
12909 }
12910 jp.Errors = &errorsVar
12911 }
12912 case "startTime":
12913 if v != nil {
12914 var startTime date.Time
12915 err = json.Unmarshal(*v, &startTime)
12916 if err != nil {
12917 return err
12918 }
12919 jp.StartTime = &startTime
12920 }
12921 case "endTime":
12922 if v != nil {
12923 var endTime date.Time
12924 err = json.Unmarshal(*v, &endTime)
12925 if err != nil {
12926 return err
12927 }
12928 jp.EndTime = &endTime
12929 }
12930 case "allowedActions":
12931 if v != nil {
12932 var allowedActions []string
12933 err = json.Unmarshal(*v, &allowedActions)
12934 if err != nil {
12935 return err
12936 }
12937 jp.AllowedActions = &allowedActions
12938 }
12939 case "targetObjectId":
12940 if v != nil {
12941 var targetObjectID string
12942 err = json.Unmarshal(*v, &targetObjectID)
12943 if err != nil {
12944 return err
12945 }
12946 jp.TargetObjectID = &targetObjectID
12947 }
12948 case "targetObjectName":
12949 if v != nil {
12950 var targetObjectName string
12951 err = json.Unmarshal(*v, &targetObjectName)
12952 if err != nil {
12953 return err
12954 }
12955 jp.TargetObjectName = &targetObjectName
12956 }
12957 case "targetInstanceType":
12958 if v != nil {
12959 var targetInstanceType string
12960 err = json.Unmarshal(*v, &targetInstanceType)
12961 if err != nil {
12962 return err
12963 }
12964 jp.TargetInstanceType = &targetInstanceType
12965 }
12966 case "customDetails":
12967 if v != nil {
12968 customDetails, err := unmarshalBasicJobDetails(*v)
12969 if err != nil {
12970 return err
12971 }
12972 jp.CustomDetails = customDetails
12973 }
12974 }
12975 }
12976
12977 return nil
12978 }
12979
12980
12981 type JobQueryParameter struct {
12982
12983 StartTime *string `json:"startTime,omitempty"`
12984
12985 EndTime *string `json:"endTime,omitempty"`
12986
12987 FabricID *string `json:"fabricId,omitempty"`
12988
12989 AffectedObjectTypes *string `json:"affectedObjectTypes,omitempty"`
12990
12991 JobStatus *string `json:"jobStatus,omitempty"`
12992 }
12993
12994
12995 type JobStatusEventDetails struct {
12996
12997 JobID *string `json:"jobId,omitempty"`
12998
12999 JobFriendlyName *string `json:"jobFriendlyName,omitempty"`
13000
13001 JobStatus *string `json:"jobStatus,omitempty"`
13002
13003 AffectedObjectType *string `json:"affectedObjectType,omitempty"`
13004
13005 InstanceType InstanceTypeBasicEventSpecificDetails `json:"instanceType,omitempty"`
13006 }
13007
13008
13009 func (jsed JobStatusEventDetails) MarshalJSON() ([]byte, error) {
13010 jsed.InstanceType = InstanceTypeJobStatus
13011 objectMap := make(map[string]interface{})
13012 if jsed.JobID != nil {
13013 objectMap["jobId"] = jsed.JobID
13014 }
13015 if jsed.JobFriendlyName != nil {
13016 objectMap["jobFriendlyName"] = jsed.JobFriendlyName
13017 }
13018 if jsed.JobStatus != nil {
13019 objectMap["jobStatus"] = jsed.JobStatus
13020 }
13021 if jsed.AffectedObjectType != nil {
13022 objectMap["affectedObjectType"] = jsed.AffectedObjectType
13023 }
13024 if jsed.InstanceType != "" {
13025 objectMap["instanceType"] = jsed.InstanceType
13026 }
13027 return json.Marshal(objectMap)
13028 }
13029
13030
13031 func (jsed JobStatusEventDetails) AsJobStatusEventDetails() (*JobStatusEventDetails, bool) {
13032 return &jsed, true
13033 }
13034
13035
13036 func (jsed JobStatusEventDetails) AsEventSpecificDetails() (*EventSpecificDetails, bool) {
13037 return nil, false
13038 }
13039
13040
13041 func (jsed JobStatusEventDetails) AsBasicEventSpecificDetails() (BasicEventSpecificDetails, bool) {
13042 return &jsed, true
13043 }
13044
13045
13046
13047 type JobTaskDetails struct {
13048
13049 JobTask *JobEntity `json:"jobTask,omitempty"`
13050
13051 InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"`
13052 }
13053
13054
13055 func (jtd JobTaskDetails) MarshalJSON() ([]byte, error) {
13056 jtd.InstanceType = InstanceTypeJobTaskDetails
13057 objectMap := make(map[string]interface{})
13058 if jtd.JobTask != nil {
13059 objectMap["jobTask"] = jtd.JobTask
13060 }
13061 if jtd.InstanceType != "" {
13062 objectMap["instanceType"] = jtd.InstanceType
13063 }
13064 return json.Marshal(objectMap)
13065 }
13066
13067
13068 func (jtd JobTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) {
13069 return nil, false
13070 }
13071
13072
13073 func (jtd JobTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) {
13074 return nil, false
13075 }
13076
13077
13078 func (jtd JobTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) {
13079 return nil, false
13080 }
13081
13082
13083 func (jtd JobTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) {
13084 return &jtd, true
13085 }
13086
13087
13088 func (jtd JobTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) {
13089 return nil, false
13090 }
13091
13092
13093 func (jtd JobTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) {
13094 return nil, false
13095 }
13096
13097
13098 func (jtd JobTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) {
13099 return nil, false
13100 }
13101
13102
13103 func (jtd JobTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) {
13104 return nil, false
13105 }
13106
13107
13108 func (jtd JobTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) {
13109 return nil, false
13110 }
13111
13112
13113 func (jtd JobTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) {
13114 return &jtd, true
13115 }
13116
13117
13118 type KeyEncryptionKeyInfo struct {
13119
13120 KeyIdentifier *string `json:"keyIdentifier,omitempty"`
13121
13122 KeyVaultResourceArmID *string `json:"keyVaultResourceArmId,omitempty"`
13123 }
13124
13125
13126 type LogicalNetwork struct {
13127 autorest.Response `json:"-"`
13128
13129 Properties *LogicalNetworkProperties `json:"properties,omitempty"`
13130
13131 ID *string `json:"id,omitempty"`
13132
13133 Name *string `json:"name,omitempty"`
13134
13135 Type *string `json:"type,omitempty"`
13136
13137 Location *string `json:"location,omitempty"`
13138 }
13139
13140
13141 func (ln LogicalNetwork) MarshalJSON() ([]byte, error) {
13142 objectMap := make(map[string]interface{})
13143 if ln.Properties != nil {
13144 objectMap["properties"] = ln.Properties
13145 }
13146 if ln.Location != nil {
13147 objectMap["location"] = ln.Location
13148 }
13149 return json.Marshal(objectMap)
13150 }
13151
13152
13153 type LogicalNetworkCollection struct {
13154 autorest.Response `json:"-"`
13155
13156 Value *[]LogicalNetwork `json:"value,omitempty"`
13157
13158 NextLink *string `json:"nextLink,omitempty"`
13159 }
13160
13161
13162 type LogicalNetworkCollectionIterator struct {
13163 i int
13164 page LogicalNetworkCollectionPage
13165 }
13166
13167
13168
13169 func (iter *LogicalNetworkCollectionIterator) NextWithContext(ctx context.Context) (err error) {
13170 if tracing.IsEnabled() {
13171 ctx = tracing.StartSpan(ctx, fqdn+"/LogicalNetworkCollectionIterator.NextWithContext")
13172 defer func() {
13173 sc := -1
13174 if iter.Response().Response.Response != nil {
13175 sc = iter.Response().Response.Response.StatusCode
13176 }
13177 tracing.EndSpan(ctx, sc, err)
13178 }()
13179 }
13180 iter.i++
13181 if iter.i < len(iter.page.Values()) {
13182 return nil
13183 }
13184 err = iter.page.NextWithContext(ctx)
13185 if err != nil {
13186 iter.i--
13187 return err
13188 }
13189 iter.i = 0
13190 return nil
13191 }
13192
13193
13194
13195
13196 func (iter *LogicalNetworkCollectionIterator) Next() error {
13197 return iter.NextWithContext(context.Background())
13198 }
13199
13200
13201 func (iter LogicalNetworkCollectionIterator) NotDone() bool {
13202 return iter.page.NotDone() && iter.i < len(iter.page.Values())
13203 }
13204
13205
13206 func (iter LogicalNetworkCollectionIterator) Response() LogicalNetworkCollection {
13207 return iter.page.Response()
13208 }
13209
13210
13211
13212 func (iter LogicalNetworkCollectionIterator) Value() LogicalNetwork {
13213 if !iter.page.NotDone() {
13214 return LogicalNetwork{}
13215 }
13216 return iter.page.Values()[iter.i]
13217 }
13218
13219
13220 func NewLogicalNetworkCollectionIterator(page LogicalNetworkCollectionPage) LogicalNetworkCollectionIterator {
13221 return LogicalNetworkCollectionIterator{page: page}
13222 }
13223
13224
13225 func (lnc LogicalNetworkCollection) IsEmpty() bool {
13226 return lnc.Value == nil || len(*lnc.Value) == 0
13227 }
13228
13229
13230 func (lnc LogicalNetworkCollection) hasNextLink() bool {
13231 return lnc.NextLink != nil && len(*lnc.NextLink) != 0
13232 }
13233
13234
13235
13236 func (lnc LogicalNetworkCollection) logicalNetworkCollectionPreparer(ctx context.Context) (*http.Request, error) {
13237 if !lnc.hasNextLink() {
13238 return nil, nil
13239 }
13240 return autorest.Prepare((&http.Request{}).WithContext(ctx),
13241 autorest.AsJSON(),
13242 autorest.AsGet(),
13243 autorest.WithBaseURL(to.String(lnc.NextLink)))
13244 }
13245
13246
13247 type LogicalNetworkCollectionPage struct {
13248 fn func(context.Context, LogicalNetworkCollection) (LogicalNetworkCollection, error)
13249 lnc LogicalNetworkCollection
13250 }
13251
13252
13253
13254 func (page *LogicalNetworkCollectionPage) NextWithContext(ctx context.Context) (err error) {
13255 if tracing.IsEnabled() {
13256 ctx = tracing.StartSpan(ctx, fqdn+"/LogicalNetworkCollectionPage.NextWithContext")
13257 defer func() {
13258 sc := -1
13259 if page.Response().Response.Response != nil {
13260 sc = page.Response().Response.Response.StatusCode
13261 }
13262 tracing.EndSpan(ctx, sc, err)
13263 }()
13264 }
13265 for {
13266 next, err := page.fn(ctx, page.lnc)
13267 if err != nil {
13268 return err
13269 }
13270 page.lnc = next
13271 if !next.hasNextLink() || !next.IsEmpty() {
13272 break
13273 }
13274 }
13275 return nil
13276 }
13277
13278
13279
13280
13281 func (page *LogicalNetworkCollectionPage) Next() error {
13282 return page.NextWithContext(context.Background())
13283 }
13284
13285
13286 func (page LogicalNetworkCollectionPage) NotDone() bool {
13287 return !page.lnc.IsEmpty()
13288 }
13289
13290
13291 func (page LogicalNetworkCollectionPage) Response() LogicalNetworkCollection {
13292 return page.lnc
13293 }
13294
13295
13296 func (page LogicalNetworkCollectionPage) Values() []LogicalNetwork {
13297 if page.lnc.IsEmpty() {
13298 return nil
13299 }
13300 return *page.lnc.Value
13301 }
13302
13303
13304 func NewLogicalNetworkCollectionPage(cur LogicalNetworkCollection, getNextPage func(context.Context, LogicalNetworkCollection) (LogicalNetworkCollection, error)) LogicalNetworkCollectionPage {
13305 return LogicalNetworkCollectionPage{
13306 fn: getNextPage,
13307 lnc: cur,
13308 }
13309 }
13310
13311
13312 type LogicalNetworkProperties struct {
13313
13314 FriendlyName *string `json:"friendlyName,omitempty"`
13315
13316 NetworkVirtualizationStatus *string `json:"networkVirtualizationStatus,omitempty"`
13317
13318 LogicalNetworkUsage *string `json:"logicalNetworkUsage,omitempty"`
13319
13320 LogicalNetworkDefinitionsStatus *string `json:"logicalNetworkDefinitionsStatus,omitempty"`
13321 }
13322
13323
13324 type ManualActionTaskDetails struct {
13325
13326 Name *string `json:"name,omitempty"`
13327
13328 Instructions *string `json:"instructions,omitempty"`
13329
13330 Observation *string `json:"observation,omitempty"`
13331
13332 InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"`
13333 }
13334
13335
13336 func (matd ManualActionTaskDetails) MarshalJSON() ([]byte, error) {
13337 matd.InstanceType = InstanceTypeManualActionTaskDetails
13338 objectMap := make(map[string]interface{})
13339 if matd.Name != nil {
13340 objectMap["name"] = matd.Name
13341 }
13342 if matd.Instructions != nil {
13343 objectMap["instructions"] = matd.Instructions
13344 }
13345 if matd.Observation != nil {
13346 objectMap["observation"] = matd.Observation
13347 }
13348 if matd.InstanceType != "" {
13349 objectMap["instanceType"] = matd.InstanceType
13350 }
13351 return json.Marshal(objectMap)
13352 }
13353
13354
13355 func (matd ManualActionTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) {
13356 return nil, false
13357 }
13358
13359
13360 func (matd ManualActionTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) {
13361 return nil, false
13362 }
13363
13364
13365 func (matd ManualActionTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) {
13366 return nil, false
13367 }
13368
13369
13370 func (matd ManualActionTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) {
13371 return nil, false
13372 }
13373
13374
13375 func (matd ManualActionTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) {
13376 return &matd, true
13377 }
13378
13379
13380 func (matd ManualActionTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) {
13381 return nil, false
13382 }
13383
13384
13385 func (matd ManualActionTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) {
13386 return nil, false
13387 }
13388
13389
13390 func (matd ManualActionTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) {
13391 return nil, false
13392 }
13393
13394
13395 func (matd ManualActionTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) {
13396 return nil, false
13397 }
13398
13399
13400 func (matd ManualActionTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) {
13401 return &matd, true
13402 }
13403
13404
13405 type MasterTargetServer struct {
13406
13407 ID *string `json:"id,omitempty"`
13408
13409 IPAddress *string `json:"ipAddress,omitempty"`
13410
13411 Name *string `json:"name,omitempty"`
13412
13413 OsType *string `json:"osType,omitempty"`
13414
13415 AgentVersion *string `json:"agentVersion,omitempty"`
13416
13417 LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"`
13418
13419 VersionStatus *string `json:"versionStatus,omitempty"`
13420
13421 RetentionVolumes *[]RetentionVolume `json:"retentionVolumes,omitempty"`
13422
13423 DataStores *[]DataStore `json:"dataStores,omitempty"`
13424
13425 ValidationErrors *[]HealthError `json:"validationErrors,omitempty"`
13426
13427 HealthErrors *[]HealthError `json:"healthErrors,omitempty"`
13428
13429 DiskCount *int32 `json:"diskCount,omitempty"`
13430
13431 OsVersion *string `json:"osVersion,omitempty"`
13432
13433 AgentExpiryDate *date.Time `json:"agentExpiryDate,omitempty"`
13434
13435 MarsAgentVersion *string `json:"marsAgentVersion,omitempty"`
13436
13437 MarsAgentExpiryDate *date.Time `json:"marsAgentExpiryDate,omitempty"`
13438
13439 AgentVersionDetails *VersionDetails `json:"agentVersionDetails,omitempty"`
13440
13441 MarsAgentVersionDetails *VersionDetails `json:"marsAgentVersionDetails,omitempty"`
13442 }
13443
13444
13445 type MigrateInput struct {
13446
13447 Properties *MigrateInputProperties `json:"properties,omitempty"`
13448 }
13449
13450
13451 type MigrateInputProperties struct {
13452
13453 ProviderSpecificDetails BasicMigrateProviderSpecificInput `json:"providerSpecificDetails,omitempty"`
13454 }
13455
13456
13457 func (mip *MigrateInputProperties) UnmarshalJSON(body []byte) error {
13458 var m map[string]*json.RawMessage
13459 err := json.Unmarshal(body, &m)
13460 if err != nil {
13461 return err
13462 }
13463 for k, v := range m {
13464 switch k {
13465 case "providerSpecificDetails":
13466 if v != nil {
13467 providerSpecificDetails, err := unmarshalBasicMigrateProviderSpecificInput(*v)
13468 if err != nil {
13469 return err
13470 }
13471 mip.ProviderSpecificDetails = providerSpecificDetails
13472 }
13473 }
13474 }
13475
13476 return nil
13477 }
13478
13479
13480 type BasicMigrateProviderSpecificInput interface {
13481 AsVMwareCbtMigrateInput() (*VMwareCbtMigrateInput, bool)
13482 AsMigrateProviderSpecificInput() (*MigrateProviderSpecificInput, bool)
13483 }
13484
13485
13486 type MigrateProviderSpecificInput struct {
13487
13488 InstanceType InstanceTypeBasicMigrateProviderSpecificInput `json:"instanceType,omitempty"`
13489 }
13490
13491 func unmarshalBasicMigrateProviderSpecificInput(body []byte) (BasicMigrateProviderSpecificInput, error) {
13492 var m map[string]interface{}
13493 err := json.Unmarshal(body, &m)
13494 if err != nil {
13495 return nil, err
13496 }
13497
13498 switch m["instanceType"] {
13499 case string(InstanceTypeBasicMigrateProviderSpecificInputInstanceTypeVMwareCbt):
13500 var vmcmi VMwareCbtMigrateInput
13501 err := json.Unmarshal(body, &vmcmi)
13502 return vmcmi, err
13503 default:
13504 var mpsi MigrateProviderSpecificInput
13505 err := json.Unmarshal(body, &mpsi)
13506 return mpsi, err
13507 }
13508 }
13509 func unmarshalBasicMigrateProviderSpecificInputArray(body []byte) ([]BasicMigrateProviderSpecificInput, error) {
13510 var rawMessages []*json.RawMessage
13511 err := json.Unmarshal(body, &rawMessages)
13512 if err != nil {
13513 return nil, err
13514 }
13515
13516 mpsiArray := make([]BasicMigrateProviderSpecificInput, len(rawMessages))
13517
13518 for index, rawMessage := range rawMessages {
13519 mpsi, err := unmarshalBasicMigrateProviderSpecificInput(*rawMessage)
13520 if err != nil {
13521 return nil, err
13522 }
13523 mpsiArray[index] = mpsi
13524 }
13525 return mpsiArray, nil
13526 }
13527
13528
13529 func (mpsi MigrateProviderSpecificInput) MarshalJSON() ([]byte, error) {
13530 mpsi.InstanceType = InstanceTypeBasicMigrateProviderSpecificInputInstanceTypeMigrateProviderSpecificInput
13531 objectMap := make(map[string]interface{})
13532 if mpsi.InstanceType != "" {
13533 objectMap["instanceType"] = mpsi.InstanceType
13534 }
13535 return json.Marshal(objectMap)
13536 }
13537
13538
13539 func (mpsi MigrateProviderSpecificInput) AsVMwareCbtMigrateInput() (*VMwareCbtMigrateInput, bool) {
13540 return nil, false
13541 }
13542
13543
13544 func (mpsi MigrateProviderSpecificInput) AsMigrateProviderSpecificInput() (*MigrateProviderSpecificInput, bool) {
13545 return &mpsi, true
13546 }
13547
13548
13549 func (mpsi MigrateProviderSpecificInput) AsBasicMigrateProviderSpecificInput() (BasicMigrateProviderSpecificInput, bool) {
13550 return &mpsi, true
13551 }
13552
13553
13554 type MigrationItem struct {
13555 autorest.Response `json:"-"`
13556
13557 Properties *MigrationItemProperties `json:"properties,omitempty"`
13558
13559 ID *string `json:"id,omitempty"`
13560
13561 Name *string `json:"name,omitempty"`
13562
13563 Type *string `json:"type,omitempty"`
13564
13565 Location *string `json:"location,omitempty"`
13566 }
13567
13568
13569 func (mi MigrationItem) MarshalJSON() ([]byte, error) {
13570 objectMap := make(map[string]interface{})
13571 if mi.Properties != nil {
13572 objectMap["properties"] = mi.Properties
13573 }
13574 if mi.Location != nil {
13575 objectMap["location"] = mi.Location
13576 }
13577 return json.Marshal(objectMap)
13578 }
13579
13580
13581 type MigrationItemCollection struct {
13582 autorest.Response `json:"-"`
13583
13584 Value *[]MigrationItem `json:"value,omitempty"`
13585
13586 NextLink *string `json:"nextLink,omitempty"`
13587 }
13588
13589
13590 type MigrationItemCollectionIterator struct {
13591 i int
13592 page MigrationItemCollectionPage
13593 }
13594
13595
13596
13597 func (iter *MigrationItemCollectionIterator) NextWithContext(ctx context.Context) (err error) {
13598 if tracing.IsEnabled() {
13599 ctx = tracing.StartSpan(ctx, fqdn+"/MigrationItemCollectionIterator.NextWithContext")
13600 defer func() {
13601 sc := -1
13602 if iter.Response().Response.Response != nil {
13603 sc = iter.Response().Response.Response.StatusCode
13604 }
13605 tracing.EndSpan(ctx, sc, err)
13606 }()
13607 }
13608 iter.i++
13609 if iter.i < len(iter.page.Values()) {
13610 return nil
13611 }
13612 err = iter.page.NextWithContext(ctx)
13613 if err != nil {
13614 iter.i--
13615 return err
13616 }
13617 iter.i = 0
13618 return nil
13619 }
13620
13621
13622
13623
13624 func (iter *MigrationItemCollectionIterator) Next() error {
13625 return iter.NextWithContext(context.Background())
13626 }
13627
13628
13629 func (iter MigrationItemCollectionIterator) NotDone() bool {
13630 return iter.page.NotDone() && iter.i < len(iter.page.Values())
13631 }
13632
13633
13634 func (iter MigrationItemCollectionIterator) Response() MigrationItemCollection {
13635 return iter.page.Response()
13636 }
13637
13638
13639
13640 func (iter MigrationItemCollectionIterator) Value() MigrationItem {
13641 if !iter.page.NotDone() {
13642 return MigrationItem{}
13643 }
13644 return iter.page.Values()[iter.i]
13645 }
13646
13647
13648 func NewMigrationItemCollectionIterator(page MigrationItemCollectionPage) MigrationItemCollectionIterator {
13649 return MigrationItemCollectionIterator{page: page}
13650 }
13651
13652
13653 func (mic MigrationItemCollection) IsEmpty() bool {
13654 return mic.Value == nil || len(*mic.Value) == 0
13655 }
13656
13657
13658 func (mic MigrationItemCollection) hasNextLink() bool {
13659 return mic.NextLink != nil && len(*mic.NextLink) != 0
13660 }
13661
13662
13663
13664 func (mic MigrationItemCollection) migrationItemCollectionPreparer(ctx context.Context) (*http.Request, error) {
13665 if !mic.hasNextLink() {
13666 return nil, nil
13667 }
13668 return autorest.Prepare((&http.Request{}).WithContext(ctx),
13669 autorest.AsJSON(),
13670 autorest.AsGet(),
13671 autorest.WithBaseURL(to.String(mic.NextLink)))
13672 }
13673
13674
13675 type MigrationItemCollectionPage struct {
13676 fn func(context.Context, MigrationItemCollection) (MigrationItemCollection, error)
13677 mic MigrationItemCollection
13678 }
13679
13680
13681
13682 func (page *MigrationItemCollectionPage) NextWithContext(ctx context.Context) (err error) {
13683 if tracing.IsEnabled() {
13684 ctx = tracing.StartSpan(ctx, fqdn+"/MigrationItemCollectionPage.NextWithContext")
13685 defer func() {
13686 sc := -1
13687 if page.Response().Response.Response != nil {
13688 sc = page.Response().Response.Response.StatusCode
13689 }
13690 tracing.EndSpan(ctx, sc, err)
13691 }()
13692 }
13693 for {
13694 next, err := page.fn(ctx, page.mic)
13695 if err != nil {
13696 return err
13697 }
13698 page.mic = next
13699 if !next.hasNextLink() || !next.IsEmpty() {
13700 break
13701 }
13702 }
13703 return nil
13704 }
13705
13706
13707
13708
13709 func (page *MigrationItemCollectionPage) Next() error {
13710 return page.NextWithContext(context.Background())
13711 }
13712
13713
13714 func (page MigrationItemCollectionPage) NotDone() bool {
13715 return !page.mic.IsEmpty()
13716 }
13717
13718
13719 func (page MigrationItemCollectionPage) Response() MigrationItemCollection {
13720 return page.mic
13721 }
13722
13723
13724 func (page MigrationItemCollectionPage) Values() []MigrationItem {
13725 if page.mic.IsEmpty() {
13726 return nil
13727 }
13728 return *page.mic.Value
13729 }
13730
13731
13732 func NewMigrationItemCollectionPage(cur MigrationItemCollection, getNextPage func(context.Context, MigrationItemCollection) (MigrationItemCollection, error)) MigrationItemCollectionPage {
13733 return MigrationItemCollectionPage{
13734 fn: getNextPage,
13735 mic: cur,
13736 }
13737 }
13738
13739
13740 type MigrationItemProperties struct {
13741
13742 MachineName *string `json:"machineName,omitempty"`
13743
13744 PolicyID *string `json:"policyId,omitempty"`
13745
13746 PolicyFriendlyName *string `json:"policyFriendlyName,omitempty"`
13747
13748 RecoveryServicesProviderID *string `json:"recoveryServicesProviderId,omitempty"`
13749
13750 MigrationState MigrationState `json:"migrationState,omitempty"`
13751
13752 MigrationStateDescription *string `json:"migrationStateDescription,omitempty"`
13753
13754 TestMigrateState TestMigrationState `json:"testMigrateState,omitempty"`
13755
13756 TestMigrateStateDescription *string `json:"testMigrateStateDescription,omitempty"`
13757
13758 Health *string `json:"health,omitempty"`
13759
13760 HealthErrors *[]HealthError `json:"healthErrors,omitempty"`
13761
13762 AllowedOperations *[]MigrationItemOperation `json:"allowedOperations,omitempty"`
13763
13764 CurrentJob *CurrentJobDetails `json:"currentJob,omitempty"`
13765
13766 ProviderSpecificDetails BasicMigrationProviderSpecificSettings `json:"providerSpecificDetails,omitempty"`
13767 }
13768
13769
13770 func (mip MigrationItemProperties) MarshalJSON() ([]byte, error) {
13771 objectMap := make(map[string]interface{})
13772 objectMap["providerSpecificDetails"] = mip.ProviderSpecificDetails
13773 return json.Marshal(objectMap)
13774 }
13775
13776
13777 func (mip *MigrationItemProperties) UnmarshalJSON(body []byte) error {
13778 var m map[string]*json.RawMessage
13779 err := json.Unmarshal(body, &m)
13780 if err != nil {
13781 return err
13782 }
13783 for k, v := range m {
13784 switch k {
13785 case "machineName":
13786 if v != nil {
13787 var machineName string
13788 err = json.Unmarshal(*v, &machineName)
13789 if err != nil {
13790 return err
13791 }
13792 mip.MachineName = &machineName
13793 }
13794 case "policyId":
13795 if v != nil {
13796 var policyID string
13797 err = json.Unmarshal(*v, &policyID)
13798 if err != nil {
13799 return err
13800 }
13801 mip.PolicyID = &policyID
13802 }
13803 case "policyFriendlyName":
13804 if v != nil {
13805 var policyFriendlyName string
13806 err = json.Unmarshal(*v, &policyFriendlyName)
13807 if err != nil {
13808 return err
13809 }
13810 mip.PolicyFriendlyName = &policyFriendlyName
13811 }
13812 case "recoveryServicesProviderId":
13813 if v != nil {
13814 var recoveryServicesProviderID string
13815 err = json.Unmarshal(*v, &recoveryServicesProviderID)
13816 if err != nil {
13817 return err
13818 }
13819 mip.RecoveryServicesProviderID = &recoveryServicesProviderID
13820 }
13821 case "migrationState":
13822 if v != nil {
13823 var migrationState MigrationState
13824 err = json.Unmarshal(*v, &migrationState)
13825 if err != nil {
13826 return err
13827 }
13828 mip.MigrationState = migrationState
13829 }
13830 case "migrationStateDescription":
13831 if v != nil {
13832 var migrationStateDescription string
13833 err = json.Unmarshal(*v, &migrationStateDescription)
13834 if err != nil {
13835 return err
13836 }
13837 mip.MigrationStateDescription = &migrationStateDescription
13838 }
13839 case "testMigrateState":
13840 if v != nil {
13841 var testMigrateState TestMigrationState
13842 err = json.Unmarshal(*v, &testMigrateState)
13843 if err != nil {
13844 return err
13845 }
13846 mip.TestMigrateState = testMigrateState
13847 }
13848 case "testMigrateStateDescription":
13849 if v != nil {
13850 var testMigrateStateDescription string
13851 err = json.Unmarshal(*v, &testMigrateStateDescription)
13852 if err != nil {
13853 return err
13854 }
13855 mip.TestMigrateStateDescription = &testMigrateStateDescription
13856 }
13857 case "health":
13858 if v != nil {
13859 var health string
13860 err = json.Unmarshal(*v, &health)
13861 if err != nil {
13862 return err
13863 }
13864 mip.Health = &health
13865 }
13866 case "healthErrors":
13867 if v != nil {
13868 var healthErrors []HealthError
13869 err = json.Unmarshal(*v, &healthErrors)
13870 if err != nil {
13871 return err
13872 }
13873 mip.HealthErrors = &healthErrors
13874 }
13875 case "allowedOperations":
13876 if v != nil {
13877 var allowedOperations []MigrationItemOperation
13878 err = json.Unmarshal(*v, &allowedOperations)
13879 if err != nil {
13880 return err
13881 }
13882 mip.AllowedOperations = &allowedOperations
13883 }
13884 case "currentJob":
13885 if v != nil {
13886 var currentJob CurrentJobDetails
13887 err = json.Unmarshal(*v, ¤tJob)
13888 if err != nil {
13889 return err
13890 }
13891 mip.CurrentJob = ¤tJob
13892 }
13893 case "providerSpecificDetails":
13894 if v != nil {
13895 providerSpecificDetails, err := unmarshalBasicMigrationProviderSpecificSettings(*v)
13896 if err != nil {
13897 return err
13898 }
13899 mip.ProviderSpecificDetails = providerSpecificDetails
13900 }
13901 }
13902 }
13903
13904 return nil
13905 }
13906
13907
13908 type MigrationItemsQueryParameter struct {
13909
13910 SourceFabricName *string `json:"sourceFabricName,omitempty"`
13911
13912 InstanceType *string `json:"instanceType,omitempty"`
13913 }
13914
13915
13916 type BasicMigrationProviderSpecificSettings interface {
13917 AsVMwareCbtMigrationDetails() (*VMwareCbtMigrationDetails, bool)
13918 AsMigrationProviderSpecificSettings() (*MigrationProviderSpecificSettings, bool)
13919 }
13920
13921
13922 type MigrationProviderSpecificSettings struct {
13923
13924 InstanceType InstanceTypeBasicMigrationProviderSpecificSettings `json:"instanceType,omitempty"`
13925 }
13926
13927 func unmarshalBasicMigrationProviderSpecificSettings(body []byte) (BasicMigrationProviderSpecificSettings, error) {
13928 var m map[string]interface{}
13929 err := json.Unmarshal(body, &m)
13930 if err != nil {
13931 return nil, err
13932 }
13933
13934 switch m["instanceType"] {
13935 case string(InstanceTypeBasicMigrationProviderSpecificSettingsInstanceTypeVMwareCbt):
13936 var vmcmd VMwareCbtMigrationDetails
13937 err := json.Unmarshal(body, &vmcmd)
13938 return vmcmd, err
13939 default:
13940 var mpss MigrationProviderSpecificSettings
13941 err := json.Unmarshal(body, &mpss)
13942 return mpss, err
13943 }
13944 }
13945 func unmarshalBasicMigrationProviderSpecificSettingsArray(body []byte) ([]BasicMigrationProviderSpecificSettings, error) {
13946 var rawMessages []*json.RawMessage
13947 err := json.Unmarshal(body, &rawMessages)
13948 if err != nil {
13949 return nil, err
13950 }
13951
13952 mpssArray := make([]BasicMigrationProviderSpecificSettings, len(rawMessages))
13953
13954 for index, rawMessage := range rawMessages {
13955 mpss, err := unmarshalBasicMigrationProviderSpecificSettings(*rawMessage)
13956 if err != nil {
13957 return nil, err
13958 }
13959 mpssArray[index] = mpss
13960 }
13961 return mpssArray, nil
13962 }
13963
13964
13965 func (mpss MigrationProviderSpecificSettings) MarshalJSON() ([]byte, error) {
13966 mpss.InstanceType = InstanceTypeBasicMigrationProviderSpecificSettingsInstanceTypeMigrationProviderSpecificSettings
13967 objectMap := make(map[string]interface{})
13968 if mpss.InstanceType != "" {
13969 objectMap["instanceType"] = mpss.InstanceType
13970 }
13971 return json.Marshal(objectMap)
13972 }
13973
13974
13975 func (mpss MigrationProviderSpecificSettings) AsVMwareCbtMigrationDetails() (*VMwareCbtMigrationDetails, bool) {
13976 return nil, false
13977 }
13978
13979
13980 func (mpss MigrationProviderSpecificSettings) AsMigrationProviderSpecificSettings() (*MigrationProviderSpecificSettings, bool) {
13981 return &mpss, true
13982 }
13983
13984
13985 func (mpss MigrationProviderSpecificSettings) AsBasicMigrationProviderSpecificSettings() (BasicMigrationProviderSpecificSettings, bool) {
13986 return &mpss, true
13987 }
13988
13989
13990 type MigrationRecoveryPoint struct {
13991 autorest.Response `json:"-"`
13992
13993 Properties *MigrationRecoveryPointProperties `json:"properties,omitempty"`
13994
13995 ID *string `json:"id,omitempty"`
13996
13997 Name *string `json:"name,omitempty"`
13998
13999 Type *string `json:"type,omitempty"`
14000
14001 Location *string `json:"location,omitempty"`
14002 }
14003
14004
14005 func (mrp MigrationRecoveryPoint) MarshalJSON() ([]byte, error) {
14006 objectMap := make(map[string]interface{})
14007 if mrp.Properties != nil {
14008 objectMap["properties"] = mrp.Properties
14009 }
14010 if mrp.Location != nil {
14011 objectMap["location"] = mrp.Location
14012 }
14013 return json.Marshal(objectMap)
14014 }
14015
14016
14017 type MigrationRecoveryPointCollection struct {
14018 autorest.Response `json:"-"`
14019
14020 Value *[]MigrationRecoveryPoint `json:"value,omitempty"`
14021
14022 NextLink *string `json:"nextLink,omitempty"`
14023 }
14024
14025
14026
14027 type MigrationRecoveryPointCollectionIterator struct {
14028 i int
14029 page MigrationRecoveryPointCollectionPage
14030 }
14031
14032
14033
14034 func (iter *MigrationRecoveryPointCollectionIterator) NextWithContext(ctx context.Context) (err error) {
14035 if tracing.IsEnabled() {
14036 ctx = tracing.StartSpan(ctx, fqdn+"/MigrationRecoveryPointCollectionIterator.NextWithContext")
14037 defer func() {
14038 sc := -1
14039 if iter.Response().Response.Response != nil {
14040 sc = iter.Response().Response.Response.StatusCode
14041 }
14042 tracing.EndSpan(ctx, sc, err)
14043 }()
14044 }
14045 iter.i++
14046 if iter.i < len(iter.page.Values()) {
14047 return nil
14048 }
14049 err = iter.page.NextWithContext(ctx)
14050 if err != nil {
14051 iter.i--
14052 return err
14053 }
14054 iter.i = 0
14055 return nil
14056 }
14057
14058
14059
14060
14061 func (iter *MigrationRecoveryPointCollectionIterator) Next() error {
14062 return iter.NextWithContext(context.Background())
14063 }
14064
14065
14066 func (iter MigrationRecoveryPointCollectionIterator) NotDone() bool {
14067 return iter.page.NotDone() && iter.i < len(iter.page.Values())
14068 }
14069
14070
14071 func (iter MigrationRecoveryPointCollectionIterator) Response() MigrationRecoveryPointCollection {
14072 return iter.page.Response()
14073 }
14074
14075
14076
14077 func (iter MigrationRecoveryPointCollectionIterator) Value() MigrationRecoveryPoint {
14078 if !iter.page.NotDone() {
14079 return MigrationRecoveryPoint{}
14080 }
14081 return iter.page.Values()[iter.i]
14082 }
14083
14084
14085 func NewMigrationRecoveryPointCollectionIterator(page MigrationRecoveryPointCollectionPage) MigrationRecoveryPointCollectionIterator {
14086 return MigrationRecoveryPointCollectionIterator{page: page}
14087 }
14088
14089
14090 func (mrpc MigrationRecoveryPointCollection) IsEmpty() bool {
14091 return mrpc.Value == nil || len(*mrpc.Value) == 0
14092 }
14093
14094
14095 func (mrpc MigrationRecoveryPointCollection) hasNextLink() bool {
14096 return mrpc.NextLink != nil && len(*mrpc.NextLink) != 0
14097 }
14098
14099
14100
14101 func (mrpc MigrationRecoveryPointCollection) migrationRecoveryPointCollectionPreparer(ctx context.Context) (*http.Request, error) {
14102 if !mrpc.hasNextLink() {
14103 return nil, nil
14104 }
14105 return autorest.Prepare((&http.Request{}).WithContext(ctx),
14106 autorest.AsJSON(),
14107 autorest.AsGet(),
14108 autorest.WithBaseURL(to.String(mrpc.NextLink)))
14109 }
14110
14111
14112 type MigrationRecoveryPointCollectionPage struct {
14113 fn func(context.Context, MigrationRecoveryPointCollection) (MigrationRecoveryPointCollection, error)
14114 mrpc MigrationRecoveryPointCollection
14115 }
14116
14117
14118
14119 func (page *MigrationRecoveryPointCollectionPage) NextWithContext(ctx context.Context) (err error) {
14120 if tracing.IsEnabled() {
14121 ctx = tracing.StartSpan(ctx, fqdn+"/MigrationRecoveryPointCollectionPage.NextWithContext")
14122 defer func() {
14123 sc := -1
14124 if page.Response().Response.Response != nil {
14125 sc = page.Response().Response.Response.StatusCode
14126 }
14127 tracing.EndSpan(ctx, sc, err)
14128 }()
14129 }
14130 for {
14131 next, err := page.fn(ctx, page.mrpc)
14132 if err != nil {
14133 return err
14134 }
14135 page.mrpc = next
14136 if !next.hasNextLink() || !next.IsEmpty() {
14137 break
14138 }
14139 }
14140 return nil
14141 }
14142
14143
14144
14145
14146 func (page *MigrationRecoveryPointCollectionPage) Next() error {
14147 return page.NextWithContext(context.Background())
14148 }
14149
14150
14151 func (page MigrationRecoveryPointCollectionPage) NotDone() bool {
14152 return !page.mrpc.IsEmpty()
14153 }
14154
14155
14156 func (page MigrationRecoveryPointCollectionPage) Response() MigrationRecoveryPointCollection {
14157 return page.mrpc
14158 }
14159
14160
14161 func (page MigrationRecoveryPointCollectionPage) Values() []MigrationRecoveryPoint {
14162 if page.mrpc.IsEmpty() {
14163 return nil
14164 }
14165 return *page.mrpc.Value
14166 }
14167
14168
14169 func NewMigrationRecoveryPointCollectionPage(cur MigrationRecoveryPointCollection, getNextPage func(context.Context, MigrationRecoveryPointCollection) (MigrationRecoveryPointCollection, error)) MigrationRecoveryPointCollectionPage {
14170 return MigrationRecoveryPointCollectionPage{
14171 fn: getNextPage,
14172 mrpc: cur,
14173 }
14174 }
14175
14176
14177 type MigrationRecoveryPointProperties struct {
14178
14179 RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"`
14180
14181 RecoveryPointType MigrationRecoveryPointType `json:"recoveryPointType,omitempty"`
14182 }
14183
14184
14185 func (mrpp MigrationRecoveryPointProperties) MarshalJSON() ([]byte, error) {
14186 objectMap := make(map[string]interface{})
14187 return json.Marshal(objectMap)
14188 }
14189
14190
14191 type MobilityServiceUpdate struct {
14192
14193 Version *string `json:"version,omitempty"`
14194
14195 RebootStatus *string `json:"rebootStatus,omitempty"`
14196
14197 OsType *string `json:"osType,omitempty"`
14198 }
14199
14200
14201 type Network struct {
14202 autorest.Response `json:"-"`
14203
14204 Properties *NetworkProperties `json:"properties,omitempty"`
14205
14206 ID *string `json:"id,omitempty"`
14207
14208 Name *string `json:"name,omitempty"`
14209
14210 Type *string `json:"type,omitempty"`
14211
14212 Location *string `json:"location,omitempty"`
14213 }
14214
14215
14216 func (n Network) MarshalJSON() ([]byte, error) {
14217 objectMap := make(map[string]interface{})
14218 if n.Properties != nil {
14219 objectMap["properties"] = n.Properties
14220 }
14221 if n.Location != nil {
14222 objectMap["location"] = n.Location
14223 }
14224 return json.Marshal(objectMap)
14225 }
14226
14227
14228 type NetworkCollection struct {
14229 autorest.Response `json:"-"`
14230
14231 Value *[]Network `json:"value,omitempty"`
14232
14233 NextLink *string `json:"nextLink,omitempty"`
14234 }
14235
14236
14237 type NetworkCollectionIterator struct {
14238 i int
14239 page NetworkCollectionPage
14240 }
14241
14242
14243
14244 func (iter *NetworkCollectionIterator) NextWithContext(ctx context.Context) (err error) {
14245 if tracing.IsEnabled() {
14246 ctx = tracing.StartSpan(ctx, fqdn+"/NetworkCollectionIterator.NextWithContext")
14247 defer func() {
14248 sc := -1
14249 if iter.Response().Response.Response != nil {
14250 sc = iter.Response().Response.Response.StatusCode
14251 }
14252 tracing.EndSpan(ctx, sc, err)
14253 }()
14254 }
14255 iter.i++
14256 if iter.i < len(iter.page.Values()) {
14257 return nil
14258 }
14259 err = iter.page.NextWithContext(ctx)
14260 if err != nil {
14261 iter.i--
14262 return err
14263 }
14264 iter.i = 0
14265 return nil
14266 }
14267
14268
14269
14270
14271 func (iter *NetworkCollectionIterator) Next() error {
14272 return iter.NextWithContext(context.Background())
14273 }
14274
14275
14276 func (iter NetworkCollectionIterator) NotDone() bool {
14277 return iter.page.NotDone() && iter.i < len(iter.page.Values())
14278 }
14279
14280
14281 func (iter NetworkCollectionIterator) Response() NetworkCollection {
14282 return iter.page.Response()
14283 }
14284
14285
14286
14287 func (iter NetworkCollectionIterator) Value() Network {
14288 if !iter.page.NotDone() {
14289 return Network{}
14290 }
14291 return iter.page.Values()[iter.i]
14292 }
14293
14294
14295 func NewNetworkCollectionIterator(page NetworkCollectionPage) NetworkCollectionIterator {
14296 return NetworkCollectionIterator{page: page}
14297 }
14298
14299
14300 func (nc NetworkCollection) IsEmpty() bool {
14301 return nc.Value == nil || len(*nc.Value) == 0
14302 }
14303
14304
14305 func (nc NetworkCollection) hasNextLink() bool {
14306 return nc.NextLink != nil && len(*nc.NextLink) != 0
14307 }
14308
14309
14310
14311 func (nc NetworkCollection) networkCollectionPreparer(ctx context.Context) (*http.Request, error) {
14312 if !nc.hasNextLink() {
14313 return nil, nil
14314 }
14315 return autorest.Prepare((&http.Request{}).WithContext(ctx),
14316 autorest.AsJSON(),
14317 autorest.AsGet(),
14318 autorest.WithBaseURL(to.String(nc.NextLink)))
14319 }
14320
14321
14322 type NetworkCollectionPage struct {
14323 fn func(context.Context, NetworkCollection) (NetworkCollection, error)
14324 nc NetworkCollection
14325 }
14326
14327
14328
14329 func (page *NetworkCollectionPage) NextWithContext(ctx context.Context) (err error) {
14330 if tracing.IsEnabled() {
14331 ctx = tracing.StartSpan(ctx, fqdn+"/NetworkCollectionPage.NextWithContext")
14332 defer func() {
14333 sc := -1
14334 if page.Response().Response.Response != nil {
14335 sc = page.Response().Response.Response.StatusCode
14336 }
14337 tracing.EndSpan(ctx, sc, err)
14338 }()
14339 }
14340 for {
14341 next, err := page.fn(ctx, page.nc)
14342 if err != nil {
14343 return err
14344 }
14345 page.nc = next
14346 if !next.hasNextLink() || !next.IsEmpty() {
14347 break
14348 }
14349 }
14350 return nil
14351 }
14352
14353
14354
14355
14356 func (page *NetworkCollectionPage) Next() error {
14357 return page.NextWithContext(context.Background())
14358 }
14359
14360
14361 func (page NetworkCollectionPage) NotDone() bool {
14362 return !page.nc.IsEmpty()
14363 }
14364
14365
14366 func (page NetworkCollectionPage) Response() NetworkCollection {
14367 return page.nc
14368 }
14369
14370
14371 func (page NetworkCollectionPage) Values() []Network {
14372 if page.nc.IsEmpty() {
14373 return nil
14374 }
14375 return *page.nc.Value
14376 }
14377
14378
14379 func NewNetworkCollectionPage(cur NetworkCollection, getNextPage func(context.Context, NetworkCollection) (NetworkCollection, error)) NetworkCollectionPage {
14380 return NetworkCollectionPage{
14381 fn: getNextPage,
14382 nc: cur,
14383 }
14384 }
14385
14386
14387
14388
14389
14390
14391 type NetworkMapping struct {
14392 autorest.Response `json:"-"`
14393
14394 Properties *NetworkMappingProperties `json:"properties,omitempty"`
14395
14396 ID *string `json:"id,omitempty"`
14397
14398 Name *string `json:"name,omitempty"`
14399
14400 Type *string `json:"type,omitempty"`
14401
14402 Location *string `json:"location,omitempty"`
14403 }
14404
14405
14406 func (nm NetworkMapping) MarshalJSON() ([]byte, error) {
14407 objectMap := make(map[string]interface{})
14408 if nm.Properties != nil {
14409 objectMap["properties"] = nm.Properties
14410 }
14411 if nm.Location != nil {
14412 objectMap["location"] = nm.Location
14413 }
14414 return json.Marshal(objectMap)
14415 }
14416
14417
14418
14419
14420
14421 type NetworkMappingCollection struct {
14422 autorest.Response `json:"-"`
14423
14424 Value *[]NetworkMapping `json:"value,omitempty"`
14425
14426 NextLink *string `json:"nextLink,omitempty"`
14427 }
14428
14429
14430 type NetworkMappingCollectionIterator struct {
14431 i int
14432 page NetworkMappingCollectionPage
14433 }
14434
14435
14436
14437 func (iter *NetworkMappingCollectionIterator) NextWithContext(ctx context.Context) (err error) {
14438 if tracing.IsEnabled() {
14439 ctx = tracing.StartSpan(ctx, fqdn+"/NetworkMappingCollectionIterator.NextWithContext")
14440 defer func() {
14441 sc := -1
14442 if iter.Response().Response.Response != nil {
14443 sc = iter.Response().Response.Response.StatusCode
14444 }
14445 tracing.EndSpan(ctx, sc, err)
14446 }()
14447 }
14448 iter.i++
14449 if iter.i < len(iter.page.Values()) {
14450 return nil
14451 }
14452 err = iter.page.NextWithContext(ctx)
14453 if err != nil {
14454 iter.i--
14455 return err
14456 }
14457 iter.i = 0
14458 return nil
14459 }
14460
14461
14462
14463
14464 func (iter *NetworkMappingCollectionIterator) Next() error {
14465 return iter.NextWithContext(context.Background())
14466 }
14467
14468
14469 func (iter NetworkMappingCollectionIterator) NotDone() bool {
14470 return iter.page.NotDone() && iter.i < len(iter.page.Values())
14471 }
14472
14473
14474 func (iter NetworkMappingCollectionIterator) Response() NetworkMappingCollection {
14475 return iter.page.Response()
14476 }
14477
14478
14479
14480 func (iter NetworkMappingCollectionIterator) Value() NetworkMapping {
14481 if !iter.page.NotDone() {
14482 return NetworkMapping{}
14483 }
14484 return iter.page.Values()[iter.i]
14485 }
14486
14487
14488 func NewNetworkMappingCollectionIterator(page NetworkMappingCollectionPage) NetworkMappingCollectionIterator {
14489 return NetworkMappingCollectionIterator{page: page}
14490 }
14491
14492
14493 func (nmc NetworkMappingCollection) IsEmpty() bool {
14494 return nmc.Value == nil || len(*nmc.Value) == 0
14495 }
14496
14497
14498 func (nmc NetworkMappingCollection) hasNextLink() bool {
14499 return nmc.NextLink != nil && len(*nmc.NextLink) != 0
14500 }
14501
14502
14503
14504 func (nmc NetworkMappingCollection) networkMappingCollectionPreparer(ctx context.Context) (*http.Request, error) {
14505 if !nmc.hasNextLink() {
14506 return nil, nil
14507 }
14508 return autorest.Prepare((&http.Request{}).WithContext(ctx),
14509 autorest.AsJSON(),
14510 autorest.AsGet(),
14511 autorest.WithBaseURL(to.String(nmc.NextLink)))
14512 }
14513
14514
14515 type NetworkMappingCollectionPage struct {
14516 fn func(context.Context, NetworkMappingCollection) (NetworkMappingCollection, error)
14517 nmc NetworkMappingCollection
14518 }
14519
14520
14521
14522 func (page *NetworkMappingCollectionPage) NextWithContext(ctx context.Context) (err error) {
14523 if tracing.IsEnabled() {
14524 ctx = tracing.StartSpan(ctx, fqdn+"/NetworkMappingCollectionPage.NextWithContext")
14525 defer func() {
14526 sc := -1
14527 if page.Response().Response.Response != nil {
14528 sc = page.Response().Response.Response.StatusCode
14529 }
14530 tracing.EndSpan(ctx, sc, err)
14531 }()
14532 }
14533 for {
14534 next, err := page.fn(ctx, page.nmc)
14535 if err != nil {
14536 return err
14537 }
14538 page.nmc = next
14539 if !next.hasNextLink() || !next.IsEmpty() {
14540 break
14541 }
14542 }
14543 return nil
14544 }
14545
14546
14547
14548
14549 func (page *NetworkMappingCollectionPage) Next() error {
14550 return page.NextWithContext(context.Background())
14551 }
14552
14553
14554 func (page NetworkMappingCollectionPage) NotDone() bool {
14555 return !page.nmc.IsEmpty()
14556 }
14557
14558
14559 func (page NetworkMappingCollectionPage) Response() NetworkMappingCollection {
14560 return page.nmc
14561 }
14562
14563
14564 func (page NetworkMappingCollectionPage) Values() []NetworkMapping {
14565 if page.nmc.IsEmpty() {
14566 return nil
14567 }
14568 return *page.nmc.Value
14569 }
14570
14571
14572 func NewNetworkMappingCollectionPage(cur NetworkMappingCollection, getNextPage func(context.Context, NetworkMappingCollection) (NetworkMappingCollection, error)) NetworkMappingCollectionPage {
14573 return NetworkMappingCollectionPage{
14574 fn: getNextPage,
14575 nmc: cur,
14576 }
14577 }
14578
14579
14580 type BasicNetworkMappingFabricSpecificSettings interface {
14581 AsAzureToAzureNetworkMappingSettings() (*AzureToAzureNetworkMappingSettings, bool)
14582 AsVmmToAzureNetworkMappingSettings() (*VmmToAzureNetworkMappingSettings, bool)
14583 AsVmmToVmmNetworkMappingSettings() (*VmmToVmmNetworkMappingSettings, bool)
14584 AsNetworkMappingFabricSpecificSettings() (*NetworkMappingFabricSpecificSettings, bool)
14585 }
14586
14587
14588 type NetworkMappingFabricSpecificSettings struct {
14589
14590 InstanceType InstanceTypeBasicNetworkMappingFabricSpecificSettings `json:"instanceType,omitempty"`
14591 }
14592
14593 func unmarshalBasicNetworkMappingFabricSpecificSettings(body []byte) (BasicNetworkMappingFabricSpecificSettings, error) {
14594 var m map[string]interface{}
14595 err := json.Unmarshal(body, &m)
14596 if err != nil {
14597 return nil, err
14598 }
14599
14600 switch m["instanceType"] {
14601 case string(InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeAzureToAzure):
14602 var atanms AzureToAzureNetworkMappingSettings
14603 err := json.Unmarshal(body, &atanms)
14604 return atanms, err
14605 case string(InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToAzure):
14606 var vtanms VmmToAzureNetworkMappingSettings
14607 err := json.Unmarshal(body, &vtanms)
14608 return vtanms, err
14609 case string(InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToVmm):
14610 var vtvnms VmmToVmmNetworkMappingSettings
14611 err := json.Unmarshal(body, &vtvnms)
14612 return vtvnms, err
14613 default:
14614 var nmfss NetworkMappingFabricSpecificSettings
14615 err := json.Unmarshal(body, &nmfss)
14616 return nmfss, err
14617 }
14618 }
14619 func unmarshalBasicNetworkMappingFabricSpecificSettingsArray(body []byte) ([]BasicNetworkMappingFabricSpecificSettings, error) {
14620 var rawMessages []*json.RawMessage
14621 err := json.Unmarshal(body, &rawMessages)
14622 if err != nil {
14623 return nil, err
14624 }
14625
14626 nmfssArray := make([]BasicNetworkMappingFabricSpecificSettings, len(rawMessages))
14627
14628 for index, rawMessage := range rawMessages {
14629 nmfss, err := unmarshalBasicNetworkMappingFabricSpecificSettings(*rawMessage)
14630 if err != nil {
14631 return nil, err
14632 }
14633 nmfssArray[index] = nmfss
14634 }
14635 return nmfssArray, nil
14636 }
14637
14638
14639 func (nmfss NetworkMappingFabricSpecificSettings) MarshalJSON() ([]byte, error) {
14640 nmfss.InstanceType = InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeNetworkMappingFabricSpecificSettings
14641 objectMap := make(map[string]interface{})
14642 if nmfss.InstanceType != "" {
14643 objectMap["instanceType"] = nmfss.InstanceType
14644 }
14645 return json.Marshal(objectMap)
14646 }
14647
14648
14649 func (nmfss NetworkMappingFabricSpecificSettings) AsAzureToAzureNetworkMappingSettings() (*AzureToAzureNetworkMappingSettings, bool) {
14650 return nil, false
14651 }
14652
14653
14654 func (nmfss NetworkMappingFabricSpecificSettings) AsVmmToAzureNetworkMappingSettings() (*VmmToAzureNetworkMappingSettings, bool) {
14655 return nil, false
14656 }
14657
14658
14659 func (nmfss NetworkMappingFabricSpecificSettings) AsVmmToVmmNetworkMappingSettings() (*VmmToVmmNetworkMappingSettings, bool) {
14660 return nil, false
14661 }
14662
14663
14664 func (nmfss NetworkMappingFabricSpecificSettings) AsNetworkMappingFabricSpecificSettings() (*NetworkMappingFabricSpecificSettings, bool) {
14665 return &nmfss, true
14666 }
14667
14668
14669 func (nmfss NetworkMappingFabricSpecificSettings) AsBasicNetworkMappingFabricSpecificSettings() (BasicNetworkMappingFabricSpecificSettings, bool) {
14670 return &nmfss, true
14671 }
14672
14673
14674 type NetworkMappingProperties struct {
14675
14676 State *string `json:"state,omitempty"`
14677
14678 PrimaryNetworkFriendlyName *string `json:"primaryNetworkFriendlyName,omitempty"`
14679
14680 PrimaryNetworkID *string `json:"primaryNetworkId,omitempty"`
14681
14682 PrimaryFabricFriendlyName *string `json:"primaryFabricFriendlyName,omitempty"`
14683
14684 RecoveryNetworkFriendlyName *string `json:"recoveryNetworkFriendlyName,omitempty"`
14685
14686 RecoveryNetworkID *string `json:"recoveryNetworkId,omitempty"`
14687
14688 RecoveryFabricArmID *string `json:"recoveryFabricArmId,omitempty"`
14689
14690 RecoveryFabricFriendlyName *string `json:"recoveryFabricFriendlyName,omitempty"`
14691
14692 FabricSpecificSettings BasicNetworkMappingFabricSpecificSettings `json:"fabricSpecificSettings,omitempty"`
14693 }
14694
14695
14696 func (nmp *NetworkMappingProperties) UnmarshalJSON(body []byte) error {
14697 var m map[string]*json.RawMessage
14698 err := json.Unmarshal(body, &m)
14699 if err != nil {
14700 return err
14701 }
14702 for k, v := range m {
14703 switch k {
14704 case "state":
14705 if v != nil {
14706 var state string
14707 err = json.Unmarshal(*v, &state)
14708 if err != nil {
14709 return err
14710 }
14711 nmp.State = &state
14712 }
14713 case "primaryNetworkFriendlyName":
14714 if v != nil {
14715 var primaryNetworkFriendlyName string
14716 err = json.Unmarshal(*v, &primaryNetworkFriendlyName)
14717 if err != nil {
14718 return err
14719 }
14720 nmp.PrimaryNetworkFriendlyName = &primaryNetworkFriendlyName
14721 }
14722 case "primaryNetworkId":
14723 if v != nil {
14724 var primaryNetworkID string
14725 err = json.Unmarshal(*v, &primaryNetworkID)
14726 if err != nil {
14727 return err
14728 }
14729 nmp.PrimaryNetworkID = &primaryNetworkID
14730 }
14731 case "primaryFabricFriendlyName":
14732 if v != nil {
14733 var primaryFabricFriendlyName string
14734 err = json.Unmarshal(*v, &primaryFabricFriendlyName)
14735 if err != nil {
14736 return err
14737 }
14738 nmp.PrimaryFabricFriendlyName = &primaryFabricFriendlyName
14739 }
14740 case "recoveryNetworkFriendlyName":
14741 if v != nil {
14742 var recoveryNetworkFriendlyName string
14743 err = json.Unmarshal(*v, &recoveryNetworkFriendlyName)
14744 if err != nil {
14745 return err
14746 }
14747 nmp.RecoveryNetworkFriendlyName = &recoveryNetworkFriendlyName
14748 }
14749 case "recoveryNetworkId":
14750 if v != nil {
14751 var recoveryNetworkID string
14752 err = json.Unmarshal(*v, &recoveryNetworkID)
14753 if err != nil {
14754 return err
14755 }
14756 nmp.RecoveryNetworkID = &recoveryNetworkID
14757 }
14758 case "recoveryFabricArmId":
14759 if v != nil {
14760 var recoveryFabricArmID string
14761 err = json.Unmarshal(*v, &recoveryFabricArmID)
14762 if err != nil {
14763 return err
14764 }
14765 nmp.RecoveryFabricArmID = &recoveryFabricArmID
14766 }
14767 case "recoveryFabricFriendlyName":
14768 if v != nil {
14769 var recoveryFabricFriendlyName string
14770 err = json.Unmarshal(*v, &recoveryFabricFriendlyName)
14771 if err != nil {
14772 return err
14773 }
14774 nmp.RecoveryFabricFriendlyName = &recoveryFabricFriendlyName
14775 }
14776 case "fabricSpecificSettings":
14777 if v != nil {
14778 fabricSpecificSettings, err := unmarshalBasicNetworkMappingFabricSpecificSettings(*v)
14779 if err != nil {
14780 return err
14781 }
14782 nmp.FabricSpecificSettings = fabricSpecificSettings
14783 }
14784 }
14785 }
14786
14787 return nil
14788 }
14789
14790
14791 type NetworkProperties struct {
14792
14793 FabricType *string `json:"fabricType,omitempty"`
14794
14795 Subnets *[]Subnet `json:"subnets,omitempty"`
14796
14797 FriendlyName *string `json:"friendlyName,omitempty"`
14798
14799 NetworkType *string `json:"networkType,omitempty"`
14800 }
14801
14802
14803 type NewProtectionProfile struct {
14804
14805 PolicyName *string `json:"policyName,omitempty"`
14806
14807 RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"`
14808
14809 CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"`
14810
14811 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"`
14812
14813 MultiVMSyncStatus SetMultiVMSyncStatus `json:"multiVmSyncStatus,omitempty"`
14814
14815 ResourceType ResourceType `json:"resourceType,omitempty"`
14816 }
14817
14818
14819 func (npp NewProtectionProfile) MarshalJSON() ([]byte, error) {
14820 npp.ResourceType = ResourceTypeNew
14821 objectMap := make(map[string]interface{})
14822 if npp.PolicyName != nil {
14823 objectMap["policyName"] = npp.PolicyName
14824 }
14825 if npp.RecoveryPointHistory != nil {
14826 objectMap["recoveryPointHistory"] = npp.RecoveryPointHistory
14827 }
14828 if npp.CrashConsistentFrequencyInMinutes != nil {
14829 objectMap["crashConsistentFrequencyInMinutes"] = npp.CrashConsistentFrequencyInMinutes
14830 }
14831 if npp.AppConsistentFrequencyInMinutes != nil {
14832 objectMap["appConsistentFrequencyInMinutes"] = npp.AppConsistentFrequencyInMinutes
14833 }
14834 if npp.MultiVMSyncStatus != "" {
14835 objectMap["multiVmSyncStatus"] = npp.MultiVMSyncStatus
14836 }
14837 if npp.ResourceType != "" {
14838 objectMap["resourceType"] = npp.ResourceType
14839 }
14840 return json.Marshal(objectMap)
14841 }
14842
14843
14844 func (npp NewProtectionProfile) AsExistingProtectionProfile() (*ExistingProtectionProfile, bool) {
14845 return nil, false
14846 }
14847
14848
14849 func (npp NewProtectionProfile) AsNewProtectionProfile() (*NewProtectionProfile, bool) {
14850 return &npp, true
14851 }
14852
14853
14854 func (npp NewProtectionProfile) AsProtectionProfileCustomDetails() (*ProtectionProfileCustomDetails, bool) {
14855 return nil, false
14856 }
14857
14858
14859 func (npp NewProtectionProfile) AsBasicProtectionProfileCustomDetails() (BasicProtectionProfileCustomDetails, bool) {
14860 return &npp, true
14861 }
14862
14863
14864 type OperationsDiscovery struct {
14865
14866 Name *string `json:"name,omitempty"`
14867
14868 Display *Display `json:"display,omitempty"`
14869
14870 Origin *string `json:"origin,omitempty"`
14871
14872 Properties interface{} `json:"properties,omitempty"`
14873 }
14874
14875
14876 type OperationsDiscoveryCollection struct {
14877 autorest.Response `json:"-"`
14878
14879 Value *[]OperationsDiscovery `json:"value,omitempty"`
14880
14881 NextLink *string `json:"nextLink,omitempty"`
14882 }
14883
14884
14885
14886 type OperationsDiscoveryCollectionIterator struct {
14887 i int
14888 page OperationsDiscoveryCollectionPage
14889 }
14890
14891
14892
14893 func (iter *OperationsDiscoveryCollectionIterator) NextWithContext(ctx context.Context) (err error) {
14894 if tracing.IsEnabled() {
14895 ctx = tracing.StartSpan(ctx, fqdn+"/OperationsDiscoveryCollectionIterator.NextWithContext")
14896 defer func() {
14897 sc := -1
14898 if iter.Response().Response.Response != nil {
14899 sc = iter.Response().Response.Response.StatusCode
14900 }
14901 tracing.EndSpan(ctx, sc, err)
14902 }()
14903 }
14904 iter.i++
14905 if iter.i < len(iter.page.Values()) {
14906 return nil
14907 }
14908 err = iter.page.NextWithContext(ctx)
14909 if err != nil {
14910 iter.i--
14911 return err
14912 }
14913 iter.i = 0
14914 return nil
14915 }
14916
14917
14918
14919
14920 func (iter *OperationsDiscoveryCollectionIterator) Next() error {
14921 return iter.NextWithContext(context.Background())
14922 }
14923
14924
14925 func (iter OperationsDiscoveryCollectionIterator) NotDone() bool {
14926 return iter.page.NotDone() && iter.i < len(iter.page.Values())
14927 }
14928
14929
14930 func (iter OperationsDiscoveryCollectionIterator) Response() OperationsDiscoveryCollection {
14931 return iter.page.Response()
14932 }
14933
14934
14935
14936 func (iter OperationsDiscoveryCollectionIterator) Value() OperationsDiscovery {
14937 if !iter.page.NotDone() {
14938 return OperationsDiscovery{}
14939 }
14940 return iter.page.Values()[iter.i]
14941 }
14942
14943
14944 func NewOperationsDiscoveryCollectionIterator(page OperationsDiscoveryCollectionPage) OperationsDiscoveryCollectionIterator {
14945 return OperationsDiscoveryCollectionIterator{page: page}
14946 }
14947
14948
14949 func (odc OperationsDiscoveryCollection) IsEmpty() bool {
14950 return odc.Value == nil || len(*odc.Value) == 0
14951 }
14952
14953
14954 func (odc OperationsDiscoveryCollection) hasNextLink() bool {
14955 return odc.NextLink != nil && len(*odc.NextLink) != 0
14956 }
14957
14958
14959
14960 func (odc OperationsDiscoveryCollection) operationsDiscoveryCollectionPreparer(ctx context.Context) (*http.Request, error) {
14961 if !odc.hasNextLink() {
14962 return nil, nil
14963 }
14964 return autorest.Prepare((&http.Request{}).WithContext(ctx),
14965 autorest.AsJSON(),
14966 autorest.AsGet(),
14967 autorest.WithBaseURL(to.String(odc.NextLink)))
14968 }
14969
14970
14971 type OperationsDiscoveryCollectionPage struct {
14972 fn func(context.Context, OperationsDiscoveryCollection) (OperationsDiscoveryCollection, error)
14973 odc OperationsDiscoveryCollection
14974 }
14975
14976
14977
14978 func (page *OperationsDiscoveryCollectionPage) NextWithContext(ctx context.Context) (err error) {
14979 if tracing.IsEnabled() {
14980 ctx = tracing.StartSpan(ctx, fqdn+"/OperationsDiscoveryCollectionPage.NextWithContext")
14981 defer func() {
14982 sc := -1
14983 if page.Response().Response.Response != nil {
14984 sc = page.Response().Response.Response.StatusCode
14985 }
14986 tracing.EndSpan(ctx, sc, err)
14987 }()
14988 }
14989 for {
14990 next, err := page.fn(ctx, page.odc)
14991 if err != nil {
14992 return err
14993 }
14994 page.odc = next
14995 if !next.hasNextLink() || !next.IsEmpty() {
14996 break
14997 }
14998 }
14999 return nil
15000 }
15001
15002
15003
15004
15005 func (page *OperationsDiscoveryCollectionPage) Next() error {
15006 return page.NextWithContext(context.Background())
15007 }
15008
15009
15010 func (page OperationsDiscoveryCollectionPage) NotDone() bool {
15011 return !page.odc.IsEmpty()
15012 }
15013
15014
15015 func (page OperationsDiscoveryCollectionPage) Response() OperationsDiscoveryCollection {
15016 return page.odc
15017 }
15018
15019
15020 func (page OperationsDiscoveryCollectionPage) Values() []OperationsDiscovery {
15021 if page.odc.IsEmpty() {
15022 return nil
15023 }
15024 return *page.odc.Value
15025 }
15026
15027
15028 func NewOperationsDiscoveryCollectionPage(cur OperationsDiscoveryCollection, getNextPage func(context.Context, OperationsDiscoveryCollection) (OperationsDiscoveryCollection, error)) OperationsDiscoveryCollectionPage {
15029 return OperationsDiscoveryCollectionPage{
15030 fn: getNextPage,
15031 odc: cur,
15032 }
15033 }
15034
15035
15036 type OSDetails struct {
15037
15038 OsType *string `json:"osType,omitempty"`
15039
15040 ProductType *string `json:"productType,omitempty"`
15041
15042 OsEdition *string `json:"osEdition,omitempty"`
15043
15044 OSVersion *string `json:"oSVersion,omitempty"`
15045
15046 OSMajorVersion *string `json:"oSMajorVersion,omitempty"`
15047
15048 OSMinorVersion *string `json:"oSMinorVersion,omitempty"`
15049 }
15050
15051
15052 type OSDiskDetails struct {
15053
15054 OsVhdID *string `json:"osVhdId,omitempty"`
15055
15056 OsType *string `json:"osType,omitempty"`
15057
15058 VhdName *string `json:"vhdName,omitempty"`
15059 }
15060
15061
15062 type OSVersionWrapper struct {
15063
15064 Version *string `json:"version,omitempty"`
15065
15066 ServicePack *string `json:"servicePack,omitempty"`
15067 }
15068
15069
15070 type PlannedFailoverInput struct {
15071
15072 Properties *PlannedFailoverInputProperties `json:"properties,omitempty"`
15073 }
15074
15075
15076 type PlannedFailoverInputProperties struct {
15077
15078 FailoverDirection *string `json:"failoverDirection,omitempty"`
15079
15080 ProviderSpecificDetails BasicProviderSpecificFailoverInput `json:"providerSpecificDetails,omitempty"`
15081 }
15082
15083
15084 func (pfip *PlannedFailoverInputProperties) UnmarshalJSON(body []byte) error {
15085 var m map[string]*json.RawMessage
15086 err := json.Unmarshal(body, &m)
15087 if err != nil {
15088 return err
15089 }
15090 for k, v := range m {
15091 switch k {
15092 case "failoverDirection":
15093 if v != nil {
15094 var failoverDirection string
15095 err = json.Unmarshal(*v, &failoverDirection)
15096 if err != nil {
15097 return err
15098 }
15099 pfip.FailoverDirection = &failoverDirection
15100 }
15101 case "providerSpecificDetails":
15102 if v != nil {
15103 providerSpecificDetails, err := unmarshalBasicProviderSpecificFailoverInput(*v)
15104 if err != nil {
15105 return err
15106 }
15107 pfip.ProviderSpecificDetails = providerSpecificDetails
15108 }
15109 }
15110 }
15111
15112 return nil
15113 }
15114
15115
15116 type Policy struct {
15117 autorest.Response `json:"-"`
15118
15119 Properties *PolicyProperties `json:"properties,omitempty"`
15120
15121 ID *string `json:"id,omitempty"`
15122
15123 Name *string `json:"name,omitempty"`
15124
15125 Type *string `json:"type,omitempty"`
15126
15127 Location *string `json:"location,omitempty"`
15128 }
15129
15130
15131 func (p Policy) MarshalJSON() ([]byte, error) {
15132 objectMap := make(map[string]interface{})
15133 if p.Properties != nil {
15134 objectMap["properties"] = p.Properties
15135 }
15136 if p.Location != nil {
15137 objectMap["location"] = p.Location
15138 }
15139 return json.Marshal(objectMap)
15140 }
15141
15142
15143 type PolicyCollection struct {
15144 autorest.Response `json:"-"`
15145
15146 Value *[]Policy `json:"value,omitempty"`
15147
15148 NextLink *string `json:"nextLink,omitempty"`
15149 }
15150
15151
15152 type PolicyCollectionIterator struct {
15153 i int
15154 page PolicyCollectionPage
15155 }
15156
15157
15158
15159 func (iter *PolicyCollectionIterator) NextWithContext(ctx context.Context) (err error) {
15160 if tracing.IsEnabled() {
15161 ctx = tracing.StartSpan(ctx, fqdn+"/PolicyCollectionIterator.NextWithContext")
15162 defer func() {
15163 sc := -1
15164 if iter.Response().Response.Response != nil {
15165 sc = iter.Response().Response.Response.StatusCode
15166 }
15167 tracing.EndSpan(ctx, sc, err)
15168 }()
15169 }
15170 iter.i++
15171 if iter.i < len(iter.page.Values()) {
15172 return nil
15173 }
15174 err = iter.page.NextWithContext(ctx)
15175 if err != nil {
15176 iter.i--
15177 return err
15178 }
15179 iter.i = 0
15180 return nil
15181 }
15182
15183
15184
15185
15186 func (iter *PolicyCollectionIterator) Next() error {
15187 return iter.NextWithContext(context.Background())
15188 }
15189
15190
15191 func (iter PolicyCollectionIterator) NotDone() bool {
15192 return iter.page.NotDone() && iter.i < len(iter.page.Values())
15193 }
15194
15195
15196 func (iter PolicyCollectionIterator) Response() PolicyCollection {
15197 return iter.page.Response()
15198 }
15199
15200
15201
15202 func (iter PolicyCollectionIterator) Value() Policy {
15203 if !iter.page.NotDone() {
15204 return Policy{}
15205 }
15206 return iter.page.Values()[iter.i]
15207 }
15208
15209
15210 func NewPolicyCollectionIterator(page PolicyCollectionPage) PolicyCollectionIterator {
15211 return PolicyCollectionIterator{page: page}
15212 }
15213
15214
15215 func (pc PolicyCollection) IsEmpty() bool {
15216 return pc.Value == nil || len(*pc.Value) == 0
15217 }
15218
15219
15220 func (pc PolicyCollection) hasNextLink() bool {
15221 return pc.NextLink != nil && len(*pc.NextLink) != 0
15222 }
15223
15224
15225
15226 func (pc PolicyCollection) policyCollectionPreparer(ctx context.Context) (*http.Request, error) {
15227 if !pc.hasNextLink() {
15228 return nil, nil
15229 }
15230 return autorest.Prepare((&http.Request{}).WithContext(ctx),
15231 autorest.AsJSON(),
15232 autorest.AsGet(),
15233 autorest.WithBaseURL(to.String(pc.NextLink)))
15234 }
15235
15236
15237 type PolicyCollectionPage struct {
15238 fn func(context.Context, PolicyCollection) (PolicyCollection, error)
15239 pc PolicyCollection
15240 }
15241
15242
15243
15244 func (page *PolicyCollectionPage) NextWithContext(ctx context.Context) (err error) {
15245 if tracing.IsEnabled() {
15246 ctx = tracing.StartSpan(ctx, fqdn+"/PolicyCollectionPage.NextWithContext")
15247 defer func() {
15248 sc := -1
15249 if page.Response().Response.Response != nil {
15250 sc = page.Response().Response.Response.StatusCode
15251 }
15252 tracing.EndSpan(ctx, sc, err)
15253 }()
15254 }
15255 for {
15256 next, err := page.fn(ctx, page.pc)
15257 if err != nil {
15258 return err
15259 }
15260 page.pc = next
15261 if !next.hasNextLink() || !next.IsEmpty() {
15262 break
15263 }
15264 }
15265 return nil
15266 }
15267
15268
15269
15270
15271 func (page *PolicyCollectionPage) Next() error {
15272 return page.NextWithContext(context.Background())
15273 }
15274
15275
15276 func (page PolicyCollectionPage) NotDone() bool {
15277 return !page.pc.IsEmpty()
15278 }
15279
15280
15281 func (page PolicyCollectionPage) Response() PolicyCollection {
15282 return page.pc
15283 }
15284
15285
15286 func (page PolicyCollectionPage) Values() []Policy {
15287 if page.pc.IsEmpty() {
15288 return nil
15289 }
15290 return *page.pc.Value
15291 }
15292
15293
15294 func NewPolicyCollectionPage(cur PolicyCollection, getNextPage func(context.Context, PolicyCollection) (PolicyCollection, error)) PolicyCollectionPage {
15295 return PolicyCollectionPage{
15296 fn: getNextPage,
15297 pc: cur,
15298 }
15299 }
15300
15301
15302 type PolicyProperties struct {
15303
15304 FriendlyName *string `json:"friendlyName,omitempty"`
15305
15306 ProviderSpecificDetails BasicPolicyProviderSpecificDetails `json:"providerSpecificDetails,omitempty"`
15307 }
15308
15309
15310 func (pp *PolicyProperties) UnmarshalJSON(body []byte) error {
15311 var m map[string]*json.RawMessage
15312 err := json.Unmarshal(body, &m)
15313 if err != nil {
15314 return err
15315 }
15316 for k, v := range m {
15317 switch k {
15318 case "friendlyName":
15319 if v != nil {
15320 var friendlyName string
15321 err = json.Unmarshal(*v, &friendlyName)
15322 if err != nil {
15323 return err
15324 }
15325 pp.FriendlyName = &friendlyName
15326 }
15327 case "providerSpecificDetails":
15328 if v != nil {
15329 providerSpecificDetails, err := unmarshalBasicPolicyProviderSpecificDetails(*v)
15330 if err != nil {
15331 return err
15332 }
15333 pp.ProviderSpecificDetails = providerSpecificDetails
15334 }
15335 }
15336 }
15337
15338 return nil
15339 }
15340
15341
15342 type BasicPolicyProviderSpecificDetails interface {
15343 AsA2APolicyDetails() (*A2APolicyDetails, bool)
15344 AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool)
15345 AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool)
15346 AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool)
15347 AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool)
15348 AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool)
15349 AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool)
15350 AsInMagePolicyDetails() (*InMagePolicyDetails, bool)
15351 AsInMageRcmPolicyDetails() (*InMageRcmPolicyDetails, bool)
15352 AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool)
15353 AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool)
15354 AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool)
15355 }
15356
15357
15358 type PolicyProviderSpecificDetails struct {
15359
15360 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"`
15361 }
15362
15363 func unmarshalBasicPolicyProviderSpecificDetails(body []byte) (BasicPolicyProviderSpecificDetails, error) {
15364 var m map[string]interface{}
15365 err := json.Unmarshal(body, &m)
15366 if err != nil {
15367 return nil, err
15368 }
15369
15370 switch m["instanceType"] {
15371 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A):
15372 var apd A2APolicyDetails
15373 err := json.Unmarshal(body, &apd)
15374 return apd, err
15375 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure):
15376 var hvrapd HyperVReplicaAzurePolicyDetails
15377 err := json.Unmarshal(body, &hvrapd)
15378 return hvrapd, err
15379 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails):
15380 var hvrbpd HyperVReplicaBasePolicyDetails
15381 err := json.Unmarshal(body, &hvrbpd)
15382 return hvrbpd, err
15383 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2):
15384 var hvrbpd HyperVReplicaBluePolicyDetails
15385 err := json.Unmarshal(body, &hvrbpd)
15386 return hvrbpd, err
15387 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012):
15388 var hvrpd HyperVReplicaPolicyDetails
15389 err := json.Unmarshal(body, &hvrpd)
15390 return hvrpd, err
15391 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2):
15392 var imavpd InMageAzureV2PolicyDetails
15393 err := json.Unmarshal(body, &imavpd)
15394 return imavpd, err
15395 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails):
15396 var imbpd InMageBasePolicyDetails
15397 err := json.Unmarshal(body, &imbpd)
15398 return imbpd, err
15399 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage):
15400 var impd InMagePolicyDetails
15401 err := json.Unmarshal(body, &impd)
15402 return impd, err
15403 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageRcm):
15404 var imrpd InMageRcmPolicyDetails
15405 err := json.Unmarshal(body, &imrpd)
15406 return imrpd, err
15407 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration):
15408 var rampd RcmAzureMigrationPolicyDetails
15409 err := json.Unmarshal(body, &rampd)
15410 return rampd, err
15411 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt):
15412 var vcpd VmwareCbtPolicyDetails
15413 err := json.Unmarshal(body, &vcpd)
15414 return vcpd, err
15415 default:
15416 var ppsd PolicyProviderSpecificDetails
15417 err := json.Unmarshal(body, &ppsd)
15418 return ppsd, err
15419 }
15420 }
15421 func unmarshalBasicPolicyProviderSpecificDetailsArray(body []byte) ([]BasicPolicyProviderSpecificDetails, error) {
15422 var rawMessages []*json.RawMessage
15423 err := json.Unmarshal(body, &rawMessages)
15424 if err != nil {
15425 return nil, err
15426 }
15427
15428 ppsdArray := make([]BasicPolicyProviderSpecificDetails, len(rawMessages))
15429
15430 for index, rawMessage := range rawMessages {
15431 ppsd, err := unmarshalBasicPolicyProviderSpecificDetails(*rawMessage)
15432 if err != nil {
15433 return nil, err
15434 }
15435 ppsdArray[index] = ppsd
15436 }
15437 return ppsdArray, nil
15438 }
15439
15440
15441 func (ppsd PolicyProviderSpecificDetails) MarshalJSON() ([]byte, error) {
15442 ppsd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypePolicyProviderSpecificDetails
15443 objectMap := make(map[string]interface{})
15444 if ppsd.InstanceType != "" {
15445 objectMap["instanceType"] = ppsd.InstanceType
15446 }
15447 return json.Marshal(objectMap)
15448 }
15449
15450
15451 func (ppsd PolicyProviderSpecificDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) {
15452 return nil, false
15453 }
15454
15455
15456 func (ppsd PolicyProviderSpecificDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) {
15457 return nil, false
15458 }
15459
15460
15461 func (ppsd PolicyProviderSpecificDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) {
15462 return nil, false
15463 }
15464
15465
15466 func (ppsd PolicyProviderSpecificDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) {
15467 return nil, false
15468 }
15469
15470
15471 func (ppsd PolicyProviderSpecificDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) {
15472 return nil, false
15473 }
15474
15475
15476 func (ppsd PolicyProviderSpecificDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) {
15477 return nil, false
15478 }
15479
15480
15481 func (ppsd PolicyProviderSpecificDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) {
15482 return nil, false
15483 }
15484
15485
15486 func (ppsd PolicyProviderSpecificDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) {
15487 return nil, false
15488 }
15489
15490
15491 func (ppsd PolicyProviderSpecificDetails) AsInMageRcmPolicyDetails() (*InMageRcmPolicyDetails, bool) {
15492 return nil, false
15493 }
15494
15495
15496 func (ppsd PolicyProviderSpecificDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) {
15497 return nil, false
15498 }
15499
15500
15501 func (ppsd PolicyProviderSpecificDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) {
15502 return nil, false
15503 }
15504
15505
15506 func (ppsd PolicyProviderSpecificDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) {
15507 return &ppsd, true
15508 }
15509
15510
15511 func (ppsd PolicyProviderSpecificDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) {
15512 return &ppsd, true
15513 }
15514
15515
15516 type BasicPolicyProviderSpecificInput interface {
15517 AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool)
15518 AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool)
15519 AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool)
15520 AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool)
15521 AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool)
15522 AsInMagePolicyInput() (*InMagePolicyInput, bool)
15523 AsInMageRcmPolicyCreationInput() (*InMageRcmPolicyCreationInput, bool)
15524 AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool)
15525 AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool)
15526 }
15527
15528
15529 type PolicyProviderSpecificInput struct {
15530
15531 InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"`
15532 }
15533
15534 func unmarshalBasicPolicyProviderSpecificInput(body []byte) (BasicPolicyProviderSpecificInput, error) {
15535 var m map[string]interface{}
15536 err := json.Unmarshal(body, &m)
15537 if err != nil {
15538 return nil, err
15539 }
15540
15541 switch m["instanceType"] {
15542 case string(InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeA2A):
15543 var apci A2APolicyCreationInput
15544 err := json.Unmarshal(body, &apci)
15545 return apci, err
15546 case string(InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplicaAzure):
15547 var hvrapi HyperVReplicaAzurePolicyInput
15548 err := json.Unmarshal(body, &hvrapi)
15549 return hvrapi, err
15550 case string(InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012R2):
15551 var hvrbpi HyperVReplicaBluePolicyInput
15552 err := json.Unmarshal(body, &hvrbpi)
15553 return hvrbpi, err
15554 case string(InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012):
15555 var hvrpi HyperVReplicaPolicyInput
15556 err := json.Unmarshal(body, &hvrpi)
15557 return hvrpi, err
15558 case string(InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMageAzureV2):
15559 var imavpi InMageAzureV2PolicyInput
15560 err := json.Unmarshal(body, &imavpi)
15561 return imavpi, err
15562 case string(InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMage):
15563 var impi InMagePolicyInput
15564 err := json.Unmarshal(body, &impi)
15565 return impi, err
15566 case string(InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMageRcm):
15567 var imrpci InMageRcmPolicyCreationInput
15568 err := json.Unmarshal(body, &imrpci)
15569 return imrpci, err
15570 case string(InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeVMwareCbt):
15571 var vmcpci VMwareCbtPolicyCreationInput
15572 err := json.Unmarshal(body, &vmcpci)
15573 return vmcpci, err
15574 default:
15575 var ppsi PolicyProviderSpecificInput
15576 err := json.Unmarshal(body, &ppsi)
15577 return ppsi, err
15578 }
15579 }
15580 func unmarshalBasicPolicyProviderSpecificInputArray(body []byte) ([]BasicPolicyProviderSpecificInput, error) {
15581 var rawMessages []*json.RawMessage
15582 err := json.Unmarshal(body, &rawMessages)
15583 if err != nil {
15584 return nil, err
15585 }
15586
15587 ppsiArray := make([]BasicPolicyProviderSpecificInput, len(rawMessages))
15588
15589 for index, rawMessage := range rawMessages {
15590 ppsi, err := unmarshalBasicPolicyProviderSpecificInput(*rawMessage)
15591 if err != nil {
15592 return nil, err
15593 }
15594 ppsiArray[index] = ppsi
15595 }
15596 return ppsiArray, nil
15597 }
15598
15599
15600 func (ppsi PolicyProviderSpecificInput) MarshalJSON() ([]byte, error) {
15601 ppsi.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypePolicyProviderSpecificInput
15602 objectMap := make(map[string]interface{})
15603 if ppsi.InstanceType != "" {
15604 objectMap["instanceType"] = ppsi.InstanceType
15605 }
15606 return json.Marshal(objectMap)
15607 }
15608
15609
15610 func (ppsi PolicyProviderSpecificInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) {
15611 return nil, false
15612 }
15613
15614
15615 func (ppsi PolicyProviderSpecificInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) {
15616 return nil, false
15617 }
15618
15619
15620 func (ppsi PolicyProviderSpecificInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) {
15621 return nil, false
15622 }
15623
15624
15625 func (ppsi PolicyProviderSpecificInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) {
15626 return nil, false
15627 }
15628
15629
15630 func (ppsi PolicyProviderSpecificInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) {
15631 return nil, false
15632 }
15633
15634
15635 func (ppsi PolicyProviderSpecificInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) {
15636 return nil, false
15637 }
15638
15639
15640 func (ppsi PolicyProviderSpecificInput) AsInMageRcmPolicyCreationInput() (*InMageRcmPolicyCreationInput, bool) {
15641 return nil, false
15642 }
15643
15644
15645 func (ppsi PolicyProviderSpecificInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) {
15646 return nil, false
15647 }
15648
15649
15650 func (ppsi PolicyProviderSpecificInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) {
15651 return &ppsi, true
15652 }
15653
15654
15655 func (ppsi PolicyProviderSpecificInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) {
15656 return &ppsi, true
15657 }
15658
15659
15660 type ProcessServer struct {
15661
15662 FriendlyName *string `json:"friendlyName,omitempty"`
15663
15664 ID *string `json:"id,omitempty"`
15665
15666 IPAddress *string `json:"ipAddress,omitempty"`
15667
15668 OsType *string `json:"osType,omitempty"`
15669
15670 AgentVersion *string `json:"agentVersion,omitempty"`
15671
15672 LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"`
15673
15674 VersionStatus *string `json:"versionStatus,omitempty"`
15675
15676 MobilityServiceUpdates *[]MobilityServiceUpdate `json:"mobilityServiceUpdates,omitempty"`
15677
15678 HostID *string `json:"hostId,omitempty"`
15679
15680 MachineCount *string `json:"machineCount,omitempty"`
15681
15682 ReplicationPairCount *string `json:"replicationPairCount,omitempty"`
15683
15684 SystemLoad *string `json:"systemLoad,omitempty"`
15685
15686 SystemLoadStatus *string `json:"systemLoadStatus,omitempty"`
15687
15688 CPULoad *string `json:"cpuLoad,omitempty"`
15689
15690 CPULoadStatus *string `json:"cpuLoadStatus,omitempty"`
15691
15692 TotalMemoryInBytes *int64 `json:"totalMemoryInBytes,omitempty"`
15693
15694 AvailableMemoryInBytes *int64 `json:"availableMemoryInBytes,omitempty"`
15695
15696 MemoryUsageStatus *string `json:"memoryUsageStatus,omitempty"`
15697
15698 TotalSpaceInBytes *int64 `json:"totalSpaceInBytes,omitempty"`
15699
15700 AvailableSpaceInBytes *int64 `json:"availableSpaceInBytes,omitempty"`
15701
15702 SpaceUsageStatus *string `json:"spaceUsageStatus,omitempty"`
15703
15704 PsServiceStatus *string `json:"psServiceStatus,omitempty"`
15705
15706 SslCertExpiryDate *date.Time `json:"sslCertExpiryDate,omitempty"`
15707
15708 SslCertExpiryRemainingDays *int32 `json:"sslCertExpiryRemainingDays,omitempty"`
15709
15710 OsVersion *string `json:"osVersion,omitempty"`
15711
15712 HealthErrors *[]HealthError `json:"healthErrors,omitempty"`
15713
15714 AgentExpiryDate *date.Time `json:"agentExpiryDate,omitempty"`
15715
15716 AgentVersionDetails *VersionDetails `json:"agentVersionDetails,omitempty"`
15717
15718 Health ProtectionHealth `json:"health,omitempty"`
15719
15720 PsStatsRefreshTime *date.Time `json:"psStatsRefreshTime,omitempty"`
15721
15722 ThroughputUploadPendingDataInBytes *int64 `json:"throughputUploadPendingDataInBytes,omitempty"`
15723
15724 ThroughputInMBps *int64 `json:"throughputInMBps,omitempty"`
15725
15726 ThroughputInBytes *int64 `json:"throughputInBytes,omitempty"`
15727
15728 ThroughputStatus *string `json:"throughputStatus,omitempty"`
15729
15730 MarsCommunicationStatus *string `json:"marsCommunicationStatus,omitempty"`
15731
15732 MarsRegistrationStatus *string `json:"marsRegistrationStatus,omitempty"`
15733 }
15734
15735
15736 func (ps ProcessServer) MarshalJSON() ([]byte, error) {
15737 objectMap := make(map[string]interface{})
15738 if ps.FriendlyName != nil {
15739 objectMap["friendlyName"] = ps.FriendlyName
15740 }
15741 if ps.ID != nil {
15742 objectMap["id"] = ps.ID
15743 }
15744 if ps.IPAddress != nil {
15745 objectMap["ipAddress"] = ps.IPAddress
15746 }
15747 if ps.OsType != nil {
15748 objectMap["osType"] = ps.OsType
15749 }
15750 if ps.AgentVersion != nil {
15751 objectMap["agentVersion"] = ps.AgentVersion
15752 }
15753 if ps.LastHeartbeat != nil {
15754 objectMap["lastHeartbeat"] = ps.LastHeartbeat
15755 }
15756 if ps.VersionStatus != nil {
15757 objectMap["versionStatus"] = ps.VersionStatus
15758 }
15759 if ps.MobilityServiceUpdates != nil {
15760 objectMap["mobilityServiceUpdates"] = ps.MobilityServiceUpdates
15761 }
15762 if ps.HostID != nil {
15763 objectMap["hostId"] = ps.HostID
15764 }
15765 if ps.MachineCount != nil {
15766 objectMap["machineCount"] = ps.MachineCount
15767 }
15768 if ps.ReplicationPairCount != nil {
15769 objectMap["replicationPairCount"] = ps.ReplicationPairCount
15770 }
15771 if ps.SystemLoad != nil {
15772 objectMap["systemLoad"] = ps.SystemLoad
15773 }
15774 if ps.SystemLoadStatus != nil {
15775 objectMap["systemLoadStatus"] = ps.SystemLoadStatus
15776 }
15777 if ps.CPULoad != nil {
15778 objectMap["cpuLoad"] = ps.CPULoad
15779 }
15780 if ps.CPULoadStatus != nil {
15781 objectMap["cpuLoadStatus"] = ps.CPULoadStatus
15782 }
15783 if ps.TotalMemoryInBytes != nil {
15784 objectMap["totalMemoryInBytes"] = ps.TotalMemoryInBytes
15785 }
15786 if ps.AvailableMemoryInBytes != nil {
15787 objectMap["availableMemoryInBytes"] = ps.AvailableMemoryInBytes
15788 }
15789 if ps.MemoryUsageStatus != nil {
15790 objectMap["memoryUsageStatus"] = ps.MemoryUsageStatus
15791 }
15792 if ps.TotalSpaceInBytes != nil {
15793 objectMap["totalSpaceInBytes"] = ps.TotalSpaceInBytes
15794 }
15795 if ps.AvailableSpaceInBytes != nil {
15796 objectMap["availableSpaceInBytes"] = ps.AvailableSpaceInBytes
15797 }
15798 if ps.SpaceUsageStatus != nil {
15799 objectMap["spaceUsageStatus"] = ps.SpaceUsageStatus
15800 }
15801 if ps.PsServiceStatus != nil {
15802 objectMap["psServiceStatus"] = ps.PsServiceStatus
15803 }
15804 if ps.SslCertExpiryDate != nil {
15805 objectMap["sslCertExpiryDate"] = ps.SslCertExpiryDate
15806 }
15807 if ps.SslCertExpiryRemainingDays != nil {
15808 objectMap["sslCertExpiryRemainingDays"] = ps.SslCertExpiryRemainingDays
15809 }
15810 if ps.OsVersion != nil {
15811 objectMap["osVersion"] = ps.OsVersion
15812 }
15813 if ps.HealthErrors != nil {
15814 objectMap["healthErrors"] = ps.HealthErrors
15815 }
15816 if ps.AgentExpiryDate != nil {
15817 objectMap["agentExpiryDate"] = ps.AgentExpiryDate
15818 }
15819 if ps.AgentVersionDetails != nil {
15820 objectMap["agentVersionDetails"] = ps.AgentVersionDetails
15821 }
15822 return json.Marshal(objectMap)
15823 }
15824
15825
15826 type ProcessServerDetails struct {
15827
15828 ID *string `json:"id,omitempty"`
15829
15830 Name *string `json:"name,omitempty"`
15831
15832 Version *string `json:"version,omitempty"`
15833
15834 LastHeartbeatUtc *date.Time `json:"lastHeartbeatUtc,omitempty"`
15835
15836 TotalMemoryInBytes *int64 `json:"totalMemoryInBytes,omitempty"`
15837
15838 AvailableMemoryInBytes *int64 `json:"availableMemoryInBytes,omitempty"`
15839
15840 UsedMemoryInBytes *int64 `json:"usedMemoryInBytes,omitempty"`
15841
15842 MemoryUsagePercentage *float64 `json:"memoryUsagePercentage,omitempty"`
15843
15844 TotalSpaceInBytes *int64 `json:"totalSpaceInBytes,omitempty"`
15845
15846 AvailableSpaceInBytes *int64 `json:"availableSpaceInBytes,omitempty"`
15847
15848 UsedSpaceInBytes *int64 `json:"usedSpaceInBytes,omitempty"`
15849
15850 FreeSpacePercentage *float64 `json:"freeSpacePercentage,omitempty"`
15851
15852 ThroughputUploadPendingDataInBytes *int64 `json:"throughputUploadPendingDataInBytes,omitempty"`
15853
15854 ThroughputInBytes *int64 `json:"throughputInBytes,omitempty"`
15855
15856 ProcessorUsagePercentage *float64 `json:"processorUsagePercentage,omitempty"`
15857
15858 Health ProtectionHealth `json:"health,omitempty"`
15859
15860 HealthErrors *[]HealthError `json:"healthErrors,omitempty"`
15861
15862 HistoricHealth ProtectionHealth `json:"historicHealth,omitempty"`
15863 }
15864
15865
15866 func (psd ProcessServerDetails) MarshalJSON() ([]byte, error) {
15867 objectMap := make(map[string]interface{})
15868 return json.Marshal(objectMap)
15869 }
15870
15871
15872 type ProtectableItem struct {
15873 autorest.Response `json:"-"`
15874
15875 Properties *ProtectableItemProperties `json:"properties,omitempty"`
15876
15877 ID *string `json:"id,omitempty"`
15878
15879 Name *string `json:"name,omitempty"`
15880
15881 Type *string `json:"type,omitempty"`
15882
15883 Location *string `json:"location,omitempty"`
15884 }
15885
15886
15887 func (pi ProtectableItem) MarshalJSON() ([]byte, error) {
15888 objectMap := make(map[string]interface{})
15889 if pi.Properties != nil {
15890 objectMap["properties"] = pi.Properties
15891 }
15892 if pi.Location != nil {
15893 objectMap["location"] = pi.Location
15894 }
15895 return json.Marshal(objectMap)
15896 }
15897
15898
15899 type ProtectableItemCollection struct {
15900 autorest.Response `json:"-"`
15901
15902 Value *[]ProtectableItem `json:"value,omitempty"`
15903
15904 NextLink *string `json:"nextLink,omitempty"`
15905 }
15906
15907
15908 type ProtectableItemCollectionIterator struct {
15909 i int
15910 page ProtectableItemCollectionPage
15911 }
15912
15913
15914
15915 func (iter *ProtectableItemCollectionIterator) NextWithContext(ctx context.Context) (err error) {
15916 if tracing.IsEnabled() {
15917 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableItemCollectionIterator.NextWithContext")
15918 defer func() {
15919 sc := -1
15920 if iter.Response().Response.Response != nil {
15921 sc = iter.Response().Response.Response.StatusCode
15922 }
15923 tracing.EndSpan(ctx, sc, err)
15924 }()
15925 }
15926 iter.i++
15927 if iter.i < len(iter.page.Values()) {
15928 return nil
15929 }
15930 err = iter.page.NextWithContext(ctx)
15931 if err != nil {
15932 iter.i--
15933 return err
15934 }
15935 iter.i = 0
15936 return nil
15937 }
15938
15939
15940
15941
15942 func (iter *ProtectableItemCollectionIterator) Next() error {
15943 return iter.NextWithContext(context.Background())
15944 }
15945
15946
15947 func (iter ProtectableItemCollectionIterator) NotDone() bool {
15948 return iter.page.NotDone() && iter.i < len(iter.page.Values())
15949 }
15950
15951
15952 func (iter ProtectableItemCollectionIterator) Response() ProtectableItemCollection {
15953 return iter.page.Response()
15954 }
15955
15956
15957
15958 func (iter ProtectableItemCollectionIterator) Value() ProtectableItem {
15959 if !iter.page.NotDone() {
15960 return ProtectableItem{}
15961 }
15962 return iter.page.Values()[iter.i]
15963 }
15964
15965
15966 func NewProtectableItemCollectionIterator(page ProtectableItemCollectionPage) ProtectableItemCollectionIterator {
15967 return ProtectableItemCollectionIterator{page: page}
15968 }
15969
15970
15971 func (pic ProtectableItemCollection) IsEmpty() bool {
15972 return pic.Value == nil || len(*pic.Value) == 0
15973 }
15974
15975
15976 func (pic ProtectableItemCollection) hasNextLink() bool {
15977 return pic.NextLink != nil && len(*pic.NextLink) != 0
15978 }
15979
15980
15981
15982 func (pic ProtectableItemCollection) protectableItemCollectionPreparer(ctx context.Context) (*http.Request, error) {
15983 if !pic.hasNextLink() {
15984 return nil, nil
15985 }
15986 return autorest.Prepare((&http.Request{}).WithContext(ctx),
15987 autorest.AsJSON(),
15988 autorest.AsGet(),
15989 autorest.WithBaseURL(to.String(pic.NextLink)))
15990 }
15991
15992
15993 type ProtectableItemCollectionPage struct {
15994 fn func(context.Context, ProtectableItemCollection) (ProtectableItemCollection, error)
15995 pic ProtectableItemCollection
15996 }
15997
15998
15999
16000 func (page *ProtectableItemCollectionPage) NextWithContext(ctx context.Context) (err error) {
16001 if tracing.IsEnabled() {
16002 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableItemCollectionPage.NextWithContext")
16003 defer func() {
16004 sc := -1
16005 if page.Response().Response.Response != nil {
16006 sc = page.Response().Response.Response.StatusCode
16007 }
16008 tracing.EndSpan(ctx, sc, err)
16009 }()
16010 }
16011 for {
16012 next, err := page.fn(ctx, page.pic)
16013 if err != nil {
16014 return err
16015 }
16016 page.pic = next
16017 if !next.hasNextLink() || !next.IsEmpty() {
16018 break
16019 }
16020 }
16021 return nil
16022 }
16023
16024
16025
16026
16027 func (page *ProtectableItemCollectionPage) Next() error {
16028 return page.NextWithContext(context.Background())
16029 }
16030
16031
16032 func (page ProtectableItemCollectionPage) NotDone() bool {
16033 return !page.pic.IsEmpty()
16034 }
16035
16036
16037 func (page ProtectableItemCollectionPage) Response() ProtectableItemCollection {
16038 return page.pic
16039 }
16040
16041
16042 func (page ProtectableItemCollectionPage) Values() []ProtectableItem {
16043 if page.pic.IsEmpty() {
16044 return nil
16045 }
16046 return *page.pic.Value
16047 }
16048
16049
16050 func NewProtectableItemCollectionPage(cur ProtectableItemCollection, getNextPage func(context.Context, ProtectableItemCollection) (ProtectableItemCollection, error)) ProtectableItemCollectionPage {
16051 return ProtectableItemCollectionPage{
16052 fn: getNextPage,
16053 pic: cur,
16054 }
16055 }
16056
16057
16058 type ProtectableItemProperties struct {
16059
16060 FriendlyName *string `json:"friendlyName,omitempty"`
16061
16062 ProtectionStatus *string `json:"protectionStatus,omitempty"`
16063
16064 ReplicationProtectedItemID *string `json:"replicationProtectedItemId,omitempty"`
16065
16066 RecoveryServicesProviderID *string `json:"recoveryServicesProviderId,omitempty"`
16067
16068 ProtectionReadinessErrors *[]string `json:"protectionReadinessErrors,omitempty"`
16069
16070 SupportedReplicationProviders *[]string `json:"supportedReplicationProviders,omitempty"`
16071
16072 CustomDetails BasicConfigurationSettings `json:"customDetails,omitempty"`
16073 }
16074
16075
16076 func (pip *ProtectableItemProperties) UnmarshalJSON(body []byte) error {
16077 var m map[string]*json.RawMessage
16078 err := json.Unmarshal(body, &m)
16079 if err != nil {
16080 return err
16081 }
16082 for k, v := range m {
16083 switch k {
16084 case "friendlyName":
16085 if v != nil {
16086 var friendlyName string
16087 err = json.Unmarshal(*v, &friendlyName)
16088 if err != nil {
16089 return err
16090 }
16091 pip.FriendlyName = &friendlyName
16092 }
16093 case "protectionStatus":
16094 if v != nil {
16095 var protectionStatus string
16096 err = json.Unmarshal(*v, &protectionStatus)
16097 if err != nil {
16098 return err
16099 }
16100 pip.ProtectionStatus = &protectionStatus
16101 }
16102 case "replicationProtectedItemId":
16103 if v != nil {
16104 var replicationProtectedItemID string
16105 err = json.Unmarshal(*v, &replicationProtectedItemID)
16106 if err != nil {
16107 return err
16108 }
16109 pip.ReplicationProtectedItemID = &replicationProtectedItemID
16110 }
16111 case "recoveryServicesProviderId":
16112 if v != nil {
16113 var recoveryServicesProviderID string
16114 err = json.Unmarshal(*v, &recoveryServicesProviderID)
16115 if err != nil {
16116 return err
16117 }
16118 pip.RecoveryServicesProviderID = &recoveryServicesProviderID
16119 }
16120 case "protectionReadinessErrors":
16121 if v != nil {
16122 var protectionReadinessErrors []string
16123 err = json.Unmarshal(*v, &protectionReadinessErrors)
16124 if err != nil {
16125 return err
16126 }
16127 pip.ProtectionReadinessErrors = &protectionReadinessErrors
16128 }
16129 case "supportedReplicationProviders":
16130 if v != nil {
16131 var supportedReplicationProviders []string
16132 err = json.Unmarshal(*v, &supportedReplicationProviders)
16133 if err != nil {
16134 return err
16135 }
16136 pip.SupportedReplicationProviders = &supportedReplicationProviders
16137 }
16138 case "customDetails":
16139 if v != nil {
16140 customDetails, err := unmarshalBasicConfigurationSettings(*v)
16141 if err != nil {
16142 return err
16143 }
16144 pip.CustomDetails = customDetails
16145 }
16146 }
16147 }
16148
16149 return nil
16150 }
16151
16152
16153 type ProtectableItemQueryParameter struct {
16154
16155 State *string `json:"state,omitempty"`
16156 }
16157
16158
16159 type ProtectedItemsQueryParameter struct {
16160
16161 SourceFabricName *string `json:"sourceFabricName,omitempty"`
16162
16163 RecoveryPlanName *string `json:"recoveryPlanName,omitempty"`
16164
16165 VCenterName *string `json:"vCenterName,omitempty"`
16166
16167 InstanceType *string `json:"instanceType,omitempty"`
16168
16169 MultiVMGroupCreateOption MultiVMGroupCreateOption `json:"multiVmGroupCreateOption,omitempty"`
16170 }
16171
16172
16173 type ProtectionContainer struct {
16174 autorest.Response `json:"-"`
16175
16176 Properties *ProtectionContainerProperties `json:"properties,omitempty"`
16177
16178 ID *string `json:"id,omitempty"`
16179
16180 Name *string `json:"name,omitempty"`
16181
16182 Type *string `json:"type,omitempty"`
16183
16184 Location *string `json:"location,omitempty"`
16185 }
16186
16187
16188 func (pc ProtectionContainer) MarshalJSON() ([]byte, error) {
16189 objectMap := make(map[string]interface{})
16190 if pc.Properties != nil {
16191 objectMap["properties"] = pc.Properties
16192 }
16193 if pc.Location != nil {
16194 objectMap["location"] = pc.Location
16195 }
16196 return json.Marshal(objectMap)
16197 }
16198
16199
16200 type ProtectionContainerCollection struct {
16201 autorest.Response `json:"-"`
16202
16203 Value *[]ProtectionContainer `json:"value,omitempty"`
16204
16205 NextLink *string `json:"nextLink,omitempty"`
16206 }
16207
16208
16209
16210 type ProtectionContainerCollectionIterator struct {
16211 i int
16212 page ProtectionContainerCollectionPage
16213 }
16214
16215
16216
16217 func (iter *ProtectionContainerCollectionIterator) NextWithContext(ctx context.Context) (err error) {
16218 if tracing.IsEnabled() {
16219 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerCollectionIterator.NextWithContext")
16220 defer func() {
16221 sc := -1
16222 if iter.Response().Response.Response != nil {
16223 sc = iter.Response().Response.Response.StatusCode
16224 }
16225 tracing.EndSpan(ctx, sc, err)
16226 }()
16227 }
16228 iter.i++
16229 if iter.i < len(iter.page.Values()) {
16230 return nil
16231 }
16232 err = iter.page.NextWithContext(ctx)
16233 if err != nil {
16234 iter.i--
16235 return err
16236 }
16237 iter.i = 0
16238 return nil
16239 }
16240
16241
16242
16243
16244 func (iter *ProtectionContainerCollectionIterator) Next() error {
16245 return iter.NextWithContext(context.Background())
16246 }
16247
16248
16249 func (iter ProtectionContainerCollectionIterator) NotDone() bool {
16250 return iter.page.NotDone() && iter.i < len(iter.page.Values())
16251 }
16252
16253
16254 func (iter ProtectionContainerCollectionIterator) Response() ProtectionContainerCollection {
16255 return iter.page.Response()
16256 }
16257
16258
16259
16260 func (iter ProtectionContainerCollectionIterator) Value() ProtectionContainer {
16261 if !iter.page.NotDone() {
16262 return ProtectionContainer{}
16263 }
16264 return iter.page.Values()[iter.i]
16265 }
16266
16267
16268 func NewProtectionContainerCollectionIterator(page ProtectionContainerCollectionPage) ProtectionContainerCollectionIterator {
16269 return ProtectionContainerCollectionIterator{page: page}
16270 }
16271
16272
16273 func (pcc ProtectionContainerCollection) IsEmpty() bool {
16274 return pcc.Value == nil || len(*pcc.Value) == 0
16275 }
16276
16277
16278 func (pcc ProtectionContainerCollection) hasNextLink() bool {
16279 return pcc.NextLink != nil && len(*pcc.NextLink) != 0
16280 }
16281
16282
16283
16284 func (pcc ProtectionContainerCollection) protectionContainerCollectionPreparer(ctx context.Context) (*http.Request, error) {
16285 if !pcc.hasNextLink() {
16286 return nil, nil
16287 }
16288 return autorest.Prepare((&http.Request{}).WithContext(ctx),
16289 autorest.AsJSON(),
16290 autorest.AsGet(),
16291 autorest.WithBaseURL(to.String(pcc.NextLink)))
16292 }
16293
16294
16295 type ProtectionContainerCollectionPage struct {
16296 fn func(context.Context, ProtectionContainerCollection) (ProtectionContainerCollection, error)
16297 pcc ProtectionContainerCollection
16298 }
16299
16300
16301
16302 func (page *ProtectionContainerCollectionPage) NextWithContext(ctx context.Context) (err error) {
16303 if tracing.IsEnabled() {
16304 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerCollectionPage.NextWithContext")
16305 defer func() {
16306 sc := -1
16307 if page.Response().Response.Response != nil {
16308 sc = page.Response().Response.Response.StatusCode
16309 }
16310 tracing.EndSpan(ctx, sc, err)
16311 }()
16312 }
16313 for {
16314 next, err := page.fn(ctx, page.pcc)
16315 if err != nil {
16316 return err
16317 }
16318 page.pcc = next
16319 if !next.hasNextLink() || !next.IsEmpty() {
16320 break
16321 }
16322 }
16323 return nil
16324 }
16325
16326
16327
16328
16329 func (page *ProtectionContainerCollectionPage) Next() error {
16330 return page.NextWithContext(context.Background())
16331 }
16332
16333
16334 func (page ProtectionContainerCollectionPage) NotDone() bool {
16335 return !page.pcc.IsEmpty()
16336 }
16337
16338
16339 func (page ProtectionContainerCollectionPage) Response() ProtectionContainerCollection {
16340 return page.pcc
16341 }
16342
16343
16344 func (page ProtectionContainerCollectionPage) Values() []ProtectionContainer {
16345 if page.pcc.IsEmpty() {
16346 return nil
16347 }
16348 return *page.pcc.Value
16349 }
16350
16351
16352 func NewProtectionContainerCollectionPage(cur ProtectionContainerCollection, getNextPage func(context.Context, ProtectionContainerCollection) (ProtectionContainerCollection, error)) ProtectionContainerCollectionPage {
16353 return ProtectionContainerCollectionPage{
16354 fn: getNextPage,
16355 pcc: cur,
16356 }
16357 }
16358
16359
16360 type ProtectionContainerFabricSpecificDetails struct {
16361
16362 InstanceType *string `json:"instanceType,omitempty"`
16363 }
16364
16365
16366 func (pcfsd ProtectionContainerFabricSpecificDetails) MarshalJSON() ([]byte, error) {
16367 objectMap := make(map[string]interface{})
16368 return json.Marshal(objectMap)
16369 }
16370
16371
16372 type ProtectionContainerMapping struct {
16373 autorest.Response `json:"-"`
16374
16375 Properties *ProtectionContainerMappingProperties `json:"properties,omitempty"`
16376
16377 ID *string `json:"id,omitempty"`
16378
16379 Name *string `json:"name,omitempty"`
16380
16381 Type *string `json:"type,omitempty"`
16382
16383 Location *string `json:"location,omitempty"`
16384 }
16385
16386
16387 func (pcm ProtectionContainerMapping) MarshalJSON() ([]byte, error) {
16388 objectMap := make(map[string]interface{})
16389 if pcm.Properties != nil {
16390 objectMap["properties"] = pcm.Properties
16391 }
16392 if pcm.Location != nil {
16393 objectMap["location"] = pcm.Location
16394 }
16395 return json.Marshal(objectMap)
16396 }
16397
16398
16399 type ProtectionContainerMappingCollection struct {
16400 autorest.Response `json:"-"`
16401
16402 Value *[]ProtectionContainerMapping `json:"value,omitempty"`
16403
16404 NextLink *string `json:"nextLink,omitempty"`
16405 }
16406
16407
16408
16409 type ProtectionContainerMappingCollectionIterator struct {
16410 i int
16411 page ProtectionContainerMappingCollectionPage
16412 }
16413
16414
16415
16416 func (iter *ProtectionContainerMappingCollectionIterator) NextWithContext(ctx context.Context) (err error) {
16417 if tracing.IsEnabled() {
16418 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerMappingCollectionIterator.NextWithContext")
16419 defer func() {
16420 sc := -1
16421 if iter.Response().Response.Response != nil {
16422 sc = iter.Response().Response.Response.StatusCode
16423 }
16424 tracing.EndSpan(ctx, sc, err)
16425 }()
16426 }
16427 iter.i++
16428 if iter.i < len(iter.page.Values()) {
16429 return nil
16430 }
16431 err = iter.page.NextWithContext(ctx)
16432 if err != nil {
16433 iter.i--
16434 return err
16435 }
16436 iter.i = 0
16437 return nil
16438 }
16439
16440
16441
16442
16443 func (iter *ProtectionContainerMappingCollectionIterator) Next() error {
16444 return iter.NextWithContext(context.Background())
16445 }
16446
16447
16448 func (iter ProtectionContainerMappingCollectionIterator) NotDone() bool {
16449 return iter.page.NotDone() && iter.i < len(iter.page.Values())
16450 }
16451
16452
16453 func (iter ProtectionContainerMappingCollectionIterator) Response() ProtectionContainerMappingCollection {
16454 return iter.page.Response()
16455 }
16456
16457
16458
16459 func (iter ProtectionContainerMappingCollectionIterator) Value() ProtectionContainerMapping {
16460 if !iter.page.NotDone() {
16461 return ProtectionContainerMapping{}
16462 }
16463 return iter.page.Values()[iter.i]
16464 }
16465
16466
16467 func NewProtectionContainerMappingCollectionIterator(page ProtectionContainerMappingCollectionPage) ProtectionContainerMappingCollectionIterator {
16468 return ProtectionContainerMappingCollectionIterator{page: page}
16469 }
16470
16471
16472 func (pcmc ProtectionContainerMappingCollection) IsEmpty() bool {
16473 return pcmc.Value == nil || len(*pcmc.Value) == 0
16474 }
16475
16476
16477 func (pcmc ProtectionContainerMappingCollection) hasNextLink() bool {
16478 return pcmc.NextLink != nil && len(*pcmc.NextLink) != 0
16479 }
16480
16481
16482
16483 func (pcmc ProtectionContainerMappingCollection) protectionContainerMappingCollectionPreparer(ctx context.Context) (*http.Request, error) {
16484 if !pcmc.hasNextLink() {
16485 return nil, nil
16486 }
16487 return autorest.Prepare((&http.Request{}).WithContext(ctx),
16488 autorest.AsJSON(),
16489 autorest.AsGet(),
16490 autorest.WithBaseURL(to.String(pcmc.NextLink)))
16491 }
16492
16493
16494 type ProtectionContainerMappingCollectionPage struct {
16495 fn func(context.Context, ProtectionContainerMappingCollection) (ProtectionContainerMappingCollection, error)
16496 pcmc ProtectionContainerMappingCollection
16497 }
16498
16499
16500
16501 func (page *ProtectionContainerMappingCollectionPage) NextWithContext(ctx context.Context) (err error) {
16502 if tracing.IsEnabled() {
16503 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerMappingCollectionPage.NextWithContext")
16504 defer func() {
16505 sc := -1
16506 if page.Response().Response.Response != nil {
16507 sc = page.Response().Response.Response.StatusCode
16508 }
16509 tracing.EndSpan(ctx, sc, err)
16510 }()
16511 }
16512 for {
16513 next, err := page.fn(ctx, page.pcmc)
16514 if err != nil {
16515 return err
16516 }
16517 page.pcmc = next
16518 if !next.hasNextLink() || !next.IsEmpty() {
16519 break
16520 }
16521 }
16522 return nil
16523 }
16524
16525
16526
16527
16528 func (page *ProtectionContainerMappingCollectionPage) Next() error {
16529 return page.NextWithContext(context.Background())
16530 }
16531
16532
16533 func (page ProtectionContainerMappingCollectionPage) NotDone() bool {
16534 return !page.pcmc.IsEmpty()
16535 }
16536
16537
16538 func (page ProtectionContainerMappingCollectionPage) Response() ProtectionContainerMappingCollection {
16539 return page.pcmc
16540 }
16541
16542
16543 func (page ProtectionContainerMappingCollectionPage) Values() []ProtectionContainerMapping {
16544 if page.pcmc.IsEmpty() {
16545 return nil
16546 }
16547 return *page.pcmc.Value
16548 }
16549
16550
16551 func NewProtectionContainerMappingCollectionPage(cur ProtectionContainerMappingCollection, getNextPage func(context.Context, ProtectionContainerMappingCollection) (ProtectionContainerMappingCollection, error)) ProtectionContainerMappingCollectionPage {
16552 return ProtectionContainerMappingCollectionPage{
16553 fn: getNextPage,
16554 pcmc: cur,
16555 }
16556 }
16557
16558
16559 type ProtectionContainerMappingProperties struct {
16560
16561 TargetProtectionContainerID *string `json:"targetProtectionContainerId,omitempty"`
16562
16563 TargetProtectionContainerFriendlyName *string `json:"targetProtectionContainerFriendlyName,omitempty"`
16564
16565 ProviderSpecificDetails BasicProtectionContainerMappingProviderSpecificDetails `json:"providerSpecificDetails,omitempty"`
16566
16567 Health *string `json:"health,omitempty"`
16568
16569 HealthErrorDetails *[]HealthError `json:"healthErrorDetails,omitempty"`
16570
16571 PolicyID *string `json:"policyId,omitempty"`
16572
16573 State *string `json:"state,omitempty"`
16574
16575 SourceProtectionContainerFriendlyName *string `json:"sourceProtectionContainerFriendlyName,omitempty"`
16576
16577 SourceFabricFriendlyName *string `json:"sourceFabricFriendlyName,omitempty"`
16578
16579 TargetFabricFriendlyName *string `json:"targetFabricFriendlyName,omitempty"`
16580
16581 PolicyFriendlyName *string `json:"policyFriendlyName,omitempty"`
16582 }
16583
16584
16585 func (pcmp *ProtectionContainerMappingProperties) UnmarshalJSON(body []byte) error {
16586 var m map[string]*json.RawMessage
16587 err := json.Unmarshal(body, &m)
16588 if err != nil {
16589 return err
16590 }
16591 for k, v := range m {
16592 switch k {
16593 case "targetProtectionContainerId":
16594 if v != nil {
16595 var targetProtectionContainerID string
16596 err = json.Unmarshal(*v, &targetProtectionContainerID)
16597 if err != nil {
16598 return err
16599 }
16600 pcmp.TargetProtectionContainerID = &targetProtectionContainerID
16601 }
16602 case "targetProtectionContainerFriendlyName":
16603 if v != nil {
16604 var targetProtectionContainerFriendlyName string
16605 err = json.Unmarshal(*v, &targetProtectionContainerFriendlyName)
16606 if err != nil {
16607 return err
16608 }
16609 pcmp.TargetProtectionContainerFriendlyName = &targetProtectionContainerFriendlyName
16610 }
16611 case "providerSpecificDetails":
16612 if v != nil {
16613 providerSpecificDetails, err := unmarshalBasicProtectionContainerMappingProviderSpecificDetails(*v)
16614 if err != nil {
16615 return err
16616 }
16617 pcmp.ProviderSpecificDetails = providerSpecificDetails
16618 }
16619 case "health":
16620 if v != nil {
16621 var health string
16622 err = json.Unmarshal(*v, &health)
16623 if err != nil {
16624 return err
16625 }
16626 pcmp.Health = &health
16627 }
16628 case "healthErrorDetails":
16629 if v != nil {
16630 var healthErrorDetails []HealthError
16631 err = json.Unmarshal(*v, &healthErrorDetails)
16632 if err != nil {
16633 return err
16634 }
16635 pcmp.HealthErrorDetails = &healthErrorDetails
16636 }
16637 case "policyId":
16638 if v != nil {
16639 var policyID string
16640 err = json.Unmarshal(*v, &policyID)
16641 if err != nil {
16642 return err
16643 }
16644 pcmp.PolicyID = &policyID
16645 }
16646 case "state":
16647 if v != nil {
16648 var state string
16649 err = json.Unmarshal(*v, &state)
16650 if err != nil {
16651 return err
16652 }
16653 pcmp.State = &state
16654 }
16655 case "sourceProtectionContainerFriendlyName":
16656 if v != nil {
16657 var sourceProtectionContainerFriendlyName string
16658 err = json.Unmarshal(*v, &sourceProtectionContainerFriendlyName)
16659 if err != nil {
16660 return err
16661 }
16662 pcmp.SourceProtectionContainerFriendlyName = &sourceProtectionContainerFriendlyName
16663 }
16664 case "sourceFabricFriendlyName":
16665 if v != nil {
16666 var sourceFabricFriendlyName string
16667 err = json.Unmarshal(*v, &sourceFabricFriendlyName)
16668 if err != nil {
16669 return err
16670 }
16671 pcmp.SourceFabricFriendlyName = &sourceFabricFriendlyName
16672 }
16673 case "targetFabricFriendlyName":
16674 if v != nil {
16675 var targetFabricFriendlyName string
16676 err = json.Unmarshal(*v, &targetFabricFriendlyName)
16677 if err != nil {
16678 return err
16679 }
16680 pcmp.TargetFabricFriendlyName = &targetFabricFriendlyName
16681 }
16682 case "policyFriendlyName":
16683 if v != nil {
16684 var policyFriendlyName string
16685 err = json.Unmarshal(*v, &policyFriendlyName)
16686 if err != nil {
16687 return err
16688 }
16689 pcmp.PolicyFriendlyName = &policyFriendlyName
16690 }
16691 }
16692 }
16693
16694 return nil
16695 }
16696
16697
16698 type BasicProtectionContainerMappingProviderSpecificDetails interface {
16699 AsA2AProtectionContainerMappingDetails() (*A2AProtectionContainerMappingDetails, bool)
16700 AsVMwareCbtProtectionContainerMappingDetails() (*VMwareCbtProtectionContainerMappingDetails, bool)
16701 AsProtectionContainerMappingProviderSpecificDetails() (*ProtectionContainerMappingProviderSpecificDetails, bool)
16702 }
16703
16704
16705 type ProtectionContainerMappingProviderSpecificDetails struct {
16706
16707 InstanceType InstanceTypeBasicProtectionContainerMappingProviderSpecificDetails `json:"instanceType,omitempty"`
16708 }
16709
16710 func unmarshalBasicProtectionContainerMappingProviderSpecificDetails(body []byte) (BasicProtectionContainerMappingProviderSpecificDetails, error) {
16711 var m map[string]interface{}
16712 err := json.Unmarshal(body, &m)
16713 if err != nil {
16714 return nil, err
16715 }
16716
16717 switch m["instanceType"] {
16718 case string(InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeA2A):
16719 var apcmd A2AProtectionContainerMappingDetails
16720 err := json.Unmarshal(body, &apcmd)
16721 return apcmd, err
16722 case string(InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeVMwareCbt):
16723 var vmcpcmd VMwareCbtProtectionContainerMappingDetails
16724 err := json.Unmarshal(body, &vmcpcmd)
16725 return vmcpcmd, err
16726 default:
16727 var pcmpsd ProtectionContainerMappingProviderSpecificDetails
16728 err := json.Unmarshal(body, &pcmpsd)
16729 return pcmpsd, err
16730 }
16731 }
16732 func unmarshalBasicProtectionContainerMappingProviderSpecificDetailsArray(body []byte) ([]BasicProtectionContainerMappingProviderSpecificDetails, error) {
16733 var rawMessages []*json.RawMessage
16734 err := json.Unmarshal(body, &rawMessages)
16735 if err != nil {
16736 return nil, err
16737 }
16738
16739 pcmpsdArray := make([]BasicProtectionContainerMappingProviderSpecificDetails, len(rawMessages))
16740
16741 for index, rawMessage := range rawMessages {
16742 pcmpsd, err := unmarshalBasicProtectionContainerMappingProviderSpecificDetails(*rawMessage)
16743 if err != nil {
16744 return nil, err
16745 }
16746 pcmpsdArray[index] = pcmpsd
16747 }
16748 return pcmpsdArray, nil
16749 }
16750
16751
16752 func (pcmpsd ProtectionContainerMappingProviderSpecificDetails) MarshalJSON() ([]byte, error) {
16753 pcmpsd.InstanceType = InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeProtectionContainerMappingProviderSpecificDetails
16754 objectMap := make(map[string]interface{})
16755 if pcmpsd.InstanceType != "" {
16756 objectMap["instanceType"] = pcmpsd.InstanceType
16757 }
16758 return json.Marshal(objectMap)
16759 }
16760
16761
16762 func (pcmpsd ProtectionContainerMappingProviderSpecificDetails) AsA2AProtectionContainerMappingDetails() (*A2AProtectionContainerMappingDetails, bool) {
16763 return nil, false
16764 }
16765
16766
16767 func (pcmpsd ProtectionContainerMappingProviderSpecificDetails) AsVMwareCbtProtectionContainerMappingDetails() (*VMwareCbtProtectionContainerMappingDetails, bool) {
16768 return nil, false
16769 }
16770
16771
16772 func (pcmpsd ProtectionContainerMappingProviderSpecificDetails) AsProtectionContainerMappingProviderSpecificDetails() (*ProtectionContainerMappingProviderSpecificDetails, bool) {
16773 return &pcmpsd, true
16774 }
16775
16776
16777 func (pcmpsd ProtectionContainerMappingProviderSpecificDetails) AsBasicProtectionContainerMappingProviderSpecificDetails() (BasicProtectionContainerMappingProviderSpecificDetails, bool) {
16778 return &pcmpsd, true
16779 }
16780
16781
16782 type ProtectionContainerProperties struct {
16783
16784 FabricFriendlyName *string `json:"fabricFriendlyName,omitempty"`
16785
16786 FriendlyName *string `json:"friendlyName,omitempty"`
16787
16788 FabricType *string `json:"fabricType,omitempty"`
16789
16790 ProtectedItemCount *int32 `json:"protectedItemCount,omitempty"`
16791
16792 PairingStatus *string `json:"pairingStatus,omitempty"`
16793
16794 Role *string `json:"role,omitempty"`
16795
16796 FabricSpecificDetails *ProtectionContainerFabricSpecificDetails `json:"fabricSpecificDetails,omitempty"`
16797 }
16798
16799
16800 type BasicProtectionProfileCustomDetails interface {
16801 AsExistingProtectionProfile() (*ExistingProtectionProfile, bool)
16802 AsNewProtectionProfile() (*NewProtectionProfile, bool)
16803 AsProtectionProfileCustomDetails() (*ProtectionProfileCustomDetails, bool)
16804 }
16805
16806
16807 type ProtectionProfileCustomDetails struct {
16808
16809 ResourceType ResourceType `json:"resourceType,omitempty"`
16810 }
16811
16812 func unmarshalBasicProtectionProfileCustomDetails(body []byte) (BasicProtectionProfileCustomDetails, error) {
16813 var m map[string]interface{}
16814 err := json.Unmarshal(body, &m)
16815 if err != nil {
16816 return nil, err
16817 }
16818
16819 switch m["resourceType"] {
16820 case string(ResourceTypeExisting):
16821 var epp ExistingProtectionProfile
16822 err := json.Unmarshal(body, &epp)
16823 return epp, err
16824 case string(ResourceTypeNew):
16825 var npp NewProtectionProfile
16826 err := json.Unmarshal(body, &npp)
16827 return npp, err
16828 default:
16829 var ppcd ProtectionProfileCustomDetails
16830 err := json.Unmarshal(body, &ppcd)
16831 return ppcd, err
16832 }
16833 }
16834 func unmarshalBasicProtectionProfileCustomDetailsArray(body []byte) ([]BasicProtectionProfileCustomDetails, error) {
16835 var rawMessages []*json.RawMessage
16836 err := json.Unmarshal(body, &rawMessages)
16837 if err != nil {
16838 return nil, err
16839 }
16840
16841 ppcdArray := make([]BasicProtectionProfileCustomDetails, len(rawMessages))
16842
16843 for index, rawMessage := range rawMessages {
16844 ppcd, err := unmarshalBasicProtectionProfileCustomDetails(*rawMessage)
16845 if err != nil {
16846 return nil, err
16847 }
16848 ppcdArray[index] = ppcd
16849 }
16850 return ppcdArray, nil
16851 }
16852
16853
16854 func (ppcd ProtectionProfileCustomDetails) MarshalJSON() ([]byte, error) {
16855 ppcd.ResourceType = ResourceTypeProtectionProfileCustomDetails
16856 objectMap := make(map[string]interface{})
16857 if ppcd.ResourceType != "" {
16858 objectMap["resourceType"] = ppcd.ResourceType
16859 }
16860 return json.Marshal(objectMap)
16861 }
16862
16863
16864 func (ppcd ProtectionProfileCustomDetails) AsExistingProtectionProfile() (*ExistingProtectionProfile, bool) {
16865 return nil, false
16866 }
16867
16868
16869 func (ppcd ProtectionProfileCustomDetails) AsNewProtectionProfile() (*NewProtectionProfile, bool) {
16870 return nil, false
16871 }
16872
16873
16874 func (ppcd ProtectionProfileCustomDetails) AsProtectionProfileCustomDetails() (*ProtectionProfileCustomDetails, bool) {
16875 return &ppcd, true
16876 }
16877
16878
16879 func (ppcd ProtectionProfileCustomDetails) AsBasicProtectionProfileCustomDetails() (BasicProtectionProfileCustomDetails, bool) {
16880 return &ppcd, true
16881 }
16882
16883
16884 type ProviderError struct {
16885
16886 ErrorCode *int32 `json:"errorCode,omitempty"`
16887
16888 ErrorMessage *string `json:"errorMessage,omitempty"`
16889
16890 ErrorID *string `json:"errorId,omitempty"`
16891
16892 PossibleCauses *string `json:"possibleCauses,omitempty"`
16893
16894 RecommendedAction *string `json:"recommendedAction,omitempty"`
16895 }
16896
16897
16898 type BasicProviderSpecificFailoverInput interface {
16899 AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool)
16900 AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool)
16901 AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool)
16902 AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool)
16903 AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool)
16904 AsProviderSpecificFailoverInput() (*ProviderSpecificFailoverInput, bool)
16905 }
16906
16907
16908 type ProviderSpecificFailoverInput struct {
16909
16910 InstanceType InstanceTypeBasicProviderSpecificFailoverInput `json:"instanceType,omitempty"`
16911 }
16912
16913 func unmarshalBasicProviderSpecificFailoverInput(body []byte) (BasicProviderSpecificFailoverInput, error) {
16914 var m map[string]interface{}
16915 err := json.Unmarshal(body, &m)
16916 if err != nil {
16917 return nil, err
16918 }
16919
16920 switch m["instanceType"] {
16921 case string(InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeA2A):
16922 var afpi A2AFailoverProviderInput
16923 err := json.Unmarshal(body, &afpi)
16924 return afpi, err
16925 case string(InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback):
16926 var hvrafpi HyperVReplicaAzureFailbackProviderInput
16927 err := json.Unmarshal(body, &hvrafpi)
16928 return hvrafpi, err
16929 case string(InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure):
16930 var hvrafpi HyperVReplicaAzureFailoverProviderInput
16931 err := json.Unmarshal(body, &hvrafpi)
16932 return hvrafpi, err
16933 case string(InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMageAzureV2):
16934 var imavfpi InMageAzureV2FailoverProviderInput
16935 err := json.Unmarshal(body, &imavfpi)
16936 return imavfpi, err
16937 case string(InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMage):
16938 var imfpi InMageFailoverProviderInput
16939 err := json.Unmarshal(body, &imfpi)
16940 return imfpi, err
16941 default:
16942 var psfi ProviderSpecificFailoverInput
16943 err := json.Unmarshal(body, &psfi)
16944 return psfi, err
16945 }
16946 }
16947 func unmarshalBasicProviderSpecificFailoverInputArray(body []byte) ([]BasicProviderSpecificFailoverInput, error) {
16948 var rawMessages []*json.RawMessage
16949 err := json.Unmarshal(body, &rawMessages)
16950 if err != nil {
16951 return nil, err
16952 }
16953
16954 psfiArray := make([]BasicProviderSpecificFailoverInput, len(rawMessages))
16955
16956 for index, rawMessage := range rawMessages {
16957 psfi, err := unmarshalBasicProviderSpecificFailoverInput(*rawMessage)
16958 if err != nil {
16959 return nil, err
16960 }
16961 psfiArray[index] = psfi
16962 }
16963 return psfiArray, nil
16964 }
16965
16966
16967 func (psfi ProviderSpecificFailoverInput) MarshalJSON() ([]byte, error) {
16968 psfi.InstanceType = InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeProviderSpecificFailoverInput
16969 objectMap := make(map[string]interface{})
16970 if psfi.InstanceType != "" {
16971 objectMap["instanceType"] = psfi.InstanceType
16972 }
16973 return json.Marshal(objectMap)
16974 }
16975
16976
16977 func (psfi ProviderSpecificFailoverInput) AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool) {
16978 return nil, false
16979 }
16980
16981
16982 func (psfi ProviderSpecificFailoverInput) AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool) {
16983 return nil, false
16984 }
16985
16986
16987 func (psfi ProviderSpecificFailoverInput) AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool) {
16988 return nil, false
16989 }
16990
16991
16992 func (psfi ProviderSpecificFailoverInput) AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool) {
16993 return nil, false
16994 }
16995
16996
16997 func (psfi ProviderSpecificFailoverInput) AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool) {
16998 return nil, false
16999 }
17000
17001
17002 func (psfi ProviderSpecificFailoverInput) AsProviderSpecificFailoverInput() (*ProviderSpecificFailoverInput, bool) {
17003 return &psfi, true
17004 }
17005
17006
17007 func (psfi ProviderSpecificFailoverInput) AsBasicProviderSpecificFailoverInput() (BasicProviderSpecificFailoverInput, bool) {
17008 return &psfi, true
17009 }
17010
17011
17012 type BasicProviderSpecificRecoveryPointDetails interface {
17013 AsA2ARecoveryPointDetails() (*A2ARecoveryPointDetails, bool)
17014 AsInMageAzureV2RecoveryPointDetails() (*InMageAzureV2RecoveryPointDetails, bool)
17015 AsInMageRcmRecoveryPointDetails() (*InMageRcmRecoveryPointDetails, bool)
17016 AsProviderSpecificRecoveryPointDetails() (*ProviderSpecificRecoveryPointDetails, bool)
17017 }
17018
17019
17020 type ProviderSpecificRecoveryPointDetails struct {
17021
17022 InstanceType InstanceTypeBasicProviderSpecificRecoveryPointDetails `json:"instanceType,omitempty"`
17023 }
17024
17025 func unmarshalBasicProviderSpecificRecoveryPointDetails(body []byte) (BasicProviderSpecificRecoveryPointDetails, error) {
17026 var m map[string]interface{}
17027 err := json.Unmarshal(body, &m)
17028 if err != nil {
17029 return nil, err
17030 }
17031
17032 switch m["instanceType"] {
17033 case string(InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeA2A):
17034 var arpd A2ARecoveryPointDetails
17035 err := json.Unmarshal(body, &arpd)
17036 return arpd, err
17037 case string(InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeInMageAzureV2):
17038 var imavrpd InMageAzureV2RecoveryPointDetails
17039 err := json.Unmarshal(body, &imavrpd)
17040 return imavrpd, err
17041 case string(InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeInMageRcm):
17042 var imrrpd InMageRcmRecoveryPointDetails
17043 err := json.Unmarshal(body, &imrrpd)
17044 return imrrpd, err
17045 default:
17046 var psrpd ProviderSpecificRecoveryPointDetails
17047 err := json.Unmarshal(body, &psrpd)
17048 return psrpd, err
17049 }
17050 }
17051 func unmarshalBasicProviderSpecificRecoveryPointDetailsArray(body []byte) ([]BasicProviderSpecificRecoveryPointDetails, error) {
17052 var rawMessages []*json.RawMessage
17053 err := json.Unmarshal(body, &rawMessages)
17054 if err != nil {
17055 return nil, err
17056 }
17057
17058 psrpdArray := make([]BasicProviderSpecificRecoveryPointDetails, len(rawMessages))
17059
17060 for index, rawMessage := range rawMessages {
17061 psrpd, err := unmarshalBasicProviderSpecificRecoveryPointDetails(*rawMessage)
17062 if err != nil {
17063 return nil, err
17064 }
17065 psrpdArray[index] = psrpd
17066 }
17067 return psrpdArray, nil
17068 }
17069
17070
17071 func (psrpd ProviderSpecificRecoveryPointDetails) MarshalJSON() ([]byte, error) {
17072 psrpd.InstanceType = InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeProviderSpecificRecoveryPointDetails
17073 objectMap := make(map[string]interface{})
17074 if psrpd.InstanceType != "" {
17075 objectMap["instanceType"] = psrpd.InstanceType
17076 }
17077 return json.Marshal(objectMap)
17078 }
17079
17080
17081 func (psrpd ProviderSpecificRecoveryPointDetails) AsA2ARecoveryPointDetails() (*A2ARecoveryPointDetails, bool) {
17082 return nil, false
17083 }
17084
17085
17086 func (psrpd ProviderSpecificRecoveryPointDetails) AsInMageAzureV2RecoveryPointDetails() (*InMageAzureV2RecoveryPointDetails, bool) {
17087 return nil, false
17088 }
17089
17090
17091 func (psrpd ProviderSpecificRecoveryPointDetails) AsInMageRcmRecoveryPointDetails() (*InMageRcmRecoveryPointDetails, bool) {
17092 return nil, false
17093 }
17094
17095
17096 func (psrpd ProviderSpecificRecoveryPointDetails) AsProviderSpecificRecoveryPointDetails() (*ProviderSpecificRecoveryPointDetails, bool) {
17097 return &psrpd, true
17098 }
17099
17100
17101 func (psrpd ProviderSpecificRecoveryPointDetails) AsBasicProviderSpecificRecoveryPointDetails() (BasicProviderSpecificRecoveryPointDetails, bool) {
17102 return &psrpd, true
17103 }
17104
17105
17106 type PushInstallerDetails struct {
17107
17108 ID *string `json:"id,omitempty"`
17109
17110 Name *string `json:"name,omitempty"`
17111
17112 Version *string `json:"version,omitempty"`
17113
17114 LastHeartbeatUtc *date.Time `json:"lastHeartbeatUtc,omitempty"`
17115
17116 Health ProtectionHealth `json:"health,omitempty"`
17117
17118 HealthErrors *[]HealthError `json:"healthErrors,omitempty"`
17119 }
17120
17121
17122 func (pid PushInstallerDetails) MarshalJSON() ([]byte, error) {
17123 objectMap := make(map[string]interface{})
17124 return json.Marshal(objectMap)
17125 }
17126
17127
17128 type RcmAzureMigrationPolicyDetails struct {
17129
17130 RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"`
17131
17132 RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"`
17133
17134 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"`
17135
17136 MultiVMSyncStatus MultiVMSyncStatus `json:"multiVmSyncStatus,omitempty"`
17137
17138 CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"`
17139
17140 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"`
17141 }
17142
17143
17144 func (rampd RcmAzureMigrationPolicyDetails) MarshalJSON() ([]byte, error) {
17145 rampd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration
17146 objectMap := make(map[string]interface{})
17147 if rampd.RecoveryPointThresholdInMinutes != nil {
17148 objectMap["recoveryPointThresholdInMinutes"] = rampd.RecoveryPointThresholdInMinutes
17149 }
17150 if rampd.RecoveryPointHistory != nil {
17151 objectMap["recoveryPointHistory"] = rampd.RecoveryPointHistory
17152 }
17153 if rampd.AppConsistentFrequencyInMinutes != nil {
17154 objectMap["appConsistentFrequencyInMinutes"] = rampd.AppConsistentFrequencyInMinutes
17155 }
17156 if rampd.MultiVMSyncStatus != "" {
17157 objectMap["multiVmSyncStatus"] = rampd.MultiVMSyncStatus
17158 }
17159 if rampd.CrashConsistentFrequencyInMinutes != nil {
17160 objectMap["crashConsistentFrequencyInMinutes"] = rampd.CrashConsistentFrequencyInMinutes
17161 }
17162 if rampd.InstanceType != "" {
17163 objectMap["instanceType"] = rampd.InstanceType
17164 }
17165 return json.Marshal(objectMap)
17166 }
17167
17168
17169 func (rampd RcmAzureMigrationPolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) {
17170 return nil, false
17171 }
17172
17173
17174 func (rampd RcmAzureMigrationPolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) {
17175 return nil, false
17176 }
17177
17178
17179 func (rampd RcmAzureMigrationPolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) {
17180 return nil, false
17181 }
17182
17183
17184 func (rampd RcmAzureMigrationPolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) {
17185 return nil, false
17186 }
17187
17188
17189 func (rampd RcmAzureMigrationPolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) {
17190 return nil, false
17191 }
17192
17193
17194 func (rampd RcmAzureMigrationPolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) {
17195 return nil, false
17196 }
17197
17198
17199 func (rampd RcmAzureMigrationPolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) {
17200 return nil, false
17201 }
17202
17203
17204 func (rampd RcmAzureMigrationPolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) {
17205 return nil, false
17206 }
17207
17208
17209 func (rampd RcmAzureMigrationPolicyDetails) AsInMageRcmPolicyDetails() (*InMageRcmPolicyDetails, bool) {
17210 return nil, false
17211 }
17212
17213
17214 func (rampd RcmAzureMigrationPolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) {
17215 return &rampd, true
17216 }
17217
17218
17219 func (rampd RcmAzureMigrationPolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) {
17220 return nil, false
17221 }
17222
17223
17224 func (rampd RcmAzureMigrationPolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) {
17225 return nil, false
17226 }
17227
17228
17229 func (rampd RcmAzureMigrationPolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) {
17230 return &rampd, true
17231 }
17232
17233
17234 type RcmProxyDetails struct {
17235
17236 ID *string `json:"id,omitempty"`
17237
17238 Name *string `json:"name,omitempty"`
17239
17240 Version *string `json:"version,omitempty"`
17241
17242 LastHeartbeatUtc *date.Time `json:"lastHeartbeatUtc,omitempty"`
17243
17244 Health ProtectionHealth `json:"health,omitempty"`
17245
17246 HealthErrors *[]HealthError `json:"healthErrors,omitempty"`
17247 }
17248
17249
17250 func (rpd RcmProxyDetails) MarshalJSON() ([]byte, error) {
17251 objectMap := make(map[string]interface{})
17252 return json.Marshal(objectMap)
17253 }
17254
17255
17256 type BasicRecoveryAvailabilitySetCustomDetails interface {
17257 AsExistingRecoveryAvailabilitySet() (*ExistingRecoveryAvailabilitySet, bool)
17258 AsRecoveryAvailabilitySetCustomDetails() (*RecoveryAvailabilitySetCustomDetails, bool)
17259 }
17260
17261
17262 type RecoveryAvailabilitySetCustomDetails struct {
17263
17264 ResourceType ResourceTypeBasicRecoveryAvailabilitySetCustomDetails `json:"resourceType,omitempty"`
17265 }
17266
17267 func unmarshalBasicRecoveryAvailabilitySetCustomDetails(body []byte) (BasicRecoveryAvailabilitySetCustomDetails, error) {
17268 var m map[string]interface{}
17269 err := json.Unmarshal(body, &m)
17270 if err != nil {
17271 return nil, err
17272 }
17273
17274 switch m["resourceType"] {
17275 case string(ResourceTypeBasicRecoveryAvailabilitySetCustomDetailsResourceTypeExisting):
17276 var eras ExistingRecoveryAvailabilitySet
17277 err := json.Unmarshal(body, &eras)
17278 return eras, err
17279 default:
17280 var rascd RecoveryAvailabilitySetCustomDetails
17281 err := json.Unmarshal(body, &rascd)
17282 return rascd, err
17283 }
17284 }
17285 func unmarshalBasicRecoveryAvailabilitySetCustomDetailsArray(body []byte) ([]BasicRecoveryAvailabilitySetCustomDetails, error) {
17286 var rawMessages []*json.RawMessage
17287 err := json.Unmarshal(body, &rawMessages)
17288 if err != nil {
17289 return nil, err
17290 }
17291
17292 rascdArray := make([]BasicRecoveryAvailabilitySetCustomDetails, len(rawMessages))
17293
17294 for index, rawMessage := range rawMessages {
17295 rascd, err := unmarshalBasicRecoveryAvailabilitySetCustomDetails(*rawMessage)
17296 if err != nil {
17297 return nil, err
17298 }
17299 rascdArray[index] = rascd
17300 }
17301 return rascdArray, nil
17302 }
17303
17304
17305 func (rascd RecoveryAvailabilitySetCustomDetails) MarshalJSON() ([]byte, error) {
17306 rascd.ResourceType = ResourceTypeBasicRecoveryAvailabilitySetCustomDetailsResourceTypeRecoveryAvailabilitySetCustomDetails
17307 objectMap := make(map[string]interface{})
17308 if rascd.ResourceType != "" {
17309 objectMap["resourceType"] = rascd.ResourceType
17310 }
17311 return json.Marshal(objectMap)
17312 }
17313
17314
17315 func (rascd RecoveryAvailabilitySetCustomDetails) AsExistingRecoveryAvailabilitySet() (*ExistingRecoveryAvailabilitySet, bool) {
17316 return nil, false
17317 }
17318
17319
17320 func (rascd RecoveryAvailabilitySetCustomDetails) AsRecoveryAvailabilitySetCustomDetails() (*RecoveryAvailabilitySetCustomDetails, bool) {
17321 return &rascd, true
17322 }
17323
17324
17325 func (rascd RecoveryAvailabilitySetCustomDetails) AsBasicRecoveryAvailabilitySetCustomDetails() (BasicRecoveryAvailabilitySetCustomDetails, bool) {
17326 return &rascd, true
17327 }
17328
17329
17330 type RecoveryPlan struct {
17331 autorest.Response `json:"-"`
17332
17333 Properties *RecoveryPlanProperties `json:"properties,omitempty"`
17334
17335 ID *string `json:"id,omitempty"`
17336
17337 Name *string `json:"name,omitempty"`
17338
17339 Type *string `json:"type,omitempty"`
17340
17341 Location *string `json:"location,omitempty"`
17342 }
17343
17344
17345 func (rp RecoveryPlan) MarshalJSON() ([]byte, error) {
17346 objectMap := make(map[string]interface{})
17347 if rp.Properties != nil {
17348 objectMap["properties"] = rp.Properties
17349 }
17350 if rp.Location != nil {
17351 objectMap["location"] = rp.Location
17352 }
17353 return json.Marshal(objectMap)
17354 }
17355
17356
17357 type RecoveryPlanA2ADetails struct {
17358
17359 PrimaryZone *string `json:"primaryZone,omitempty"`
17360
17361 RecoveryZone *string `json:"recoveryZone,omitempty"`
17362
17363 InstanceType InstanceTypeBasicRecoveryPlanProviderSpecificDetails `json:"instanceType,omitempty"`
17364 }
17365
17366
17367 func (rpad RecoveryPlanA2ADetails) MarshalJSON() ([]byte, error) {
17368 rpad.InstanceType = InstanceTypeBasicRecoveryPlanProviderSpecificDetailsInstanceTypeA2A
17369 objectMap := make(map[string]interface{})
17370 if rpad.PrimaryZone != nil {
17371 objectMap["primaryZone"] = rpad.PrimaryZone
17372 }
17373 if rpad.RecoveryZone != nil {
17374 objectMap["recoveryZone"] = rpad.RecoveryZone
17375 }
17376 if rpad.InstanceType != "" {
17377 objectMap["instanceType"] = rpad.InstanceType
17378 }
17379 return json.Marshal(objectMap)
17380 }
17381
17382
17383 func (rpad RecoveryPlanA2ADetails) AsRecoveryPlanA2ADetails() (*RecoveryPlanA2ADetails, bool) {
17384 return &rpad, true
17385 }
17386
17387
17388 func (rpad RecoveryPlanA2ADetails) AsRecoveryPlanProviderSpecificDetails() (*RecoveryPlanProviderSpecificDetails, bool) {
17389 return nil, false
17390 }
17391
17392
17393 func (rpad RecoveryPlanA2ADetails) AsBasicRecoveryPlanProviderSpecificDetails() (BasicRecoveryPlanProviderSpecificDetails, bool) {
17394 return &rpad, true
17395 }
17396
17397
17398 type RecoveryPlanA2AFailoverInput struct {
17399
17400 RecoveryPointType A2ARpRecoveryPointType `json:"recoveryPointType,omitempty"`
17401
17402 CloudServiceCreationOption *string `json:"cloudServiceCreationOption,omitempty"`
17403
17404 MultiVMSyncPointOption MultiVMSyncPointOption `json:"multiVmSyncPointOption,omitempty"`
17405
17406 InstanceType InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput `json:"instanceType,omitempty"`
17407 }
17408
17409
17410 func (rpafi RecoveryPlanA2AFailoverInput) MarshalJSON() ([]byte, error) {
17411 rpafi.InstanceType = InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeA2A
17412 objectMap := make(map[string]interface{})
17413 if rpafi.RecoveryPointType != "" {
17414 objectMap["recoveryPointType"] = rpafi.RecoveryPointType
17415 }
17416 if rpafi.CloudServiceCreationOption != nil {
17417 objectMap["cloudServiceCreationOption"] = rpafi.CloudServiceCreationOption
17418 }
17419 if rpafi.MultiVMSyncPointOption != "" {
17420 objectMap["multiVmSyncPointOption"] = rpafi.MultiVMSyncPointOption
17421 }
17422 if rpafi.InstanceType != "" {
17423 objectMap["instanceType"] = rpafi.InstanceType
17424 }
17425 return json.Marshal(objectMap)
17426 }
17427
17428
17429 func (rpafi RecoveryPlanA2AFailoverInput) AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) {
17430 return &rpafi, true
17431 }
17432
17433
17434 func (rpafi RecoveryPlanA2AFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool) {
17435 return nil, false
17436 }
17437
17438
17439 func (rpafi RecoveryPlanA2AFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool) {
17440 return nil, false
17441 }
17442
17443
17444 func (rpafi RecoveryPlanA2AFailoverInput) AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool) {
17445 return nil, false
17446 }
17447
17448
17449 func (rpafi RecoveryPlanA2AFailoverInput) AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool) {
17450 return nil, false
17451 }
17452
17453
17454 func (rpafi RecoveryPlanA2AFailoverInput) AsRecoveryPlanInMageRcmFailoverInput() (*RecoveryPlanInMageRcmFailoverInput, bool) {
17455 return nil, false
17456 }
17457
17458
17459 func (rpafi RecoveryPlanA2AFailoverInput) AsRecoveryPlanProviderSpecificFailoverInput() (*RecoveryPlanProviderSpecificFailoverInput, bool) {
17460 return nil, false
17461 }
17462
17463
17464 func (rpafi RecoveryPlanA2AFailoverInput) AsBasicRecoveryPlanProviderSpecificFailoverInput() (BasicRecoveryPlanProviderSpecificFailoverInput, bool) {
17465 return &rpafi, true
17466 }
17467
17468
17469 type RecoveryPlanA2AInput struct {
17470
17471 PrimaryZone *string `json:"primaryZone,omitempty"`
17472
17473 RecoveryZone *string `json:"recoveryZone,omitempty"`
17474
17475 InstanceType InstanceTypeBasicRecoveryPlanProviderSpecificInput `json:"instanceType,omitempty"`
17476 }
17477
17478
17479 func (rpai RecoveryPlanA2AInput) MarshalJSON() ([]byte, error) {
17480 rpai.InstanceType = InstanceTypeBasicRecoveryPlanProviderSpecificInputInstanceTypeA2A
17481 objectMap := make(map[string]interface{})
17482 if rpai.PrimaryZone != nil {
17483 objectMap["primaryZone"] = rpai.PrimaryZone
17484 }
17485 if rpai.RecoveryZone != nil {
17486 objectMap["recoveryZone"] = rpai.RecoveryZone
17487 }
17488 if rpai.InstanceType != "" {
17489 objectMap["instanceType"] = rpai.InstanceType
17490 }
17491 return json.Marshal(objectMap)
17492 }
17493
17494
17495 func (rpai RecoveryPlanA2AInput) AsRecoveryPlanA2AInput() (*RecoveryPlanA2AInput, bool) {
17496 return &rpai, true
17497 }
17498
17499
17500 func (rpai RecoveryPlanA2AInput) AsRecoveryPlanProviderSpecificInput() (*RecoveryPlanProviderSpecificInput, bool) {
17501 return nil, false
17502 }
17503
17504
17505 func (rpai RecoveryPlanA2AInput) AsBasicRecoveryPlanProviderSpecificInput() (BasicRecoveryPlanProviderSpecificInput, bool) {
17506 return &rpai, true
17507 }
17508
17509
17510 type RecoveryPlanAction struct {
17511
17512 ActionName *string `json:"actionName,omitempty"`
17513
17514 FailoverTypes *[]ReplicationProtectedItemOperation `json:"failoverTypes,omitempty"`
17515
17516 FailoverDirections *[]PossibleOperationsDirections `json:"failoverDirections,omitempty"`
17517
17518 CustomDetails BasicRecoveryPlanActionDetails `json:"customDetails,omitempty"`
17519 }
17520
17521
17522 func (rpa *RecoveryPlanAction) UnmarshalJSON(body []byte) error {
17523 var m map[string]*json.RawMessage
17524 err := json.Unmarshal(body, &m)
17525 if err != nil {
17526 return err
17527 }
17528 for k, v := range m {
17529 switch k {
17530 case "actionName":
17531 if v != nil {
17532 var actionName string
17533 err = json.Unmarshal(*v, &actionName)
17534 if err != nil {
17535 return err
17536 }
17537 rpa.ActionName = &actionName
17538 }
17539 case "failoverTypes":
17540 if v != nil {
17541 var failoverTypes []ReplicationProtectedItemOperation
17542 err = json.Unmarshal(*v, &failoverTypes)
17543 if err != nil {
17544 return err
17545 }
17546 rpa.FailoverTypes = &failoverTypes
17547 }
17548 case "failoverDirections":
17549 if v != nil {
17550 var failoverDirections []PossibleOperationsDirections
17551 err = json.Unmarshal(*v, &failoverDirections)
17552 if err != nil {
17553 return err
17554 }
17555 rpa.FailoverDirections = &failoverDirections
17556 }
17557 case "customDetails":
17558 if v != nil {
17559 customDetails, err := unmarshalBasicRecoveryPlanActionDetails(*v)
17560 if err != nil {
17561 return err
17562 }
17563 rpa.CustomDetails = customDetails
17564 }
17565 }
17566 }
17567
17568 return nil
17569 }
17570
17571
17572 type BasicRecoveryPlanActionDetails interface {
17573 AsRecoveryPlanAutomationRunbookActionDetails() (*RecoveryPlanAutomationRunbookActionDetails, bool)
17574 AsRecoveryPlanManualActionDetails() (*RecoveryPlanManualActionDetails, bool)
17575 AsRecoveryPlanScriptActionDetails() (*RecoveryPlanScriptActionDetails, bool)
17576 AsRecoveryPlanActionDetails() (*RecoveryPlanActionDetails, bool)
17577 }
17578
17579
17580 type RecoveryPlanActionDetails struct {
17581
17582 InstanceType InstanceTypeBasicRecoveryPlanActionDetails `json:"instanceType,omitempty"`
17583 }
17584
17585 func unmarshalBasicRecoveryPlanActionDetails(body []byte) (BasicRecoveryPlanActionDetails, error) {
17586 var m map[string]interface{}
17587 err := json.Unmarshal(body, &m)
17588 if err != nil {
17589 return nil, err
17590 }
17591
17592 switch m["instanceType"] {
17593 case string(InstanceTypeAutomationRunbookActionDetails):
17594 var rparad RecoveryPlanAutomationRunbookActionDetails
17595 err := json.Unmarshal(body, &rparad)
17596 return rparad, err
17597 case string(InstanceTypeManualActionDetails):
17598 var rpmad RecoveryPlanManualActionDetails
17599 err := json.Unmarshal(body, &rpmad)
17600 return rpmad, err
17601 case string(InstanceTypeScriptActionDetails):
17602 var rpsad RecoveryPlanScriptActionDetails
17603 err := json.Unmarshal(body, &rpsad)
17604 return rpsad, err
17605 default:
17606 var rpad RecoveryPlanActionDetails
17607 err := json.Unmarshal(body, &rpad)
17608 return rpad, err
17609 }
17610 }
17611 func unmarshalBasicRecoveryPlanActionDetailsArray(body []byte) ([]BasicRecoveryPlanActionDetails, error) {
17612 var rawMessages []*json.RawMessage
17613 err := json.Unmarshal(body, &rawMessages)
17614 if err != nil {
17615 return nil, err
17616 }
17617
17618 rpadArray := make([]BasicRecoveryPlanActionDetails, len(rawMessages))
17619
17620 for index, rawMessage := range rawMessages {
17621 rpad, err := unmarshalBasicRecoveryPlanActionDetails(*rawMessage)
17622 if err != nil {
17623 return nil, err
17624 }
17625 rpadArray[index] = rpad
17626 }
17627 return rpadArray, nil
17628 }
17629
17630
17631 func (rpad RecoveryPlanActionDetails) MarshalJSON() ([]byte, error) {
17632 rpad.InstanceType = InstanceTypeRecoveryPlanActionDetails
17633 objectMap := make(map[string]interface{})
17634 if rpad.InstanceType != "" {
17635 objectMap["instanceType"] = rpad.InstanceType
17636 }
17637 return json.Marshal(objectMap)
17638 }
17639
17640
17641 func (rpad RecoveryPlanActionDetails) AsRecoveryPlanAutomationRunbookActionDetails() (*RecoveryPlanAutomationRunbookActionDetails, bool) {
17642 return nil, false
17643 }
17644
17645
17646 func (rpad RecoveryPlanActionDetails) AsRecoveryPlanManualActionDetails() (*RecoveryPlanManualActionDetails, bool) {
17647 return nil, false
17648 }
17649
17650
17651 func (rpad RecoveryPlanActionDetails) AsRecoveryPlanScriptActionDetails() (*RecoveryPlanScriptActionDetails, bool) {
17652 return nil, false
17653 }
17654
17655
17656 func (rpad RecoveryPlanActionDetails) AsRecoveryPlanActionDetails() (*RecoveryPlanActionDetails, bool) {
17657 return &rpad, true
17658 }
17659
17660
17661 func (rpad RecoveryPlanActionDetails) AsBasicRecoveryPlanActionDetails() (BasicRecoveryPlanActionDetails, bool) {
17662 return &rpad, true
17663 }
17664
17665
17666 type RecoveryPlanAutomationRunbookActionDetails struct {
17667
17668 RunbookID *string `json:"runbookId,omitempty"`
17669
17670 Timeout *string `json:"timeout,omitempty"`
17671
17672 FabricLocation RecoveryPlanActionLocation `json:"fabricLocation,omitempty"`
17673
17674 InstanceType InstanceTypeBasicRecoveryPlanActionDetails `json:"instanceType,omitempty"`
17675 }
17676
17677
17678 func (rparad RecoveryPlanAutomationRunbookActionDetails) MarshalJSON() ([]byte, error) {
17679 rparad.InstanceType = InstanceTypeAutomationRunbookActionDetails
17680 objectMap := make(map[string]interface{})
17681 if rparad.RunbookID != nil {
17682 objectMap["runbookId"] = rparad.RunbookID
17683 }
17684 if rparad.Timeout != nil {
17685 objectMap["timeout"] = rparad.Timeout
17686 }
17687 if rparad.FabricLocation != "" {
17688 objectMap["fabricLocation"] = rparad.FabricLocation
17689 }
17690 if rparad.InstanceType != "" {
17691 objectMap["instanceType"] = rparad.InstanceType
17692 }
17693 return json.Marshal(objectMap)
17694 }
17695
17696
17697 func (rparad RecoveryPlanAutomationRunbookActionDetails) AsRecoveryPlanAutomationRunbookActionDetails() (*RecoveryPlanAutomationRunbookActionDetails, bool) {
17698 return &rparad, true
17699 }
17700
17701
17702 func (rparad RecoveryPlanAutomationRunbookActionDetails) AsRecoveryPlanManualActionDetails() (*RecoveryPlanManualActionDetails, bool) {
17703 return nil, false
17704 }
17705
17706
17707 func (rparad RecoveryPlanAutomationRunbookActionDetails) AsRecoveryPlanScriptActionDetails() (*RecoveryPlanScriptActionDetails, bool) {
17708 return nil, false
17709 }
17710
17711
17712 func (rparad RecoveryPlanAutomationRunbookActionDetails) AsRecoveryPlanActionDetails() (*RecoveryPlanActionDetails, bool) {
17713 return nil, false
17714 }
17715
17716
17717 func (rparad RecoveryPlanAutomationRunbookActionDetails) AsBasicRecoveryPlanActionDetails() (BasicRecoveryPlanActionDetails, bool) {
17718 return &rparad, true
17719 }
17720
17721
17722 type RecoveryPlanCollection struct {
17723 autorest.Response `json:"-"`
17724
17725 Value *[]RecoveryPlan `json:"value,omitempty"`
17726
17727 NextLink *string `json:"nextLink,omitempty"`
17728 }
17729
17730
17731 type RecoveryPlanCollectionIterator struct {
17732 i int
17733 page RecoveryPlanCollectionPage
17734 }
17735
17736
17737
17738 func (iter *RecoveryPlanCollectionIterator) NextWithContext(ctx context.Context) (err error) {
17739 if tracing.IsEnabled() {
17740 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPlanCollectionIterator.NextWithContext")
17741 defer func() {
17742 sc := -1
17743 if iter.Response().Response.Response != nil {
17744 sc = iter.Response().Response.Response.StatusCode
17745 }
17746 tracing.EndSpan(ctx, sc, err)
17747 }()
17748 }
17749 iter.i++
17750 if iter.i < len(iter.page.Values()) {
17751 return nil
17752 }
17753 err = iter.page.NextWithContext(ctx)
17754 if err != nil {
17755 iter.i--
17756 return err
17757 }
17758 iter.i = 0
17759 return nil
17760 }
17761
17762
17763
17764
17765 func (iter *RecoveryPlanCollectionIterator) Next() error {
17766 return iter.NextWithContext(context.Background())
17767 }
17768
17769
17770 func (iter RecoveryPlanCollectionIterator) NotDone() bool {
17771 return iter.page.NotDone() && iter.i < len(iter.page.Values())
17772 }
17773
17774
17775 func (iter RecoveryPlanCollectionIterator) Response() RecoveryPlanCollection {
17776 return iter.page.Response()
17777 }
17778
17779
17780
17781 func (iter RecoveryPlanCollectionIterator) Value() RecoveryPlan {
17782 if !iter.page.NotDone() {
17783 return RecoveryPlan{}
17784 }
17785 return iter.page.Values()[iter.i]
17786 }
17787
17788
17789 func NewRecoveryPlanCollectionIterator(page RecoveryPlanCollectionPage) RecoveryPlanCollectionIterator {
17790 return RecoveryPlanCollectionIterator{page: page}
17791 }
17792
17793
17794 func (RPCVar RecoveryPlanCollection) IsEmpty() bool {
17795 return RPCVar.Value == nil || len(*RPCVar.Value) == 0
17796 }
17797
17798
17799 func (RPCVar RecoveryPlanCollection) hasNextLink() bool {
17800 return RPCVar.NextLink != nil && len(*RPCVar.NextLink) != 0
17801 }
17802
17803
17804
17805 func (RPCVar RecoveryPlanCollection) recoveryPlanCollectionPreparer(ctx context.Context) (*http.Request, error) {
17806 if !RPCVar.hasNextLink() {
17807 return nil, nil
17808 }
17809 return autorest.Prepare((&http.Request{}).WithContext(ctx),
17810 autorest.AsJSON(),
17811 autorest.AsGet(),
17812 autorest.WithBaseURL(to.String(RPCVar.NextLink)))
17813 }
17814
17815
17816 type RecoveryPlanCollectionPage struct {
17817 fn func(context.Context, RecoveryPlanCollection) (RecoveryPlanCollection, error)
17818 RPCVar RecoveryPlanCollection
17819 }
17820
17821
17822
17823 func (page *RecoveryPlanCollectionPage) NextWithContext(ctx context.Context) (err error) {
17824 if tracing.IsEnabled() {
17825 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPlanCollectionPage.NextWithContext")
17826 defer func() {
17827 sc := -1
17828 if page.Response().Response.Response != nil {
17829 sc = page.Response().Response.Response.StatusCode
17830 }
17831 tracing.EndSpan(ctx, sc, err)
17832 }()
17833 }
17834 for {
17835 next, err := page.fn(ctx, page.RPCVar)
17836 if err != nil {
17837 return err
17838 }
17839 page.RPCVar = next
17840 if !next.hasNextLink() || !next.IsEmpty() {
17841 break
17842 }
17843 }
17844 return nil
17845 }
17846
17847
17848
17849
17850 func (page *RecoveryPlanCollectionPage) Next() error {
17851 return page.NextWithContext(context.Background())
17852 }
17853
17854
17855 func (page RecoveryPlanCollectionPage) NotDone() bool {
17856 return !page.RPCVar.IsEmpty()
17857 }
17858
17859
17860 func (page RecoveryPlanCollectionPage) Response() RecoveryPlanCollection {
17861 return page.RPCVar
17862 }
17863
17864
17865 func (page RecoveryPlanCollectionPage) Values() []RecoveryPlan {
17866 if page.RPCVar.IsEmpty() {
17867 return nil
17868 }
17869 return *page.RPCVar.Value
17870 }
17871
17872
17873 func NewRecoveryPlanCollectionPage(cur RecoveryPlanCollection, getNextPage func(context.Context, RecoveryPlanCollection) (RecoveryPlanCollection, error)) RecoveryPlanCollectionPage {
17874 return RecoveryPlanCollectionPage{
17875 fn: getNextPage,
17876 RPCVar: cur,
17877 }
17878 }
17879
17880
17881 type RecoveryPlanGroup struct {
17882
17883 GroupType RecoveryPlanGroupType `json:"groupType,omitempty"`
17884
17885 ReplicationProtectedItems *[]RecoveryPlanProtectedItem `json:"replicationProtectedItems,omitempty"`
17886
17887 StartGroupActions *[]RecoveryPlanAction `json:"startGroupActions,omitempty"`
17888
17889 EndGroupActions *[]RecoveryPlanAction `json:"endGroupActions,omitempty"`
17890 }
17891
17892
17893 type RecoveryPlanGroupTaskDetails struct {
17894
17895 Name *string `json:"name,omitempty"`
17896
17897 GroupID *string `json:"groupId,omitempty"`
17898
17899 RpGroupType *string `json:"rpGroupType,omitempty"`
17900
17901 ChildTasks *[]ASRTask `json:"childTasks,omitempty"`
17902
17903 InstanceType InstanceTypeBasicGroupTaskDetails `json:"instanceType,omitempty"`
17904 }
17905
17906
17907 func (rpgtd RecoveryPlanGroupTaskDetails) MarshalJSON() ([]byte, error) {
17908 rpgtd.InstanceType = InstanceTypeRecoveryPlanGroupTaskDetails
17909 objectMap := make(map[string]interface{})
17910 if rpgtd.Name != nil {
17911 objectMap["name"] = rpgtd.Name
17912 }
17913 if rpgtd.GroupID != nil {
17914 objectMap["groupId"] = rpgtd.GroupID
17915 }
17916 if rpgtd.RpGroupType != nil {
17917 objectMap["rpGroupType"] = rpgtd.RpGroupType
17918 }
17919 if rpgtd.ChildTasks != nil {
17920 objectMap["childTasks"] = rpgtd.ChildTasks
17921 }
17922 if rpgtd.InstanceType != "" {
17923 objectMap["instanceType"] = rpgtd.InstanceType
17924 }
17925 return json.Marshal(objectMap)
17926 }
17927
17928
17929 func (rpgtd RecoveryPlanGroupTaskDetails) AsInlineWorkflowTaskDetails() (*InlineWorkflowTaskDetails, bool) {
17930 return nil, false
17931 }
17932
17933
17934 func (rpgtd RecoveryPlanGroupTaskDetails) AsRecoveryPlanGroupTaskDetails() (*RecoveryPlanGroupTaskDetails, bool) {
17935 return &rpgtd, true
17936 }
17937
17938
17939 func (rpgtd RecoveryPlanGroupTaskDetails) AsRecoveryPlanShutdownGroupTaskDetails() (*RecoveryPlanShutdownGroupTaskDetails, bool) {
17940 return nil, false
17941 }
17942
17943
17944 func (rpgtd RecoveryPlanGroupTaskDetails) AsGroupTaskDetails() (*GroupTaskDetails, bool) {
17945 return nil, false
17946 }
17947
17948
17949 func (rpgtd RecoveryPlanGroupTaskDetails) AsBasicGroupTaskDetails() (BasicGroupTaskDetails, bool) {
17950 return &rpgtd, true
17951 }
17952
17953
17954 type RecoveryPlanHyperVReplicaAzureFailbackInput struct {
17955
17956 DataSyncOption DataSyncStatus `json:"dataSyncOption,omitempty"`
17957
17958 RecoveryVMCreationOption AlternateLocationRecoveryOption `json:"recoveryVmCreationOption,omitempty"`
17959
17960 InstanceType InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput `json:"instanceType,omitempty"`
17961 }
17962
17963
17964 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) MarshalJSON() ([]byte, error) {
17965 rphvrafi.InstanceType = InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback
17966 objectMap := make(map[string]interface{})
17967 if rphvrafi.DataSyncOption != "" {
17968 objectMap["dataSyncOption"] = rphvrafi.DataSyncOption
17969 }
17970 if rphvrafi.RecoveryVMCreationOption != "" {
17971 objectMap["recoveryVmCreationOption"] = rphvrafi.RecoveryVMCreationOption
17972 }
17973 if rphvrafi.InstanceType != "" {
17974 objectMap["instanceType"] = rphvrafi.InstanceType
17975 }
17976 return json.Marshal(objectMap)
17977 }
17978
17979
17980 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) {
17981 return nil, false
17982 }
17983
17984
17985 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool) {
17986 return &rphvrafi, true
17987 }
17988
17989
17990 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool) {
17991 return nil, false
17992 }
17993
17994
17995 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool) {
17996 return nil, false
17997 }
17998
17999
18000 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool) {
18001 return nil, false
18002 }
18003
18004
18005 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsRecoveryPlanInMageRcmFailoverInput() (*RecoveryPlanInMageRcmFailoverInput, bool) {
18006 return nil, false
18007 }
18008
18009
18010 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsRecoveryPlanProviderSpecificFailoverInput() (*RecoveryPlanProviderSpecificFailoverInput, bool) {
18011 return nil, false
18012 }
18013
18014
18015 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsBasicRecoveryPlanProviderSpecificFailoverInput() (BasicRecoveryPlanProviderSpecificFailoverInput, bool) {
18016 return &rphvrafi, true
18017 }
18018
18019
18020 type RecoveryPlanHyperVReplicaAzureFailoverInput struct {
18021
18022 VaultLocation *string `json:"vaultLocation,omitempty"`
18023
18024 PrimaryKekCertificatePfx *string `json:"primaryKekCertificatePfx,omitempty"`
18025
18026 SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"`
18027
18028 RecoveryPointType HyperVReplicaAzureRpRecoveryPointType `json:"recoveryPointType,omitempty"`
18029
18030 InstanceType InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput `json:"instanceType,omitempty"`
18031 }
18032
18033
18034 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) MarshalJSON() ([]byte, error) {
18035 rphvrafi.InstanceType = InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure
18036 objectMap := make(map[string]interface{})
18037 if rphvrafi.VaultLocation != nil {
18038 objectMap["vaultLocation"] = rphvrafi.VaultLocation
18039 }
18040 if rphvrafi.PrimaryKekCertificatePfx != nil {
18041 objectMap["primaryKekCertificatePfx"] = rphvrafi.PrimaryKekCertificatePfx
18042 }
18043 if rphvrafi.SecondaryKekCertificatePfx != nil {
18044 objectMap["secondaryKekCertificatePfx"] = rphvrafi.SecondaryKekCertificatePfx
18045 }
18046 if rphvrafi.RecoveryPointType != "" {
18047 objectMap["recoveryPointType"] = rphvrafi.RecoveryPointType
18048 }
18049 if rphvrafi.InstanceType != "" {
18050 objectMap["instanceType"] = rphvrafi.InstanceType
18051 }
18052 return json.Marshal(objectMap)
18053 }
18054
18055
18056 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) {
18057 return nil, false
18058 }
18059
18060
18061 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool) {
18062 return nil, false
18063 }
18064
18065
18066 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool) {
18067 return &rphvrafi, true
18068 }
18069
18070
18071 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool) {
18072 return nil, false
18073 }
18074
18075
18076 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool) {
18077 return nil, false
18078 }
18079
18080
18081 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsRecoveryPlanInMageRcmFailoverInput() (*RecoveryPlanInMageRcmFailoverInput, bool) {
18082 return nil, false
18083 }
18084
18085
18086 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsRecoveryPlanProviderSpecificFailoverInput() (*RecoveryPlanProviderSpecificFailoverInput, bool) {
18087 return nil, false
18088 }
18089
18090
18091 func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsBasicRecoveryPlanProviderSpecificFailoverInput() (BasicRecoveryPlanProviderSpecificFailoverInput, bool) {
18092 return &rphvrafi, true
18093 }
18094
18095
18096 type RecoveryPlanInMageAzureV2FailoverInput struct {
18097
18098 VaultLocation *string `json:"vaultLocation,omitempty"`
18099
18100 RecoveryPointType InMageV2RpRecoveryPointType `json:"recoveryPointType,omitempty"`
18101
18102 UseMultiVMSyncPoint *string `json:"useMultiVmSyncPoint,omitempty"`
18103
18104 InstanceType InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput `json:"instanceType,omitempty"`
18105 }
18106
18107
18108 func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) MarshalJSON() ([]byte, error) {
18109 rpimavfi.InstanceType = InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMageAzureV2
18110 objectMap := make(map[string]interface{})
18111 if rpimavfi.VaultLocation != nil {
18112 objectMap["vaultLocation"] = rpimavfi.VaultLocation
18113 }
18114 if rpimavfi.RecoveryPointType != "" {
18115 objectMap["recoveryPointType"] = rpimavfi.RecoveryPointType
18116 }
18117 if rpimavfi.UseMultiVMSyncPoint != nil {
18118 objectMap["useMultiVmSyncPoint"] = rpimavfi.UseMultiVMSyncPoint
18119 }
18120 if rpimavfi.InstanceType != "" {
18121 objectMap["instanceType"] = rpimavfi.InstanceType
18122 }
18123 return json.Marshal(objectMap)
18124 }
18125
18126
18127 func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) {
18128 return nil, false
18129 }
18130
18131
18132 func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool) {
18133 return nil, false
18134 }
18135
18136
18137 func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool) {
18138 return nil, false
18139 }
18140
18141
18142 func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool) {
18143 return &rpimavfi, true
18144 }
18145
18146
18147 func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool) {
18148 return nil, false
18149 }
18150
18151
18152 func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsRecoveryPlanInMageRcmFailoverInput() (*RecoveryPlanInMageRcmFailoverInput, bool) {
18153 return nil, false
18154 }
18155
18156
18157 func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsRecoveryPlanProviderSpecificFailoverInput() (*RecoveryPlanProviderSpecificFailoverInput, bool) {
18158 return nil, false
18159 }
18160
18161
18162 func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsBasicRecoveryPlanProviderSpecificFailoverInput() (BasicRecoveryPlanProviderSpecificFailoverInput, bool) {
18163 return &rpimavfi, true
18164 }
18165
18166
18167 type RecoveryPlanInMageFailoverInput struct {
18168
18169 RecoveryPointType RpInMageRecoveryPointType `json:"recoveryPointType,omitempty"`
18170
18171 InstanceType InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput `json:"instanceType,omitempty"`
18172 }
18173
18174
18175 func (rpimfi RecoveryPlanInMageFailoverInput) MarshalJSON() ([]byte, error) {
18176 rpimfi.InstanceType = InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMage
18177 objectMap := make(map[string]interface{})
18178 if rpimfi.RecoveryPointType != "" {
18179 objectMap["recoveryPointType"] = rpimfi.RecoveryPointType
18180 }
18181 if rpimfi.InstanceType != "" {
18182 objectMap["instanceType"] = rpimfi.InstanceType
18183 }
18184 return json.Marshal(objectMap)
18185 }
18186
18187
18188 func (rpimfi RecoveryPlanInMageFailoverInput) AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) {
18189 return nil, false
18190 }
18191
18192
18193 func (rpimfi RecoveryPlanInMageFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool) {
18194 return nil, false
18195 }
18196
18197
18198 func (rpimfi RecoveryPlanInMageFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool) {
18199 return nil, false
18200 }
18201
18202
18203 func (rpimfi RecoveryPlanInMageFailoverInput) AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool) {
18204 return nil, false
18205 }
18206
18207
18208 func (rpimfi RecoveryPlanInMageFailoverInput) AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool) {
18209 return &rpimfi, true
18210 }
18211
18212
18213 func (rpimfi RecoveryPlanInMageFailoverInput) AsRecoveryPlanInMageRcmFailoverInput() (*RecoveryPlanInMageRcmFailoverInput, bool) {
18214 return nil, false
18215 }
18216
18217
18218 func (rpimfi RecoveryPlanInMageFailoverInput) AsRecoveryPlanProviderSpecificFailoverInput() (*RecoveryPlanProviderSpecificFailoverInput, bool) {
18219 return nil, false
18220 }
18221
18222
18223 func (rpimfi RecoveryPlanInMageFailoverInput) AsBasicRecoveryPlanProviderSpecificFailoverInput() (BasicRecoveryPlanProviderSpecificFailoverInput, bool) {
18224 return &rpimfi, true
18225 }
18226
18227
18228 type RecoveryPlanInMageRcmFailoverInput struct {
18229
18230 RecoveryPointType RecoveryPlanPointType `json:"recoveryPointType,omitempty"`
18231
18232 UseMultiVMSyncPoint *string `json:"useMultiVmSyncPoint,omitempty"`
18233
18234 InstanceType InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput `json:"instanceType,omitempty"`
18235 }
18236
18237
18238 func (rpimrfi RecoveryPlanInMageRcmFailoverInput) MarshalJSON() ([]byte, error) {
18239 rpimrfi.InstanceType = InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMageRcm
18240 objectMap := make(map[string]interface{})
18241 if rpimrfi.RecoveryPointType != "" {
18242 objectMap["recoveryPointType"] = rpimrfi.RecoveryPointType
18243 }
18244 if rpimrfi.UseMultiVMSyncPoint != nil {
18245 objectMap["useMultiVmSyncPoint"] = rpimrfi.UseMultiVMSyncPoint
18246 }
18247 if rpimrfi.InstanceType != "" {
18248 objectMap["instanceType"] = rpimrfi.InstanceType
18249 }
18250 return json.Marshal(objectMap)
18251 }
18252
18253
18254 func (rpimrfi RecoveryPlanInMageRcmFailoverInput) AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) {
18255 return nil, false
18256 }
18257
18258
18259 func (rpimrfi RecoveryPlanInMageRcmFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool) {
18260 return nil, false
18261 }
18262
18263
18264 func (rpimrfi RecoveryPlanInMageRcmFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool) {
18265 return nil, false
18266 }
18267
18268
18269 func (rpimrfi RecoveryPlanInMageRcmFailoverInput) AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool) {
18270 return nil, false
18271 }
18272
18273
18274 func (rpimrfi RecoveryPlanInMageRcmFailoverInput) AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool) {
18275 return nil, false
18276 }
18277
18278
18279 func (rpimrfi RecoveryPlanInMageRcmFailoverInput) AsRecoveryPlanInMageRcmFailoverInput() (*RecoveryPlanInMageRcmFailoverInput, bool) {
18280 return &rpimrfi, true
18281 }
18282
18283
18284 func (rpimrfi RecoveryPlanInMageRcmFailoverInput) AsRecoveryPlanProviderSpecificFailoverInput() (*RecoveryPlanProviderSpecificFailoverInput, bool) {
18285 return nil, false
18286 }
18287
18288
18289 func (rpimrfi RecoveryPlanInMageRcmFailoverInput) AsBasicRecoveryPlanProviderSpecificFailoverInput() (BasicRecoveryPlanProviderSpecificFailoverInput, bool) {
18290 return &rpimrfi, true
18291 }
18292
18293
18294 type RecoveryPlanManualActionDetails struct {
18295
18296 Description *string `json:"description,omitempty"`
18297
18298 InstanceType InstanceTypeBasicRecoveryPlanActionDetails `json:"instanceType,omitempty"`
18299 }
18300
18301
18302 func (rpmad RecoveryPlanManualActionDetails) MarshalJSON() ([]byte, error) {
18303 rpmad.InstanceType = InstanceTypeManualActionDetails
18304 objectMap := make(map[string]interface{})
18305 if rpmad.Description != nil {
18306 objectMap["description"] = rpmad.Description
18307 }
18308 if rpmad.InstanceType != "" {
18309 objectMap["instanceType"] = rpmad.InstanceType
18310 }
18311 return json.Marshal(objectMap)
18312 }
18313
18314
18315 func (rpmad RecoveryPlanManualActionDetails) AsRecoveryPlanAutomationRunbookActionDetails() (*RecoveryPlanAutomationRunbookActionDetails, bool) {
18316 return nil, false
18317 }
18318
18319
18320 func (rpmad RecoveryPlanManualActionDetails) AsRecoveryPlanManualActionDetails() (*RecoveryPlanManualActionDetails, bool) {
18321 return &rpmad, true
18322 }
18323
18324
18325 func (rpmad RecoveryPlanManualActionDetails) AsRecoveryPlanScriptActionDetails() (*RecoveryPlanScriptActionDetails, bool) {
18326 return nil, false
18327 }
18328
18329
18330 func (rpmad RecoveryPlanManualActionDetails) AsRecoveryPlanActionDetails() (*RecoveryPlanActionDetails, bool) {
18331 return nil, false
18332 }
18333
18334
18335 func (rpmad RecoveryPlanManualActionDetails) AsBasicRecoveryPlanActionDetails() (BasicRecoveryPlanActionDetails, bool) {
18336 return &rpmad, true
18337 }
18338
18339
18340 type RecoveryPlanPlannedFailoverInput struct {
18341
18342 Properties *RecoveryPlanPlannedFailoverInputProperties `json:"properties,omitempty"`
18343 }
18344
18345
18346 type RecoveryPlanPlannedFailoverInputProperties struct {
18347
18348 FailoverDirection PossibleOperationsDirections `json:"failoverDirection,omitempty"`
18349
18350 ProviderSpecificDetails *[]BasicRecoveryPlanProviderSpecificFailoverInput `json:"providerSpecificDetails,omitempty"`
18351 }
18352
18353
18354 func (rppfip *RecoveryPlanPlannedFailoverInputProperties) UnmarshalJSON(body []byte) error {
18355 var m map[string]*json.RawMessage
18356 err := json.Unmarshal(body, &m)
18357 if err != nil {
18358 return err
18359 }
18360 for k, v := range m {
18361 switch k {
18362 case "failoverDirection":
18363 if v != nil {
18364 var failoverDirection PossibleOperationsDirections
18365 err = json.Unmarshal(*v, &failoverDirection)
18366 if err != nil {
18367 return err
18368 }
18369 rppfip.FailoverDirection = failoverDirection
18370 }
18371 case "providerSpecificDetails":
18372 if v != nil {
18373 providerSpecificDetails, err := unmarshalBasicRecoveryPlanProviderSpecificFailoverInputArray(*v)
18374 if err != nil {
18375 return err
18376 }
18377 rppfip.ProviderSpecificDetails = &providerSpecificDetails
18378 }
18379 }
18380 }
18381
18382 return nil
18383 }
18384
18385
18386 type RecoveryPlanProperties struct {
18387
18388 FriendlyName *string `json:"friendlyName,omitempty"`
18389
18390 PrimaryFabricID *string `json:"primaryFabricId,omitempty"`
18391
18392 PrimaryFabricFriendlyName *string `json:"primaryFabricFriendlyName,omitempty"`
18393
18394 RecoveryFabricID *string `json:"recoveryFabricId,omitempty"`
18395
18396 RecoveryFabricFriendlyName *string `json:"recoveryFabricFriendlyName,omitempty"`
18397
18398 FailoverDeploymentModel *string `json:"failoverDeploymentModel,omitempty"`
18399
18400 ReplicationProviders *[]string `json:"replicationProviders,omitempty"`
18401
18402 AllowedOperations *[]string `json:"allowedOperations,omitempty"`
18403
18404 LastPlannedFailoverTime *date.Time `json:"lastPlannedFailoverTime,omitempty"`
18405
18406 LastUnplannedFailoverTime *date.Time `json:"lastUnplannedFailoverTime,omitempty"`
18407
18408 LastTestFailoverTime *date.Time `json:"lastTestFailoverTime,omitempty"`
18409
18410 CurrentScenario *CurrentScenarioDetails `json:"currentScenario,omitempty"`
18411
18412 CurrentScenarioStatus *string `json:"currentScenarioStatus,omitempty"`
18413
18414 CurrentScenarioStatusDescription *string `json:"currentScenarioStatusDescription,omitempty"`
18415
18416 Groups *[]RecoveryPlanGroup `json:"groups,omitempty"`
18417
18418 ProviderSpecificDetails *[]BasicRecoveryPlanProviderSpecificDetails `json:"providerSpecificDetails,omitempty"`
18419 }
18420
18421
18422 func (rpp RecoveryPlanProperties) MarshalJSON() ([]byte, error) {
18423 objectMap := make(map[string]interface{})
18424 if rpp.FriendlyName != nil {
18425 objectMap["friendlyName"] = rpp.FriendlyName
18426 }
18427 if rpp.PrimaryFabricID != nil {
18428 objectMap["primaryFabricId"] = rpp.PrimaryFabricID
18429 }
18430 if rpp.PrimaryFabricFriendlyName != nil {
18431 objectMap["primaryFabricFriendlyName"] = rpp.PrimaryFabricFriendlyName
18432 }
18433 if rpp.RecoveryFabricID != nil {
18434 objectMap["recoveryFabricId"] = rpp.RecoveryFabricID
18435 }
18436 if rpp.RecoveryFabricFriendlyName != nil {
18437 objectMap["recoveryFabricFriendlyName"] = rpp.RecoveryFabricFriendlyName
18438 }
18439 if rpp.FailoverDeploymentModel != nil {
18440 objectMap["failoverDeploymentModel"] = rpp.FailoverDeploymentModel
18441 }
18442 if rpp.ReplicationProviders != nil {
18443 objectMap["replicationProviders"] = rpp.ReplicationProviders
18444 }
18445 if rpp.AllowedOperations != nil {
18446 objectMap["allowedOperations"] = rpp.AllowedOperations
18447 }
18448 if rpp.LastPlannedFailoverTime != nil {
18449 objectMap["lastPlannedFailoverTime"] = rpp.LastPlannedFailoverTime
18450 }
18451 if rpp.LastUnplannedFailoverTime != nil {
18452 objectMap["lastUnplannedFailoverTime"] = rpp.LastUnplannedFailoverTime
18453 }
18454 if rpp.LastTestFailoverTime != nil {
18455 objectMap["lastTestFailoverTime"] = rpp.LastTestFailoverTime
18456 }
18457 if rpp.CurrentScenario != nil {
18458 objectMap["currentScenario"] = rpp.CurrentScenario
18459 }
18460 if rpp.CurrentScenarioStatus != nil {
18461 objectMap["currentScenarioStatus"] = rpp.CurrentScenarioStatus
18462 }
18463 if rpp.CurrentScenarioStatusDescription != nil {
18464 objectMap["currentScenarioStatusDescription"] = rpp.CurrentScenarioStatusDescription
18465 }
18466 if rpp.Groups != nil {
18467 objectMap["groups"] = rpp.Groups
18468 }
18469 return json.Marshal(objectMap)
18470 }
18471
18472
18473 func (rpp *RecoveryPlanProperties) UnmarshalJSON(body []byte) error {
18474 var m map[string]*json.RawMessage
18475 err := json.Unmarshal(body, &m)
18476 if err != nil {
18477 return err
18478 }
18479 for k, v := range m {
18480 switch k {
18481 case "friendlyName":
18482 if v != nil {
18483 var friendlyName string
18484 err = json.Unmarshal(*v, &friendlyName)
18485 if err != nil {
18486 return err
18487 }
18488 rpp.FriendlyName = &friendlyName
18489 }
18490 case "primaryFabricId":
18491 if v != nil {
18492 var primaryFabricID string
18493 err = json.Unmarshal(*v, &primaryFabricID)
18494 if err != nil {
18495 return err
18496 }
18497 rpp.PrimaryFabricID = &primaryFabricID
18498 }
18499 case "primaryFabricFriendlyName":
18500 if v != nil {
18501 var primaryFabricFriendlyName string
18502 err = json.Unmarshal(*v, &primaryFabricFriendlyName)
18503 if err != nil {
18504 return err
18505 }
18506 rpp.PrimaryFabricFriendlyName = &primaryFabricFriendlyName
18507 }
18508 case "recoveryFabricId":
18509 if v != nil {
18510 var recoveryFabricID string
18511 err = json.Unmarshal(*v, &recoveryFabricID)
18512 if err != nil {
18513 return err
18514 }
18515 rpp.RecoveryFabricID = &recoveryFabricID
18516 }
18517 case "recoveryFabricFriendlyName":
18518 if v != nil {
18519 var recoveryFabricFriendlyName string
18520 err = json.Unmarshal(*v, &recoveryFabricFriendlyName)
18521 if err != nil {
18522 return err
18523 }
18524 rpp.RecoveryFabricFriendlyName = &recoveryFabricFriendlyName
18525 }
18526 case "failoverDeploymentModel":
18527 if v != nil {
18528 var failoverDeploymentModel string
18529 err = json.Unmarshal(*v, &failoverDeploymentModel)
18530 if err != nil {
18531 return err
18532 }
18533 rpp.FailoverDeploymentModel = &failoverDeploymentModel
18534 }
18535 case "replicationProviders":
18536 if v != nil {
18537 var replicationProviders []string
18538 err = json.Unmarshal(*v, &replicationProviders)
18539 if err != nil {
18540 return err
18541 }
18542 rpp.ReplicationProviders = &replicationProviders
18543 }
18544 case "allowedOperations":
18545 if v != nil {
18546 var allowedOperations []string
18547 err = json.Unmarshal(*v, &allowedOperations)
18548 if err != nil {
18549 return err
18550 }
18551 rpp.AllowedOperations = &allowedOperations
18552 }
18553 case "lastPlannedFailoverTime":
18554 if v != nil {
18555 var lastPlannedFailoverTime date.Time
18556 err = json.Unmarshal(*v, &lastPlannedFailoverTime)
18557 if err != nil {
18558 return err
18559 }
18560 rpp.LastPlannedFailoverTime = &lastPlannedFailoverTime
18561 }
18562 case "lastUnplannedFailoverTime":
18563 if v != nil {
18564 var lastUnplannedFailoverTime date.Time
18565 err = json.Unmarshal(*v, &lastUnplannedFailoverTime)
18566 if err != nil {
18567 return err
18568 }
18569 rpp.LastUnplannedFailoverTime = &lastUnplannedFailoverTime
18570 }
18571 case "lastTestFailoverTime":
18572 if v != nil {
18573 var lastTestFailoverTime date.Time
18574 err = json.Unmarshal(*v, &lastTestFailoverTime)
18575 if err != nil {
18576 return err
18577 }
18578 rpp.LastTestFailoverTime = &lastTestFailoverTime
18579 }
18580 case "currentScenario":
18581 if v != nil {
18582 var currentScenario CurrentScenarioDetails
18583 err = json.Unmarshal(*v, ¤tScenario)
18584 if err != nil {
18585 return err
18586 }
18587 rpp.CurrentScenario = ¤tScenario
18588 }
18589 case "currentScenarioStatus":
18590 if v != nil {
18591 var currentScenarioStatus string
18592 err = json.Unmarshal(*v, ¤tScenarioStatus)
18593 if err != nil {
18594 return err
18595 }
18596 rpp.CurrentScenarioStatus = ¤tScenarioStatus
18597 }
18598 case "currentScenarioStatusDescription":
18599 if v != nil {
18600 var currentScenarioStatusDescription string
18601 err = json.Unmarshal(*v, ¤tScenarioStatusDescription)
18602 if err != nil {
18603 return err
18604 }
18605 rpp.CurrentScenarioStatusDescription = ¤tScenarioStatusDescription
18606 }
18607 case "groups":
18608 if v != nil {
18609 var groups []RecoveryPlanGroup
18610 err = json.Unmarshal(*v, &groups)
18611 if err != nil {
18612 return err
18613 }
18614 rpp.Groups = &groups
18615 }
18616 case "providerSpecificDetails":
18617 if v != nil {
18618 providerSpecificDetails, err := unmarshalBasicRecoveryPlanProviderSpecificDetailsArray(*v)
18619 if err != nil {
18620 return err
18621 }
18622 rpp.ProviderSpecificDetails = &providerSpecificDetails
18623 }
18624 }
18625 }
18626
18627 return nil
18628 }
18629
18630
18631 type RecoveryPlanProtectedItem struct {
18632
18633 ID *string `json:"id,omitempty"`
18634
18635 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
18636 }
18637
18638
18639 type BasicRecoveryPlanProviderSpecificDetails interface {
18640 AsRecoveryPlanA2ADetails() (*RecoveryPlanA2ADetails, bool)
18641 AsRecoveryPlanProviderSpecificDetails() (*RecoveryPlanProviderSpecificDetails, bool)
18642 }
18643
18644
18645 type RecoveryPlanProviderSpecificDetails struct {
18646
18647 InstanceType InstanceTypeBasicRecoveryPlanProviderSpecificDetails `json:"instanceType,omitempty"`
18648 }
18649
18650 func unmarshalBasicRecoveryPlanProviderSpecificDetails(body []byte) (BasicRecoveryPlanProviderSpecificDetails, error) {
18651 var m map[string]interface{}
18652 err := json.Unmarshal(body, &m)
18653 if err != nil {
18654 return nil, err
18655 }
18656
18657 switch m["instanceType"] {
18658 case string(InstanceTypeBasicRecoveryPlanProviderSpecificDetailsInstanceTypeA2A):
18659 var rpad RecoveryPlanA2ADetails
18660 err := json.Unmarshal(body, &rpad)
18661 return rpad, err
18662 default:
18663 var rppsd RecoveryPlanProviderSpecificDetails
18664 err := json.Unmarshal(body, &rppsd)
18665 return rppsd, err
18666 }
18667 }
18668 func unmarshalBasicRecoveryPlanProviderSpecificDetailsArray(body []byte) ([]BasicRecoveryPlanProviderSpecificDetails, error) {
18669 var rawMessages []*json.RawMessage
18670 err := json.Unmarshal(body, &rawMessages)
18671 if err != nil {
18672 return nil, err
18673 }
18674
18675 rppsdArray := make([]BasicRecoveryPlanProviderSpecificDetails, len(rawMessages))
18676
18677 for index, rawMessage := range rawMessages {
18678 rppsd, err := unmarshalBasicRecoveryPlanProviderSpecificDetails(*rawMessage)
18679 if err != nil {
18680 return nil, err
18681 }
18682 rppsdArray[index] = rppsd
18683 }
18684 return rppsdArray, nil
18685 }
18686
18687
18688 func (rppsd RecoveryPlanProviderSpecificDetails) MarshalJSON() ([]byte, error) {
18689 rppsd.InstanceType = InstanceTypeBasicRecoveryPlanProviderSpecificDetailsInstanceTypeRecoveryPlanProviderSpecificDetails
18690 objectMap := make(map[string]interface{})
18691 if rppsd.InstanceType != "" {
18692 objectMap["instanceType"] = rppsd.InstanceType
18693 }
18694 return json.Marshal(objectMap)
18695 }
18696
18697
18698 func (rppsd RecoveryPlanProviderSpecificDetails) AsRecoveryPlanA2ADetails() (*RecoveryPlanA2ADetails, bool) {
18699 return nil, false
18700 }
18701
18702
18703 func (rppsd RecoveryPlanProviderSpecificDetails) AsRecoveryPlanProviderSpecificDetails() (*RecoveryPlanProviderSpecificDetails, bool) {
18704 return &rppsd, true
18705 }
18706
18707
18708 func (rppsd RecoveryPlanProviderSpecificDetails) AsBasicRecoveryPlanProviderSpecificDetails() (BasicRecoveryPlanProviderSpecificDetails, bool) {
18709 return &rppsd, true
18710 }
18711
18712
18713 type BasicRecoveryPlanProviderSpecificFailoverInput interface {
18714 AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool)
18715 AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool)
18716 AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool)
18717 AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool)
18718 AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool)
18719 AsRecoveryPlanInMageRcmFailoverInput() (*RecoveryPlanInMageRcmFailoverInput, bool)
18720 AsRecoveryPlanProviderSpecificFailoverInput() (*RecoveryPlanProviderSpecificFailoverInput, bool)
18721 }
18722
18723
18724 type RecoveryPlanProviderSpecificFailoverInput struct {
18725
18726 InstanceType InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput `json:"instanceType,omitempty"`
18727 }
18728
18729 func unmarshalBasicRecoveryPlanProviderSpecificFailoverInput(body []byte) (BasicRecoveryPlanProviderSpecificFailoverInput, error) {
18730 var m map[string]interface{}
18731 err := json.Unmarshal(body, &m)
18732 if err != nil {
18733 return nil, err
18734 }
18735
18736 switch m["instanceType"] {
18737 case string(InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeA2A):
18738 var rpafi RecoveryPlanA2AFailoverInput
18739 err := json.Unmarshal(body, &rpafi)
18740 return rpafi, err
18741 case string(InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback):
18742 var rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput
18743 err := json.Unmarshal(body, &rphvrafi)
18744 return rphvrafi, err
18745 case string(InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure):
18746 var rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput
18747 err := json.Unmarshal(body, &rphvrafi)
18748 return rphvrafi, err
18749 case string(InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMageAzureV2):
18750 var rpimavfi RecoveryPlanInMageAzureV2FailoverInput
18751 err := json.Unmarshal(body, &rpimavfi)
18752 return rpimavfi, err
18753 case string(InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMage):
18754 var rpimfi RecoveryPlanInMageFailoverInput
18755 err := json.Unmarshal(body, &rpimfi)
18756 return rpimfi, err
18757 case string(InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMageRcm):
18758 var rpimrfi RecoveryPlanInMageRcmFailoverInput
18759 err := json.Unmarshal(body, &rpimrfi)
18760 return rpimrfi, err
18761 default:
18762 var rppsfi RecoveryPlanProviderSpecificFailoverInput
18763 err := json.Unmarshal(body, &rppsfi)
18764 return rppsfi, err
18765 }
18766 }
18767 func unmarshalBasicRecoveryPlanProviderSpecificFailoverInputArray(body []byte) ([]BasicRecoveryPlanProviderSpecificFailoverInput, error) {
18768 var rawMessages []*json.RawMessage
18769 err := json.Unmarshal(body, &rawMessages)
18770 if err != nil {
18771 return nil, err
18772 }
18773
18774 rppsfiArray := make([]BasicRecoveryPlanProviderSpecificFailoverInput, len(rawMessages))
18775
18776 for index, rawMessage := range rawMessages {
18777 rppsfi, err := unmarshalBasicRecoveryPlanProviderSpecificFailoverInput(*rawMessage)
18778 if err != nil {
18779 return nil, err
18780 }
18781 rppsfiArray[index] = rppsfi
18782 }
18783 return rppsfiArray, nil
18784 }
18785
18786
18787 func (rppsfi RecoveryPlanProviderSpecificFailoverInput) MarshalJSON() ([]byte, error) {
18788 rppsfi.InstanceType = InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeRecoveryPlanProviderSpecificFailoverInput
18789 objectMap := make(map[string]interface{})
18790 if rppsfi.InstanceType != "" {
18791 objectMap["instanceType"] = rppsfi.InstanceType
18792 }
18793 return json.Marshal(objectMap)
18794 }
18795
18796
18797 func (rppsfi RecoveryPlanProviderSpecificFailoverInput) AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) {
18798 return nil, false
18799 }
18800
18801
18802 func (rppsfi RecoveryPlanProviderSpecificFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool) {
18803 return nil, false
18804 }
18805
18806
18807 func (rppsfi RecoveryPlanProviderSpecificFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool) {
18808 return nil, false
18809 }
18810
18811
18812 func (rppsfi RecoveryPlanProviderSpecificFailoverInput) AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool) {
18813 return nil, false
18814 }
18815
18816
18817 func (rppsfi RecoveryPlanProviderSpecificFailoverInput) AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool) {
18818 return nil, false
18819 }
18820
18821
18822 func (rppsfi RecoveryPlanProviderSpecificFailoverInput) AsRecoveryPlanInMageRcmFailoverInput() (*RecoveryPlanInMageRcmFailoverInput, bool) {
18823 return nil, false
18824 }
18825
18826
18827 func (rppsfi RecoveryPlanProviderSpecificFailoverInput) AsRecoveryPlanProviderSpecificFailoverInput() (*RecoveryPlanProviderSpecificFailoverInput, bool) {
18828 return &rppsfi, true
18829 }
18830
18831
18832 func (rppsfi RecoveryPlanProviderSpecificFailoverInput) AsBasicRecoveryPlanProviderSpecificFailoverInput() (BasicRecoveryPlanProviderSpecificFailoverInput, bool) {
18833 return &rppsfi, true
18834 }
18835
18836
18837 type BasicRecoveryPlanProviderSpecificInput interface {
18838 AsRecoveryPlanA2AInput() (*RecoveryPlanA2AInput, bool)
18839 AsRecoveryPlanProviderSpecificInput() (*RecoveryPlanProviderSpecificInput, bool)
18840 }
18841
18842
18843 type RecoveryPlanProviderSpecificInput struct {
18844
18845 InstanceType InstanceTypeBasicRecoveryPlanProviderSpecificInput `json:"instanceType,omitempty"`
18846 }
18847
18848 func unmarshalBasicRecoveryPlanProviderSpecificInput(body []byte) (BasicRecoveryPlanProviderSpecificInput, error) {
18849 var m map[string]interface{}
18850 err := json.Unmarshal(body, &m)
18851 if err != nil {
18852 return nil, err
18853 }
18854
18855 switch m["instanceType"] {
18856 case string(InstanceTypeBasicRecoveryPlanProviderSpecificInputInstanceTypeA2A):
18857 var rpai RecoveryPlanA2AInput
18858 err := json.Unmarshal(body, &rpai)
18859 return rpai, err
18860 default:
18861 var rppsi RecoveryPlanProviderSpecificInput
18862 err := json.Unmarshal(body, &rppsi)
18863 return rppsi, err
18864 }
18865 }
18866 func unmarshalBasicRecoveryPlanProviderSpecificInputArray(body []byte) ([]BasicRecoveryPlanProviderSpecificInput, error) {
18867 var rawMessages []*json.RawMessage
18868 err := json.Unmarshal(body, &rawMessages)
18869 if err != nil {
18870 return nil, err
18871 }
18872
18873 rppsiArray := make([]BasicRecoveryPlanProviderSpecificInput, len(rawMessages))
18874
18875 for index, rawMessage := range rawMessages {
18876 rppsi, err := unmarshalBasicRecoveryPlanProviderSpecificInput(*rawMessage)
18877 if err != nil {
18878 return nil, err
18879 }
18880 rppsiArray[index] = rppsi
18881 }
18882 return rppsiArray, nil
18883 }
18884
18885
18886 func (rppsi RecoveryPlanProviderSpecificInput) MarshalJSON() ([]byte, error) {
18887 rppsi.InstanceType = InstanceTypeBasicRecoveryPlanProviderSpecificInputInstanceTypeRecoveryPlanProviderSpecificInput
18888 objectMap := make(map[string]interface{})
18889 if rppsi.InstanceType != "" {
18890 objectMap["instanceType"] = rppsi.InstanceType
18891 }
18892 return json.Marshal(objectMap)
18893 }
18894
18895
18896 func (rppsi RecoveryPlanProviderSpecificInput) AsRecoveryPlanA2AInput() (*RecoveryPlanA2AInput, bool) {
18897 return nil, false
18898 }
18899
18900
18901 func (rppsi RecoveryPlanProviderSpecificInput) AsRecoveryPlanProviderSpecificInput() (*RecoveryPlanProviderSpecificInput, bool) {
18902 return &rppsi, true
18903 }
18904
18905
18906 func (rppsi RecoveryPlanProviderSpecificInput) AsBasicRecoveryPlanProviderSpecificInput() (BasicRecoveryPlanProviderSpecificInput, bool) {
18907 return &rppsi, true
18908 }
18909
18910
18911 type RecoveryPlanScriptActionDetails struct {
18912
18913 Path *string `json:"path,omitempty"`
18914
18915 Timeout *string `json:"timeout,omitempty"`
18916
18917 FabricLocation RecoveryPlanActionLocation `json:"fabricLocation,omitempty"`
18918
18919 InstanceType InstanceTypeBasicRecoveryPlanActionDetails `json:"instanceType,omitempty"`
18920 }
18921
18922
18923 func (rpsad RecoveryPlanScriptActionDetails) MarshalJSON() ([]byte, error) {
18924 rpsad.InstanceType = InstanceTypeScriptActionDetails
18925 objectMap := make(map[string]interface{})
18926 if rpsad.Path != nil {
18927 objectMap["path"] = rpsad.Path
18928 }
18929 if rpsad.Timeout != nil {
18930 objectMap["timeout"] = rpsad.Timeout
18931 }
18932 if rpsad.FabricLocation != "" {
18933 objectMap["fabricLocation"] = rpsad.FabricLocation
18934 }
18935 if rpsad.InstanceType != "" {
18936 objectMap["instanceType"] = rpsad.InstanceType
18937 }
18938 return json.Marshal(objectMap)
18939 }
18940
18941
18942 func (rpsad RecoveryPlanScriptActionDetails) AsRecoveryPlanAutomationRunbookActionDetails() (*RecoveryPlanAutomationRunbookActionDetails, bool) {
18943 return nil, false
18944 }
18945
18946
18947 func (rpsad RecoveryPlanScriptActionDetails) AsRecoveryPlanManualActionDetails() (*RecoveryPlanManualActionDetails, bool) {
18948 return nil, false
18949 }
18950
18951
18952 func (rpsad RecoveryPlanScriptActionDetails) AsRecoveryPlanScriptActionDetails() (*RecoveryPlanScriptActionDetails, bool) {
18953 return &rpsad, true
18954 }
18955
18956
18957 func (rpsad RecoveryPlanScriptActionDetails) AsRecoveryPlanActionDetails() (*RecoveryPlanActionDetails, bool) {
18958 return nil, false
18959 }
18960
18961
18962 func (rpsad RecoveryPlanScriptActionDetails) AsBasicRecoveryPlanActionDetails() (BasicRecoveryPlanActionDetails, bool) {
18963 return &rpsad, true
18964 }
18965
18966
18967
18968 type RecoveryPlanShutdownGroupTaskDetails struct {
18969
18970 Name *string `json:"name,omitempty"`
18971
18972 GroupID *string `json:"groupId,omitempty"`
18973
18974 RpGroupType *string `json:"rpGroupType,omitempty"`
18975
18976 ChildTasks *[]ASRTask `json:"childTasks,omitempty"`
18977
18978 InstanceType InstanceTypeBasicGroupTaskDetails `json:"instanceType,omitempty"`
18979 }
18980
18981
18982 func (rpsgtd RecoveryPlanShutdownGroupTaskDetails) MarshalJSON() ([]byte, error) {
18983 rpsgtd.InstanceType = InstanceTypeRecoveryPlanShutdownGroupTaskDetails
18984 objectMap := make(map[string]interface{})
18985 if rpsgtd.Name != nil {
18986 objectMap["name"] = rpsgtd.Name
18987 }
18988 if rpsgtd.GroupID != nil {
18989 objectMap["groupId"] = rpsgtd.GroupID
18990 }
18991 if rpsgtd.RpGroupType != nil {
18992 objectMap["rpGroupType"] = rpsgtd.RpGroupType
18993 }
18994 if rpsgtd.ChildTasks != nil {
18995 objectMap["childTasks"] = rpsgtd.ChildTasks
18996 }
18997 if rpsgtd.InstanceType != "" {
18998 objectMap["instanceType"] = rpsgtd.InstanceType
18999 }
19000 return json.Marshal(objectMap)
19001 }
19002
19003
19004 func (rpsgtd RecoveryPlanShutdownGroupTaskDetails) AsInlineWorkflowTaskDetails() (*InlineWorkflowTaskDetails, bool) {
19005 return nil, false
19006 }
19007
19008
19009 func (rpsgtd RecoveryPlanShutdownGroupTaskDetails) AsRecoveryPlanGroupTaskDetails() (*RecoveryPlanGroupTaskDetails, bool) {
19010 return nil, false
19011 }
19012
19013
19014 func (rpsgtd RecoveryPlanShutdownGroupTaskDetails) AsRecoveryPlanShutdownGroupTaskDetails() (*RecoveryPlanShutdownGroupTaskDetails, bool) {
19015 return &rpsgtd, true
19016 }
19017
19018
19019 func (rpsgtd RecoveryPlanShutdownGroupTaskDetails) AsGroupTaskDetails() (*GroupTaskDetails, bool) {
19020 return nil, false
19021 }
19022
19023
19024 func (rpsgtd RecoveryPlanShutdownGroupTaskDetails) AsBasicGroupTaskDetails() (BasicGroupTaskDetails, bool) {
19025 return &rpsgtd, true
19026 }
19027
19028
19029 type RecoveryPlanTestFailoverCleanupInput struct {
19030
19031 Properties *RecoveryPlanTestFailoverCleanupInputProperties `json:"properties,omitempty"`
19032 }
19033
19034
19035 type RecoveryPlanTestFailoverCleanupInputProperties struct {
19036
19037 Comments *string `json:"comments,omitempty"`
19038 }
19039
19040
19041 type RecoveryPlanTestFailoverInput struct {
19042
19043 Properties *RecoveryPlanTestFailoverInputProperties `json:"properties,omitempty"`
19044 }
19045
19046
19047 type RecoveryPlanTestFailoverInputProperties struct {
19048
19049 FailoverDirection PossibleOperationsDirections `json:"failoverDirection,omitempty"`
19050
19051 NetworkType *string `json:"networkType,omitempty"`
19052
19053 NetworkID *string `json:"networkId,omitempty"`
19054
19055 SkipTestFailoverCleanup *string `json:"skipTestFailoverCleanup,omitempty"`
19056
19057 ProviderSpecificDetails *[]BasicRecoveryPlanProviderSpecificFailoverInput `json:"providerSpecificDetails,omitempty"`
19058 }
19059
19060
19061 func (rptfip *RecoveryPlanTestFailoverInputProperties) UnmarshalJSON(body []byte) error {
19062 var m map[string]*json.RawMessage
19063 err := json.Unmarshal(body, &m)
19064 if err != nil {
19065 return err
19066 }
19067 for k, v := range m {
19068 switch k {
19069 case "failoverDirection":
19070 if v != nil {
19071 var failoverDirection PossibleOperationsDirections
19072 err = json.Unmarshal(*v, &failoverDirection)
19073 if err != nil {
19074 return err
19075 }
19076 rptfip.FailoverDirection = failoverDirection
19077 }
19078 case "networkType":
19079 if v != nil {
19080 var networkType string
19081 err = json.Unmarshal(*v, &networkType)
19082 if err != nil {
19083 return err
19084 }
19085 rptfip.NetworkType = &networkType
19086 }
19087 case "networkId":
19088 if v != nil {
19089 var networkID string
19090 err = json.Unmarshal(*v, &networkID)
19091 if err != nil {
19092 return err
19093 }
19094 rptfip.NetworkID = &networkID
19095 }
19096 case "skipTestFailoverCleanup":
19097 if v != nil {
19098 var skipTestFailoverCleanup string
19099 err = json.Unmarshal(*v, &skipTestFailoverCleanup)
19100 if err != nil {
19101 return err
19102 }
19103 rptfip.SkipTestFailoverCleanup = &skipTestFailoverCleanup
19104 }
19105 case "providerSpecificDetails":
19106 if v != nil {
19107 providerSpecificDetails, err := unmarshalBasicRecoveryPlanProviderSpecificFailoverInputArray(*v)
19108 if err != nil {
19109 return err
19110 }
19111 rptfip.ProviderSpecificDetails = &providerSpecificDetails
19112 }
19113 }
19114 }
19115
19116 return nil
19117 }
19118
19119
19120 type RecoveryPlanUnplannedFailoverInput struct {
19121
19122 Properties *RecoveryPlanUnplannedFailoverInputProperties `json:"properties,omitempty"`
19123 }
19124
19125
19126 type RecoveryPlanUnplannedFailoverInputProperties struct {
19127
19128 FailoverDirection PossibleOperationsDirections `json:"failoverDirection,omitempty"`
19129
19130 SourceSiteOperations SourceSiteOperations `json:"sourceSiteOperations,omitempty"`
19131
19132 ProviderSpecificDetails *[]BasicRecoveryPlanProviderSpecificFailoverInput `json:"providerSpecificDetails,omitempty"`
19133 }
19134
19135
19136 func (rpufip *RecoveryPlanUnplannedFailoverInputProperties) UnmarshalJSON(body []byte) error {
19137 var m map[string]*json.RawMessage
19138 err := json.Unmarshal(body, &m)
19139 if err != nil {
19140 return err
19141 }
19142 for k, v := range m {
19143 switch k {
19144 case "failoverDirection":
19145 if v != nil {
19146 var failoverDirection PossibleOperationsDirections
19147 err = json.Unmarshal(*v, &failoverDirection)
19148 if err != nil {
19149 return err
19150 }
19151 rpufip.FailoverDirection = failoverDirection
19152 }
19153 case "sourceSiteOperations":
19154 if v != nil {
19155 var sourceSiteOperations SourceSiteOperations
19156 err = json.Unmarshal(*v, &sourceSiteOperations)
19157 if err != nil {
19158 return err
19159 }
19160 rpufip.SourceSiteOperations = sourceSiteOperations
19161 }
19162 case "providerSpecificDetails":
19163 if v != nil {
19164 providerSpecificDetails, err := unmarshalBasicRecoveryPlanProviderSpecificFailoverInputArray(*v)
19165 if err != nil {
19166 return err
19167 }
19168 rpufip.ProviderSpecificDetails = &providerSpecificDetails
19169 }
19170 }
19171 }
19172
19173 return nil
19174 }
19175
19176
19177 type RecoveryPoint struct {
19178 autorest.Response `json:"-"`
19179
19180 Properties *RecoveryPointProperties `json:"properties,omitempty"`
19181
19182 ID *string `json:"id,omitempty"`
19183
19184 Name *string `json:"name,omitempty"`
19185
19186 Type *string `json:"type,omitempty"`
19187
19188 Location *string `json:"location,omitempty"`
19189 }
19190
19191
19192 func (rp RecoveryPoint) MarshalJSON() ([]byte, error) {
19193 objectMap := make(map[string]interface{})
19194 if rp.Properties != nil {
19195 objectMap["properties"] = rp.Properties
19196 }
19197 if rp.Location != nil {
19198 objectMap["location"] = rp.Location
19199 }
19200 return json.Marshal(objectMap)
19201 }
19202
19203
19204 type RecoveryPointCollection struct {
19205 autorest.Response `json:"-"`
19206
19207 Value *[]RecoveryPoint `json:"value,omitempty"`
19208
19209 NextLink *string `json:"nextLink,omitempty"`
19210 }
19211
19212
19213 type RecoveryPointCollectionIterator struct {
19214 i int
19215 page RecoveryPointCollectionPage
19216 }
19217
19218
19219
19220 func (iter *RecoveryPointCollectionIterator) NextWithContext(ctx context.Context) (err error) {
19221 if tracing.IsEnabled() {
19222 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPointCollectionIterator.NextWithContext")
19223 defer func() {
19224 sc := -1
19225 if iter.Response().Response.Response != nil {
19226 sc = iter.Response().Response.Response.StatusCode
19227 }
19228 tracing.EndSpan(ctx, sc, err)
19229 }()
19230 }
19231 iter.i++
19232 if iter.i < len(iter.page.Values()) {
19233 return nil
19234 }
19235 err = iter.page.NextWithContext(ctx)
19236 if err != nil {
19237 iter.i--
19238 return err
19239 }
19240 iter.i = 0
19241 return nil
19242 }
19243
19244
19245
19246
19247 func (iter *RecoveryPointCollectionIterator) Next() error {
19248 return iter.NextWithContext(context.Background())
19249 }
19250
19251
19252 func (iter RecoveryPointCollectionIterator) NotDone() bool {
19253 return iter.page.NotDone() && iter.i < len(iter.page.Values())
19254 }
19255
19256
19257 func (iter RecoveryPointCollectionIterator) Response() RecoveryPointCollection {
19258 return iter.page.Response()
19259 }
19260
19261
19262
19263 func (iter RecoveryPointCollectionIterator) Value() RecoveryPoint {
19264 if !iter.page.NotDone() {
19265 return RecoveryPoint{}
19266 }
19267 return iter.page.Values()[iter.i]
19268 }
19269
19270
19271 func NewRecoveryPointCollectionIterator(page RecoveryPointCollectionPage) RecoveryPointCollectionIterator {
19272 return RecoveryPointCollectionIterator{page: page}
19273 }
19274
19275
19276 func (RPCVar RecoveryPointCollection) IsEmpty() bool {
19277 return RPCVar.Value == nil || len(*RPCVar.Value) == 0
19278 }
19279
19280
19281 func (RPCVar RecoveryPointCollection) hasNextLink() bool {
19282 return RPCVar.NextLink != nil && len(*RPCVar.NextLink) != 0
19283 }
19284
19285
19286
19287 func (RPCVar RecoveryPointCollection) recoveryPointCollectionPreparer(ctx context.Context) (*http.Request, error) {
19288 if !RPCVar.hasNextLink() {
19289 return nil, nil
19290 }
19291 return autorest.Prepare((&http.Request{}).WithContext(ctx),
19292 autorest.AsJSON(),
19293 autorest.AsGet(),
19294 autorest.WithBaseURL(to.String(RPCVar.NextLink)))
19295 }
19296
19297
19298 type RecoveryPointCollectionPage struct {
19299 fn func(context.Context, RecoveryPointCollection) (RecoveryPointCollection, error)
19300 RPCVar RecoveryPointCollection
19301 }
19302
19303
19304
19305 func (page *RecoveryPointCollectionPage) NextWithContext(ctx context.Context) (err error) {
19306 if tracing.IsEnabled() {
19307 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPointCollectionPage.NextWithContext")
19308 defer func() {
19309 sc := -1
19310 if page.Response().Response.Response != nil {
19311 sc = page.Response().Response.Response.StatusCode
19312 }
19313 tracing.EndSpan(ctx, sc, err)
19314 }()
19315 }
19316 for {
19317 next, err := page.fn(ctx, page.RPCVar)
19318 if err != nil {
19319 return err
19320 }
19321 page.RPCVar = next
19322 if !next.hasNextLink() || !next.IsEmpty() {
19323 break
19324 }
19325 }
19326 return nil
19327 }
19328
19329
19330
19331
19332 func (page *RecoveryPointCollectionPage) Next() error {
19333 return page.NextWithContext(context.Background())
19334 }
19335
19336
19337 func (page RecoveryPointCollectionPage) NotDone() bool {
19338 return !page.RPCVar.IsEmpty()
19339 }
19340
19341
19342 func (page RecoveryPointCollectionPage) Response() RecoveryPointCollection {
19343 return page.RPCVar
19344 }
19345
19346
19347 func (page RecoveryPointCollectionPage) Values() []RecoveryPoint {
19348 if page.RPCVar.IsEmpty() {
19349 return nil
19350 }
19351 return *page.RPCVar.Value
19352 }
19353
19354
19355 func NewRecoveryPointCollectionPage(cur RecoveryPointCollection, getNextPage func(context.Context, RecoveryPointCollection) (RecoveryPointCollection, error)) RecoveryPointCollectionPage {
19356 return RecoveryPointCollectionPage{
19357 fn: getNextPage,
19358 RPCVar: cur,
19359 }
19360 }
19361
19362
19363 type RecoveryPointProperties struct {
19364
19365 RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"`
19366
19367 RecoveryPointType *string `json:"recoveryPointType,omitempty"`
19368
19369 ProviderSpecificDetails BasicProviderSpecificRecoveryPointDetails `json:"providerSpecificDetails,omitempty"`
19370 }
19371
19372
19373 func (rpp *RecoveryPointProperties) UnmarshalJSON(body []byte) error {
19374 var m map[string]*json.RawMessage
19375 err := json.Unmarshal(body, &m)
19376 if err != nil {
19377 return err
19378 }
19379 for k, v := range m {
19380 switch k {
19381 case "recoveryPointTime":
19382 if v != nil {
19383 var recoveryPointTime date.Time
19384 err = json.Unmarshal(*v, &recoveryPointTime)
19385 if err != nil {
19386 return err
19387 }
19388 rpp.RecoveryPointTime = &recoveryPointTime
19389 }
19390 case "recoveryPointType":
19391 if v != nil {
19392 var recoveryPointType string
19393 err = json.Unmarshal(*v, &recoveryPointType)
19394 if err != nil {
19395 return err
19396 }
19397 rpp.RecoveryPointType = &recoveryPointType
19398 }
19399 case "providerSpecificDetails":
19400 if v != nil {
19401 providerSpecificDetails, err := unmarshalBasicProviderSpecificRecoveryPointDetails(*v)
19402 if err != nil {
19403 return err
19404 }
19405 rpp.ProviderSpecificDetails = providerSpecificDetails
19406 }
19407 }
19408 }
19409
19410 return nil
19411 }
19412
19413
19414 type BasicRecoveryProximityPlacementGroupCustomDetails interface {
19415 AsExistingRecoveryProximityPlacementGroup() (*ExistingRecoveryProximityPlacementGroup, bool)
19416 AsRecoveryProximityPlacementGroupCustomDetails() (*RecoveryProximityPlacementGroupCustomDetails, bool)
19417 }
19418
19419
19420 type RecoveryProximityPlacementGroupCustomDetails struct {
19421
19422 ResourceType ResourceTypeBasicRecoveryProximityPlacementGroupCustomDetails `json:"resourceType,omitempty"`
19423 }
19424
19425 func unmarshalBasicRecoveryProximityPlacementGroupCustomDetails(body []byte) (BasicRecoveryProximityPlacementGroupCustomDetails, error) {
19426 var m map[string]interface{}
19427 err := json.Unmarshal(body, &m)
19428 if err != nil {
19429 return nil, err
19430 }
19431
19432 switch m["resourceType"] {
19433 case string(ResourceTypeBasicRecoveryProximityPlacementGroupCustomDetailsResourceTypeExisting):
19434 var erppg ExistingRecoveryProximityPlacementGroup
19435 err := json.Unmarshal(body, &erppg)
19436 return erppg, err
19437 default:
19438 var rppgcd RecoveryProximityPlacementGroupCustomDetails
19439 err := json.Unmarshal(body, &rppgcd)
19440 return rppgcd, err
19441 }
19442 }
19443 func unmarshalBasicRecoveryProximityPlacementGroupCustomDetailsArray(body []byte) ([]BasicRecoveryProximityPlacementGroupCustomDetails, error) {
19444 var rawMessages []*json.RawMessage
19445 err := json.Unmarshal(body, &rawMessages)
19446 if err != nil {
19447 return nil, err
19448 }
19449
19450 rppgcdArray := make([]BasicRecoveryProximityPlacementGroupCustomDetails, len(rawMessages))
19451
19452 for index, rawMessage := range rawMessages {
19453 rppgcd, err := unmarshalBasicRecoveryProximityPlacementGroupCustomDetails(*rawMessage)
19454 if err != nil {
19455 return nil, err
19456 }
19457 rppgcdArray[index] = rppgcd
19458 }
19459 return rppgcdArray, nil
19460 }
19461
19462
19463 func (rppgcd RecoveryProximityPlacementGroupCustomDetails) MarshalJSON() ([]byte, error) {
19464 rppgcd.ResourceType = ResourceTypeBasicRecoveryProximityPlacementGroupCustomDetailsResourceTypeRecoveryProximityPlacementGroupCustomDetails
19465 objectMap := make(map[string]interface{})
19466 if rppgcd.ResourceType != "" {
19467 objectMap["resourceType"] = rppgcd.ResourceType
19468 }
19469 return json.Marshal(objectMap)
19470 }
19471
19472
19473 func (rppgcd RecoveryProximityPlacementGroupCustomDetails) AsExistingRecoveryProximityPlacementGroup() (*ExistingRecoveryProximityPlacementGroup, bool) {
19474 return nil, false
19475 }
19476
19477
19478 func (rppgcd RecoveryProximityPlacementGroupCustomDetails) AsRecoveryProximityPlacementGroupCustomDetails() (*RecoveryProximityPlacementGroupCustomDetails, bool) {
19479 return &rppgcd, true
19480 }
19481
19482
19483 func (rppgcd RecoveryProximityPlacementGroupCustomDetails) AsBasicRecoveryProximityPlacementGroupCustomDetails() (BasicRecoveryProximityPlacementGroupCustomDetails, bool) {
19484 return &rppgcd, true
19485 }
19486
19487
19488 type BasicRecoveryResourceGroupCustomDetails interface {
19489 AsExistingRecoveryRecoveryResourceGroup() (*ExistingRecoveryRecoveryResourceGroup, bool)
19490 AsRecoveryResourceGroupCustomDetails() (*RecoveryResourceGroupCustomDetails, bool)
19491 }
19492
19493
19494 type RecoveryResourceGroupCustomDetails struct {
19495
19496 ResourceType ResourceTypeBasicRecoveryResourceGroupCustomDetails `json:"resourceType,omitempty"`
19497 }
19498
19499 func unmarshalBasicRecoveryResourceGroupCustomDetails(body []byte) (BasicRecoveryResourceGroupCustomDetails, error) {
19500 var m map[string]interface{}
19501 err := json.Unmarshal(body, &m)
19502 if err != nil {
19503 return nil, err
19504 }
19505
19506 switch m["resourceType"] {
19507 case string(ResourceTypeBasicRecoveryResourceGroupCustomDetailsResourceTypeExisting):
19508 var errrg ExistingRecoveryRecoveryResourceGroup
19509 err := json.Unmarshal(body, &errrg)
19510 return errrg, err
19511 default:
19512 var rrgcd RecoveryResourceGroupCustomDetails
19513 err := json.Unmarshal(body, &rrgcd)
19514 return rrgcd, err
19515 }
19516 }
19517 func unmarshalBasicRecoveryResourceGroupCustomDetailsArray(body []byte) ([]BasicRecoveryResourceGroupCustomDetails, error) {
19518 var rawMessages []*json.RawMessage
19519 err := json.Unmarshal(body, &rawMessages)
19520 if err != nil {
19521 return nil, err
19522 }
19523
19524 rrgcdArray := make([]BasicRecoveryResourceGroupCustomDetails, len(rawMessages))
19525
19526 for index, rawMessage := range rawMessages {
19527 rrgcd, err := unmarshalBasicRecoveryResourceGroupCustomDetails(*rawMessage)
19528 if err != nil {
19529 return nil, err
19530 }
19531 rrgcdArray[index] = rrgcd
19532 }
19533 return rrgcdArray, nil
19534 }
19535
19536
19537 func (rrgcd RecoveryResourceGroupCustomDetails) MarshalJSON() ([]byte, error) {
19538 rrgcd.ResourceType = ResourceTypeBasicRecoveryResourceGroupCustomDetailsResourceTypeRecoveryResourceGroupCustomDetails
19539 objectMap := make(map[string]interface{})
19540 if rrgcd.ResourceType != "" {
19541 objectMap["resourceType"] = rrgcd.ResourceType
19542 }
19543 return json.Marshal(objectMap)
19544 }
19545
19546
19547 func (rrgcd RecoveryResourceGroupCustomDetails) AsExistingRecoveryRecoveryResourceGroup() (*ExistingRecoveryRecoveryResourceGroup, bool) {
19548 return nil, false
19549 }
19550
19551
19552 func (rrgcd RecoveryResourceGroupCustomDetails) AsRecoveryResourceGroupCustomDetails() (*RecoveryResourceGroupCustomDetails, bool) {
19553 return &rrgcd, true
19554 }
19555
19556
19557 func (rrgcd RecoveryResourceGroupCustomDetails) AsBasicRecoveryResourceGroupCustomDetails() (BasicRecoveryResourceGroupCustomDetails, bool) {
19558 return &rrgcd, true
19559 }
19560
19561
19562 type RecoveryServicesProvider struct {
19563 autorest.Response `json:"-"`
19564
19565 Properties *RecoveryServicesProviderProperties `json:"properties,omitempty"`
19566
19567 ID *string `json:"id,omitempty"`
19568
19569 Name *string `json:"name,omitempty"`
19570
19571 Type *string `json:"type,omitempty"`
19572
19573 Location *string `json:"location,omitempty"`
19574 }
19575
19576
19577 func (rsp RecoveryServicesProvider) MarshalJSON() ([]byte, error) {
19578 objectMap := make(map[string]interface{})
19579 if rsp.Properties != nil {
19580 objectMap["properties"] = rsp.Properties
19581 }
19582 if rsp.Location != nil {
19583 objectMap["location"] = rsp.Location
19584 }
19585 return json.Marshal(objectMap)
19586 }
19587
19588
19589 type RecoveryServicesProviderCollection struct {
19590 autorest.Response `json:"-"`
19591
19592 Value *[]RecoveryServicesProvider `json:"value,omitempty"`
19593
19594 NextLink *string `json:"nextLink,omitempty"`
19595 }
19596
19597
19598
19599 type RecoveryServicesProviderCollectionIterator struct {
19600 i int
19601 page RecoveryServicesProviderCollectionPage
19602 }
19603
19604
19605
19606 func (iter *RecoveryServicesProviderCollectionIterator) NextWithContext(ctx context.Context) (err error) {
19607 if tracing.IsEnabled() {
19608 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryServicesProviderCollectionIterator.NextWithContext")
19609 defer func() {
19610 sc := -1
19611 if iter.Response().Response.Response != nil {
19612 sc = iter.Response().Response.Response.StatusCode
19613 }
19614 tracing.EndSpan(ctx, sc, err)
19615 }()
19616 }
19617 iter.i++
19618 if iter.i < len(iter.page.Values()) {
19619 return nil
19620 }
19621 err = iter.page.NextWithContext(ctx)
19622 if err != nil {
19623 iter.i--
19624 return err
19625 }
19626 iter.i = 0
19627 return nil
19628 }
19629
19630
19631
19632
19633 func (iter *RecoveryServicesProviderCollectionIterator) Next() error {
19634 return iter.NextWithContext(context.Background())
19635 }
19636
19637
19638 func (iter RecoveryServicesProviderCollectionIterator) NotDone() bool {
19639 return iter.page.NotDone() && iter.i < len(iter.page.Values())
19640 }
19641
19642
19643 func (iter RecoveryServicesProviderCollectionIterator) Response() RecoveryServicesProviderCollection {
19644 return iter.page.Response()
19645 }
19646
19647
19648
19649 func (iter RecoveryServicesProviderCollectionIterator) Value() RecoveryServicesProvider {
19650 if !iter.page.NotDone() {
19651 return RecoveryServicesProvider{}
19652 }
19653 return iter.page.Values()[iter.i]
19654 }
19655
19656
19657 func NewRecoveryServicesProviderCollectionIterator(page RecoveryServicesProviderCollectionPage) RecoveryServicesProviderCollectionIterator {
19658 return RecoveryServicesProviderCollectionIterator{page: page}
19659 }
19660
19661
19662 func (rspc RecoveryServicesProviderCollection) IsEmpty() bool {
19663 return rspc.Value == nil || len(*rspc.Value) == 0
19664 }
19665
19666
19667 func (rspc RecoveryServicesProviderCollection) hasNextLink() bool {
19668 return rspc.NextLink != nil && len(*rspc.NextLink) != 0
19669 }
19670
19671
19672
19673 func (rspc RecoveryServicesProviderCollection) recoveryServicesProviderCollectionPreparer(ctx context.Context) (*http.Request, error) {
19674 if !rspc.hasNextLink() {
19675 return nil, nil
19676 }
19677 return autorest.Prepare((&http.Request{}).WithContext(ctx),
19678 autorest.AsJSON(),
19679 autorest.AsGet(),
19680 autorest.WithBaseURL(to.String(rspc.NextLink)))
19681 }
19682
19683
19684 type RecoveryServicesProviderCollectionPage struct {
19685 fn func(context.Context, RecoveryServicesProviderCollection) (RecoveryServicesProviderCollection, error)
19686 rspc RecoveryServicesProviderCollection
19687 }
19688
19689
19690
19691 func (page *RecoveryServicesProviderCollectionPage) NextWithContext(ctx context.Context) (err error) {
19692 if tracing.IsEnabled() {
19693 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryServicesProviderCollectionPage.NextWithContext")
19694 defer func() {
19695 sc := -1
19696 if page.Response().Response.Response != nil {
19697 sc = page.Response().Response.Response.StatusCode
19698 }
19699 tracing.EndSpan(ctx, sc, err)
19700 }()
19701 }
19702 for {
19703 next, err := page.fn(ctx, page.rspc)
19704 if err != nil {
19705 return err
19706 }
19707 page.rspc = next
19708 if !next.hasNextLink() || !next.IsEmpty() {
19709 break
19710 }
19711 }
19712 return nil
19713 }
19714
19715
19716
19717
19718 func (page *RecoveryServicesProviderCollectionPage) Next() error {
19719 return page.NextWithContext(context.Background())
19720 }
19721
19722
19723 func (page RecoveryServicesProviderCollectionPage) NotDone() bool {
19724 return !page.rspc.IsEmpty()
19725 }
19726
19727
19728 func (page RecoveryServicesProviderCollectionPage) Response() RecoveryServicesProviderCollection {
19729 return page.rspc
19730 }
19731
19732
19733 func (page RecoveryServicesProviderCollectionPage) Values() []RecoveryServicesProvider {
19734 if page.rspc.IsEmpty() {
19735 return nil
19736 }
19737 return *page.rspc.Value
19738 }
19739
19740
19741 func NewRecoveryServicesProviderCollectionPage(cur RecoveryServicesProviderCollection, getNextPage func(context.Context, RecoveryServicesProviderCollection) (RecoveryServicesProviderCollection, error)) RecoveryServicesProviderCollectionPage {
19742 return RecoveryServicesProviderCollectionPage{
19743 fn: getNextPage,
19744 rspc: cur,
19745 }
19746 }
19747
19748
19749 type RecoveryServicesProviderProperties struct {
19750
19751 FabricType *string `json:"fabricType,omitempty"`
19752
19753 FriendlyName *string `json:"friendlyName,omitempty"`
19754
19755 ProviderVersion *string `json:"providerVersion,omitempty"`
19756
19757 ServerVersion *string `json:"serverVersion,omitempty"`
19758
19759 ProviderVersionState *string `json:"providerVersionState,omitempty"`
19760
19761 ProviderVersionExpiryDate *date.Time `json:"providerVersionExpiryDate,omitempty"`
19762
19763 FabricFriendlyName *string `json:"fabricFriendlyName,omitempty"`
19764
19765 LastHeartBeat *date.Time `json:"lastHeartBeat,omitempty"`
19766
19767 ConnectionStatus *string `json:"connectionStatus,omitempty"`
19768
19769 ProtectedItemCount *int32 `json:"protectedItemCount,omitempty"`
19770
19771 AllowedScenarios *[]string `json:"allowedScenarios,omitempty"`
19772
19773 HealthErrorDetails *[]HealthError `json:"healthErrorDetails,omitempty"`
19774
19775 DraIdentifier *string `json:"draIdentifier,omitempty"`
19776
19777 AuthenticationIdentityDetails *IdentityProviderDetails `json:"authenticationIdentityDetails,omitempty"`
19778
19779 ResourceAccessIdentityDetails *IdentityProviderDetails `json:"resourceAccessIdentityDetails,omitempty"`
19780
19781 ProviderVersionDetails *VersionDetails `json:"providerVersionDetails,omitempty"`
19782 }
19783
19784
19785 type BasicRecoveryVirtualNetworkCustomDetails interface {
19786 AsExistingRecoveryVirtualNetwork() (*ExistingRecoveryVirtualNetwork, bool)
19787 AsRecoveryVirtualNetworkCustomDetails() (*RecoveryVirtualNetworkCustomDetails, bool)
19788 }
19789
19790
19791 type RecoveryVirtualNetworkCustomDetails struct {
19792
19793 ResourceType ResourceTypeBasicRecoveryVirtualNetworkCustomDetails `json:"resourceType,omitempty"`
19794 }
19795
19796 func unmarshalBasicRecoveryVirtualNetworkCustomDetails(body []byte) (BasicRecoveryVirtualNetworkCustomDetails, error) {
19797 var m map[string]interface{}
19798 err := json.Unmarshal(body, &m)
19799 if err != nil {
19800 return nil, err
19801 }
19802
19803 switch m["resourceType"] {
19804 case string(ResourceTypeBasicRecoveryVirtualNetworkCustomDetailsResourceTypeExisting):
19805 var ervn ExistingRecoveryVirtualNetwork
19806 err := json.Unmarshal(body, &ervn)
19807 return ervn, err
19808 default:
19809 var rvncd RecoveryVirtualNetworkCustomDetails
19810 err := json.Unmarshal(body, &rvncd)
19811 return rvncd, err
19812 }
19813 }
19814 func unmarshalBasicRecoveryVirtualNetworkCustomDetailsArray(body []byte) ([]BasicRecoveryVirtualNetworkCustomDetails, error) {
19815 var rawMessages []*json.RawMessage
19816 err := json.Unmarshal(body, &rawMessages)
19817 if err != nil {
19818 return nil, err
19819 }
19820
19821 rvncdArray := make([]BasicRecoveryVirtualNetworkCustomDetails, len(rawMessages))
19822
19823 for index, rawMessage := range rawMessages {
19824 rvncd, err := unmarshalBasicRecoveryVirtualNetworkCustomDetails(*rawMessage)
19825 if err != nil {
19826 return nil, err
19827 }
19828 rvncdArray[index] = rvncd
19829 }
19830 return rvncdArray, nil
19831 }
19832
19833
19834 func (rvncd RecoveryVirtualNetworkCustomDetails) MarshalJSON() ([]byte, error) {
19835 rvncd.ResourceType = ResourceTypeBasicRecoveryVirtualNetworkCustomDetailsResourceTypeRecoveryVirtualNetworkCustomDetails
19836 objectMap := make(map[string]interface{})
19837 if rvncd.ResourceType != "" {
19838 objectMap["resourceType"] = rvncd.ResourceType
19839 }
19840 return json.Marshal(objectMap)
19841 }
19842
19843
19844 func (rvncd RecoveryVirtualNetworkCustomDetails) AsExistingRecoveryVirtualNetwork() (*ExistingRecoveryVirtualNetwork, bool) {
19845 return nil, false
19846 }
19847
19848
19849 func (rvncd RecoveryVirtualNetworkCustomDetails) AsRecoveryVirtualNetworkCustomDetails() (*RecoveryVirtualNetworkCustomDetails, bool) {
19850 return &rvncd, true
19851 }
19852
19853
19854 func (rvncd RecoveryVirtualNetworkCustomDetails) AsBasicRecoveryVirtualNetworkCustomDetails() (BasicRecoveryVirtualNetworkCustomDetails, bool) {
19855 return &rvncd, true
19856 }
19857
19858
19859 type RemoveDisksInput struct {
19860
19861 Properties *RemoveDisksInputProperties `json:"properties,omitempty"`
19862 }
19863
19864
19865 type RemoveDisksInputProperties struct {
19866
19867 ProviderSpecificDetails BasicRemoveDisksProviderSpecificInput `json:"providerSpecificDetails,omitempty"`
19868 }
19869
19870
19871 func (rdip *RemoveDisksInputProperties) 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 "providerSpecificDetails":
19880 if v != nil {
19881 providerSpecificDetails, err := unmarshalBasicRemoveDisksProviderSpecificInput(*v)
19882 if err != nil {
19883 return err
19884 }
19885 rdip.ProviderSpecificDetails = providerSpecificDetails
19886 }
19887 }
19888 }
19889
19890 return nil
19891 }
19892
19893
19894 type BasicRemoveDisksProviderSpecificInput interface {
19895 AsA2ARemoveDisksInput() (*A2ARemoveDisksInput, bool)
19896 AsRemoveDisksProviderSpecificInput() (*RemoveDisksProviderSpecificInput, bool)
19897 }
19898
19899
19900 type RemoveDisksProviderSpecificInput struct {
19901
19902 InstanceType InstanceTypeBasicRemoveDisksProviderSpecificInput `json:"instanceType,omitempty"`
19903 }
19904
19905 func unmarshalBasicRemoveDisksProviderSpecificInput(body []byte) (BasicRemoveDisksProviderSpecificInput, error) {
19906 var m map[string]interface{}
19907 err := json.Unmarshal(body, &m)
19908 if err != nil {
19909 return nil, err
19910 }
19911
19912 switch m["instanceType"] {
19913 case string(InstanceTypeBasicRemoveDisksProviderSpecificInputInstanceTypeA2A):
19914 var ardi A2ARemoveDisksInput
19915 err := json.Unmarshal(body, &ardi)
19916 return ardi, err
19917 default:
19918 var rdpsi RemoveDisksProviderSpecificInput
19919 err := json.Unmarshal(body, &rdpsi)
19920 return rdpsi, err
19921 }
19922 }
19923 func unmarshalBasicRemoveDisksProviderSpecificInputArray(body []byte) ([]BasicRemoveDisksProviderSpecificInput, error) {
19924 var rawMessages []*json.RawMessage
19925 err := json.Unmarshal(body, &rawMessages)
19926 if err != nil {
19927 return nil, err
19928 }
19929
19930 rdpsiArray := make([]BasicRemoveDisksProviderSpecificInput, len(rawMessages))
19931
19932 for index, rawMessage := range rawMessages {
19933 rdpsi, err := unmarshalBasicRemoveDisksProviderSpecificInput(*rawMessage)
19934 if err != nil {
19935 return nil, err
19936 }
19937 rdpsiArray[index] = rdpsi
19938 }
19939 return rdpsiArray, nil
19940 }
19941
19942
19943 func (rdpsi RemoveDisksProviderSpecificInput) MarshalJSON() ([]byte, error) {
19944 rdpsi.InstanceType = InstanceTypeBasicRemoveDisksProviderSpecificInputInstanceTypeRemoveDisksProviderSpecificInput
19945 objectMap := make(map[string]interface{})
19946 if rdpsi.InstanceType != "" {
19947 objectMap["instanceType"] = rdpsi.InstanceType
19948 }
19949 return json.Marshal(objectMap)
19950 }
19951
19952
19953 func (rdpsi RemoveDisksProviderSpecificInput) AsA2ARemoveDisksInput() (*A2ARemoveDisksInput, bool) {
19954 return nil, false
19955 }
19956
19957
19958 func (rdpsi RemoveDisksProviderSpecificInput) AsRemoveDisksProviderSpecificInput() (*RemoveDisksProviderSpecificInput, bool) {
19959 return &rdpsi, true
19960 }
19961
19962
19963 func (rdpsi RemoveDisksProviderSpecificInput) AsBasicRemoveDisksProviderSpecificInput() (BasicRemoveDisksProviderSpecificInput, bool) {
19964 return &rdpsi, true
19965 }
19966
19967
19968 type RemoveProtectionContainerMappingInput struct {
19969
19970 Properties *RemoveProtectionContainerMappingInputProperties `json:"properties,omitempty"`
19971 }
19972
19973
19974 type RemoveProtectionContainerMappingInputProperties struct {
19975
19976 ProviderSpecificInput *ReplicationProviderContainerUnmappingInput `json:"providerSpecificInput,omitempty"`
19977 }
19978
19979
19980 type RenewCertificateInput struct {
19981
19982 Properties *RenewCertificateInputProperties `json:"properties,omitempty"`
19983 }
19984
19985
19986 type RenewCertificateInputProperties struct {
19987
19988 RenewCertificateType *string `json:"renewCertificateType,omitempty"`
19989 }
19990
19991
19992 type ReplicationAgentDetails struct {
19993
19994 ID *string `json:"id,omitempty"`
19995
19996 Name *string `json:"name,omitempty"`
19997
19998 Version *string `json:"version,omitempty"`
19999
20000 LastHeartbeatUtc *date.Time `json:"lastHeartbeatUtc,omitempty"`
20001
20002 Health ProtectionHealth `json:"health,omitempty"`
20003
20004 HealthErrors *[]HealthError `json:"healthErrors,omitempty"`
20005 }
20006
20007
20008 func (rad ReplicationAgentDetails) MarshalJSON() ([]byte, error) {
20009 objectMap := make(map[string]interface{})
20010 return json.Marshal(objectMap)
20011 }
20012
20013
20014 type ReplicationEligibilityResults struct {
20015 autorest.Response `json:"-"`
20016
20017 Name *string `json:"name,omitempty"`
20018
20019 Type *string `json:"type,omitempty"`
20020
20021 ID *string `json:"id,omitempty"`
20022
20023 Properties *ReplicationEligibilityResultsProperties `json:"properties,omitempty"`
20024 }
20025
20026
20027 func (rer ReplicationEligibilityResults) MarshalJSON() ([]byte, error) {
20028 objectMap := make(map[string]interface{})
20029 return json.Marshal(objectMap)
20030 }
20031
20032
20033 type ReplicationEligibilityResultsCollection struct {
20034 autorest.Response `json:"-"`
20035
20036 Value *[]ReplicationEligibilityResults `json:"value,omitempty"`
20037 }
20038
20039
20040 type ReplicationEligibilityResultsErrorInfo struct {
20041
20042 Code *string `json:"code,omitempty"`
20043
20044 Message *string `json:"message,omitempty"`
20045
20046 PossibleCauses *string `json:"possibleCauses,omitempty"`
20047
20048 RecommendedAction *string `json:"recommendedAction,omitempty"`
20049
20050 Status *string `json:"status,omitempty"`
20051 }
20052
20053
20054 func (rerei ReplicationEligibilityResultsErrorInfo) MarshalJSON() ([]byte, error) {
20055 objectMap := make(map[string]interface{})
20056 return json.Marshal(objectMap)
20057 }
20058
20059
20060 type ReplicationEligibilityResultsProperties struct {
20061
20062 ClientRequestID *string `json:"clientRequestId,omitempty"`
20063
20064 Errors *[]ReplicationEligibilityResultsErrorInfo `json:"errors,omitempty"`
20065 }
20066
20067
20068 func (rerp ReplicationEligibilityResultsProperties) MarshalJSON() ([]byte, error) {
20069 objectMap := make(map[string]interface{})
20070 if rerp.Errors != nil {
20071 objectMap["errors"] = rerp.Errors
20072 }
20073 return json.Marshal(objectMap)
20074 }
20075
20076
20077
20078 type ReplicationFabricsCheckConsistencyFuture struct {
20079 azure.FutureAPI
20080
20081
20082 Result func(ReplicationFabricsClient) (Fabric, error)
20083 }
20084
20085
20086 func (future *ReplicationFabricsCheckConsistencyFuture) UnmarshalJSON(body []byte) error {
20087 var azFuture azure.Future
20088 if err := json.Unmarshal(body, &azFuture); err != nil {
20089 return err
20090 }
20091 future.FutureAPI = &azFuture
20092 future.Result = future.result
20093 return nil
20094 }
20095
20096
20097 func (future *ReplicationFabricsCheckConsistencyFuture) result(client ReplicationFabricsClient) (f Fabric, err error) {
20098 var done bool
20099 done, err = future.DoneWithContext(context.Background(), client)
20100 if err != nil {
20101 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsCheckConsistencyFuture", "Result", future.Response(), "Polling failure")
20102 return
20103 }
20104 if !done {
20105 f.Response.Response = future.Response()
20106 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsCheckConsistencyFuture")
20107 return
20108 }
20109 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20110 if f.Response.Response, err = future.GetResult(sender); err == nil && f.Response.Response.StatusCode != http.StatusNoContent {
20111 f, err = client.CheckConsistencyResponder(f.Response.Response)
20112 if err != nil {
20113 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsCheckConsistencyFuture", "Result", f.Response.Response, "Failure responding to request")
20114 }
20115 }
20116 return
20117 }
20118
20119
20120
20121 type ReplicationFabricsCreateFuture struct {
20122 azure.FutureAPI
20123
20124
20125 Result func(ReplicationFabricsClient) (Fabric, error)
20126 }
20127
20128
20129 func (future *ReplicationFabricsCreateFuture) UnmarshalJSON(body []byte) error {
20130 var azFuture azure.Future
20131 if err := json.Unmarshal(body, &azFuture); err != nil {
20132 return err
20133 }
20134 future.FutureAPI = &azFuture
20135 future.Result = future.result
20136 return nil
20137 }
20138
20139
20140 func (future *ReplicationFabricsCreateFuture) result(client ReplicationFabricsClient) (f Fabric, err error) {
20141 var done bool
20142 done, err = future.DoneWithContext(context.Background(), client)
20143 if err != nil {
20144 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsCreateFuture", "Result", future.Response(), "Polling failure")
20145 return
20146 }
20147 if !done {
20148 f.Response.Response = future.Response()
20149 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsCreateFuture")
20150 return
20151 }
20152 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20153 if f.Response.Response, err = future.GetResult(sender); err == nil && f.Response.Response.StatusCode != http.StatusNoContent {
20154 f, err = client.CreateResponder(f.Response.Response)
20155 if err != nil {
20156 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsCreateFuture", "Result", f.Response.Response, "Failure responding to request")
20157 }
20158 }
20159 return
20160 }
20161
20162
20163
20164 type ReplicationFabricsDeleteFuture struct {
20165 azure.FutureAPI
20166
20167
20168 Result func(ReplicationFabricsClient) (autorest.Response, error)
20169 }
20170
20171
20172 func (future *ReplicationFabricsDeleteFuture) UnmarshalJSON(body []byte) error {
20173 var azFuture azure.Future
20174 if err := json.Unmarshal(body, &azFuture); err != nil {
20175 return err
20176 }
20177 future.FutureAPI = &azFuture
20178 future.Result = future.result
20179 return nil
20180 }
20181
20182
20183 func (future *ReplicationFabricsDeleteFuture) result(client ReplicationFabricsClient) (ar autorest.Response, err error) {
20184 var done bool
20185 done, err = future.DoneWithContext(context.Background(), client)
20186 if err != nil {
20187 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsDeleteFuture", "Result", future.Response(), "Polling failure")
20188 return
20189 }
20190 if !done {
20191 ar.Response = future.Response()
20192 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsDeleteFuture")
20193 return
20194 }
20195 ar.Response = future.Response()
20196 return
20197 }
20198
20199
20200
20201 type ReplicationFabricsMigrateToAadFuture struct {
20202 azure.FutureAPI
20203
20204
20205 Result func(ReplicationFabricsClient) (autorest.Response, error)
20206 }
20207
20208
20209 func (future *ReplicationFabricsMigrateToAadFuture) UnmarshalJSON(body []byte) error {
20210 var azFuture azure.Future
20211 if err := json.Unmarshal(body, &azFuture); err != nil {
20212 return err
20213 }
20214 future.FutureAPI = &azFuture
20215 future.Result = future.result
20216 return nil
20217 }
20218
20219
20220 func (future *ReplicationFabricsMigrateToAadFuture) result(client ReplicationFabricsClient) (ar autorest.Response, err error) {
20221 var done bool
20222 done, err = future.DoneWithContext(context.Background(), client)
20223 if err != nil {
20224 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsMigrateToAadFuture", "Result", future.Response(), "Polling failure")
20225 return
20226 }
20227 if !done {
20228 ar.Response = future.Response()
20229 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsMigrateToAadFuture")
20230 return
20231 }
20232 ar.Response = future.Response()
20233 return
20234 }
20235
20236
20237
20238 type ReplicationFabricsPurgeFuture struct {
20239 azure.FutureAPI
20240
20241
20242 Result func(ReplicationFabricsClient) (autorest.Response, error)
20243 }
20244
20245
20246 func (future *ReplicationFabricsPurgeFuture) UnmarshalJSON(body []byte) error {
20247 var azFuture azure.Future
20248 if err := json.Unmarshal(body, &azFuture); err != nil {
20249 return err
20250 }
20251 future.FutureAPI = &azFuture
20252 future.Result = future.result
20253 return nil
20254 }
20255
20256
20257 func (future *ReplicationFabricsPurgeFuture) result(client ReplicationFabricsClient) (ar autorest.Response, err error) {
20258 var done bool
20259 done, err = future.DoneWithContext(context.Background(), client)
20260 if err != nil {
20261 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsPurgeFuture", "Result", future.Response(), "Polling failure")
20262 return
20263 }
20264 if !done {
20265 ar.Response = future.Response()
20266 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsPurgeFuture")
20267 return
20268 }
20269 ar.Response = future.Response()
20270 return
20271 }
20272
20273
20274
20275 type ReplicationFabricsReassociateGatewayFuture struct {
20276 azure.FutureAPI
20277
20278
20279 Result func(ReplicationFabricsClient) (Fabric, error)
20280 }
20281
20282
20283 func (future *ReplicationFabricsReassociateGatewayFuture) UnmarshalJSON(body []byte) error {
20284 var azFuture azure.Future
20285 if err := json.Unmarshal(body, &azFuture); err != nil {
20286 return err
20287 }
20288 future.FutureAPI = &azFuture
20289 future.Result = future.result
20290 return nil
20291 }
20292
20293
20294 func (future *ReplicationFabricsReassociateGatewayFuture) result(client ReplicationFabricsClient) (f Fabric, err error) {
20295 var done bool
20296 done, err = future.DoneWithContext(context.Background(), client)
20297 if err != nil {
20298 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsReassociateGatewayFuture", "Result", future.Response(), "Polling failure")
20299 return
20300 }
20301 if !done {
20302 f.Response.Response = future.Response()
20303 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsReassociateGatewayFuture")
20304 return
20305 }
20306 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20307 if f.Response.Response, err = future.GetResult(sender); err == nil && f.Response.Response.StatusCode != http.StatusNoContent {
20308 f, err = client.ReassociateGatewayResponder(f.Response.Response)
20309 if err != nil {
20310 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsReassociateGatewayFuture", "Result", f.Response.Response, "Failure responding to request")
20311 }
20312 }
20313 return
20314 }
20315
20316
20317
20318 type ReplicationFabricsRenewCertificateFuture struct {
20319 azure.FutureAPI
20320
20321
20322 Result func(ReplicationFabricsClient) (Fabric, error)
20323 }
20324
20325
20326 func (future *ReplicationFabricsRenewCertificateFuture) UnmarshalJSON(body []byte) error {
20327 var azFuture azure.Future
20328 if err := json.Unmarshal(body, &azFuture); err != nil {
20329 return err
20330 }
20331 future.FutureAPI = &azFuture
20332 future.Result = future.result
20333 return nil
20334 }
20335
20336
20337 func (future *ReplicationFabricsRenewCertificateFuture) result(client ReplicationFabricsClient) (f Fabric, err error) {
20338 var done bool
20339 done, err = future.DoneWithContext(context.Background(), client)
20340 if err != nil {
20341 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsRenewCertificateFuture", "Result", future.Response(), "Polling failure")
20342 return
20343 }
20344 if !done {
20345 f.Response.Response = future.Response()
20346 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsRenewCertificateFuture")
20347 return
20348 }
20349 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20350 if f.Response.Response, err = future.GetResult(sender); err == nil && f.Response.Response.StatusCode != http.StatusNoContent {
20351 f, err = client.RenewCertificateResponder(f.Response.Response)
20352 if err != nil {
20353 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsRenewCertificateFuture", "Result", f.Response.Response, "Failure responding to request")
20354 }
20355 }
20356 return
20357 }
20358
20359
20360 type ReplicationGroupDetails struct {
20361
20362 InstanceType InstanceTypeBasicConfigurationSettings `json:"instanceType,omitempty"`
20363 }
20364
20365
20366 func (rgd ReplicationGroupDetails) MarshalJSON() ([]byte, error) {
20367 rgd.InstanceType = InstanceTypeReplicationGroupDetails
20368 objectMap := make(map[string]interface{})
20369 if rgd.InstanceType != "" {
20370 objectMap["instanceType"] = rgd.InstanceType
20371 }
20372 return json.Marshal(objectMap)
20373 }
20374
20375
20376 func (rgd ReplicationGroupDetails) AsHyperVVirtualMachineDetails() (*HyperVVirtualMachineDetails, bool) {
20377 return nil, false
20378 }
20379
20380
20381 func (rgd ReplicationGroupDetails) AsReplicationGroupDetails() (*ReplicationGroupDetails, bool) {
20382 return &rgd, true
20383 }
20384
20385
20386 func (rgd ReplicationGroupDetails) AsVmmVirtualMachineDetails() (*VmmVirtualMachineDetails, bool) {
20387 return nil, false
20388 }
20389
20390
20391 func (rgd ReplicationGroupDetails) AsVMwareVirtualMachineDetails() (*VMwareVirtualMachineDetails, bool) {
20392 return nil, false
20393 }
20394
20395
20396 func (rgd ReplicationGroupDetails) AsConfigurationSettings() (*ConfigurationSettings, bool) {
20397 return nil, false
20398 }
20399
20400
20401 func (rgd ReplicationGroupDetails) AsBasicConfigurationSettings() (BasicConfigurationSettings, bool) {
20402 return &rgd, true
20403 }
20404
20405
20406
20407 type ReplicationJobsCancelFuture struct {
20408 azure.FutureAPI
20409
20410
20411 Result func(ReplicationJobsClient) (Job, error)
20412 }
20413
20414
20415 func (future *ReplicationJobsCancelFuture) UnmarshalJSON(body []byte) error {
20416 var azFuture azure.Future
20417 if err := json.Unmarshal(body, &azFuture); err != nil {
20418 return err
20419 }
20420 future.FutureAPI = &azFuture
20421 future.Result = future.result
20422 return nil
20423 }
20424
20425
20426 func (future *ReplicationJobsCancelFuture) result(client ReplicationJobsClient) (j Job, err error) {
20427 var done bool
20428 done, err = future.DoneWithContext(context.Background(), client)
20429 if err != nil {
20430 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsCancelFuture", "Result", future.Response(), "Polling failure")
20431 return
20432 }
20433 if !done {
20434 j.Response.Response = future.Response()
20435 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationJobsCancelFuture")
20436 return
20437 }
20438 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20439 if j.Response.Response, err = future.GetResult(sender); err == nil && j.Response.Response.StatusCode != http.StatusNoContent {
20440 j, err = client.CancelResponder(j.Response.Response)
20441 if err != nil {
20442 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsCancelFuture", "Result", j.Response.Response, "Failure responding to request")
20443 }
20444 }
20445 return
20446 }
20447
20448
20449
20450 type ReplicationJobsExportFuture struct {
20451 azure.FutureAPI
20452
20453
20454 Result func(ReplicationJobsClient) (Job, error)
20455 }
20456
20457
20458 func (future *ReplicationJobsExportFuture) UnmarshalJSON(body []byte) error {
20459 var azFuture azure.Future
20460 if err := json.Unmarshal(body, &azFuture); err != nil {
20461 return err
20462 }
20463 future.FutureAPI = &azFuture
20464 future.Result = future.result
20465 return nil
20466 }
20467
20468
20469 func (future *ReplicationJobsExportFuture) result(client ReplicationJobsClient) (j Job, err error) {
20470 var done bool
20471 done, err = future.DoneWithContext(context.Background(), client)
20472 if err != nil {
20473 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsExportFuture", "Result", future.Response(), "Polling failure")
20474 return
20475 }
20476 if !done {
20477 j.Response.Response = future.Response()
20478 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationJobsExportFuture")
20479 return
20480 }
20481 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20482 if j.Response.Response, err = future.GetResult(sender); err == nil && j.Response.Response.StatusCode != http.StatusNoContent {
20483 j, err = client.ExportResponder(j.Response.Response)
20484 if err != nil {
20485 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsExportFuture", "Result", j.Response.Response, "Failure responding to request")
20486 }
20487 }
20488 return
20489 }
20490
20491
20492
20493 type ReplicationJobsRestartFuture struct {
20494 azure.FutureAPI
20495
20496
20497 Result func(ReplicationJobsClient) (Job, error)
20498 }
20499
20500
20501 func (future *ReplicationJobsRestartFuture) UnmarshalJSON(body []byte) error {
20502 var azFuture azure.Future
20503 if err := json.Unmarshal(body, &azFuture); err != nil {
20504 return err
20505 }
20506 future.FutureAPI = &azFuture
20507 future.Result = future.result
20508 return nil
20509 }
20510
20511
20512 func (future *ReplicationJobsRestartFuture) result(client ReplicationJobsClient) (j Job, err error) {
20513 var done bool
20514 done, err = future.DoneWithContext(context.Background(), client)
20515 if err != nil {
20516 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsRestartFuture", "Result", future.Response(), "Polling failure")
20517 return
20518 }
20519 if !done {
20520 j.Response.Response = future.Response()
20521 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationJobsRestartFuture")
20522 return
20523 }
20524 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20525 if j.Response.Response, err = future.GetResult(sender); err == nil && j.Response.Response.StatusCode != http.StatusNoContent {
20526 j, err = client.RestartResponder(j.Response.Response)
20527 if err != nil {
20528 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsRestartFuture", "Result", j.Response.Response, "Failure responding to request")
20529 }
20530 }
20531 return
20532 }
20533
20534
20535
20536 type ReplicationJobsResumeFuture struct {
20537 azure.FutureAPI
20538
20539
20540 Result func(ReplicationJobsClient) (Job, error)
20541 }
20542
20543
20544 func (future *ReplicationJobsResumeFuture) UnmarshalJSON(body []byte) error {
20545 var azFuture azure.Future
20546 if err := json.Unmarshal(body, &azFuture); err != nil {
20547 return err
20548 }
20549 future.FutureAPI = &azFuture
20550 future.Result = future.result
20551 return nil
20552 }
20553
20554
20555 func (future *ReplicationJobsResumeFuture) result(client ReplicationJobsClient) (j Job, err error) {
20556 var done bool
20557 done, err = future.DoneWithContext(context.Background(), client)
20558 if err != nil {
20559 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsResumeFuture", "Result", future.Response(), "Polling failure")
20560 return
20561 }
20562 if !done {
20563 j.Response.Response = future.Response()
20564 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationJobsResumeFuture")
20565 return
20566 }
20567 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20568 if j.Response.Response, err = future.GetResult(sender); err == nil && j.Response.Response.StatusCode != http.StatusNoContent {
20569 j, err = client.ResumeResponder(j.Response.Response)
20570 if err != nil {
20571 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsResumeFuture", "Result", j.Response.Response, "Failure responding to request")
20572 }
20573 }
20574 return
20575 }
20576
20577
20578
20579 type ReplicationMigrationItemsCreateFuture struct {
20580 azure.FutureAPI
20581
20582
20583 Result func(ReplicationMigrationItemsClient) (MigrationItem, error)
20584 }
20585
20586
20587 func (future *ReplicationMigrationItemsCreateFuture) UnmarshalJSON(body []byte) error {
20588 var azFuture azure.Future
20589 if err := json.Unmarshal(body, &azFuture); err != nil {
20590 return err
20591 }
20592 future.FutureAPI = &azFuture
20593 future.Result = future.result
20594 return nil
20595 }
20596
20597
20598 func (future *ReplicationMigrationItemsCreateFuture) result(client ReplicationMigrationItemsClient) (mi MigrationItem, err error) {
20599 var done bool
20600 done, err = future.DoneWithContext(context.Background(), client)
20601 if err != nil {
20602 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsCreateFuture", "Result", future.Response(), "Polling failure")
20603 return
20604 }
20605 if !done {
20606 mi.Response.Response = future.Response()
20607 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationMigrationItemsCreateFuture")
20608 return
20609 }
20610 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20611 if mi.Response.Response, err = future.GetResult(sender); err == nil && mi.Response.Response.StatusCode != http.StatusNoContent {
20612 mi, err = client.CreateResponder(mi.Response.Response)
20613 if err != nil {
20614 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsCreateFuture", "Result", mi.Response.Response, "Failure responding to request")
20615 }
20616 }
20617 return
20618 }
20619
20620
20621
20622 type ReplicationMigrationItemsDeleteFuture struct {
20623 azure.FutureAPI
20624
20625
20626 Result func(ReplicationMigrationItemsClient) (autorest.Response, error)
20627 }
20628
20629
20630 func (future *ReplicationMigrationItemsDeleteFuture) UnmarshalJSON(body []byte) error {
20631 var azFuture azure.Future
20632 if err := json.Unmarshal(body, &azFuture); err != nil {
20633 return err
20634 }
20635 future.FutureAPI = &azFuture
20636 future.Result = future.result
20637 return nil
20638 }
20639
20640
20641 func (future *ReplicationMigrationItemsDeleteFuture) result(client ReplicationMigrationItemsClient) (ar autorest.Response, err error) {
20642 var done bool
20643 done, err = future.DoneWithContext(context.Background(), client)
20644 if err != nil {
20645 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsDeleteFuture", "Result", future.Response(), "Polling failure")
20646 return
20647 }
20648 if !done {
20649 ar.Response = future.Response()
20650 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationMigrationItemsDeleteFuture")
20651 return
20652 }
20653 ar.Response = future.Response()
20654 return
20655 }
20656
20657
20658
20659 type ReplicationMigrationItemsMigrateFuture struct {
20660 azure.FutureAPI
20661
20662
20663 Result func(ReplicationMigrationItemsClient) (MigrationItem, error)
20664 }
20665
20666
20667 func (future *ReplicationMigrationItemsMigrateFuture) UnmarshalJSON(body []byte) error {
20668 var azFuture azure.Future
20669 if err := json.Unmarshal(body, &azFuture); err != nil {
20670 return err
20671 }
20672 future.FutureAPI = &azFuture
20673 future.Result = future.result
20674 return nil
20675 }
20676
20677
20678 func (future *ReplicationMigrationItemsMigrateFuture) result(client ReplicationMigrationItemsClient) (mi MigrationItem, err error) {
20679 var done bool
20680 done, err = future.DoneWithContext(context.Background(), client)
20681 if err != nil {
20682 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsMigrateFuture", "Result", future.Response(), "Polling failure")
20683 return
20684 }
20685 if !done {
20686 mi.Response.Response = future.Response()
20687 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationMigrationItemsMigrateFuture")
20688 return
20689 }
20690 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20691 if mi.Response.Response, err = future.GetResult(sender); err == nil && mi.Response.Response.StatusCode != http.StatusNoContent {
20692 mi, err = client.MigrateResponder(mi.Response.Response)
20693 if err != nil {
20694 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsMigrateFuture", "Result", mi.Response.Response, "Failure responding to request")
20695 }
20696 }
20697 return
20698 }
20699
20700
20701
20702 type ReplicationMigrationItemsTestMigrateCleanupFuture struct {
20703 azure.FutureAPI
20704
20705
20706 Result func(ReplicationMigrationItemsClient) (MigrationItem, error)
20707 }
20708
20709
20710 func (future *ReplicationMigrationItemsTestMigrateCleanupFuture) UnmarshalJSON(body []byte) error {
20711 var azFuture azure.Future
20712 if err := json.Unmarshal(body, &azFuture); err != nil {
20713 return err
20714 }
20715 future.FutureAPI = &azFuture
20716 future.Result = future.result
20717 return nil
20718 }
20719
20720
20721 func (future *ReplicationMigrationItemsTestMigrateCleanupFuture) result(client ReplicationMigrationItemsClient) (mi MigrationItem, err error) {
20722 var done bool
20723 done, err = future.DoneWithContext(context.Background(), client)
20724 if err != nil {
20725 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsTestMigrateCleanupFuture", "Result", future.Response(), "Polling failure")
20726 return
20727 }
20728 if !done {
20729 mi.Response.Response = future.Response()
20730 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationMigrationItemsTestMigrateCleanupFuture")
20731 return
20732 }
20733 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20734 if mi.Response.Response, err = future.GetResult(sender); err == nil && mi.Response.Response.StatusCode != http.StatusNoContent {
20735 mi, err = client.TestMigrateCleanupResponder(mi.Response.Response)
20736 if err != nil {
20737 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsTestMigrateCleanupFuture", "Result", mi.Response.Response, "Failure responding to request")
20738 }
20739 }
20740 return
20741 }
20742
20743
20744
20745 type ReplicationMigrationItemsTestMigrateFuture struct {
20746 azure.FutureAPI
20747
20748
20749 Result func(ReplicationMigrationItemsClient) (MigrationItem, error)
20750 }
20751
20752
20753 func (future *ReplicationMigrationItemsTestMigrateFuture) UnmarshalJSON(body []byte) error {
20754 var azFuture azure.Future
20755 if err := json.Unmarshal(body, &azFuture); err != nil {
20756 return err
20757 }
20758 future.FutureAPI = &azFuture
20759 future.Result = future.result
20760 return nil
20761 }
20762
20763
20764 func (future *ReplicationMigrationItemsTestMigrateFuture) result(client ReplicationMigrationItemsClient) (mi MigrationItem, err error) {
20765 var done bool
20766 done, err = future.DoneWithContext(context.Background(), client)
20767 if err != nil {
20768 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsTestMigrateFuture", "Result", future.Response(), "Polling failure")
20769 return
20770 }
20771 if !done {
20772 mi.Response.Response = future.Response()
20773 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationMigrationItemsTestMigrateFuture")
20774 return
20775 }
20776 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20777 if mi.Response.Response, err = future.GetResult(sender); err == nil && mi.Response.Response.StatusCode != http.StatusNoContent {
20778 mi, err = client.TestMigrateResponder(mi.Response.Response)
20779 if err != nil {
20780 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsTestMigrateFuture", "Result", mi.Response.Response, "Failure responding to request")
20781 }
20782 }
20783 return
20784 }
20785
20786
20787
20788 type ReplicationMigrationItemsUpdateFuture struct {
20789 azure.FutureAPI
20790
20791
20792 Result func(ReplicationMigrationItemsClient) (MigrationItem, error)
20793 }
20794
20795
20796 func (future *ReplicationMigrationItemsUpdateFuture) UnmarshalJSON(body []byte) error {
20797 var azFuture azure.Future
20798 if err := json.Unmarshal(body, &azFuture); err != nil {
20799 return err
20800 }
20801 future.FutureAPI = &azFuture
20802 future.Result = future.result
20803 return nil
20804 }
20805
20806
20807 func (future *ReplicationMigrationItemsUpdateFuture) result(client ReplicationMigrationItemsClient) (mi MigrationItem, err error) {
20808 var done bool
20809 done, err = future.DoneWithContext(context.Background(), client)
20810 if err != nil {
20811 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsUpdateFuture", "Result", future.Response(), "Polling failure")
20812 return
20813 }
20814 if !done {
20815 mi.Response.Response = future.Response()
20816 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationMigrationItemsUpdateFuture")
20817 return
20818 }
20819 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20820 if mi.Response.Response, err = future.GetResult(sender); err == nil && mi.Response.Response.StatusCode != http.StatusNoContent {
20821 mi, err = client.UpdateResponder(mi.Response.Response)
20822 if err != nil {
20823 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsUpdateFuture", "Result", mi.Response.Response, "Failure responding to request")
20824 }
20825 }
20826 return
20827 }
20828
20829
20830
20831 type ReplicationNetworkMappingsCreateFuture struct {
20832 azure.FutureAPI
20833
20834
20835 Result func(ReplicationNetworkMappingsClient) (NetworkMapping, error)
20836 }
20837
20838
20839 func (future *ReplicationNetworkMappingsCreateFuture) UnmarshalJSON(body []byte) error {
20840 var azFuture azure.Future
20841 if err := json.Unmarshal(body, &azFuture); err != nil {
20842 return err
20843 }
20844 future.FutureAPI = &azFuture
20845 future.Result = future.result
20846 return nil
20847 }
20848
20849
20850 func (future *ReplicationNetworkMappingsCreateFuture) result(client ReplicationNetworkMappingsClient) (nm NetworkMapping, err error) {
20851 var done bool
20852 done, err = future.DoneWithContext(context.Background(), client)
20853 if err != nil {
20854 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsCreateFuture", "Result", future.Response(), "Polling failure")
20855 return
20856 }
20857 if !done {
20858 nm.Response.Response = future.Response()
20859 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationNetworkMappingsCreateFuture")
20860 return
20861 }
20862 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20863 if nm.Response.Response, err = future.GetResult(sender); err == nil && nm.Response.Response.StatusCode != http.StatusNoContent {
20864 nm, err = client.CreateResponder(nm.Response.Response)
20865 if err != nil {
20866 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsCreateFuture", "Result", nm.Response.Response, "Failure responding to request")
20867 }
20868 }
20869 return
20870 }
20871
20872
20873
20874 type ReplicationNetworkMappingsDeleteFuture struct {
20875 azure.FutureAPI
20876
20877
20878 Result func(ReplicationNetworkMappingsClient) (autorest.Response, error)
20879 }
20880
20881
20882 func (future *ReplicationNetworkMappingsDeleteFuture) UnmarshalJSON(body []byte) error {
20883 var azFuture azure.Future
20884 if err := json.Unmarshal(body, &azFuture); err != nil {
20885 return err
20886 }
20887 future.FutureAPI = &azFuture
20888 future.Result = future.result
20889 return nil
20890 }
20891
20892
20893 func (future *ReplicationNetworkMappingsDeleteFuture) result(client ReplicationNetworkMappingsClient) (ar autorest.Response, err error) {
20894 var done bool
20895 done, err = future.DoneWithContext(context.Background(), client)
20896 if err != nil {
20897 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsDeleteFuture", "Result", future.Response(), "Polling failure")
20898 return
20899 }
20900 if !done {
20901 ar.Response = future.Response()
20902 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationNetworkMappingsDeleteFuture")
20903 return
20904 }
20905 ar.Response = future.Response()
20906 return
20907 }
20908
20909
20910
20911 type ReplicationNetworkMappingsUpdateFuture struct {
20912 azure.FutureAPI
20913
20914
20915 Result func(ReplicationNetworkMappingsClient) (NetworkMapping, error)
20916 }
20917
20918
20919 func (future *ReplicationNetworkMappingsUpdateFuture) UnmarshalJSON(body []byte) error {
20920 var azFuture azure.Future
20921 if err := json.Unmarshal(body, &azFuture); err != nil {
20922 return err
20923 }
20924 future.FutureAPI = &azFuture
20925 future.Result = future.result
20926 return nil
20927 }
20928
20929
20930 func (future *ReplicationNetworkMappingsUpdateFuture) result(client ReplicationNetworkMappingsClient) (nm NetworkMapping, err error) {
20931 var done bool
20932 done, err = future.DoneWithContext(context.Background(), client)
20933 if err != nil {
20934 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsUpdateFuture", "Result", future.Response(), "Polling failure")
20935 return
20936 }
20937 if !done {
20938 nm.Response.Response = future.Response()
20939 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationNetworkMappingsUpdateFuture")
20940 return
20941 }
20942 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20943 if nm.Response.Response, err = future.GetResult(sender); err == nil && nm.Response.Response.StatusCode != http.StatusNoContent {
20944 nm, err = client.UpdateResponder(nm.Response.Response)
20945 if err != nil {
20946 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsUpdateFuture", "Result", nm.Response.Response, "Failure responding to request")
20947 }
20948 }
20949 return
20950 }
20951
20952
20953
20954 type ReplicationPoliciesCreateFuture struct {
20955 azure.FutureAPI
20956
20957
20958 Result func(ReplicationPoliciesClient) (Policy, error)
20959 }
20960
20961
20962 func (future *ReplicationPoliciesCreateFuture) UnmarshalJSON(body []byte) error {
20963 var azFuture azure.Future
20964 if err := json.Unmarshal(body, &azFuture); err != nil {
20965 return err
20966 }
20967 future.FutureAPI = &azFuture
20968 future.Result = future.result
20969 return nil
20970 }
20971
20972
20973 func (future *ReplicationPoliciesCreateFuture) result(client ReplicationPoliciesClient) (p Policy, err error) {
20974 var done bool
20975 done, err = future.DoneWithContext(context.Background(), client)
20976 if err != nil {
20977 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesCreateFuture", "Result", future.Response(), "Polling failure")
20978 return
20979 }
20980 if !done {
20981 p.Response.Response = future.Response()
20982 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationPoliciesCreateFuture")
20983 return
20984 }
20985 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20986 if p.Response.Response, err = future.GetResult(sender); err == nil && p.Response.Response.StatusCode != http.StatusNoContent {
20987 p, err = client.CreateResponder(p.Response.Response)
20988 if err != nil {
20989 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesCreateFuture", "Result", p.Response.Response, "Failure responding to request")
20990 }
20991 }
20992 return
20993 }
20994
20995
20996
20997 type ReplicationPoliciesDeleteFuture struct {
20998 azure.FutureAPI
20999
21000
21001 Result func(ReplicationPoliciesClient) (autorest.Response, error)
21002 }
21003
21004
21005 func (future *ReplicationPoliciesDeleteFuture) UnmarshalJSON(body []byte) error {
21006 var azFuture azure.Future
21007 if err := json.Unmarshal(body, &azFuture); err != nil {
21008 return err
21009 }
21010 future.FutureAPI = &azFuture
21011 future.Result = future.result
21012 return nil
21013 }
21014
21015
21016 func (future *ReplicationPoliciesDeleteFuture) result(client ReplicationPoliciesClient) (ar autorest.Response, err error) {
21017 var done bool
21018 done, err = future.DoneWithContext(context.Background(), client)
21019 if err != nil {
21020 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
21021 return
21022 }
21023 if !done {
21024 ar.Response = future.Response()
21025 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationPoliciesDeleteFuture")
21026 return
21027 }
21028 ar.Response = future.Response()
21029 return
21030 }
21031
21032
21033
21034 type ReplicationPoliciesUpdateFuture struct {
21035 azure.FutureAPI
21036
21037
21038 Result func(ReplicationPoliciesClient) (Policy, error)
21039 }
21040
21041
21042 func (future *ReplicationPoliciesUpdateFuture) UnmarshalJSON(body []byte) error {
21043 var azFuture azure.Future
21044 if err := json.Unmarshal(body, &azFuture); err != nil {
21045 return err
21046 }
21047 future.FutureAPI = &azFuture
21048 future.Result = future.result
21049 return nil
21050 }
21051
21052
21053 func (future *ReplicationPoliciesUpdateFuture) result(client ReplicationPoliciesClient) (p Policy, err error) {
21054 var done bool
21055 done, err = future.DoneWithContext(context.Background(), client)
21056 if err != nil {
21057 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesUpdateFuture", "Result", future.Response(), "Polling failure")
21058 return
21059 }
21060 if !done {
21061 p.Response.Response = future.Response()
21062 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationPoliciesUpdateFuture")
21063 return
21064 }
21065 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21066 if p.Response.Response, err = future.GetResult(sender); err == nil && p.Response.Response.StatusCode != http.StatusNoContent {
21067 p, err = client.UpdateResponder(p.Response.Response)
21068 if err != nil {
21069 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesUpdateFuture", "Result", p.Response.Response, "Failure responding to request")
21070 }
21071 }
21072 return
21073 }
21074
21075
21076 type ReplicationProtectedItem struct {
21077 autorest.Response `json:"-"`
21078
21079 Properties *ReplicationProtectedItemProperties `json:"properties,omitempty"`
21080
21081 ID *string `json:"id,omitempty"`
21082
21083 Name *string `json:"name,omitempty"`
21084
21085 Type *string `json:"type,omitempty"`
21086
21087 Location *string `json:"location,omitempty"`
21088 }
21089
21090
21091 func (rpi ReplicationProtectedItem) MarshalJSON() ([]byte, error) {
21092 objectMap := make(map[string]interface{})
21093 if rpi.Properties != nil {
21094 objectMap["properties"] = rpi.Properties
21095 }
21096 if rpi.Location != nil {
21097 objectMap["location"] = rpi.Location
21098 }
21099 return json.Marshal(objectMap)
21100 }
21101
21102
21103 type ReplicationProtectedItemCollection struct {
21104 autorest.Response `json:"-"`
21105
21106 Value *[]ReplicationProtectedItem `json:"value,omitempty"`
21107
21108 NextLink *string `json:"nextLink,omitempty"`
21109 }
21110
21111
21112
21113 type ReplicationProtectedItemCollectionIterator struct {
21114 i int
21115 page ReplicationProtectedItemCollectionPage
21116 }
21117
21118
21119
21120 func (iter *ReplicationProtectedItemCollectionIterator) NextWithContext(ctx context.Context) (err error) {
21121 if tracing.IsEnabled() {
21122 ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectedItemCollectionIterator.NextWithContext")
21123 defer func() {
21124 sc := -1
21125 if iter.Response().Response.Response != nil {
21126 sc = iter.Response().Response.Response.StatusCode
21127 }
21128 tracing.EndSpan(ctx, sc, err)
21129 }()
21130 }
21131 iter.i++
21132 if iter.i < len(iter.page.Values()) {
21133 return nil
21134 }
21135 err = iter.page.NextWithContext(ctx)
21136 if err != nil {
21137 iter.i--
21138 return err
21139 }
21140 iter.i = 0
21141 return nil
21142 }
21143
21144
21145
21146
21147 func (iter *ReplicationProtectedItemCollectionIterator) Next() error {
21148 return iter.NextWithContext(context.Background())
21149 }
21150
21151
21152 func (iter ReplicationProtectedItemCollectionIterator) NotDone() bool {
21153 return iter.page.NotDone() && iter.i < len(iter.page.Values())
21154 }
21155
21156
21157 func (iter ReplicationProtectedItemCollectionIterator) Response() ReplicationProtectedItemCollection {
21158 return iter.page.Response()
21159 }
21160
21161
21162
21163 func (iter ReplicationProtectedItemCollectionIterator) Value() ReplicationProtectedItem {
21164 if !iter.page.NotDone() {
21165 return ReplicationProtectedItem{}
21166 }
21167 return iter.page.Values()[iter.i]
21168 }
21169
21170
21171 func NewReplicationProtectedItemCollectionIterator(page ReplicationProtectedItemCollectionPage) ReplicationProtectedItemCollectionIterator {
21172 return ReplicationProtectedItemCollectionIterator{page: page}
21173 }
21174
21175
21176 func (rpic ReplicationProtectedItemCollection) IsEmpty() bool {
21177 return rpic.Value == nil || len(*rpic.Value) == 0
21178 }
21179
21180
21181 func (rpic ReplicationProtectedItemCollection) hasNextLink() bool {
21182 return rpic.NextLink != nil && len(*rpic.NextLink) != 0
21183 }
21184
21185
21186
21187 func (rpic ReplicationProtectedItemCollection) replicationProtectedItemCollectionPreparer(ctx context.Context) (*http.Request, error) {
21188 if !rpic.hasNextLink() {
21189 return nil, nil
21190 }
21191 return autorest.Prepare((&http.Request{}).WithContext(ctx),
21192 autorest.AsJSON(),
21193 autorest.AsGet(),
21194 autorest.WithBaseURL(to.String(rpic.NextLink)))
21195 }
21196
21197
21198 type ReplicationProtectedItemCollectionPage struct {
21199 fn func(context.Context, ReplicationProtectedItemCollection) (ReplicationProtectedItemCollection, error)
21200 rpic ReplicationProtectedItemCollection
21201 }
21202
21203
21204
21205 func (page *ReplicationProtectedItemCollectionPage) NextWithContext(ctx context.Context) (err error) {
21206 if tracing.IsEnabled() {
21207 ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectedItemCollectionPage.NextWithContext")
21208 defer func() {
21209 sc := -1
21210 if page.Response().Response.Response != nil {
21211 sc = page.Response().Response.Response.StatusCode
21212 }
21213 tracing.EndSpan(ctx, sc, err)
21214 }()
21215 }
21216 for {
21217 next, err := page.fn(ctx, page.rpic)
21218 if err != nil {
21219 return err
21220 }
21221 page.rpic = next
21222 if !next.hasNextLink() || !next.IsEmpty() {
21223 break
21224 }
21225 }
21226 return nil
21227 }
21228
21229
21230
21231
21232 func (page *ReplicationProtectedItemCollectionPage) Next() error {
21233 return page.NextWithContext(context.Background())
21234 }
21235
21236
21237 func (page ReplicationProtectedItemCollectionPage) NotDone() bool {
21238 return !page.rpic.IsEmpty()
21239 }
21240
21241
21242 func (page ReplicationProtectedItemCollectionPage) Response() ReplicationProtectedItemCollection {
21243 return page.rpic
21244 }
21245
21246
21247 func (page ReplicationProtectedItemCollectionPage) Values() []ReplicationProtectedItem {
21248 if page.rpic.IsEmpty() {
21249 return nil
21250 }
21251 return *page.rpic.Value
21252 }
21253
21254
21255 func NewReplicationProtectedItemCollectionPage(cur ReplicationProtectedItemCollection, getNextPage func(context.Context, ReplicationProtectedItemCollection) (ReplicationProtectedItemCollection, error)) ReplicationProtectedItemCollectionPage {
21256 return ReplicationProtectedItemCollectionPage{
21257 fn: getNextPage,
21258 rpic: cur,
21259 }
21260 }
21261
21262
21263 type ReplicationProtectedItemProperties struct {
21264
21265 FriendlyName *string `json:"friendlyName,omitempty"`
21266
21267 ProtectedItemType *string `json:"protectedItemType,omitempty"`
21268
21269 ProtectableItemID *string `json:"protectableItemId,omitempty"`
21270
21271 RecoveryServicesProviderID *string `json:"recoveryServicesProviderId,omitempty"`
21272
21273 PrimaryFabricFriendlyName *string `json:"primaryFabricFriendlyName,omitempty"`
21274
21275 PrimaryFabricProvider *string `json:"primaryFabricProvider,omitempty"`
21276
21277 RecoveryFabricFriendlyName *string `json:"recoveryFabricFriendlyName,omitempty"`
21278
21279 RecoveryFabricID *string `json:"recoveryFabricId,omitempty"`
21280
21281 PrimaryProtectionContainerFriendlyName *string `json:"primaryProtectionContainerFriendlyName,omitempty"`
21282
21283 RecoveryProtectionContainerFriendlyName *string `json:"recoveryProtectionContainerFriendlyName,omitempty"`
21284
21285 ProtectionState *string `json:"protectionState,omitempty"`
21286
21287 ProtectionStateDescription *string `json:"protectionStateDescription,omitempty"`
21288
21289 ActiveLocation *string `json:"activeLocation,omitempty"`
21290
21291 TestFailoverState *string `json:"testFailoverState,omitempty"`
21292
21293 TestFailoverStateDescription *string `json:"testFailoverStateDescription,omitempty"`
21294
21295 AllowedOperations *[]string `json:"allowedOperations,omitempty"`
21296
21297 ReplicationHealth *string `json:"replicationHealth,omitempty"`
21298
21299 FailoverHealth *string `json:"failoverHealth,omitempty"`
21300
21301 HealthErrors *[]HealthError `json:"healthErrors,omitempty"`
21302
21303 PolicyID *string `json:"policyId,omitempty"`
21304
21305 PolicyFriendlyName *string `json:"policyFriendlyName,omitempty"`
21306
21307 LastSuccessfulFailoverTime *date.Time `json:"lastSuccessfulFailoverTime,omitempty"`
21308
21309 LastSuccessfulTestFailoverTime *date.Time `json:"lastSuccessfulTestFailoverTime,omitempty"`
21310
21311 CurrentScenario *CurrentScenarioDetails `json:"currentScenario,omitempty"`
21312
21313 FailoverRecoveryPointID *string `json:"failoverRecoveryPointId,omitempty"`
21314
21315 ProviderSpecificDetails BasicReplicationProviderSpecificSettings `json:"providerSpecificDetails,omitempty"`
21316
21317 RecoveryContainerID *string `json:"recoveryContainerId,omitempty"`
21318 }
21319
21320
21321 func (rpip *ReplicationProtectedItemProperties) UnmarshalJSON(body []byte) error {
21322 var m map[string]*json.RawMessage
21323 err := json.Unmarshal(body, &m)
21324 if err != nil {
21325 return err
21326 }
21327 for k, v := range m {
21328 switch k {
21329 case "friendlyName":
21330 if v != nil {
21331 var friendlyName string
21332 err = json.Unmarshal(*v, &friendlyName)
21333 if err != nil {
21334 return err
21335 }
21336 rpip.FriendlyName = &friendlyName
21337 }
21338 case "protectedItemType":
21339 if v != nil {
21340 var protectedItemType string
21341 err = json.Unmarshal(*v, &protectedItemType)
21342 if err != nil {
21343 return err
21344 }
21345 rpip.ProtectedItemType = &protectedItemType
21346 }
21347 case "protectableItemId":
21348 if v != nil {
21349 var protectableItemID string
21350 err = json.Unmarshal(*v, &protectableItemID)
21351 if err != nil {
21352 return err
21353 }
21354 rpip.ProtectableItemID = &protectableItemID
21355 }
21356 case "recoveryServicesProviderId":
21357 if v != nil {
21358 var recoveryServicesProviderID string
21359 err = json.Unmarshal(*v, &recoveryServicesProviderID)
21360 if err != nil {
21361 return err
21362 }
21363 rpip.RecoveryServicesProviderID = &recoveryServicesProviderID
21364 }
21365 case "primaryFabricFriendlyName":
21366 if v != nil {
21367 var primaryFabricFriendlyName string
21368 err = json.Unmarshal(*v, &primaryFabricFriendlyName)
21369 if err != nil {
21370 return err
21371 }
21372 rpip.PrimaryFabricFriendlyName = &primaryFabricFriendlyName
21373 }
21374 case "primaryFabricProvider":
21375 if v != nil {
21376 var primaryFabricProvider string
21377 err = json.Unmarshal(*v, &primaryFabricProvider)
21378 if err != nil {
21379 return err
21380 }
21381 rpip.PrimaryFabricProvider = &primaryFabricProvider
21382 }
21383 case "recoveryFabricFriendlyName":
21384 if v != nil {
21385 var recoveryFabricFriendlyName string
21386 err = json.Unmarshal(*v, &recoveryFabricFriendlyName)
21387 if err != nil {
21388 return err
21389 }
21390 rpip.RecoveryFabricFriendlyName = &recoveryFabricFriendlyName
21391 }
21392 case "recoveryFabricId":
21393 if v != nil {
21394 var recoveryFabricID string
21395 err = json.Unmarshal(*v, &recoveryFabricID)
21396 if err != nil {
21397 return err
21398 }
21399 rpip.RecoveryFabricID = &recoveryFabricID
21400 }
21401 case "primaryProtectionContainerFriendlyName":
21402 if v != nil {
21403 var primaryProtectionContainerFriendlyName string
21404 err = json.Unmarshal(*v, &primaryProtectionContainerFriendlyName)
21405 if err != nil {
21406 return err
21407 }
21408 rpip.PrimaryProtectionContainerFriendlyName = &primaryProtectionContainerFriendlyName
21409 }
21410 case "recoveryProtectionContainerFriendlyName":
21411 if v != nil {
21412 var recoveryProtectionContainerFriendlyName string
21413 err = json.Unmarshal(*v, &recoveryProtectionContainerFriendlyName)
21414 if err != nil {
21415 return err
21416 }
21417 rpip.RecoveryProtectionContainerFriendlyName = &recoveryProtectionContainerFriendlyName
21418 }
21419 case "protectionState":
21420 if v != nil {
21421 var protectionState string
21422 err = json.Unmarshal(*v, &protectionState)
21423 if err != nil {
21424 return err
21425 }
21426 rpip.ProtectionState = &protectionState
21427 }
21428 case "protectionStateDescription":
21429 if v != nil {
21430 var protectionStateDescription string
21431 err = json.Unmarshal(*v, &protectionStateDescription)
21432 if err != nil {
21433 return err
21434 }
21435 rpip.ProtectionStateDescription = &protectionStateDescription
21436 }
21437 case "activeLocation":
21438 if v != nil {
21439 var activeLocation string
21440 err = json.Unmarshal(*v, &activeLocation)
21441 if err != nil {
21442 return err
21443 }
21444 rpip.ActiveLocation = &activeLocation
21445 }
21446 case "testFailoverState":
21447 if v != nil {
21448 var testFailoverState string
21449 err = json.Unmarshal(*v, &testFailoverState)
21450 if err != nil {
21451 return err
21452 }
21453 rpip.TestFailoverState = &testFailoverState
21454 }
21455 case "testFailoverStateDescription":
21456 if v != nil {
21457 var testFailoverStateDescription string
21458 err = json.Unmarshal(*v, &testFailoverStateDescription)
21459 if err != nil {
21460 return err
21461 }
21462 rpip.TestFailoverStateDescription = &testFailoverStateDescription
21463 }
21464 case "allowedOperations":
21465 if v != nil {
21466 var allowedOperations []string
21467 err = json.Unmarshal(*v, &allowedOperations)
21468 if err != nil {
21469 return err
21470 }
21471 rpip.AllowedOperations = &allowedOperations
21472 }
21473 case "replicationHealth":
21474 if v != nil {
21475 var replicationHealth string
21476 err = json.Unmarshal(*v, &replicationHealth)
21477 if err != nil {
21478 return err
21479 }
21480 rpip.ReplicationHealth = &replicationHealth
21481 }
21482 case "failoverHealth":
21483 if v != nil {
21484 var failoverHealth string
21485 err = json.Unmarshal(*v, &failoverHealth)
21486 if err != nil {
21487 return err
21488 }
21489 rpip.FailoverHealth = &failoverHealth
21490 }
21491 case "healthErrors":
21492 if v != nil {
21493 var healthErrors []HealthError
21494 err = json.Unmarshal(*v, &healthErrors)
21495 if err != nil {
21496 return err
21497 }
21498 rpip.HealthErrors = &healthErrors
21499 }
21500 case "policyId":
21501 if v != nil {
21502 var policyID string
21503 err = json.Unmarshal(*v, &policyID)
21504 if err != nil {
21505 return err
21506 }
21507 rpip.PolicyID = &policyID
21508 }
21509 case "policyFriendlyName":
21510 if v != nil {
21511 var policyFriendlyName string
21512 err = json.Unmarshal(*v, &policyFriendlyName)
21513 if err != nil {
21514 return err
21515 }
21516 rpip.PolicyFriendlyName = &policyFriendlyName
21517 }
21518 case "lastSuccessfulFailoverTime":
21519 if v != nil {
21520 var lastSuccessfulFailoverTime date.Time
21521 err = json.Unmarshal(*v, &lastSuccessfulFailoverTime)
21522 if err != nil {
21523 return err
21524 }
21525 rpip.LastSuccessfulFailoverTime = &lastSuccessfulFailoverTime
21526 }
21527 case "lastSuccessfulTestFailoverTime":
21528 if v != nil {
21529 var lastSuccessfulTestFailoverTime date.Time
21530 err = json.Unmarshal(*v, &lastSuccessfulTestFailoverTime)
21531 if err != nil {
21532 return err
21533 }
21534 rpip.LastSuccessfulTestFailoverTime = &lastSuccessfulTestFailoverTime
21535 }
21536 case "currentScenario":
21537 if v != nil {
21538 var currentScenario CurrentScenarioDetails
21539 err = json.Unmarshal(*v, ¤tScenario)
21540 if err != nil {
21541 return err
21542 }
21543 rpip.CurrentScenario = ¤tScenario
21544 }
21545 case "failoverRecoveryPointId":
21546 if v != nil {
21547 var failoverRecoveryPointID string
21548 err = json.Unmarshal(*v, &failoverRecoveryPointID)
21549 if err != nil {
21550 return err
21551 }
21552 rpip.FailoverRecoveryPointID = &failoverRecoveryPointID
21553 }
21554 case "providerSpecificDetails":
21555 if v != nil {
21556 providerSpecificDetails, err := unmarshalBasicReplicationProviderSpecificSettings(*v)
21557 if err != nil {
21558 return err
21559 }
21560 rpip.ProviderSpecificDetails = providerSpecificDetails
21561 }
21562 case "recoveryContainerId":
21563 if v != nil {
21564 var recoveryContainerID string
21565 err = json.Unmarshal(*v, &recoveryContainerID)
21566 if err != nil {
21567 return err
21568 }
21569 rpip.RecoveryContainerID = &recoveryContainerID
21570 }
21571 }
21572 }
21573
21574 return nil
21575 }
21576
21577
21578
21579 type ReplicationProtectedItemsAddDisksFuture struct {
21580 azure.FutureAPI
21581
21582
21583 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error)
21584 }
21585
21586
21587 func (future *ReplicationProtectedItemsAddDisksFuture) UnmarshalJSON(body []byte) error {
21588 var azFuture azure.Future
21589 if err := json.Unmarshal(body, &azFuture); err != nil {
21590 return err
21591 }
21592 future.FutureAPI = &azFuture
21593 future.Result = future.result
21594 return nil
21595 }
21596
21597
21598 func (future *ReplicationProtectedItemsAddDisksFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
21599 var done bool
21600 done, err = future.DoneWithContext(context.Background(), client)
21601 if err != nil {
21602 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsAddDisksFuture", "Result", future.Response(), "Polling failure")
21603 return
21604 }
21605 if !done {
21606 rpi.Response.Response = future.Response()
21607 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsAddDisksFuture")
21608 return
21609 }
21610 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21611 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
21612 rpi, err = client.AddDisksResponder(rpi.Response.Response)
21613 if err != nil {
21614 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsAddDisksFuture", "Result", rpi.Response.Response, "Failure responding to request")
21615 }
21616 }
21617 return
21618 }
21619
21620
21621
21622 type ReplicationProtectedItemsApplyRecoveryPointFuture struct {
21623 azure.FutureAPI
21624
21625
21626 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error)
21627 }
21628
21629
21630 func (future *ReplicationProtectedItemsApplyRecoveryPointFuture) UnmarshalJSON(body []byte) error {
21631 var azFuture azure.Future
21632 if err := json.Unmarshal(body, &azFuture); err != nil {
21633 return err
21634 }
21635 future.FutureAPI = &azFuture
21636 future.Result = future.result
21637 return nil
21638 }
21639
21640
21641 func (future *ReplicationProtectedItemsApplyRecoveryPointFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
21642 var done bool
21643 done, err = future.DoneWithContext(context.Background(), client)
21644 if err != nil {
21645 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsApplyRecoveryPointFuture", "Result", future.Response(), "Polling failure")
21646 return
21647 }
21648 if !done {
21649 rpi.Response.Response = future.Response()
21650 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsApplyRecoveryPointFuture")
21651 return
21652 }
21653 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21654 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
21655 rpi, err = client.ApplyRecoveryPointResponder(rpi.Response.Response)
21656 if err != nil {
21657 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsApplyRecoveryPointFuture", "Result", rpi.Response.Response, "Failure responding to request")
21658 }
21659 }
21660 return
21661 }
21662
21663
21664
21665 type ReplicationProtectedItemsCreateFuture struct {
21666 azure.FutureAPI
21667
21668
21669 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error)
21670 }
21671
21672
21673 func (future *ReplicationProtectedItemsCreateFuture) UnmarshalJSON(body []byte) error {
21674 var azFuture azure.Future
21675 if err := json.Unmarshal(body, &azFuture); err != nil {
21676 return err
21677 }
21678 future.FutureAPI = &azFuture
21679 future.Result = future.result
21680 return nil
21681 }
21682
21683
21684 func (future *ReplicationProtectedItemsCreateFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
21685 var done bool
21686 done, err = future.DoneWithContext(context.Background(), client)
21687 if err != nil {
21688 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsCreateFuture", "Result", future.Response(), "Polling failure")
21689 return
21690 }
21691 if !done {
21692 rpi.Response.Response = future.Response()
21693 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsCreateFuture")
21694 return
21695 }
21696 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21697 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
21698 rpi, err = client.CreateResponder(rpi.Response.Response)
21699 if err != nil {
21700 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsCreateFuture", "Result", rpi.Response.Response, "Failure responding to request")
21701 }
21702 }
21703 return
21704 }
21705
21706
21707
21708 type ReplicationProtectedItemsDeleteFuture struct {
21709 azure.FutureAPI
21710
21711
21712 Result func(ReplicationProtectedItemsClient) (autorest.Response, error)
21713 }
21714
21715
21716 func (future *ReplicationProtectedItemsDeleteFuture) UnmarshalJSON(body []byte) error {
21717 var azFuture azure.Future
21718 if err := json.Unmarshal(body, &azFuture); err != nil {
21719 return err
21720 }
21721 future.FutureAPI = &azFuture
21722 future.Result = future.result
21723 return nil
21724 }
21725
21726
21727 func (future *ReplicationProtectedItemsDeleteFuture) result(client ReplicationProtectedItemsClient) (ar autorest.Response, err error) {
21728 var done bool
21729 done, err = future.DoneWithContext(context.Background(), client)
21730 if err != nil {
21731 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsDeleteFuture", "Result", future.Response(), "Polling failure")
21732 return
21733 }
21734 if !done {
21735 ar.Response = future.Response()
21736 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsDeleteFuture")
21737 return
21738 }
21739 ar.Response = future.Response()
21740 return
21741 }
21742
21743
21744
21745 type ReplicationProtectedItemsFailoverCommitFuture struct {
21746 azure.FutureAPI
21747
21748
21749 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error)
21750 }
21751
21752
21753 func (future *ReplicationProtectedItemsFailoverCommitFuture) UnmarshalJSON(body []byte) error {
21754 var azFuture azure.Future
21755 if err := json.Unmarshal(body, &azFuture); err != nil {
21756 return err
21757 }
21758 future.FutureAPI = &azFuture
21759 future.Result = future.result
21760 return nil
21761 }
21762
21763
21764 func (future *ReplicationProtectedItemsFailoverCommitFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
21765 var done bool
21766 done, err = future.DoneWithContext(context.Background(), client)
21767 if err != nil {
21768 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsFailoverCommitFuture", "Result", future.Response(), "Polling failure")
21769 return
21770 }
21771 if !done {
21772 rpi.Response.Response = future.Response()
21773 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsFailoverCommitFuture")
21774 return
21775 }
21776 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21777 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
21778 rpi, err = client.FailoverCommitResponder(rpi.Response.Response)
21779 if err != nil {
21780 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsFailoverCommitFuture", "Result", rpi.Response.Response, "Failure responding to request")
21781 }
21782 }
21783 return
21784 }
21785
21786
21787
21788 type ReplicationProtectedItemsPlannedFailoverFuture struct {
21789 azure.FutureAPI
21790
21791
21792 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error)
21793 }
21794
21795
21796 func (future *ReplicationProtectedItemsPlannedFailoverFuture) UnmarshalJSON(body []byte) error {
21797 var azFuture azure.Future
21798 if err := json.Unmarshal(body, &azFuture); err != nil {
21799 return err
21800 }
21801 future.FutureAPI = &azFuture
21802 future.Result = future.result
21803 return nil
21804 }
21805
21806
21807 func (future *ReplicationProtectedItemsPlannedFailoverFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
21808 var done bool
21809 done, err = future.DoneWithContext(context.Background(), client)
21810 if err != nil {
21811 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsPlannedFailoverFuture", "Result", future.Response(), "Polling failure")
21812 return
21813 }
21814 if !done {
21815 rpi.Response.Response = future.Response()
21816 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsPlannedFailoverFuture")
21817 return
21818 }
21819 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21820 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
21821 rpi, err = client.PlannedFailoverResponder(rpi.Response.Response)
21822 if err != nil {
21823 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsPlannedFailoverFuture", "Result", rpi.Response.Response, "Failure responding to request")
21824 }
21825 }
21826 return
21827 }
21828
21829
21830
21831 type ReplicationProtectedItemsPurgeFuture struct {
21832 azure.FutureAPI
21833
21834
21835 Result func(ReplicationProtectedItemsClient) (autorest.Response, error)
21836 }
21837
21838
21839 func (future *ReplicationProtectedItemsPurgeFuture) UnmarshalJSON(body []byte) error {
21840 var azFuture azure.Future
21841 if err := json.Unmarshal(body, &azFuture); err != nil {
21842 return err
21843 }
21844 future.FutureAPI = &azFuture
21845 future.Result = future.result
21846 return nil
21847 }
21848
21849
21850 func (future *ReplicationProtectedItemsPurgeFuture) result(client ReplicationProtectedItemsClient) (ar autorest.Response, err error) {
21851 var done bool
21852 done, err = future.DoneWithContext(context.Background(), client)
21853 if err != nil {
21854 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsPurgeFuture", "Result", future.Response(), "Polling failure")
21855 return
21856 }
21857 if !done {
21858 ar.Response = future.Response()
21859 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsPurgeFuture")
21860 return
21861 }
21862 ar.Response = future.Response()
21863 return
21864 }
21865
21866
21867
21868 type ReplicationProtectedItemsRemoveDisksFuture struct {
21869 azure.FutureAPI
21870
21871
21872 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error)
21873 }
21874
21875
21876 func (future *ReplicationProtectedItemsRemoveDisksFuture) UnmarshalJSON(body []byte) error {
21877 var azFuture azure.Future
21878 if err := json.Unmarshal(body, &azFuture); err != nil {
21879 return err
21880 }
21881 future.FutureAPI = &azFuture
21882 future.Result = future.result
21883 return nil
21884 }
21885
21886
21887 func (future *ReplicationProtectedItemsRemoveDisksFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
21888 var done bool
21889 done, err = future.DoneWithContext(context.Background(), client)
21890 if err != nil {
21891 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsRemoveDisksFuture", "Result", future.Response(), "Polling failure")
21892 return
21893 }
21894 if !done {
21895 rpi.Response.Response = future.Response()
21896 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsRemoveDisksFuture")
21897 return
21898 }
21899 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21900 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
21901 rpi, err = client.RemoveDisksResponder(rpi.Response.Response)
21902 if err != nil {
21903 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsRemoveDisksFuture", "Result", rpi.Response.Response, "Failure responding to request")
21904 }
21905 }
21906 return
21907 }
21908
21909
21910
21911 type ReplicationProtectedItemsRepairReplicationFuture struct {
21912 azure.FutureAPI
21913
21914
21915 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error)
21916 }
21917
21918
21919 func (future *ReplicationProtectedItemsRepairReplicationFuture) UnmarshalJSON(body []byte) error {
21920 var azFuture azure.Future
21921 if err := json.Unmarshal(body, &azFuture); err != nil {
21922 return err
21923 }
21924 future.FutureAPI = &azFuture
21925 future.Result = future.result
21926 return nil
21927 }
21928
21929
21930 func (future *ReplicationProtectedItemsRepairReplicationFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
21931 var done bool
21932 done, err = future.DoneWithContext(context.Background(), client)
21933 if err != nil {
21934 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsRepairReplicationFuture", "Result", future.Response(), "Polling failure")
21935 return
21936 }
21937 if !done {
21938 rpi.Response.Response = future.Response()
21939 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsRepairReplicationFuture")
21940 return
21941 }
21942 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21943 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
21944 rpi, err = client.RepairReplicationResponder(rpi.Response.Response)
21945 if err != nil {
21946 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsRepairReplicationFuture", "Result", rpi.Response.Response, "Failure responding to request")
21947 }
21948 }
21949 return
21950 }
21951
21952
21953
21954 type ReplicationProtectedItemsReprotectFuture struct {
21955 azure.FutureAPI
21956
21957
21958 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error)
21959 }
21960
21961
21962 func (future *ReplicationProtectedItemsReprotectFuture) UnmarshalJSON(body []byte) error {
21963 var azFuture azure.Future
21964 if err := json.Unmarshal(body, &azFuture); err != nil {
21965 return err
21966 }
21967 future.FutureAPI = &azFuture
21968 future.Result = future.result
21969 return nil
21970 }
21971
21972
21973 func (future *ReplicationProtectedItemsReprotectFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
21974 var done bool
21975 done, err = future.DoneWithContext(context.Background(), client)
21976 if err != nil {
21977 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsReprotectFuture", "Result", future.Response(), "Polling failure")
21978 return
21979 }
21980 if !done {
21981 rpi.Response.Response = future.Response()
21982 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsReprotectFuture")
21983 return
21984 }
21985 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21986 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
21987 rpi, err = client.ReprotectResponder(rpi.Response.Response)
21988 if err != nil {
21989 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsReprotectFuture", "Result", rpi.Response.Response, "Failure responding to request")
21990 }
21991 }
21992 return
21993 }
21994
21995
21996
21997 type ReplicationProtectedItemsResolveHealthErrorsFuture struct {
21998 azure.FutureAPI
21999
22000
22001 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error)
22002 }
22003
22004
22005 func (future *ReplicationProtectedItemsResolveHealthErrorsFuture) UnmarshalJSON(body []byte) error {
22006 var azFuture azure.Future
22007 if err := json.Unmarshal(body, &azFuture); err != nil {
22008 return err
22009 }
22010 future.FutureAPI = &azFuture
22011 future.Result = future.result
22012 return nil
22013 }
22014
22015
22016 func (future *ReplicationProtectedItemsResolveHealthErrorsFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
22017 var done bool
22018 done, err = future.DoneWithContext(context.Background(), client)
22019 if err != nil {
22020 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsResolveHealthErrorsFuture", "Result", future.Response(), "Polling failure")
22021 return
22022 }
22023 if !done {
22024 rpi.Response.Response = future.Response()
22025 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsResolveHealthErrorsFuture")
22026 return
22027 }
22028 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22029 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
22030 rpi, err = client.ResolveHealthErrorsResponder(rpi.Response.Response)
22031 if err != nil {
22032 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsResolveHealthErrorsFuture", "Result", rpi.Response.Response, "Failure responding to request")
22033 }
22034 }
22035 return
22036 }
22037
22038
22039
22040 type ReplicationProtectedItemsTestFailoverCleanupFuture struct {
22041 azure.FutureAPI
22042
22043
22044 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error)
22045 }
22046
22047
22048 func (future *ReplicationProtectedItemsTestFailoverCleanupFuture) UnmarshalJSON(body []byte) error {
22049 var azFuture azure.Future
22050 if err := json.Unmarshal(body, &azFuture); err != nil {
22051 return err
22052 }
22053 future.FutureAPI = &azFuture
22054 future.Result = future.result
22055 return nil
22056 }
22057
22058
22059 func (future *ReplicationProtectedItemsTestFailoverCleanupFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
22060 var done bool
22061 done, err = future.DoneWithContext(context.Background(), client)
22062 if err != nil {
22063 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsTestFailoverCleanupFuture", "Result", future.Response(), "Polling failure")
22064 return
22065 }
22066 if !done {
22067 rpi.Response.Response = future.Response()
22068 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsTestFailoverCleanupFuture")
22069 return
22070 }
22071 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22072 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
22073 rpi, err = client.TestFailoverCleanupResponder(rpi.Response.Response)
22074 if err != nil {
22075 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsTestFailoverCleanupFuture", "Result", rpi.Response.Response, "Failure responding to request")
22076 }
22077 }
22078 return
22079 }
22080
22081
22082
22083 type ReplicationProtectedItemsTestFailoverFuture struct {
22084 azure.FutureAPI
22085
22086
22087 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error)
22088 }
22089
22090
22091 func (future *ReplicationProtectedItemsTestFailoverFuture) UnmarshalJSON(body []byte) error {
22092 var azFuture azure.Future
22093 if err := json.Unmarshal(body, &azFuture); err != nil {
22094 return err
22095 }
22096 future.FutureAPI = &azFuture
22097 future.Result = future.result
22098 return nil
22099 }
22100
22101
22102 func (future *ReplicationProtectedItemsTestFailoverFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
22103 var done bool
22104 done, err = future.DoneWithContext(context.Background(), client)
22105 if err != nil {
22106 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsTestFailoverFuture", "Result", future.Response(), "Polling failure")
22107 return
22108 }
22109 if !done {
22110 rpi.Response.Response = future.Response()
22111 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsTestFailoverFuture")
22112 return
22113 }
22114 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22115 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
22116 rpi, err = client.TestFailoverResponder(rpi.Response.Response)
22117 if err != nil {
22118 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsTestFailoverFuture", "Result", rpi.Response.Response, "Failure responding to request")
22119 }
22120 }
22121 return
22122 }
22123
22124
22125
22126 type ReplicationProtectedItemsUnplannedFailoverFuture struct {
22127 azure.FutureAPI
22128
22129
22130 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error)
22131 }
22132
22133
22134 func (future *ReplicationProtectedItemsUnplannedFailoverFuture) UnmarshalJSON(body []byte) error {
22135 var azFuture azure.Future
22136 if err := json.Unmarshal(body, &azFuture); err != nil {
22137 return err
22138 }
22139 future.FutureAPI = &azFuture
22140 future.Result = future.result
22141 return nil
22142 }
22143
22144
22145 func (future *ReplicationProtectedItemsUnplannedFailoverFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
22146 var done bool
22147 done, err = future.DoneWithContext(context.Background(), client)
22148 if err != nil {
22149 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUnplannedFailoverFuture", "Result", future.Response(), "Polling failure")
22150 return
22151 }
22152 if !done {
22153 rpi.Response.Response = future.Response()
22154 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsUnplannedFailoverFuture")
22155 return
22156 }
22157 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22158 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
22159 rpi, err = client.UnplannedFailoverResponder(rpi.Response.Response)
22160 if err != nil {
22161 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUnplannedFailoverFuture", "Result", rpi.Response.Response, "Failure responding to request")
22162 }
22163 }
22164 return
22165 }
22166
22167
22168
22169 type ReplicationProtectedItemsUpdateFuture struct {
22170 azure.FutureAPI
22171
22172
22173 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error)
22174 }
22175
22176
22177 func (future *ReplicationProtectedItemsUpdateFuture) UnmarshalJSON(body []byte) error {
22178 var azFuture azure.Future
22179 if err := json.Unmarshal(body, &azFuture); err != nil {
22180 return err
22181 }
22182 future.FutureAPI = &azFuture
22183 future.Result = future.result
22184 return nil
22185 }
22186
22187
22188 func (future *ReplicationProtectedItemsUpdateFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
22189 var done bool
22190 done, err = future.DoneWithContext(context.Background(), client)
22191 if err != nil {
22192 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUpdateFuture", "Result", future.Response(), "Polling failure")
22193 return
22194 }
22195 if !done {
22196 rpi.Response.Response = future.Response()
22197 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsUpdateFuture")
22198 return
22199 }
22200 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22201 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
22202 rpi, err = client.UpdateResponder(rpi.Response.Response)
22203 if err != nil {
22204 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUpdateFuture", "Result", rpi.Response.Response, "Failure responding to request")
22205 }
22206 }
22207 return
22208 }
22209
22210
22211
22212 type ReplicationProtectedItemsUpdateMobilityServiceFuture struct {
22213 azure.FutureAPI
22214
22215
22216 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error)
22217 }
22218
22219
22220 func (future *ReplicationProtectedItemsUpdateMobilityServiceFuture) UnmarshalJSON(body []byte) error {
22221 var azFuture azure.Future
22222 if err := json.Unmarshal(body, &azFuture); err != nil {
22223 return err
22224 }
22225 future.FutureAPI = &azFuture
22226 future.Result = future.result
22227 return nil
22228 }
22229
22230
22231 func (future *ReplicationProtectedItemsUpdateMobilityServiceFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
22232 var done bool
22233 done, err = future.DoneWithContext(context.Background(), client)
22234 if err != nil {
22235 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUpdateMobilityServiceFuture", "Result", future.Response(), "Polling failure")
22236 return
22237 }
22238 if !done {
22239 rpi.Response.Response = future.Response()
22240 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsUpdateMobilityServiceFuture")
22241 return
22242 }
22243 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22244 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
22245 rpi, err = client.UpdateMobilityServiceResponder(rpi.Response.Response)
22246 if err != nil {
22247 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUpdateMobilityServiceFuture", "Result", rpi.Response.Response, "Failure responding to request")
22248 }
22249 }
22250 return
22251 }
22252
22253
22254
22255 type ReplicationProtectionContainerMappingsCreateFuture struct {
22256 azure.FutureAPI
22257
22258
22259 Result func(ReplicationProtectionContainerMappingsClient) (ProtectionContainerMapping, error)
22260 }
22261
22262
22263 func (future *ReplicationProtectionContainerMappingsCreateFuture) UnmarshalJSON(body []byte) error {
22264 var azFuture azure.Future
22265 if err := json.Unmarshal(body, &azFuture); err != nil {
22266 return err
22267 }
22268 future.FutureAPI = &azFuture
22269 future.Result = future.result
22270 return nil
22271 }
22272
22273
22274 func (future *ReplicationProtectionContainerMappingsCreateFuture) result(client ReplicationProtectionContainerMappingsClient) (pcm ProtectionContainerMapping, err error) {
22275 var done bool
22276 done, err = future.DoneWithContext(context.Background(), client)
22277 if err != nil {
22278 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsCreateFuture", "Result", future.Response(), "Polling failure")
22279 return
22280 }
22281 if !done {
22282 pcm.Response.Response = future.Response()
22283 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainerMappingsCreateFuture")
22284 return
22285 }
22286 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22287 if pcm.Response.Response, err = future.GetResult(sender); err == nil && pcm.Response.Response.StatusCode != http.StatusNoContent {
22288 pcm, err = client.CreateResponder(pcm.Response.Response)
22289 if err != nil {
22290 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsCreateFuture", "Result", pcm.Response.Response, "Failure responding to request")
22291 }
22292 }
22293 return
22294 }
22295
22296
22297
22298 type ReplicationProtectionContainerMappingsDeleteFuture struct {
22299 azure.FutureAPI
22300
22301
22302 Result func(ReplicationProtectionContainerMappingsClient) (autorest.Response, error)
22303 }
22304
22305
22306 func (future *ReplicationProtectionContainerMappingsDeleteFuture) UnmarshalJSON(body []byte) error {
22307 var azFuture azure.Future
22308 if err := json.Unmarshal(body, &azFuture); err != nil {
22309 return err
22310 }
22311 future.FutureAPI = &azFuture
22312 future.Result = future.result
22313 return nil
22314 }
22315
22316
22317 func (future *ReplicationProtectionContainerMappingsDeleteFuture) result(client ReplicationProtectionContainerMappingsClient) (ar autorest.Response, err error) {
22318 var done bool
22319 done, err = future.DoneWithContext(context.Background(), client)
22320 if err != nil {
22321 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsDeleteFuture", "Result", future.Response(), "Polling failure")
22322 return
22323 }
22324 if !done {
22325 ar.Response = future.Response()
22326 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainerMappingsDeleteFuture")
22327 return
22328 }
22329 ar.Response = future.Response()
22330 return
22331 }
22332
22333
22334
22335 type ReplicationProtectionContainerMappingsPurgeFuture struct {
22336 azure.FutureAPI
22337
22338
22339 Result func(ReplicationProtectionContainerMappingsClient) (autorest.Response, error)
22340 }
22341
22342
22343 func (future *ReplicationProtectionContainerMappingsPurgeFuture) UnmarshalJSON(body []byte) error {
22344 var azFuture azure.Future
22345 if err := json.Unmarshal(body, &azFuture); err != nil {
22346 return err
22347 }
22348 future.FutureAPI = &azFuture
22349 future.Result = future.result
22350 return nil
22351 }
22352
22353
22354 func (future *ReplicationProtectionContainerMappingsPurgeFuture) result(client ReplicationProtectionContainerMappingsClient) (ar autorest.Response, err error) {
22355 var done bool
22356 done, err = future.DoneWithContext(context.Background(), client)
22357 if err != nil {
22358 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsPurgeFuture", "Result", future.Response(), "Polling failure")
22359 return
22360 }
22361 if !done {
22362 ar.Response = future.Response()
22363 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainerMappingsPurgeFuture")
22364 return
22365 }
22366 ar.Response = future.Response()
22367 return
22368 }
22369
22370
22371
22372 type ReplicationProtectionContainerMappingsUpdateFuture struct {
22373 azure.FutureAPI
22374
22375
22376 Result func(ReplicationProtectionContainerMappingsClient) (ProtectionContainerMapping, error)
22377 }
22378
22379
22380 func (future *ReplicationProtectionContainerMappingsUpdateFuture) UnmarshalJSON(body []byte) error {
22381 var azFuture azure.Future
22382 if err := json.Unmarshal(body, &azFuture); err != nil {
22383 return err
22384 }
22385 future.FutureAPI = &azFuture
22386 future.Result = future.result
22387 return nil
22388 }
22389
22390
22391 func (future *ReplicationProtectionContainerMappingsUpdateFuture) result(client ReplicationProtectionContainerMappingsClient) (pcm ProtectionContainerMapping, err error) {
22392 var done bool
22393 done, err = future.DoneWithContext(context.Background(), client)
22394 if err != nil {
22395 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsUpdateFuture", "Result", future.Response(), "Polling failure")
22396 return
22397 }
22398 if !done {
22399 pcm.Response.Response = future.Response()
22400 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainerMappingsUpdateFuture")
22401 return
22402 }
22403 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22404 if pcm.Response.Response, err = future.GetResult(sender); err == nil && pcm.Response.Response.StatusCode != http.StatusNoContent {
22405 pcm, err = client.UpdateResponder(pcm.Response.Response)
22406 if err != nil {
22407 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsUpdateFuture", "Result", pcm.Response.Response, "Failure responding to request")
22408 }
22409 }
22410 return
22411 }
22412
22413
22414
22415 type ReplicationProtectionContainersCreateFuture struct {
22416 azure.FutureAPI
22417
22418
22419 Result func(ReplicationProtectionContainersClient) (ProtectionContainer, error)
22420 }
22421
22422
22423 func (future *ReplicationProtectionContainersCreateFuture) UnmarshalJSON(body []byte) error {
22424 var azFuture azure.Future
22425 if err := json.Unmarshal(body, &azFuture); err != nil {
22426 return err
22427 }
22428 future.FutureAPI = &azFuture
22429 future.Result = future.result
22430 return nil
22431 }
22432
22433
22434 func (future *ReplicationProtectionContainersCreateFuture) result(client ReplicationProtectionContainersClient) (pc ProtectionContainer, err error) {
22435 var done bool
22436 done, err = future.DoneWithContext(context.Background(), client)
22437 if err != nil {
22438 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersCreateFuture", "Result", future.Response(), "Polling failure")
22439 return
22440 }
22441 if !done {
22442 pc.Response.Response = future.Response()
22443 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainersCreateFuture")
22444 return
22445 }
22446 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22447 if pc.Response.Response, err = future.GetResult(sender); err == nil && pc.Response.Response.StatusCode != http.StatusNoContent {
22448 pc, err = client.CreateResponder(pc.Response.Response)
22449 if err != nil {
22450 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersCreateFuture", "Result", pc.Response.Response, "Failure responding to request")
22451 }
22452 }
22453 return
22454 }
22455
22456
22457
22458 type ReplicationProtectionContainersDeleteFuture struct {
22459 azure.FutureAPI
22460
22461
22462 Result func(ReplicationProtectionContainersClient) (autorest.Response, error)
22463 }
22464
22465
22466 func (future *ReplicationProtectionContainersDeleteFuture) UnmarshalJSON(body []byte) error {
22467 var azFuture azure.Future
22468 if err := json.Unmarshal(body, &azFuture); err != nil {
22469 return err
22470 }
22471 future.FutureAPI = &azFuture
22472 future.Result = future.result
22473 return nil
22474 }
22475
22476
22477 func (future *ReplicationProtectionContainersDeleteFuture) result(client ReplicationProtectionContainersClient) (ar autorest.Response, err error) {
22478 var done bool
22479 done, err = future.DoneWithContext(context.Background(), client)
22480 if err != nil {
22481 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersDeleteFuture", "Result", future.Response(), "Polling failure")
22482 return
22483 }
22484 if !done {
22485 ar.Response = future.Response()
22486 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainersDeleteFuture")
22487 return
22488 }
22489 ar.Response = future.Response()
22490 return
22491 }
22492
22493
22494
22495 type ReplicationProtectionContainersDiscoverProtectableItemFuture struct {
22496 azure.FutureAPI
22497
22498
22499 Result func(ReplicationProtectionContainersClient) (ProtectionContainer, error)
22500 }
22501
22502
22503 func (future *ReplicationProtectionContainersDiscoverProtectableItemFuture) UnmarshalJSON(body []byte) error {
22504 var azFuture azure.Future
22505 if err := json.Unmarshal(body, &azFuture); err != nil {
22506 return err
22507 }
22508 future.FutureAPI = &azFuture
22509 future.Result = future.result
22510 return nil
22511 }
22512
22513
22514 func (future *ReplicationProtectionContainersDiscoverProtectableItemFuture) result(client ReplicationProtectionContainersClient) (pc ProtectionContainer, err error) {
22515 var done bool
22516 done, err = future.DoneWithContext(context.Background(), client)
22517 if err != nil {
22518 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersDiscoverProtectableItemFuture", "Result", future.Response(), "Polling failure")
22519 return
22520 }
22521 if !done {
22522 pc.Response.Response = future.Response()
22523 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainersDiscoverProtectableItemFuture")
22524 return
22525 }
22526 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22527 if pc.Response.Response, err = future.GetResult(sender); err == nil && pc.Response.Response.StatusCode != http.StatusNoContent {
22528 pc, err = client.DiscoverProtectableItemResponder(pc.Response.Response)
22529 if err != nil {
22530 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersDiscoverProtectableItemFuture", "Result", pc.Response.Response, "Failure responding to request")
22531 }
22532 }
22533 return
22534 }
22535
22536
22537
22538 type ReplicationProtectionContainersSwitchProtectionFuture struct {
22539 azure.FutureAPI
22540
22541
22542 Result func(ReplicationProtectionContainersClient) (ProtectionContainer, error)
22543 }
22544
22545
22546 func (future *ReplicationProtectionContainersSwitchProtectionFuture) UnmarshalJSON(body []byte) error {
22547 var azFuture azure.Future
22548 if err := json.Unmarshal(body, &azFuture); err != nil {
22549 return err
22550 }
22551 future.FutureAPI = &azFuture
22552 future.Result = future.result
22553 return nil
22554 }
22555
22556
22557 func (future *ReplicationProtectionContainersSwitchProtectionFuture) result(client ReplicationProtectionContainersClient) (pc ProtectionContainer, err error) {
22558 var done bool
22559 done, err = future.DoneWithContext(context.Background(), client)
22560 if err != nil {
22561 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersSwitchProtectionFuture", "Result", future.Response(), "Polling failure")
22562 return
22563 }
22564 if !done {
22565 pc.Response.Response = future.Response()
22566 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainersSwitchProtectionFuture")
22567 return
22568 }
22569 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22570 if pc.Response.Response, err = future.GetResult(sender); err == nil && pc.Response.Response.StatusCode != http.StatusNoContent {
22571 pc, err = client.SwitchProtectionResponder(pc.Response.Response)
22572 if err != nil {
22573 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersSwitchProtectionFuture", "Result", pc.Response.Response, "Failure responding to request")
22574 }
22575 }
22576 return
22577 }
22578
22579
22580 type ReplicationProtectionIntent struct {
22581 autorest.Response `json:"-"`
22582
22583 Properties *ReplicationProtectionIntentProperties `json:"properties,omitempty"`
22584
22585 ID *string `json:"id,omitempty"`
22586
22587 Name *string `json:"name,omitempty"`
22588
22589 Type *string `json:"type,omitempty"`
22590
22591 Location *string `json:"location,omitempty"`
22592 }
22593
22594
22595 func (rpi ReplicationProtectionIntent) MarshalJSON() ([]byte, error) {
22596 objectMap := make(map[string]interface{})
22597 if rpi.Properties != nil {
22598 objectMap["properties"] = rpi.Properties
22599 }
22600 if rpi.Location != nil {
22601 objectMap["location"] = rpi.Location
22602 }
22603 return json.Marshal(objectMap)
22604 }
22605
22606
22607 type ReplicationProtectionIntentCollection struct {
22608 autorest.Response `json:"-"`
22609
22610 Value *[]ReplicationProtectionIntent `json:"value,omitempty"`
22611
22612 NextLink *string `json:"nextLink,omitempty"`
22613 }
22614
22615
22616
22617 type ReplicationProtectionIntentCollectionIterator struct {
22618 i int
22619 page ReplicationProtectionIntentCollectionPage
22620 }
22621
22622
22623
22624 func (iter *ReplicationProtectionIntentCollectionIterator) NextWithContext(ctx context.Context) (err error) {
22625 if tracing.IsEnabled() {
22626 ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectionIntentCollectionIterator.NextWithContext")
22627 defer func() {
22628 sc := -1
22629 if iter.Response().Response.Response != nil {
22630 sc = iter.Response().Response.Response.StatusCode
22631 }
22632 tracing.EndSpan(ctx, sc, err)
22633 }()
22634 }
22635 iter.i++
22636 if iter.i < len(iter.page.Values()) {
22637 return nil
22638 }
22639 err = iter.page.NextWithContext(ctx)
22640 if err != nil {
22641 iter.i--
22642 return err
22643 }
22644 iter.i = 0
22645 return nil
22646 }
22647
22648
22649
22650
22651 func (iter *ReplicationProtectionIntentCollectionIterator) Next() error {
22652 return iter.NextWithContext(context.Background())
22653 }
22654
22655
22656 func (iter ReplicationProtectionIntentCollectionIterator) NotDone() bool {
22657 return iter.page.NotDone() && iter.i < len(iter.page.Values())
22658 }
22659
22660
22661 func (iter ReplicationProtectionIntentCollectionIterator) Response() ReplicationProtectionIntentCollection {
22662 return iter.page.Response()
22663 }
22664
22665
22666
22667 func (iter ReplicationProtectionIntentCollectionIterator) Value() ReplicationProtectionIntent {
22668 if !iter.page.NotDone() {
22669 return ReplicationProtectionIntent{}
22670 }
22671 return iter.page.Values()[iter.i]
22672 }
22673
22674
22675 func NewReplicationProtectionIntentCollectionIterator(page ReplicationProtectionIntentCollectionPage) ReplicationProtectionIntentCollectionIterator {
22676 return ReplicationProtectionIntentCollectionIterator{page: page}
22677 }
22678
22679
22680 func (rpic ReplicationProtectionIntentCollection) IsEmpty() bool {
22681 return rpic.Value == nil || len(*rpic.Value) == 0
22682 }
22683
22684
22685 func (rpic ReplicationProtectionIntentCollection) hasNextLink() bool {
22686 return rpic.NextLink != nil && len(*rpic.NextLink) != 0
22687 }
22688
22689
22690
22691 func (rpic ReplicationProtectionIntentCollection) replicationProtectionIntentCollectionPreparer(ctx context.Context) (*http.Request, error) {
22692 if !rpic.hasNextLink() {
22693 return nil, nil
22694 }
22695 return autorest.Prepare((&http.Request{}).WithContext(ctx),
22696 autorest.AsJSON(),
22697 autorest.AsGet(),
22698 autorest.WithBaseURL(to.String(rpic.NextLink)))
22699 }
22700
22701
22702 type ReplicationProtectionIntentCollectionPage struct {
22703 fn func(context.Context, ReplicationProtectionIntentCollection) (ReplicationProtectionIntentCollection, error)
22704 rpic ReplicationProtectionIntentCollection
22705 }
22706
22707
22708
22709 func (page *ReplicationProtectionIntentCollectionPage) NextWithContext(ctx context.Context) (err error) {
22710 if tracing.IsEnabled() {
22711 ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectionIntentCollectionPage.NextWithContext")
22712 defer func() {
22713 sc := -1
22714 if page.Response().Response.Response != nil {
22715 sc = page.Response().Response.Response.StatusCode
22716 }
22717 tracing.EndSpan(ctx, sc, err)
22718 }()
22719 }
22720 for {
22721 next, err := page.fn(ctx, page.rpic)
22722 if err != nil {
22723 return err
22724 }
22725 page.rpic = next
22726 if !next.hasNextLink() || !next.IsEmpty() {
22727 break
22728 }
22729 }
22730 return nil
22731 }
22732
22733
22734
22735
22736 func (page *ReplicationProtectionIntentCollectionPage) Next() error {
22737 return page.NextWithContext(context.Background())
22738 }
22739
22740
22741 func (page ReplicationProtectionIntentCollectionPage) NotDone() bool {
22742 return !page.rpic.IsEmpty()
22743 }
22744
22745
22746 func (page ReplicationProtectionIntentCollectionPage) Response() ReplicationProtectionIntentCollection {
22747 return page.rpic
22748 }
22749
22750
22751 func (page ReplicationProtectionIntentCollectionPage) Values() []ReplicationProtectionIntent {
22752 if page.rpic.IsEmpty() {
22753 return nil
22754 }
22755 return *page.rpic.Value
22756 }
22757
22758
22759 func NewReplicationProtectionIntentCollectionPage(cur ReplicationProtectionIntentCollection, getNextPage func(context.Context, ReplicationProtectionIntentCollection) (ReplicationProtectionIntentCollection, error)) ReplicationProtectionIntentCollectionPage {
22760 return ReplicationProtectionIntentCollectionPage{
22761 fn: getNextPage,
22762 rpic: cur,
22763 }
22764 }
22765
22766
22767 type ReplicationProtectionIntentProperties struct {
22768
22769 FriendlyName *string `json:"friendlyName,omitempty"`
22770
22771 JobID *string `json:"jobId,omitempty"`
22772
22773 JobState *string `json:"jobState,omitempty"`
22774
22775 IsActive *bool `json:"isActive,omitempty"`
22776
22777 CreationTimeUTC *string `json:"creationTimeUTC,omitempty"`
22778
22779 ProviderSpecificDetails BasicReplicationProtectionIntentProviderSpecificSettings `json:"providerSpecificDetails,omitempty"`
22780 }
22781
22782
22783 func (rpip ReplicationProtectionIntentProperties) MarshalJSON() ([]byte, error) {
22784 objectMap := make(map[string]interface{})
22785 if rpip.FriendlyName != nil {
22786 objectMap["friendlyName"] = rpip.FriendlyName
22787 }
22788 objectMap["providerSpecificDetails"] = rpip.ProviderSpecificDetails
22789 return json.Marshal(objectMap)
22790 }
22791
22792
22793 func (rpip *ReplicationProtectionIntentProperties) UnmarshalJSON(body []byte) error {
22794 var m map[string]*json.RawMessage
22795 err := json.Unmarshal(body, &m)
22796 if err != nil {
22797 return err
22798 }
22799 for k, v := range m {
22800 switch k {
22801 case "friendlyName":
22802 if v != nil {
22803 var friendlyName string
22804 err = json.Unmarshal(*v, &friendlyName)
22805 if err != nil {
22806 return err
22807 }
22808 rpip.FriendlyName = &friendlyName
22809 }
22810 case "jobId":
22811 if v != nil {
22812 var jobID string
22813 err = json.Unmarshal(*v, &jobID)
22814 if err != nil {
22815 return err
22816 }
22817 rpip.JobID = &jobID
22818 }
22819 case "jobState":
22820 if v != nil {
22821 var jobState string
22822 err = json.Unmarshal(*v, &jobState)
22823 if err != nil {
22824 return err
22825 }
22826 rpip.JobState = &jobState
22827 }
22828 case "isActive":
22829 if v != nil {
22830 var isActive bool
22831 err = json.Unmarshal(*v, &isActive)
22832 if err != nil {
22833 return err
22834 }
22835 rpip.IsActive = &isActive
22836 }
22837 case "creationTimeUTC":
22838 if v != nil {
22839 var creationTimeUTC string
22840 err = json.Unmarshal(*v, &creationTimeUTC)
22841 if err != nil {
22842 return err
22843 }
22844 rpip.CreationTimeUTC = &creationTimeUTC
22845 }
22846 case "providerSpecificDetails":
22847 if v != nil {
22848 providerSpecificDetails, err := unmarshalBasicReplicationProtectionIntentProviderSpecificSettings(*v)
22849 if err != nil {
22850 return err
22851 }
22852 rpip.ProviderSpecificDetails = providerSpecificDetails
22853 }
22854 }
22855 }
22856
22857 return nil
22858 }
22859
22860
22861 type BasicReplicationProtectionIntentProviderSpecificSettings interface {
22862 AsA2AReplicationIntentDetails() (*A2AReplicationIntentDetails, bool)
22863 AsReplicationProtectionIntentProviderSpecificSettings() (*ReplicationProtectionIntentProviderSpecificSettings, bool)
22864 }
22865
22866
22867 type ReplicationProtectionIntentProviderSpecificSettings struct {
22868
22869 InstanceType InstanceTypeBasicReplicationProtectionIntentProviderSpecificSettings `json:"instanceType,omitempty"`
22870 }
22871
22872 func unmarshalBasicReplicationProtectionIntentProviderSpecificSettings(body []byte) (BasicReplicationProtectionIntentProviderSpecificSettings, error) {
22873 var m map[string]interface{}
22874 err := json.Unmarshal(body, &m)
22875 if err != nil {
22876 return nil, err
22877 }
22878
22879 switch m["instanceType"] {
22880 case string(InstanceTypeBasicReplicationProtectionIntentProviderSpecificSettingsInstanceTypeA2A):
22881 var arid A2AReplicationIntentDetails
22882 err := json.Unmarshal(body, &arid)
22883 return arid, err
22884 default:
22885 var rpipss ReplicationProtectionIntentProviderSpecificSettings
22886 err := json.Unmarshal(body, &rpipss)
22887 return rpipss, err
22888 }
22889 }
22890 func unmarshalBasicReplicationProtectionIntentProviderSpecificSettingsArray(body []byte) ([]BasicReplicationProtectionIntentProviderSpecificSettings, error) {
22891 var rawMessages []*json.RawMessage
22892 err := json.Unmarshal(body, &rawMessages)
22893 if err != nil {
22894 return nil, err
22895 }
22896
22897 rpipssArray := make([]BasicReplicationProtectionIntentProviderSpecificSettings, len(rawMessages))
22898
22899 for index, rawMessage := range rawMessages {
22900 rpipss, err := unmarshalBasicReplicationProtectionIntentProviderSpecificSettings(*rawMessage)
22901 if err != nil {
22902 return nil, err
22903 }
22904 rpipssArray[index] = rpipss
22905 }
22906 return rpipssArray, nil
22907 }
22908
22909
22910 func (rpipss ReplicationProtectionIntentProviderSpecificSettings) MarshalJSON() ([]byte, error) {
22911 rpipss.InstanceType = InstanceTypeBasicReplicationProtectionIntentProviderSpecificSettingsInstanceTypeReplicationProtectionIntentProviderSpecificSettings
22912 objectMap := make(map[string]interface{})
22913 if rpipss.InstanceType != "" {
22914 objectMap["instanceType"] = rpipss.InstanceType
22915 }
22916 return json.Marshal(objectMap)
22917 }
22918
22919
22920 func (rpipss ReplicationProtectionIntentProviderSpecificSettings) AsA2AReplicationIntentDetails() (*A2AReplicationIntentDetails, bool) {
22921 return nil, false
22922 }
22923
22924
22925 func (rpipss ReplicationProtectionIntentProviderSpecificSettings) AsReplicationProtectionIntentProviderSpecificSettings() (*ReplicationProtectionIntentProviderSpecificSettings, bool) {
22926 return &rpipss, true
22927 }
22928
22929
22930 func (rpipss ReplicationProtectionIntentProviderSpecificSettings) AsBasicReplicationProtectionIntentProviderSpecificSettings() (BasicReplicationProtectionIntentProviderSpecificSettings, bool) {
22931 return &rpipss, true
22932 }
22933
22934
22935 type ReplicationProviderContainerUnmappingInput struct {
22936
22937 InstanceType *string `json:"instanceType,omitempty"`
22938 }
22939
22940
22941 type BasicReplicationProviderSpecificContainerCreationInput interface {
22942 AsA2AContainerCreationInput() (*A2AContainerCreationInput, bool)
22943 AsVMwareCbtContainerCreationInput() (*VMwareCbtContainerCreationInput, bool)
22944 AsReplicationProviderSpecificContainerCreationInput() (*ReplicationProviderSpecificContainerCreationInput, bool)
22945 }
22946
22947
22948 type ReplicationProviderSpecificContainerCreationInput struct {
22949
22950 InstanceType InstanceTypeBasicReplicationProviderSpecificContainerCreationInput `json:"instanceType,omitempty"`
22951 }
22952
22953 func unmarshalBasicReplicationProviderSpecificContainerCreationInput(body []byte) (BasicReplicationProviderSpecificContainerCreationInput, error) {
22954 var m map[string]interface{}
22955 err := json.Unmarshal(body, &m)
22956 if err != nil {
22957 return nil, err
22958 }
22959
22960 switch m["instanceType"] {
22961 case string(InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeA2A):
22962 var acci A2AContainerCreationInput
22963 err := json.Unmarshal(body, &acci)
22964 return acci, err
22965 case string(InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeSixcSevendaFourFiveFiveFiveZeroSixfFourThreeffAOneSixaEightebOneZeroOneaebbSevenZero):
22966 var vmccci VMwareCbtContainerCreationInput
22967 err := json.Unmarshal(body, &vmccci)
22968 return vmccci, err
22969 default:
22970 var rpscci ReplicationProviderSpecificContainerCreationInput
22971 err := json.Unmarshal(body, &rpscci)
22972 return rpscci, err
22973 }
22974 }
22975 func unmarshalBasicReplicationProviderSpecificContainerCreationInputArray(body []byte) ([]BasicReplicationProviderSpecificContainerCreationInput, error) {
22976 var rawMessages []*json.RawMessage
22977 err := json.Unmarshal(body, &rawMessages)
22978 if err != nil {
22979 return nil, err
22980 }
22981
22982 rpscciArray := make([]BasicReplicationProviderSpecificContainerCreationInput, len(rawMessages))
22983
22984 for index, rawMessage := range rawMessages {
22985 rpscci, err := unmarshalBasicReplicationProviderSpecificContainerCreationInput(*rawMessage)
22986 if err != nil {
22987 return nil, err
22988 }
22989 rpscciArray[index] = rpscci
22990 }
22991 return rpscciArray, nil
22992 }
22993
22994
22995 func (rpscci ReplicationProviderSpecificContainerCreationInput) MarshalJSON() ([]byte, error) {
22996 rpscci.InstanceType = InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeReplicationProviderSpecificContainerCreationInput
22997 objectMap := make(map[string]interface{})
22998 if rpscci.InstanceType != "" {
22999 objectMap["instanceType"] = rpscci.InstanceType
23000 }
23001 return json.Marshal(objectMap)
23002 }
23003
23004
23005 func (rpscci ReplicationProviderSpecificContainerCreationInput) AsA2AContainerCreationInput() (*A2AContainerCreationInput, bool) {
23006 return nil, false
23007 }
23008
23009
23010 func (rpscci ReplicationProviderSpecificContainerCreationInput) AsVMwareCbtContainerCreationInput() (*VMwareCbtContainerCreationInput, bool) {
23011 return nil, false
23012 }
23013
23014
23015 func (rpscci ReplicationProviderSpecificContainerCreationInput) AsReplicationProviderSpecificContainerCreationInput() (*ReplicationProviderSpecificContainerCreationInput, bool) {
23016 return &rpscci, true
23017 }
23018
23019
23020 func (rpscci ReplicationProviderSpecificContainerCreationInput) AsBasicReplicationProviderSpecificContainerCreationInput() (BasicReplicationProviderSpecificContainerCreationInput, bool) {
23021 return &rpscci, true
23022 }
23023
23024
23025 type BasicReplicationProviderSpecificContainerMappingInput interface {
23026 AsA2AContainerMappingInput() (*A2AContainerMappingInput, bool)
23027 AsVMwareCbtContainerMappingInput() (*VMwareCbtContainerMappingInput, bool)
23028 AsReplicationProviderSpecificContainerMappingInput() (*ReplicationProviderSpecificContainerMappingInput, bool)
23029 }
23030
23031
23032 type ReplicationProviderSpecificContainerMappingInput struct {
23033
23034 InstanceType InstanceTypeBasicReplicationProviderSpecificContainerMappingInput `json:"instanceType,omitempty"`
23035 }
23036
23037 func unmarshalBasicReplicationProviderSpecificContainerMappingInput(body []byte) (BasicReplicationProviderSpecificContainerMappingInput, error) {
23038 var m map[string]interface{}
23039 err := json.Unmarshal(body, &m)
23040 if err != nil {
23041 return nil, err
23042 }
23043
23044 switch m["instanceType"] {
23045 case string(InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeA2A):
23046 var acmi A2AContainerMappingInput
23047 err := json.Unmarshal(body, &acmi)
23048 return acmi, err
23049 case string(InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeVMwareCbt):
23050 var vmccmi VMwareCbtContainerMappingInput
23051 err := json.Unmarshal(body, &vmccmi)
23052 return vmccmi, err
23053 default:
23054 var rpscmi ReplicationProviderSpecificContainerMappingInput
23055 err := json.Unmarshal(body, &rpscmi)
23056 return rpscmi, err
23057 }
23058 }
23059 func unmarshalBasicReplicationProviderSpecificContainerMappingInputArray(body []byte) ([]BasicReplicationProviderSpecificContainerMappingInput, error) {
23060 var rawMessages []*json.RawMessage
23061 err := json.Unmarshal(body, &rawMessages)
23062 if err != nil {
23063 return nil, err
23064 }
23065
23066 rpscmiArray := make([]BasicReplicationProviderSpecificContainerMappingInput, len(rawMessages))
23067
23068 for index, rawMessage := range rawMessages {
23069 rpscmi, err := unmarshalBasicReplicationProviderSpecificContainerMappingInput(*rawMessage)
23070 if err != nil {
23071 return nil, err
23072 }
23073 rpscmiArray[index] = rpscmi
23074 }
23075 return rpscmiArray, nil
23076 }
23077
23078
23079 func (rpscmi ReplicationProviderSpecificContainerMappingInput) MarshalJSON() ([]byte, error) {
23080 rpscmi.InstanceType = InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeReplicationProviderSpecificContainerMappingInput
23081 objectMap := make(map[string]interface{})
23082 if rpscmi.InstanceType != "" {
23083 objectMap["instanceType"] = rpscmi.InstanceType
23084 }
23085 return json.Marshal(objectMap)
23086 }
23087
23088
23089 func (rpscmi ReplicationProviderSpecificContainerMappingInput) AsA2AContainerMappingInput() (*A2AContainerMappingInput, bool) {
23090 return nil, false
23091 }
23092
23093
23094 func (rpscmi ReplicationProviderSpecificContainerMappingInput) AsVMwareCbtContainerMappingInput() (*VMwareCbtContainerMappingInput, bool) {
23095 return nil, false
23096 }
23097
23098
23099 func (rpscmi ReplicationProviderSpecificContainerMappingInput) AsReplicationProviderSpecificContainerMappingInput() (*ReplicationProviderSpecificContainerMappingInput, bool) {
23100 return &rpscmi, true
23101 }
23102
23103
23104 func (rpscmi ReplicationProviderSpecificContainerMappingInput) AsBasicReplicationProviderSpecificContainerMappingInput() (BasicReplicationProviderSpecificContainerMappingInput, bool) {
23105 return &rpscmi, true
23106 }
23107
23108
23109 type BasicReplicationProviderSpecificSettings interface {
23110 AsA2AReplicationDetails() (*A2AReplicationDetails, bool)
23111 AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool)
23112 AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool)
23113 AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool)
23114 AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool)
23115 AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool)
23116 AsInMageRcmReplicationDetails() (*InMageRcmReplicationDetails, bool)
23117 AsInMageReplicationDetails() (*InMageReplicationDetails, bool)
23118 AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool)
23119 }
23120
23121
23122 type ReplicationProviderSpecificSettings struct {
23123
23124 InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"`
23125 }
23126
23127 func unmarshalBasicReplicationProviderSpecificSettings(body []byte) (BasicReplicationProviderSpecificSettings, error) {
23128 var m map[string]interface{}
23129 err := json.Unmarshal(body, &m)
23130 if err != nil {
23131 return nil, err
23132 }
23133
23134 switch m["instanceType"] {
23135 case string(InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeA2A):
23136 var ard A2AReplicationDetails
23137 err := json.Unmarshal(body, &ard)
23138 return ard, err
23139 case string(InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaAzure):
23140 var hvrard HyperVReplicaAzureReplicationDetails
23141 err := json.Unmarshal(body, &hvrard)
23142 return hvrard, err
23143 case string(InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaBaseReplicationDetails):
23144 var hvrbrd HyperVReplicaBaseReplicationDetails
23145 err := json.Unmarshal(body, &hvrbrd)
23146 return hvrbrd, err
23147 case string(InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012R2):
23148 var hvrbrd HyperVReplicaBlueReplicationDetails
23149 err := json.Unmarshal(body, &hvrbrd)
23150 return hvrbrd, err
23151 case string(InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012):
23152 var hvrrd HyperVReplicaReplicationDetails
23153 err := json.Unmarshal(body, &hvrrd)
23154 return hvrrd, err
23155 case string(InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMageAzureV2):
23156 var imavrd InMageAzureV2ReplicationDetails
23157 err := json.Unmarshal(body, &imavrd)
23158 return imavrd, err
23159 case string(InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMageRcm):
23160 var imrrd InMageRcmReplicationDetails
23161 err := json.Unmarshal(body, &imrrd)
23162 return imrrd, err
23163 case string(InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMage):
23164 var imrd InMageReplicationDetails
23165 err := json.Unmarshal(body, &imrd)
23166 return imrd, err
23167 default:
23168 var rpss ReplicationProviderSpecificSettings
23169 err := json.Unmarshal(body, &rpss)
23170 return rpss, err
23171 }
23172 }
23173 func unmarshalBasicReplicationProviderSpecificSettingsArray(body []byte) ([]BasicReplicationProviderSpecificSettings, error) {
23174 var rawMessages []*json.RawMessage
23175 err := json.Unmarshal(body, &rawMessages)
23176 if err != nil {
23177 return nil, err
23178 }
23179
23180 rpssArray := make([]BasicReplicationProviderSpecificSettings, len(rawMessages))
23181
23182 for index, rawMessage := range rawMessages {
23183 rpss, err := unmarshalBasicReplicationProviderSpecificSettings(*rawMessage)
23184 if err != nil {
23185 return nil, err
23186 }
23187 rpssArray[index] = rpss
23188 }
23189 return rpssArray, nil
23190 }
23191
23192
23193 func (rpss ReplicationProviderSpecificSettings) MarshalJSON() ([]byte, error) {
23194 rpss.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeReplicationProviderSpecificSettings
23195 objectMap := make(map[string]interface{})
23196 if rpss.InstanceType != "" {
23197 objectMap["instanceType"] = rpss.InstanceType
23198 }
23199 return json.Marshal(objectMap)
23200 }
23201
23202
23203 func (rpss ReplicationProviderSpecificSettings) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) {
23204 return nil, false
23205 }
23206
23207
23208 func (rpss ReplicationProviderSpecificSettings) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) {
23209 return nil, false
23210 }
23211
23212
23213 func (rpss ReplicationProviderSpecificSettings) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) {
23214 return nil, false
23215 }
23216
23217
23218 func (rpss ReplicationProviderSpecificSettings) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) {
23219 return nil, false
23220 }
23221
23222
23223 func (rpss ReplicationProviderSpecificSettings) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) {
23224 return nil, false
23225 }
23226
23227
23228 func (rpss ReplicationProviderSpecificSettings) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) {
23229 return nil, false
23230 }
23231
23232
23233 func (rpss ReplicationProviderSpecificSettings) AsInMageRcmReplicationDetails() (*InMageRcmReplicationDetails, bool) {
23234 return nil, false
23235 }
23236
23237
23238 func (rpss ReplicationProviderSpecificSettings) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) {
23239 return nil, false
23240 }
23241
23242
23243 func (rpss ReplicationProviderSpecificSettings) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) {
23244 return &rpss, true
23245 }
23246
23247
23248 func (rpss ReplicationProviderSpecificSettings) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) {
23249 return &rpss, true
23250 }
23251
23252
23253 type BasicReplicationProviderSpecificUpdateContainerMappingInput interface {
23254 AsA2AUpdateContainerMappingInput() (*A2AUpdateContainerMappingInput, bool)
23255 AsReplicationProviderSpecificUpdateContainerMappingInput() (*ReplicationProviderSpecificUpdateContainerMappingInput, bool)
23256 }
23257
23258
23259
23260 type ReplicationProviderSpecificUpdateContainerMappingInput struct {
23261
23262 InstanceType InstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingInput `json:"instanceType,omitempty"`
23263 }
23264
23265 func unmarshalBasicReplicationProviderSpecificUpdateContainerMappingInput(body []byte) (BasicReplicationProviderSpecificUpdateContainerMappingInput, error) {
23266 var m map[string]interface{}
23267 err := json.Unmarshal(body, &m)
23268 if err != nil {
23269 return nil, err
23270 }
23271
23272 switch m["instanceType"] {
23273 case string(InstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingInputInstanceTypeA2A):
23274 var aucmi A2AUpdateContainerMappingInput
23275 err := json.Unmarshal(body, &aucmi)
23276 return aucmi, err
23277 default:
23278 var rpsucmi ReplicationProviderSpecificUpdateContainerMappingInput
23279 err := json.Unmarshal(body, &rpsucmi)
23280 return rpsucmi, err
23281 }
23282 }
23283 func unmarshalBasicReplicationProviderSpecificUpdateContainerMappingInputArray(body []byte) ([]BasicReplicationProviderSpecificUpdateContainerMappingInput, error) {
23284 var rawMessages []*json.RawMessage
23285 err := json.Unmarshal(body, &rawMessages)
23286 if err != nil {
23287 return nil, err
23288 }
23289
23290 rpsucmiArray := make([]BasicReplicationProviderSpecificUpdateContainerMappingInput, len(rawMessages))
23291
23292 for index, rawMessage := range rawMessages {
23293 rpsucmi, err := unmarshalBasicReplicationProviderSpecificUpdateContainerMappingInput(*rawMessage)
23294 if err != nil {
23295 return nil, err
23296 }
23297 rpsucmiArray[index] = rpsucmi
23298 }
23299 return rpsucmiArray, nil
23300 }
23301
23302
23303 func (rpsucmi ReplicationProviderSpecificUpdateContainerMappingInput) MarshalJSON() ([]byte, error) {
23304 rpsucmi.InstanceType = InstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingInputInstanceTypeReplicationProviderSpecificUpdateContainerMappingInput
23305 objectMap := make(map[string]interface{})
23306 if rpsucmi.InstanceType != "" {
23307 objectMap["instanceType"] = rpsucmi.InstanceType
23308 }
23309 return json.Marshal(objectMap)
23310 }
23311
23312
23313 func (rpsucmi ReplicationProviderSpecificUpdateContainerMappingInput) AsA2AUpdateContainerMappingInput() (*A2AUpdateContainerMappingInput, bool) {
23314 return nil, false
23315 }
23316
23317
23318 func (rpsucmi ReplicationProviderSpecificUpdateContainerMappingInput) AsReplicationProviderSpecificUpdateContainerMappingInput() (*ReplicationProviderSpecificUpdateContainerMappingInput, bool) {
23319 return &rpsucmi, true
23320 }
23321
23322
23323 func (rpsucmi ReplicationProviderSpecificUpdateContainerMappingInput) AsBasicReplicationProviderSpecificUpdateContainerMappingInput() (BasicReplicationProviderSpecificUpdateContainerMappingInput, bool) {
23324 return &rpsucmi, true
23325 }
23326
23327
23328
23329 type ReplicationRecoveryPlansCreateFuture struct {
23330 azure.FutureAPI
23331
23332
23333 Result func(ReplicationRecoveryPlansClient) (RecoveryPlan, error)
23334 }
23335
23336
23337 func (future *ReplicationRecoveryPlansCreateFuture) UnmarshalJSON(body []byte) error {
23338 var azFuture azure.Future
23339 if err := json.Unmarshal(body, &azFuture); err != nil {
23340 return err
23341 }
23342 future.FutureAPI = &azFuture
23343 future.Result = future.result
23344 return nil
23345 }
23346
23347
23348 func (future *ReplicationRecoveryPlansCreateFuture) result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
23349 var done bool
23350 done, err = future.DoneWithContext(context.Background(), client)
23351 if err != nil {
23352 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansCreateFuture", "Result", future.Response(), "Polling failure")
23353 return
23354 }
23355 if !done {
23356 rp.Response.Response = future.Response()
23357 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansCreateFuture")
23358 return
23359 }
23360 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23361 if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent {
23362 rp, err = client.CreateResponder(rp.Response.Response)
23363 if err != nil {
23364 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansCreateFuture", "Result", rp.Response.Response, "Failure responding to request")
23365 }
23366 }
23367 return
23368 }
23369
23370
23371
23372 type ReplicationRecoveryPlansDeleteFuture struct {
23373 azure.FutureAPI
23374
23375
23376 Result func(ReplicationRecoveryPlansClient) (autorest.Response, error)
23377 }
23378
23379
23380 func (future *ReplicationRecoveryPlansDeleteFuture) UnmarshalJSON(body []byte) error {
23381 var azFuture azure.Future
23382 if err := json.Unmarshal(body, &azFuture); err != nil {
23383 return err
23384 }
23385 future.FutureAPI = &azFuture
23386 future.Result = future.result
23387 return nil
23388 }
23389
23390
23391 func (future *ReplicationRecoveryPlansDeleteFuture) result(client ReplicationRecoveryPlansClient) (ar autorest.Response, err error) {
23392 var done bool
23393 done, err = future.DoneWithContext(context.Background(), client)
23394 if err != nil {
23395 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansDeleteFuture", "Result", future.Response(), "Polling failure")
23396 return
23397 }
23398 if !done {
23399 ar.Response = future.Response()
23400 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansDeleteFuture")
23401 return
23402 }
23403 ar.Response = future.Response()
23404 return
23405 }
23406
23407
23408
23409 type ReplicationRecoveryPlansFailoverCommitFuture struct {
23410 azure.FutureAPI
23411
23412
23413 Result func(ReplicationRecoveryPlansClient) (RecoveryPlan, error)
23414 }
23415
23416
23417 func (future *ReplicationRecoveryPlansFailoverCommitFuture) UnmarshalJSON(body []byte) error {
23418 var azFuture azure.Future
23419 if err := json.Unmarshal(body, &azFuture); err != nil {
23420 return err
23421 }
23422 future.FutureAPI = &azFuture
23423 future.Result = future.result
23424 return nil
23425 }
23426
23427
23428 func (future *ReplicationRecoveryPlansFailoverCommitFuture) result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
23429 var done bool
23430 done, err = future.DoneWithContext(context.Background(), client)
23431 if err != nil {
23432 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansFailoverCommitFuture", "Result", future.Response(), "Polling failure")
23433 return
23434 }
23435 if !done {
23436 rp.Response.Response = future.Response()
23437 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansFailoverCommitFuture")
23438 return
23439 }
23440 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23441 if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent {
23442 rp, err = client.FailoverCommitResponder(rp.Response.Response)
23443 if err != nil {
23444 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansFailoverCommitFuture", "Result", rp.Response.Response, "Failure responding to request")
23445 }
23446 }
23447 return
23448 }
23449
23450
23451
23452 type ReplicationRecoveryPlansPlannedFailoverFuture struct {
23453 azure.FutureAPI
23454
23455
23456 Result func(ReplicationRecoveryPlansClient) (RecoveryPlan, error)
23457 }
23458
23459
23460 func (future *ReplicationRecoveryPlansPlannedFailoverFuture) UnmarshalJSON(body []byte) error {
23461 var azFuture azure.Future
23462 if err := json.Unmarshal(body, &azFuture); err != nil {
23463 return err
23464 }
23465 future.FutureAPI = &azFuture
23466 future.Result = future.result
23467 return nil
23468 }
23469
23470
23471 func (future *ReplicationRecoveryPlansPlannedFailoverFuture) result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
23472 var done bool
23473 done, err = future.DoneWithContext(context.Background(), client)
23474 if err != nil {
23475 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansPlannedFailoverFuture", "Result", future.Response(), "Polling failure")
23476 return
23477 }
23478 if !done {
23479 rp.Response.Response = future.Response()
23480 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansPlannedFailoverFuture")
23481 return
23482 }
23483 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23484 if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent {
23485 rp, err = client.PlannedFailoverResponder(rp.Response.Response)
23486 if err != nil {
23487 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansPlannedFailoverFuture", "Result", rp.Response.Response, "Failure responding to request")
23488 }
23489 }
23490 return
23491 }
23492
23493
23494
23495 type ReplicationRecoveryPlansReprotectFuture struct {
23496 azure.FutureAPI
23497
23498
23499 Result func(ReplicationRecoveryPlansClient) (RecoveryPlan, error)
23500 }
23501
23502
23503 func (future *ReplicationRecoveryPlansReprotectFuture) UnmarshalJSON(body []byte) error {
23504 var azFuture azure.Future
23505 if err := json.Unmarshal(body, &azFuture); err != nil {
23506 return err
23507 }
23508 future.FutureAPI = &azFuture
23509 future.Result = future.result
23510 return nil
23511 }
23512
23513
23514 func (future *ReplicationRecoveryPlansReprotectFuture) result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
23515 var done bool
23516 done, err = future.DoneWithContext(context.Background(), client)
23517 if err != nil {
23518 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansReprotectFuture", "Result", future.Response(), "Polling failure")
23519 return
23520 }
23521 if !done {
23522 rp.Response.Response = future.Response()
23523 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansReprotectFuture")
23524 return
23525 }
23526 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23527 if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent {
23528 rp, err = client.ReprotectResponder(rp.Response.Response)
23529 if err != nil {
23530 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansReprotectFuture", "Result", rp.Response.Response, "Failure responding to request")
23531 }
23532 }
23533 return
23534 }
23535
23536
23537
23538 type ReplicationRecoveryPlansTestFailoverCleanupFuture struct {
23539 azure.FutureAPI
23540
23541
23542 Result func(ReplicationRecoveryPlansClient) (RecoveryPlan, error)
23543 }
23544
23545
23546 func (future *ReplicationRecoveryPlansTestFailoverCleanupFuture) UnmarshalJSON(body []byte) error {
23547 var azFuture azure.Future
23548 if err := json.Unmarshal(body, &azFuture); err != nil {
23549 return err
23550 }
23551 future.FutureAPI = &azFuture
23552 future.Result = future.result
23553 return nil
23554 }
23555
23556
23557 func (future *ReplicationRecoveryPlansTestFailoverCleanupFuture) result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
23558 var done bool
23559 done, err = future.DoneWithContext(context.Background(), client)
23560 if err != nil {
23561 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansTestFailoverCleanupFuture", "Result", future.Response(), "Polling failure")
23562 return
23563 }
23564 if !done {
23565 rp.Response.Response = future.Response()
23566 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansTestFailoverCleanupFuture")
23567 return
23568 }
23569 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23570 if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent {
23571 rp, err = client.TestFailoverCleanupResponder(rp.Response.Response)
23572 if err != nil {
23573 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansTestFailoverCleanupFuture", "Result", rp.Response.Response, "Failure responding to request")
23574 }
23575 }
23576 return
23577 }
23578
23579
23580
23581 type ReplicationRecoveryPlansTestFailoverFuture struct {
23582 azure.FutureAPI
23583
23584
23585 Result func(ReplicationRecoveryPlansClient) (RecoveryPlan, error)
23586 }
23587
23588
23589 func (future *ReplicationRecoveryPlansTestFailoverFuture) UnmarshalJSON(body []byte) error {
23590 var azFuture azure.Future
23591 if err := json.Unmarshal(body, &azFuture); err != nil {
23592 return err
23593 }
23594 future.FutureAPI = &azFuture
23595 future.Result = future.result
23596 return nil
23597 }
23598
23599
23600 func (future *ReplicationRecoveryPlansTestFailoverFuture) result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
23601 var done bool
23602 done, err = future.DoneWithContext(context.Background(), client)
23603 if err != nil {
23604 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansTestFailoverFuture", "Result", future.Response(), "Polling failure")
23605 return
23606 }
23607 if !done {
23608 rp.Response.Response = future.Response()
23609 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansTestFailoverFuture")
23610 return
23611 }
23612 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23613 if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent {
23614 rp, err = client.TestFailoverResponder(rp.Response.Response)
23615 if err != nil {
23616 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansTestFailoverFuture", "Result", rp.Response.Response, "Failure responding to request")
23617 }
23618 }
23619 return
23620 }
23621
23622
23623
23624 type ReplicationRecoveryPlansUnplannedFailoverFuture struct {
23625 azure.FutureAPI
23626
23627
23628 Result func(ReplicationRecoveryPlansClient) (RecoveryPlan, error)
23629 }
23630
23631
23632 func (future *ReplicationRecoveryPlansUnplannedFailoverFuture) UnmarshalJSON(body []byte) error {
23633 var azFuture azure.Future
23634 if err := json.Unmarshal(body, &azFuture); err != nil {
23635 return err
23636 }
23637 future.FutureAPI = &azFuture
23638 future.Result = future.result
23639 return nil
23640 }
23641
23642
23643 func (future *ReplicationRecoveryPlansUnplannedFailoverFuture) result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
23644 var done bool
23645 done, err = future.DoneWithContext(context.Background(), client)
23646 if err != nil {
23647 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansUnplannedFailoverFuture", "Result", future.Response(), "Polling failure")
23648 return
23649 }
23650 if !done {
23651 rp.Response.Response = future.Response()
23652 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansUnplannedFailoverFuture")
23653 return
23654 }
23655 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23656 if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent {
23657 rp, err = client.UnplannedFailoverResponder(rp.Response.Response)
23658 if err != nil {
23659 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansUnplannedFailoverFuture", "Result", rp.Response.Response, "Failure responding to request")
23660 }
23661 }
23662 return
23663 }
23664
23665
23666
23667 type ReplicationRecoveryPlansUpdateFuture struct {
23668 azure.FutureAPI
23669
23670
23671 Result func(ReplicationRecoveryPlansClient) (RecoveryPlan, error)
23672 }
23673
23674
23675 func (future *ReplicationRecoveryPlansUpdateFuture) UnmarshalJSON(body []byte) error {
23676 var azFuture azure.Future
23677 if err := json.Unmarshal(body, &azFuture); err != nil {
23678 return err
23679 }
23680 future.FutureAPI = &azFuture
23681 future.Result = future.result
23682 return nil
23683 }
23684
23685
23686 func (future *ReplicationRecoveryPlansUpdateFuture) result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
23687 var done bool
23688 done, err = future.DoneWithContext(context.Background(), client)
23689 if err != nil {
23690 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansUpdateFuture", "Result", future.Response(), "Polling failure")
23691 return
23692 }
23693 if !done {
23694 rp.Response.Response = future.Response()
23695 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansUpdateFuture")
23696 return
23697 }
23698 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23699 if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent {
23700 rp, err = client.UpdateResponder(rp.Response.Response)
23701 if err != nil {
23702 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansUpdateFuture", "Result", rp.Response.Response, "Failure responding to request")
23703 }
23704 }
23705 return
23706 }
23707
23708
23709
23710 type ReplicationRecoveryServicesProvidersCreateFuture struct {
23711 azure.FutureAPI
23712
23713
23714 Result func(ReplicationRecoveryServicesProvidersClient) (RecoveryServicesProvider, error)
23715 }
23716
23717
23718 func (future *ReplicationRecoveryServicesProvidersCreateFuture) UnmarshalJSON(body []byte) error {
23719 var azFuture azure.Future
23720 if err := json.Unmarshal(body, &azFuture); err != nil {
23721 return err
23722 }
23723 future.FutureAPI = &azFuture
23724 future.Result = future.result
23725 return nil
23726 }
23727
23728
23729 func (future *ReplicationRecoveryServicesProvidersCreateFuture) result(client ReplicationRecoveryServicesProvidersClient) (rsp RecoveryServicesProvider, err error) {
23730 var done bool
23731 done, err = future.DoneWithContext(context.Background(), client)
23732 if err != nil {
23733 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersCreateFuture", "Result", future.Response(), "Polling failure")
23734 return
23735 }
23736 if !done {
23737 rsp.Response.Response = future.Response()
23738 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryServicesProvidersCreateFuture")
23739 return
23740 }
23741 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23742 if rsp.Response.Response, err = future.GetResult(sender); err == nil && rsp.Response.Response.StatusCode != http.StatusNoContent {
23743 rsp, err = client.CreateResponder(rsp.Response.Response)
23744 if err != nil {
23745 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersCreateFuture", "Result", rsp.Response.Response, "Failure responding to request")
23746 }
23747 }
23748 return
23749 }
23750
23751
23752
23753 type ReplicationRecoveryServicesProvidersDeleteFuture struct {
23754 azure.FutureAPI
23755
23756
23757 Result func(ReplicationRecoveryServicesProvidersClient) (autorest.Response, error)
23758 }
23759
23760
23761 func (future *ReplicationRecoveryServicesProvidersDeleteFuture) UnmarshalJSON(body []byte) error {
23762 var azFuture azure.Future
23763 if err := json.Unmarshal(body, &azFuture); err != nil {
23764 return err
23765 }
23766 future.FutureAPI = &azFuture
23767 future.Result = future.result
23768 return nil
23769 }
23770
23771
23772 func (future *ReplicationRecoveryServicesProvidersDeleteFuture) result(client ReplicationRecoveryServicesProvidersClient) (ar autorest.Response, err error) {
23773 var done bool
23774 done, err = future.DoneWithContext(context.Background(), client)
23775 if err != nil {
23776 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersDeleteFuture", "Result", future.Response(), "Polling failure")
23777 return
23778 }
23779 if !done {
23780 ar.Response = future.Response()
23781 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryServicesProvidersDeleteFuture")
23782 return
23783 }
23784 ar.Response = future.Response()
23785 return
23786 }
23787
23788
23789
23790 type ReplicationRecoveryServicesProvidersPurgeFuture struct {
23791 azure.FutureAPI
23792
23793
23794 Result func(ReplicationRecoveryServicesProvidersClient) (autorest.Response, error)
23795 }
23796
23797
23798 func (future *ReplicationRecoveryServicesProvidersPurgeFuture) UnmarshalJSON(body []byte) error {
23799 var azFuture azure.Future
23800 if err := json.Unmarshal(body, &azFuture); err != nil {
23801 return err
23802 }
23803 future.FutureAPI = &azFuture
23804 future.Result = future.result
23805 return nil
23806 }
23807
23808
23809 func (future *ReplicationRecoveryServicesProvidersPurgeFuture) result(client ReplicationRecoveryServicesProvidersClient) (ar autorest.Response, err error) {
23810 var done bool
23811 done, err = future.DoneWithContext(context.Background(), client)
23812 if err != nil {
23813 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersPurgeFuture", "Result", future.Response(), "Polling failure")
23814 return
23815 }
23816 if !done {
23817 ar.Response = future.Response()
23818 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryServicesProvidersPurgeFuture")
23819 return
23820 }
23821 ar.Response = future.Response()
23822 return
23823 }
23824
23825
23826
23827 type ReplicationRecoveryServicesProvidersRefreshProviderFuture struct {
23828 azure.FutureAPI
23829
23830
23831 Result func(ReplicationRecoveryServicesProvidersClient) (RecoveryServicesProvider, error)
23832 }
23833
23834
23835 func (future *ReplicationRecoveryServicesProvidersRefreshProviderFuture) UnmarshalJSON(body []byte) error {
23836 var azFuture azure.Future
23837 if err := json.Unmarshal(body, &azFuture); err != nil {
23838 return err
23839 }
23840 future.FutureAPI = &azFuture
23841 future.Result = future.result
23842 return nil
23843 }
23844
23845
23846 func (future *ReplicationRecoveryServicesProvidersRefreshProviderFuture) result(client ReplicationRecoveryServicesProvidersClient) (rsp RecoveryServicesProvider, err error) {
23847 var done bool
23848 done, err = future.DoneWithContext(context.Background(), client)
23849 if err != nil {
23850 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersRefreshProviderFuture", "Result", future.Response(), "Polling failure")
23851 return
23852 }
23853 if !done {
23854 rsp.Response.Response = future.Response()
23855 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryServicesProvidersRefreshProviderFuture")
23856 return
23857 }
23858 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23859 if rsp.Response.Response, err = future.GetResult(sender); err == nil && rsp.Response.Response.StatusCode != http.StatusNoContent {
23860 rsp, err = client.RefreshProviderResponder(rsp.Response.Response)
23861 if err != nil {
23862 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersRefreshProviderFuture", "Result", rsp.Response.Response, "Failure responding to request")
23863 }
23864 }
23865 return
23866 }
23867
23868
23869
23870 type ReplicationStorageClassificationMappingsCreateFuture struct {
23871 azure.FutureAPI
23872
23873
23874 Result func(ReplicationStorageClassificationMappingsClient) (StorageClassificationMapping, error)
23875 }
23876
23877
23878 func (future *ReplicationStorageClassificationMappingsCreateFuture) UnmarshalJSON(body []byte) error {
23879 var azFuture azure.Future
23880 if err := json.Unmarshal(body, &azFuture); err != nil {
23881 return err
23882 }
23883 future.FutureAPI = &azFuture
23884 future.Result = future.result
23885 return nil
23886 }
23887
23888
23889 func (future *ReplicationStorageClassificationMappingsCreateFuture) result(client ReplicationStorageClassificationMappingsClient) (scm StorageClassificationMapping, err error) {
23890 var done bool
23891 done, err = future.DoneWithContext(context.Background(), client)
23892 if err != nil {
23893 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsCreateFuture", "Result", future.Response(), "Polling failure")
23894 return
23895 }
23896 if !done {
23897 scm.Response.Response = future.Response()
23898 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationStorageClassificationMappingsCreateFuture")
23899 return
23900 }
23901 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23902 if scm.Response.Response, err = future.GetResult(sender); err == nil && scm.Response.Response.StatusCode != http.StatusNoContent {
23903 scm, err = client.CreateResponder(scm.Response.Response)
23904 if err != nil {
23905 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsCreateFuture", "Result", scm.Response.Response, "Failure responding to request")
23906 }
23907 }
23908 return
23909 }
23910
23911
23912
23913 type ReplicationStorageClassificationMappingsDeleteFuture struct {
23914 azure.FutureAPI
23915
23916
23917 Result func(ReplicationStorageClassificationMappingsClient) (autorest.Response, error)
23918 }
23919
23920
23921 func (future *ReplicationStorageClassificationMappingsDeleteFuture) UnmarshalJSON(body []byte) error {
23922 var azFuture azure.Future
23923 if err := json.Unmarshal(body, &azFuture); err != nil {
23924 return err
23925 }
23926 future.FutureAPI = &azFuture
23927 future.Result = future.result
23928 return nil
23929 }
23930
23931
23932 func (future *ReplicationStorageClassificationMappingsDeleteFuture) result(client ReplicationStorageClassificationMappingsClient) (ar autorest.Response, err error) {
23933 var done bool
23934 done, err = future.DoneWithContext(context.Background(), client)
23935 if err != nil {
23936 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsDeleteFuture", "Result", future.Response(), "Polling failure")
23937 return
23938 }
23939 if !done {
23940 ar.Response = future.Response()
23941 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationStorageClassificationMappingsDeleteFuture")
23942 return
23943 }
23944 ar.Response = future.Response()
23945 return
23946 }
23947
23948
23949
23950 type ReplicationVaultHealthRefreshFuture struct {
23951 azure.FutureAPI
23952
23953
23954 Result func(ReplicationVaultHealthClient) (VaultHealthDetails, error)
23955 }
23956
23957
23958 func (future *ReplicationVaultHealthRefreshFuture) UnmarshalJSON(body []byte) error {
23959 var azFuture azure.Future
23960 if err := json.Unmarshal(body, &azFuture); err != nil {
23961 return err
23962 }
23963 future.FutureAPI = &azFuture
23964 future.Result = future.result
23965 return nil
23966 }
23967
23968
23969 func (future *ReplicationVaultHealthRefreshFuture) result(client ReplicationVaultHealthClient) (vhd VaultHealthDetails, err error) {
23970 var done bool
23971 done, err = future.DoneWithContext(context.Background(), client)
23972 if err != nil {
23973 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationVaultHealthRefreshFuture", "Result", future.Response(), "Polling failure")
23974 return
23975 }
23976 if !done {
23977 vhd.Response.Response = future.Response()
23978 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationVaultHealthRefreshFuture")
23979 return
23980 }
23981 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23982 if vhd.Response.Response, err = future.GetResult(sender); err == nil && vhd.Response.Response.StatusCode != http.StatusNoContent {
23983 vhd, err = client.RefreshResponder(vhd.Response.Response)
23984 if err != nil {
23985 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationVaultHealthRefreshFuture", "Result", vhd.Response.Response, "Failure responding to request")
23986 }
23987 }
23988 return
23989 }
23990
23991
23992
23993 type ReplicationvCentersCreateFuture struct {
23994 azure.FutureAPI
23995
23996
23997 Result func(ReplicationvCentersClient) (VCenter, error)
23998 }
23999
24000
24001 func (future *ReplicationvCentersCreateFuture) UnmarshalJSON(body []byte) error {
24002 var azFuture azure.Future
24003 if err := json.Unmarshal(body, &azFuture); err != nil {
24004 return err
24005 }
24006 future.FutureAPI = &azFuture
24007 future.Result = future.result
24008 return nil
24009 }
24010
24011
24012 func (future *ReplicationvCentersCreateFuture) result(client ReplicationvCentersClient) (vc VCenter, err error) {
24013 var done bool
24014 done, err = future.DoneWithContext(context.Background(), client)
24015 if err != nil {
24016 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersCreateFuture", "Result", future.Response(), "Polling failure")
24017 return
24018 }
24019 if !done {
24020 vc.Response.Response = future.Response()
24021 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationvCentersCreateFuture")
24022 return
24023 }
24024 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
24025 if vc.Response.Response, err = future.GetResult(sender); err == nil && vc.Response.Response.StatusCode != http.StatusNoContent {
24026 vc, err = client.CreateResponder(vc.Response.Response)
24027 if err != nil {
24028 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersCreateFuture", "Result", vc.Response.Response, "Failure responding to request")
24029 }
24030 }
24031 return
24032 }
24033
24034
24035
24036 type ReplicationvCentersDeleteFuture struct {
24037 azure.FutureAPI
24038
24039
24040 Result func(ReplicationvCentersClient) (autorest.Response, error)
24041 }
24042
24043
24044 func (future *ReplicationvCentersDeleteFuture) UnmarshalJSON(body []byte) error {
24045 var azFuture azure.Future
24046 if err := json.Unmarshal(body, &azFuture); err != nil {
24047 return err
24048 }
24049 future.FutureAPI = &azFuture
24050 future.Result = future.result
24051 return nil
24052 }
24053
24054
24055 func (future *ReplicationvCentersDeleteFuture) result(client ReplicationvCentersClient) (ar autorest.Response, err error) {
24056 var done bool
24057 done, err = future.DoneWithContext(context.Background(), client)
24058 if err != nil {
24059 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersDeleteFuture", "Result", future.Response(), "Polling failure")
24060 return
24061 }
24062 if !done {
24063 ar.Response = future.Response()
24064 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationvCentersDeleteFuture")
24065 return
24066 }
24067 ar.Response = future.Response()
24068 return
24069 }
24070
24071
24072
24073 type ReplicationvCentersUpdateFuture struct {
24074 azure.FutureAPI
24075
24076
24077 Result func(ReplicationvCentersClient) (VCenter, error)
24078 }
24079
24080
24081 func (future *ReplicationvCentersUpdateFuture) UnmarshalJSON(body []byte) error {
24082 var azFuture azure.Future
24083 if err := json.Unmarshal(body, &azFuture); err != nil {
24084 return err
24085 }
24086 future.FutureAPI = &azFuture
24087 future.Result = future.result
24088 return nil
24089 }
24090
24091
24092 func (future *ReplicationvCentersUpdateFuture) result(client ReplicationvCentersClient) (vc VCenter, err error) {
24093 var done bool
24094 done, err = future.DoneWithContext(context.Background(), client)
24095 if err != nil {
24096 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersUpdateFuture", "Result", future.Response(), "Polling failure")
24097 return
24098 }
24099 if !done {
24100 vc.Response.Response = future.Response()
24101 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationvCentersUpdateFuture")
24102 return
24103 }
24104 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
24105 if vc.Response.Response, err = future.GetResult(sender); err == nil && vc.Response.Response.StatusCode != http.StatusNoContent {
24106 vc, err = client.UpdateResponder(vc.Response.Response)
24107 if err != nil {
24108 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersUpdateFuture", "Result", vc.Response.Response, "Failure responding to request")
24109 }
24110 }
24111 return
24112 }
24113
24114
24115 type ReprotectAgentDetails struct {
24116
24117 ID *string `json:"id,omitempty"`
24118
24119 Name *string `json:"name,omitempty"`
24120
24121 Version *string `json:"version,omitempty"`
24122
24123 LastHeartbeatUtc *date.Time `json:"lastHeartbeatUtc,omitempty"`
24124
24125 Health ProtectionHealth `json:"health,omitempty"`
24126
24127 HealthErrors *[]HealthError `json:"healthErrors,omitempty"`
24128 }
24129
24130
24131 func (rad ReprotectAgentDetails) MarshalJSON() ([]byte, error) {
24132 objectMap := make(map[string]interface{})
24133 return json.Marshal(objectMap)
24134 }
24135
24136
24137 type ResolveHealthError struct {
24138
24139 HealthErrorID *string `json:"healthErrorId,omitempty"`
24140 }
24141
24142
24143 type ResolveHealthInput struct {
24144
24145 Properties *ResolveHealthInputProperties `json:"properties,omitempty"`
24146 }
24147
24148
24149 type ResolveHealthInputProperties struct {
24150
24151 HealthErrors *[]ResolveHealthError `json:"healthErrors,omitempty"`
24152 }
24153
24154
24155 type Resource struct {
24156
24157 ID *string `json:"id,omitempty"`
24158
24159 Name *string `json:"name,omitempty"`
24160
24161 Type *string `json:"type,omitempty"`
24162
24163 Location *string `json:"location,omitempty"`
24164 }
24165
24166
24167 func (r Resource) MarshalJSON() ([]byte, error) {
24168 objectMap := make(map[string]interface{})
24169 if r.Location != nil {
24170 objectMap["location"] = r.Location
24171 }
24172 return json.Marshal(objectMap)
24173 }
24174
24175
24176
24177 type ResourceHealthSummary struct {
24178
24179 ResourceCount *int32 `json:"resourceCount,omitempty"`
24180
24181 Issues *[]HealthErrorSummary `json:"issues,omitempty"`
24182 }
24183
24184
24185 type ResumeJobParams struct {
24186
24187 Properties *ResumeJobParamsProperties `json:"properties,omitempty"`
24188 }
24189
24190
24191 type ResumeJobParamsProperties struct {
24192
24193 Comments *string `json:"comments,omitempty"`
24194 }
24195
24196
24197 type RetentionVolume struct {
24198
24199 VolumeName *string `json:"volumeName,omitempty"`
24200
24201 CapacityInBytes *int64 `json:"capacityInBytes,omitempty"`
24202
24203 FreeSpaceInBytes *int64 `json:"freeSpaceInBytes,omitempty"`
24204
24205 ThresholdPercentage *int32 `json:"thresholdPercentage,omitempty"`
24206 }
24207
24208
24209 type ReverseReplicationInput struct {
24210
24211 Properties *ReverseReplicationInputProperties `json:"properties,omitempty"`
24212 }
24213
24214
24215 type ReverseReplicationInputProperties struct {
24216
24217 FailoverDirection *string `json:"failoverDirection,omitempty"`
24218
24219 ProviderSpecificDetails BasicReverseReplicationProviderSpecificInput `json:"providerSpecificDetails,omitempty"`
24220 }
24221
24222
24223 func (rrip *ReverseReplicationInputProperties) UnmarshalJSON(body []byte) error {
24224 var m map[string]*json.RawMessage
24225 err := json.Unmarshal(body, &m)
24226 if err != nil {
24227 return err
24228 }
24229 for k, v := range m {
24230 switch k {
24231 case "failoverDirection":
24232 if v != nil {
24233 var failoverDirection string
24234 err = json.Unmarshal(*v, &failoverDirection)
24235 if err != nil {
24236 return err
24237 }
24238 rrip.FailoverDirection = &failoverDirection
24239 }
24240 case "providerSpecificDetails":
24241 if v != nil {
24242 providerSpecificDetails, err := unmarshalBasicReverseReplicationProviderSpecificInput(*v)
24243 if err != nil {
24244 return err
24245 }
24246 rrip.ProviderSpecificDetails = providerSpecificDetails
24247 }
24248 }
24249 }
24250
24251 return nil
24252 }
24253
24254
24255 type BasicReverseReplicationProviderSpecificInput interface {
24256 AsA2AReprotectInput() (*A2AReprotectInput, bool)
24257 AsHyperVReplicaAzureReprotectInput() (*HyperVReplicaAzureReprotectInput, bool)
24258 AsInMageAzureV2ReprotectInput() (*InMageAzureV2ReprotectInput, bool)
24259 AsInMageReprotectInput() (*InMageReprotectInput, bool)
24260 AsReverseReplicationProviderSpecificInput() (*ReverseReplicationProviderSpecificInput, bool)
24261 }
24262
24263
24264 type ReverseReplicationProviderSpecificInput struct {
24265
24266 InstanceType InstanceTypeBasicReverseReplicationProviderSpecificInput `json:"instanceType,omitempty"`
24267 }
24268
24269 func unmarshalBasicReverseReplicationProviderSpecificInput(body []byte) (BasicReverseReplicationProviderSpecificInput, error) {
24270 var m map[string]interface{}
24271 err := json.Unmarshal(body, &m)
24272 if err != nil {
24273 return nil, err
24274 }
24275
24276 switch m["instanceType"] {
24277 case string(InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeA2A):
24278 var ari A2AReprotectInput
24279 err := json.Unmarshal(body, &ari)
24280 return ari, err
24281 case string(InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeHyperVReplicaAzure):
24282 var hvrari HyperVReplicaAzureReprotectInput
24283 err := json.Unmarshal(body, &hvrari)
24284 return hvrari, err
24285 case string(InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMageAzureV2):
24286 var imavri InMageAzureV2ReprotectInput
24287 err := json.Unmarshal(body, &imavri)
24288 return imavri, err
24289 case string(InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMage):
24290 var imri InMageReprotectInput
24291 err := json.Unmarshal(body, &imri)
24292 return imri, err
24293 default:
24294 var rrpsi ReverseReplicationProviderSpecificInput
24295 err := json.Unmarshal(body, &rrpsi)
24296 return rrpsi, err
24297 }
24298 }
24299 func unmarshalBasicReverseReplicationProviderSpecificInputArray(body []byte) ([]BasicReverseReplicationProviderSpecificInput, error) {
24300 var rawMessages []*json.RawMessage
24301 err := json.Unmarshal(body, &rawMessages)
24302 if err != nil {
24303 return nil, err
24304 }
24305
24306 rrpsiArray := make([]BasicReverseReplicationProviderSpecificInput, len(rawMessages))
24307
24308 for index, rawMessage := range rawMessages {
24309 rrpsi, err := unmarshalBasicReverseReplicationProviderSpecificInput(*rawMessage)
24310 if err != nil {
24311 return nil, err
24312 }
24313 rrpsiArray[index] = rrpsi
24314 }
24315 return rrpsiArray, nil
24316 }
24317
24318
24319 func (rrpsi ReverseReplicationProviderSpecificInput) MarshalJSON() ([]byte, error) {
24320 rrpsi.InstanceType = InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeReverseReplicationProviderSpecificInput
24321 objectMap := make(map[string]interface{})
24322 if rrpsi.InstanceType != "" {
24323 objectMap["instanceType"] = rrpsi.InstanceType
24324 }
24325 return json.Marshal(objectMap)
24326 }
24327
24328
24329 func (rrpsi ReverseReplicationProviderSpecificInput) AsA2AReprotectInput() (*A2AReprotectInput, bool) {
24330 return nil, false
24331 }
24332
24333
24334 func (rrpsi ReverseReplicationProviderSpecificInput) AsHyperVReplicaAzureReprotectInput() (*HyperVReplicaAzureReprotectInput, bool) {
24335 return nil, false
24336 }
24337
24338
24339 func (rrpsi ReverseReplicationProviderSpecificInput) AsInMageAzureV2ReprotectInput() (*InMageAzureV2ReprotectInput, bool) {
24340 return nil, false
24341 }
24342
24343
24344 func (rrpsi ReverseReplicationProviderSpecificInput) AsInMageReprotectInput() (*InMageReprotectInput, bool) {
24345 return nil, false
24346 }
24347
24348
24349 func (rrpsi ReverseReplicationProviderSpecificInput) AsReverseReplicationProviderSpecificInput() (*ReverseReplicationProviderSpecificInput, bool) {
24350 return &rrpsi, true
24351 }
24352
24353
24354 func (rrpsi ReverseReplicationProviderSpecificInput) AsBasicReverseReplicationProviderSpecificInput() (BasicReverseReplicationProviderSpecificInput, bool) {
24355 return &rrpsi, true
24356 }
24357
24358
24359 type RoleAssignment struct {
24360
24361 ID *string `json:"id,omitempty"`
24362
24363 Name *string `json:"name,omitempty"`
24364
24365 Scope *string `json:"scope,omitempty"`
24366
24367 PrincipalID *string `json:"principalId,omitempty"`
24368
24369 RoleDefinitionID *string `json:"roleDefinitionId,omitempty"`
24370 }
24371
24372
24373 type RunAsAccount struct {
24374
24375 AccountID *string `json:"accountId,omitempty"`
24376
24377 AccountName *string `json:"accountName,omitempty"`
24378 }
24379
24380
24381 type SanEnableProtectionInput struct {
24382
24383 InstanceType InstanceTypeBasicEnableProtectionProviderSpecificInput `json:"instanceType,omitempty"`
24384 }
24385
24386
24387 func (sepi SanEnableProtectionInput) MarshalJSON() ([]byte, error) {
24388 sepi.InstanceType = InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeSan
24389 objectMap := make(map[string]interface{})
24390 if sepi.InstanceType != "" {
24391 objectMap["instanceType"] = sepi.InstanceType
24392 }
24393 return json.Marshal(objectMap)
24394 }
24395
24396
24397 func (sepi SanEnableProtectionInput) AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool) {
24398 return nil, false
24399 }
24400
24401
24402 func (sepi SanEnableProtectionInput) AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool) {
24403 return nil, false
24404 }
24405
24406
24407 func (sepi SanEnableProtectionInput) AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool) {
24408 return nil, false
24409 }
24410
24411
24412 func (sepi SanEnableProtectionInput) AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool) {
24413 return nil, false
24414 }
24415
24416
24417 func (sepi SanEnableProtectionInput) AsInMageRcmEnableProtectionInput() (*InMageRcmEnableProtectionInput, bool) {
24418 return nil, false
24419 }
24420
24421
24422 func (sepi SanEnableProtectionInput) AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool) {
24423 return &sepi, true
24424 }
24425
24426
24427 func (sepi SanEnableProtectionInput) AsEnableProtectionProviderSpecificInput() (*EnableProtectionProviderSpecificInput, bool) {
24428 return nil, false
24429 }
24430
24431
24432 func (sepi SanEnableProtectionInput) AsBasicEnableProtectionProviderSpecificInput() (BasicEnableProtectionProviderSpecificInput, bool) {
24433 return &sepi, true
24434 }
24435
24436
24437 type ScriptActionTaskDetails struct {
24438
24439 Name *string `json:"name,omitempty"`
24440
24441 Path *string `json:"path,omitempty"`
24442
24443 Output *string `json:"output,omitempty"`
24444
24445 IsPrimarySideScript *bool `json:"isPrimarySideScript,omitempty"`
24446
24447 InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"`
24448 }
24449
24450
24451 func (satd ScriptActionTaskDetails) MarshalJSON() ([]byte, error) {
24452 satd.InstanceType = InstanceTypeScriptActionTaskDetails
24453 objectMap := make(map[string]interface{})
24454 if satd.Name != nil {
24455 objectMap["name"] = satd.Name
24456 }
24457 if satd.Path != nil {
24458 objectMap["path"] = satd.Path
24459 }
24460 if satd.Output != nil {
24461 objectMap["output"] = satd.Output
24462 }
24463 if satd.IsPrimarySideScript != nil {
24464 objectMap["isPrimarySideScript"] = satd.IsPrimarySideScript
24465 }
24466 if satd.InstanceType != "" {
24467 objectMap["instanceType"] = satd.InstanceType
24468 }
24469 return json.Marshal(objectMap)
24470 }
24471
24472
24473 func (satd ScriptActionTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) {
24474 return nil, false
24475 }
24476
24477
24478 func (satd ScriptActionTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) {
24479 return nil, false
24480 }
24481
24482
24483 func (satd ScriptActionTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) {
24484 return nil, false
24485 }
24486
24487
24488 func (satd ScriptActionTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) {
24489 return nil, false
24490 }
24491
24492
24493 func (satd ScriptActionTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) {
24494 return nil, false
24495 }
24496
24497
24498 func (satd ScriptActionTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) {
24499 return &satd, true
24500 }
24501
24502
24503 func (satd ScriptActionTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) {
24504 return nil, false
24505 }
24506
24507
24508 func (satd ScriptActionTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) {
24509 return nil, false
24510 }
24511
24512
24513 func (satd ScriptActionTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) {
24514 return nil, false
24515 }
24516
24517
24518 func (satd ScriptActionTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) {
24519 return &satd, true
24520 }
24521
24522
24523 type ServiceError struct {
24524
24525 Code *string `json:"code,omitempty"`
24526
24527 Message *string `json:"message,omitempty"`
24528
24529 PossibleCauses *string `json:"possibleCauses,omitempty"`
24530
24531 RecommendedAction *string `json:"recommendedAction,omitempty"`
24532
24533 ActivityID *string `json:"activityId,omitempty"`
24534 }
24535
24536
24537 type BasicStorageAccountCustomDetails interface {
24538 AsExistingStorageAccount() (*ExistingStorageAccount, bool)
24539 AsStorageAccountCustomDetails() (*StorageAccountCustomDetails, bool)
24540 }
24541
24542
24543 type StorageAccountCustomDetails struct {
24544
24545 ResourceType ResourceTypeBasicStorageAccountCustomDetails `json:"resourceType,omitempty"`
24546 }
24547
24548 func unmarshalBasicStorageAccountCustomDetails(body []byte) (BasicStorageAccountCustomDetails, error) {
24549 var m map[string]interface{}
24550 err := json.Unmarshal(body, &m)
24551 if err != nil {
24552 return nil, err
24553 }
24554
24555 switch m["resourceType"] {
24556 case string(ResourceTypeBasicStorageAccountCustomDetailsResourceTypeExisting):
24557 var esa ExistingStorageAccount
24558 err := json.Unmarshal(body, &esa)
24559 return esa, err
24560 default:
24561 var sacd StorageAccountCustomDetails
24562 err := json.Unmarshal(body, &sacd)
24563 return sacd, err
24564 }
24565 }
24566 func unmarshalBasicStorageAccountCustomDetailsArray(body []byte) ([]BasicStorageAccountCustomDetails, error) {
24567 var rawMessages []*json.RawMessage
24568 err := json.Unmarshal(body, &rawMessages)
24569 if err != nil {
24570 return nil, err
24571 }
24572
24573 sacdArray := make([]BasicStorageAccountCustomDetails, len(rawMessages))
24574
24575 for index, rawMessage := range rawMessages {
24576 sacd, err := unmarshalBasicStorageAccountCustomDetails(*rawMessage)
24577 if err != nil {
24578 return nil, err
24579 }
24580 sacdArray[index] = sacd
24581 }
24582 return sacdArray, nil
24583 }
24584
24585
24586 func (sacd StorageAccountCustomDetails) MarshalJSON() ([]byte, error) {
24587 sacd.ResourceType = ResourceTypeBasicStorageAccountCustomDetailsResourceTypeStorageAccountCustomDetails
24588 objectMap := make(map[string]interface{})
24589 if sacd.ResourceType != "" {
24590 objectMap["resourceType"] = sacd.ResourceType
24591 }
24592 return json.Marshal(objectMap)
24593 }
24594
24595
24596 func (sacd StorageAccountCustomDetails) AsExistingStorageAccount() (*ExistingStorageAccount, bool) {
24597 return nil, false
24598 }
24599
24600
24601 func (sacd StorageAccountCustomDetails) AsStorageAccountCustomDetails() (*StorageAccountCustomDetails, bool) {
24602 return &sacd, true
24603 }
24604
24605
24606 func (sacd StorageAccountCustomDetails) AsBasicStorageAccountCustomDetails() (BasicStorageAccountCustomDetails, bool) {
24607 return &sacd, true
24608 }
24609
24610
24611 type StorageClassification struct {
24612 autorest.Response `json:"-"`
24613
24614 Properties *StorageClassificationProperties `json:"properties,omitempty"`
24615
24616 ID *string `json:"id,omitempty"`
24617
24618 Name *string `json:"name,omitempty"`
24619
24620 Type *string `json:"type,omitempty"`
24621
24622 Location *string `json:"location,omitempty"`
24623 }
24624
24625
24626 func (sc StorageClassification) MarshalJSON() ([]byte, error) {
24627 objectMap := make(map[string]interface{})
24628 if sc.Properties != nil {
24629 objectMap["properties"] = sc.Properties
24630 }
24631 if sc.Location != nil {
24632 objectMap["location"] = sc.Location
24633 }
24634 return json.Marshal(objectMap)
24635 }
24636
24637
24638 type StorageClassificationCollection struct {
24639 autorest.Response `json:"-"`
24640
24641 Value *[]StorageClassification `json:"value,omitempty"`
24642
24643 NextLink *string `json:"nextLink,omitempty"`
24644 }
24645
24646
24647
24648 type StorageClassificationCollectionIterator struct {
24649 i int
24650 page StorageClassificationCollectionPage
24651 }
24652
24653
24654
24655 func (iter *StorageClassificationCollectionIterator) NextWithContext(ctx context.Context) (err error) {
24656 if tracing.IsEnabled() {
24657 ctx = tracing.StartSpan(ctx, fqdn+"/StorageClassificationCollectionIterator.NextWithContext")
24658 defer func() {
24659 sc := -1
24660 if iter.Response().Response.Response != nil {
24661 sc = iter.Response().Response.Response.StatusCode
24662 }
24663 tracing.EndSpan(ctx, sc, err)
24664 }()
24665 }
24666 iter.i++
24667 if iter.i < len(iter.page.Values()) {
24668 return nil
24669 }
24670 err = iter.page.NextWithContext(ctx)
24671 if err != nil {
24672 iter.i--
24673 return err
24674 }
24675 iter.i = 0
24676 return nil
24677 }
24678
24679
24680
24681
24682 func (iter *StorageClassificationCollectionIterator) Next() error {
24683 return iter.NextWithContext(context.Background())
24684 }
24685
24686
24687 func (iter StorageClassificationCollectionIterator) NotDone() bool {
24688 return iter.page.NotDone() && iter.i < len(iter.page.Values())
24689 }
24690
24691
24692 func (iter StorageClassificationCollectionIterator) Response() StorageClassificationCollection {
24693 return iter.page.Response()
24694 }
24695
24696
24697
24698 func (iter StorageClassificationCollectionIterator) Value() StorageClassification {
24699 if !iter.page.NotDone() {
24700 return StorageClassification{}
24701 }
24702 return iter.page.Values()[iter.i]
24703 }
24704
24705
24706 func NewStorageClassificationCollectionIterator(page StorageClassificationCollectionPage) StorageClassificationCollectionIterator {
24707 return StorageClassificationCollectionIterator{page: page}
24708 }
24709
24710
24711 func (scc StorageClassificationCollection) IsEmpty() bool {
24712 return scc.Value == nil || len(*scc.Value) == 0
24713 }
24714
24715
24716 func (scc StorageClassificationCollection) hasNextLink() bool {
24717 return scc.NextLink != nil && len(*scc.NextLink) != 0
24718 }
24719
24720
24721
24722 func (scc StorageClassificationCollection) storageClassificationCollectionPreparer(ctx context.Context) (*http.Request, error) {
24723 if !scc.hasNextLink() {
24724 return nil, nil
24725 }
24726 return autorest.Prepare((&http.Request{}).WithContext(ctx),
24727 autorest.AsJSON(),
24728 autorest.AsGet(),
24729 autorest.WithBaseURL(to.String(scc.NextLink)))
24730 }
24731
24732
24733 type StorageClassificationCollectionPage struct {
24734 fn func(context.Context, StorageClassificationCollection) (StorageClassificationCollection, error)
24735 scc StorageClassificationCollection
24736 }
24737
24738
24739
24740 func (page *StorageClassificationCollectionPage) NextWithContext(ctx context.Context) (err error) {
24741 if tracing.IsEnabled() {
24742 ctx = tracing.StartSpan(ctx, fqdn+"/StorageClassificationCollectionPage.NextWithContext")
24743 defer func() {
24744 sc := -1
24745 if page.Response().Response.Response != nil {
24746 sc = page.Response().Response.Response.StatusCode
24747 }
24748 tracing.EndSpan(ctx, sc, err)
24749 }()
24750 }
24751 for {
24752 next, err := page.fn(ctx, page.scc)
24753 if err != nil {
24754 return err
24755 }
24756 page.scc = next
24757 if !next.hasNextLink() || !next.IsEmpty() {
24758 break
24759 }
24760 }
24761 return nil
24762 }
24763
24764
24765
24766
24767 func (page *StorageClassificationCollectionPage) Next() error {
24768 return page.NextWithContext(context.Background())
24769 }
24770
24771
24772 func (page StorageClassificationCollectionPage) NotDone() bool {
24773 return !page.scc.IsEmpty()
24774 }
24775
24776
24777 func (page StorageClassificationCollectionPage) Response() StorageClassificationCollection {
24778 return page.scc
24779 }
24780
24781
24782 func (page StorageClassificationCollectionPage) Values() []StorageClassification {
24783 if page.scc.IsEmpty() {
24784 return nil
24785 }
24786 return *page.scc.Value
24787 }
24788
24789
24790 func NewStorageClassificationCollectionPage(cur StorageClassificationCollection, getNextPage func(context.Context, StorageClassificationCollection) (StorageClassificationCollection, error)) StorageClassificationCollectionPage {
24791 return StorageClassificationCollectionPage{
24792 fn: getNextPage,
24793 scc: cur,
24794 }
24795 }
24796
24797
24798 type StorageClassificationMapping struct {
24799 autorest.Response `json:"-"`
24800
24801 Properties *StorageClassificationMappingProperties `json:"properties,omitempty"`
24802
24803 ID *string `json:"id,omitempty"`
24804
24805 Name *string `json:"name,omitempty"`
24806
24807 Type *string `json:"type,omitempty"`
24808
24809 Location *string `json:"location,omitempty"`
24810 }
24811
24812
24813 func (scm StorageClassificationMapping) MarshalJSON() ([]byte, error) {
24814 objectMap := make(map[string]interface{})
24815 if scm.Properties != nil {
24816 objectMap["properties"] = scm.Properties
24817 }
24818 if scm.Location != nil {
24819 objectMap["location"] = scm.Location
24820 }
24821 return json.Marshal(objectMap)
24822 }
24823
24824
24825 type StorageClassificationMappingCollection struct {
24826 autorest.Response `json:"-"`
24827
24828 Value *[]StorageClassificationMapping `json:"value,omitempty"`
24829
24830 NextLink *string `json:"nextLink,omitempty"`
24831 }
24832
24833
24834
24835 type StorageClassificationMappingCollectionIterator struct {
24836 i int
24837 page StorageClassificationMappingCollectionPage
24838 }
24839
24840
24841
24842 func (iter *StorageClassificationMappingCollectionIterator) NextWithContext(ctx context.Context) (err error) {
24843 if tracing.IsEnabled() {
24844 ctx = tracing.StartSpan(ctx, fqdn+"/StorageClassificationMappingCollectionIterator.NextWithContext")
24845 defer func() {
24846 sc := -1
24847 if iter.Response().Response.Response != nil {
24848 sc = iter.Response().Response.Response.StatusCode
24849 }
24850 tracing.EndSpan(ctx, sc, err)
24851 }()
24852 }
24853 iter.i++
24854 if iter.i < len(iter.page.Values()) {
24855 return nil
24856 }
24857 err = iter.page.NextWithContext(ctx)
24858 if err != nil {
24859 iter.i--
24860 return err
24861 }
24862 iter.i = 0
24863 return nil
24864 }
24865
24866
24867
24868
24869 func (iter *StorageClassificationMappingCollectionIterator) Next() error {
24870 return iter.NextWithContext(context.Background())
24871 }
24872
24873
24874 func (iter StorageClassificationMappingCollectionIterator) NotDone() bool {
24875 return iter.page.NotDone() && iter.i < len(iter.page.Values())
24876 }
24877
24878
24879 func (iter StorageClassificationMappingCollectionIterator) Response() StorageClassificationMappingCollection {
24880 return iter.page.Response()
24881 }
24882
24883
24884
24885 func (iter StorageClassificationMappingCollectionIterator) Value() StorageClassificationMapping {
24886 if !iter.page.NotDone() {
24887 return StorageClassificationMapping{}
24888 }
24889 return iter.page.Values()[iter.i]
24890 }
24891
24892
24893 func NewStorageClassificationMappingCollectionIterator(page StorageClassificationMappingCollectionPage) StorageClassificationMappingCollectionIterator {
24894 return StorageClassificationMappingCollectionIterator{page: page}
24895 }
24896
24897
24898 func (scmc StorageClassificationMappingCollection) IsEmpty() bool {
24899 return scmc.Value == nil || len(*scmc.Value) == 0
24900 }
24901
24902
24903 func (scmc StorageClassificationMappingCollection) hasNextLink() bool {
24904 return scmc.NextLink != nil && len(*scmc.NextLink) != 0
24905 }
24906
24907
24908
24909 func (scmc StorageClassificationMappingCollection) storageClassificationMappingCollectionPreparer(ctx context.Context) (*http.Request, error) {
24910 if !scmc.hasNextLink() {
24911 return nil, nil
24912 }
24913 return autorest.Prepare((&http.Request{}).WithContext(ctx),
24914 autorest.AsJSON(),
24915 autorest.AsGet(),
24916 autorest.WithBaseURL(to.String(scmc.NextLink)))
24917 }
24918
24919
24920 type StorageClassificationMappingCollectionPage struct {
24921 fn func(context.Context, StorageClassificationMappingCollection) (StorageClassificationMappingCollection, error)
24922 scmc StorageClassificationMappingCollection
24923 }
24924
24925
24926
24927 func (page *StorageClassificationMappingCollectionPage) NextWithContext(ctx context.Context) (err error) {
24928 if tracing.IsEnabled() {
24929 ctx = tracing.StartSpan(ctx, fqdn+"/StorageClassificationMappingCollectionPage.NextWithContext")
24930 defer func() {
24931 sc := -1
24932 if page.Response().Response.Response != nil {
24933 sc = page.Response().Response.Response.StatusCode
24934 }
24935 tracing.EndSpan(ctx, sc, err)
24936 }()
24937 }
24938 for {
24939 next, err := page.fn(ctx, page.scmc)
24940 if err != nil {
24941 return err
24942 }
24943 page.scmc = next
24944 if !next.hasNextLink() || !next.IsEmpty() {
24945 break
24946 }
24947 }
24948 return nil
24949 }
24950
24951
24952
24953
24954 func (page *StorageClassificationMappingCollectionPage) Next() error {
24955 return page.NextWithContext(context.Background())
24956 }
24957
24958
24959 func (page StorageClassificationMappingCollectionPage) NotDone() bool {
24960 return !page.scmc.IsEmpty()
24961 }
24962
24963
24964 func (page StorageClassificationMappingCollectionPage) Response() StorageClassificationMappingCollection {
24965 return page.scmc
24966 }
24967
24968
24969 func (page StorageClassificationMappingCollectionPage) Values() []StorageClassificationMapping {
24970 if page.scmc.IsEmpty() {
24971 return nil
24972 }
24973 return *page.scmc.Value
24974 }
24975
24976
24977 func NewStorageClassificationMappingCollectionPage(cur StorageClassificationMappingCollection, getNextPage func(context.Context, StorageClassificationMappingCollection) (StorageClassificationMappingCollection, error)) StorageClassificationMappingCollectionPage {
24978 return StorageClassificationMappingCollectionPage{
24979 fn: getNextPage,
24980 scmc: cur,
24981 }
24982 }
24983
24984
24985 type StorageClassificationMappingInput struct {
24986
24987 Properties *StorageMappingInputProperties `json:"properties,omitempty"`
24988 }
24989
24990
24991 type StorageClassificationMappingProperties struct {
24992
24993 TargetStorageClassificationID *string `json:"targetStorageClassificationId,omitempty"`
24994 }
24995
24996
24997 type StorageClassificationProperties struct {
24998
24999 FriendlyName *string `json:"friendlyName,omitempty"`
25000 }
25001
25002
25003 type StorageMappingInputProperties struct {
25004
25005 TargetStorageClassificationID *string `json:"targetStorageClassificationId,omitempty"`
25006 }
25007
25008
25009 type Subnet struct {
25010
25011 Name *string `json:"name,omitempty"`
25012
25013 FriendlyName *string `json:"friendlyName,omitempty"`
25014
25015 AddressList *[]string `json:"addressList,omitempty"`
25016 }
25017
25018
25019 type SupportedOperatingSystems struct {
25020 autorest.Response `json:"-"`
25021
25022 Properties *SupportedOSProperties `json:"properties,omitempty"`
25023
25024 ID *string `json:"id,omitempty"`
25025
25026 Name *string `json:"name,omitempty"`
25027
25028 Type *string `json:"type,omitempty"`
25029
25030 Location *string `json:"location,omitempty"`
25031 }
25032
25033
25034 func (sos SupportedOperatingSystems) MarshalJSON() ([]byte, error) {
25035 objectMap := make(map[string]interface{})
25036 if sos.Properties != nil {
25037 objectMap["properties"] = sos.Properties
25038 }
25039 if sos.Location != nil {
25040 objectMap["location"] = sos.Location
25041 }
25042 return json.Marshal(objectMap)
25043 }
25044
25045
25046 type SupportedOSDetails struct {
25047
25048 OsName *string `json:"osName,omitempty"`
25049
25050 OsType *string `json:"osType,omitempty"`
25051
25052 OsVersions *[]OSVersionWrapper `json:"osVersions,omitempty"`
25053 }
25054
25055
25056 type SupportedOSProperties struct {
25057
25058 SupportedOsList *[]SupportedOSProperty `json:"supportedOsList,omitempty"`
25059 }
25060
25061
25062 type SupportedOSProperty struct {
25063
25064 InstanceType *string `json:"instanceType,omitempty"`
25065
25066 SupportedOs *[]SupportedOSDetails `json:"supportedOs,omitempty"`
25067 }
25068
25069
25070 func (sop SupportedOSProperty) MarshalJSON() ([]byte, error) {
25071 objectMap := make(map[string]interface{})
25072 if sop.SupportedOs != nil {
25073 objectMap["supportedOs"] = sop.SupportedOs
25074 }
25075 return json.Marshal(objectMap)
25076 }
25077
25078
25079 type SwitchProtectionInput struct {
25080
25081 Properties *SwitchProtectionInputProperties `json:"properties,omitempty"`
25082 }
25083
25084
25085 type SwitchProtectionInputProperties struct {
25086
25087 ReplicationProtectedItemName *string `json:"replicationProtectedItemName,omitempty"`
25088
25089 ProviderSpecificDetails BasicSwitchProtectionProviderSpecificInput `json:"providerSpecificDetails,omitempty"`
25090 }
25091
25092
25093 func (spip *SwitchProtectionInputProperties) UnmarshalJSON(body []byte) error {
25094 var m map[string]*json.RawMessage
25095 err := json.Unmarshal(body, &m)
25096 if err != nil {
25097 return err
25098 }
25099 for k, v := range m {
25100 switch k {
25101 case "replicationProtectedItemName":
25102 if v != nil {
25103 var replicationProtectedItemName string
25104 err = json.Unmarshal(*v, &replicationProtectedItemName)
25105 if err != nil {
25106 return err
25107 }
25108 spip.ReplicationProtectedItemName = &replicationProtectedItemName
25109 }
25110 case "providerSpecificDetails":
25111 if v != nil {
25112 providerSpecificDetails, err := unmarshalBasicSwitchProtectionProviderSpecificInput(*v)
25113 if err != nil {
25114 return err
25115 }
25116 spip.ProviderSpecificDetails = providerSpecificDetails
25117 }
25118 }
25119 }
25120
25121 return nil
25122 }
25123
25124
25125 type SwitchProtectionJobDetails struct {
25126
25127 NewReplicationProtectedItemID *string `json:"newReplicationProtectedItemId,omitempty"`
25128
25129 AffectedObjectDetails map[string]*string `json:"affectedObjectDetails"`
25130
25131 InstanceType InstanceTypeBasicJobDetails `json:"instanceType,omitempty"`
25132 }
25133
25134
25135 func (spjd SwitchProtectionJobDetails) MarshalJSON() ([]byte, error) {
25136 spjd.InstanceType = InstanceTypeSwitchProtectionJobDetails
25137 objectMap := make(map[string]interface{})
25138 if spjd.NewReplicationProtectedItemID != nil {
25139 objectMap["newReplicationProtectedItemId"] = spjd.NewReplicationProtectedItemID
25140 }
25141 if spjd.AffectedObjectDetails != nil {
25142 objectMap["affectedObjectDetails"] = spjd.AffectedObjectDetails
25143 }
25144 if spjd.InstanceType != "" {
25145 objectMap["instanceType"] = spjd.InstanceType
25146 }
25147 return json.Marshal(objectMap)
25148 }
25149
25150
25151 func (spjd SwitchProtectionJobDetails) AsAsrJobDetails() (*AsrJobDetails, bool) {
25152 return nil, false
25153 }
25154
25155
25156 func (spjd SwitchProtectionJobDetails) AsExportJobDetails() (*ExportJobDetails, bool) {
25157 return nil, false
25158 }
25159
25160
25161 func (spjd SwitchProtectionJobDetails) AsFailoverJobDetails() (*FailoverJobDetails, bool) {
25162 return nil, false
25163 }
25164
25165
25166 func (spjd SwitchProtectionJobDetails) AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool) {
25167 return &spjd, true
25168 }
25169
25170
25171 func (spjd SwitchProtectionJobDetails) AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool) {
25172 return nil, false
25173 }
25174
25175
25176 func (spjd SwitchProtectionJobDetails) AsJobDetails() (*JobDetails, bool) {
25177 return nil, false
25178 }
25179
25180
25181 func (spjd SwitchProtectionJobDetails) AsBasicJobDetails() (BasicJobDetails, bool) {
25182 return &spjd, true
25183 }
25184
25185
25186 type BasicSwitchProtectionProviderSpecificInput interface {
25187 AsA2ASwitchProtectionInput() (*A2ASwitchProtectionInput, bool)
25188 AsSwitchProtectionProviderSpecificInput() (*SwitchProtectionProviderSpecificInput, bool)
25189 }
25190
25191
25192 type SwitchProtectionProviderSpecificInput struct {
25193
25194 InstanceType InstanceTypeBasicSwitchProtectionProviderSpecificInput `json:"instanceType,omitempty"`
25195 }
25196
25197 func unmarshalBasicSwitchProtectionProviderSpecificInput(body []byte) (BasicSwitchProtectionProviderSpecificInput, error) {
25198 var m map[string]interface{}
25199 err := json.Unmarshal(body, &m)
25200 if err != nil {
25201 return nil, err
25202 }
25203
25204 switch m["instanceType"] {
25205 case string(InstanceTypeBasicSwitchProtectionProviderSpecificInputInstanceTypeA2A):
25206 var aspi A2ASwitchProtectionInput
25207 err := json.Unmarshal(body, &aspi)
25208 return aspi, err
25209 default:
25210 var sppsi SwitchProtectionProviderSpecificInput
25211 err := json.Unmarshal(body, &sppsi)
25212 return sppsi, err
25213 }
25214 }
25215 func unmarshalBasicSwitchProtectionProviderSpecificInputArray(body []byte) ([]BasicSwitchProtectionProviderSpecificInput, error) {
25216 var rawMessages []*json.RawMessage
25217 err := json.Unmarshal(body, &rawMessages)
25218 if err != nil {
25219 return nil, err
25220 }
25221
25222 sppsiArray := make([]BasicSwitchProtectionProviderSpecificInput, len(rawMessages))
25223
25224 for index, rawMessage := range rawMessages {
25225 sppsi, err := unmarshalBasicSwitchProtectionProviderSpecificInput(*rawMessage)
25226 if err != nil {
25227 return nil, err
25228 }
25229 sppsiArray[index] = sppsi
25230 }
25231 return sppsiArray, nil
25232 }
25233
25234
25235 func (sppsi SwitchProtectionProviderSpecificInput) MarshalJSON() ([]byte, error) {
25236 sppsi.InstanceType = InstanceTypeBasicSwitchProtectionProviderSpecificInputInstanceTypeSwitchProtectionProviderSpecificInput
25237 objectMap := make(map[string]interface{})
25238 if sppsi.InstanceType != "" {
25239 objectMap["instanceType"] = sppsi.InstanceType
25240 }
25241 return json.Marshal(objectMap)
25242 }
25243
25244
25245 func (sppsi SwitchProtectionProviderSpecificInput) AsA2ASwitchProtectionInput() (*A2ASwitchProtectionInput, bool) {
25246 return nil, false
25247 }
25248
25249
25250 func (sppsi SwitchProtectionProviderSpecificInput) AsSwitchProtectionProviderSpecificInput() (*SwitchProtectionProviderSpecificInput, bool) {
25251 return &sppsi, true
25252 }
25253
25254
25255 func (sppsi SwitchProtectionProviderSpecificInput) AsBasicSwitchProtectionProviderSpecificInput() (BasicSwitchProtectionProviderSpecificInput, bool) {
25256 return &sppsi, true
25257 }
25258
25259
25260 type TargetComputeSize struct {
25261
25262 ID *string `json:"id,omitempty"`
25263
25264 Name *string `json:"name,omitempty"`
25265
25266 Type *string `json:"type,omitempty"`
25267
25268 Properties *TargetComputeSizeProperties `json:"properties,omitempty"`
25269 }
25270
25271
25272 type TargetComputeSizeCollection struct {
25273 autorest.Response `json:"-"`
25274
25275 Value *[]TargetComputeSize `json:"value,omitempty"`
25276
25277 NextLink *string `json:"nextLink,omitempty"`
25278 }
25279
25280
25281 type TargetComputeSizeCollectionIterator struct {
25282 i int
25283 page TargetComputeSizeCollectionPage
25284 }
25285
25286
25287
25288 func (iter *TargetComputeSizeCollectionIterator) NextWithContext(ctx context.Context) (err error) {
25289 if tracing.IsEnabled() {
25290 ctx = tracing.StartSpan(ctx, fqdn+"/TargetComputeSizeCollectionIterator.NextWithContext")
25291 defer func() {
25292 sc := -1
25293 if iter.Response().Response.Response != nil {
25294 sc = iter.Response().Response.Response.StatusCode
25295 }
25296 tracing.EndSpan(ctx, sc, err)
25297 }()
25298 }
25299 iter.i++
25300 if iter.i < len(iter.page.Values()) {
25301 return nil
25302 }
25303 err = iter.page.NextWithContext(ctx)
25304 if err != nil {
25305 iter.i--
25306 return err
25307 }
25308 iter.i = 0
25309 return nil
25310 }
25311
25312
25313
25314
25315 func (iter *TargetComputeSizeCollectionIterator) Next() error {
25316 return iter.NextWithContext(context.Background())
25317 }
25318
25319
25320 func (iter TargetComputeSizeCollectionIterator) NotDone() bool {
25321 return iter.page.NotDone() && iter.i < len(iter.page.Values())
25322 }
25323
25324
25325 func (iter TargetComputeSizeCollectionIterator) Response() TargetComputeSizeCollection {
25326 return iter.page.Response()
25327 }
25328
25329
25330
25331 func (iter TargetComputeSizeCollectionIterator) Value() TargetComputeSize {
25332 if !iter.page.NotDone() {
25333 return TargetComputeSize{}
25334 }
25335 return iter.page.Values()[iter.i]
25336 }
25337
25338
25339 func NewTargetComputeSizeCollectionIterator(page TargetComputeSizeCollectionPage) TargetComputeSizeCollectionIterator {
25340 return TargetComputeSizeCollectionIterator{page: page}
25341 }
25342
25343
25344 func (tcsc TargetComputeSizeCollection) IsEmpty() bool {
25345 return tcsc.Value == nil || len(*tcsc.Value) == 0
25346 }
25347
25348
25349 func (tcsc TargetComputeSizeCollection) hasNextLink() bool {
25350 return tcsc.NextLink != nil && len(*tcsc.NextLink) != 0
25351 }
25352
25353
25354
25355 func (tcsc TargetComputeSizeCollection) targetComputeSizeCollectionPreparer(ctx context.Context) (*http.Request, error) {
25356 if !tcsc.hasNextLink() {
25357 return nil, nil
25358 }
25359 return autorest.Prepare((&http.Request{}).WithContext(ctx),
25360 autorest.AsJSON(),
25361 autorest.AsGet(),
25362 autorest.WithBaseURL(to.String(tcsc.NextLink)))
25363 }
25364
25365
25366 type TargetComputeSizeCollectionPage struct {
25367 fn func(context.Context, TargetComputeSizeCollection) (TargetComputeSizeCollection, error)
25368 tcsc TargetComputeSizeCollection
25369 }
25370
25371
25372
25373 func (page *TargetComputeSizeCollectionPage) NextWithContext(ctx context.Context) (err error) {
25374 if tracing.IsEnabled() {
25375 ctx = tracing.StartSpan(ctx, fqdn+"/TargetComputeSizeCollectionPage.NextWithContext")
25376 defer func() {
25377 sc := -1
25378 if page.Response().Response.Response != nil {
25379 sc = page.Response().Response.Response.StatusCode
25380 }
25381 tracing.EndSpan(ctx, sc, err)
25382 }()
25383 }
25384 for {
25385 next, err := page.fn(ctx, page.tcsc)
25386 if err != nil {
25387 return err
25388 }
25389 page.tcsc = next
25390 if !next.hasNextLink() || !next.IsEmpty() {
25391 break
25392 }
25393 }
25394 return nil
25395 }
25396
25397
25398
25399
25400 func (page *TargetComputeSizeCollectionPage) Next() error {
25401 return page.NextWithContext(context.Background())
25402 }
25403
25404
25405 func (page TargetComputeSizeCollectionPage) NotDone() bool {
25406 return !page.tcsc.IsEmpty()
25407 }
25408
25409
25410 func (page TargetComputeSizeCollectionPage) Response() TargetComputeSizeCollection {
25411 return page.tcsc
25412 }
25413
25414
25415 func (page TargetComputeSizeCollectionPage) Values() []TargetComputeSize {
25416 if page.tcsc.IsEmpty() {
25417 return nil
25418 }
25419 return *page.tcsc.Value
25420 }
25421
25422
25423 func NewTargetComputeSizeCollectionPage(cur TargetComputeSizeCollection, getNextPage func(context.Context, TargetComputeSizeCollection) (TargetComputeSizeCollection, error)) TargetComputeSizeCollectionPage {
25424 return TargetComputeSizeCollectionPage{
25425 fn: getNextPage,
25426 tcsc: cur,
25427 }
25428 }
25429
25430
25431 type TargetComputeSizeProperties struct {
25432
25433 Name *string `json:"name,omitempty"`
25434
25435 FriendlyName *string `json:"friendlyName,omitempty"`
25436
25437 CPUCoresCount *int32 `json:"cpuCoresCount,omitempty"`
25438
25439 VCPUsAvailable *int32 `json:"vCPUsAvailable,omitempty"`
25440
25441 MemoryInGB *float64 `json:"memoryInGB,omitempty"`
25442
25443 MaxDataDiskCount *int32 `json:"maxDataDiskCount,omitempty"`
25444
25445 MaxNicsCount *int32 `json:"maxNicsCount,omitempty"`
25446
25447 Errors *[]ComputeSizeErrorDetails `json:"errors,omitempty"`
25448
25449 HighIopsSupported *string `json:"highIopsSupported,omitempty"`
25450
25451 HyperVGenerations *[]string `json:"hyperVGenerations,omitempty"`
25452 }
25453
25454
25455 func (tcsp TargetComputeSizeProperties) MarshalJSON() ([]byte, error) {
25456 objectMap := make(map[string]interface{})
25457 if tcsp.Name != nil {
25458 objectMap["name"] = tcsp.Name
25459 }
25460 if tcsp.FriendlyName != nil {
25461 objectMap["friendlyName"] = tcsp.FriendlyName
25462 }
25463 if tcsp.CPUCoresCount != nil {
25464 objectMap["cpuCoresCount"] = tcsp.CPUCoresCount
25465 }
25466 if tcsp.MemoryInGB != nil {
25467 objectMap["memoryInGB"] = tcsp.MemoryInGB
25468 }
25469 if tcsp.MaxDataDiskCount != nil {
25470 objectMap["maxDataDiskCount"] = tcsp.MaxDataDiskCount
25471 }
25472 if tcsp.MaxNicsCount != nil {
25473 objectMap["maxNicsCount"] = tcsp.MaxNicsCount
25474 }
25475 if tcsp.Errors != nil {
25476 objectMap["errors"] = tcsp.Errors
25477 }
25478 if tcsp.HighIopsSupported != nil {
25479 objectMap["highIopsSupported"] = tcsp.HighIopsSupported
25480 }
25481 return json.Marshal(objectMap)
25482 }
25483
25484
25485 type BasicTaskTypeDetails interface {
25486 AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool)
25487 AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool)
25488 AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool)
25489 AsJobTaskDetails() (*JobTaskDetails, bool)
25490 AsManualActionTaskDetails() (*ManualActionTaskDetails, bool)
25491 AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool)
25492 AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool)
25493 AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool)
25494 AsTaskTypeDetails() (*TaskTypeDetails, bool)
25495 }
25496
25497
25498 type TaskTypeDetails struct {
25499
25500 InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"`
25501 }
25502
25503 func unmarshalBasicTaskTypeDetails(body []byte) (BasicTaskTypeDetails, error) {
25504 var m map[string]interface{}
25505 err := json.Unmarshal(body, &m)
25506 if err != nil {
25507 return nil, err
25508 }
25509
25510 switch m["instanceType"] {
25511 case string(InstanceTypeAutomationRunbookTaskDetails):
25512 var artd AutomationRunbookTaskDetails
25513 err := json.Unmarshal(body, &artd)
25514 return artd, err
25515 case string(InstanceTypeConsistencyCheckTaskDetails):
25516 var cctd ConsistencyCheckTaskDetails
25517 err := json.Unmarshal(body, &cctd)
25518 return cctd, err
25519 case string(InstanceTypeFabricReplicationGroupTaskDetails):
25520 var frgtd FabricReplicationGroupTaskDetails
25521 err := json.Unmarshal(body, &frgtd)
25522 return frgtd, err
25523 case string(InstanceTypeJobTaskDetails):
25524 var jtd JobTaskDetails
25525 err := json.Unmarshal(body, &jtd)
25526 return jtd, err
25527 case string(InstanceTypeManualActionTaskDetails):
25528 var matd ManualActionTaskDetails
25529 err := json.Unmarshal(body, &matd)
25530 return matd, err
25531 case string(InstanceTypeScriptActionTaskDetails):
25532 var satd ScriptActionTaskDetails
25533 err := json.Unmarshal(body, &satd)
25534 return satd, err
25535 case string(InstanceTypeVirtualMachineTaskDetails):
25536 var vmtd VirtualMachineTaskDetails
25537 err := json.Unmarshal(body, &vmtd)
25538 return vmtd, err
25539 case string(InstanceTypeVMNicUpdatesTaskDetails):
25540 var vnutd VMNicUpdatesTaskDetails
25541 err := json.Unmarshal(body, &vnutd)
25542 return vnutd, err
25543 default:
25544 var ttd TaskTypeDetails
25545 err := json.Unmarshal(body, &ttd)
25546 return ttd, err
25547 }
25548 }
25549 func unmarshalBasicTaskTypeDetailsArray(body []byte) ([]BasicTaskTypeDetails, error) {
25550 var rawMessages []*json.RawMessage
25551 err := json.Unmarshal(body, &rawMessages)
25552 if err != nil {
25553 return nil, err
25554 }
25555
25556 ttdArray := make([]BasicTaskTypeDetails, len(rawMessages))
25557
25558 for index, rawMessage := range rawMessages {
25559 ttd, err := unmarshalBasicTaskTypeDetails(*rawMessage)
25560 if err != nil {
25561 return nil, err
25562 }
25563 ttdArray[index] = ttd
25564 }
25565 return ttdArray, nil
25566 }
25567
25568
25569 func (ttd TaskTypeDetails) MarshalJSON() ([]byte, error) {
25570 ttd.InstanceType = InstanceTypeTaskTypeDetails
25571 objectMap := make(map[string]interface{})
25572 if ttd.InstanceType != "" {
25573 objectMap["instanceType"] = ttd.InstanceType
25574 }
25575 return json.Marshal(objectMap)
25576 }
25577
25578
25579 func (ttd TaskTypeDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) {
25580 return nil, false
25581 }
25582
25583
25584 func (ttd TaskTypeDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) {
25585 return nil, false
25586 }
25587
25588
25589 func (ttd TaskTypeDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) {
25590 return nil, false
25591 }
25592
25593
25594 func (ttd TaskTypeDetails) AsJobTaskDetails() (*JobTaskDetails, bool) {
25595 return nil, false
25596 }
25597
25598
25599 func (ttd TaskTypeDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) {
25600 return nil, false
25601 }
25602
25603
25604 func (ttd TaskTypeDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) {
25605 return nil, false
25606 }
25607
25608
25609 func (ttd TaskTypeDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) {
25610 return nil, false
25611 }
25612
25613
25614 func (ttd TaskTypeDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) {
25615 return nil, false
25616 }
25617
25618
25619 func (ttd TaskTypeDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) {
25620 return &ttd, true
25621 }
25622
25623
25624 func (ttd TaskTypeDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) {
25625 return &ttd, true
25626 }
25627
25628
25629 type TestFailoverCleanupInput struct {
25630
25631 Properties *TestFailoverCleanupInputProperties `json:"properties,omitempty"`
25632 }
25633
25634
25635 type TestFailoverCleanupInputProperties struct {
25636
25637 Comments *string `json:"comments,omitempty"`
25638 }
25639
25640
25641 type TestFailoverInput struct {
25642
25643 Properties *TestFailoverInputProperties `json:"properties,omitempty"`
25644 }
25645
25646
25647 type TestFailoverInputProperties struct {
25648
25649 FailoverDirection *string `json:"failoverDirection,omitempty"`
25650
25651 NetworkType *string `json:"networkType,omitempty"`
25652
25653 NetworkID *string `json:"networkId,omitempty"`
25654
25655 SkipTestFailoverCleanup *string `json:"skipTestFailoverCleanup,omitempty"`
25656
25657 ProviderSpecificDetails BasicTestFailoverProviderSpecificInput `json:"providerSpecificDetails,omitempty"`
25658 }
25659
25660
25661 func (tfip *TestFailoverInputProperties) UnmarshalJSON(body []byte) error {
25662 var m map[string]*json.RawMessage
25663 err := json.Unmarshal(body, &m)
25664 if err != nil {
25665 return err
25666 }
25667 for k, v := range m {
25668 switch k {
25669 case "failoverDirection":
25670 if v != nil {
25671 var failoverDirection string
25672 err = json.Unmarshal(*v, &failoverDirection)
25673 if err != nil {
25674 return err
25675 }
25676 tfip.FailoverDirection = &failoverDirection
25677 }
25678 case "networkType":
25679 if v != nil {
25680 var networkType string
25681 err = json.Unmarshal(*v, &networkType)
25682 if err != nil {
25683 return err
25684 }
25685 tfip.NetworkType = &networkType
25686 }
25687 case "networkId":
25688 if v != nil {
25689 var networkID string
25690 err = json.Unmarshal(*v, &networkID)
25691 if err != nil {
25692 return err
25693 }
25694 tfip.NetworkID = &networkID
25695 }
25696 case "skipTestFailoverCleanup":
25697 if v != nil {
25698 var skipTestFailoverCleanup string
25699 err = json.Unmarshal(*v, &skipTestFailoverCleanup)
25700 if err != nil {
25701 return err
25702 }
25703 tfip.SkipTestFailoverCleanup = &skipTestFailoverCleanup
25704 }
25705 case "providerSpecificDetails":
25706 if v != nil {
25707 providerSpecificDetails, err := unmarshalBasicTestFailoverProviderSpecificInput(*v)
25708 if err != nil {
25709 return err
25710 }
25711 tfip.ProviderSpecificDetails = providerSpecificDetails
25712 }
25713 }
25714 }
25715
25716 return nil
25717 }
25718
25719
25720 type TestFailoverJobDetails struct {
25721
25722 TestFailoverStatus *string `json:"testFailoverStatus,omitempty"`
25723
25724 Comments *string `json:"comments,omitempty"`
25725
25726 NetworkName *string `json:"networkName,omitempty"`
25727
25728 NetworkFriendlyName *string `json:"networkFriendlyName,omitempty"`
25729
25730 NetworkType *string `json:"networkType,omitempty"`
25731
25732 ProtectedItemDetails *[]FailoverReplicationProtectedItemDetails `json:"protectedItemDetails,omitempty"`
25733
25734 AffectedObjectDetails map[string]*string `json:"affectedObjectDetails"`
25735
25736 InstanceType InstanceTypeBasicJobDetails `json:"instanceType,omitempty"`
25737 }
25738
25739
25740 func (tfjd TestFailoverJobDetails) MarshalJSON() ([]byte, error) {
25741 tfjd.InstanceType = InstanceTypeTestFailoverJobDetails
25742 objectMap := make(map[string]interface{})
25743 if tfjd.TestFailoverStatus != nil {
25744 objectMap["testFailoverStatus"] = tfjd.TestFailoverStatus
25745 }
25746 if tfjd.Comments != nil {
25747 objectMap["comments"] = tfjd.Comments
25748 }
25749 if tfjd.NetworkName != nil {
25750 objectMap["networkName"] = tfjd.NetworkName
25751 }
25752 if tfjd.NetworkFriendlyName != nil {
25753 objectMap["networkFriendlyName"] = tfjd.NetworkFriendlyName
25754 }
25755 if tfjd.NetworkType != nil {
25756 objectMap["networkType"] = tfjd.NetworkType
25757 }
25758 if tfjd.ProtectedItemDetails != nil {
25759 objectMap["protectedItemDetails"] = tfjd.ProtectedItemDetails
25760 }
25761 if tfjd.AffectedObjectDetails != nil {
25762 objectMap["affectedObjectDetails"] = tfjd.AffectedObjectDetails
25763 }
25764 if tfjd.InstanceType != "" {
25765 objectMap["instanceType"] = tfjd.InstanceType
25766 }
25767 return json.Marshal(objectMap)
25768 }
25769
25770
25771 func (tfjd TestFailoverJobDetails) AsAsrJobDetails() (*AsrJobDetails, bool) {
25772 return nil, false
25773 }
25774
25775
25776 func (tfjd TestFailoverJobDetails) AsExportJobDetails() (*ExportJobDetails, bool) {
25777 return nil, false
25778 }
25779
25780
25781 func (tfjd TestFailoverJobDetails) AsFailoverJobDetails() (*FailoverJobDetails, bool) {
25782 return nil, false
25783 }
25784
25785
25786 func (tfjd TestFailoverJobDetails) AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool) {
25787 return nil, false
25788 }
25789
25790
25791 func (tfjd TestFailoverJobDetails) AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool) {
25792 return &tfjd, true
25793 }
25794
25795
25796 func (tfjd TestFailoverJobDetails) AsJobDetails() (*JobDetails, bool) {
25797 return nil, false
25798 }
25799
25800
25801 func (tfjd TestFailoverJobDetails) AsBasicJobDetails() (BasicJobDetails, bool) {
25802 return &tfjd, true
25803 }
25804
25805
25806 type BasicTestFailoverProviderSpecificInput interface {
25807 AsA2ATestFailoverInput() (*A2ATestFailoverInput, bool)
25808 AsHyperVReplicaAzureTestFailoverInput() (*HyperVReplicaAzureTestFailoverInput, bool)
25809 AsInMageAzureV2TestFailoverInput() (*InMageAzureV2TestFailoverInput, bool)
25810 AsInMageRcmTestFailoverInput() (*InMageRcmTestFailoverInput, bool)
25811 AsInMageTestFailoverInput() (*InMageTestFailoverInput, bool)
25812 AsTestFailoverProviderSpecificInput() (*TestFailoverProviderSpecificInput, bool)
25813 }
25814
25815
25816 type TestFailoverProviderSpecificInput struct {
25817
25818 InstanceType InstanceTypeBasicTestFailoverProviderSpecificInput `json:"instanceType,omitempty"`
25819 }
25820
25821 func unmarshalBasicTestFailoverProviderSpecificInput(body []byte) (BasicTestFailoverProviderSpecificInput, error) {
25822 var m map[string]interface{}
25823 err := json.Unmarshal(body, &m)
25824 if err != nil {
25825 return nil, err
25826 }
25827
25828 switch m["instanceType"] {
25829 case string(InstanceTypeBasicTestFailoverProviderSpecificInputInstanceTypeA2A):
25830 var atfi A2ATestFailoverInput
25831 err := json.Unmarshal(body, &atfi)
25832 return atfi, err
25833 case string(InstanceTypeBasicTestFailoverProviderSpecificInputInstanceTypeHyperVReplicaAzure):
25834 var hvratfi HyperVReplicaAzureTestFailoverInput
25835 err := json.Unmarshal(body, &hvratfi)
25836 return hvratfi, err
25837 case string(InstanceTypeBasicTestFailoverProviderSpecificInputInstanceTypeInMageAzureV2):
25838 var imavtfi InMageAzureV2TestFailoverInput
25839 err := json.Unmarshal(body, &imavtfi)
25840 return imavtfi, err
25841 case string(InstanceTypeBasicTestFailoverProviderSpecificInputInstanceTypeInMageRcm):
25842 var imrtfi InMageRcmTestFailoverInput
25843 err := json.Unmarshal(body, &imrtfi)
25844 return imrtfi, err
25845 case string(InstanceTypeBasicTestFailoverProviderSpecificInputInstanceTypeInMage):
25846 var imtfi InMageTestFailoverInput
25847 err := json.Unmarshal(body, &imtfi)
25848 return imtfi, err
25849 default:
25850 var tfpsi TestFailoverProviderSpecificInput
25851 err := json.Unmarshal(body, &tfpsi)
25852 return tfpsi, err
25853 }
25854 }
25855 func unmarshalBasicTestFailoverProviderSpecificInputArray(body []byte) ([]BasicTestFailoverProviderSpecificInput, error) {
25856 var rawMessages []*json.RawMessage
25857 err := json.Unmarshal(body, &rawMessages)
25858 if err != nil {
25859 return nil, err
25860 }
25861
25862 tfpsiArray := make([]BasicTestFailoverProviderSpecificInput, len(rawMessages))
25863
25864 for index, rawMessage := range rawMessages {
25865 tfpsi, err := unmarshalBasicTestFailoverProviderSpecificInput(*rawMessage)
25866 if err != nil {
25867 return nil, err
25868 }
25869 tfpsiArray[index] = tfpsi
25870 }
25871 return tfpsiArray, nil
25872 }
25873
25874
25875 func (tfpsi TestFailoverProviderSpecificInput) MarshalJSON() ([]byte, error) {
25876 tfpsi.InstanceType = InstanceTypeBasicTestFailoverProviderSpecificInputInstanceTypeTestFailoverProviderSpecificInput
25877 objectMap := make(map[string]interface{})
25878 if tfpsi.InstanceType != "" {
25879 objectMap["instanceType"] = tfpsi.InstanceType
25880 }
25881 return json.Marshal(objectMap)
25882 }
25883
25884
25885 func (tfpsi TestFailoverProviderSpecificInput) AsA2ATestFailoverInput() (*A2ATestFailoverInput, bool) {
25886 return nil, false
25887 }
25888
25889
25890 func (tfpsi TestFailoverProviderSpecificInput) AsHyperVReplicaAzureTestFailoverInput() (*HyperVReplicaAzureTestFailoverInput, bool) {
25891 return nil, false
25892 }
25893
25894
25895 func (tfpsi TestFailoverProviderSpecificInput) AsInMageAzureV2TestFailoverInput() (*InMageAzureV2TestFailoverInput, bool) {
25896 return nil, false
25897 }
25898
25899
25900 func (tfpsi TestFailoverProviderSpecificInput) AsInMageRcmTestFailoverInput() (*InMageRcmTestFailoverInput, bool) {
25901 return nil, false
25902 }
25903
25904
25905 func (tfpsi TestFailoverProviderSpecificInput) AsInMageTestFailoverInput() (*InMageTestFailoverInput, bool) {
25906 return nil, false
25907 }
25908
25909
25910 func (tfpsi TestFailoverProviderSpecificInput) AsTestFailoverProviderSpecificInput() (*TestFailoverProviderSpecificInput, bool) {
25911 return &tfpsi, true
25912 }
25913
25914
25915 func (tfpsi TestFailoverProviderSpecificInput) AsBasicTestFailoverProviderSpecificInput() (BasicTestFailoverProviderSpecificInput, bool) {
25916 return &tfpsi, true
25917 }
25918
25919
25920 type TestMigrateCleanupInput struct {
25921
25922 Properties *TestMigrateCleanupInputProperties `json:"properties,omitempty"`
25923 }
25924
25925
25926 type TestMigrateCleanupInputProperties struct {
25927
25928 Comments *string `json:"comments,omitempty"`
25929 }
25930
25931
25932 type TestMigrateInput struct {
25933
25934 Properties *TestMigrateInputProperties `json:"properties,omitempty"`
25935 }
25936
25937
25938 type TestMigrateInputProperties struct {
25939
25940 ProviderSpecificDetails BasicTestMigrateProviderSpecificInput `json:"providerSpecificDetails,omitempty"`
25941 }
25942
25943
25944 func (tmip *TestMigrateInputProperties) UnmarshalJSON(body []byte) error {
25945 var m map[string]*json.RawMessage
25946 err := json.Unmarshal(body, &m)
25947 if err != nil {
25948 return err
25949 }
25950 for k, v := range m {
25951 switch k {
25952 case "providerSpecificDetails":
25953 if v != nil {
25954 providerSpecificDetails, err := unmarshalBasicTestMigrateProviderSpecificInput(*v)
25955 if err != nil {
25956 return err
25957 }
25958 tmip.ProviderSpecificDetails = providerSpecificDetails
25959 }
25960 }
25961 }
25962
25963 return nil
25964 }
25965
25966
25967 type BasicTestMigrateProviderSpecificInput interface {
25968 AsVMwareCbtTestMigrateInput() (*VMwareCbtTestMigrateInput, bool)
25969 AsTestMigrateProviderSpecificInput() (*TestMigrateProviderSpecificInput, bool)
25970 }
25971
25972
25973 type TestMigrateProviderSpecificInput struct {
25974
25975 InstanceType InstanceTypeBasicTestMigrateProviderSpecificInput `json:"instanceType,omitempty"`
25976 }
25977
25978 func unmarshalBasicTestMigrateProviderSpecificInput(body []byte) (BasicTestMigrateProviderSpecificInput, error) {
25979 var m map[string]interface{}
25980 err := json.Unmarshal(body, &m)
25981 if err != nil {
25982 return nil, err
25983 }
25984
25985 switch m["instanceType"] {
25986 case string(InstanceTypeBasicTestMigrateProviderSpecificInputInstanceTypeVMwareCbt):
25987 var vmctmi VMwareCbtTestMigrateInput
25988 err := json.Unmarshal(body, &vmctmi)
25989 return vmctmi, err
25990 default:
25991 var tmpsi TestMigrateProviderSpecificInput
25992 err := json.Unmarshal(body, &tmpsi)
25993 return tmpsi, err
25994 }
25995 }
25996 func unmarshalBasicTestMigrateProviderSpecificInputArray(body []byte) ([]BasicTestMigrateProviderSpecificInput, error) {
25997 var rawMessages []*json.RawMessage
25998 err := json.Unmarshal(body, &rawMessages)
25999 if err != nil {
26000 return nil, err
26001 }
26002
26003 tmpsiArray := make([]BasicTestMigrateProviderSpecificInput, len(rawMessages))
26004
26005 for index, rawMessage := range rawMessages {
26006 tmpsi, err := unmarshalBasicTestMigrateProviderSpecificInput(*rawMessage)
26007 if err != nil {
26008 return nil, err
26009 }
26010 tmpsiArray[index] = tmpsi
26011 }
26012 return tmpsiArray, nil
26013 }
26014
26015
26016 func (tmpsi TestMigrateProviderSpecificInput) MarshalJSON() ([]byte, error) {
26017 tmpsi.InstanceType = InstanceTypeBasicTestMigrateProviderSpecificInputInstanceTypeTestMigrateProviderSpecificInput
26018 objectMap := make(map[string]interface{})
26019 if tmpsi.InstanceType != "" {
26020 objectMap["instanceType"] = tmpsi.InstanceType
26021 }
26022 return json.Marshal(objectMap)
26023 }
26024
26025
26026 func (tmpsi TestMigrateProviderSpecificInput) AsVMwareCbtTestMigrateInput() (*VMwareCbtTestMigrateInput, bool) {
26027 return nil, false
26028 }
26029
26030
26031 func (tmpsi TestMigrateProviderSpecificInput) AsTestMigrateProviderSpecificInput() (*TestMigrateProviderSpecificInput, bool) {
26032 return &tmpsi, true
26033 }
26034
26035
26036 func (tmpsi TestMigrateProviderSpecificInput) AsBasicTestMigrateProviderSpecificInput() (BasicTestMigrateProviderSpecificInput, bool) {
26037 return &tmpsi, true
26038 }
26039
26040
26041 type UnplannedFailoverInput struct {
26042
26043 Properties *UnplannedFailoverInputProperties `json:"properties,omitempty"`
26044 }
26045
26046
26047 type UnplannedFailoverInputProperties struct {
26048
26049 FailoverDirection *string `json:"failoverDirection,omitempty"`
26050
26051 SourceSiteOperations *string `json:"sourceSiteOperations,omitempty"`
26052
26053 ProviderSpecificDetails BasicUnplannedFailoverProviderSpecificInput `json:"providerSpecificDetails,omitempty"`
26054 }
26055
26056
26057 func (ufip *UnplannedFailoverInputProperties) UnmarshalJSON(body []byte) error {
26058 var m map[string]*json.RawMessage
26059 err := json.Unmarshal(body, &m)
26060 if err != nil {
26061 return err
26062 }
26063 for k, v := range m {
26064 switch k {
26065 case "failoverDirection":
26066 if v != nil {
26067 var failoverDirection string
26068 err = json.Unmarshal(*v, &failoverDirection)
26069 if err != nil {
26070 return err
26071 }
26072 ufip.FailoverDirection = &failoverDirection
26073 }
26074 case "sourceSiteOperations":
26075 if v != nil {
26076 var sourceSiteOperations string
26077 err = json.Unmarshal(*v, &sourceSiteOperations)
26078 if err != nil {
26079 return err
26080 }
26081 ufip.SourceSiteOperations = &sourceSiteOperations
26082 }
26083 case "providerSpecificDetails":
26084 if v != nil {
26085 providerSpecificDetails, err := unmarshalBasicUnplannedFailoverProviderSpecificInput(*v)
26086 if err != nil {
26087 return err
26088 }
26089 ufip.ProviderSpecificDetails = providerSpecificDetails
26090 }
26091 }
26092 }
26093
26094 return nil
26095 }
26096
26097
26098 type BasicUnplannedFailoverProviderSpecificInput interface {
26099 AsA2AUnplannedFailoverInput() (*A2AUnplannedFailoverInput, bool)
26100 AsHyperVReplicaAzureUnplannedFailoverInput() (*HyperVReplicaAzureUnplannedFailoverInput, bool)
26101 AsInMageAzureV2UnplannedFailoverInput() (*InMageAzureV2UnplannedFailoverInput, bool)
26102 AsInMageRcmUnplannedFailoverInput() (*InMageRcmUnplannedFailoverInput, bool)
26103 AsInMageUnplannedFailoverInput() (*InMageUnplannedFailoverInput, bool)
26104 AsUnplannedFailoverProviderSpecificInput() (*UnplannedFailoverProviderSpecificInput, bool)
26105 }
26106
26107
26108 type UnplannedFailoverProviderSpecificInput struct {
26109
26110 InstanceType InstanceTypeBasicUnplannedFailoverProviderSpecificInput `json:"instanceType,omitempty"`
26111 }
26112
26113 func unmarshalBasicUnplannedFailoverProviderSpecificInput(body []byte) (BasicUnplannedFailoverProviderSpecificInput, error) {
26114 var m map[string]interface{}
26115 err := json.Unmarshal(body, &m)
26116 if err != nil {
26117 return nil, err
26118 }
26119
26120 switch m["instanceType"] {
26121 case string(InstanceTypeBasicUnplannedFailoverProviderSpecificInputInstanceTypeA2A):
26122 var aufi A2AUnplannedFailoverInput
26123 err := json.Unmarshal(body, &aufi)
26124 return aufi, err
26125 case string(InstanceTypeBasicUnplannedFailoverProviderSpecificInputInstanceTypeHyperVReplicaAzure):
26126 var hvraufi HyperVReplicaAzureUnplannedFailoverInput
26127 err := json.Unmarshal(body, &hvraufi)
26128 return hvraufi, err
26129 case string(InstanceTypeBasicUnplannedFailoverProviderSpecificInputInstanceTypeInMageAzureV2):
26130 var imavufi InMageAzureV2UnplannedFailoverInput
26131 err := json.Unmarshal(body, &imavufi)
26132 return imavufi, err
26133 case string(InstanceTypeBasicUnplannedFailoverProviderSpecificInputInstanceTypeInMageRcm):
26134 var imrufi InMageRcmUnplannedFailoverInput
26135 err := json.Unmarshal(body, &imrufi)
26136 return imrufi, err
26137 case string(InstanceTypeBasicUnplannedFailoverProviderSpecificInputInstanceTypeInMage):
26138 var imufi InMageUnplannedFailoverInput
26139 err := json.Unmarshal(body, &imufi)
26140 return imufi, err
26141 default:
26142 var ufpsi UnplannedFailoverProviderSpecificInput
26143 err := json.Unmarshal(body, &ufpsi)
26144 return ufpsi, err
26145 }
26146 }
26147 func unmarshalBasicUnplannedFailoverProviderSpecificInputArray(body []byte) ([]BasicUnplannedFailoverProviderSpecificInput, error) {
26148 var rawMessages []*json.RawMessage
26149 err := json.Unmarshal(body, &rawMessages)
26150 if err != nil {
26151 return nil, err
26152 }
26153
26154 ufpsiArray := make([]BasicUnplannedFailoverProviderSpecificInput, len(rawMessages))
26155
26156 for index, rawMessage := range rawMessages {
26157 ufpsi, err := unmarshalBasicUnplannedFailoverProviderSpecificInput(*rawMessage)
26158 if err != nil {
26159 return nil, err
26160 }
26161 ufpsiArray[index] = ufpsi
26162 }
26163 return ufpsiArray, nil
26164 }
26165
26166
26167 func (ufpsi UnplannedFailoverProviderSpecificInput) MarshalJSON() ([]byte, error) {
26168 ufpsi.InstanceType = InstanceTypeBasicUnplannedFailoverProviderSpecificInputInstanceTypeUnplannedFailoverProviderSpecificInput
26169 objectMap := make(map[string]interface{})
26170 if ufpsi.InstanceType != "" {
26171 objectMap["instanceType"] = ufpsi.InstanceType
26172 }
26173 return json.Marshal(objectMap)
26174 }
26175
26176
26177 func (ufpsi UnplannedFailoverProviderSpecificInput) AsA2AUnplannedFailoverInput() (*A2AUnplannedFailoverInput, bool) {
26178 return nil, false
26179 }
26180
26181
26182 func (ufpsi UnplannedFailoverProviderSpecificInput) AsHyperVReplicaAzureUnplannedFailoverInput() (*HyperVReplicaAzureUnplannedFailoverInput, bool) {
26183 return nil, false
26184 }
26185
26186
26187 func (ufpsi UnplannedFailoverProviderSpecificInput) AsInMageAzureV2UnplannedFailoverInput() (*InMageAzureV2UnplannedFailoverInput, bool) {
26188 return nil, false
26189 }
26190
26191
26192 func (ufpsi UnplannedFailoverProviderSpecificInput) AsInMageRcmUnplannedFailoverInput() (*InMageRcmUnplannedFailoverInput, bool) {
26193 return nil, false
26194 }
26195
26196
26197 func (ufpsi UnplannedFailoverProviderSpecificInput) AsInMageUnplannedFailoverInput() (*InMageUnplannedFailoverInput, bool) {
26198 return nil, false
26199 }
26200
26201
26202 func (ufpsi UnplannedFailoverProviderSpecificInput) AsUnplannedFailoverProviderSpecificInput() (*UnplannedFailoverProviderSpecificInput, bool) {
26203 return &ufpsi, true
26204 }
26205
26206
26207 func (ufpsi UnplannedFailoverProviderSpecificInput) AsBasicUnplannedFailoverProviderSpecificInput() (BasicUnplannedFailoverProviderSpecificInput, bool) {
26208 return &ufpsi, true
26209 }
26210
26211
26212 type UpdateMigrationItemInput struct {
26213
26214 Properties *UpdateMigrationItemInputProperties `json:"properties,omitempty"`
26215 }
26216
26217
26218 type UpdateMigrationItemInputProperties struct {
26219
26220 ProviderSpecificDetails BasicUpdateMigrationItemProviderSpecificInput `json:"providerSpecificDetails,omitempty"`
26221 }
26222
26223
26224 func (umiip *UpdateMigrationItemInputProperties) UnmarshalJSON(body []byte) error {
26225 var m map[string]*json.RawMessage
26226 err := json.Unmarshal(body, &m)
26227 if err != nil {
26228 return err
26229 }
26230 for k, v := range m {
26231 switch k {
26232 case "providerSpecificDetails":
26233 if v != nil {
26234 providerSpecificDetails, err := unmarshalBasicUpdateMigrationItemProviderSpecificInput(*v)
26235 if err != nil {
26236 return err
26237 }
26238 umiip.ProviderSpecificDetails = providerSpecificDetails
26239 }
26240 }
26241 }
26242
26243 return nil
26244 }
26245
26246
26247 type BasicUpdateMigrationItemProviderSpecificInput interface {
26248 AsVMwareCbtUpdateMigrationItemInput() (*VMwareCbtUpdateMigrationItemInput, bool)
26249 AsUpdateMigrationItemProviderSpecificInput() (*UpdateMigrationItemProviderSpecificInput, bool)
26250 }
26251
26252
26253 type UpdateMigrationItemProviderSpecificInput struct {
26254
26255 InstanceType InstanceTypeBasicUpdateMigrationItemProviderSpecificInput `json:"instanceType,omitempty"`
26256 }
26257
26258 func unmarshalBasicUpdateMigrationItemProviderSpecificInput(body []byte) (BasicUpdateMigrationItemProviderSpecificInput, error) {
26259 var m map[string]interface{}
26260 err := json.Unmarshal(body, &m)
26261 if err != nil {
26262 return nil, err
26263 }
26264
26265 switch m["instanceType"] {
26266 case string(InstanceTypeBasicUpdateMigrationItemProviderSpecificInputInstanceTypeVMwareCbt):
26267 var vmcumii VMwareCbtUpdateMigrationItemInput
26268 err := json.Unmarshal(body, &vmcumii)
26269 return vmcumii, err
26270 default:
26271 var umipsi UpdateMigrationItemProviderSpecificInput
26272 err := json.Unmarshal(body, &umipsi)
26273 return umipsi, err
26274 }
26275 }
26276 func unmarshalBasicUpdateMigrationItemProviderSpecificInputArray(body []byte) ([]BasicUpdateMigrationItemProviderSpecificInput, error) {
26277 var rawMessages []*json.RawMessage
26278 err := json.Unmarshal(body, &rawMessages)
26279 if err != nil {
26280 return nil, err
26281 }
26282
26283 umipsiArray := make([]BasicUpdateMigrationItemProviderSpecificInput, len(rawMessages))
26284
26285 for index, rawMessage := range rawMessages {
26286 umipsi, err := unmarshalBasicUpdateMigrationItemProviderSpecificInput(*rawMessage)
26287 if err != nil {
26288 return nil, err
26289 }
26290 umipsiArray[index] = umipsi
26291 }
26292 return umipsiArray, nil
26293 }
26294
26295
26296 func (umipsi UpdateMigrationItemProviderSpecificInput) MarshalJSON() ([]byte, error) {
26297 umipsi.InstanceType = InstanceTypeBasicUpdateMigrationItemProviderSpecificInputInstanceTypeUpdateMigrationItemProviderSpecificInput
26298 objectMap := make(map[string]interface{})
26299 if umipsi.InstanceType != "" {
26300 objectMap["instanceType"] = umipsi.InstanceType
26301 }
26302 return json.Marshal(objectMap)
26303 }
26304
26305
26306 func (umipsi UpdateMigrationItemProviderSpecificInput) AsVMwareCbtUpdateMigrationItemInput() (*VMwareCbtUpdateMigrationItemInput, bool) {
26307 return nil, false
26308 }
26309
26310
26311 func (umipsi UpdateMigrationItemProviderSpecificInput) AsUpdateMigrationItemProviderSpecificInput() (*UpdateMigrationItemProviderSpecificInput, bool) {
26312 return &umipsi, true
26313 }
26314
26315
26316 func (umipsi UpdateMigrationItemProviderSpecificInput) AsBasicUpdateMigrationItemProviderSpecificInput() (BasicUpdateMigrationItemProviderSpecificInput, bool) {
26317 return &umipsi, true
26318 }
26319
26320
26321 type UpdateMobilityServiceRequest struct {
26322
26323 Properties *UpdateMobilityServiceRequestProperties `json:"properties,omitempty"`
26324 }
26325
26326
26327 type UpdateMobilityServiceRequestProperties struct {
26328
26329 RunAsAccountID *string `json:"runAsAccountId,omitempty"`
26330 }
26331
26332
26333 type UpdateNetworkMappingInput struct {
26334
26335 Properties *UpdateNetworkMappingInputProperties `json:"properties,omitempty"`
26336 }
26337
26338
26339 type UpdateNetworkMappingInputProperties struct {
26340
26341 RecoveryFabricName *string `json:"recoveryFabricName,omitempty"`
26342
26343 RecoveryNetworkID *string `json:"recoveryNetworkId,omitempty"`
26344
26345 FabricSpecificDetails BasicFabricSpecificUpdateNetworkMappingInput `json:"fabricSpecificDetails,omitempty"`
26346 }
26347
26348
26349 func (unmip *UpdateNetworkMappingInputProperties) UnmarshalJSON(body []byte) error {
26350 var m map[string]*json.RawMessage
26351 err := json.Unmarshal(body, &m)
26352 if err != nil {
26353 return err
26354 }
26355 for k, v := range m {
26356 switch k {
26357 case "recoveryFabricName":
26358 if v != nil {
26359 var recoveryFabricName string
26360 err = json.Unmarshal(*v, &recoveryFabricName)
26361 if err != nil {
26362 return err
26363 }
26364 unmip.RecoveryFabricName = &recoveryFabricName
26365 }
26366 case "recoveryNetworkId":
26367 if v != nil {
26368 var recoveryNetworkID string
26369 err = json.Unmarshal(*v, &recoveryNetworkID)
26370 if err != nil {
26371 return err
26372 }
26373 unmip.RecoveryNetworkID = &recoveryNetworkID
26374 }
26375 case "fabricSpecificDetails":
26376 if v != nil {
26377 fabricSpecificDetails, err := unmarshalBasicFabricSpecificUpdateNetworkMappingInput(*v)
26378 if err != nil {
26379 return err
26380 }
26381 unmip.FabricSpecificDetails = fabricSpecificDetails
26382 }
26383 }
26384 }
26385
26386 return nil
26387 }
26388
26389
26390 type UpdatePolicyInput struct {
26391
26392 Properties *UpdatePolicyInputProperties `json:"properties,omitempty"`
26393 }
26394
26395
26396 type UpdatePolicyInputProperties struct {
26397
26398 ReplicationProviderSettings BasicPolicyProviderSpecificInput `json:"replicationProviderSettings,omitempty"`
26399 }
26400
26401
26402 func (upip *UpdatePolicyInputProperties) UnmarshalJSON(body []byte) error {
26403 var m map[string]*json.RawMessage
26404 err := json.Unmarshal(body, &m)
26405 if err != nil {
26406 return err
26407 }
26408 for k, v := range m {
26409 switch k {
26410 case "replicationProviderSettings":
26411 if v != nil {
26412 replicationProviderSettings, err := unmarshalBasicPolicyProviderSpecificInput(*v)
26413 if err != nil {
26414 return err
26415 }
26416 upip.ReplicationProviderSettings = replicationProviderSettings
26417 }
26418 }
26419 }
26420
26421 return nil
26422 }
26423
26424
26425 type UpdateProtectionContainerMappingInput struct {
26426
26427 Properties *UpdateProtectionContainerMappingInputProperties `json:"properties,omitempty"`
26428 }
26429
26430
26431 type UpdateProtectionContainerMappingInputProperties struct {
26432
26433 ProviderSpecificInput BasicReplicationProviderSpecificUpdateContainerMappingInput `json:"providerSpecificInput,omitempty"`
26434 }
26435
26436
26437 func (upcmip *UpdateProtectionContainerMappingInputProperties) UnmarshalJSON(body []byte) error {
26438 var m map[string]*json.RawMessage
26439 err := json.Unmarshal(body, &m)
26440 if err != nil {
26441 return err
26442 }
26443 for k, v := range m {
26444 switch k {
26445 case "providerSpecificInput":
26446 if v != nil {
26447 providerSpecificInput, err := unmarshalBasicReplicationProviderSpecificUpdateContainerMappingInput(*v)
26448 if err != nil {
26449 return err
26450 }
26451 upcmip.ProviderSpecificInput = providerSpecificInput
26452 }
26453 }
26454 }
26455
26456 return nil
26457 }
26458
26459
26460 type UpdateRecoveryPlanInput struct {
26461
26462 Properties *UpdateRecoveryPlanInputProperties `json:"properties,omitempty"`
26463 }
26464
26465
26466 type UpdateRecoveryPlanInputProperties struct {
26467
26468 Groups *[]RecoveryPlanGroup `json:"groups,omitempty"`
26469 }
26470
26471
26472 type UpdateReplicationProtectedItemInput struct {
26473
26474 Properties *UpdateReplicationProtectedItemInputProperties `json:"properties,omitempty"`
26475 }
26476
26477
26478 type UpdateReplicationProtectedItemInputProperties struct {
26479
26480 RecoveryAzureVMName *string `json:"recoveryAzureVMName,omitempty"`
26481
26482 RecoveryAzureVMSize *string `json:"recoveryAzureVMSize,omitempty"`
26483
26484 SelectedRecoveryAzureNetworkID *string `json:"selectedRecoveryAzureNetworkId,omitempty"`
26485
26486 SelectedTfoAzureNetworkID *string `json:"selectedTfoAzureNetworkId,omitempty"`
26487
26488 SelectedSourceNicID *string `json:"selectedSourceNicId,omitempty"`
26489
26490 EnableRdpOnTargetOption *string `json:"enableRdpOnTargetOption,omitempty"`
26491
26492 VMNics *[]VMNicInputDetails `json:"vmNics,omitempty"`
26493
26494 LicenseType LicenseType `json:"licenseType,omitempty"`
26495
26496 RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"`
26497
26498 ProviderSpecificDetails BasicUpdateReplicationProtectedItemProviderInput `json:"providerSpecificDetails,omitempty"`
26499 }
26500
26501
26502 func (urpiip *UpdateReplicationProtectedItemInputProperties) UnmarshalJSON(body []byte) error {
26503 var m map[string]*json.RawMessage
26504 err := json.Unmarshal(body, &m)
26505 if err != nil {
26506 return err
26507 }
26508 for k, v := range m {
26509 switch k {
26510 case "recoveryAzureVMName":
26511 if v != nil {
26512 var recoveryAzureVMName string
26513 err = json.Unmarshal(*v, &recoveryAzureVMName)
26514 if err != nil {
26515 return err
26516 }
26517 urpiip.RecoveryAzureVMName = &recoveryAzureVMName
26518 }
26519 case "recoveryAzureVMSize":
26520 if v != nil {
26521 var recoveryAzureVMSize string
26522 err = json.Unmarshal(*v, &recoveryAzureVMSize)
26523 if err != nil {
26524 return err
26525 }
26526 urpiip.RecoveryAzureVMSize = &recoveryAzureVMSize
26527 }
26528 case "selectedRecoveryAzureNetworkId":
26529 if v != nil {
26530 var selectedRecoveryAzureNetworkID string
26531 err = json.Unmarshal(*v, &selectedRecoveryAzureNetworkID)
26532 if err != nil {
26533 return err
26534 }
26535 urpiip.SelectedRecoveryAzureNetworkID = &selectedRecoveryAzureNetworkID
26536 }
26537 case "selectedTfoAzureNetworkId":
26538 if v != nil {
26539 var selectedTfoAzureNetworkID string
26540 err = json.Unmarshal(*v, &selectedTfoAzureNetworkID)
26541 if err != nil {
26542 return err
26543 }
26544 urpiip.SelectedTfoAzureNetworkID = &selectedTfoAzureNetworkID
26545 }
26546 case "selectedSourceNicId":
26547 if v != nil {
26548 var selectedSourceNicID string
26549 err = json.Unmarshal(*v, &selectedSourceNicID)
26550 if err != nil {
26551 return err
26552 }
26553 urpiip.SelectedSourceNicID = &selectedSourceNicID
26554 }
26555 case "enableRdpOnTargetOption":
26556 if v != nil {
26557 var enableRdpOnTargetOption string
26558 err = json.Unmarshal(*v, &enableRdpOnTargetOption)
26559 if err != nil {
26560 return err
26561 }
26562 urpiip.EnableRdpOnTargetOption = &enableRdpOnTargetOption
26563 }
26564 case "vmNics":
26565 if v != nil {
26566 var VMNics []VMNicInputDetails
26567 err = json.Unmarshal(*v, &VMNics)
26568 if err != nil {
26569 return err
26570 }
26571 urpiip.VMNics = &VMNics
26572 }
26573 case "licenseType":
26574 if v != nil {
26575 var licenseType LicenseType
26576 err = json.Unmarshal(*v, &licenseType)
26577 if err != nil {
26578 return err
26579 }
26580 urpiip.LicenseType = licenseType
26581 }
26582 case "recoveryAvailabilitySetId":
26583 if v != nil {
26584 var recoveryAvailabilitySetID string
26585 err = json.Unmarshal(*v, &recoveryAvailabilitySetID)
26586 if err != nil {
26587 return err
26588 }
26589 urpiip.RecoveryAvailabilitySetID = &recoveryAvailabilitySetID
26590 }
26591 case "providerSpecificDetails":
26592 if v != nil {
26593 providerSpecificDetails, err := unmarshalBasicUpdateReplicationProtectedItemProviderInput(*v)
26594 if err != nil {
26595 return err
26596 }
26597 urpiip.ProviderSpecificDetails = providerSpecificDetails
26598 }
26599 }
26600 }
26601
26602 return nil
26603 }
26604
26605
26606 type BasicUpdateReplicationProtectedItemProviderInput interface {
26607 AsA2AUpdateReplicationProtectedItemInput() (*A2AUpdateReplicationProtectedItemInput, bool)
26608 AsHyperVReplicaAzureUpdateReplicationProtectedItemInput() (*HyperVReplicaAzureUpdateReplicationProtectedItemInput, bool)
26609 AsInMageAzureV2UpdateReplicationProtectedItemInput() (*InMageAzureV2UpdateReplicationProtectedItemInput, bool)
26610 AsInMageRcmUpdateReplicationProtectedItemInput() (*InMageRcmUpdateReplicationProtectedItemInput, bool)
26611 AsUpdateReplicationProtectedItemProviderInput() (*UpdateReplicationProtectedItemProviderInput, bool)
26612 }
26613
26614
26615 type UpdateReplicationProtectedItemProviderInput struct {
26616
26617 InstanceType InstanceTypeBasicUpdateReplicationProtectedItemProviderInput `json:"instanceType,omitempty"`
26618 }
26619
26620 func unmarshalBasicUpdateReplicationProtectedItemProviderInput(body []byte) (BasicUpdateReplicationProtectedItemProviderInput, error) {
26621 var m map[string]interface{}
26622 err := json.Unmarshal(body, &m)
26623 if err != nil {
26624 return nil, err
26625 }
26626
26627 switch m["instanceType"] {
26628 case string(InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeA2A):
26629 var aurpii A2AUpdateReplicationProtectedItemInput
26630 err := json.Unmarshal(body, &aurpii)
26631 return aurpii, err
26632 case string(InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeHyperVReplicaAzure):
26633 var hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput
26634 err := json.Unmarshal(body, &hvraurpii)
26635 return hvraurpii, err
26636 case string(InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeInMageAzureV2):
26637 var imavurpii InMageAzureV2UpdateReplicationProtectedItemInput
26638 err := json.Unmarshal(body, &imavurpii)
26639 return imavurpii, err
26640 case string(InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeInMageRcm):
26641 var imrurpii InMageRcmUpdateReplicationProtectedItemInput
26642 err := json.Unmarshal(body, &imrurpii)
26643 return imrurpii, err
26644 default:
26645 var urpipi UpdateReplicationProtectedItemProviderInput
26646 err := json.Unmarshal(body, &urpipi)
26647 return urpipi, err
26648 }
26649 }
26650 func unmarshalBasicUpdateReplicationProtectedItemProviderInputArray(body []byte) ([]BasicUpdateReplicationProtectedItemProviderInput, error) {
26651 var rawMessages []*json.RawMessage
26652 err := json.Unmarshal(body, &rawMessages)
26653 if err != nil {
26654 return nil, err
26655 }
26656
26657 urpipiArray := make([]BasicUpdateReplicationProtectedItemProviderInput, len(rawMessages))
26658
26659 for index, rawMessage := range rawMessages {
26660 urpipi, err := unmarshalBasicUpdateReplicationProtectedItemProviderInput(*rawMessage)
26661 if err != nil {
26662 return nil, err
26663 }
26664 urpipiArray[index] = urpipi
26665 }
26666 return urpipiArray, nil
26667 }
26668
26669
26670 func (urpipi UpdateReplicationProtectedItemProviderInput) MarshalJSON() ([]byte, error) {
26671 urpipi.InstanceType = InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeUpdateReplicationProtectedItemProviderInput
26672 objectMap := make(map[string]interface{})
26673 if urpipi.InstanceType != "" {
26674 objectMap["instanceType"] = urpipi.InstanceType
26675 }
26676 return json.Marshal(objectMap)
26677 }
26678
26679
26680 func (urpipi UpdateReplicationProtectedItemProviderInput) AsA2AUpdateReplicationProtectedItemInput() (*A2AUpdateReplicationProtectedItemInput, bool) {
26681 return nil, false
26682 }
26683
26684
26685 func (urpipi UpdateReplicationProtectedItemProviderInput) AsHyperVReplicaAzureUpdateReplicationProtectedItemInput() (*HyperVReplicaAzureUpdateReplicationProtectedItemInput, bool) {
26686 return nil, false
26687 }
26688
26689
26690 func (urpipi UpdateReplicationProtectedItemProviderInput) AsInMageAzureV2UpdateReplicationProtectedItemInput() (*InMageAzureV2UpdateReplicationProtectedItemInput, bool) {
26691 return nil, false
26692 }
26693
26694
26695 func (urpipi UpdateReplicationProtectedItemProviderInput) AsInMageRcmUpdateReplicationProtectedItemInput() (*InMageRcmUpdateReplicationProtectedItemInput, bool) {
26696 return nil, false
26697 }
26698
26699
26700 func (urpipi UpdateReplicationProtectedItemProviderInput) AsUpdateReplicationProtectedItemProviderInput() (*UpdateReplicationProtectedItemProviderInput, bool) {
26701 return &urpipi, true
26702 }
26703
26704
26705 func (urpipi UpdateReplicationProtectedItemProviderInput) AsBasicUpdateReplicationProtectedItemProviderInput() (BasicUpdateReplicationProtectedItemProviderInput, bool) {
26706 return &urpipi, true
26707 }
26708
26709
26710 type UpdateVCenterRequest struct {
26711
26712 Properties *UpdateVCenterRequestProperties `json:"properties,omitempty"`
26713 }
26714
26715
26716 type UpdateVCenterRequestProperties struct {
26717
26718 FriendlyName *string `json:"friendlyName,omitempty"`
26719
26720 IPAddress *string `json:"ipAddress,omitempty"`
26721
26722 ProcessServerID *string `json:"processServerId,omitempty"`
26723
26724 Port *string `json:"port,omitempty"`
26725
26726 RunAsAccountID *string `json:"runAsAccountId,omitempty"`
26727 }
26728
26729
26730 type VaultHealthDetails struct {
26731 autorest.Response `json:"-"`
26732
26733 Properties *VaultHealthProperties `json:"properties,omitempty"`
26734
26735 ID *string `json:"id,omitempty"`
26736
26737 Name *string `json:"name,omitempty"`
26738
26739 Type *string `json:"type,omitempty"`
26740
26741 Location *string `json:"location,omitempty"`
26742 }
26743
26744
26745 func (vhd VaultHealthDetails) MarshalJSON() ([]byte, error) {
26746 objectMap := make(map[string]interface{})
26747 if vhd.Properties != nil {
26748 objectMap["properties"] = vhd.Properties
26749 }
26750 if vhd.Location != nil {
26751 objectMap["location"] = vhd.Location
26752 }
26753 return json.Marshal(objectMap)
26754 }
26755
26756
26757 type VaultHealthProperties struct {
26758
26759 VaultErrors *[]HealthError `json:"vaultErrors,omitempty"`
26760
26761 ProtectedItemsHealth *ResourceHealthSummary `json:"protectedItemsHealth,omitempty"`
26762
26763 FabricsHealth *ResourceHealthSummary `json:"fabricsHealth,omitempty"`
26764
26765 ContainersHealth *ResourceHealthSummary `json:"containersHealth,omitempty"`
26766 }
26767
26768
26769 type VaultSetting struct {
26770 autorest.Response `json:"-"`
26771
26772 Properties *VaultSettingProperties `json:"properties,omitempty"`
26773
26774 ID *string `json:"id,omitempty"`
26775
26776 Name *string `json:"name,omitempty"`
26777
26778 Type *string `json:"type,omitempty"`
26779
26780 Location *string `json:"location,omitempty"`
26781 }
26782
26783
26784 func (vs VaultSetting) MarshalJSON() ([]byte, error) {
26785 objectMap := make(map[string]interface{})
26786 if vs.Properties != nil {
26787 objectMap["properties"] = vs.Properties
26788 }
26789 if vs.Location != nil {
26790 objectMap["location"] = vs.Location
26791 }
26792 return json.Marshal(objectMap)
26793 }
26794
26795
26796 type VaultSettingCollection struct {
26797 autorest.Response `json:"-"`
26798
26799 Value *[]VaultSetting `json:"value,omitempty"`
26800
26801 NextLink *string `json:"nextLink,omitempty"`
26802 }
26803
26804
26805 type VaultSettingCollectionIterator struct {
26806 i int
26807 page VaultSettingCollectionPage
26808 }
26809
26810
26811
26812 func (iter *VaultSettingCollectionIterator) NextWithContext(ctx context.Context) (err error) {
26813 if tracing.IsEnabled() {
26814 ctx = tracing.StartSpan(ctx, fqdn+"/VaultSettingCollectionIterator.NextWithContext")
26815 defer func() {
26816 sc := -1
26817 if iter.Response().Response.Response != nil {
26818 sc = iter.Response().Response.Response.StatusCode
26819 }
26820 tracing.EndSpan(ctx, sc, err)
26821 }()
26822 }
26823 iter.i++
26824 if iter.i < len(iter.page.Values()) {
26825 return nil
26826 }
26827 err = iter.page.NextWithContext(ctx)
26828 if err != nil {
26829 iter.i--
26830 return err
26831 }
26832 iter.i = 0
26833 return nil
26834 }
26835
26836
26837
26838
26839 func (iter *VaultSettingCollectionIterator) Next() error {
26840 return iter.NextWithContext(context.Background())
26841 }
26842
26843
26844 func (iter VaultSettingCollectionIterator) NotDone() bool {
26845 return iter.page.NotDone() && iter.i < len(iter.page.Values())
26846 }
26847
26848
26849 func (iter VaultSettingCollectionIterator) Response() VaultSettingCollection {
26850 return iter.page.Response()
26851 }
26852
26853
26854
26855 func (iter VaultSettingCollectionIterator) Value() VaultSetting {
26856 if !iter.page.NotDone() {
26857 return VaultSetting{}
26858 }
26859 return iter.page.Values()[iter.i]
26860 }
26861
26862
26863 func NewVaultSettingCollectionIterator(page VaultSettingCollectionPage) VaultSettingCollectionIterator {
26864 return VaultSettingCollectionIterator{page: page}
26865 }
26866
26867
26868 func (vsc VaultSettingCollection) IsEmpty() bool {
26869 return vsc.Value == nil || len(*vsc.Value) == 0
26870 }
26871
26872
26873 func (vsc VaultSettingCollection) hasNextLink() bool {
26874 return vsc.NextLink != nil && len(*vsc.NextLink) != 0
26875 }
26876
26877
26878
26879 func (vsc VaultSettingCollection) vaultSettingCollectionPreparer(ctx context.Context) (*http.Request, error) {
26880 if !vsc.hasNextLink() {
26881 return nil, nil
26882 }
26883 return autorest.Prepare((&http.Request{}).WithContext(ctx),
26884 autorest.AsJSON(),
26885 autorest.AsGet(),
26886 autorest.WithBaseURL(to.String(vsc.NextLink)))
26887 }
26888
26889
26890 type VaultSettingCollectionPage struct {
26891 fn func(context.Context, VaultSettingCollection) (VaultSettingCollection, error)
26892 vsc VaultSettingCollection
26893 }
26894
26895
26896
26897 func (page *VaultSettingCollectionPage) NextWithContext(ctx context.Context) (err error) {
26898 if tracing.IsEnabled() {
26899 ctx = tracing.StartSpan(ctx, fqdn+"/VaultSettingCollectionPage.NextWithContext")
26900 defer func() {
26901 sc := -1
26902 if page.Response().Response.Response != nil {
26903 sc = page.Response().Response.Response.StatusCode
26904 }
26905 tracing.EndSpan(ctx, sc, err)
26906 }()
26907 }
26908 for {
26909 next, err := page.fn(ctx, page.vsc)
26910 if err != nil {
26911 return err
26912 }
26913 page.vsc = next
26914 if !next.hasNextLink() || !next.IsEmpty() {
26915 break
26916 }
26917 }
26918 return nil
26919 }
26920
26921
26922
26923
26924 func (page *VaultSettingCollectionPage) Next() error {
26925 return page.NextWithContext(context.Background())
26926 }
26927
26928
26929 func (page VaultSettingCollectionPage) NotDone() bool {
26930 return !page.vsc.IsEmpty()
26931 }
26932
26933
26934 func (page VaultSettingCollectionPage) Response() VaultSettingCollection {
26935 return page.vsc
26936 }
26937
26938
26939 func (page VaultSettingCollectionPage) Values() []VaultSetting {
26940 if page.vsc.IsEmpty() {
26941 return nil
26942 }
26943 return *page.vsc.Value
26944 }
26945
26946
26947 func NewVaultSettingCollectionPage(cur VaultSettingCollection, getNextPage func(context.Context, VaultSettingCollection) (VaultSettingCollection, error)) VaultSettingCollectionPage {
26948 return VaultSettingCollectionPage{
26949 fn: getNextPage,
26950 vsc: cur,
26951 }
26952 }
26953
26954
26955 type VaultSettingCreationInput struct {
26956
26957 Properties *VaultSettingCreationInputProperties `json:"properties,omitempty"`
26958 }
26959
26960
26961 type VaultSettingCreationInputProperties struct {
26962
26963 MigrationSolutionID *string `json:"migrationSolutionId,omitempty"`
26964 }
26965
26966
26967 type VaultSettingProperties struct {
26968
26969 MigrationSolutionID *string `json:"migrationSolutionId,omitempty"`
26970 }
26971
26972
26973 type VCenter struct {
26974 autorest.Response `json:"-"`
26975
26976 Properties *VCenterProperties `json:"properties,omitempty"`
26977
26978 ID *string `json:"id,omitempty"`
26979
26980 Name *string `json:"name,omitempty"`
26981
26982 Type *string `json:"type,omitempty"`
26983
26984 Location *string `json:"location,omitempty"`
26985 }
26986
26987
26988 func (vc VCenter) MarshalJSON() ([]byte, error) {
26989 objectMap := make(map[string]interface{})
26990 if vc.Properties != nil {
26991 objectMap["properties"] = vc.Properties
26992 }
26993 if vc.Location != nil {
26994 objectMap["location"] = vc.Location
26995 }
26996 return json.Marshal(objectMap)
26997 }
26998
26999
27000 type VCenterCollection struct {
27001 autorest.Response `json:"-"`
27002
27003 Value *[]VCenter `json:"value,omitempty"`
27004
27005 NextLink *string `json:"nextLink,omitempty"`
27006 }
27007
27008
27009 type VCenterCollectionIterator struct {
27010 i int
27011 page VCenterCollectionPage
27012 }
27013
27014
27015
27016 func (iter *VCenterCollectionIterator) NextWithContext(ctx context.Context) (err error) {
27017 if tracing.IsEnabled() {
27018 ctx = tracing.StartSpan(ctx, fqdn+"/VCenterCollectionIterator.NextWithContext")
27019 defer func() {
27020 sc := -1
27021 if iter.Response().Response.Response != nil {
27022 sc = iter.Response().Response.Response.StatusCode
27023 }
27024 tracing.EndSpan(ctx, sc, err)
27025 }()
27026 }
27027 iter.i++
27028 if iter.i < len(iter.page.Values()) {
27029 return nil
27030 }
27031 err = iter.page.NextWithContext(ctx)
27032 if err != nil {
27033 iter.i--
27034 return err
27035 }
27036 iter.i = 0
27037 return nil
27038 }
27039
27040
27041
27042
27043 func (iter *VCenterCollectionIterator) Next() error {
27044 return iter.NextWithContext(context.Background())
27045 }
27046
27047
27048 func (iter VCenterCollectionIterator) NotDone() bool {
27049 return iter.page.NotDone() && iter.i < len(iter.page.Values())
27050 }
27051
27052
27053 func (iter VCenterCollectionIterator) Response() VCenterCollection {
27054 return iter.page.Response()
27055 }
27056
27057
27058
27059 func (iter VCenterCollectionIterator) Value() VCenter {
27060 if !iter.page.NotDone() {
27061 return VCenter{}
27062 }
27063 return iter.page.Values()[iter.i]
27064 }
27065
27066
27067 func NewVCenterCollectionIterator(page VCenterCollectionPage) VCenterCollectionIterator {
27068 return VCenterCollectionIterator{page: page}
27069 }
27070
27071
27072 func (vcc VCenterCollection) IsEmpty() bool {
27073 return vcc.Value == nil || len(*vcc.Value) == 0
27074 }
27075
27076
27077 func (vcc VCenterCollection) hasNextLink() bool {
27078 return vcc.NextLink != nil && len(*vcc.NextLink) != 0
27079 }
27080
27081
27082
27083 func (vcc VCenterCollection) vCenterCollectionPreparer(ctx context.Context) (*http.Request, error) {
27084 if !vcc.hasNextLink() {
27085 return nil, nil
27086 }
27087 return autorest.Prepare((&http.Request{}).WithContext(ctx),
27088 autorest.AsJSON(),
27089 autorest.AsGet(),
27090 autorest.WithBaseURL(to.String(vcc.NextLink)))
27091 }
27092
27093
27094 type VCenterCollectionPage struct {
27095 fn func(context.Context, VCenterCollection) (VCenterCollection, error)
27096 vcc VCenterCollection
27097 }
27098
27099
27100
27101 func (page *VCenterCollectionPage) NextWithContext(ctx context.Context) (err error) {
27102 if tracing.IsEnabled() {
27103 ctx = tracing.StartSpan(ctx, fqdn+"/VCenterCollectionPage.NextWithContext")
27104 defer func() {
27105 sc := -1
27106 if page.Response().Response.Response != nil {
27107 sc = page.Response().Response.Response.StatusCode
27108 }
27109 tracing.EndSpan(ctx, sc, err)
27110 }()
27111 }
27112 for {
27113 next, err := page.fn(ctx, page.vcc)
27114 if err != nil {
27115 return err
27116 }
27117 page.vcc = next
27118 if !next.hasNextLink() || !next.IsEmpty() {
27119 break
27120 }
27121 }
27122 return nil
27123 }
27124
27125
27126
27127
27128 func (page *VCenterCollectionPage) Next() error {
27129 return page.NextWithContext(context.Background())
27130 }
27131
27132
27133 func (page VCenterCollectionPage) NotDone() bool {
27134 return !page.vcc.IsEmpty()
27135 }
27136
27137
27138 func (page VCenterCollectionPage) Response() VCenterCollection {
27139 return page.vcc
27140 }
27141
27142
27143 func (page VCenterCollectionPage) Values() []VCenter {
27144 if page.vcc.IsEmpty() {
27145 return nil
27146 }
27147 return *page.vcc.Value
27148 }
27149
27150
27151 func NewVCenterCollectionPage(cur VCenterCollection, getNextPage func(context.Context, VCenterCollection) (VCenterCollection, error)) VCenterCollectionPage {
27152 return VCenterCollectionPage{
27153 fn: getNextPage,
27154 vcc: cur,
27155 }
27156 }
27157
27158
27159 type VCenterProperties struct {
27160
27161 FriendlyName *string `json:"friendlyName,omitempty"`
27162
27163 InternalID *string `json:"internalId,omitempty"`
27164
27165 LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"`
27166
27167 DiscoveryStatus *string `json:"discoveryStatus,omitempty"`
27168
27169 ProcessServerID *string `json:"processServerId,omitempty"`
27170
27171 IPAddress *string `json:"ipAddress,omitempty"`
27172
27173 InfrastructureID *string `json:"infrastructureId,omitempty"`
27174
27175 Port *string `json:"port,omitempty"`
27176
27177 RunAsAccountID *string `json:"runAsAccountId,omitempty"`
27178
27179 FabricArmResourceName *string `json:"fabricArmResourceName,omitempty"`
27180
27181 HealthErrors *[]HealthError `json:"healthErrors,omitempty"`
27182 }
27183
27184
27185 type VersionDetails struct {
27186
27187 Version *string `json:"version,omitempty"`
27188
27189 ExpiryDate *date.Time `json:"expiryDate,omitempty"`
27190
27191 Status AgentVersionStatus `json:"status,omitempty"`
27192 }
27193
27194
27195 type VirtualMachineTaskDetails struct {
27196
27197 SkippedReason *string `json:"skippedReason,omitempty"`
27198
27199 SkippedReasonString *string `json:"skippedReasonString,omitempty"`
27200
27201 JobTask *JobEntity `json:"jobTask,omitempty"`
27202
27203 InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"`
27204 }
27205
27206
27207 func (vmtd VirtualMachineTaskDetails) MarshalJSON() ([]byte, error) {
27208 vmtd.InstanceType = InstanceTypeVirtualMachineTaskDetails
27209 objectMap := make(map[string]interface{})
27210 if vmtd.SkippedReason != nil {
27211 objectMap["skippedReason"] = vmtd.SkippedReason
27212 }
27213 if vmtd.SkippedReasonString != nil {
27214 objectMap["skippedReasonString"] = vmtd.SkippedReasonString
27215 }
27216 if vmtd.JobTask != nil {
27217 objectMap["jobTask"] = vmtd.JobTask
27218 }
27219 if vmtd.InstanceType != "" {
27220 objectMap["instanceType"] = vmtd.InstanceType
27221 }
27222 return json.Marshal(objectMap)
27223 }
27224
27225
27226 func (vmtd VirtualMachineTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) {
27227 return nil, false
27228 }
27229
27230
27231 func (vmtd VirtualMachineTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) {
27232 return nil, false
27233 }
27234
27235
27236 func (vmtd VirtualMachineTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) {
27237 return nil, false
27238 }
27239
27240
27241 func (vmtd VirtualMachineTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) {
27242 return nil, false
27243 }
27244
27245
27246 func (vmtd VirtualMachineTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) {
27247 return nil, false
27248 }
27249
27250
27251 func (vmtd VirtualMachineTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) {
27252 return nil, false
27253 }
27254
27255
27256 func (vmtd VirtualMachineTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) {
27257 return &vmtd, true
27258 }
27259
27260
27261 func (vmtd VirtualMachineTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) {
27262 return nil, false
27263 }
27264
27265
27266 func (vmtd VirtualMachineTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) {
27267 return nil, false
27268 }
27269
27270
27271 func (vmtd VirtualMachineTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) {
27272 return &vmtd, true
27273 }
27274
27275
27276 type VmmDetails struct {
27277
27278 InstanceType InstanceTypeBasicFabricSpecificDetails `json:"instanceType,omitempty"`
27279 }
27280
27281
27282 func (vd VmmDetails) MarshalJSON() ([]byte, error) {
27283 vd.InstanceType = InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMM
27284 objectMap := make(map[string]interface{})
27285 if vd.InstanceType != "" {
27286 objectMap["instanceType"] = vd.InstanceType
27287 }
27288 return json.Marshal(objectMap)
27289 }
27290
27291
27292 func (vd VmmDetails) AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool) {
27293 return nil, false
27294 }
27295
27296
27297 func (vd VmmDetails) AsHyperVSiteDetails() (*HyperVSiteDetails, bool) {
27298 return nil, false
27299 }
27300
27301
27302 func (vd VmmDetails) AsInMageRcmFabricSpecificDetails() (*InMageRcmFabricSpecificDetails, bool) {
27303 return nil, false
27304 }
27305
27306
27307 func (vd VmmDetails) AsVmmDetails() (*VmmDetails, bool) {
27308 return &vd, true
27309 }
27310
27311
27312 func (vd VmmDetails) AsVMwareDetails() (*VMwareDetails, bool) {
27313 return nil, false
27314 }
27315
27316
27317 func (vd VmmDetails) AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool) {
27318 return nil, false
27319 }
27320
27321
27322 func (vd VmmDetails) AsFabricSpecificDetails() (*FabricSpecificDetails, bool) {
27323 return nil, false
27324 }
27325
27326
27327 func (vd VmmDetails) AsBasicFabricSpecificDetails() (BasicFabricSpecificDetails, bool) {
27328 return &vd, true
27329 }
27330
27331
27332
27333 type VmmToAzureCreateNetworkMappingInput struct {
27334
27335 InstanceType InstanceTypeBasicFabricSpecificCreateNetworkMappingInput `json:"instanceType,omitempty"`
27336 }
27337
27338
27339 func (vtacnmi VmmToAzureCreateNetworkMappingInput) MarshalJSON() ([]byte, error) {
27340 vtacnmi.InstanceType = InstanceTypeVmmToAzure
27341 objectMap := make(map[string]interface{})
27342 if vtacnmi.InstanceType != "" {
27343 objectMap["instanceType"] = vtacnmi.InstanceType
27344 }
27345 return json.Marshal(objectMap)
27346 }
27347
27348
27349 func (vtacnmi VmmToAzureCreateNetworkMappingInput) AsAzureToAzureCreateNetworkMappingInput() (*AzureToAzureCreateNetworkMappingInput, bool) {
27350 return nil, false
27351 }
27352
27353
27354 func (vtacnmi VmmToAzureCreateNetworkMappingInput) AsVmmToAzureCreateNetworkMappingInput() (*VmmToAzureCreateNetworkMappingInput, bool) {
27355 return &vtacnmi, true
27356 }
27357
27358
27359 func (vtacnmi VmmToAzureCreateNetworkMappingInput) AsVmmToVmmCreateNetworkMappingInput() (*VmmToVmmCreateNetworkMappingInput, bool) {
27360 return nil, false
27361 }
27362
27363
27364 func (vtacnmi VmmToAzureCreateNetworkMappingInput) AsFabricSpecificCreateNetworkMappingInput() (*FabricSpecificCreateNetworkMappingInput, bool) {
27365 return nil, false
27366 }
27367
27368
27369 func (vtacnmi VmmToAzureCreateNetworkMappingInput) AsBasicFabricSpecificCreateNetworkMappingInput() (BasicFabricSpecificCreateNetworkMappingInput, bool) {
27370 return &vtacnmi, true
27371 }
27372
27373
27374 type VmmToAzureNetworkMappingSettings struct {
27375
27376 InstanceType InstanceTypeBasicNetworkMappingFabricSpecificSettings `json:"instanceType,omitempty"`
27377 }
27378
27379
27380 func (vtanms VmmToAzureNetworkMappingSettings) MarshalJSON() ([]byte, error) {
27381 vtanms.InstanceType = InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToAzure
27382 objectMap := make(map[string]interface{})
27383 if vtanms.InstanceType != "" {
27384 objectMap["instanceType"] = vtanms.InstanceType
27385 }
27386 return json.Marshal(objectMap)
27387 }
27388
27389
27390 func (vtanms VmmToAzureNetworkMappingSettings) AsAzureToAzureNetworkMappingSettings() (*AzureToAzureNetworkMappingSettings, bool) {
27391 return nil, false
27392 }
27393
27394
27395 func (vtanms VmmToAzureNetworkMappingSettings) AsVmmToAzureNetworkMappingSettings() (*VmmToAzureNetworkMappingSettings, bool) {
27396 return &vtanms, true
27397 }
27398
27399
27400 func (vtanms VmmToAzureNetworkMappingSettings) AsVmmToVmmNetworkMappingSettings() (*VmmToVmmNetworkMappingSettings, bool) {
27401 return nil, false
27402 }
27403
27404
27405 func (vtanms VmmToAzureNetworkMappingSettings) AsNetworkMappingFabricSpecificSettings() (*NetworkMappingFabricSpecificSettings, bool) {
27406 return nil, false
27407 }
27408
27409
27410 func (vtanms VmmToAzureNetworkMappingSettings) AsBasicNetworkMappingFabricSpecificSettings() (BasicNetworkMappingFabricSpecificSettings, bool) {
27411 return &vtanms, true
27412 }
27413
27414
27415
27416 type VmmToAzureUpdateNetworkMappingInput struct {
27417
27418 InstanceType InstanceTypeBasicFabricSpecificUpdateNetworkMappingInput `json:"instanceType,omitempty"`
27419 }
27420
27421
27422 func (vtaunmi VmmToAzureUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) {
27423 vtaunmi.InstanceType = InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToAzure
27424 objectMap := make(map[string]interface{})
27425 if vtaunmi.InstanceType != "" {
27426 objectMap["instanceType"] = vtaunmi.InstanceType
27427 }
27428 return json.Marshal(objectMap)
27429 }
27430
27431
27432 func (vtaunmi VmmToAzureUpdateNetworkMappingInput) AsAzureToAzureUpdateNetworkMappingInput() (*AzureToAzureUpdateNetworkMappingInput, bool) {
27433 return nil, false
27434 }
27435
27436
27437 func (vtaunmi VmmToAzureUpdateNetworkMappingInput) AsVmmToAzureUpdateNetworkMappingInput() (*VmmToAzureUpdateNetworkMappingInput, bool) {
27438 return &vtaunmi, true
27439 }
27440
27441
27442 func (vtaunmi VmmToAzureUpdateNetworkMappingInput) AsVmmToVmmUpdateNetworkMappingInput() (*VmmToVmmUpdateNetworkMappingInput, bool) {
27443 return nil, false
27444 }
27445
27446
27447 func (vtaunmi VmmToAzureUpdateNetworkMappingInput) AsFabricSpecificUpdateNetworkMappingInput() (*FabricSpecificUpdateNetworkMappingInput, bool) {
27448 return nil, false
27449 }
27450
27451
27452 func (vtaunmi VmmToAzureUpdateNetworkMappingInput) AsBasicFabricSpecificUpdateNetworkMappingInput() (BasicFabricSpecificUpdateNetworkMappingInput, bool) {
27453 return &vtaunmi, true
27454 }
27455
27456
27457
27458 type VmmToVmmCreateNetworkMappingInput struct {
27459
27460 InstanceType InstanceTypeBasicFabricSpecificCreateNetworkMappingInput `json:"instanceType,omitempty"`
27461 }
27462
27463
27464 func (vtvcnmi VmmToVmmCreateNetworkMappingInput) MarshalJSON() ([]byte, error) {
27465 vtvcnmi.InstanceType = InstanceTypeVmmToVmm
27466 objectMap := make(map[string]interface{})
27467 if vtvcnmi.InstanceType != "" {
27468 objectMap["instanceType"] = vtvcnmi.InstanceType
27469 }
27470 return json.Marshal(objectMap)
27471 }
27472
27473
27474 func (vtvcnmi VmmToVmmCreateNetworkMappingInput) AsAzureToAzureCreateNetworkMappingInput() (*AzureToAzureCreateNetworkMappingInput, bool) {
27475 return nil, false
27476 }
27477
27478
27479 func (vtvcnmi VmmToVmmCreateNetworkMappingInput) AsVmmToAzureCreateNetworkMappingInput() (*VmmToAzureCreateNetworkMappingInput, bool) {
27480 return nil, false
27481 }
27482
27483
27484 func (vtvcnmi VmmToVmmCreateNetworkMappingInput) AsVmmToVmmCreateNetworkMappingInput() (*VmmToVmmCreateNetworkMappingInput, bool) {
27485 return &vtvcnmi, true
27486 }
27487
27488
27489 func (vtvcnmi VmmToVmmCreateNetworkMappingInput) AsFabricSpecificCreateNetworkMappingInput() (*FabricSpecificCreateNetworkMappingInput, bool) {
27490 return nil, false
27491 }
27492
27493
27494 func (vtvcnmi VmmToVmmCreateNetworkMappingInput) AsBasicFabricSpecificCreateNetworkMappingInput() (BasicFabricSpecificCreateNetworkMappingInput, bool) {
27495 return &vtvcnmi, true
27496 }
27497
27498
27499 type VmmToVmmNetworkMappingSettings struct {
27500
27501 InstanceType InstanceTypeBasicNetworkMappingFabricSpecificSettings `json:"instanceType,omitempty"`
27502 }
27503
27504
27505 func (vtvnms VmmToVmmNetworkMappingSettings) MarshalJSON() ([]byte, error) {
27506 vtvnms.InstanceType = InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToVmm
27507 objectMap := make(map[string]interface{})
27508 if vtvnms.InstanceType != "" {
27509 objectMap["instanceType"] = vtvnms.InstanceType
27510 }
27511 return json.Marshal(objectMap)
27512 }
27513
27514
27515 func (vtvnms VmmToVmmNetworkMappingSettings) AsAzureToAzureNetworkMappingSettings() (*AzureToAzureNetworkMappingSettings, bool) {
27516 return nil, false
27517 }
27518
27519
27520 func (vtvnms VmmToVmmNetworkMappingSettings) AsVmmToAzureNetworkMappingSettings() (*VmmToAzureNetworkMappingSettings, bool) {
27521 return nil, false
27522 }
27523
27524
27525 func (vtvnms VmmToVmmNetworkMappingSettings) AsVmmToVmmNetworkMappingSettings() (*VmmToVmmNetworkMappingSettings, bool) {
27526 return &vtvnms, true
27527 }
27528
27529
27530 func (vtvnms VmmToVmmNetworkMappingSettings) AsNetworkMappingFabricSpecificSettings() (*NetworkMappingFabricSpecificSettings, bool) {
27531 return nil, false
27532 }
27533
27534
27535 func (vtvnms VmmToVmmNetworkMappingSettings) AsBasicNetworkMappingFabricSpecificSettings() (BasicNetworkMappingFabricSpecificSettings, bool) {
27536 return &vtvnms, true
27537 }
27538
27539
27540
27541 type VmmToVmmUpdateNetworkMappingInput struct {
27542
27543 InstanceType InstanceTypeBasicFabricSpecificUpdateNetworkMappingInput `json:"instanceType,omitempty"`
27544 }
27545
27546
27547 func (vtvunmi VmmToVmmUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) {
27548 vtvunmi.InstanceType = InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToVmm
27549 objectMap := make(map[string]interface{})
27550 if vtvunmi.InstanceType != "" {
27551 objectMap["instanceType"] = vtvunmi.InstanceType
27552 }
27553 return json.Marshal(objectMap)
27554 }
27555
27556
27557 func (vtvunmi VmmToVmmUpdateNetworkMappingInput) AsAzureToAzureUpdateNetworkMappingInput() (*AzureToAzureUpdateNetworkMappingInput, bool) {
27558 return nil, false
27559 }
27560
27561
27562 func (vtvunmi VmmToVmmUpdateNetworkMappingInput) AsVmmToAzureUpdateNetworkMappingInput() (*VmmToAzureUpdateNetworkMappingInput, bool) {
27563 return nil, false
27564 }
27565
27566
27567 func (vtvunmi VmmToVmmUpdateNetworkMappingInput) AsVmmToVmmUpdateNetworkMappingInput() (*VmmToVmmUpdateNetworkMappingInput, bool) {
27568 return &vtvunmi, true
27569 }
27570
27571
27572 func (vtvunmi VmmToVmmUpdateNetworkMappingInput) AsFabricSpecificUpdateNetworkMappingInput() (*FabricSpecificUpdateNetworkMappingInput, bool) {
27573 return nil, false
27574 }
27575
27576
27577 func (vtvunmi VmmToVmmUpdateNetworkMappingInput) AsBasicFabricSpecificUpdateNetworkMappingInput() (BasicFabricSpecificUpdateNetworkMappingInput, bool) {
27578 return &vtvunmi, true
27579 }
27580
27581
27582 type VmmVirtualMachineDetails struct {
27583
27584 SourceItemID *string `json:"sourceItemId,omitempty"`
27585
27586 Generation *string `json:"generation,omitempty"`
27587
27588 OsDetails *OSDetails `json:"osDetails,omitempty"`
27589
27590 DiskDetails *[]DiskDetails `json:"diskDetails,omitempty"`
27591
27592 HasPhysicalDisk PresenceStatus `json:"hasPhysicalDisk,omitempty"`
27593
27594 HasFibreChannelAdapter PresenceStatus `json:"hasFibreChannelAdapter,omitempty"`
27595
27596 HasSharedVhd PresenceStatus `json:"hasSharedVhd,omitempty"`
27597
27598 InstanceType InstanceTypeBasicConfigurationSettings `json:"instanceType,omitempty"`
27599 }
27600
27601
27602 func (vvmd VmmVirtualMachineDetails) MarshalJSON() ([]byte, error) {
27603 vvmd.InstanceType = InstanceTypeVmmVirtualMachine
27604 objectMap := make(map[string]interface{})
27605 if vvmd.SourceItemID != nil {
27606 objectMap["sourceItemId"] = vvmd.SourceItemID
27607 }
27608 if vvmd.Generation != nil {
27609 objectMap["generation"] = vvmd.Generation
27610 }
27611 if vvmd.OsDetails != nil {
27612 objectMap["osDetails"] = vvmd.OsDetails
27613 }
27614 if vvmd.DiskDetails != nil {
27615 objectMap["diskDetails"] = vvmd.DiskDetails
27616 }
27617 if vvmd.HasPhysicalDisk != "" {
27618 objectMap["hasPhysicalDisk"] = vvmd.HasPhysicalDisk
27619 }
27620 if vvmd.HasFibreChannelAdapter != "" {
27621 objectMap["hasFibreChannelAdapter"] = vvmd.HasFibreChannelAdapter
27622 }
27623 if vvmd.HasSharedVhd != "" {
27624 objectMap["hasSharedVhd"] = vvmd.HasSharedVhd
27625 }
27626 if vvmd.InstanceType != "" {
27627 objectMap["instanceType"] = vvmd.InstanceType
27628 }
27629 return json.Marshal(objectMap)
27630 }
27631
27632
27633 func (vvmd VmmVirtualMachineDetails) AsHyperVVirtualMachineDetails() (*HyperVVirtualMachineDetails, bool) {
27634 return nil, false
27635 }
27636
27637
27638 func (vvmd VmmVirtualMachineDetails) AsReplicationGroupDetails() (*ReplicationGroupDetails, bool) {
27639 return nil, false
27640 }
27641
27642
27643 func (vvmd VmmVirtualMachineDetails) AsVmmVirtualMachineDetails() (*VmmVirtualMachineDetails, bool) {
27644 return &vvmd, true
27645 }
27646
27647
27648 func (vvmd VmmVirtualMachineDetails) AsVMwareVirtualMachineDetails() (*VMwareVirtualMachineDetails, bool) {
27649 return nil, false
27650 }
27651
27652
27653 func (vvmd VmmVirtualMachineDetails) AsConfigurationSettings() (*ConfigurationSettings, bool) {
27654 return nil, false
27655 }
27656
27657
27658 func (vvmd VmmVirtualMachineDetails) AsBasicConfigurationSettings() (BasicConfigurationSettings, bool) {
27659 return &vvmd, true
27660 }
27661
27662
27663 type VMNicDetails struct {
27664
27665 NicID *string `json:"nicId,omitempty"`
27666
27667 ReplicaNicID *string `json:"replicaNicId,omitempty"`
27668
27669 SourceNicArmID *string `json:"sourceNicArmId,omitempty"`
27670
27671 VMSubnetName *string `json:"vMSubnetName,omitempty"`
27672
27673 VMNetworkName *string `json:"vMNetworkName,omitempty"`
27674
27675 RecoveryVMNetworkID *string `json:"recoveryVMNetworkId,omitempty"`
27676
27677 RecoveryVMSubnetName *string `json:"recoveryVMSubnetName,omitempty"`
27678
27679 IPAddressType *string `json:"ipAddressType,omitempty"`
27680
27681 PrimaryNicStaticIPAddress *string `json:"primaryNicStaticIPAddress,omitempty"`
27682
27683 ReplicaNicStaticIPAddress *string `json:"replicaNicStaticIPAddress,omitempty"`
27684
27685 SelectionType *string `json:"selectionType,omitempty"`
27686
27687 RecoveryNicIPAddressType *string `json:"recoveryNicIpAddressType,omitempty"`
27688
27689 RecoveryPublicIPAddressID *string `json:"recoveryPublicIpAddressId,omitempty"`
27690
27691 RecoveryNetworkSecurityGroupID *string `json:"recoveryNetworkSecurityGroupId,omitempty"`
27692
27693 RecoveryLBBackendAddressPoolIds *[]string `json:"recoveryLBBackendAddressPoolIds,omitempty"`
27694
27695 EnableAcceleratedNetworkingOnRecovery *bool `json:"enableAcceleratedNetworkingOnRecovery,omitempty"`
27696
27697 TfoVMNetworkID *string `json:"tfoVMNetworkId,omitempty"`
27698
27699 TfoVMSubnetName *string `json:"tfoVMSubnetName,omitempty"`
27700
27701 TfoNetworkSecurityGroupID *string `json:"tfoNetworkSecurityGroupId,omitempty"`
27702
27703 EnableAcceleratedNetworkingOnTfo *bool `json:"enableAcceleratedNetworkingOnTfo,omitempty"`
27704
27705 TfoIPConfigs *[]IPConfig `json:"tfoIPConfigs,omitempty"`
27706
27707 RecoveryNicName *string `json:"recoveryNicName,omitempty"`
27708
27709 RecoveryNicResourceGroupName *string `json:"recoveryNicResourceGroupName,omitempty"`
27710
27711 ReuseExistingNic *bool `json:"reuseExistingNic,omitempty"`
27712
27713 TfoRecoveryNicName *string `json:"tfoRecoveryNicName,omitempty"`
27714
27715 TfoRecoveryNicResourceGroupName *string `json:"tfoRecoveryNicResourceGroupName,omitempty"`
27716
27717 TfoReuseExistingNic *bool `json:"tfoReuseExistingNic,omitempty"`
27718 }
27719
27720
27721 type VMNicInputDetails struct {
27722
27723 NicID *string `json:"nicId,omitempty"`
27724
27725 RecoveryVMSubnetName *string `json:"recoveryVMSubnetName,omitempty"`
27726
27727 ReplicaNicStaticIPAddress *string `json:"replicaNicStaticIPAddress,omitempty"`
27728
27729 SelectionType *string `json:"selectionType,omitempty"`
27730
27731 RecoveryPublicIPAddressID *string `json:"recoveryPublicIpAddressId,omitempty"`
27732
27733 RecoveryNetworkSecurityGroupID *string `json:"recoveryNetworkSecurityGroupId,omitempty"`
27734
27735 RecoveryLBBackendAddressPoolIds *[]string `json:"recoveryLBBackendAddressPoolIds,omitempty"`
27736
27737 EnableAcceleratedNetworkingOnRecovery *bool `json:"enableAcceleratedNetworkingOnRecovery,omitempty"`
27738
27739 TfoVMSubnetName *string `json:"tfoVMSubnetName,omitempty"`
27740
27741 TfoNetworkSecurityGroupID *string `json:"tfoNetworkSecurityGroupId,omitempty"`
27742
27743 EnableAcceleratedNetworkingOnTfo *bool `json:"enableAcceleratedNetworkingOnTfo,omitempty"`
27744
27745 TfoIPConfigs *[]IPConfig `json:"tfoIPConfigs,omitempty"`
27746
27747 RecoveryNicName *string `json:"recoveryNicName,omitempty"`
27748
27749 RecoveryNicResourceGroupName *string `json:"recoveryNicResourceGroupName,omitempty"`
27750
27751 ReuseExistingNic *bool `json:"reuseExistingNic,omitempty"`
27752
27753 TfoNicName *string `json:"tfoNicName,omitempty"`
27754
27755 TfoNicResourceGroupName *string `json:"tfoNicResourceGroupName,omitempty"`
27756
27757 TfoReuseExistingNic *bool `json:"tfoReuseExistingNic,omitempty"`
27758 }
27759
27760
27761 type VMNicUpdatesTaskDetails struct {
27762
27763 VMID *string `json:"vmId,omitempty"`
27764
27765 NicID *string `json:"nicId,omitempty"`
27766
27767 Name *string `json:"name,omitempty"`
27768
27769 InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"`
27770 }
27771
27772
27773 func (vnutd VMNicUpdatesTaskDetails) MarshalJSON() ([]byte, error) {
27774 vnutd.InstanceType = InstanceTypeVMNicUpdatesTaskDetails
27775 objectMap := make(map[string]interface{})
27776 if vnutd.VMID != nil {
27777 objectMap["vmId"] = vnutd.VMID
27778 }
27779 if vnutd.NicID != nil {
27780 objectMap["nicId"] = vnutd.NicID
27781 }
27782 if vnutd.Name != nil {
27783 objectMap["name"] = vnutd.Name
27784 }
27785 if vnutd.InstanceType != "" {
27786 objectMap["instanceType"] = vnutd.InstanceType
27787 }
27788 return json.Marshal(objectMap)
27789 }
27790
27791
27792 func (vnutd VMNicUpdatesTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) {
27793 return nil, false
27794 }
27795
27796
27797 func (vnutd VMNicUpdatesTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) {
27798 return nil, false
27799 }
27800
27801
27802 func (vnutd VMNicUpdatesTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) {
27803 return nil, false
27804 }
27805
27806
27807 func (vnutd VMNicUpdatesTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) {
27808 return nil, false
27809 }
27810
27811
27812 func (vnutd VMNicUpdatesTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) {
27813 return nil, false
27814 }
27815
27816
27817 func (vnutd VMNicUpdatesTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) {
27818 return nil, false
27819 }
27820
27821
27822 func (vnutd VMNicUpdatesTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) {
27823 return nil, false
27824 }
27825
27826
27827 func (vnutd VMNicUpdatesTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) {
27828 return &vnutd, true
27829 }
27830
27831
27832 func (vnutd VMNicUpdatesTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) {
27833 return nil, false
27834 }
27835
27836
27837 func (vnutd VMNicUpdatesTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) {
27838 return &vnutd, true
27839 }
27840
27841
27842 type VMwareCbtContainerCreationInput struct {
27843
27844 InstanceType InstanceTypeBasicReplicationProviderSpecificContainerCreationInput `json:"instanceType,omitempty"`
27845 }
27846
27847
27848 func (vmccci VMwareCbtContainerCreationInput) MarshalJSON() ([]byte, error) {
27849 vmccci.InstanceType = InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeSixcSevendaFourFiveFiveFiveZeroSixfFourThreeffAOneSixaEightebOneZeroOneaebbSevenZero
27850 objectMap := make(map[string]interface{})
27851 if vmccci.InstanceType != "" {
27852 objectMap["instanceType"] = vmccci.InstanceType
27853 }
27854 return json.Marshal(objectMap)
27855 }
27856
27857
27858 func (vmccci VMwareCbtContainerCreationInput) AsA2AContainerCreationInput() (*A2AContainerCreationInput, bool) {
27859 return nil, false
27860 }
27861
27862
27863 func (vmccci VMwareCbtContainerCreationInput) AsVMwareCbtContainerCreationInput() (*VMwareCbtContainerCreationInput, bool) {
27864 return &vmccci, true
27865 }
27866
27867
27868 func (vmccci VMwareCbtContainerCreationInput) AsReplicationProviderSpecificContainerCreationInput() (*ReplicationProviderSpecificContainerCreationInput, bool) {
27869 return nil, false
27870 }
27871
27872
27873 func (vmccci VMwareCbtContainerCreationInput) AsBasicReplicationProviderSpecificContainerCreationInput() (BasicReplicationProviderSpecificContainerCreationInput, bool) {
27874 return &vmccci, true
27875 }
27876
27877
27878 type VMwareCbtContainerMappingInput struct {
27879
27880 KeyVaultID *string `json:"keyVaultId,omitempty"`
27881
27882 KeyVaultURI *string `json:"keyVaultUri,omitempty"`
27883
27884 StorageAccountID *string `json:"storageAccountId,omitempty"`
27885
27886 StorageAccountSasSecretName *string `json:"storageAccountSasSecretName,omitempty"`
27887
27888 ServiceBusConnectionStringSecretName *string `json:"serviceBusConnectionStringSecretName,omitempty"`
27889
27890 TargetLocation *string `json:"targetLocation,omitempty"`
27891
27892 InstanceType InstanceTypeBasicReplicationProviderSpecificContainerMappingInput `json:"instanceType,omitempty"`
27893 }
27894
27895
27896 func (vmccmi VMwareCbtContainerMappingInput) MarshalJSON() ([]byte, error) {
27897 vmccmi.InstanceType = InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeVMwareCbt
27898 objectMap := make(map[string]interface{})
27899 if vmccmi.KeyVaultID != nil {
27900 objectMap["keyVaultId"] = vmccmi.KeyVaultID
27901 }
27902 if vmccmi.KeyVaultURI != nil {
27903 objectMap["keyVaultUri"] = vmccmi.KeyVaultURI
27904 }
27905 if vmccmi.StorageAccountID != nil {
27906 objectMap["storageAccountId"] = vmccmi.StorageAccountID
27907 }
27908 if vmccmi.StorageAccountSasSecretName != nil {
27909 objectMap["storageAccountSasSecretName"] = vmccmi.StorageAccountSasSecretName
27910 }
27911 if vmccmi.ServiceBusConnectionStringSecretName != nil {
27912 objectMap["serviceBusConnectionStringSecretName"] = vmccmi.ServiceBusConnectionStringSecretName
27913 }
27914 if vmccmi.TargetLocation != nil {
27915 objectMap["targetLocation"] = vmccmi.TargetLocation
27916 }
27917 if vmccmi.InstanceType != "" {
27918 objectMap["instanceType"] = vmccmi.InstanceType
27919 }
27920 return json.Marshal(objectMap)
27921 }
27922
27923
27924 func (vmccmi VMwareCbtContainerMappingInput) AsA2AContainerMappingInput() (*A2AContainerMappingInput, bool) {
27925 return nil, false
27926 }
27927
27928
27929 func (vmccmi VMwareCbtContainerMappingInput) AsVMwareCbtContainerMappingInput() (*VMwareCbtContainerMappingInput, bool) {
27930 return &vmccmi, true
27931 }
27932
27933
27934 func (vmccmi VMwareCbtContainerMappingInput) AsReplicationProviderSpecificContainerMappingInput() (*ReplicationProviderSpecificContainerMappingInput, bool) {
27935 return nil, false
27936 }
27937
27938
27939 func (vmccmi VMwareCbtContainerMappingInput) AsBasicReplicationProviderSpecificContainerMappingInput() (BasicReplicationProviderSpecificContainerMappingInput, bool) {
27940 return &vmccmi, true
27941 }
27942
27943
27944 type VMwareCbtDiskInput struct {
27945
27946 DiskID *string `json:"diskId,omitempty"`
27947
27948 IsOSDisk *string `json:"isOSDisk,omitempty"`
27949
27950 LogStorageAccountID *string `json:"logStorageAccountId,omitempty"`
27951
27952 LogStorageAccountSasSecretName *string `json:"logStorageAccountSasSecretName,omitempty"`
27953
27954 DiskType DiskAccountType `json:"diskType,omitempty"`
27955 }
27956
27957
27958 type VMwareCbtEnableMigrationInput struct {
27959
27960 VmwareMachineID *string `json:"vmwareMachineId,omitempty"`
27961
27962 DisksToInclude *[]VMwareCbtDiskInput `json:"disksToInclude,omitempty"`
27963
27964 LicenseType LicenseType `json:"licenseType,omitempty"`
27965
27966 DataMoverRunAsAccountID *string `json:"dataMoverRunAsAccountId,omitempty"`
27967
27968 SnapshotRunAsAccountID *string `json:"snapshotRunAsAccountId,omitempty"`
27969
27970 TargetVMName *string `json:"targetVmName,omitempty"`
27971
27972 TargetVMSize *string `json:"targetVmSize,omitempty"`
27973
27974 TargetResourceGroupID *string `json:"targetResourceGroupId,omitempty"`
27975
27976 TargetNetworkID *string `json:"targetNetworkId,omitempty"`
27977
27978 TargetSubnetName *string `json:"targetSubnetName,omitempty"`
27979
27980 TargetAvailabilitySetID *string `json:"targetAvailabilitySetId,omitempty"`
27981
27982 TargetBootDiagnosticsStorageAccountID *string `json:"targetBootDiagnosticsStorageAccountId,omitempty"`
27983
27984 InstanceType InstanceTypeBasicEnableMigrationProviderSpecificInput `json:"instanceType,omitempty"`
27985 }
27986
27987
27988 func (vmcemi VMwareCbtEnableMigrationInput) MarshalJSON() ([]byte, error) {
27989 vmcemi.InstanceType = InstanceTypeVMwareCbt
27990 objectMap := make(map[string]interface{})
27991 if vmcemi.VmwareMachineID != nil {
27992 objectMap["vmwareMachineId"] = vmcemi.VmwareMachineID
27993 }
27994 if vmcemi.DisksToInclude != nil {
27995 objectMap["disksToInclude"] = vmcemi.DisksToInclude
27996 }
27997 if vmcemi.LicenseType != "" {
27998 objectMap["licenseType"] = vmcemi.LicenseType
27999 }
28000 if vmcemi.DataMoverRunAsAccountID != nil {
28001 objectMap["dataMoverRunAsAccountId"] = vmcemi.DataMoverRunAsAccountID
28002 }
28003 if vmcemi.SnapshotRunAsAccountID != nil {
28004 objectMap["snapshotRunAsAccountId"] = vmcemi.SnapshotRunAsAccountID
28005 }
28006 if vmcemi.TargetVMName != nil {
28007 objectMap["targetVmName"] = vmcemi.TargetVMName
28008 }
28009 if vmcemi.TargetVMSize != nil {
28010 objectMap["targetVmSize"] = vmcemi.TargetVMSize
28011 }
28012 if vmcemi.TargetResourceGroupID != nil {
28013 objectMap["targetResourceGroupId"] = vmcemi.TargetResourceGroupID
28014 }
28015 if vmcemi.TargetNetworkID != nil {
28016 objectMap["targetNetworkId"] = vmcemi.TargetNetworkID
28017 }
28018 if vmcemi.TargetSubnetName != nil {
28019 objectMap["targetSubnetName"] = vmcemi.TargetSubnetName
28020 }
28021 if vmcemi.TargetAvailabilitySetID != nil {
28022 objectMap["targetAvailabilitySetId"] = vmcemi.TargetAvailabilitySetID
28023 }
28024 if vmcemi.TargetBootDiagnosticsStorageAccountID != nil {
28025 objectMap["targetBootDiagnosticsStorageAccountId"] = vmcemi.TargetBootDiagnosticsStorageAccountID
28026 }
28027 if vmcemi.InstanceType != "" {
28028 objectMap["instanceType"] = vmcemi.InstanceType
28029 }
28030 return json.Marshal(objectMap)
28031 }
28032
28033
28034 func (vmcemi VMwareCbtEnableMigrationInput) AsVMwareCbtEnableMigrationInput() (*VMwareCbtEnableMigrationInput, bool) {
28035 return &vmcemi, true
28036 }
28037
28038
28039 func (vmcemi VMwareCbtEnableMigrationInput) AsEnableMigrationProviderSpecificInput() (*EnableMigrationProviderSpecificInput, bool) {
28040 return nil, false
28041 }
28042
28043
28044 func (vmcemi VMwareCbtEnableMigrationInput) AsBasicEnableMigrationProviderSpecificInput() (BasicEnableMigrationProviderSpecificInput, bool) {
28045 return &vmcemi, true
28046 }
28047
28048
28049 type VMwareCbtMigrateInput struct {
28050
28051 PerformShutdown *string `json:"performShutdown,omitempty"`
28052
28053 InstanceType InstanceTypeBasicMigrateProviderSpecificInput `json:"instanceType,omitempty"`
28054 }
28055
28056
28057 func (vmcmi VMwareCbtMigrateInput) MarshalJSON() ([]byte, error) {
28058 vmcmi.InstanceType = InstanceTypeBasicMigrateProviderSpecificInputInstanceTypeVMwareCbt
28059 objectMap := make(map[string]interface{})
28060 if vmcmi.PerformShutdown != nil {
28061 objectMap["performShutdown"] = vmcmi.PerformShutdown
28062 }
28063 if vmcmi.InstanceType != "" {
28064 objectMap["instanceType"] = vmcmi.InstanceType
28065 }
28066 return json.Marshal(objectMap)
28067 }
28068
28069
28070 func (vmcmi VMwareCbtMigrateInput) AsVMwareCbtMigrateInput() (*VMwareCbtMigrateInput, bool) {
28071 return &vmcmi, true
28072 }
28073
28074
28075 func (vmcmi VMwareCbtMigrateInput) AsMigrateProviderSpecificInput() (*MigrateProviderSpecificInput, bool) {
28076 return nil, false
28077 }
28078
28079
28080 func (vmcmi VMwareCbtMigrateInput) AsBasicMigrateProviderSpecificInput() (BasicMigrateProviderSpecificInput, bool) {
28081 return &vmcmi, true
28082 }
28083
28084
28085 type VMwareCbtMigrationDetails struct {
28086
28087 VmwareMachineID *string `json:"vmwareMachineId,omitempty"`
28088
28089 OsType *string `json:"osType,omitempty"`
28090
28091 LicenseType *string `json:"licenseType,omitempty"`
28092
28093 DataMoverRunAsAccountID *string `json:"dataMoverRunAsAccountId,omitempty"`
28094
28095 SnapshotRunAsAccountID *string `json:"snapshotRunAsAccountId,omitempty"`
28096
28097 TargetVMName *string `json:"targetVmName,omitempty"`
28098
28099 TargetVMSize *string `json:"targetVmSize,omitempty"`
28100
28101 TargetLocation *string `json:"targetLocation,omitempty"`
28102
28103 TargetResourceGroupID *string `json:"targetResourceGroupId,omitempty"`
28104
28105 TargetAvailabilitySetID *string `json:"targetAvailabilitySetId,omitempty"`
28106
28107 TargetBootDiagnosticsStorageAccountID *string `json:"targetBootDiagnosticsStorageAccountId,omitempty"`
28108
28109 ProtectedDisks *[]VMwareCbtProtectedDiskDetails `json:"protectedDisks,omitempty"`
28110
28111 TargetNetworkID *string `json:"targetNetworkId,omitempty"`
28112
28113 VMNics *[]VMwareCbtNicDetails `json:"vmNics,omitempty"`
28114
28115 MigrationRecoveryPointID *string `json:"migrationRecoveryPointId,omitempty"`
28116
28117 LastRecoveryPointReceived *date.Time `json:"lastRecoveryPointReceived,omitempty"`
28118
28119 InstanceType InstanceTypeBasicMigrationProviderSpecificSettings `json:"instanceType,omitempty"`
28120 }
28121
28122
28123 func (vmcmd VMwareCbtMigrationDetails) MarshalJSON() ([]byte, error) {
28124 vmcmd.InstanceType = InstanceTypeBasicMigrationProviderSpecificSettingsInstanceTypeVMwareCbt
28125 objectMap := make(map[string]interface{})
28126 if vmcmd.LicenseType != nil {
28127 objectMap["licenseType"] = vmcmd.LicenseType
28128 }
28129 if vmcmd.TargetVMName != nil {
28130 objectMap["targetVmName"] = vmcmd.TargetVMName
28131 }
28132 if vmcmd.TargetVMSize != nil {
28133 objectMap["targetVmSize"] = vmcmd.TargetVMSize
28134 }
28135 if vmcmd.TargetResourceGroupID != nil {
28136 objectMap["targetResourceGroupId"] = vmcmd.TargetResourceGroupID
28137 }
28138 if vmcmd.TargetAvailabilitySetID != nil {
28139 objectMap["targetAvailabilitySetId"] = vmcmd.TargetAvailabilitySetID
28140 }
28141 if vmcmd.TargetBootDiagnosticsStorageAccountID != nil {
28142 objectMap["targetBootDiagnosticsStorageAccountId"] = vmcmd.TargetBootDiagnosticsStorageAccountID
28143 }
28144 if vmcmd.ProtectedDisks != nil {
28145 objectMap["protectedDisks"] = vmcmd.ProtectedDisks
28146 }
28147 if vmcmd.TargetNetworkID != nil {
28148 objectMap["targetNetworkId"] = vmcmd.TargetNetworkID
28149 }
28150 if vmcmd.VMNics != nil {
28151 objectMap["vmNics"] = vmcmd.VMNics
28152 }
28153 if vmcmd.InstanceType != "" {
28154 objectMap["instanceType"] = vmcmd.InstanceType
28155 }
28156 return json.Marshal(objectMap)
28157 }
28158
28159
28160 func (vmcmd VMwareCbtMigrationDetails) AsVMwareCbtMigrationDetails() (*VMwareCbtMigrationDetails, bool) {
28161 return &vmcmd, true
28162 }
28163
28164
28165 func (vmcmd VMwareCbtMigrationDetails) AsMigrationProviderSpecificSettings() (*MigrationProviderSpecificSettings, bool) {
28166 return nil, false
28167 }
28168
28169
28170 func (vmcmd VMwareCbtMigrationDetails) AsBasicMigrationProviderSpecificSettings() (BasicMigrationProviderSpecificSettings, bool) {
28171 return &vmcmd, true
28172 }
28173
28174
28175 type VMwareCbtNicDetails struct {
28176
28177 NicID *string `json:"nicId,omitempty"`
28178
28179 IsPrimaryNic *string `json:"isPrimaryNic,omitempty"`
28180
28181 SourceIPAddress *string `json:"sourceIPAddress,omitempty"`
28182
28183 SourceIPAddressType EthernetAddressType `json:"sourceIPAddressType,omitempty"`
28184
28185 SourceNetworkID *string `json:"sourceNetworkId,omitempty"`
28186
28187 TargetIPAddress *string `json:"targetIPAddress,omitempty"`
28188
28189 TargetIPAddressType EthernetAddressType `json:"targetIPAddressType,omitempty"`
28190
28191 TargetSubnetName *string `json:"targetSubnetName,omitempty"`
28192
28193 IsSelectedForMigration *string `json:"isSelectedForMigration,omitempty"`
28194 }
28195
28196
28197 func (vmcnd VMwareCbtNicDetails) MarshalJSON() ([]byte, error) {
28198 objectMap := make(map[string]interface{})
28199 if vmcnd.IsPrimaryNic != nil {
28200 objectMap["isPrimaryNic"] = vmcnd.IsPrimaryNic
28201 }
28202 if vmcnd.TargetIPAddress != nil {
28203 objectMap["targetIPAddress"] = vmcnd.TargetIPAddress
28204 }
28205 if vmcnd.TargetIPAddressType != "" {
28206 objectMap["targetIPAddressType"] = vmcnd.TargetIPAddressType
28207 }
28208 if vmcnd.TargetSubnetName != nil {
28209 objectMap["targetSubnetName"] = vmcnd.TargetSubnetName
28210 }
28211 if vmcnd.IsSelectedForMigration != nil {
28212 objectMap["isSelectedForMigration"] = vmcnd.IsSelectedForMigration
28213 }
28214 return json.Marshal(objectMap)
28215 }
28216
28217
28218 type VMwareCbtNicInput struct {
28219
28220 NicID *string `json:"nicId,omitempty"`
28221
28222 IsPrimaryNic *string `json:"isPrimaryNic,omitempty"`
28223
28224 TargetSubnetName *string `json:"targetSubnetName,omitempty"`
28225
28226 TargetStaticIPAddress *string `json:"targetStaticIPAddress,omitempty"`
28227
28228 IsSelectedForMigration *string `json:"isSelectedForMigration,omitempty"`
28229 }
28230
28231
28232 type VMwareCbtPolicyCreationInput struct {
28233
28234 RecoveryPointHistoryInMinutes *int32 `json:"recoveryPointHistoryInMinutes,omitempty"`
28235
28236 CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"`
28237
28238 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"`
28239
28240 InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"`
28241 }
28242
28243
28244 func (vmcpci VMwareCbtPolicyCreationInput) MarshalJSON() ([]byte, error) {
28245 vmcpci.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeVMwareCbt
28246 objectMap := make(map[string]interface{})
28247 if vmcpci.RecoveryPointHistoryInMinutes != nil {
28248 objectMap["recoveryPointHistoryInMinutes"] = vmcpci.RecoveryPointHistoryInMinutes
28249 }
28250 if vmcpci.CrashConsistentFrequencyInMinutes != nil {
28251 objectMap["crashConsistentFrequencyInMinutes"] = vmcpci.CrashConsistentFrequencyInMinutes
28252 }
28253 if vmcpci.AppConsistentFrequencyInMinutes != nil {
28254 objectMap["appConsistentFrequencyInMinutes"] = vmcpci.AppConsistentFrequencyInMinutes
28255 }
28256 if vmcpci.InstanceType != "" {
28257 objectMap["instanceType"] = vmcpci.InstanceType
28258 }
28259 return json.Marshal(objectMap)
28260 }
28261
28262
28263 func (vmcpci VMwareCbtPolicyCreationInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) {
28264 return nil, false
28265 }
28266
28267
28268 func (vmcpci VMwareCbtPolicyCreationInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) {
28269 return nil, false
28270 }
28271
28272
28273 func (vmcpci VMwareCbtPolicyCreationInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) {
28274 return nil, false
28275 }
28276
28277
28278 func (vmcpci VMwareCbtPolicyCreationInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) {
28279 return nil, false
28280 }
28281
28282
28283 func (vmcpci VMwareCbtPolicyCreationInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) {
28284 return nil, false
28285 }
28286
28287
28288 func (vmcpci VMwareCbtPolicyCreationInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) {
28289 return nil, false
28290 }
28291
28292
28293 func (vmcpci VMwareCbtPolicyCreationInput) AsInMageRcmPolicyCreationInput() (*InMageRcmPolicyCreationInput, bool) {
28294 return nil, false
28295 }
28296
28297
28298 func (vmcpci VMwareCbtPolicyCreationInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) {
28299 return &vmcpci, true
28300 }
28301
28302
28303 func (vmcpci VMwareCbtPolicyCreationInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) {
28304 return nil, false
28305 }
28306
28307
28308 func (vmcpci VMwareCbtPolicyCreationInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) {
28309 return &vmcpci, true
28310 }
28311
28312
28313 type VmwareCbtPolicyDetails struct {
28314
28315 RecoveryPointHistoryInMinutes *int32 `json:"recoveryPointHistoryInMinutes,omitempty"`
28316
28317 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"`
28318
28319 CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"`
28320
28321 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"`
28322 }
28323
28324
28325 func (vcpd VmwareCbtPolicyDetails) MarshalJSON() ([]byte, error) {
28326 vcpd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt
28327 objectMap := make(map[string]interface{})
28328 if vcpd.RecoveryPointHistoryInMinutes != nil {
28329 objectMap["recoveryPointHistoryInMinutes"] = vcpd.RecoveryPointHistoryInMinutes
28330 }
28331 if vcpd.AppConsistentFrequencyInMinutes != nil {
28332 objectMap["appConsistentFrequencyInMinutes"] = vcpd.AppConsistentFrequencyInMinutes
28333 }
28334 if vcpd.CrashConsistentFrequencyInMinutes != nil {
28335 objectMap["crashConsistentFrequencyInMinutes"] = vcpd.CrashConsistentFrequencyInMinutes
28336 }
28337 if vcpd.InstanceType != "" {
28338 objectMap["instanceType"] = vcpd.InstanceType
28339 }
28340 return json.Marshal(objectMap)
28341 }
28342
28343
28344 func (vcpd VmwareCbtPolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) {
28345 return nil, false
28346 }
28347
28348
28349 func (vcpd VmwareCbtPolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) {
28350 return nil, false
28351 }
28352
28353
28354 func (vcpd VmwareCbtPolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) {
28355 return nil, false
28356 }
28357
28358
28359 func (vcpd VmwareCbtPolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) {
28360 return nil, false
28361 }
28362
28363
28364 func (vcpd VmwareCbtPolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) {
28365 return nil, false
28366 }
28367
28368
28369 func (vcpd VmwareCbtPolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) {
28370 return nil, false
28371 }
28372
28373
28374 func (vcpd VmwareCbtPolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) {
28375 return nil, false
28376 }
28377
28378
28379 func (vcpd VmwareCbtPolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) {
28380 return nil, false
28381 }
28382
28383
28384 func (vcpd VmwareCbtPolicyDetails) AsInMageRcmPolicyDetails() (*InMageRcmPolicyDetails, bool) {
28385 return nil, false
28386 }
28387
28388
28389 func (vcpd VmwareCbtPolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) {
28390 return nil, false
28391 }
28392
28393
28394 func (vcpd VmwareCbtPolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) {
28395 return &vcpd, true
28396 }
28397
28398
28399 func (vcpd VmwareCbtPolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) {
28400 return nil, false
28401 }
28402
28403
28404 func (vcpd VmwareCbtPolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) {
28405 return &vcpd, true
28406 }
28407
28408
28409 type VMwareCbtProtectedDiskDetails struct {
28410
28411 DiskID *string `json:"diskId,omitempty"`
28412
28413 DiskName *string `json:"diskName,omitempty"`
28414
28415 DiskPath *string `json:"diskPath,omitempty"`
28416
28417 IsOSDisk *string `json:"isOSDisk,omitempty"`
28418
28419 CapacityInBytes *int64 `json:"capacityInBytes,omitempty"`
28420
28421 LogStorageAccountID *string `json:"logStorageAccountId,omitempty"`
28422
28423 LogStorageAccountSasSecretName *string `json:"logStorageAccountSasSecretName,omitempty"`
28424
28425 SeedManagedDiskID *string `json:"seedManagedDiskId,omitempty"`
28426
28427 TargetManagedDiskID *string `json:"targetManagedDiskId,omitempty"`
28428
28429 DiskType DiskType `json:"diskType,omitempty"`
28430 }
28431
28432
28433 func (vmcpdd VMwareCbtProtectedDiskDetails) MarshalJSON() ([]byte, error) {
28434 objectMap := make(map[string]interface{})
28435 if vmcpdd.DiskType != "" {
28436 objectMap["diskType"] = vmcpdd.DiskType
28437 }
28438 return json.Marshal(objectMap)
28439 }
28440
28441
28442 type VMwareCbtProtectionContainerMappingDetails struct {
28443
28444 KeyVaultID *string `json:"keyVaultId,omitempty"`
28445
28446 KeyVaultURI *string `json:"keyVaultUri,omitempty"`
28447
28448 StorageAccountID *string `json:"storageAccountId,omitempty"`
28449
28450 StorageAccountSasSecretName *string `json:"storageAccountSasSecretName,omitempty"`
28451
28452 ServiceBusConnectionStringSecretName *string `json:"serviceBusConnectionStringSecretName,omitempty"`
28453
28454 TargetLocation *string `json:"targetLocation,omitempty"`
28455
28456 InstanceType InstanceTypeBasicProtectionContainerMappingProviderSpecificDetails `json:"instanceType,omitempty"`
28457 }
28458
28459
28460 func (vmcpcmd VMwareCbtProtectionContainerMappingDetails) MarshalJSON() ([]byte, error) {
28461 vmcpcmd.InstanceType = InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeVMwareCbt
28462 objectMap := make(map[string]interface{})
28463 if vmcpcmd.InstanceType != "" {
28464 objectMap["instanceType"] = vmcpcmd.InstanceType
28465 }
28466 return json.Marshal(objectMap)
28467 }
28468
28469
28470 func (vmcpcmd VMwareCbtProtectionContainerMappingDetails) AsA2AProtectionContainerMappingDetails() (*A2AProtectionContainerMappingDetails, bool) {
28471 return nil, false
28472 }
28473
28474
28475 func (vmcpcmd VMwareCbtProtectionContainerMappingDetails) AsVMwareCbtProtectionContainerMappingDetails() (*VMwareCbtProtectionContainerMappingDetails, bool) {
28476 return &vmcpcmd, true
28477 }
28478
28479
28480 func (vmcpcmd VMwareCbtProtectionContainerMappingDetails) AsProtectionContainerMappingProviderSpecificDetails() (*ProtectionContainerMappingProviderSpecificDetails, bool) {
28481 return nil, false
28482 }
28483
28484
28485 func (vmcpcmd VMwareCbtProtectionContainerMappingDetails) AsBasicProtectionContainerMappingProviderSpecificDetails() (BasicProtectionContainerMappingProviderSpecificDetails, bool) {
28486 return &vmcpcmd, true
28487 }
28488
28489
28490 type VMwareCbtTestMigrateInput struct {
28491
28492 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
28493
28494 NetworkID *string `json:"networkId,omitempty"`
28495
28496 InstanceType InstanceTypeBasicTestMigrateProviderSpecificInput `json:"instanceType,omitempty"`
28497 }
28498
28499
28500 func (vmctmi VMwareCbtTestMigrateInput) MarshalJSON() ([]byte, error) {
28501 vmctmi.InstanceType = InstanceTypeBasicTestMigrateProviderSpecificInputInstanceTypeVMwareCbt
28502 objectMap := make(map[string]interface{})
28503 if vmctmi.RecoveryPointID != nil {
28504 objectMap["recoveryPointId"] = vmctmi.RecoveryPointID
28505 }
28506 if vmctmi.NetworkID != nil {
28507 objectMap["networkId"] = vmctmi.NetworkID
28508 }
28509 if vmctmi.InstanceType != "" {
28510 objectMap["instanceType"] = vmctmi.InstanceType
28511 }
28512 return json.Marshal(objectMap)
28513 }
28514
28515
28516 func (vmctmi VMwareCbtTestMigrateInput) AsVMwareCbtTestMigrateInput() (*VMwareCbtTestMigrateInput, bool) {
28517 return &vmctmi, true
28518 }
28519
28520
28521 func (vmctmi VMwareCbtTestMigrateInput) AsTestMigrateProviderSpecificInput() (*TestMigrateProviderSpecificInput, bool) {
28522 return nil, false
28523 }
28524
28525
28526 func (vmctmi VMwareCbtTestMigrateInput) AsBasicTestMigrateProviderSpecificInput() (BasicTestMigrateProviderSpecificInput, bool) {
28527 return &vmctmi, true
28528 }
28529
28530
28531 type VMwareCbtUpdateMigrationItemInput struct {
28532
28533 TargetVMName *string `json:"targetVmName,omitempty"`
28534
28535 TargetVMSize *string `json:"targetVmSize,omitempty"`
28536
28537 TargetResourceGroupID *string `json:"targetResourceGroupId,omitempty"`
28538
28539 TargetAvailabilitySetID *string `json:"targetAvailabilitySetId,omitempty"`
28540
28541 TargetBootDiagnosticsStorageAccountID *string `json:"targetBootDiagnosticsStorageAccountId,omitempty"`
28542
28543 TargetNetworkID *string `json:"targetNetworkId,omitempty"`
28544
28545 VMNics *[]VMwareCbtNicInput `json:"vmNics,omitempty"`
28546
28547 LicenseType LicenseType `json:"licenseType,omitempty"`
28548
28549 InstanceType InstanceTypeBasicUpdateMigrationItemProviderSpecificInput `json:"instanceType,omitempty"`
28550 }
28551
28552
28553 func (vmcumii VMwareCbtUpdateMigrationItemInput) MarshalJSON() ([]byte, error) {
28554 vmcumii.InstanceType = InstanceTypeBasicUpdateMigrationItemProviderSpecificInputInstanceTypeVMwareCbt
28555 objectMap := make(map[string]interface{})
28556 if vmcumii.TargetVMName != nil {
28557 objectMap["targetVmName"] = vmcumii.TargetVMName
28558 }
28559 if vmcumii.TargetVMSize != nil {
28560 objectMap["targetVmSize"] = vmcumii.TargetVMSize
28561 }
28562 if vmcumii.TargetResourceGroupID != nil {
28563 objectMap["targetResourceGroupId"] = vmcumii.TargetResourceGroupID
28564 }
28565 if vmcumii.TargetAvailabilitySetID != nil {
28566 objectMap["targetAvailabilitySetId"] = vmcumii.TargetAvailabilitySetID
28567 }
28568 if vmcumii.TargetBootDiagnosticsStorageAccountID != nil {
28569 objectMap["targetBootDiagnosticsStorageAccountId"] = vmcumii.TargetBootDiagnosticsStorageAccountID
28570 }
28571 if vmcumii.TargetNetworkID != nil {
28572 objectMap["targetNetworkId"] = vmcumii.TargetNetworkID
28573 }
28574 if vmcumii.VMNics != nil {
28575 objectMap["vmNics"] = vmcumii.VMNics
28576 }
28577 if vmcumii.LicenseType != "" {
28578 objectMap["licenseType"] = vmcumii.LicenseType
28579 }
28580 if vmcumii.InstanceType != "" {
28581 objectMap["instanceType"] = vmcumii.InstanceType
28582 }
28583 return json.Marshal(objectMap)
28584 }
28585
28586
28587 func (vmcumii VMwareCbtUpdateMigrationItemInput) AsVMwareCbtUpdateMigrationItemInput() (*VMwareCbtUpdateMigrationItemInput, bool) {
28588 return &vmcumii, true
28589 }
28590
28591
28592 func (vmcumii VMwareCbtUpdateMigrationItemInput) AsUpdateMigrationItemProviderSpecificInput() (*UpdateMigrationItemProviderSpecificInput, bool) {
28593 return nil, false
28594 }
28595
28596
28597 func (vmcumii VMwareCbtUpdateMigrationItemInput) AsBasicUpdateMigrationItemProviderSpecificInput() (BasicUpdateMigrationItemProviderSpecificInput, bool) {
28598 return &vmcumii, true
28599 }
28600
28601
28602 type VMwareDetails struct {
28603
28604 ProcessServers *[]ProcessServer `json:"processServers,omitempty"`
28605
28606 MasterTargetServers *[]MasterTargetServer `json:"masterTargetServers,omitempty"`
28607
28608 RunAsAccounts *[]RunAsAccount `json:"runAsAccounts,omitempty"`
28609
28610 ReplicationPairCount *string `json:"replicationPairCount,omitempty"`
28611
28612 ProcessServerCount *string `json:"processServerCount,omitempty"`
28613
28614 AgentCount *string `json:"agentCount,omitempty"`
28615
28616 ProtectedServers *string `json:"protectedServers,omitempty"`
28617
28618 SystemLoad *string `json:"systemLoad,omitempty"`
28619
28620 SystemLoadStatus *string `json:"systemLoadStatus,omitempty"`
28621
28622 CPULoad *string `json:"cpuLoad,omitempty"`
28623
28624 CPULoadStatus *string `json:"cpuLoadStatus,omitempty"`
28625
28626 TotalMemoryInBytes *int64 `json:"totalMemoryInBytes,omitempty"`
28627
28628 AvailableMemoryInBytes *int64 `json:"availableMemoryInBytes,omitempty"`
28629
28630 MemoryUsageStatus *string `json:"memoryUsageStatus,omitempty"`
28631
28632 TotalSpaceInBytes *int64 `json:"totalSpaceInBytes,omitempty"`
28633
28634 AvailableSpaceInBytes *int64 `json:"availableSpaceInBytes,omitempty"`
28635
28636 SpaceUsageStatus *string `json:"spaceUsageStatus,omitempty"`
28637
28638 WebLoad *string `json:"webLoad,omitempty"`
28639
28640 WebLoadStatus *string `json:"webLoadStatus,omitempty"`
28641
28642 DatabaseServerLoad *string `json:"databaseServerLoad,omitempty"`
28643
28644 DatabaseServerLoadStatus *string `json:"databaseServerLoadStatus,omitempty"`
28645
28646 CsServiceStatus *string `json:"csServiceStatus,omitempty"`
28647
28648 IPAddress *string `json:"ipAddress,omitempty"`
28649
28650 AgentVersion *string `json:"agentVersion,omitempty"`
28651
28652 HostName *string `json:"hostName,omitempty"`
28653
28654 LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"`
28655
28656 VersionStatus *string `json:"versionStatus,omitempty"`
28657
28658 SslCertExpiryDate *date.Time `json:"sslCertExpiryDate,omitempty"`
28659
28660 SslCertExpiryRemainingDays *int32 `json:"sslCertExpiryRemainingDays,omitempty"`
28661
28662 PsTemplateVersion *string `json:"psTemplateVersion,omitempty"`
28663
28664 AgentExpiryDate *date.Time `json:"agentExpiryDate,omitempty"`
28665
28666 AgentVersionDetails *VersionDetails `json:"agentVersionDetails,omitempty"`
28667
28668 InstanceType InstanceTypeBasicFabricSpecificDetails `json:"instanceType,omitempty"`
28669 }
28670
28671
28672 func (vmd VMwareDetails) MarshalJSON() ([]byte, error) {
28673 vmd.InstanceType = InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMware
28674 objectMap := make(map[string]interface{})
28675 if vmd.ProcessServers != nil {
28676 objectMap["processServers"] = vmd.ProcessServers
28677 }
28678 if vmd.MasterTargetServers != nil {
28679 objectMap["masterTargetServers"] = vmd.MasterTargetServers
28680 }
28681 if vmd.RunAsAccounts != nil {
28682 objectMap["runAsAccounts"] = vmd.RunAsAccounts
28683 }
28684 if vmd.ReplicationPairCount != nil {
28685 objectMap["replicationPairCount"] = vmd.ReplicationPairCount
28686 }
28687 if vmd.ProcessServerCount != nil {
28688 objectMap["processServerCount"] = vmd.ProcessServerCount
28689 }
28690 if vmd.AgentCount != nil {
28691 objectMap["agentCount"] = vmd.AgentCount
28692 }
28693 if vmd.ProtectedServers != nil {
28694 objectMap["protectedServers"] = vmd.ProtectedServers
28695 }
28696 if vmd.SystemLoad != nil {
28697 objectMap["systemLoad"] = vmd.SystemLoad
28698 }
28699 if vmd.SystemLoadStatus != nil {
28700 objectMap["systemLoadStatus"] = vmd.SystemLoadStatus
28701 }
28702 if vmd.CPULoad != nil {
28703 objectMap["cpuLoad"] = vmd.CPULoad
28704 }
28705 if vmd.CPULoadStatus != nil {
28706 objectMap["cpuLoadStatus"] = vmd.CPULoadStatus
28707 }
28708 if vmd.TotalMemoryInBytes != nil {
28709 objectMap["totalMemoryInBytes"] = vmd.TotalMemoryInBytes
28710 }
28711 if vmd.AvailableMemoryInBytes != nil {
28712 objectMap["availableMemoryInBytes"] = vmd.AvailableMemoryInBytes
28713 }
28714 if vmd.MemoryUsageStatus != nil {
28715 objectMap["memoryUsageStatus"] = vmd.MemoryUsageStatus
28716 }
28717 if vmd.TotalSpaceInBytes != nil {
28718 objectMap["totalSpaceInBytes"] = vmd.TotalSpaceInBytes
28719 }
28720 if vmd.AvailableSpaceInBytes != nil {
28721 objectMap["availableSpaceInBytes"] = vmd.AvailableSpaceInBytes
28722 }
28723 if vmd.SpaceUsageStatus != nil {
28724 objectMap["spaceUsageStatus"] = vmd.SpaceUsageStatus
28725 }
28726 if vmd.WebLoad != nil {
28727 objectMap["webLoad"] = vmd.WebLoad
28728 }
28729 if vmd.WebLoadStatus != nil {
28730 objectMap["webLoadStatus"] = vmd.WebLoadStatus
28731 }
28732 if vmd.DatabaseServerLoad != nil {
28733 objectMap["databaseServerLoad"] = vmd.DatabaseServerLoad
28734 }
28735 if vmd.DatabaseServerLoadStatus != nil {
28736 objectMap["databaseServerLoadStatus"] = vmd.DatabaseServerLoadStatus
28737 }
28738 if vmd.CsServiceStatus != nil {
28739 objectMap["csServiceStatus"] = vmd.CsServiceStatus
28740 }
28741 if vmd.IPAddress != nil {
28742 objectMap["ipAddress"] = vmd.IPAddress
28743 }
28744 if vmd.AgentVersion != nil {
28745 objectMap["agentVersion"] = vmd.AgentVersion
28746 }
28747 if vmd.HostName != nil {
28748 objectMap["hostName"] = vmd.HostName
28749 }
28750 if vmd.LastHeartbeat != nil {
28751 objectMap["lastHeartbeat"] = vmd.LastHeartbeat
28752 }
28753 if vmd.VersionStatus != nil {
28754 objectMap["versionStatus"] = vmd.VersionStatus
28755 }
28756 if vmd.SslCertExpiryDate != nil {
28757 objectMap["sslCertExpiryDate"] = vmd.SslCertExpiryDate
28758 }
28759 if vmd.SslCertExpiryRemainingDays != nil {
28760 objectMap["sslCertExpiryRemainingDays"] = vmd.SslCertExpiryRemainingDays
28761 }
28762 if vmd.PsTemplateVersion != nil {
28763 objectMap["psTemplateVersion"] = vmd.PsTemplateVersion
28764 }
28765 if vmd.AgentExpiryDate != nil {
28766 objectMap["agentExpiryDate"] = vmd.AgentExpiryDate
28767 }
28768 if vmd.AgentVersionDetails != nil {
28769 objectMap["agentVersionDetails"] = vmd.AgentVersionDetails
28770 }
28771 if vmd.InstanceType != "" {
28772 objectMap["instanceType"] = vmd.InstanceType
28773 }
28774 return json.Marshal(objectMap)
28775 }
28776
28777
28778 func (vmd VMwareDetails) AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool) {
28779 return nil, false
28780 }
28781
28782
28783 func (vmd VMwareDetails) AsHyperVSiteDetails() (*HyperVSiteDetails, bool) {
28784 return nil, false
28785 }
28786
28787
28788 func (vmd VMwareDetails) AsInMageRcmFabricSpecificDetails() (*InMageRcmFabricSpecificDetails, bool) {
28789 return nil, false
28790 }
28791
28792
28793 func (vmd VMwareDetails) AsVmmDetails() (*VmmDetails, bool) {
28794 return nil, false
28795 }
28796
28797
28798 func (vmd VMwareDetails) AsVMwareDetails() (*VMwareDetails, bool) {
28799 return &vmd, true
28800 }
28801
28802
28803 func (vmd VMwareDetails) AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool) {
28804 return nil, false
28805 }
28806
28807
28808 func (vmd VMwareDetails) AsFabricSpecificDetails() (*FabricSpecificDetails, bool) {
28809 return nil, false
28810 }
28811
28812
28813 func (vmd VMwareDetails) AsBasicFabricSpecificDetails() (BasicFabricSpecificDetails, bool) {
28814 return &vmd, true
28815 }
28816
28817
28818 type VMwareV2FabricCreationInput struct {
28819
28820 VmwareSiteID *string `json:"vmwareSiteId,omitempty"`
28821
28822 MigrationSolutionID *string `json:"migrationSolutionId,omitempty"`
28823
28824 InstanceType InstanceTypeBasicFabricSpecificCreationInput `json:"instanceType,omitempty"`
28825 }
28826
28827
28828 func (vmvfci VMwareV2FabricCreationInput) MarshalJSON() ([]byte, error) {
28829 vmvfci.InstanceType = InstanceTypeVMwareV2
28830 objectMap := make(map[string]interface{})
28831 if vmvfci.VmwareSiteID != nil {
28832 objectMap["vmwareSiteId"] = vmvfci.VmwareSiteID
28833 }
28834 if vmvfci.MigrationSolutionID != nil {
28835 objectMap["migrationSolutionId"] = vmvfci.MigrationSolutionID
28836 }
28837 if vmvfci.InstanceType != "" {
28838 objectMap["instanceType"] = vmvfci.InstanceType
28839 }
28840 return json.Marshal(objectMap)
28841 }
28842
28843
28844 func (vmvfci VMwareV2FabricCreationInput) AsAzureFabricCreationInput() (*AzureFabricCreationInput, bool) {
28845 return nil, false
28846 }
28847
28848
28849 func (vmvfci VMwareV2FabricCreationInput) AsInMageRcmFabricCreationInput() (*InMageRcmFabricCreationInput, bool) {
28850 return nil, false
28851 }
28852
28853
28854 func (vmvfci VMwareV2FabricCreationInput) AsVMwareV2FabricCreationInput() (*VMwareV2FabricCreationInput, bool) {
28855 return &vmvfci, true
28856 }
28857
28858
28859 func (vmvfci VMwareV2FabricCreationInput) AsFabricSpecificCreationInput() (*FabricSpecificCreationInput, bool) {
28860 return nil, false
28861 }
28862
28863
28864 func (vmvfci VMwareV2FabricCreationInput) AsBasicFabricSpecificCreationInput() (BasicFabricSpecificCreationInput, bool) {
28865 return &vmvfci, true
28866 }
28867
28868
28869 type VMwareV2FabricSpecificDetails struct {
28870
28871 VmwareSiteID *string `json:"vmwareSiteId,omitempty"`
28872
28873 MigrationSolutionID *string `json:"migrationSolutionId,omitempty"`
28874
28875 ServiceEndpoint *string `json:"serviceEndpoint,omitempty"`
28876
28877 ServiceResourceID *string `json:"serviceResourceId,omitempty"`
28878
28879 InstanceType InstanceTypeBasicFabricSpecificDetails `json:"instanceType,omitempty"`
28880 }
28881
28882
28883 func (vmvfsd VMwareV2FabricSpecificDetails) MarshalJSON() ([]byte, error) {
28884 vmvfsd.InstanceType = InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMwareV2
28885 objectMap := make(map[string]interface{})
28886 if vmvfsd.InstanceType != "" {
28887 objectMap["instanceType"] = vmvfsd.InstanceType
28888 }
28889 return json.Marshal(objectMap)
28890 }
28891
28892
28893 func (vmvfsd VMwareV2FabricSpecificDetails) AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool) {
28894 return nil, false
28895 }
28896
28897
28898 func (vmvfsd VMwareV2FabricSpecificDetails) AsHyperVSiteDetails() (*HyperVSiteDetails, bool) {
28899 return nil, false
28900 }
28901
28902
28903 func (vmvfsd VMwareV2FabricSpecificDetails) AsInMageRcmFabricSpecificDetails() (*InMageRcmFabricSpecificDetails, bool) {
28904 return nil, false
28905 }
28906
28907
28908 func (vmvfsd VMwareV2FabricSpecificDetails) AsVmmDetails() (*VmmDetails, bool) {
28909 return nil, false
28910 }
28911
28912
28913 func (vmvfsd VMwareV2FabricSpecificDetails) AsVMwareDetails() (*VMwareDetails, bool) {
28914 return nil, false
28915 }
28916
28917
28918 func (vmvfsd VMwareV2FabricSpecificDetails) AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool) {
28919 return &vmvfsd, true
28920 }
28921
28922
28923 func (vmvfsd VMwareV2FabricSpecificDetails) AsFabricSpecificDetails() (*FabricSpecificDetails, bool) {
28924 return nil, false
28925 }
28926
28927
28928 func (vmvfsd VMwareV2FabricSpecificDetails) AsBasicFabricSpecificDetails() (BasicFabricSpecificDetails, bool) {
28929 return &vmvfsd, true
28930 }
28931
28932
28933 type VMwareVirtualMachineDetails struct {
28934
28935 AgentGeneratedID *string `json:"agentGeneratedId,omitempty"`
28936
28937 AgentInstalled *string `json:"agentInstalled,omitempty"`
28938
28939 OsType *string `json:"osType,omitempty"`
28940
28941 AgentVersion *string `json:"agentVersion,omitempty"`
28942
28943 IPAddress *string `json:"ipAddress,omitempty"`
28944
28945 PoweredOn *string `json:"poweredOn,omitempty"`
28946
28947 VCenterInfrastructureID *string `json:"vCenterInfrastructureId,omitempty"`
28948
28949 DiscoveryType *string `json:"discoveryType,omitempty"`
28950
28951 DiskDetails *[]InMageDiskDetails `json:"diskDetails,omitempty"`
28952
28953 ValidationErrors *[]HealthError `json:"validationErrors,omitempty"`
28954
28955 InstanceType InstanceTypeBasicConfigurationSettings `json:"instanceType,omitempty"`
28956 }
28957
28958
28959 func (vmvmd VMwareVirtualMachineDetails) MarshalJSON() ([]byte, error) {
28960 vmvmd.InstanceType = InstanceTypeVMwareVirtualMachine
28961 objectMap := make(map[string]interface{})
28962 if vmvmd.AgentGeneratedID != nil {
28963 objectMap["agentGeneratedId"] = vmvmd.AgentGeneratedID
28964 }
28965 if vmvmd.AgentInstalled != nil {
28966 objectMap["agentInstalled"] = vmvmd.AgentInstalled
28967 }
28968 if vmvmd.OsType != nil {
28969 objectMap["osType"] = vmvmd.OsType
28970 }
28971 if vmvmd.AgentVersion != nil {
28972 objectMap["agentVersion"] = vmvmd.AgentVersion
28973 }
28974 if vmvmd.IPAddress != nil {
28975 objectMap["ipAddress"] = vmvmd.IPAddress
28976 }
28977 if vmvmd.PoweredOn != nil {
28978 objectMap["poweredOn"] = vmvmd.PoweredOn
28979 }
28980 if vmvmd.VCenterInfrastructureID != nil {
28981 objectMap["vCenterInfrastructureId"] = vmvmd.VCenterInfrastructureID
28982 }
28983 if vmvmd.DiscoveryType != nil {
28984 objectMap["discoveryType"] = vmvmd.DiscoveryType
28985 }
28986 if vmvmd.DiskDetails != nil {
28987 objectMap["diskDetails"] = vmvmd.DiskDetails
28988 }
28989 if vmvmd.ValidationErrors != nil {
28990 objectMap["validationErrors"] = vmvmd.ValidationErrors
28991 }
28992 if vmvmd.InstanceType != "" {
28993 objectMap["instanceType"] = vmvmd.InstanceType
28994 }
28995 return json.Marshal(objectMap)
28996 }
28997
28998
28999 func (vmvmd VMwareVirtualMachineDetails) AsHyperVVirtualMachineDetails() (*HyperVVirtualMachineDetails, bool) {
29000 return nil, false
29001 }
29002
29003
29004 func (vmvmd VMwareVirtualMachineDetails) AsReplicationGroupDetails() (*ReplicationGroupDetails, bool) {
29005 return nil, false
29006 }
29007
29008
29009 func (vmvmd VMwareVirtualMachineDetails) AsVmmVirtualMachineDetails() (*VmmVirtualMachineDetails, bool) {
29010 return nil, false
29011 }
29012
29013
29014 func (vmvmd VMwareVirtualMachineDetails) AsVMwareVirtualMachineDetails() (*VMwareVirtualMachineDetails, bool) {
29015 return &vmvmd, true
29016 }
29017
29018
29019 func (vmvmd VMwareVirtualMachineDetails) AsConfigurationSettings() (*ConfigurationSettings, bool) {
29020 return nil, false
29021 }
29022
29023
29024 func (vmvmd VMwareVirtualMachineDetails) AsBasicConfigurationSettings() (BasicConfigurationSettings, bool) {
29025 return &vmvmd, true
29026 }
29027
View as plain text