1package siterecovery 2 3// Copyright (c) Microsoft Corporation. All rights reserved. 4// Licensed under the MIT License. See License.txt in the project root for license information. 5// 6// Code generated by Microsoft (R) AutoRest Code Generator. 7// Changes may cause incorrect behavior and will be lost if the code is regenerated. 8 9import ( 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// The package's fully qualified name. 21const fqdn = "github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery" 22 23// A2AApplyRecoveryPointInput applyRecoveryPoint input specific to A2A provider. 24type A2AApplyRecoveryPointInput struct { 25 // InstanceType - Possible values include: 'InstanceTypeApplyRecoveryPointProviderSpecificInput', 'InstanceTypeA2A', 'InstanceTypeHyperVReplicaAzure', 'InstanceTypeInMageAzureV2' 26 InstanceType InstanceType `json:"instanceType,omitempty"` 27} 28 29// MarshalJSON is the custom marshaler for A2AApplyRecoveryPointInput. 30func (aarpi A2AApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { 31 aarpi.InstanceType = InstanceTypeA2A 32 objectMap := make(map[string]interface{}) 33 if aarpi.InstanceType != "" { 34 objectMap["instanceType"] = aarpi.InstanceType 35 } 36 return json.Marshal(objectMap) 37} 38 39// AsA2AApplyRecoveryPointInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for A2AApplyRecoveryPointInput. 40func (aarpi A2AApplyRecoveryPointInput) AsA2AApplyRecoveryPointInput() (*A2AApplyRecoveryPointInput, bool) { 41 return &aarpi, true 42} 43 44// AsHyperVReplicaAzureApplyRecoveryPointInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for A2AApplyRecoveryPointInput. 45func (aarpi A2AApplyRecoveryPointInput) AsHyperVReplicaAzureApplyRecoveryPointInput() (*HyperVReplicaAzureApplyRecoveryPointInput, bool) { 46 return nil, false 47} 48 49// AsInMageAzureV2ApplyRecoveryPointInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for A2AApplyRecoveryPointInput. 50func (aarpi A2AApplyRecoveryPointInput) AsInMageAzureV2ApplyRecoveryPointInput() (*InMageAzureV2ApplyRecoveryPointInput, bool) { 51 return nil, false 52} 53 54// AsApplyRecoveryPointProviderSpecificInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for A2AApplyRecoveryPointInput. 55func (aarpi A2AApplyRecoveryPointInput) AsApplyRecoveryPointProviderSpecificInput() (*ApplyRecoveryPointProviderSpecificInput, bool) { 56 return nil, false 57} 58 59// AsBasicApplyRecoveryPointProviderSpecificInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for A2AApplyRecoveryPointInput. 60func (aarpi A2AApplyRecoveryPointInput) AsBasicApplyRecoveryPointProviderSpecificInput() (BasicApplyRecoveryPointProviderSpecificInput, bool) { 61 return &aarpi, true 62} 63 64// A2AContainerCreationInput a2A cloud creation input. 65type A2AContainerCreationInput struct { 66 // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeReplicationProviderSpecificContainerCreationInput', 'InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeA2A', 'InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeVMwareCbt' 67 InstanceType InstanceTypeBasicReplicationProviderSpecificContainerCreationInput `json:"instanceType,omitempty"` 68} 69 70// MarshalJSON is the custom marshaler for A2AContainerCreationInput. 71func (acci A2AContainerCreationInput) MarshalJSON() ([]byte, error) { 72 acci.InstanceType = InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeA2A 73 objectMap := make(map[string]interface{}) 74 if acci.InstanceType != "" { 75 objectMap["instanceType"] = acci.InstanceType 76 } 77 return json.Marshal(objectMap) 78} 79 80// AsA2AContainerCreationInput is the BasicReplicationProviderSpecificContainerCreationInput implementation for A2AContainerCreationInput. 81func (acci A2AContainerCreationInput) AsA2AContainerCreationInput() (*A2AContainerCreationInput, bool) { 82 return &acci, true 83} 84 85// AsVMwareCbtContainerCreationInput is the BasicReplicationProviderSpecificContainerCreationInput implementation for A2AContainerCreationInput. 86func (acci A2AContainerCreationInput) AsVMwareCbtContainerCreationInput() (*VMwareCbtContainerCreationInput, bool) { 87 return nil, false 88} 89 90// AsReplicationProviderSpecificContainerCreationInput is the BasicReplicationProviderSpecificContainerCreationInput implementation for A2AContainerCreationInput. 91func (acci A2AContainerCreationInput) AsReplicationProviderSpecificContainerCreationInput() (*ReplicationProviderSpecificContainerCreationInput, bool) { 92 return nil, false 93} 94 95// AsBasicReplicationProviderSpecificContainerCreationInput is the BasicReplicationProviderSpecificContainerCreationInput implementation for A2AContainerCreationInput. 96func (acci A2AContainerCreationInput) AsBasicReplicationProviderSpecificContainerCreationInput() (BasicReplicationProviderSpecificContainerCreationInput, bool) { 97 return &acci, true 98} 99 100// A2AContainerMappingInput a2A container mapping input. 101type A2AContainerMappingInput struct { 102 // AgentAutoUpdateStatus - A value indicating whether the auto update is enabled. Possible values include: 'Disabled', 'Enabled' 103 AgentAutoUpdateStatus AgentAutoUpdateStatus `json:"agentAutoUpdateStatus,omitempty"` 104 // AutomationAccountArmID - The automation account arm id. 105 AutomationAccountArmID *string `json:"automationAccountArmId,omitempty"` 106 // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeReplicationProviderSpecificContainerMappingInput', 'InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeA2A', 'InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeVMwareCbt' 107 InstanceType InstanceTypeBasicReplicationProviderSpecificContainerMappingInput `json:"instanceType,omitempty"` 108} 109 110// MarshalJSON is the custom marshaler for A2AContainerMappingInput. 111func (acmi A2AContainerMappingInput) MarshalJSON() ([]byte, error) { 112 acmi.InstanceType = InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeA2A 113 objectMap := make(map[string]interface{}) 114 if acmi.AgentAutoUpdateStatus != "" { 115 objectMap["agentAutoUpdateStatus"] = acmi.AgentAutoUpdateStatus 116 } 117 if acmi.AutomationAccountArmID != nil { 118 objectMap["automationAccountArmId"] = acmi.AutomationAccountArmID 119 } 120 if acmi.InstanceType != "" { 121 objectMap["instanceType"] = acmi.InstanceType 122 } 123 return json.Marshal(objectMap) 124} 125 126// AsA2AContainerMappingInput is the BasicReplicationProviderSpecificContainerMappingInput implementation for A2AContainerMappingInput. 127func (acmi A2AContainerMappingInput) AsA2AContainerMappingInput() (*A2AContainerMappingInput, bool) { 128 return &acmi, true 129} 130 131// AsVMwareCbtContainerMappingInput is the BasicReplicationProviderSpecificContainerMappingInput implementation for A2AContainerMappingInput. 132func (acmi A2AContainerMappingInput) AsVMwareCbtContainerMappingInput() (*VMwareCbtContainerMappingInput, bool) { 133 return nil, false 134} 135 136// AsReplicationProviderSpecificContainerMappingInput is the BasicReplicationProviderSpecificContainerMappingInput implementation for A2AContainerMappingInput. 137func (acmi A2AContainerMappingInput) AsReplicationProviderSpecificContainerMappingInput() (*ReplicationProviderSpecificContainerMappingInput, bool) { 138 return nil, false 139} 140 141// AsBasicReplicationProviderSpecificContainerMappingInput is the BasicReplicationProviderSpecificContainerMappingInput implementation for A2AContainerMappingInput. 142func (acmi A2AContainerMappingInput) AsBasicReplicationProviderSpecificContainerMappingInput() (BasicReplicationProviderSpecificContainerMappingInput, bool) { 143 return &acmi, true 144} 145 146// A2AEnableProtectionInput a2A enable protection input. 147type A2AEnableProtectionInput struct { 148 // FabricObjectID - The fabric specific object Id of the virtual machine. 149 FabricObjectID *string `json:"fabricObjectId,omitempty"` 150 // RecoveryContainerID - The recovery container Id. 151 RecoveryContainerID *string `json:"recoveryContainerId,omitempty"` 152 // RecoveryResourceGroupID - The recovery resource group Id. Valid for V2 scenarios. 153 RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"` 154 // RecoveryCloudServiceID - The recovery cloud service Id. Valid for V1 scenarios. 155 RecoveryCloudServiceID *string `json:"recoveryCloudServiceId,omitempty"` 156 // RecoveryAvailabilitySetID - The recovery availability set Id. 157 RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"` 158 // VMDisks - The list of vm disk details. 159 VMDisks *[]A2AVMDiskInputDetails `json:"vmDisks,omitempty"` 160 // VMManagedDisks - The list of vm managed disk details. 161 VMManagedDisks *[]A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` 162 // MultiVMGroupName - The multi vm group name. 163 MultiVMGroupName *string `json:"multiVmGroupName,omitempty"` 164 // RecoveryBootDiagStorageAccountID - The boot diagnostic storage account. 165 RecoveryBootDiagStorageAccountID *string `json:"recoveryBootDiagStorageAccountId,omitempty"` 166 // DiskEncryptionInfo - The recovery disk encryption information. 167 DiskEncryptionInfo *DiskEncryptionInfo `json:"diskEncryptionInfo,omitempty"` 168 // InstanceType - Possible values include: 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeEnableProtectionProviderSpecificInput', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeSan' 169 InstanceType InstanceTypeBasicEnableProtectionProviderSpecificInput `json:"instanceType,omitempty"` 170} 171 172// MarshalJSON is the custom marshaler for A2AEnableProtectionInput. 173func (aepi A2AEnableProtectionInput) MarshalJSON() ([]byte, error) { 174 aepi.InstanceType = InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeA2A 175 objectMap := make(map[string]interface{}) 176 if aepi.FabricObjectID != nil { 177 objectMap["fabricObjectId"] = aepi.FabricObjectID 178 } 179 if aepi.RecoveryContainerID != nil { 180 objectMap["recoveryContainerId"] = aepi.RecoveryContainerID 181 } 182 if aepi.RecoveryResourceGroupID != nil { 183 objectMap["recoveryResourceGroupId"] = aepi.RecoveryResourceGroupID 184 } 185 if aepi.RecoveryCloudServiceID != nil { 186 objectMap["recoveryCloudServiceId"] = aepi.RecoveryCloudServiceID 187 } 188 if aepi.RecoveryAvailabilitySetID != nil { 189 objectMap["recoveryAvailabilitySetId"] = aepi.RecoveryAvailabilitySetID 190 } 191 if aepi.VMDisks != nil { 192 objectMap["vmDisks"] = aepi.VMDisks 193 } 194 if aepi.VMManagedDisks != nil { 195 objectMap["vmManagedDisks"] = aepi.VMManagedDisks 196 } 197 if aepi.MultiVMGroupName != nil { 198 objectMap["multiVmGroupName"] = aepi.MultiVMGroupName 199 } 200 if aepi.RecoveryBootDiagStorageAccountID != nil { 201 objectMap["recoveryBootDiagStorageAccountId"] = aepi.RecoveryBootDiagStorageAccountID 202 } 203 if aepi.DiskEncryptionInfo != nil { 204 objectMap["diskEncryptionInfo"] = aepi.DiskEncryptionInfo 205 } 206 if aepi.InstanceType != "" { 207 objectMap["instanceType"] = aepi.InstanceType 208 } 209 return json.Marshal(objectMap) 210} 211 212// AsA2AEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for A2AEnableProtectionInput. 213func (aepi A2AEnableProtectionInput) AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool) { 214 return &aepi, true 215} 216 217// AsHyperVReplicaAzureEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for A2AEnableProtectionInput. 218func (aepi A2AEnableProtectionInput) AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool) { 219 return nil, false 220} 221 222// AsInMageAzureV2EnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for A2AEnableProtectionInput. 223func (aepi A2AEnableProtectionInput) AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool) { 224 return nil, false 225} 226 227// AsInMageEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for A2AEnableProtectionInput. 228func (aepi A2AEnableProtectionInput) AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool) { 229 return nil, false 230} 231 232// AsSanEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for A2AEnableProtectionInput. 233func (aepi A2AEnableProtectionInput) AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool) { 234 return nil, false 235} 236 237// AsEnableProtectionProviderSpecificInput is the BasicEnableProtectionProviderSpecificInput implementation for A2AEnableProtectionInput. 238func (aepi A2AEnableProtectionInput) AsEnableProtectionProviderSpecificInput() (*EnableProtectionProviderSpecificInput, bool) { 239 return nil, false 240} 241 242// AsBasicEnableProtectionProviderSpecificInput is the BasicEnableProtectionProviderSpecificInput implementation for A2AEnableProtectionInput. 243func (aepi A2AEnableProtectionInput) AsBasicEnableProtectionProviderSpecificInput() (BasicEnableProtectionProviderSpecificInput, bool) { 244 return &aepi, true 245} 246 247// A2AEventDetails model class for event details of a A2A event. 248type A2AEventDetails struct { 249 // ProtectedItemName - The protected item arm name. 250 ProtectedItemName *string `json:"protectedItemName,omitempty"` 251 // FabricObjectID - The azure vm arm id. 252 FabricObjectID *string `json:"fabricObjectId,omitempty"` 253 // FabricName - Fabric arm name. 254 FabricName *string `json:"fabricName,omitempty"` 255 // FabricLocation - The fabric location. 256 FabricLocation *string `json:"fabricLocation,omitempty"` 257 // RemoteFabricName - Remote fabric arm name. 258 RemoteFabricName *string `json:"remoteFabricName,omitempty"` 259 // RemoteFabricLocation - Remote fabric location. 260 RemoteFabricLocation *string `json:"remoteFabricLocation,omitempty"` 261 // InstanceType - Possible values include: 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeEventProviderSpecificDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaBaseEventDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeVMwareCbt' 262 InstanceType InstanceTypeBasicEventProviderSpecificDetails `json:"instanceType,omitempty"` 263} 264 265// MarshalJSON is the custom marshaler for A2AEventDetails. 266func (aed A2AEventDetails) MarshalJSON() ([]byte, error) { 267 aed.InstanceType = InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeA2A 268 objectMap := make(map[string]interface{}) 269 if aed.ProtectedItemName != nil { 270 objectMap["protectedItemName"] = aed.ProtectedItemName 271 } 272 if aed.FabricObjectID != nil { 273 objectMap["fabricObjectId"] = aed.FabricObjectID 274 } 275 if aed.FabricName != nil { 276 objectMap["fabricName"] = aed.FabricName 277 } 278 if aed.FabricLocation != nil { 279 objectMap["fabricLocation"] = aed.FabricLocation 280 } 281 if aed.RemoteFabricName != nil { 282 objectMap["remoteFabricName"] = aed.RemoteFabricName 283 } 284 if aed.RemoteFabricLocation != nil { 285 objectMap["remoteFabricLocation"] = aed.RemoteFabricLocation 286 } 287 if aed.InstanceType != "" { 288 objectMap["instanceType"] = aed.InstanceType 289 } 290 return json.Marshal(objectMap) 291} 292 293// AsA2AEventDetails is the BasicEventProviderSpecificDetails implementation for A2AEventDetails. 294func (aed A2AEventDetails) AsA2AEventDetails() (*A2AEventDetails, bool) { 295 return &aed, true 296} 297 298// AsHyperVReplica2012EventDetails is the BasicEventProviderSpecificDetails implementation for A2AEventDetails. 299func (aed A2AEventDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) { 300 return nil, false 301} 302 303// AsHyperVReplica2012R2EventDetails is the BasicEventProviderSpecificDetails implementation for A2AEventDetails. 304func (aed A2AEventDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) { 305 return nil, false 306} 307 308// AsHyperVReplicaAzureEventDetails is the BasicEventProviderSpecificDetails implementation for A2AEventDetails. 309func (aed A2AEventDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) { 310 return nil, false 311} 312 313// AsHyperVReplicaBaseEventDetails is the BasicEventProviderSpecificDetails implementation for A2AEventDetails. 314func (aed A2AEventDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) { 315 return nil, false 316} 317 318// AsInMageAzureV2EventDetails is the BasicEventProviderSpecificDetails implementation for A2AEventDetails. 319func (aed A2AEventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) { 320 return nil, false 321} 322 323// AsVMwareCbtEventDetails is the BasicEventProviderSpecificDetails implementation for A2AEventDetails. 324func (aed A2AEventDetails) AsVMwareCbtEventDetails() (*VMwareCbtEventDetails, bool) { 325 return nil, false 326} 327 328// AsEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for A2AEventDetails. 329func (aed A2AEventDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) { 330 return nil, false 331} 332 333// AsBasicEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for A2AEventDetails. 334func (aed A2AEventDetails) AsBasicEventProviderSpecificDetails() (BasicEventProviderSpecificDetails, bool) { 335 return &aed, true 336} 337 338// A2AFailoverProviderInput a2A provider specific input for failover. 339type A2AFailoverProviderInput struct { 340 // RecoveryPointID - The recovery point id to be passed to failover to a particular recovery point. In case of latest recovery point, null should be passed. 341 RecoveryPointID *string `json:"recoveryPointId,omitempty"` 342 // CloudServiceCreationOption - A value indicating whether to use recovery cloud service for TFO or not. 343 CloudServiceCreationOption *string `json:"cloudServiceCreationOption,omitempty"` 344 // InstanceType - Possible values include: 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeProviderSpecificFailoverInput', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeA2A', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMage' 345 InstanceType InstanceTypeBasicProviderSpecificFailoverInput `json:"instanceType,omitempty"` 346} 347 348// MarshalJSON is the custom marshaler for A2AFailoverProviderInput. 349func (afpi A2AFailoverProviderInput) MarshalJSON() ([]byte, error) { 350 afpi.InstanceType = InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeA2A 351 objectMap := make(map[string]interface{}) 352 if afpi.RecoveryPointID != nil { 353 objectMap["recoveryPointId"] = afpi.RecoveryPointID 354 } 355 if afpi.CloudServiceCreationOption != nil { 356 objectMap["cloudServiceCreationOption"] = afpi.CloudServiceCreationOption 357 } 358 if afpi.InstanceType != "" { 359 objectMap["instanceType"] = afpi.InstanceType 360 } 361 return json.Marshal(objectMap) 362} 363 364// AsA2AFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for A2AFailoverProviderInput. 365func (afpi A2AFailoverProviderInput) AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool) { 366 return &afpi, true 367} 368 369// AsHyperVReplicaAzureFailbackProviderInput is the BasicProviderSpecificFailoverInput implementation for A2AFailoverProviderInput. 370func (afpi A2AFailoverProviderInput) AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool) { 371 return nil, false 372} 373 374// AsHyperVReplicaAzureFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for A2AFailoverProviderInput. 375func (afpi A2AFailoverProviderInput) AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool) { 376 return nil, false 377} 378 379// AsInMageAzureV2FailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for A2AFailoverProviderInput. 380func (afpi A2AFailoverProviderInput) AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool) { 381 return nil, false 382} 383 384// AsInMageFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for A2AFailoverProviderInput. 385func (afpi A2AFailoverProviderInput) AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool) { 386 return nil, false 387} 388 389// AsProviderSpecificFailoverInput is the BasicProviderSpecificFailoverInput implementation for A2AFailoverProviderInput. 390func (afpi A2AFailoverProviderInput) AsProviderSpecificFailoverInput() (*ProviderSpecificFailoverInput, bool) { 391 return nil, false 392} 393 394// AsBasicProviderSpecificFailoverInput is the BasicProviderSpecificFailoverInput implementation for A2AFailoverProviderInput. 395func (afpi A2AFailoverProviderInput) AsBasicProviderSpecificFailoverInput() (BasicProviderSpecificFailoverInput, bool) { 396 return &afpi, true 397} 398 399// A2APolicyCreationInput a2A Policy creation input. 400type A2APolicyCreationInput struct { 401 // RecoveryPointHistory - The duration in minutes until which the recovery points need to be stored. 402 RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` 403 // CrashConsistentFrequencyInMinutes - The crash consistent snapshot frequency (in minutes). 404 CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"` 405 // AppConsistentFrequencyInMinutes - The app consistent snapshot frequency (in minutes). 406 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` 407 // MultiVMSyncStatus - A value indicating whether multi-VM sync has to be enabled. Value should be 'Enabled' or 'Disabled'. Possible values include: 'Enable', 'Disable' 408 MultiVMSyncStatus SetMultiVMSyncStatus `json:"multiVmSyncStatus,omitempty"` 409 // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypePolicyProviderSpecificInput', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeVMwareCbt' 410 InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"` 411} 412 413// MarshalJSON is the custom marshaler for A2APolicyCreationInput. 414func (apci A2APolicyCreationInput) MarshalJSON() ([]byte, error) { 415 apci.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeA2A 416 objectMap := make(map[string]interface{}) 417 if apci.RecoveryPointHistory != nil { 418 objectMap["recoveryPointHistory"] = apci.RecoveryPointHistory 419 } 420 if apci.CrashConsistentFrequencyInMinutes != nil { 421 objectMap["crashConsistentFrequencyInMinutes"] = apci.CrashConsistentFrequencyInMinutes 422 } 423 if apci.AppConsistentFrequencyInMinutes != nil { 424 objectMap["appConsistentFrequencyInMinutes"] = apci.AppConsistentFrequencyInMinutes 425 } 426 if apci.MultiVMSyncStatus != "" { 427 objectMap["multiVmSyncStatus"] = apci.MultiVMSyncStatus 428 } 429 if apci.InstanceType != "" { 430 objectMap["instanceType"] = apci.InstanceType 431 } 432 return json.Marshal(objectMap) 433} 434 435// AsA2APolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for A2APolicyCreationInput. 436func (apci A2APolicyCreationInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) { 437 return &apci, true 438} 439 440// AsHyperVReplicaAzurePolicyInput is the BasicPolicyProviderSpecificInput implementation for A2APolicyCreationInput. 441func (apci A2APolicyCreationInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) { 442 return nil, false 443} 444 445// AsHyperVReplicaBluePolicyInput is the BasicPolicyProviderSpecificInput implementation for A2APolicyCreationInput. 446func (apci A2APolicyCreationInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) { 447 return nil, false 448} 449 450// AsHyperVReplicaPolicyInput is the BasicPolicyProviderSpecificInput implementation for A2APolicyCreationInput. 451func (apci A2APolicyCreationInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) { 452 return nil, false 453} 454 455// AsInMageAzureV2PolicyInput is the BasicPolicyProviderSpecificInput implementation for A2APolicyCreationInput. 456func (apci A2APolicyCreationInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) { 457 return nil, false 458} 459 460// AsInMagePolicyInput is the BasicPolicyProviderSpecificInput implementation for A2APolicyCreationInput. 461func (apci A2APolicyCreationInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) { 462 return nil, false 463} 464 465// AsVMwareCbtPolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for A2APolicyCreationInput. 466func (apci A2APolicyCreationInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) { 467 return nil, false 468} 469 470// AsPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for A2APolicyCreationInput. 471func (apci A2APolicyCreationInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) { 472 return nil, false 473} 474 475// AsBasicPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for A2APolicyCreationInput. 476func (apci A2APolicyCreationInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) { 477 return &apci, true 478} 479 480// A2APolicyDetails a2A specific policy details. 481type A2APolicyDetails struct { 482 // RecoveryPointThresholdInMinutes - The recovery point threshold in minutes. 483 RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"` 484 // RecoveryPointHistory - The duration in minutes until which the recovery points need to be stored. 485 RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` 486 // AppConsistentFrequencyInMinutes - The app consistent snapshot frequency in minutes. 487 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` 488 // MultiVMSyncStatus - A value indicating whether multi-VM sync has to be enabled. 489 MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"` 490 // CrashConsistentFrequencyInMinutes - The crash consistent snapshot frequency in minutes. 491 CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"` 492 // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypePolicyProviderSpecificDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt' 493 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"` 494} 495 496// MarshalJSON is the custom marshaler for A2APolicyDetails. 497func (apd A2APolicyDetails) MarshalJSON() ([]byte, error) { 498 apd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A 499 objectMap := make(map[string]interface{}) 500 if apd.RecoveryPointThresholdInMinutes != nil { 501 objectMap["recoveryPointThresholdInMinutes"] = apd.RecoveryPointThresholdInMinutes 502 } 503 if apd.RecoveryPointHistory != nil { 504 objectMap["recoveryPointHistory"] = apd.RecoveryPointHistory 505 } 506 if apd.AppConsistentFrequencyInMinutes != nil { 507 objectMap["appConsistentFrequencyInMinutes"] = apd.AppConsistentFrequencyInMinutes 508 } 509 if apd.MultiVMSyncStatus != nil { 510 objectMap["multiVmSyncStatus"] = apd.MultiVMSyncStatus 511 } 512 if apd.CrashConsistentFrequencyInMinutes != nil { 513 objectMap["crashConsistentFrequencyInMinutes"] = apd.CrashConsistentFrequencyInMinutes 514 } 515 if apd.InstanceType != "" { 516 objectMap["instanceType"] = apd.InstanceType 517 } 518 return json.Marshal(objectMap) 519} 520 521// AsA2APolicyDetails is the BasicPolicyProviderSpecificDetails implementation for A2APolicyDetails. 522func (apd A2APolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) { 523 return &apd, true 524} 525 526// AsHyperVReplicaAzurePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for A2APolicyDetails. 527func (apd A2APolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) { 528 return nil, false 529} 530 531// AsHyperVReplicaBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for A2APolicyDetails. 532func (apd A2APolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) { 533 return nil, false 534} 535 536// AsHyperVReplicaBluePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for A2APolicyDetails. 537func (apd A2APolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) { 538 return nil, false 539} 540 541// AsHyperVReplicaPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for A2APolicyDetails. 542func (apd A2APolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) { 543 return nil, false 544} 545 546// AsInMageAzureV2PolicyDetails is the BasicPolicyProviderSpecificDetails implementation for A2APolicyDetails. 547func (apd A2APolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) { 548 return nil, false 549} 550 551// AsInMageBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for A2APolicyDetails. 552func (apd A2APolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) { 553 return nil, false 554} 555 556// AsInMagePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for A2APolicyDetails. 557func (apd A2APolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) { 558 return nil, false 559} 560 561// AsRcmAzureMigrationPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for A2APolicyDetails. 562func (apd A2APolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) { 563 return nil, false 564} 565 566// AsVmwareCbtPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for A2APolicyDetails. 567func (apd A2APolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) { 568 return nil, false 569} 570 571// AsPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for A2APolicyDetails. 572func (apd A2APolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) { 573 return nil, false 574} 575 576// AsBasicPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for A2APolicyDetails. 577func (apd A2APolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) { 578 return &apd, true 579} 580 581// A2AProtectedDiskDetails a2A protected disk details. 582type A2AProtectedDiskDetails struct { 583 // DiskURI - The disk uri. 584 DiskURI *string `json:"diskUri,omitempty"` 585 // RecoveryAzureStorageAccountID - The recovery disk storage account. 586 RecoveryAzureStorageAccountID *string `json:"recoveryAzureStorageAccountId,omitempty"` 587 // PrimaryDiskAzureStorageAccountID - The primary disk storage account. 588 PrimaryDiskAzureStorageAccountID *string `json:"primaryDiskAzureStorageAccountId,omitempty"` 589 // RecoveryDiskURI - Recovery disk uri. 590 RecoveryDiskURI *string `json:"recoveryDiskUri,omitempty"` 591 // DiskName - The disk name. 592 DiskName *string `json:"diskName,omitempty"` 593 // DiskCapacityInBytes - The disk capacity in bytes. 594 DiskCapacityInBytes *int64 `json:"diskCapacityInBytes,omitempty"` 595 // PrimaryStagingAzureStorageAccountID - The primary staging storage account. 596 PrimaryStagingAzureStorageAccountID *string `json:"primaryStagingAzureStorageAccountId,omitempty"` 597 // DiskType - The type of disk. 598 DiskType *string `json:"diskType,omitempty"` 599 // ResyncRequired - A value indicating whether resync is required for this disk. 600 ResyncRequired *bool `json:"resyncRequired,omitempty"` 601 // MonitoringPercentageCompletion - The percentage of the monitoring job. The type of the monitoring job is defined by MonitoringJobType property. 602 MonitoringPercentageCompletion *int32 `json:"monitoringPercentageCompletion,omitempty"` 603 // MonitoringJobType - The type of the monitoring job. The progress is contained in MonitoringPercentageCompletion property. 604 MonitoringJobType *string `json:"monitoringJobType,omitempty"` 605 // DataPendingInStagingStorageAccountInMB - The data pending for replication in MB at staging account. 606 DataPendingInStagingStorageAccountInMB *float64 `json:"dataPendingInStagingStorageAccountInMB,omitempty"` 607 // DataPendingAtSourceAgentInMB - The data pending at source virtual machine in MB. 608 DataPendingAtSourceAgentInMB *float64 `json:"dataPendingAtSourceAgentInMB,omitempty"` 609 // IsDiskEncrypted - A value indicating whether vm has encrypted os disk or not. 610 IsDiskEncrypted *bool `json:"isDiskEncrypted,omitempty"` 611 // SecretIdentifier - The secret URL / identifier (BEK). 612 SecretIdentifier *string `json:"secretIdentifier,omitempty"` 613 // DekKeyVaultArmID - The KeyVault resource id for secret (BEK). 614 DekKeyVaultArmID *string `json:"dekKeyVaultArmId,omitempty"` 615 // IsDiskKeyEncrypted - A value indicating whether disk key got encrypted or not. 616 IsDiskKeyEncrypted *bool `json:"isDiskKeyEncrypted,omitempty"` 617 // KeyIdentifier - The key URL / identifier (KEK). 618 KeyIdentifier *string `json:"keyIdentifier,omitempty"` 619 // KekKeyVaultArmID - The KeyVault resource id for key (KEK). 620 KekKeyVaultArmID *string `json:"kekKeyVaultArmId,omitempty"` 621} 622 623// A2AProtectedManagedDiskDetails a2A protected managed disk details. 624type A2AProtectedManagedDiskDetails struct { 625 // DiskID - The managed disk Arm id. 626 DiskID *string `json:"diskId,omitempty"` 627 // RecoveryResourceGroupID - The recovery disk resource group Arm Id. 628 RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"` 629 // RecoveryTargetDiskID - Recovery target disk Arm Id. 630 RecoveryTargetDiskID *string `json:"recoveryTargetDiskId,omitempty"` 631 // RecoveryReplicaDiskID - Recovery replica disk Arm Id. 632 RecoveryReplicaDiskID *string `json:"recoveryReplicaDiskId,omitempty"` 633 // RecoveryReplicaDiskAccountType - The replica disk type. Its an optional value and will be same as source disk type if not user provided. 634 RecoveryReplicaDiskAccountType *string `json:"recoveryReplicaDiskAccountType,omitempty"` 635 // RecoveryTargetDiskAccountType - The target disk type after failover. Its an optional value and will be same as source disk type if not user provided. 636 RecoveryTargetDiskAccountType *string `json:"recoveryTargetDiskAccountType,omitempty"` 637 // DiskName - The disk name. 638 DiskName *string `json:"diskName,omitempty"` 639 // DiskCapacityInBytes - The disk capacity in bytes. 640 DiskCapacityInBytes *int64 `json:"diskCapacityInBytes,omitempty"` 641 // PrimaryStagingAzureStorageAccountID - The primary staging storage account. 642 PrimaryStagingAzureStorageAccountID *string `json:"primaryStagingAzureStorageAccountId,omitempty"` 643 // DiskType - The type of disk. 644 DiskType *string `json:"diskType,omitempty"` 645 // ResyncRequired - A value indicating whether resync is required for this disk. 646 ResyncRequired *bool `json:"resyncRequired,omitempty"` 647 // MonitoringPercentageCompletion - The percentage of the monitoring job. The type of the monitoring job is defined by MonitoringJobType property. 648 MonitoringPercentageCompletion *int32 `json:"monitoringPercentageCompletion,omitempty"` 649 // MonitoringJobType - The type of the monitoring job. The progress is contained in MonitoringPercentageCompletion property. 650 MonitoringJobType *string `json:"monitoringJobType,omitempty"` 651 // DataPendingInStagingStorageAccountInMB - The data pending for replication in MB at staging account. 652 DataPendingInStagingStorageAccountInMB *float64 `json:"dataPendingInStagingStorageAccountInMB,omitempty"` 653 // DataPendingAtSourceAgentInMB - The data pending at source virtual machine in MB. 654 DataPendingAtSourceAgentInMB *float64 `json:"dataPendingAtSourceAgentInMB,omitempty"` 655 // IsDiskEncrypted - A value indicating whether vm has encrypted os disk or not. 656 IsDiskEncrypted *bool `json:"isDiskEncrypted,omitempty"` 657 // SecretIdentifier - The secret URL / identifier (BEK). 658 SecretIdentifier *string `json:"secretIdentifier,omitempty"` 659 // DekKeyVaultArmID - The KeyVault resource id for secret (BEK). 660 DekKeyVaultArmID *string `json:"dekKeyVaultArmId,omitempty"` 661 // IsDiskKeyEncrypted - A value indicating whether disk key got encrypted or not. 662 IsDiskKeyEncrypted *bool `json:"isDiskKeyEncrypted,omitempty"` 663 // KeyIdentifier - The key URL / identifier (KEK). 664 KeyIdentifier *string `json:"keyIdentifier,omitempty"` 665 // KekKeyVaultArmID - The KeyVault resource id for key (KEK). 666 KekKeyVaultArmID *string `json:"kekKeyVaultArmId,omitempty"` 667} 668 669// A2AProtectionContainerMappingDetails a2A provider specific settings. 670type A2AProtectionContainerMappingDetails struct { 671 // AgentAutoUpdateStatus - A value indicating whether the auto update is enabled. Possible values include: 'Disabled', 'Enabled' 672 AgentAutoUpdateStatus AgentAutoUpdateStatus `json:"agentAutoUpdateStatus,omitempty"` 673 // AutomationAccountArmID - The automation account arm id. 674 AutomationAccountArmID *string `json:"automationAccountArmId,omitempty"` 675 // ScheduleName - The schedule arm name. 676 ScheduleName *string `json:"scheduleName,omitempty"` 677 // JobScheduleName - The job schedule arm name. 678 JobScheduleName *string `json:"jobScheduleName,omitempty"` 679 // InstanceType - Possible values include: 'InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeProtectionContainerMappingProviderSpecificDetails', 'InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeVMwareCbt' 680 InstanceType InstanceTypeBasicProtectionContainerMappingProviderSpecificDetails `json:"instanceType,omitempty"` 681} 682 683// MarshalJSON is the custom marshaler for A2AProtectionContainerMappingDetails. 684func (apcmd A2AProtectionContainerMappingDetails) MarshalJSON() ([]byte, error) { 685 apcmd.InstanceType = InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeA2A 686 objectMap := make(map[string]interface{}) 687 if apcmd.AgentAutoUpdateStatus != "" { 688 objectMap["agentAutoUpdateStatus"] = apcmd.AgentAutoUpdateStatus 689 } 690 if apcmd.AutomationAccountArmID != nil { 691 objectMap["automationAccountArmId"] = apcmd.AutomationAccountArmID 692 } 693 if apcmd.ScheduleName != nil { 694 objectMap["scheduleName"] = apcmd.ScheduleName 695 } 696 if apcmd.JobScheduleName != nil { 697 objectMap["jobScheduleName"] = apcmd.JobScheduleName 698 } 699 if apcmd.InstanceType != "" { 700 objectMap["instanceType"] = apcmd.InstanceType 701 } 702 return json.Marshal(objectMap) 703} 704 705// AsA2AProtectionContainerMappingDetails is the BasicProtectionContainerMappingProviderSpecificDetails implementation for A2AProtectionContainerMappingDetails. 706func (apcmd A2AProtectionContainerMappingDetails) AsA2AProtectionContainerMappingDetails() (*A2AProtectionContainerMappingDetails, bool) { 707 return &apcmd, true 708} 709 710// AsVMwareCbtProtectionContainerMappingDetails is the BasicProtectionContainerMappingProviderSpecificDetails implementation for A2AProtectionContainerMappingDetails. 711func (apcmd A2AProtectionContainerMappingDetails) AsVMwareCbtProtectionContainerMappingDetails() (*VMwareCbtProtectionContainerMappingDetails, bool) { 712 return nil, false 713} 714 715// AsProtectionContainerMappingProviderSpecificDetails is the BasicProtectionContainerMappingProviderSpecificDetails implementation for A2AProtectionContainerMappingDetails. 716func (apcmd A2AProtectionContainerMappingDetails) AsProtectionContainerMappingProviderSpecificDetails() (*ProtectionContainerMappingProviderSpecificDetails, bool) { 717 return nil, false 718} 719 720// AsBasicProtectionContainerMappingProviderSpecificDetails is the BasicProtectionContainerMappingProviderSpecificDetails implementation for A2AProtectionContainerMappingDetails. 721func (apcmd A2AProtectionContainerMappingDetails) AsBasicProtectionContainerMappingProviderSpecificDetails() (BasicProtectionContainerMappingProviderSpecificDetails, bool) { 722 return &apcmd, true 723} 724 725// A2ARecoveryPointDetails a2A provider specific recovery point details. 726type A2ARecoveryPointDetails struct { 727 // RecoveryPointSyncType - A value indicating whether the recovery point is multi VM consistent. Possible values include: 'MultiVMSyncRecoveryPoint', 'PerVMRecoveryPoint' 728 RecoveryPointSyncType RecoveryPointSyncType `json:"recoveryPointSyncType,omitempty"` 729 // InstanceType - Possible values include: 'InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeProviderSpecificRecoveryPointDetails', 'InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeA2A', 'InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeInMageAzureV2' 730 InstanceType InstanceTypeBasicProviderSpecificRecoveryPointDetails `json:"instanceType,omitempty"` 731} 732 733// MarshalJSON is the custom marshaler for A2ARecoveryPointDetails. 734func (arpd A2ARecoveryPointDetails) MarshalJSON() ([]byte, error) { 735 arpd.InstanceType = InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeA2A 736 objectMap := make(map[string]interface{}) 737 if arpd.RecoveryPointSyncType != "" { 738 objectMap["recoveryPointSyncType"] = arpd.RecoveryPointSyncType 739 } 740 if arpd.InstanceType != "" { 741 objectMap["instanceType"] = arpd.InstanceType 742 } 743 return json.Marshal(objectMap) 744} 745 746// AsA2ARecoveryPointDetails is the BasicProviderSpecificRecoveryPointDetails implementation for A2ARecoveryPointDetails. 747func (arpd A2ARecoveryPointDetails) AsA2ARecoveryPointDetails() (*A2ARecoveryPointDetails, bool) { 748 return &arpd, true 749} 750 751// AsInMageAzureV2RecoveryPointDetails is the BasicProviderSpecificRecoveryPointDetails implementation for A2ARecoveryPointDetails. 752func (arpd A2ARecoveryPointDetails) AsInMageAzureV2RecoveryPointDetails() (*InMageAzureV2RecoveryPointDetails, bool) { 753 return nil, false 754} 755 756// AsProviderSpecificRecoveryPointDetails is the BasicProviderSpecificRecoveryPointDetails implementation for A2ARecoveryPointDetails. 757func (arpd A2ARecoveryPointDetails) AsProviderSpecificRecoveryPointDetails() (*ProviderSpecificRecoveryPointDetails, bool) { 758 return nil, false 759} 760 761// AsBasicProviderSpecificRecoveryPointDetails is the BasicProviderSpecificRecoveryPointDetails implementation for A2ARecoveryPointDetails. 762func (arpd A2ARecoveryPointDetails) AsBasicProviderSpecificRecoveryPointDetails() (BasicProviderSpecificRecoveryPointDetails, bool) { 763 return &arpd, true 764} 765 766// A2AReplicationDetails a2A provider specific settings. 767type A2AReplicationDetails struct { 768 // FabricObjectID - The fabric specific object Id of the virtual machine. 769 FabricObjectID *string `json:"fabricObjectId,omitempty"` 770 // MultiVMGroupID - The multi vm group Id. 771 MultiVMGroupID *string `json:"multiVmGroupId,omitempty"` 772 // MultiVMGroupName - The multi vm group name. 773 MultiVMGroupName *string `json:"multiVmGroupName,omitempty"` 774 // MultiVMGroupCreateOption - Whether Multi VM group is auto created or specified by user. Possible values include: 'AutoCreated', 'UserSpecified' 775 MultiVMGroupCreateOption MultiVMGroupCreateOption `json:"multiVmGroupCreateOption,omitempty"` 776 // ManagementID - The management Id. 777 ManagementID *string `json:"managementId,omitempty"` 778 // ProtectedDisks - The list of protected disks. 779 ProtectedDisks *[]A2AProtectedDiskDetails `json:"protectedDisks,omitempty"` 780 // ProtectedManagedDisks - The list of protected managed disks. 781 ProtectedManagedDisks *[]A2AProtectedManagedDiskDetails `json:"protectedManagedDisks,omitempty"` 782 // RecoveryBootDiagStorageAccountID - The recovery boot diagnostic storage account Arm Id. 783 RecoveryBootDiagStorageAccountID *string `json:"recoveryBootDiagStorageAccountId,omitempty"` 784 // PrimaryFabricLocation - Primary fabric location. 785 PrimaryFabricLocation *string `json:"primaryFabricLocation,omitempty"` 786 // RecoveryFabricLocation - The recovery fabric location. 787 RecoveryFabricLocation *string `json:"recoveryFabricLocation,omitempty"` 788 // OsType - The type of operating system. 789 OsType *string `json:"osType,omitempty"` 790 // RecoveryAzureVMSize - The size of recovery virtual machine. 791 RecoveryAzureVMSize *string `json:"recoveryAzureVMSize,omitempty"` 792 // RecoveryAzureVMName - The name of recovery virtual machine. 793 RecoveryAzureVMName *string `json:"recoveryAzureVMName,omitempty"` 794 // RecoveryAzureResourceGroupID - The recovery resource group. 795 RecoveryAzureResourceGroupID *string `json:"recoveryAzureResourceGroupId,omitempty"` 796 // RecoveryCloudService - The recovery cloud service. 797 RecoveryCloudService *string `json:"recoveryCloudService,omitempty"` 798 // RecoveryAvailabilitySet - The recovery availability set. 799 RecoveryAvailabilitySet *string `json:"recoveryAvailabilitySet,omitempty"` 800 // SelectedRecoveryAzureNetworkID - The recovery virtual network. 801 SelectedRecoveryAzureNetworkID *string `json:"selectedRecoveryAzureNetworkId,omitempty"` 802 // VMNics - The virtual machine nic details. 803 VMNics *[]VMNicDetails `json:"vmNics,omitempty"` 804 // VMSyncedConfigDetails - The synced configuration details. 805 VMSyncedConfigDetails *AzureToAzureVMSyncedConfigDetails `json:"vmSyncedConfigDetails,omitempty"` 806 // MonitoringPercentageCompletion - The percentage of the monitoring job. The type of the monitoring job is defined by MonitoringJobType property. 807 MonitoringPercentageCompletion *int32 `json:"monitoringPercentageCompletion,omitempty"` 808 // MonitoringJobType - The type of the monitoring job. The progress is contained in MonitoringPercentageCompletion property. 809 MonitoringJobType *string `json:"monitoringJobType,omitempty"` 810 // LastHeartbeat - The last heartbeat received from the source server. 811 LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"` 812 // AgentVersion - The agent version. 813 AgentVersion *string `json:"agentVersion,omitempty"` 814 // IsReplicationAgentUpdateRequired - A value indicating whether replication agent update is required. 815 IsReplicationAgentUpdateRequired *bool `json:"isReplicationAgentUpdateRequired,omitempty"` 816 // RecoveryFabricObjectID - The recovery fabric object Id. 817 RecoveryFabricObjectID *string `json:"recoveryFabricObjectId,omitempty"` 818 // VMProtectionState - The protection state for the vm. 819 VMProtectionState *string `json:"vmProtectionState,omitempty"` 820 // VMProtectionStateDescription - The protection state description for the vm. 821 VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` 822 // LifecycleID - An id associated with the PE that survives actions like switch protection which change the backing PE/CPE objects internally.The lifecycle id gets carried forward to have a link/continuity in being able to have an Id that denotes the "same" protected item even though other internal Ids/ARM Id might be changing. 823 LifecycleID *string `json:"lifecycleId,omitempty"` 824 // TestFailoverRecoveryFabricObjectID - The test failover fabric object Id. 825 TestFailoverRecoveryFabricObjectID *string `json:"testFailoverRecoveryFabricObjectId,omitempty"` 826 // RpoInSeconds - The last RPO value in seconds. 827 RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"` 828 // LastRpoCalculatedTime - The time (in UTC) when the last RPO value was calculated by Protection Service. 829 LastRpoCalculatedTime *date.Time `json:"lastRpoCalculatedTime,omitempty"` 830 // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeReplicationProviderSpecificSettings', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeA2A', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaBaseReplicationDetails', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMageAzureV2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMage' 831 InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"` 832} 833 834// MarshalJSON is the custom marshaler for A2AReplicationDetails. 835func (ard A2AReplicationDetails) MarshalJSON() ([]byte, error) { 836 ard.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeA2A 837 objectMap := make(map[string]interface{}) 838 if ard.FabricObjectID != nil { 839 objectMap["fabricObjectId"] = ard.FabricObjectID 840 } 841 if ard.MultiVMGroupID != nil { 842 objectMap["multiVmGroupId"] = ard.MultiVMGroupID 843 } 844 if ard.MultiVMGroupName != nil { 845 objectMap["multiVmGroupName"] = ard.MultiVMGroupName 846 } 847 if ard.MultiVMGroupCreateOption != "" { 848 objectMap["multiVmGroupCreateOption"] = ard.MultiVMGroupCreateOption 849 } 850 if ard.ManagementID != nil { 851 objectMap["managementId"] = ard.ManagementID 852 } 853 if ard.ProtectedDisks != nil { 854 objectMap["protectedDisks"] = ard.ProtectedDisks 855 } 856 if ard.ProtectedManagedDisks != nil { 857 objectMap["protectedManagedDisks"] = ard.ProtectedManagedDisks 858 } 859 if ard.RecoveryBootDiagStorageAccountID != nil { 860 objectMap["recoveryBootDiagStorageAccountId"] = ard.RecoveryBootDiagStorageAccountID 861 } 862 if ard.PrimaryFabricLocation != nil { 863 objectMap["primaryFabricLocation"] = ard.PrimaryFabricLocation 864 } 865 if ard.RecoveryFabricLocation != nil { 866 objectMap["recoveryFabricLocation"] = ard.RecoveryFabricLocation 867 } 868 if ard.OsType != nil { 869 objectMap["osType"] = ard.OsType 870 } 871 if ard.RecoveryAzureVMSize != nil { 872 objectMap["recoveryAzureVMSize"] = ard.RecoveryAzureVMSize 873 } 874 if ard.RecoveryAzureVMName != nil { 875 objectMap["recoveryAzureVMName"] = ard.RecoveryAzureVMName 876 } 877 if ard.RecoveryAzureResourceGroupID != nil { 878 objectMap["recoveryAzureResourceGroupId"] = ard.RecoveryAzureResourceGroupID 879 } 880 if ard.RecoveryCloudService != nil { 881 objectMap["recoveryCloudService"] = ard.RecoveryCloudService 882 } 883 if ard.RecoveryAvailabilitySet != nil { 884 objectMap["recoveryAvailabilitySet"] = ard.RecoveryAvailabilitySet 885 } 886 if ard.SelectedRecoveryAzureNetworkID != nil { 887 objectMap["selectedRecoveryAzureNetworkId"] = ard.SelectedRecoveryAzureNetworkID 888 } 889 if ard.VMNics != nil { 890 objectMap["vmNics"] = ard.VMNics 891 } 892 if ard.VMSyncedConfigDetails != nil { 893 objectMap["vmSyncedConfigDetails"] = ard.VMSyncedConfigDetails 894 } 895 if ard.MonitoringPercentageCompletion != nil { 896 objectMap["monitoringPercentageCompletion"] = ard.MonitoringPercentageCompletion 897 } 898 if ard.MonitoringJobType != nil { 899 objectMap["monitoringJobType"] = ard.MonitoringJobType 900 } 901 if ard.LastHeartbeat != nil { 902 objectMap["lastHeartbeat"] = ard.LastHeartbeat 903 } 904 if ard.AgentVersion != nil { 905 objectMap["agentVersion"] = ard.AgentVersion 906 } 907 if ard.IsReplicationAgentUpdateRequired != nil { 908 objectMap["isReplicationAgentUpdateRequired"] = ard.IsReplicationAgentUpdateRequired 909 } 910 if ard.RecoveryFabricObjectID != nil { 911 objectMap["recoveryFabricObjectId"] = ard.RecoveryFabricObjectID 912 } 913 if ard.VMProtectionState != nil { 914 objectMap["vmProtectionState"] = ard.VMProtectionState 915 } 916 if ard.VMProtectionStateDescription != nil { 917 objectMap["vmProtectionStateDescription"] = ard.VMProtectionStateDescription 918 } 919 if ard.LifecycleID != nil { 920 objectMap["lifecycleId"] = ard.LifecycleID 921 } 922 if ard.TestFailoverRecoveryFabricObjectID != nil { 923 objectMap["testFailoverRecoveryFabricObjectId"] = ard.TestFailoverRecoveryFabricObjectID 924 } 925 if ard.RpoInSeconds != nil { 926 objectMap["rpoInSeconds"] = ard.RpoInSeconds 927 } 928 if ard.LastRpoCalculatedTime != nil { 929 objectMap["lastRpoCalculatedTime"] = ard.LastRpoCalculatedTime 930 } 931 if ard.InstanceType != "" { 932 objectMap["instanceType"] = ard.InstanceType 933 } 934 return json.Marshal(objectMap) 935} 936 937// AsA2AReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for A2AReplicationDetails. 938func (ard A2AReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) { 939 return &ard, true 940} 941 942// AsHyperVReplicaAzureReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for A2AReplicationDetails. 943func (ard A2AReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) { 944 return nil, false 945} 946 947// AsHyperVReplicaBaseReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for A2AReplicationDetails. 948func (ard A2AReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) { 949 return nil, false 950} 951 952// AsHyperVReplicaBlueReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for A2AReplicationDetails. 953func (ard A2AReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) { 954 return nil, false 955} 956 957// AsHyperVReplicaReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for A2AReplicationDetails. 958func (ard A2AReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) { 959 return nil, false 960} 961 962// AsInMageAzureV2ReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for A2AReplicationDetails. 963func (ard A2AReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) { 964 return nil, false 965} 966 967// AsInMageReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for A2AReplicationDetails. 968func (ard A2AReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) { 969 return nil, false 970} 971 972// AsReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for A2AReplicationDetails. 973func (ard A2AReplicationDetails) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) { 974 return nil, false 975} 976 977// AsBasicReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for A2AReplicationDetails. 978func (ard A2AReplicationDetails) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) { 979 return &ard, true 980} 981 982// A2AReprotectInput azure specific reprotect input. 983type A2AReprotectInput struct { 984 // RecoveryContainerID - The recovery container Id. 985 RecoveryContainerID *string `json:"recoveryContainerId,omitempty"` 986 // VMDisks - The list of vm disk details. 987 VMDisks *[]A2AVMDiskInputDetails `json:"vmDisks,omitempty"` 988 // RecoveryResourceGroupID - The recovery resource group Id. Valid for V2 scenarios. 989 RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"` 990 // RecoveryCloudServiceID - The recovery cloud service Id. Valid for V1 scenarios. 991 RecoveryCloudServiceID *string `json:"recoveryCloudServiceId,omitempty"` 992 // RecoveryAvailabilitySetID - The recovery availability set. 993 RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"` 994 // PolicyID - The Policy Id. 995 PolicyID *string `json:"policyId,omitempty"` 996 // InstanceType - Possible values include: 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeReverseReplicationProviderSpecificInput', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMage' 997 InstanceType InstanceTypeBasicReverseReplicationProviderSpecificInput `json:"instanceType,omitempty"` 998} 999 1000// MarshalJSON is the custom marshaler for A2AReprotectInput. 1001func (ari A2AReprotectInput) MarshalJSON() ([]byte, error) { 1002 ari.InstanceType = InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeA2A 1003 objectMap := make(map[string]interface{}) 1004 if ari.RecoveryContainerID != nil { 1005 objectMap["recoveryContainerId"] = ari.RecoveryContainerID 1006 } 1007 if ari.VMDisks != nil { 1008 objectMap["vmDisks"] = ari.VMDisks 1009 } 1010 if ari.RecoveryResourceGroupID != nil { 1011 objectMap["recoveryResourceGroupId"] = ari.RecoveryResourceGroupID 1012 } 1013 if ari.RecoveryCloudServiceID != nil { 1014 objectMap["recoveryCloudServiceId"] = ari.RecoveryCloudServiceID 1015 } 1016 if ari.RecoveryAvailabilitySetID != nil { 1017 objectMap["recoveryAvailabilitySetId"] = ari.RecoveryAvailabilitySetID 1018 } 1019 if ari.PolicyID != nil { 1020 objectMap["policyId"] = ari.PolicyID 1021 } 1022 if ari.InstanceType != "" { 1023 objectMap["instanceType"] = ari.InstanceType 1024 } 1025 return json.Marshal(objectMap) 1026} 1027 1028// AsA2AReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for A2AReprotectInput. 1029func (ari A2AReprotectInput) AsA2AReprotectInput() (*A2AReprotectInput, bool) { 1030 return &ari, true 1031} 1032 1033// AsHyperVReplicaAzureReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for A2AReprotectInput. 1034func (ari A2AReprotectInput) AsHyperVReplicaAzureReprotectInput() (*HyperVReplicaAzureReprotectInput, bool) { 1035 return nil, false 1036} 1037 1038// AsInMageAzureV2ReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for A2AReprotectInput. 1039func (ari A2AReprotectInput) AsInMageAzureV2ReprotectInput() (*InMageAzureV2ReprotectInput, bool) { 1040 return nil, false 1041} 1042 1043// AsInMageReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for A2AReprotectInput. 1044func (ari A2AReprotectInput) AsInMageReprotectInput() (*InMageReprotectInput, bool) { 1045 return nil, false 1046} 1047 1048// AsReverseReplicationProviderSpecificInput is the BasicReverseReplicationProviderSpecificInput implementation for A2AReprotectInput. 1049func (ari A2AReprotectInput) AsReverseReplicationProviderSpecificInput() (*ReverseReplicationProviderSpecificInput, bool) { 1050 return nil, false 1051} 1052 1053// AsBasicReverseReplicationProviderSpecificInput is the BasicReverseReplicationProviderSpecificInput implementation for A2AReprotectInput. 1054func (ari A2AReprotectInput) AsBasicReverseReplicationProviderSpecificInput() (BasicReverseReplicationProviderSpecificInput, bool) { 1055 return &ari, true 1056} 1057 1058// A2ASwitchProtectionInput a2A specific switch protection input. 1059type A2ASwitchProtectionInput struct { 1060 // RecoveryContainerID - The recovery container Id. 1061 RecoveryContainerID *string `json:"recoveryContainerId,omitempty"` 1062 // VMDisks - The list of vm disk details. 1063 VMDisks *[]A2AVMDiskInputDetails `json:"vmDisks,omitempty"` 1064 // VMManagedDisks - The list of vm managed disk details. 1065 VMManagedDisks *[]A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` 1066 // RecoveryResourceGroupID - The recovery resource group Id. Valid for V2 scenarios. 1067 RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"` 1068 // RecoveryCloudServiceID - The recovery cloud service Id. Valid for V1 scenarios. 1069 RecoveryCloudServiceID *string `json:"recoveryCloudServiceId,omitempty"` 1070 // RecoveryAvailabilitySetID - The recovery availability set. 1071 RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"` 1072 // PolicyID - The Policy Id. 1073 PolicyID *string `json:"policyId,omitempty"` 1074 // RecoveryBootDiagStorageAccountID - The boot diagnostic storage account. 1075 RecoveryBootDiagStorageAccountID *string `json:"recoveryBootDiagStorageAccountId,omitempty"` 1076 // DiskEncryptionInfo - The recovery disk encryption information. 1077 DiskEncryptionInfo *DiskEncryptionInfo `json:"diskEncryptionInfo,omitempty"` 1078 // InstanceType - Possible values include: 'InstanceTypeBasicSwitchProtectionProviderSpecificInputInstanceTypeSwitchProtectionProviderSpecificInput', 'InstanceTypeBasicSwitchProtectionProviderSpecificInputInstanceTypeA2A' 1079 InstanceType InstanceTypeBasicSwitchProtectionProviderSpecificInput `json:"instanceType,omitempty"` 1080} 1081 1082// MarshalJSON is the custom marshaler for A2ASwitchProtectionInput. 1083func (aspi A2ASwitchProtectionInput) MarshalJSON() ([]byte, error) { 1084 aspi.InstanceType = InstanceTypeBasicSwitchProtectionProviderSpecificInputInstanceTypeA2A 1085 objectMap := make(map[string]interface{}) 1086 if aspi.RecoveryContainerID != nil { 1087 objectMap["recoveryContainerId"] = aspi.RecoveryContainerID 1088 } 1089 if aspi.VMDisks != nil { 1090 objectMap["vmDisks"] = aspi.VMDisks 1091 } 1092 if aspi.VMManagedDisks != nil { 1093 objectMap["vmManagedDisks"] = aspi.VMManagedDisks 1094 } 1095 if aspi.RecoveryResourceGroupID != nil { 1096 objectMap["recoveryResourceGroupId"] = aspi.RecoveryResourceGroupID 1097 } 1098 if aspi.RecoveryCloudServiceID != nil { 1099 objectMap["recoveryCloudServiceId"] = aspi.RecoveryCloudServiceID 1100 } 1101 if aspi.RecoveryAvailabilitySetID != nil { 1102 objectMap["recoveryAvailabilitySetId"] = aspi.RecoveryAvailabilitySetID 1103 } 1104 if aspi.PolicyID != nil { 1105 objectMap["policyId"] = aspi.PolicyID 1106 } 1107 if aspi.RecoveryBootDiagStorageAccountID != nil { 1108 objectMap["recoveryBootDiagStorageAccountId"] = aspi.RecoveryBootDiagStorageAccountID 1109 } 1110 if aspi.DiskEncryptionInfo != nil { 1111 objectMap["diskEncryptionInfo"] = aspi.DiskEncryptionInfo 1112 } 1113 if aspi.InstanceType != "" { 1114 objectMap["instanceType"] = aspi.InstanceType 1115 } 1116 return json.Marshal(objectMap) 1117} 1118 1119// AsA2ASwitchProtectionInput is the BasicSwitchProtectionProviderSpecificInput implementation for A2ASwitchProtectionInput. 1120func (aspi A2ASwitchProtectionInput) AsA2ASwitchProtectionInput() (*A2ASwitchProtectionInput, bool) { 1121 return &aspi, true 1122} 1123 1124// AsSwitchProtectionProviderSpecificInput is the BasicSwitchProtectionProviderSpecificInput implementation for A2ASwitchProtectionInput. 1125func (aspi A2ASwitchProtectionInput) AsSwitchProtectionProviderSpecificInput() (*SwitchProtectionProviderSpecificInput, bool) { 1126 return nil, false 1127} 1128 1129// AsBasicSwitchProtectionProviderSpecificInput is the BasicSwitchProtectionProviderSpecificInput implementation for A2ASwitchProtectionInput. 1130func (aspi A2ASwitchProtectionInput) AsBasicSwitchProtectionProviderSpecificInput() (BasicSwitchProtectionProviderSpecificInput, bool) { 1131 return &aspi, true 1132} 1133 1134// A2AUpdateContainerMappingInput a2A update protection container mapping. 1135type A2AUpdateContainerMappingInput struct { 1136 // AgentAutoUpdateStatus - A value indicating whether the auto update is enabled. Possible values include: 'Disabled', 'Enabled' 1137 AgentAutoUpdateStatus AgentAutoUpdateStatus `json:"agentAutoUpdateStatus,omitempty"` 1138 // AutomationAccountArmID - The automation account arm id. 1139 AutomationAccountArmID *string `json:"automationAccountArmId,omitempty"` 1140 // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingInputInstanceTypeReplicationProviderSpecificUpdateContainerMappingInput', 'InstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingInputInstanceTypeA2A' 1141 InstanceType InstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingInput `json:"instanceType,omitempty"` 1142} 1143 1144// MarshalJSON is the custom marshaler for A2AUpdateContainerMappingInput. 1145func (aucmi A2AUpdateContainerMappingInput) MarshalJSON() ([]byte, error) { 1146 aucmi.InstanceType = InstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingInputInstanceTypeA2A 1147 objectMap := make(map[string]interface{}) 1148 if aucmi.AgentAutoUpdateStatus != "" { 1149 objectMap["agentAutoUpdateStatus"] = aucmi.AgentAutoUpdateStatus 1150 } 1151 if aucmi.AutomationAccountArmID != nil { 1152 objectMap["automationAccountArmId"] = aucmi.AutomationAccountArmID 1153 } 1154 if aucmi.InstanceType != "" { 1155 objectMap["instanceType"] = aucmi.InstanceType 1156 } 1157 return json.Marshal(objectMap) 1158} 1159 1160// AsA2AUpdateContainerMappingInput is the BasicReplicationProviderSpecificUpdateContainerMappingInput implementation for A2AUpdateContainerMappingInput. 1161func (aucmi A2AUpdateContainerMappingInput) AsA2AUpdateContainerMappingInput() (*A2AUpdateContainerMappingInput, bool) { 1162 return &aucmi, true 1163} 1164 1165// AsReplicationProviderSpecificUpdateContainerMappingInput is the BasicReplicationProviderSpecificUpdateContainerMappingInput implementation for A2AUpdateContainerMappingInput. 1166func (aucmi A2AUpdateContainerMappingInput) AsReplicationProviderSpecificUpdateContainerMappingInput() (*ReplicationProviderSpecificUpdateContainerMappingInput, bool) { 1167 return nil, false 1168} 1169 1170// AsBasicReplicationProviderSpecificUpdateContainerMappingInput is the BasicReplicationProviderSpecificUpdateContainerMappingInput implementation for A2AUpdateContainerMappingInput. 1171func (aucmi A2AUpdateContainerMappingInput) AsBasicReplicationProviderSpecificUpdateContainerMappingInput() (BasicReplicationProviderSpecificUpdateContainerMappingInput, bool) { 1172 return &aucmi, true 1173} 1174 1175// A2AUpdateReplicationProtectedItemInput inMage Azure V2 input to update replication protected item. 1176type A2AUpdateReplicationProtectedItemInput struct { 1177 // RecoveryCloudServiceID - The target cloud service ARM Id (for V1). 1178 RecoveryCloudServiceID *string `json:"recoveryCloudServiceId,omitempty"` 1179 // RecoveryResourceGroupID - The target resource group ARM Id (for V2). 1180 RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"` 1181 // ManagedDiskUpdateDetails - Managed disk update details. 1182 ManagedDiskUpdateDetails *[]A2AVMManagedDiskUpdateDetails `json:"managedDiskUpdateDetails,omitempty"` 1183 // RecoveryBootDiagStorageAccountID - The boot diagnostic storage account. 1184 RecoveryBootDiagStorageAccountID *string `json:"recoveryBootDiagStorageAccountId,omitempty"` 1185 // DiskEncryptionInfo - The recovery os disk encryption information. 1186 DiskEncryptionInfo *DiskEncryptionInfo `json:"diskEncryptionInfo,omitempty"` 1187 // InstanceType - Possible values include: 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeUpdateReplicationProtectedItemProviderInput', 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeA2A', 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeInMageAzureV2' 1188 InstanceType InstanceTypeBasicUpdateReplicationProtectedItemProviderInput `json:"instanceType,omitempty"` 1189} 1190 1191// MarshalJSON is the custom marshaler for A2AUpdateReplicationProtectedItemInput. 1192func (aurpii A2AUpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, error) { 1193 aurpii.InstanceType = InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeA2A 1194 objectMap := make(map[string]interface{}) 1195 if aurpii.RecoveryCloudServiceID != nil { 1196 objectMap["recoveryCloudServiceId"] = aurpii.RecoveryCloudServiceID 1197 } 1198 if aurpii.RecoveryResourceGroupID != nil { 1199 objectMap["recoveryResourceGroupId"] = aurpii.RecoveryResourceGroupID 1200 } 1201 if aurpii.ManagedDiskUpdateDetails != nil { 1202 objectMap["managedDiskUpdateDetails"] = aurpii.ManagedDiskUpdateDetails 1203 } 1204 if aurpii.RecoveryBootDiagStorageAccountID != nil { 1205 objectMap["recoveryBootDiagStorageAccountId"] = aurpii.RecoveryBootDiagStorageAccountID 1206 } 1207 if aurpii.DiskEncryptionInfo != nil { 1208 objectMap["diskEncryptionInfo"] = aurpii.DiskEncryptionInfo 1209 } 1210 if aurpii.InstanceType != "" { 1211 objectMap["instanceType"] = aurpii.InstanceType 1212 } 1213 return json.Marshal(objectMap) 1214} 1215 1216// AsA2AUpdateReplicationProtectedItemInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for A2AUpdateReplicationProtectedItemInput. 1217func (aurpii A2AUpdateReplicationProtectedItemInput) AsA2AUpdateReplicationProtectedItemInput() (*A2AUpdateReplicationProtectedItemInput, bool) { 1218 return &aurpii, true 1219} 1220 1221// AsHyperVReplicaAzureUpdateReplicationProtectedItemInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for A2AUpdateReplicationProtectedItemInput. 1222func (aurpii A2AUpdateReplicationProtectedItemInput) AsHyperVReplicaAzureUpdateReplicationProtectedItemInput() (*HyperVReplicaAzureUpdateReplicationProtectedItemInput, bool) { 1223 return nil, false 1224} 1225 1226// AsInMageAzureV2UpdateReplicationProtectedItemInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for A2AUpdateReplicationProtectedItemInput. 1227func (aurpii A2AUpdateReplicationProtectedItemInput) AsInMageAzureV2UpdateReplicationProtectedItemInput() (*InMageAzureV2UpdateReplicationProtectedItemInput, bool) { 1228 return nil, false 1229} 1230 1231// AsUpdateReplicationProtectedItemProviderInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for A2AUpdateReplicationProtectedItemInput. 1232func (aurpii A2AUpdateReplicationProtectedItemInput) AsUpdateReplicationProtectedItemProviderInput() (*UpdateReplicationProtectedItemProviderInput, bool) { 1233 return nil, false 1234} 1235 1236// AsBasicUpdateReplicationProtectedItemProviderInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for A2AUpdateReplicationProtectedItemInput. 1237func (aurpii A2AUpdateReplicationProtectedItemInput) AsBasicUpdateReplicationProtectedItemProviderInput() (BasicUpdateReplicationProtectedItemProviderInput, bool) { 1238 return &aurpii, true 1239} 1240 1241// A2AVMDiskInputDetails azure VM disk input details. 1242type A2AVMDiskInputDetails struct { 1243 // DiskURI - The disk Uri. 1244 DiskURI *string `json:"diskUri,omitempty"` 1245 // RecoveryAzureStorageAccountID - The recovery VHD storage account Id. 1246 RecoveryAzureStorageAccountID *string `json:"recoveryAzureStorageAccountId,omitempty"` 1247 // PrimaryStagingAzureStorageAccountID - The primary staging storage account Id. 1248 PrimaryStagingAzureStorageAccountID *string `json:"primaryStagingAzureStorageAccountId,omitempty"` 1249} 1250 1251// A2AVMManagedDiskInputDetails azure VM managed disk input details. 1252type A2AVMManagedDiskInputDetails struct { 1253 // DiskID - The disk Id. 1254 DiskID *string `json:"diskId,omitempty"` 1255 // PrimaryStagingAzureStorageAccountID - The primary staging storage account Arm Id. 1256 PrimaryStagingAzureStorageAccountID *string `json:"primaryStagingAzureStorageAccountId,omitempty"` 1257 // RecoveryResourceGroupID - The target resource group Arm Id. 1258 RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"` 1259 // RecoveryReplicaDiskAccountType - The replica disk type. Its an optional value and will be same as source disk type if not user provided. 1260 RecoveryReplicaDiskAccountType *string `json:"recoveryReplicaDiskAccountType,omitempty"` 1261 // RecoveryTargetDiskAccountType - The target disk type after failover. Its an optional value and will be same as source disk type if not user provided. 1262 RecoveryTargetDiskAccountType *string `json:"recoveryTargetDiskAccountType,omitempty"` 1263} 1264 1265// A2AVMManagedDiskUpdateDetails azure VM managed disk update input details. 1266type A2AVMManagedDiskUpdateDetails struct { 1267 // DiskID - The disk Id. 1268 DiskID *string `json:"diskId,omitempty"` 1269 // RecoveryTargetDiskAccountType - The target disk type before failover. 1270 RecoveryTargetDiskAccountType *string `json:"recoveryTargetDiskAccountType,omitempty"` 1271 // RecoveryReplicaDiskAccountType - The replica disk type before failover. 1272 RecoveryReplicaDiskAccountType *string `json:"recoveryReplicaDiskAccountType,omitempty"` 1273} 1274 1275// AddRecoveryServicesProviderInput input required to add a provider. 1276type AddRecoveryServicesProviderInput struct { 1277 // Properties - The properties of an add provider request. 1278 Properties *AddRecoveryServicesProviderInputProperties `json:"properties,omitempty"` 1279} 1280 1281// AddRecoveryServicesProviderInputProperties the properties of an add provider request. 1282type AddRecoveryServicesProviderInputProperties struct { 1283 // MachineName - The name of the machine where the provider is getting added. 1284 MachineName *string `json:"machineName,omitempty"` 1285 // AuthenticationIdentityInput - The identity provider input for DRA authentication. 1286 AuthenticationIdentityInput *IdentityProviderInput `json:"authenticationIdentityInput,omitempty"` 1287 // ResourceAccessIdentityInput - The identity provider input for resource access. 1288 ResourceAccessIdentityInput *IdentityProviderInput `json:"resourceAccessIdentityInput,omitempty"` 1289} 1290 1291// AddVCenterRequest input required to add vCenter. 1292type AddVCenterRequest struct { 1293 // Properties - The properties of an add vCenter request. 1294 Properties *AddVCenterRequestProperties `json:"properties,omitempty"` 1295} 1296 1297// AddVCenterRequestProperties the properties of an add vCenter request. 1298type AddVCenterRequestProperties struct { 1299 // FriendlyName - The friendly name of the vCenter. 1300 FriendlyName *string `json:"friendlyName,omitempty"` 1301 // IPAddress - The IP address of the vCenter to be discovered. 1302 IPAddress *string `json:"ipAddress,omitempty"` 1303 // ProcessServerID - The process server Id from where the discovery is orchestrated. 1304 ProcessServerID *string `json:"processServerId,omitempty"` 1305 // Port - The port number for discovery. 1306 Port *string `json:"port,omitempty"` 1307 // RunAsAccountID - The account Id which has privileges to discover the vCenter. 1308 RunAsAccountID *string `json:"runAsAccountId,omitempty"` 1309} 1310 1311// Alert implements the Alert class. 1312type Alert struct { 1313 autorest.Response `json:"-"` 1314 // Properties - Alert related data. 1315 Properties *AlertProperties `json:"properties,omitempty"` 1316 // ID - READ-ONLY; Resource Id 1317 ID *string `json:"id,omitempty"` 1318 // Name - READ-ONLY; Resource Name 1319 Name *string `json:"name,omitempty"` 1320 // Type - READ-ONLY; Resource Type 1321 Type *string `json:"type,omitempty"` 1322 // Location - Resource Location 1323 Location *string `json:"location,omitempty"` 1324} 1325 1326// MarshalJSON is the custom marshaler for Alert. 1327func (a Alert) MarshalJSON() ([]byte, error) { 1328 objectMap := make(map[string]interface{}) 1329 if a.Properties != nil { 1330 objectMap["properties"] = a.Properties 1331 } 1332 if a.Location != nil { 1333 objectMap["location"] = a.Location 1334 } 1335 return json.Marshal(objectMap) 1336} 1337 1338// AlertCollection collection of alerts. 1339type AlertCollection struct { 1340 autorest.Response `json:"-"` 1341 // Value - The list of alerts. 1342 Value *[]Alert `json:"value,omitempty"` 1343 // NextLink - The value of next link. 1344 NextLink *string `json:"nextLink,omitempty"` 1345} 1346 1347// AlertCollectionIterator provides access to a complete listing of Alert values. 1348type AlertCollectionIterator struct { 1349 i int 1350 page AlertCollectionPage 1351} 1352 1353// NextWithContext advances to the next value. If there was an error making 1354// the request the iterator does not advance and the error is returned. 1355func (iter *AlertCollectionIterator) NextWithContext(ctx context.Context) (err error) { 1356 if tracing.IsEnabled() { 1357 ctx = tracing.StartSpan(ctx, fqdn+"/AlertCollectionIterator.NextWithContext") 1358 defer func() { 1359 sc := -1 1360 if iter.Response().Response.Response != nil { 1361 sc = iter.Response().Response.Response.StatusCode 1362 } 1363 tracing.EndSpan(ctx, sc, err) 1364 }() 1365 } 1366 iter.i++ 1367 if iter.i < len(iter.page.Values()) { 1368 return nil 1369 } 1370 err = iter.page.NextWithContext(ctx) 1371 if err != nil { 1372 iter.i-- 1373 return err 1374 } 1375 iter.i = 0 1376 return nil 1377} 1378 1379// Next advances to the next value. If there was an error making 1380// the request the iterator does not advance and the error is returned. 1381// Deprecated: Use NextWithContext() instead. 1382func (iter *AlertCollectionIterator) Next() error { 1383 return iter.NextWithContext(context.Background()) 1384} 1385 1386// NotDone returns true if the enumeration should be started or is not yet complete. 1387func (iter AlertCollectionIterator) NotDone() bool { 1388 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 1389} 1390 1391// Response returns the raw server response from the last page request. 1392func (iter AlertCollectionIterator) Response() AlertCollection { 1393 return iter.page.Response() 1394} 1395 1396// Value returns the current value or a zero-initialized value if the 1397// iterator has advanced beyond the end of the collection. 1398func (iter AlertCollectionIterator) Value() Alert { 1399 if !iter.page.NotDone() { 1400 return Alert{} 1401 } 1402 return iter.page.Values()[iter.i] 1403} 1404 1405// Creates a new instance of the AlertCollectionIterator type. 1406func NewAlertCollectionIterator(page AlertCollectionPage) AlertCollectionIterator { 1407 return AlertCollectionIterator{page: page} 1408} 1409 1410// IsEmpty returns true if the ListResult contains no values. 1411func (ac AlertCollection) IsEmpty() bool { 1412 return ac.Value == nil || len(*ac.Value) == 0 1413} 1414 1415// hasNextLink returns true if the NextLink is not empty. 1416func (ac AlertCollection) hasNextLink() bool { 1417 return ac.NextLink != nil && len(*ac.NextLink) != 0 1418} 1419 1420// alertCollectionPreparer prepares a request to retrieve the next set of results. 1421// It returns nil if no more results exist. 1422func (ac AlertCollection) alertCollectionPreparer(ctx context.Context) (*http.Request, error) { 1423 if !ac.hasNextLink() { 1424 return nil, nil 1425 } 1426 return autorest.Prepare((&http.Request{}).WithContext(ctx), 1427 autorest.AsJSON(), 1428 autorest.AsGet(), 1429 autorest.WithBaseURL(to.String(ac.NextLink))) 1430} 1431 1432// AlertCollectionPage contains a page of Alert values. 1433type AlertCollectionPage struct { 1434 fn func(context.Context, AlertCollection) (AlertCollection, error) 1435 ac AlertCollection 1436} 1437 1438// NextWithContext advances to the next page of values. If there was an error making 1439// the request the page does not advance and the error is returned. 1440func (page *AlertCollectionPage) NextWithContext(ctx context.Context) (err error) { 1441 if tracing.IsEnabled() { 1442 ctx = tracing.StartSpan(ctx, fqdn+"/AlertCollectionPage.NextWithContext") 1443 defer func() { 1444 sc := -1 1445 if page.Response().Response.Response != nil { 1446 sc = page.Response().Response.Response.StatusCode 1447 } 1448 tracing.EndSpan(ctx, sc, err) 1449 }() 1450 } 1451 for { 1452 next, err := page.fn(ctx, page.ac) 1453 if err != nil { 1454 return err 1455 } 1456 page.ac = next 1457 if !next.hasNextLink() || !next.IsEmpty() { 1458 break 1459 } 1460 } 1461 return nil 1462} 1463 1464// Next advances to the next page of values. If there was an error making 1465// the request the page does not advance and the error is returned. 1466// Deprecated: Use NextWithContext() instead. 1467func (page *AlertCollectionPage) Next() error { 1468 return page.NextWithContext(context.Background()) 1469} 1470 1471// NotDone returns true if the page enumeration should be started or is not yet complete. 1472func (page AlertCollectionPage) NotDone() bool { 1473 return !page.ac.IsEmpty() 1474} 1475 1476// Response returns the raw server response from the last page request. 1477func (page AlertCollectionPage) Response() AlertCollection { 1478 return page.ac 1479} 1480 1481// Values returns the slice of values for the current page or nil if there are no values. 1482func (page AlertCollectionPage) Values() []Alert { 1483 if page.ac.IsEmpty() { 1484 return nil 1485 } 1486 return *page.ac.Value 1487} 1488 1489// Creates a new instance of the AlertCollectionPage type. 1490func NewAlertCollectionPage(cur AlertCollection, getNextPage func(context.Context, AlertCollection) (AlertCollection, error)) AlertCollectionPage { 1491 return AlertCollectionPage{ 1492 fn: getNextPage, 1493 ac: cur, 1494 } 1495} 1496 1497// AlertProperties the properties of an alert. 1498type AlertProperties struct { 1499 // SendToOwners - A value indicating whether to send email to subscription administrator. 1500 SendToOwners *string `json:"sendToOwners,omitempty"` 1501 // CustomEmailAddresses - The custom email address for sending emails. 1502 CustomEmailAddresses *[]string `json:"customEmailAddresses,omitempty"` 1503 // Locale - The locale for the email notification. 1504 Locale *string `json:"locale,omitempty"` 1505} 1506 1507// ApplyRecoveryPointInput input to apply recovery point. 1508type ApplyRecoveryPointInput struct { 1509 // Properties - The input properties to apply recovery point. 1510 Properties *ApplyRecoveryPointInputProperties `json:"properties,omitempty"` 1511} 1512 1513// ApplyRecoveryPointInputProperties input properties to apply recovery point. 1514type ApplyRecoveryPointInputProperties struct { 1515 // RecoveryPointID - The recovery point Id. 1516 RecoveryPointID *string `json:"recoveryPointId,omitempty"` 1517 // ProviderSpecificDetails - Provider specific input for applying recovery point. 1518 ProviderSpecificDetails BasicApplyRecoveryPointProviderSpecificInput `json:"providerSpecificDetails,omitempty"` 1519} 1520 1521// UnmarshalJSON is the custom unmarshaler for ApplyRecoveryPointInputProperties struct. 1522func (arpip *ApplyRecoveryPointInputProperties) UnmarshalJSON(body []byte) error { 1523 var m map[string]*json.RawMessage 1524 err := json.Unmarshal(body, &m) 1525 if err != nil { 1526 return err 1527 } 1528 for k, v := range m { 1529 switch k { 1530 case "recoveryPointId": 1531 if v != nil { 1532 var recoveryPointID string 1533 err = json.Unmarshal(*v, &recoveryPointID) 1534 if err != nil { 1535 return err 1536 } 1537 arpip.RecoveryPointID = &recoveryPointID 1538 } 1539 case "providerSpecificDetails": 1540 if v != nil { 1541 providerSpecificDetails, err := unmarshalBasicApplyRecoveryPointProviderSpecificInput(*v) 1542 if err != nil { 1543 return err 1544 } 1545 arpip.ProviderSpecificDetails = providerSpecificDetails 1546 } 1547 } 1548 } 1549 1550 return nil 1551} 1552 1553// BasicApplyRecoveryPointProviderSpecificInput provider specific input for apply recovery point. 1554type BasicApplyRecoveryPointProviderSpecificInput interface { 1555 AsA2AApplyRecoveryPointInput() (*A2AApplyRecoveryPointInput, bool) 1556 AsHyperVReplicaAzureApplyRecoveryPointInput() (*HyperVReplicaAzureApplyRecoveryPointInput, bool) 1557 AsInMageAzureV2ApplyRecoveryPointInput() (*InMageAzureV2ApplyRecoveryPointInput, bool) 1558 AsApplyRecoveryPointProviderSpecificInput() (*ApplyRecoveryPointProviderSpecificInput, bool) 1559} 1560 1561// ApplyRecoveryPointProviderSpecificInput provider specific input for apply recovery point. 1562type ApplyRecoveryPointProviderSpecificInput struct { 1563 // InstanceType - Possible values include: 'InstanceTypeApplyRecoveryPointProviderSpecificInput', 'InstanceTypeA2A', 'InstanceTypeHyperVReplicaAzure', 'InstanceTypeInMageAzureV2' 1564 InstanceType InstanceType `json:"instanceType,omitempty"` 1565} 1566 1567func unmarshalBasicApplyRecoveryPointProviderSpecificInput(body []byte) (BasicApplyRecoveryPointProviderSpecificInput, error) { 1568 var m map[string]interface{} 1569 err := json.Unmarshal(body, &m) 1570 if err != nil { 1571 return nil, err 1572 } 1573 1574 switch m["instanceType"] { 1575 case string(InstanceTypeA2A): 1576 var aarpi A2AApplyRecoveryPointInput 1577 err := json.Unmarshal(body, &aarpi) 1578 return aarpi, err 1579 case string(InstanceTypeHyperVReplicaAzure): 1580 var hvraarpi HyperVReplicaAzureApplyRecoveryPointInput 1581 err := json.Unmarshal(body, &hvraarpi) 1582 return hvraarpi, err 1583 case string(InstanceTypeInMageAzureV2): 1584 var imavarpi InMageAzureV2ApplyRecoveryPointInput 1585 err := json.Unmarshal(body, &imavarpi) 1586 return imavarpi, err 1587 default: 1588 var arppsi ApplyRecoveryPointProviderSpecificInput 1589 err := json.Unmarshal(body, &arppsi) 1590 return arppsi, err 1591 } 1592} 1593func unmarshalBasicApplyRecoveryPointProviderSpecificInputArray(body []byte) ([]BasicApplyRecoveryPointProviderSpecificInput, error) { 1594 var rawMessages []*json.RawMessage 1595 err := json.Unmarshal(body, &rawMessages) 1596 if err != nil { 1597 return nil, err 1598 } 1599 1600 arppsiArray := make([]BasicApplyRecoveryPointProviderSpecificInput, len(rawMessages)) 1601 1602 for index, rawMessage := range rawMessages { 1603 arppsi, err := unmarshalBasicApplyRecoveryPointProviderSpecificInput(*rawMessage) 1604 if err != nil { 1605 return nil, err 1606 } 1607 arppsiArray[index] = arppsi 1608 } 1609 return arppsiArray, nil 1610} 1611 1612// MarshalJSON is the custom marshaler for ApplyRecoveryPointProviderSpecificInput. 1613func (arppsi ApplyRecoveryPointProviderSpecificInput) MarshalJSON() ([]byte, error) { 1614 arppsi.InstanceType = InstanceTypeApplyRecoveryPointProviderSpecificInput 1615 objectMap := make(map[string]interface{}) 1616 if arppsi.InstanceType != "" { 1617 objectMap["instanceType"] = arppsi.InstanceType 1618 } 1619 return json.Marshal(objectMap) 1620} 1621 1622// AsA2AApplyRecoveryPointInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for ApplyRecoveryPointProviderSpecificInput. 1623func (arppsi ApplyRecoveryPointProviderSpecificInput) AsA2AApplyRecoveryPointInput() (*A2AApplyRecoveryPointInput, bool) { 1624 return nil, false 1625} 1626 1627// AsHyperVReplicaAzureApplyRecoveryPointInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for ApplyRecoveryPointProviderSpecificInput. 1628func (arppsi ApplyRecoveryPointProviderSpecificInput) AsHyperVReplicaAzureApplyRecoveryPointInput() (*HyperVReplicaAzureApplyRecoveryPointInput, bool) { 1629 return nil, false 1630} 1631 1632// AsInMageAzureV2ApplyRecoveryPointInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for ApplyRecoveryPointProviderSpecificInput. 1633func (arppsi ApplyRecoveryPointProviderSpecificInput) AsInMageAzureV2ApplyRecoveryPointInput() (*InMageAzureV2ApplyRecoveryPointInput, bool) { 1634 return nil, false 1635} 1636 1637// AsApplyRecoveryPointProviderSpecificInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for ApplyRecoveryPointProviderSpecificInput. 1638func (arppsi ApplyRecoveryPointProviderSpecificInput) AsApplyRecoveryPointProviderSpecificInput() (*ApplyRecoveryPointProviderSpecificInput, bool) { 1639 return &arppsi, true 1640} 1641 1642// AsBasicApplyRecoveryPointProviderSpecificInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for ApplyRecoveryPointProviderSpecificInput. 1643func (arppsi ApplyRecoveryPointProviderSpecificInput) AsBasicApplyRecoveryPointProviderSpecificInput() (BasicApplyRecoveryPointProviderSpecificInput, bool) { 1644 return &arppsi, true 1645} 1646 1647// AsrJobDetails this class represents job details based on specific job type. 1648type AsrJobDetails struct { 1649 // AffectedObjectDetails - The affected object properties like source server, source cloud, target server, target cloud etc. based on the workflow object details. 1650 AffectedObjectDetails map[string]*string `json:"affectedObjectDetails"` 1651 // InstanceType - Possible values include: 'InstanceTypeJobDetails', 'InstanceTypeAsrJobDetails', 'InstanceTypeExportJobDetails', 'InstanceTypeFailoverJobDetails', 'InstanceTypeSwitchProtectionJobDetails', 'InstanceTypeTestFailoverJobDetails' 1652 InstanceType InstanceTypeBasicJobDetails `json:"instanceType,omitempty"` 1653} 1654 1655// MarshalJSON is the custom marshaler for AsrJobDetails. 1656func (ajd AsrJobDetails) MarshalJSON() ([]byte, error) { 1657 ajd.InstanceType = InstanceTypeAsrJobDetails 1658 objectMap := make(map[string]interface{}) 1659 if ajd.AffectedObjectDetails != nil { 1660 objectMap["affectedObjectDetails"] = ajd.AffectedObjectDetails 1661 } 1662 if ajd.InstanceType != "" { 1663 objectMap["instanceType"] = ajd.InstanceType 1664 } 1665 return json.Marshal(objectMap) 1666} 1667 1668// AsAsrJobDetails is the BasicJobDetails implementation for AsrJobDetails. 1669func (ajd AsrJobDetails) AsAsrJobDetails() (*AsrJobDetails, bool) { 1670 return &ajd, true 1671} 1672 1673// AsExportJobDetails is the BasicJobDetails implementation for AsrJobDetails. 1674func (ajd AsrJobDetails) AsExportJobDetails() (*ExportJobDetails, bool) { 1675 return nil, false 1676} 1677 1678// AsFailoverJobDetails is the BasicJobDetails implementation for AsrJobDetails. 1679func (ajd AsrJobDetails) AsFailoverJobDetails() (*FailoverJobDetails, bool) { 1680 return nil, false 1681} 1682 1683// AsSwitchProtectionJobDetails is the BasicJobDetails implementation for AsrJobDetails. 1684func (ajd AsrJobDetails) AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool) { 1685 return nil, false 1686} 1687 1688// AsTestFailoverJobDetails is the BasicJobDetails implementation for AsrJobDetails. 1689func (ajd AsrJobDetails) AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool) { 1690 return nil, false 1691} 1692 1693// AsJobDetails is the BasicJobDetails implementation for AsrJobDetails. 1694func (ajd AsrJobDetails) AsJobDetails() (*JobDetails, bool) { 1695 return nil, false 1696} 1697 1698// AsBasicJobDetails is the BasicJobDetails implementation for AsrJobDetails. 1699func (ajd AsrJobDetails) AsBasicJobDetails() (BasicJobDetails, bool) { 1700 return &ajd, true 1701} 1702 1703// ASRTask task of the Job. 1704type ASRTask struct { 1705 // TaskID - The Id. 1706 TaskID *string `json:"taskId,omitempty"` 1707 // Name - The unique Task name. 1708 Name *string `json:"name,omitempty"` 1709 // StartTime - The start time. 1710 StartTime *date.Time `json:"startTime,omitempty"` 1711 // EndTime - The end time. 1712 EndTime *date.Time `json:"endTime,omitempty"` 1713 // AllowedActions - The state/actions applicable on this task. 1714 AllowedActions *[]string `json:"allowedActions,omitempty"` 1715 // FriendlyName - The name. 1716 FriendlyName *string `json:"friendlyName,omitempty"` 1717 // State - The State. It is one of these values - NotStarted, InProgress, Succeeded, Failed, Cancelled, Suspended or Other. 1718 State *string `json:"state,omitempty"` 1719 // StateDescription - The description of the task state. For example - For Succeeded state, description can be Completed, PartiallySucceeded, CompletedWithInformation or Skipped. 1720 StateDescription *string `json:"stateDescription,omitempty"` 1721 // TaskType - The type of task. Details in CustomDetails property depend on this type. 1722 TaskType *string `json:"taskType,omitempty"` 1723 // CustomDetails - The custom task details based on the task type. 1724 CustomDetails BasicTaskTypeDetails `json:"customDetails,omitempty"` 1725 // GroupTaskCustomDetails - The custom task details based on the task type, if the task type is GroupTaskDetails or one of the types derived from it. 1726 GroupTaskCustomDetails BasicGroupTaskDetails `json:"groupTaskCustomDetails,omitempty"` 1727 // Errors - The task error details. 1728 Errors *[]JobErrorDetails `json:"errors,omitempty"` 1729} 1730 1731// UnmarshalJSON is the custom unmarshaler for ASRTask struct. 1732func (at *ASRTask) UnmarshalJSON(body []byte) error { 1733 var m map[string]*json.RawMessage 1734 err := json.Unmarshal(body, &m) 1735 if err != nil { 1736 return err 1737 } 1738 for k, v := range m { 1739 switch k { 1740 case "taskId": 1741 if v != nil { 1742 var taskID string 1743 err = json.Unmarshal(*v, &taskID) 1744 if err != nil { 1745 return err 1746 } 1747 at.TaskID = &taskID 1748 } 1749 case "name": 1750 if v != nil { 1751 var name string 1752 err = json.Unmarshal(*v, &name) 1753 if err != nil { 1754 return err 1755 } 1756 at.Name = &name 1757 } 1758 case "startTime": 1759 if v != nil { 1760 var startTime date.Time 1761 err = json.Unmarshal(*v, &startTime) 1762 if err != nil { 1763 return err 1764 } 1765 at.StartTime = &startTime 1766 } 1767 case "endTime": 1768 if v != nil { 1769 var endTime date.Time 1770 err = json.Unmarshal(*v, &endTime) 1771 if err != nil { 1772 return err 1773 } 1774 at.EndTime = &endTime 1775 } 1776 case "allowedActions": 1777 if v != nil { 1778 var allowedActions []string 1779 err = json.Unmarshal(*v, &allowedActions) 1780 if err != nil { 1781 return err 1782 } 1783 at.AllowedActions = &allowedActions 1784 } 1785 case "friendlyName": 1786 if v != nil { 1787 var friendlyName string 1788 err = json.Unmarshal(*v, &friendlyName) 1789 if err != nil { 1790 return err 1791 } 1792 at.FriendlyName = &friendlyName 1793 } 1794 case "state": 1795 if v != nil { 1796 var state string 1797 err = json.Unmarshal(*v, &state) 1798 if err != nil { 1799 return err 1800 } 1801 at.State = &state 1802 } 1803 case "stateDescription": 1804 if v != nil { 1805 var stateDescription string 1806 err = json.Unmarshal(*v, &stateDescription) 1807 if err != nil { 1808 return err 1809 } 1810 at.StateDescription = &stateDescription 1811 } 1812 case "taskType": 1813 if v != nil { 1814 var taskType string 1815 err = json.Unmarshal(*v, &taskType) 1816 if err != nil { 1817 return err 1818 } 1819 at.TaskType = &taskType 1820 } 1821 case "customDetails": 1822 if v != nil { 1823 customDetails, err := unmarshalBasicTaskTypeDetails(*v) 1824 if err != nil { 1825 return err 1826 } 1827 at.CustomDetails = customDetails 1828 } 1829 case "groupTaskCustomDetails": 1830 if v != nil { 1831 groupTaskCustomDetails, err := unmarshalBasicGroupTaskDetails(*v) 1832 if err != nil { 1833 return err 1834 } 1835 at.GroupTaskCustomDetails = groupTaskCustomDetails 1836 } 1837 case "errors": 1838 if v != nil { 1839 var errorsVar []JobErrorDetails 1840 err = json.Unmarshal(*v, &errorsVar) 1841 if err != nil { 1842 return err 1843 } 1844 at.Errors = &errorsVar 1845 } 1846 } 1847 } 1848 1849 return nil 1850} 1851 1852// AutomationRunbookTaskDetails this class represents the task details for an automation runbook. 1853type AutomationRunbookTaskDetails struct { 1854 // Name - The recovery plan task name. 1855 Name *string `json:"name,omitempty"` 1856 // CloudServiceName - The cloud service of the automation runbook account. 1857 CloudServiceName *string `json:"cloudServiceName,omitempty"` 1858 // SubscriptionID - The subscription Id of the automation runbook account. 1859 SubscriptionID *string `json:"subscriptionId,omitempty"` 1860 // AccountName - The automation account name of the runbook. 1861 AccountName *string `json:"accountName,omitempty"` 1862 // RunbookID - The runbook Id. 1863 RunbookID *string `json:"runbookId,omitempty"` 1864 // RunbookName - The runbook name. 1865 RunbookName *string `json:"runbookName,omitempty"` 1866 // JobID - The job Id of the runbook execution. 1867 JobID *string `json:"jobId,omitempty"` 1868 // JobOutput - The execution output of the runbook. 1869 JobOutput *string `json:"jobOutput,omitempty"` 1870 // IsPrimarySideScript - A value indicating whether it is a primary side script or not. 1871 IsPrimarySideScript *bool `json:"isPrimarySideScript,omitempty"` 1872 // InstanceType - Possible values include: 'InstanceTypeTaskTypeDetails', 'InstanceTypeAutomationRunbookTaskDetails', 'InstanceTypeConsistencyCheckTaskDetails', 'InstanceTypeFabricReplicationGroupTaskDetails', 'InstanceTypeJobTaskDetails', 'InstanceTypeManualActionTaskDetails', 'InstanceTypeScriptActionTaskDetails', 'InstanceTypeVirtualMachineTaskDetails', 'InstanceTypeVMNicUpdatesTaskDetails' 1873 InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"` 1874} 1875 1876// MarshalJSON is the custom marshaler for AutomationRunbookTaskDetails. 1877func (artd AutomationRunbookTaskDetails) MarshalJSON() ([]byte, error) { 1878 artd.InstanceType = InstanceTypeAutomationRunbookTaskDetails 1879 objectMap := make(map[string]interface{}) 1880 if artd.Name != nil { 1881 objectMap["name"] = artd.Name 1882 } 1883 if artd.CloudServiceName != nil { 1884 objectMap["cloudServiceName"] = artd.CloudServiceName 1885 } 1886 if artd.SubscriptionID != nil { 1887 objectMap["subscriptionId"] = artd.SubscriptionID 1888 } 1889 if artd.AccountName != nil { 1890 objectMap["accountName"] = artd.AccountName 1891 } 1892 if artd.RunbookID != nil { 1893 objectMap["runbookId"] = artd.RunbookID 1894 } 1895 if artd.RunbookName != nil { 1896 objectMap["runbookName"] = artd.RunbookName 1897 } 1898 if artd.JobID != nil { 1899 objectMap["jobId"] = artd.JobID 1900 } 1901 if artd.JobOutput != nil { 1902 objectMap["jobOutput"] = artd.JobOutput 1903 } 1904 if artd.IsPrimarySideScript != nil { 1905 objectMap["isPrimarySideScript"] = artd.IsPrimarySideScript 1906 } 1907 if artd.InstanceType != "" { 1908 objectMap["instanceType"] = artd.InstanceType 1909 } 1910 return json.Marshal(objectMap) 1911} 1912 1913// AsAutomationRunbookTaskDetails is the BasicTaskTypeDetails implementation for AutomationRunbookTaskDetails. 1914func (artd AutomationRunbookTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) { 1915 return &artd, true 1916} 1917 1918// AsConsistencyCheckTaskDetails is the BasicTaskTypeDetails implementation for AutomationRunbookTaskDetails. 1919func (artd AutomationRunbookTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) { 1920 return nil, false 1921} 1922 1923// AsFabricReplicationGroupTaskDetails is the BasicTaskTypeDetails implementation for AutomationRunbookTaskDetails. 1924func (artd AutomationRunbookTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) { 1925 return nil, false 1926} 1927 1928// AsJobTaskDetails is the BasicTaskTypeDetails implementation for AutomationRunbookTaskDetails. 1929func (artd AutomationRunbookTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) { 1930 return nil, false 1931} 1932 1933// AsManualActionTaskDetails is the BasicTaskTypeDetails implementation for AutomationRunbookTaskDetails. 1934func (artd AutomationRunbookTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) { 1935 return nil, false 1936} 1937 1938// AsScriptActionTaskDetails is the BasicTaskTypeDetails implementation for AutomationRunbookTaskDetails. 1939func (artd AutomationRunbookTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) { 1940 return nil, false 1941} 1942 1943// AsVirtualMachineTaskDetails is the BasicTaskTypeDetails implementation for AutomationRunbookTaskDetails. 1944func (artd AutomationRunbookTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) { 1945 return nil, false 1946} 1947 1948// AsVMNicUpdatesTaskDetails is the BasicTaskTypeDetails implementation for AutomationRunbookTaskDetails. 1949func (artd AutomationRunbookTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) { 1950 return nil, false 1951} 1952 1953// AsTaskTypeDetails is the BasicTaskTypeDetails implementation for AutomationRunbookTaskDetails. 1954func (artd AutomationRunbookTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) { 1955 return nil, false 1956} 1957 1958// AsBasicTaskTypeDetails is the BasicTaskTypeDetails implementation for AutomationRunbookTaskDetails. 1959func (artd AutomationRunbookTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) { 1960 return &artd, true 1961} 1962 1963// AzureFabricCreationInput fabric provider specific settings. 1964type AzureFabricCreationInput struct { 1965 // Location - The Location. 1966 Location *string `json:"location,omitempty"` 1967 // InstanceType - Possible values include: 'InstanceTypeFabricSpecificCreationInput', 'InstanceTypeAzure', 'InstanceTypeVMwareV2' 1968 InstanceType InstanceTypeBasicFabricSpecificCreationInput `json:"instanceType,omitempty"` 1969} 1970 1971// MarshalJSON is the custom marshaler for AzureFabricCreationInput. 1972func (afci AzureFabricCreationInput) MarshalJSON() ([]byte, error) { 1973 afci.InstanceType = InstanceTypeAzure 1974 objectMap := make(map[string]interface{}) 1975 if afci.Location != nil { 1976 objectMap["location"] = afci.Location 1977 } 1978 if afci.InstanceType != "" { 1979 objectMap["instanceType"] = afci.InstanceType 1980 } 1981 return json.Marshal(objectMap) 1982} 1983 1984// AsAzureFabricCreationInput is the BasicFabricSpecificCreationInput implementation for AzureFabricCreationInput. 1985func (afci AzureFabricCreationInput) AsAzureFabricCreationInput() (*AzureFabricCreationInput, bool) { 1986 return &afci, true 1987} 1988 1989// AsVMwareV2FabricCreationInput is the BasicFabricSpecificCreationInput implementation for AzureFabricCreationInput. 1990func (afci AzureFabricCreationInput) AsVMwareV2FabricCreationInput() (*VMwareV2FabricCreationInput, bool) { 1991 return nil, false 1992} 1993 1994// AsFabricSpecificCreationInput is the BasicFabricSpecificCreationInput implementation for AzureFabricCreationInput. 1995func (afci AzureFabricCreationInput) AsFabricSpecificCreationInput() (*FabricSpecificCreationInput, bool) { 1996 return nil, false 1997} 1998 1999// AsBasicFabricSpecificCreationInput is the BasicFabricSpecificCreationInput implementation for AzureFabricCreationInput. 2000func (afci AzureFabricCreationInput) AsBasicFabricSpecificCreationInput() (BasicFabricSpecificCreationInput, bool) { 2001 return &afci, true 2002} 2003 2004// AzureFabricSpecificDetails azure Fabric Specific Details. 2005type AzureFabricSpecificDetails struct { 2006 // Location - The Location for the Azure fabric. 2007 Location *string `json:"location,omitempty"` 2008 // ContainerIds - The container Ids for the Azure fabric. 2009 ContainerIds *[]string `json:"containerIds,omitempty"` 2010 // InstanceType - Possible values include: 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeFabricSpecificDetails', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeAzure', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeHyperVSite', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMM', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMware', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMwareV2' 2011 InstanceType InstanceTypeBasicFabricSpecificDetails `json:"instanceType,omitempty"` 2012} 2013 2014// MarshalJSON is the custom marshaler for AzureFabricSpecificDetails. 2015func (afsd AzureFabricSpecificDetails) MarshalJSON() ([]byte, error) { 2016 afsd.InstanceType = InstanceTypeBasicFabricSpecificDetailsInstanceTypeAzure 2017 objectMap := make(map[string]interface{}) 2018 if afsd.Location != nil { 2019 objectMap["location"] = afsd.Location 2020 } 2021 if afsd.ContainerIds != nil { 2022 objectMap["containerIds"] = afsd.ContainerIds 2023 } 2024 if afsd.InstanceType != "" { 2025 objectMap["instanceType"] = afsd.InstanceType 2026 } 2027 return json.Marshal(objectMap) 2028} 2029 2030// AsAzureFabricSpecificDetails is the BasicFabricSpecificDetails implementation for AzureFabricSpecificDetails. 2031func (afsd AzureFabricSpecificDetails) AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool) { 2032 return &afsd, true 2033} 2034 2035// AsHyperVSiteDetails is the BasicFabricSpecificDetails implementation for AzureFabricSpecificDetails. 2036func (afsd AzureFabricSpecificDetails) AsHyperVSiteDetails() (*HyperVSiteDetails, bool) { 2037 return nil, false 2038} 2039 2040// AsVmmDetails is the BasicFabricSpecificDetails implementation for AzureFabricSpecificDetails. 2041func (afsd AzureFabricSpecificDetails) AsVmmDetails() (*VmmDetails, bool) { 2042 return nil, false 2043} 2044 2045// AsVMwareDetails is the BasicFabricSpecificDetails implementation for AzureFabricSpecificDetails. 2046func (afsd AzureFabricSpecificDetails) AsVMwareDetails() (*VMwareDetails, bool) { 2047 return nil, false 2048} 2049 2050// AsVMwareV2FabricSpecificDetails is the BasicFabricSpecificDetails implementation for AzureFabricSpecificDetails. 2051func (afsd AzureFabricSpecificDetails) AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool) { 2052 return nil, false 2053} 2054 2055// AsFabricSpecificDetails is the BasicFabricSpecificDetails implementation for AzureFabricSpecificDetails. 2056func (afsd AzureFabricSpecificDetails) AsFabricSpecificDetails() (*FabricSpecificDetails, bool) { 2057 return nil, false 2058} 2059 2060// AsBasicFabricSpecificDetails is the BasicFabricSpecificDetails implementation for AzureFabricSpecificDetails. 2061func (afsd AzureFabricSpecificDetails) AsBasicFabricSpecificDetails() (BasicFabricSpecificDetails, bool) { 2062 return &afsd, true 2063} 2064 2065// AzureToAzureCreateNetworkMappingInput create network mappings input properties/behavior specific to 2066// Azure to Azure Network mapping. 2067type AzureToAzureCreateNetworkMappingInput struct { 2068 // PrimaryNetworkID - The primary azure vnet Id. 2069 PrimaryNetworkID *string `json:"primaryNetworkId,omitempty"` 2070 // InstanceType - Possible values include: 'InstanceTypeFabricSpecificCreateNetworkMappingInput', 'InstanceTypeAzureToAzure', 'InstanceTypeVmmToAzure', 'InstanceTypeVmmToVmm' 2071 InstanceType InstanceTypeBasicFabricSpecificCreateNetworkMappingInput `json:"instanceType,omitempty"` 2072} 2073 2074// MarshalJSON is the custom marshaler for AzureToAzureCreateNetworkMappingInput. 2075func (atacnmi AzureToAzureCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { 2076 atacnmi.InstanceType = InstanceTypeAzureToAzure 2077 objectMap := make(map[string]interface{}) 2078 if atacnmi.PrimaryNetworkID != nil { 2079 objectMap["primaryNetworkId"] = atacnmi.PrimaryNetworkID 2080 } 2081 if atacnmi.InstanceType != "" { 2082 objectMap["instanceType"] = atacnmi.InstanceType 2083 } 2084 return json.Marshal(objectMap) 2085} 2086 2087// AsAzureToAzureCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for AzureToAzureCreateNetworkMappingInput. 2088func (atacnmi AzureToAzureCreateNetworkMappingInput) AsAzureToAzureCreateNetworkMappingInput() (*AzureToAzureCreateNetworkMappingInput, bool) { 2089 return &atacnmi, true 2090} 2091 2092// AsVmmToAzureCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for AzureToAzureCreateNetworkMappingInput. 2093func (atacnmi AzureToAzureCreateNetworkMappingInput) AsVmmToAzureCreateNetworkMappingInput() (*VmmToAzureCreateNetworkMappingInput, bool) { 2094 return nil, false 2095} 2096 2097// AsVmmToVmmCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for AzureToAzureCreateNetworkMappingInput. 2098func (atacnmi AzureToAzureCreateNetworkMappingInput) AsVmmToVmmCreateNetworkMappingInput() (*VmmToVmmCreateNetworkMappingInput, bool) { 2099 return nil, false 2100} 2101 2102// AsFabricSpecificCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for AzureToAzureCreateNetworkMappingInput. 2103func (atacnmi AzureToAzureCreateNetworkMappingInput) AsFabricSpecificCreateNetworkMappingInput() (*FabricSpecificCreateNetworkMappingInput, bool) { 2104 return nil, false 2105} 2106 2107// AsBasicFabricSpecificCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for AzureToAzureCreateNetworkMappingInput. 2108func (atacnmi AzureToAzureCreateNetworkMappingInput) AsBasicFabricSpecificCreateNetworkMappingInput() (BasicFabricSpecificCreateNetworkMappingInput, bool) { 2109 return &atacnmi, true 2110} 2111 2112// AzureToAzureNetworkMappingSettings a2A Network Mapping fabric specific settings. 2113type AzureToAzureNetworkMappingSettings struct { 2114 // PrimaryFabricLocation - The primary fabric location. 2115 PrimaryFabricLocation *string `json:"primaryFabricLocation,omitempty"` 2116 // RecoveryFabricLocation - The recovery fabric location. 2117 RecoveryFabricLocation *string `json:"recoveryFabricLocation,omitempty"` 2118 // InstanceType - Possible values include: 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeNetworkMappingFabricSpecificSettings', 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeAzureToAzure', 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToAzure', 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToVmm' 2119 InstanceType InstanceTypeBasicNetworkMappingFabricSpecificSettings `json:"instanceType,omitempty"` 2120} 2121 2122// MarshalJSON is the custom marshaler for AzureToAzureNetworkMappingSettings. 2123func (atanms AzureToAzureNetworkMappingSettings) MarshalJSON() ([]byte, error) { 2124 atanms.InstanceType = InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeAzureToAzure 2125 objectMap := make(map[string]interface{}) 2126 if atanms.PrimaryFabricLocation != nil { 2127 objectMap["primaryFabricLocation"] = atanms.PrimaryFabricLocation 2128 } 2129 if atanms.RecoveryFabricLocation != nil { 2130 objectMap["recoveryFabricLocation"] = atanms.RecoveryFabricLocation 2131 } 2132 if atanms.InstanceType != "" { 2133 objectMap["instanceType"] = atanms.InstanceType 2134 } 2135 return json.Marshal(objectMap) 2136} 2137 2138// AsAzureToAzureNetworkMappingSettings is the BasicNetworkMappingFabricSpecificSettings implementation for AzureToAzureNetworkMappingSettings. 2139func (atanms AzureToAzureNetworkMappingSettings) AsAzureToAzureNetworkMappingSettings() (*AzureToAzureNetworkMappingSettings, bool) { 2140 return &atanms, true 2141} 2142 2143// AsVmmToAzureNetworkMappingSettings is the BasicNetworkMappingFabricSpecificSettings implementation for AzureToAzureNetworkMappingSettings. 2144func (atanms AzureToAzureNetworkMappingSettings) AsVmmToAzureNetworkMappingSettings() (*VmmToAzureNetworkMappingSettings, bool) { 2145 return nil, false 2146} 2147 2148// AsVmmToVmmNetworkMappingSettings is the BasicNetworkMappingFabricSpecificSettings implementation for AzureToAzureNetworkMappingSettings. 2149func (atanms AzureToAzureNetworkMappingSettings) AsVmmToVmmNetworkMappingSettings() (*VmmToVmmNetworkMappingSettings, bool) { 2150 return nil, false 2151} 2152 2153// AsNetworkMappingFabricSpecificSettings is the BasicNetworkMappingFabricSpecificSettings implementation for AzureToAzureNetworkMappingSettings. 2154func (atanms AzureToAzureNetworkMappingSettings) AsNetworkMappingFabricSpecificSettings() (*NetworkMappingFabricSpecificSettings, bool) { 2155 return nil, false 2156} 2157 2158// AsBasicNetworkMappingFabricSpecificSettings is the BasicNetworkMappingFabricSpecificSettings implementation for AzureToAzureNetworkMappingSettings. 2159func (atanms AzureToAzureNetworkMappingSettings) AsBasicNetworkMappingFabricSpecificSettings() (BasicNetworkMappingFabricSpecificSettings, bool) { 2160 return &atanms, true 2161} 2162 2163// AzureToAzureUpdateNetworkMappingInput updates network mappings input. 2164type AzureToAzureUpdateNetworkMappingInput struct { 2165 // PrimaryNetworkID - The primary azure vnet Id. 2166 PrimaryNetworkID *string `json:"primaryNetworkId,omitempty"` 2167 // InstanceType - Possible values include: 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeFabricSpecificUpdateNetworkMappingInput', 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeAzureToAzure', 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToAzure', 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToVmm' 2168 InstanceType InstanceTypeBasicFabricSpecificUpdateNetworkMappingInput `json:"instanceType,omitempty"` 2169} 2170 2171// MarshalJSON is the custom marshaler for AzureToAzureUpdateNetworkMappingInput. 2172func (ataunmi AzureToAzureUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { 2173 ataunmi.InstanceType = InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeAzureToAzure 2174 objectMap := make(map[string]interface{}) 2175 if ataunmi.PrimaryNetworkID != nil { 2176 objectMap["primaryNetworkId"] = ataunmi.PrimaryNetworkID 2177 } 2178 if ataunmi.InstanceType != "" { 2179 objectMap["instanceType"] = ataunmi.InstanceType 2180 } 2181 return json.Marshal(objectMap) 2182} 2183 2184// AsAzureToAzureUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for AzureToAzureUpdateNetworkMappingInput. 2185func (ataunmi AzureToAzureUpdateNetworkMappingInput) AsAzureToAzureUpdateNetworkMappingInput() (*AzureToAzureUpdateNetworkMappingInput, bool) { 2186 return &ataunmi, true 2187} 2188 2189// AsVmmToAzureUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for AzureToAzureUpdateNetworkMappingInput. 2190func (ataunmi AzureToAzureUpdateNetworkMappingInput) AsVmmToAzureUpdateNetworkMappingInput() (*VmmToAzureUpdateNetworkMappingInput, bool) { 2191 return nil, false 2192} 2193 2194// AsVmmToVmmUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for AzureToAzureUpdateNetworkMappingInput. 2195func (ataunmi AzureToAzureUpdateNetworkMappingInput) AsVmmToVmmUpdateNetworkMappingInput() (*VmmToVmmUpdateNetworkMappingInput, bool) { 2196 return nil, false 2197} 2198 2199// AsFabricSpecificUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for AzureToAzureUpdateNetworkMappingInput. 2200func (ataunmi AzureToAzureUpdateNetworkMappingInput) AsFabricSpecificUpdateNetworkMappingInput() (*FabricSpecificUpdateNetworkMappingInput, bool) { 2201 return nil, false 2202} 2203 2204// AsBasicFabricSpecificUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for AzureToAzureUpdateNetworkMappingInput. 2205func (ataunmi AzureToAzureUpdateNetworkMappingInput) AsBasicFabricSpecificUpdateNetworkMappingInput() (BasicFabricSpecificUpdateNetworkMappingInput, bool) { 2206 return &ataunmi, true 2207} 2208 2209// AzureToAzureVMSyncedConfigDetails azure to Azure VM synced configuration details. 2210type AzureToAzureVMSyncedConfigDetails struct { 2211 // Tags - The Azure VM tags. 2212 Tags map[string]*string `json:"tags"` 2213 // RoleAssignments - The Azure role assignments. 2214 RoleAssignments *[]RoleAssignment `json:"roleAssignments,omitempty"` 2215 // InputEndpoints - The Azure VM input endpoints. 2216 InputEndpoints *[]InputEndpoint `json:"inputEndpoints,omitempty"` 2217} 2218 2219// MarshalJSON is the custom marshaler for AzureToAzureVMSyncedConfigDetails. 2220func (atavscd AzureToAzureVMSyncedConfigDetails) MarshalJSON() ([]byte, error) { 2221 objectMap := make(map[string]interface{}) 2222 if atavscd.Tags != nil { 2223 objectMap["tags"] = atavscd.Tags 2224 } 2225 if atavscd.RoleAssignments != nil { 2226 objectMap["roleAssignments"] = atavscd.RoleAssignments 2227 } 2228 if atavscd.InputEndpoints != nil { 2229 objectMap["inputEndpoints"] = atavscd.InputEndpoints 2230 } 2231 return json.Marshal(objectMap) 2232} 2233 2234// AzureVMDiskDetails disk details for E2A provider. 2235type AzureVMDiskDetails struct { 2236 // VhdType - VHD type. 2237 VhdType *string `json:"vhdType,omitempty"` 2238 // VhdID - The VHD id. 2239 VhdID *string `json:"vhdId,omitempty"` 2240 // VhdName - VHD name. 2241 VhdName *string `json:"vhdName,omitempty"` 2242 // MaxSizeMB - Max side in MB. 2243 MaxSizeMB *string `json:"maxSizeMB,omitempty"` 2244 // TargetDiskLocation - Blob uri of the Azure disk. 2245 TargetDiskLocation *string `json:"targetDiskLocation,omitempty"` 2246 // TargetDiskName - The target Azure disk name. 2247 TargetDiskName *string `json:"targetDiskName,omitempty"` 2248 // LunID - Ordinal\LunId of the disk for the Azure VM. 2249 LunID *string `json:"lunId,omitempty"` 2250} 2251 2252// ComputeSizeErrorDetails represents the error used to indicate why the target compute size is not 2253// applicable. 2254type ComputeSizeErrorDetails struct { 2255 // Message - The error message. 2256 Message *string `json:"message,omitempty"` 2257 // Severity - The severity of the error. 2258 Severity *string `json:"severity,omitempty"` 2259} 2260 2261// BasicConfigurationSettings replication provider specific settings. 2262type BasicConfigurationSettings interface { 2263 AsHyperVVirtualMachineDetails() (*HyperVVirtualMachineDetails, bool) 2264 AsReplicationGroupDetails() (*ReplicationGroupDetails, bool) 2265 AsVmmVirtualMachineDetails() (*VmmVirtualMachineDetails, bool) 2266 AsVMwareVirtualMachineDetails() (*VMwareVirtualMachineDetails, bool) 2267 AsConfigurationSettings() (*ConfigurationSettings, bool) 2268} 2269 2270// ConfigurationSettings replication provider specific settings. 2271type ConfigurationSettings struct { 2272 // InstanceType - Possible values include: 'InstanceTypeConfigurationSettings', 'InstanceTypeHyperVVirtualMachine', 'InstanceTypeReplicationGroupDetails', 'InstanceTypeVmmVirtualMachine', 'InstanceTypeVMwareVirtualMachine' 2273 InstanceType InstanceTypeBasicConfigurationSettings `json:"instanceType,omitempty"` 2274} 2275 2276func unmarshalBasicConfigurationSettings(body []byte) (BasicConfigurationSettings, error) { 2277 var m map[string]interface{} 2278 err := json.Unmarshal(body, &m) 2279 if err != nil { 2280 return nil, err 2281 } 2282 2283 switch m["instanceType"] { 2284 case string(InstanceTypeHyperVVirtualMachine): 2285 var hvvmd HyperVVirtualMachineDetails 2286 err := json.Unmarshal(body, &hvvmd) 2287 return hvvmd, err 2288 case string(InstanceTypeReplicationGroupDetails): 2289 var rgd ReplicationGroupDetails 2290 err := json.Unmarshal(body, &rgd) 2291 return rgd, err 2292 case string(InstanceTypeVmmVirtualMachine): 2293 var vvmd VmmVirtualMachineDetails 2294 err := json.Unmarshal(body, &vvmd) 2295 return vvmd, err 2296 case string(InstanceTypeVMwareVirtualMachine): 2297 var vmvmd VMwareVirtualMachineDetails 2298 err := json.Unmarshal(body, &vmvmd) 2299 return vmvmd, err 2300 default: 2301 var cs ConfigurationSettings 2302 err := json.Unmarshal(body, &cs) 2303 return cs, err 2304 } 2305} 2306func unmarshalBasicConfigurationSettingsArray(body []byte) ([]BasicConfigurationSettings, error) { 2307 var rawMessages []*json.RawMessage 2308 err := json.Unmarshal(body, &rawMessages) 2309 if err != nil { 2310 return nil, err 2311 } 2312 2313 csArray := make([]BasicConfigurationSettings, len(rawMessages)) 2314 2315 for index, rawMessage := range rawMessages { 2316 cs, err := unmarshalBasicConfigurationSettings(*rawMessage) 2317 if err != nil { 2318 return nil, err 2319 } 2320 csArray[index] = cs 2321 } 2322 return csArray, nil 2323} 2324 2325// MarshalJSON is the custom marshaler for ConfigurationSettings. 2326func (cs ConfigurationSettings) MarshalJSON() ([]byte, error) { 2327 cs.InstanceType = InstanceTypeConfigurationSettings 2328 objectMap := make(map[string]interface{}) 2329 if cs.InstanceType != "" { 2330 objectMap["instanceType"] = cs.InstanceType 2331 } 2332 return json.Marshal(objectMap) 2333} 2334 2335// AsHyperVVirtualMachineDetails is the BasicConfigurationSettings implementation for ConfigurationSettings. 2336func (cs ConfigurationSettings) AsHyperVVirtualMachineDetails() (*HyperVVirtualMachineDetails, bool) { 2337 return nil, false 2338} 2339 2340// AsReplicationGroupDetails is the BasicConfigurationSettings implementation for ConfigurationSettings. 2341func (cs ConfigurationSettings) AsReplicationGroupDetails() (*ReplicationGroupDetails, bool) { 2342 return nil, false 2343} 2344 2345// AsVmmVirtualMachineDetails is the BasicConfigurationSettings implementation for ConfigurationSettings. 2346func (cs ConfigurationSettings) AsVmmVirtualMachineDetails() (*VmmVirtualMachineDetails, bool) { 2347 return nil, false 2348} 2349 2350// AsVMwareVirtualMachineDetails is the BasicConfigurationSettings implementation for ConfigurationSettings. 2351func (cs ConfigurationSettings) AsVMwareVirtualMachineDetails() (*VMwareVirtualMachineDetails, bool) { 2352 return nil, false 2353} 2354 2355// AsConfigurationSettings is the BasicConfigurationSettings implementation for ConfigurationSettings. 2356func (cs ConfigurationSettings) AsConfigurationSettings() (*ConfigurationSettings, bool) { 2357 return &cs, true 2358} 2359 2360// AsBasicConfigurationSettings is the BasicConfigurationSettings implementation for ConfigurationSettings. 2361func (cs ConfigurationSettings) AsBasicConfigurationSettings() (BasicConfigurationSettings, bool) { 2362 return &cs, true 2363} 2364 2365// ConfigureAlertRequest request to configure alerts for the system. 2366type ConfigureAlertRequest struct { 2367 // Properties - The properties of a configure alert request. 2368 Properties *ConfigureAlertRequestProperties `json:"properties,omitempty"` 2369} 2370 2371// ConfigureAlertRequestProperties properties of a configure alert request. 2372type ConfigureAlertRequestProperties struct { 2373 // SendToOwners - A value indicating whether to send email to subscription administrator. 2374 SendToOwners *string `json:"sendToOwners,omitempty"` 2375 // CustomEmailAddresses - The custom email address for sending emails. 2376 CustomEmailAddresses *[]string `json:"customEmailAddresses,omitempty"` 2377 // Locale - The locale for the email notification. 2378 Locale *string `json:"locale,omitempty"` 2379} 2380 2381// ConsistencyCheckTaskDetails this class contains monitoring details of all the inconsistent Protected 2382// Entities in Vmm. 2383type ConsistencyCheckTaskDetails struct { 2384 // VMDetails - The list of inconsistent Vm details. 2385 VMDetails *[]InconsistentVMDetails `json:"vmDetails,omitempty"` 2386 // InstanceType - Possible values include: 'InstanceTypeTaskTypeDetails', 'InstanceTypeAutomationRunbookTaskDetails', 'InstanceTypeConsistencyCheckTaskDetails', 'InstanceTypeFabricReplicationGroupTaskDetails', 'InstanceTypeJobTaskDetails', 'InstanceTypeManualActionTaskDetails', 'InstanceTypeScriptActionTaskDetails', 'InstanceTypeVirtualMachineTaskDetails', 'InstanceTypeVMNicUpdatesTaskDetails' 2387 InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"` 2388} 2389 2390// MarshalJSON is the custom marshaler for ConsistencyCheckTaskDetails. 2391func (cctd ConsistencyCheckTaskDetails) MarshalJSON() ([]byte, error) { 2392 cctd.InstanceType = InstanceTypeConsistencyCheckTaskDetails 2393 objectMap := make(map[string]interface{}) 2394 if cctd.VMDetails != nil { 2395 objectMap["vmDetails"] = cctd.VMDetails 2396 } 2397 if cctd.InstanceType != "" { 2398 objectMap["instanceType"] = cctd.InstanceType 2399 } 2400 return json.Marshal(objectMap) 2401} 2402 2403// AsAutomationRunbookTaskDetails is the BasicTaskTypeDetails implementation for ConsistencyCheckTaskDetails. 2404func (cctd ConsistencyCheckTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) { 2405 return nil, false 2406} 2407 2408// AsConsistencyCheckTaskDetails is the BasicTaskTypeDetails implementation for ConsistencyCheckTaskDetails. 2409func (cctd ConsistencyCheckTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) { 2410 return &cctd, true 2411} 2412 2413// AsFabricReplicationGroupTaskDetails is the BasicTaskTypeDetails implementation for ConsistencyCheckTaskDetails. 2414func (cctd ConsistencyCheckTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) { 2415 return nil, false 2416} 2417 2418// AsJobTaskDetails is the BasicTaskTypeDetails implementation for ConsistencyCheckTaskDetails. 2419func (cctd ConsistencyCheckTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) { 2420 return nil, false 2421} 2422 2423// AsManualActionTaskDetails is the BasicTaskTypeDetails implementation for ConsistencyCheckTaskDetails. 2424func (cctd ConsistencyCheckTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) { 2425 return nil, false 2426} 2427 2428// AsScriptActionTaskDetails is the BasicTaskTypeDetails implementation for ConsistencyCheckTaskDetails. 2429func (cctd ConsistencyCheckTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) { 2430 return nil, false 2431} 2432 2433// AsVirtualMachineTaskDetails is the BasicTaskTypeDetails implementation for ConsistencyCheckTaskDetails. 2434func (cctd ConsistencyCheckTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) { 2435 return nil, false 2436} 2437 2438// AsVMNicUpdatesTaskDetails is the BasicTaskTypeDetails implementation for ConsistencyCheckTaskDetails. 2439func (cctd ConsistencyCheckTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) { 2440 return nil, false 2441} 2442 2443// AsTaskTypeDetails is the BasicTaskTypeDetails implementation for ConsistencyCheckTaskDetails. 2444func (cctd ConsistencyCheckTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) { 2445 return nil, false 2446} 2447 2448// AsBasicTaskTypeDetails is the BasicTaskTypeDetails implementation for ConsistencyCheckTaskDetails. 2449func (cctd ConsistencyCheckTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) { 2450 return &cctd, true 2451} 2452 2453// CreateNetworkMappingInput create network mappings input. 2454type CreateNetworkMappingInput struct { 2455 // Properties - Input properties for creating network mapping. 2456 Properties *CreateNetworkMappingInputProperties `json:"properties,omitempty"` 2457} 2458 2459// CreateNetworkMappingInputProperties common input details for network mapping operation. 2460type CreateNetworkMappingInputProperties struct { 2461 // RecoveryFabricName - Recovery fabric Name. 2462 RecoveryFabricName *string `json:"recoveryFabricName,omitempty"` 2463 // RecoveryNetworkID - Recovery network Id. 2464 RecoveryNetworkID *string `json:"recoveryNetworkId,omitempty"` 2465 // FabricSpecificDetails - Fabric specific input properties. 2466 FabricSpecificDetails BasicFabricSpecificCreateNetworkMappingInput `json:"fabricSpecificDetails,omitempty"` 2467} 2468 2469// UnmarshalJSON is the custom unmarshaler for CreateNetworkMappingInputProperties struct. 2470func (cnmip *CreateNetworkMappingInputProperties) UnmarshalJSON(body []byte) error { 2471 var m map[string]*json.RawMessage 2472 err := json.Unmarshal(body, &m) 2473 if err != nil { 2474 return err 2475 } 2476 for k, v := range m { 2477 switch k { 2478 case "recoveryFabricName": 2479 if v != nil { 2480 var recoveryFabricName string 2481 err = json.Unmarshal(*v, &recoveryFabricName) 2482 if err != nil { 2483 return err 2484 } 2485 cnmip.RecoveryFabricName = &recoveryFabricName 2486 } 2487 case "recoveryNetworkId": 2488 if v != nil { 2489 var recoveryNetworkID string 2490 err = json.Unmarshal(*v, &recoveryNetworkID) 2491 if err != nil { 2492 return err 2493 } 2494 cnmip.RecoveryNetworkID = &recoveryNetworkID 2495 } 2496 case "fabricSpecificDetails": 2497 if v != nil { 2498 fabricSpecificDetails, err := unmarshalBasicFabricSpecificCreateNetworkMappingInput(*v) 2499 if err != nil { 2500 return err 2501 } 2502 cnmip.FabricSpecificDetails = fabricSpecificDetails 2503 } 2504 } 2505 } 2506 2507 return nil 2508} 2509 2510// CreatePolicyInput protection Policy input. 2511type CreatePolicyInput struct { 2512 // Properties - Policy creation properties. 2513 Properties *CreatePolicyInputProperties `json:"properties,omitempty"` 2514} 2515 2516// CreatePolicyInputProperties policy creation properties. 2517type CreatePolicyInputProperties struct { 2518 // ProviderSpecificInput - The ReplicationProviderSettings. 2519 ProviderSpecificInput BasicPolicyProviderSpecificInput `json:"providerSpecificInput,omitempty"` 2520} 2521 2522// UnmarshalJSON is the custom unmarshaler for CreatePolicyInputProperties struct. 2523func (cpip *CreatePolicyInputProperties) UnmarshalJSON(body []byte) error { 2524 var m map[string]*json.RawMessage 2525 err := json.Unmarshal(body, &m) 2526 if err != nil { 2527 return err 2528 } 2529 for k, v := range m { 2530 switch k { 2531 case "providerSpecificInput": 2532 if v != nil { 2533 providerSpecificInput, err := unmarshalBasicPolicyProviderSpecificInput(*v) 2534 if err != nil { 2535 return err 2536 } 2537 cpip.ProviderSpecificInput = providerSpecificInput 2538 } 2539 } 2540 } 2541 2542 return nil 2543} 2544 2545// CreateProtectionContainerInput create protection container input. 2546type CreateProtectionContainerInput struct { 2547 // Properties - Create protection container input properties. 2548 Properties *CreateProtectionContainerInputProperties `json:"properties,omitempty"` 2549} 2550 2551// CreateProtectionContainerInputProperties create protection container input properties. 2552type CreateProtectionContainerInputProperties struct { 2553 // ProviderSpecificInput - Provider specific inputs for container creation. 2554 ProviderSpecificInput *[]BasicReplicationProviderSpecificContainerCreationInput `json:"providerSpecificInput,omitempty"` 2555} 2556 2557// UnmarshalJSON is the custom unmarshaler for CreateProtectionContainerInputProperties struct. 2558func (cpcip *CreateProtectionContainerInputProperties) UnmarshalJSON(body []byte) error { 2559 var m map[string]*json.RawMessage 2560 err := json.Unmarshal(body, &m) 2561 if err != nil { 2562 return err 2563 } 2564 for k, v := range m { 2565 switch k { 2566 case "providerSpecificInput": 2567 if v != nil { 2568 providerSpecificInput, err := unmarshalBasicReplicationProviderSpecificContainerCreationInputArray(*v) 2569 if err != nil { 2570 return err 2571 } 2572 cpcip.ProviderSpecificInput = &providerSpecificInput 2573 } 2574 } 2575 } 2576 2577 return nil 2578} 2579 2580// CreateProtectionContainerMappingInput configure pairing input. 2581type CreateProtectionContainerMappingInput struct { 2582 // Properties - Configure protection input properties. 2583 Properties *CreateProtectionContainerMappingInputProperties `json:"properties,omitempty"` 2584} 2585 2586// CreateProtectionContainerMappingInputProperties configure pairing input properties. 2587type CreateProtectionContainerMappingInputProperties struct { 2588 // TargetProtectionContainerID - The target unique protection container name. 2589 TargetProtectionContainerID *string `json:"targetProtectionContainerId,omitempty"` 2590 // PolicyID - Applicable policy. 2591 PolicyID *string `json:"policyId,omitempty"` 2592 // ProviderSpecificInput - Provider specific input for pairing. 2593 ProviderSpecificInput BasicReplicationProviderSpecificContainerMappingInput `json:"providerSpecificInput,omitempty"` 2594} 2595 2596// UnmarshalJSON is the custom unmarshaler for CreateProtectionContainerMappingInputProperties struct. 2597func (cpcmip *CreateProtectionContainerMappingInputProperties) UnmarshalJSON(body []byte) error { 2598 var m map[string]*json.RawMessage 2599 err := json.Unmarshal(body, &m) 2600 if err != nil { 2601 return err 2602 } 2603 for k, v := range m { 2604 switch k { 2605 case "targetProtectionContainerId": 2606 if v != nil { 2607 var targetProtectionContainerID string 2608 err = json.Unmarshal(*v, &targetProtectionContainerID) 2609 if err != nil { 2610 return err 2611 } 2612 cpcmip.TargetProtectionContainerID = &targetProtectionContainerID 2613 } 2614 case "policyId": 2615 if v != nil { 2616 var policyID string 2617 err = json.Unmarshal(*v, &policyID) 2618 if err != nil { 2619 return err 2620 } 2621 cpcmip.PolicyID = &policyID 2622 } 2623 case "providerSpecificInput": 2624 if v != nil { 2625 providerSpecificInput, err := unmarshalBasicReplicationProviderSpecificContainerMappingInput(*v) 2626 if err != nil { 2627 return err 2628 } 2629 cpcmip.ProviderSpecificInput = providerSpecificInput 2630 } 2631 } 2632 } 2633 2634 return nil 2635} 2636 2637// CreateRecoveryPlanInput create recovery plan input class. 2638type CreateRecoveryPlanInput struct { 2639 // Properties - Recovery plan creation properties. 2640 Properties *CreateRecoveryPlanInputProperties `json:"properties,omitempty"` 2641} 2642 2643// CreateRecoveryPlanInputProperties recovery plan creation properties. 2644type CreateRecoveryPlanInputProperties struct { 2645 // PrimaryFabricID - The primary fabric Id. 2646 PrimaryFabricID *string `json:"primaryFabricId,omitempty"` 2647 // RecoveryFabricID - The recovery fabric Id. 2648 RecoveryFabricID *string `json:"recoveryFabricId,omitempty"` 2649 // FailoverDeploymentModel - The failover deployment model. Possible values include: 'NotApplicable', 'Classic', 'ResourceManager' 2650 FailoverDeploymentModel FailoverDeploymentModel `json:"failoverDeploymentModel,omitempty"` 2651 // Groups - The recovery plan groups. 2652 Groups *[]RecoveryPlanGroup `json:"groups,omitempty"` 2653} 2654 2655// CurrentJobDetails current job details of the migration item. 2656type CurrentJobDetails struct { 2657 // JobName - The job name. 2658 JobName *string `json:"jobName,omitempty"` 2659 // JobID - The ARM Id of the job being executed. 2660 JobID *string `json:"jobId,omitempty"` 2661 // StartTime - The start time of the job. 2662 StartTime *date.Time `json:"startTime,omitempty"` 2663} 2664 2665// CurrentScenarioDetails current scenario details of the protected entity. 2666type CurrentScenarioDetails struct { 2667 // ScenarioName - Scenario name. 2668 ScenarioName *string `json:"scenarioName,omitempty"` 2669 // JobID - ARM Id of the job being executed. 2670 JobID *string `json:"jobId,omitempty"` 2671 // StartTime - Start time of the workflow. 2672 StartTime *date.Time `json:"startTime,omitempty"` 2673} 2674 2675// DataStore the data store details of the MT. 2676type DataStore struct { 2677 // SymbolicName - The symbolic name of data store. 2678 SymbolicName *string `json:"symbolicName,omitempty"` 2679 // UUID - The uuid of data store. 2680 UUID *string `json:"uuid,omitempty"` 2681 // Capacity - The capacity of data store in GBs. 2682 Capacity *string `json:"capacity,omitempty"` 2683 // FreeSpace - The free space of data store in GBs. 2684 FreeSpace *string `json:"freeSpace,omitempty"` 2685 // Type - The type of data store. 2686 Type *string `json:"type,omitempty"` 2687} 2688 2689// DisableProtectionInput disable protection input. 2690type DisableProtectionInput struct { 2691 // Properties - Disable protection input properties. 2692 Properties *DisableProtectionInputProperties `json:"properties,omitempty"` 2693} 2694 2695// DisableProtectionInputProperties disable protection input properties. 2696type DisableProtectionInputProperties struct { 2697 // DisableProtectionReason - Disable protection reason. It can have values NotSpecified/MigrationComplete. Possible values include: 'NotSpecified', 'MigrationComplete' 2698 DisableProtectionReason DisableProtectionReason `json:"disableProtectionReason,omitempty"` 2699 // ReplicationProviderInput - Replication provider specific input. 2700 ReplicationProviderInput BasicDisableProtectionProviderSpecificInput `json:"replicationProviderInput,omitempty"` 2701} 2702 2703// UnmarshalJSON is the custom unmarshaler for DisableProtectionInputProperties struct. 2704func (dpip *DisableProtectionInputProperties) UnmarshalJSON(body []byte) error { 2705 var m map[string]*json.RawMessage 2706 err := json.Unmarshal(body, &m) 2707 if err != nil { 2708 return err 2709 } 2710 for k, v := range m { 2711 switch k { 2712 case "disableProtectionReason": 2713 if v != nil { 2714 var disableProtectionReason DisableProtectionReason 2715 err = json.Unmarshal(*v, &disableProtectionReason) 2716 if err != nil { 2717 return err 2718 } 2719 dpip.DisableProtectionReason = disableProtectionReason 2720 } 2721 case "replicationProviderInput": 2722 if v != nil { 2723 replicationProviderInput, err := unmarshalBasicDisableProtectionProviderSpecificInput(*v) 2724 if err != nil { 2725 return err 2726 } 2727 dpip.ReplicationProviderInput = replicationProviderInput 2728 } 2729 } 2730 } 2731 2732 return nil 2733} 2734 2735// BasicDisableProtectionProviderSpecificInput disable protection provider specific input. 2736type BasicDisableProtectionProviderSpecificInput interface { 2737 AsInMageDisableProtectionProviderSpecificInput() (*InMageDisableProtectionProviderSpecificInput, bool) 2738 AsDisableProtectionProviderSpecificInput() (*DisableProtectionProviderSpecificInput, bool) 2739} 2740 2741// DisableProtectionProviderSpecificInput disable protection provider specific input. 2742type DisableProtectionProviderSpecificInput struct { 2743 // InstanceType - Possible values include: 'InstanceTypeDisableProtectionProviderSpecificInput', 'InstanceTypeInMage' 2744 InstanceType InstanceTypeBasicDisableProtectionProviderSpecificInput `json:"instanceType,omitempty"` 2745} 2746 2747func unmarshalBasicDisableProtectionProviderSpecificInput(body []byte) (BasicDisableProtectionProviderSpecificInput, error) { 2748 var m map[string]interface{} 2749 err := json.Unmarshal(body, &m) 2750 if err != nil { 2751 return nil, err 2752 } 2753 2754 switch m["instanceType"] { 2755 case string(InstanceTypeInMage): 2756 var imdppsi InMageDisableProtectionProviderSpecificInput 2757 err := json.Unmarshal(body, &imdppsi) 2758 return imdppsi, err 2759 default: 2760 var dppsi DisableProtectionProviderSpecificInput 2761 err := json.Unmarshal(body, &dppsi) 2762 return dppsi, err 2763 } 2764} 2765func unmarshalBasicDisableProtectionProviderSpecificInputArray(body []byte) ([]BasicDisableProtectionProviderSpecificInput, error) { 2766 var rawMessages []*json.RawMessage 2767 err := json.Unmarshal(body, &rawMessages) 2768 if err != nil { 2769 return nil, err 2770 } 2771 2772 dppsiArray := make([]BasicDisableProtectionProviderSpecificInput, len(rawMessages)) 2773 2774 for index, rawMessage := range rawMessages { 2775 dppsi, err := unmarshalBasicDisableProtectionProviderSpecificInput(*rawMessage) 2776 if err != nil { 2777 return nil, err 2778 } 2779 dppsiArray[index] = dppsi 2780 } 2781 return dppsiArray, nil 2782} 2783 2784// MarshalJSON is the custom marshaler for DisableProtectionProviderSpecificInput. 2785func (dppsi DisableProtectionProviderSpecificInput) MarshalJSON() ([]byte, error) { 2786 dppsi.InstanceType = InstanceTypeDisableProtectionProviderSpecificInput 2787 objectMap := make(map[string]interface{}) 2788 if dppsi.InstanceType != "" { 2789 objectMap["instanceType"] = dppsi.InstanceType 2790 } 2791 return json.Marshal(objectMap) 2792} 2793 2794// AsInMageDisableProtectionProviderSpecificInput is the BasicDisableProtectionProviderSpecificInput implementation for DisableProtectionProviderSpecificInput. 2795func (dppsi DisableProtectionProviderSpecificInput) AsInMageDisableProtectionProviderSpecificInput() (*InMageDisableProtectionProviderSpecificInput, bool) { 2796 return nil, false 2797} 2798 2799// AsDisableProtectionProviderSpecificInput is the BasicDisableProtectionProviderSpecificInput implementation for DisableProtectionProviderSpecificInput. 2800func (dppsi DisableProtectionProviderSpecificInput) AsDisableProtectionProviderSpecificInput() (*DisableProtectionProviderSpecificInput, bool) { 2801 return &dppsi, true 2802} 2803 2804// AsBasicDisableProtectionProviderSpecificInput is the BasicDisableProtectionProviderSpecificInput implementation for DisableProtectionProviderSpecificInput. 2805func (dppsi DisableProtectionProviderSpecificInput) AsBasicDisableProtectionProviderSpecificInput() (BasicDisableProtectionProviderSpecificInput, bool) { 2806 return &dppsi, true 2807} 2808 2809// DiscoverProtectableItemRequest request to add a physical machine as a protectable item in a container. 2810type DiscoverProtectableItemRequest struct { 2811 // Properties - The properties of a discover protectable item request. 2812 Properties *DiscoverProtectableItemRequestProperties `json:"properties,omitempty"` 2813} 2814 2815// DiscoverProtectableItemRequestProperties discover protectable item properties. 2816type DiscoverProtectableItemRequestProperties struct { 2817 // FriendlyName - The friendly name of the physical machine. 2818 FriendlyName *string `json:"friendlyName,omitempty"` 2819 // IPAddress - The IP address of the physical machine to be discovered. 2820 IPAddress *string `json:"ipAddress,omitempty"` 2821 // OsType - The OS type on the physical machine. 2822 OsType *string `json:"osType,omitempty"` 2823} 2824 2825// DiskDetails on-prem disk details data. 2826type DiskDetails struct { 2827 // MaxSizeMB - The hard disk max size in MB. 2828 MaxSizeMB *int64 `json:"maxSizeMB,omitempty"` 2829 // VhdType - The type of the volume. 2830 VhdType *string `json:"vhdType,omitempty"` 2831 // VhdID - The VHD Id. 2832 VhdID *string `json:"vhdId,omitempty"` 2833 // VhdName - The VHD name. 2834 VhdName *string `json:"vhdName,omitempty"` 2835} 2836 2837// DiskEncryptionInfo recovery disk encryption info (BEK and KEK). 2838type DiskEncryptionInfo struct { 2839 // DiskEncryptionKeyInfo - The recovery KeyVault reference for secret. 2840 DiskEncryptionKeyInfo *DiskEncryptionKeyInfo `json:"diskEncryptionKeyInfo,omitempty"` 2841 // KeyEncryptionKeyInfo - The recovery KeyVault reference for key. 2842 KeyEncryptionKeyInfo *KeyEncryptionKeyInfo `json:"keyEncryptionKeyInfo,omitempty"` 2843} 2844 2845// DiskEncryptionKeyInfo disk Encryption Key Information (BitLocker Encryption Key (BEK) on Windows). 2846type DiskEncryptionKeyInfo struct { 2847 // SecretIdentifier - The secret url / identifier. 2848 SecretIdentifier *string `json:"secretIdentifier,omitempty"` 2849 // KeyVaultResourceArmID - The KeyVault resource ARM id for secret. 2850 KeyVaultResourceArmID *string `json:"keyVaultResourceArmId,omitempty"` 2851} 2852 2853// DiskVolumeDetails volume details. 2854type DiskVolumeDetails struct { 2855 // Label - The volume label. 2856 Label *string `json:"label,omitempty"` 2857 // Name - The volume name. 2858 Name *string `json:"name,omitempty"` 2859} 2860 2861// Display contains the localized display information for this particular operation / action. These value 2862// will be used by several clients for (1) custom role definitions for RBAC; (2) complex query filters for 2863// the event service; and (3) audit history / records for management operations. 2864type Display struct { 2865 // Provider - The provider. The localized friendly form of the resource provider name – it is expected to also include the publisher/company responsible. It should use Title Casing and begin with "Microsoft" for 1st party services. e.g. "Microsoft Monitoring Insights" or "Microsoft Compute." 2866 Provider *string `json:"provider,omitempty"` 2867 // Resource - The resource. The localized friendly form of the resource related to this action/operation – it should match the public documentation for the resource provider. It should use Title Casing. This value should be unique for a particular URL type (e.g. nested types should *not* reuse their parent’s display.resource field). e.g. "Virtual Machines" or "Scheduler Job Collections", or "Virtual Machine VM Sizes" or "Scheduler Jobs" 2868 Resource *string `json:"resource,omitempty"` 2869 // Operation - The operation. The localized friendly name for the operation, as it should be shown to the user. It should be concise (to fit in drop downs) but clear (i.e. self-documenting). It should use Title Casing. Prescriptive guidance: Read Create or Update Delete 'ActionName' 2870 Operation *string `json:"operation,omitempty"` 2871 // Description - The description. The localized friendly description for the operation, as it should be shown to the user. It should be thorough, yet concise – it will be used in tool tips and detailed views. Prescriptive guidance for namespaces: Read any 'display.provider' resource Create or Update any 'display.provider' resource Delete any 'display.provider' resource Perform any other action on any 'display.provider' resource Prescriptive guidance for namespaces: Read any 'display.resource' Create or Update any 'display.resource' Delete any 'display.resource' 'ActionName' any 'display.resources' 2872 Description *string `json:"description,omitempty"` 2873} 2874 2875// EnableMigrationInput enable migration input. 2876type EnableMigrationInput struct { 2877 // Properties - Enable migration input properties. 2878 Properties *EnableMigrationInputProperties `json:"properties,omitempty"` 2879} 2880 2881// EnableMigrationInputProperties enable migration input properties. 2882type EnableMigrationInputProperties struct { 2883 // PolicyID - The policy Id. 2884 PolicyID *string `json:"policyId,omitempty"` 2885 // ProviderSpecificDetails - The provider specific details. 2886 ProviderSpecificDetails BasicEnableMigrationProviderSpecificInput `json:"providerSpecificDetails,omitempty"` 2887} 2888 2889// UnmarshalJSON is the custom unmarshaler for EnableMigrationInputProperties struct. 2890func (emip *EnableMigrationInputProperties) UnmarshalJSON(body []byte) error { 2891 var m map[string]*json.RawMessage 2892 err := json.Unmarshal(body, &m) 2893 if err != nil { 2894 return err 2895 } 2896 for k, v := range m { 2897 switch k { 2898 case "policyId": 2899 if v != nil { 2900 var policyID string 2901 err = json.Unmarshal(*v, &policyID) 2902 if err != nil { 2903 return err 2904 } 2905 emip.PolicyID = &policyID 2906 } 2907 case "providerSpecificDetails": 2908 if v != nil { 2909 providerSpecificDetails, err := unmarshalBasicEnableMigrationProviderSpecificInput(*v) 2910 if err != nil { 2911 return err 2912 } 2913 emip.ProviderSpecificDetails = providerSpecificDetails 2914 } 2915 } 2916 } 2917 2918 return nil 2919} 2920 2921// BasicEnableMigrationProviderSpecificInput enable migration provider specific input. 2922type BasicEnableMigrationProviderSpecificInput interface { 2923 AsVMwareCbtEnableMigrationInput() (*VMwareCbtEnableMigrationInput, bool) 2924 AsEnableMigrationProviderSpecificInput() (*EnableMigrationProviderSpecificInput, bool) 2925} 2926 2927// EnableMigrationProviderSpecificInput enable migration provider specific input. 2928type EnableMigrationProviderSpecificInput struct { 2929 // InstanceType - Possible values include: 'InstanceTypeEnableMigrationProviderSpecificInput', 'InstanceTypeVMwareCbt' 2930 InstanceType InstanceTypeBasicEnableMigrationProviderSpecificInput `json:"instanceType,omitempty"` 2931} 2932 2933func unmarshalBasicEnableMigrationProviderSpecificInput(body []byte) (BasicEnableMigrationProviderSpecificInput, error) { 2934 var m map[string]interface{} 2935 err := json.Unmarshal(body, &m) 2936 if err != nil { 2937 return nil, err 2938 } 2939 2940 switch m["instanceType"] { 2941 case string(InstanceTypeVMwareCbt): 2942 var vmcemi VMwareCbtEnableMigrationInput 2943 err := json.Unmarshal(body, &vmcemi) 2944 return vmcemi, err 2945 default: 2946 var empsi EnableMigrationProviderSpecificInput 2947 err := json.Unmarshal(body, &empsi) 2948 return empsi, err 2949 } 2950} 2951func unmarshalBasicEnableMigrationProviderSpecificInputArray(body []byte) ([]BasicEnableMigrationProviderSpecificInput, error) { 2952 var rawMessages []*json.RawMessage 2953 err := json.Unmarshal(body, &rawMessages) 2954 if err != nil { 2955 return nil, err 2956 } 2957 2958 empsiArray := make([]BasicEnableMigrationProviderSpecificInput, len(rawMessages)) 2959 2960 for index, rawMessage := range rawMessages { 2961 empsi, err := unmarshalBasicEnableMigrationProviderSpecificInput(*rawMessage) 2962 if err != nil { 2963 return nil, err 2964 } 2965 empsiArray[index] = empsi 2966 } 2967 return empsiArray, nil 2968} 2969 2970// MarshalJSON is the custom marshaler for EnableMigrationProviderSpecificInput. 2971func (empsi EnableMigrationProviderSpecificInput) MarshalJSON() ([]byte, error) { 2972 empsi.InstanceType = InstanceTypeEnableMigrationProviderSpecificInput 2973 objectMap := make(map[string]interface{}) 2974 if empsi.InstanceType != "" { 2975 objectMap["instanceType"] = empsi.InstanceType 2976 } 2977 return json.Marshal(objectMap) 2978} 2979 2980// AsVMwareCbtEnableMigrationInput is the BasicEnableMigrationProviderSpecificInput implementation for EnableMigrationProviderSpecificInput. 2981func (empsi EnableMigrationProviderSpecificInput) AsVMwareCbtEnableMigrationInput() (*VMwareCbtEnableMigrationInput, bool) { 2982 return nil, false 2983} 2984 2985// AsEnableMigrationProviderSpecificInput is the BasicEnableMigrationProviderSpecificInput implementation for EnableMigrationProviderSpecificInput. 2986func (empsi EnableMigrationProviderSpecificInput) AsEnableMigrationProviderSpecificInput() (*EnableMigrationProviderSpecificInput, bool) { 2987 return &empsi, true 2988} 2989 2990// AsBasicEnableMigrationProviderSpecificInput is the BasicEnableMigrationProviderSpecificInput implementation for EnableMigrationProviderSpecificInput. 2991func (empsi EnableMigrationProviderSpecificInput) AsBasicEnableMigrationProviderSpecificInput() (BasicEnableMigrationProviderSpecificInput, bool) { 2992 return &empsi, true 2993} 2994 2995// EnableProtectionInput enable protection input. 2996type EnableProtectionInput struct { 2997 // Properties - Enable protection input properties. 2998 Properties *EnableProtectionInputProperties `json:"properties,omitempty"` 2999} 3000 3001// EnableProtectionInputProperties enable protection input properties. 3002type EnableProtectionInputProperties struct { 3003 // PolicyID - The Policy Id. 3004 PolicyID *string `json:"policyId,omitempty"` 3005 // ProtectableItemID - The protectable item Id. 3006 ProtectableItemID *string `json:"protectableItemId,omitempty"` 3007 // ProviderSpecificDetails - The ReplicationProviderInput. For HyperVReplicaAzure provider, it will be AzureEnableProtectionInput object. For San provider, it will be SanEnableProtectionInput object. For HyperVReplicaAzure provider, it can be null. 3008 ProviderSpecificDetails BasicEnableProtectionProviderSpecificInput `json:"providerSpecificDetails,omitempty"` 3009} 3010 3011// UnmarshalJSON is the custom unmarshaler for EnableProtectionInputProperties struct. 3012func (epip *EnableProtectionInputProperties) UnmarshalJSON(body []byte) error { 3013 var m map[string]*json.RawMessage 3014 err := json.Unmarshal(body, &m) 3015 if err != nil { 3016 return err 3017 } 3018 for k, v := range m { 3019 switch k { 3020 case "policyId": 3021 if v != nil { 3022 var policyID string 3023 err = json.Unmarshal(*v, &policyID) 3024 if err != nil { 3025 return err 3026 } 3027 epip.PolicyID = &policyID 3028 } 3029 case "protectableItemId": 3030 if v != nil { 3031 var protectableItemID string 3032 err = json.Unmarshal(*v, &protectableItemID) 3033 if err != nil { 3034 return err 3035 } 3036 epip.ProtectableItemID = &protectableItemID 3037 } 3038 case "providerSpecificDetails": 3039 if v != nil { 3040 providerSpecificDetails, err := unmarshalBasicEnableProtectionProviderSpecificInput(*v) 3041 if err != nil { 3042 return err 3043 } 3044 epip.ProviderSpecificDetails = providerSpecificDetails 3045 } 3046 } 3047 } 3048 3049 return nil 3050} 3051 3052// BasicEnableProtectionProviderSpecificInput enable protection provider specific input. 3053type BasicEnableProtectionProviderSpecificInput interface { 3054 AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool) 3055 AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool) 3056 AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool) 3057 AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool) 3058 AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool) 3059 AsEnableProtectionProviderSpecificInput() (*EnableProtectionProviderSpecificInput, bool) 3060} 3061 3062// EnableProtectionProviderSpecificInput enable protection provider specific input. 3063type EnableProtectionProviderSpecificInput struct { 3064 // InstanceType - Possible values include: 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeEnableProtectionProviderSpecificInput', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeSan' 3065 InstanceType InstanceTypeBasicEnableProtectionProviderSpecificInput `json:"instanceType,omitempty"` 3066} 3067 3068func unmarshalBasicEnableProtectionProviderSpecificInput(body []byte) (BasicEnableProtectionProviderSpecificInput, error) { 3069 var m map[string]interface{} 3070 err := json.Unmarshal(body, &m) 3071 if err != nil { 3072 return nil, err 3073 } 3074 3075 switch m["instanceType"] { 3076 case string(InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeA2A): 3077 var aepi A2AEnableProtectionInput 3078 err := json.Unmarshal(body, &aepi) 3079 return aepi, err 3080 case string(InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeHyperVReplicaAzure): 3081 var hvraepi HyperVReplicaAzureEnableProtectionInput 3082 err := json.Unmarshal(body, &hvraepi) 3083 return hvraepi, err 3084 case string(InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMageAzureV2): 3085 var imavepi InMageAzureV2EnableProtectionInput 3086 err := json.Unmarshal(body, &imavepi) 3087 return imavepi, err 3088 case string(InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMage): 3089 var imepi InMageEnableProtectionInput 3090 err := json.Unmarshal(body, &imepi) 3091 return imepi, err 3092 case string(InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeSan): 3093 var sepi SanEnableProtectionInput 3094 err := json.Unmarshal(body, &sepi) 3095 return sepi, err 3096 default: 3097 var eppsi EnableProtectionProviderSpecificInput 3098 err := json.Unmarshal(body, &eppsi) 3099 return eppsi, err 3100 } 3101} 3102func unmarshalBasicEnableProtectionProviderSpecificInputArray(body []byte) ([]BasicEnableProtectionProviderSpecificInput, error) { 3103 var rawMessages []*json.RawMessage 3104 err := json.Unmarshal(body, &rawMessages) 3105 if err != nil { 3106 return nil, err 3107 } 3108 3109 eppsiArray := make([]BasicEnableProtectionProviderSpecificInput, len(rawMessages)) 3110 3111 for index, rawMessage := range rawMessages { 3112 eppsi, err := unmarshalBasicEnableProtectionProviderSpecificInput(*rawMessage) 3113 if err != nil { 3114 return nil, err 3115 } 3116 eppsiArray[index] = eppsi 3117 } 3118 return eppsiArray, nil 3119} 3120 3121// MarshalJSON is the custom marshaler for EnableProtectionProviderSpecificInput. 3122func (eppsi EnableProtectionProviderSpecificInput) MarshalJSON() ([]byte, error) { 3123 eppsi.InstanceType = InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeEnableProtectionProviderSpecificInput 3124 objectMap := make(map[string]interface{}) 3125 if eppsi.InstanceType != "" { 3126 objectMap["instanceType"] = eppsi.InstanceType 3127 } 3128 return json.Marshal(objectMap) 3129} 3130 3131// AsA2AEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for EnableProtectionProviderSpecificInput. 3132func (eppsi EnableProtectionProviderSpecificInput) AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool) { 3133 return nil, false 3134} 3135 3136// AsHyperVReplicaAzureEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for EnableProtectionProviderSpecificInput. 3137func (eppsi EnableProtectionProviderSpecificInput) AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool) { 3138 return nil, false 3139} 3140 3141// AsInMageAzureV2EnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for EnableProtectionProviderSpecificInput. 3142func (eppsi EnableProtectionProviderSpecificInput) AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool) { 3143 return nil, false 3144} 3145 3146// AsInMageEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for EnableProtectionProviderSpecificInput. 3147func (eppsi EnableProtectionProviderSpecificInput) AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool) { 3148 return nil, false 3149} 3150 3151// AsSanEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for EnableProtectionProviderSpecificInput. 3152func (eppsi EnableProtectionProviderSpecificInput) AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool) { 3153 return nil, false 3154} 3155 3156// AsEnableProtectionProviderSpecificInput is the BasicEnableProtectionProviderSpecificInput implementation for EnableProtectionProviderSpecificInput. 3157func (eppsi EnableProtectionProviderSpecificInput) AsEnableProtectionProviderSpecificInput() (*EnableProtectionProviderSpecificInput, bool) { 3158 return &eppsi, true 3159} 3160 3161// AsBasicEnableProtectionProviderSpecificInput is the BasicEnableProtectionProviderSpecificInput implementation for EnableProtectionProviderSpecificInput. 3162func (eppsi EnableProtectionProviderSpecificInput) AsBasicEnableProtectionProviderSpecificInput() (BasicEnableProtectionProviderSpecificInput, bool) { 3163 return &eppsi, true 3164} 3165 3166// EncryptionDetails encryption details for the fabric. 3167type EncryptionDetails struct { 3168 // KekState - The key encryption key state for the Vmm. 3169 KekState *string `json:"kekState,omitempty"` 3170 // KekCertThumbprint - The key encryption key certificate thumbprint. 3171 KekCertThumbprint *string `json:"kekCertThumbprint,omitempty"` 3172 // KekCertExpiryDate - The key encryption key certificate expiry date. 3173 KekCertExpiryDate *date.Time `json:"kekCertExpiryDate,omitempty"` 3174} 3175 3176// Event implements the Event class. 3177type Event struct { 3178 autorest.Response `json:"-"` 3179 // Properties - Event related data. 3180 Properties *EventProperties `json:"properties,omitempty"` 3181 // ID - READ-ONLY; Resource Id 3182 ID *string `json:"id,omitempty"` 3183 // Name - READ-ONLY; Resource Name 3184 Name *string `json:"name,omitempty"` 3185 // Type - READ-ONLY; Resource Type 3186 Type *string `json:"type,omitempty"` 3187 // Location - Resource Location 3188 Location *string `json:"location,omitempty"` 3189} 3190 3191// MarshalJSON is the custom marshaler for Event. 3192func (e Event) MarshalJSON() ([]byte, error) { 3193 objectMap := make(map[string]interface{}) 3194 if e.Properties != nil { 3195 objectMap["properties"] = e.Properties 3196 } 3197 if e.Location != nil { 3198 objectMap["location"] = e.Location 3199 } 3200 return json.Marshal(objectMap) 3201} 3202 3203// EventCollection collection of fabric details. 3204type EventCollection struct { 3205 autorest.Response `json:"-"` 3206 // Value - The list of events. 3207 Value *[]Event `json:"value,omitempty"` 3208 // NextLink - The value of next link. 3209 NextLink *string `json:"nextLink,omitempty"` 3210} 3211 3212// EventCollectionIterator provides access to a complete listing of Event values. 3213type EventCollectionIterator struct { 3214 i int 3215 page EventCollectionPage 3216} 3217 3218// NextWithContext advances to the next value. If there was an error making 3219// the request the iterator does not advance and the error is returned. 3220func (iter *EventCollectionIterator) NextWithContext(ctx context.Context) (err error) { 3221 if tracing.IsEnabled() { 3222 ctx = tracing.StartSpan(ctx, fqdn+"/EventCollectionIterator.NextWithContext") 3223 defer func() { 3224 sc := -1 3225 if iter.Response().Response.Response != nil { 3226 sc = iter.Response().Response.Response.StatusCode 3227 } 3228 tracing.EndSpan(ctx, sc, err) 3229 }() 3230 } 3231 iter.i++ 3232 if iter.i < len(iter.page.Values()) { 3233 return nil 3234 } 3235 err = iter.page.NextWithContext(ctx) 3236 if err != nil { 3237 iter.i-- 3238 return err 3239 } 3240 iter.i = 0 3241 return nil 3242} 3243 3244// Next advances to the next value. If there was an error making 3245// the request the iterator does not advance and the error is returned. 3246// Deprecated: Use NextWithContext() instead. 3247func (iter *EventCollectionIterator) Next() error { 3248 return iter.NextWithContext(context.Background()) 3249} 3250 3251// NotDone returns true if the enumeration should be started or is not yet complete. 3252func (iter EventCollectionIterator) NotDone() bool { 3253 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 3254} 3255 3256// Response returns the raw server response from the last page request. 3257func (iter EventCollectionIterator) Response() EventCollection { 3258 return iter.page.Response() 3259} 3260 3261// Value returns the current value or a zero-initialized value if the 3262// iterator has advanced beyond the end of the collection. 3263func (iter EventCollectionIterator) Value() Event { 3264 if !iter.page.NotDone() { 3265 return Event{} 3266 } 3267 return iter.page.Values()[iter.i] 3268} 3269 3270// Creates a new instance of the EventCollectionIterator type. 3271func NewEventCollectionIterator(page EventCollectionPage) EventCollectionIterator { 3272 return EventCollectionIterator{page: page} 3273} 3274 3275// IsEmpty returns true if the ListResult contains no values. 3276func (ec EventCollection) IsEmpty() bool { 3277 return ec.Value == nil || len(*ec.Value) == 0 3278} 3279 3280// hasNextLink returns true if the NextLink is not empty. 3281func (ec EventCollection) hasNextLink() bool { 3282 return ec.NextLink != nil && len(*ec.NextLink) != 0 3283} 3284 3285// eventCollectionPreparer prepares a request to retrieve the next set of results. 3286// It returns nil if no more results exist. 3287func (ec EventCollection) eventCollectionPreparer(ctx context.Context) (*http.Request, error) { 3288 if !ec.hasNextLink() { 3289 return nil, nil 3290 } 3291 return autorest.Prepare((&http.Request{}).WithContext(ctx), 3292 autorest.AsJSON(), 3293 autorest.AsGet(), 3294 autorest.WithBaseURL(to.String(ec.NextLink))) 3295} 3296 3297// EventCollectionPage contains a page of Event values. 3298type EventCollectionPage struct { 3299 fn func(context.Context, EventCollection) (EventCollection, error) 3300 ec EventCollection 3301} 3302 3303// NextWithContext advances to the next page of values. If there was an error making 3304// the request the page does not advance and the error is returned. 3305func (page *EventCollectionPage) NextWithContext(ctx context.Context) (err error) { 3306 if tracing.IsEnabled() { 3307 ctx = tracing.StartSpan(ctx, fqdn+"/EventCollectionPage.NextWithContext") 3308 defer func() { 3309 sc := -1 3310 if page.Response().Response.Response != nil { 3311 sc = page.Response().Response.Response.StatusCode 3312 } 3313 tracing.EndSpan(ctx, sc, err) 3314 }() 3315 } 3316 for { 3317 next, err := page.fn(ctx, page.ec) 3318 if err != nil { 3319 return err 3320 } 3321 page.ec = next 3322 if !next.hasNextLink() || !next.IsEmpty() { 3323 break 3324 } 3325 } 3326 return nil 3327} 3328 3329// Next advances to the next page of values. If there was an error making 3330// the request the page does not advance and the error is returned. 3331// Deprecated: Use NextWithContext() instead. 3332func (page *EventCollectionPage) Next() error { 3333 return page.NextWithContext(context.Background()) 3334} 3335 3336// NotDone returns true if the page enumeration should be started or is not yet complete. 3337func (page EventCollectionPage) NotDone() bool { 3338 return !page.ec.IsEmpty() 3339} 3340 3341// Response returns the raw server response from the last page request. 3342func (page EventCollectionPage) Response() EventCollection { 3343 return page.ec 3344} 3345 3346// Values returns the slice of values for the current page or nil if there are no values. 3347func (page EventCollectionPage) Values() []Event { 3348 if page.ec.IsEmpty() { 3349 return nil 3350 } 3351 return *page.ec.Value 3352} 3353 3354// Creates a new instance of the EventCollectionPage type. 3355func NewEventCollectionPage(cur EventCollection, getNextPage func(context.Context, EventCollection) (EventCollection, error)) EventCollectionPage { 3356 return EventCollectionPage{ 3357 fn: getNextPage, 3358 ec: cur, 3359 } 3360} 3361 3362// EventProperties the properties of a monitoring event. 3363type EventProperties struct { 3364 // EventCode - The Id of the monitoring event. 3365 EventCode *string `json:"eventCode,omitempty"` 3366 // Description - The event name. 3367 Description *string `json:"description,omitempty"` 3368 // EventType - The type of the event. for example: VM Health, Server Health, Job Failure etc. 3369 EventType *string `json:"eventType,omitempty"` 3370 // AffectedObjectFriendlyName - The friendly name of the source of the event on which it is raised (for example, VM, VMM etc). 3371 AffectedObjectFriendlyName *string `json:"affectedObjectFriendlyName,omitempty"` 3372 // AffectedObjectCorrelationID - READ-ONLY; The affected object correlationId for the event. 3373 AffectedObjectCorrelationID *string `json:"affectedObjectCorrelationId,omitempty"` 3374 // Severity - The severity of the event. 3375 Severity *string `json:"severity,omitempty"` 3376 // TimeOfOccurrence - The time of occurrence of the event. 3377 TimeOfOccurrence *date.Time `json:"timeOfOccurrence,omitempty"` 3378 // FabricID - The ARM ID of the fabric. 3379 FabricID *string `json:"fabricId,omitempty"` 3380 // ProviderSpecificDetails - The provider specific settings. 3381 ProviderSpecificDetails BasicEventProviderSpecificDetails `json:"providerSpecificDetails,omitempty"` 3382 // EventSpecificDetails - The event specific settings. 3383 EventSpecificDetails BasicEventSpecificDetails `json:"eventSpecificDetails,omitempty"` 3384 // HealthErrors - The list of errors / warnings capturing details associated with the issue(s). 3385 HealthErrors *[]HealthError `json:"healthErrors,omitempty"` 3386} 3387 3388// MarshalJSON is the custom marshaler for EventProperties. 3389func (ep EventProperties) MarshalJSON() ([]byte, error) { 3390 objectMap := make(map[string]interface{}) 3391 if ep.EventCode != nil { 3392 objectMap["eventCode"] = ep.EventCode 3393 } 3394 if ep.Description != nil { 3395 objectMap["description"] = ep.Description 3396 } 3397 if ep.EventType != nil { 3398 objectMap["eventType"] = ep.EventType 3399 } 3400 if ep.AffectedObjectFriendlyName != nil { 3401 objectMap["affectedObjectFriendlyName"] = ep.AffectedObjectFriendlyName 3402 } 3403 if ep.Severity != nil { 3404 objectMap["severity"] = ep.Severity 3405 } 3406 if ep.TimeOfOccurrence != nil { 3407 objectMap["timeOfOccurrence"] = ep.TimeOfOccurrence 3408 } 3409 if ep.FabricID != nil { 3410 objectMap["fabricId"] = ep.FabricID 3411 } 3412 objectMap["providerSpecificDetails"] = ep.ProviderSpecificDetails 3413 objectMap["eventSpecificDetails"] = ep.EventSpecificDetails 3414 if ep.HealthErrors != nil { 3415 objectMap["healthErrors"] = ep.HealthErrors 3416 } 3417 return json.Marshal(objectMap) 3418} 3419 3420// UnmarshalJSON is the custom unmarshaler for EventProperties struct. 3421func (ep *EventProperties) UnmarshalJSON(body []byte) error { 3422 var m map[string]*json.RawMessage 3423 err := json.Unmarshal(body, &m) 3424 if err != nil { 3425 return err 3426 } 3427 for k, v := range m { 3428 switch k { 3429 case "eventCode": 3430 if v != nil { 3431 var eventCode string 3432 err = json.Unmarshal(*v, &eventCode) 3433 if err != nil { 3434 return err 3435 } 3436 ep.EventCode = &eventCode 3437 } 3438 case "description": 3439 if v != nil { 3440 var description string 3441 err = json.Unmarshal(*v, &description) 3442 if err != nil { 3443 return err 3444 } 3445 ep.Description = &description 3446 } 3447 case "eventType": 3448 if v != nil { 3449 var eventType string 3450 err = json.Unmarshal(*v, &eventType) 3451 if err != nil { 3452 return err 3453 } 3454 ep.EventType = &eventType 3455 } 3456 case "affectedObjectFriendlyName": 3457 if v != nil { 3458 var affectedObjectFriendlyName string 3459 err = json.Unmarshal(*v, &affectedObjectFriendlyName) 3460 if err != nil { 3461 return err 3462 } 3463 ep.AffectedObjectFriendlyName = &affectedObjectFriendlyName 3464 } 3465 case "affectedObjectCorrelationId": 3466 if v != nil { 3467 var affectedObjectCorrelationID string 3468 err = json.Unmarshal(*v, &affectedObjectCorrelationID) 3469 if err != nil { 3470 return err 3471 } 3472 ep.AffectedObjectCorrelationID = &affectedObjectCorrelationID 3473 } 3474 case "severity": 3475 if v != nil { 3476 var severity string 3477 err = json.Unmarshal(*v, &severity) 3478 if err != nil { 3479 return err 3480 } 3481 ep.Severity = &severity 3482 } 3483 case "timeOfOccurrence": 3484 if v != nil { 3485 var timeOfOccurrence date.Time 3486 err = json.Unmarshal(*v, &timeOfOccurrence) 3487 if err != nil { 3488 return err 3489 } 3490 ep.TimeOfOccurrence = &timeOfOccurrence 3491 } 3492 case "fabricId": 3493 if v != nil { 3494 var fabricID string 3495 err = json.Unmarshal(*v, &fabricID) 3496 if err != nil { 3497 return err 3498 } 3499 ep.FabricID = &fabricID 3500 } 3501 case "providerSpecificDetails": 3502 if v != nil { 3503 providerSpecificDetails, err := unmarshalBasicEventProviderSpecificDetails(*v) 3504 if err != nil { 3505 return err 3506 } 3507 ep.ProviderSpecificDetails = providerSpecificDetails 3508 } 3509 case "eventSpecificDetails": 3510 if v != nil { 3511 eventSpecificDetails, err := unmarshalBasicEventSpecificDetails(*v) 3512 if err != nil { 3513 return err 3514 } 3515 ep.EventSpecificDetails = eventSpecificDetails 3516 } 3517 case "healthErrors": 3518 if v != nil { 3519 var healthErrors []HealthError 3520 err = json.Unmarshal(*v, &healthErrors) 3521 if err != nil { 3522 return err 3523 } 3524 ep.HealthErrors = &healthErrors 3525 } 3526 } 3527 } 3528 3529 return nil 3530} 3531 3532// BasicEventProviderSpecificDetails model class for provider specific details for an event. 3533type BasicEventProviderSpecificDetails interface { 3534 AsA2AEventDetails() (*A2AEventDetails, bool) 3535 AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) 3536 AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) 3537 AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) 3538 AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) 3539 AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) 3540 AsVMwareCbtEventDetails() (*VMwareCbtEventDetails, bool) 3541 AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) 3542} 3543 3544// EventProviderSpecificDetails model class for provider specific details for an event. 3545type EventProviderSpecificDetails struct { 3546 // InstanceType - Possible values include: 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeEventProviderSpecificDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaBaseEventDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeVMwareCbt' 3547 InstanceType InstanceTypeBasicEventProviderSpecificDetails `json:"instanceType,omitempty"` 3548} 3549 3550func unmarshalBasicEventProviderSpecificDetails(body []byte) (BasicEventProviderSpecificDetails, error) { 3551 var m map[string]interface{} 3552 err := json.Unmarshal(body, &m) 3553 if err != nil { 3554 return nil, err 3555 } 3556 3557 switch m["instanceType"] { 3558 case string(InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeA2A): 3559 var aed A2AEventDetails 3560 err := json.Unmarshal(body, &aed) 3561 return aed, err 3562 case string(InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012): 3563 var hvr2ed HyperVReplica2012EventDetails 3564 err := json.Unmarshal(body, &hvr2ed) 3565 return hvr2ed, err 3566 case string(InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012R2): 3567 var hvr2ed HyperVReplica2012R2EventDetails 3568 err := json.Unmarshal(body, &hvr2ed) 3569 return hvr2ed, err 3570 case string(InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaAzure): 3571 var hvraed HyperVReplicaAzureEventDetails 3572 err := json.Unmarshal(body, &hvraed) 3573 return hvraed, err 3574 case string(InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaBaseEventDetails): 3575 var hvrbed HyperVReplicaBaseEventDetails 3576 err := json.Unmarshal(body, &hvrbed) 3577 return hvrbed, err 3578 case string(InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageAzureV2): 3579 var imaved InMageAzureV2EventDetails 3580 err := json.Unmarshal(body, &imaved) 3581 return imaved, err 3582 case string(InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeVMwareCbt): 3583 var vmced VMwareCbtEventDetails 3584 err := json.Unmarshal(body, &vmced) 3585 return vmced, err 3586 default: 3587 var epsd EventProviderSpecificDetails 3588 err := json.Unmarshal(body, &epsd) 3589 return epsd, err 3590 } 3591} 3592func unmarshalBasicEventProviderSpecificDetailsArray(body []byte) ([]BasicEventProviderSpecificDetails, error) { 3593 var rawMessages []*json.RawMessage 3594 err := json.Unmarshal(body, &rawMessages) 3595 if err != nil { 3596 return nil, err 3597 } 3598 3599 epsdArray := make([]BasicEventProviderSpecificDetails, len(rawMessages)) 3600 3601 for index, rawMessage := range rawMessages { 3602 epsd, err := unmarshalBasicEventProviderSpecificDetails(*rawMessage) 3603 if err != nil { 3604 return nil, err 3605 } 3606 epsdArray[index] = epsd 3607 } 3608 return epsdArray, nil 3609} 3610 3611// MarshalJSON is the custom marshaler for EventProviderSpecificDetails. 3612func (epsd EventProviderSpecificDetails) MarshalJSON() ([]byte, error) { 3613 epsd.InstanceType = InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeEventProviderSpecificDetails 3614 objectMap := make(map[string]interface{}) 3615 if epsd.InstanceType != "" { 3616 objectMap["instanceType"] = epsd.InstanceType 3617 } 3618 return json.Marshal(objectMap) 3619} 3620 3621// AsA2AEventDetails is the BasicEventProviderSpecificDetails implementation for EventProviderSpecificDetails. 3622func (epsd EventProviderSpecificDetails) AsA2AEventDetails() (*A2AEventDetails, bool) { 3623 return nil, false 3624} 3625 3626// AsHyperVReplica2012EventDetails is the BasicEventProviderSpecificDetails implementation for EventProviderSpecificDetails. 3627func (epsd EventProviderSpecificDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) { 3628 return nil, false 3629} 3630 3631// AsHyperVReplica2012R2EventDetails is the BasicEventProviderSpecificDetails implementation for EventProviderSpecificDetails. 3632func (epsd EventProviderSpecificDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) { 3633 return nil, false 3634} 3635 3636// AsHyperVReplicaAzureEventDetails is the BasicEventProviderSpecificDetails implementation for EventProviderSpecificDetails. 3637func (epsd EventProviderSpecificDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) { 3638 return nil, false 3639} 3640 3641// AsHyperVReplicaBaseEventDetails is the BasicEventProviderSpecificDetails implementation for EventProviderSpecificDetails. 3642func (epsd EventProviderSpecificDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) { 3643 return nil, false 3644} 3645 3646// AsInMageAzureV2EventDetails is the BasicEventProviderSpecificDetails implementation for EventProviderSpecificDetails. 3647func (epsd EventProviderSpecificDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) { 3648 return nil, false 3649} 3650 3651// AsVMwareCbtEventDetails is the BasicEventProviderSpecificDetails implementation for EventProviderSpecificDetails. 3652func (epsd EventProviderSpecificDetails) AsVMwareCbtEventDetails() (*VMwareCbtEventDetails, bool) { 3653 return nil, false 3654} 3655 3656// AsEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for EventProviderSpecificDetails. 3657func (epsd EventProviderSpecificDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) { 3658 return &epsd, true 3659} 3660 3661// AsBasicEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for EventProviderSpecificDetails. 3662func (epsd EventProviderSpecificDetails) AsBasicEventProviderSpecificDetails() (BasicEventProviderSpecificDetails, bool) { 3663 return &epsd, true 3664} 3665 3666// EventQueryParameter implements the event query parameter. 3667type EventQueryParameter struct { 3668 // EventCode - The source id of the events to be queried. 3669 EventCode *string `json:"eventCode,omitempty"` 3670 // Severity - The severity of the events to be queried. 3671 Severity *string `json:"severity,omitempty"` 3672 // EventType - The type of the events to be queried. 3673 EventType *string `json:"eventType,omitempty"` 3674 // FabricName - The affected object server id of the events to be queried. 3675 FabricName *string `json:"fabricName,omitempty"` 3676 // AffectedObjectFriendlyName - The affected object name of the events to be queried. 3677 AffectedObjectFriendlyName *string `json:"affectedObjectFriendlyName,omitempty"` 3678 // AffectedObjectCorrelationID - READ-ONLY; The affected object correlationId for the events to be queried. 3679 AffectedObjectCorrelationID *string `json:"affectedObjectCorrelationId,omitempty"` 3680 // StartTime - The start time of the time range within which the events are to be queried. 3681 StartTime *date.Time `json:"startTime,omitempty"` 3682 // EndTime - The end time of the time range within which the events are to be queried. 3683 EndTime *date.Time `json:"endTime,omitempty"` 3684} 3685 3686// MarshalJSON is the custom marshaler for EventQueryParameter. 3687func (eqp EventQueryParameter) MarshalJSON() ([]byte, error) { 3688 objectMap := make(map[string]interface{}) 3689 if eqp.EventCode != nil { 3690 objectMap["eventCode"] = eqp.EventCode 3691 } 3692 if eqp.Severity != nil { 3693 objectMap["severity"] = eqp.Severity 3694 } 3695 if eqp.EventType != nil { 3696 objectMap["eventType"] = eqp.EventType 3697 } 3698 if eqp.FabricName != nil { 3699 objectMap["fabricName"] = eqp.FabricName 3700 } 3701 if eqp.AffectedObjectFriendlyName != nil { 3702 objectMap["affectedObjectFriendlyName"] = eqp.AffectedObjectFriendlyName 3703 } 3704 if eqp.StartTime != nil { 3705 objectMap["startTime"] = eqp.StartTime 3706 } 3707 if eqp.EndTime != nil { 3708 objectMap["endTime"] = eqp.EndTime 3709 } 3710 return json.Marshal(objectMap) 3711} 3712 3713// BasicEventSpecificDetails model class for event specific details for an event. 3714type BasicEventSpecificDetails interface { 3715 AsJobStatusEventDetails() (*JobStatusEventDetails, bool) 3716 AsEventSpecificDetails() (*EventSpecificDetails, bool) 3717} 3718 3719// EventSpecificDetails model class for event specific details for an event. 3720type EventSpecificDetails struct { 3721 // InstanceType - Possible values include: 'InstanceTypeEventSpecificDetails', 'InstanceTypeJobStatus' 3722 InstanceType InstanceTypeBasicEventSpecificDetails `json:"instanceType,omitempty"` 3723} 3724 3725func unmarshalBasicEventSpecificDetails(body []byte) (BasicEventSpecificDetails, error) { 3726 var m map[string]interface{} 3727 err := json.Unmarshal(body, &m) 3728 if err != nil { 3729 return nil, err 3730 } 3731 3732 switch m["instanceType"] { 3733 case string(InstanceTypeJobStatus): 3734 var jsed JobStatusEventDetails 3735 err := json.Unmarshal(body, &jsed) 3736 return jsed, err 3737 default: 3738 var esd EventSpecificDetails 3739 err := json.Unmarshal(body, &esd) 3740 return esd, err 3741 } 3742} 3743func unmarshalBasicEventSpecificDetailsArray(body []byte) ([]BasicEventSpecificDetails, error) { 3744 var rawMessages []*json.RawMessage 3745 err := json.Unmarshal(body, &rawMessages) 3746 if err != nil { 3747 return nil, err 3748 } 3749 3750 esdArray := make([]BasicEventSpecificDetails, len(rawMessages)) 3751 3752 for index, rawMessage := range rawMessages { 3753 esd, err := unmarshalBasicEventSpecificDetails(*rawMessage) 3754 if err != nil { 3755 return nil, err 3756 } 3757 esdArray[index] = esd 3758 } 3759 return esdArray, nil 3760} 3761 3762// MarshalJSON is the custom marshaler for EventSpecificDetails. 3763func (esd EventSpecificDetails) MarshalJSON() ([]byte, error) { 3764 esd.InstanceType = InstanceTypeEventSpecificDetails 3765 objectMap := make(map[string]interface{}) 3766 if esd.InstanceType != "" { 3767 objectMap["instanceType"] = esd.InstanceType 3768 } 3769 return json.Marshal(objectMap) 3770} 3771 3772// AsJobStatusEventDetails is the BasicEventSpecificDetails implementation for EventSpecificDetails. 3773func (esd EventSpecificDetails) AsJobStatusEventDetails() (*JobStatusEventDetails, bool) { 3774 return nil, false 3775} 3776 3777// AsEventSpecificDetails is the BasicEventSpecificDetails implementation for EventSpecificDetails. 3778func (esd EventSpecificDetails) AsEventSpecificDetails() (*EventSpecificDetails, bool) { 3779 return &esd, true 3780} 3781 3782// AsBasicEventSpecificDetails is the BasicEventSpecificDetails implementation for EventSpecificDetails. 3783func (esd EventSpecificDetails) AsBasicEventSpecificDetails() (BasicEventSpecificDetails, bool) { 3784 return &esd, true 3785} 3786 3787// ExportJobDetails this class represents details for export jobs workflow. 3788type ExportJobDetails struct { 3789 // BlobURI - BlobUri of the exported jobs. 3790 BlobURI *string `json:"blobUri,omitempty"` 3791 // SasToken - The sas token to access blob. 3792 SasToken *string `json:"sasToken,omitempty"` 3793 // AffectedObjectDetails - The affected object properties like source server, source cloud, target server, target cloud etc. based on the workflow object details. 3794 AffectedObjectDetails map[string]*string `json:"affectedObjectDetails"` 3795 // InstanceType - Possible values include: 'InstanceTypeJobDetails', 'InstanceTypeAsrJobDetails', 'InstanceTypeExportJobDetails', 'InstanceTypeFailoverJobDetails', 'InstanceTypeSwitchProtectionJobDetails', 'InstanceTypeTestFailoverJobDetails' 3796 InstanceType InstanceTypeBasicJobDetails `json:"instanceType,omitempty"` 3797} 3798 3799// MarshalJSON is the custom marshaler for ExportJobDetails. 3800func (ejd ExportJobDetails) MarshalJSON() ([]byte, error) { 3801 ejd.InstanceType = InstanceTypeExportJobDetails 3802 objectMap := make(map[string]interface{}) 3803 if ejd.BlobURI != nil { 3804 objectMap["blobUri"] = ejd.BlobURI 3805 } 3806 if ejd.SasToken != nil { 3807 objectMap["sasToken"] = ejd.SasToken 3808 } 3809 if ejd.AffectedObjectDetails != nil { 3810 objectMap["affectedObjectDetails"] = ejd.AffectedObjectDetails 3811 } 3812 if ejd.InstanceType != "" { 3813 objectMap["instanceType"] = ejd.InstanceType 3814 } 3815 return json.Marshal(objectMap) 3816} 3817 3818// AsAsrJobDetails is the BasicJobDetails implementation for ExportJobDetails. 3819func (ejd ExportJobDetails) AsAsrJobDetails() (*AsrJobDetails, bool) { 3820 return nil, false 3821} 3822 3823// AsExportJobDetails is the BasicJobDetails implementation for ExportJobDetails. 3824func (ejd ExportJobDetails) AsExportJobDetails() (*ExportJobDetails, bool) { 3825 return &ejd, true 3826} 3827 3828// AsFailoverJobDetails is the BasicJobDetails implementation for ExportJobDetails. 3829func (ejd ExportJobDetails) AsFailoverJobDetails() (*FailoverJobDetails, bool) { 3830 return nil, false 3831} 3832 3833// AsSwitchProtectionJobDetails is the BasicJobDetails implementation for ExportJobDetails. 3834func (ejd ExportJobDetails) AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool) { 3835 return nil, false 3836} 3837 3838// AsTestFailoverJobDetails is the BasicJobDetails implementation for ExportJobDetails. 3839func (ejd ExportJobDetails) AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool) { 3840 return nil, false 3841} 3842 3843// AsJobDetails is the BasicJobDetails implementation for ExportJobDetails. 3844func (ejd ExportJobDetails) AsJobDetails() (*JobDetails, bool) { 3845 return nil, false 3846} 3847 3848// AsBasicJobDetails is the BasicJobDetails implementation for ExportJobDetails. 3849func (ejd ExportJobDetails) AsBasicJobDetails() (BasicJobDetails, bool) { 3850 return &ejd, true 3851} 3852 3853// Fabric fabric definition. 3854type Fabric struct { 3855 autorest.Response `json:"-"` 3856 // Properties - Fabric related data. 3857 Properties *FabricProperties `json:"properties,omitempty"` 3858 // ID - READ-ONLY; Resource Id 3859 ID *string `json:"id,omitempty"` 3860 // Name - READ-ONLY; Resource Name 3861 Name *string `json:"name,omitempty"` 3862 // Type - READ-ONLY; Resource Type 3863 Type *string `json:"type,omitempty"` 3864 // Location - Resource Location 3865 Location *string `json:"location,omitempty"` 3866} 3867 3868// MarshalJSON is the custom marshaler for Fabric. 3869func (f Fabric) MarshalJSON() ([]byte, error) { 3870 objectMap := make(map[string]interface{}) 3871 if f.Properties != nil { 3872 objectMap["properties"] = f.Properties 3873 } 3874 if f.Location != nil { 3875 objectMap["location"] = f.Location 3876 } 3877 return json.Marshal(objectMap) 3878} 3879 3880// FabricCollection collection of fabric details. 3881type FabricCollection struct { 3882 autorest.Response `json:"-"` 3883 // Value - The fabric details. 3884 Value *[]Fabric `json:"value,omitempty"` 3885 // NextLink - The value of next link. 3886 NextLink *string `json:"nextLink,omitempty"` 3887} 3888 3889// FabricCollectionIterator provides access to a complete listing of Fabric values. 3890type FabricCollectionIterator struct { 3891 i int 3892 page FabricCollectionPage 3893} 3894 3895// NextWithContext advances to the next value. If there was an error making 3896// the request the iterator does not advance and the error is returned. 3897func (iter *FabricCollectionIterator) NextWithContext(ctx context.Context) (err error) { 3898 if tracing.IsEnabled() { 3899 ctx = tracing.StartSpan(ctx, fqdn+"/FabricCollectionIterator.NextWithContext") 3900 defer func() { 3901 sc := -1 3902 if iter.Response().Response.Response != nil { 3903 sc = iter.Response().Response.Response.StatusCode 3904 } 3905 tracing.EndSpan(ctx, sc, err) 3906 }() 3907 } 3908 iter.i++ 3909 if iter.i < len(iter.page.Values()) { 3910 return nil 3911 } 3912 err = iter.page.NextWithContext(ctx) 3913 if err != nil { 3914 iter.i-- 3915 return err 3916 } 3917 iter.i = 0 3918 return nil 3919} 3920 3921// Next advances to the next value. If there was an error making 3922// the request the iterator does not advance and the error is returned. 3923// Deprecated: Use NextWithContext() instead. 3924func (iter *FabricCollectionIterator) Next() error { 3925 return iter.NextWithContext(context.Background()) 3926} 3927 3928// NotDone returns true if the enumeration should be started or is not yet complete. 3929func (iter FabricCollectionIterator) NotDone() bool { 3930 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 3931} 3932 3933// Response returns the raw server response from the last page request. 3934func (iter FabricCollectionIterator) Response() FabricCollection { 3935 return iter.page.Response() 3936} 3937 3938// Value returns the current value or a zero-initialized value if the 3939// iterator has advanced beyond the end of the collection. 3940func (iter FabricCollectionIterator) Value() Fabric { 3941 if !iter.page.NotDone() { 3942 return Fabric{} 3943 } 3944 return iter.page.Values()[iter.i] 3945} 3946 3947// Creates a new instance of the FabricCollectionIterator type. 3948func NewFabricCollectionIterator(page FabricCollectionPage) FabricCollectionIterator { 3949 return FabricCollectionIterator{page: page} 3950} 3951 3952// IsEmpty returns true if the ListResult contains no values. 3953func (fc FabricCollection) IsEmpty() bool { 3954 return fc.Value == nil || len(*fc.Value) == 0 3955} 3956 3957// hasNextLink returns true if the NextLink is not empty. 3958func (fc FabricCollection) hasNextLink() bool { 3959 return fc.NextLink != nil && len(*fc.NextLink) != 0 3960} 3961 3962// fabricCollectionPreparer prepares a request to retrieve the next set of results. 3963// It returns nil if no more results exist. 3964func (fc FabricCollection) fabricCollectionPreparer(ctx context.Context) (*http.Request, error) { 3965 if !fc.hasNextLink() { 3966 return nil, nil 3967 } 3968 return autorest.Prepare((&http.Request{}).WithContext(ctx), 3969 autorest.AsJSON(), 3970 autorest.AsGet(), 3971 autorest.WithBaseURL(to.String(fc.NextLink))) 3972} 3973 3974// FabricCollectionPage contains a page of Fabric values. 3975type FabricCollectionPage struct { 3976 fn func(context.Context, FabricCollection) (FabricCollection, error) 3977 fc FabricCollection 3978} 3979 3980// NextWithContext advances to the next page of values. If there was an error making 3981// the request the page does not advance and the error is returned. 3982func (page *FabricCollectionPage) NextWithContext(ctx context.Context) (err error) { 3983 if tracing.IsEnabled() { 3984 ctx = tracing.StartSpan(ctx, fqdn+"/FabricCollectionPage.NextWithContext") 3985 defer func() { 3986 sc := -1 3987 if page.Response().Response.Response != nil { 3988 sc = page.Response().Response.Response.StatusCode 3989 } 3990 tracing.EndSpan(ctx, sc, err) 3991 }() 3992 } 3993 for { 3994 next, err := page.fn(ctx, page.fc) 3995 if err != nil { 3996 return err 3997 } 3998 page.fc = next 3999 if !next.hasNextLink() || !next.IsEmpty() { 4000 break 4001 } 4002 } 4003 return nil 4004} 4005 4006// Next advances to the next page of values. If there was an error making 4007// the request the page does not advance and the error is returned. 4008// Deprecated: Use NextWithContext() instead. 4009func (page *FabricCollectionPage) Next() error { 4010 return page.NextWithContext(context.Background()) 4011} 4012 4013// NotDone returns true if the page enumeration should be started or is not yet complete. 4014func (page FabricCollectionPage) NotDone() bool { 4015 return !page.fc.IsEmpty() 4016} 4017 4018// Response returns the raw server response from the last page request. 4019func (page FabricCollectionPage) Response() FabricCollection { 4020 return page.fc 4021} 4022 4023// Values returns the slice of values for the current page or nil if there are no values. 4024func (page FabricCollectionPage) Values() []Fabric { 4025 if page.fc.IsEmpty() { 4026 return nil 4027 } 4028 return *page.fc.Value 4029} 4030 4031// Creates a new instance of the FabricCollectionPage type. 4032func NewFabricCollectionPage(cur FabricCollection, getNextPage func(context.Context, FabricCollection) (FabricCollection, error)) FabricCollectionPage { 4033 return FabricCollectionPage{ 4034 fn: getNextPage, 4035 fc: cur, 4036 } 4037} 4038 4039// FabricCreationInput site details provided during the time of site creation 4040type FabricCreationInput struct { 4041 // Properties - Fabric creation input. 4042 Properties *FabricCreationInputProperties `json:"properties,omitempty"` 4043} 4044 4045// FabricCreationInputProperties properties of site details provided during the time of site creation 4046type FabricCreationInputProperties struct { 4047 // CustomDetails - Fabric provider specific creation input. 4048 CustomDetails BasicFabricSpecificCreationInput `json:"customDetails,omitempty"` 4049} 4050 4051// UnmarshalJSON is the custom unmarshaler for FabricCreationInputProperties struct. 4052func (fcip *FabricCreationInputProperties) UnmarshalJSON(body []byte) error { 4053 var m map[string]*json.RawMessage 4054 err := json.Unmarshal(body, &m) 4055 if err != nil { 4056 return err 4057 } 4058 for k, v := range m { 4059 switch k { 4060 case "customDetails": 4061 if v != nil { 4062 customDetails, err := unmarshalBasicFabricSpecificCreationInput(*v) 4063 if err != nil { 4064 return err 4065 } 4066 fcip.CustomDetails = customDetails 4067 } 4068 } 4069 } 4070 4071 return nil 4072} 4073 4074// FabricProperties fabric properties. 4075type FabricProperties struct { 4076 // FriendlyName - Friendly name of the fabric. 4077 FriendlyName *string `json:"friendlyName,omitempty"` 4078 // EncryptionDetails - Encryption details for the fabric. 4079 EncryptionDetails *EncryptionDetails `json:"encryptionDetails,omitempty"` 4080 // RolloverEncryptionDetails - Rollover encryption details for the fabric. 4081 RolloverEncryptionDetails *EncryptionDetails `json:"rolloverEncryptionDetails,omitempty"` 4082 // InternalIdentifier - Dra Registration Id. 4083 InternalIdentifier *string `json:"internalIdentifier,omitempty"` 4084 // BcdrState - BCDR state of the fabric. 4085 BcdrState *string `json:"bcdrState,omitempty"` 4086 // CustomDetails - Fabric specific settings. 4087 CustomDetails BasicFabricSpecificDetails `json:"customDetails,omitempty"` 4088 // HealthErrorDetails - Fabric health error details. 4089 HealthErrorDetails *[]HealthError `json:"healthErrorDetails,omitempty"` 4090 // Health - Health of fabric. 4091 Health *string `json:"health,omitempty"` 4092} 4093 4094// UnmarshalJSON is the custom unmarshaler for FabricProperties struct. 4095func (fp *FabricProperties) UnmarshalJSON(body []byte) error { 4096 var m map[string]*json.RawMessage 4097 err := json.Unmarshal(body, &m) 4098 if err != nil { 4099 return err 4100 } 4101 for k, v := range m { 4102 switch k { 4103 case "friendlyName": 4104 if v != nil { 4105 var friendlyName string 4106 err = json.Unmarshal(*v, &friendlyName) 4107 if err != nil { 4108 return err 4109 } 4110 fp.FriendlyName = &friendlyName 4111 } 4112 case "encryptionDetails": 4113 if v != nil { 4114 var encryptionDetails EncryptionDetails 4115 err = json.Unmarshal(*v, &encryptionDetails) 4116 if err != nil { 4117 return err 4118 } 4119 fp.EncryptionDetails = &encryptionDetails 4120 } 4121 case "rolloverEncryptionDetails": 4122 if v != nil { 4123 var rolloverEncryptionDetails EncryptionDetails 4124 err = json.Unmarshal(*v, &rolloverEncryptionDetails) 4125 if err != nil { 4126 return err 4127 } 4128 fp.RolloverEncryptionDetails = &rolloverEncryptionDetails 4129 } 4130 case "internalIdentifier": 4131 if v != nil { 4132 var internalIdentifier string 4133 err = json.Unmarshal(*v, &internalIdentifier) 4134 if err != nil { 4135 return err 4136 } 4137 fp.InternalIdentifier = &internalIdentifier 4138 } 4139 case "bcdrState": 4140 if v != nil { 4141 var bcdrState string 4142 err = json.Unmarshal(*v, &bcdrState) 4143 if err != nil { 4144 return err 4145 } 4146 fp.BcdrState = &bcdrState 4147 } 4148 case "customDetails": 4149 if v != nil { 4150 customDetails, err := unmarshalBasicFabricSpecificDetails(*v) 4151 if err != nil { 4152 return err 4153 } 4154 fp.CustomDetails = customDetails 4155 } 4156 case "healthErrorDetails": 4157 if v != nil { 4158 var healthErrorDetails []HealthError 4159 err = json.Unmarshal(*v, &healthErrorDetails) 4160 if err != nil { 4161 return err 4162 } 4163 fp.HealthErrorDetails = &healthErrorDetails 4164 } 4165 case "health": 4166 if v != nil { 4167 var health string 4168 err = json.Unmarshal(*v, &health) 4169 if err != nil { 4170 return err 4171 } 4172 fp.Health = &health 4173 } 4174 } 4175 } 4176 4177 return nil 4178} 4179 4180// FabricReplicationGroupTaskDetails this class represents the fabric replication group task details. 4181type FabricReplicationGroupTaskDetails struct { 4182 // SkippedReason - The skipped reason. 4183 SkippedReason *string `json:"skippedReason,omitempty"` 4184 // SkippedReasonString - The skipped reason string. 4185 SkippedReasonString *string `json:"skippedReasonString,omitempty"` 4186 // JobTask - The job entity. 4187 JobTask *JobEntity `json:"jobTask,omitempty"` 4188 // InstanceType - Possible values include: 'InstanceTypeTaskTypeDetails', 'InstanceTypeAutomationRunbookTaskDetails', 'InstanceTypeConsistencyCheckTaskDetails', 'InstanceTypeFabricReplicationGroupTaskDetails', 'InstanceTypeJobTaskDetails', 'InstanceTypeManualActionTaskDetails', 'InstanceTypeScriptActionTaskDetails', 'InstanceTypeVirtualMachineTaskDetails', 'InstanceTypeVMNicUpdatesTaskDetails' 4189 InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"` 4190} 4191 4192// MarshalJSON is the custom marshaler for FabricReplicationGroupTaskDetails. 4193func (frgtd FabricReplicationGroupTaskDetails) MarshalJSON() ([]byte, error) { 4194 frgtd.InstanceType = InstanceTypeFabricReplicationGroupTaskDetails 4195 objectMap := make(map[string]interface{}) 4196 if frgtd.SkippedReason != nil { 4197 objectMap["skippedReason"] = frgtd.SkippedReason 4198 } 4199 if frgtd.SkippedReasonString != nil { 4200 objectMap["skippedReasonString"] = frgtd.SkippedReasonString 4201 } 4202 if frgtd.JobTask != nil { 4203 objectMap["jobTask"] = frgtd.JobTask 4204 } 4205 if frgtd.InstanceType != "" { 4206 objectMap["instanceType"] = frgtd.InstanceType 4207 } 4208 return json.Marshal(objectMap) 4209} 4210 4211// AsAutomationRunbookTaskDetails is the BasicTaskTypeDetails implementation for FabricReplicationGroupTaskDetails. 4212func (frgtd FabricReplicationGroupTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) { 4213 return nil, false 4214} 4215 4216// AsConsistencyCheckTaskDetails is the BasicTaskTypeDetails implementation for FabricReplicationGroupTaskDetails. 4217func (frgtd FabricReplicationGroupTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) { 4218 return nil, false 4219} 4220 4221// AsFabricReplicationGroupTaskDetails is the BasicTaskTypeDetails implementation for FabricReplicationGroupTaskDetails. 4222func (frgtd FabricReplicationGroupTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) { 4223 return &frgtd, true 4224} 4225 4226// AsJobTaskDetails is the BasicTaskTypeDetails implementation for FabricReplicationGroupTaskDetails. 4227func (frgtd FabricReplicationGroupTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) { 4228 return nil, false 4229} 4230 4231// AsManualActionTaskDetails is the BasicTaskTypeDetails implementation for FabricReplicationGroupTaskDetails. 4232func (frgtd FabricReplicationGroupTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) { 4233 return nil, false 4234} 4235 4236// AsScriptActionTaskDetails is the BasicTaskTypeDetails implementation for FabricReplicationGroupTaskDetails. 4237func (frgtd FabricReplicationGroupTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) { 4238 return nil, false 4239} 4240 4241// AsVirtualMachineTaskDetails is the BasicTaskTypeDetails implementation for FabricReplicationGroupTaskDetails. 4242func (frgtd FabricReplicationGroupTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) { 4243 return nil, false 4244} 4245 4246// AsVMNicUpdatesTaskDetails is the BasicTaskTypeDetails implementation for FabricReplicationGroupTaskDetails. 4247func (frgtd FabricReplicationGroupTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) { 4248 return nil, false 4249} 4250 4251// AsTaskTypeDetails is the BasicTaskTypeDetails implementation for FabricReplicationGroupTaskDetails. 4252func (frgtd FabricReplicationGroupTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) { 4253 return nil, false 4254} 4255 4256// AsBasicTaskTypeDetails is the BasicTaskTypeDetails implementation for FabricReplicationGroupTaskDetails. 4257func (frgtd FabricReplicationGroupTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) { 4258 return &frgtd, true 4259} 4260 4261// BasicFabricSpecificCreateNetworkMappingInput input details specific to fabrics during Network Mapping. 4262type BasicFabricSpecificCreateNetworkMappingInput interface { 4263 AsAzureToAzureCreateNetworkMappingInput() (*AzureToAzureCreateNetworkMappingInput, bool) 4264 AsVmmToAzureCreateNetworkMappingInput() (*VmmToAzureCreateNetworkMappingInput, bool) 4265 AsVmmToVmmCreateNetworkMappingInput() (*VmmToVmmCreateNetworkMappingInput, bool) 4266 AsFabricSpecificCreateNetworkMappingInput() (*FabricSpecificCreateNetworkMappingInput, bool) 4267} 4268 4269// FabricSpecificCreateNetworkMappingInput input details specific to fabrics during Network Mapping. 4270type FabricSpecificCreateNetworkMappingInput struct { 4271 // InstanceType - Possible values include: 'InstanceTypeFabricSpecificCreateNetworkMappingInput', 'InstanceTypeAzureToAzure', 'InstanceTypeVmmToAzure', 'InstanceTypeVmmToVmm' 4272 InstanceType InstanceTypeBasicFabricSpecificCreateNetworkMappingInput `json:"instanceType,omitempty"` 4273} 4274 4275func unmarshalBasicFabricSpecificCreateNetworkMappingInput(body []byte) (BasicFabricSpecificCreateNetworkMappingInput, error) { 4276 var m map[string]interface{} 4277 err := json.Unmarshal(body, &m) 4278 if err != nil { 4279 return nil, err 4280 } 4281 4282 switch m["instanceType"] { 4283 case string(InstanceTypeAzureToAzure): 4284 var atacnmi AzureToAzureCreateNetworkMappingInput 4285 err := json.Unmarshal(body, &atacnmi) 4286 return atacnmi, err 4287 case string(InstanceTypeVmmToAzure): 4288 var vtacnmi VmmToAzureCreateNetworkMappingInput 4289 err := json.Unmarshal(body, &vtacnmi) 4290 return vtacnmi, err 4291 case string(InstanceTypeVmmToVmm): 4292 var vtvcnmi VmmToVmmCreateNetworkMappingInput 4293 err := json.Unmarshal(body, &vtvcnmi) 4294 return vtvcnmi, err 4295 default: 4296 var fscnmi FabricSpecificCreateNetworkMappingInput 4297 err := json.Unmarshal(body, &fscnmi) 4298 return fscnmi, err 4299 } 4300} 4301func unmarshalBasicFabricSpecificCreateNetworkMappingInputArray(body []byte) ([]BasicFabricSpecificCreateNetworkMappingInput, error) { 4302 var rawMessages []*json.RawMessage 4303 err := json.Unmarshal(body, &rawMessages) 4304 if err != nil { 4305 return nil, err 4306 } 4307 4308 fscnmiArray := make([]BasicFabricSpecificCreateNetworkMappingInput, len(rawMessages)) 4309 4310 for index, rawMessage := range rawMessages { 4311 fscnmi, err := unmarshalBasicFabricSpecificCreateNetworkMappingInput(*rawMessage) 4312 if err != nil { 4313 return nil, err 4314 } 4315 fscnmiArray[index] = fscnmi 4316 } 4317 return fscnmiArray, nil 4318} 4319 4320// MarshalJSON is the custom marshaler for FabricSpecificCreateNetworkMappingInput. 4321func (fscnmi FabricSpecificCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { 4322 fscnmi.InstanceType = InstanceTypeFabricSpecificCreateNetworkMappingInput 4323 objectMap := make(map[string]interface{}) 4324 if fscnmi.InstanceType != "" { 4325 objectMap["instanceType"] = fscnmi.InstanceType 4326 } 4327 return json.Marshal(objectMap) 4328} 4329 4330// AsAzureToAzureCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for FabricSpecificCreateNetworkMappingInput. 4331func (fscnmi FabricSpecificCreateNetworkMappingInput) AsAzureToAzureCreateNetworkMappingInput() (*AzureToAzureCreateNetworkMappingInput, bool) { 4332 return nil, false 4333} 4334 4335// AsVmmToAzureCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for FabricSpecificCreateNetworkMappingInput. 4336func (fscnmi FabricSpecificCreateNetworkMappingInput) AsVmmToAzureCreateNetworkMappingInput() (*VmmToAzureCreateNetworkMappingInput, bool) { 4337 return nil, false 4338} 4339 4340// AsVmmToVmmCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for FabricSpecificCreateNetworkMappingInput. 4341func (fscnmi FabricSpecificCreateNetworkMappingInput) AsVmmToVmmCreateNetworkMappingInput() (*VmmToVmmCreateNetworkMappingInput, bool) { 4342 return nil, false 4343} 4344 4345// AsFabricSpecificCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for FabricSpecificCreateNetworkMappingInput. 4346func (fscnmi FabricSpecificCreateNetworkMappingInput) AsFabricSpecificCreateNetworkMappingInput() (*FabricSpecificCreateNetworkMappingInput, bool) { 4347 return &fscnmi, true 4348} 4349 4350// AsBasicFabricSpecificCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for FabricSpecificCreateNetworkMappingInput. 4351func (fscnmi FabricSpecificCreateNetworkMappingInput) AsBasicFabricSpecificCreateNetworkMappingInput() (BasicFabricSpecificCreateNetworkMappingInput, bool) { 4352 return &fscnmi, true 4353} 4354 4355// BasicFabricSpecificCreationInput fabric provider specific settings. 4356type BasicFabricSpecificCreationInput interface { 4357 AsAzureFabricCreationInput() (*AzureFabricCreationInput, bool) 4358 AsVMwareV2FabricCreationInput() (*VMwareV2FabricCreationInput, bool) 4359 AsFabricSpecificCreationInput() (*FabricSpecificCreationInput, bool) 4360} 4361 4362// FabricSpecificCreationInput fabric provider specific settings. 4363type FabricSpecificCreationInput struct { 4364 // InstanceType - Possible values include: 'InstanceTypeFabricSpecificCreationInput', 'InstanceTypeAzure', 'InstanceTypeVMwareV2' 4365 InstanceType InstanceTypeBasicFabricSpecificCreationInput `json:"instanceType,omitempty"` 4366} 4367 4368func unmarshalBasicFabricSpecificCreationInput(body []byte) (BasicFabricSpecificCreationInput, error) { 4369 var m map[string]interface{} 4370 err := json.Unmarshal(body, &m) 4371 if err != nil { 4372 return nil, err 4373 } 4374 4375 switch m["instanceType"] { 4376 case string(InstanceTypeAzure): 4377 var afci AzureFabricCreationInput 4378 err := json.Unmarshal(body, &afci) 4379 return afci, err 4380 case string(InstanceTypeVMwareV2): 4381 var vmvfci VMwareV2FabricCreationInput 4382 err := json.Unmarshal(body, &vmvfci) 4383 return vmvfci, err 4384 default: 4385 var fsci FabricSpecificCreationInput 4386 err := json.Unmarshal(body, &fsci) 4387 return fsci, err 4388 } 4389} 4390func unmarshalBasicFabricSpecificCreationInputArray(body []byte) ([]BasicFabricSpecificCreationInput, error) { 4391 var rawMessages []*json.RawMessage 4392 err := json.Unmarshal(body, &rawMessages) 4393 if err != nil { 4394 return nil, err 4395 } 4396 4397 fsciArray := make([]BasicFabricSpecificCreationInput, len(rawMessages)) 4398 4399 for index, rawMessage := range rawMessages { 4400 fsci, err := unmarshalBasicFabricSpecificCreationInput(*rawMessage) 4401 if err != nil { 4402 return nil, err 4403 } 4404 fsciArray[index] = fsci 4405 } 4406 return fsciArray, nil 4407} 4408 4409// MarshalJSON is the custom marshaler for FabricSpecificCreationInput. 4410func (fsci FabricSpecificCreationInput) MarshalJSON() ([]byte, error) { 4411 fsci.InstanceType = InstanceTypeFabricSpecificCreationInput 4412 objectMap := make(map[string]interface{}) 4413 if fsci.InstanceType != "" { 4414 objectMap["instanceType"] = fsci.InstanceType 4415 } 4416 return json.Marshal(objectMap) 4417} 4418 4419// AsAzureFabricCreationInput is the BasicFabricSpecificCreationInput implementation for FabricSpecificCreationInput. 4420func (fsci FabricSpecificCreationInput) AsAzureFabricCreationInput() (*AzureFabricCreationInput, bool) { 4421 return nil, false 4422} 4423 4424// AsVMwareV2FabricCreationInput is the BasicFabricSpecificCreationInput implementation for FabricSpecificCreationInput. 4425func (fsci FabricSpecificCreationInput) AsVMwareV2FabricCreationInput() (*VMwareV2FabricCreationInput, bool) { 4426 return nil, false 4427} 4428 4429// AsFabricSpecificCreationInput is the BasicFabricSpecificCreationInput implementation for FabricSpecificCreationInput. 4430func (fsci FabricSpecificCreationInput) AsFabricSpecificCreationInput() (*FabricSpecificCreationInput, bool) { 4431 return &fsci, true 4432} 4433 4434// AsBasicFabricSpecificCreationInput is the BasicFabricSpecificCreationInput implementation for FabricSpecificCreationInput. 4435func (fsci FabricSpecificCreationInput) AsBasicFabricSpecificCreationInput() (BasicFabricSpecificCreationInput, bool) { 4436 return &fsci, true 4437} 4438 4439// BasicFabricSpecificDetails fabric specific details. 4440type BasicFabricSpecificDetails interface { 4441 AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool) 4442 AsHyperVSiteDetails() (*HyperVSiteDetails, bool) 4443 AsVmmDetails() (*VmmDetails, bool) 4444 AsVMwareDetails() (*VMwareDetails, bool) 4445 AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool) 4446 AsFabricSpecificDetails() (*FabricSpecificDetails, bool) 4447} 4448 4449// FabricSpecificDetails fabric specific details. 4450type FabricSpecificDetails struct { 4451 // InstanceType - Possible values include: 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeFabricSpecificDetails', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeAzure', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeHyperVSite', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMM', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMware', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMwareV2' 4452 InstanceType InstanceTypeBasicFabricSpecificDetails `json:"instanceType,omitempty"` 4453} 4454 4455func unmarshalBasicFabricSpecificDetails(body []byte) (BasicFabricSpecificDetails, error) { 4456 var m map[string]interface{} 4457 err := json.Unmarshal(body, &m) 4458 if err != nil { 4459 return nil, err 4460 } 4461 4462 switch m["instanceType"] { 4463 case string(InstanceTypeBasicFabricSpecificDetailsInstanceTypeAzure): 4464 var afsd AzureFabricSpecificDetails 4465 err := json.Unmarshal(body, &afsd) 4466 return afsd, err 4467 case string(InstanceTypeBasicFabricSpecificDetailsInstanceTypeHyperVSite): 4468 var hvsd HyperVSiteDetails 4469 err := json.Unmarshal(body, &hvsd) 4470 return hvsd, err 4471 case string(InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMM): 4472 var vd VmmDetails 4473 err := json.Unmarshal(body, &vd) 4474 return vd, err 4475 case string(InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMware): 4476 var vmd VMwareDetails 4477 err := json.Unmarshal(body, &vmd) 4478 return vmd, err 4479 case string(InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMwareV2): 4480 var vmvfsd VMwareV2FabricSpecificDetails 4481 err := json.Unmarshal(body, &vmvfsd) 4482 return vmvfsd, err 4483 default: 4484 var fsd FabricSpecificDetails 4485 err := json.Unmarshal(body, &fsd) 4486 return fsd, err 4487 } 4488} 4489func unmarshalBasicFabricSpecificDetailsArray(body []byte) ([]BasicFabricSpecificDetails, error) { 4490 var rawMessages []*json.RawMessage 4491 err := json.Unmarshal(body, &rawMessages) 4492 if err != nil { 4493 return nil, err 4494 } 4495 4496 fsdArray := make([]BasicFabricSpecificDetails, len(rawMessages)) 4497 4498 for index, rawMessage := range rawMessages { 4499 fsd, err := unmarshalBasicFabricSpecificDetails(*rawMessage) 4500 if err != nil { 4501 return nil, err 4502 } 4503 fsdArray[index] = fsd 4504 } 4505 return fsdArray, nil 4506} 4507 4508// MarshalJSON is the custom marshaler for FabricSpecificDetails. 4509func (fsd FabricSpecificDetails) MarshalJSON() ([]byte, error) { 4510 fsd.InstanceType = InstanceTypeBasicFabricSpecificDetailsInstanceTypeFabricSpecificDetails 4511 objectMap := make(map[string]interface{}) 4512 if fsd.InstanceType != "" { 4513 objectMap["instanceType"] = fsd.InstanceType 4514 } 4515 return json.Marshal(objectMap) 4516} 4517 4518// AsAzureFabricSpecificDetails is the BasicFabricSpecificDetails implementation for FabricSpecificDetails. 4519func (fsd FabricSpecificDetails) AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool) { 4520 return nil, false 4521} 4522 4523// AsHyperVSiteDetails is the BasicFabricSpecificDetails implementation for FabricSpecificDetails. 4524func (fsd FabricSpecificDetails) AsHyperVSiteDetails() (*HyperVSiteDetails, bool) { 4525 return nil, false 4526} 4527 4528// AsVmmDetails is the BasicFabricSpecificDetails implementation for FabricSpecificDetails. 4529func (fsd FabricSpecificDetails) AsVmmDetails() (*VmmDetails, bool) { 4530 return nil, false 4531} 4532 4533// AsVMwareDetails is the BasicFabricSpecificDetails implementation for FabricSpecificDetails. 4534func (fsd FabricSpecificDetails) AsVMwareDetails() (*VMwareDetails, bool) { 4535 return nil, false 4536} 4537 4538// AsVMwareV2FabricSpecificDetails is the BasicFabricSpecificDetails implementation for FabricSpecificDetails. 4539func (fsd FabricSpecificDetails) AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool) { 4540 return nil, false 4541} 4542 4543// AsFabricSpecificDetails is the BasicFabricSpecificDetails implementation for FabricSpecificDetails. 4544func (fsd FabricSpecificDetails) AsFabricSpecificDetails() (*FabricSpecificDetails, bool) { 4545 return &fsd, true 4546} 4547 4548// AsBasicFabricSpecificDetails is the BasicFabricSpecificDetails implementation for FabricSpecificDetails. 4549func (fsd FabricSpecificDetails) AsBasicFabricSpecificDetails() (BasicFabricSpecificDetails, bool) { 4550 return &fsd, true 4551} 4552 4553// BasicFabricSpecificUpdateNetworkMappingInput input details specific to fabrics during Network Mapping. 4554type BasicFabricSpecificUpdateNetworkMappingInput interface { 4555 AsAzureToAzureUpdateNetworkMappingInput() (*AzureToAzureUpdateNetworkMappingInput, bool) 4556 AsVmmToAzureUpdateNetworkMappingInput() (*VmmToAzureUpdateNetworkMappingInput, bool) 4557 AsVmmToVmmUpdateNetworkMappingInput() (*VmmToVmmUpdateNetworkMappingInput, bool) 4558 AsFabricSpecificUpdateNetworkMappingInput() (*FabricSpecificUpdateNetworkMappingInput, bool) 4559} 4560 4561// FabricSpecificUpdateNetworkMappingInput input details specific to fabrics during Network Mapping. 4562type FabricSpecificUpdateNetworkMappingInput struct { 4563 // InstanceType - Possible values include: 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeFabricSpecificUpdateNetworkMappingInput', 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeAzureToAzure', 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToAzure', 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToVmm' 4564 InstanceType InstanceTypeBasicFabricSpecificUpdateNetworkMappingInput `json:"instanceType,omitempty"` 4565} 4566 4567func unmarshalBasicFabricSpecificUpdateNetworkMappingInput(body []byte) (BasicFabricSpecificUpdateNetworkMappingInput, error) { 4568 var m map[string]interface{} 4569 err := json.Unmarshal(body, &m) 4570 if err != nil { 4571 return nil, err 4572 } 4573 4574 switch m["instanceType"] { 4575 case string(InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeAzureToAzure): 4576 var ataunmi AzureToAzureUpdateNetworkMappingInput 4577 err := json.Unmarshal(body, &ataunmi) 4578 return ataunmi, err 4579 case string(InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToAzure): 4580 var vtaunmi VmmToAzureUpdateNetworkMappingInput 4581 err := json.Unmarshal(body, &vtaunmi) 4582 return vtaunmi, err 4583 case string(InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToVmm): 4584 var vtvunmi VmmToVmmUpdateNetworkMappingInput 4585 err := json.Unmarshal(body, &vtvunmi) 4586 return vtvunmi, err 4587 default: 4588 var fsunmi FabricSpecificUpdateNetworkMappingInput 4589 err := json.Unmarshal(body, &fsunmi) 4590 return fsunmi, err 4591 } 4592} 4593func unmarshalBasicFabricSpecificUpdateNetworkMappingInputArray(body []byte) ([]BasicFabricSpecificUpdateNetworkMappingInput, error) { 4594 var rawMessages []*json.RawMessage 4595 err := json.Unmarshal(body, &rawMessages) 4596 if err != nil { 4597 return nil, err 4598 } 4599 4600 fsunmiArray := make([]BasicFabricSpecificUpdateNetworkMappingInput, len(rawMessages)) 4601 4602 for index, rawMessage := range rawMessages { 4603 fsunmi, err := unmarshalBasicFabricSpecificUpdateNetworkMappingInput(*rawMessage) 4604 if err != nil { 4605 return nil, err 4606 } 4607 fsunmiArray[index] = fsunmi 4608 } 4609 return fsunmiArray, nil 4610} 4611 4612// MarshalJSON is the custom marshaler for FabricSpecificUpdateNetworkMappingInput. 4613func (fsunmi FabricSpecificUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { 4614 fsunmi.InstanceType = InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeFabricSpecificUpdateNetworkMappingInput 4615 objectMap := make(map[string]interface{}) 4616 if fsunmi.InstanceType != "" { 4617 objectMap["instanceType"] = fsunmi.InstanceType 4618 } 4619 return json.Marshal(objectMap) 4620} 4621 4622// AsAzureToAzureUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for FabricSpecificUpdateNetworkMappingInput. 4623func (fsunmi FabricSpecificUpdateNetworkMappingInput) AsAzureToAzureUpdateNetworkMappingInput() (*AzureToAzureUpdateNetworkMappingInput, bool) { 4624 return nil, false 4625} 4626 4627// AsVmmToAzureUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for FabricSpecificUpdateNetworkMappingInput. 4628func (fsunmi FabricSpecificUpdateNetworkMappingInput) AsVmmToAzureUpdateNetworkMappingInput() (*VmmToAzureUpdateNetworkMappingInput, bool) { 4629 return nil, false 4630} 4631 4632// AsVmmToVmmUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for FabricSpecificUpdateNetworkMappingInput. 4633func (fsunmi FabricSpecificUpdateNetworkMappingInput) AsVmmToVmmUpdateNetworkMappingInput() (*VmmToVmmUpdateNetworkMappingInput, bool) { 4634 return nil, false 4635} 4636 4637// AsFabricSpecificUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for FabricSpecificUpdateNetworkMappingInput. 4638func (fsunmi FabricSpecificUpdateNetworkMappingInput) AsFabricSpecificUpdateNetworkMappingInput() (*FabricSpecificUpdateNetworkMappingInput, bool) { 4639 return &fsunmi, true 4640} 4641 4642// AsBasicFabricSpecificUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for FabricSpecificUpdateNetworkMappingInput. 4643func (fsunmi FabricSpecificUpdateNetworkMappingInput) AsBasicFabricSpecificUpdateNetworkMappingInput() (BasicFabricSpecificUpdateNetworkMappingInput, bool) { 4644 return &fsunmi, true 4645} 4646 4647// FailoverJobDetails this class represents the details for a failover job. 4648type FailoverJobDetails struct { 4649 // ProtectedItemDetails - The test VM details. 4650 ProtectedItemDetails *[]FailoverReplicationProtectedItemDetails `json:"protectedItemDetails,omitempty"` 4651 // AffectedObjectDetails - The affected object properties like source server, source cloud, target server, target cloud etc. based on the workflow object details. 4652 AffectedObjectDetails map[string]*string `json:"affectedObjectDetails"` 4653 // InstanceType - Possible values include: 'InstanceTypeJobDetails', 'InstanceTypeAsrJobDetails', 'InstanceTypeExportJobDetails', 'InstanceTypeFailoverJobDetails', 'InstanceTypeSwitchProtectionJobDetails', 'InstanceTypeTestFailoverJobDetails' 4654 InstanceType InstanceTypeBasicJobDetails `json:"instanceType,omitempty"` 4655} 4656 4657// MarshalJSON is the custom marshaler for FailoverJobDetails. 4658func (fjd FailoverJobDetails) MarshalJSON() ([]byte, error) { 4659 fjd.InstanceType = InstanceTypeFailoverJobDetails 4660 objectMap := make(map[string]interface{}) 4661 if fjd.ProtectedItemDetails != nil { 4662 objectMap["protectedItemDetails"] = fjd.ProtectedItemDetails 4663 } 4664 if fjd.AffectedObjectDetails != nil { 4665 objectMap["affectedObjectDetails"] = fjd.AffectedObjectDetails 4666 } 4667 if fjd.InstanceType != "" { 4668 objectMap["instanceType"] = fjd.InstanceType 4669 } 4670 return json.Marshal(objectMap) 4671} 4672 4673// AsAsrJobDetails is the BasicJobDetails implementation for FailoverJobDetails. 4674func (fjd FailoverJobDetails) AsAsrJobDetails() (*AsrJobDetails, bool) { 4675 return nil, false 4676} 4677 4678// AsExportJobDetails is the BasicJobDetails implementation for FailoverJobDetails. 4679func (fjd FailoverJobDetails) AsExportJobDetails() (*ExportJobDetails, bool) { 4680 return nil, false 4681} 4682 4683// AsFailoverJobDetails is the BasicJobDetails implementation for FailoverJobDetails. 4684func (fjd FailoverJobDetails) AsFailoverJobDetails() (*FailoverJobDetails, bool) { 4685 return &fjd, true 4686} 4687 4688// AsSwitchProtectionJobDetails is the BasicJobDetails implementation for FailoverJobDetails. 4689func (fjd FailoverJobDetails) AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool) { 4690 return nil, false 4691} 4692 4693// AsTestFailoverJobDetails is the BasicJobDetails implementation for FailoverJobDetails. 4694func (fjd FailoverJobDetails) AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool) { 4695 return nil, false 4696} 4697 4698// AsJobDetails is the BasicJobDetails implementation for FailoverJobDetails. 4699func (fjd FailoverJobDetails) AsJobDetails() (*JobDetails, bool) { 4700 return nil, false 4701} 4702 4703// AsBasicJobDetails is the BasicJobDetails implementation for FailoverJobDetails. 4704func (fjd FailoverJobDetails) AsBasicJobDetails() (BasicJobDetails, bool) { 4705 return &fjd, true 4706} 4707 4708// FailoverProcessServerRequest request to failover a process server. 4709type FailoverProcessServerRequest struct { 4710 // Properties - The properties of the PS Failover request. 4711 Properties *FailoverProcessServerRequestProperties `json:"properties,omitempty"` 4712} 4713 4714// FailoverProcessServerRequestProperties the properties of the Failover Process Server request. 4715type FailoverProcessServerRequestProperties struct { 4716 // ContainerName - The container identifier. 4717 ContainerName *string `json:"containerName,omitempty"` 4718 // SourceProcessServerID - The source process server. 4719 SourceProcessServerID *string `json:"sourceProcessServerId,omitempty"` 4720 // TargetProcessServerID - The new process server. 4721 TargetProcessServerID *string `json:"targetProcessServerId,omitempty"` 4722 // VmsToMigrate - The VMS to migrate. 4723 VmsToMigrate *[]string `json:"vmsToMigrate,omitempty"` 4724 // UpdateType - A value for failover type. It can be systemlevel/serverlevel 4725 UpdateType *string `json:"updateType,omitempty"` 4726} 4727 4728// FailoverReplicationProtectedItemDetails failover details for a replication protected item. 4729type FailoverReplicationProtectedItemDetails struct { 4730 // Name - The name. 4731 Name *string `json:"name,omitempty"` 4732 // FriendlyName - The friendly name. 4733 FriendlyName *string `json:"friendlyName,omitempty"` 4734 // TestVMName - The test Vm name. 4735 TestVMName *string `json:"testVmName,omitempty"` 4736 // TestVMFriendlyName - The test Vm friendly name. 4737 TestVMFriendlyName *string `json:"testVmFriendlyName,omitempty"` 4738 // NetworkConnectionStatus - The network connection status. 4739 NetworkConnectionStatus *string `json:"networkConnectionStatus,omitempty"` 4740 // NetworkFriendlyName - The network friendly name. 4741 NetworkFriendlyName *string `json:"networkFriendlyName,omitempty"` 4742 // Subnet - The network subnet. 4743 Subnet *string `json:"subnet,omitempty"` 4744 // RecoveryPointID - The recovery point Id. 4745 RecoveryPointID *string `json:"recoveryPointId,omitempty"` 4746 // RecoveryPointTime - The recovery point time. 4747 RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"` 4748} 4749 4750// BasicGroupTaskDetails this class represents the group task details when parent child relationship exists in the 4751// drill down. 4752type BasicGroupTaskDetails interface { 4753 AsInlineWorkflowTaskDetails() (*InlineWorkflowTaskDetails, bool) 4754 AsRecoveryPlanGroupTaskDetails() (*RecoveryPlanGroupTaskDetails, bool) 4755 AsRecoveryPlanShutdownGroupTaskDetails() (*RecoveryPlanShutdownGroupTaskDetails, bool) 4756 AsGroupTaskDetails() (*GroupTaskDetails, bool) 4757} 4758 4759// GroupTaskDetails this class represents the group task details when parent child relationship exists in the 4760// drill down. 4761type GroupTaskDetails struct { 4762 // ChildTasks - The child tasks. 4763 ChildTasks *[]ASRTask `json:"childTasks,omitempty"` 4764 // InstanceType - Possible values include: 'InstanceTypeGroupTaskDetails', 'InstanceTypeInlineWorkflowTaskDetails', 'InstanceTypeRecoveryPlanGroupTaskDetails', 'InstanceTypeRecoveryPlanShutdownGroupTaskDetails' 4765 InstanceType InstanceTypeBasicGroupTaskDetails `json:"instanceType,omitempty"` 4766} 4767 4768func unmarshalBasicGroupTaskDetails(body []byte) (BasicGroupTaskDetails, error) { 4769 var m map[string]interface{} 4770 err := json.Unmarshal(body, &m) 4771 if err != nil { 4772 return nil, err 4773 } 4774 4775 switch m["instanceType"] { 4776 case string(InstanceTypeInlineWorkflowTaskDetails): 4777 var iwtd InlineWorkflowTaskDetails 4778 err := json.Unmarshal(body, &iwtd) 4779 return iwtd, err 4780 case string(InstanceTypeRecoveryPlanGroupTaskDetails): 4781 var rpgtd RecoveryPlanGroupTaskDetails 4782 err := json.Unmarshal(body, &rpgtd) 4783 return rpgtd, err 4784 case string(InstanceTypeRecoveryPlanShutdownGroupTaskDetails): 4785 var rpsgtd RecoveryPlanShutdownGroupTaskDetails 4786 err := json.Unmarshal(body, &rpsgtd) 4787 return rpsgtd, err 4788 default: 4789 var gtd GroupTaskDetails 4790 err := json.Unmarshal(body, >d) 4791 return gtd, err 4792 } 4793} 4794func unmarshalBasicGroupTaskDetailsArray(body []byte) ([]BasicGroupTaskDetails, error) { 4795 var rawMessages []*json.RawMessage 4796 err := json.Unmarshal(body, &rawMessages) 4797 if err != nil { 4798 return nil, err 4799 } 4800 4801 gtdArray := make([]BasicGroupTaskDetails, len(rawMessages)) 4802 4803 for index, rawMessage := range rawMessages { 4804 gtd, err := unmarshalBasicGroupTaskDetails(*rawMessage) 4805 if err != nil { 4806 return nil, err 4807 } 4808 gtdArray[index] = gtd 4809 } 4810 return gtdArray, nil 4811} 4812 4813// MarshalJSON is the custom marshaler for GroupTaskDetails. 4814func (gtd GroupTaskDetails) MarshalJSON() ([]byte, error) { 4815 gtd.InstanceType = InstanceTypeGroupTaskDetails 4816 objectMap := make(map[string]interface{}) 4817 if gtd.ChildTasks != nil { 4818 objectMap["childTasks"] = gtd.ChildTasks 4819 } 4820 if gtd.InstanceType != "" { 4821 objectMap["instanceType"] = gtd.InstanceType 4822 } 4823 return json.Marshal(objectMap) 4824} 4825 4826// AsInlineWorkflowTaskDetails is the BasicGroupTaskDetails implementation for GroupTaskDetails. 4827func (gtd GroupTaskDetails) AsInlineWorkflowTaskDetails() (*InlineWorkflowTaskDetails, bool) { 4828 return nil, false 4829} 4830 4831// AsRecoveryPlanGroupTaskDetails is the BasicGroupTaskDetails implementation for GroupTaskDetails. 4832func (gtd GroupTaskDetails) AsRecoveryPlanGroupTaskDetails() (*RecoveryPlanGroupTaskDetails, bool) { 4833 return nil, false 4834} 4835 4836// AsRecoveryPlanShutdownGroupTaskDetails is the BasicGroupTaskDetails implementation for GroupTaskDetails. 4837func (gtd GroupTaskDetails) AsRecoveryPlanShutdownGroupTaskDetails() (*RecoveryPlanShutdownGroupTaskDetails, bool) { 4838 return nil, false 4839} 4840 4841// AsGroupTaskDetails is the BasicGroupTaskDetails implementation for GroupTaskDetails. 4842func (gtd GroupTaskDetails) AsGroupTaskDetails() (*GroupTaskDetails, bool) { 4843 return >d, true 4844} 4845 4846// AsBasicGroupTaskDetails is the BasicGroupTaskDetails implementation for GroupTaskDetails. 4847func (gtd GroupTaskDetails) AsBasicGroupTaskDetails() (BasicGroupTaskDetails, bool) { 4848 return >d, true 4849} 4850 4851// HealthError health Error 4852type HealthError struct { 4853 // InnerHealthErrors - The inner health errors. HealthError having a list of HealthError as child errors is problematic. InnerHealthError is used because this will prevent an infinite loop of structures when Hydra tries to auto-generate the contract. We are exposing the related health errors as inner health errors and all API consumers can utilize this in the same fashion as Exception -> InnerException. 4854 InnerHealthErrors *[]InnerHealthError `json:"innerHealthErrors,omitempty"` 4855 // ErrorSource - Source of error. 4856 ErrorSource *string `json:"errorSource,omitempty"` 4857 // ErrorType - Type of error. 4858 ErrorType *string `json:"errorType,omitempty"` 4859 // ErrorLevel - Level of error. 4860 ErrorLevel *string `json:"errorLevel,omitempty"` 4861 // ErrorCategory - Category of error. 4862 ErrorCategory *string `json:"errorCategory,omitempty"` 4863 // ErrorCode - Error code. 4864 ErrorCode *string `json:"errorCode,omitempty"` 4865 // SummaryMessage - Summary message of the entity. 4866 SummaryMessage *string `json:"summaryMessage,omitempty"` 4867 // ErrorMessage - Error message. 4868 ErrorMessage *string `json:"errorMessage,omitempty"` 4869 // PossibleCauses - Possible causes of error. 4870 PossibleCauses *string `json:"possibleCauses,omitempty"` 4871 // RecommendedAction - Recommended action to resolve error. 4872 RecommendedAction *string `json:"recommendedAction,omitempty"` 4873 // CreationTimeUtc - Error creation time (UTC) 4874 CreationTimeUtc *date.Time `json:"creationTimeUtc,omitempty"` 4875 // RecoveryProviderErrorMessage - DRA error message. 4876 RecoveryProviderErrorMessage *string `json:"recoveryProviderErrorMessage,omitempty"` 4877 // EntityID - ID of the entity. 4878 EntityID *string `json:"entityId,omitempty"` 4879} 4880 4881// HealthErrorSummary class to define the summary of the health error details. 4882type HealthErrorSummary struct { 4883 // SummaryCode - The code of the health error. 4884 SummaryCode *string `json:"summaryCode,omitempty"` 4885 // Category - The category of the health error. Possible values include: 'None', 'Replication', 'TestFailover', 'Configuration', 'FabricInfrastructure', 'VersionExpiry', 'AgentAutoUpdate' 4886 Category HealthErrorCategory `json:"category,omitempty"` 4887 // Severity - Severity of error. Possible values include: 'NONE', 'Warning', 'Error', 'Info' 4888 Severity Severity `json:"severity,omitempty"` 4889 // SummaryMessage - The summary message of the health error. 4890 SummaryMessage *string `json:"summaryMessage,omitempty"` 4891 // AffectedResourceType - The type of affected ARM resource. 4892 AffectedResourceType *string `json:"affectedResourceType,omitempty"` 4893 // AffectedResourceSubtype - The sub type of any subcomponent within the ARM resource that this might be applicable. Value remains null if not applicable. 4894 AffectedResourceSubtype *string `json:"affectedResourceSubtype,omitempty"` 4895 // AffectedResourceCorrelationIds - The list of affected resource correlation Ids. This can be used to uniquely identify the count of items affected by a specific category and severity as well as count of item affected by an specific issue. 4896 AffectedResourceCorrelationIds *[]string `json:"affectedResourceCorrelationIds,omitempty"` 4897} 4898 4899// HyperVReplica2012EventDetails model class for event details of a HyperVReplica E2E event. 4900type HyperVReplica2012EventDetails struct { 4901 // ContainerName - The container friendly name. 4902 ContainerName *string `json:"containerName,omitempty"` 4903 // FabricName - The fabric friendly name. 4904 FabricName *string `json:"fabricName,omitempty"` 4905 // RemoteContainerName - The remote container name. 4906 RemoteContainerName *string `json:"remoteContainerName,omitempty"` 4907 // RemoteFabricName - The remote fabric name. 4908 RemoteFabricName *string `json:"remoteFabricName,omitempty"` 4909 // InstanceType - Possible values include: 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeEventProviderSpecificDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaBaseEventDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeVMwareCbt' 4910 InstanceType InstanceTypeBasicEventProviderSpecificDetails `json:"instanceType,omitempty"` 4911} 4912 4913// MarshalJSON is the custom marshaler for HyperVReplica2012EventDetails. 4914func (hvr2ed HyperVReplica2012EventDetails) MarshalJSON() ([]byte, error) { 4915 hvr2ed.InstanceType = InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012 4916 objectMap := make(map[string]interface{}) 4917 if hvr2ed.ContainerName != nil { 4918 objectMap["containerName"] = hvr2ed.ContainerName 4919 } 4920 if hvr2ed.FabricName != nil { 4921 objectMap["fabricName"] = hvr2ed.FabricName 4922 } 4923 if hvr2ed.RemoteContainerName != nil { 4924 objectMap["remoteContainerName"] = hvr2ed.RemoteContainerName 4925 } 4926 if hvr2ed.RemoteFabricName != nil { 4927 objectMap["remoteFabricName"] = hvr2ed.RemoteFabricName 4928 } 4929 if hvr2ed.InstanceType != "" { 4930 objectMap["instanceType"] = hvr2ed.InstanceType 4931 } 4932 return json.Marshal(objectMap) 4933} 4934 4935// AsA2AEventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012EventDetails. 4936func (hvr2ed HyperVReplica2012EventDetails) AsA2AEventDetails() (*A2AEventDetails, bool) { 4937 return nil, false 4938} 4939 4940// AsHyperVReplica2012EventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012EventDetails. 4941func (hvr2ed HyperVReplica2012EventDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) { 4942 return &hvr2ed, true 4943} 4944 4945// AsHyperVReplica2012R2EventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012EventDetails. 4946func (hvr2ed HyperVReplica2012EventDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) { 4947 return nil, false 4948} 4949 4950// AsHyperVReplicaAzureEventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012EventDetails. 4951func (hvr2ed HyperVReplica2012EventDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) { 4952 return nil, false 4953} 4954 4955// AsHyperVReplicaBaseEventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012EventDetails. 4956func (hvr2ed HyperVReplica2012EventDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) { 4957 return nil, false 4958} 4959 4960// AsInMageAzureV2EventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012EventDetails. 4961func (hvr2ed HyperVReplica2012EventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) { 4962 return nil, false 4963} 4964 4965// AsVMwareCbtEventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012EventDetails. 4966func (hvr2ed HyperVReplica2012EventDetails) AsVMwareCbtEventDetails() (*VMwareCbtEventDetails, bool) { 4967 return nil, false 4968} 4969 4970// AsEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012EventDetails. 4971func (hvr2ed HyperVReplica2012EventDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) { 4972 return nil, false 4973} 4974 4975// AsBasicEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012EventDetails. 4976func (hvr2ed HyperVReplica2012EventDetails) AsBasicEventProviderSpecificDetails() (BasicEventProviderSpecificDetails, bool) { 4977 return &hvr2ed, true 4978} 4979 4980// HyperVReplica2012R2EventDetails model class for event details of a HyperVReplica blue E2E event. 4981type HyperVReplica2012R2EventDetails struct { 4982 // ContainerName - The container friendly name. 4983 ContainerName *string `json:"containerName,omitempty"` 4984 // FabricName - The fabric friendly name. 4985 FabricName *string `json:"fabricName,omitempty"` 4986 // RemoteContainerName - The remote container name. 4987 RemoteContainerName *string `json:"remoteContainerName,omitempty"` 4988 // RemoteFabricName - The remote fabric name. 4989 RemoteFabricName *string `json:"remoteFabricName,omitempty"` 4990 // InstanceType - Possible values include: 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeEventProviderSpecificDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaBaseEventDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeVMwareCbt' 4991 InstanceType InstanceTypeBasicEventProviderSpecificDetails `json:"instanceType,omitempty"` 4992} 4993 4994// MarshalJSON is the custom marshaler for HyperVReplica2012R2EventDetails. 4995func (hvr2ed HyperVReplica2012R2EventDetails) MarshalJSON() ([]byte, error) { 4996 hvr2ed.InstanceType = InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012R2 4997 objectMap := make(map[string]interface{}) 4998 if hvr2ed.ContainerName != nil { 4999 objectMap["containerName"] = hvr2ed.ContainerName 5000 } 5001 if hvr2ed.FabricName != nil { 5002 objectMap["fabricName"] = hvr2ed.FabricName 5003 } 5004 if hvr2ed.RemoteContainerName != nil { 5005 objectMap["remoteContainerName"] = hvr2ed.RemoteContainerName 5006 } 5007 if hvr2ed.RemoteFabricName != nil { 5008 objectMap["remoteFabricName"] = hvr2ed.RemoteFabricName 5009 } 5010 if hvr2ed.InstanceType != "" { 5011 objectMap["instanceType"] = hvr2ed.InstanceType 5012 } 5013 return json.Marshal(objectMap) 5014} 5015 5016// AsA2AEventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012R2EventDetails. 5017func (hvr2ed HyperVReplica2012R2EventDetails) AsA2AEventDetails() (*A2AEventDetails, bool) { 5018 return nil, false 5019} 5020 5021// AsHyperVReplica2012EventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012R2EventDetails. 5022func (hvr2ed HyperVReplica2012R2EventDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) { 5023 return nil, false 5024} 5025 5026// AsHyperVReplica2012R2EventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012R2EventDetails. 5027func (hvr2ed HyperVReplica2012R2EventDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) { 5028 return &hvr2ed, true 5029} 5030 5031// AsHyperVReplicaAzureEventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012R2EventDetails. 5032func (hvr2ed HyperVReplica2012R2EventDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) { 5033 return nil, false 5034} 5035 5036// AsHyperVReplicaBaseEventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012R2EventDetails. 5037func (hvr2ed HyperVReplica2012R2EventDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) { 5038 return nil, false 5039} 5040 5041// AsInMageAzureV2EventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012R2EventDetails. 5042func (hvr2ed HyperVReplica2012R2EventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) { 5043 return nil, false 5044} 5045 5046// AsVMwareCbtEventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012R2EventDetails. 5047func (hvr2ed HyperVReplica2012R2EventDetails) AsVMwareCbtEventDetails() (*VMwareCbtEventDetails, bool) { 5048 return nil, false 5049} 5050 5051// AsEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012R2EventDetails. 5052func (hvr2ed HyperVReplica2012R2EventDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) { 5053 return nil, false 5054} 5055 5056// AsBasicEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012R2EventDetails. 5057func (hvr2ed HyperVReplica2012R2EventDetails) AsBasicEventProviderSpecificDetails() (BasicEventProviderSpecificDetails, bool) { 5058 return &hvr2ed, true 5059} 5060 5061// HyperVReplicaAzureApplyRecoveryPointInput applyRecoveryPoint input specific to HyperVReplicaAzure 5062// provider. 5063type HyperVReplicaAzureApplyRecoveryPointInput struct { 5064 // VaultLocation - The vault location where the recovery Vm resides. 5065 VaultLocation *string `json:"vaultLocation,omitempty"` 5066 // PrimaryKekCertificatePfx - The primary kek certificate pfx. 5067 PrimaryKekCertificatePfx *string `json:"primaryKekCertificatePfx,omitempty"` 5068 // SecondaryKekCertificatePfx - The secondary kek certificate pfx. 5069 SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` 5070 // InstanceType - Possible values include: 'InstanceTypeApplyRecoveryPointProviderSpecificInput', 'InstanceTypeA2A', 'InstanceTypeHyperVReplicaAzure', 'InstanceTypeInMageAzureV2' 5071 InstanceType InstanceType `json:"instanceType,omitempty"` 5072} 5073 5074// MarshalJSON is the custom marshaler for HyperVReplicaAzureApplyRecoveryPointInput. 5075func (hvraarpi HyperVReplicaAzureApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { 5076 hvraarpi.InstanceType = InstanceTypeHyperVReplicaAzure 5077 objectMap := make(map[string]interface{}) 5078 if hvraarpi.VaultLocation != nil { 5079 objectMap["vaultLocation"] = hvraarpi.VaultLocation 5080 } 5081 if hvraarpi.PrimaryKekCertificatePfx != nil { 5082 objectMap["primaryKekCertificatePfx"] = hvraarpi.PrimaryKekCertificatePfx 5083 } 5084 if hvraarpi.SecondaryKekCertificatePfx != nil { 5085 objectMap["secondaryKekCertificatePfx"] = hvraarpi.SecondaryKekCertificatePfx 5086 } 5087 if hvraarpi.InstanceType != "" { 5088 objectMap["instanceType"] = hvraarpi.InstanceType 5089 } 5090 return json.Marshal(objectMap) 5091} 5092 5093// AsA2AApplyRecoveryPointInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for HyperVReplicaAzureApplyRecoveryPointInput. 5094func (hvraarpi HyperVReplicaAzureApplyRecoveryPointInput) AsA2AApplyRecoveryPointInput() (*A2AApplyRecoveryPointInput, bool) { 5095 return nil, false 5096} 5097 5098// AsHyperVReplicaAzureApplyRecoveryPointInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for HyperVReplicaAzureApplyRecoveryPointInput. 5099func (hvraarpi HyperVReplicaAzureApplyRecoveryPointInput) AsHyperVReplicaAzureApplyRecoveryPointInput() (*HyperVReplicaAzureApplyRecoveryPointInput, bool) { 5100 return &hvraarpi, true 5101} 5102 5103// AsInMageAzureV2ApplyRecoveryPointInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for HyperVReplicaAzureApplyRecoveryPointInput. 5104func (hvraarpi HyperVReplicaAzureApplyRecoveryPointInput) AsInMageAzureV2ApplyRecoveryPointInput() (*InMageAzureV2ApplyRecoveryPointInput, bool) { 5105 return nil, false 5106} 5107 5108// AsApplyRecoveryPointProviderSpecificInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for HyperVReplicaAzureApplyRecoveryPointInput. 5109func (hvraarpi HyperVReplicaAzureApplyRecoveryPointInput) AsApplyRecoveryPointProviderSpecificInput() (*ApplyRecoveryPointProviderSpecificInput, bool) { 5110 return nil, false 5111} 5112 5113// AsBasicApplyRecoveryPointProviderSpecificInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for HyperVReplicaAzureApplyRecoveryPointInput. 5114func (hvraarpi HyperVReplicaAzureApplyRecoveryPointInput) AsBasicApplyRecoveryPointProviderSpecificInput() (BasicApplyRecoveryPointProviderSpecificInput, bool) { 5115 return &hvraarpi, true 5116} 5117 5118// HyperVReplicaAzureEnableProtectionInput azure specific enable protection input. 5119type HyperVReplicaAzureEnableProtectionInput struct { 5120 // HvHostVMID - The Hyper-V host Vm Id. 5121 HvHostVMID *string `json:"hvHostVmId,omitempty"` 5122 // VMName - The Vm Name. 5123 VMName *string `json:"vmName,omitempty"` 5124 // OsType - The OS type associated with vm. 5125 OsType *string `json:"osType,omitempty"` 5126 // VhdID - The OS disk VHD id associated with vm. 5127 VhdID *string `json:"vhdId,omitempty"` 5128 // TargetStorageAccountID - The storage account name. 5129 TargetStorageAccountID *string `json:"targetStorageAccountId,omitempty"` 5130 // TargetAzureNetworkID - The selected target Azure network Id. 5131 TargetAzureNetworkID *string `json:"targetAzureNetworkId,omitempty"` 5132 // TargetAzureSubnetID - The selected target Azure subnet Id. 5133 TargetAzureSubnetID *string `json:"targetAzureSubnetId,omitempty"` 5134 // EnableRdpOnTargetOption - The selected option to enable RDP\SSH on target vm after failover. String value of {SrsDataContract.EnableRDPOnTargetOption} enum. 5135 EnableRdpOnTargetOption *string `json:"enableRdpOnTargetOption,omitempty"` 5136 // TargetAzureVMName - The target azure Vm Name. 5137 TargetAzureVMName *string `json:"targetAzureVmName,omitempty"` 5138 // LogStorageAccountID - The storage account to be used for logging during replication. 5139 LogStorageAccountID *string `json:"logStorageAccountId,omitempty"` 5140 // DisksToInclude - The list of VHD IDs of disks to be protected. 5141 DisksToInclude *[]string `json:"disksToInclude,omitempty"` 5142 // TargetAzureV1ResourceGroupID - The Id of the target resource group (for classic deployment) in which the failover VM is to be created. 5143 TargetAzureV1ResourceGroupID *string `json:"targetAzureV1ResourceGroupId,omitempty"` 5144 // TargetAzureV2ResourceGroupID - The Id of the target resource group (for resource manager deployment) in which the failover VM is to be created. 5145 TargetAzureV2ResourceGroupID *string `json:"targetAzureV2ResourceGroupId,omitempty"` 5146 // UseManagedDisks - A value indicating whether managed disks should be used during failover. 5147 UseManagedDisks *string `json:"useManagedDisks,omitempty"` 5148 // InstanceType - Possible values include: 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeEnableProtectionProviderSpecificInput', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeSan' 5149 InstanceType InstanceTypeBasicEnableProtectionProviderSpecificInput `json:"instanceType,omitempty"` 5150} 5151 5152// MarshalJSON is the custom marshaler for HyperVReplicaAzureEnableProtectionInput. 5153func (hvraepi HyperVReplicaAzureEnableProtectionInput) MarshalJSON() ([]byte, error) { 5154 hvraepi.InstanceType = InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeHyperVReplicaAzure 5155 objectMap := make(map[string]interface{}) 5156 if hvraepi.HvHostVMID != nil { 5157 objectMap["hvHostVmId"] = hvraepi.HvHostVMID 5158 } 5159 if hvraepi.VMName != nil { 5160 objectMap["vmName"] = hvraepi.VMName 5161 } 5162 if hvraepi.OsType != nil { 5163 objectMap["osType"] = hvraepi.OsType 5164 } 5165 if hvraepi.VhdID != nil { 5166 objectMap["vhdId"] = hvraepi.VhdID 5167 } 5168 if hvraepi.TargetStorageAccountID != nil { 5169 objectMap["targetStorageAccountId"] = hvraepi.TargetStorageAccountID 5170 } 5171 if hvraepi.TargetAzureNetworkID != nil { 5172 objectMap["targetAzureNetworkId"] = hvraepi.TargetAzureNetworkID 5173 } 5174 if hvraepi.TargetAzureSubnetID != nil { 5175 objectMap["targetAzureSubnetId"] = hvraepi.TargetAzureSubnetID 5176 } 5177 if hvraepi.EnableRdpOnTargetOption != nil { 5178 objectMap["enableRdpOnTargetOption"] = hvraepi.EnableRdpOnTargetOption 5179 } 5180 if hvraepi.TargetAzureVMName != nil { 5181 objectMap["targetAzureVmName"] = hvraepi.TargetAzureVMName 5182 } 5183 if hvraepi.LogStorageAccountID != nil { 5184 objectMap["logStorageAccountId"] = hvraepi.LogStorageAccountID 5185 } 5186 if hvraepi.DisksToInclude != nil { 5187 objectMap["disksToInclude"] = hvraepi.DisksToInclude 5188 } 5189 if hvraepi.TargetAzureV1ResourceGroupID != nil { 5190 objectMap["targetAzureV1ResourceGroupId"] = hvraepi.TargetAzureV1ResourceGroupID 5191 } 5192 if hvraepi.TargetAzureV2ResourceGroupID != nil { 5193 objectMap["targetAzureV2ResourceGroupId"] = hvraepi.TargetAzureV2ResourceGroupID 5194 } 5195 if hvraepi.UseManagedDisks != nil { 5196 objectMap["useManagedDisks"] = hvraepi.UseManagedDisks 5197 } 5198 if hvraepi.InstanceType != "" { 5199 objectMap["instanceType"] = hvraepi.InstanceType 5200 } 5201 return json.Marshal(objectMap) 5202} 5203 5204// AsA2AEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for HyperVReplicaAzureEnableProtectionInput. 5205func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool) { 5206 return nil, false 5207} 5208 5209// AsHyperVReplicaAzureEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for HyperVReplicaAzureEnableProtectionInput. 5210func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool) { 5211 return &hvraepi, true 5212} 5213 5214// AsInMageAzureV2EnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for HyperVReplicaAzureEnableProtectionInput. 5215func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool) { 5216 return nil, false 5217} 5218 5219// AsInMageEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for HyperVReplicaAzureEnableProtectionInput. 5220func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool) { 5221 return nil, false 5222} 5223 5224// AsSanEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for HyperVReplicaAzureEnableProtectionInput. 5225func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool) { 5226 return nil, false 5227} 5228 5229// AsEnableProtectionProviderSpecificInput is the BasicEnableProtectionProviderSpecificInput implementation for HyperVReplicaAzureEnableProtectionInput. 5230func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsEnableProtectionProviderSpecificInput() (*EnableProtectionProviderSpecificInput, bool) { 5231 return nil, false 5232} 5233 5234// AsBasicEnableProtectionProviderSpecificInput is the BasicEnableProtectionProviderSpecificInput implementation for HyperVReplicaAzureEnableProtectionInput. 5235func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsBasicEnableProtectionProviderSpecificInput() (BasicEnableProtectionProviderSpecificInput, bool) { 5236 return &hvraepi, true 5237} 5238 5239// HyperVReplicaAzureEventDetails model class for event details of a HyperVReplica E2A event. 5240type HyperVReplicaAzureEventDetails struct { 5241 // ContainerName - The container friendly name. 5242 ContainerName *string `json:"containerName,omitempty"` 5243 // FabricName - The fabric friendly name. 5244 FabricName *string `json:"fabricName,omitempty"` 5245 // RemoteContainerName - The remote container name. 5246 RemoteContainerName *string `json:"remoteContainerName,omitempty"` 5247 // InstanceType - Possible values include: 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeEventProviderSpecificDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaBaseEventDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeVMwareCbt' 5248 InstanceType InstanceTypeBasicEventProviderSpecificDetails `json:"instanceType,omitempty"` 5249} 5250 5251// MarshalJSON is the custom marshaler for HyperVReplicaAzureEventDetails. 5252func (hvraed HyperVReplicaAzureEventDetails) MarshalJSON() ([]byte, error) { 5253 hvraed.InstanceType = InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaAzure 5254 objectMap := make(map[string]interface{}) 5255 if hvraed.ContainerName != nil { 5256 objectMap["containerName"] = hvraed.ContainerName 5257 } 5258 if hvraed.FabricName != nil { 5259 objectMap["fabricName"] = hvraed.FabricName 5260 } 5261 if hvraed.RemoteContainerName != nil { 5262 objectMap["remoteContainerName"] = hvraed.RemoteContainerName 5263 } 5264 if hvraed.InstanceType != "" { 5265 objectMap["instanceType"] = hvraed.InstanceType 5266 } 5267 return json.Marshal(objectMap) 5268} 5269 5270// AsA2AEventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaAzureEventDetails. 5271func (hvraed HyperVReplicaAzureEventDetails) AsA2AEventDetails() (*A2AEventDetails, bool) { 5272 return nil, false 5273} 5274 5275// AsHyperVReplica2012EventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaAzureEventDetails. 5276func (hvraed HyperVReplicaAzureEventDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) { 5277 return nil, false 5278} 5279 5280// AsHyperVReplica2012R2EventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaAzureEventDetails. 5281func (hvraed HyperVReplicaAzureEventDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) { 5282 return nil, false 5283} 5284 5285// AsHyperVReplicaAzureEventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaAzureEventDetails. 5286func (hvraed HyperVReplicaAzureEventDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) { 5287 return &hvraed, true 5288} 5289 5290// AsHyperVReplicaBaseEventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaAzureEventDetails. 5291func (hvraed HyperVReplicaAzureEventDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) { 5292 return nil, false 5293} 5294 5295// AsInMageAzureV2EventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaAzureEventDetails. 5296func (hvraed HyperVReplicaAzureEventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) { 5297 return nil, false 5298} 5299 5300// AsVMwareCbtEventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaAzureEventDetails. 5301func (hvraed HyperVReplicaAzureEventDetails) AsVMwareCbtEventDetails() (*VMwareCbtEventDetails, bool) { 5302 return nil, false 5303} 5304 5305// AsEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaAzureEventDetails. 5306func (hvraed HyperVReplicaAzureEventDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) { 5307 return nil, false 5308} 5309 5310// AsBasicEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaAzureEventDetails. 5311func (hvraed HyperVReplicaAzureEventDetails) AsBasicEventProviderSpecificDetails() (BasicEventProviderSpecificDetails, bool) { 5312 return &hvraed, true 5313} 5314 5315// HyperVReplicaAzureFailbackProviderInput hvrA provider specific input for failback. 5316type HyperVReplicaAzureFailbackProviderInput struct { 5317 // DataSyncOption - Data sync option. 5318 DataSyncOption *string `json:"dataSyncOption,omitempty"` 5319 // RecoveryVMCreationOption - ALR options to create alternate recovery. 5320 RecoveryVMCreationOption *string `json:"recoveryVmCreationOption,omitempty"` 5321 // ProviderIDForAlternateRecovery - Provider ID for alternate location 5322 ProviderIDForAlternateRecovery *string `json:"providerIdForAlternateRecovery,omitempty"` 5323 // InstanceType - Possible values include: 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeProviderSpecificFailoverInput', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeA2A', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMage' 5324 InstanceType InstanceTypeBasicProviderSpecificFailoverInput `json:"instanceType,omitempty"` 5325} 5326 5327// MarshalJSON is the custom marshaler for HyperVReplicaAzureFailbackProviderInput. 5328func (hvrafpi HyperVReplicaAzureFailbackProviderInput) MarshalJSON() ([]byte, error) { 5329 hvrafpi.InstanceType = InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback 5330 objectMap := make(map[string]interface{}) 5331 if hvrafpi.DataSyncOption != nil { 5332 objectMap["dataSyncOption"] = hvrafpi.DataSyncOption 5333 } 5334 if hvrafpi.RecoveryVMCreationOption != nil { 5335 objectMap["recoveryVmCreationOption"] = hvrafpi.RecoveryVMCreationOption 5336 } 5337 if hvrafpi.ProviderIDForAlternateRecovery != nil { 5338 objectMap["providerIdForAlternateRecovery"] = hvrafpi.ProviderIDForAlternateRecovery 5339 } 5340 if hvrafpi.InstanceType != "" { 5341 objectMap["instanceType"] = hvrafpi.InstanceType 5342 } 5343 return json.Marshal(objectMap) 5344} 5345 5346// AsA2AFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailbackProviderInput. 5347func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool) { 5348 return nil, false 5349} 5350 5351// AsHyperVReplicaAzureFailbackProviderInput is the BasicProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailbackProviderInput. 5352func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool) { 5353 return &hvrafpi, true 5354} 5355 5356// AsHyperVReplicaAzureFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailbackProviderInput. 5357func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool) { 5358 return nil, false 5359} 5360 5361// AsInMageAzureV2FailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailbackProviderInput. 5362func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool) { 5363 return nil, false 5364} 5365 5366// AsInMageFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailbackProviderInput. 5367func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool) { 5368 return nil, false 5369} 5370 5371// AsProviderSpecificFailoverInput is the BasicProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailbackProviderInput. 5372func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsProviderSpecificFailoverInput() (*ProviderSpecificFailoverInput, bool) { 5373 return nil, false 5374} 5375 5376// AsBasicProviderSpecificFailoverInput is the BasicProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailbackProviderInput. 5377func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsBasicProviderSpecificFailoverInput() (BasicProviderSpecificFailoverInput, bool) { 5378 return &hvrafpi, true 5379} 5380 5381// HyperVReplicaAzureFailoverProviderInput hvrA provider specific input for failover. 5382type HyperVReplicaAzureFailoverProviderInput struct { 5383 // VaultLocation - Location of the vault. 5384 VaultLocation *string `json:"vaultLocation,omitempty"` 5385 // PrimaryKekCertificatePfx - Primary kek certificate pfx. 5386 PrimaryKekCertificatePfx *string `json:"primaryKekCertificatePfx,omitempty"` 5387 // SecondaryKekCertificatePfx - Secondary kek certificate pfx. 5388 SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` 5389 // RecoveryPointID - The recovery point id to be passed to failover to a particular recovery point. In case of latest recovery point, null should be passed. 5390 RecoveryPointID *string `json:"recoveryPointId,omitempty"` 5391 // InstanceType - Possible values include: 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeProviderSpecificFailoverInput', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeA2A', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMage' 5392 InstanceType InstanceTypeBasicProviderSpecificFailoverInput `json:"instanceType,omitempty"` 5393} 5394 5395// MarshalJSON is the custom marshaler for HyperVReplicaAzureFailoverProviderInput. 5396func (hvrafpi HyperVReplicaAzureFailoverProviderInput) MarshalJSON() ([]byte, error) { 5397 hvrafpi.InstanceType = InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure 5398 objectMap := make(map[string]interface{}) 5399 if hvrafpi.VaultLocation != nil { 5400 objectMap["vaultLocation"] = hvrafpi.VaultLocation 5401 } 5402 if hvrafpi.PrimaryKekCertificatePfx != nil { 5403 objectMap["primaryKekCertificatePfx"] = hvrafpi.PrimaryKekCertificatePfx 5404 } 5405 if hvrafpi.SecondaryKekCertificatePfx != nil { 5406 objectMap["secondaryKekCertificatePfx"] = hvrafpi.SecondaryKekCertificatePfx 5407 } 5408 if hvrafpi.RecoveryPointID != nil { 5409 objectMap["recoveryPointId"] = hvrafpi.RecoveryPointID 5410 } 5411 if hvrafpi.InstanceType != "" { 5412 objectMap["instanceType"] = hvrafpi.InstanceType 5413 } 5414 return json.Marshal(objectMap) 5415} 5416 5417// AsA2AFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailoverProviderInput. 5418func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool) { 5419 return nil, false 5420} 5421 5422// AsHyperVReplicaAzureFailbackProviderInput is the BasicProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailoverProviderInput. 5423func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool) { 5424 return nil, false 5425} 5426 5427// AsHyperVReplicaAzureFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailoverProviderInput. 5428func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool) { 5429 return &hvrafpi, true 5430} 5431 5432// AsInMageAzureV2FailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailoverProviderInput. 5433func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool) { 5434 return nil, false 5435} 5436 5437// AsInMageFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailoverProviderInput. 5438func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool) { 5439 return nil, false 5440} 5441 5442// AsProviderSpecificFailoverInput is the BasicProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailoverProviderInput. 5443func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsProviderSpecificFailoverInput() (*ProviderSpecificFailoverInput, bool) { 5444 return nil, false 5445} 5446 5447// AsBasicProviderSpecificFailoverInput is the BasicProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailoverProviderInput. 5448func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsBasicProviderSpecificFailoverInput() (BasicProviderSpecificFailoverInput, bool) { 5449 return &hvrafpi, true 5450} 5451 5452// HyperVReplicaAzurePolicyDetails hyper-V Replica Azure specific protection profile details. 5453type HyperVReplicaAzurePolicyDetails struct { 5454 // RecoveryPointHistoryDurationInHours - The duration (in hours) to which point the recovery history needs to be maintained. 5455 RecoveryPointHistoryDurationInHours *int32 `json:"recoveryPointHistoryDurationInHours,omitempty"` 5456 // ApplicationConsistentSnapshotFrequencyInHours - The interval (in hours) at which Hyper-V Replica should create an application consistent snapshot within the VM. 5457 ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` 5458 // ReplicationInterval - The replication interval. 5459 ReplicationInterval *int32 `json:"replicationInterval,omitempty"` 5460 // OnlineReplicationStartTime - The scheduled start time for the initial replication. If this parameter is Null, the initial replication starts immediately. 5461 OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` 5462 // Encryption - A value indicating whether encryption is enabled for virtual machines in this cloud. 5463 Encryption *string `json:"encryption,omitempty"` 5464 // ActiveStorageAccountID - The active storage account Id. 5465 ActiveStorageAccountID *string `json:"activeStorageAccountId,omitempty"` 5466 // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypePolicyProviderSpecificDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt' 5467 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"` 5468} 5469 5470// MarshalJSON is the custom marshaler for HyperVReplicaAzurePolicyDetails. 5471func (hvrapd HyperVReplicaAzurePolicyDetails) MarshalJSON() ([]byte, error) { 5472 hvrapd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure 5473 objectMap := make(map[string]interface{}) 5474 if hvrapd.RecoveryPointHistoryDurationInHours != nil { 5475 objectMap["recoveryPointHistoryDurationInHours"] = hvrapd.RecoveryPointHistoryDurationInHours 5476 } 5477 if hvrapd.ApplicationConsistentSnapshotFrequencyInHours != nil { 5478 objectMap["applicationConsistentSnapshotFrequencyInHours"] = hvrapd.ApplicationConsistentSnapshotFrequencyInHours 5479 } 5480 if hvrapd.ReplicationInterval != nil { 5481 objectMap["replicationInterval"] = hvrapd.ReplicationInterval 5482 } 5483 if hvrapd.OnlineReplicationStartTime != nil { 5484 objectMap["onlineReplicationStartTime"] = hvrapd.OnlineReplicationStartTime 5485 } 5486 if hvrapd.Encryption != nil { 5487 objectMap["encryption"] = hvrapd.Encryption 5488 } 5489 if hvrapd.ActiveStorageAccountID != nil { 5490 objectMap["activeStorageAccountId"] = hvrapd.ActiveStorageAccountID 5491 } 5492 if hvrapd.InstanceType != "" { 5493 objectMap["instanceType"] = hvrapd.InstanceType 5494 } 5495 return json.Marshal(objectMap) 5496} 5497 5498// AsA2APolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaAzurePolicyDetails. 5499func (hvrapd HyperVReplicaAzurePolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) { 5500 return nil, false 5501} 5502 5503// AsHyperVReplicaAzurePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaAzurePolicyDetails. 5504func (hvrapd HyperVReplicaAzurePolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) { 5505 return &hvrapd, true 5506} 5507 5508// AsHyperVReplicaBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaAzurePolicyDetails. 5509func (hvrapd HyperVReplicaAzurePolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) { 5510 return nil, false 5511} 5512 5513// AsHyperVReplicaBluePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaAzurePolicyDetails. 5514func (hvrapd HyperVReplicaAzurePolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) { 5515 return nil, false 5516} 5517 5518// AsHyperVReplicaPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaAzurePolicyDetails. 5519func (hvrapd HyperVReplicaAzurePolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) { 5520 return nil, false 5521} 5522 5523// AsInMageAzureV2PolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaAzurePolicyDetails. 5524func (hvrapd HyperVReplicaAzurePolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) { 5525 return nil, false 5526} 5527 5528// AsInMageBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaAzurePolicyDetails. 5529func (hvrapd HyperVReplicaAzurePolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) { 5530 return nil, false 5531} 5532 5533// AsInMagePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaAzurePolicyDetails. 5534func (hvrapd HyperVReplicaAzurePolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) { 5535 return nil, false 5536} 5537 5538// AsRcmAzureMigrationPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaAzurePolicyDetails. 5539func (hvrapd HyperVReplicaAzurePolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) { 5540 return nil, false 5541} 5542 5543// AsVmwareCbtPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaAzurePolicyDetails. 5544func (hvrapd HyperVReplicaAzurePolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) { 5545 return nil, false 5546} 5547 5548// AsPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaAzurePolicyDetails. 5549func (hvrapd HyperVReplicaAzurePolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) { 5550 return nil, false 5551} 5552 5553// AsBasicPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaAzurePolicyDetails. 5554func (hvrapd HyperVReplicaAzurePolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) { 5555 return &hvrapd, true 5556} 5557 5558// HyperVReplicaAzurePolicyInput hyper-V Replica Azure specific input for creating a protection profile. 5559type HyperVReplicaAzurePolicyInput struct { 5560 // RecoveryPointHistoryDuration - The duration (in hours) to which point the recovery history needs to be maintained. 5561 RecoveryPointHistoryDuration *int32 `json:"recoveryPointHistoryDuration,omitempty"` 5562 // ApplicationConsistentSnapshotFrequencyInHours - The interval (in hours) at which Hyper-V Replica should create an application consistent snapshot within the VM. 5563 ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` 5564 // ReplicationInterval - The replication interval. 5565 ReplicationInterval *int32 `json:"replicationInterval,omitempty"` 5566 // OnlineReplicationStartTime - The scheduled start time for the initial replication. If this parameter is Null, the initial replication starts immediately. 5567 OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` 5568 // StorageAccounts - The list of storage accounts to which the VMs in the primary cloud can replicate to. 5569 StorageAccounts *[]string `json:"storageAccounts,omitempty"` 5570 // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypePolicyProviderSpecificInput', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeVMwareCbt' 5571 InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"` 5572} 5573 5574// MarshalJSON is the custom marshaler for HyperVReplicaAzurePolicyInput. 5575func (hvrapi HyperVReplicaAzurePolicyInput) MarshalJSON() ([]byte, error) { 5576 hvrapi.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplicaAzure 5577 objectMap := make(map[string]interface{}) 5578 if hvrapi.RecoveryPointHistoryDuration != nil { 5579 objectMap["recoveryPointHistoryDuration"] = hvrapi.RecoveryPointHistoryDuration 5580 } 5581 if hvrapi.ApplicationConsistentSnapshotFrequencyInHours != nil { 5582 objectMap["applicationConsistentSnapshotFrequencyInHours"] = hvrapi.ApplicationConsistentSnapshotFrequencyInHours 5583 } 5584 if hvrapi.ReplicationInterval != nil { 5585 objectMap["replicationInterval"] = hvrapi.ReplicationInterval 5586 } 5587 if hvrapi.OnlineReplicationStartTime != nil { 5588 objectMap["onlineReplicationStartTime"] = hvrapi.OnlineReplicationStartTime 5589 } 5590 if hvrapi.StorageAccounts != nil { 5591 objectMap["storageAccounts"] = hvrapi.StorageAccounts 5592 } 5593 if hvrapi.InstanceType != "" { 5594 objectMap["instanceType"] = hvrapi.InstanceType 5595 } 5596 return json.Marshal(objectMap) 5597} 5598 5599// AsA2APolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaAzurePolicyInput. 5600func (hvrapi HyperVReplicaAzurePolicyInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) { 5601 return nil, false 5602} 5603 5604// AsHyperVReplicaAzurePolicyInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaAzurePolicyInput. 5605func (hvrapi HyperVReplicaAzurePolicyInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) { 5606 return &hvrapi, true 5607} 5608 5609// AsHyperVReplicaBluePolicyInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaAzurePolicyInput. 5610func (hvrapi HyperVReplicaAzurePolicyInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) { 5611 return nil, false 5612} 5613 5614// AsHyperVReplicaPolicyInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaAzurePolicyInput. 5615func (hvrapi HyperVReplicaAzurePolicyInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) { 5616 return nil, false 5617} 5618 5619// AsInMageAzureV2PolicyInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaAzurePolicyInput. 5620func (hvrapi HyperVReplicaAzurePolicyInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) { 5621 return nil, false 5622} 5623 5624// AsInMagePolicyInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaAzurePolicyInput. 5625func (hvrapi HyperVReplicaAzurePolicyInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) { 5626 return nil, false 5627} 5628 5629// AsVMwareCbtPolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaAzurePolicyInput. 5630func (hvrapi HyperVReplicaAzurePolicyInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) { 5631 return nil, false 5632} 5633 5634// AsPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaAzurePolicyInput. 5635func (hvrapi HyperVReplicaAzurePolicyInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) { 5636 return nil, false 5637} 5638 5639// AsBasicPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaAzurePolicyInput. 5640func (hvrapi HyperVReplicaAzurePolicyInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) { 5641 return &hvrapi, true 5642} 5643 5644// HyperVReplicaAzureReplicationDetails hyper V Replica Azure provider specific settings. 5645type HyperVReplicaAzureReplicationDetails struct { 5646 // AzureVMDiskDetails - Azure VM Disk details. 5647 AzureVMDiskDetails *[]AzureVMDiskDetails `json:"azureVmDiskDetails,omitempty"` 5648 // RecoveryAzureVMName - Recovery Azure given name. 5649 RecoveryAzureVMName *string `json:"recoveryAzureVmName,omitempty"` 5650 // RecoveryAzureVMSize - The Recovery Azure VM size. 5651 RecoveryAzureVMSize *string `json:"recoveryAzureVMSize,omitempty"` 5652 // RecoveryAzureStorageAccount - The recovery Azure storage account. 5653 RecoveryAzureStorageAccount *string `json:"recoveryAzureStorageAccount,omitempty"` 5654 // RecoveryAzureLogStorageAccountID - The ARM id of the log storage account used for replication. This will be set to null if no log storage account was provided during enable protection. 5655 RecoveryAzureLogStorageAccountID *string `json:"recoveryAzureLogStorageAccountId,omitempty"` 5656 // LastReplicatedTime - The Last replication time. 5657 LastReplicatedTime *date.Time `json:"lastReplicatedTime,omitempty"` 5658 // RpoInSeconds - Last RPO value. 5659 RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"` 5660 // LastRpoCalculatedTime - The last RPO calculated time. 5661 LastRpoCalculatedTime *date.Time `json:"lastRpoCalculatedTime,omitempty"` 5662 // VMID - The virtual machine Id. 5663 VMID *string `json:"vmId,omitempty"` 5664 // VMProtectionState - The protection state for the vm. 5665 VMProtectionState *string `json:"vmProtectionState,omitempty"` 5666 // VMProtectionStateDescription - The protection state description for the vm. 5667 VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` 5668 // InitialReplicationDetails - Initial replication details. 5669 InitialReplicationDetails *InitialReplicationDetails `json:"initialReplicationDetails,omitempty"` 5670 // VMNics - The PE Network details. 5671 VMNics *[]VMNicDetails `json:"vmNics,omitempty"` 5672 // SelectedRecoveryAzureNetworkID - The selected recovery azure network Id. 5673 SelectedRecoveryAzureNetworkID *string `json:"selectedRecoveryAzureNetworkId,omitempty"` 5674 // SelectedSourceNicID - The selected source nic Id which will be used as the primary nic during failover. 5675 SelectedSourceNicID *string `json:"selectedSourceNicId,omitempty"` 5676 // Encryption - The encryption info. 5677 Encryption *string `json:"encryption,omitempty"` 5678 // OSDetails - The operating system info. 5679 OSDetails *OSDetails `json:"oSDetails,omitempty"` 5680 // SourceVMRAMSizeInMB - The RAM size of the VM on the primary side. 5681 SourceVMRAMSizeInMB *int32 `json:"sourceVmRamSizeInMB,omitempty"` 5682 // SourceVMCPUCount - The CPU count of the VM on the primary side. 5683 SourceVMCPUCount *int32 `json:"sourceVmCpuCount,omitempty"` 5684 // EnableRdpOnTargetOption - The selected option to enable RDP\SSH on target vm after failover. String value of {SrsDataContract.EnableRDPOnTargetOption} enum. 5685 EnableRdpOnTargetOption *string `json:"enableRdpOnTargetOption,omitempty"` 5686 // RecoveryAzureResourceGroupID - The target resource group Id. 5687 RecoveryAzureResourceGroupID *string `json:"recoveryAzureResourceGroupId,omitempty"` 5688 // RecoveryAvailabilitySetID - The recovery availability set Id. 5689 RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"` 5690 // UseManagedDisks - A value indicating whether managed disks should be used during failover. 5691 UseManagedDisks *string `json:"useManagedDisks,omitempty"` 5692 // LicenseType - License Type of the VM to be used. 5693 LicenseType *string `json:"licenseType,omitempty"` 5694 // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeReplicationProviderSpecificSettings', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeA2A', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaBaseReplicationDetails', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMageAzureV2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMage' 5695 InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"` 5696} 5697 5698// MarshalJSON is the custom marshaler for HyperVReplicaAzureReplicationDetails. 5699func (hvrard HyperVReplicaAzureReplicationDetails) MarshalJSON() ([]byte, error) { 5700 hvrard.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaAzure 5701 objectMap := make(map[string]interface{}) 5702 if hvrard.AzureVMDiskDetails != nil { 5703 objectMap["azureVmDiskDetails"] = hvrard.AzureVMDiskDetails 5704 } 5705 if hvrard.RecoveryAzureVMName != nil { 5706 objectMap["recoveryAzureVmName"] = hvrard.RecoveryAzureVMName 5707 } 5708 if hvrard.RecoveryAzureVMSize != nil { 5709 objectMap["recoveryAzureVMSize"] = hvrard.RecoveryAzureVMSize 5710 } 5711 if hvrard.RecoveryAzureStorageAccount != nil { 5712 objectMap["recoveryAzureStorageAccount"] = hvrard.RecoveryAzureStorageAccount 5713 } 5714 if hvrard.RecoveryAzureLogStorageAccountID != nil { 5715 objectMap["recoveryAzureLogStorageAccountId"] = hvrard.RecoveryAzureLogStorageAccountID 5716 } 5717 if hvrard.LastReplicatedTime != nil { 5718 objectMap["lastReplicatedTime"] = hvrard.LastReplicatedTime 5719 } 5720 if hvrard.RpoInSeconds != nil { 5721 objectMap["rpoInSeconds"] = hvrard.RpoInSeconds 5722 } 5723 if hvrard.LastRpoCalculatedTime != nil { 5724 objectMap["lastRpoCalculatedTime"] = hvrard.LastRpoCalculatedTime 5725 } 5726 if hvrard.VMID != nil { 5727 objectMap["vmId"] = hvrard.VMID 5728 } 5729 if hvrard.VMProtectionState != nil { 5730 objectMap["vmProtectionState"] = hvrard.VMProtectionState 5731 } 5732 if hvrard.VMProtectionStateDescription != nil { 5733 objectMap["vmProtectionStateDescription"] = hvrard.VMProtectionStateDescription 5734 } 5735 if hvrard.InitialReplicationDetails != nil { 5736 objectMap["initialReplicationDetails"] = hvrard.InitialReplicationDetails 5737 } 5738 if hvrard.VMNics != nil { 5739 objectMap["vmNics"] = hvrard.VMNics 5740 } 5741 if hvrard.SelectedRecoveryAzureNetworkID != nil { 5742 objectMap["selectedRecoveryAzureNetworkId"] = hvrard.SelectedRecoveryAzureNetworkID 5743 } 5744 if hvrard.SelectedSourceNicID != nil { 5745 objectMap["selectedSourceNicId"] = hvrard.SelectedSourceNicID 5746 } 5747 if hvrard.Encryption != nil { 5748 objectMap["encryption"] = hvrard.Encryption 5749 } 5750 if hvrard.OSDetails != nil { 5751 objectMap["oSDetails"] = hvrard.OSDetails 5752 } 5753 if hvrard.SourceVMRAMSizeInMB != nil { 5754 objectMap["sourceVmRamSizeInMB"] = hvrard.SourceVMRAMSizeInMB 5755 } 5756 if hvrard.SourceVMCPUCount != nil { 5757 objectMap["sourceVmCpuCount"] = hvrard.SourceVMCPUCount 5758 } 5759 if hvrard.EnableRdpOnTargetOption != nil { 5760 objectMap["enableRdpOnTargetOption"] = hvrard.EnableRdpOnTargetOption 5761 } 5762 if hvrard.RecoveryAzureResourceGroupID != nil { 5763 objectMap["recoveryAzureResourceGroupId"] = hvrard.RecoveryAzureResourceGroupID 5764 } 5765 if hvrard.RecoveryAvailabilitySetID != nil { 5766 objectMap["recoveryAvailabilitySetId"] = hvrard.RecoveryAvailabilitySetID 5767 } 5768 if hvrard.UseManagedDisks != nil { 5769 objectMap["useManagedDisks"] = hvrard.UseManagedDisks 5770 } 5771 if hvrard.LicenseType != nil { 5772 objectMap["licenseType"] = hvrard.LicenseType 5773 } 5774 if hvrard.InstanceType != "" { 5775 objectMap["instanceType"] = hvrard.InstanceType 5776 } 5777 return json.Marshal(objectMap) 5778} 5779 5780// AsA2AReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaAzureReplicationDetails. 5781func (hvrard HyperVReplicaAzureReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) { 5782 return nil, false 5783} 5784 5785// AsHyperVReplicaAzureReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaAzureReplicationDetails. 5786func (hvrard HyperVReplicaAzureReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) { 5787 return &hvrard, true 5788} 5789 5790// AsHyperVReplicaBaseReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaAzureReplicationDetails. 5791func (hvrard HyperVReplicaAzureReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) { 5792 return nil, false 5793} 5794 5795// AsHyperVReplicaBlueReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaAzureReplicationDetails. 5796func (hvrard HyperVReplicaAzureReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) { 5797 return nil, false 5798} 5799 5800// AsHyperVReplicaReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaAzureReplicationDetails. 5801func (hvrard HyperVReplicaAzureReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) { 5802 return nil, false 5803} 5804 5805// AsInMageAzureV2ReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaAzureReplicationDetails. 5806func (hvrard HyperVReplicaAzureReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) { 5807 return nil, false 5808} 5809 5810// AsInMageReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaAzureReplicationDetails. 5811func (hvrard HyperVReplicaAzureReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) { 5812 return nil, false 5813} 5814 5815// AsReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaAzureReplicationDetails. 5816func (hvrard HyperVReplicaAzureReplicationDetails) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) { 5817 return nil, false 5818} 5819 5820// AsBasicReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaAzureReplicationDetails. 5821func (hvrard HyperVReplicaAzureReplicationDetails) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) { 5822 return &hvrard, true 5823} 5824 5825// HyperVReplicaAzureReprotectInput azure specific reprotect input. 5826type HyperVReplicaAzureReprotectInput struct { 5827 // HvHostVMID - The Hyper-V host Vm Id. 5828 HvHostVMID *string `json:"hvHostVmId,omitempty"` 5829 // VMName - The Vm Name. 5830 VMName *string `json:"vmName,omitempty"` 5831 // OsType - The OS type associated with vm. 5832 OsType *string `json:"osType,omitempty"` 5833 // VHDID - The OS disk VHD id associated with vm. 5834 VHDID *string `json:"vHDId,omitempty"` 5835 // StorageAccountID - The storage account name. 5836 StorageAccountID *string `json:"storageAccountId,omitempty"` 5837 // LogStorageAccountID - The storage account to be used for logging during replication. 5838 LogStorageAccountID *string `json:"logStorageAccountId,omitempty"` 5839 // InstanceType - Possible values include: 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeReverseReplicationProviderSpecificInput', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMage' 5840 InstanceType InstanceTypeBasicReverseReplicationProviderSpecificInput `json:"instanceType,omitempty"` 5841} 5842 5843// MarshalJSON is the custom marshaler for HyperVReplicaAzureReprotectInput. 5844func (hvrari HyperVReplicaAzureReprotectInput) MarshalJSON() ([]byte, error) { 5845 hvrari.InstanceType = InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeHyperVReplicaAzure 5846 objectMap := make(map[string]interface{}) 5847 if hvrari.HvHostVMID != nil { 5848 objectMap["hvHostVmId"] = hvrari.HvHostVMID 5849 } 5850 if hvrari.VMName != nil { 5851 objectMap["vmName"] = hvrari.VMName 5852 } 5853 if hvrari.OsType != nil { 5854 objectMap["osType"] = hvrari.OsType 5855 } 5856 if hvrari.VHDID != nil { 5857 objectMap["vHDId"] = hvrari.VHDID 5858 } 5859 if hvrari.StorageAccountID != nil { 5860 objectMap["storageAccountId"] = hvrari.StorageAccountID 5861 } 5862 if hvrari.LogStorageAccountID != nil { 5863 objectMap["logStorageAccountId"] = hvrari.LogStorageAccountID 5864 } 5865 if hvrari.InstanceType != "" { 5866 objectMap["instanceType"] = hvrari.InstanceType 5867 } 5868 return json.Marshal(objectMap) 5869} 5870 5871// AsA2AReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for HyperVReplicaAzureReprotectInput. 5872func (hvrari HyperVReplicaAzureReprotectInput) AsA2AReprotectInput() (*A2AReprotectInput, bool) { 5873 return nil, false 5874} 5875 5876// AsHyperVReplicaAzureReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for HyperVReplicaAzureReprotectInput. 5877func (hvrari HyperVReplicaAzureReprotectInput) AsHyperVReplicaAzureReprotectInput() (*HyperVReplicaAzureReprotectInput, bool) { 5878 return &hvrari, true 5879} 5880 5881// AsInMageAzureV2ReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for HyperVReplicaAzureReprotectInput. 5882func (hvrari HyperVReplicaAzureReprotectInput) AsInMageAzureV2ReprotectInput() (*InMageAzureV2ReprotectInput, bool) { 5883 return nil, false 5884} 5885 5886// AsInMageReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for HyperVReplicaAzureReprotectInput. 5887func (hvrari HyperVReplicaAzureReprotectInput) AsInMageReprotectInput() (*InMageReprotectInput, bool) { 5888 return nil, false 5889} 5890 5891// AsReverseReplicationProviderSpecificInput is the BasicReverseReplicationProviderSpecificInput implementation for HyperVReplicaAzureReprotectInput. 5892func (hvrari HyperVReplicaAzureReprotectInput) AsReverseReplicationProviderSpecificInput() (*ReverseReplicationProviderSpecificInput, bool) { 5893 return nil, false 5894} 5895 5896// AsBasicReverseReplicationProviderSpecificInput is the BasicReverseReplicationProviderSpecificInput implementation for HyperVReplicaAzureReprotectInput. 5897func (hvrari HyperVReplicaAzureReprotectInput) AsBasicReverseReplicationProviderSpecificInput() (BasicReverseReplicationProviderSpecificInput, bool) { 5898 return &hvrari, true 5899} 5900 5901// HyperVReplicaAzureUpdateReplicationProtectedItemInput hyperV replica Azure input to update replication 5902// protected item. 5903type HyperVReplicaAzureUpdateReplicationProtectedItemInput struct { 5904 // RecoveryAzureV1ResourceGroupID - The recovery Azure resource group Id for classic deployment. 5905 RecoveryAzureV1ResourceGroupID *string `json:"recoveryAzureV1ResourceGroupId,omitempty"` 5906 // RecoveryAzureV2ResourceGroupID - The recovery Azure resource group Id for resource manager deployment. 5907 RecoveryAzureV2ResourceGroupID *string `json:"recoveryAzureV2ResourceGroupId,omitempty"` 5908 // UseManagedDisks - A value indicating whether managed disks should be used during failover. 5909 UseManagedDisks *string `json:"useManagedDisks,omitempty"` 5910 // InstanceType - Possible values include: 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeUpdateReplicationProtectedItemProviderInput', 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeA2A', 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeInMageAzureV2' 5911 InstanceType InstanceTypeBasicUpdateReplicationProtectedItemProviderInput `json:"instanceType,omitempty"` 5912} 5913 5914// MarshalJSON is the custom marshaler for HyperVReplicaAzureUpdateReplicationProtectedItemInput. 5915func (hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, error) { 5916 hvraurpii.InstanceType = InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeHyperVReplicaAzure 5917 objectMap := make(map[string]interface{}) 5918 if hvraurpii.RecoveryAzureV1ResourceGroupID != nil { 5919 objectMap["recoveryAzureV1ResourceGroupId"] = hvraurpii.RecoveryAzureV1ResourceGroupID 5920 } 5921 if hvraurpii.RecoveryAzureV2ResourceGroupID != nil { 5922 objectMap["recoveryAzureV2ResourceGroupId"] = hvraurpii.RecoveryAzureV2ResourceGroupID 5923 } 5924 if hvraurpii.UseManagedDisks != nil { 5925 objectMap["useManagedDisks"] = hvraurpii.UseManagedDisks 5926 } 5927 if hvraurpii.InstanceType != "" { 5928 objectMap["instanceType"] = hvraurpii.InstanceType 5929 } 5930 return json.Marshal(objectMap) 5931} 5932 5933// AsA2AUpdateReplicationProtectedItemInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for HyperVReplicaAzureUpdateReplicationProtectedItemInput. 5934func (hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput) AsA2AUpdateReplicationProtectedItemInput() (*A2AUpdateReplicationProtectedItemInput, bool) { 5935 return nil, false 5936} 5937 5938// AsHyperVReplicaAzureUpdateReplicationProtectedItemInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for HyperVReplicaAzureUpdateReplicationProtectedItemInput. 5939func (hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput) AsHyperVReplicaAzureUpdateReplicationProtectedItemInput() (*HyperVReplicaAzureUpdateReplicationProtectedItemInput, bool) { 5940 return &hvraurpii, true 5941} 5942 5943// AsInMageAzureV2UpdateReplicationProtectedItemInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for HyperVReplicaAzureUpdateReplicationProtectedItemInput. 5944func (hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput) AsInMageAzureV2UpdateReplicationProtectedItemInput() (*InMageAzureV2UpdateReplicationProtectedItemInput, bool) { 5945 return nil, false 5946} 5947 5948// AsUpdateReplicationProtectedItemProviderInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for HyperVReplicaAzureUpdateReplicationProtectedItemInput. 5949func (hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput) AsUpdateReplicationProtectedItemProviderInput() (*UpdateReplicationProtectedItemProviderInput, bool) { 5950 return nil, false 5951} 5952 5953// AsBasicUpdateReplicationProtectedItemProviderInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for HyperVReplicaAzureUpdateReplicationProtectedItemInput. 5954func (hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput) AsBasicUpdateReplicationProtectedItemProviderInput() (BasicUpdateReplicationProtectedItemProviderInput, bool) { 5955 return &hvraurpii, true 5956} 5957 5958// HyperVReplicaBaseEventDetails abstract model class for event details of a HyperVReplica E2E event. 5959type HyperVReplicaBaseEventDetails struct { 5960 // ContainerName - The container friendly name. 5961 ContainerName *string `json:"containerName,omitempty"` 5962 // FabricName - The fabric friendly name. 5963 FabricName *string `json:"fabricName,omitempty"` 5964 // RemoteContainerName - The remote container name. 5965 RemoteContainerName *string `json:"remoteContainerName,omitempty"` 5966 // RemoteFabricName - The remote fabric name. 5967 RemoteFabricName *string `json:"remoteFabricName,omitempty"` 5968 // InstanceType - Possible values include: 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeEventProviderSpecificDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaBaseEventDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeVMwareCbt' 5969 InstanceType InstanceTypeBasicEventProviderSpecificDetails `json:"instanceType,omitempty"` 5970} 5971 5972// MarshalJSON is the custom marshaler for HyperVReplicaBaseEventDetails. 5973func (hvrbed HyperVReplicaBaseEventDetails) MarshalJSON() ([]byte, error) { 5974 hvrbed.InstanceType = InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaBaseEventDetails 5975 objectMap := make(map[string]interface{}) 5976 if hvrbed.ContainerName != nil { 5977 objectMap["containerName"] = hvrbed.ContainerName 5978 } 5979 if hvrbed.FabricName != nil { 5980 objectMap["fabricName"] = hvrbed.FabricName 5981 } 5982 if hvrbed.RemoteContainerName != nil { 5983 objectMap["remoteContainerName"] = hvrbed.RemoteContainerName 5984 } 5985 if hvrbed.RemoteFabricName != nil { 5986 objectMap["remoteFabricName"] = hvrbed.RemoteFabricName 5987 } 5988 if hvrbed.InstanceType != "" { 5989 objectMap["instanceType"] = hvrbed.InstanceType 5990 } 5991 return json.Marshal(objectMap) 5992} 5993 5994// AsA2AEventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaBaseEventDetails. 5995func (hvrbed HyperVReplicaBaseEventDetails) AsA2AEventDetails() (*A2AEventDetails, bool) { 5996 return nil, false 5997} 5998 5999// AsHyperVReplica2012EventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaBaseEventDetails. 6000func (hvrbed HyperVReplicaBaseEventDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) { 6001 return nil, false 6002} 6003 6004// AsHyperVReplica2012R2EventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaBaseEventDetails. 6005func (hvrbed HyperVReplicaBaseEventDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) { 6006 return nil, false 6007} 6008 6009// AsHyperVReplicaAzureEventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaBaseEventDetails. 6010func (hvrbed HyperVReplicaBaseEventDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) { 6011 return nil, false 6012} 6013 6014// AsHyperVReplicaBaseEventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaBaseEventDetails. 6015func (hvrbed HyperVReplicaBaseEventDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) { 6016 return &hvrbed, true 6017} 6018 6019// AsInMageAzureV2EventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaBaseEventDetails. 6020func (hvrbed HyperVReplicaBaseEventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) { 6021 return nil, false 6022} 6023 6024// AsVMwareCbtEventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaBaseEventDetails. 6025func (hvrbed HyperVReplicaBaseEventDetails) AsVMwareCbtEventDetails() (*VMwareCbtEventDetails, bool) { 6026 return nil, false 6027} 6028 6029// AsEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaBaseEventDetails. 6030func (hvrbed HyperVReplicaBaseEventDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) { 6031 return nil, false 6032} 6033 6034// AsBasicEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaBaseEventDetails. 6035func (hvrbed HyperVReplicaBaseEventDetails) AsBasicEventProviderSpecificDetails() (BasicEventProviderSpecificDetails, bool) { 6036 return &hvrbed, true 6037} 6038 6039// HyperVReplicaBasePolicyDetails base class for HyperVReplica policy details. 6040type HyperVReplicaBasePolicyDetails struct { 6041 // RecoveryPoints - A value indicating the number of recovery points. 6042 RecoveryPoints *int32 `json:"recoveryPoints,omitempty"` 6043 // ApplicationConsistentSnapshotFrequencyInHours - A value indicating the application consistent frequency. 6044 ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` 6045 // Compression - A value indicating whether compression has to be enabled. 6046 Compression *string `json:"compression,omitempty"` 6047 // InitialReplicationMethod - A value indicating whether IR is online. 6048 InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"` 6049 // OnlineReplicationStartTime - A value indicating the online IR start time. 6050 OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` 6051 // OfflineReplicationImportPath - A value indicating the offline IR import path. 6052 OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"` 6053 // OfflineReplicationExportPath - A value indicating the offline IR export path. 6054 OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"` 6055 // ReplicationPort - A value indicating the recovery HTTPS port. 6056 ReplicationPort *int32 `json:"replicationPort,omitempty"` 6057 // AllowedAuthenticationType - A value indicating the authentication type. 6058 AllowedAuthenticationType *int32 `json:"allowedAuthenticationType,omitempty"` 6059 // ReplicaDeletionOption - A value indicating whether the VM has to be auto deleted. Supported Values: String.Empty, None, OnRecoveryCloud 6060 ReplicaDeletionOption *string `json:"replicaDeletionOption,omitempty"` 6061 // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypePolicyProviderSpecificDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt' 6062 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"` 6063} 6064 6065// MarshalJSON is the custom marshaler for HyperVReplicaBasePolicyDetails. 6066func (hvrbpd HyperVReplicaBasePolicyDetails) MarshalJSON() ([]byte, error) { 6067 hvrbpd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails 6068 objectMap := make(map[string]interface{}) 6069 if hvrbpd.RecoveryPoints != nil { 6070 objectMap["recoveryPoints"] = hvrbpd.RecoveryPoints 6071 } 6072 if hvrbpd.ApplicationConsistentSnapshotFrequencyInHours != nil { 6073 objectMap["applicationConsistentSnapshotFrequencyInHours"] = hvrbpd.ApplicationConsistentSnapshotFrequencyInHours 6074 } 6075 if hvrbpd.Compression != nil { 6076 objectMap["compression"] = hvrbpd.Compression 6077 } 6078 if hvrbpd.InitialReplicationMethod != nil { 6079 objectMap["initialReplicationMethod"] = hvrbpd.InitialReplicationMethod 6080 } 6081 if hvrbpd.OnlineReplicationStartTime != nil { 6082 objectMap["onlineReplicationStartTime"] = hvrbpd.OnlineReplicationStartTime 6083 } 6084 if hvrbpd.OfflineReplicationImportPath != nil { 6085 objectMap["offlineReplicationImportPath"] = hvrbpd.OfflineReplicationImportPath 6086 } 6087 if hvrbpd.OfflineReplicationExportPath != nil { 6088 objectMap["offlineReplicationExportPath"] = hvrbpd.OfflineReplicationExportPath 6089 } 6090 if hvrbpd.ReplicationPort != nil { 6091 objectMap["replicationPort"] = hvrbpd.ReplicationPort 6092 } 6093 if hvrbpd.AllowedAuthenticationType != nil { 6094 objectMap["allowedAuthenticationType"] = hvrbpd.AllowedAuthenticationType 6095 } 6096 if hvrbpd.ReplicaDeletionOption != nil { 6097 objectMap["replicaDeletionOption"] = hvrbpd.ReplicaDeletionOption 6098 } 6099 if hvrbpd.InstanceType != "" { 6100 objectMap["instanceType"] = hvrbpd.InstanceType 6101 } 6102 return json.Marshal(objectMap) 6103} 6104 6105// AsA2APolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBasePolicyDetails. 6106func (hvrbpd HyperVReplicaBasePolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) { 6107 return nil, false 6108} 6109 6110// AsHyperVReplicaAzurePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBasePolicyDetails. 6111func (hvrbpd HyperVReplicaBasePolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) { 6112 return nil, false 6113} 6114 6115// AsHyperVReplicaBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBasePolicyDetails. 6116func (hvrbpd HyperVReplicaBasePolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) { 6117 return &hvrbpd, true 6118} 6119 6120// AsHyperVReplicaBluePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBasePolicyDetails. 6121func (hvrbpd HyperVReplicaBasePolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) { 6122 return nil, false 6123} 6124 6125// AsHyperVReplicaPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBasePolicyDetails. 6126func (hvrbpd HyperVReplicaBasePolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) { 6127 return nil, false 6128} 6129 6130// AsInMageAzureV2PolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBasePolicyDetails. 6131func (hvrbpd HyperVReplicaBasePolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) { 6132 return nil, false 6133} 6134 6135// AsInMageBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBasePolicyDetails. 6136func (hvrbpd HyperVReplicaBasePolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) { 6137 return nil, false 6138} 6139 6140// AsInMagePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBasePolicyDetails. 6141func (hvrbpd HyperVReplicaBasePolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) { 6142 return nil, false 6143} 6144 6145// AsRcmAzureMigrationPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBasePolicyDetails. 6146func (hvrbpd HyperVReplicaBasePolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) { 6147 return nil, false 6148} 6149 6150// AsVmwareCbtPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBasePolicyDetails. 6151func (hvrbpd HyperVReplicaBasePolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) { 6152 return nil, false 6153} 6154 6155// AsPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBasePolicyDetails. 6156func (hvrbpd HyperVReplicaBasePolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) { 6157 return nil, false 6158} 6159 6160// AsBasicPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBasePolicyDetails. 6161func (hvrbpd HyperVReplicaBasePolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) { 6162 return &hvrbpd, true 6163} 6164 6165// HyperVReplicaBaseReplicationDetails hyper V replica provider specific settings base class. 6166type HyperVReplicaBaseReplicationDetails struct { 6167 // LastReplicatedTime - The Last replication time. 6168 LastReplicatedTime *date.Time `json:"lastReplicatedTime,omitempty"` 6169 // VMNics - The PE Network details. 6170 VMNics *[]VMNicDetails `json:"vmNics,omitempty"` 6171 // VMID - The virtual machine Id. 6172 VMID *string `json:"vmId,omitempty"` 6173 // VMProtectionState - The protection state for the vm. 6174 VMProtectionState *string `json:"vmProtectionState,omitempty"` 6175 // VMProtectionStateDescription - The protection state description for the vm. 6176 VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` 6177 // InitialReplicationDetails - Initial replication details. 6178 InitialReplicationDetails *InitialReplicationDetails `json:"initialReplicationDetails,omitempty"` 6179 // VMDiskDetails - VM disk details. 6180 VMDiskDetails *[]DiskDetails `json:"vMDiskDetails,omitempty"` 6181 // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeReplicationProviderSpecificSettings', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeA2A', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaBaseReplicationDetails', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMageAzureV2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMage' 6182 InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"` 6183} 6184 6185// MarshalJSON is the custom marshaler for HyperVReplicaBaseReplicationDetails. 6186func (hvrbrd HyperVReplicaBaseReplicationDetails) MarshalJSON() ([]byte, error) { 6187 hvrbrd.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaBaseReplicationDetails 6188 objectMap := make(map[string]interface{}) 6189 if hvrbrd.LastReplicatedTime != nil { 6190 objectMap["lastReplicatedTime"] = hvrbrd.LastReplicatedTime 6191 } 6192 if hvrbrd.VMNics != nil { 6193 objectMap["vmNics"] = hvrbrd.VMNics 6194 } 6195 if hvrbrd.VMID != nil { 6196 objectMap["vmId"] = hvrbrd.VMID 6197 } 6198 if hvrbrd.VMProtectionState != nil { 6199 objectMap["vmProtectionState"] = hvrbrd.VMProtectionState 6200 } 6201 if hvrbrd.VMProtectionStateDescription != nil { 6202 objectMap["vmProtectionStateDescription"] = hvrbrd.VMProtectionStateDescription 6203 } 6204 if hvrbrd.InitialReplicationDetails != nil { 6205 objectMap["initialReplicationDetails"] = hvrbrd.InitialReplicationDetails 6206 } 6207 if hvrbrd.VMDiskDetails != nil { 6208 objectMap["vMDiskDetails"] = hvrbrd.VMDiskDetails 6209 } 6210 if hvrbrd.InstanceType != "" { 6211 objectMap["instanceType"] = hvrbrd.InstanceType 6212 } 6213 return json.Marshal(objectMap) 6214} 6215 6216// AsA2AReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBaseReplicationDetails. 6217func (hvrbrd HyperVReplicaBaseReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) { 6218 return nil, false 6219} 6220 6221// AsHyperVReplicaAzureReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBaseReplicationDetails. 6222func (hvrbrd HyperVReplicaBaseReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) { 6223 return nil, false 6224} 6225 6226// AsHyperVReplicaBaseReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBaseReplicationDetails. 6227func (hvrbrd HyperVReplicaBaseReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) { 6228 return &hvrbrd, true 6229} 6230 6231// AsHyperVReplicaBlueReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBaseReplicationDetails. 6232func (hvrbrd HyperVReplicaBaseReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) { 6233 return nil, false 6234} 6235 6236// AsHyperVReplicaReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBaseReplicationDetails. 6237func (hvrbrd HyperVReplicaBaseReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) { 6238 return nil, false 6239} 6240 6241// AsInMageAzureV2ReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBaseReplicationDetails. 6242func (hvrbrd HyperVReplicaBaseReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) { 6243 return nil, false 6244} 6245 6246// AsInMageReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBaseReplicationDetails. 6247func (hvrbrd HyperVReplicaBaseReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) { 6248 return nil, false 6249} 6250 6251// AsReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBaseReplicationDetails. 6252func (hvrbrd HyperVReplicaBaseReplicationDetails) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) { 6253 return nil, false 6254} 6255 6256// AsBasicReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBaseReplicationDetails. 6257func (hvrbrd HyperVReplicaBaseReplicationDetails) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) { 6258 return &hvrbrd, true 6259} 6260 6261// HyperVReplicaBluePolicyDetails hyper-V Replica Blue specific protection profile details. 6262type HyperVReplicaBluePolicyDetails struct { 6263 // ReplicationFrequencyInSeconds - A value indicating the replication interval. 6264 ReplicationFrequencyInSeconds *int32 `json:"replicationFrequencyInSeconds,omitempty"` 6265 // RecoveryPoints - A value indicating the number of recovery points. 6266 RecoveryPoints *int32 `json:"recoveryPoints,omitempty"` 6267 // ApplicationConsistentSnapshotFrequencyInHours - A value indicating the application consistent frequency. 6268 ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` 6269 // Compression - A value indicating whether compression has to be enabled. 6270 Compression *string `json:"compression,omitempty"` 6271 // InitialReplicationMethod - A value indicating whether IR is online. 6272 InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"` 6273 // OnlineReplicationStartTime - A value indicating the online IR start time. 6274 OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` 6275 // OfflineReplicationImportPath - A value indicating the offline IR import path. 6276 OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"` 6277 // OfflineReplicationExportPath - A value indicating the offline IR export path. 6278 OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"` 6279 // ReplicationPort - A value indicating the recovery HTTPS port. 6280 ReplicationPort *int32 `json:"replicationPort,omitempty"` 6281 // AllowedAuthenticationType - A value indicating the authentication type. 6282 AllowedAuthenticationType *int32 `json:"allowedAuthenticationType,omitempty"` 6283 // ReplicaDeletionOption - A value indicating whether the VM has to be auto deleted. Supported Values: String.Empty, None, OnRecoveryCloud 6284 ReplicaDeletionOption *string `json:"replicaDeletionOption,omitempty"` 6285 // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypePolicyProviderSpecificDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt' 6286 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"` 6287} 6288 6289// MarshalJSON is the custom marshaler for HyperVReplicaBluePolicyDetails. 6290func (hvrbpd HyperVReplicaBluePolicyDetails) MarshalJSON() ([]byte, error) { 6291 hvrbpd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2 6292 objectMap := make(map[string]interface{}) 6293 if hvrbpd.ReplicationFrequencyInSeconds != nil { 6294 objectMap["replicationFrequencyInSeconds"] = hvrbpd.ReplicationFrequencyInSeconds 6295 } 6296 if hvrbpd.RecoveryPoints != nil { 6297 objectMap["recoveryPoints"] = hvrbpd.RecoveryPoints 6298 } 6299 if hvrbpd.ApplicationConsistentSnapshotFrequencyInHours != nil { 6300 objectMap["applicationConsistentSnapshotFrequencyInHours"] = hvrbpd.ApplicationConsistentSnapshotFrequencyInHours 6301 } 6302 if hvrbpd.Compression != nil { 6303 objectMap["compression"] = hvrbpd.Compression 6304 } 6305 if hvrbpd.InitialReplicationMethod != nil { 6306 objectMap["initialReplicationMethod"] = hvrbpd.InitialReplicationMethod 6307 } 6308 if hvrbpd.OnlineReplicationStartTime != nil { 6309 objectMap["onlineReplicationStartTime"] = hvrbpd.OnlineReplicationStartTime 6310 } 6311 if hvrbpd.OfflineReplicationImportPath != nil { 6312 objectMap["offlineReplicationImportPath"] = hvrbpd.OfflineReplicationImportPath 6313 } 6314 if hvrbpd.OfflineReplicationExportPath != nil { 6315 objectMap["offlineReplicationExportPath"] = hvrbpd.OfflineReplicationExportPath 6316 } 6317 if hvrbpd.ReplicationPort != nil { 6318 objectMap["replicationPort"] = hvrbpd.ReplicationPort 6319 } 6320 if hvrbpd.AllowedAuthenticationType != nil { 6321 objectMap["allowedAuthenticationType"] = hvrbpd.AllowedAuthenticationType 6322 } 6323 if hvrbpd.ReplicaDeletionOption != nil { 6324 objectMap["replicaDeletionOption"] = hvrbpd.ReplicaDeletionOption 6325 } 6326 if hvrbpd.InstanceType != "" { 6327 objectMap["instanceType"] = hvrbpd.InstanceType 6328 } 6329 return json.Marshal(objectMap) 6330} 6331 6332// AsA2APolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBluePolicyDetails. 6333func (hvrbpd HyperVReplicaBluePolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) { 6334 return nil, false 6335} 6336 6337// AsHyperVReplicaAzurePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBluePolicyDetails. 6338func (hvrbpd HyperVReplicaBluePolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) { 6339 return nil, false 6340} 6341 6342// AsHyperVReplicaBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBluePolicyDetails. 6343func (hvrbpd HyperVReplicaBluePolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) { 6344 return nil, false 6345} 6346 6347// AsHyperVReplicaBluePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBluePolicyDetails. 6348func (hvrbpd HyperVReplicaBluePolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) { 6349 return &hvrbpd, true 6350} 6351 6352// AsHyperVReplicaPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBluePolicyDetails. 6353func (hvrbpd HyperVReplicaBluePolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) { 6354 return nil, false 6355} 6356 6357// AsInMageAzureV2PolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBluePolicyDetails. 6358func (hvrbpd HyperVReplicaBluePolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) { 6359 return nil, false 6360} 6361 6362// AsInMageBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBluePolicyDetails. 6363func (hvrbpd HyperVReplicaBluePolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) { 6364 return nil, false 6365} 6366 6367// AsInMagePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBluePolicyDetails. 6368func (hvrbpd HyperVReplicaBluePolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) { 6369 return nil, false 6370} 6371 6372// AsRcmAzureMigrationPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBluePolicyDetails. 6373func (hvrbpd HyperVReplicaBluePolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) { 6374 return nil, false 6375} 6376 6377// AsVmwareCbtPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBluePolicyDetails. 6378func (hvrbpd HyperVReplicaBluePolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) { 6379 return nil, false 6380} 6381 6382// AsPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBluePolicyDetails. 6383func (hvrbpd HyperVReplicaBluePolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) { 6384 return nil, false 6385} 6386 6387// AsBasicPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBluePolicyDetails. 6388func (hvrbpd HyperVReplicaBluePolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) { 6389 return &hvrbpd, true 6390} 6391 6392// HyperVReplicaBluePolicyInput hyperV Replica Blue policy input. 6393type HyperVReplicaBluePolicyInput struct { 6394 // ReplicationFrequencyInSeconds - A value indicating the replication interval. 6395 ReplicationFrequencyInSeconds *int32 `json:"replicationFrequencyInSeconds,omitempty"` 6396 // RecoveryPoints - A value indicating the number of recovery points. 6397 RecoveryPoints *int32 `json:"recoveryPoints,omitempty"` 6398 // ApplicationConsistentSnapshotFrequencyInHours - A value indicating the application consistent frequency. 6399 ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` 6400 // Compression - A value indicating whether compression has to be enabled. 6401 Compression *string `json:"compression,omitempty"` 6402 // InitialReplicationMethod - A value indicating whether IR is online. 6403 InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"` 6404 // OnlineReplicationStartTime - A value indicating the online IR start time. 6405 OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` 6406 // OfflineReplicationImportPath - A value indicating the offline IR import path. 6407 OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"` 6408 // OfflineReplicationExportPath - A value indicating the offline IR export path. 6409 OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"` 6410 // ReplicationPort - A value indicating the recovery HTTPS port. 6411 ReplicationPort *int32 `json:"replicationPort,omitempty"` 6412 // AllowedAuthenticationType - A value indicating the authentication type. 6413 AllowedAuthenticationType *int32 `json:"allowedAuthenticationType,omitempty"` 6414 // ReplicaDeletion - A value indicating whether the VM has to be auto deleted. 6415 ReplicaDeletion *string `json:"replicaDeletion,omitempty"` 6416 // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypePolicyProviderSpecificInput', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeVMwareCbt' 6417 InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"` 6418} 6419 6420// MarshalJSON is the custom marshaler for HyperVReplicaBluePolicyInput. 6421func (hvrbpi HyperVReplicaBluePolicyInput) MarshalJSON() ([]byte, error) { 6422 hvrbpi.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012R2 6423 objectMap := make(map[string]interface{}) 6424 if hvrbpi.ReplicationFrequencyInSeconds != nil { 6425 objectMap["replicationFrequencyInSeconds"] = hvrbpi.ReplicationFrequencyInSeconds 6426 } 6427 if hvrbpi.RecoveryPoints != nil { 6428 objectMap["recoveryPoints"] = hvrbpi.RecoveryPoints 6429 } 6430 if hvrbpi.ApplicationConsistentSnapshotFrequencyInHours != nil { 6431 objectMap["applicationConsistentSnapshotFrequencyInHours"] = hvrbpi.ApplicationConsistentSnapshotFrequencyInHours 6432 } 6433 if hvrbpi.Compression != nil { 6434 objectMap["compression"] = hvrbpi.Compression 6435 } 6436 if hvrbpi.InitialReplicationMethod != nil { 6437 objectMap["initialReplicationMethod"] = hvrbpi.InitialReplicationMethod 6438 } 6439 if hvrbpi.OnlineReplicationStartTime != nil { 6440 objectMap["onlineReplicationStartTime"] = hvrbpi.OnlineReplicationStartTime 6441 } 6442 if hvrbpi.OfflineReplicationImportPath != nil { 6443 objectMap["offlineReplicationImportPath"] = hvrbpi.OfflineReplicationImportPath 6444 } 6445 if hvrbpi.OfflineReplicationExportPath != nil { 6446 objectMap["offlineReplicationExportPath"] = hvrbpi.OfflineReplicationExportPath 6447 } 6448 if hvrbpi.ReplicationPort != nil { 6449 objectMap["replicationPort"] = hvrbpi.ReplicationPort 6450 } 6451 if hvrbpi.AllowedAuthenticationType != nil { 6452 objectMap["allowedAuthenticationType"] = hvrbpi.AllowedAuthenticationType 6453 } 6454 if hvrbpi.ReplicaDeletion != nil { 6455 objectMap["replicaDeletion"] = hvrbpi.ReplicaDeletion 6456 } 6457 if hvrbpi.InstanceType != "" { 6458 objectMap["instanceType"] = hvrbpi.InstanceType 6459 } 6460 return json.Marshal(objectMap) 6461} 6462 6463// AsA2APolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaBluePolicyInput. 6464func (hvrbpi HyperVReplicaBluePolicyInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) { 6465 return nil, false 6466} 6467 6468// AsHyperVReplicaAzurePolicyInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaBluePolicyInput. 6469func (hvrbpi HyperVReplicaBluePolicyInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) { 6470 return nil, false 6471} 6472 6473// AsHyperVReplicaBluePolicyInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaBluePolicyInput. 6474func (hvrbpi HyperVReplicaBluePolicyInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) { 6475 return &hvrbpi, true 6476} 6477 6478// AsHyperVReplicaPolicyInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaBluePolicyInput. 6479func (hvrbpi HyperVReplicaBluePolicyInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) { 6480 return nil, false 6481} 6482 6483// AsInMageAzureV2PolicyInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaBluePolicyInput. 6484func (hvrbpi HyperVReplicaBluePolicyInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) { 6485 return nil, false 6486} 6487 6488// AsInMagePolicyInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaBluePolicyInput. 6489func (hvrbpi HyperVReplicaBluePolicyInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) { 6490 return nil, false 6491} 6492 6493// AsVMwareCbtPolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaBluePolicyInput. 6494func (hvrbpi HyperVReplicaBluePolicyInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) { 6495 return nil, false 6496} 6497 6498// AsPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaBluePolicyInput. 6499func (hvrbpi HyperVReplicaBluePolicyInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) { 6500 return nil, false 6501} 6502 6503// AsBasicPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaBluePolicyInput. 6504func (hvrbpi HyperVReplicaBluePolicyInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) { 6505 return &hvrbpi, true 6506} 6507 6508// HyperVReplicaBlueReplicationDetails hyperV replica 2012 R2 (Blue) replication details. 6509type HyperVReplicaBlueReplicationDetails struct { 6510 // LastReplicatedTime - The Last replication time. 6511 LastReplicatedTime *date.Time `json:"lastReplicatedTime,omitempty"` 6512 // VMNics - The PE Network details. 6513 VMNics *[]VMNicDetails `json:"vmNics,omitempty"` 6514 // VMID - The virtual machine Id. 6515 VMID *string `json:"vmId,omitempty"` 6516 // VMProtectionState - The protection state for the vm. 6517 VMProtectionState *string `json:"vmProtectionState,omitempty"` 6518 // VMProtectionStateDescription - The protection state description for the vm. 6519 VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` 6520 // InitialReplicationDetails - Initial replication details. 6521 InitialReplicationDetails *InitialReplicationDetails `json:"initialReplicationDetails,omitempty"` 6522 // VMDiskDetails - VM disk details. 6523 VMDiskDetails *[]DiskDetails `json:"vMDiskDetails,omitempty"` 6524 // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeReplicationProviderSpecificSettings', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeA2A', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaBaseReplicationDetails', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMageAzureV2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMage' 6525 InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"` 6526} 6527 6528// MarshalJSON is the custom marshaler for HyperVReplicaBlueReplicationDetails. 6529func (hvrbrd HyperVReplicaBlueReplicationDetails) MarshalJSON() ([]byte, error) { 6530 hvrbrd.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012R2 6531 objectMap := make(map[string]interface{}) 6532 if hvrbrd.LastReplicatedTime != nil { 6533 objectMap["lastReplicatedTime"] = hvrbrd.LastReplicatedTime 6534 } 6535 if hvrbrd.VMNics != nil { 6536 objectMap["vmNics"] = hvrbrd.VMNics 6537 } 6538 if hvrbrd.VMID != nil { 6539 objectMap["vmId"] = hvrbrd.VMID 6540 } 6541 if hvrbrd.VMProtectionState != nil { 6542 objectMap["vmProtectionState"] = hvrbrd.VMProtectionState 6543 } 6544 if hvrbrd.VMProtectionStateDescription != nil { 6545 objectMap["vmProtectionStateDescription"] = hvrbrd.VMProtectionStateDescription 6546 } 6547 if hvrbrd.InitialReplicationDetails != nil { 6548 objectMap["initialReplicationDetails"] = hvrbrd.InitialReplicationDetails 6549 } 6550 if hvrbrd.VMDiskDetails != nil { 6551 objectMap["vMDiskDetails"] = hvrbrd.VMDiskDetails 6552 } 6553 if hvrbrd.InstanceType != "" { 6554 objectMap["instanceType"] = hvrbrd.InstanceType 6555 } 6556 return json.Marshal(objectMap) 6557} 6558 6559// AsA2AReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBlueReplicationDetails. 6560func (hvrbrd HyperVReplicaBlueReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) { 6561 return nil, false 6562} 6563 6564// AsHyperVReplicaAzureReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBlueReplicationDetails. 6565func (hvrbrd HyperVReplicaBlueReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) { 6566 return nil, false 6567} 6568 6569// AsHyperVReplicaBaseReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBlueReplicationDetails. 6570func (hvrbrd HyperVReplicaBlueReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) { 6571 return nil, false 6572} 6573 6574// AsHyperVReplicaBlueReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBlueReplicationDetails. 6575func (hvrbrd HyperVReplicaBlueReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) { 6576 return &hvrbrd, true 6577} 6578 6579// AsHyperVReplicaReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBlueReplicationDetails. 6580func (hvrbrd HyperVReplicaBlueReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) { 6581 return nil, false 6582} 6583 6584// AsInMageAzureV2ReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBlueReplicationDetails. 6585func (hvrbrd HyperVReplicaBlueReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) { 6586 return nil, false 6587} 6588 6589// AsInMageReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBlueReplicationDetails. 6590func (hvrbrd HyperVReplicaBlueReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) { 6591 return nil, false 6592} 6593 6594// AsReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBlueReplicationDetails. 6595func (hvrbrd HyperVReplicaBlueReplicationDetails) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) { 6596 return nil, false 6597} 6598 6599// AsBasicReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBlueReplicationDetails. 6600func (hvrbrd HyperVReplicaBlueReplicationDetails) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) { 6601 return &hvrbrd, true 6602} 6603 6604// HyperVReplicaPolicyDetails hyper-V Replica Blue specific protection profile details. 6605type HyperVReplicaPolicyDetails struct { 6606 // RecoveryPoints - A value indicating the number of recovery points. 6607 RecoveryPoints *int32 `json:"recoveryPoints,omitempty"` 6608 // ApplicationConsistentSnapshotFrequencyInHours - A value indicating the application consistent frequency. 6609 ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` 6610 // Compression - A value indicating whether compression has to be enabled. 6611 Compression *string `json:"compression,omitempty"` 6612 // InitialReplicationMethod - A value indicating whether IR is online. 6613 InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"` 6614 // OnlineReplicationStartTime - A value indicating the online IR start time. 6615 OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` 6616 // OfflineReplicationImportPath - A value indicating the offline IR import path. 6617 OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"` 6618 // OfflineReplicationExportPath - A value indicating the offline IR export path. 6619 OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"` 6620 // ReplicationPort - A value indicating the recovery HTTPS port. 6621 ReplicationPort *int32 `json:"replicationPort,omitempty"` 6622 // AllowedAuthenticationType - A value indicating the authentication type. 6623 AllowedAuthenticationType *int32 `json:"allowedAuthenticationType,omitempty"` 6624 // ReplicaDeletionOption - A value indicating whether the VM has to be auto deleted. Supported Values: String.Empty, None, OnRecoveryCloud 6625 ReplicaDeletionOption *string `json:"replicaDeletionOption,omitempty"` 6626 // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypePolicyProviderSpecificDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt' 6627 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"` 6628} 6629 6630// MarshalJSON is the custom marshaler for HyperVReplicaPolicyDetails. 6631func (hvrpd HyperVReplicaPolicyDetails) MarshalJSON() ([]byte, error) { 6632 hvrpd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012 6633 objectMap := make(map[string]interface{}) 6634 if hvrpd.RecoveryPoints != nil { 6635 objectMap["recoveryPoints"] = hvrpd.RecoveryPoints 6636 } 6637 if hvrpd.ApplicationConsistentSnapshotFrequencyInHours != nil { 6638 objectMap["applicationConsistentSnapshotFrequencyInHours"] = hvrpd.ApplicationConsistentSnapshotFrequencyInHours 6639 } 6640 if hvrpd.Compression != nil { 6641 objectMap["compression"] = hvrpd.Compression 6642 } 6643 if hvrpd.InitialReplicationMethod != nil { 6644 objectMap["initialReplicationMethod"] = hvrpd.InitialReplicationMethod 6645 } 6646 if hvrpd.OnlineReplicationStartTime != nil { 6647 objectMap["onlineReplicationStartTime"] = hvrpd.OnlineReplicationStartTime 6648 } 6649 if hvrpd.OfflineReplicationImportPath != nil { 6650 objectMap["offlineReplicationImportPath"] = hvrpd.OfflineReplicationImportPath 6651 } 6652 if hvrpd.OfflineReplicationExportPath != nil { 6653 objectMap["offlineReplicationExportPath"] = hvrpd.OfflineReplicationExportPath 6654 } 6655 if hvrpd.ReplicationPort != nil { 6656 objectMap["replicationPort"] = hvrpd.ReplicationPort 6657 } 6658 if hvrpd.AllowedAuthenticationType != nil { 6659 objectMap["allowedAuthenticationType"] = hvrpd.AllowedAuthenticationType 6660 } 6661 if hvrpd.ReplicaDeletionOption != nil { 6662 objectMap["replicaDeletionOption"] = hvrpd.ReplicaDeletionOption 6663 } 6664 if hvrpd.InstanceType != "" { 6665 objectMap["instanceType"] = hvrpd.InstanceType 6666 } 6667 return json.Marshal(objectMap) 6668} 6669 6670// AsA2APolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaPolicyDetails. 6671func (hvrpd HyperVReplicaPolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) { 6672 return nil, false 6673} 6674 6675// AsHyperVReplicaAzurePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaPolicyDetails. 6676func (hvrpd HyperVReplicaPolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) { 6677 return nil, false 6678} 6679 6680// AsHyperVReplicaBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaPolicyDetails. 6681func (hvrpd HyperVReplicaPolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) { 6682 return nil, false 6683} 6684 6685// AsHyperVReplicaBluePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaPolicyDetails. 6686func (hvrpd HyperVReplicaPolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) { 6687 return nil, false 6688} 6689 6690// AsHyperVReplicaPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaPolicyDetails. 6691func (hvrpd HyperVReplicaPolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) { 6692 return &hvrpd, true 6693} 6694 6695// AsInMageAzureV2PolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaPolicyDetails. 6696func (hvrpd HyperVReplicaPolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) { 6697 return nil, false 6698} 6699 6700// AsInMageBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaPolicyDetails. 6701func (hvrpd HyperVReplicaPolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) { 6702 return nil, false 6703} 6704 6705// AsInMagePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaPolicyDetails. 6706func (hvrpd HyperVReplicaPolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) { 6707 return nil, false 6708} 6709 6710// AsRcmAzureMigrationPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaPolicyDetails. 6711func (hvrpd HyperVReplicaPolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) { 6712 return nil, false 6713} 6714 6715// AsVmwareCbtPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaPolicyDetails. 6716func (hvrpd HyperVReplicaPolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) { 6717 return nil, false 6718} 6719 6720// AsPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaPolicyDetails. 6721func (hvrpd HyperVReplicaPolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) { 6722 return nil, false 6723} 6724 6725// AsBasicPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaPolicyDetails. 6726func (hvrpd HyperVReplicaPolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) { 6727 return &hvrpd, true 6728} 6729 6730// HyperVReplicaPolicyInput hyper-V Replica specific policy Input. 6731type HyperVReplicaPolicyInput struct { 6732 // RecoveryPoints - A value indicating the number of recovery points. 6733 RecoveryPoints *int32 `json:"recoveryPoints,omitempty"` 6734 // ApplicationConsistentSnapshotFrequencyInHours - A value indicating the application consistent frequency. 6735 ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` 6736 // Compression - A value indicating whether compression has to be enabled. 6737 Compression *string `json:"compression,omitempty"` 6738 // InitialReplicationMethod - A value indicating whether IR is online. 6739 InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"` 6740 // OnlineReplicationStartTime - A value indicating the online IR start time. 6741 OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` 6742 // OfflineReplicationImportPath - A value indicating the offline IR import path. 6743 OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"` 6744 // OfflineReplicationExportPath - A value indicating the offline IR export path. 6745 OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"` 6746 // ReplicationPort - A value indicating the recovery HTTPS port. 6747 ReplicationPort *int32 `json:"replicationPort,omitempty"` 6748 // AllowedAuthenticationType - A value indicating the authentication type. 6749 AllowedAuthenticationType *int32 `json:"allowedAuthenticationType,omitempty"` 6750 // ReplicaDeletion - A value indicating whether the VM has to be auto deleted. 6751 ReplicaDeletion *string `json:"replicaDeletion,omitempty"` 6752 // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypePolicyProviderSpecificInput', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeVMwareCbt' 6753 InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"` 6754} 6755 6756// MarshalJSON is the custom marshaler for HyperVReplicaPolicyInput. 6757func (hvrpi HyperVReplicaPolicyInput) MarshalJSON() ([]byte, error) { 6758 hvrpi.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012 6759 objectMap := make(map[string]interface{}) 6760 if hvrpi.RecoveryPoints != nil { 6761 objectMap["recoveryPoints"] = hvrpi.RecoveryPoints 6762 } 6763 if hvrpi.ApplicationConsistentSnapshotFrequencyInHours != nil { 6764 objectMap["applicationConsistentSnapshotFrequencyInHours"] = hvrpi.ApplicationConsistentSnapshotFrequencyInHours 6765 } 6766 if hvrpi.Compression != nil { 6767 objectMap["compression"] = hvrpi.Compression 6768 } 6769 if hvrpi.InitialReplicationMethod != nil { 6770 objectMap["initialReplicationMethod"] = hvrpi.InitialReplicationMethod 6771 } 6772 if hvrpi.OnlineReplicationStartTime != nil { 6773 objectMap["onlineReplicationStartTime"] = hvrpi.OnlineReplicationStartTime 6774 } 6775 if hvrpi.OfflineReplicationImportPath != nil { 6776 objectMap["offlineReplicationImportPath"] = hvrpi.OfflineReplicationImportPath 6777 } 6778 if hvrpi.OfflineReplicationExportPath != nil { 6779 objectMap["offlineReplicationExportPath"] = hvrpi.OfflineReplicationExportPath 6780 } 6781 if hvrpi.ReplicationPort != nil { 6782 objectMap["replicationPort"] = hvrpi.ReplicationPort 6783 } 6784 if hvrpi.AllowedAuthenticationType != nil { 6785 objectMap["allowedAuthenticationType"] = hvrpi.AllowedAuthenticationType 6786 } 6787 if hvrpi.ReplicaDeletion != nil { 6788 objectMap["replicaDeletion"] = hvrpi.ReplicaDeletion 6789 } 6790 if hvrpi.InstanceType != "" { 6791 objectMap["instanceType"] = hvrpi.InstanceType 6792 } 6793 return json.Marshal(objectMap) 6794} 6795 6796// AsA2APolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaPolicyInput. 6797func (hvrpi HyperVReplicaPolicyInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) { 6798 return nil, false 6799} 6800 6801// AsHyperVReplicaAzurePolicyInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaPolicyInput. 6802func (hvrpi HyperVReplicaPolicyInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) { 6803 return nil, false 6804} 6805 6806// AsHyperVReplicaBluePolicyInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaPolicyInput. 6807func (hvrpi HyperVReplicaPolicyInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) { 6808 return nil, false 6809} 6810 6811// AsHyperVReplicaPolicyInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaPolicyInput. 6812func (hvrpi HyperVReplicaPolicyInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) { 6813 return &hvrpi, true 6814} 6815 6816// AsInMageAzureV2PolicyInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaPolicyInput. 6817func (hvrpi HyperVReplicaPolicyInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) { 6818 return nil, false 6819} 6820 6821// AsInMagePolicyInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaPolicyInput. 6822func (hvrpi HyperVReplicaPolicyInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) { 6823 return nil, false 6824} 6825 6826// AsVMwareCbtPolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaPolicyInput. 6827func (hvrpi HyperVReplicaPolicyInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) { 6828 return nil, false 6829} 6830 6831// AsPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaPolicyInput. 6832func (hvrpi HyperVReplicaPolicyInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) { 6833 return nil, false 6834} 6835 6836// AsBasicPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaPolicyInput. 6837func (hvrpi HyperVReplicaPolicyInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) { 6838 return &hvrpi, true 6839} 6840 6841// HyperVReplicaReplicationDetails hyperV replica 2012 replication details. 6842type HyperVReplicaReplicationDetails struct { 6843 // LastReplicatedTime - The Last replication time. 6844 LastReplicatedTime *date.Time `json:"lastReplicatedTime,omitempty"` 6845 // VMNics - The PE Network details. 6846 VMNics *[]VMNicDetails `json:"vmNics,omitempty"` 6847 // VMID - The virtual machine Id. 6848 VMID *string `json:"vmId,omitempty"` 6849 // VMProtectionState - The protection state for the vm. 6850 VMProtectionState *string `json:"vmProtectionState,omitempty"` 6851 // VMProtectionStateDescription - The protection state description for the vm. 6852 VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` 6853 // InitialReplicationDetails - Initial replication details. 6854 InitialReplicationDetails *InitialReplicationDetails `json:"initialReplicationDetails,omitempty"` 6855 // VMDiskDetails - VM disk details. 6856 VMDiskDetails *[]DiskDetails `json:"vMDiskDetails,omitempty"` 6857 // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeReplicationProviderSpecificSettings', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeA2A', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaBaseReplicationDetails', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMageAzureV2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMage' 6858 InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"` 6859} 6860 6861// MarshalJSON is the custom marshaler for HyperVReplicaReplicationDetails. 6862func (hvrrd HyperVReplicaReplicationDetails) MarshalJSON() ([]byte, error) { 6863 hvrrd.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012 6864 objectMap := make(map[string]interface{}) 6865 if hvrrd.LastReplicatedTime != nil { 6866 objectMap["lastReplicatedTime"] = hvrrd.LastReplicatedTime 6867 } 6868 if hvrrd.VMNics != nil { 6869 objectMap["vmNics"] = hvrrd.VMNics 6870 } 6871 if hvrrd.VMID != nil { 6872 objectMap["vmId"] = hvrrd.VMID 6873 } 6874 if hvrrd.VMProtectionState != nil { 6875 objectMap["vmProtectionState"] = hvrrd.VMProtectionState 6876 } 6877 if hvrrd.VMProtectionStateDescription != nil { 6878 objectMap["vmProtectionStateDescription"] = hvrrd.VMProtectionStateDescription 6879 } 6880 if hvrrd.InitialReplicationDetails != nil { 6881 objectMap["initialReplicationDetails"] = hvrrd.InitialReplicationDetails 6882 } 6883 if hvrrd.VMDiskDetails != nil { 6884 objectMap["vMDiskDetails"] = hvrrd.VMDiskDetails 6885 } 6886 if hvrrd.InstanceType != "" { 6887 objectMap["instanceType"] = hvrrd.InstanceType 6888 } 6889 return json.Marshal(objectMap) 6890} 6891 6892// AsA2AReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaReplicationDetails. 6893func (hvrrd HyperVReplicaReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) { 6894 return nil, false 6895} 6896 6897// AsHyperVReplicaAzureReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaReplicationDetails. 6898func (hvrrd HyperVReplicaReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) { 6899 return nil, false 6900} 6901 6902// AsHyperVReplicaBaseReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaReplicationDetails. 6903func (hvrrd HyperVReplicaReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) { 6904 return nil, false 6905} 6906 6907// AsHyperVReplicaBlueReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaReplicationDetails. 6908func (hvrrd HyperVReplicaReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) { 6909 return nil, false 6910} 6911 6912// AsHyperVReplicaReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaReplicationDetails. 6913func (hvrrd HyperVReplicaReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) { 6914 return &hvrrd, true 6915} 6916 6917// AsInMageAzureV2ReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaReplicationDetails. 6918func (hvrrd HyperVReplicaReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) { 6919 return nil, false 6920} 6921 6922// AsInMageReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaReplicationDetails. 6923func (hvrrd HyperVReplicaReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) { 6924 return nil, false 6925} 6926 6927// AsReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaReplicationDetails. 6928func (hvrrd HyperVReplicaReplicationDetails) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) { 6929 return nil, false 6930} 6931 6932// AsBasicReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaReplicationDetails. 6933func (hvrrd HyperVReplicaReplicationDetails) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) { 6934 return &hvrrd, true 6935} 6936 6937// HyperVSiteDetails hyperVSite fabric specific details. 6938type HyperVSiteDetails struct { 6939 // InstanceType - Possible values include: 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeFabricSpecificDetails', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeAzure', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeHyperVSite', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMM', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMware', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMwareV2' 6940 InstanceType InstanceTypeBasicFabricSpecificDetails `json:"instanceType,omitempty"` 6941} 6942 6943// MarshalJSON is the custom marshaler for HyperVSiteDetails. 6944func (hvsd HyperVSiteDetails) MarshalJSON() ([]byte, error) { 6945 hvsd.InstanceType = InstanceTypeBasicFabricSpecificDetailsInstanceTypeHyperVSite 6946 objectMap := make(map[string]interface{}) 6947 if hvsd.InstanceType != "" { 6948 objectMap["instanceType"] = hvsd.InstanceType 6949 } 6950 return json.Marshal(objectMap) 6951} 6952 6953// AsAzureFabricSpecificDetails is the BasicFabricSpecificDetails implementation for HyperVSiteDetails. 6954func (hvsd HyperVSiteDetails) AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool) { 6955 return nil, false 6956} 6957 6958// AsHyperVSiteDetails is the BasicFabricSpecificDetails implementation for HyperVSiteDetails. 6959func (hvsd HyperVSiteDetails) AsHyperVSiteDetails() (*HyperVSiteDetails, bool) { 6960 return &hvsd, true 6961} 6962 6963// AsVmmDetails is the BasicFabricSpecificDetails implementation for HyperVSiteDetails. 6964func (hvsd HyperVSiteDetails) AsVmmDetails() (*VmmDetails, bool) { 6965 return nil, false 6966} 6967 6968// AsVMwareDetails is the BasicFabricSpecificDetails implementation for HyperVSiteDetails. 6969func (hvsd HyperVSiteDetails) AsVMwareDetails() (*VMwareDetails, bool) { 6970 return nil, false 6971} 6972 6973// AsVMwareV2FabricSpecificDetails is the BasicFabricSpecificDetails implementation for HyperVSiteDetails. 6974func (hvsd HyperVSiteDetails) AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool) { 6975 return nil, false 6976} 6977 6978// AsFabricSpecificDetails is the BasicFabricSpecificDetails implementation for HyperVSiteDetails. 6979func (hvsd HyperVSiteDetails) AsFabricSpecificDetails() (*FabricSpecificDetails, bool) { 6980 return nil, false 6981} 6982 6983// AsBasicFabricSpecificDetails is the BasicFabricSpecificDetails implementation for HyperVSiteDetails. 6984func (hvsd HyperVSiteDetails) AsBasicFabricSpecificDetails() (BasicFabricSpecificDetails, bool) { 6985 return &hvsd, true 6986} 6987 6988// HyperVVirtualMachineDetails single Host fabric provider specific VM settings. 6989type HyperVVirtualMachineDetails struct { 6990 // SourceItemID - The source id of the object. 6991 SourceItemID *string `json:"sourceItemId,omitempty"` 6992 // Generation - The id of the object in fabric. 6993 Generation *string `json:"generation,omitempty"` 6994 // OsDetails - The Last replication time. 6995 OsDetails *OSDetails `json:"osDetails,omitempty"` 6996 // DiskDetails - The Last successful failover time. 6997 DiskDetails *[]DiskDetails `json:"diskDetails,omitempty"` 6998 // HasPhysicalDisk - A value indicating whether the VM has a physical disk attached. String value of {SrsDataContract.PresenceStatus} enum. Possible values include: 'Unknown', 'Present', 'NotPresent' 6999 HasPhysicalDisk PresenceStatus `json:"hasPhysicalDisk,omitempty"` 7000 // HasFibreChannelAdapter - A value indicating whether the VM has a fibre channel adapter attached. String value of {SrsDataContract.PresenceStatus} enum. Possible values include: 'Unknown', 'Present', 'NotPresent' 7001 HasFibreChannelAdapter PresenceStatus `json:"hasFibreChannelAdapter,omitempty"` 7002 // HasSharedVhd - A value indicating whether the VM has a shared VHD attached. String value of {SrsDataContract.PresenceStatus} enum. Possible values include: 'Unknown', 'Present', 'NotPresent' 7003 HasSharedVhd PresenceStatus `json:"hasSharedVhd,omitempty"` 7004 // InstanceType - Possible values include: 'InstanceTypeConfigurationSettings', 'InstanceTypeHyperVVirtualMachine', 'InstanceTypeReplicationGroupDetails', 'InstanceTypeVmmVirtualMachine', 'InstanceTypeVMwareVirtualMachine' 7005 InstanceType InstanceTypeBasicConfigurationSettings `json:"instanceType,omitempty"` 7006} 7007 7008// MarshalJSON is the custom marshaler for HyperVVirtualMachineDetails. 7009func (hvvmd HyperVVirtualMachineDetails) MarshalJSON() ([]byte, error) { 7010 hvvmd.InstanceType = InstanceTypeHyperVVirtualMachine 7011 objectMap := make(map[string]interface{}) 7012 if hvvmd.SourceItemID != nil { 7013 objectMap["sourceItemId"] = hvvmd.SourceItemID 7014 } 7015 if hvvmd.Generation != nil { 7016 objectMap["generation"] = hvvmd.Generation 7017 } 7018 if hvvmd.OsDetails != nil { 7019 objectMap["osDetails"] = hvvmd.OsDetails 7020 } 7021 if hvvmd.DiskDetails != nil { 7022 objectMap["diskDetails"] = hvvmd.DiskDetails 7023 } 7024 if hvvmd.HasPhysicalDisk != "" { 7025 objectMap["hasPhysicalDisk"] = hvvmd.HasPhysicalDisk 7026 } 7027 if hvvmd.HasFibreChannelAdapter != "" { 7028 objectMap["hasFibreChannelAdapter"] = hvvmd.HasFibreChannelAdapter 7029 } 7030 if hvvmd.HasSharedVhd != "" { 7031 objectMap["hasSharedVhd"] = hvvmd.HasSharedVhd 7032 } 7033 if hvvmd.InstanceType != "" { 7034 objectMap["instanceType"] = hvvmd.InstanceType 7035 } 7036 return json.Marshal(objectMap) 7037} 7038 7039// AsHyperVVirtualMachineDetails is the BasicConfigurationSettings implementation for HyperVVirtualMachineDetails. 7040func (hvvmd HyperVVirtualMachineDetails) AsHyperVVirtualMachineDetails() (*HyperVVirtualMachineDetails, bool) { 7041 return &hvvmd, true 7042} 7043 7044// AsReplicationGroupDetails is the BasicConfigurationSettings implementation for HyperVVirtualMachineDetails. 7045func (hvvmd HyperVVirtualMachineDetails) AsReplicationGroupDetails() (*ReplicationGroupDetails, bool) { 7046 return nil, false 7047} 7048 7049// AsVmmVirtualMachineDetails is the BasicConfigurationSettings implementation for HyperVVirtualMachineDetails. 7050func (hvvmd HyperVVirtualMachineDetails) AsVmmVirtualMachineDetails() (*VmmVirtualMachineDetails, bool) { 7051 return nil, false 7052} 7053 7054// AsVMwareVirtualMachineDetails is the BasicConfigurationSettings implementation for HyperVVirtualMachineDetails. 7055func (hvvmd HyperVVirtualMachineDetails) AsVMwareVirtualMachineDetails() (*VMwareVirtualMachineDetails, bool) { 7056 return nil, false 7057} 7058 7059// AsConfigurationSettings is the BasicConfigurationSettings implementation for HyperVVirtualMachineDetails. 7060func (hvvmd HyperVVirtualMachineDetails) AsConfigurationSettings() (*ConfigurationSettings, bool) { 7061 return nil, false 7062} 7063 7064// AsBasicConfigurationSettings is the BasicConfigurationSettings implementation for HyperVVirtualMachineDetails. 7065func (hvvmd HyperVVirtualMachineDetails) AsBasicConfigurationSettings() (BasicConfigurationSettings, bool) { 7066 return &hvvmd, true 7067} 7068 7069// IdentityProviderDetails identity provider details. 7070type IdentityProviderDetails struct { 7071 // TenantID - The tenant Id for the service principal with which the on-premise management/data plane components would communicate with our Azure services. 7072 TenantID *string `json:"tenantId,omitempty"` 7073 // ApplicationID - The application/client Id for the service principal with which the on-premise management/data plane components would communicate with our Azure services. 7074 ApplicationID *string `json:"applicationId,omitempty"` 7075 // ObjectID - The object Id of the service principal with which the on-premise management/data plane components would communicate with our Azure services. 7076 ObjectID *string `json:"objectId,omitempty"` 7077 // Audience - The intended Audience of the service principal with which the on-premise management/data plane components would communicate with our Azure services. 7078 Audience *string `json:"audience,omitempty"` 7079 // AadAuthority - The base authority for Azure Active Directory authentication. 7080 AadAuthority *string `json:"aadAuthority,omitempty"` 7081} 7082 7083// IdentityProviderInput identity provider input. 7084type IdentityProviderInput struct { 7085 // TenantID - The tenant Id for the service principal with which the on-premise management/data plane components would communicate with our Azure services. 7086 TenantID *string `json:"tenantId,omitempty"` 7087 // ApplicationID - The application/client Id for the service principal with which the on-premise management/data plane components would communicate with our Azure services. 7088 ApplicationID *string `json:"applicationId,omitempty"` 7089 // ObjectID - The object Id of the service principal with which the on-premise management/data plane components would communicate with our Azure services. 7090 ObjectID *string `json:"objectId,omitempty"` 7091 // Audience - The intended Audience of the service principal with which the on-premise management/data plane components would communicate with our Azure services. 7092 Audience *string `json:"audience,omitempty"` 7093 // AadAuthority - The base authority for Azure Active Directory authentication. 7094 AadAuthority *string `json:"aadAuthority,omitempty"` 7095} 7096 7097// InconsistentVMDetails this class stores the monitoring details for consistency check of inconsistent 7098// Protected Entity. 7099type InconsistentVMDetails struct { 7100 // VMName - The Vm name. 7101 VMName *string `json:"vmName,omitempty"` 7102 // CloudName - The Cloud name. 7103 CloudName *string `json:"cloudName,omitempty"` 7104 // Details - The list of details regarding state of the Protected Entity in SRS and On prem. 7105 Details *[]string `json:"details,omitempty"` 7106 // ErrorIds - The list of error ids. 7107 ErrorIds *[]string `json:"errorIds,omitempty"` 7108} 7109 7110// InitialReplicationDetails initial replication details. 7111type InitialReplicationDetails struct { 7112 // InitialReplicationType - Initial replication type. 7113 InitialReplicationType *string `json:"initialReplicationType,omitempty"` 7114 // InitialReplicationProgressPercentage - The initial replication progress percentage. 7115 InitialReplicationProgressPercentage *string `json:"initialReplicationProgressPercentage,omitempty"` 7116} 7117 7118// InlineWorkflowTaskDetails this class represents the inline workflow task details. 7119type InlineWorkflowTaskDetails struct { 7120 // WorkflowIds - The list of child workflow ids. 7121 WorkflowIds *[]string `json:"workflowIds,omitempty"` 7122 // ChildTasks - The child tasks. 7123 ChildTasks *[]ASRTask `json:"childTasks,omitempty"` 7124 // InstanceType - Possible values include: 'InstanceTypeGroupTaskDetails', 'InstanceTypeInlineWorkflowTaskDetails', 'InstanceTypeRecoveryPlanGroupTaskDetails', 'InstanceTypeRecoveryPlanShutdownGroupTaskDetails' 7125 InstanceType InstanceTypeBasicGroupTaskDetails `json:"instanceType,omitempty"` 7126} 7127 7128// MarshalJSON is the custom marshaler for InlineWorkflowTaskDetails. 7129func (iwtd InlineWorkflowTaskDetails) MarshalJSON() ([]byte, error) { 7130 iwtd.InstanceType = InstanceTypeInlineWorkflowTaskDetails 7131 objectMap := make(map[string]interface{}) 7132 if iwtd.WorkflowIds != nil { 7133 objectMap["workflowIds"] = iwtd.WorkflowIds 7134 } 7135 if iwtd.ChildTasks != nil { 7136 objectMap["childTasks"] = iwtd.ChildTasks 7137 } 7138 if iwtd.InstanceType != "" { 7139 objectMap["instanceType"] = iwtd.InstanceType 7140 } 7141 return json.Marshal(objectMap) 7142} 7143 7144// AsInlineWorkflowTaskDetails is the BasicGroupTaskDetails implementation for InlineWorkflowTaskDetails. 7145func (iwtd InlineWorkflowTaskDetails) AsInlineWorkflowTaskDetails() (*InlineWorkflowTaskDetails, bool) { 7146 return &iwtd, true 7147} 7148 7149// AsRecoveryPlanGroupTaskDetails is the BasicGroupTaskDetails implementation for InlineWorkflowTaskDetails. 7150func (iwtd InlineWorkflowTaskDetails) AsRecoveryPlanGroupTaskDetails() (*RecoveryPlanGroupTaskDetails, bool) { 7151 return nil, false 7152} 7153 7154// AsRecoveryPlanShutdownGroupTaskDetails is the BasicGroupTaskDetails implementation for InlineWorkflowTaskDetails. 7155func (iwtd InlineWorkflowTaskDetails) AsRecoveryPlanShutdownGroupTaskDetails() (*RecoveryPlanShutdownGroupTaskDetails, bool) { 7156 return nil, false 7157} 7158 7159// AsGroupTaskDetails is the BasicGroupTaskDetails implementation for InlineWorkflowTaskDetails. 7160func (iwtd InlineWorkflowTaskDetails) AsGroupTaskDetails() (*GroupTaskDetails, bool) { 7161 return nil, false 7162} 7163 7164// AsBasicGroupTaskDetails is the BasicGroupTaskDetails implementation for InlineWorkflowTaskDetails. 7165func (iwtd InlineWorkflowTaskDetails) AsBasicGroupTaskDetails() (BasicGroupTaskDetails, bool) { 7166 return &iwtd, true 7167} 7168 7169// InMageAgentDetails the details of the InMage agent. 7170type InMageAgentDetails struct { 7171 // AgentVersion - The agent version. 7172 AgentVersion *string `json:"agentVersion,omitempty"` 7173 // AgentUpdateStatus - A value indicating whether installed agent needs to be updated. 7174 AgentUpdateStatus *string `json:"agentUpdateStatus,omitempty"` 7175 // PostUpdateRebootStatus - A value indicating whether reboot is required after update is applied. 7176 PostUpdateRebootStatus *string `json:"postUpdateRebootStatus,omitempty"` 7177 // AgentExpiryDate - Agent expiry date. 7178 AgentExpiryDate *date.Time `json:"agentExpiryDate,omitempty"` 7179} 7180 7181// InMageAgentVersionDetails inMage agent version details. 7182type InMageAgentVersionDetails struct { 7183 // PostUpdateRebootStatus - A value indicating whether reboot is required after update is applied. 7184 PostUpdateRebootStatus *string `json:"postUpdateRebootStatus,omitempty"` 7185 // Version - The agent version. 7186 Version *string `json:"version,omitempty"` 7187 // ExpiryDate - Version expiry date. 7188 ExpiryDate *date.Time `json:"expiryDate,omitempty"` 7189 // Status - A value indicating whether security update required. Possible values include: 'Supported', 'NotSupported', 'Deprecated', 'UpdateRequired', 'SecurityUpdateRequired' 7190 Status AgentVersionStatus `json:"status,omitempty"` 7191} 7192 7193// InMageAzureV2ApplyRecoveryPointInput applyRecoveryPoint input specific to InMageAzureV2 provider. 7194type InMageAzureV2ApplyRecoveryPointInput struct { 7195 // VaultLocation - The vault location where the recovery Vm resides. 7196 VaultLocation *string `json:"vaultLocation,omitempty"` 7197 // InstanceType - Possible values include: 'InstanceTypeApplyRecoveryPointProviderSpecificInput', 'InstanceTypeA2A', 'InstanceTypeHyperVReplicaAzure', 'InstanceTypeInMageAzureV2' 7198 InstanceType InstanceType `json:"instanceType,omitempty"` 7199} 7200 7201// MarshalJSON is the custom marshaler for InMageAzureV2ApplyRecoveryPointInput. 7202func (imavarpi InMageAzureV2ApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { 7203 imavarpi.InstanceType = InstanceTypeInMageAzureV2 7204 objectMap := make(map[string]interface{}) 7205 if imavarpi.VaultLocation != nil { 7206 objectMap["vaultLocation"] = imavarpi.VaultLocation 7207 } 7208 if imavarpi.InstanceType != "" { 7209 objectMap["instanceType"] = imavarpi.InstanceType 7210 } 7211 return json.Marshal(objectMap) 7212} 7213 7214// AsA2AApplyRecoveryPointInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for InMageAzureV2ApplyRecoveryPointInput. 7215func (imavarpi InMageAzureV2ApplyRecoveryPointInput) AsA2AApplyRecoveryPointInput() (*A2AApplyRecoveryPointInput, bool) { 7216 return nil, false 7217} 7218 7219// AsHyperVReplicaAzureApplyRecoveryPointInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for InMageAzureV2ApplyRecoveryPointInput. 7220func (imavarpi InMageAzureV2ApplyRecoveryPointInput) AsHyperVReplicaAzureApplyRecoveryPointInput() (*HyperVReplicaAzureApplyRecoveryPointInput, bool) { 7221 return nil, false 7222} 7223 7224// AsInMageAzureV2ApplyRecoveryPointInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for InMageAzureV2ApplyRecoveryPointInput. 7225func (imavarpi InMageAzureV2ApplyRecoveryPointInput) AsInMageAzureV2ApplyRecoveryPointInput() (*InMageAzureV2ApplyRecoveryPointInput, bool) { 7226 return &imavarpi, true 7227} 7228 7229// AsApplyRecoveryPointProviderSpecificInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for InMageAzureV2ApplyRecoveryPointInput. 7230func (imavarpi InMageAzureV2ApplyRecoveryPointInput) AsApplyRecoveryPointProviderSpecificInput() (*ApplyRecoveryPointProviderSpecificInput, bool) { 7231 return nil, false 7232} 7233 7234// AsBasicApplyRecoveryPointProviderSpecificInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for InMageAzureV2ApplyRecoveryPointInput. 7235func (imavarpi InMageAzureV2ApplyRecoveryPointInput) AsBasicApplyRecoveryPointProviderSpecificInput() (BasicApplyRecoveryPointProviderSpecificInput, bool) { 7236 return &imavarpi, true 7237} 7238 7239// InMageAzureV2EnableProtectionInput vMware Azure specific enable protection input. 7240type InMageAzureV2EnableProtectionInput struct { 7241 // MasterTargetID - The Master target Id. 7242 MasterTargetID *string `json:"masterTargetId,omitempty"` 7243 // ProcessServerID - The Process Server Id. 7244 ProcessServerID *string `json:"processServerId,omitempty"` 7245 // StorageAccountID - The storage account name. 7246 StorageAccountID *string `json:"storageAccountId,omitempty"` 7247 // RunAsAccountID - The CS account Id. 7248 RunAsAccountID *string `json:"runAsAccountId,omitempty"` 7249 // MultiVMGroupID - The multi vm group Id. 7250 MultiVMGroupID *string `json:"multiVmGroupId,omitempty"` 7251 // MultiVMGroupName - The multi vm group name. 7252 MultiVMGroupName *string `json:"multiVmGroupName,omitempty"` 7253 // DisksToInclude - The disks to include list. 7254 DisksToInclude *[]string `json:"disksToInclude,omitempty"` 7255 // TargetAzureNetworkID - The selected target Azure network Id. 7256 TargetAzureNetworkID *string `json:"targetAzureNetworkId,omitempty"` 7257 // TargetAzureSubnetID - The selected target Azure subnet Id. 7258 TargetAzureSubnetID *string `json:"targetAzureSubnetId,omitempty"` 7259 // EnableRdpOnTargetOption - The selected option to enable RDP\SSH on target vm after failover. String value of {SrsDataContract.EnableRDPOnTargetOption} enum. 7260 EnableRdpOnTargetOption *string `json:"enableRdpOnTargetOption,omitempty"` 7261 // TargetAzureVMName - The target azure Vm Name. 7262 TargetAzureVMName *string `json:"targetAzureVmName,omitempty"` 7263 // LogStorageAccountID - The storage account to be used for logging during replication. 7264 LogStorageAccountID *string `json:"logStorageAccountId,omitempty"` 7265 // TargetAzureV1ResourceGroupID - The Id of the target resource group (for classic deployment) in which the failover VM is to be created. 7266 TargetAzureV1ResourceGroupID *string `json:"targetAzureV1ResourceGroupId,omitempty"` 7267 // TargetAzureV2ResourceGroupID - The Id of the target resource group (for resource manager deployment) in which the failover VM is to be created. 7268 TargetAzureV2ResourceGroupID *string `json:"targetAzureV2ResourceGroupId,omitempty"` 7269 // UseManagedDisks - A value indicating whether managed disks should be used during failover. 7270 UseManagedDisks *string `json:"useManagedDisks,omitempty"` 7271 // InstanceType - Possible values include: 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeEnableProtectionProviderSpecificInput', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeSan' 7272 InstanceType InstanceTypeBasicEnableProtectionProviderSpecificInput `json:"instanceType,omitempty"` 7273} 7274 7275// MarshalJSON is the custom marshaler for InMageAzureV2EnableProtectionInput. 7276func (imavepi InMageAzureV2EnableProtectionInput) MarshalJSON() ([]byte, error) { 7277 imavepi.InstanceType = InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMageAzureV2 7278 objectMap := make(map[string]interface{}) 7279 if imavepi.MasterTargetID != nil { 7280 objectMap["masterTargetId"] = imavepi.MasterTargetID 7281 } 7282 if imavepi.ProcessServerID != nil { 7283 objectMap["processServerId"] = imavepi.ProcessServerID 7284 } 7285 if imavepi.StorageAccountID != nil { 7286 objectMap["storageAccountId"] = imavepi.StorageAccountID 7287 } 7288 if imavepi.RunAsAccountID != nil { 7289 objectMap["runAsAccountId"] = imavepi.RunAsAccountID 7290 } 7291 if imavepi.MultiVMGroupID != nil { 7292 objectMap["multiVmGroupId"] = imavepi.MultiVMGroupID 7293 } 7294 if imavepi.MultiVMGroupName != nil { 7295 objectMap["multiVmGroupName"] = imavepi.MultiVMGroupName 7296 } 7297 if imavepi.DisksToInclude != nil { 7298 objectMap["disksToInclude"] = imavepi.DisksToInclude 7299 } 7300 if imavepi.TargetAzureNetworkID != nil { 7301 objectMap["targetAzureNetworkId"] = imavepi.TargetAzureNetworkID 7302 } 7303 if imavepi.TargetAzureSubnetID != nil { 7304 objectMap["targetAzureSubnetId"] = imavepi.TargetAzureSubnetID 7305 } 7306 if imavepi.EnableRdpOnTargetOption != nil { 7307 objectMap["enableRdpOnTargetOption"] = imavepi.EnableRdpOnTargetOption 7308 } 7309 if imavepi.TargetAzureVMName != nil { 7310 objectMap["targetAzureVmName"] = imavepi.TargetAzureVMName 7311 } 7312 if imavepi.LogStorageAccountID != nil { 7313 objectMap["logStorageAccountId"] = imavepi.LogStorageAccountID 7314 } 7315 if imavepi.TargetAzureV1ResourceGroupID != nil { 7316 objectMap["targetAzureV1ResourceGroupId"] = imavepi.TargetAzureV1ResourceGroupID 7317 } 7318 if imavepi.TargetAzureV2ResourceGroupID != nil { 7319 objectMap["targetAzureV2ResourceGroupId"] = imavepi.TargetAzureV2ResourceGroupID 7320 } 7321 if imavepi.UseManagedDisks != nil { 7322 objectMap["useManagedDisks"] = imavepi.UseManagedDisks 7323 } 7324 if imavepi.InstanceType != "" { 7325 objectMap["instanceType"] = imavepi.InstanceType 7326 } 7327 return json.Marshal(objectMap) 7328} 7329 7330// AsA2AEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for InMageAzureV2EnableProtectionInput. 7331func (imavepi InMageAzureV2EnableProtectionInput) AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool) { 7332 return nil, false 7333} 7334 7335// AsHyperVReplicaAzureEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for InMageAzureV2EnableProtectionInput. 7336func (imavepi InMageAzureV2EnableProtectionInput) AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool) { 7337 return nil, false 7338} 7339 7340// AsInMageAzureV2EnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for InMageAzureV2EnableProtectionInput. 7341func (imavepi InMageAzureV2EnableProtectionInput) AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool) { 7342 return &imavepi, true 7343} 7344 7345// AsInMageEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for InMageAzureV2EnableProtectionInput. 7346func (imavepi InMageAzureV2EnableProtectionInput) AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool) { 7347 return nil, false 7348} 7349 7350// AsSanEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for InMageAzureV2EnableProtectionInput. 7351func (imavepi InMageAzureV2EnableProtectionInput) AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool) { 7352 return nil, false 7353} 7354 7355// AsEnableProtectionProviderSpecificInput is the BasicEnableProtectionProviderSpecificInput implementation for InMageAzureV2EnableProtectionInput. 7356func (imavepi InMageAzureV2EnableProtectionInput) AsEnableProtectionProviderSpecificInput() (*EnableProtectionProviderSpecificInput, bool) { 7357 return nil, false 7358} 7359 7360// AsBasicEnableProtectionProviderSpecificInput is the BasicEnableProtectionProviderSpecificInput implementation for InMageAzureV2EnableProtectionInput. 7361func (imavepi InMageAzureV2EnableProtectionInput) AsBasicEnableProtectionProviderSpecificInput() (BasicEnableProtectionProviderSpecificInput, bool) { 7362 return &imavepi, true 7363} 7364 7365// InMageAzureV2EventDetails model class for event details of a VMwareAzureV2 event. 7366type InMageAzureV2EventDetails struct { 7367 // EventType - InMage Event type. Takes one of the values of {InMageDataContract.InMageMonitoringEventType}. 7368 EventType *string `json:"eventType,omitempty"` 7369 // Category - InMage Event Category. 7370 Category *string `json:"category,omitempty"` 7371 // Component - InMage Event Component. 7372 Component *string `json:"component,omitempty"` 7373 // CorrectiveAction - Corrective Action string for the event. 7374 CorrectiveAction *string `json:"correctiveAction,omitempty"` 7375 // Details - InMage Event Details. 7376 Details *string `json:"details,omitempty"` 7377 // Summary - InMage Event Summary. 7378 Summary *string `json:"summary,omitempty"` 7379 // SiteName - VMware Site name. 7380 SiteName *string `json:"siteName,omitempty"` 7381 // InstanceType - Possible values include: 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeEventProviderSpecificDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaBaseEventDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeVMwareCbt' 7382 InstanceType InstanceTypeBasicEventProviderSpecificDetails `json:"instanceType,omitempty"` 7383} 7384 7385// MarshalJSON is the custom marshaler for InMageAzureV2EventDetails. 7386func (imaved InMageAzureV2EventDetails) MarshalJSON() ([]byte, error) { 7387 imaved.InstanceType = InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageAzureV2 7388 objectMap := make(map[string]interface{}) 7389 if imaved.EventType != nil { 7390 objectMap["eventType"] = imaved.EventType 7391 } 7392 if imaved.Category != nil { 7393 objectMap["category"] = imaved.Category 7394 } 7395 if imaved.Component != nil { 7396 objectMap["component"] = imaved.Component 7397 } 7398 if imaved.CorrectiveAction != nil { 7399 objectMap["correctiveAction"] = imaved.CorrectiveAction 7400 } 7401 if imaved.Details != nil { 7402 objectMap["details"] = imaved.Details 7403 } 7404 if imaved.Summary != nil { 7405 objectMap["summary"] = imaved.Summary 7406 } 7407 if imaved.SiteName != nil { 7408 objectMap["siteName"] = imaved.SiteName 7409 } 7410 if imaved.InstanceType != "" { 7411 objectMap["instanceType"] = imaved.InstanceType 7412 } 7413 return json.Marshal(objectMap) 7414} 7415 7416// AsA2AEventDetails is the BasicEventProviderSpecificDetails implementation for InMageAzureV2EventDetails. 7417func (imaved InMageAzureV2EventDetails) AsA2AEventDetails() (*A2AEventDetails, bool) { 7418 return nil, false 7419} 7420 7421// AsHyperVReplica2012EventDetails is the BasicEventProviderSpecificDetails implementation for InMageAzureV2EventDetails. 7422func (imaved InMageAzureV2EventDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) { 7423 return nil, false 7424} 7425 7426// AsHyperVReplica2012R2EventDetails is the BasicEventProviderSpecificDetails implementation for InMageAzureV2EventDetails. 7427func (imaved InMageAzureV2EventDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) { 7428 return nil, false 7429} 7430 7431// AsHyperVReplicaAzureEventDetails is the BasicEventProviderSpecificDetails implementation for InMageAzureV2EventDetails. 7432func (imaved InMageAzureV2EventDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) { 7433 return nil, false 7434} 7435 7436// AsHyperVReplicaBaseEventDetails is the BasicEventProviderSpecificDetails implementation for InMageAzureV2EventDetails. 7437func (imaved InMageAzureV2EventDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) { 7438 return nil, false 7439} 7440 7441// AsInMageAzureV2EventDetails is the BasicEventProviderSpecificDetails implementation for InMageAzureV2EventDetails. 7442func (imaved InMageAzureV2EventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) { 7443 return &imaved, true 7444} 7445 7446// AsVMwareCbtEventDetails is the BasicEventProviderSpecificDetails implementation for InMageAzureV2EventDetails. 7447func (imaved InMageAzureV2EventDetails) AsVMwareCbtEventDetails() (*VMwareCbtEventDetails, bool) { 7448 return nil, false 7449} 7450 7451// AsEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for InMageAzureV2EventDetails. 7452func (imaved InMageAzureV2EventDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) { 7453 return nil, false 7454} 7455 7456// AsBasicEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for InMageAzureV2EventDetails. 7457func (imaved InMageAzureV2EventDetails) AsBasicEventProviderSpecificDetails() (BasicEventProviderSpecificDetails, bool) { 7458 return &imaved, true 7459} 7460 7461// InMageAzureV2FailoverProviderInput inMageAzureV2 provider specific input for failover. 7462type InMageAzureV2FailoverProviderInput struct { 7463 // VaultLocation - Location of the vault. 7464 VaultLocation *string `json:"vaultLocation,omitempty"` 7465 // RecoveryPointID - The recovery point id to be passed to failover to a particular recovery point. In case of latest recovery point, null should be passed. 7466 RecoveryPointID *string `json:"recoveryPointId,omitempty"` 7467 // InstanceType - Possible values include: 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeProviderSpecificFailoverInput', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeA2A', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMage' 7468 InstanceType InstanceTypeBasicProviderSpecificFailoverInput `json:"instanceType,omitempty"` 7469} 7470 7471// MarshalJSON is the custom marshaler for InMageAzureV2FailoverProviderInput. 7472func (imavfpi InMageAzureV2FailoverProviderInput) MarshalJSON() ([]byte, error) { 7473 imavfpi.InstanceType = InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMageAzureV2 7474 objectMap := make(map[string]interface{}) 7475 if imavfpi.VaultLocation != nil { 7476 objectMap["vaultLocation"] = imavfpi.VaultLocation 7477 } 7478 if imavfpi.RecoveryPointID != nil { 7479 objectMap["recoveryPointId"] = imavfpi.RecoveryPointID 7480 } 7481 if imavfpi.InstanceType != "" { 7482 objectMap["instanceType"] = imavfpi.InstanceType 7483 } 7484 return json.Marshal(objectMap) 7485} 7486 7487// AsA2AFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for InMageAzureV2FailoverProviderInput. 7488func (imavfpi InMageAzureV2FailoverProviderInput) AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool) { 7489 return nil, false 7490} 7491 7492// AsHyperVReplicaAzureFailbackProviderInput is the BasicProviderSpecificFailoverInput implementation for InMageAzureV2FailoverProviderInput. 7493func (imavfpi InMageAzureV2FailoverProviderInput) AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool) { 7494 return nil, false 7495} 7496 7497// AsHyperVReplicaAzureFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for InMageAzureV2FailoverProviderInput. 7498func (imavfpi InMageAzureV2FailoverProviderInput) AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool) { 7499 return nil, false 7500} 7501 7502// AsInMageAzureV2FailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for InMageAzureV2FailoverProviderInput. 7503func (imavfpi InMageAzureV2FailoverProviderInput) AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool) { 7504 return &imavfpi, true 7505} 7506 7507// AsInMageFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for InMageAzureV2FailoverProviderInput. 7508func (imavfpi InMageAzureV2FailoverProviderInput) AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool) { 7509 return nil, false 7510} 7511 7512// AsProviderSpecificFailoverInput is the BasicProviderSpecificFailoverInput implementation for InMageAzureV2FailoverProviderInput. 7513func (imavfpi InMageAzureV2FailoverProviderInput) AsProviderSpecificFailoverInput() (*ProviderSpecificFailoverInput, bool) { 7514 return nil, false 7515} 7516 7517// AsBasicProviderSpecificFailoverInput is the BasicProviderSpecificFailoverInput implementation for InMageAzureV2FailoverProviderInput. 7518func (imavfpi InMageAzureV2FailoverProviderInput) AsBasicProviderSpecificFailoverInput() (BasicProviderSpecificFailoverInput, bool) { 7519 return &imavfpi, true 7520} 7521 7522// InMageAzureV2PolicyDetails inMage Azure v2 specific protection profile details. 7523type InMageAzureV2PolicyDetails struct { 7524 // CrashConsistentFrequencyInMinutes - The crash consistent snapshot frequency in minutes. 7525 CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"` 7526 // RecoveryPointThresholdInMinutes - The recovery point threshold in minutes. 7527 RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"` 7528 // RecoveryPointHistory - The duration in minutes until which the recovery points need to be stored. 7529 RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` 7530 // AppConsistentFrequencyInMinutes - The app consistent snapshot frequency in minutes. 7531 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` 7532 // MultiVMSyncStatus - A value indicating whether multi-VM sync has to be enabled. 7533 MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"` 7534 // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypePolicyProviderSpecificDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt' 7535 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"` 7536} 7537 7538// MarshalJSON is the custom marshaler for InMageAzureV2PolicyDetails. 7539func (imavpd InMageAzureV2PolicyDetails) MarshalJSON() ([]byte, error) { 7540 imavpd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2 7541 objectMap := make(map[string]interface{}) 7542 if imavpd.CrashConsistentFrequencyInMinutes != nil { 7543 objectMap["crashConsistentFrequencyInMinutes"] = imavpd.CrashConsistentFrequencyInMinutes 7544 } 7545 if imavpd.RecoveryPointThresholdInMinutes != nil { 7546 objectMap["recoveryPointThresholdInMinutes"] = imavpd.RecoveryPointThresholdInMinutes 7547 } 7548 if imavpd.RecoveryPointHistory != nil { 7549 objectMap["recoveryPointHistory"] = imavpd.RecoveryPointHistory 7550 } 7551 if imavpd.AppConsistentFrequencyInMinutes != nil { 7552 objectMap["appConsistentFrequencyInMinutes"] = imavpd.AppConsistentFrequencyInMinutes 7553 } 7554 if imavpd.MultiVMSyncStatus != nil { 7555 objectMap["multiVmSyncStatus"] = imavpd.MultiVMSyncStatus 7556 } 7557 if imavpd.InstanceType != "" { 7558 objectMap["instanceType"] = imavpd.InstanceType 7559 } 7560 return json.Marshal(objectMap) 7561} 7562 7563// AsA2APolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageAzureV2PolicyDetails. 7564func (imavpd InMageAzureV2PolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) { 7565 return nil, false 7566} 7567 7568// AsHyperVReplicaAzurePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageAzureV2PolicyDetails. 7569func (imavpd InMageAzureV2PolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) { 7570 return nil, false 7571} 7572 7573// AsHyperVReplicaBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageAzureV2PolicyDetails. 7574func (imavpd InMageAzureV2PolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) { 7575 return nil, false 7576} 7577 7578// AsHyperVReplicaBluePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageAzureV2PolicyDetails. 7579func (imavpd InMageAzureV2PolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) { 7580 return nil, false 7581} 7582 7583// AsHyperVReplicaPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageAzureV2PolicyDetails. 7584func (imavpd InMageAzureV2PolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) { 7585 return nil, false 7586} 7587 7588// AsInMageAzureV2PolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageAzureV2PolicyDetails. 7589func (imavpd InMageAzureV2PolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) { 7590 return &imavpd, true 7591} 7592 7593// AsInMageBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageAzureV2PolicyDetails. 7594func (imavpd InMageAzureV2PolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) { 7595 return nil, false 7596} 7597 7598// AsInMagePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageAzureV2PolicyDetails. 7599func (imavpd InMageAzureV2PolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) { 7600 return nil, false 7601} 7602 7603// AsRcmAzureMigrationPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageAzureV2PolicyDetails. 7604func (imavpd InMageAzureV2PolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) { 7605 return nil, false 7606} 7607 7608// AsVmwareCbtPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageAzureV2PolicyDetails. 7609func (imavpd InMageAzureV2PolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) { 7610 return nil, false 7611} 7612 7613// AsPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for InMageAzureV2PolicyDetails. 7614func (imavpd InMageAzureV2PolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) { 7615 return nil, false 7616} 7617 7618// AsBasicPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for InMageAzureV2PolicyDetails. 7619func (imavpd InMageAzureV2PolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) { 7620 return &imavpd, true 7621} 7622 7623// InMageAzureV2PolicyInput vMWare Azure specific policy Input. 7624type InMageAzureV2PolicyInput struct { 7625 // RecoveryPointThresholdInMinutes - The recovery point threshold in minutes. 7626 RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"` 7627 // RecoveryPointHistory - The duration in minutes until which the recovery points need to be stored. 7628 RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` 7629 // CrashConsistentFrequencyInMinutes - The crash consistent snapshot frequency (in minutes). 7630 CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"` 7631 // AppConsistentFrequencyInMinutes - The app consistent snapshot frequency (in minutes). 7632 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` 7633 // MultiVMSyncStatus - A value indicating whether multi-VM sync has to be enabled. Value should be 'Enabled' or 'Disabled'. Possible values include: 'Enable', 'Disable' 7634 MultiVMSyncStatus SetMultiVMSyncStatus `json:"multiVmSyncStatus,omitempty"` 7635 // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypePolicyProviderSpecificInput', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeVMwareCbt' 7636 InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"` 7637} 7638 7639// MarshalJSON is the custom marshaler for InMageAzureV2PolicyInput. 7640func (imavpi InMageAzureV2PolicyInput) MarshalJSON() ([]byte, error) { 7641 imavpi.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMageAzureV2 7642 objectMap := make(map[string]interface{}) 7643 if imavpi.RecoveryPointThresholdInMinutes != nil { 7644 objectMap["recoveryPointThresholdInMinutes"] = imavpi.RecoveryPointThresholdInMinutes 7645 } 7646 if imavpi.RecoveryPointHistory != nil { 7647 objectMap["recoveryPointHistory"] = imavpi.RecoveryPointHistory 7648 } 7649 if imavpi.CrashConsistentFrequencyInMinutes != nil { 7650 objectMap["crashConsistentFrequencyInMinutes"] = imavpi.CrashConsistentFrequencyInMinutes 7651 } 7652 if imavpi.AppConsistentFrequencyInMinutes != nil { 7653 objectMap["appConsistentFrequencyInMinutes"] = imavpi.AppConsistentFrequencyInMinutes 7654 } 7655 if imavpi.MultiVMSyncStatus != "" { 7656 objectMap["multiVmSyncStatus"] = imavpi.MultiVMSyncStatus 7657 } 7658 if imavpi.InstanceType != "" { 7659 objectMap["instanceType"] = imavpi.InstanceType 7660 } 7661 return json.Marshal(objectMap) 7662} 7663 7664// AsA2APolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for InMageAzureV2PolicyInput. 7665func (imavpi InMageAzureV2PolicyInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) { 7666 return nil, false 7667} 7668 7669// AsHyperVReplicaAzurePolicyInput is the BasicPolicyProviderSpecificInput implementation for InMageAzureV2PolicyInput. 7670func (imavpi InMageAzureV2PolicyInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) { 7671 return nil, false 7672} 7673 7674// AsHyperVReplicaBluePolicyInput is the BasicPolicyProviderSpecificInput implementation for InMageAzureV2PolicyInput. 7675func (imavpi InMageAzureV2PolicyInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) { 7676 return nil, false 7677} 7678 7679// AsHyperVReplicaPolicyInput is the BasicPolicyProviderSpecificInput implementation for InMageAzureV2PolicyInput. 7680func (imavpi InMageAzureV2PolicyInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) { 7681 return nil, false 7682} 7683 7684// AsInMageAzureV2PolicyInput is the BasicPolicyProviderSpecificInput implementation for InMageAzureV2PolicyInput. 7685func (imavpi InMageAzureV2PolicyInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) { 7686 return &imavpi, true 7687} 7688 7689// AsInMagePolicyInput is the BasicPolicyProviderSpecificInput implementation for InMageAzureV2PolicyInput. 7690func (imavpi InMageAzureV2PolicyInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) { 7691 return nil, false 7692} 7693 7694// AsVMwareCbtPolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for InMageAzureV2PolicyInput. 7695func (imavpi InMageAzureV2PolicyInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) { 7696 return nil, false 7697} 7698 7699// AsPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for InMageAzureV2PolicyInput. 7700func (imavpi InMageAzureV2PolicyInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) { 7701 return nil, false 7702} 7703 7704// AsBasicPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for InMageAzureV2PolicyInput. 7705func (imavpi InMageAzureV2PolicyInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) { 7706 return &imavpi, true 7707} 7708 7709// InMageAzureV2ProtectedDiskDetails inMageAzureV2 protected disk details. 7710type InMageAzureV2ProtectedDiskDetails struct { 7711 // DiskID - The disk id. 7712 DiskID *string `json:"diskId,omitempty"` 7713 // DiskName - The disk name. 7714 DiskName *string `json:"diskName,omitempty"` 7715 // ProtectionStage - The protection stage. 7716 ProtectionStage *string `json:"protectionStage,omitempty"` 7717 // HealthErrorCode - The health error code for the disk. 7718 HealthErrorCode *string `json:"healthErrorCode,omitempty"` 7719 // RpoInSeconds - The RPO in seconds. 7720 RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"` 7721 // ResyncRequired - A value indicating whether resync is required for this disk. 7722 ResyncRequired *string `json:"resyncRequired,omitempty"` 7723 // ResyncProgressPercentage - The resync progress percentage. 7724 ResyncProgressPercentage *int32 `json:"resyncProgressPercentage,omitempty"` 7725 // ResyncDurationInSeconds - The resync duration in seconds. 7726 ResyncDurationInSeconds *int64 `json:"resyncDurationInSeconds,omitempty"` 7727 // DiskCapacityInBytes - The disk capacity in bytes. 7728 DiskCapacityInBytes *int64 `json:"diskCapacityInBytes,omitempty"` 7729 // FileSystemCapacityInBytes - The disk file system capacity in bytes. 7730 FileSystemCapacityInBytes *int64 `json:"fileSystemCapacityInBytes,omitempty"` 7731 // SourceDataInMegaBytes - The source data transit in MB. 7732 SourceDataInMegaBytes *float64 `json:"sourceDataInMegaBytes,omitempty"` 7733 // PsDataInMegaBytes - The PS data transit in MB. 7734 PsDataInMegaBytes *float64 `json:"psDataInMegaBytes,omitempty"` 7735 // TargetDataInMegaBytes - The target data transit in MB. 7736 TargetDataInMegaBytes *float64 `json:"targetDataInMegaBytes,omitempty"` 7737 // DiskResized - A value indicating whether disk is resized. 7738 DiskResized *string `json:"diskResized,omitempty"` 7739 // LastRpoCalculatedTime - The last RPO calculated time. 7740 LastRpoCalculatedTime *date.Time `json:"lastRpoCalculatedTime,omitempty"` 7741} 7742 7743// InMageAzureV2RecoveryPointDetails inMage Azure V2 provider specific recovery point details. 7744type InMageAzureV2RecoveryPointDetails struct { 7745 // IsMultiVMSyncPoint - A value indicating whether the recovery point is multi VM consistent. 7746 IsMultiVMSyncPoint *string `json:"isMultiVmSyncPoint,omitempty"` 7747 // InstanceType - Possible values include: 'InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeProviderSpecificRecoveryPointDetails', 'InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeA2A', 'InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeInMageAzureV2' 7748 InstanceType InstanceTypeBasicProviderSpecificRecoveryPointDetails `json:"instanceType,omitempty"` 7749} 7750 7751// MarshalJSON is the custom marshaler for InMageAzureV2RecoveryPointDetails. 7752func (imavrpd InMageAzureV2RecoveryPointDetails) MarshalJSON() ([]byte, error) { 7753 imavrpd.InstanceType = InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeInMageAzureV2 7754 objectMap := make(map[string]interface{}) 7755 if imavrpd.IsMultiVMSyncPoint != nil { 7756 objectMap["isMultiVmSyncPoint"] = imavrpd.IsMultiVMSyncPoint 7757 } 7758 if imavrpd.InstanceType != "" { 7759 objectMap["instanceType"] = imavrpd.InstanceType 7760 } 7761 return json.Marshal(objectMap) 7762} 7763 7764// AsA2ARecoveryPointDetails is the BasicProviderSpecificRecoveryPointDetails implementation for InMageAzureV2RecoveryPointDetails. 7765func (imavrpd InMageAzureV2RecoveryPointDetails) AsA2ARecoveryPointDetails() (*A2ARecoveryPointDetails, bool) { 7766 return nil, false 7767} 7768 7769// AsInMageAzureV2RecoveryPointDetails is the BasicProviderSpecificRecoveryPointDetails implementation for InMageAzureV2RecoveryPointDetails. 7770func (imavrpd InMageAzureV2RecoveryPointDetails) AsInMageAzureV2RecoveryPointDetails() (*InMageAzureV2RecoveryPointDetails, bool) { 7771 return &imavrpd, true 7772} 7773 7774// AsProviderSpecificRecoveryPointDetails is the BasicProviderSpecificRecoveryPointDetails implementation for InMageAzureV2RecoveryPointDetails. 7775func (imavrpd InMageAzureV2RecoveryPointDetails) AsProviderSpecificRecoveryPointDetails() (*ProviderSpecificRecoveryPointDetails, bool) { 7776 return nil, false 7777} 7778 7779// AsBasicProviderSpecificRecoveryPointDetails is the BasicProviderSpecificRecoveryPointDetails implementation for InMageAzureV2RecoveryPointDetails. 7780func (imavrpd InMageAzureV2RecoveryPointDetails) AsBasicProviderSpecificRecoveryPointDetails() (BasicProviderSpecificRecoveryPointDetails, bool) { 7781 return &imavrpd, true 7782} 7783 7784// InMageAzureV2ReplicationDetails inMageAzureV2 provider specific settings 7785type InMageAzureV2ReplicationDetails struct { 7786 // InfrastructureVMID - The infrastructure VM Id. 7787 InfrastructureVMID *string `json:"infrastructureVmId,omitempty"` 7788 // VCenterInfrastructureID - The vCenter infrastructure Id. 7789 VCenterInfrastructureID *string `json:"vCenterInfrastructureId,omitempty"` 7790 // ProtectionStage - The protection stage. 7791 ProtectionStage *string `json:"protectionStage,omitempty"` 7792 // VMID - The virtual machine Id. 7793 VMID *string `json:"vmId,omitempty"` 7794 // VMProtectionState - The protection state for the vm. 7795 VMProtectionState *string `json:"vmProtectionState,omitempty"` 7796 // VMProtectionStateDescription - The protection state description for the vm. 7797 VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` 7798 // ResyncProgressPercentage - The resync progress percentage. 7799 ResyncProgressPercentage *int32 `json:"resyncProgressPercentage,omitempty"` 7800 // RpoInSeconds - The RPO in seconds. 7801 RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"` 7802 // CompressedDataRateInMB - The compressed data change rate in MB. 7803 CompressedDataRateInMB *float64 `json:"compressedDataRateInMB,omitempty"` 7804 // UncompressedDataRateInMB - The uncompressed data change rate in MB. 7805 UncompressedDataRateInMB *float64 `json:"uncompressedDataRateInMB,omitempty"` 7806 // IPAddress - The source IP address. 7807 IPAddress *string `json:"ipAddress,omitempty"` 7808 // AgentVersion - The agent version. 7809 AgentVersion *string `json:"agentVersion,omitempty"` 7810 // AgentExpiryDate - Agent expiry date. 7811 AgentExpiryDate *date.Time `json:"agentExpiryDate,omitempty"` 7812 // IsAgentUpdateRequired - A value indicating whether installed agent needs to be updated. 7813 IsAgentUpdateRequired *string `json:"isAgentUpdateRequired,omitempty"` 7814 // IsRebootAfterUpdateRequired - A value indicating whether the source server requires a restart after update. 7815 IsRebootAfterUpdateRequired *string `json:"isRebootAfterUpdateRequired,omitempty"` 7816 // LastHeartbeat - The last heartbeat received from the source server. 7817 LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"` 7818 // ProcessServerID - The process server Id. 7819 ProcessServerID *string `json:"processServerId,omitempty"` 7820 // MultiVMGroupID - The multi vm group Id. 7821 MultiVMGroupID *string `json:"multiVmGroupId,omitempty"` 7822 // MultiVMGroupName - The multi vm group name. 7823 MultiVMGroupName *string `json:"multiVmGroupName,omitempty"` 7824 // MultiVMSyncStatus - A value indicating whether multi vm sync is enabled or disabled. 7825 MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"` 7826 // ProtectedDisks - The list of protected disks. 7827 ProtectedDisks *[]InMageAzureV2ProtectedDiskDetails `json:"protectedDisks,omitempty"` 7828 // DiskResized - A value indicating whether any disk is resized for this VM. 7829 DiskResized *string `json:"diskResized,omitempty"` 7830 // MasterTargetID - The master target Id. 7831 MasterTargetID *string `json:"masterTargetId,omitempty"` 7832 // SourceVMCPUCount - The CPU count of the VM on the primary side. 7833 SourceVMCPUCount *int32 `json:"sourceVmCpuCount,omitempty"` 7834 // SourceVMRAMSizeInMB - The RAM size of the VM on the primary side. 7835 SourceVMRAMSizeInMB *int32 `json:"sourceVmRamSizeInMB,omitempty"` 7836 // OsType - The type of the OS on the VM. 7837 OsType *string `json:"osType,omitempty"` 7838 // VhdName - The OS disk VHD name. 7839 VhdName *string `json:"vhdName,omitempty"` 7840 // OsDiskID - The id of the disk containing the OS. 7841 OsDiskID *string `json:"osDiskId,omitempty"` 7842 // AzureVMDiskDetails - Azure VM Disk details. 7843 AzureVMDiskDetails *[]AzureVMDiskDetails `json:"azureVMDiskDetails,omitempty"` 7844 // RecoveryAzureVMName - Recovery Azure given name. 7845 RecoveryAzureVMName *string `json:"recoveryAzureVMName,omitempty"` 7846 // RecoveryAzureVMSize - The Recovery Azure VM size. 7847 RecoveryAzureVMSize *string `json:"recoveryAzureVMSize,omitempty"` 7848 // RecoveryAzureStorageAccount - The recovery Azure storage account. 7849 RecoveryAzureStorageAccount *string `json:"recoveryAzureStorageAccount,omitempty"` 7850 // RecoveryAzureLogStorageAccountID - The ARM id of the log storage account used for replication. This will be set to null if no log storage account was provided during enable protection. 7851 RecoveryAzureLogStorageAccountID *string `json:"recoveryAzureLogStorageAccountId,omitempty"` 7852 // VMNics - The PE Network details. 7853 VMNics *[]VMNicDetails `json:"vmNics,omitempty"` 7854 // SelectedRecoveryAzureNetworkID - The selected recovery azure network Id. 7855 SelectedRecoveryAzureNetworkID *string `json:"selectedRecoveryAzureNetworkId,omitempty"` 7856 // SelectedSourceNicID - The selected source nic Id which will be used as the primary nic during failover. 7857 SelectedSourceNicID *string `json:"selectedSourceNicId,omitempty"` 7858 // DiscoveryType - A value indicating the discovery type of the machine. Value can be vCenter or physical. 7859 DiscoveryType *string `json:"discoveryType,omitempty"` 7860 // EnableRdpOnTargetOption - The selected option to enable RDP\SSH on target vm after failover. String value of {SrsDataContract.EnableRDPOnTargetOption} enum. 7861 EnableRdpOnTargetOption *string `json:"enableRdpOnTargetOption,omitempty"` 7862 // Datastores - The data stores of the on-premise machine. Value can be list of strings that contain data store names. 7863 Datastores *[]string `json:"datastores,omitempty"` 7864 // TargetVMID - The ARM Id of the target Azure VM. This value will be null until the VM is failed over. Only after failure it will be populated with the ARM Id of the Azure VM. 7865 TargetVMID *string `json:"targetVmId,omitempty"` 7866 // RecoveryAzureResourceGroupID - The target resource group Id. 7867 RecoveryAzureResourceGroupID *string `json:"recoveryAzureResourceGroupId,omitempty"` 7868 // RecoveryAvailabilitySetID - The recovery availability set Id. 7869 RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"` 7870 // UseManagedDisks - A value indicating whether managed disks should be used during failover. 7871 UseManagedDisks *string `json:"useManagedDisks,omitempty"` 7872 // LicenseType - License Type of the VM to be used. 7873 LicenseType *string `json:"licenseType,omitempty"` 7874 // ValidationErrors - The validation errors of the on-premise machine Value can be list of validation errors. 7875 ValidationErrors *[]HealthError `json:"validationErrors,omitempty"` 7876 // LastRpoCalculatedTime - The last RPO calculated time. 7877 LastRpoCalculatedTime *date.Time `json:"lastRpoCalculatedTime,omitempty"` 7878 // LastUpdateReceivedTime - The last update time received from on-prem components. 7879 LastUpdateReceivedTime *date.Time `json:"lastUpdateReceivedTime,omitempty"` 7880 // ReplicaID - The replica id of the protected item. 7881 ReplicaID *string `json:"replicaId,omitempty"` 7882 // OsVersion - The OS Version of the protected item. 7883 OsVersion *string `json:"osVersion,omitempty"` 7884 // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeReplicationProviderSpecificSettings', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeA2A', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaBaseReplicationDetails', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMageAzureV2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMage' 7885 InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"` 7886} 7887 7888// MarshalJSON is the custom marshaler for InMageAzureV2ReplicationDetails. 7889func (imavrd InMageAzureV2ReplicationDetails) MarshalJSON() ([]byte, error) { 7890 imavrd.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMageAzureV2 7891 objectMap := make(map[string]interface{}) 7892 if imavrd.InfrastructureVMID != nil { 7893 objectMap["infrastructureVmId"] = imavrd.InfrastructureVMID 7894 } 7895 if imavrd.VCenterInfrastructureID != nil { 7896 objectMap["vCenterInfrastructureId"] = imavrd.VCenterInfrastructureID 7897 } 7898 if imavrd.ProtectionStage != nil { 7899 objectMap["protectionStage"] = imavrd.ProtectionStage 7900 } 7901 if imavrd.VMID != nil { 7902 objectMap["vmId"] = imavrd.VMID 7903 } 7904 if imavrd.VMProtectionState != nil { 7905 objectMap["vmProtectionState"] = imavrd.VMProtectionState 7906 } 7907 if imavrd.VMProtectionStateDescription != nil { 7908 objectMap["vmProtectionStateDescription"] = imavrd.VMProtectionStateDescription 7909 } 7910 if imavrd.ResyncProgressPercentage != nil { 7911 objectMap["resyncProgressPercentage"] = imavrd.ResyncProgressPercentage 7912 } 7913 if imavrd.RpoInSeconds != nil { 7914 objectMap["rpoInSeconds"] = imavrd.RpoInSeconds 7915 } 7916 if imavrd.CompressedDataRateInMB != nil { 7917 objectMap["compressedDataRateInMB"] = imavrd.CompressedDataRateInMB 7918 } 7919 if imavrd.UncompressedDataRateInMB != nil { 7920 objectMap["uncompressedDataRateInMB"] = imavrd.UncompressedDataRateInMB 7921 } 7922 if imavrd.IPAddress != nil { 7923 objectMap["ipAddress"] = imavrd.IPAddress 7924 } 7925 if imavrd.AgentVersion != nil { 7926 objectMap["agentVersion"] = imavrd.AgentVersion 7927 } 7928 if imavrd.AgentExpiryDate != nil { 7929 objectMap["agentExpiryDate"] = imavrd.AgentExpiryDate 7930 } 7931 if imavrd.IsAgentUpdateRequired != nil { 7932 objectMap["isAgentUpdateRequired"] = imavrd.IsAgentUpdateRequired 7933 } 7934 if imavrd.IsRebootAfterUpdateRequired != nil { 7935 objectMap["isRebootAfterUpdateRequired"] = imavrd.IsRebootAfterUpdateRequired 7936 } 7937 if imavrd.LastHeartbeat != nil { 7938 objectMap["lastHeartbeat"] = imavrd.LastHeartbeat 7939 } 7940 if imavrd.ProcessServerID != nil { 7941 objectMap["processServerId"] = imavrd.ProcessServerID 7942 } 7943 if imavrd.MultiVMGroupID != nil { 7944 objectMap["multiVmGroupId"] = imavrd.MultiVMGroupID 7945 } 7946 if imavrd.MultiVMGroupName != nil { 7947 objectMap["multiVmGroupName"] = imavrd.MultiVMGroupName 7948 } 7949 if imavrd.MultiVMSyncStatus != nil { 7950 objectMap["multiVmSyncStatus"] = imavrd.MultiVMSyncStatus 7951 } 7952 if imavrd.ProtectedDisks != nil { 7953 objectMap["protectedDisks"] = imavrd.ProtectedDisks 7954 } 7955 if imavrd.DiskResized != nil { 7956 objectMap["diskResized"] = imavrd.DiskResized 7957 } 7958 if imavrd.MasterTargetID != nil { 7959 objectMap["masterTargetId"] = imavrd.MasterTargetID 7960 } 7961 if imavrd.SourceVMCPUCount != nil { 7962 objectMap["sourceVmCpuCount"] = imavrd.SourceVMCPUCount 7963 } 7964 if imavrd.SourceVMRAMSizeInMB != nil { 7965 objectMap["sourceVmRamSizeInMB"] = imavrd.SourceVMRAMSizeInMB 7966 } 7967 if imavrd.OsType != nil { 7968 objectMap["osType"] = imavrd.OsType 7969 } 7970 if imavrd.VhdName != nil { 7971 objectMap["vhdName"] = imavrd.VhdName 7972 } 7973 if imavrd.OsDiskID != nil { 7974 objectMap["osDiskId"] = imavrd.OsDiskID 7975 } 7976 if imavrd.AzureVMDiskDetails != nil { 7977 objectMap["azureVMDiskDetails"] = imavrd.AzureVMDiskDetails 7978 } 7979 if imavrd.RecoveryAzureVMName != nil { 7980 objectMap["recoveryAzureVMName"] = imavrd.RecoveryAzureVMName 7981 } 7982 if imavrd.RecoveryAzureVMSize != nil { 7983 objectMap["recoveryAzureVMSize"] = imavrd.RecoveryAzureVMSize 7984 } 7985 if imavrd.RecoveryAzureStorageAccount != nil { 7986 objectMap["recoveryAzureStorageAccount"] = imavrd.RecoveryAzureStorageAccount 7987 } 7988 if imavrd.RecoveryAzureLogStorageAccountID != nil { 7989 objectMap["recoveryAzureLogStorageAccountId"] = imavrd.RecoveryAzureLogStorageAccountID 7990 } 7991 if imavrd.VMNics != nil { 7992 objectMap["vmNics"] = imavrd.VMNics 7993 } 7994 if imavrd.SelectedRecoveryAzureNetworkID != nil { 7995 objectMap["selectedRecoveryAzureNetworkId"] = imavrd.SelectedRecoveryAzureNetworkID 7996 } 7997 if imavrd.SelectedSourceNicID != nil { 7998 objectMap["selectedSourceNicId"] = imavrd.SelectedSourceNicID 7999 } 8000 if imavrd.DiscoveryType != nil { 8001 objectMap["discoveryType"] = imavrd.DiscoveryType 8002 } 8003 if imavrd.EnableRdpOnTargetOption != nil { 8004 objectMap["enableRdpOnTargetOption"] = imavrd.EnableRdpOnTargetOption 8005 } 8006 if imavrd.Datastores != nil { 8007 objectMap["datastores"] = imavrd.Datastores 8008 } 8009 if imavrd.TargetVMID != nil { 8010 objectMap["targetVmId"] = imavrd.TargetVMID 8011 } 8012 if imavrd.RecoveryAzureResourceGroupID != nil { 8013 objectMap["recoveryAzureResourceGroupId"] = imavrd.RecoveryAzureResourceGroupID 8014 } 8015 if imavrd.RecoveryAvailabilitySetID != nil { 8016 objectMap["recoveryAvailabilitySetId"] = imavrd.RecoveryAvailabilitySetID 8017 } 8018 if imavrd.UseManagedDisks != nil { 8019 objectMap["useManagedDisks"] = imavrd.UseManagedDisks 8020 } 8021 if imavrd.LicenseType != nil { 8022 objectMap["licenseType"] = imavrd.LicenseType 8023 } 8024 if imavrd.ValidationErrors != nil { 8025 objectMap["validationErrors"] = imavrd.ValidationErrors 8026 } 8027 if imavrd.LastRpoCalculatedTime != nil { 8028 objectMap["lastRpoCalculatedTime"] = imavrd.LastRpoCalculatedTime 8029 } 8030 if imavrd.LastUpdateReceivedTime != nil { 8031 objectMap["lastUpdateReceivedTime"] = imavrd.LastUpdateReceivedTime 8032 } 8033 if imavrd.ReplicaID != nil { 8034 objectMap["replicaId"] = imavrd.ReplicaID 8035 } 8036 if imavrd.OsVersion != nil { 8037 objectMap["osVersion"] = imavrd.OsVersion 8038 } 8039 if imavrd.InstanceType != "" { 8040 objectMap["instanceType"] = imavrd.InstanceType 8041 } 8042 return json.Marshal(objectMap) 8043} 8044 8045// AsA2AReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for InMageAzureV2ReplicationDetails. 8046func (imavrd InMageAzureV2ReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) { 8047 return nil, false 8048} 8049 8050// AsHyperVReplicaAzureReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for InMageAzureV2ReplicationDetails. 8051func (imavrd InMageAzureV2ReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) { 8052 return nil, false 8053} 8054 8055// AsHyperVReplicaBaseReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for InMageAzureV2ReplicationDetails. 8056func (imavrd InMageAzureV2ReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) { 8057 return nil, false 8058} 8059 8060// AsHyperVReplicaBlueReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for InMageAzureV2ReplicationDetails. 8061func (imavrd InMageAzureV2ReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) { 8062 return nil, false 8063} 8064 8065// AsHyperVReplicaReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for InMageAzureV2ReplicationDetails. 8066func (imavrd InMageAzureV2ReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) { 8067 return nil, false 8068} 8069 8070// AsInMageAzureV2ReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for InMageAzureV2ReplicationDetails. 8071func (imavrd InMageAzureV2ReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) { 8072 return &imavrd, true 8073} 8074 8075// AsInMageReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for InMageAzureV2ReplicationDetails. 8076func (imavrd InMageAzureV2ReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) { 8077 return nil, false 8078} 8079 8080// AsReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for InMageAzureV2ReplicationDetails. 8081func (imavrd InMageAzureV2ReplicationDetails) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) { 8082 return nil, false 8083} 8084 8085// AsBasicReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for InMageAzureV2ReplicationDetails. 8086func (imavrd InMageAzureV2ReplicationDetails) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) { 8087 return &imavrd, true 8088} 8089 8090// InMageAzureV2ReprotectInput inMageAzureV2 specific provider input. 8091type InMageAzureV2ReprotectInput struct { 8092 // MasterTargetID - The Master target Id. 8093 MasterTargetID *string `json:"masterTargetId,omitempty"` 8094 // ProcessServerID - The Process Server Id. 8095 ProcessServerID *string `json:"processServerId,omitempty"` 8096 // StorageAccountID - The storage account id. 8097 StorageAccountID *string `json:"storageAccountId,omitempty"` 8098 // RunAsAccountID - The CS account Id. 8099 RunAsAccountID *string `json:"runAsAccountId,omitempty"` 8100 // PolicyID - The Policy Id. 8101 PolicyID *string `json:"policyId,omitempty"` 8102 // LogStorageAccountID - The storage account to be used for logging during replication. 8103 LogStorageAccountID *string `json:"logStorageAccountId,omitempty"` 8104 // DisksToInclude - The disks to include list. 8105 DisksToInclude *[]string `json:"disksToInclude,omitempty"` 8106 // InstanceType - Possible values include: 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeReverseReplicationProviderSpecificInput', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMage' 8107 InstanceType InstanceTypeBasicReverseReplicationProviderSpecificInput `json:"instanceType,omitempty"` 8108} 8109 8110// MarshalJSON is the custom marshaler for InMageAzureV2ReprotectInput. 8111func (imavri InMageAzureV2ReprotectInput) MarshalJSON() ([]byte, error) { 8112 imavri.InstanceType = InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMageAzureV2 8113 objectMap := make(map[string]interface{}) 8114 if imavri.MasterTargetID != nil { 8115 objectMap["masterTargetId"] = imavri.MasterTargetID 8116 } 8117 if imavri.ProcessServerID != nil { 8118 objectMap["processServerId"] = imavri.ProcessServerID 8119 } 8120 if imavri.StorageAccountID != nil { 8121 objectMap["storageAccountId"] = imavri.StorageAccountID 8122 } 8123 if imavri.RunAsAccountID != nil { 8124 objectMap["runAsAccountId"] = imavri.RunAsAccountID 8125 } 8126 if imavri.PolicyID != nil { 8127 objectMap["policyId"] = imavri.PolicyID 8128 } 8129 if imavri.LogStorageAccountID != nil { 8130 objectMap["logStorageAccountId"] = imavri.LogStorageAccountID 8131 } 8132 if imavri.DisksToInclude != nil { 8133 objectMap["disksToInclude"] = imavri.DisksToInclude 8134 } 8135 if imavri.InstanceType != "" { 8136 objectMap["instanceType"] = imavri.InstanceType 8137 } 8138 return json.Marshal(objectMap) 8139} 8140 8141// AsA2AReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for InMageAzureV2ReprotectInput. 8142func (imavri InMageAzureV2ReprotectInput) AsA2AReprotectInput() (*A2AReprotectInput, bool) { 8143 return nil, false 8144} 8145 8146// AsHyperVReplicaAzureReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for InMageAzureV2ReprotectInput. 8147func (imavri InMageAzureV2ReprotectInput) AsHyperVReplicaAzureReprotectInput() (*HyperVReplicaAzureReprotectInput, bool) { 8148 return nil, false 8149} 8150 8151// AsInMageAzureV2ReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for InMageAzureV2ReprotectInput. 8152func (imavri InMageAzureV2ReprotectInput) AsInMageAzureV2ReprotectInput() (*InMageAzureV2ReprotectInput, bool) { 8153 return &imavri, true 8154} 8155 8156// AsInMageReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for InMageAzureV2ReprotectInput. 8157func (imavri InMageAzureV2ReprotectInput) AsInMageReprotectInput() (*InMageReprotectInput, bool) { 8158 return nil, false 8159} 8160 8161// AsReverseReplicationProviderSpecificInput is the BasicReverseReplicationProviderSpecificInput implementation for InMageAzureV2ReprotectInput. 8162func (imavri InMageAzureV2ReprotectInput) AsReverseReplicationProviderSpecificInput() (*ReverseReplicationProviderSpecificInput, bool) { 8163 return nil, false 8164} 8165 8166// AsBasicReverseReplicationProviderSpecificInput is the BasicReverseReplicationProviderSpecificInput implementation for InMageAzureV2ReprotectInput. 8167func (imavri InMageAzureV2ReprotectInput) AsBasicReverseReplicationProviderSpecificInput() (BasicReverseReplicationProviderSpecificInput, bool) { 8168 return &imavri, true 8169} 8170 8171// InMageAzureV2UpdateReplicationProtectedItemInput inMage Azure V2 input to update replication protected 8172// item. 8173type InMageAzureV2UpdateReplicationProtectedItemInput struct { 8174 // RecoveryAzureV1ResourceGroupID - The recovery Azure resource group Id for classic deployment. 8175 RecoveryAzureV1ResourceGroupID *string `json:"recoveryAzureV1ResourceGroupId,omitempty"` 8176 // RecoveryAzureV2ResourceGroupID - The recovery Azure resource group Id for resource manager deployment. 8177 RecoveryAzureV2ResourceGroupID *string `json:"recoveryAzureV2ResourceGroupId,omitempty"` 8178 // UseManagedDisks - A value indicating whether managed disks should be used during failover. 8179 UseManagedDisks *string `json:"useManagedDisks,omitempty"` 8180 // InstanceType - Possible values include: 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeUpdateReplicationProtectedItemProviderInput', 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeA2A', 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeInMageAzureV2' 8181 InstanceType InstanceTypeBasicUpdateReplicationProtectedItemProviderInput `json:"instanceType,omitempty"` 8182} 8183 8184// MarshalJSON is the custom marshaler for InMageAzureV2UpdateReplicationProtectedItemInput. 8185func (imavurpii InMageAzureV2UpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, error) { 8186 imavurpii.InstanceType = InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeInMageAzureV2 8187 objectMap := make(map[string]interface{}) 8188 if imavurpii.RecoveryAzureV1ResourceGroupID != nil { 8189 objectMap["recoveryAzureV1ResourceGroupId"] = imavurpii.RecoveryAzureV1ResourceGroupID 8190 } 8191 if imavurpii.RecoveryAzureV2ResourceGroupID != nil { 8192 objectMap["recoveryAzureV2ResourceGroupId"] = imavurpii.RecoveryAzureV2ResourceGroupID 8193 } 8194 if imavurpii.UseManagedDisks != nil { 8195 objectMap["useManagedDisks"] = imavurpii.UseManagedDisks 8196 } 8197 if imavurpii.InstanceType != "" { 8198 objectMap["instanceType"] = imavurpii.InstanceType 8199 } 8200 return json.Marshal(objectMap) 8201} 8202 8203// AsA2AUpdateReplicationProtectedItemInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for InMageAzureV2UpdateReplicationProtectedItemInput. 8204func (imavurpii InMageAzureV2UpdateReplicationProtectedItemInput) AsA2AUpdateReplicationProtectedItemInput() (*A2AUpdateReplicationProtectedItemInput, bool) { 8205 return nil, false 8206} 8207 8208// AsHyperVReplicaAzureUpdateReplicationProtectedItemInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for InMageAzureV2UpdateReplicationProtectedItemInput. 8209func (imavurpii InMageAzureV2UpdateReplicationProtectedItemInput) AsHyperVReplicaAzureUpdateReplicationProtectedItemInput() (*HyperVReplicaAzureUpdateReplicationProtectedItemInput, bool) { 8210 return nil, false 8211} 8212 8213// AsInMageAzureV2UpdateReplicationProtectedItemInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for InMageAzureV2UpdateReplicationProtectedItemInput. 8214func (imavurpii InMageAzureV2UpdateReplicationProtectedItemInput) AsInMageAzureV2UpdateReplicationProtectedItemInput() (*InMageAzureV2UpdateReplicationProtectedItemInput, bool) { 8215 return &imavurpii, true 8216} 8217 8218// AsUpdateReplicationProtectedItemProviderInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for InMageAzureV2UpdateReplicationProtectedItemInput. 8219func (imavurpii InMageAzureV2UpdateReplicationProtectedItemInput) AsUpdateReplicationProtectedItemProviderInput() (*UpdateReplicationProtectedItemProviderInput, bool) { 8220 return nil, false 8221} 8222 8223// AsBasicUpdateReplicationProtectedItemProviderInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for InMageAzureV2UpdateReplicationProtectedItemInput. 8224func (imavurpii InMageAzureV2UpdateReplicationProtectedItemInput) AsBasicUpdateReplicationProtectedItemProviderInput() (BasicUpdateReplicationProtectedItemProviderInput, bool) { 8225 return &imavurpii, true 8226} 8227 8228// InMageBasePolicyDetails base class for the policies of providers using InMage replication. 8229type InMageBasePolicyDetails struct { 8230 // RecoveryPointThresholdInMinutes - The recovery point threshold in minutes. 8231 RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"` 8232 // RecoveryPointHistory - The duration in minutes until which the recovery points need to be stored. 8233 RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` 8234 // AppConsistentFrequencyInMinutes - The app consistent snapshot frequency in minutes. 8235 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` 8236 // MultiVMSyncStatus - A value indicating whether multi-VM sync has to be enabled. 8237 MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"` 8238 // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypePolicyProviderSpecificDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt' 8239 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"` 8240} 8241 8242// MarshalJSON is the custom marshaler for InMageBasePolicyDetails. 8243func (imbpd InMageBasePolicyDetails) MarshalJSON() ([]byte, error) { 8244 imbpd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails 8245 objectMap := make(map[string]interface{}) 8246 if imbpd.RecoveryPointThresholdInMinutes != nil { 8247 objectMap["recoveryPointThresholdInMinutes"] = imbpd.RecoveryPointThresholdInMinutes 8248 } 8249 if imbpd.RecoveryPointHistory != nil { 8250 objectMap["recoveryPointHistory"] = imbpd.RecoveryPointHistory 8251 } 8252 if imbpd.AppConsistentFrequencyInMinutes != nil { 8253 objectMap["appConsistentFrequencyInMinutes"] = imbpd.AppConsistentFrequencyInMinutes 8254 } 8255 if imbpd.MultiVMSyncStatus != nil { 8256 objectMap["multiVmSyncStatus"] = imbpd.MultiVMSyncStatus 8257 } 8258 if imbpd.InstanceType != "" { 8259 objectMap["instanceType"] = imbpd.InstanceType 8260 } 8261 return json.Marshal(objectMap) 8262} 8263 8264// AsA2APolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageBasePolicyDetails. 8265func (imbpd InMageBasePolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) { 8266 return nil, false 8267} 8268 8269// AsHyperVReplicaAzurePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageBasePolicyDetails. 8270func (imbpd InMageBasePolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) { 8271 return nil, false 8272} 8273 8274// AsHyperVReplicaBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageBasePolicyDetails. 8275func (imbpd InMageBasePolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) { 8276 return nil, false 8277} 8278 8279// AsHyperVReplicaBluePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageBasePolicyDetails. 8280func (imbpd InMageBasePolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) { 8281 return nil, false 8282} 8283 8284// AsHyperVReplicaPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageBasePolicyDetails. 8285func (imbpd InMageBasePolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) { 8286 return nil, false 8287} 8288 8289// AsInMageAzureV2PolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageBasePolicyDetails. 8290func (imbpd InMageBasePolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) { 8291 return nil, false 8292} 8293 8294// AsInMageBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageBasePolicyDetails. 8295func (imbpd InMageBasePolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) { 8296 return &imbpd, true 8297} 8298 8299// AsInMagePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageBasePolicyDetails. 8300func (imbpd InMageBasePolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) { 8301 return nil, false 8302} 8303 8304// AsRcmAzureMigrationPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageBasePolicyDetails. 8305func (imbpd InMageBasePolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) { 8306 return nil, false 8307} 8308 8309// AsVmwareCbtPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageBasePolicyDetails. 8310func (imbpd InMageBasePolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) { 8311 return nil, false 8312} 8313 8314// AsPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for InMageBasePolicyDetails. 8315func (imbpd InMageBasePolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) { 8316 return nil, false 8317} 8318 8319// AsBasicPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for InMageBasePolicyDetails. 8320func (imbpd InMageBasePolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) { 8321 return &imbpd, true 8322} 8323 8324// InMageDisableProtectionProviderSpecificInput inMage disable protection provider specific input. 8325type InMageDisableProtectionProviderSpecificInput struct { 8326 // ReplicaVMDeletionStatus - A value indicating whether the replica VM should be destroyed or retained. Values from Delete and Retain. 8327 ReplicaVMDeletionStatus *string `json:"replicaVmDeletionStatus,omitempty"` 8328 // InstanceType - Possible values include: 'InstanceTypeDisableProtectionProviderSpecificInput', 'InstanceTypeInMage' 8329 InstanceType InstanceTypeBasicDisableProtectionProviderSpecificInput `json:"instanceType,omitempty"` 8330} 8331 8332// MarshalJSON is the custom marshaler for InMageDisableProtectionProviderSpecificInput. 8333func (imdppsi InMageDisableProtectionProviderSpecificInput) MarshalJSON() ([]byte, error) { 8334 imdppsi.InstanceType = InstanceTypeInMage 8335 objectMap := make(map[string]interface{}) 8336 if imdppsi.ReplicaVMDeletionStatus != nil { 8337 objectMap["replicaVmDeletionStatus"] = imdppsi.ReplicaVMDeletionStatus 8338 } 8339 if imdppsi.InstanceType != "" { 8340 objectMap["instanceType"] = imdppsi.InstanceType 8341 } 8342 return json.Marshal(objectMap) 8343} 8344 8345// AsInMageDisableProtectionProviderSpecificInput is the BasicDisableProtectionProviderSpecificInput implementation for InMageDisableProtectionProviderSpecificInput. 8346func (imdppsi InMageDisableProtectionProviderSpecificInput) AsInMageDisableProtectionProviderSpecificInput() (*InMageDisableProtectionProviderSpecificInput, bool) { 8347 return &imdppsi, true 8348} 8349 8350// AsDisableProtectionProviderSpecificInput is the BasicDisableProtectionProviderSpecificInput implementation for InMageDisableProtectionProviderSpecificInput. 8351func (imdppsi InMageDisableProtectionProviderSpecificInput) AsDisableProtectionProviderSpecificInput() (*DisableProtectionProviderSpecificInput, bool) { 8352 return nil, false 8353} 8354 8355// AsBasicDisableProtectionProviderSpecificInput is the BasicDisableProtectionProviderSpecificInput implementation for InMageDisableProtectionProviderSpecificInput. 8356func (imdppsi InMageDisableProtectionProviderSpecificInput) AsBasicDisableProtectionProviderSpecificInput() (BasicDisableProtectionProviderSpecificInput, bool) { 8357 return &imdppsi, true 8358} 8359 8360// InMageDiskDetails vMware/Physical specific Disk Details 8361type InMageDiskDetails struct { 8362 // DiskID - The disk Id. 8363 DiskID *string `json:"diskId,omitempty"` 8364 // DiskName - The disk name. 8365 DiskName *string `json:"diskName,omitempty"` 8366 // DiskSizeInMB - The disk size in MB. 8367 DiskSizeInMB *string `json:"diskSizeInMB,omitempty"` 8368 // DiskType - Whether disk is system disk or data disk. 8369 DiskType *string `json:"diskType,omitempty"` 8370 // DiskConfiguration - Whether disk is dynamic disk or basic disk. 8371 DiskConfiguration *string `json:"diskConfiguration,omitempty"` 8372 // VolumeList - Volumes of the disk. 8373 VolumeList *[]DiskVolumeDetails `json:"volumeList,omitempty"` 8374} 8375 8376// InMageDiskExclusionInput diskExclusionInput when doing enable protection of virtual machine in InMage 8377// provider. 8378type InMageDiskExclusionInput struct { 8379 // VolumeOptions - The volume label based option for disk exclusion. 8380 VolumeOptions *[]InMageVolumeExclusionOptions `json:"volumeOptions,omitempty"` 8381 // DiskSignatureOptions - The guest disk signature based option for disk exclusion. 8382 DiskSignatureOptions *[]InMageDiskSignatureExclusionOptions `json:"diskSignatureOptions,omitempty"` 8383} 8384 8385// InMageDiskSignatureExclusionOptions guest disk signature based disk exclusion option when doing enable 8386// protection of virtual machine in InMage provider. 8387type InMageDiskSignatureExclusionOptions struct { 8388 // DiskSignature - The guest signature of disk to be excluded from replication. 8389 DiskSignature *string `json:"diskSignature,omitempty"` 8390} 8391 8392// InMageEnableProtectionInput vMware Azure specific enable protection input. 8393type InMageEnableProtectionInput struct { 8394 // VMFriendlyName - The Vm Name. 8395 VMFriendlyName *string `json:"vmFriendlyName,omitempty"` 8396 // MasterTargetID - The Master Target Id. 8397 MasterTargetID *string `json:"masterTargetId,omitempty"` 8398 // ProcessServerID - The Process Server Id. 8399 ProcessServerID *string `json:"processServerId,omitempty"` 8400 // RetentionDrive - The retention drive to use on the MT. 8401 RetentionDrive *string `json:"retentionDrive,omitempty"` 8402 // RunAsAccountID - The CS account Id. 8403 RunAsAccountID *string `json:"runAsAccountId,omitempty"` 8404 // MultiVMGroupID - The multi vm group Id. 8405 MultiVMGroupID *string `json:"multiVmGroupId,omitempty"` 8406 // MultiVMGroupName - The multi vm group name. 8407 MultiVMGroupName *string `json:"multiVmGroupName,omitempty"` 8408 // DatastoreName - The target data store name. 8409 DatastoreName *string `json:"datastoreName,omitempty"` 8410 // DiskExclusionInput - The enable disk exclusion input. 8411 DiskExclusionInput *InMageDiskExclusionInput `json:"diskExclusionInput,omitempty"` 8412 // DisksToInclude - The disks to include list. 8413 DisksToInclude *[]string `json:"disksToInclude,omitempty"` 8414 // InstanceType - Possible values include: 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeEnableProtectionProviderSpecificInput', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeSan' 8415 InstanceType InstanceTypeBasicEnableProtectionProviderSpecificInput `json:"instanceType,omitempty"` 8416} 8417 8418// MarshalJSON is the custom marshaler for InMageEnableProtectionInput. 8419func (imepi InMageEnableProtectionInput) MarshalJSON() ([]byte, error) { 8420 imepi.InstanceType = InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMage 8421 objectMap := make(map[string]interface{}) 8422 if imepi.VMFriendlyName != nil { 8423 objectMap["vmFriendlyName"] = imepi.VMFriendlyName 8424 } 8425 if imepi.MasterTargetID != nil { 8426 objectMap["masterTargetId"] = imepi.MasterTargetID 8427 } 8428 if imepi.ProcessServerID != nil { 8429 objectMap["processServerId"] = imepi.ProcessServerID 8430 } 8431 if imepi.RetentionDrive != nil { 8432 objectMap["retentionDrive"] = imepi.RetentionDrive 8433 } 8434 if imepi.RunAsAccountID != nil { 8435 objectMap["runAsAccountId"] = imepi.RunAsAccountID 8436 } 8437 if imepi.MultiVMGroupID != nil { 8438 objectMap["multiVmGroupId"] = imepi.MultiVMGroupID 8439 } 8440 if imepi.MultiVMGroupName != nil { 8441 objectMap["multiVmGroupName"] = imepi.MultiVMGroupName 8442 } 8443 if imepi.DatastoreName != nil { 8444 objectMap["datastoreName"] = imepi.DatastoreName 8445 } 8446 if imepi.DiskExclusionInput != nil { 8447 objectMap["diskExclusionInput"] = imepi.DiskExclusionInput 8448 } 8449 if imepi.DisksToInclude != nil { 8450 objectMap["disksToInclude"] = imepi.DisksToInclude 8451 } 8452 if imepi.InstanceType != "" { 8453 objectMap["instanceType"] = imepi.InstanceType 8454 } 8455 return json.Marshal(objectMap) 8456} 8457 8458// AsA2AEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for InMageEnableProtectionInput. 8459func (imepi InMageEnableProtectionInput) AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool) { 8460 return nil, false 8461} 8462 8463// AsHyperVReplicaAzureEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for InMageEnableProtectionInput. 8464func (imepi InMageEnableProtectionInput) AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool) { 8465 return nil, false 8466} 8467 8468// AsInMageAzureV2EnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for InMageEnableProtectionInput. 8469func (imepi InMageEnableProtectionInput) AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool) { 8470 return nil, false 8471} 8472 8473// AsInMageEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for InMageEnableProtectionInput. 8474func (imepi InMageEnableProtectionInput) AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool) { 8475 return &imepi, true 8476} 8477 8478// AsSanEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for InMageEnableProtectionInput. 8479func (imepi InMageEnableProtectionInput) AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool) { 8480 return nil, false 8481} 8482 8483// AsEnableProtectionProviderSpecificInput is the BasicEnableProtectionProviderSpecificInput implementation for InMageEnableProtectionInput. 8484func (imepi InMageEnableProtectionInput) AsEnableProtectionProviderSpecificInput() (*EnableProtectionProviderSpecificInput, bool) { 8485 return nil, false 8486} 8487 8488// AsBasicEnableProtectionProviderSpecificInput is the BasicEnableProtectionProviderSpecificInput implementation for InMageEnableProtectionInput. 8489func (imepi InMageEnableProtectionInput) AsBasicEnableProtectionProviderSpecificInput() (BasicEnableProtectionProviderSpecificInput, bool) { 8490 return &imepi, true 8491} 8492 8493// InMageFailoverProviderInput provider specific input for InMage failover. 8494type InMageFailoverProviderInput struct { 8495 // RecoveryPointType - The recovery point type. Values from LatestTime, LatestTag or Custom. In the case of custom, the recovery point provided by RecoveryPointId will be used. In the other two cases, recovery point id will be ignored. Possible values include: 'LatestTime', 'LatestTag', 'Custom' 8496 RecoveryPointType RecoveryPointType `json:"recoveryPointType,omitempty"` 8497 // RecoveryPointID - The recovery point id to be passed to failover to a particular recovery point. In case of latest recovery point, null should be passed. 8498 RecoveryPointID *string `json:"recoveryPointId,omitempty"` 8499 // InstanceType - Possible values include: 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeProviderSpecificFailoverInput', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeA2A', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMage' 8500 InstanceType InstanceTypeBasicProviderSpecificFailoverInput `json:"instanceType,omitempty"` 8501} 8502 8503// MarshalJSON is the custom marshaler for InMageFailoverProviderInput. 8504func (imfpi InMageFailoverProviderInput) MarshalJSON() ([]byte, error) { 8505 imfpi.InstanceType = InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMage 8506 objectMap := make(map[string]interface{}) 8507 if imfpi.RecoveryPointType != "" { 8508 objectMap["recoveryPointType"] = imfpi.RecoveryPointType 8509 } 8510 if imfpi.RecoveryPointID != nil { 8511 objectMap["recoveryPointId"] = imfpi.RecoveryPointID 8512 } 8513 if imfpi.InstanceType != "" { 8514 objectMap["instanceType"] = imfpi.InstanceType 8515 } 8516 return json.Marshal(objectMap) 8517} 8518 8519// AsA2AFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for InMageFailoverProviderInput. 8520func (imfpi InMageFailoverProviderInput) AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool) { 8521 return nil, false 8522} 8523 8524// AsHyperVReplicaAzureFailbackProviderInput is the BasicProviderSpecificFailoverInput implementation for InMageFailoverProviderInput. 8525func (imfpi InMageFailoverProviderInput) AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool) { 8526 return nil, false 8527} 8528 8529// AsHyperVReplicaAzureFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for InMageFailoverProviderInput. 8530func (imfpi InMageFailoverProviderInput) AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool) { 8531 return nil, false 8532} 8533 8534// AsInMageAzureV2FailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for InMageFailoverProviderInput. 8535func (imfpi InMageFailoverProviderInput) AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool) { 8536 return nil, false 8537} 8538 8539// AsInMageFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for InMageFailoverProviderInput. 8540func (imfpi InMageFailoverProviderInput) AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool) { 8541 return &imfpi, true 8542} 8543 8544// AsProviderSpecificFailoverInput is the BasicProviderSpecificFailoverInput implementation for InMageFailoverProviderInput. 8545func (imfpi InMageFailoverProviderInput) AsProviderSpecificFailoverInput() (*ProviderSpecificFailoverInput, bool) { 8546 return nil, false 8547} 8548 8549// AsBasicProviderSpecificFailoverInput is the BasicProviderSpecificFailoverInput implementation for InMageFailoverProviderInput. 8550func (imfpi InMageFailoverProviderInput) AsBasicProviderSpecificFailoverInput() (BasicProviderSpecificFailoverInput, bool) { 8551 return &imfpi, true 8552} 8553 8554// InMagePolicyDetails inMage specific protection profile details. 8555type InMagePolicyDetails struct { 8556 // RecoveryPointThresholdInMinutes - The recovery point threshold in minutes. 8557 RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"` 8558 // RecoveryPointHistory - The duration in minutes until which the recovery points need to be stored. 8559 RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` 8560 // AppConsistentFrequencyInMinutes - The app consistent snapshot frequency in minutes. 8561 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` 8562 // MultiVMSyncStatus - A value indicating whether multi-VM sync has to be enabled. 8563 MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"` 8564 // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypePolicyProviderSpecificDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt' 8565 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"` 8566} 8567 8568// MarshalJSON is the custom marshaler for InMagePolicyDetails. 8569func (impd InMagePolicyDetails) MarshalJSON() ([]byte, error) { 8570 impd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage 8571 objectMap := make(map[string]interface{}) 8572 if impd.RecoveryPointThresholdInMinutes != nil { 8573 objectMap["recoveryPointThresholdInMinutes"] = impd.RecoveryPointThresholdInMinutes 8574 } 8575 if impd.RecoveryPointHistory != nil { 8576 objectMap["recoveryPointHistory"] = impd.RecoveryPointHistory 8577 } 8578 if impd.AppConsistentFrequencyInMinutes != nil { 8579 objectMap["appConsistentFrequencyInMinutes"] = impd.AppConsistentFrequencyInMinutes 8580 } 8581 if impd.MultiVMSyncStatus != nil { 8582 objectMap["multiVmSyncStatus"] = impd.MultiVMSyncStatus 8583 } 8584 if impd.InstanceType != "" { 8585 objectMap["instanceType"] = impd.InstanceType 8586 } 8587 return json.Marshal(objectMap) 8588} 8589 8590// AsA2APolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMagePolicyDetails. 8591func (impd InMagePolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) { 8592 return nil, false 8593} 8594 8595// AsHyperVReplicaAzurePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMagePolicyDetails. 8596func (impd InMagePolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) { 8597 return nil, false 8598} 8599 8600// AsHyperVReplicaBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMagePolicyDetails. 8601func (impd InMagePolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) { 8602 return nil, false 8603} 8604 8605// AsHyperVReplicaBluePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMagePolicyDetails. 8606func (impd InMagePolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) { 8607 return nil, false 8608} 8609 8610// AsHyperVReplicaPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMagePolicyDetails. 8611func (impd InMagePolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) { 8612 return nil, false 8613} 8614 8615// AsInMageAzureV2PolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMagePolicyDetails. 8616func (impd InMagePolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) { 8617 return nil, false 8618} 8619 8620// AsInMageBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMagePolicyDetails. 8621func (impd InMagePolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) { 8622 return nil, false 8623} 8624 8625// AsInMagePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMagePolicyDetails. 8626func (impd InMagePolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) { 8627 return &impd, true 8628} 8629 8630// AsRcmAzureMigrationPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMagePolicyDetails. 8631func (impd InMagePolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) { 8632 return nil, false 8633} 8634 8635// AsVmwareCbtPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMagePolicyDetails. 8636func (impd InMagePolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) { 8637 return nil, false 8638} 8639 8640// AsPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for InMagePolicyDetails. 8641func (impd InMagePolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) { 8642 return nil, false 8643} 8644 8645// AsBasicPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for InMagePolicyDetails. 8646func (impd InMagePolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) { 8647 return &impd, true 8648} 8649 8650// InMagePolicyInput vMWare Azure specific protection profile Input. 8651type InMagePolicyInput struct { 8652 // RecoveryPointThresholdInMinutes - The recovery point threshold in minutes. 8653 RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"` 8654 // RecoveryPointHistory - The duration in minutes until which the recovery points need to be stored. 8655 RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` 8656 // AppConsistentFrequencyInMinutes - The app consistent snapshot frequency (in minutes). 8657 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` 8658 // MultiVMSyncStatus - A value indicating whether multi-VM sync has to be enabled. Value should be 'Enabled' or 'Disabled'. Possible values include: 'Enable', 'Disable' 8659 MultiVMSyncStatus SetMultiVMSyncStatus `json:"multiVmSyncStatus,omitempty"` 8660 // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypePolicyProviderSpecificInput', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeVMwareCbt' 8661 InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"` 8662} 8663 8664// MarshalJSON is the custom marshaler for InMagePolicyInput. 8665func (impi InMagePolicyInput) MarshalJSON() ([]byte, error) { 8666 impi.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMage 8667 objectMap := make(map[string]interface{}) 8668 if impi.RecoveryPointThresholdInMinutes != nil { 8669 objectMap["recoveryPointThresholdInMinutes"] = impi.RecoveryPointThresholdInMinutes 8670 } 8671 if impi.RecoveryPointHistory != nil { 8672 objectMap["recoveryPointHistory"] = impi.RecoveryPointHistory 8673 } 8674 if impi.AppConsistentFrequencyInMinutes != nil { 8675 objectMap["appConsistentFrequencyInMinutes"] = impi.AppConsistentFrequencyInMinutes 8676 } 8677 if impi.MultiVMSyncStatus != "" { 8678 objectMap["multiVmSyncStatus"] = impi.MultiVMSyncStatus 8679 } 8680 if impi.InstanceType != "" { 8681 objectMap["instanceType"] = impi.InstanceType 8682 } 8683 return json.Marshal(objectMap) 8684} 8685 8686// AsA2APolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for InMagePolicyInput. 8687func (impi InMagePolicyInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) { 8688 return nil, false 8689} 8690 8691// AsHyperVReplicaAzurePolicyInput is the BasicPolicyProviderSpecificInput implementation for InMagePolicyInput. 8692func (impi InMagePolicyInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) { 8693 return nil, false 8694} 8695 8696// AsHyperVReplicaBluePolicyInput is the BasicPolicyProviderSpecificInput implementation for InMagePolicyInput. 8697func (impi InMagePolicyInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) { 8698 return nil, false 8699} 8700 8701// AsHyperVReplicaPolicyInput is the BasicPolicyProviderSpecificInput implementation for InMagePolicyInput. 8702func (impi InMagePolicyInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) { 8703 return nil, false 8704} 8705 8706// AsInMageAzureV2PolicyInput is the BasicPolicyProviderSpecificInput implementation for InMagePolicyInput. 8707func (impi InMagePolicyInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) { 8708 return nil, false 8709} 8710 8711// AsInMagePolicyInput is the BasicPolicyProviderSpecificInput implementation for InMagePolicyInput. 8712func (impi InMagePolicyInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) { 8713 return &impi, true 8714} 8715 8716// AsVMwareCbtPolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for InMagePolicyInput. 8717func (impi InMagePolicyInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) { 8718 return nil, false 8719} 8720 8721// AsPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for InMagePolicyInput. 8722func (impi InMagePolicyInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) { 8723 return nil, false 8724} 8725 8726// AsBasicPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for InMagePolicyInput. 8727func (impi InMagePolicyInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) { 8728 return &impi, true 8729} 8730 8731// InMageProtectedDiskDetails inMage protected disk details. 8732type InMageProtectedDiskDetails struct { 8733 // DiskID - The disk id. 8734 DiskID *string `json:"diskId,omitempty"` 8735 // DiskName - The disk name. 8736 DiskName *string `json:"diskName,omitempty"` 8737 // ProtectionStage - The protection stage. 8738 ProtectionStage *string `json:"protectionStage,omitempty"` 8739 // HealthErrorCode - The health error code for the disk. 8740 HealthErrorCode *string `json:"healthErrorCode,omitempty"` 8741 // RpoInSeconds - The RPO in seconds. 8742 RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"` 8743 // ResyncRequired - A value indicating whether resync is required for this disk. 8744 ResyncRequired *string `json:"resyncRequired,omitempty"` 8745 // ResyncProgressPercentage - The resync progress percentage. 8746 ResyncProgressPercentage *int32 `json:"resyncProgressPercentage,omitempty"` 8747 // ResyncDurationInSeconds - The resync duration in seconds. 8748 ResyncDurationInSeconds *int64 `json:"resyncDurationInSeconds,omitempty"` 8749 // DiskCapacityInBytes - The disk capacity in bytes. 8750 DiskCapacityInBytes *int64 `json:"diskCapacityInBytes,omitempty"` 8751 // FileSystemCapacityInBytes - The file system capacity in bytes. 8752 FileSystemCapacityInBytes *int64 `json:"fileSystemCapacityInBytes,omitempty"` 8753 // SourceDataInMB - The source data transit in MB. 8754 SourceDataInMB *float64 `json:"sourceDataInMB,omitempty"` 8755 // PsDataInMB - The PS data transit in MB. 8756 PsDataInMB *float64 `json:"psDataInMB,omitempty"` 8757 // TargetDataInMB - The target data transit in MB. 8758 TargetDataInMB *float64 `json:"targetDataInMB,omitempty"` 8759 // DiskResized - A value indicating whether disk is resized. 8760 DiskResized *string `json:"diskResized,omitempty"` 8761 // LastRpoCalculatedTime - The last RPO calculated time. 8762 LastRpoCalculatedTime *date.Time `json:"lastRpoCalculatedTime,omitempty"` 8763} 8764 8765// InMageReplicationDetails inMage provider specific settings 8766type InMageReplicationDetails struct { 8767 // ActiveSiteType - The active location of the VM. If the VM is being protected from Azure, this field will take values from { Azure, OnPrem }. If the VM is being protected between two data-centers, this field will be OnPrem always. 8768 ActiveSiteType *string `json:"activeSiteType,omitempty"` 8769 // SourceVMCPUCount - The CPU count of the VM on the primary side. 8770 SourceVMCPUCount *int32 `json:"sourceVmCpuCount,omitempty"` 8771 // SourceVMRAMSizeInMB - The RAM size of the VM on the primary side. 8772 SourceVMRAMSizeInMB *int32 `json:"sourceVmRamSizeInMB,omitempty"` 8773 // OsDetails - The OS details. 8774 OsDetails *OSDiskDetails `json:"osDetails,omitempty"` 8775 // ProtectionStage - The protection stage. 8776 ProtectionStage *string `json:"protectionStage,omitempty"` 8777 // VMID - The virtual machine Id. 8778 VMID *string `json:"vmId,omitempty"` 8779 // VMProtectionState - The protection state for the vm. 8780 VMProtectionState *string `json:"vmProtectionState,omitempty"` 8781 // VMProtectionStateDescription - The protection state description for the vm. 8782 VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` 8783 // ResyncDetails - The resync details of the machine 8784 ResyncDetails *InitialReplicationDetails `json:"resyncDetails,omitempty"` 8785 // RetentionWindowStart - The retention window start time. 8786 RetentionWindowStart *date.Time `json:"retentionWindowStart,omitempty"` 8787 // RetentionWindowEnd - The retention window end time. 8788 RetentionWindowEnd *date.Time `json:"retentionWindowEnd,omitempty"` 8789 // CompressedDataRateInMB - The compressed data change rate in MB. 8790 CompressedDataRateInMB *float64 `json:"compressedDataRateInMB,omitempty"` 8791 // UncompressedDataRateInMB - The uncompressed data change rate in MB. 8792 UncompressedDataRateInMB *float64 `json:"uncompressedDataRateInMB,omitempty"` 8793 // RpoInSeconds - The RPO in seconds. 8794 RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"` 8795 // ProtectedDisks - The list of protected disks. 8796 ProtectedDisks *[]InMageProtectedDiskDetails `json:"protectedDisks,omitempty"` 8797 // IPAddress - The source IP address. 8798 IPAddress *string `json:"ipAddress,omitempty"` 8799 // LastHeartbeat - The last heartbeat received from the source server. 8800 LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"` 8801 // ProcessServerID - The process server Id. 8802 ProcessServerID *string `json:"processServerId,omitempty"` 8803 // MasterTargetID - The master target Id. 8804 MasterTargetID *string `json:"masterTargetId,omitempty"` 8805 // ConsistencyPoints - The collection of Consistency points. 8806 ConsistencyPoints map[string]*date.Time `json:"consistencyPoints"` 8807 // DiskResized - A value indicating whether any disk is resized for this VM. 8808 DiskResized *string `json:"diskResized,omitempty"` 8809 // RebootAfterUpdateStatus - A value indicating whether the source server requires a restart after update. 8810 RebootAfterUpdateStatus *string `json:"rebootAfterUpdateStatus,omitempty"` 8811 // MultiVMGroupID - The multi vm group Id, if any. 8812 MultiVMGroupID *string `json:"multiVmGroupId,omitempty"` 8813 // MultiVMGroupName - The multi vm group name, if any. 8814 MultiVMGroupName *string `json:"multiVmGroupName,omitempty"` 8815 // MultiVMSyncStatus - A value indicating whether the multi vm sync is enabled or disabled. 8816 MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"` 8817 // AgentDetails - The agent details. 8818 AgentDetails *InMageAgentDetails `json:"agentDetails,omitempty"` 8819 // VCenterInfrastructureID - The vCenter infrastructure Id. 8820 VCenterInfrastructureID *string `json:"vCenterInfrastructureId,omitempty"` 8821 // InfrastructureVMID - The infrastructure VM Id. 8822 InfrastructureVMID *string `json:"infrastructureVmId,omitempty"` 8823 // VMNics - The PE Network details. 8824 VMNics *[]VMNicDetails `json:"vmNics,omitempty"` 8825 // DiscoveryType - A value indicating the discovery type of the machine. 8826 DiscoveryType *string `json:"discoveryType,omitempty"` 8827 // AzureStorageAccountID - A value indicating the underlying Azure storage account. If the VM is not running in Azure, this value shall be set to null. 8828 AzureStorageAccountID *string `json:"azureStorageAccountId,omitempty"` 8829 // Datastores - The data stores of the on-premise machine Value can be list of strings that contain data store names 8830 Datastores *[]string `json:"datastores,omitempty"` 8831 // ValidationErrors - The validation errors of the on-premise machine Value can be list of validation errors 8832 ValidationErrors *[]HealthError `json:"validationErrors,omitempty"` 8833 // LastRpoCalculatedTime - The last RPO calculated time. 8834 LastRpoCalculatedTime *date.Time `json:"lastRpoCalculatedTime,omitempty"` 8835 // LastUpdateReceivedTime - The last update time received from on-prem components. 8836 LastUpdateReceivedTime *date.Time `json:"lastUpdateReceivedTime,omitempty"` 8837 // ReplicaID - The replica id of the protected item. 8838 ReplicaID *string `json:"replicaId,omitempty"` 8839 // OsVersion - The OS Version of the protected item. 8840 OsVersion *string `json:"osVersion,omitempty"` 8841 // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeReplicationProviderSpecificSettings', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeA2A', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaBaseReplicationDetails', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMageAzureV2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMage' 8842 InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"` 8843} 8844 8845// MarshalJSON is the custom marshaler for InMageReplicationDetails. 8846func (imrd InMageReplicationDetails) MarshalJSON() ([]byte, error) { 8847 imrd.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMage 8848 objectMap := make(map[string]interface{}) 8849 if imrd.ActiveSiteType != nil { 8850 objectMap["activeSiteType"] = imrd.ActiveSiteType 8851 } 8852 if imrd.SourceVMCPUCount != nil { 8853 objectMap["sourceVmCpuCount"] = imrd.SourceVMCPUCount 8854 } 8855 if imrd.SourceVMRAMSizeInMB != nil { 8856 objectMap["sourceVmRamSizeInMB"] = imrd.SourceVMRAMSizeInMB 8857 } 8858 if imrd.OsDetails != nil { 8859 objectMap["osDetails"] = imrd.OsDetails 8860 } 8861 if imrd.ProtectionStage != nil { 8862 objectMap["protectionStage"] = imrd.ProtectionStage 8863 } 8864 if imrd.VMID != nil { 8865 objectMap["vmId"] = imrd.VMID 8866 } 8867 if imrd.VMProtectionState != nil { 8868 objectMap["vmProtectionState"] = imrd.VMProtectionState 8869 } 8870 if imrd.VMProtectionStateDescription != nil { 8871 objectMap["vmProtectionStateDescription"] = imrd.VMProtectionStateDescription 8872 } 8873 if imrd.ResyncDetails != nil { 8874 objectMap["resyncDetails"] = imrd.ResyncDetails 8875 } 8876 if imrd.RetentionWindowStart != nil { 8877 objectMap["retentionWindowStart"] = imrd.RetentionWindowStart 8878 } 8879 if imrd.RetentionWindowEnd != nil { 8880 objectMap["retentionWindowEnd"] = imrd.RetentionWindowEnd 8881 } 8882 if imrd.CompressedDataRateInMB != nil { 8883 objectMap["compressedDataRateInMB"] = imrd.CompressedDataRateInMB 8884 } 8885 if imrd.UncompressedDataRateInMB != nil { 8886 objectMap["uncompressedDataRateInMB"] = imrd.UncompressedDataRateInMB 8887 } 8888 if imrd.RpoInSeconds != nil { 8889 objectMap["rpoInSeconds"] = imrd.RpoInSeconds 8890 } 8891 if imrd.ProtectedDisks != nil { 8892 objectMap["protectedDisks"] = imrd.ProtectedDisks 8893 } 8894 if imrd.IPAddress != nil { 8895 objectMap["ipAddress"] = imrd.IPAddress 8896 } 8897 if imrd.LastHeartbeat != nil { 8898 objectMap["lastHeartbeat"] = imrd.LastHeartbeat 8899 } 8900 if imrd.ProcessServerID != nil { 8901 objectMap["processServerId"] = imrd.ProcessServerID 8902 } 8903 if imrd.MasterTargetID != nil { 8904 objectMap["masterTargetId"] = imrd.MasterTargetID 8905 } 8906 if imrd.ConsistencyPoints != nil { 8907 objectMap["consistencyPoints"] = imrd.ConsistencyPoints 8908 } 8909 if imrd.DiskResized != nil { 8910 objectMap["diskResized"] = imrd.DiskResized 8911 } 8912 if imrd.RebootAfterUpdateStatus != nil { 8913 objectMap["rebootAfterUpdateStatus"] = imrd.RebootAfterUpdateStatus 8914 } 8915 if imrd.MultiVMGroupID != nil { 8916 objectMap["multiVmGroupId"] = imrd.MultiVMGroupID 8917 } 8918 if imrd.MultiVMGroupName != nil { 8919 objectMap["multiVmGroupName"] = imrd.MultiVMGroupName 8920 } 8921 if imrd.MultiVMSyncStatus != nil { 8922 objectMap["multiVmSyncStatus"] = imrd.MultiVMSyncStatus 8923 } 8924 if imrd.AgentDetails != nil { 8925 objectMap["agentDetails"] = imrd.AgentDetails 8926 } 8927 if imrd.VCenterInfrastructureID != nil { 8928 objectMap["vCenterInfrastructureId"] = imrd.VCenterInfrastructureID 8929 } 8930 if imrd.InfrastructureVMID != nil { 8931 objectMap["infrastructureVmId"] = imrd.InfrastructureVMID 8932 } 8933 if imrd.VMNics != nil { 8934 objectMap["vmNics"] = imrd.VMNics 8935 } 8936 if imrd.DiscoveryType != nil { 8937 objectMap["discoveryType"] = imrd.DiscoveryType 8938 } 8939 if imrd.AzureStorageAccountID != nil { 8940 objectMap["azureStorageAccountId"] = imrd.AzureStorageAccountID 8941 } 8942 if imrd.Datastores != nil { 8943 objectMap["datastores"] = imrd.Datastores 8944 } 8945 if imrd.ValidationErrors != nil { 8946 objectMap["validationErrors"] = imrd.ValidationErrors 8947 } 8948 if imrd.LastRpoCalculatedTime != nil { 8949 objectMap["lastRpoCalculatedTime"] = imrd.LastRpoCalculatedTime 8950 } 8951 if imrd.LastUpdateReceivedTime != nil { 8952 objectMap["lastUpdateReceivedTime"] = imrd.LastUpdateReceivedTime 8953 } 8954 if imrd.ReplicaID != nil { 8955 objectMap["replicaId"] = imrd.ReplicaID 8956 } 8957 if imrd.OsVersion != nil { 8958 objectMap["osVersion"] = imrd.OsVersion 8959 } 8960 if imrd.InstanceType != "" { 8961 objectMap["instanceType"] = imrd.InstanceType 8962 } 8963 return json.Marshal(objectMap) 8964} 8965 8966// AsA2AReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for InMageReplicationDetails. 8967func (imrd InMageReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) { 8968 return nil, false 8969} 8970 8971// AsHyperVReplicaAzureReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for InMageReplicationDetails. 8972func (imrd InMageReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) { 8973 return nil, false 8974} 8975 8976// AsHyperVReplicaBaseReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for InMageReplicationDetails. 8977func (imrd InMageReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) { 8978 return nil, false 8979} 8980 8981// AsHyperVReplicaBlueReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for InMageReplicationDetails. 8982func (imrd InMageReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) { 8983 return nil, false 8984} 8985 8986// AsHyperVReplicaReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for InMageReplicationDetails. 8987func (imrd InMageReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) { 8988 return nil, false 8989} 8990 8991// AsInMageAzureV2ReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for InMageReplicationDetails. 8992func (imrd InMageReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) { 8993 return nil, false 8994} 8995 8996// AsInMageReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for InMageReplicationDetails. 8997func (imrd InMageReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) { 8998 return &imrd, true 8999} 9000 9001// AsReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for InMageReplicationDetails. 9002func (imrd InMageReplicationDetails) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) { 9003 return nil, false 9004} 9005 9006// AsBasicReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for InMageReplicationDetails. 9007func (imrd InMageReplicationDetails) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) { 9008 return &imrd, true 9009} 9010 9011// InMageReprotectInput inMageAzureV2 specific provider input. 9012type InMageReprotectInput struct { 9013 // MasterTargetID - The Master Target Id. 9014 MasterTargetID *string `json:"masterTargetId,omitempty"` 9015 // ProcessServerID - The Process Server Id. 9016 ProcessServerID *string `json:"processServerId,omitempty"` 9017 // RetentionDrive - The retention drive to use on the MT. 9018 RetentionDrive *string `json:"retentionDrive,omitempty"` 9019 // RunAsAccountID - The CS account Id. 9020 RunAsAccountID *string `json:"runAsAccountId,omitempty"` 9021 // DatastoreName - The target data store name. 9022 DatastoreName *string `json:"datastoreName,omitempty"` 9023 // DiskExclusionInput - The enable disk exclusion input. 9024 DiskExclusionInput *InMageDiskExclusionInput `json:"diskExclusionInput,omitempty"` 9025 // ProfileID - The Policy Id. 9026 ProfileID *string `json:"profileId,omitempty"` 9027 // DisksToInclude - The disks to include list. 9028 DisksToInclude *[]string `json:"disksToInclude,omitempty"` 9029 // InstanceType - Possible values include: 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeReverseReplicationProviderSpecificInput', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMage' 9030 InstanceType InstanceTypeBasicReverseReplicationProviderSpecificInput `json:"instanceType,omitempty"` 9031} 9032 9033// MarshalJSON is the custom marshaler for InMageReprotectInput. 9034func (imri InMageReprotectInput) MarshalJSON() ([]byte, error) { 9035 imri.InstanceType = InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMage 9036 objectMap := make(map[string]interface{}) 9037 if imri.MasterTargetID != nil { 9038 objectMap["masterTargetId"] = imri.MasterTargetID 9039 } 9040 if imri.ProcessServerID != nil { 9041 objectMap["processServerId"] = imri.ProcessServerID 9042 } 9043 if imri.RetentionDrive != nil { 9044 objectMap["retentionDrive"] = imri.RetentionDrive 9045 } 9046 if imri.RunAsAccountID != nil { 9047 objectMap["runAsAccountId"] = imri.RunAsAccountID 9048 } 9049 if imri.DatastoreName != nil { 9050 objectMap["datastoreName"] = imri.DatastoreName 9051 } 9052 if imri.DiskExclusionInput != nil { 9053 objectMap["diskExclusionInput"] = imri.DiskExclusionInput 9054 } 9055 if imri.ProfileID != nil { 9056 objectMap["profileId"] = imri.ProfileID 9057 } 9058 if imri.DisksToInclude != nil { 9059 objectMap["disksToInclude"] = imri.DisksToInclude 9060 } 9061 if imri.InstanceType != "" { 9062 objectMap["instanceType"] = imri.InstanceType 9063 } 9064 return json.Marshal(objectMap) 9065} 9066 9067// AsA2AReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for InMageReprotectInput. 9068func (imri InMageReprotectInput) AsA2AReprotectInput() (*A2AReprotectInput, bool) { 9069 return nil, false 9070} 9071 9072// AsHyperVReplicaAzureReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for InMageReprotectInput. 9073func (imri InMageReprotectInput) AsHyperVReplicaAzureReprotectInput() (*HyperVReplicaAzureReprotectInput, bool) { 9074 return nil, false 9075} 9076 9077// AsInMageAzureV2ReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for InMageReprotectInput. 9078func (imri InMageReprotectInput) AsInMageAzureV2ReprotectInput() (*InMageAzureV2ReprotectInput, bool) { 9079 return nil, false 9080} 9081 9082// AsInMageReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for InMageReprotectInput. 9083func (imri InMageReprotectInput) AsInMageReprotectInput() (*InMageReprotectInput, bool) { 9084 return &imri, true 9085} 9086 9087// AsReverseReplicationProviderSpecificInput is the BasicReverseReplicationProviderSpecificInput implementation for InMageReprotectInput. 9088func (imri InMageReprotectInput) AsReverseReplicationProviderSpecificInput() (*ReverseReplicationProviderSpecificInput, bool) { 9089 return nil, false 9090} 9091 9092// AsBasicReverseReplicationProviderSpecificInput is the BasicReverseReplicationProviderSpecificInput implementation for InMageReprotectInput. 9093func (imri InMageReprotectInput) AsBasicReverseReplicationProviderSpecificInput() (BasicReverseReplicationProviderSpecificInput, bool) { 9094 return &imri, true 9095} 9096 9097// InMageVolumeExclusionOptions guest disk signature based disk exclusion option when doing enable 9098// protection of virtual machine in InMage provider. 9099type InMageVolumeExclusionOptions struct { 9100 // VolumeLabel - The volume label. The disk having any volume with this label will be excluded from replication. 9101 VolumeLabel *string `json:"volumeLabel,omitempty"` 9102 // OnlyExcludeIfSingleVolume - The value indicating whether to exclude multi volume disk or not. If a disk has multiple volumes and one of the volume has label matching with VolumeLabel this disk will be excluded from replication if OnlyExcludeIfSingleVolume is false. 9103 OnlyExcludeIfSingleVolume *string `json:"onlyExcludeIfSingleVolume,omitempty"` 9104} 9105 9106// InnerHealthError implements InnerHealthError class. HealthError object has a list of InnerHealthErrors 9107// as child errors. InnerHealthError is used because this will prevent an infinite loop of structures when 9108// Hydra tries to auto-generate the contract. We are exposing the related health errors as inner health 9109// errors and all API consumers can utilize this in the same fashion as Exception -> InnerException. 9110type InnerHealthError struct { 9111 // ErrorSource - Source of error. 9112 ErrorSource *string `json:"errorSource,omitempty"` 9113 // ErrorType - Type of error. 9114 ErrorType *string `json:"errorType,omitempty"` 9115 // ErrorLevel - Level of error. 9116 ErrorLevel *string `json:"errorLevel,omitempty"` 9117 // ErrorCategory - Category of error. 9118 ErrorCategory *string `json:"errorCategory,omitempty"` 9119 // ErrorCode - Error code. 9120 ErrorCode *string `json:"errorCode,omitempty"` 9121 // SummaryMessage - Summary message of the entity. 9122 SummaryMessage *string `json:"summaryMessage,omitempty"` 9123 // ErrorMessage - Error message. 9124 ErrorMessage *string `json:"errorMessage,omitempty"` 9125 // PossibleCauses - Possible causes of error. 9126 PossibleCauses *string `json:"possibleCauses,omitempty"` 9127 // RecommendedAction - Recommended action to resolve error. 9128 RecommendedAction *string `json:"recommendedAction,omitempty"` 9129 // CreationTimeUtc - Error creation time (UTC) 9130 CreationTimeUtc *date.Time `json:"creationTimeUtc,omitempty"` 9131 // RecoveryProviderErrorMessage - DRA error message. 9132 RecoveryProviderErrorMessage *string `json:"recoveryProviderErrorMessage,omitempty"` 9133 // EntityID - ID of the entity. 9134 EntityID *string `json:"entityId,omitempty"` 9135} 9136 9137// InputEndpoint azure VM input endpoint details. 9138type InputEndpoint struct { 9139 // EndpointName - The input endpoint name. 9140 EndpointName *string `json:"endpointName,omitempty"` 9141 // PrivatePort - The input endpoint private port. 9142 PrivatePort *int32 `json:"privatePort,omitempty"` 9143 // PublicPort - The input endpoint public port. 9144 PublicPort *int32 `json:"publicPort,omitempty"` 9145 // Protocol - The input endpoint protocol. 9146 Protocol *string `json:"protocol,omitempty"` 9147} 9148 9149// Job job details. 9150type Job struct { 9151 autorest.Response `json:"-"` 9152 // Properties - The custom data. 9153 Properties *JobProperties `json:"properties,omitempty"` 9154 // ID - READ-ONLY; Resource Id 9155 ID *string `json:"id,omitempty"` 9156 // Name - READ-ONLY; Resource Name 9157 Name *string `json:"name,omitempty"` 9158 // Type - READ-ONLY; Resource Type 9159 Type *string `json:"type,omitempty"` 9160 // Location - Resource Location 9161 Location *string `json:"location,omitempty"` 9162} 9163 9164// MarshalJSON is the custom marshaler for Job. 9165func (j Job) MarshalJSON() ([]byte, error) { 9166 objectMap := make(map[string]interface{}) 9167 if j.Properties != nil { 9168 objectMap["properties"] = j.Properties 9169 } 9170 if j.Location != nil { 9171 objectMap["location"] = j.Location 9172 } 9173 return json.Marshal(objectMap) 9174} 9175 9176// JobCollection collection of jobs. 9177type JobCollection struct { 9178 autorest.Response `json:"-"` 9179 // Value - The list of jobs. 9180 Value *[]Job `json:"value,omitempty"` 9181 // NextLink - The value of next link. 9182 NextLink *string `json:"nextLink,omitempty"` 9183} 9184 9185// JobCollectionIterator provides access to a complete listing of Job values. 9186type JobCollectionIterator struct { 9187 i int 9188 page JobCollectionPage 9189} 9190 9191// NextWithContext advances to the next value. If there was an error making 9192// the request the iterator does not advance and the error is returned. 9193func (iter *JobCollectionIterator) NextWithContext(ctx context.Context) (err error) { 9194 if tracing.IsEnabled() { 9195 ctx = tracing.StartSpan(ctx, fqdn+"/JobCollectionIterator.NextWithContext") 9196 defer func() { 9197 sc := -1 9198 if iter.Response().Response.Response != nil { 9199 sc = iter.Response().Response.Response.StatusCode 9200 } 9201 tracing.EndSpan(ctx, sc, err) 9202 }() 9203 } 9204 iter.i++ 9205 if iter.i < len(iter.page.Values()) { 9206 return nil 9207 } 9208 err = iter.page.NextWithContext(ctx) 9209 if err != nil { 9210 iter.i-- 9211 return err 9212 } 9213 iter.i = 0 9214 return nil 9215} 9216 9217// Next advances to the next value. If there was an error making 9218// the request the iterator does not advance and the error is returned. 9219// Deprecated: Use NextWithContext() instead. 9220func (iter *JobCollectionIterator) Next() error { 9221 return iter.NextWithContext(context.Background()) 9222} 9223 9224// NotDone returns true if the enumeration should be started or is not yet complete. 9225func (iter JobCollectionIterator) NotDone() bool { 9226 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 9227} 9228 9229// Response returns the raw server response from the last page request. 9230func (iter JobCollectionIterator) Response() JobCollection { 9231 return iter.page.Response() 9232} 9233 9234// Value returns the current value or a zero-initialized value if the 9235// iterator has advanced beyond the end of the collection. 9236func (iter JobCollectionIterator) Value() Job { 9237 if !iter.page.NotDone() { 9238 return Job{} 9239 } 9240 return iter.page.Values()[iter.i] 9241} 9242 9243// Creates a new instance of the JobCollectionIterator type. 9244func NewJobCollectionIterator(page JobCollectionPage) JobCollectionIterator { 9245 return JobCollectionIterator{page: page} 9246} 9247 9248// IsEmpty returns true if the ListResult contains no values. 9249func (jc JobCollection) IsEmpty() bool { 9250 return jc.Value == nil || len(*jc.Value) == 0 9251} 9252 9253// hasNextLink returns true if the NextLink is not empty. 9254func (jc JobCollection) hasNextLink() bool { 9255 return jc.NextLink != nil && len(*jc.NextLink) != 0 9256} 9257 9258// jobCollectionPreparer prepares a request to retrieve the next set of results. 9259// It returns nil if no more results exist. 9260func (jc JobCollection) jobCollectionPreparer(ctx context.Context) (*http.Request, error) { 9261 if !jc.hasNextLink() { 9262 return nil, nil 9263 } 9264 return autorest.Prepare((&http.Request{}).WithContext(ctx), 9265 autorest.AsJSON(), 9266 autorest.AsGet(), 9267 autorest.WithBaseURL(to.String(jc.NextLink))) 9268} 9269 9270// JobCollectionPage contains a page of Job values. 9271type JobCollectionPage struct { 9272 fn func(context.Context, JobCollection) (JobCollection, error) 9273 jc JobCollection 9274} 9275 9276// NextWithContext advances to the next page of values. If there was an error making 9277// the request the page does not advance and the error is returned. 9278func (page *JobCollectionPage) NextWithContext(ctx context.Context) (err error) { 9279 if tracing.IsEnabled() { 9280 ctx = tracing.StartSpan(ctx, fqdn+"/JobCollectionPage.NextWithContext") 9281 defer func() { 9282 sc := -1 9283 if page.Response().Response.Response != nil { 9284 sc = page.Response().Response.Response.StatusCode 9285 } 9286 tracing.EndSpan(ctx, sc, err) 9287 }() 9288 } 9289 for { 9290 next, err := page.fn(ctx, page.jc) 9291 if err != nil { 9292 return err 9293 } 9294 page.jc = next 9295 if !next.hasNextLink() || !next.IsEmpty() { 9296 break 9297 } 9298 } 9299 return nil 9300} 9301 9302// Next advances to the next page of values. If there was an error making 9303// the request the page does not advance and the error is returned. 9304// Deprecated: Use NextWithContext() instead. 9305func (page *JobCollectionPage) Next() error { 9306 return page.NextWithContext(context.Background()) 9307} 9308 9309// NotDone returns true if the page enumeration should be started or is not yet complete. 9310func (page JobCollectionPage) NotDone() bool { 9311 return !page.jc.IsEmpty() 9312} 9313 9314// Response returns the raw server response from the last page request. 9315func (page JobCollectionPage) Response() JobCollection { 9316 return page.jc 9317} 9318 9319// Values returns the slice of values for the current page or nil if there are no values. 9320func (page JobCollectionPage) Values() []Job { 9321 if page.jc.IsEmpty() { 9322 return nil 9323 } 9324 return *page.jc.Value 9325} 9326 9327// Creates a new instance of the JobCollectionPage type. 9328func NewJobCollectionPage(cur JobCollection, getNextPage func(context.Context, JobCollection) (JobCollection, error)) JobCollectionPage { 9329 return JobCollectionPage{ 9330 fn: getNextPage, 9331 jc: cur, 9332 } 9333} 9334 9335// BasicJobDetails job details based on specific job type. 9336type BasicJobDetails interface { 9337 AsAsrJobDetails() (*AsrJobDetails, bool) 9338 AsExportJobDetails() (*ExportJobDetails, bool) 9339 AsFailoverJobDetails() (*FailoverJobDetails, bool) 9340 AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool) 9341 AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool) 9342 AsJobDetails() (*JobDetails, bool) 9343} 9344 9345// JobDetails job details based on specific job type. 9346type JobDetails struct { 9347 // AffectedObjectDetails - The affected object properties like source server, source cloud, target server, target cloud etc. based on the workflow object details. 9348 AffectedObjectDetails map[string]*string `json:"affectedObjectDetails"` 9349 // InstanceType - Possible values include: 'InstanceTypeJobDetails', 'InstanceTypeAsrJobDetails', 'InstanceTypeExportJobDetails', 'InstanceTypeFailoverJobDetails', 'InstanceTypeSwitchProtectionJobDetails', 'InstanceTypeTestFailoverJobDetails' 9350 InstanceType InstanceTypeBasicJobDetails `json:"instanceType,omitempty"` 9351} 9352 9353func unmarshalBasicJobDetails(body []byte) (BasicJobDetails, error) { 9354 var m map[string]interface{} 9355 err := json.Unmarshal(body, &m) 9356 if err != nil { 9357 return nil, err 9358 } 9359 9360 switch m["instanceType"] { 9361 case string(InstanceTypeAsrJobDetails): 9362 var ajd AsrJobDetails 9363 err := json.Unmarshal(body, &ajd) 9364 return ajd, err 9365 case string(InstanceTypeExportJobDetails): 9366 var ejd ExportJobDetails 9367 err := json.Unmarshal(body, &ejd) 9368 return ejd, err 9369 case string(InstanceTypeFailoverJobDetails): 9370 var fjd FailoverJobDetails 9371 err := json.Unmarshal(body, &fjd) 9372 return fjd, err 9373 case string(InstanceTypeSwitchProtectionJobDetails): 9374 var spjd SwitchProtectionJobDetails 9375 err := json.Unmarshal(body, &spjd) 9376 return spjd, err 9377 case string(InstanceTypeTestFailoverJobDetails): 9378 var tfjd TestFailoverJobDetails 9379 err := json.Unmarshal(body, &tfjd) 9380 return tfjd, err 9381 default: 9382 var jd JobDetails 9383 err := json.Unmarshal(body, &jd) 9384 return jd, err 9385 } 9386} 9387func unmarshalBasicJobDetailsArray(body []byte) ([]BasicJobDetails, error) { 9388 var rawMessages []*json.RawMessage 9389 err := json.Unmarshal(body, &rawMessages) 9390 if err != nil { 9391 return nil, err 9392 } 9393 9394 jdArray := make([]BasicJobDetails, len(rawMessages)) 9395 9396 for index, rawMessage := range rawMessages { 9397 jd, err := unmarshalBasicJobDetails(*rawMessage) 9398 if err != nil { 9399 return nil, err 9400 } 9401 jdArray[index] = jd 9402 } 9403 return jdArray, nil 9404} 9405 9406// MarshalJSON is the custom marshaler for JobDetails. 9407func (jd JobDetails) MarshalJSON() ([]byte, error) { 9408 jd.InstanceType = InstanceTypeJobDetails 9409 objectMap := make(map[string]interface{}) 9410 if jd.AffectedObjectDetails != nil { 9411 objectMap["affectedObjectDetails"] = jd.AffectedObjectDetails 9412 } 9413 if jd.InstanceType != "" { 9414 objectMap["instanceType"] = jd.InstanceType 9415 } 9416 return json.Marshal(objectMap) 9417} 9418 9419// AsAsrJobDetails is the BasicJobDetails implementation for JobDetails. 9420func (jd JobDetails) AsAsrJobDetails() (*AsrJobDetails, bool) { 9421 return nil, false 9422} 9423 9424// AsExportJobDetails is the BasicJobDetails implementation for JobDetails. 9425func (jd JobDetails) AsExportJobDetails() (*ExportJobDetails, bool) { 9426 return nil, false 9427} 9428 9429// AsFailoverJobDetails is the BasicJobDetails implementation for JobDetails. 9430func (jd JobDetails) AsFailoverJobDetails() (*FailoverJobDetails, bool) { 9431 return nil, false 9432} 9433 9434// AsSwitchProtectionJobDetails is the BasicJobDetails implementation for JobDetails. 9435func (jd JobDetails) AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool) { 9436 return nil, false 9437} 9438 9439// AsTestFailoverJobDetails is the BasicJobDetails implementation for JobDetails. 9440func (jd JobDetails) AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool) { 9441 return nil, false 9442} 9443 9444// AsJobDetails is the BasicJobDetails implementation for JobDetails. 9445func (jd JobDetails) AsJobDetails() (*JobDetails, bool) { 9446 return &jd, true 9447} 9448 9449// AsBasicJobDetails is the BasicJobDetails implementation for JobDetails. 9450func (jd JobDetails) AsBasicJobDetails() (BasicJobDetails, bool) { 9451 return &jd, true 9452} 9453 9454// JobEntity this class contains the minimal job details required to navigate to the desired drill down. 9455type JobEntity struct { 9456 // JobID - The job id. 9457 JobID *string `json:"jobId,omitempty"` 9458 // JobFriendlyName - The job display name. 9459 JobFriendlyName *string `json:"jobFriendlyName,omitempty"` 9460 // TargetObjectID - The object id. 9461 TargetObjectID *string `json:"targetObjectId,omitempty"` 9462 // TargetObjectName - The object name. 9463 TargetObjectName *string `json:"targetObjectName,omitempty"` 9464 // TargetInstanceType - The workflow affected object type. 9465 TargetInstanceType *string `json:"targetInstanceType,omitempty"` 9466 // JobScenarioName - The job name. Enum type ScenarioName. 9467 JobScenarioName *string `json:"jobScenarioName,omitempty"` 9468} 9469 9470// JobErrorDetails this class contains the error details per object. 9471type JobErrorDetails struct { 9472 // ServiceErrorDetails - The Service error details. 9473 ServiceErrorDetails *ServiceError `json:"serviceErrorDetails,omitempty"` 9474 // ProviderErrorDetails - The Provider error details. 9475 ProviderErrorDetails *ProviderError `json:"providerErrorDetails,omitempty"` 9476 // ErrorLevel - Error level of error. 9477 ErrorLevel *string `json:"errorLevel,omitempty"` 9478 // CreationTime - The creation time of job error. 9479 CreationTime *date.Time `json:"creationTime,omitempty"` 9480 // TaskID - The Id of the task. 9481 TaskID *string `json:"taskId,omitempty"` 9482} 9483 9484// JobProperties job custom data details. 9485type JobProperties struct { 9486 // ActivityID - The activity id. 9487 ActivityID *string `json:"activityId,omitempty"` 9488 // ScenarioName - The ScenarioName. 9489 ScenarioName *string `json:"scenarioName,omitempty"` 9490 // FriendlyName - The DisplayName. 9491 FriendlyName *string `json:"friendlyName,omitempty"` 9492 // State - The status of the Job. It is one of these values - NotStarted, InProgress, Succeeded, Failed, Cancelled, Suspended or Other. 9493 State *string `json:"state,omitempty"` 9494 // StateDescription - The description of the state of the Job. For e.g. - For Succeeded state, description can be Completed, PartiallySucceeded, CompletedWithInformation or Skipped. 9495 StateDescription *string `json:"stateDescription,omitempty"` 9496 // Tasks - The tasks. 9497 Tasks *[]ASRTask `json:"tasks,omitempty"` 9498 // Errors - The errors. 9499 Errors *[]JobErrorDetails `json:"errors,omitempty"` 9500 // StartTime - The start time. 9501 StartTime *date.Time `json:"startTime,omitempty"` 9502 // EndTime - The end time. 9503 EndTime *date.Time `json:"endTime,omitempty"` 9504 // AllowedActions - The Allowed action the job. 9505 AllowedActions *[]string `json:"allowedActions,omitempty"` 9506 // TargetObjectID - The affected Object Id. 9507 TargetObjectID *string `json:"targetObjectId,omitempty"` 9508 // TargetObjectName - The name of the affected object. 9509 TargetObjectName *string `json:"targetObjectName,omitempty"` 9510 // TargetInstanceType - The type of the affected object which is of {Microsoft.Azure.SiteRecovery.V2015_11_10.AffectedObjectType} class. 9511 TargetInstanceType *string `json:"targetInstanceType,omitempty"` 9512 // CustomDetails - The custom job details like test failover job details. 9513 CustomDetails BasicJobDetails `json:"customDetails,omitempty"` 9514} 9515 9516// UnmarshalJSON is the custom unmarshaler for JobProperties struct. 9517func (jp *JobProperties) UnmarshalJSON(body []byte) error { 9518 var m map[string]*json.RawMessage 9519 err := json.Unmarshal(body, &m) 9520 if err != nil { 9521 return err 9522 } 9523 for k, v := range m { 9524 switch k { 9525 case "activityId": 9526 if v != nil { 9527 var activityID string 9528 err = json.Unmarshal(*v, &activityID) 9529 if err != nil { 9530 return err 9531 } 9532 jp.ActivityID = &activityID 9533 } 9534 case "scenarioName": 9535 if v != nil { 9536 var scenarioName string 9537 err = json.Unmarshal(*v, &scenarioName) 9538 if err != nil { 9539 return err 9540 } 9541 jp.ScenarioName = &scenarioName 9542 } 9543 case "friendlyName": 9544 if v != nil { 9545 var friendlyName string 9546 err = json.Unmarshal(*v, &friendlyName) 9547 if err != nil { 9548 return err 9549 } 9550 jp.FriendlyName = &friendlyName 9551 } 9552 case "state": 9553 if v != nil { 9554 var state string 9555 err = json.Unmarshal(*v, &state) 9556 if err != nil { 9557 return err 9558 } 9559 jp.State = &state 9560 } 9561 case "stateDescription": 9562 if v != nil { 9563 var stateDescription string 9564 err = json.Unmarshal(*v, &stateDescription) 9565 if err != nil { 9566 return err 9567 } 9568 jp.StateDescription = &stateDescription 9569 } 9570 case "tasks": 9571 if v != nil { 9572 var tasks []ASRTask 9573 err = json.Unmarshal(*v, &tasks) 9574 if err != nil { 9575 return err 9576 } 9577 jp.Tasks = &tasks 9578 } 9579 case "errors": 9580 if v != nil { 9581 var errorsVar []JobErrorDetails 9582 err = json.Unmarshal(*v, &errorsVar) 9583 if err != nil { 9584 return err 9585 } 9586 jp.Errors = &errorsVar 9587 } 9588 case "startTime": 9589 if v != nil { 9590 var startTime date.Time 9591 err = json.Unmarshal(*v, &startTime) 9592 if err != nil { 9593 return err 9594 } 9595 jp.StartTime = &startTime 9596 } 9597 case "endTime": 9598 if v != nil { 9599 var endTime date.Time 9600 err = json.Unmarshal(*v, &endTime) 9601 if err != nil { 9602 return err 9603 } 9604 jp.EndTime = &endTime 9605 } 9606 case "allowedActions": 9607 if v != nil { 9608 var allowedActions []string 9609 err = json.Unmarshal(*v, &allowedActions) 9610 if err != nil { 9611 return err 9612 } 9613 jp.AllowedActions = &allowedActions 9614 } 9615 case "targetObjectId": 9616 if v != nil { 9617 var targetObjectID string 9618 err = json.Unmarshal(*v, &targetObjectID) 9619 if err != nil { 9620 return err 9621 } 9622 jp.TargetObjectID = &targetObjectID 9623 } 9624 case "targetObjectName": 9625 if v != nil { 9626 var targetObjectName string 9627 err = json.Unmarshal(*v, &targetObjectName) 9628 if err != nil { 9629 return err 9630 } 9631 jp.TargetObjectName = &targetObjectName 9632 } 9633 case "targetInstanceType": 9634 if v != nil { 9635 var targetInstanceType string 9636 err = json.Unmarshal(*v, &targetInstanceType) 9637 if err != nil { 9638 return err 9639 } 9640 jp.TargetInstanceType = &targetInstanceType 9641 } 9642 case "customDetails": 9643 if v != nil { 9644 customDetails, err := unmarshalBasicJobDetails(*v) 9645 if err != nil { 9646 return err 9647 } 9648 jp.CustomDetails = customDetails 9649 } 9650 } 9651 } 9652 9653 return nil 9654} 9655 9656// JobQueryParameter query parameter to enumerate jobs. 9657type JobQueryParameter struct { 9658 // StartTime - Date time to get jobs from. 9659 StartTime *string `json:"startTime,omitempty"` 9660 // EndTime - Date time to get jobs up to. 9661 EndTime *string `json:"endTime,omitempty"` 9662 // FabricID - The Id of the fabric to search jobs under. 9663 FabricID *string `json:"fabricId,omitempty"` 9664 // AffectedObjectTypes - The type of objects. 9665 AffectedObjectTypes *string `json:"affectedObjectTypes,omitempty"` 9666 // JobStatus - The states of the job to be filtered can be in. 9667 JobStatus *string `json:"jobStatus,omitempty"` 9668} 9669 9670// JobStatusEventDetails model class for event details of a job status event. 9671type JobStatusEventDetails struct { 9672 // JobID - Job arm id for the event. 9673 JobID *string `json:"jobId,omitempty"` 9674 // JobFriendlyName - JobName for the Event. 9675 JobFriendlyName *string `json:"jobFriendlyName,omitempty"` 9676 // JobStatus - JobStatus for the Event. 9677 JobStatus *string `json:"jobStatus,omitempty"` 9678 // AffectedObjectType - AffectedObjectType for the event. 9679 AffectedObjectType *string `json:"affectedObjectType,omitempty"` 9680 // InstanceType - Possible values include: 'InstanceTypeEventSpecificDetails', 'InstanceTypeJobStatus' 9681 InstanceType InstanceTypeBasicEventSpecificDetails `json:"instanceType,omitempty"` 9682} 9683 9684// MarshalJSON is the custom marshaler for JobStatusEventDetails. 9685func (jsed JobStatusEventDetails) MarshalJSON() ([]byte, error) { 9686 jsed.InstanceType = InstanceTypeJobStatus 9687 objectMap := make(map[string]interface{}) 9688 if jsed.JobID != nil { 9689 objectMap["jobId"] = jsed.JobID 9690 } 9691 if jsed.JobFriendlyName != nil { 9692 objectMap["jobFriendlyName"] = jsed.JobFriendlyName 9693 } 9694 if jsed.JobStatus != nil { 9695 objectMap["jobStatus"] = jsed.JobStatus 9696 } 9697 if jsed.AffectedObjectType != nil { 9698 objectMap["affectedObjectType"] = jsed.AffectedObjectType 9699 } 9700 if jsed.InstanceType != "" { 9701 objectMap["instanceType"] = jsed.InstanceType 9702 } 9703 return json.Marshal(objectMap) 9704} 9705 9706// AsJobStatusEventDetails is the BasicEventSpecificDetails implementation for JobStatusEventDetails. 9707func (jsed JobStatusEventDetails) AsJobStatusEventDetails() (*JobStatusEventDetails, bool) { 9708 return &jsed, true 9709} 9710 9711// AsEventSpecificDetails is the BasicEventSpecificDetails implementation for JobStatusEventDetails. 9712func (jsed JobStatusEventDetails) AsEventSpecificDetails() (*EventSpecificDetails, bool) { 9713 return nil, false 9714} 9715 9716// AsBasicEventSpecificDetails is the BasicEventSpecificDetails implementation for JobStatusEventDetails. 9717func (jsed JobStatusEventDetails) AsBasicEventSpecificDetails() (BasicEventSpecificDetails, bool) { 9718 return &jsed, true 9719} 9720 9721// JobTaskDetails this class represents a task which is actually a workflow so that one can navigate to its 9722// individual drill down. 9723type JobTaskDetails struct { 9724 // JobTask - The job entity. 9725 JobTask *JobEntity `json:"jobTask,omitempty"` 9726 // InstanceType - Possible values include: 'InstanceTypeTaskTypeDetails', 'InstanceTypeAutomationRunbookTaskDetails', 'InstanceTypeConsistencyCheckTaskDetails', 'InstanceTypeFabricReplicationGroupTaskDetails', 'InstanceTypeJobTaskDetails', 'InstanceTypeManualActionTaskDetails', 'InstanceTypeScriptActionTaskDetails', 'InstanceTypeVirtualMachineTaskDetails', 'InstanceTypeVMNicUpdatesTaskDetails' 9727 InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"` 9728} 9729 9730// MarshalJSON is the custom marshaler for JobTaskDetails. 9731func (jtd JobTaskDetails) MarshalJSON() ([]byte, error) { 9732 jtd.InstanceType = InstanceTypeJobTaskDetails 9733 objectMap := make(map[string]interface{}) 9734 if jtd.JobTask != nil { 9735 objectMap["jobTask"] = jtd.JobTask 9736 } 9737 if jtd.InstanceType != "" { 9738 objectMap["instanceType"] = jtd.InstanceType 9739 } 9740 return json.Marshal(objectMap) 9741} 9742 9743// AsAutomationRunbookTaskDetails is the BasicTaskTypeDetails implementation for JobTaskDetails. 9744func (jtd JobTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) { 9745 return nil, false 9746} 9747 9748// AsConsistencyCheckTaskDetails is the BasicTaskTypeDetails implementation for JobTaskDetails. 9749func (jtd JobTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) { 9750 return nil, false 9751} 9752 9753// AsFabricReplicationGroupTaskDetails is the BasicTaskTypeDetails implementation for JobTaskDetails. 9754func (jtd JobTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) { 9755 return nil, false 9756} 9757 9758// AsJobTaskDetails is the BasicTaskTypeDetails implementation for JobTaskDetails. 9759func (jtd JobTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) { 9760 return &jtd, true 9761} 9762 9763// AsManualActionTaskDetails is the BasicTaskTypeDetails implementation for JobTaskDetails. 9764func (jtd JobTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) { 9765 return nil, false 9766} 9767 9768// AsScriptActionTaskDetails is the BasicTaskTypeDetails implementation for JobTaskDetails. 9769func (jtd JobTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) { 9770 return nil, false 9771} 9772 9773// AsVirtualMachineTaskDetails is the BasicTaskTypeDetails implementation for JobTaskDetails. 9774func (jtd JobTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) { 9775 return nil, false 9776} 9777 9778// AsVMNicUpdatesTaskDetails is the BasicTaskTypeDetails implementation for JobTaskDetails. 9779func (jtd JobTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) { 9780 return nil, false 9781} 9782 9783// AsTaskTypeDetails is the BasicTaskTypeDetails implementation for JobTaskDetails. 9784func (jtd JobTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) { 9785 return nil, false 9786} 9787 9788// AsBasicTaskTypeDetails is the BasicTaskTypeDetails implementation for JobTaskDetails. 9789func (jtd JobTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) { 9790 return &jtd, true 9791} 9792 9793// KeyEncryptionKeyInfo key Encryption Key (KEK) information. 9794type KeyEncryptionKeyInfo struct { 9795 // KeyIdentifier - The key url / identifier. 9796 KeyIdentifier *string `json:"keyIdentifier,omitempty"` 9797 // KeyVaultResourceArmID - The KeyVault resource ARM id for key. 9798 KeyVaultResourceArmID *string `json:"keyVaultResourceArmId,omitempty"` 9799} 9800 9801// LogicalNetwork logical network data model. 9802type LogicalNetwork struct { 9803 autorest.Response `json:"-"` 9804 // Properties - The Logical Network Properties. 9805 Properties *LogicalNetworkProperties `json:"properties,omitempty"` 9806 // ID - READ-ONLY; Resource Id 9807 ID *string `json:"id,omitempty"` 9808 // Name - READ-ONLY; Resource Name 9809 Name *string `json:"name,omitempty"` 9810 // Type - READ-ONLY; Resource Type 9811 Type *string `json:"type,omitempty"` 9812 // Location - Resource Location 9813 Location *string `json:"location,omitempty"` 9814} 9815 9816// MarshalJSON is the custom marshaler for LogicalNetwork. 9817func (ln LogicalNetwork) MarshalJSON() ([]byte, error) { 9818 objectMap := make(map[string]interface{}) 9819 if ln.Properties != nil { 9820 objectMap["properties"] = ln.Properties 9821 } 9822 if ln.Location != nil { 9823 objectMap["location"] = ln.Location 9824 } 9825 return json.Marshal(objectMap) 9826} 9827 9828// LogicalNetworkCollection list of logical networks. 9829type LogicalNetworkCollection struct { 9830 autorest.Response `json:"-"` 9831 // Value - The Logical Networks list details. 9832 Value *[]LogicalNetwork `json:"value,omitempty"` 9833 // NextLink - The value of next link. 9834 NextLink *string `json:"nextLink,omitempty"` 9835} 9836 9837// LogicalNetworkCollectionIterator provides access to a complete listing of LogicalNetwork values. 9838type LogicalNetworkCollectionIterator struct { 9839 i int 9840 page LogicalNetworkCollectionPage 9841} 9842 9843// NextWithContext advances to the next value. If there was an error making 9844// the request the iterator does not advance and the error is returned. 9845func (iter *LogicalNetworkCollectionIterator) NextWithContext(ctx context.Context) (err error) { 9846 if tracing.IsEnabled() { 9847 ctx = tracing.StartSpan(ctx, fqdn+"/LogicalNetworkCollectionIterator.NextWithContext") 9848 defer func() { 9849 sc := -1 9850 if iter.Response().Response.Response != nil { 9851 sc = iter.Response().Response.Response.StatusCode 9852 } 9853 tracing.EndSpan(ctx, sc, err) 9854 }() 9855 } 9856 iter.i++ 9857 if iter.i < len(iter.page.Values()) { 9858 return nil 9859 } 9860 err = iter.page.NextWithContext(ctx) 9861 if err != nil { 9862 iter.i-- 9863 return err 9864 } 9865 iter.i = 0 9866 return nil 9867} 9868 9869// Next advances to the next value. If there was an error making 9870// the request the iterator does not advance and the error is returned. 9871// Deprecated: Use NextWithContext() instead. 9872func (iter *LogicalNetworkCollectionIterator) Next() error { 9873 return iter.NextWithContext(context.Background()) 9874} 9875 9876// NotDone returns true if the enumeration should be started or is not yet complete. 9877func (iter LogicalNetworkCollectionIterator) NotDone() bool { 9878 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 9879} 9880 9881// Response returns the raw server response from the last page request. 9882func (iter LogicalNetworkCollectionIterator) Response() LogicalNetworkCollection { 9883 return iter.page.Response() 9884} 9885 9886// Value returns the current value or a zero-initialized value if the 9887// iterator has advanced beyond the end of the collection. 9888func (iter LogicalNetworkCollectionIterator) Value() LogicalNetwork { 9889 if !iter.page.NotDone() { 9890 return LogicalNetwork{} 9891 } 9892 return iter.page.Values()[iter.i] 9893} 9894 9895// Creates a new instance of the LogicalNetworkCollectionIterator type. 9896func NewLogicalNetworkCollectionIterator(page LogicalNetworkCollectionPage) LogicalNetworkCollectionIterator { 9897 return LogicalNetworkCollectionIterator{page: page} 9898} 9899 9900// IsEmpty returns true if the ListResult contains no values. 9901func (lnc LogicalNetworkCollection) IsEmpty() bool { 9902 return lnc.Value == nil || len(*lnc.Value) == 0 9903} 9904 9905// hasNextLink returns true if the NextLink is not empty. 9906func (lnc LogicalNetworkCollection) hasNextLink() bool { 9907 return lnc.NextLink != nil && len(*lnc.NextLink) != 0 9908} 9909 9910// logicalNetworkCollectionPreparer prepares a request to retrieve the next set of results. 9911// It returns nil if no more results exist. 9912func (lnc LogicalNetworkCollection) logicalNetworkCollectionPreparer(ctx context.Context) (*http.Request, error) { 9913 if !lnc.hasNextLink() { 9914 return nil, nil 9915 } 9916 return autorest.Prepare((&http.Request{}).WithContext(ctx), 9917 autorest.AsJSON(), 9918 autorest.AsGet(), 9919 autorest.WithBaseURL(to.String(lnc.NextLink))) 9920} 9921 9922// LogicalNetworkCollectionPage contains a page of LogicalNetwork values. 9923type LogicalNetworkCollectionPage struct { 9924 fn func(context.Context, LogicalNetworkCollection) (LogicalNetworkCollection, error) 9925 lnc LogicalNetworkCollection 9926} 9927 9928// NextWithContext advances to the next page of values. If there was an error making 9929// the request the page does not advance and the error is returned. 9930func (page *LogicalNetworkCollectionPage) NextWithContext(ctx context.Context) (err error) { 9931 if tracing.IsEnabled() { 9932 ctx = tracing.StartSpan(ctx, fqdn+"/LogicalNetworkCollectionPage.NextWithContext") 9933 defer func() { 9934 sc := -1 9935 if page.Response().Response.Response != nil { 9936 sc = page.Response().Response.Response.StatusCode 9937 } 9938 tracing.EndSpan(ctx, sc, err) 9939 }() 9940 } 9941 for { 9942 next, err := page.fn(ctx, page.lnc) 9943 if err != nil { 9944 return err 9945 } 9946 page.lnc = next 9947 if !next.hasNextLink() || !next.IsEmpty() { 9948 break 9949 } 9950 } 9951 return nil 9952} 9953 9954// Next advances to the next page of values. If there was an error making 9955// the request the page does not advance and the error is returned. 9956// Deprecated: Use NextWithContext() instead. 9957func (page *LogicalNetworkCollectionPage) Next() error { 9958 return page.NextWithContext(context.Background()) 9959} 9960 9961// NotDone returns true if the page enumeration should be started or is not yet complete. 9962func (page LogicalNetworkCollectionPage) NotDone() bool { 9963 return !page.lnc.IsEmpty() 9964} 9965 9966// Response returns the raw server response from the last page request. 9967func (page LogicalNetworkCollectionPage) Response() LogicalNetworkCollection { 9968 return page.lnc 9969} 9970 9971// Values returns the slice of values for the current page or nil if there are no values. 9972func (page LogicalNetworkCollectionPage) Values() []LogicalNetwork { 9973 if page.lnc.IsEmpty() { 9974 return nil 9975 } 9976 return *page.lnc.Value 9977} 9978 9979// Creates a new instance of the LogicalNetworkCollectionPage type. 9980func NewLogicalNetworkCollectionPage(cur LogicalNetworkCollection, getNextPage func(context.Context, LogicalNetworkCollection) (LogicalNetworkCollection, error)) LogicalNetworkCollectionPage { 9981 return LogicalNetworkCollectionPage{ 9982 fn: getNextPage, 9983 lnc: cur, 9984 } 9985} 9986 9987// LogicalNetworkProperties logical Network Properties. 9988type LogicalNetworkProperties struct { 9989 // FriendlyName - The Friendly Name. 9990 FriendlyName *string `json:"friendlyName,omitempty"` 9991 // NetworkVirtualizationStatus - A value indicating whether Network Virtualization is enabled for the logical network. 9992 NetworkVirtualizationStatus *string `json:"networkVirtualizationStatus,omitempty"` 9993 // LogicalNetworkUsage - A value indicating whether logical network is used as private test network by test failover. 9994 LogicalNetworkUsage *string `json:"logicalNetworkUsage,omitempty"` 9995 // LogicalNetworkDefinitionsStatus - A value indicating whether logical network definitions are isolated. 9996 LogicalNetworkDefinitionsStatus *string `json:"logicalNetworkDefinitionsStatus,omitempty"` 9997} 9998 9999// ManualActionTaskDetails this class represents the manual action task details. 10000type ManualActionTaskDetails struct { 10001 // Name - The name. 10002 Name *string `json:"name,omitempty"` 10003 // Instructions - The instructions. 10004 Instructions *string `json:"instructions,omitempty"` 10005 // Observation - The observation. 10006 Observation *string `json:"observation,omitempty"` 10007 // InstanceType - Possible values include: 'InstanceTypeTaskTypeDetails', 'InstanceTypeAutomationRunbookTaskDetails', 'InstanceTypeConsistencyCheckTaskDetails', 'InstanceTypeFabricReplicationGroupTaskDetails', 'InstanceTypeJobTaskDetails', 'InstanceTypeManualActionTaskDetails', 'InstanceTypeScriptActionTaskDetails', 'InstanceTypeVirtualMachineTaskDetails', 'InstanceTypeVMNicUpdatesTaskDetails' 10008 InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"` 10009} 10010 10011// MarshalJSON is the custom marshaler for ManualActionTaskDetails. 10012func (matd ManualActionTaskDetails) MarshalJSON() ([]byte, error) { 10013 matd.InstanceType = InstanceTypeManualActionTaskDetails 10014 objectMap := make(map[string]interface{}) 10015 if matd.Name != nil { 10016 objectMap["name"] = matd.Name 10017 } 10018 if matd.Instructions != nil { 10019 objectMap["instructions"] = matd.Instructions 10020 } 10021 if matd.Observation != nil { 10022 objectMap["observation"] = matd.Observation 10023 } 10024 if matd.InstanceType != "" { 10025 objectMap["instanceType"] = matd.InstanceType 10026 } 10027 return json.Marshal(objectMap) 10028} 10029 10030// AsAutomationRunbookTaskDetails is the BasicTaskTypeDetails implementation for ManualActionTaskDetails. 10031func (matd ManualActionTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) { 10032 return nil, false 10033} 10034 10035// AsConsistencyCheckTaskDetails is the BasicTaskTypeDetails implementation for ManualActionTaskDetails. 10036func (matd ManualActionTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) { 10037 return nil, false 10038} 10039 10040// AsFabricReplicationGroupTaskDetails is the BasicTaskTypeDetails implementation for ManualActionTaskDetails. 10041func (matd ManualActionTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) { 10042 return nil, false 10043} 10044 10045// AsJobTaskDetails is the BasicTaskTypeDetails implementation for ManualActionTaskDetails. 10046func (matd ManualActionTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) { 10047 return nil, false 10048} 10049 10050// AsManualActionTaskDetails is the BasicTaskTypeDetails implementation for ManualActionTaskDetails. 10051func (matd ManualActionTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) { 10052 return &matd, true 10053} 10054 10055// AsScriptActionTaskDetails is the BasicTaskTypeDetails implementation for ManualActionTaskDetails. 10056func (matd ManualActionTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) { 10057 return nil, false 10058} 10059 10060// AsVirtualMachineTaskDetails is the BasicTaskTypeDetails implementation for ManualActionTaskDetails. 10061func (matd ManualActionTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) { 10062 return nil, false 10063} 10064 10065// AsVMNicUpdatesTaskDetails is the BasicTaskTypeDetails implementation for ManualActionTaskDetails. 10066func (matd ManualActionTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) { 10067 return nil, false 10068} 10069 10070// AsTaskTypeDetails is the BasicTaskTypeDetails implementation for ManualActionTaskDetails. 10071func (matd ManualActionTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) { 10072 return nil, false 10073} 10074 10075// AsBasicTaskTypeDetails is the BasicTaskTypeDetails implementation for ManualActionTaskDetails. 10076func (matd ManualActionTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) { 10077 return &matd, true 10078} 10079 10080// MasterTargetServer details of a Master Target Server. 10081type MasterTargetServer struct { 10082 // ID - The server Id. 10083 ID *string `json:"id,omitempty"` 10084 // IPAddress - The IP address of the server. 10085 IPAddress *string `json:"ipAddress,omitempty"` 10086 // Name - The server name. 10087 Name *string `json:"name,omitempty"` 10088 // OsType - The OS type of the server. 10089 OsType *string `json:"osType,omitempty"` 10090 // AgentVersion - The version of the scout component on the server. 10091 AgentVersion *string `json:"agentVersion,omitempty"` 10092 // LastHeartbeat - The last heartbeat received from the server. 10093 LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"` 10094 // VersionStatus - Version status 10095 VersionStatus *string `json:"versionStatus,omitempty"` 10096 // RetentionVolumes - The retention volumes of Master target Server. 10097 RetentionVolumes *[]RetentionVolume `json:"retentionVolumes,omitempty"` 10098 // DataStores - The list of data stores in the fabric. 10099 DataStores *[]DataStore `json:"dataStores,omitempty"` 10100 // ValidationErrors - Validation errors. 10101 ValidationErrors *[]HealthError `json:"validationErrors,omitempty"` 10102 // HealthErrors - Health errors. 10103 HealthErrors *[]HealthError `json:"healthErrors,omitempty"` 10104 // DiskCount - Disk count of the master target. 10105 DiskCount *int32 `json:"diskCount,omitempty"` 10106 // OsVersion - OS Version of the master target. 10107 OsVersion *string `json:"osVersion,omitempty"` 10108 // AgentExpiryDate - Agent expiry date. 10109 AgentExpiryDate *date.Time `json:"agentExpiryDate,omitempty"` 10110 // MarsAgentVersion - MARS agent version. 10111 MarsAgentVersion *string `json:"marsAgentVersion,omitempty"` 10112 // MarsAgentExpiryDate - MARS agent expiry date. 10113 MarsAgentExpiryDate *date.Time `json:"marsAgentExpiryDate,omitempty"` 10114 // AgentVersionDetails - Agent version details. 10115 AgentVersionDetails *VersionDetails `json:"agentVersionDetails,omitempty"` 10116 // MarsAgentVersionDetails - Mars agent version details. 10117 MarsAgentVersionDetails *VersionDetails `json:"marsAgentVersionDetails,omitempty"` 10118} 10119 10120// MigrateInput input for migrate. 10121type MigrateInput struct { 10122 // Properties - Migrate input properties. 10123 Properties *MigrateInputProperties `json:"properties,omitempty"` 10124} 10125 10126// MigrateInputProperties migrate input properties. 10127type MigrateInputProperties struct { 10128 // ProviderSpecificDetails - The provider specific details. 10129 ProviderSpecificDetails BasicMigrateProviderSpecificInput `json:"providerSpecificDetails,omitempty"` 10130} 10131 10132// UnmarshalJSON is the custom unmarshaler for MigrateInputProperties struct. 10133func (mip *MigrateInputProperties) UnmarshalJSON(body []byte) error { 10134 var m map[string]*json.RawMessage 10135 err := json.Unmarshal(body, &m) 10136 if err != nil { 10137 return err 10138 } 10139 for k, v := range m { 10140 switch k { 10141 case "providerSpecificDetails": 10142 if v != nil { 10143 providerSpecificDetails, err := unmarshalBasicMigrateProviderSpecificInput(*v) 10144 if err != nil { 10145 return err 10146 } 10147 mip.ProviderSpecificDetails = providerSpecificDetails 10148 } 10149 } 10150 } 10151 10152 return nil 10153} 10154 10155// BasicMigrateProviderSpecificInput migrate provider specific input. 10156type BasicMigrateProviderSpecificInput interface { 10157 AsVMwareCbtMigrateInput() (*VMwareCbtMigrateInput, bool) 10158 AsMigrateProviderSpecificInput() (*MigrateProviderSpecificInput, bool) 10159} 10160 10161// MigrateProviderSpecificInput migrate provider specific input. 10162type MigrateProviderSpecificInput struct { 10163 // InstanceType - Possible values include: 'InstanceTypeBasicMigrateProviderSpecificInputInstanceTypeMigrateProviderSpecificInput', 'InstanceTypeBasicMigrateProviderSpecificInputInstanceTypeVMwareCbt' 10164 InstanceType InstanceTypeBasicMigrateProviderSpecificInput `json:"instanceType,omitempty"` 10165} 10166 10167func unmarshalBasicMigrateProviderSpecificInput(body []byte) (BasicMigrateProviderSpecificInput, error) { 10168 var m map[string]interface{} 10169 err := json.Unmarshal(body, &m) 10170 if err != nil { 10171 return nil, err 10172 } 10173 10174 switch m["instanceType"] { 10175 case string(InstanceTypeBasicMigrateProviderSpecificInputInstanceTypeVMwareCbt): 10176 var vmcmi VMwareCbtMigrateInput 10177 err := json.Unmarshal(body, &vmcmi) 10178 return vmcmi, err 10179 default: 10180 var mpsi MigrateProviderSpecificInput 10181 err := json.Unmarshal(body, &mpsi) 10182 return mpsi, err 10183 } 10184} 10185func unmarshalBasicMigrateProviderSpecificInputArray(body []byte) ([]BasicMigrateProviderSpecificInput, error) { 10186 var rawMessages []*json.RawMessage 10187 err := json.Unmarshal(body, &rawMessages) 10188 if err != nil { 10189 return nil, err 10190 } 10191 10192 mpsiArray := make([]BasicMigrateProviderSpecificInput, len(rawMessages)) 10193 10194 for index, rawMessage := range rawMessages { 10195 mpsi, err := unmarshalBasicMigrateProviderSpecificInput(*rawMessage) 10196 if err != nil { 10197 return nil, err 10198 } 10199 mpsiArray[index] = mpsi 10200 } 10201 return mpsiArray, nil 10202} 10203 10204// MarshalJSON is the custom marshaler for MigrateProviderSpecificInput. 10205func (mpsi MigrateProviderSpecificInput) MarshalJSON() ([]byte, error) { 10206 mpsi.InstanceType = InstanceTypeBasicMigrateProviderSpecificInputInstanceTypeMigrateProviderSpecificInput 10207 objectMap := make(map[string]interface{}) 10208 if mpsi.InstanceType != "" { 10209 objectMap["instanceType"] = mpsi.InstanceType 10210 } 10211 return json.Marshal(objectMap) 10212} 10213 10214// AsVMwareCbtMigrateInput is the BasicMigrateProviderSpecificInput implementation for MigrateProviderSpecificInput. 10215func (mpsi MigrateProviderSpecificInput) AsVMwareCbtMigrateInput() (*VMwareCbtMigrateInput, bool) { 10216 return nil, false 10217} 10218 10219// AsMigrateProviderSpecificInput is the BasicMigrateProviderSpecificInput implementation for MigrateProviderSpecificInput. 10220func (mpsi MigrateProviderSpecificInput) AsMigrateProviderSpecificInput() (*MigrateProviderSpecificInput, bool) { 10221 return &mpsi, true 10222} 10223 10224// AsBasicMigrateProviderSpecificInput is the BasicMigrateProviderSpecificInput implementation for MigrateProviderSpecificInput. 10225func (mpsi MigrateProviderSpecificInput) AsBasicMigrateProviderSpecificInput() (BasicMigrateProviderSpecificInput, bool) { 10226 return &mpsi, true 10227} 10228 10229// MigrationItem migration item. 10230type MigrationItem struct { 10231 autorest.Response `json:"-"` 10232 // Properties - The migration item properties. 10233 Properties *MigrationItemProperties `json:"properties,omitempty"` 10234 // ID - READ-ONLY; Resource Id 10235 ID *string `json:"id,omitempty"` 10236 // Name - READ-ONLY; Resource Name 10237 Name *string `json:"name,omitempty"` 10238 // Type - READ-ONLY; Resource Type 10239 Type *string `json:"type,omitempty"` 10240 // Location - Resource Location 10241 Location *string `json:"location,omitempty"` 10242} 10243 10244// MarshalJSON is the custom marshaler for MigrationItem. 10245func (mi MigrationItem) MarshalJSON() ([]byte, error) { 10246 objectMap := make(map[string]interface{}) 10247 if mi.Properties != nil { 10248 objectMap["properties"] = mi.Properties 10249 } 10250 if mi.Location != nil { 10251 objectMap["location"] = mi.Location 10252 } 10253 return json.Marshal(objectMap) 10254} 10255 10256// MigrationItemCollection migration item collection. 10257type MigrationItemCollection struct { 10258 autorest.Response `json:"-"` 10259 // Value - The list of migration items. 10260 Value *[]MigrationItem `json:"value,omitempty"` 10261 // NextLink - The value of next link. 10262 NextLink *string `json:"nextLink,omitempty"` 10263} 10264 10265// MigrationItemCollectionIterator provides access to a complete listing of MigrationItem values. 10266type MigrationItemCollectionIterator struct { 10267 i int 10268 page MigrationItemCollectionPage 10269} 10270 10271// NextWithContext advances to the next value. If there was an error making 10272// the request the iterator does not advance and the error is returned. 10273func (iter *MigrationItemCollectionIterator) NextWithContext(ctx context.Context) (err error) { 10274 if tracing.IsEnabled() { 10275 ctx = tracing.StartSpan(ctx, fqdn+"/MigrationItemCollectionIterator.NextWithContext") 10276 defer func() { 10277 sc := -1 10278 if iter.Response().Response.Response != nil { 10279 sc = iter.Response().Response.Response.StatusCode 10280 } 10281 tracing.EndSpan(ctx, sc, err) 10282 }() 10283 } 10284 iter.i++ 10285 if iter.i < len(iter.page.Values()) { 10286 return nil 10287 } 10288 err = iter.page.NextWithContext(ctx) 10289 if err != nil { 10290 iter.i-- 10291 return err 10292 } 10293 iter.i = 0 10294 return nil 10295} 10296 10297// Next advances to the next value. If there was an error making 10298// the request the iterator does not advance and the error is returned. 10299// Deprecated: Use NextWithContext() instead. 10300func (iter *MigrationItemCollectionIterator) Next() error { 10301 return iter.NextWithContext(context.Background()) 10302} 10303 10304// NotDone returns true if the enumeration should be started or is not yet complete. 10305func (iter MigrationItemCollectionIterator) NotDone() bool { 10306 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 10307} 10308 10309// Response returns the raw server response from the last page request. 10310func (iter MigrationItemCollectionIterator) Response() MigrationItemCollection { 10311 return iter.page.Response() 10312} 10313 10314// Value returns the current value or a zero-initialized value if the 10315// iterator has advanced beyond the end of the collection. 10316func (iter MigrationItemCollectionIterator) Value() MigrationItem { 10317 if !iter.page.NotDone() { 10318 return MigrationItem{} 10319 } 10320 return iter.page.Values()[iter.i] 10321} 10322 10323// Creates a new instance of the MigrationItemCollectionIterator type. 10324func NewMigrationItemCollectionIterator(page MigrationItemCollectionPage) MigrationItemCollectionIterator { 10325 return MigrationItemCollectionIterator{page: page} 10326} 10327 10328// IsEmpty returns true if the ListResult contains no values. 10329func (mic MigrationItemCollection) IsEmpty() bool { 10330 return mic.Value == nil || len(*mic.Value) == 0 10331} 10332 10333// hasNextLink returns true if the NextLink is not empty. 10334func (mic MigrationItemCollection) hasNextLink() bool { 10335 return mic.NextLink != nil && len(*mic.NextLink) != 0 10336} 10337 10338// migrationItemCollectionPreparer prepares a request to retrieve the next set of results. 10339// It returns nil if no more results exist. 10340func (mic MigrationItemCollection) migrationItemCollectionPreparer(ctx context.Context) (*http.Request, error) { 10341 if !mic.hasNextLink() { 10342 return nil, nil 10343 } 10344 return autorest.Prepare((&http.Request{}).WithContext(ctx), 10345 autorest.AsJSON(), 10346 autorest.AsGet(), 10347 autorest.WithBaseURL(to.String(mic.NextLink))) 10348} 10349 10350// MigrationItemCollectionPage contains a page of MigrationItem values. 10351type MigrationItemCollectionPage struct { 10352 fn func(context.Context, MigrationItemCollection) (MigrationItemCollection, error) 10353 mic MigrationItemCollection 10354} 10355 10356// NextWithContext advances to the next page of values. If there was an error making 10357// the request the page does not advance and the error is returned. 10358func (page *MigrationItemCollectionPage) NextWithContext(ctx context.Context) (err error) { 10359 if tracing.IsEnabled() { 10360 ctx = tracing.StartSpan(ctx, fqdn+"/MigrationItemCollectionPage.NextWithContext") 10361 defer func() { 10362 sc := -1 10363 if page.Response().Response.Response != nil { 10364 sc = page.Response().Response.Response.StatusCode 10365 } 10366 tracing.EndSpan(ctx, sc, err) 10367 }() 10368 } 10369 for { 10370 next, err := page.fn(ctx, page.mic) 10371 if err != nil { 10372 return err 10373 } 10374 page.mic = next 10375 if !next.hasNextLink() || !next.IsEmpty() { 10376 break 10377 } 10378 } 10379 return nil 10380} 10381 10382// Next advances to the next page of values. If there was an error making 10383// the request the page does not advance and the error is returned. 10384// Deprecated: Use NextWithContext() instead. 10385func (page *MigrationItemCollectionPage) Next() error { 10386 return page.NextWithContext(context.Background()) 10387} 10388 10389// NotDone returns true if the page enumeration should be started or is not yet complete. 10390func (page MigrationItemCollectionPage) NotDone() bool { 10391 return !page.mic.IsEmpty() 10392} 10393 10394// Response returns the raw server response from the last page request. 10395func (page MigrationItemCollectionPage) Response() MigrationItemCollection { 10396 return page.mic 10397} 10398 10399// Values returns the slice of values for the current page or nil if there are no values. 10400func (page MigrationItemCollectionPage) Values() []MigrationItem { 10401 if page.mic.IsEmpty() { 10402 return nil 10403 } 10404 return *page.mic.Value 10405} 10406 10407// Creates a new instance of the MigrationItemCollectionPage type. 10408func NewMigrationItemCollectionPage(cur MigrationItemCollection, getNextPage func(context.Context, MigrationItemCollection) (MigrationItemCollection, error)) MigrationItemCollectionPage { 10409 return MigrationItemCollectionPage{ 10410 fn: getNextPage, 10411 mic: cur, 10412 } 10413} 10414 10415// MigrationItemProperties migration item properties. 10416type MigrationItemProperties struct { 10417 // MachineName - READ-ONLY; The on-premise virtual machine name. 10418 MachineName *string `json:"machineName,omitempty"` 10419 // PolicyID - READ-ONLY; The ARM Id of policy governing this item. 10420 PolicyID *string `json:"policyId,omitempty"` 10421 // PolicyFriendlyName - READ-ONLY; The name of policy governing this item. 10422 PolicyFriendlyName *string `json:"policyFriendlyName,omitempty"` 10423 // MigrationState - READ-ONLY; The migration status. Possible values include: 'MigrationStateNone', 'MigrationStateEnableMigrationInProgress', 'MigrationStateEnableMigrationFailed', 'MigrationStateDisableMigrationInProgress', 'MigrationStateDisableMigrationFailed', 'MigrationStateInitialSeedingInProgress', 'MigrationStateInitialSeedingFailed', 'MigrationStateReplicating', 'MigrationStateMigrationInProgress', 'MigrationStateMigrationSucceeded', 'MigrationStateMigrationFailed' 10424 MigrationState MigrationState `json:"migrationState,omitempty"` 10425 // MigrationStateDescription - READ-ONLY; The migration state description. 10426 MigrationStateDescription *string `json:"migrationStateDescription,omitempty"` 10427 // LastTestMigrationTime - READ-ONLY; The last test migration time. 10428 LastTestMigrationTime *date.Time `json:"lastTestMigrationTime,omitempty"` 10429 // LastTestMigrationStatus - READ-ONLY; The status of the last test migration. 10430 LastTestMigrationStatus *string `json:"lastTestMigrationStatus,omitempty"` 10431 // TestMigrateState - READ-ONLY; The test migrate state. Possible values include: 'TestMigrationStateNone', 'TestMigrationStateTestMigrationInProgress', 'TestMigrationStateTestMigrationSucceeded', 'TestMigrationStateTestMigrationFailed', 'TestMigrationStateTestMigrationCleanupInProgress' 10432 TestMigrateState TestMigrationState `json:"testMigrateState,omitempty"` 10433 // TestMigrateStateDescription - READ-ONLY; The test migrate state description. 10434 TestMigrateStateDescription *string `json:"testMigrateStateDescription,omitempty"` 10435 // Health - READ-ONLY; The consolidated health. Possible values include: 'ProtectionHealthNone', 'ProtectionHealthNormal', 'ProtectionHealthWarning', 'ProtectionHealthCritical' 10436 Health ProtectionHealth `json:"health,omitempty"` 10437 // HealthErrors - READ-ONLY; The list of health errors. 10438 HealthErrors *[]HealthError `json:"healthErrors,omitempty"` 10439 // AllowedOperations - READ-ONLY; The allowed operations on the migration item, based on the current migration state of the item. 10440 AllowedOperations *[]MigrationItemOperation `json:"allowedOperations,omitempty"` 10441 // CurrentJob - READ-ONLY; The current job details. 10442 CurrentJob *CurrentJobDetails `json:"currentJob,omitempty"` 10443 // EventCorrelationID - READ-ONLY; The correlation Id for events associated with this migration item. 10444 EventCorrelationID *string `json:"eventCorrelationId,omitempty"` 10445 // ProviderSpecificDetails - The migration provider custom settings. 10446 ProviderSpecificDetails BasicMigrationProviderSpecificSettings `json:"providerSpecificDetails,omitempty"` 10447} 10448 10449// MarshalJSON is the custom marshaler for MigrationItemProperties. 10450func (mip MigrationItemProperties) MarshalJSON() ([]byte, error) { 10451 objectMap := make(map[string]interface{}) 10452 objectMap["providerSpecificDetails"] = mip.ProviderSpecificDetails 10453 return json.Marshal(objectMap) 10454} 10455 10456// UnmarshalJSON is the custom unmarshaler for MigrationItemProperties struct. 10457func (mip *MigrationItemProperties) UnmarshalJSON(body []byte) error { 10458 var m map[string]*json.RawMessage 10459 err := json.Unmarshal(body, &m) 10460 if err != nil { 10461 return err 10462 } 10463 for k, v := range m { 10464 switch k { 10465 case "machineName": 10466 if v != nil { 10467 var machineName string 10468 err = json.Unmarshal(*v, &machineName) 10469 if err != nil { 10470 return err 10471 } 10472 mip.MachineName = &machineName 10473 } 10474 case "policyId": 10475 if v != nil { 10476 var policyID string 10477 err = json.Unmarshal(*v, &policyID) 10478 if err != nil { 10479 return err 10480 } 10481 mip.PolicyID = &policyID 10482 } 10483 case "policyFriendlyName": 10484 if v != nil { 10485 var policyFriendlyName string 10486 err = json.Unmarshal(*v, &policyFriendlyName) 10487 if err != nil { 10488 return err 10489 } 10490 mip.PolicyFriendlyName = &policyFriendlyName 10491 } 10492 case "migrationState": 10493 if v != nil { 10494 var migrationState MigrationState 10495 err = json.Unmarshal(*v, &migrationState) 10496 if err != nil { 10497 return err 10498 } 10499 mip.MigrationState = migrationState 10500 } 10501 case "migrationStateDescription": 10502 if v != nil { 10503 var migrationStateDescription string 10504 err = json.Unmarshal(*v, &migrationStateDescription) 10505 if err != nil { 10506 return err 10507 } 10508 mip.MigrationStateDescription = &migrationStateDescription 10509 } 10510 case "lastTestMigrationTime": 10511 if v != nil { 10512 var lastTestMigrationTime date.Time 10513 err = json.Unmarshal(*v, &lastTestMigrationTime) 10514 if err != nil { 10515 return err 10516 } 10517 mip.LastTestMigrationTime = &lastTestMigrationTime 10518 } 10519 case "lastTestMigrationStatus": 10520 if v != nil { 10521 var lastTestMigrationStatus string 10522 err = json.Unmarshal(*v, &lastTestMigrationStatus) 10523 if err != nil { 10524 return err 10525 } 10526 mip.LastTestMigrationStatus = &lastTestMigrationStatus 10527 } 10528 case "testMigrateState": 10529 if v != nil { 10530 var testMigrateState TestMigrationState 10531 err = json.Unmarshal(*v, &testMigrateState) 10532 if err != nil { 10533 return err 10534 } 10535 mip.TestMigrateState = testMigrateState 10536 } 10537 case "testMigrateStateDescription": 10538 if v != nil { 10539 var testMigrateStateDescription string 10540 err = json.Unmarshal(*v, &testMigrateStateDescription) 10541 if err != nil { 10542 return err 10543 } 10544 mip.TestMigrateStateDescription = &testMigrateStateDescription 10545 } 10546 case "health": 10547 if v != nil { 10548 var health ProtectionHealth 10549 err = json.Unmarshal(*v, &health) 10550 if err != nil { 10551 return err 10552 } 10553 mip.Health = health 10554 } 10555 case "healthErrors": 10556 if v != nil { 10557 var healthErrors []HealthError 10558 err = json.Unmarshal(*v, &healthErrors) 10559 if err != nil { 10560 return err 10561 } 10562 mip.HealthErrors = &healthErrors 10563 } 10564 case "allowedOperations": 10565 if v != nil { 10566 var allowedOperations []MigrationItemOperation 10567 err = json.Unmarshal(*v, &allowedOperations) 10568 if err != nil { 10569 return err 10570 } 10571 mip.AllowedOperations = &allowedOperations 10572 } 10573 case "currentJob": 10574 if v != nil { 10575 var currentJob CurrentJobDetails 10576 err = json.Unmarshal(*v, ¤tJob) 10577 if err != nil { 10578 return err 10579 } 10580 mip.CurrentJob = ¤tJob 10581 } 10582 case "eventCorrelationId": 10583 if v != nil { 10584 var eventCorrelationID string 10585 err = json.Unmarshal(*v, &eventCorrelationID) 10586 if err != nil { 10587 return err 10588 } 10589 mip.EventCorrelationID = &eventCorrelationID 10590 } 10591 case "providerSpecificDetails": 10592 if v != nil { 10593 providerSpecificDetails, err := unmarshalBasicMigrationProviderSpecificSettings(*v) 10594 if err != nil { 10595 return err 10596 } 10597 mip.ProviderSpecificDetails = providerSpecificDetails 10598 } 10599 } 10600 } 10601 10602 return nil 10603} 10604 10605// MigrationItemsQueryParameter query parameter to enumerate migration items. 10606type MigrationItemsQueryParameter struct { 10607 // SourceFabricName - The source fabric name filter. 10608 SourceFabricName *string `json:"sourceFabricName,omitempty"` 10609 // InstanceType - The replication provider type. 10610 InstanceType *string `json:"instanceType,omitempty"` 10611} 10612 10613// BasicMigrationProviderSpecificSettings migration provider specific settings. 10614type BasicMigrationProviderSpecificSettings interface { 10615 AsVMwareCbtMigrationDetails() (*VMwareCbtMigrationDetails, bool) 10616 AsMigrationProviderSpecificSettings() (*MigrationProviderSpecificSettings, bool) 10617} 10618 10619// MigrationProviderSpecificSettings migration provider specific settings. 10620type MigrationProviderSpecificSettings struct { 10621 // InstanceType - Possible values include: 'InstanceTypeBasicMigrationProviderSpecificSettingsInstanceTypeMigrationProviderSpecificSettings', 'InstanceTypeBasicMigrationProviderSpecificSettingsInstanceTypeVMwareCbt' 10622 InstanceType InstanceTypeBasicMigrationProviderSpecificSettings `json:"instanceType,omitempty"` 10623} 10624 10625func unmarshalBasicMigrationProviderSpecificSettings(body []byte) (BasicMigrationProviderSpecificSettings, error) { 10626 var m map[string]interface{} 10627 err := json.Unmarshal(body, &m) 10628 if err != nil { 10629 return nil, err 10630 } 10631 10632 switch m["instanceType"] { 10633 case string(InstanceTypeBasicMigrationProviderSpecificSettingsInstanceTypeVMwareCbt): 10634 var vmcmd VMwareCbtMigrationDetails 10635 err := json.Unmarshal(body, &vmcmd) 10636 return vmcmd, err 10637 default: 10638 var mpss MigrationProviderSpecificSettings 10639 err := json.Unmarshal(body, &mpss) 10640 return mpss, err 10641 } 10642} 10643func unmarshalBasicMigrationProviderSpecificSettingsArray(body []byte) ([]BasicMigrationProviderSpecificSettings, error) { 10644 var rawMessages []*json.RawMessage 10645 err := json.Unmarshal(body, &rawMessages) 10646 if err != nil { 10647 return nil, err 10648 } 10649 10650 mpssArray := make([]BasicMigrationProviderSpecificSettings, len(rawMessages)) 10651 10652 for index, rawMessage := range rawMessages { 10653 mpss, err := unmarshalBasicMigrationProviderSpecificSettings(*rawMessage) 10654 if err != nil { 10655 return nil, err 10656 } 10657 mpssArray[index] = mpss 10658 } 10659 return mpssArray, nil 10660} 10661 10662// MarshalJSON is the custom marshaler for MigrationProviderSpecificSettings. 10663func (mpss MigrationProviderSpecificSettings) MarshalJSON() ([]byte, error) { 10664 mpss.InstanceType = InstanceTypeBasicMigrationProviderSpecificSettingsInstanceTypeMigrationProviderSpecificSettings 10665 objectMap := make(map[string]interface{}) 10666 if mpss.InstanceType != "" { 10667 objectMap["instanceType"] = mpss.InstanceType 10668 } 10669 return json.Marshal(objectMap) 10670} 10671 10672// AsVMwareCbtMigrationDetails is the BasicMigrationProviderSpecificSettings implementation for MigrationProviderSpecificSettings. 10673func (mpss MigrationProviderSpecificSettings) AsVMwareCbtMigrationDetails() (*VMwareCbtMigrationDetails, bool) { 10674 return nil, false 10675} 10676 10677// AsMigrationProviderSpecificSettings is the BasicMigrationProviderSpecificSettings implementation for MigrationProviderSpecificSettings. 10678func (mpss MigrationProviderSpecificSettings) AsMigrationProviderSpecificSettings() (*MigrationProviderSpecificSettings, bool) { 10679 return &mpss, true 10680} 10681 10682// AsBasicMigrationProviderSpecificSettings is the BasicMigrationProviderSpecificSettings implementation for MigrationProviderSpecificSettings. 10683func (mpss MigrationProviderSpecificSettings) AsBasicMigrationProviderSpecificSettings() (BasicMigrationProviderSpecificSettings, bool) { 10684 return &mpss, true 10685} 10686 10687// MigrationRecoveryPoint recovery point for a migration item. 10688type MigrationRecoveryPoint struct { 10689 autorest.Response `json:"-"` 10690 // Properties - Recovery point properties. 10691 Properties *MigrationRecoveryPointProperties `json:"properties,omitempty"` 10692 // ID - READ-ONLY; Resource Id 10693 ID *string `json:"id,omitempty"` 10694 // Name - READ-ONLY; Resource Name 10695 Name *string `json:"name,omitempty"` 10696 // Type - READ-ONLY; Resource Type 10697 Type *string `json:"type,omitempty"` 10698 // Location - Resource Location 10699 Location *string `json:"location,omitempty"` 10700} 10701 10702// MarshalJSON is the custom marshaler for MigrationRecoveryPoint. 10703func (mrp MigrationRecoveryPoint) MarshalJSON() ([]byte, error) { 10704 objectMap := make(map[string]interface{}) 10705 if mrp.Properties != nil { 10706 objectMap["properties"] = mrp.Properties 10707 } 10708 if mrp.Location != nil { 10709 objectMap["location"] = mrp.Location 10710 } 10711 return json.Marshal(objectMap) 10712} 10713 10714// MigrationRecoveryPointCollection collection of migration recovery points. 10715type MigrationRecoveryPointCollection struct { 10716 autorest.Response `json:"-"` 10717 // Value - The migration recovery point details. 10718 Value *[]MigrationRecoveryPoint `json:"value,omitempty"` 10719 // NextLink - The value of next link. 10720 NextLink *string `json:"nextLink,omitempty"` 10721} 10722 10723// MigrationRecoveryPointCollectionIterator provides access to a complete listing of MigrationRecoveryPoint 10724// values. 10725type MigrationRecoveryPointCollectionIterator struct { 10726 i int 10727 page MigrationRecoveryPointCollectionPage 10728} 10729 10730// NextWithContext advances to the next value. If there was an error making 10731// the request the iterator does not advance and the error is returned. 10732func (iter *MigrationRecoveryPointCollectionIterator) NextWithContext(ctx context.Context) (err error) { 10733 if tracing.IsEnabled() { 10734 ctx = tracing.StartSpan(ctx, fqdn+"/MigrationRecoveryPointCollectionIterator.NextWithContext") 10735 defer func() { 10736 sc := -1 10737 if iter.Response().Response.Response != nil { 10738 sc = iter.Response().Response.Response.StatusCode 10739 } 10740 tracing.EndSpan(ctx, sc, err) 10741 }() 10742 } 10743 iter.i++ 10744 if iter.i < len(iter.page.Values()) { 10745 return nil 10746 } 10747 err = iter.page.NextWithContext(ctx) 10748 if err != nil { 10749 iter.i-- 10750 return err 10751 } 10752 iter.i = 0 10753 return nil 10754} 10755 10756// Next advances to the next value. If there was an error making 10757// the request the iterator does not advance and the error is returned. 10758// Deprecated: Use NextWithContext() instead. 10759func (iter *MigrationRecoveryPointCollectionIterator) Next() error { 10760 return iter.NextWithContext(context.Background()) 10761} 10762 10763// NotDone returns true if the enumeration should be started or is not yet complete. 10764func (iter MigrationRecoveryPointCollectionIterator) NotDone() bool { 10765 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 10766} 10767 10768// Response returns the raw server response from the last page request. 10769func (iter MigrationRecoveryPointCollectionIterator) Response() MigrationRecoveryPointCollection { 10770 return iter.page.Response() 10771} 10772 10773// Value returns the current value or a zero-initialized value if the 10774// iterator has advanced beyond the end of the collection. 10775func (iter MigrationRecoveryPointCollectionIterator) Value() MigrationRecoveryPoint { 10776 if !iter.page.NotDone() { 10777 return MigrationRecoveryPoint{} 10778 } 10779 return iter.page.Values()[iter.i] 10780} 10781 10782// Creates a new instance of the MigrationRecoveryPointCollectionIterator type. 10783func NewMigrationRecoveryPointCollectionIterator(page MigrationRecoveryPointCollectionPage) MigrationRecoveryPointCollectionIterator { 10784 return MigrationRecoveryPointCollectionIterator{page: page} 10785} 10786 10787// IsEmpty returns true if the ListResult contains no values. 10788func (mrpc MigrationRecoveryPointCollection) IsEmpty() bool { 10789 return mrpc.Value == nil || len(*mrpc.Value) == 0 10790} 10791 10792// hasNextLink returns true if the NextLink is not empty. 10793func (mrpc MigrationRecoveryPointCollection) hasNextLink() bool { 10794 return mrpc.NextLink != nil && len(*mrpc.NextLink) != 0 10795} 10796 10797// migrationRecoveryPointCollectionPreparer prepares a request to retrieve the next set of results. 10798// It returns nil if no more results exist. 10799func (mrpc MigrationRecoveryPointCollection) migrationRecoveryPointCollectionPreparer(ctx context.Context) (*http.Request, error) { 10800 if !mrpc.hasNextLink() { 10801 return nil, nil 10802 } 10803 return autorest.Prepare((&http.Request{}).WithContext(ctx), 10804 autorest.AsJSON(), 10805 autorest.AsGet(), 10806 autorest.WithBaseURL(to.String(mrpc.NextLink))) 10807} 10808 10809// MigrationRecoveryPointCollectionPage contains a page of MigrationRecoveryPoint values. 10810type MigrationRecoveryPointCollectionPage struct { 10811 fn func(context.Context, MigrationRecoveryPointCollection) (MigrationRecoveryPointCollection, error) 10812 mrpc MigrationRecoveryPointCollection 10813} 10814 10815// NextWithContext advances to the next page of values. If there was an error making 10816// the request the page does not advance and the error is returned. 10817func (page *MigrationRecoveryPointCollectionPage) NextWithContext(ctx context.Context) (err error) { 10818 if tracing.IsEnabled() { 10819 ctx = tracing.StartSpan(ctx, fqdn+"/MigrationRecoveryPointCollectionPage.NextWithContext") 10820 defer func() { 10821 sc := -1 10822 if page.Response().Response.Response != nil { 10823 sc = page.Response().Response.Response.StatusCode 10824 } 10825 tracing.EndSpan(ctx, sc, err) 10826 }() 10827 } 10828 for { 10829 next, err := page.fn(ctx, page.mrpc) 10830 if err != nil { 10831 return err 10832 } 10833 page.mrpc = next 10834 if !next.hasNextLink() || !next.IsEmpty() { 10835 break 10836 } 10837 } 10838 return nil 10839} 10840 10841// Next advances to the next page of values. If there was an error making 10842// the request the page does not advance and the error is returned. 10843// Deprecated: Use NextWithContext() instead. 10844func (page *MigrationRecoveryPointCollectionPage) Next() error { 10845 return page.NextWithContext(context.Background()) 10846} 10847 10848// NotDone returns true if the page enumeration should be started or is not yet complete. 10849func (page MigrationRecoveryPointCollectionPage) NotDone() bool { 10850 return !page.mrpc.IsEmpty() 10851} 10852 10853// Response returns the raw server response from the last page request. 10854func (page MigrationRecoveryPointCollectionPage) Response() MigrationRecoveryPointCollection { 10855 return page.mrpc 10856} 10857 10858// Values returns the slice of values for the current page or nil if there are no values. 10859func (page MigrationRecoveryPointCollectionPage) Values() []MigrationRecoveryPoint { 10860 if page.mrpc.IsEmpty() { 10861 return nil 10862 } 10863 return *page.mrpc.Value 10864} 10865 10866// Creates a new instance of the MigrationRecoveryPointCollectionPage type. 10867func NewMigrationRecoveryPointCollectionPage(cur MigrationRecoveryPointCollection, getNextPage func(context.Context, MigrationRecoveryPointCollection) (MigrationRecoveryPointCollection, error)) MigrationRecoveryPointCollectionPage { 10868 return MigrationRecoveryPointCollectionPage{ 10869 fn: getNextPage, 10870 mrpc: cur, 10871 } 10872} 10873 10874// MigrationRecoveryPointProperties migration item recovery point properties. 10875type MigrationRecoveryPointProperties struct { 10876 // RecoveryPointTime - READ-ONLY; The recovery point time. 10877 RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"` 10878 // RecoveryPointType - READ-ONLY; The recovery point type. Possible values include: 'MigrationRecoveryPointTypeNotSpecified', 'MigrationRecoveryPointTypeApplicationConsistent', 'MigrationRecoveryPointTypeCrashConsistent' 10879 RecoveryPointType MigrationRecoveryPointType `json:"recoveryPointType,omitempty"` 10880} 10881 10882// MarshalJSON is the custom marshaler for MigrationRecoveryPointProperties. 10883func (mrpp MigrationRecoveryPointProperties) MarshalJSON() ([]byte, error) { 10884 objectMap := make(map[string]interface{}) 10885 return json.Marshal(objectMap) 10886} 10887 10888// MobilityServiceUpdate the Mobility Service update details. 10889type MobilityServiceUpdate struct { 10890 // Version - The version of the latest update. 10891 Version *string `json:"version,omitempty"` 10892 // RebootStatus - The reboot status of the update - whether it is required or not. 10893 RebootStatus *string `json:"rebootStatus,omitempty"` 10894 // OsType - The OS type. 10895 OsType *string `json:"osType,omitempty"` 10896} 10897 10898// Network network model. 10899type Network struct { 10900 autorest.Response `json:"-"` 10901 // Properties - The Network Properties. 10902 Properties *NetworkProperties `json:"properties,omitempty"` 10903 // ID - READ-ONLY; Resource Id 10904 ID *string `json:"id,omitempty"` 10905 // Name - READ-ONLY; Resource Name 10906 Name *string `json:"name,omitempty"` 10907 // Type - READ-ONLY; Resource Type 10908 Type *string `json:"type,omitempty"` 10909 // Location - Resource Location 10910 Location *string `json:"location,omitempty"` 10911} 10912 10913// MarshalJSON is the custom marshaler for Network. 10914func (n Network) MarshalJSON() ([]byte, error) { 10915 objectMap := make(map[string]interface{}) 10916 if n.Properties != nil { 10917 objectMap["properties"] = n.Properties 10918 } 10919 if n.Location != nil { 10920 objectMap["location"] = n.Location 10921 } 10922 return json.Marshal(objectMap) 10923} 10924 10925// NetworkCollection list of networks. 10926type NetworkCollection struct { 10927 autorest.Response `json:"-"` 10928 // Value - The Networks list details. 10929 Value *[]Network `json:"value,omitempty"` 10930 // NextLink - The value of next link. 10931 NextLink *string `json:"nextLink,omitempty"` 10932} 10933 10934// NetworkCollectionIterator provides access to a complete listing of Network values. 10935type NetworkCollectionIterator struct { 10936 i int 10937 page NetworkCollectionPage 10938} 10939 10940// NextWithContext advances to the next value. If there was an error making 10941// the request the iterator does not advance and the error is returned. 10942func (iter *NetworkCollectionIterator) NextWithContext(ctx context.Context) (err error) { 10943 if tracing.IsEnabled() { 10944 ctx = tracing.StartSpan(ctx, fqdn+"/NetworkCollectionIterator.NextWithContext") 10945 defer func() { 10946 sc := -1 10947 if iter.Response().Response.Response != nil { 10948 sc = iter.Response().Response.Response.StatusCode 10949 } 10950 tracing.EndSpan(ctx, sc, err) 10951 }() 10952 } 10953 iter.i++ 10954 if iter.i < len(iter.page.Values()) { 10955 return nil 10956 } 10957 err = iter.page.NextWithContext(ctx) 10958 if err != nil { 10959 iter.i-- 10960 return err 10961 } 10962 iter.i = 0 10963 return nil 10964} 10965 10966// Next advances to the next value. If there was an error making 10967// the request the iterator does not advance and the error is returned. 10968// Deprecated: Use NextWithContext() instead. 10969func (iter *NetworkCollectionIterator) Next() error { 10970 return iter.NextWithContext(context.Background()) 10971} 10972 10973// NotDone returns true if the enumeration should be started or is not yet complete. 10974func (iter NetworkCollectionIterator) NotDone() bool { 10975 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 10976} 10977 10978// Response returns the raw server response from the last page request. 10979func (iter NetworkCollectionIterator) Response() NetworkCollection { 10980 return iter.page.Response() 10981} 10982 10983// Value returns the current value or a zero-initialized value if the 10984// iterator has advanced beyond the end of the collection. 10985func (iter NetworkCollectionIterator) Value() Network { 10986 if !iter.page.NotDone() { 10987 return Network{} 10988 } 10989 return iter.page.Values()[iter.i] 10990} 10991 10992// Creates a new instance of the NetworkCollectionIterator type. 10993func NewNetworkCollectionIterator(page NetworkCollectionPage) NetworkCollectionIterator { 10994 return NetworkCollectionIterator{page: page} 10995} 10996 10997// IsEmpty returns true if the ListResult contains no values. 10998func (nc NetworkCollection) IsEmpty() bool { 10999 return nc.Value == nil || len(*nc.Value) == 0 11000} 11001 11002// hasNextLink returns true if the NextLink is not empty. 11003func (nc NetworkCollection) hasNextLink() bool { 11004 return nc.NextLink != nil && len(*nc.NextLink) != 0 11005} 11006 11007// networkCollectionPreparer prepares a request to retrieve the next set of results. 11008// It returns nil if no more results exist. 11009func (nc NetworkCollection) networkCollectionPreparer(ctx context.Context) (*http.Request, error) { 11010 if !nc.hasNextLink() { 11011 return nil, nil 11012 } 11013 return autorest.Prepare((&http.Request{}).WithContext(ctx), 11014 autorest.AsJSON(), 11015 autorest.AsGet(), 11016 autorest.WithBaseURL(to.String(nc.NextLink))) 11017} 11018 11019// NetworkCollectionPage contains a page of Network values. 11020type NetworkCollectionPage struct { 11021 fn func(context.Context, NetworkCollection) (NetworkCollection, error) 11022 nc NetworkCollection 11023} 11024 11025// NextWithContext advances to the next page of values. If there was an error making 11026// the request the page does not advance and the error is returned. 11027func (page *NetworkCollectionPage) NextWithContext(ctx context.Context) (err error) { 11028 if tracing.IsEnabled() { 11029 ctx = tracing.StartSpan(ctx, fqdn+"/NetworkCollectionPage.NextWithContext") 11030 defer func() { 11031 sc := -1 11032 if page.Response().Response.Response != nil { 11033 sc = page.Response().Response.Response.StatusCode 11034 } 11035 tracing.EndSpan(ctx, sc, err) 11036 }() 11037 } 11038 for { 11039 next, err := page.fn(ctx, page.nc) 11040 if err != nil { 11041 return err 11042 } 11043 page.nc = next 11044 if !next.hasNextLink() || !next.IsEmpty() { 11045 break 11046 } 11047 } 11048 return nil 11049} 11050 11051// Next advances to the next page of values. If there was an error making 11052// the request the page does not advance and the error is returned. 11053// Deprecated: Use NextWithContext() instead. 11054func (page *NetworkCollectionPage) Next() error { 11055 return page.NextWithContext(context.Background()) 11056} 11057 11058// NotDone returns true if the page enumeration should be started or is not yet complete. 11059func (page NetworkCollectionPage) NotDone() bool { 11060 return !page.nc.IsEmpty() 11061} 11062 11063// Response returns the raw server response from the last page request. 11064func (page NetworkCollectionPage) Response() NetworkCollection { 11065 return page.nc 11066} 11067 11068// Values returns the slice of values for the current page or nil if there are no values. 11069func (page NetworkCollectionPage) Values() []Network { 11070 if page.nc.IsEmpty() { 11071 return nil 11072 } 11073 return *page.nc.Value 11074} 11075 11076// Creates a new instance of the NetworkCollectionPage type. 11077func NewNetworkCollectionPage(cur NetworkCollection, getNextPage func(context.Context, NetworkCollection) (NetworkCollection, error)) NetworkCollectionPage { 11078 return NetworkCollectionPage{ 11079 fn: getNextPage, 11080 nc: cur, 11081 } 11082} 11083 11084// NetworkMapping network Mapping model. Ideally it should have been possible to inherit this class from 11085// prev version in InheritedModels as long as there is no difference in structure or method signature. 11086// Since there were no base Models for certain fields and methods viz NetworkMappingProperties and Load 11087// with required return type, the class has been introduced in its entirety with references to base models 11088// to facilitate extensions in subsequent versions. 11089type NetworkMapping struct { 11090 autorest.Response `json:"-"` 11091 // Properties - The Network Mapping Properties. 11092 Properties *NetworkMappingProperties `json:"properties,omitempty"` 11093 // ID - READ-ONLY; Resource Id 11094 ID *string `json:"id,omitempty"` 11095 // Name - READ-ONLY; Resource Name 11096 Name *string `json:"name,omitempty"` 11097 // Type - READ-ONLY; Resource Type 11098 Type *string `json:"type,omitempty"` 11099 // Location - Resource Location 11100 Location *string `json:"location,omitempty"` 11101} 11102 11103// MarshalJSON is the custom marshaler for NetworkMapping. 11104func (nm NetworkMapping) MarshalJSON() ([]byte, error) { 11105 objectMap := make(map[string]interface{}) 11106 if nm.Properties != nil { 11107 objectMap["properties"] = nm.Properties 11108 } 11109 if nm.Location != nil { 11110 objectMap["location"] = nm.Location 11111 } 11112 return json.Marshal(objectMap) 11113} 11114 11115// NetworkMappingCollection list of network mappings. As with NetworkMapping, it should be possible to 11116// reuse a prev version of this class. It doesn't seem likely this class could be anything more than a 11117// slightly bespoke collection of NetworkMapping. Hence it makes sense to override Load with 11118// Base.NetworkMapping instead of existing CurrentVersion.NetworkMapping. 11119type NetworkMappingCollection struct { 11120 autorest.Response `json:"-"` 11121 // Value - The Network Mappings list. 11122 Value *[]NetworkMapping `json:"value,omitempty"` 11123 // NextLink - The value of next link. 11124 NextLink *string `json:"nextLink,omitempty"` 11125} 11126 11127// NetworkMappingCollectionIterator provides access to a complete listing of NetworkMapping values. 11128type NetworkMappingCollectionIterator struct { 11129 i int 11130 page NetworkMappingCollectionPage 11131} 11132 11133// NextWithContext advances to the next value. If there was an error making 11134// the request the iterator does not advance and the error is returned. 11135func (iter *NetworkMappingCollectionIterator) NextWithContext(ctx context.Context) (err error) { 11136 if tracing.IsEnabled() { 11137 ctx = tracing.StartSpan(ctx, fqdn+"/NetworkMappingCollectionIterator.NextWithContext") 11138 defer func() { 11139 sc := -1 11140 if iter.Response().Response.Response != nil { 11141 sc = iter.Response().Response.Response.StatusCode 11142 } 11143 tracing.EndSpan(ctx, sc, err) 11144 }() 11145 } 11146 iter.i++ 11147 if iter.i < len(iter.page.Values()) { 11148 return nil 11149 } 11150 err = iter.page.NextWithContext(ctx) 11151 if err != nil { 11152 iter.i-- 11153 return err 11154 } 11155 iter.i = 0 11156 return nil 11157} 11158 11159// Next advances to the next value. If there was an error making 11160// the request the iterator does not advance and the error is returned. 11161// Deprecated: Use NextWithContext() instead. 11162func (iter *NetworkMappingCollectionIterator) Next() error { 11163 return iter.NextWithContext(context.Background()) 11164} 11165 11166// NotDone returns true if the enumeration should be started or is not yet complete. 11167func (iter NetworkMappingCollectionIterator) NotDone() bool { 11168 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 11169} 11170 11171// Response returns the raw server response from the last page request. 11172func (iter NetworkMappingCollectionIterator) Response() NetworkMappingCollection { 11173 return iter.page.Response() 11174} 11175 11176// Value returns the current value or a zero-initialized value if the 11177// iterator has advanced beyond the end of the collection. 11178func (iter NetworkMappingCollectionIterator) Value() NetworkMapping { 11179 if !iter.page.NotDone() { 11180 return NetworkMapping{} 11181 } 11182 return iter.page.Values()[iter.i] 11183} 11184 11185// Creates a new instance of the NetworkMappingCollectionIterator type. 11186func NewNetworkMappingCollectionIterator(page NetworkMappingCollectionPage) NetworkMappingCollectionIterator { 11187 return NetworkMappingCollectionIterator{page: page} 11188} 11189 11190// IsEmpty returns true if the ListResult contains no values. 11191func (nmc NetworkMappingCollection) IsEmpty() bool { 11192 return nmc.Value == nil || len(*nmc.Value) == 0 11193} 11194 11195// hasNextLink returns true if the NextLink is not empty. 11196func (nmc NetworkMappingCollection) hasNextLink() bool { 11197 return nmc.NextLink != nil && len(*nmc.NextLink) != 0 11198} 11199 11200// networkMappingCollectionPreparer prepares a request to retrieve the next set of results. 11201// It returns nil if no more results exist. 11202func (nmc NetworkMappingCollection) networkMappingCollectionPreparer(ctx context.Context) (*http.Request, error) { 11203 if !nmc.hasNextLink() { 11204 return nil, nil 11205 } 11206 return autorest.Prepare((&http.Request{}).WithContext(ctx), 11207 autorest.AsJSON(), 11208 autorest.AsGet(), 11209 autorest.WithBaseURL(to.String(nmc.NextLink))) 11210} 11211 11212// NetworkMappingCollectionPage contains a page of NetworkMapping values. 11213type NetworkMappingCollectionPage struct { 11214 fn func(context.Context, NetworkMappingCollection) (NetworkMappingCollection, error) 11215 nmc NetworkMappingCollection 11216} 11217 11218// NextWithContext advances to the next page of values. If there was an error making 11219// the request the page does not advance and the error is returned. 11220func (page *NetworkMappingCollectionPage) NextWithContext(ctx context.Context) (err error) { 11221 if tracing.IsEnabled() { 11222 ctx = tracing.StartSpan(ctx, fqdn+"/NetworkMappingCollectionPage.NextWithContext") 11223 defer func() { 11224 sc := -1 11225 if page.Response().Response.Response != nil { 11226 sc = page.Response().Response.Response.StatusCode 11227 } 11228 tracing.EndSpan(ctx, sc, err) 11229 }() 11230 } 11231 for { 11232 next, err := page.fn(ctx, page.nmc) 11233 if err != nil { 11234 return err 11235 } 11236 page.nmc = next 11237 if !next.hasNextLink() || !next.IsEmpty() { 11238 break 11239 } 11240 } 11241 return nil 11242} 11243 11244// Next advances to the next page of values. If there was an error making 11245// the request the page does not advance and the error is returned. 11246// Deprecated: Use NextWithContext() instead. 11247func (page *NetworkMappingCollectionPage) Next() error { 11248 return page.NextWithContext(context.Background()) 11249} 11250 11251// NotDone returns true if the page enumeration should be started or is not yet complete. 11252func (page NetworkMappingCollectionPage) NotDone() bool { 11253 return !page.nmc.IsEmpty() 11254} 11255 11256// Response returns the raw server response from the last page request. 11257func (page NetworkMappingCollectionPage) Response() NetworkMappingCollection { 11258 return page.nmc 11259} 11260 11261// Values returns the slice of values for the current page or nil if there are no values. 11262func (page NetworkMappingCollectionPage) Values() []NetworkMapping { 11263 if page.nmc.IsEmpty() { 11264 return nil 11265 } 11266 return *page.nmc.Value 11267} 11268 11269// Creates a new instance of the NetworkMappingCollectionPage type. 11270func NewNetworkMappingCollectionPage(cur NetworkMappingCollection, getNextPage func(context.Context, NetworkMappingCollection) (NetworkMappingCollection, error)) NetworkMappingCollectionPage { 11271 return NetworkMappingCollectionPage{ 11272 fn: getNextPage, 11273 nmc: cur, 11274 } 11275} 11276 11277// BasicNetworkMappingFabricSpecificSettings network Mapping fabric specific settings. 11278type BasicNetworkMappingFabricSpecificSettings interface { 11279 AsAzureToAzureNetworkMappingSettings() (*AzureToAzureNetworkMappingSettings, bool) 11280 AsVmmToAzureNetworkMappingSettings() (*VmmToAzureNetworkMappingSettings, bool) 11281 AsVmmToVmmNetworkMappingSettings() (*VmmToVmmNetworkMappingSettings, bool) 11282 AsNetworkMappingFabricSpecificSettings() (*NetworkMappingFabricSpecificSettings, bool) 11283} 11284 11285// NetworkMappingFabricSpecificSettings network Mapping fabric specific settings. 11286type NetworkMappingFabricSpecificSettings struct { 11287 // InstanceType - Possible values include: 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeNetworkMappingFabricSpecificSettings', 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeAzureToAzure', 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToAzure', 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToVmm' 11288 InstanceType InstanceTypeBasicNetworkMappingFabricSpecificSettings `json:"instanceType,omitempty"` 11289} 11290 11291func unmarshalBasicNetworkMappingFabricSpecificSettings(body []byte) (BasicNetworkMappingFabricSpecificSettings, error) { 11292 var m map[string]interface{} 11293 err := json.Unmarshal(body, &m) 11294 if err != nil { 11295 return nil, err 11296 } 11297 11298 switch m["instanceType"] { 11299 case string(InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeAzureToAzure): 11300 var atanms AzureToAzureNetworkMappingSettings 11301 err := json.Unmarshal(body, &atanms) 11302 return atanms, err 11303 case string(InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToAzure): 11304 var vtanms VmmToAzureNetworkMappingSettings 11305 err := json.Unmarshal(body, &vtanms) 11306 return vtanms, err 11307 case string(InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToVmm): 11308 var vtvnms VmmToVmmNetworkMappingSettings 11309 err := json.Unmarshal(body, &vtvnms) 11310 return vtvnms, err 11311 default: 11312 var nmfss NetworkMappingFabricSpecificSettings 11313 err := json.Unmarshal(body, &nmfss) 11314 return nmfss, err 11315 } 11316} 11317func unmarshalBasicNetworkMappingFabricSpecificSettingsArray(body []byte) ([]BasicNetworkMappingFabricSpecificSettings, error) { 11318 var rawMessages []*json.RawMessage 11319 err := json.Unmarshal(body, &rawMessages) 11320 if err != nil { 11321 return nil, err 11322 } 11323 11324 nmfssArray := make([]BasicNetworkMappingFabricSpecificSettings, len(rawMessages)) 11325 11326 for index, rawMessage := range rawMessages { 11327 nmfss, err := unmarshalBasicNetworkMappingFabricSpecificSettings(*rawMessage) 11328 if err != nil { 11329 return nil, err 11330 } 11331 nmfssArray[index] = nmfss 11332 } 11333 return nmfssArray, nil 11334} 11335 11336// MarshalJSON is the custom marshaler for NetworkMappingFabricSpecificSettings. 11337func (nmfss NetworkMappingFabricSpecificSettings) MarshalJSON() ([]byte, error) { 11338 nmfss.InstanceType = InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeNetworkMappingFabricSpecificSettings 11339 objectMap := make(map[string]interface{}) 11340 if nmfss.InstanceType != "" { 11341 objectMap["instanceType"] = nmfss.InstanceType 11342 } 11343 return json.Marshal(objectMap) 11344} 11345 11346// AsAzureToAzureNetworkMappingSettings is the BasicNetworkMappingFabricSpecificSettings implementation for NetworkMappingFabricSpecificSettings. 11347func (nmfss NetworkMappingFabricSpecificSettings) AsAzureToAzureNetworkMappingSettings() (*AzureToAzureNetworkMappingSettings, bool) { 11348 return nil, false 11349} 11350 11351// AsVmmToAzureNetworkMappingSettings is the BasicNetworkMappingFabricSpecificSettings implementation for NetworkMappingFabricSpecificSettings. 11352func (nmfss NetworkMappingFabricSpecificSettings) AsVmmToAzureNetworkMappingSettings() (*VmmToAzureNetworkMappingSettings, bool) { 11353 return nil, false 11354} 11355 11356// AsVmmToVmmNetworkMappingSettings is the BasicNetworkMappingFabricSpecificSettings implementation for NetworkMappingFabricSpecificSettings. 11357func (nmfss NetworkMappingFabricSpecificSettings) AsVmmToVmmNetworkMappingSettings() (*VmmToVmmNetworkMappingSettings, bool) { 11358 return nil, false 11359} 11360 11361// AsNetworkMappingFabricSpecificSettings is the BasicNetworkMappingFabricSpecificSettings implementation for NetworkMappingFabricSpecificSettings. 11362func (nmfss NetworkMappingFabricSpecificSettings) AsNetworkMappingFabricSpecificSettings() (*NetworkMappingFabricSpecificSettings, bool) { 11363 return &nmfss, true 11364} 11365 11366// AsBasicNetworkMappingFabricSpecificSettings is the BasicNetworkMappingFabricSpecificSettings implementation for NetworkMappingFabricSpecificSettings. 11367func (nmfss NetworkMappingFabricSpecificSettings) AsBasicNetworkMappingFabricSpecificSettings() (BasicNetworkMappingFabricSpecificSettings, bool) { 11368 return &nmfss, true 11369} 11370 11371// NetworkMappingProperties network Mapping Properties. 11372type NetworkMappingProperties struct { 11373 // State - The pairing state for network mapping. 11374 State *string `json:"state,omitempty"` 11375 // PrimaryNetworkFriendlyName - The primary network friendly name. 11376 PrimaryNetworkFriendlyName *string `json:"primaryNetworkFriendlyName,omitempty"` 11377 // PrimaryNetworkID - The primary network id for network mapping. 11378 PrimaryNetworkID *string `json:"primaryNetworkId,omitempty"` 11379 // PrimaryFabricFriendlyName - The primary fabric friendly name. 11380 PrimaryFabricFriendlyName *string `json:"primaryFabricFriendlyName,omitempty"` 11381 // RecoveryNetworkFriendlyName - The recovery network friendly name. 11382 RecoveryNetworkFriendlyName *string `json:"recoveryNetworkFriendlyName,omitempty"` 11383 // RecoveryNetworkID - The recovery network id for network mapping. 11384 RecoveryNetworkID *string `json:"recoveryNetworkId,omitempty"` 11385 // RecoveryFabricArmID - The recovery fabric ARM id. 11386 RecoveryFabricArmID *string `json:"recoveryFabricArmId,omitempty"` 11387 // RecoveryFabricFriendlyName - The recovery fabric friendly name. 11388 RecoveryFabricFriendlyName *string `json:"recoveryFabricFriendlyName,omitempty"` 11389 // FabricSpecificSettings - The fabric specific settings. 11390 FabricSpecificSettings BasicNetworkMappingFabricSpecificSettings `json:"fabricSpecificSettings,omitempty"` 11391} 11392 11393// UnmarshalJSON is the custom unmarshaler for NetworkMappingProperties struct. 11394func (nmp *NetworkMappingProperties) UnmarshalJSON(body []byte) error { 11395 var m map[string]*json.RawMessage 11396 err := json.Unmarshal(body, &m) 11397 if err != nil { 11398 return err 11399 } 11400 for k, v := range m { 11401 switch k { 11402 case "state": 11403 if v != nil { 11404 var state string 11405 err = json.Unmarshal(*v, &state) 11406 if err != nil { 11407 return err 11408 } 11409 nmp.State = &state 11410 } 11411 case "primaryNetworkFriendlyName": 11412 if v != nil { 11413 var primaryNetworkFriendlyName string 11414 err = json.Unmarshal(*v, &primaryNetworkFriendlyName) 11415 if err != nil { 11416 return err 11417 } 11418 nmp.PrimaryNetworkFriendlyName = &primaryNetworkFriendlyName 11419 } 11420 case "primaryNetworkId": 11421 if v != nil { 11422 var primaryNetworkID string 11423 err = json.Unmarshal(*v, &primaryNetworkID) 11424 if err != nil { 11425 return err 11426 } 11427 nmp.PrimaryNetworkID = &primaryNetworkID 11428 } 11429 case "primaryFabricFriendlyName": 11430 if v != nil { 11431 var primaryFabricFriendlyName string 11432 err = json.Unmarshal(*v, &primaryFabricFriendlyName) 11433 if err != nil { 11434 return err 11435 } 11436 nmp.PrimaryFabricFriendlyName = &primaryFabricFriendlyName 11437 } 11438 case "recoveryNetworkFriendlyName": 11439 if v != nil { 11440 var recoveryNetworkFriendlyName string 11441 err = json.Unmarshal(*v, &recoveryNetworkFriendlyName) 11442 if err != nil { 11443 return err 11444 } 11445 nmp.RecoveryNetworkFriendlyName = &recoveryNetworkFriendlyName 11446 } 11447 case "recoveryNetworkId": 11448 if v != nil { 11449 var recoveryNetworkID string 11450 err = json.Unmarshal(*v, &recoveryNetworkID) 11451 if err != nil { 11452 return err 11453 } 11454 nmp.RecoveryNetworkID = &recoveryNetworkID 11455 } 11456 case "recoveryFabricArmId": 11457 if v != nil { 11458 var recoveryFabricArmID string 11459 err = json.Unmarshal(*v, &recoveryFabricArmID) 11460 if err != nil { 11461 return err 11462 } 11463 nmp.RecoveryFabricArmID = &recoveryFabricArmID 11464 } 11465 case "recoveryFabricFriendlyName": 11466 if v != nil { 11467 var recoveryFabricFriendlyName string 11468 err = json.Unmarshal(*v, &recoveryFabricFriendlyName) 11469 if err != nil { 11470 return err 11471 } 11472 nmp.RecoveryFabricFriendlyName = &recoveryFabricFriendlyName 11473 } 11474 case "fabricSpecificSettings": 11475 if v != nil { 11476 fabricSpecificSettings, err := unmarshalBasicNetworkMappingFabricSpecificSettings(*v) 11477 if err != nil { 11478 return err 11479 } 11480 nmp.FabricSpecificSettings = fabricSpecificSettings 11481 } 11482 } 11483 } 11484 11485 return nil 11486} 11487 11488// NetworkProperties network Properties 11489type NetworkProperties struct { 11490 // FabricType - The Fabric Type. 11491 FabricType *string `json:"fabricType,omitempty"` 11492 // Subnets - The List of subnets. 11493 Subnets *[]Subnet `json:"subnets,omitempty"` 11494 // FriendlyName - The Friendly Name. 11495 FriendlyName *string `json:"friendlyName,omitempty"` 11496 // NetworkType - The Network Type. 11497 NetworkType *string `json:"networkType,omitempty"` 11498} 11499 11500// OperationsDiscovery operations discovery class. 11501type OperationsDiscovery struct { 11502 // Name - Name of the API. The name of the operation being performed on this particular object. It should match the action name that appears in RBAC / the event service. Examples of operations include: * Microsoft.Compute/virtualMachine/capture/action * Microsoft.Compute/virtualMachine/restart/action * Microsoft.Compute/virtualMachine/write * Microsoft.Compute/virtualMachine/read * Microsoft.Compute/virtualMachine/delete Each action should include, in order: (1) Resource Provider Namespace (2) Type hierarchy for which the action applies (e.g. server/databases for a SQL Azure database) (3) Read, Write, Action or Delete indicating which type applies. If it is a PUT/PATCH on a collection or named value, Write should be used. If it is a GET, Read should be used. If it is a DELETE, Delete should be used. If it is a POST, Action should be used. As a note: all resource providers would need to include the "{Resource Provider Namespace}/register/action" operation in their response. This API is used to register for their service, and should include details about the operation (e.g. a localized name for the resource provider + any special considerations like PII release) 11503 Name *string `json:"name,omitempty"` 11504 // Display - Object type 11505 Display *Display `json:"display,omitempty"` 11506 // Origin - Origin. The intended executor of the operation; governs the display of the operation in the RBAC UX and the audit logs UX. Default value is "user,system" 11507 Origin *string `json:"origin,omitempty"` 11508 // Properties - Properties. Reserved for future use. 11509 Properties interface{} `json:"properties,omitempty"` 11510} 11511 11512// OperationsDiscoveryCollection collection of ClientDiscovery details. 11513type OperationsDiscoveryCollection struct { 11514 autorest.Response `json:"-"` 11515 // Value - The ClientDiscovery details. 11516 Value *[]OperationsDiscovery `json:"value,omitempty"` 11517 // NextLink - The value of next link. 11518 NextLink *string `json:"nextLink,omitempty"` 11519} 11520 11521// OperationsDiscoveryCollectionIterator provides access to a complete listing of OperationsDiscovery 11522// values. 11523type OperationsDiscoveryCollectionIterator struct { 11524 i int 11525 page OperationsDiscoveryCollectionPage 11526} 11527 11528// NextWithContext advances to the next value. If there was an error making 11529// the request the iterator does not advance and the error is returned. 11530func (iter *OperationsDiscoveryCollectionIterator) NextWithContext(ctx context.Context) (err error) { 11531 if tracing.IsEnabled() { 11532 ctx = tracing.StartSpan(ctx, fqdn+"/OperationsDiscoveryCollectionIterator.NextWithContext") 11533 defer func() { 11534 sc := -1 11535 if iter.Response().Response.Response != nil { 11536 sc = iter.Response().Response.Response.StatusCode 11537 } 11538 tracing.EndSpan(ctx, sc, err) 11539 }() 11540 } 11541 iter.i++ 11542 if iter.i < len(iter.page.Values()) { 11543 return nil 11544 } 11545 err = iter.page.NextWithContext(ctx) 11546 if err != nil { 11547 iter.i-- 11548 return err 11549 } 11550 iter.i = 0 11551 return nil 11552} 11553 11554// Next advances to the next value. If there was an error making 11555// the request the iterator does not advance and the error is returned. 11556// Deprecated: Use NextWithContext() instead. 11557func (iter *OperationsDiscoveryCollectionIterator) Next() error { 11558 return iter.NextWithContext(context.Background()) 11559} 11560 11561// NotDone returns true if the enumeration should be started or is not yet complete. 11562func (iter OperationsDiscoveryCollectionIterator) NotDone() bool { 11563 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 11564} 11565 11566// Response returns the raw server response from the last page request. 11567func (iter OperationsDiscoveryCollectionIterator) Response() OperationsDiscoveryCollection { 11568 return iter.page.Response() 11569} 11570 11571// Value returns the current value or a zero-initialized value if the 11572// iterator has advanced beyond the end of the collection. 11573func (iter OperationsDiscoveryCollectionIterator) Value() OperationsDiscovery { 11574 if !iter.page.NotDone() { 11575 return OperationsDiscovery{} 11576 } 11577 return iter.page.Values()[iter.i] 11578} 11579 11580// Creates a new instance of the OperationsDiscoveryCollectionIterator type. 11581func NewOperationsDiscoveryCollectionIterator(page OperationsDiscoveryCollectionPage) OperationsDiscoveryCollectionIterator { 11582 return OperationsDiscoveryCollectionIterator{page: page} 11583} 11584 11585// IsEmpty returns true if the ListResult contains no values. 11586func (odc OperationsDiscoveryCollection) IsEmpty() bool { 11587 return odc.Value == nil || len(*odc.Value) == 0 11588} 11589 11590// hasNextLink returns true if the NextLink is not empty. 11591func (odc OperationsDiscoveryCollection) hasNextLink() bool { 11592 return odc.NextLink != nil && len(*odc.NextLink) != 0 11593} 11594 11595// operationsDiscoveryCollectionPreparer prepares a request to retrieve the next set of results. 11596// It returns nil if no more results exist. 11597func (odc OperationsDiscoveryCollection) operationsDiscoveryCollectionPreparer(ctx context.Context) (*http.Request, error) { 11598 if !odc.hasNextLink() { 11599 return nil, nil 11600 } 11601 return autorest.Prepare((&http.Request{}).WithContext(ctx), 11602 autorest.AsJSON(), 11603 autorest.AsGet(), 11604 autorest.WithBaseURL(to.String(odc.NextLink))) 11605} 11606 11607// OperationsDiscoveryCollectionPage contains a page of OperationsDiscovery values. 11608type OperationsDiscoveryCollectionPage struct { 11609 fn func(context.Context, OperationsDiscoveryCollection) (OperationsDiscoveryCollection, error) 11610 odc OperationsDiscoveryCollection 11611} 11612 11613// NextWithContext advances to the next page of values. If there was an error making 11614// the request the page does not advance and the error is returned. 11615func (page *OperationsDiscoveryCollectionPage) NextWithContext(ctx context.Context) (err error) { 11616 if tracing.IsEnabled() { 11617 ctx = tracing.StartSpan(ctx, fqdn+"/OperationsDiscoveryCollectionPage.NextWithContext") 11618 defer func() { 11619 sc := -1 11620 if page.Response().Response.Response != nil { 11621 sc = page.Response().Response.Response.StatusCode 11622 } 11623 tracing.EndSpan(ctx, sc, err) 11624 }() 11625 } 11626 for { 11627 next, err := page.fn(ctx, page.odc) 11628 if err != nil { 11629 return err 11630 } 11631 page.odc = next 11632 if !next.hasNextLink() || !next.IsEmpty() { 11633 break 11634 } 11635 } 11636 return nil 11637} 11638 11639// Next advances to the next page of values. If there was an error making 11640// the request the page does not advance and the error is returned. 11641// Deprecated: Use NextWithContext() instead. 11642func (page *OperationsDiscoveryCollectionPage) Next() error { 11643 return page.NextWithContext(context.Background()) 11644} 11645 11646// NotDone returns true if the page enumeration should be started or is not yet complete. 11647func (page OperationsDiscoveryCollectionPage) NotDone() bool { 11648 return !page.odc.IsEmpty() 11649} 11650 11651// Response returns the raw server response from the last page request. 11652func (page OperationsDiscoveryCollectionPage) Response() OperationsDiscoveryCollection { 11653 return page.odc 11654} 11655 11656// Values returns the slice of values for the current page or nil if there are no values. 11657func (page OperationsDiscoveryCollectionPage) Values() []OperationsDiscovery { 11658 if page.odc.IsEmpty() { 11659 return nil 11660 } 11661 return *page.odc.Value 11662} 11663 11664// Creates a new instance of the OperationsDiscoveryCollectionPage type. 11665func NewOperationsDiscoveryCollectionPage(cur OperationsDiscoveryCollection, getNextPage func(context.Context, OperationsDiscoveryCollection) (OperationsDiscoveryCollection, error)) OperationsDiscoveryCollectionPage { 11666 return OperationsDiscoveryCollectionPage{ 11667 fn: getNextPage, 11668 odc: cur, 11669 } 11670} 11671 11672// OSDetails disk Details. 11673type OSDetails struct { 11674 // OsType - VM Disk details. 11675 OsType *string `json:"osType,omitempty"` 11676 // ProductType - Product type. 11677 ProductType *string `json:"productType,omitempty"` 11678 // OsEdition - The OSEdition. 11679 OsEdition *string `json:"osEdition,omitempty"` 11680 // OSVersion - The OS Version. 11681 OSVersion *string `json:"oSVersion,omitempty"` 11682 // OSMajorVersion - The OS Major Version. 11683 OSMajorVersion *string `json:"oSMajorVersion,omitempty"` 11684 // OSMinorVersion - The OS Minor Version. 11685 OSMinorVersion *string `json:"oSMinorVersion,omitempty"` 11686} 11687 11688// OSDiskDetails details of the OS Disk. 11689type OSDiskDetails struct { 11690 // OsVhdID - The id of the disk containing the OS. 11691 OsVhdID *string `json:"osVhdId,omitempty"` 11692 // OsType - The type of the OS on the VM. 11693 OsType *string `json:"osType,omitempty"` 11694 // VhdName - The OS disk VHD name. 11695 VhdName *string `json:"vhdName,omitempty"` 11696} 11697 11698// PlannedFailoverInput input definition for planned failover. 11699type PlannedFailoverInput struct { 11700 // Properties - Planned failover input properties 11701 Properties *PlannedFailoverInputProperties `json:"properties,omitempty"` 11702} 11703 11704// PlannedFailoverInputProperties input definition for planned failover input properties. 11705type PlannedFailoverInputProperties struct { 11706 // FailoverDirection - Failover direction. 11707 FailoverDirection *string `json:"failoverDirection,omitempty"` 11708 // ProviderSpecificDetails - Provider specific settings 11709 ProviderSpecificDetails BasicProviderSpecificFailoverInput `json:"providerSpecificDetails,omitempty"` 11710} 11711 11712// UnmarshalJSON is the custom unmarshaler for PlannedFailoverInputProperties struct. 11713func (pfip *PlannedFailoverInputProperties) UnmarshalJSON(body []byte) error { 11714 var m map[string]*json.RawMessage 11715 err := json.Unmarshal(body, &m) 11716 if err != nil { 11717 return err 11718 } 11719 for k, v := range m { 11720 switch k { 11721 case "failoverDirection": 11722 if v != nil { 11723 var failoverDirection string 11724 err = json.Unmarshal(*v, &failoverDirection) 11725 if err != nil { 11726 return err 11727 } 11728 pfip.FailoverDirection = &failoverDirection 11729 } 11730 case "providerSpecificDetails": 11731 if v != nil { 11732 providerSpecificDetails, err := unmarshalBasicProviderSpecificFailoverInput(*v) 11733 if err != nil { 11734 return err 11735 } 11736 pfip.ProviderSpecificDetails = providerSpecificDetails 11737 } 11738 } 11739 } 11740 11741 return nil 11742} 11743 11744// Policy protection profile details. 11745type Policy struct { 11746 autorest.Response `json:"-"` 11747 // Properties - The custom data. 11748 Properties *PolicyProperties `json:"properties,omitempty"` 11749 // ID - READ-ONLY; Resource Id 11750 ID *string `json:"id,omitempty"` 11751 // Name - READ-ONLY; Resource Name 11752 Name *string `json:"name,omitempty"` 11753 // Type - READ-ONLY; Resource Type 11754 Type *string `json:"type,omitempty"` 11755 // Location - Resource Location 11756 Location *string `json:"location,omitempty"` 11757} 11758 11759// MarshalJSON is the custom marshaler for Policy. 11760func (p Policy) MarshalJSON() ([]byte, error) { 11761 objectMap := make(map[string]interface{}) 11762 if p.Properties != nil { 11763 objectMap["properties"] = p.Properties 11764 } 11765 if p.Location != nil { 11766 objectMap["location"] = p.Location 11767 } 11768 return json.Marshal(objectMap) 11769} 11770 11771// PolicyCollection protection Profile Collection details. 11772type PolicyCollection struct { 11773 autorest.Response `json:"-"` 11774 // Value - The policy details. 11775 Value *[]Policy `json:"value,omitempty"` 11776 // NextLink - The value of next link. 11777 NextLink *string `json:"nextLink,omitempty"` 11778} 11779 11780// PolicyCollectionIterator provides access to a complete listing of Policy values. 11781type PolicyCollectionIterator struct { 11782 i int 11783 page PolicyCollectionPage 11784} 11785 11786// NextWithContext advances to the next value. If there was an error making 11787// the request the iterator does not advance and the error is returned. 11788func (iter *PolicyCollectionIterator) NextWithContext(ctx context.Context) (err error) { 11789 if tracing.IsEnabled() { 11790 ctx = tracing.StartSpan(ctx, fqdn+"/PolicyCollectionIterator.NextWithContext") 11791 defer func() { 11792 sc := -1 11793 if iter.Response().Response.Response != nil { 11794 sc = iter.Response().Response.Response.StatusCode 11795 } 11796 tracing.EndSpan(ctx, sc, err) 11797 }() 11798 } 11799 iter.i++ 11800 if iter.i < len(iter.page.Values()) { 11801 return nil 11802 } 11803 err = iter.page.NextWithContext(ctx) 11804 if err != nil { 11805 iter.i-- 11806 return err 11807 } 11808 iter.i = 0 11809 return nil 11810} 11811 11812// Next advances to the next value. If there was an error making 11813// the request the iterator does not advance and the error is returned. 11814// Deprecated: Use NextWithContext() instead. 11815func (iter *PolicyCollectionIterator) Next() error { 11816 return iter.NextWithContext(context.Background()) 11817} 11818 11819// NotDone returns true if the enumeration should be started or is not yet complete. 11820func (iter PolicyCollectionIterator) NotDone() bool { 11821 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 11822} 11823 11824// Response returns the raw server response from the last page request. 11825func (iter PolicyCollectionIterator) Response() PolicyCollection { 11826 return iter.page.Response() 11827} 11828 11829// Value returns the current value or a zero-initialized value if the 11830// iterator has advanced beyond the end of the collection. 11831func (iter PolicyCollectionIterator) Value() Policy { 11832 if !iter.page.NotDone() { 11833 return Policy{} 11834 } 11835 return iter.page.Values()[iter.i] 11836} 11837 11838// Creates a new instance of the PolicyCollectionIterator type. 11839func NewPolicyCollectionIterator(page PolicyCollectionPage) PolicyCollectionIterator { 11840 return PolicyCollectionIterator{page: page} 11841} 11842 11843// IsEmpty returns true if the ListResult contains no values. 11844func (pc PolicyCollection) IsEmpty() bool { 11845 return pc.Value == nil || len(*pc.Value) == 0 11846} 11847 11848// hasNextLink returns true if the NextLink is not empty. 11849func (pc PolicyCollection) hasNextLink() bool { 11850 return pc.NextLink != nil && len(*pc.NextLink) != 0 11851} 11852 11853// policyCollectionPreparer prepares a request to retrieve the next set of results. 11854// It returns nil if no more results exist. 11855func (pc PolicyCollection) policyCollectionPreparer(ctx context.Context) (*http.Request, error) { 11856 if !pc.hasNextLink() { 11857 return nil, nil 11858 } 11859 return autorest.Prepare((&http.Request{}).WithContext(ctx), 11860 autorest.AsJSON(), 11861 autorest.AsGet(), 11862 autorest.WithBaseURL(to.String(pc.NextLink))) 11863} 11864 11865// PolicyCollectionPage contains a page of Policy values. 11866type PolicyCollectionPage struct { 11867 fn func(context.Context, PolicyCollection) (PolicyCollection, error) 11868 pc PolicyCollection 11869} 11870 11871// NextWithContext advances to the next page of values. If there was an error making 11872// the request the page does not advance and the error is returned. 11873func (page *PolicyCollectionPage) NextWithContext(ctx context.Context) (err error) { 11874 if tracing.IsEnabled() { 11875 ctx = tracing.StartSpan(ctx, fqdn+"/PolicyCollectionPage.NextWithContext") 11876 defer func() { 11877 sc := -1 11878 if page.Response().Response.Response != nil { 11879 sc = page.Response().Response.Response.StatusCode 11880 } 11881 tracing.EndSpan(ctx, sc, err) 11882 }() 11883 } 11884 for { 11885 next, err := page.fn(ctx, page.pc) 11886 if err != nil { 11887 return err 11888 } 11889 page.pc = next 11890 if !next.hasNextLink() || !next.IsEmpty() { 11891 break 11892 } 11893 } 11894 return nil 11895} 11896 11897// Next advances to the next page of values. If there was an error making 11898// the request the page does not advance and the error is returned. 11899// Deprecated: Use NextWithContext() instead. 11900func (page *PolicyCollectionPage) Next() error { 11901 return page.NextWithContext(context.Background()) 11902} 11903 11904// NotDone returns true if the page enumeration should be started or is not yet complete. 11905func (page PolicyCollectionPage) NotDone() bool { 11906 return !page.pc.IsEmpty() 11907} 11908 11909// Response returns the raw server response from the last page request. 11910func (page PolicyCollectionPage) Response() PolicyCollection { 11911 return page.pc 11912} 11913 11914// Values returns the slice of values for the current page or nil if there are no values. 11915func (page PolicyCollectionPage) Values() []Policy { 11916 if page.pc.IsEmpty() { 11917 return nil 11918 } 11919 return *page.pc.Value 11920} 11921 11922// Creates a new instance of the PolicyCollectionPage type. 11923func NewPolicyCollectionPage(cur PolicyCollection, getNextPage func(context.Context, PolicyCollection) (PolicyCollection, error)) PolicyCollectionPage { 11924 return PolicyCollectionPage{ 11925 fn: getNextPage, 11926 pc: cur, 11927 } 11928} 11929 11930// PolicyProperties protection profile custom data details. 11931type PolicyProperties struct { 11932 // FriendlyName - The FriendlyName. 11933 FriendlyName *string `json:"friendlyName,omitempty"` 11934 // ProviderSpecificDetails - The ReplicationChannelSetting. 11935 ProviderSpecificDetails BasicPolicyProviderSpecificDetails `json:"providerSpecificDetails,omitempty"` 11936} 11937 11938// UnmarshalJSON is the custom unmarshaler for PolicyProperties struct. 11939func (pp *PolicyProperties) UnmarshalJSON(body []byte) error { 11940 var m map[string]*json.RawMessage 11941 err := json.Unmarshal(body, &m) 11942 if err != nil { 11943 return err 11944 } 11945 for k, v := range m { 11946 switch k { 11947 case "friendlyName": 11948 if v != nil { 11949 var friendlyName string 11950 err = json.Unmarshal(*v, &friendlyName) 11951 if err != nil { 11952 return err 11953 } 11954 pp.FriendlyName = &friendlyName 11955 } 11956 case "providerSpecificDetails": 11957 if v != nil { 11958 providerSpecificDetails, err := unmarshalBasicPolicyProviderSpecificDetails(*v) 11959 if err != nil { 11960 return err 11961 } 11962 pp.ProviderSpecificDetails = providerSpecificDetails 11963 } 11964 } 11965 } 11966 11967 return nil 11968} 11969 11970// BasicPolicyProviderSpecificDetails base class for Provider specific details for policies. 11971type BasicPolicyProviderSpecificDetails interface { 11972 AsA2APolicyDetails() (*A2APolicyDetails, bool) 11973 AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) 11974 AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) 11975 AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) 11976 AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) 11977 AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) 11978 AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) 11979 AsInMagePolicyDetails() (*InMagePolicyDetails, bool) 11980 AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) 11981 AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) 11982 AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) 11983} 11984 11985// PolicyProviderSpecificDetails base class for Provider specific details for policies. 11986type PolicyProviderSpecificDetails struct { 11987 // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypePolicyProviderSpecificDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt' 11988 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"` 11989} 11990 11991func unmarshalBasicPolicyProviderSpecificDetails(body []byte) (BasicPolicyProviderSpecificDetails, error) { 11992 var m map[string]interface{} 11993 err := json.Unmarshal(body, &m) 11994 if err != nil { 11995 return nil, err 11996 } 11997 11998 switch m["instanceType"] { 11999 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A): 12000 var apd A2APolicyDetails 12001 err := json.Unmarshal(body, &apd) 12002 return apd, err 12003 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure): 12004 var hvrapd HyperVReplicaAzurePolicyDetails 12005 err := json.Unmarshal(body, &hvrapd) 12006 return hvrapd, err 12007 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails): 12008 var hvrbpd HyperVReplicaBasePolicyDetails 12009 err := json.Unmarshal(body, &hvrbpd) 12010 return hvrbpd, err 12011 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2): 12012 var hvrbpd HyperVReplicaBluePolicyDetails 12013 err := json.Unmarshal(body, &hvrbpd) 12014 return hvrbpd, err 12015 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012): 12016 var hvrpd HyperVReplicaPolicyDetails 12017 err := json.Unmarshal(body, &hvrpd) 12018 return hvrpd, err 12019 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2): 12020 var imavpd InMageAzureV2PolicyDetails 12021 err := json.Unmarshal(body, &imavpd) 12022 return imavpd, err 12023 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails): 12024 var imbpd InMageBasePolicyDetails 12025 err := json.Unmarshal(body, &imbpd) 12026 return imbpd, err 12027 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage): 12028 var impd InMagePolicyDetails 12029 err := json.Unmarshal(body, &impd) 12030 return impd, err 12031 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration): 12032 var rampd RcmAzureMigrationPolicyDetails 12033 err := json.Unmarshal(body, &rampd) 12034 return rampd, err 12035 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt): 12036 var vcpd VmwareCbtPolicyDetails 12037 err := json.Unmarshal(body, &vcpd) 12038 return vcpd, err 12039 default: 12040 var ppsd PolicyProviderSpecificDetails 12041 err := json.Unmarshal(body, &ppsd) 12042 return ppsd, err 12043 } 12044} 12045func unmarshalBasicPolicyProviderSpecificDetailsArray(body []byte) ([]BasicPolicyProviderSpecificDetails, error) { 12046 var rawMessages []*json.RawMessage 12047 err := json.Unmarshal(body, &rawMessages) 12048 if err != nil { 12049 return nil, err 12050 } 12051 12052 ppsdArray := make([]BasicPolicyProviderSpecificDetails, len(rawMessages)) 12053 12054 for index, rawMessage := range rawMessages { 12055 ppsd, err := unmarshalBasicPolicyProviderSpecificDetails(*rawMessage) 12056 if err != nil { 12057 return nil, err 12058 } 12059 ppsdArray[index] = ppsd 12060 } 12061 return ppsdArray, nil 12062} 12063 12064// MarshalJSON is the custom marshaler for PolicyProviderSpecificDetails. 12065func (ppsd PolicyProviderSpecificDetails) MarshalJSON() ([]byte, error) { 12066 ppsd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypePolicyProviderSpecificDetails 12067 objectMap := make(map[string]interface{}) 12068 if ppsd.InstanceType != "" { 12069 objectMap["instanceType"] = ppsd.InstanceType 12070 } 12071 return json.Marshal(objectMap) 12072} 12073 12074// AsA2APolicyDetails is the BasicPolicyProviderSpecificDetails implementation for PolicyProviderSpecificDetails. 12075func (ppsd PolicyProviderSpecificDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) { 12076 return nil, false 12077} 12078 12079// AsHyperVReplicaAzurePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for PolicyProviderSpecificDetails. 12080func (ppsd PolicyProviderSpecificDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) { 12081 return nil, false 12082} 12083 12084// AsHyperVReplicaBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for PolicyProviderSpecificDetails. 12085func (ppsd PolicyProviderSpecificDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) { 12086 return nil, false 12087} 12088 12089// AsHyperVReplicaBluePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for PolicyProviderSpecificDetails. 12090func (ppsd PolicyProviderSpecificDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) { 12091 return nil, false 12092} 12093 12094// AsHyperVReplicaPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for PolicyProviderSpecificDetails. 12095func (ppsd PolicyProviderSpecificDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) { 12096 return nil, false 12097} 12098 12099// AsInMageAzureV2PolicyDetails is the BasicPolicyProviderSpecificDetails implementation for PolicyProviderSpecificDetails. 12100func (ppsd PolicyProviderSpecificDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) { 12101 return nil, false 12102} 12103 12104// AsInMageBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for PolicyProviderSpecificDetails. 12105func (ppsd PolicyProviderSpecificDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) { 12106 return nil, false 12107} 12108 12109// AsInMagePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for PolicyProviderSpecificDetails. 12110func (ppsd PolicyProviderSpecificDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) { 12111 return nil, false 12112} 12113 12114// AsRcmAzureMigrationPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for PolicyProviderSpecificDetails. 12115func (ppsd PolicyProviderSpecificDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) { 12116 return nil, false 12117} 12118 12119// AsVmwareCbtPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for PolicyProviderSpecificDetails. 12120func (ppsd PolicyProviderSpecificDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) { 12121 return nil, false 12122} 12123 12124// AsPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for PolicyProviderSpecificDetails. 12125func (ppsd PolicyProviderSpecificDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) { 12126 return &ppsd, true 12127} 12128 12129// AsBasicPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for PolicyProviderSpecificDetails. 12130func (ppsd PolicyProviderSpecificDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) { 12131 return &ppsd, true 12132} 12133 12134// BasicPolicyProviderSpecificInput base class for provider specific input 12135type BasicPolicyProviderSpecificInput interface { 12136 AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) 12137 AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) 12138 AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) 12139 AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) 12140 AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) 12141 AsInMagePolicyInput() (*InMagePolicyInput, bool) 12142 AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) 12143 AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) 12144} 12145 12146// PolicyProviderSpecificInput base class for provider specific input 12147type PolicyProviderSpecificInput struct { 12148 // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypePolicyProviderSpecificInput', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeVMwareCbt' 12149 InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"` 12150} 12151 12152func unmarshalBasicPolicyProviderSpecificInput(body []byte) (BasicPolicyProviderSpecificInput, error) { 12153 var m map[string]interface{} 12154 err := json.Unmarshal(body, &m) 12155 if err != nil { 12156 return nil, err 12157 } 12158 12159 switch m["instanceType"] { 12160 case string(InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeA2A): 12161 var apci A2APolicyCreationInput 12162 err := json.Unmarshal(body, &apci) 12163 return apci, err 12164 case string(InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplicaAzure): 12165 var hvrapi HyperVReplicaAzurePolicyInput 12166 err := json.Unmarshal(body, &hvrapi) 12167 return hvrapi, err 12168 case string(InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012R2): 12169 var hvrbpi HyperVReplicaBluePolicyInput 12170 err := json.Unmarshal(body, &hvrbpi) 12171 return hvrbpi, err 12172 case string(InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012): 12173 var hvrpi HyperVReplicaPolicyInput 12174 err := json.Unmarshal(body, &hvrpi) 12175 return hvrpi, err 12176 case string(InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMageAzureV2): 12177 var imavpi InMageAzureV2PolicyInput 12178 err := json.Unmarshal(body, &imavpi) 12179 return imavpi, err 12180 case string(InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMage): 12181 var impi InMagePolicyInput 12182 err := json.Unmarshal(body, &impi) 12183 return impi, err 12184 case string(InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeVMwareCbt): 12185 var vmcpci VMwareCbtPolicyCreationInput 12186 err := json.Unmarshal(body, &vmcpci) 12187 return vmcpci, err 12188 default: 12189 var ppsi PolicyProviderSpecificInput 12190 err := json.Unmarshal(body, &ppsi) 12191 return ppsi, err 12192 } 12193} 12194func unmarshalBasicPolicyProviderSpecificInputArray(body []byte) ([]BasicPolicyProviderSpecificInput, error) { 12195 var rawMessages []*json.RawMessage 12196 err := json.Unmarshal(body, &rawMessages) 12197 if err != nil { 12198 return nil, err 12199 } 12200 12201 ppsiArray := make([]BasicPolicyProviderSpecificInput, len(rawMessages)) 12202 12203 for index, rawMessage := range rawMessages { 12204 ppsi, err := unmarshalBasicPolicyProviderSpecificInput(*rawMessage) 12205 if err != nil { 12206 return nil, err 12207 } 12208 ppsiArray[index] = ppsi 12209 } 12210 return ppsiArray, nil 12211} 12212 12213// MarshalJSON is the custom marshaler for PolicyProviderSpecificInput. 12214func (ppsi PolicyProviderSpecificInput) MarshalJSON() ([]byte, error) { 12215 ppsi.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypePolicyProviderSpecificInput 12216 objectMap := make(map[string]interface{}) 12217 if ppsi.InstanceType != "" { 12218 objectMap["instanceType"] = ppsi.InstanceType 12219 } 12220 return json.Marshal(objectMap) 12221} 12222 12223// AsA2APolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for PolicyProviderSpecificInput. 12224func (ppsi PolicyProviderSpecificInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) { 12225 return nil, false 12226} 12227 12228// AsHyperVReplicaAzurePolicyInput is the BasicPolicyProviderSpecificInput implementation for PolicyProviderSpecificInput. 12229func (ppsi PolicyProviderSpecificInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) { 12230 return nil, false 12231} 12232 12233// AsHyperVReplicaBluePolicyInput is the BasicPolicyProviderSpecificInput implementation for PolicyProviderSpecificInput. 12234func (ppsi PolicyProviderSpecificInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) { 12235 return nil, false 12236} 12237 12238// AsHyperVReplicaPolicyInput is the BasicPolicyProviderSpecificInput implementation for PolicyProviderSpecificInput. 12239func (ppsi PolicyProviderSpecificInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) { 12240 return nil, false 12241} 12242 12243// AsInMageAzureV2PolicyInput is the BasicPolicyProviderSpecificInput implementation for PolicyProviderSpecificInput. 12244func (ppsi PolicyProviderSpecificInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) { 12245 return nil, false 12246} 12247 12248// AsInMagePolicyInput is the BasicPolicyProviderSpecificInput implementation for PolicyProviderSpecificInput. 12249func (ppsi PolicyProviderSpecificInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) { 12250 return nil, false 12251} 12252 12253// AsVMwareCbtPolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for PolicyProviderSpecificInput. 12254func (ppsi PolicyProviderSpecificInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) { 12255 return nil, false 12256} 12257 12258// AsPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for PolicyProviderSpecificInput. 12259func (ppsi PolicyProviderSpecificInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) { 12260 return &ppsi, true 12261} 12262 12263// AsBasicPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for PolicyProviderSpecificInput. 12264func (ppsi PolicyProviderSpecificInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) { 12265 return &ppsi, true 12266} 12267 12268// ProcessServer details of the Process Server. 12269type ProcessServer struct { 12270 // FriendlyName - The Process Server's friendly name. 12271 FriendlyName *string `json:"friendlyName,omitempty"` 12272 // ID - The Process Server Id. 12273 ID *string `json:"id,omitempty"` 12274 // IPAddress - The IP address of the server. 12275 IPAddress *string `json:"ipAddress,omitempty"` 12276 // OsType - The OS type of the server. 12277 OsType *string `json:"osType,omitempty"` 12278 // AgentVersion - The version of the scout component on the server. 12279 AgentVersion *string `json:"agentVersion,omitempty"` 12280 // LastHeartbeat - The last heartbeat received from the server. 12281 LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"` 12282 // VersionStatus - Version status 12283 VersionStatus *string `json:"versionStatus,omitempty"` 12284 // MobilityServiceUpdates - The list of the mobility service updates available on the Process Server. 12285 MobilityServiceUpdates *[]MobilityServiceUpdate `json:"mobilityServiceUpdates,omitempty"` 12286 // HostID - The agent generated Id. 12287 HostID *string `json:"hostId,omitempty"` 12288 // MachineCount - The servers configured with this PS. 12289 MachineCount *string `json:"machineCount,omitempty"` 12290 // ReplicationPairCount - The number of replication pairs configured in this PS. 12291 ReplicationPairCount *string `json:"replicationPairCount,omitempty"` 12292 // SystemLoad - The percentage of the system load. 12293 SystemLoad *string `json:"systemLoad,omitempty"` 12294 // SystemLoadStatus - The system load status. 12295 SystemLoadStatus *string `json:"systemLoadStatus,omitempty"` 12296 // CPULoad - The percentage of the CPU load. 12297 CPULoad *string `json:"cpuLoad,omitempty"` 12298 // CPULoadStatus - The CPU load status. 12299 CPULoadStatus *string `json:"cpuLoadStatus,omitempty"` 12300 // TotalMemoryInBytes - The total memory. 12301 TotalMemoryInBytes *int64 `json:"totalMemoryInBytes,omitempty"` 12302 // AvailableMemoryInBytes - The available memory. 12303 AvailableMemoryInBytes *int64 `json:"availableMemoryInBytes,omitempty"` 12304 // MemoryUsageStatus - The memory usage status. 12305 MemoryUsageStatus *string `json:"memoryUsageStatus,omitempty"` 12306 // TotalSpaceInBytes - The total space. 12307 TotalSpaceInBytes *int64 `json:"totalSpaceInBytes,omitempty"` 12308 // AvailableSpaceInBytes - The available space. 12309 AvailableSpaceInBytes *int64 `json:"availableSpaceInBytes,omitempty"` 12310 // SpaceUsageStatus - The space usage status. 12311 SpaceUsageStatus *string `json:"spaceUsageStatus,omitempty"` 12312 // PsServiceStatus - The PS service status. 12313 PsServiceStatus *string `json:"psServiceStatus,omitempty"` 12314 // SslCertExpiryDate - The PS SSL cert expiry date. 12315 SslCertExpiryDate *date.Time `json:"sslCertExpiryDate,omitempty"` 12316 // SslCertExpiryRemainingDays - CS SSL cert expiry date. 12317 SslCertExpiryRemainingDays *int32 `json:"sslCertExpiryRemainingDays,omitempty"` 12318 // OsVersion - OS Version of the process server. Note: This will get populated if user has CS version greater than 9.12.0.0. 12319 OsVersion *string `json:"osVersion,omitempty"` 12320 // HealthErrors - Health errors. 12321 HealthErrors *[]HealthError `json:"healthErrors,omitempty"` 12322 // AgentExpiryDate - Agent expiry date. 12323 AgentExpiryDate *date.Time `json:"agentExpiryDate,omitempty"` 12324 // AgentVersionDetails - The agent version details. 12325 AgentVersionDetails *VersionDetails `json:"agentVersionDetails,omitempty"` 12326} 12327 12328// ProtectableItem replication protected item 12329type ProtectableItem struct { 12330 autorest.Response `json:"-"` 12331 // Properties - The custom data. 12332 Properties *ProtectableItemProperties `json:"properties,omitempty"` 12333 // ID - READ-ONLY; Resource Id 12334 ID *string `json:"id,omitempty"` 12335 // Name - READ-ONLY; Resource Name 12336 Name *string `json:"name,omitempty"` 12337 // Type - READ-ONLY; Resource Type 12338 Type *string `json:"type,omitempty"` 12339 // Location - Resource Location 12340 Location *string `json:"location,omitempty"` 12341} 12342 12343// MarshalJSON is the custom marshaler for ProtectableItem. 12344func (pi ProtectableItem) MarshalJSON() ([]byte, error) { 12345 objectMap := make(map[string]interface{}) 12346 if pi.Properties != nil { 12347 objectMap["properties"] = pi.Properties 12348 } 12349 if pi.Location != nil { 12350 objectMap["location"] = pi.Location 12351 } 12352 return json.Marshal(objectMap) 12353} 12354 12355// ProtectableItemCollection protectable item collection. 12356type ProtectableItemCollection struct { 12357 autorest.Response `json:"-"` 12358 // Value - The Protectable item details. 12359 Value *[]ProtectableItem `json:"value,omitempty"` 12360 // NextLink - The value of next link. 12361 NextLink *string `json:"nextLink,omitempty"` 12362} 12363 12364// ProtectableItemCollectionIterator provides access to a complete listing of ProtectableItem values. 12365type ProtectableItemCollectionIterator struct { 12366 i int 12367 page ProtectableItemCollectionPage 12368} 12369 12370// NextWithContext advances to the next value. If there was an error making 12371// the request the iterator does not advance and the error is returned. 12372func (iter *ProtectableItemCollectionIterator) NextWithContext(ctx context.Context) (err error) { 12373 if tracing.IsEnabled() { 12374 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableItemCollectionIterator.NextWithContext") 12375 defer func() { 12376 sc := -1 12377 if iter.Response().Response.Response != nil { 12378 sc = iter.Response().Response.Response.StatusCode 12379 } 12380 tracing.EndSpan(ctx, sc, err) 12381 }() 12382 } 12383 iter.i++ 12384 if iter.i < len(iter.page.Values()) { 12385 return nil 12386 } 12387 err = iter.page.NextWithContext(ctx) 12388 if err != nil { 12389 iter.i-- 12390 return err 12391 } 12392 iter.i = 0 12393 return nil 12394} 12395 12396// Next advances to the next value. If there was an error making 12397// the request the iterator does not advance and the error is returned. 12398// Deprecated: Use NextWithContext() instead. 12399func (iter *ProtectableItemCollectionIterator) Next() error { 12400 return iter.NextWithContext(context.Background()) 12401} 12402 12403// NotDone returns true if the enumeration should be started or is not yet complete. 12404func (iter ProtectableItemCollectionIterator) NotDone() bool { 12405 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 12406} 12407 12408// Response returns the raw server response from the last page request. 12409func (iter ProtectableItemCollectionIterator) Response() ProtectableItemCollection { 12410 return iter.page.Response() 12411} 12412 12413// Value returns the current value or a zero-initialized value if the 12414// iterator has advanced beyond the end of the collection. 12415func (iter ProtectableItemCollectionIterator) Value() ProtectableItem { 12416 if !iter.page.NotDone() { 12417 return ProtectableItem{} 12418 } 12419 return iter.page.Values()[iter.i] 12420} 12421 12422// Creates a new instance of the ProtectableItemCollectionIterator type. 12423func NewProtectableItemCollectionIterator(page ProtectableItemCollectionPage) ProtectableItemCollectionIterator { 12424 return ProtectableItemCollectionIterator{page: page} 12425} 12426 12427// IsEmpty returns true if the ListResult contains no values. 12428func (pic ProtectableItemCollection) IsEmpty() bool { 12429 return pic.Value == nil || len(*pic.Value) == 0 12430} 12431 12432// hasNextLink returns true if the NextLink is not empty. 12433func (pic ProtectableItemCollection) hasNextLink() bool { 12434 return pic.NextLink != nil && len(*pic.NextLink) != 0 12435} 12436 12437// protectableItemCollectionPreparer prepares a request to retrieve the next set of results. 12438// It returns nil if no more results exist. 12439func (pic ProtectableItemCollection) protectableItemCollectionPreparer(ctx context.Context) (*http.Request, error) { 12440 if !pic.hasNextLink() { 12441 return nil, nil 12442 } 12443 return autorest.Prepare((&http.Request{}).WithContext(ctx), 12444 autorest.AsJSON(), 12445 autorest.AsGet(), 12446 autorest.WithBaseURL(to.String(pic.NextLink))) 12447} 12448 12449// ProtectableItemCollectionPage contains a page of ProtectableItem values. 12450type ProtectableItemCollectionPage struct { 12451 fn func(context.Context, ProtectableItemCollection) (ProtectableItemCollection, error) 12452 pic ProtectableItemCollection 12453} 12454 12455// NextWithContext advances to the next page of values. If there was an error making 12456// the request the page does not advance and the error is returned. 12457func (page *ProtectableItemCollectionPage) NextWithContext(ctx context.Context) (err error) { 12458 if tracing.IsEnabled() { 12459 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableItemCollectionPage.NextWithContext") 12460 defer func() { 12461 sc := -1 12462 if page.Response().Response.Response != nil { 12463 sc = page.Response().Response.Response.StatusCode 12464 } 12465 tracing.EndSpan(ctx, sc, err) 12466 }() 12467 } 12468 for { 12469 next, err := page.fn(ctx, page.pic) 12470 if err != nil { 12471 return err 12472 } 12473 page.pic = next 12474 if !next.hasNextLink() || !next.IsEmpty() { 12475 break 12476 } 12477 } 12478 return nil 12479} 12480 12481// Next advances to the next page of values. If there was an error making 12482// the request the page does not advance and the error is returned. 12483// Deprecated: Use NextWithContext() instead. 12484func (page *ProtectableItemCollectionPage) Next() error { 12485 return page.NextWithContext(context.Background()) 12486} 12487 12488// NotDone returns true if the page enumeration should be started or is not yet complete. 12489func (page ProtectableItemCollectionPage) NotDone() bool { 12490 return !page.pic.IsEmpty() 12491} 12492 12493// Response returns the raw server response from the last page request. 12494func (page ProtectableItemCollectionPage) Response() ProtectableItemCollection { 12495 return page.pic 12496} 12497 12498// Values returns the slice of values for the current page or nil if there are no values. 12499func (page ProtectableItemCollectionPage) Values() []ProtectableItem { 12500 if page.pic.IsEmpty() { 12501 return nil 12502 } 12503 return *page.pic.Value 12504} 12505 12506// Creates a new instance of the ProtectableItemCollectionPage type. 12507func NewProtectableItemCollectionPage(cur ProtectableItemCollection, getNextPage func(context.Context, ProtectableItemCollection) (ProtectableItemCollection, error)) ProtectableItemCollectionPage { 12508 return ProtectableItemCollectionPage{ 12509 fn: getNextPage, 12510 pic: cur, 12511 } 12512} 12513 12514// ProtectableItemProperties replication protected item custom data details. 12515type ProtectableItemProperties struct { 12516 // FriendlyName - The name. 12517 FriendlyName *string `json:"friendlyName,omitempty"` 12518 // ProtectionStatus - The protection status. 12519 ProtectionStatus *string `json:"protectionStatus,omitempty"` 12520 // ReplicationProtectedItemID - The ARM resource of protected items. 12521 ReplicationProtectedItemID *string `json:"replicationProtectedItemId,omitempty"` 12522 // RecoveryServicesProviderID - The recovery provider ARM Id. 12523 RecoveryServicesProviderID *string `json:"recoveryServicesProviderId,omitempty"` 12524 // ProtectionReadinessErrors - The Current protection readiness errors. 12525 ProtectionReadinessErrors *[]string `json:"protectionReadinessErrors,omitempty"` 12526 // SupportedReplicationProviders - The list of replication providers supported for the protectable item. 12527 SupportedReplicationProviders *[]string `json:"supportedReplicationProviders,omitempty"` 12528 // CustomDetails - The Replication provider custom settings. 12529 CustomDetails BasicConfigurationSettings `json:"customDetails,omitempty"` 12530} 12531 12532// UnmarshalJSON is the custom unmarshaler for ProtectableItemProperties struct. 12533func (pip *ProtectableItemProperties) UnmarshalJSON(body []byte) error { 12534 var m map[string]*json.RawMessage 12535 err := json.Unmarshal(body, &m) 12536 if err != nil { 12537 return err 12538 } 12539 for k, v := range m { 12540 switch k { 12541 case "friendlyName": 12542 if v != nil { 12543 var friendlyName string 12544 err = json.Unmarshal(*v, &friendlyName) 12545 if err != nil { 12546 return err 12547 } 12548 pip.FriendlyName = &friendlyName 12549 } 12550 case "protectionStatus": 12551 if v != nil { 12552 var protectionStatus string 12553 err = json.Unmarshal(*v, &protectionStatus) 12554 if err != nil { 12555 return err 12556 } 12557 pip.ProtectionStatus = &protectionStatus 12558 } 12559 case "replicationProtectedItemId": 12560 if v != nil { 12561 var replicationProtectedItemID string 12562 err = json.Unmarshal(*v, &replicationProtectedItemID) 12563 if err != nil { 12564 return err 12565 } 12566 pip.ReplicationProtectedItemID = &replicationProtectedItemID 12567 } 12568 case "recoveryServicesProviderId": 12569 if v != nil { 12570 var recoveryServicesProviderID string 12571 err = json.Unmarshal(*v, &recoveryServicesProviderID) 12572 if err != nil { 12573 return err 12574 } 12575 pip.RecoveryServicesProviderID = &recoveryServicesProviderID 12576 } 12577 case "protectionReadinessErrors": 12578 if v != nil { 12579 var protectionReadinessErrors []string 12580 err = json.Unmarshal(*v, &protectionReadinessErrors) 12581 if err != nil { 12582 return err 12583 } 12584 pip.ProtectionReadinessErrors = &protectionReadinessErrors 12585 } 12586 case "supportedReplicationProviders": 12587 if v != nil { 12588 var supportedReplicationProviders []string 12589 err = json.Unmarshal(*v, &supportedReplicationProviders) 12590 if err != nil { 12591 return err 12592 } 12593 pip.SupportedReplicationProviders = &supportedReplicationProviders 12594 } 12595 case "customDetails": 12596 if v != nil { 12597 customDetails, err := unmarshalBasicConfigurationSettings(*v) 12598 if err != nil { 12599 return err 12600 } 12601 pip.CustomDetails = customDetails 12602 } 12603 } 12604 } 12605 12606 return nil 12607} 12608 12609// ProtectableItemQueryParameter query parameter to enumerate Protectable items. 12610type ProtectableItemQueryParameter struct { 12611 // State - State of the Protectable item query filter. 12612 State *string `json:"state,omitempty"` 12613} 12614 12615// ProtectedItemsQueryParameter query parameter to enumerate protected items. 12616type ProtectedItemsQueryParameter struct { 12617 // SourceFabricName - The source fabric name filter. 12618 SourceFabricName *string `json:"sourceFabricName,omitempty"` 12619 // RecoveryPlanName - The recovery plan filter. 12620 RecoveryPlanName *string `json:"recoveryPlanName,omitempty"` 12621 // VCenterName - The vCenter name filter. 12622 VCenterName *string `json:"vCenterName,omitempty"` 12623 // InstanceType - The replication provider type. 12624 InstanceType *string `json:"instanceType,omitempty"` 12625 // MultiVMGroupCreateOption - Whether Multi VM group is auto created or specified by user. Possible values include: 'AutoCreated', 'UserSpecified' 12626 MultiVMGroupCreateOption MultiVMGroupCreateOption `json:"multiVmGroupCreateOption,omitempty"` 12627} 12628 12629// ProtectionContainer protection container details. 12630type ProtectionContainer struct { 12631 autorest.Response `json:"-"` 12632 // Properties - The custom data. 12633 Properties *ProtectionContainerProperties `json:"properties,omitempty"` 12634 // ID - READ-ONLY; Resource Id 12635 ID *string `json:"id,omitempty"` 12636 // Name - READ-ONLY; Resource Name 12637 Name *string `json:"name,omitempty"` 12638 // Type - READ-ONLY; Resource Type 12639 Type *string `json:"type,omitempty"` 12640 // Location - Resource Location 12641 Location *string `json:"location,omitempty"` 12642} 12643 12644// MarshalJSON is the custom marshaler for ProtectionContainer. 12645func (pc ProtectionContainer) MarshalJSON() ([]byte, error) { 12646 objectMap := make(map[string]interface{}) 12647 if pc.Properties != nil { 12648 objectMap["properties"] = pc.Properties 12649 } 12650 if pc.Location != nil { 12651 objectMap["location"] = pc.Location 12652 } 12653 return json.Marshal(objectMap) 12654} 12655 12656// ProtectionContainerCollection protection Container collection. 12657type ProtectionContainerCollection struct { 12658 autorest.Response `json:"-"` 12659 // Value - The Protection Container details. 12660 Value *[]ProtectionContainer `json:"value,omitempty"` 12661 // NextLink - The value of next link. 12662 NextLink *string `json:"nextLink,omitempty"` 12663} 12664 12665// ProtectionContainerCollectionIterator provides access to a complete listing of ProtectionContainer 12666// values. 12667type ProtectionContainerCollectionIterator struct { 12668 i int 12669 page ProtectionContainerCollectionPage 12670} 12671 12672// NextWithContext advances to the next value. If there was an error making 12673// the request the iterator does not advance and the error is returned. 12674func (iter *ProtectionContainerCollectionIterator) NextWithContext(ctx context.Context) (err error) { 12675 if tracing.IsEnabled() { 12676 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerCollectionIterator.NextWithContext") 12677 defer func() { 12678 sc := -1 12679 if iter.Response().Response.Response != nil { 12680 sc = iter.Response().Response.Response.StatusCode 12681 } 12682 tracing.EndSpan(ctx, sc, err) 12683 }() 12684 } 12685 iter.i++ 12686 if iter.i < len(iter.page.Values()) { 12687 return nil 12688 } 12689 err = iter.page.NextWithContext(ctx) 12690 if err != nil { 12691 iter.i-- 12692 return err 12693 } 12694 iter.i = 0 12695 return nil 12696} 12697 12698// Next advances to the next value. If there was an error making 12699// the request the iterator does not advance and the error is returned. 12700// Deprecated: Use NextWithContext() instead. 12701func (iter *ProtectionContainerCollectionIterator) Next() error { 12702 return iter.NextWithContext(context.Background()) 12703} 12704 12705// NotDone returns true if the enumeration should be started or is not yet complete. 12706func (iter ProtectionContainerCollectionIterator) NotDone() bool { 12707 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 12708} 12709 12710// Response returns the raw server response from the last page request. 12711func (iter ProtectionContainerCollectionIterator) Response() ProtectionContainerCollection { 12712 return iter.page.Response() 12713} 12714 12715// Value returns the current value or a zero-initialized value if the 12716// iterator has advanced beyond the end of the collection. 12717func (iter ProtectionContainerCollectionIterator) Value() ProtectionContainer { 12718 if !iter.page.NotDone() { 12719 return ProtectionContainer{} 12720 } 12721 return iter.page.Values()[iter.i] 12722} 12723 12724// Creates a new instance of the ProtectionContainerCollectionIterator type. 12725func NewProtectionContainerCollectionIterator(page ProtectionContainerCollectionPage) ProtectionContainerCollectionIterator { 12726 return ProtectionContainerCollectionIterator{page: page} 12727} 12728 12729// IsEmpty returns true if the ListResult contains no values. 12730func (pcc ProtectionContainerCollection) IsEmpty() bool { 12731 return pcc.Value == nil || len(*pcc.Value) == 0 12732} 12733 12734// hasNextLink returns true if the NextLink is not empty. 12735func (pcc ProtectionContainerCollection) hasNextLink() bool { 12736 return pcc.NextLink != nil && len(*pcc.NextLink) != 0 12737} 12738 12739// protectionContainerCollectionPreparer prepares a request to retrieve the next set of results. 12740// It returns nil if no more results exist. 12741func (pcc ProtectionContainerCollection) protectionContainerCollectionPreparer(ctx context.Context) (*http.Request, error) { 12742 if !pcc.hasNextLink() { 12743 return nil, nil 12744 } 12745 return autorest.Prepare((&http.Request{}).WithContext(ctx), 12746 autorest.AsJSON(), 12747 autorest.AsGet(), 12748 autorest.WithBaseURL(to.String(pcc.NextLink))) 12749} 12750 12751// ProtectionContainerCollectionPage contains a page of ProtectionContainer values. 12752type ProtectionContainerCollectionPage struct { 12753 fn func(context.Context, ProtectionContainerCollection) (ProtectionContainerCollection, error) 12754 pcc ProtectionContainerCollection 12755} 12756 12757// NextWithContext advances to the next page of values. If there was an error making 12758// the request the page does not advance and the error is returned. 12759func (page *ProtectionContainerCollectionPage) NextWithContext(ctx context.Context) (err error) { 12760 if tracing.IsEnabled() { 12761 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerCollectionPage.NextWithContext") 12762 defer func() { 12763 sc := -1 12764 if page.Response().Response.Response != nil { 12765 sc = page.Response().Response.Response.StatusCode 12766 } 12767 tracing.EndSpan(ctx, sc, err) 12768 }() 12769 } 12770 for { 12771 next, err := page.fn(ctx, page.pcc) 12772 if err != nil { 12773 return err 12774 } 12775 page.pcc = next 12776 if !next.hasNextLink() || !next.IsEmpty() { 12777 break 12778 } 12779 } 12780 return nil 12781} 12782 12783// Next advances to the next page of values. If there was an error making 12784// the request the page does not advance and the error is returned. 12785// Deprecated: Use NextWithContext() instead. 12786func (page *ProtectionContainerCollectionPage) Next() error { 12787 return page.NextWithContext(context.Background()) 12788} 12789 12790// NotDone returns true if the page enumeration should be started or is not yet complete. 12791func (page ProtectionContainerCollectionPage) NotDone() bool { 12792 return !page.pcc.IsEmpty() 12793} 12794 12795// Response returns the raw server response from the last page request. 12796func (page ProtectionContainerCollectionPage) Response() ProtectionContainerCollection { 12797 return page.pcc 12798} 12799 12800// Values returns the slice of values for the current page or nil if there are no values. 12801func (page ProtectionContainerCollectionPage) Values() []ProtectionContainer { 12802 if page.pcc.IsEmpty() { 12803 return nil 12804 } 12805 return *page.pcc.Value 12806} 12807 12808// Creates a new instance of the ProtectionContainerCollectionPage type. 12809func NewProtectionContainerCollectionPage(cur ProtectionContainerCollection, getNextPage func(context.Context, ProtectionContainerCollection) (ProtectionContainerCollection, error)) ProtectionContainerCollectionPage { 12810 return ProtectionContainerCollectionPage{ 12811 fn: getNextPage, 12812 pcc: cur, 12813 } 12814} 12815 12816// ProtectionContainerFabricSpecificDetails base class for fabric specific details of container. 12817type ProtectionContainerFabricSpecificDetails struct { 12818 // InstanceType - READ-ONLY; Gets the class type. Overridden in derived classes. 12819 InstanceType *string `json:"instanceType,omitempty"` 12820} 12821 12822// MarshalJSON is the custom marshaler for ProtectionContainerFabricSpecificDetails. 12823func (pcfsd ProtectionContainerFabricSpecificDetails) MarshalJSON() ([]byte, error) { 12824 objectMap := make(map[string]interface{}) 12825 return json.Marshal(objectMap) 12826} 12827 12828// ProtectionContainerMapping protection container mapping object. 12829type ProtectionContainerMapping struct { 12830 autorest.Response `json:"-"` 12831 // Properties - The custom data. 12832 Properties *ProtectionContainerMappingProperties `json:"properties,omitempty"` 12833 // ID - READ-ONLY; Resource Id 12834 ID *string `json:"id,omitempty"` 12835 // Name - READ-ONLY; Resource Name 12836 Name *string `json:"name,omitempty"` 12837 // Type - READ-ONLY; Resource Type 12838 Type *string `json:"type,omitempty"` 12839 // Location - Resource Location 12840 Location *string `json:"location,omitempty"` 12841} 12842 12843// MarshalJSON is the custom marshaler for ProtectionContainerMapping. 12844func (pcm ProtectionContainerMapping) MarshalJSON() ([]byte, error) { 12845 objectMap := make(map[string]interface{}) 12846 if pcm.Properties != nil { 12847 objectMap["properties"] = pcm.Properties 12848 } 12849 if pcm.Location != nil { 12850 objectMap["location"] = pcm.Location 12851 } 12852 return json.Marshal(objectMap) 12853} 12854 12855// ProtectionContainerMappingCollection protection container mapping collection class. 12856type ProtectionContainerMappingCollection struct { 12857 autorest.Response `json:"-"` 12858 // Value - List of container mappings. 12859 Value *[]ProtectionContainerMapping `json:"value,omitempty"` 12860 // NextLink - Link to fetch rest of the data. 12861 NextLink *string `json:"nextLink,omitempty"` 12862} 12863 12864// ProtectionContainerMappingCollectionIterator provides access to a complete listing of 12865// ProtectionContainerMapping values. 12866type ProtectionContainerMappingCollectionIterator struct { 12867 i int 12868 page ProtectionContainerMappingCollectionPage 12869} 12870 12871// NextWithContext advances to the next value. If there was an error making 12872// the request the iterator does not advance and the error is returned. 12873func (iter *ProtectionContainerMappingCollectionIterator) NextWithContext(ctx context.Context) (err error) { 12874 if tracing.IsEnabled() { 12875 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerMappingCollectionIterator.NextWithContext") 12876 defer func() { 12877 sc := -1 12878 if iter.Response().Response.Response != nil { 12879 sc = iter.Response().Response.Response.StatusCode 12880 } 12881 tracing.EndSpan(ctx, sc, err) 12882 }() 12883 } 12884 iter.i++ 12885 if iter.i < len(iter.page.Values()) { 12886 return nil 12887 } 12888 err = iter.page.NextWithContext(ctx) 12889 if err != nil { 12890 iter.i-- 12891 return err 12892 } 12893 iter.i = 0 12894 return nil 12895} 12896 12897// Next advances to the next value. If there was an error making 12898// the request the iterator does not advance and the error is returned. 12899// Deprecated: Use NextWithContext() instead. 12900func (iter *ProtectionContainerMappingCollectionIterator) Next() error { 12901 return iter.NextWithContext(context.Background()) 12902} 12903 12904// NotDone returns true if the enumeration should be started or is not yet complete. 12905func (iter ProtectionContainerMappingCollectionIterator) NotDone() bool { 12906 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 12907} 12908 12909// Response returns the raw server response from the last page request. 12910func (iter ProtectionContainerMappingCollectionIterator) Response() ProtectionContainerMappingCollection { 12911 return iter.page.Response() 12912} 12913 12914// Value returns the current value or a zero-initialized value if the 12915// iterator has advanced beyond the end of the collection. 12916func (iter ProtectionContainerMappingCollectionIterator) Value() ProtectionContainerMapping { 12917 if !iter.page.NotDone() { 12918 return ProtectionContainerMapping{} 12919 } 12920 return iter.page.Values()[iter.i] 12921} 12922 12923// Creates a new instance of the ProtectionContainerMappingCollectionIterator type. 12924func NewProtectionContainerMappingCollectionIterator(page ProtectionContainerMappingCollectionPage) ProtectionContainerMappingCollectionIterator { 12925 return ProtectionContainerMappingCollectionIterator{page: page} 12926} 12927 12928// IsEmpty returns true if the ListResult contains no values. 12929func (pcmc ProtectionContainerMappingCollection) IsEmpty() bool { 12930 return pcmc.Value == nil || len(*pcmc.Value) == 0 12931} 12932 12933// hasNextLink returns true if the NextLink is not empty. 12934func (pcmc ProtectionContainerMappingCollection) hasNextLink() bool { 12935 return pcmc.NextLink != nil && len(*pcmc.NextLink) != 0 12936} 12937 12938// protectionContainerMappingCollectionPreparer prepares a request to retrieve the next set of results. 12939// It returns nil if no more results exist. 12940func (pcmc ProtectionContainerMappingCollection) protectionContainerMappingCollectionPreparer(ctx context.Context) (*http.Request, error) { 12941 if !pcmc.hasNextLink() { 12942 return nil, nil 12943 } 12944 return autorest.Prepare((&http.Request{}).WithContext(ctx), 12945 autorest.AsJSON(), 12946 autorest.AsGet(), 12947 autorest.WithBaseURL(to.String(pcmc.NextLink))) 12948} 12949 12950// ProtectionContainerMappingCollectionPage contains a page of ProtectionContainerMapping values. 12951type ProtectionContainerMappingCollectionPage struct { 12952 fn func(context.Context, ProtectionContainerMappingCollection) (ProtectionContainerMappingCollection, error) 12953 pcmc ProtectionContainerMappingCollection 12954} 12955 12956// NextWithContext advances to the next page of values. If there was an error making 12957// the request the page does not advance and the error is returned. 12958func (page *ProtectionContainerMappingCollectionPage) NextWithContext(ctx context.Context) (err error) { 12959 if tracing.IsEnabled() { 12960 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerMappingCollectionPage.NextWithContext") 12961 defer func() { 12962 sc := -1 12963 if page.Response().Response.Response != nil { 12964 sc = page.Response().Response.Response.StatusCode 12965 } 12966 tracing.EndSpan(ctx, sc, err) 12967 }() 12968 } 12969 for { 12970 next, err := page.fn(ctx, page.pcmc) 12971 if err != nil { 12972 return err 12973 } 12974 page.pcmc = next 12975 if !next.hasNextLink() || !next.IsEmpty() { 12976 break 12977 } 12978 } 12979 return nil 12980} 12981 12982// Next advances to the next page of values. If there was an error making 12983// the request the page does not advance and the error is returned. 12984// Deprecated: Use NextWithContext() instead. 12985func (page *ProtectionContainerMappingCollectionPage) Next() error { 12986 return page.NextWithContext(context.Background()) 12987} 12988 12989// NotDone returns true if the page enumeration should be started or is not yet complete. 12990func (page ProtectionContainerMappingCollectionPage) NotDone() bool { 12991 return !page.pcmc.IsEmpty() 12992} 12993 12994// Response returns the raw server response from the last page request. 12995func (page ProtectionContainerMappingCollectionPage) Response() ProtectionContainerMappingCollection { 12996 return page.pcmc 12997} 12998 12999// Values returns the slice of values for the current page or nil if there are no values. 13000func (page ProtectionContainerMappingCollectionPage) Values() []ProtectionContainerMapping { 13001 if page.pcmc.IsEmpty() { 13002 return nil 13003 } 13004 return *page.pcmc.Value 13005} 13006 13007// Creates a new instance of the ProtectionContainerMappingCollectionPage type. 13008func NewProtectionContainerMappingCollectionPage(cur ProtectionContainerMappingCollection, getNextPage func(context.Context, ProtectionContainerMappingCollection) (ProtectionContainerMappingCollection, error)) ProtectionContainerMappingCollectionPage { 13009 return ProtectionContainerMappingCollectionPage{ 13010 fn: getNextPage, 13011 pcmc: cur, 13012 } 13013} 13014 13015// ProtectionContainerMappingProperties protection container mapping properties. 13016type ProtectionContainerMappingProperties struct { 13017 // TargetProtectionContainerID - Paired protection container ARM ID. 13018 TargetProtectionContainerID *string `json:"targetProtectionContainerId,omitempty"` 13019 // TargetProtectionContainerFriendlyName - Friendly name of paired container. 13020 TargetProtectionContainerFriendlyName *string `json:"targetProtectionContainerFriendlyName,omitempty"` 13021 // ProviderSpecificDetails - Provider specific provider details. 13022 ProviderSpecificDetails BasicProtectionContainerMappingProviderSpecificDetails `json:"providerSpecificDetails,omitempty"` 13023 // Health - Health of pairing. 13024 Health *string `json:"health,omitempty"` 13025 // HealthErrorDetails - Health error. 13026 HealthErrorDetails *[]HealthError `json:"healthErrorDetails,omitempty"` 13027 // PolicyID - Policy ARM Id. 13028 PolicyID *string `json:"policyId,omitempty"` 13029 // State - Association Status 13030 State *string `json:"state,omitempty"` 13031 // SourceProtectionContainerFriendlyName - Friendly name of source protection container. 13032 SourceProtectionContainerFriendlyName *string `json:"sourceProtectionContainerFriendlyName,omitempty"` 13033 // SourceFabricFriendlyName - Friendly name of source fabric. 13034 SourceFabricFriendlyName *string `json:"sourceFabricFriendlyName,omitempty"` 13035 // TargetFabricFriendlyName - Friendly name of target fabric. 13036 TargetFabricFriendlyName *string `json:"targetFabricFriendlyName,omitempty"` 13037 // PolicyFriendlyName - Friendly name of replication policy. 13038 PolicyFriendlyName *string `json:"policyFriendlyName,omitempty"` 13039} 13040 13041// UnmarshalJSON is the custom unmarshaler for ProtectionContainerMappingProperties struct. 13042func (pcmp *ProtectionContainerMappingProperties) UnmarshalJSON(body []byte) error { 13043 var m map[string]*json.RawMessage 13044 err := json.Unmarshal(body, &m) 13045 if err != nil { 13046 return err 13047 } 13048 for k, v := range m { 13049 switch k { 13050 case "targetProtectionContainerId": 13051 if v != nil { 13052 var targetProtectionContainerID string 13053 err = json.Unmarshal(*v, &targetProtectionContainerID) 13054 if err != nil { 13055 return err 13056 } 13057 pcmp.TargetProtectionContainerID = &targetProtectionContainerID 13058 } 13059 case "targetProtectionContainerFriendlyName": 13060 if v != nil { 13061 var targetProtectionContainerFriendlyName string 13062 err = json.Unmarshal(*v, &targetProtectionContainerFriendlyName) 13063 if err != nil { 13064 return err 13065 } 13066 pcmp.TargetProtectionContainerFriendlyName = &targetProtectionContainerFriendlyName 13067 } 13068 case "providerSpecificDetails": 13069 if v != nil { 13070 providerSpecificDetails, err := unmarshalBasicProtectionContainerMappingProviderSpecificDetails(*v) 13071 if err != nil { 13072 return err 13073 } 13074 pcmp.ProviderSpecificDetails = providerSpecificDetails 13075 } 13076 case "health": 13077 if v != nil { 13078 var health string 13079 err = json.Unmarshal(*v, &health) 13080 if err != nil { 13081 return err 13082 } 13083 pcmp.Health = &health 13084 } 13085 case "healthErrorDetails": 13086 if v != nil { 13087 var healthErrorDetails []HealthError 13088 err = json.Unmarshal(*v, &healthErrorDetails) 13089 if err != nil { 13090 return err 13091 } 13092 pcmp.HealthErrorDetails = &healthErrorDetails 13093 } 13094 case "policyId": 13095 if v != nil { 13096 var policyID string 13097 err = json.Unmarshal(*v, &policyID) 13098 if err != nil { 13099 return err 13100 } 13101 pcmp.PolicyID = &policyID 13102 } 13103 case "state": 13104 if v != nil { 13105 var state string 13106 err = json.Unmarshal(*v, &state) 13107 if err != nil { 13108 return err 13109 } 13110 pcmp.State = &state 13111 } 13112 case "sourceProtectionContainerFriendlyName": 13113 if v != nil { 13114 var sourceProtectionContainerFriendlyName string 13115 err = json.Unmarshal(*v, &sourceProtectionContainerFriendlyName) 13116 if err != nil { 13117 return err 13118 } 13119 pcmp.SourceProtectionContainerFriendlyName = &sourceProtectionContainerFriendlyName 13120 } 13121 case "sourceFabricFriendlyName": 13122 if v != nil { 13123 var sourceFabricFriendlyName string 13124 err = json.Unmarshal(*v, &sourceFabricFriendlyName) 13125 if err != nil { 13126 return err 13127 } 13128 pcmp.SourceFabricFriendlyName = &sourceFabricFriendlyName 13129 } 13130 case "targetFabricFriendlyName": 13131 if v != nil { 13132 var targetFabricFriendlyName string 13133 err = json.Unmarshal(*v, &targetFabricFriendlyName) 13134 if err != nil { 13135 return err 13136 } 13137 pcmp.TargetFabricFriendlyName = &targetFabricFriendlyName 13138 } 13139 case "policyFriendlyName": 13140 if v != nil { 13141 var policyFriendlyName string 13142 err = json.Unmarshal(*v, &policyFriendlyName) 13143 if err != nil { 13144 return err 13145 } 13146 pcmp.PolicyFriendlyName = &policyFriendlyName 13147 } 13148 } 13149 } 13150 13151 return nil 13152} 13153 13154// BasicProtectionContainerMappingProviderSpecificDetails container mapping provider specific details. 13155type BasicProtectionContainerMappingProviderSpecificDetails interface { 13156 AsA2AProtectionContainerMappingDetails() (*A2AProtectionContainerMappingDetails, bool) 13157 AsVMwareCbtProtectionContainerMappingDetails() (*VMwareCbtProtectionContainerMappingDetails, bool) 13158 AsProtectionContainerMappingProviderSpecificDetails() (*ProtectionContainerMappingProviderSpecificDetails, bool) 13159} 13160 13161// ProtectionContainerMappingProviderSpecificDetails container mapping provider specific details. 13162type ProtectionContainerMappingProviderSpecificDetails struct { 13163 // InstanceType - Possible values include: 'InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeProtectionContainerMappingProviderSpecificDetails', 'InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeVMwareCbt' 13164 InstanceType InstanceTypeBasicProtectionContainerMappingProviderSpecificDetails `json:"instanceType,omitempty"` 13165} 13166 13167func unmarshalBasicProtectionContainerMappingProviderSpecificDetails(body []byte) (BasicProtectionContainerMappingProviderSpecificDetails, error) { 13168 var m map[string]interface{} 13169 err := json.Unmarshal(body, &m) 13170 if err != nil { 13171 return nil, err 13172 } 13173 13174 switch m["instanceType"] { 13175 case string(InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeA2A): 13176 var apcmd A2AProtectionContainerMappingDetails 13177 err := json.Unmarshal(body, &apcmd) 13178 return apcmd, err 13179 case string(InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeVMwareCbt): 13180 var vmcpcmd VMwareCbtProtectionContainerMappingDetails 13181 err := json.Unmarshal(body, &vmcpcmd) 13182 return vmcpcmd, err 13183 default: 13184 var pcmpsd ProtectionContainerMappingProviderSpecificDetails 13185 err := json.Unmarshal(body, &pcmpsd) 13186 return pcmpsd, err 13187 } 13188} 13189func unmarshalBasicProtectionContainerMappingProviderSpecificDetailsArray(body []byte) ([]BasicProtectionContainerMappingProviderSpecificDetails, error) { 13190 var rawMessages []*json.RawMessage 13191 err := json.Unmarshal(body, &rawMessages) 13192 if err != nil { 13193 return nil, err 13194 } 13195 13196 pcmpsdArray := make([]BasicProtectionContainerMappingProviderSpecificDetails, len(rawMessages)) 13197 13198 for index, rawMessage := range rawMessages { 13199 pcmpsd, err := unmarshalBasicProtectionContainerMappingProviderSpecificDetails(*rawMessage) 13200 if err != nil { 13201 return nil, err 13202 } 13203 pcmpsdArray[index] = pcmpsd 13204 } 13205 return pcmpsdArray, nil 13206} 13207 13208// MarshalJSON is the custom marshaler for ProtectionContainerMappingProviderSpecificDetails. 13209func (pcmpsd ProtectionContainerMappingProviderSpecificDetails) MarshalJSON() ([]byte, error) { 13210 pcmpsd.InstanceType = InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeProtectionContainerMappingProviderSpecificDetails 13211 objectMap := make(map[string]interface{}) 13212 if pcmpsd.InstanceType != "" { 13213 objectMap["instanceType"] = pcmpsd.InstanceType 13214 } 13215 return json.Marshal(objectMap) 13216} 13217 13218// AsA2AProtectionContainerMappingDetails is the BasicProtectionContainerMappingProviderSpecificDetails implementation for ProtectionContainerMappingProviderSpecificDetails. 13219func (pcmpsd ProtectionContainerMappingProviderSpecificDetails) AsA2AProtectionContainerMappingDetails() (*A2AProtectionContainerMappingDetails, bool) { 13220 return nil, false 13221} 13222 13223// AsVMwareCbtProtectionContainerMappingDetails is the BasicProtectionContainerMappingProviderSpecificDetails implementation for ProtectionContainerMappingProviderSpecificDetails. 13224func (pcmpsd ProtectionContainerMappingProviderSpecificDetails) AsVMwareCbtProtectionContainerMappingDetails() (*VMwareCbtProtectionContainerMappingDetails, bool) { 13225 return nil, false 13226} 13227 13228// AsProtectionContainerMappingProviderSpecificDetails is the BasicProtectionContainerMappingProviderSpecificDetails implementation for ProtectionContainerMappingProviderSpecificDetails. 13229func (pcmpsd ProtectionContainerMappingProviderSpecificDetails) AsProtectionContainerMappingProviderSpecificDetails() (*ProtectionContainerMappingProviderSpecificDetails, bool) { 13230 return &pcmpsd, true 13231} 13232 13233// AsBasicProtectionContainerMappingProviderSpecificDetails is the BasicProtectionContainerMappingProviderSpecificDetails implementation for ProtectionContainerMappingProviderSpecificDetails. 13234func (pcmpsd ProtectionContainerMappingProviderSpecificDetails) AsBasicProtectionContainerMappingProviderSpecificDetails() (BasicProtectionContainerMappingProviderSpecificDetails, bool) { 13235 return &pcmpsd, true 13236} 13237 13238// ProtectionContainerProperties protection profile custom data details. 13239type ProtectionContainerProperties struct { 13240 // FabricFriendlyName - Fabric friendly name. 13241 FabricFriendlyName *string `json:"fabricFriendlyName,omitempty"` 13242 // FriendlyName - The name. 13243 FriendlyName *string `json:"friendlyName,omitempty"` 13244 // FabricType - The fabric type. 13245 FabricType *string `json:"fabricType,omitempty"` 13246 // ProtectedItemCount - Number of protected PEs 13247 ProtectedItemCount *int32 `json:"protectedItemCount,omitempty"` 13248 // PairingStatus - The pairing status of this cloud. 13249 PairingStatus *string `json:"pairingStatus,omitempty"` 13250 // Role - The role of this cloud. 13251 Role *string `json:"role,omitempty"` 13252 // FabricSpecificDetails - Fabric specific details. 13253 FabricSpecificDetails *ProtectionContainerFabricSpecificDetails `json:"fabricSpecificDetails,omitempty"` 13254} 13255 13256// ProviderError this class contains the error details per object. 13257type ProviderError struct { 13258 // ErrorCode - The Error code. 13259 ErrorCode *int32 `json:"errorCode,omitempty"` 13260 // ErrorMessage - The Error message. 13261 ErrorMessage *string `json:"errorMessage,omitempty"` 13262 // ErrorID - The Provider error Id. 13263 ErrorID *string `json:"errorId,omitempty"` 13264 // PossibleCauses - The possible causes for the error. 13265 PossibleCauses *string `json:"possibleCauses,omitempty"` 13266 // RecommendedAction - The recommended action to resolve the error. 13267 RecommendedAction *string `json:"recommendedAction,omitempty"` 13268} 13269 13270// BasicProviderSpecificFailoverInput provider specific failover input. 13271type BasicProviderSpecificFailoverInput interface { 13272 AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool) 13273 AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool) 13274 AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool) 13275 AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool) 13276 AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool) 13277 AsProviderSpecificFailoverInput() (*ProviderSpecificFailoverInput, bool) 13278} 13279 13280// ProviderSpecificFailoverInput provider specific failover input. 13281type ProviderSpecificFailoverInput struct { 13282 // InstanceType - Possible values include: 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeProviderSpecificFailoverInput', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeA2A', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMage' 13283 InstanceType InstanceTypeBasicProviderSpecificFailoverInput `json:"instanceType,omitempty"` 13284} 13285 13286func unmarshalBasicProviderSpecificFailoverInput(body []byte) (BasicProviderSpecificFailoverInput, error) { 13287 var m map[string]interface{} 13288 err := json.Unmarshal(body, &m) 13289 if err != nil { 13290 return nil, err 13291 } 13292 13293 switch m["instanceType"] { 13294 case string(InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeA2A): 13295 var afpi A2AFailoverProviderInput 13296 err := json.Unmarshal(body, &afpi) 13297 return afpi, err 13298 case string(InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback): 13299 var hvrafpi HyperVReplicaAzureFailbackProviderInput 13300 err := json.Unmarshal(body, &hvrafpi) 13301 return hvrafpi, err 13302 case string(InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure): 13303 var hvrafpi HyperVReplicaAzureFailoverProviderInput 13304 err := json.Unmarshal(body, &hvrafpi) 13305 return hvrafpi, err 13306 case string(InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMageAzureV2): 13307 var imavfpi InMageAzureV2FailoverProviderInput 13308 err := json.Unmarshal(body, &imavfpi) 13309 return imavfpi, err 13310 case string(InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMage): 13311 var imfpi InMageFailoverProviderInput 13312 err := json.Unmarshal(body, &imfpi) 13313 return imfpi, err 13314 default: 13315 var psfi ProviderSpecificFailoverInput 13316 err := json.Unmarshal(body, &psfi) 13317 return psfi, err 13318 } 13319} 13320func unmarshalBasicProviderSpecificFailoverInputArray(body []byte) ([]BasicProviderSpecificFailoverInput, error) { 13321 var rawMessages []*json.RawMessage 13322 err := json.Unmarshal(body, &rawMessages) 13323 if err != nil { 13324 return nil, err 13325 } 13326 13327 psfiArray := make([]BasicProviderSpecificFailoverInput, len(rawMessages)) 13328 13329 for index, rawMessage := range rawMessages { 13330 psfi, err := unmarshalBasicProviderSpecificFailoverInput(*rawMessage) 13331 if err != nil { 13332 return nil, err 13333 } 13334 psfiArray[index] = psfi 13335 } 13336 return psfiArray, nil 13337} 13338 13339// MarshalJSON is the custom marshaler for ProviderSpecificFailoverInput. 13340func (psfi ProviderSpecificFailoverInput) MarshalJSON() ([]byte, error) { 13341 psfi.InstanceType = InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeProviderSpecificFailoverInput 13342 objectMap := make(map[string]interface{}) 13343 if psfi.InstanceType != "" { 13344 objectMap["instanceType"] = psfi.InstanceType 13345 } 13346 return json.Marshal(objectMap) 13347} 13348 13349// AsA2AFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for ProviderSpecificFailoverInput. 13350func (psfi ProviderSpecificFailoverInput) AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool) { 13351 return nil, false 13352} 13353 13354// AsHyperVReplicaAzureFailbackProviderInput is the BasicProviderSpecificFailoverInput implementation for ProviderSpecificFailoverInput. 13355func (psfi ProviderSpecificFailoverInput) AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool) { 13356 return nil, false 13357} 13358 13359// AsHyperVReplicaAzureFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for ProviderSpecificFailoverInput. 13360func (psfi ProviderSpecificFailoverInput) AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool) { 13361 return nil, false 13362} 13363 13364// AsInMageAzureV2FailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for ProviderSpecificFailoverInput. 13365func (psfi ProviderSpecificFailoverInput) AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool) { 13366 return nil, false 13367} 13368 13369// AsInMageFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for ProviderSpecificFailoverInput. 13370func (psfi ProviderSpecificFailoverInput) AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool) { 13371 return nil, false 13372} 13373 13374// AsProviderSpecificFailoverInput is the BasicProviderSpecificFailoverInput implementation for ProviderSpecificFailoverInput. 13375func (psfi ProviderSpecificFailoverInput) AsProviderSpecificFailoverInput() (*ProviderSpecificFailoverInput, bool) { 13376 return &psfi, true 13377} 13378 13379// AsBasicProviderSpecificFailoverInput is the BasicProviderSpecificFailoverInput implementation for ProviderSpecificFailoverInput. 13380func (psfi ProviderSpecificFailoverInput) AsBasicProviderSpecificFailoverInput() (BasicProviderSpecificFailoverInput, bool) { 13381 return &psfi, true 13382} 13383 13384// BasicProviderSpecificRecoveryPointDetails replication provider specific recovery point details. 13385type BasicProviderSpecificRecoveryPointDetails interface { 13386 AsA2ARecoveryPointDetails() (*A2ARecoveryPointDetails, bool) 13387 AsInMageAzureV2RecoveryPointDetails() (*InMageAzureV2RecoveryPointDetails, bool) 13388 AsProviderSpecificRecoveryPointDetails() (*ProviderSpecificRecoveryPointDetails, bool) 13389} 13390 13391// ProviderSpecificRecoveryPointDetails replication provider specific recovery point details. 13392type ProviderSpecificRecoveryPointDetails struct { 13393 // InstanceType - Possible values include: 'InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeProviderSpecificRecoveryPointDetails', 'InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeA2A', 'InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeInMageAzureV2' 13394 InstanceType InstanceTypeBasicProviderSpecificRecoveryPointDetails `json:"instanceType,omitempty"` 13395} 13396 13397func unmarshalBasicProviderSpecificRecoveryPointDetails(body []byte) (BasicProviderSpecificRecoveryPointDetails, error) { 13398 var m map[string]interface{} 13399 err := json.Unmarshal(body, &m) 13400 if err != nil { 13401 return nil, err 13402 } 13403 13404 switch m["instanceType"] { 13405 case string(InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeA2A): 13406 var arpd A2ARecoveryPointDetails 13407 err := json.Unmarshal(body, &arpd) 13408 return arpd, err 13409 case string(InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeInMageAzureV2): 13410 var imavrpd InMageAzureV2RecoveryPointDetails 13411 err := json.Unmarshal(body, &imavrpd) 13412 return imavrpd, err 13413 default: 13414 var psrpd ProviderSpecificRecoveryPointDetails 13415 err := json.Unmarshal(body, &psrpd) 13416 return psrpd, err 13417 } 13418} 13419func unmarshalBasicProviderSpecificRecoveryPointDetailsArray(body []byte) ([]BasicProviderSpecificRecoveryPointDetails, error) { 13420 var rawMessages []*json.RawMessage 13421 err := json.Unmarshal(body, &rawMessages) 13422 if err != nil { 13423 return nil, err 13424 } 13425 13426 psrpdArray := make([]BasicProviderSpecificRecoveryPointDetails, len(rawMessages)) 13427 13428 for index, rawMessage := range rawMessages { 13429 psrpd, err := unmarshalBasicProviderSpecificRecoveryPointDetails(*rawMessage) 13430 if err != nil { 13431 return nil, err 13432 } 13433 psrpdArray[index] = psrpd 13434 } 13435 return psrpdArray, nil 13436} 13437 13438// MarshalJSON is the custom marshaler for ProviderSpecificRecoveryPointDetails. 13439func (psrpd ProviderSpecificRecoveryPointDetails) MarshalJSON() ([]byte, error) { 13440 psrpd.InstanceType = InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeProviderSpecificRecoveryPointDetails 13441 objectMap := make(map[string]interface{}) 13442 if psrpd.InstanceType != "" { 13443 objectMap["instanceType"] = psrpd.InstanceType 13444 } 13445 return json.Marshal(objectMap) 13446} 13447 13448// AsA2ARecoveryPointDetails is the BasicProviderSpecificRecoveryPointDetails implementation for ProviderSpecificRecoveryPointDetails. 13449func (psrpd ProviderSpecificRecoveryPointDetails) AsA2ARecoveryPointDetails() (*A2ARecoveryPointDetails, bool) { 13450 return nil, false 13451} 13452 13453// AsInMageAzureV2RecoveryPointDetails is the BasicProviderSpecificRecoveryPointDetails implementation for ProviderSpecificRecoveryPointDetails. 13454func (psrpd ProviderSpecificRecoveryPointDetails) AsInMageAzureV2RecoveryPointDetails() (*InMageAzureV2RecoveryPointDetails, bool) { 13455 return nil, false 13456} 13457 13458// AsProviderSpecificRecoveryPointDetails is the BasicProviderSpecificRecoveryPointDetails implementation for ProviderSpecificRecoveryPointDetails. 13459func (psrpd ProviderSpecificRecoveryPointDetails) AsProviderSpecificRecoveryPointDetails() (*ProviderSpecificRecoveryPointDetails, bool) { 13460 return &psrpd, true 13461} 13462 13463// AsBasicProviderSpecificRecoveryPointDetails is the BasicProviderSpecificRecoveryPointDetails implementation for ProviderSpecificRecoveryPointDetails. 13464func (psrpd ProviderSpecificRecoveryPointDetails) AsBasicProviderSpecificRecoveryPointDetails() (BasicProviderSpecificRecoveryPointDetails, bool) { 13465 return &psrpd, true 13466} 13467 13468// RcmAzureMigrationPolicyDetails RCM based Azure migration specific policy details. 13469type RcmAzureMigrationPolicyDetails struct { 13470 // RecoveryPointThresholdInMinutes - The recovery point threshold in minutes. 13471 RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"` 13472 // RecoveryPointHistory - The duration in minutes until which the recovery points need to be stored. 13473 RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` 13474 // AppConsistentFrequencyInMinutes - The app consistent snapshot frequency in minutes. 13475 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` 13476 // MultiVMSyncStatus - A value indicating whether multi-VM sync has to be enabled. Possible values include: 'MultiVMSyncStatusEnabled', 'MultiVMSyncStatusDisabled' 13477 MultiVMSyncStatus MultiVMSyncStatus `json:"multiVmSyncStatus,omitempty"` 13478 // CrashConsistentFrequencyInMinutes - The crash consistent snapshot frequency in minutes. 13479 CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"` 13480 // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypePolicyProviderSpecificDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt' 13481 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"` 13482} 13483 13484// MarshalJSON is the custom marshaler for RcmAzureMigrationPolicyDetails. 13485func (rampd RcmAzureMigrationPolicyDetails) MarshalJSON() ([]byte, error) { 13486 rampd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration 13487 objectMap := make(map[string]interface{}) 13488 if rampd.RecoveryPointThresholdInMinutes != nil { 13489 objectMap["recoveryPointThresholdInMinutes"] = rampd.RecoveryPointThresholdInMinutes 13490 } 13491 if rampd.RecoveryPointHistory != nil { 13492 objectMap["recoveryPointHistory"] = rampd.RecoveryPointHistory 13493 } 13494 if rampd.AppConsistentFrequencyInMinutes != nil { 13495 objectMap["appConsistentFrequencyInMinutes"] = rampd.AppConsistentFrequencyInMinutes 13496 } 13497 if rampd.MultiVMSyncStatus != "" { 13498 objectMap["multiVmSyncStatus"] = rampd.MultiVMSyncStatus 13499 } 13500 if rampd.CrashConsistentFrequencyInMinutes != nil { 13501 objectMap["crashConsistentFrequencyInMinutes"] = rampd.CrashConsistentFrequencyInMinutes 13502 } 13503 if rampd.InstanceType != "" { 13504 objectMap["instanceType"] = rampd.InstanceType 13505 } 13506 return json.Marshal(objectMap) 13507} 13508 13509// AsA2APolicyDetails is the BasicPolicyProviderSpecificDetails implementation for RcmAzureMigrationPolicyDetails. 13510func (rampd RcmAzureMigrationPolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) { 13511 return nil, false 13512} 13513 13514// AsHyperVReplicaAzurePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for RcmAzureMigrationPolicyDetails. 13515func (rampd RcmAzureMigrationPolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) { 13516 return nil, false 13517} 13518 13519// AsHyperVReplicaBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for RcmAzureMigrationPolicyDetails. 13520func (rampd RcmAzureMigrationPolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) { 13521 return nil, false 13522} 13523 13524// AsHyperVReplicaBluePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for RcmAzureMigrationPolicyDetails. 13525func (rampd RcmAzureMigrationPolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) { 13526 return nil, false 13527} 13528 13529// AsHyperVReplicaPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for RcmAzureMigrationPolicyDetails. 13530func (rampd RcmAzureMigrationPolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) { 13531 return nil, false 13532} 13533 13534// AsInMageAzureV2PolicyDetails is the BasicPolicyProviderSpecificDetails implementation for RcmAzureMigrationPolicyDetails. 13535func (rampd RcmAzureMigrationPolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) { 13536 return nil, false 13537} 13538 13539// AsInMageBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for RcmAzureMigrationPolicyDetails. 13540func (rampd RcmAzureMigrationPolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) { 13541 return nil, false 13542} 13543 13544// AsInMagePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for RcmAzureMigrationPolicyDetails. 13545func (rampd RcmAzureMigrationPolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) { 13546 return nil, false 13547} 13548 13549// AsRcmAzureMigrationPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for RcmAzureMigrationPolicyDetails. 13550func (rampd RcmAzureMigrationPolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) { 13551 return &rampd, true 13552} 13553 13554// AsVmwareCbtPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for RcmAzureMigrationPolicyDetails. 13555func (rampd RcmAzureMigrationPolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) { 13556 return nil, false 13557} 13558 13559// AsPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for RcmAzureMigrationPolicyDetails. 13560func (rampd RcmAzureMigrationPolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) { 13561 return nil, false 13562} 13563 13564// AsBasicPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for RcmAzureMigrationPolicyDetails. 13565func (rampd RcmAzureMigrationPolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) { 13566 return &rampd, true 13567} 13568 13569// RecoveryPlan recovery plan details. 13570type RecoveryPlan struct { 13571 autorest.Response `json:"-"` 13572 // Properties - The custom details. 13573 Properties *RecoveryPlanProperties `json:"properties,omitempty"` 13574 // ID - READ-ONLY; Resource Id 13575 ID *string `json:"id,omitempty"` 13576 // Name - READ-ONLY; Resource Name 13577 Name *string `json:"name,omitempty"` 13578 // Type - READ-ONLY; Resource Type 13579 Type *string `json:"type,omitempty"` 13580 // Location - Resource Location 13581 Location *string `json:"location,omitempty"` 13582} 13583 13584// MarshalJSON is the custom marshaler for RecoveryPlan. 13585func (rp RecoveryPlan) MarshalJSON() ([]byte, error) { 13586 objectMap := make(map[string]interface{}) 13587 if rp.Properties != nil { 13588 objectMap["properties"] = rp.Properties 13589 } 13590 if rp.Location != nil { 13591 objectMap["location"] = rp.Location 13592 } 13593 return json.Marshal(objectMap) 13594} 13595 13596// RecoveryPlanA2AFailoverInput recovery plan A2A failover input. 13597type RecoveryPlanA2AFailoverInput struct { 13598 // RecoveryPointType - The recovery point type. Possible values include: 'Latest', 'LatestApplicationConsistent', 'LatestCrashConsistent', 'LatestProcessed' 13599 RecoveryPointType A2ARpRecoveryPointType `json:"recoveryPointType,omitempty"` 13600 // CloudServiceCreationOption - A value indicating whether to use recovery cloud service for TFO or not. 13601 CloudServiceCreationOption *string `json:"cloudServiceCreationOption,omitempty"` 13602 // MultiVMSyncPointOption - A value indicating whether multi VM sync enabled VMs should use multi VM sync points for failover. Possible values include: 'UseMultiVMSyncRecoveryPoint', 'UsePerVMRecoveryPoint' 13603 MultiVMSyncPointOption MultiVMSyncPointOption `json:"multiVmSyncPointOption,omitempty"` 13604 // InstanceType - Possible values include: 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeRecoveryPlanProviderSpecificFailoverInput', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeA2A', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMage' 13605 InstanceType InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput `json:"instanceType,omitempty"` 13606} 13607 13608// MarshalJSON is the custom marshaler for RecoveryPlanA2AFailoverInput. 13609func (rpafi RecoveryPlanA2AFailoverInput) MarshalJSON() ([]byte, error) { 13610 rpafi.InstanceType = InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeA2A 13611 objectMap := make(map[string]interface{}) 13612 if rpafi.RecoveryPointType != "" { 13613 objectMap["recoveryPointType"] = rpafi.RecoveryPointType 13614 } 13615 if rpafi.CloudServiceCreationOption != nil { 13616 objectMap["cloudServiceCreationOption"] = rpafi.CloudServiceCreationOption 13617 } 13618 if rpafi.MultiVMSyncPointOption != "" { 13619 objectMap["multiVmSyncPointOption"] = rpafi.MultiVMSyncPointOption 13620 } 13621 if rpafi.InstanceType != "" { 13622 objectMap["instanceType"] = rpafi.InstanceType 13623 } 13624 return json.Marshal(objectMap) 13625} 13626 13627// AsRecoveryPlanA2AFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanA2AFailoverInput. 13628func (rpafi RecoveryPlanA2AFailoverInput) AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) { 13629 return &rpafi, true 13630} 13631 13632// AsRecoveryPlanHyperVReplicaAzureFailbackInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanA2AFailoverInput. 13633func (rpafi RecoveryPlanA2AFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool) { 13634 return nil, false 13635} 13636 13637// AsRecoveryPlanHyperVReplicaAzureFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanA2AFailoverInput. 13638func (rpafi RecoveryPlanA2AFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool) { 13639 return nil, false 13640} 13641 13642// AsRecoveryPlanInMageAzureV2FailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanA2AFailoverInput. 13643func (rpafi RecoveryPlanA2AFailoverInput) AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool) { 13644 return nil, false 13645} 13646 13647// AsRecoveryPlanInMageFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanA2AFailoverInput. 13648func (rpafi RecoveryPlanA2AFailoverInput) AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool) { 13649 return nil, false 13650} 13651 13652// AsRecoveryPlanProviderSpecificFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanA2AFailoverInput. 13653func (rpafi RecoveryPlanA2AFailoverInput) AsRecoveryPlanProviderSpecificFailoverInput() (*RecoveryPlanProviderSpecificFailoverInput, bool) { 13654 return nil, false 13655} 13656 13657// AsBasicRecoveryPlanProviderSpecificFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanA2AFailoverInput. 13658func (rpafi RecoveryPlanA2AFailoverInput) AsBasicRecoveryPlanProviderSpecificFailoverInput() (BasicRecoveryPlanProviderSpecificFailoverInput, bool) { 13659 return &rpafi, true 13660} 13661 13662// RecoveryPlanAction recovery plan action details. 13663type RecoveryPlanAction struct { 13664 // ActionName - The action name. 13665 ActionName *string `json:"actionName,omitempty"` 13666 // FailoverTypes - The list of failover types. 13667 FailoverTypes *[]ReplicationProtectedItemOperation `json:"failoverTypes,omitempty"` 13668 // FailoverDirections - The list of failover directions. 13669 FailoverDirections *[]PossibleOperationsDirections `json:"failoverDirections,omitempty"` 13670 // CustomDetails - The custom details. 13671 CustomDetails BasicRecoveryPlanActionDetails `json:"customDetails,omitempty"` 13672} 13673 13674// UnmarshalJSON is the custom unmarshaler for RecoveryPlanAction struct. 13675func (rpa *RecoveryPlanAction) UnmarshalJSON(body []byte) error { 13676 var m map[string]*json.RawMessage 13677 err := json.Unmarshal(body, &m) 13678 if err != nil { 13679 return err 13680 } 13681 for k, v := range m { 13682 switch k { 13683 case "actionName": 13684 if v != nil { 13685 var actionName string 13686 err = json.Unmarshal(*v, &actionName) 13687 if err != nil { 13688 return err 13689 } 13690 rpa.ActionName = &actionName 13691 } 13692 case "failoverTypes": 13693 if v != nil { 13694 var failoverTypes []ReplicationProtectedItemOperation 13695 err = json.Unmarshal(*v, &failoverTypes) 13696 if err != nil { 13697 return err 13698 } 13699 rpa.FailoverTypes = &failoverTypes 13700 } 13701 case "failoverDirections": 13702 if v != nil { 13703 var failoverDirections []PossibleOperationsDirections 13704 err = json.Unmarshal(*v, &failoverDirections) 13705 if err != nil { 13706 return err 13707 } 13708 rpa.FailoverDirections = &failoverDirections 13709 } 13710 case "customDetails": 13711 if v != nil { 13712 customDetails, err := unmarshalBasicRecoveryPlanActionDetails(*v) 13713 if err != nil { 13714 return err 13715 } 13716 rpa.CustomDetails = customDetails 13717 } 13718 } 13719 } 13720 13721 return nil 13722} 13723 13724// BasicRecoveryPlanActionDetails recovery plan action custom details. 13725type BasicRecoveryPlanActionDetails interface { 13726 AsRecoveryPlanAutomationRunbookActionDetails() (*RecoveryPlanAutomationRunbookActionDetails, bool) 13727 AsRecoveryPlanManualActionDetails() (*RecoveryPlanManualActionDetails, bool) 13728 AsRecoveryPlanScriptActionDetails() (*RecoveryPlanScriptActionDetails, bool) 13729 AsRecoveryPlanActionDetails() (*RecoveryPlanActionDetails, bool) 13730} 13731 13732// RecoveryPlanActionDetails recovery plan action custom details. 13733type RecoveryPlanActionDetails struct { 13734 // InstanceType - Possible values include: 'InstanceTypeRecoveryPlanActionDetails', 'InstanceTypeAutomationRunbookActionDetails', 'InstanceTypeManualActionDetails', 'InstanceTypeScriptActionDetails' 13735 InstanceType InstanceTypeBasicRecoveryPlanActionDetails `json:"instanceType,omitempty"` 13736} 13737 13738func unmarshalBasicRecoveryPlanActionDetails(body []byte) (BasicRecoveryPlanActionDetails, error) { 13739 var m map[string]interface{} 13740 err := json.Unmarshal(body, &m) 13741 if err != nil { 13742 return nil, err 13743 } 13744 13745 switch m["instanceType"] { 13746 case string(InstanceTypeAutomationRunbookActionDetails): 13747 var rparad RecoveryPlanAutomationRunbookActionDetails 13748 err := json.Unmarshal(body, &rparad) 13749 return rparad, err 13750 case string(InstanceTypeManualActionDetails): 13751 var rpmad RecoveryPlanManualActionDetails 13752 err := json.Unmarshal(body, &rpmad) 13753 return rpmad, err 13754 case string(InstanceTypeScriptActionDetails): 13755 var rpsad RecoveryPlanScriptActionDetails 13756 err := json.Unmarshal(body, &rpsad) 13757 return rpsad, err 13758 default: 13759 var rpad RecoveryPlanActionDetails 13760 err := json.Unmarshal(body, &rpad) 13761 return rpad, err 13762 } 13763} 13764func unmarshalBasicRecoveryPlanActionDetailsArray(body []byte) ([]BasicRecoveryPlanActionDetails, error) { 13765 var rawMessages []*json.RawMessage 13766 err := json.Unmarshal(body, &rawMessages) 13767 if err != nil { 13768 return nil, err 13769 } 13770 13771 rpadArray := make([]BasicRecoveryPlanActionDetails, len(rawMessages)) 13772 13773 for index, rawMessage := range rawMessages { 13774 rpad, err := unmarshalBasicRecoveryPlanActionDetails(*rawMessage) 13775 if err != nil { 13776 return nil, err 13777 } 13778 rpadArray[index] = rpad 13779 } 13780 return rpadArray, nil 13781} 13782 13783// MarshalJSON is the custom marshaler for RecoveryPlanActionDetails. 13784func (rpad RecoveryPlanActionDetails) MarshalJSON() ([]byte, error) { 13785 rpad.InstanceType = InstanceTypeRecoveryPlanActionDetails 13786 objectMap := make(map[string]interface{}) 13787 if rpad.InstanceType != "" { 13788 objectMap["instanceType"] = rpad.InstanceType 13789 } 13790 return json.Marshal(objectMap) 13791} 13792 13793// AsRecoveryPlanAutomationRunbookActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanActionDetails. 13794func (rpad RecoveryPlanActionDetails) AsRecoveryPlanAutomationRunbookActionDetails() (*RecoveryPlanAutomationRunbookActionDetails, bool) { 13795 return nil, false 13796} 13797 13798// AsRecoveryPlanManualActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanActionDetails. 13799func (rpad RecoveryPlanActionDetails) AsRecoveryPlanManualActionDetails() (*RecoveryPlanManualActionDetails, bool) { 13800 return nil, false 13801} 13802 13803// AsRecoveryPlanScriptActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanActionDetails. 13804func (rpad RecoveryPlanActionDetails) AsRecoveryPlanScriptActionDetails() (*RecoveryPlanScriptActionDetails, bool) { 13805 return nil, false 13806} 13807 13808// AsRecoveryPlanActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanActionDetails. 13809func (rpad RecoveryPlanActionDetails) AsRecoveryPlanActionDetails() (*RecoveryPlanActionDetails, bool) { 13810 return &rpad, true 13811} 13812 13813// AsBasicRecoveryPlanActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanActionDetails. 13814func (rpad RecoveryPlanActionDetails) AsBasicRecoveryPlanActionDetails() (BasicRecoveryPlanActionDetails, bool) { 13815 return &rpad, true 13816} 13817 13818// RecoveryPlanAutomationRunbookActionDetails recovery plan Automation runbook action details. 13819type RecoveryPlanAutomationRunbookActionDetails struct { 13820 // RunbookID - The runbook ARM Id. 13821 RunbookID *string `json:"runbookId,omitempty"` 13822 // Timeout - The runbook timeout. 13823 Timeout *string `json:"timeout,omitempty"` 13824 // FabricLocation - The fabric location. Possible values include: 'Primary', 'Recovery' 13825 FabricLocation RecoveryPlanActionLocation `json:"fabricLocation,omitempty"` 13826 // InstanceType - Possible values include: 'InstanceTypeRecoveryPlanActionDetails', 'InstanceTypeAutomationRunbookActionDetails', 'InstanceTypeManualActionDetails', 'InstanceTypeScriptActionDetails' 13827 InstanceType InstanceTypeBasicRecoveryPlanActionDetails `json:"instanceType,omitempty"` 13828} 13829 13830// MarshalJSON is the custom marshaler for RecoveryPlanAutomationRunbookActionDetails. 13831func (rparad RecoveryPlanAutomationRunbookActionDetails) MarshalJSON() ([]byte, error) { 13832 rparad.InstanceType = InstanceTypeAutomationRunbookActionDetails 13833 objectMap := make(map[string]interface{}) 13834 if rparad.RunbookID != nil { 13835 objectMap["runbookId"] = rparad.RunbookID 13836 } 13837 if rparad.Timeout != nil { 13838 objectMap["timeout"] = rparad.Timeout 13839 } 13840 if rparad.FabricLocation != "" { 13841 objectMap["fabricLocation"] = rparad.FabricLocation 13842 } 13843 if rparad.InstanceType != "" { 13844 objectMap["instanceType"] = rparad.InstanceType 13845 } 13846 return json.Marshal(objectMap) 13847} 13848 13849// AsRecoveryPlanAutomationRunbookActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanAutomationRunbookActionDetails. 13850func (rparad RecoveryPlanAutomationRunbookActionDetails) AsRecoveryPlanAutomationRunbookActionDetails() (*RecoveryPlanAutomationRunbookActionDetails, bool) { 13851 return &rparad, true 13852} 13853 13854// AsRecoveryPlanManualActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanAutomationRunbookActionDetails. 13855func (rparad RecoveryPlanAutomationRunbookActionDetails) AsRecoveryPlanManualActionDetails() (*RecoveryPlanManualActionDetails, bool) { 13856 return nil, false 13857} 13858 13859// AsRecoveryPlanScriptActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanAutomationRunbookActionDetails. 13860func (rparad RecoveryPlanAutomationRunbookActionDetails) AsRecoveryPlanScriptActionDetails() (*RecoveryPlanScriptActionDetails, bool) { 13861 return nil, false 13862} 13863 13864// AsRecoveryPlanActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanAutomationRunbookActionDetails. 13865func (rparad RecoveryPlanAutomationRunbookActionDetails) AsRecoveryPlanActionDetails() (*RecoveryPlanActionDetails, bool) { 13866 return nil, false 13867} 13868 13869// AsBasicRecoveryPlanActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanAutomationRunbookActionDetails. 13870func (rparad RecoveryPlanAutomationRunbookActionDetails) AsBasicRecoveryPlanActionDetails() (BasicRecoveryPlanActionDetails, bool) { 13871 return &rparad, true 13872} 13873 13874// RecoveryPlanCollection recovery plan collection details. 13875type RecoveryPlanCollection struct { 13876 autorest.Response `json:"-"` 13877 // Value - The list of recovery plans. 13878 Value *[]RecoveryPlan `json:"value,omitempty"` 13879 // NextLink - The value of next link. 13880 NextLink *string `json:"nextLink,omitempty"` 13881} 13882 13883// RecoveryPlanCollectionIterator provides access to a complete listing of RecoveryPlan values. 13884type RecoveryPlanCollectionIterator struct { 13885 i int 13886 page RecoveryPlanCollectionPage 13887} 13888 13889// NextWithContext advances to the next value. If there was an error making 13890// the request the iterator does not advance and the error is returned. 13891func (iter *RecoveryPlanCollectionIterator) NextWithContext(ctx context.Context) (err error) { 13892 if tracing.IsEnabled() { 13893 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPlanCollectionIterator.NextWithContext") 13894 defer func() { 13895 sc := -1 13896 if iter.Response().Response.Response != nil { 13897 sc = iter.Response().Response.Response.StatusCode 13898 } 13899 tracing.EndSpan(ctx, sc, err) 13900 }() 13901 } 13902 iter.i++ 13903 if iter.i < len(iter.page.Values()) { 13904 return nil 13905 } 13906 err = iter.page.NextWithContext(ctx) 13907 if err != nil { 13908 iter.i-- 13909 return err 13910 } 13911 iter.i = 0 13912 return nil 13913} 13914 13915// Next advances to the next value. If there was an error making 13916// the request the iterator does not advance and the error is returned. 13917// Deprecated: Use NextWithContext() instead. 13918func (iter *RecoveryPlanCollectionIterator) Next() error { 13919 return iter.NextWithContext(context.Background()) 13920} 13921 13922// NotDone returns true if the enumeration should be started or is not yet complete. 13923func (iter RecoveryPlanCollectionIterator) NotDone() bool { 13924 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 13925} 13926 13927// Response returns the raw server response from the last page request. 13928func (iter RecoveryPlanCollectionIterator) Response() RecoveryPlanCollection { 13929 return iter.page.Response() 13930} 13931 13932// Value returns the current value or a zero-initialized value if the 13933// iterator has advanced beyond the end of the collection. 13934func (iter RecoveryPlanCollectionIterator) Value() RecoveryPlan { 13935 if !iter.page.NotDone() { 13936 return RecoveryPlan{} 13937 } 13938 return iter.page.Values()[iter.i] 13939} 13940 13941// Creates a new instance of the RecoveryPlanCollectionIterator type. 13942func NewRecoveryPlanCollectionIterator(page RecoveryPlanCollectionPage) RecoveryPlanCollectionIterator { 13943 return RecoveryPlanCollectionIterator{page: page} 13944} 13945 13946// IsEmpty returns true if the ListResult contains no values. 13947func (RPCVar RecoveryPlanCollection) IsEmpty() bool { 13948 return RPCVar.Value == nil || len(*RPCVar.Value) == 0 13949} 13950 13951// hasNextLink returns true if the NextLink is not empty. 13952func (RPCVar RecoveryPlanCollection) hasNextLink() bool { 13953 return RPCVar.NextLink != nil && len(*RPCVar.NextLink) != 0 13954} 13955 13956// recoveryPlanCollectionPreparer prepares a request to retrieve the next set of results. 13957// It returns nil if no more results exist. 13958func (RPCVar RecoveryPlanCollection) recoveryPlanCollectionPreparer(ctx context.Context) (*http.Request, error) { 13959 if !RPCVar.hasNextLink() { 13960 return nil, nil 13961 } 13962 return autorest.Prepare((&http.Request{}).WithContext(ctx), 13963 autorest.AsJSON(), 13964 autorest.AsGet(), 13965 autorest.WithBaseURL(to.String(RPCVar.NextLink))) 13966} 13967 13968// RecoveryPlanCollectionPage contains a page of RecoveryPlan values. 13969type RecoveryPlanCollectionPage struct { 13970 fn func(context.Context, RecoveryPlanCollection) (RecoveryPlanCollection, error) 13971 RPCVar RecoveryPlanCollection 13972} 13973 13974// NextWithContext advances to the next page of values. If there was an error making 13975// the request the page does not advance and the error is returned. 13976func (page *RecoveryPlanCollectionPage) NextWithContext(ctx context.Context) (err error) { 13977 if tracing.IsEnabled() { 13978 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPlanCollectionPage.NextWithContext") 13979 defer func() { 13980 sc := -1 13981 if page.Response().Response.Response != nil { 13982 sc = page.Response().Response.Response.StatusCode 13983 } 13984 tracing.EndSpan(ctx, sc, err) 13985 }() 13986 } 13987 for { 13988 next, err := page.fn(ctx, page.RPCVar) 13989 if err != nil { 13990 return err 13991 } 13992 page.RPCVar = next 13993 if !next.hasNextLink() || !next.IsEmpty() { 13994 break 13995 } 13996 } 13997 return nil 13998} 13999 14000// Next advances to the next page of values. If there was an error making 14001// the request the page does not advance and the error is returned. 14002// Deprecated: Use NextWithContext() instead. 14003func (page *RecoveryPlanCollectionPage) Next() error { 14004 return page.NextWithContext(context.Background()) 14005} 14006 14007// NotDone returns true if the page enumeration should be started or is not yet complete. 14008func (page RecoveryPlanCollectionPage) NotDone() bool { 14009 return !page.RPCVar.IsEmpty() 14010} 14011 14012// Response returns the raw server response from the last page request. 14013func (page RecoveryPlanCollectionPage) Response() RecoveryPlanCollection { 14014 return page.RPCVar 14015} 14016 14017// Values returns the slice of values for the current page or nil if there are no values. 14018func (page RecoveryPlanCollectionPage) Values() []RecoveryPlan { 14019 if page.RPCVar.IsEmpty() { 14020 return nil 14021 } 14022 return *page.RPCVar.Value 14023} 14024 14025// Creates a new instance of the RecoveryPlanCollectionPage type. 14026func NewRecoveryPlanCollectionPage(cur RecoveryPlanCollection, getNextPage func(context.Context, RecoveryPlanCollection) (RecoveryPlanCollection, error)) RecoveryPlanCollectionPage { 14027 return RecoveryPlanCollectionPage{ 14028 fn: getNextPage, 14029 RPCVar: cur, 14030 } 14031} 14032 14033// RecoveryPlanGroup recovery plan group details. 14034type RecoveryPlanGroup struct { 14035 // GroupType - The group type. Possible values include: 'Shutdown', 'Boot', 'Failover' 14036 GroupType RecoveryPlanGroupType `json:"groupType,omitempty"` 14037 // ReplicationProtectedItems - The list of protected items. 14038 ReplicationProtectedItems *[]RecoveryPlanProtectedItem `json:"replicationProtectedItems,omitempty"` 14039 // StartGroupActions - The start group actions. 14040 StartGroupActions *[]RecoveryPlanAction `json:"startGroupActions,omitempty"` 14041 // EndGroupActions - The end group actions. 14042 EndGroupActions *[]RecoveryPlanAction `json:"endGroupActions,omitempty"` 14043} 14044 14045// RecoveryPlanGroupTaskDetails this class represents the recovery plan group task. 14046type RecoveryPlanGroupTaskDetails struct { 14047 // Name - The name. 14048 Name *string `json:"name,omitempty"` 14049 // GroupID - The group identifier. 14050 GroupID *string `json:"groupId,omitempty"` 14051 // RpGroupType - The group type. 14052 RpGroupType *string `json:"rpGroupType,omitempty"` 14053 // ChildTasks - The child tasks. 14054 ChildTasks *[]ASRTask `json:"childTasks,omitempty"` 14055 // InstanceType - Possible values include: 'InstanceTypeGroupTaskDetails', 'InstanceTypeInlineWorkflowTaskDetails', 'InstanceTypeRecoveryPlanGroupTaskDetails', 'InstanceTypeRecoveryPlanShutdownGroupTaskDetails' 14056 InstanceType InstanceTypeBasicGroupTaskDetails `json:"instanceType,omitempty"` 14057} 14058 14059// MarshalJSON is the custom marshaler for RecoveryPlanGroupTaskDetails. 14060func (rpgtd RecoveryPlanGroupTaskDetails) MarshalJSON() ([]byte, error) { 14061 rpgtd.InstanceType = InstanceTypeRecoveryPlanGroupTaskDetails 14062 objectMap := make(map[string]interface{}) 14063 if rpgtd.Name != nil { 14064 objectMap["name"] = rpgtd.Name 14065 } 14066 if rpgtd.GroupID != nil { 14067 objectMap["groupId"] = rpgtd.GroupID 14068 } 14069 if rpgtd.RpGroupType != nil { 14070 objectMap["rpGroupType"] = rpgtd.RpGroupType 14071 } 14072 if rpgtd.ChildTasks != nil { 14073 objectMap["childTasks"] = rpgtd.ChildTasks 14074 } 14075 if rpgtd.InstanceType != "" { 14076 objectMap["instanceType"] = rpgtd.InstanceType 14077 } 14078 return json.Marshal(objectMap) 14079} 14080 14081// AsInlineWorkflowTaskDetails is the BasicGroupTaskDetails implementation for RecoveryPlanGroupTaskDetails. 14082func (rpgtd RecoveryPlanGroupTaskDetails) AsInlineWorkflowTaskDetails() (*InlineWorkflowTaskDetails, bool) { 14083 return nil, false 14084} 14085 14086// AsRecoveryPlanGroupTaskDetails is the BasicGroupTaskDetails implementation for RecoveryPlanGroupTaskDetails. 14087func (rpgtd RecoveryPlanGroupTaskDetails) AsRecoveryPlanGroupTaskDetails() (*RecoveryPlanGroupTaskDetails, bool) { 14088 return &rpgtd, true 14089} 14090 14091// AsRecoveryPlanShutdownGroupTaskDetails is the BasicGroupTaskDetails implementation for RecoveryPlanGroupTaskDetails. 14092func (rpgtd RecoveryPlanGroupTaskDetails) AsRecoveryPlanShutdownGroupTaskDetails() (*RecoveryPlanShutdownGroupTaskDetails, bool) { 14093 return nil, false 14094} 14095 14096// AsGroupTaskDetails is the BasicGroupTaskDetails implementation for RecoveryPlanGroupTaskDetails. 14097func (rpgtd RecoveryPlanGroupTaskDetails) AsGroupTaskDetails() (*GroupTaskDetails, bool) { 14098 return nil, false 14099} 14100 14101// AsBasicGroupTaskDetails is the BasicGroupTaskDetails implementation for RecoveryPlanGroupTaskDetails. 14102func (rpgtd RecoveryPlanGroupTaskDetails) AsBasicGroupTaskDetails() (BasicGroupTaskDetails, bool) { 14103 return &rpgtd, true 14104} 14105 14106// RecoveryPlanHyperVReplicaAzureFailbackInput recovery plan HVR Azure failback input. 14107type RecoveryPlanHyperVReplicaAzureFailbackInput struct { 14108 // DataSyncOption - The data sync option. Possible values include: 'ForDownTime', 'ForSynchronization' 14109 DataSyncOption DataSyncStatus `json:"dataSyncOption,omitempty"` 14110 // RecoveryVMCreationOption - The ALR option. Possible values include: 'CreateVMIfNotFound', 'NoAction' 14111 RecoveryVMCreationOption AlternateLocationRecoveryOption `json:"recoveryVmCreationOption,omitempty"` 14112 // InstanceType - Possible values include: 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeRecoveryPlanProviderSpecificFailoverInput', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeA2A', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMage' 14113 InstanceType InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput `json:"instanceType,omitempty"` 14114} 14115 14116// MarshalJSON is the custom marshaler for RecoveryPlanHyperVReplicaAzureFailbackInput. 14117func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) MarshalJSON() ([]byte, error) { 14118 rphvrafi.InstanceType = InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback 14119 objectMap := make(map[string]interface{}) 14120 if rphvrafi.DataSyncOption != "" { 14121 objectMap["dataSyncOption"] = rphvrafi.DataSyncOption 14122 } 14123 if rphvrafi.RecoveryVMCreationOption != "" { 14124 objectMap["recoveryVmCreationOption"] = rphvrafi.RecoveryVMCreationOption 14125 } 14126 if rphvrafi.InstanceType != "" { 14127 objectMap["instanceType"] = rphvrafi.InstanceType 14128 } 14129 return json.Marshal(objectMap) 14130} 14131 14132// AsRecoveryPlanA2AFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailbackInput. 14133func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) { 14134 return nil, false 14135} 14136 14137// AsRecoveryPlanHyperVReplicaAzureFailbackInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailbackInput. 14138func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool) { 14139 return &rphvrafi, true 14140} 14141 14142// AsRecoveryPlanHyperVReplicaAzureFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailbackInput. 14143func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool) { 14144 return nil, false 14145} 14146 14147// AsRecoveryPlanInMageAzureV2FailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailbackInput. 14148func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool) { 14149 return nil, false 14150} 14151 14152// AsRecoveryPlanInMageFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailbackInput. 14153func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool) { 14154 return nil, false 14155} 14156 14157// AsRecoveryPlanProviderSpecificFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailbackInput. 14158func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsRecoveryPlanProviderSpecificFailoverInput() (*RecoveryPlanProviderSpecificFailoverInput, bool) { 14159 return nil, false 14160} 14161 14162// AsBasicRecoveryPlanProviderSpecificFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailbackInput. 14163func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsBasicRecoveryPlanProviderSpecificFailoverInput() (BasicRecoveryPlanProviderSpecificFailoverInput, bool) { 14164 return &rphvrafi, true 14165} 14166 14167// RecoveryPlanHyperVReplicaAzureFailoverInput recovery plan HVR Azure failover input. 14168type RecoveryPlanHyperVReplicaAzureFailoverInput struct { 14169 // VaultLocation - The vault location. 14170 VaultLocation *string `json:"vaultLocation,omitempty"` 14171 // PrimaryKekCertificatePfx - The primary KEK certificate PFX. 14172 PrimaryKekCertificatePfx *string `json:"primaryKekCertificatePfx,omitempty"` 14173 // SecondaryKekCertificatePfx - The secondary KEK certificate PFX. 14174 SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` 14175 // RecoveryPointType - The recovery point type. Possible values include: 'HyperVReplicaAzureRpRecoveryPointTypeLatest', 'HyperVReplicaAzureRpRecoveryPointTypeLatestApplicationConsistent', 'HyperVReplicaAzureRpRecoveryPointTypeLatestProcessed' 14176 RecoveryPointType HyperVReplicaAzureRpRecoveryPointType `json:"recoveryPointType,omitempty"` 14177 // InstanceType - Possible values include: 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeRecoveryPlanProviderSpecificFailoverInput', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeA2A', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMage' 14178 InstanceType InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput `json:"instanceType,omitempty"` 14179} 14180 14181// MarshalJSON is the custom marshaler for RecoveryPlanHyperVReplicaAzureFailoverInput. 14182func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) MarshalJSON() ([]byte, error) { 14183 rphvrafi.InstanceType = InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure 14184 objectMap := make(map[string]interface{}) 14185 if rphvrafi.VaultLocation != nil { 14186 objectMap["vaultLocation"] = rphvrafi.VaultLocation 14187 } 14188 if rphvrafi.PrimaryKekCertificatePfx != nil { 14189 objectMap["primaryKekCertificatePfx"] = rphvrafi.PrimaryKekCertificatePfx 14190 } 14191 if rphvrafi.SecondaryKekCertificatePfx != nil { 14192 objectMap["secondaryKekCertificatePfx"] = rphvrafi.SecondaryKekCertificatePfx 14193 } 14194 if rphvrafi.RecoveryPointType != "" { 14195 objectMap["recoveryPointType"] = rphvrafi.RecoveryPointType 14196 } 14197 if rphvrafi.InstanceType != "" { 14198 objectMap["instanceType"] = rphvrafi.InstanceType 14199 } 14200 return json.Marshal(objectMap) 14201} 14202 14203// AsRecoveryPlanA2AFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailoverInput. 14204func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) { 14205 return nil, false 14206} 14207 14208// AsRecoveryPlanHyperVReplicaAzureFailbackInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailoverInput. 14209func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool) { 14210 return nil, false 14211} 14212 14213// AsRecoveryPlanHyperVReplicaAzureFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailoverInput. 14214func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool) { 14215 return &rphvrafi, true 14216} 14217 14218// AsRecoveryPlanInMageAzureV2FailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailoverInput. 14219func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool) { 14220 return nil, false 14221} 14222 14223// AsRecoveryPlanInMageFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailoverInput. 14224func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool) { 14225 return nil, false 14226} 14227 14228// AsRecoveryPlanProviderSpecificFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailoverInput. 14229func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsRecoveryPlanProviderSpecificFailoverInput() (*RecoveryPlanProviderSpecificFailoverInput, bool) { 14230 return nil, false 14231} 14232 14233// AsBasicRecoveryPlanProviderSpecificFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailoverInput. 14234func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsBasicRecoveryPlanProviderSpecificFailoverInput() (BasicRecoveryPlanProviderSpecificFailoverInput, bool) { 14235 return &rphvrafi, true 14236} 14237 14238// RecoveryPlanInMageAzureV2FailoverInput recovery plan InMageAzureV2 failover input. 14239type RecoveryPlanInMageAzureV2FailoverInput struct { 14240 // VaultLocation - The vault location. 14241 VaultLocation *string `json:"vaultLocation,omitempty"` 14242 // RecoveryPointType - The recovery point type. Possible values include: 'InMageV2RpRecoveryPointTypeLatest', 'InMageV2RpRecoveryPointTypeLatestApplicationConsistent', 'InMageV2RpRecoveryPointTypeLatestCrashConsistent', 'InMageV2RpRecoveryPointTypeLatestProcessed' 14243 RecoveryPointType InMageV2RpRecoveryPointType `json:"recoveryPointType,omitempty"` 14244 // UseMultiVMSyncPoint - A value indicating whether multi VM sync enabled VMs should use multi VM sync points for failover. 14245 UseMultiVMSyncPoint *string `json:"useMultiVmSyncPoint,omitempty"` 14246 // InstanceType - Possible values include: 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeRecoveryPlanProviderSpecificFailoverInput', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeA2A', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMage' 14247 InstanceType InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput `json:"instanceType,omitempty"` 14248} 14249 14250// MarshalJSON is the custom marshaler for RecoveryPlanInMageAzureV2FailoverInput. 14251func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) MarshalJSON() ([]byte, error) { 14252 rpimavfi.InstanceType = InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMageAzureV2 14253 objectMap := make(map[string]interface{}) 14254 if rpimavfi.VaultLocation != nil { 14255 objectMap["vaultLocation"] = rpimavfi.VaultLocation 14256 } 14257 if rpimavfi.RecoveryPointType != "" { 14258 objectMap["recoveryPointType"] = rpimavfi.RecoveryPointType 14259 } 14260 if rpimavfi.UseMultiVMSyncPoint != nil { 14261 objectMap["useMultiVmSyncPoint"] = rpimavfi.UseMultiVMSyncPoint 14262 } 14263 if rpimavfi.InstanceType != "" { 14264 objectMap["instanceType"] = rpimavfi.InstanceType 14265 } 14266 return json.Marshal(objectMap) 14267} 14268 14269// AsRecoveryPlanA2AFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageAzureV2FailoverInput. 14270func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) { 14271 return nil, false 14272} 14273 14274// AsRecoveryPlanHyperVReplicaAzureFailbackInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageAzureV2FailoverInput. 14275func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool) { 14276 return nil, false 14277} 14278 14279// AsRecoveryPlanHyperVReplicaAzureFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageAzureV2FailoverInput. 14280func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool) { 14281 return nil, false 14282} 14283 14284// AsRecoveryPlanInMageAzureV2FailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageAzureV2FailoverInput. 14285func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool) { 14286 return &rpimavfi, true 14287} 14288 14289// AsRecoveryPlanInMageFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageAzureV2FailoverInput. 14290func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool) { 14291 return nil, false 14292} 14293 14294// AsRecoveryPlanProviderSpecificFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageAzureV2FailoverInput. 14295func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsRecoveryPlanProviderSpecificFailoverInput() (*RecoveryPlanProviderSpecificFailoverInput, bool) { 14296 return nil, false 14297} 14298 14299// AsBasicRecoveryPlanProviderSpecificFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageAzureV2FailoverInput. 14300func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsBasicRecoveryPlanProviderSpecificFailoverInput() (BasicRecoveryPlanProviderSpecificFailoverInput, bool) { 14301 return &rpimavfi, true 14302} 14303 14304// RecoveryPlanInMageFailoverInput recovery plan InMage failover input. 14305type RecoveryPlanInMageFailoverInput struct { 14306 // RecoveryPointType - The recovery point type. Possible values include: 'RpInMageRecoveryPointTypeLatestTime', 'RpInMageRecoveryPointTypeLatestTag', 'RpInMageRecoveryPointTypeCustom' 14307 RecoveryPointType RpInMageRecoveryPointType `json:"recoveryPointType,omitempty"` 14308 // InstanceType - Possible values include: 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeRecoveryPlanProviderSpecificFailoverInput', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeA2A', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMage' 14309 InstanceType InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput `json:"instanceType,omitempty"` 14310} 14311 14312// MarshalJSON is the custom marshaler for RecoveryPlanInMageFailoverInput. 14313func (rpimfi RecoveryPlanInMageFailoverInput) MarshalJSON() ([]byte, error) { 14314 rpimfi.InstanceType = InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMage 14315 objectMap := make(map[string]interface{}) 14316 if rpimfi.RecoveryPointType != "" { 14317 objectMap["recoveryPointType"] = rpimfi.RecoveryPointType 14318 } 14319 if rpimfi.InstanceType != "" { 14320 objectMap["instanceType"] = rpimfi.InstanceType 14321 } 14322 return json.Marshal(objectMap) 14323} 14324 14325// AsRecoveryPlanA2AFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageFailoverInput. 14326func (rpimfi RecoveryPlanInMageFailoverInput) AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) { 14327 return nil, false 14328} 14329 14330// AsRecoveryPlanHyperVReplicaAzureFailbackInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageFailoverInput. 14331func (rpimfi RecoveryPlanInMageFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool) { 14332 return nil, false 14333} 14334 14335// AsRecoveryPlanHyperVReplicaAzureFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageFailoverInput. 14336func (rpimfi RecoveryPlanInMageFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool) { 14337 return nil, false 14338} 14339 14340// AsRecoveryPlanInMageAzureV2FailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageFailoverInput. 14341func (rpimfi RecoveryPlanInMageFailoverInput) AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool) { 14342 return nil, false 14343} 14344 14345// AsRecoveryPlanInMageFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageFailoverInput. 14346func (rpimfi RecoveryPlanInMageFailoverInput) AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool) { 14347 return &rpimfi, true 14348} 14349 14350// AsRecoveryPlanProviderSpecificFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageFailoverInput. 14351func (rpimfi RecoveryPlanInMageFailoverInput) AsRecoveryPlanProviderSpecificFailoverInput() (*RecoveryPlanProviderSpecificFailoverInput, bool) { 14352 return nil, false 14353} 14354 14355// AsBasicRecoveryPlanProviderSpecificFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageFailoverInput. 14356func (rpimfi RecoveryPlanInMageFailoverInput) AsBasicRecoveryPlanProviderSpecificFailoverInput() (BasicRecoveryPlanProviderSpecificFailoverInput, bool) { 14357 return &rpimfi, true 14358} 14359 14360// RecoveryPlanManualActionDetails recovery plan manual action details. 14361type RecoveryPlanManualActionDetails struct { 14362 // Description - The manual action description. 14363 Description *string `json:"description,omitempty"` 14364 // InstanceType - Possible values include: 'InstanceTypeRecoveryPlanActionDetails', 'InstanceTypeAutomationRunbookActionDetails', 'InstanceTypeManualActionDetails', 'InstanceTypeScriptActionDetails' 14365 InstanceType InstanceTypeBasicRecoveryPlanActionDetails `json:"instanceType,omitempty"` 14366} 14367 14368// MarshalJSON is the custom marshaler for RecoveryPlanManualActionDetails. 14369func (rpmad RecoveryPlanManualActionDetails) MarshalJSON() ([]byte, error) { 14370 rpmad.InstanceType = InstanceTypeManualActionDetails 14371 objectMap := make(map[string]interface{}) 14372 if rpmad.Description != nil { 14373 objectMap["description"] = rpmad.Description 14374 } 14375 if rpmad.InstanceType != "" { 14376 objectMap["instanceType"] = rpmad.InstanceType 14377 } 14378 return json.Marshal(objectMap) 14379} 14380 14381// AsRecoveryPlanAutomationRunbookActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanManualActionDetails. 14382func (rpmad RecoveryPlanManualActionDetails) AsRecoveryPlanAutomationRunbookActionDetails() (*RecoveryPlanAutomationRunbookActionDetails, bool) { 14383 return nil, false 14384} 14385 14386// AsRecoveryPlanManualActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanManualActionDetails. 14387func (rpmad RecoveryPlanManualActionDetails) AsRecoveryPlanManualActionDetails() (*RecoveryPlanManualActionDetails, bool) { 14388 return &rpmad, true 14389} 14390 14391// AsRecoveryPlanScriptActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanManualActionDetails. 14392func (rpmad RecoveryPlanManualActionDetails) AsRecoveryPlanScriptActionDetails() (*RecoveryPlanScriptActionDetails, bool) { 14393 return nil, false 14394} 14395 14396// AsRecoveryPlanActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanManualActionDetails. 14397func (rpmad RecoveryPlanManualActionDetails) AsRecoveryPlanActionDetails() (*RecoveryPlanActionDetails, bool) { 14398 return nil, false 14399} 14400 14401// AsBasicRecoveryPlanActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanManualActionDetails. 14402func (rpmad RecoveryPlanManualActionDetails) AsBasicRecoveryPlanActionDetails() (BasicRecoveryPlanActionDetails, bool) { 14403 return &rpmad, true 14404} 14405 14406// RecoveryPlanPlannedFailoverInput recovery plan planned failover input. 14407type RecoveryPlanPlannedFailoverInput struct { 14408 // Properties - The recovery plan planned failover input properties. 14409 Properties *RecoveryPlanPlannedFailoverInputProperties `json:"properties,omitempty"` 14410} 14411 14412// RecoveryPlanPlannedFailoverInputProperties recovery plan planned failover input properties. 14413type RecoveryPlanPlannedFailoverInputProperties struct { 14414 // FailoverDirection - The failover direction. Possible values include: 'PrimaryToRecovery', 'RecoveryToPrimary' 14415 FailoverDirection PossibleOperationsDirections `json:"failoverDirection,omitempty"` 14416 // ProviderSpecificDetails - The provider specific properties. 14417 ProviderSpecificDetails *[]BasicRecoveryPlanProviderSpecificFailoverInput `json:"providerSpecificDetails,omitempty"` 14418} 14419 14420// UnmarshalJSON is the custom unmarshaler for RecoveryPlanPlannedFailoverInputProperties struct. 14421func (rppfip *RecoveryPlanPlannedFailoverInputProperties) UnmarshalJSON(body []byte) error { 14422 var m map[string]*json.RawMessage 14423 err := json.Unmarshal(body, &m) 14424 if err != nil { 14425 return err 14426 } 14427 for k, v := range m { 14428 switch k { 14429 case "failoverDirection": 14430 if v != nil { 14431 var failoverDirection PossibleOperationsDirections 14432 err = json.Unmarshal(*v, &failoverDirection) 14433 if err != nil { 14434 return err 14435 } 14436 rppfip.FailoverDirection = failoverDirection 14437 } 14438 case "providerSpecificDetails": 14439 if v != nil { 14440 providerSpecificDetails, err := unmarshalBasicRecoveryPlanProviderSpecificFailoverInputArray(*v) 14441 if err != nil { 14442 return err 14443 } 14444 rppfip.ProviderSpecificDetails = &providerSpecificDetails 14445 } 14446 } 14447 } 14448 14449 return nil 14450} 14451 14452// RecoveryPlanProperties recovery plan custom details. 14453type RecoveryPlanProperties struct { 14454 // FriendlyName - The friendly name. 14455 FriendlyName *string `json:"friendlyName,omitempty"` 14456 // PrimaryFabricID - The primary fabric Id. 14457 PrimaryFabricID *string `json:"primaryFabricId,omitempty"` 14458 // PrimaryFabricFriendlyName - The primary fabric friendly name. 14459 PrimaryFabricFriendlyName *string `json:"primaryFabricFriendlyName,omitempty"` 14460 // RecoveryFabricID - The recovery fabric Id. 14461 RecoveryFabricID *string `json:"recoveryFabricId,omitempty"` 14462 // RecoveryFabricFriendlyName - The recovery fabric friendly name. 14463 RecoveryFabricFriendlyName *string `json:"recoveryFabricFriendlyName,omitempty"` 14464 // FailoverDeploymentModel - The failover deployment model. 14465 FailoverDeploymentModel *string `json:"failoverDeploymentModel,omitempty"` 14466 // ReplicationProviders - The list of replication providers. 14467 ReplicationProviders *[]string `json:"replicationProviders,omitempty"` 14468 // AllowedOperations - The list of allowed operations. 14469 AllowedOperations *[]string `json:"allowedOperations,omitempty"` 14470 // LastPlannedFailoverTime - The start time of the last planned failover. 14471 LastPlannedFailoverTime *date.Time `json:"lastPlannedFailoverTime,omitempty"` 14472 // LastUnplannedFailoverTime - The start time of the last unplanned failover. 14473 LastUnplannedFailoverTime *date.Time `json:"lastUnplannedFailoverTime,omitempty"` 14474 // LastTestFailoverTime - The start time of the last test failover. 14475 LastTestFailoverTime *date.Time `json:"lastTestFailoverTime,omitempty"` 14476 // CurrentScenario - The current scenario details. 14477 CurrentScenario *CurrentScenarioDetails `json:"currentScenario,omitempty"` 14478 // CurrentScenarioStatus - The recovery plan status. 14479 CurrentScenarioStatus *string `json:"currentScenarioStatus,omitempty"` 14480 // CurrentScenarioStatusDescription - The recovery plan status description. 14481 CurrentScenarioStatusDescription *string `json:"currentScenarioStatusDescription,omitempty"` 14482 // Groups - The recovery plan groups. 14483 Groups *[]RecoveryPlanGroup `json:"groups,omitempty"` 14484} 14485 14486// RecoveryPlanProtectedItem recovery plan protected item. 14487type RecoveryPlanProtectedItem struct { 14488 // ID - The ARM Id of the recovery plan protected item. 14489 ID *string `json:"id,omitempty"` 14490 // VirtualMachineID - The virtual machine Id. 14491 VirtualMachineID *string `json:"virtualMachineId,omitempty"` 14492} 14493 14494// BasicRecoveryPlanProviderSpecificFailoverInput recovery plan provider specific failover input base class. 14495type BasicRecoveryPlanProviderSpecificFailoverInput interface { 14496 AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) 14497 AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool) 14498 AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool) 14499 AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool) 14500 AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool) 14501 AsRecoveryPlanProviderSpecificFailoverInput() (*RecoveryPlanProviderSpecificFailoverInput, bool) 14502} 14503 14504// RecoveryPlanProviderSpecificFailoverInput recovery plan provider specific failover input base class. 14505type RecoveryPlanProviderSpecificFailoverInput struct { 14506 // InstanceType - Possible values include: 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeRecoveryPlanProviderSpecificFailoverInput', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeA2A', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMage' 14507 InstanceType InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput `json:"instanceType,omitempty"` 14508} 14509 14510func unmarshalBasicRecoveryPlanProviderSpecificFailoverInput(body []byte) (BasicRecoveryPlanProviderSpecificFailoverInput, error) { 14511 var m map[string]interface{} 14512 err := json.Unmarshal(body, &m) 14513 if err != nil { 14514 return nil, err 14515 } 14516 14517 switch m["instanceType"] { 14518 case string(InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeA2A): 14519 var rpafi RecoveryPlanA2AFailoverInput 14520 err := json.Unmarshal(body, &rpafi) 14521 return rpafi, err 14522 case string(InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback): 14523 var rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput 14524 err := json.Unmarshal(body, &rphvrafi) 14525 return rphvrafi, err 14526 case string(InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure): 14527 var rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput 14528 err := json.Unmarshal(body, &rphvrafi) 14529 return rphvrafi, err 14530 case string(InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMageAzureV2): 14531 var rpimavfi RecoveryPlanInMageAzureV2FailoverInput 14532 err := json.Unmarshal(body, &rpimavfi) 14533 return rpimavfi, err 14534 case string(InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMage): 14535 var rpimfi RecoveryPlanInMageFailoverInput 14536 err := json.Unmarshal(body, &rpimfi) 14537 return rpimfi, err 14538 default: 14539 var rppsfi RecoveryPlanProviderSpecificFailoverInput 14540 err := json.Unmarshal(body, &rppsfi) 14541 return rppsfi, err 14542 } 14543} 14544func unmarshalBasicRecoveryPlanProviderSpecificFailoverInputArray(body []byte) ([]BasicRecoveryPlanProviderSpecificFailoverInput, error) { 14545 var rawMessages []*json.RawMessage 14546 err := json.Unmarshal(body, &rawMessages) 14547 if err != nil { 14548 return nil, err 14549 } 14550 14551 rppsfiArray := make([]BasicRecoveryPlanProviderSpecificFailoverInput, len(rawMessages)) 14552 14553 for index, rawMessage := range rawMessages { 14554 rppsfi, err := unmarshalBasicRecoveryPlanProviderSpecificFailoverInput(*rawMessage) 14555 if err != nil { 14556 return nil, err 14557 } 14558 rppsfiArray[index] = rppsfi 14559 } 14560 return rppsfiArray, nil 14561} 14562 14563// MarshalJSON is the custom marshaler for RecoveryPlanProviderSpecificFailoverInput. 14564func (rppsfi RecoveryPlanProviderSpecificFailoverInput) MarshalJSON() ([]byte, error) { 14565 rppsfi.InstanceType = InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeRecoveryPlanProviderSpecificFailoverInput 14566 objectMap := make(map[string]interface{}) 14567 if rppsfi.InstanceType != "" { 14568 objectMap["instanceType"] = rppsfi.InstanceType 14569 } 14570 return json.Marshal(objectMap) 14571} 14572 14573// AsRecoveryPlanA2AFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanProviderSpecificFailoverInput. 14574func (rppsfi RecoveryPlanProviderSpecificFailoverInput) AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) { 14575 return nil, false 14576} 14577 14578// AsRecoveryPlanHyperVReplicaAzureFailbackInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanProviderSpecificFailoverInput. 14579func (rppsfi RecoveryPlanProviderSpecificFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool) { 14580 return nil, false 14581} 14582 14583// AsRecoveryPlanHyperVReplicaAzureFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanProviderSpecificFailoverInput. 14584func (rppsfi RecoveryPlanProviderSpecificFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool) { 14585 return nil, false 14586} 14587 14588// AsRecoveryPlanInMageAzureV2FailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanProviderSpecificFailoverInput. 14589func (rppsfi RecoveryPlanProviderSpecificFailoverInput) AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool) { 14590 return nil, false 14591} 14592 14593// AsRecoveryPlanInMageFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanProviderSpecificFailoverInput. 14594func (rppsfi RecoveryPlanProviderSpecificFailoverInput) AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool) { 14595 return nil, false 14596} 14597 14598// AsRecoveryPlanProviderSpecificFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanProviderSpecificFailoverInput. 14599func (rppsfi RecoveryPlanProviderSpecificFailoverInput) AsRecoveryPlanProviderSpecificFailoverInput() (*RecoveryPlanProviderSpecificFailoverInput, bool) { 14600 return &rppsfi, true 14601} 14602 14603// AsBasicRecoveryPlanProviderSpecificFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanProviderSpecificFailoverInput. 14604func (rppsfi RecoveryPlanProviderSpecificFailoverInput) AsBasicRecoveryPlanProviderSpecificFailoverInput() (BasicRecoveryPlanProviderSpecificFailoverInput, bool) { 14605 return &rppsfi, true 14606} 14607 14608// RecoveryPlanScriptActionDetails recovery plan script action details. 14609type RecoveryPlanScriptActionDetails struct { 14610 // Path - The script path. 14611 Path *string `json:"path,omitempty"` 14612 // Timeout - The script timeout. 14613 Timeout *string `json:"timeout,omitempty"` 14614 // FabricLocation - The fabric location. Possible values include: 'Primary', 'Recovery' 14615 FabricLocation RecoveryPlanActionLocation `json:"fabricLocation,omitempty"` 14616 // InstanceType - Possible values include: 'InstanceTypeRecoveryPlanActionDetails', 'InstanceTypeAutomationRunbookActionDetails', 'InstanceTypeManualActionDetails', 'InstanceTypeScriptActionDetails' 14617 InstanceType InstanceTypeBasicRecoveryPlanActionDetails `json:"instanceType,omitempty"` 14618} 14619 14620// MarshalJSON is the custom marshaler for RecoveryPlanScriptActionDetails. 14621func (rpsad RecoveryPlanScriptActionDetails) MarshalJSON() ([]byte, error) { 14622 rpsad.InstanceType = InstanceTypeScriptActionDetails 14623 objectMap := make(map[string]interface{}) 14624 if rpsad.Path != nil { 14625 objectMap["path"] = rpsad.Path 14626 } 14627 if rpsad.Timeout != nil { 14628 objectMap["timeout"] = rpsad.Timeout 14629 } 14630 if rpsad.FabricLocation != "" { 14631 objectMap["fabricLocation"] = rpsad.FabricLocation 14632 } 14633 if rpsad.InstanceType != "" { 14634 objectMap["instanceType"] = rpsad.InstanceType 14635 } 14636 return json.Marshal(objectMap) 14637} 14638 14639// AsRecoveryPlanAutomationRunbookActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanScriptActionDetails. 14640func (rpsad RecoveryPlanScriptActionDetails) AsRecoveryPlanAutomationRunbookActionDetails() (*RecoveryPlanAutomationRunbookActionDetails, bool) { 14641 return nil, false 14642} 14643 14644// AsRecoveryPlanManualActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanScriptActionDetails. 14645func (rpsad RecoveryPlanScriptActionDetails) AsRecoveryPlanManualActionDetails() (*RecoveryPlanManualActionDetails, bool) { 14646 return nil, false 14647} 14648 14649// AsRecoveryPlanScriptActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanScriptActionDetails. 14650func (rpsad RecoveryPlanScriptActionDetails) AsRecoveryPlanScriptActionDetails() (*RecoveryPlanScriptActionDetails, bool) { 14651 return &rpsad, true 14652} 14653 14654// AsRecoveryPlanActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanScriptActionDetails. 14655func (rpsad RecoveryPlanScriptActionDetails) AsRecoveryPlanActionDetails() (*RecoveryPlanActionDetails, bool) { 14656 return nil, false 14657} 14658 14659// AsBasicRecoveryPlanActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanScriptActionDetails. 14660func (rpsad RecoveryPlanScriptActionDetails) AsBasicRecoveryPlanActionDetails() (BasicRecoveryPlanActionDetails, bool) { 14661 return &rpsad, true 14662} 14663 14664// RecoveryPlanShutdownGroupTaskDetails this class represents the recovery plan shutdown group task 14665// details. 14666type RecoveryPlanShutdownGroupTaskDetails struct { 14667 // Name - The name. 14668 Name *string `json:"name,omitempty"` 14669 // GroupID - The group identifier. 14670 GroupID *string `json:"groupId,omitempty"` 14671 // RpGroupType - The group type. 14672 RpGroupType *string `json:"rpGroupType,omitempty"` 14673 // ChildTasks - The child tasks. 14674 ChildTasks *[]ASRTask `json:"childTasks,omitempty"` 14675 // InstanceType - Possible values include: 'InstanceTypeGroupTaskDetails', 'InstanceTypeInlineWorkflowTaskDetails', 'InstanceTypeRecoveryPlanGroupTaskDetails', 'InstanceTypeRecoveryPlanShutdownGroupTaskDetails' 14676 InstanceType InstanceTypeBasicGroupTaskDetails `json:"instanceType,omitempty"` 14677} 14678 14679// MarshalJSON is the custom marshaler for RecoveryPlanShutdownGroupTaskDetails. 14680func (rpsgtd RecoveryPlanShutdownGroupTaskDetails) MarshalJSON() ([]byte, error) { 14681 rpsgtd.InstanceType = InstanceTypeRecoveryPlanShutdownGroupTaskDetails 14682 objectMap := make(map[string]interface{}) 14683 if rpsgtd.Name != nil { 14684 objectMap["name"] = rpsgtd.Name 14685 } 14686 if rpsgtd.GroupID != nil { 14687 objectMap["groupId"] = rpsgtd.GroupID 14688 } 14689 if rpsgtd.RpGroupType != nil { 14690 objectMap["rpGroupType"] = rpsgtd.RpGroupType 14691 } 14692 if rpsgtd.ChildTasks != nil { 14693 objectMap["childTasks"] = rpsgtd.ChildTasks 14694 } 14695 if rpsgtd.InstanceType != "" { 14696 objectMap["instanceType"] = rpsgtd.InstanceType 14697 } 14698 return json.Marshal(objectMap) 14699} 14700 14701// AsInlineWorkflowTaskDetails is the BasicGroupTaskDetails implementation for RecoveryPlanShutdownGroupTaskDetails. 14702func (rpsgtd RecoveryPlanShutdownGroupTaskDetails) AsInlineWorkflowTaskDetails() (*InlineWorkflowTaskDetails, bool) { 14703 return nil, false 14704} 14705 14706// AsRecoveryPlanGroupTaskDetails is the BasicGroupTaskDetails implementation for RecoveryPlanShutdownGroupTaskDetails. 14707func (rpsgtd RecoveryPlanShutdownGroupTaskDetails) AsRecoveryPlanGroupTaskDetails() (*RecoveryPlanGroupTaskDetails, bool) { 14708 return nil, false 14709} 14710 14711// AsRecoveryPlanShutdownGroupTaskDetails is the BasicGroupTaskDetails implementation for RecoveryPlanShutdownGroupTaskDetails. 14712func (rpsgtd RecoveryPlanShutdownGroupTaskDetails) AsRecoveryPlanShutdownGroupTaskDetails() (*RecoveryPlanShutdownGroupTaskDetails, bool) { 14713 return &rpsgtd, true 14714} 14715 14716// AsGroupTaskDetails is the BasicGroupTaskDetails implementation for RecoveryPlanShutdownGroupTaskDetails. 14717func (rpsgtd RecoveryPlanShutdownGroupTaskDetails) AsGroupTaskDetails() (*GroupTaskDetails, bool) { 14718 return nil, false 14719} 14720 14721// AsBasicGroupTaskDetails is the BasicGroupTaskDetails implementation for RecoveryPlanShutdownGroupTaskDetails. 14722func (rpsgtd RecoveryPlanShutdownGroupTaskDetails) AsBasicGroupTaskDetails() (BasicGroupTaskDetails, bool) { 14723 return &rpsgtd, true 14724} 14725 14726// RecoveryPlanTestFailoverCleanupInput recovery plan test failover cleanup input. 14727type RecoveryPlanTestFailoverCleanupInput struct { 14728 // Properties - The recovery plan test failover cleanup input properties. 14729 Properties *RecoveryPlanTestFailoverCleanupInputProperties `json:"properties,omitempty"` 14730} 14731 14732// RecoveryPlanTestFailoverCleanupInputProperties recovery plan test failover cleanup input properties. 14733type RecoveryPlanTestFailoverCleanupInputProperties struct { 14734 // Comments - The test failover cleanup comments. 14735 Comments *string `json:"comments,omitempty"` 14736} 14737 14738// RecoveryPlanTestFailoverInput recovery plan test failover input. 14739type RecoveryPlanTestFailoverInput struct { 14740 // Properties - The recovery plan test failover input properties. 14741 Properties *RecoveryPlanTestFailoverInputProperties `json:"properties,omitempty"` 14742} 14743 14744// RecoveryPlanTestFailoverInputProperties recovery plan test failover input properties. 14745type RecoveryPlanTestFailoverInputProperties struct { 14746 // FailoverDirection - The failover direction. Possible values include: 'PrimaryToRecovery', 'RecoveryToPrimary' 14747 FailoverDirection PossibleOperationsDirections `json:"failoverDirection,omitempty"` 14748 // NetworkType - The network type to be used for test failover. 14749 NetworkType *string `json:"networkType,omitempty"` 14750 // NetworkID - The Id of the network to be used for test failover. 14751 NetworkID *string `json:"networkId,omitempty"` 14752 // SkipTestFailoverCleanup - A value indicating whether the test failover cleanup is to be skipped. 14753 SkipTestFailoverCleanup *string `json:"skipTestFailoverCleanup,omitempty"` 14754 // ProviderSpecificDetails - The provider specific properties. 14755 ProviderSpecificDetails *[]BasicRecoveryPlanProviderSpecificFailoverInput `json:"providerSpecificDetails,omitempty"` 14756} 14757 14758// UnmarshalJSON is the custom unmarshaler for RecoveryPlanTestFailoverInputProperties struct. 14759func (rptfip *RecoveryPlanTestFailoverInputProperties) UnmarshalJSON(body []byte) error { 14760 var m map[string]*json.RawMessage 14761 err := json.Unmarshal(body, &m) 14762 if err != nil { 14763 return err 14764 } 14765 for k, v := range m { 14766 switch k { 14767 case "failoverDirection": 14768 if v != nil { 14769 var failoverDirection PossibleOperationsDirections 14770 err = json.Unmarshal(*v, &failoverDirection) 14771 if err != nil { 14772 return err 14773 } 14774 rptfip.FailoverDirection = failoverDirection 14775 } 14776 case "networkType": 14777 if v != nil { 14778 var networkType string 14779 err = json.Unmarshal(*v, &networkType) 14780 if err != nil { 14781 return err 14782 } 14783 rptfip.NetworkType = &networkType 14784 } 14785 case "networkId": 14786 if v != nil { 14787 var networkID string 14788 err = json.Unmarshal(*v, &networkID) 14789 if err != nil { 14790 return err 14791 } 14792 rptfip.NetworkID = &networkID 14793 } 14794 case "skipTestFailoverCleanup": 14795 if v != nil { 14796 var skipTestFailoverCleanup string 14797 err = json.Unmarshal(*v, &skipTestFailoverCleanup) 14798 if err != nil { 14799 return err 14800 } 14801 rptfip.SkipTestFailoverCleanup = &skipTestFailoverCleanup 14802 } 14803 case "providerSpecificDetails": 14804 if v != nil { 14805 providerSpecificDetails, err := unmarshalBasicRecoveryPlanProviderSpecificFailoverInputArray(*v) 14806 if err != nil { 14807 return err 14808 } 14809 rptfip.ProviderSpecificDetails = &providerSpecificDetails 14810 } 14811 } 14812 } 14813 14814 return nil 14815} 14816 14817// RecoveryPlanUnplannedFailoverInput recovery plan unplanned failover input. 14818type RecoveryPlanUnplannedFailoverInput struct { 14819 // Properties - The recovery plan unplanned failover input properties. 14820 Properties *RecoveryPlanUnplannedFailoverInputProperties `json:"properties,omitempty"` 14821} 14822 14823// RecoveryPlanUnplannedFailoverInputProperties recovery plan unplanned failover input properties. 14824type RecoveryPlanUnplannedFailoverInputProperties struct { 14825 // FailoverDirection - The failover direction. Possible values include: 'PrimaryToRecovery', 'RecoveryToPrimary' 14826 FailoverDirection PossibleOperationsDirections `json:"failoverDirection,omitempty"` 14827 // SourceSiteOperations - A value indicating whether source site operations are required. Possible values include: 'Required', 'NotRequired' 14828 SourceSiteOperations SourceSiteOperations `json:"sourceSiteOperations,omitempty"` 14829 // ProviderSpecificDetails - The provider specific properties. 14830 ProviderSpecificDetails *[]BasicRecoveryPlanProviderSpecificFailoverInput `json:"providerSpecificDetails,omitempty"` 14831} 14832 14833// UnmarshalJSON is the custom unmarshaler for RecoveryPlanUnplannedFailoverInputProperties struct. 14834func (rpufip *RecoveryPlanUnplannedFailoverInputProperties) UnmarshalJSON(body []byte) error { 14835 var m map[string]*json.RawMessage 14836 err := json.Unmarshal(body, &m) 14837 if err != nil { 14838 return err 14839 } 14840 for k, v := range m { 14841 switch k { 14842 case "failoverDirection": 14843 if v != nil { 14844 var failoverDirection PossibleOperationsDirections 14845 err = json.Unmarshal(*v, &failoverDirection) 14846 if err != nil { 14847 return err 14848 } 14849 rpufip.FailoverDirection = failoverDirection 14850 } 14851 case "sourceSiteOperations": 14852 if v != nil { 14853 var sourceSiteOperations SourceSiteOperations 14854 err = json.Unmarshal(*v, &sourceSiteOperations) 14855 if err != nil { 14856 return err 14857 } 14858 rpufip.SourceSiteOperations = sourceSiteOperations 14859 } 14860 case "providerSpecificDetails": 14861 if v != nil { 14862 providerSpecificDetails, err := unmarshalBasicRecoveryPlanProviderSpecificFailoverInputArray(*v) 14863 if err != nil { 14864 return err 14865 } 14866 rpufip.ProviderSpecificDetails = &providerSpecificDetails 14867 } 14868 } 14869 } 14870 14871 return nil 14872} 14873 14874// RecoveryPoint base class representing a recovery point. 14875type RecoveryPoint struct { 14876 autorest.Response `json:"-"` 14877 // Properties - Recovery point related data. 14878 Properties *RecoveryPointProperties `json:"properties,omitempty"` 14879 // ID - READ-ONLY; Resource Id 14880 ID *string `json:"id,omitempty"` 14881 // Name - READ-ONLY; Resource Name 14882 Name *string `json:"name,omitempty"` 14883 // Type - READ-ONLY; Resource Type 14884 Type *string `json:"type,omitempty"` 14885 // Location - Resource Location 14886 Location *string `json:"location,omitempty"` 14887} 14888 14889// MarshalJSON is the custom marshaler for RecoveryPoint. 14890func (rp RecoveryPoint) MarshalJSON() ([]byte, error) { 14891 objectMap := make(map[string]interface{}) 14892 if rp.Properties != nil { 14893 objectMap["properties"] = rp.Properties 14894 } 14895 if rp.Location != nil { 14896 objectMap["location"] = rp.Location 14897 } 14898 return json.Marshal(objectMap) 14899} 14900 14901// RecoveryPointCollection collection of recovery point details. 14902type RecoveryPointCollection struct { 14903 autorest.Response `json:"-"` 14904 // Value - The recovery point details. 14905 Value *[]RecoveryPoint `json:"value,omitempty"` 14906 // NextLink - The value of next link. 14907 NextLink *string `json:"nextLink,omitempty"` 14908} 14909 14910// RecoveryPointCollectionIterator provides access to a complete listing of RecoveryPoint values. 14911type RecoveryPointCollectionIterator struct { 14912 i int 14913 page RecoveryPointCollectionPage 14914} 14915 14916// NextWithContext advances to the next value. If there was an error making 14917// the request the iterator does not advance and the error is returned. 14918func (iter *RecoveryPointCollectionIterator) NextWithContext(ctx context.Context) (err error) { 14919 if tracing.IsEnabled() { 14920 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPointCollectionIterator.NextWithContext") 14921 defer func() { 14922 sc := -1 14923 if iter.Response().Response.Response != nil { 14924 sc = iter.Response().Response.Response.StatusCode 14925 } 14926 tracing.EndSpan(ctx, sc, err) 14927 }() 14928 } 14929 iter.i++ 14930 if iter.i < len(iter.page.Values()) { 14931 return nil 14932 } 14933 err = iter.page.NextWithContext(ctx) 14934 if err != nil { 14935 iter.i-- 14936 return err 14937 } 14938 iter.i = 0 14939 return nil 14940} 14941 14942// Next advances to the next value. If there was an error making 14943// the request the iterator does not advance and the error is returned. 14944// Deprecated: Use NextWithContext() instead. 14945func (iter *RecoveryPointCollectionIterator) Next() error { 14946 return iter.NextWithContext(context.Background()) 14947} 14948 14949// NotDone returns true if the enumeration should be started or is not yet complete. 14950func (iter RecoveryPointCollectionIterator) NotDone() bool { 14951 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 14952} 14953 14954// Response returns the raw server response from the last page request. 14955func (iter RecoveryPointCollectionIterator) Response() RecoveryPointCollection { 14956 return iter.page.Response() 14957} 14958 14959// Value returns the current value or a zero-initialized value if the 14960// iterator has advanced beyond the end of the collection. 14961func (iter RecoveryPointCollectionIterator) Value() RecoveryPoint { 14962 if !iter.page.NotDone() { 14963 return RecoveryPoint{} 14964 } 14965 return iter.page.Values()[iter.i] 14966} 14967 14968// Creates a new instance of the RecoveryPointCollectionIterator type. 14969func NewRecoveryPointCollectionIterator(page RecoveryPointCollectionPage) RecoveryPointCollectionIterator { 14970 return RecoveryPointCollectionIterator{page: page} 14971} 14972 14973// IsEmpty returns true if the ListResult contains no values. 14974func (RPCVar RecoveryPointCollection) IsEmpty() bool { 14975 return RPCVar.Value == nil || len(*RPCVar.Value) == 0 14976} 14977 14978// hasNextLink returns true if the NextLink is not empty. 14979func (RPCVar RecoveryPointCollection) hasNextLink() bool { 14980 return RPCVar.NextLink != nil && len(*RPCVar.NextLink) != 0 14981} 14982 14983// recoveryPointCollectionPreparer prepares a request to retrieve the next set of results. 14984// It returns nil if no more results exist. 14985func (RPCVar RecoveryPointCollection) recoveryPointCollectionPreparer(ctx context.Context) (*http.Request, error) { 14986 if !RPCVar.hasNextLink() { 14987 return nil, nil 14988 } 14989 return autorest.Prepare((&http.Request{}).WithContext(ctx), 14990 autorest.AsJSON(), 14991 autorest.AsGet(), 14992 autorest.WithBaseURL(to.String(RPCVar.NextLink))) 14993} 14994 14995// RecoveryPointCollectionPage contains a page of RecoveryPoint values. 14996type RecoveryPointCollectionPage struct { 14997 fn func(context.Context, RecoveryPointCollection) (RecoveryPointCollection, error) 14998 RPCVar RecoveryPointCollection 14999} 15000 15001// NextWithContext advances to the next page of values. If there was an error making 15002// the request the page does not advance and the error is returned. 15003func (page *RecoveryPointCollectionPage) NextWithContext(ctx context.Context) (err error) { 15004 if tracing.IsEnabled() { 15005 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPointCollectionPage.NextWithContext") 15006 defer func() { 15007 sc := -1 15008 if page.Response().Response.Response != nil { 15009 sc = page.Response().Response.Response.StatusCode 15010 } 15011 tracing.EndSpan(ctx, sc, err) 15012 }() 15013 } 15014 for { 15015 next, err := page.fn(ctx, page.RPCVar) 15016 if err != nil { 15017 return err 15018 } 15019 page.RPCVar = next 15020 if !next.hasNextLink() || !next.IsEmpty() { 15021 break 15022 } 15023 } 15024 return nil 15025} 15026 15027// Next advances to the next page of values. If there was an error making 15028// the request the page does not advance and the error is returned. 15029// Deprecated: Use NextWithContext() instead. 15030func (page *RecoveryPointCollectionPage) Next() error { 15031 return page.NextWithContext(context.Background()) 15032} 15033 15034// NotDone returns true if the page enumeration should be started or is not yet complete. 15035func (page RecoveryPointCollectionPage) NotDone() bool { 15036 return !page.RPCVar.IsEmpty() 15037} 15038 15039// Response returns the raw server response from the last page request. 15040func (page RecoveryPointCollectionPage) Response() RecoveryPointCollection { 15041 return page.RPCVar 15042} 15043 15044// Values returns the slice of values for the current page or nil if there are no values. 15045func (page RecoveryPointCollectionPage) Values() []RecoveryPoint { 15046 if page.RPCVar.IsEmpty() { 15047 return nil 15048 } 15049 return *page.RPCVar.Value 15050} 15051 15052// Creates a new instance of the RecoveryPointCollectionPage type. 15053func NewRecoveryPointCollectionPage(cur RecoveryPointCollection, getNextPage func(context.Context, RecoveryPointCollection) (RecoveryPointCollection, error)) RecoveryPointCollectionPage { 15054 return RecoveryPointCollectionPage{ 15055 fn: getNextPage, 15056 RPCVar: cur, 15057 } 15058} 15059 15060// RecoveryPointProperties recovery point properties. 15061type RecoveryPointProperties struct { 15062 // RecoveryPointTime - The recovery point time. 15063 RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"` 15064 // RecoveryPointType - The recovery point type: ApplicationConsistent, CrashConsistent. 15065 RecoveryPointType *string `json:"recoveryPointType,omitempty"` 15066 // ProviderSpecificDetails - The provider specific details for the recovery point. 15067 ProviderSpecificDetails BasicProviderSpecificRecoveryPointDetails `json:"providerSpecificDetails,omitempty"` 15068} 15069 15070// UnmarshalJSON is the custom unmarshaler for RecoveryPointProperties struct. 15071func (rpp *RecoveryPointProperties) UnmarshalJSON(body []byte) error { 15072 var m map[string]*json.RawMessage 15073 err := json.Unmarshal(body, &m) 15074 if err != nil { 15075 return err 15076 } 15077 for k, v := range m { 15078 switch k { 15079 case "recoveryPointTime": 15080 if v != nil { 15081 var recoveryPointTime date.Time 15082 err = json.Unmarshal(*v, &recoveryPointTime) 15083 if err != nil { 15084 return err 15085 } 15086 rpp.RecoveryPointTime = &recoveryPointTime 15087 } 15088 case "recoveryPointType": 15089 if v != nil { 15090 var recoveryPointType string 15091 err = json.Unmarshal(*v, &recoveryPointType) 15092 if err != nil { 15093 return err 15094 } 15095 rpp.RecoveryPointType = &recoveryPointType 15096 } 15097 case "providerSpecificDetails": 15098 if v != nil { 15099 providerSpecificDetails, err := unmarshalBasicProviderSpecificRecoveryPointDetails(*v) 15100 if err != nil { 15101 return err 15102 } 15103 rpp.ProviderSpecificDetails = providerSpecificDetails 15104 } 15105 } 15106 } 15107 15108 return nil 15109} 15110 15111// RecoveryServicesProvider provider details. 15112type RecoveryServicesProvider struct { 15113 autorest.Response `json:"-"` 15114 // Properties - Provider properties. 15115 Properties *RecoveryServicesProviderProperties `json:"properties,omitempty"` 15116 // ID - READ-ONLY; Resource Id 15117 ID *string `json:"id,omitempty"` 15118 // Name - READ-ONLY; Resource Name 15119 Name *string `json:"name,omitempty"` 15120 // Type - READ-ONLY; Resource Type 15121 Type *string `json:"type,omitempty"` 15122 // Location - Resource Location 15123 Location *string `json:"location,omitempty"` 15124} 15125 15126// MarshalJSON is the custom marshaler for RecoveryServicesProvider. 15127func (rsp RecoveryServicesProvider) MarshalJSON() ([]byte, error) { 15128 objectMap := make(map[string]interface{}) 15129 if rsp.Properties != nil { 15130 objectMap["properties"] = rsp.Properties 15131 } 15132 if rsp.Location != nil { 15133 objectMap["location"] = rsp.Location 15134 } 15135 return json.Marshal(objectMap) 15136} 15137 15138// RecoveryServicesProviderCollection collection of providers. 15139type RecoveryServicesProviderCollection struct { 15140 autorest.Response `json:"-"` 15141 // Value - The Servers details. 15142 Value *[]RecoveryServicesProvider `json:"value,omitempty"` 15143 // NextLink - The value of next link. 15144 NextLink *string `json:"nextLink,omitempty"` 15145} 15146 15147// RecoveryServicesProviderCollectionIterator provides access to a complete listing of 15148// RecoveryServicesProvider values. 15149type RecoveryServicesProviderCollectionIterator struct { 15150 i int 15151 page RecoveryServicesProviderCollectionPage 15152} 15153 15154// NextWithContext advances to the next value. If there was an error making 15155// the request the iterator does not advance and the error is returned. 15156func (iter *RecoveryServicesProviderCollectionIterator) NextWithContext(ctx context.Context) (err error) { 15157 if tracing.IsEnabled() { 15158 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryServicesProviderCollectionIterator.NextWithContext") 15159 defer func() { 15160 sc := -1 15161 if iter.Response().Response.Response != nil { 15162 sc = iter.Response().Response.Response.StatusCode 15163 } 15164 tracing.EndSpan(ctx, sc, err) 15165 }() 15166 } 15167 iter.i++ 15168 if iter.i < len(iter.page.Values()) { 15169 return nil 15170 } 15171 err = iter.page.NextWithContext(ctx) 15172 if err != nil { 15173 iter.i-- 15174 return err 15175 } 15176 iter.i = 0 15177 return nil 15178} 15179 15180// Next advances to the next value. If there was an error making 15181// the request the iterator does not advance and the error is returned. 15182// Deprecated: Use NextWithContext() instead. 15183func (iter *RecoveryServicesProviderCollectionIterator) Next() error { 15184 return iter.NextWithContext(context.Background()) 15185} 15186 15187// NotDone returns true if the enumeration should be started or is not yet complete. 15188func (iter RecoveryServicesProviderCollectionIterator) NotDone() bool { 15189 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 15190} 15191 15192// Response returns the raw server response from the last page request. 15193func (iter RecoveryServicesProviderCollectionIterator) Response() RecoveryServicesProviderCollection { 15194 return iter.page.Response() 15195} 15196 15197// Value returns the current value or a zero-initialized value if the 15198// iterator has advanced beyond the end of the collection. 15199func (iter RecoveryServicesProviderCollectionIterator) Value() RecoveryServicesProvider { 15200 if !iter.page.NotDone() { 15201 return RecoveryServicesProvider{} 15202 } 15203 return iter.page.Values()[iter.i] 15204} 15205 15206// Creates a new instance of the RecoveryServicesProviderCollectionIterator type. 15207func NewRecoveryServicesProviderCollectionIterator(page RecoveryServicesProviderCollectionPage) RecoveryServicesProviderCollectionIterator { 15208 return RecoveryServicesProviderCollectionIterator{page: page} 15209} 15210 15211// IsEmpty returns true if the ListResult contains no values. 15212func (rspc RecoveryServicesProviderCollection) IsEmpty() bool { 15213 return rspc.Value == nil || len(*rspc.Value) == 0 15214} 15215 15216// hasNextLink returns true if the NextLink is not empty. 15217func (rspc RecoveryServicesProviderCollection) hasNextLink() bool { 15218 return rspc.NextLink != nil && len(*rspc.NextLink) != 0 15219} 15220 15221// recoveryServicesProviderCollectionPreparer prepares a request to retrieve the next set of results. 15222// It returns nil if no more results exist. 15223func (rspc RecoveryServicesProviderCollection) recoveryServicesProviderCollectionPreparer(ctx context.Context) (*http.Request, error) { 15224 if !rspc.hasNextLink() { 15225 return nil, nil 15226 } 15227 return autorest.Prepare((&http.Request{}).WithContext(ctx), 15228 autorest.AsJSON(), 15229 autorest.AsGet(), 15230 autorest.WithBaseURL(to.String(rspc.NextLink))) 15231} 15232 15233// RecoveryServicesProviderCollectionPage contains a page of RecoveryServicesProvider values. 15234type RecoveryServicesProviderCollectionPage struct { 15235 fn func(context.Context, RecoveryServicesProviderCollection) (RecoveryServicesProviderCollection, error) 15236 rspc RecoveryServicesProviderCollection 15237} 15238 15239// NextWithContext advances to the next page of values. If there was an error making 15240// the request the page does not advance and the error is returned. 15241func (page *RecoveryServicesProviderCollectionPage) NextWithContext(ctx context.Context) (err error) { 15242 if tracing.IsEnabled() { 15243 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryServicesProviderCollectionPage.NextWithContext") 15244 defer func() { 15245 sc := -1 15246 if page.Response().Response.Response != nil { 15247 sc = page.Response().Response.Response.StatusCode 15248 } 15249 tracing.EndSpan(ctx, sc, err) 15250 }() 15251 } 15252 for { 15253 next, err := page.fn(ctx, page.rspc) 15254 if err != nil { 15255 return err 15256 } 15257 page.rspc = next 15258 if !next.hasNextLink() || !next.IsEmpty() { 15259 break 15260 } 15261 } 15262 return nil 15263} 15264 15265// Next advances to the next page of values. If there was an error making 15266// the request the page does not advance and the error is returned. 15267// Deprecated: Use NextWithContext() instead. 15268func (page *RecoveryServicesProviderCollectionPage) Next() error { 15269 return page.NextWithContext(context.Background()) 15270} 15271 15272// NotDone returns true if the page enumeration should be started or is not yet complete. 15273func (page RecoveryServicesProviderCollectionPage) NotDone() bool { 15274 return !page.rspc.IsEmpty() 15275} 15276 15277// Response returns the raw server response from the last page request. 15278func (page RecoveryServicesProviderCollectionPage) Response() RecoveryServicesProviderCollection { 15279 return page.rspc 15280} 15281 15282// Values returns the slice of values for the current page or nil if there are no values. 15283func (page RecoveryServicesProviderCollectionPage) Values() []RecoveryServicesProvider { 15284 if page.rspc.IsEmpty() { 15285 return nil 15286 } 15287 return *page.rspc.Value 15288} 15289 15290// Creates a new instance of the RecoveryServicesProviderCollectionPage type. 15291func NewRecoveryServicesProviderCollectionPage(cur RecoveryServicesProviderCollection, getNextPage func(context.Context, RecoveryServicesProviderCollection) (RecoveryServicesProviderCollection, error)) RecoveryServicesProviderCollectionPage { 15292 return RecoveryServicesProviderCollectionPage{ 15293 fn: getNextPage, 15294 rspc: cur, 15295 } 15296} 15297 15298// RecoveryServicesProviderProperties recovery services provider properties. 15299type RecoveryServicesProviderProperties struct { 15300 // FabricType - Type of the site. 15301 FabricType *string `json:"fabricType,omitempty"` 15302 // FriendlyName - Friendly name of the DRA. 15303 FriendlyName *string `json:"friendlyName,omitempty"` 15304 // ProviderVersion - The provider version. 15305 ProviderVersion *string `json:"providerVersion,omitempty"` 15306 // ServerVersion - The fabric provider. 15307 ServerVersion *string `json:"serverVersion,omitempty"` 15308 // ProviderVersionState - DRA version status. 15309 ProviderVersionState *string `json:"providerVersionState,omitempty"` 15310 // ProviderVersionExpiryDate - Expiry date of the version. 15311 ProviderVersionExpiryDate *date.Time `json:"providerVersionExpiryDate,omitempty"` 15312 // FabricFriendlyName - The fabric friendly name. 15313 FabricFriendlyName *string `json:"fabricFriendlyName,omitempty"` 15314 // LastHeartBeat - Time when last heartbeat was sent by the DRA. 15315 LastHeartBeat *date.Time `json:"lastHeartBeat,omitempty"` 15316 // ConnectionStatus - A value indicating whether DRA is responsive. 15317 ConnectionStatus *string `json:"connectionStatus,omitempty"` 15318 // ProtectedItemCount - Number of protected VMs currently managed by the DRA. 15319 ProtectedItemCount *int32 `json:"protectedItemCount,omitempty"` 15320 // AllowedScenarios - The scenarios allowed on this provider. 15321 AllowedScenarios *[]string `json:"allowedScenarios,omitempty"` 15322 // HealthErrorDetails - The recovery services provider health error details. 15323 HealthErrorDetails *[]HealthError `json:"healthErrorDetails,omitempty"` 15324 // DraIdentifier - The DRA Id. 15325 DraIdentifier *string `json:"draIdentifier,omitempty"` 15326 // AuthenticationIdentityDetails - The authentication identity details. 15327 AuthenticationIdentityDetails *IdentityProviderDetails `json:"authenticationIdentityDetails,omitempty"` 15328 // ResourceAccessIdentityDetails - The resource access identity details. 15329 ResourceAccessIdentityDetails *IdentityProviderDetails `json:"resourceAccessIdentityDetails,omitempty"` 15330 // ProviderVersionDetails - The provider version details. 15331 ProviderVersionDetails *VersionDetails `json:"providerVersionDetails,omitempty"` 15332} 15333 15334// RemoveProtectionContainerMappingInput container unpairing input. 15335type RemoveProtectionContainerMappingInput struct { 15336 // Properties - Configure protection input properties. 15337 Properties *RemoveProtectionContainerMappingInputProperties `json:"properties,omitempty"` 15338} 15339 15340// RemoveProtectionContainerMappingInputProperties unpairing input properties. 15341type RemoveProtectionContainerMappingInputProperties struct { 15342 // ProviderSpecificInput - Provider specific input for unpairing. 15343 ProviderSpecificInput *ReplicationProviderContainerUnmappingInput `json:"providerSpecificInput,omitempty"` 15344} 15345 15346// RenewCertificateInput certificate renewal input. 15347type RenewCertificateInput struct { 15348 // Properties - Renew certificate input properties. 15349 Properties *RenewCertificateInputProperties `json:"properties,omitempty"` 15350} 15351 15352// RenewCertificateInputProperties renew Certificate input properties. 15353type RenewCertificateInputProperties struct { 15354 // RenewCertificateType - Renew certificate type. 15355 RenewCertificateType *string `json:"renewCertificateType,omitempty"` 15356} 15357 15358// ReplicationFabricsCheckConsistencyFuture an abstraction for monitoring and retrieving the results of a 15359// long-running operation. 15360type ReplicationFabricsCheckConsistencyFuture struct { 15361 azure.FutureAPI 15362 // Result returns the result of the asynchronous operation. 15363 // If the operation has not completed it will return an error. 15364 Result func(ReplicationFabricsClient) (Fabric, error) 15365} 15366 15367// UnmarshalJSON is the custom unmarshaller for CreateFuture. 15368func (future *ReplicationFabricsCheckConsistencyFuture) UnmarshalJSON(body []byte) error { 15369 var azFuture azure.Future 15370 if err := json.Unmarshal(body, &azFuture); err != nil { 15371 return err 15372 } 15373 future.FutureAPI = &azFuture 15374 future.Result = future.result 15375 return nil 15376} 15377 15378// result is the default implementation for ReplicationFabricsCheckConsistencyFuture.Result. 15379func (future *ReplicationFabricsCheckConsistencyFuture) result(client ReplicationFabricsClient) (f Fabric, err error) { 15380 var done bool 15381 done, err = future.DoneWithContext(context.Background(), client) 15382 if err != nil { 15383 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsCheckConsistencyFuture", "Result", future.Response(), "Polling failure") 15384 return 15385 } 15386 if !done { 15387 f.Response.Response = future.Response() 15388 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsCheckConsistencyFuture") 15389 return 15390 } 15391 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 15392 if f.Response.Response, err = future.GetResult(sender); err == nil && f.Response.Response.StatusCode != http.StatusNoContent { 15393 f, err = client.CheckConsistencyResponder(f.Response.Response) 15394 if err != nil { 15395 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsCheckConsistencyFuture", "Result", f.Response.Response, "Failure responding to request") 15396 } 15397 } 15398 return 15399} 15400 15401// ReplicationFabricsCreateFuture an abstraction for monitoring and retrieving the results of a 15402// long-running operation. 15403type ReplicationFabricsCreateFuture struct { 15404 azure.FutureAPI 15405 // Result returns the result of the asynchronous operation. 15406 // If the operation has not completed it will return an error. 15407 Result func(ReplicationFabricsClient) (Fabric, error) 15408} 15409 15410// UnmarshalJSON is the custom unmarshaller for CreateFuture. 15411func (future *ReplicationFabricsCreateFuture) UnmarshalJSON(body []byte) error { 15412 var azFuture azure.Future 15413 if err := json.Unmarshal(body, &azFuture); err != nil { 15414 return err 15415 } 15416 future.FutureAPI = &azFuture 15417 future.Result = future.result 15418 return nil 15419} 15420 15421// result is the default implementation for ReplicationFabricsCreateFuture.Result. 15422func (future *ReplicationFabricsCreateFuture) result(client ReplicationFabricsClient) (f Fabric, err error) { 15423 var done bool 15424 done, err = future.DoneWithContext(context.Background(), client) 15425 if err != nil { 15426 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsCreateFuture", "Result", future.Response(), "Polling failure") 15427 return 15428 } 15429 if !done { 15430 f.Response.Response = future.Response() 15431 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsCreateFuture") 15432 return 15433 } 15434 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 15435 if f.Response.Response, err = future.GetResult(sender); err == nil && f.Response.Response.StatusCode != http.StatusNoContent { 15436 f, err = client.CreateResponder(f.Response.Response) 15437 if err != nil { 15438 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsCreateFuture", "Result", f.Response.Response, "Failure responding to request") 15439 } 15440 } 15441 return 15442} 15443 15444// ReplicationFabricsDeleteFuture an abstraction for monitoring and retrieving the results of a 15445// long-running operation. 15446type ReplicationFabricsDeleteFuture struct { 15447 azure.FutureAPI 15448 // Result returns the result of the asynchronous operation. 15449 // If the operation has not completed it will return an error. 15450 Result func(ReplicationFabricsClient) (autorest.Response, error) 15451} 15452 15453// UnmarshalJSON is the custom unmarshaller for CreateFuture. 15454func (future *ReplicationFabricsDeleteFuture) UnmarshalJSON(body []byte) error { 15455 var azFuture azure.Future 15456 if err := json.Unmarshal(body, &azFuture); err != nil { 15457 return err 15458 } 15459 future.FutureAPI = &azFuture 15460 future.Result = future.result 15461 return nil 15462} 15463 15464// result is the default implementation for ReplicationFabricsDeleteFuture.Result. 15465func (future *ReplicationFabricsDeleteFuture) result(client ReplicationFabricsClient) (ar autorest.Response, err error) { 15466 var done bool 15467 done, err = future.DoneWithContext(context.Background(), client) 15468 if err != nil { 15469 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsDeleteFuture", "Result", future.Response(), "Polling failure") 15470 return 15471 } 15472 if !done { 15473 ar.Response = future.Response() 15474 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsDeleteFuture") 15475 return 15476 } 15477 ar.Response = future.Response() 15478 return 15479} 15480 15481// ReplicationFabricsMigrateToAadFuture an abstraction for monitoring and retrieving the results of a 15482// long-running operation. 15483type ReplicationFabricsMigrateToAadFuture struct { 15484 azure.FutureAPI 15485 // Result returns the result of the asynchronous operation. 15486 // If the operation has not completed it will return an error. 15487 Result func(ReplicationFabricsClient) (autorest.Response, error) 15488} 15489 15490// UnmarshalJSON is the custom unmarshaller for CreateFuture. 15491func (future *ReplicationFabricsMigrateToAadFuture) UnmarshalJSON(body []byte) error { 15492 var azFuture azure.Future 15493 if err := json.Unmarshal(body, &azFuture); err != nil { 15494 return err 15495 } 15496 future.FutureAPI = &azFuture 15497 future.Result = future.result 15498 return nil 15499} 15500 15501// result is the default implementation for ReplicationFabricsMigrateToAadFuture.Result. 15502func (future *ReplicationFabricsMigrateToAadFuture) result(client ReplicationFabricsClient) (ar autorest.Response, err error) { 15503 var done bool 15504 done, err = future.DoneWithContext(context.Background(), client) 15505 if err != nil { 15506 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsMigrateToAadFuture", "Result", future.Response(), "Polling failure") 15507 return 15508 } 15509 if !done { 15510 ar.Response = future.Response() 15511 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsMigrateToAadFuture") 15512 return 15513 } 15514 ar.Response = future.Response() 15515 return 15516} 15517 15518// ReplicationFabricsPurgeFuture an abstraction for monitoring and retrieving the results of a long-running 15519// operation. 15520type ReplicationFabricsPurgeFuture struct { 15521 azure.FutureAPI 15522 // Result returns the result of the asynchronous operation. 15523 // If the operation has not completed it will return an error. 15524 Result func(ReplicationFabricsClient) (autorest.Response, error) 15525} 15526 15527// UnmarshalJSON is the custom unmarshaller for CreateFuture. 15528func (future *ReplicationFabricsPurgeFuture) UnmarshalJSON(body []byte) error { 15529 var azFuture azure.Future 15530 if err := json.Unmarshal(body, &azFuture); err != nil { 15531 return err 15532 } 15533 future.FutureAPI = &azFuture 15534 future.Result = future.result 15535 return nil 15536} 15537 15538// result is the default implementation for ReplicationFabricsPurgeFuture.Result. 15539func (future *ReplicationFabricsPurgeFuture) result(client ReplicationFabricsClient) (ar autorest.Response, err error) { 15540 var done bool 15541 done, err = future.DoneWithContext(context.Background(), client) 15542 if err != nil { 15543 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsPurgeFuture", "Result", future.Response(), "Polling failure") 15544 return 15545 } 15546 if !done { 15547 ar.Response = future.Response() 15548 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsPurgeFuture") 15549 return 15550 } 15551 ar.Response = future.Response() 15552 return 15553} 15554 15555// ReplicationFabricsReassociateGatewayFuture an abstraction for monitoring and retrieving the results of a 15556// long-running operation. 15557type ReplicationFabricsReassociateGatewayFuture struct { 15558 azure.FutureAPI 15559 // Result returns the result of the asynchronous operation. 15560 // If the operation has not completed it will return an error. 15561 Result func(ReplicationFabricsClient) (Fabric, error) 15562} 15563 15564// UnmarshalJSON is the custom unmarshaller for CreateFuture. 15565func (future *ReplicationFabricsReassociateGatewayFuture) UnmarshalJSON(body []byte) error { 15566 var azFuture azure.Future 15567 if err := json.Unmarshal(body, &azFuture); err != nil { 15568 return err 15569 } 15570 future.FutureAPI = &azFuture 15571 future.Result = future.result 15572 return nil 15573} 15574 15575// result is the default implementation for ReplicationFabricsReassociateGatewayFuture.Result. 15576func (future *ReplicationFabricsReassociateGatewayFuture) result(client ReplicationFabricsClient) (f Fabric, err error) { 15577 var done bool 15578 done, err = future.DoneWithContext(context.Background(), client) 15579 if err != nil { 15580 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsReassociateGatewayFuture", "Result", future.Response(), "Polling failure") 15581 return 15582 } 15583 if !done { 15584 f.Response.Response = future.Response() 15585 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsReassociateGatewayFuture") 15586 return 15587 } 15588 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 15589 if f.Response.Response, err = future.GetResult(sender); err == nil && f.Response.Response.StatusCode != http.StatusNoContent { 15590 f, err = client.ReassociateGatewayResponder(f.Response.Response) 15591 if err != nil { 15592 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsReassociateGatewayFuture", "Result", f.Response.Response, "Failure responding to request") 15593 } 15594 } 15595 return 15596} 15597 15598// ReplicationFabricsRenewCertificateFuture an abstraction for monitoring and retrieving the results of a 15599// long-running operation. 15600type ReplicationFabricsRenewCertificateFuture struct { 15601 azure.FutureAPI 15602 // Result returns the result of the asynchronous operation. 15603 // If the operation has not completed it will return an error. 15604 Result func(ReplicationFabricsClient) (Fabric, error) 15605} 15606 15607// UnmarshalJSON is the custom unmarshaller for CreateFuture. 15608func (future *ReplicationFabricsRenewCertificateFuture) UnmarshalJSON(body []byte) error { 15609 var azFuture azure.Future 15610 if err := json.Unmarshal(body, &azFuture); err != nil { 15611 return err 15612 } 15613 future.FutureAPI = &azFuture 15614 future.Result = future.result 15615 return nil 15616} 15617 15618// result is the default implementation for ReplicationFabricsRenewCertificateFuture.Result. 15619func (future *ReplicationFabricsRenewCertificateFuture) result(client ReplicationFabricsClient) (f Fabric, err error) { 15620 var done bool 15621 done, err = future.DoneWithContext(context.Background(), client) 15622 if err != nil { 15623 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsRenewCertificateFuture", "Result", future.Response(), "Polling failure") 15624 return 15625 } 15626 if !done { 15627 f.Response.Response = future.Response() 15628 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsRenewCertificateFuture") 15629 return 15630 } 15631 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 15632 if f.Response.Response, err = future.GetResult(sender); err == nil && f.Response.Response.StatusCode != http.StatusNoContent { 15633 f, err = client.RenewCertificateResponder(f.Response.Response) 15634 if err != nil { 15635 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsRenewCertificateFuture", "Result", f.Response.Response, "Failure responding to request") 15636 } 15637 } 15638 return 15639} 15640 15641// ReplicationGroupDetails replication group details. This will be used in case of San and Wvr. 15642type ReplicationGroupDetails struct { 15643 // InstanceType - Possible values include: 'InstanceTypeConfigurationSettings', 'InstanceTypeHyperVVirtualMachine', 'InstanceTypeReplicationGroupDetails', 'InstanceTypeVmmVirtualMachine', 'InstanceTypeVMwareVirtualMachine' 15644 InstanceType InstanceTypeBasicConfigurationSettings `json:"instanceType,omitempty"` 15645} 15646 15647// MarshalJSON is the custom marshaler for ReplicationGroupDetails. 15648func (rgd ReplicationGroupDetails) MarshalJSON() ([]byte, error) { 15649 rgd.InstanceType = InstanceTypeReplicationGroupDetails 15650 objectMap := make(map[string]interface{}) 15651 if rgd.InstanceType != "" { 15652 objectMap["instanceType"] = rgd.InstanceType 15653 } 15654 return json.Marshal(objectMap) 15655} 15656 15657// AsHyperVVirtualMachineDetails is the BasicConfigurationSettings implementation for ReplicationGroupDetails. 15658func (rgd ReplicationGroupDetails) AsHyperVVirtualMachineDetails() (*HyperVVirtualMachineDetails, bool) { 15659 return nil, false 15660} 15661 15662// AsReplicationGroupDetails is the BasicConfigurationSettings implementation for ReplicationGroupDetails. 15663func (rgd ReplicationGroupDetails) AsReplicationGroupDetails() (*ReplicationGroupDetails, bool) { 15664 return &rgd, true 15665} 15666 15667// AsVmmVirtualMachineDetails is the BasicConfigurationSettings implementation for ReplicationGroupDetails. 15668func (rgd ReplicationGroupDetails) AsVmmVirtualMachineDetails() (*VmmVirtualMachineDetails, bool) { 15669 return nil, false 15670} 15671 15672// AsVMwareVirtualMachineDetails is the BasicConfigurationSettings implementation for ReplicationGroupDetails. 15673func (rgd ReplicationGroupDetails) AsVMwareVirtualMachineDetails() (*VMwareVirtualMachineDetails, bool) { 15674 return nil, false 15675} 15676 15677// AsConfigurationSettings is the BasicConfigurationSettings implementation for ReplicationGroupDetails. 15678func (rgd ReplicationGroupDetails) AsConfigurationSettings() (*ConfigurationSettings, bool) { 15679 return nil, false 15680} 15681 15682// AsBasicConfigurationSettings is the BasicConfigurationSettings implementation for ReplicationGroupDetails. 15683func (rgd ReplicationGroupDetails) AsBasicConfigurationSettings() (BasicConfigurationSettings, bool) { 15684 return &rgd, true 15685} 15686 15687// ReplicationJobsCancelFuture an abstraction for monitoring and retrieving the results of a long-running 15688// operation. 15689type ReplicationJobsCancelFuture struct { 15690 azure.FutureAPI 15691 // Result returns the result of the asynchronous operation. 15692 // If the operation has not completed it will return an error. 15693 Result func(ReplicationJobsClient) (Job, error) 15694} 15695 15696// UnmarshalJSON is the custom unmarshaller for CreateFuture. 15697func (future *ReplicationJobsCancelFuture) UnmarshalJSON(body []byte) error { 15698 var azFuture azure.Future 15699 if err := json.Unmarshal(body, &azFuture); err != nil { 15700 return err 15701 } 15702 future.FutureAPI = &azFuture 15703 future.Result = future.result 15704 return nil 15705} 15706 15707// result is the default implementation for ReplicationJobsCancelFuture.Result. 15708func (future *ReplicationJobsCancelFuture) result(client ReplicationJobsClient) (j Job, err error) { 15709 var done bool 15710 done, err = future.DoneWithContext(context.Background(), client) 15711 if err != nil { 15712 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsCancelFuture", "Result", future.Response(), "Polling failure") 15713 return 15714 } 15715 if !done { 15716 j.Response.Response = future.Response() 15717 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationJobsCancelFuture") 15718 return 15719 } 15720 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 15721 if j.Response.Response, err = future.GetResult(sender); err == nil && j.Response.Response.StatusCode != http.StatusNoContent { 15722 j, err = client.CancelResponder(j.Response.Response) 15723 if err != nil { 15724 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsCancelFuture", "Result", j.Response.Response, "Failure responding to request") 15725 } 15726 } 15727 return 15728} 15729 15730// ReplicationJobsExportFuture an abstraction for monitoring and retrieving the results of a long-running 15731// operation. 15732type ReplicationJobsExportFuture struct { 15733 azure.FutureAPI 15734 // Result returns the result of the asynchronous operation. 15735 // If the operation has not completed it will return an error. 15736 Result func(ReplicationJobsClient) (Job, error) 15737} 15738 15739// UnmarshalJSON is the custom unmarshaller for CreateFuture. 15740func (future *ReplicationJobsExportFuture) UnmarshalJSON(body []byte) error { 15741 var azFuture azure.Future 15742 if err := json.Unmarshal(body, &azFuture); err != nil { 15743 return err 15744 } 15745 future.FutureAPI = &azFuture 15746 future.Result = future.result 15747 return nil 15748} 15749 15750// result is the default implementation for ReplicationJobsExportFuture.Result. 15751func (future *ReplicationJobsExportFuture) result(client ReplicationJobsClient) (j Job, err error) { 15752 var done bool 15753 done, err = future.DoneWithContext(context.Background(), client) 15754 if err != nil { 15755 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsExportFuture", "Result", future.Response(), "Polling failure") 15756 return 15757 } 15758 if !done { 15759 j.Response.Response = future.Response() 15760 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationJobsExportFuture") 15761 return 15762 } 15763 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 15764 if j.Response.Response, err = future.GetResult(sender); err == nil && j.Response.Response.StatusCode != http.StatusNoContent { 15765 j, err = client.ExportResponder(j.Response.Response) 15766 if err != nil { 15767 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsExportFuture", "Result", j.Response.Response, "Failure responding to request") 15768 } 15769 } 15770 return 15771} 15772 15773// ReplicationJobsRestartFuture an abstraction for monitoring and retrieving the results of a long-running 15774// operation. 15775type ReplicationJobsRestartFuture struct { 15776 azure.FutureAPI 15777 // Result returns the result of the asynchronous operation. 15778 // If the operation has not completed it will return an error. 15779 Result func(ReplicationJobsClient) (Job, error) 15780} 15781 15782// UnmarshalJSON is the custom unmarshaller for CreateFuture. 15783func (future *ReplicationJobsRestartFuture) UnmarshalJSON(body []byte) error { 15784 var azFuture azure.Future 15785 if err := json.Unmarshal(body, &azFuture); err != nil { 15786 return err 15787 } 15788 future.FutureAPI = &azFuture 15789 future.Result = future.result 15790 return nil 15791} 15792 15793// result is the default implementation for ReplicationJobsRestartFuture.Result. 15794func (future *ReplicationJobsRestartFuture) result(client ReplicationJobsClient) (j Job, err error) { 15795 var done bool 15796 done, err = future.DoneWithContext(context.Background(), client) 15797 if err != nil { 15798 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsRestartFuture", "Result", future.Response(), "Polling failure") 15799 return 15800 } 15801 if !done { 15802 j.Response.Response = future.Response() 15803 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationJobsRestartFuture") 15804 return 15805 } 15806 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 15807 if j.Response.Response, err = future.GetResult(sender); err == nil && j.Response.Response.StatusCode != http.StatusNoContent { 15808 j, err = client.RestartResponder(j.Response.Response) 15809 if err != nil { 15810 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsRestartFuture", "Result", j.Response.Response, "Failure responding to request") 15811 } 15812 } 15813 return 15814} 15815 15816// ReplicationJobsResumeFuture an abstraction for monitoring and retrieving the results of a long-running 15817// operation. 15818type ReplicationJobsResumeFuture struct { 15819 azure.FutureAPI 15820 // Result returns the result of the asynchronous operation. 15821 // If the operation has not completed it will return an error. 15822 Result func(ReplicationJobsClient) (Job, error) 15823} 15824 15825// UnmarshalJSON is the custom unmarshaller for CreateFuture. 15826func (future *ReplicationJobsResumeFuture) UnmarshalJSON(body []byte) error { 15827 var azFuture azure.Future 15828 if err := json.Unmarshal(body, &azFuture); err != nil { 15829 return err 15830 } 15831 future.FutureAPI = &azFuture 15832 future.Result = future.result 15833 return nil 15834} 15835 15836// result is the default implementation for ReplicationJobsResumeFuture.Result. 15837func (future *ReplicationJobsResumeFuture) result(client ReplicationJobsClient) (j Job, err error) { 15838 var done bool 15839 done, err = future.DoneWithContext(context.Background(), client) 15840 if err != nil { 15841 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsResumeFuture", "Result", future.Response(), "Polling failure") 15842 return 15843 } 15844 if !done { 15845 j.Response.Response = future.Response() 15846 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationJobsResumeFuture") 15847 return 15848 } 15849 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 15850 if j.Response.Response, err = future.GetResult(sender); err == nil && j.Response.Response.StatusCode != http.StatusNoContent { 15851 j, err = client.ResumeResponder(j.Response.Response) 15852 if err != nil { 15853 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsResumeFuture", "Result", j.Response.Response, "Failure responding to request") 15854 } 15855 } 15856 return 15857} 15858 15859// ReplicationMigrationItemsCreateFuture an abstraction for monitoring and retrieving the results of a 15860// long-running operation. 15861type ReplicationMigrationItemsCreateFuture struct { 15862 azure.FutureAPI 15863 // Result returns the result of the asynchronous operation. 15864 // If the operation has not completed it will return an error. 15865 Result func(ReplicationMigrationItemsClient) (MigrationItem, error) 15866} 15867 15868// UnmarshalJSON is the custom unmarshaller for CreateFuture. 15869func (future *ReplicationMigrationItemsCreateFuture) UnmarshalJSON(body []byte) error { 15870 var azFuture azure.Future 15871 if err := json.Unmarshal(body, &azFuture); err != nil { 15872 return err 15873 } 15874 future.FutureAPI = &azFuture 15875 future.Result = future.result 15876 return nil 15877} 15878 15879// result is the default implementation for ReplicationMigrationItemsCreateFuture.Result. 15880func (future *ReplicationMigrationItemsCreateFuture) result(client ReplicationMigrationItemsClient) (mi MigrationItem, err error) { 15881 var done bool 15882 done, err = future.DoneWithContext(context.Background(), client) 15883 if err != nil { 15884 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsCreateFuture", "Result", future.Response(), "Polling failure") 15885 return 15886 } 15887 if !done { 15888 mi.Response.Response = future.Response() 15889 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationMigrationItemsCreateFuture") 15890 return 15891 } 15892 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 15893 if mi.Response.Response, err = future.GetResult(sender); err == nil && mi.Response.Response.StatusCode != http.StatusNoContent { 15894 mi, err = client.CreateResponder(mi.Response.Response) 15895 if err != nil { 15896 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsCreateFuture", "Result", mi.Response.Response, "Failure responding to request") 15897 } 15898 } 15899 return 15900} 15901 15902// ReplicationMigrationItemsDeleteFuture an abstraction for monitoring and retrieving the results of a 15903// long-running operation. 15904type ReplicationMigrationItemsDeleteFuture struct { 15905 azure.FutureAPI 15906 // Result returns the result of the asynchronous operation. 15907 // If the operation has not completed it will return an error. 15908 Result func(ReplicationMigrationItemsClient) (autorest.Response, error) 15909} 15910 15911// UnmarshalJSON is the custom unmarshaller for CreateFuture. 15912func (future *ReplicationMigrationItemsDeleteFuture) UnmarshalJSON(body []byte) error { 15913 var azFuture azure.Future 15914 if err := json.Unmarshal(body, &azFuture); err != nil { 15915 return err 15916 } 15917 future.FutureAPI = &azFuture 15918 future.Result = future.result 15919 return nil 15920} 15921 15922// result is the default implementation for ReplicationMigrationItemsDeleteFuture.Result. 15923func (future *ReplicationMigrationItemsDeleteFuture) result(client ReplicationMigrationItemsClient) (ar autorest.Response, err error) { 15924 var done bool 15925 done, err = future.DoneWithContext(context.Background(), client) 15926 if err != nil { 15927 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsDeleteFuture", "Result", future.Response(), "Polling failure") 15928 return 15929 } 15930 if !done { 15931 ar.Response = future.Response() 15932 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationMigrationItemsDeleteFuture") 15933 return 15934 } 15935 ar.Response = future.Response() 15936 return 15937} 15938 15939// ReplicationMigrationItemsMigrateFuture an abstraction for monitoring and retrieving the results of a 15940// long-running operation. 15941type ReplicationMigrationItemsMigrateFuture struct { 15942 azure.FutureAPI 15943 // Result returns the result of the asynchronous operation. 15944 // If the operation has not completed it will return an error. 15945 Result func(ReplicationMigrationItemsClient) (MigrationItem, error) 15946} 15947 15948// UnmarshalJSON is the custom unmarshaller for CreateFuture. 15949func (future *ReplicationMigrationItemsMigrateFuture) UnmarshalJSON(body []byte) error { 15950 var azFuture azure.Future 15951 if err := json.Unmarshal(body, &azFuture); err != nil { 15952 return err 15953 } 15954 future.FutureAPI = &azFuture 15955 future.Result = future.result 15956 return nil 15957} 15958 15959// result is the default implementation for ReplicationMigrationItemsMigrateFuture.Result. 15960func (future *ReplicationMigrationItemsMigrateFuture) result(client ReplicationMigrationItemsClient) (mi MigrationItem, err error) { 15961 var done bool 15962 done, err = future.DoneWithContext(context.Background(), client) 15963 if err != nil { 15964 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsMigrateFuture", "Result", future.Response(), "Polling failure") 15965 return 15966 } 15967 if !done { 15968 mi.Response.Response = future.Response() 15969 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationMigrationItemsMigrateFuture") 15970 return 15971 } 15972 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 15973 if mi.Response.Response, err = future.GetResult(sender); err == nil && mi.Response.Response.StatusCode != http.StatusNoContent { 15974 mi, err = client.MigrateResponder(mi.Response.Response) 15975 if err != nil { 15976 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsMigrateFuture", "Result", mi.Response.Response, "Failure responding to request") 15977 } 15978 } 15979 return 15980} 15981 15982// ReplicationMigrationItemsResyncFuture an abstraction for monitoring and retrieving the results of a 15983// long-running operation. 15984type ReplicationMigrationItemsResyncFuture struct { 15985 azure.FutureAPI 15986 // Result returns the result of the asynchronous operation. 15987 // If the operation has not completed it will return an error. 15988 Result func(ReplicationMigrationItemsClient) (MigrationItem, error) 15989} 15990 15991// UnmarshalJSON is the custom unmarshaller for CreateFuture. 15992func (future *ReplicationMigrationItemsResyncFuture) UnmarshalJSON(body []byte) error { 15993 var azFuture azure.Future 15994 if err := json.Unmarshal(body, &azFuture); err != nil { 15995 return err 15996 } 15997 future.FutureAPI = &azFuture 15998 future.Result = future.result 15999 return nil 16000} 16001 16002// result is the default implementation for ReplicationMigrationItemsResyncFuture.Result. 16003func (future *ReplicationMigrationItemsResyncFuture) result(client ReplicationMigrationItemsClient) (mi MigrationItem, err error) { 16004 var done bool 16005 done, err = future.DoneWithContext(context.Background(), client) 16006 if err != nil { 16007 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsResyncFuture", "Result", future.Response(), "Polling failure") 16008 return 16009 } 16010 if !done { 16011 mi.Response.Response = future.Response() 16012 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationMigrationItemsResyncFuture") 16013 return 16014 } 16015 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 16016 if mi.Response.Response, err = future.GetResult(sender); err == nil && mi.Response.Response.StatusCode != http.StatusNoContent { 16017 mi, err = client.ResyncResponder(mi.Response.Response) 16018 if err != nil { 16019 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsResyncFuture", "Result", mi.Response.Response, "Failure responding to request") 16020 } 16021 } 16022 return 16023} 16024 16025// ReplicationMigrationItemsTestMigrateCleanupFuture an abstraction for monitoring and retrieving the 16026// results of a long-running operation. 16027type ReplicationMigrationItemsTestMigrateCleanupFuture struct { 16028 azure.FutureAPI 16029 // Result returns the result of the asynchronous operation. 16030 // If the operation has not completed it will return an error. 16031 Result func(ReplicationMigrationItemsClient) (MigrationItem, error) 16032} 16033 16034// UnmarshalJSON is the custom unmarshaller for CreateFuture. 16035func (future *ReplicationMigrationItemsTestMigrateCleanupFuture) UnmarshalJSON(body []byte) error { 16036 var azFuture azure.Future 16037 if err := json.Unmarshal(body, &azFuture); err != nil { 16038 return err 16039 } 16040 future.FutureAPI = &azFuture 16041 future.Result = future.result 16042 return nil 16043} 16044 16045// result is the default implementation for ReplicationMigrationItemsTestMigrateCleanupFuture.Result. 16046func (future *ReplicationMigrationItemsTestMigrateCleanupFuture) result(client ReplicationMigrationItemsClient) (mi MigrationItem, err error) { 16047 var done bool 16048 done, err = future.DoneWithContext(context.Background(), client) 16049 if err != nil { 16050 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsTestMigrateCleanupFuture", "Result", future.Response(), "Polling failure") 16051 return 16052 } 16053 if !done { 16054 mi.Response.Response = future.Response() 16055 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationMigrationItemsTestMigrateCleanupFuture") 16056 return 16057 } 16058 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 16059 if mi.Response.Response, err = future.GetResult(sender); err == nil && mi.Response.Response.StatusCode != http.StatusNoContent { 16060 mi, err = client.TestMigrateCleanupResponder(mi.Response.Response) 16061 if err != nil { 16062 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsTestMigrateCleanupFuture", "Result", mi.Response.Response, "Failure responding to request") 16063 } 16064 } 16065 return 16066} 16067 16068// ReplicationMigrationItemsTestMigrateFuture an abstraction for monitoring and retrieving the results of a 16069// long-running operation. 16070type ReplicationMigrationItemsTestMigrateFuture struct { 16071 azure.FutureAPI 16072 // Result returns the result of the asynchronous operation. 16073 // If the operation has not completed it will return an error. 16074 Result func(ReplicationMigrationItemsClient) (MigrationItem, error) 16075} 16076 16077// UnmarshalJSON is the custom unmarshaller for CreateFuture. 16078func (future *ReplicationMigrationItemsTestMigrateFuture) UnmarshalJSON(body []byte) error { 16079 var azFuture azure.Future 16080 if err := json.Unmarshal(body, &azFuture); err != nil { 16081 return err 16082 } 16083 future.FutureAPI = &azFuture 16084 future.Result = future.result 16085 return nil 16086} 16087 16088// result is the default implementation for ReplicationMigrationItemsTestMigrateFuture.Result. 16089func (future *ReplicationMigrationItemsTestMigrateFuture) result(client ReplicationMigrationItemsClient) (mi MigrationItem, err error) { 16090 var done bool 16091 done, err = future.DoneWithContext(context.Background(), client) 16092 if err != nil { 16093 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsTestMigrateFuture", "Result", future.Response(), "Polling failure") 16094 return 16095 } 16096 if !done { 16097 mi.Response.Response = future.Response() 16098 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationMigrationItemsTestMigrateFuture") 16099 return 16100 } 16101 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 16102 if mi.Response.Response, err = future.GetResult(sender); err == nil && mi.Response.Response.StatusCode != http.StatusNoContent { 16103 mi, err = client.TestMigrateResponder(mi.Response.Response) 16104 if err != nil { 16105 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsTestMigrateFuture", "Result", mi.Response.Response, "Failure responding to request") 16106 } 16107 } 16108 return 16109} 16110 16111// ReplicationMigrationItemsUpdateFuture an abstraction for monitoring and retrieving the results of a 16112// long-running operation. 16113type ReplicationMigrationItemsUpdateFuture struct { 16114 azure.FutureAPI 16115 // Result returns the result of the asynchronous operation. 16116 // If the operation has not completed it will return an error. 16117 Result func(ReplicationMigrationItemsClient) (MigrationItem, error) 16118} 16119 16120// UnmarshalJSON is the custom unmarshaller for CreateFuture. 16121func (future *ReplicationMigrationItemsUpdateFuture) UnmarshalJSON(body []byte) error { 16122 var azFuture azure.Future 16123 if err := json.Unmarshal(body, &azFuture); err != nil { 16124 return err 16125 } 16126 future.FutureAPI = &azFuture 16127 future.Result = future.result 16128 return nil 16129} 16130 16131// result is the default implementation for ReplicationMigrationItemsUpdateFuture.Result. 16132func (future *ReplicationMigrationItemsUpdateFuture) result(client ReplicationMigrationItemsClient) (mi MigrationItem, err error) { 16133 var done bool 16134 done, err = future.DoneWithContext(context.Background(), client) 16135 if err != nil { 16136 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsUpdateFuture", "Result", future.Response(), "Polling failure") 16137 return 16138 } 16139 if !done { 16140 mi.Response.Response = future.Response() 16141 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationMigrationItemsUpdateFuture") 16142 return 16143 } 16144 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 16145 if mi.Response.Response, err = future.GetResult(sender); err == nil && mi.Response.Response.StatusCode != http.StatusNoContent { 16146 mi, err = client.UpdateResponder(mi.Response.Response) 16147 if err != nil { 16148 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsUpdateFuture", "Result", mi.Response.Response, "Failure responding to request") 16149 } 16150 } 16151 return 16152} 16153 16154// ReplicationNetworkMappingsCreateFuture an abstraction for monitoring and retrieving the results of a 16155// long-running operation. 16156type ReplicationNetworkMappingsCreateFuture struct { 16157 azure.FutureAPI 16158 // Result returns the result of the asynchronous operation. 16159 // If the operation has not completed it will return an error. 16160 Result func(ReplicationNetworkMappingsClient) (NetworkMapping, error) 16161} 16162 16163// UnmarshalJSON is the custom unmarshaller for CreateFuture. 16164func (future *ReplicationNetworkMappingsCreateFuture) UnmarshalJSON(body []byte) error { 16165 var azFuture azure.Future 16166 if err := json.Unmarshal(body, &azFuture); err != nil { 16167 return err 16168 } 16169 future.FutureAPI = &azFuture 16170 future.Result = future.result 16171 return nil 16172} 16173 16174// result is the default implementation for ReplicationNetworkMappingsCreateFuture.Result. 16175func (future *ReplicationNetworkMappingsCreateFuture) result(client ReplicationNetworkMappingsClient) (nm NetworkMapping, err error) { 16176 var done bool 16177 done, err = future.DoneWithContext(context.Background(), client) 16178 if err != nil { 16179 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsCreateFuture", "Result", future.Response(), "Polling failure") 16180 return 16181 } 16182 if !done { 16183 nm.Response.Response = future.Response() 16184 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationNetworkMappingsCreateFuture") 16185 return 16186 } 16187 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 16188 if nm.Response.Response, err = future.GetResult(sender); err == nil && nm.Response.Response.StatusCode != http.StatusNoContent { 16189 nm, err = client.CreateResponder(nm.Response.Response) 16190 if err != nil { 16191 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsCreateFuture", "Result", nm.Response.Response, "Failure responding to request") 16192 } 16193 } 16194 return 16195} 16196 16197// ReplicationNetworkMappingsDeleteFuture an abstraction for monitoring and retrieving the results of a 16198// long-running operation. 16199type ReplicationNetworkMappingsDeleteFuture struct { 16200 azure.FutureAPI 16201 // Result returns the result of the asynchronous operation. 16202 // If the operation has not completed it will return an error. 16203 Result func(ReplicationNetworkMappingsClient) (autorest.Response, error) 16204} 16205 16206// UnmarshalJSON is the custom unmarshaller for CreateFuture. 16207func (future *ReplicationNetworkMappingsDeleteFuture) UnmarshalJSON(body []byte) error { 16208 var azFuture azure.Future 16209 if err := json.Unmarshal(body, &azFuture); err != nil { 16210 return err 16211 } 16212 future.FutureAPI = &azFuture 16213 future.Result = future.result 16214 return nil 16215} 16216 16217// result is the default implementation for ReplicationNetworkMappingsDeleteFuture.Result. 16218func (future *ReplicationNetworkMappingsDeleteFuture) result(client ReplicationNetworkMappingsClient) (ar autorest.Response, err error) { 16219 var done bool 16220 done, err = future.DoneWithContext(context.Background(), client) 16221 if err != nil { 16222 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsDeleteFuture", "Result", future.Response(), "Polling failure") 16223 return 16224 } 16225 if !done { 16226 ar.Response = future.Response() 16227 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationNetworkMappingsDeleteFuture") 16228 return 16229 } 16230 ar.Response = future.Response() 16231 return 16232} 16233 16234// ReplicationNetworkMappingsUpdateFuture an abstraction for monitoring and retrieving the results of a 16235// long-running operation. 16236type ReplicationNetworkMappingsUpdateFuture struct { 16237 azure.FutureAPI 16238 // Result returns the result of the asynchronous operation. 16239 // If the operation has not completed it will return an error. 16240 Result func(ReplicationNetworkMappingsClient) (NetworkMapping, error) 16241} 16242 16243// UnmarshalJSON is the custom unmarshaller for CreateFuture. 16244func (future *ReplicationNetworkMappingsUpdateFuture) UnmarshalJSON(body []byte) error { 16245 var azFuture azure.Future 16246 if err := json.Unmarshal(body, &azFuture); err != nil { 16247 return err 16248 } 16249 future.FutureAPI = &azFuture 16250 future.Result = future.result 16251 return nil 16252} 16253 16254// result is the default implementation for ReplicationNetworkMappingsUpdateFuture.Result. 16255func (future *ReplicationNetworkMappingsUpdateFuture) result(client ReplicationNetworkMappingsClient) (nm NetworkMapping, err error) { 16256 var done bool 16257 done, err = future.DoneWithContext(context.Background(), client) 16258 if err != nil { 16259 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsUpdateFuture", "Result", future.Response(), "Polling failure") 16260 return 16261 } 16262 if !done { 16263 nm.Response.Response = future.Response() 16264 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationNetworkMappingsUpdateFuture") 16265 return 16266 } 16267 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 16268 if nm.Response.Response, err = future.GetResult(sender); err == nil && nm.Response.Response.StatusCode != http.StatusNoContent { 16269 nm, err = client.UpdateResponder(nm.Response.Response) 16270 if err != nil { 16271 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsUpdateFuture", "Result", nm.Response.Response, "Failure responding to request") 16272 } 16273 } 16274 return 16275} 16276 16277// ReplicationPoliciesCreateFuture an abstraction for monitoring and retrieving the results of a 16278// long-running operation. 16279type ReplicationPoliciesCreateFuture struct { 16280 azure.FutureAPI 16281 // Result returns the result of the asynchronous operation. 16282 // If the operation has not completed it will return an error. 16283 Result func(ReplicationPoliciesClient) (Policy, error) 16284} 16285 16286// UnmarshalJSON is the custom unmarshaller for CreateFuture. 16287func (future *ReplicationPoliciesCreateFuture) UnmarshalJSON(body []byte) error { 16288 var azFuture azure.Future 16289 if err := json.Unmarshal(body, &azFuture); err != nil { 16290 return err 16291 } 16292 future.FutureAPI = &azFuture 16293 future.Result = future.result 16294 return nil 16295} 16296 16297// result is the default implementation for ReplicationPoliciesCreateFuture.Result. 16298func (future *ReplicationPoliciesCreateFuture) result(client ReplicationPoliciesClient) (p Policy, err error) { 16299 var done bool 16300 done, err = future.DoneWithContext(context.Background(), client) 16301 if err != nil { 16302 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesCreateFuture", "Result", future.Response(), "Polling failure") 16303 return 16304 } 16305 if !done { 16306 p.Response.Response = future.Response() 16307 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationPoliciesCreateFuture") 16308 return 16309 } 16310 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 16311 if p.Response.Response, err = future.GetResult(sender); err == nil && p.Response.Response.StatusCode != http.StatusNoContent { 16312 p, err = client.CreateResponder(p.Response.Response) 16313 if err != nil { 16314 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesCreateFuture", "Result", p.Response.Response, "Failure responding to request") 16315 } 16316 } 16317 return 16318} 16319 16320// ReplicationPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a 16321// long-running operation. 16322type ReplicationPoliciesDeleteFuture struct { 16323 azure.FutureAPI 16324 // Result returns the result of the asynchronous operation. 16325 // If the operation has not completed it will return an error. 16326 Result func(ReplicationPoliciesClient) (autorest.Response, error) 16327} 16328 16329// UnmarshalJSON is the custom unmarshaller for CreateFuture. 16330func (future *ReplicationPoliciesDeleteFuture) UnmarshalJSON(body []byte) error { 16331 var azFuture azure.Future 16332 if err := json.Unmarshal(body, &azFuture); err != nil { 16333 return err 16334 } 16335 future.FutureAPI = &azFuture 16336 future.Result = future.result 16337 return nil 16338} 16339 16340// result is the default implementation for ReplicationPoliciesDeleteFuture.Result. 16341func (future *ReplicationPoliciesDeleteFuture) result(client ReplicationPoliciesClient) (ar autorest.Response, err error) { 16342 var done bool 16343 done, err = future.DoneWithContext(context.Background(), client) 16344 if err != nil { 16345 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesDeleteFuture", "Result", future.Response(), "Polling failure") 16346 return 16347 } 16348 if !done { 16349 ar.Response = future.Response() 16350 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationPoliciesDeleteFuture") 16351 return 16352 } 16353 ar.Response = future.Response() 16354 return 16355} 16356 16357// ReplicationPoliciesUpdateFuture an abstraction for monitoring and retrieving the results of a 16358// long-running operation. 16359type ReplicationPoliciesUpdateFuture struct { 16360 azure.FutureAPI 16361 // Result returns the result of the asynchronous operation. 16362 // If the operation has not completed it will return an error. 16363 Result func(ReplicationPoliciesClient) (Policy, error) 16364} 16365 16366// UnmarshalJSON is the custom unmarshaller for CreateFuture. 16367func (future *ReplicationPoliciesUpdateFuture) UnmarshalJSON(body []byte) error { 16368 var azFuture azure.Future 16369 if err := json.Unmarshal(body, &azFuture); err != nil { 16370 return err 16371 } 16372 future.FutureAPI = &azFuture 16373 future.Result = future.result 16374 return nil 16375} 16376 16377// result is the default implementation for ReplicationPoliciesUpdateFuture.Result. 16378func (future *ReplicationPoliciesUpdateFuture) result(client ReplicationPoliciesClient) (p Policy, err error) { 16379 var done bool 16380 done, err = future.DoneWithContext(context.Background(), client) 16381 if err != nil { 16382 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesUpdateFuture", "Result", future.Response(), "Polling failure") 16383 return 16384 } 16385 if !done { 16386 p.Response.Response = future.Response() 16387 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationPoliciesUpdateFuture") 16388 return 16389 } 16390 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 16391 if p.Response.Response, err = future.GetResult(sender); err == nil && p.Response.Response.StatusCode != http.StatusNoContent { 16392 p, err = client.UpdateResponder(p.Response.Response) 16393 if err != nil { 16394 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesUpdateFuture", "Result", p.Response.Response, "Failure responding to request") 16395 } 16396 } 16397 return 16398} 16399 16400// ReplicationProtectedItem replication protected item. 16401type ReplicationProtectedItem struct { 16402 autorest.Response `json:"-"` 16403 // Properties - The custom data. 16404 Properties *ReplicationProtectedItemProperties `json:"properties,omitempty"` 16405 // ID - READ-ONLY; Resource Id 16406 ID *string `json:"id,omitempty"` 16407 // Name - READ-ONLY; Resource Name 16408 Name *string `json:"name,omitempty"` 16409 // Type - READ-ONLY; Resource Type 16410 Type *string `json:"type,omitempty"` 16411 // Location - Resource Location 16412 Location *string `json:"location,omitempty"` 16413} 16414 16415// MarshalJSON is the custom marshaler for ReplicationProtectedItem. 16416func (rpi ReplicationProtectedItem) MarshalJSON() ([]byte, error) { 16417 objectMap := make(map[string]interface{}) 16418 if rpi.Properties != nil { 16419 objectMap["properties"] = rpi.Properties 16420 } 16421 if rpi.Location != nil { 16422 objectMap["location"] = rpi.Location 16423 } 16424 return json.Marshal(objectMap) 16425} 16426 16427// ReplicationProtectedItemCollection replication protected item collection. 16428type ReplicationProtectedItemCollection struct { 16429 autorest.Response `json:"-"` 16430 // Value - The Replication protected item details. 16431 Value *[]ReplicationProtectedItem `json:"value,omitempty"` 16432 // NextLink - The value of next link. 16433 NextLink *string `json:"nextLink,omitempty"` 16434} 16435 16436// ReplicationProtectedItemCollectionIterator provides access to a complete listing of 16437// ReplicationProtectedItem values. 16438type ReplicationProtectedItemCollectionIterator struct { 16439 i int 16440 page ReplicationProtectedItemCollectionPage 16441} 16442 16443// NextWithContext advances to the next value. If there was an error making 16444// the request the iterator does not advance and the error is returned. 16445func (iter *ReplicationProtectedItemCollectionIterator) NextWithContext(ctx context.Context) (err error) { 16446 if tracing.IsEnabled() { 16447 ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectedItemCollectionIterator.NextWithContext") 16448 defer func() { 16449 sc := -1 16450 if iter.Response().Response.Response != nil { 16451 sc = iter.Response().Response.Response.StatusCode 16452 } 16453 tracing.EndSpan(ctx, sc, err) 16454 }() 16455 } 16456 iter.i++ 16457 if iter.i < len(iter.page.Values()) { 16458 return nil 16459 } 16460 err = iter.page.NextWithContext(ctx) 16461 if err != nil { 16462 iter.i-- 16463 return err 16464 } 16465 iter.i = 0 16466 return nil 16467} 16468 16469// Next advances to the next value. If there was an error making 16470// the request the iterator does not advance and the error is returned. 16471// Deprecated: Use NextWithContext() instead. 16472func (iter *ReplicationProtectedItemCollectionIterator) Next() error { 16473 return iter.NextWithContext(context.Background()) 16474} 16475 16476// NotDone returns true if the enumeration should be started or is not yet complete. 16477func (iter ReplicationProtectedItemCollectionIterator) NotDone() bool { 16478 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 16479} 16480 16481// Response returns the raw server response from the last page request. 16482func (iter ReplicationProtectedItemCollectionIterator) Response() ReplicationProtectedItemCollection { 16483 return iter.page.Response() 16484} 16485 16486// Value returns the current value or a zero-initialized value if the 16487// iterator has advanced beyond the end of the collection. 16488func (iter ReplicationProtectedItemCollectionIterator) Value() ReplicationProtectedItem { 16489 if !iter.page.NotDone() { 16490 return ReplicationProtectedItem{} 16491 } 16492 return iter.page.Values()[iter.i] 16493} 16494 16495// Creates a new instance of the ReplicationProtectedItemCollectionIterator type. 16496func NewReplicationProtectedItemCollectionIterator(page ReplicationProtectedItemCollectionPage) ReplicationProtectedItemCollectionIterator { 16497 return ReplicationProtectedItemCollectionIterator{page: page} 16498} 16499 16500// IsEmpty returns true if the ListResult contains no values. 16501func (rpic ReplicationProtectedItemCollection) IsEmpty() bool { 16502 return rpic.Value == nil || len(*rpic.Value) == 0 16503} 16504 16505// hasNextLink returns true if the NextLink is not empty. 16506func (rpic ReplicationProtectedItemCollection) hasNextLink() bool { 16507 return rpic.NextLink != nil && len(*rpic.NextLink) != 0 16508} 16509 16510// replicationProtectedItemCollectionPreparer prepares a request to retrieve the next set of results. 16511// It returns nil if no more results exist. 16512func (rpic ReplicationProtectedItemCollection) replicationProtectedItemCollectionPreparer(ctx context.Context) (*http.Request, error) { 16513 if !rpic.hasNextLink() { 16514 return nil, nil 16515 } 16516 return autorest.Prepare((&http.Request{}).WithContext(ctx), 16517 autorest.AsJSON(), 16518 autorest.AsGet(), 16519 autorest.WithBaseURL(to.String(rpic.NextLink))) 16520} 16521 16522// ReplicationProtectedItemCollectionPage contains a page of ReplicationProtectedItem values. 16523type ReplicationProtectedItemCollectionPage struct { 16524 fn func(context.Context, ReplicationProtectedItemCollection) (ReplicationProtectedItemCollection, error) 16525 rpic ReplicationProtectedItemCollection 16526} 16527 16528// NextWithContext advances to the next page of values. If there was an error making 16529// the request the page does not advance and the error is returned. 16530func (page *ReplicationProtectedItemCollectionPage) NextWithContext(ctx context.Context) (err error) { 16531 if tracing.IsEnabled() { 16532 ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectedItemCollectionPage.NextWithContext") 16533 defer func() { 16534 sc := -1 16535 if page.Response().Response.Response != nil { 16536 sc = page.Response().Response.Response.StatusCode 16537 } 16538 tracing.EndSpan(ctx, sc, err) 16539 }() 16540 } 16541 for { 16542 next, err := page.fn(ctx, page.rpic) 16543 if err != nil { 16544 return err 16545 } 16546 page.rpic = next 16547 if !next.hasNextLink() || !next.IsEmpty() { 16548 break 16549 } 16550 } 16551 return nil 16552} 16553 16554// Next advances to the next page of values. If there was an error making 16555// the request the page does not advance and the error is returned. 16556// Deprecated: Use NextWithContext() instead. 16557func (page *ReplicationProtectedItemCollectionPage) Next() error { 16558 return page.NextWithContext(context.Background()) 16559} 16560 16561// NotDone returns true if the page enumeration should be started or is not yet complete. 16562func (page ReplicationProtectedItemCollectionPage) NotDone() bool { 16563 return !page.rpic.IsEmpty() 16564} 16565 16566// Response returns the raw server response from the last page request. 16567func (page ReplicationProtectedItemCollectionPage) Response() ReplicationProtectedItemCollection { 16568 return page.rpic 16569} 16570 16571// Values returns the slice of values for the current page or nil if there are no values. 16572func (page ReplicationProtectedItemCollectionPage) Values() []ReplicationProtectedItem { 16573 if page.rpic.IsEmpty() { 16574 return nil 16575 } 16576 return *page.rpic.Value 16577} 16578 16579// Creates a new instance of the ReplicationProtectedItemCollectionPage type. 16580func NewReplicationProtectedItemCollectionPage(cur ReplicationProtectedItemCollection, getNextPage func(context.Context, ReplicationProtectedItemCollection) (ReplicationProtectedItemCollection, error)) ReplicationProtectedItemCollectionPage { 16581 return ReplicationProtectedItemCollectionPage{ 16582 fn: getNextPage, 16583 rpic: cur, 16584 } 16585} 16586 16587// ReplicationProtectedItemProperties replication protected item custom data details. 16588type ReplicationProtectedItemProperties struct { 16589 // FriendlyName - The name. 16590 FriendlyName *string `json:"friendlyName,omitempty"` 16591 // ProtectedItemType - The type of protected item type. 16592 ProtectedItemType *string `json:"protectedItemType,omitempty"` 16593 // ProtectableItemID - The protected item ARM Id. 16594 ProtectableItemID *string `json:"protectableItemId,omitempty"` 16595 // RecoveryServicesProviderID - The recovery provider ARM Id. 16596 RecoveryServicesProviderID *string `json:"recoveryServicesProviderId,omitempty"` 16597 // PrimaryFabricFriendlyName - The friendly name of the primary fabric. 16598 PrimaryFabricFriendlyName *string `json:"primaryFabricFriendlyName,omitempty"` 16599 // PrimaryFabricProvider - The fabric provider of the primary fabric. 16600 PrimaryFabricProvider *string `json:"primaryFabricProvider,omitempty"` 16601 // RecoveryFabricFriendlyName - The friendly name of recovery fabric. 16602 RecoveryFabricFriendlyName *string `json:"recoveryFabricFriendlyName,omitempty"` 16603 // RecoveryFabricID - The Arm Id of recovery fabric. 16604 RecoveryFabricID *string `json:"recoveryFabricId,omitempty"` 16605 // PrimaryProtectionContainerFriendlyName - The name of primary protection container friendly name. 16606 PrimaryProtectionContainerFriendlyName *string `json:"primaryProtectionContainerFriendlyName,omitempty"` 16607 // RecoveryProtectionContainerFriendlyName - The name of recovery container friendly name. 16608 RecoveryProtectionContainerFriendlyName *string `json:"recoveryProtectionContainerFriendlyName,omitempty"` 16609 // ProtectionState - The protection status. 16610 ProtectionState *string `json:"protectionState,omitempty"` 16611 // ProtectionStateDescription - The protection state description. 16612 ProtectionStateDescription *string `json:"protectionStateDescription,omitempty"` 16613 // ActiveLocation - The Current active location of the PE. 16614 ActiveLocation *string `json:"activeLocation,omitempty"` 16615 // TestFailoverState - The Test failover state. 16616 TestFailoverState *string `json:"testFailoverState,omitempty"` 16617 // TestFailoverStateDescription - The Test failover state description. 16618 TestFailoverStateDescription *string `json:"testFailoverStateDescription,omitempty"` 16619 // AllowedOperations - The allowed operations on the Replication protected item. 16620 AllowedOperations *[]string `json:"allowedOperations,omitempty"` 16621 // ReplicationHealth - The consolidated protection health for the VM taking any issues with SRS as well as all the replication units associated with the VM's replication group into account. This is a string representation of the ProtectionHealth enumeration. 16622 ReplicationHealth *string `json:"replicationHealth,omitempty"` 16623 // FailoverHealth - The consolidated failover health for the VM. 16624 FailoverHealth *string `json:"failoverHealth,omitempty"` 16625 // HealthErrors - List of health errors. 16626 HealthErrors *[]HealthError `json:"healthErrors,omitempty"` 16627 // PolicyID - The ID of Policy governing this PE. 16628 PolicyID *string `json:"policyId,omitempty"` 16629 // PolicyFriendlyName - The name of Policy governing this PE. 16630 PolicyFriendlyName *string `json:"policyFriendlyName,omitempty"` 16631 // LastSuccessfulFailoverTime - The Last successful failover time. 16632 LastSuccessfulFailoverTime *date.Time `json:"lastSuccessfulFailoverTime,omitempty"` 16633 // LastSuccessfulTestFailoverTime - The Last successful test failover time. 16634 LastSuccessfulTestFailoverTime *date.Time `json:"lastSuccessfulTestFailoverTime,omitempty"` 16635 // CurrentScenario - The current scenario. 16636 CurrentScenario *CurrentScenarioDetails `json:"currentScenario,omitempty"` 16637 // FailoverRecoveryPointID - The recovery point ARM Id to which the Vm was failed over. 16638 FailoverRecoveryPointID *string `json:"failoverRecoveryPointId,omitempty"` 16639 // ProviderSpecificDetails - The Replication provider custom settings. 16640 ProviderSpecificDetails BasicReplicationProviderSpecificSettings `json:"providerSpecificDetails,omitempty"` 16641 // RecoveryContainerID - The recovery container Id. 16642 RecoveryContainerID *string `json:"recoveryContainerId,omitempty"` 16643} 16644 16645// UnmarshalJSON is the custom unmarshaler for ReplicationProtectedItemProperties struct. 16646func (rpip *ReplicationProtectedItemProperties) UnmarshalJSON(body []byte) error { 16647 var m map[string]*json.RawMessage 16648 err := json.Unmarshal(body, &m) 16649 if err != nil { 16650 return err 16651 } 16652 for k, v := range m { 16653 switch k { 16654 case "friendlyName": 16655 if v != nil { 16656 var friendlyName string 16657 err = json.Unmarshal(*v, &friendlyName) 16658 if err != nil { 16659 return err 16660 } 16661 rpip.FriendlyName = &friendlyName 16662 } 16663 case "protectedItemType": 16664 if v != nil { 16665 var protectedItemType string 16666 err = json.Unmarshal(*v, &protectedItemType) 16667 if err != nil { 16668 return err 16669 } 16670 rpip.ProtectedItemType = &protectedItemType 16671 } 16672 case "protectableItemId": 16673 if v != nil { 16674 var protectableItemID string 16675 err = json.Unmarshal(*v, &protectableItemID) 16676 if err != nil { 16677 return err 16678 } 16679 rpip.ProtectableItemID = &protectableItemID 16680 } 16681 case "recoveryServicesProviderId": 16682 if v != nil { 16683 var recoveryServicesProviderID string 16684 err = json.Unmarshal(*v, &recoveryServicesProviderID) 16685 if err != nil { 16686 return err 16687 } 16688 rpip.RecoveryServicesProviderID = &recoveryServicesProviderID 16689 } 16690 case "primaryFabricFriendlyName": 16691 if v != nil { 16692 var primaryFabricFriendlyName string 16693 err = json.Unmarshal(*v, &primaryFabricFriendlyName) 16694 if err != nil { 16695 return err 16696 } 16697 rpip.PrimaryFabricFriendlyName = &primaryFabricFriendlyName 16698 } 16699 case "primaryFabricProvider": 16700 if v != nil { 16701 var primaryFabricProvider string 16702 err = json.Unmarshal(*v, &primaryFabricProvider) 16703 if err != nil { 16704 return err 16705 } 16706 rpip.PrimaryFabricProvider = &primaryFabricProvider 16707 } 16708 case "recoveryFabricFriendlyName": 16709 if v != nil { 16710 var recoveryFabricFriendlyName string 16711 err = json.Unmarshal(*v, &recoveryFabricFriendlyName) 16712 if err != nil { 16713 return err 16714 } 16715 rpip.RecoveryFabricFriendlyName = &recoveryFabricFriendlyName 16716 } 16717 case "recoveryFabricId": 16718 if v != nil { 16719 var recoveryFabricID string 16720 err = json.Unmarshal(*v, &recoveryFabricID) 16721 if err != nil { 16722 return err 16723 } 16724 rpip.RecoveryFabricID = &recoveryFabricID 16725 } 16726 case "primaryProtectionContainerFriendlyName": 16727 if v != nil { 16728 var primaryProtectionContainerFriendlyName string 16729 err = json.Unmarshal(*v, &primaryProtectionContainerFriendlyName) 16730 if err != nil { 16731 return err 16732 } 16733 rpip.PrimaryProtectionContainerFriendlyName = &primaryProtectionContainerFriendlyName 16734 } 16735 case "recoveryProtectionContainerFriendlyName": 16736 if v != nil { 16737 var recoveryProtectionContainerFriendlyName string 16738 err = json.Unmarshal(*v, &recoveryProtectionContainerFriendlyName) 16739 if err != nil { 16740 return err 16741 } 16742 rpip.RecoveryProtectionContainerFriendlyName = &recoveryProtectionContainerFriendlyName 16743 } 16744 case "protectionState": 16745 if v != nil { 16746 var protectionState string 16747 err = json.Unmarshal(*v, &protectionState) 16748 if err != nil { 16749 return err 16750 } 16751 rpip.ProtectionState = &protectionState 16752 } 16753 case "protectionStateDescription": 16754 if v != nil { 16755 var protectionStateDescription string 16756 err = json.Unmarshal(*v, &protectionStateDescription) 16757 if err != nil { 16758 return err 16759 } 16760 rpip.ProtectionStateDescription = &protectionStateDescription 16761 } 16762 case "activeLocation": 16763 if v != nil { 16764 var activeLocation string 16765 err = json.Unmarshal(*v, &activeLocation) 16766 if err != nil { 16767 return err 16768 } 16769 rpip.ActiveLocation = &activeLocation 16770 } 16771 case "testFailoverState": 16772 if v != nil { 16773 var testFailoverState string 16774 err = json.Unmarshal(*v, &testFailoverState) 16775 if err != nil { 16776 return err 16777 } 16778 rpip.TestFailoverState = &testFailoverState 16779 } 16780 case "testFailoverStateDescription": 16781 if v != nil { 16782 var testFailoverStateDescription string 16783 err = json.Unmarshal(*v, &testFailoverStateDescription) 16784 if err != nil { 16785 return err 16786 } 16787 rpip.TestFailoverStateDescription = &testFailoverStateDescription 16788 } 16789 case "allowedOperations": 16790 if v != nil { 16791 var allowedOperations []string 16792 err = json.Unmarshal(*v, &allowedOperations) 16793 if err != nil { 16794 return err 16795 } 16796 rpip.AllowedOperations = &allowedOperations 16797 } 16798 case "replicationHealth": 16799 if v != nil { 16800 var replicationHealth string 16801 err = json.Unmarshal(*v, &replicationHealth) 16802 if err != nil { 16803 return err 16804 } 16805 rpip.ReplicationHealth = &replicationHealth 16806 } 16807 case "failoverHealth": 16808 if v != nil { 16809 var failoverHealth string 16810 err = json.Unmarshal(*v, &failoverHealth) 16811 if err != nil { 16812 return err 16813 } 16814 rpip.FailoverHealth = &failoverHealth 16815 } 16816 case "healthErrors": 16817 if v != nil { 16818 var healthErrors []HealthError 16819 err = json.Unmarshal(*v, &healthErrors) 16820 if err != nil { 16821 return err 16822 } 16823 rpip.HealthErrors = &healthErrors 16824 } 16825 case "policyId": 16826 if v != nil { 16827 var policyID string 16828 err = json.Unmarshal(*v, &policyID) 16829 if err != nil { 16830 return err 16831 } 16832 rpip.PolicyID = &policyID 16833 } 16834 case "policyFriendlyName": 16835 if v != nil { 16836 var policyFriendlyName string 16837 err = json.Unmarshal(*v, &policyFriendlyName) 16838 if err != nil { 16839 return err 16840 } 16841 rpip.PolicyFriendlyName = &policyFriendlyName 16842 } 16843 case "lastSuccessfulFailoverTime": 16844 if v != nil { 16845 var lastSuccessfulFailoverTime date.Time 16846 err = json.Unmarshal(*v, &lastSuccessfulFailoverTime) 16847 if err != nil { 16848 return err 16849 } 16850 rpip.LastSuccessfulFailoverTime = &lastSuccessfulFailoverTime 16851 } 16852 case "lastSuccessfulTestFailoverTime": 16853 if v != nil { 16854 var lastSuccessfulTestFailoverTime date.Time 16855 err = json.Unmarshal(*v, &lastSuccessfulTestFailoverTime) 16856 if err != nil { 16857 return err 16858 } 16859 rpip.LastSuccessfulTestFailoverTime = &lastSuccessfulTestFailoverTime 16860 } 16861 case "currentScenario": 16862 if v != nil { 16863 var currentScenario CurrentScenarioDetails 16864 err = json.Unmarshal(*v, ¤tScenario) 16865 if err != nil { 16866 return err 16867 } 16868 rpip.CurrentScenario = ¤tScenario 16869 } 16870 case "failoverRecoveryPointId": 16871 if v != nil { 16872 var failoverRecoveryPointID string 16873 err = json.Unmarshal(*v, &failoverRecoveryPointID) 16874 if err != nil { 16875 return err 16876 } 16877 rpip.FailoverRecoveryPointID = &failoverRecoveryPointID 16878 } 16879 case "providerSpecificDetails": 16880 if v != nil { 16881 providerSpecificDetails, err := unmarshalBasicReplicationProviderSpecificSettings(*v) 16882 if err != nil { 16883 return err 16884 } 16885 rpip.ProviderSpecificDetails = providerSpecificDetails 16886 } 16887 case "recoveryContainerId": 16888 if v != nil { 16889 var recoveryContainerID string 16890 err = json.Unmarshal(*v, &recoveryContainerID) 16891 if err != nil { 16892 return err 16893 } 16894 rpip.RecoveryContainerID = &recoveryContainerID 16895 } 16896 } 16897 } 16898 16899 return nil 16900} 16901 16902// ReplicationProtectedItemsApplyRecoveryPointFuture an abstraction for monitoring and retrieving the 16903// results of a long-running operation. 16904type ReplicationProtectedItemsApplyRecoveryPointFuture struct { 16905 azure.FutureAPI 16906 // Result returns the result of the asynchronous operation. 16907 // If the operation has not completed it will return an error. 16908 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error) 16909} 16910 16911// UnmarshalJSON is the custom unmarshaller for CreateFuture. 16912func (future *ReplicationProtectedItemsApplyRecoveryPointFuture) UnmarshalJSON(body []byte) error { 16913 var azFuture azure.Future 16914 if err := json.Unmarshal(body, &azFuture); err != nil { 16915 return err 16916 } 16917 future.FutureAPI = &azFuture 16918 future.Result = future.result 16919 return nil 16920} 16921 16922// result is the default implementation for ReplicationProtectedItemsApplyRecoveryPointFuture.Result. 16923func (future *ReplicationProtectedItemsApplyRecoveryPointFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) { 16924 var done bool 16925 done, err = future.DoneWithContext(context.Background(), client) 16926 if err != nil { 16927 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsApplyRecoveryPointFuture", "Result", future.Response(), "Polling failure") 16928 return 16929 } 16930 if !done { 16931 rpi.Response.Response = future.Response() 16932 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsApplyRecoveryPointFuture") 16933 return 16934 } 16935 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 16936 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent { 16937 rpi, err = client.ApplyRecoveryPointResponder(rpi.Response.Response) 16938 if err != nil { 16939 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsApplyRecoveryPointFuture", "Result", rpi.Response.Response, "Failure responding to request") 16940 } 16941 } 16942 return 16943} 16944 16945// ReplicationProtectedItemsCreateFuture an abstraction for monitoring and retrieving the results of a 16946// long-running operation. 16947type ReplicationProtectedItemsCreateFuture struct { 16948 azure.FutureAPI 16949 // Result returns the result of the asynchronous operation. 16950 // If the operation has not completed it will return an error. 16951 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error) 16952} 16953 16954// UnmarshalJSON is the custom unmarshaller for CreateFuture. 16955func (future *ReplicationProtectedItemsCreateFuture) UnmarshalJSON(body []byte) error { 16956 var azFuture azure.Future 16957 if err := json.Unmarshal(body, &azFuture); err != nil { 16958 return err 16959 } 16960 future.FutureAPI = &azFuture 16961 future.Result = future.result 16962 return nil 16963} 16964 16965// result is the default implementation for ReplicationProtectedItemsCreateFuture.Result. 16966func (future *ReplicationProtectedItemsCreateFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) { 16967 var done bool 16968 done, err = future.DoneWithContext(context.Background(), client) 16969 if err != nil { 16970 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsCreateFuture", "Result", future.Response(), "Polling failure") 16971 return 16972 } 16973 if !done { 16974 rpi.Response.Response = future.Response() 16975 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsCreateFuture") 16976 return 16977 } 16978 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 16979 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent { 16980 rpi, err = client.CreateResponder(rpi.Response.Response) 16981 if err != nil { 16982 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsCreateFuture", "Result", rpi.Response.Response, "Failure responding to request") 16983 } 16984 } 16985 return 16986} 16987 16988// ReplicationProtectedItemsDeleteFuture an abstraction for monitoring and retrieving the results of a 16989// long-running operation. 16990type ReplicationProtectedItemsDeleteFuture struct { 16991 azure.FutureAPI 16992 // Result returns the result of the asynchronous operation. 16993 // If the operation has not completed it will return an error. 16994 Result func(ReplicationProtectedItemsClient) (autorest.Response, error) 16995} 16996 16997// UnmarshalJSON is the custom unmarshaller for CreateFuture. 16998func (future *ReplicationProtectedItemsDeleteFuture) UnmarshalJSON(body []byte) error { 16999 var azFuture azure.Future 17000 if err := json.Unmarshal(body, &azFuture); err != nil { 17001 return err 17002 } 17003 future.FutureAPI = &azFuture 17004 future.Result = future.result 17005 return nil 17006} 17007 17008// result is the default implementation for ReplicationProtectedItemsDeleteFuture.Result. 17009func (future *ReplicationProtectedItemsDeleteFuture) result(client ReplicationProtectedItemsClient) (ar autorest.Response, err error) { 17010 var done bool 17011 done, err = future.DoneWithContext(context.Background(), client) 17012 if err != nil { 17013 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsDeleteFuture", "Result", future.Response(), "Polling failure") 17014 return 17015 } 17016 if !done { 17017 ar.Response = future.Response() 17018 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsDeleteFuture") 17019 return 17020 } 17021 ar.Response = future.Response() 17022 return 17023} 17024 17025// ReplicationProtectedItemsFailoverCommitFuture an abstraction for monitoring and retrieving the results 17026// of a long-running operation. 17027type ReplicationProtectedItemsFailoverCommitFuture struct { 17028 azure.FutureAPI 17029 // Result returns the result of the asynchronous operation. 17030 // If the operation has not completed it will return an error. 17031 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error) 17032} 17033 17034// UnmarshalJSON is the custom unmarshaller for CreateFuture. 17035func (future *ReplicationProtectedItemsFailoverCommitFuture) UnmarshalJSON(body []byte) error { 17036 var azFuture azure.Future 17037 if err := json.Unmarshal(body, &azFuture); err != nil { 17038 return err 17039 } 17040 future.FutureAPI = &azFuture 17041 future.Result = future.result 17042 return nil 17043} 17044 17045// result is the default implementation for ReplicationProtectedItemsFailoverCommitFuture.Result. 17046func (future *ReplicationProtectedItemsFailoverCommitFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) { 17047 var done bool 17048 done, err = future.DoneWithContext(context.Background(), client) 17049 if err != nil { 17050 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsFailoverCommitFuture", "Result", future.Response(), "Polling failure") 17051 return 17052 } 17053 if !done { 17054 rpi.Response.Response = future.Response() 17055 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsFailoverCommitFuture") 17056 return 17057 } 17058 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 17059 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent { 17060 rpi, err = client.FailoverCommitResponder(rpi.Response.Response) 17061 if err != nil { 17062 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsFailoverCommitFuture", "Result", rpi.Response.Response, "Failure responding to request") 17063 } 17064 } 17065 return 17066} 17067 17068// ReplicationProtectedItemsPlannedFailoverFuture an abstraction for monitoring and retrieving the results 17069// of a long-running operation. 17070type ReplicationProtectedItemsPlannedFailoverFuture struct { 17071 azure.FutureAPI 17072 // Result returns the result of the asynchronous operation. 17073 // If the operation has not completed it will return an error. 17074 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error) 17075} 17076 17077// UnmarshalJSON is the custom unmarshaller for CreateFuture. 17078func (future *ReplicationProtectedItemsPlannedFailoverFuture) UnmarshalJSON(body []byte) error { 17079 var azFuture azure.Future 17080 if err := json.Unmarshal(body, &azFuture); err != nil { 17081 return err 17082 } 17083 future.FutureAPI = &azFuture 17084 future.Result = future.result 17085 return nil 17086} 17087 17088// result is the default implementation for ReplicationProtectedItemsPlannedFailoverFuture.Result. 17089func (future *ReplicationProtectedItemsPlannedFailoverFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) { 17090 var done bool 17091 done, err = future.DoneWithContext(context.Background(), client) 17092 if err != nil { 17093 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsPlannedFailoverFuture", "Result", future.Response(), "Polling failure") 17094 return 17095 } 17096 if !done { 17097 rpi.Response.Response = future.Response() 17098 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsPlannedFailoverFuture") 17099 return 17100 } 17101 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 17102 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent { 17103 rpi, err = client.PlannedFailoverResponder(rpi.Response.Response) 17104 if err != nil { 17105 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsPlannedFailoverFuture", "Result", rpi.Response.Response, "Failure responding to request") 17106 } 17107 } 17108 return 17109} 17110 17111// ReplicationProtectedItemsPurgeFuture an abstraction for monitoring and retrieving the results of a 17112// long-running operation. 17113type ReplicationProtectedItemsPurgeFuture struct { 17114 azure.FutureAPI 17115 // Result returns the result of the asynchronous operation. 17116 // If the operation has not completed it will return an error. 17117 Result func(ReplicationProtectedItemsClient) (autorest.Response, error) 17118} 17119 17120// UnmarshalJSON is the custom unmarshaller for CreateFuture. 17121func (future *ReplicationProtectedItemsPurgeFuture) UnmarshalJSON(body []byte) error { 17122 var azFuture azure.Future 17123 if err := json.Unmarshal(body, &azFuture); err != nil { 17124 return err 17125 } 17126 future.FutureAPI = &azFuture 17127 future.Result = future.result 17128 return nil 17129} 17130 17131// result is the default implementation for ReplicationProtectedItemsPurgeFuture.Result. 17132func (future *ReplicationProtectedItemsPurgeFuture) result(client ReplicationProtectedItemsClient) (ar autorest.Response, err error) { 17133 var done bool 17134 done, err = future.DoneWithContext(context.Background(), client) 17135 if err != nil { 17136 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsPurgeFuture", "Result", future.Response(), "Polling failure") 17137 return 17138 } 17139 if !done { 17140 ar.Response = future.Response() 17141 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsPurgeFuture") 17142 return 17143 } 17144 ar.Response = future.Response() 17145 return 17146} 17147 17148// ReplicationProtectedItemsRepairReplicationFuture an abstraction for monitoring and retrieving the 17149// results of a long-running operation. 17150type ReplicationProtectedItemsRepairReplicationFuture struct { 17151 azure.FutureAPI 17152 // Result returns the result of the asynchronous operation. 17153 // If the operation has not completed it will return an error. 17154 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error) 17155} 17156 17157// UnmarshalJSON is the custom unmarshaller for CreateFuture. 17158func (future *ReplicationProtectedItemsRepairReplicationFuture) UnmarshalJSON(body []byte) error { 17159 var azFuture azure.Future 17160 if err := json.Unmarshal(body, &azFuture); err != nil { 17161 return err 17162 } 17163 future.FutureAPI = &azFuture 17164 future.Result = future.result 17165 return nil 17166} 17167 17168// result is the default implementation for ReplicationProtectedItemsRepairReplicationFuture.Result. 17169func (future *ReplicationProtectedItemsRepairReplicationFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) { 17170 var done bool 17171 done, err = future.DoneWithContext(context.Background(), client) 17172 if err != nil { 17173 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsRepairReplicationFuture", "Result", future.Response(), "Polling failure") 17174 return 17175 } 17176 if !done { 17177 rpi.Response.Response = future.Response() 17178 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsRepairReplicationFuture") 17179 return 17180 } 17181 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 17182 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent { 17183 rpi, err = client.RepairReplicationResponder(rpi.Response.Response) 17184 if err != nil { 17185 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsRepairReplicationFuture", "Result", rpi.Response.Response, "Failure responding to request") 17186 } 17187 } 17188 return 17189} 17190 17191// ReplicationProtectedItemsReprotectFuture an abstraction for monitoring and retrieving the results of a 17192// long-running operation. 17193type ReplicationProtectedItemsReprotectFuture struct { 17194 azure.FutureAPI 17195 // Result returns the result of the asynchronous operation. 17196 // If the operation has not completed it will return an error. 17197 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error) 17198} 17199 17200// UnmarshalJSON is the custom unmarshaller for CreateFuture. 17201func (future *ReplicationProtectedItemsReprotectFuture) UnmarshalJSON(body []byte) error { 17202 var azFuture azure.Future 17203 if err := json.Unmarshal(body, &azFuture); err != nil { 17204 return err 17205 } 17206 future.FutureAPI = &azFuture 17207 future.Result = future.result 17208 return nil 17209} 17210 17211// result is the default implementation for ReplicationProtectedItemsReprotectFuture.Result. 17212func (future *ReplicationProtectedItemsReprotectFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) { 17213 var done bool 17214 done, err = future.DoneWithContext(context.Background(), client) 17215 if err != nil { 17216 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsReprotectFuture", "Result", future.Response(), "Polling failure") 17217 return 17218 } 17219 if !done { 17220 rpi.Response.Response = future.Response() 17221 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsReprotectFuture") 17222 return 17223 } 17224 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 17225 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent { 17226 rpi, err = client.ReprotectResponder(rpi.Response.Response) 17227 if err != nil { 17228 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsReprotectFuture", "Result", rpi.Response.Response, "Failure responding to request") 17229 } 17230 } 17231 return 17232} 17233 17234// ReplicationProtectedItemsTestFailoverCleanupFuture an abstraction for monitoring and retrieving the 17235// results of a long-running operation. 17236type ReplicationProtectedItemsTestFailoverCleanupFuture struct { 17237 azure.FutureAPI 17238 // Result returns the result of the asynchronous operation. 17239 // If the operation has not completed it will return an error. 17240 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error) 17241} 17242 17243// UnmarshalJSON is the custom unmarshaller for CreateFuture. 17244func (future *ReplicationProtectedItemsTestFailoverCleanupFuture) UnmarshalJSON(body []byte) error { 17245 var azFuture azure.Future 17246 if err := json.Unmarshal(body, &azFuture); err != nil { 17247 return err 17248 } 17249 future.FutureAPI = &azFuture 17250 future.Result = future.result 17251 return nil 17252} 17253 17254// result is the default implementation for ReplicationProtectedItemsTestFailoverCleanupFuture.Result. 17255func (future *ReplicationProtectedItemsTestFailoverCleanupFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) { 17256 var done bool 17257 done, err = future.DoneWithContext(context.Background(), client) 17258 if err != nil { 17259 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsTestFailoverCleanupFuture", "Result", future.Response(), "Polling failure") 17260 return 17261 } 17262 if !done { 17263 rpi.Response.Response = future.Response() 17264 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsTestFailoverCleanupFuture") 17265 return 17266 } 17267 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 17268 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent { 17269 rpi, err = client.TestFailoverCleanupResponder(rpi.Response.Response) 17270 if err != nil { 17271 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsTestFailoverCleanupFuture", "Result", rpi.Response.Response, "Failure responding to request") 17272 } 17273 } 17274 return 17275} 17276 17277// ReplicationProtectedItemsTestFailoverFuture an abstraction for monitoring and retrieving the results of 17278// a long-running operation. 17279type ReplicationProtectedItemsTestFailoverFuture struct { 17280 azure.FutureAPI 17281 // Result returns the result of the asynchronous operation. 17282 // If the operation has not completed it will return an error. 17283 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error) 17284} 17285 17286// UnmarshalJSON is the custom unmarshaller for CreateFuture. 17287func (future *ReplicationProtectedItemsTestFailoverFuture) UnmarshalJSON(body []byte) error { 17288 var azFuture azure.Future 17289 if err := json.Unmarshal(body, &azFuture); err != nil { 17290 return err 17291 } 17292 future.FutureAPI = &azFuture 17293 future.Result = future.result 17294 return nil 17295} 17296 17297// result is the default implementation for ReplicationProtectedItemsTestFailoverFuture.Result. 17298func (future *ReplicationProtectedItemsTestFailoverFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) { 17299 var done bool 17300 done, err = future.DoneWithContext(context.Background(), client) 17301 if err != nil { 17302 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsTestFailoverFuture", "Result", future.Response(), "Polling failure") 17303 return 17304 } 17305 if !done { 17306 rpi.Response.Response = future.Response() 17307 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsTestFailoverFuture") 17308 return 17309 } 17310 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 17311 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent { 17312 rpi, err = client.TestFailoverResponder(rpi.Response.Response) 17313 if err != nil { 17314 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsTestFailoverFuture", "Result", rpi.Response.Response, "Failure responding to request") 17315 } 17316 } 17317 return 17318} 17319 17320// ReplicationProtectedItemsUnplannedFailoverFuture an abstraction for monitoring and retrieving the 17321// results of a long-running operation. 17322type ReplicationProtectedItemsUnplannedFailoverFuture struct { 17323 azure.FutureAPI 17324 // Result returns the result of the asynchronous operation. 17325 // If the operation has not completed it will return an error. 17326 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error) 17327} 17328 17329// UnmarshalJSON is the custom unmarshaller for CreateFuture. 17330func (future *ReplicationProtectedItemsUnplannedFailoverFuture) UnmarshalJSON(body []byte) error { 17331 var azFuture azure.Future 17332 if err := json.Unmarshal(body, &azFuture); err != nil { 17333 return err 17334 } 17335 future.FutureAPI = &azFuture 17336 future.Result = future.result 17337 return nil 17338} 17339 17340// result is the default implementation for ReplicationProtectedItemsUnplannedFailoverFuture.Result. 17341func (future *ReplicationProtectedItemsUnplannedFailoverFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) { 17342 var done bool 17343 done, err = future.DoneWithContext(context.Background(), client) 17344 if err != nil { 17345 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUnplannedFailoverFuture", "Result", future.Response(), "Polling failure") 17346 return 17347 } 17348 if !done { 17349 rpi.Response.Response = future.Response() 17350 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsUnplannedFailoverFuture") 17351 return 17352 } 17353 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 17354 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent { 17355 rpi, err = client.UnplannedFailoverResponder(rpi.Response.Response) 17356 if err != nil { 17357 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUnplannedFailoverFuture", "Result", rpi.Response.Response, "Failure responding to request") 17358 } 17359 } 17360 return 17361} 17362 17363// ReplicationProtectedItemsUpdateFuture an abstraction for monitoring and retrieving the results of a 17364// long-running operation. 17365type ReplicationProtectedItemsUpdateFuture struct { 17366 azure.FutureAPI 17367 // Result returns the result of the asynchronous operation. 17368 // If the operation has not completed it will return an error. 17369 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error) 17370} 17371 17372// UnmarshalJSON is the custom unmarshaller for CreateFuture. 17373func (future *ReplicationProtectedItemsUpdateFuture) UnmarshalJSON(body []byte) error { 17374 var azFuture azure.Future 17375 if err := json.Unmarshal(body, &azFuture); err != nil { 17376 return err 17377 } 17378 future.FutureAPI = &azFuture 17379 future.Result = future.result 17380 return nil 17381} 17382 17383// result is the default implementation for ReplicationProtectedItemsUpdateFuture.Result. 17384func (future *ReplicationProtectedItemsUpdateFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) { 17385 var done bool 17386 done, err = future.DoneWithContext(context.Background(), client) 17387 if err != nil { 17388 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUpdateFuture", "Result", future.Response(), "Polling failure") 17389 return 17390 } 17391 if !done { 17392 rpi.Response.Response = future.Response() 17393 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsUpdateFuture") 17394 return 17395 } 17396 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 17397 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent { 17398 rpi, err = client.UpdateResponder(rpi.Response.Response) 17399 if err != nil { 17400 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUpdateFuture", "Result", rpi.Response.Response, "Failure responding to request") 17401 } 17402 } 17403 return 17404} 17405 17406// ReplicationProtectedItemsUpdateMobilityServiceFuture an abstraction for monitoring and retrieving the 17407// results of a long-running operation. 17408type ReplicationProtectedItemsUpdateMobilityServiceFuture struct { 17409 azure.FutureAPI 17410 // Result returns the result of the asynchronous operation. 17411 // If the operation has not completed it will return an error. 17412 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error) 17413} 17414 17415// UnmarshalJSON is the custom unmarshaller for CreateFuture. 17416func (future *ReplicationProtectedItemsUpdateMobilityServiceFuture) UnmarshalJSON(body []byte) error { 17417 var azFuture azure.Future 17418 if err := json.Unmarshal(body, &azFuture); err != nil { 17419 return err 17420 } 17421 future.FutureAPI = &azFuture 17422 future.Result = future.result 17423 return nil 17424} 17425 17426// result is the default implementation for ReplicationProtectedItemsUpdateMobilityServiceFuture.Result. 17427func (future *ReplicationProtectedItemsUpdateMobilityServiceFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) { 17428 var done bool 17429 done, err = future.DoneWithContext(context.Background(), client) 17430 if err != nil { 17431 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUpdateMobilityServiceFuture", "Result", future.Response(), "Polling failure") 17432 return 17433 } 17434 if !done { 17435 rpi.Response.Response = future.Response() 17436 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsUpdateMobilityServiceFuture") 17437 return 17438 } 17439 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 17440 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent { 17441 rpi, err = client.UpdateMobilityServiceResponder(rpi.Response.Response) 17442 if err != nil { 17443 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUpdateMobilityServiceFuture", "Result", rpi.Response.Response, "Failure responding to request") 17444 } 17445 } 17446 return 17447} 17448 17449// ReplicationProtectionContainerMappingsCreateFuture an abstraction for monitoring and retrieving the 17450// results of a long-running operation. 17451type ReplicationProtectionContainerMappingsCreateFuture struct { 17452 azure.FutureAPI 17453 // Result returns the result of the asynchronous operation. 17454 // If the operation has not completed it will return an error. 17455 Result func(ReplicationProtectionContainerMappingsClient) (ProtectionContainerMapping, error) 17456} 17457 17458// UnmarshalJSON is the custom unmarshaller for CreateFuture. 17459func (future *ReplicationProtectionContainerMappingsCreateFuture) UnmarshalJSON(body []byte) error { 17460 var azFuture azure.Future 17461 if err := json.Unmarshal(body, &azFuture); err != nil { 17462 return err 17463 } 17464 future.FutureAPI = &azFuture 17465 future.Result = future.result 17466 return nil 17467} 17468 17469// result is the default implementation for ReplicationProtectionContainerMappingsCreateFuture.Result. 17470func (future *ReplicationProtectionContainerMappingsCreateFuture) result(client ReplicationProtectionContainerMappingsClient) (pcm ProtectionContainerMapping, err error) { 17471 var done bool 17472 done, err = future.DoneWithContext(context.Background(), client) 17473 if err != nil { 17474 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsCreateFuture", "Result", future.Response(), "Polling failure") 17475 return 17476 } 17477 if !done { 17478 pcm.Response.Response = future.Response() 17479 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainerMappingsCreateFuture") 17480 return 17481 } 17482 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 17483 if pcm.Response.Response, err = future.GetResult(sender); err == nil && pcm.Response.Response.StatusCode != http.StatusNoContent { 17484 pcm, err = client.CreateResponder(pcm.Response.Response) 17485 if err != nil { 17486 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsCreateFuture", "Result", pcm.Response.Response, "Failure responding to request") 17487 } 17488 } 17489 return 17490} 17491 17492// ReplicationProtectionContainerMappingsDeleteFuture an abstraction for monitoring and retrieving the 17493// results of a long-running operation. 17494type ReplicationProtectionContainerMappingsDeleteFuture struct { 17495 azure.FutureAPI 17496 // Result returns the result of the asynchronous operation. 17497 // If the operation has not completed it will return an error. 17498 Result func(ReplicationProtectionContainerMappingsClient) (autorest.Response, error) 17499} 17500 17501// UnmarshalJSON is the custom unmarshaller for CreateFuture. 17502func (future *ReplicationProtectionContainerMappingsDeleteFuture) UnmarshalJSON(body []byte) error { 17503 var azFuture azure.Future 17504 if err := json.Unmarshal(body, &azFuture); err != nil { 17505 return err 17506 } 17507 future.FutureAPI = &azFuture 17508 future.Result = future.result 17509 return nil 17510} 17511 17512// result is the default implementation for ReplicationProtectionContainerMappingsDeleteFuture.Result. 17513func (future *ReplicationProtectionContainerMappingsDeleteFuture) result(client ReplicationProtectionContainerMappingsClient) (ar autorest.Response, err error) { 17514 var done bool 17515 done, err = future.DoneWithContext(context.Background(), client) 17516 if err != nil { 17517 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsDeleteFuture", "Result", future.Response(), "Polling failure") 17518 return 17519 } 17520 if !done { 17521 ar.Response = future.Response() 17522 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainerMappingsDeleteFuture") 17523 return 17524 } 17525 ar.Response = future.Response() 17526 return 17527} 17528 17529// ReplicationProtectionContainerMappingsPurgeFuture an abstraction for monitoring and retrieving the 17530// results of a long-running operation. 17531type ReplicationProtectionContainerMappingsPurgeFuture struct { 17532 azure.FutureAPI 17533 // Result returns the result of the asynchronous operation. 17534 // If the operation has not completed it will return an error. 17535 Result func(ReplicationProtectionContainerMappingsClient) (autorest.Response, error) 17536} 17537 17538// UnmarshalJSON is the custom unmarshaller for CreateFuture. 17539func (future *ReplicationProtectionContainerMappingsPurgeFuture) UnmarshalJSON(body []byte) error { 17540 var azFuture azure.Future 17541 if err := json.Unmarshal(body, &azFuture); err != nil { 17542 return err 17543 } 17544 future.FutureAPI = &azFuture 17545 future.Result = future.result 17546 return nil 17547} 17548 17549// result is the default implementation for ReplicationProtectionContainerMappingsPurgeFuture.Result. 17550func (future *ReplicationProtectionContainerMappingsPurgeFuture) result(client ReplicationProtectionContainerMappingsClient) (ar autorest.Response, err error) { 17551 var done bool 17552 done, err = future.DoneWithContext(context.Background(), client) 17553 if err != nil { 17554 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsPurgeFuture", "Result", future.Response(), "Polling failure") 17555 return 17556 } 17557 if !done { 17558 ar.Response = future.Response() 17559 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainerMappingsPurgeFuture") 17560 return 17561 } 17562 ar.Response = future.Response() 17563 return 17564} 17565 17566// ReplicationProtectionContainerMappingsUpdateFuture an abstraction for monitoring and retrieving the 17567// results of a long-running operation. 17568type ReplicationProtectionContainerMappingsUpdateFuture struct { 17569 azure.FutureAPI 17570 // Result returns the result of the asynchronous operation. 17571 // If the operation has not completed it will return an error. 17572 Result func(ReplicationProtectionContainerMappingsClient) (ProtectionContainerMapping, error) 17573} 17574 17575// UnmarshalJSON is the custom unmarshaller for CreateFuture. 17576func (future *ReplicationProtectionContainerMappingsUpdateFuture) UnmarshalJSON(body []byte) error { 17577 var azFuture azure.Future 17578 if err := json.Unmarshal(body, &azFuture); err != nil { 17579 return err 17580 } 17581 future.FutureAPI = &azFuture 17582 future.Result = future.result 17583 return nil 17584} 17585 17586// result is the default implementation for ReplicationProtectionContainerMappingsUpdateFuture.Result. 17587func (future *ReplicationProtectionContainerMappingsUpdateFuture) result(client ReplicationProtectionContainerMappingsClient) (pcm ProtectionContainerMapping, err error) { 17588 var done bool 17589 done, err = future.DoneWithContext(context.Background(), client) 17590 if err != nil { 17591 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsUpdateFuture", "Result", future.Response(), "Polling failure") 17592 return 17593 } 17594 if !done { 17595 pcm.Response.Response = future.Response() 17596 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainerMappingsUpdateFuture") 17597 return 17598 } 17599 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 17600 if pcm.Response.Response, err = future.GetResult(sender); err == nil && pcm.Response.Response.StatusCode != http.StatusNoContent { 17601 pcm, err = client.UpdateResponder(pcm.Response.Response) 17602 if err != nil { 17603 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsUpdateFuture", "Result", pcm.Response.Response, "Failure responding to request") 17604 } 17605 } 17606 return 17607} 17608 17609// ReplicationProtectionContainersCreateFuture an abstraction for monitoring and retrieving the results of 17610// a long-running operation. 17611type ReplicationProtectionContainersCreateFuture struct { 17612 azure.FutureAPI 17613 // Result returns the result of the asynchronous operation. 17614 // If the operation has not completed it will return an error. 17615 Result func(ReplicationProtectionContainersClient) (ProtectionContainer, error) 17616} 17617 17618// UnmarshalJSON is the custom unmarshaller for CreateFuture. 17619func (future *ReplicationProtectionContainersCreateFuture) UnmarshalJSON(body []byte) error { 17620 var azFuture azure.Future 17621 if err := json.Unmarshal(body, &azFuture); err != nil { 17622 return err 17623 } 17624 future.FutureAPI = &azFuture 17625 future.Result = future.result 17626 return nil 17627} 17628 17629// result is the default implementation for ReplicationProtectionContainersCreateFuture.Result. 17630func (future *ReplicationProtectionContainersCreateFuture) result(client ReplicationProtectionContainersClient) (pc ProtectionContainer, err error) { 17631 var done bool 17632 done, err = future.DoneWithContext(context.Background(), client) 17633 if err != nil { 17634 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersCreateFuture", "Result", future.Response(), "Polling failure") 17635 return 17636 } 17637 if !done { 17638 pc.Response.Response = future.Response() 17639 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainersCreateFuture") 17640 return 17641 } 17642 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 17643 if pc.Response.Response, err = future.GetResult(sender); err == nil && pc.Response.Response.StatusCode != http.StatusNoContent { 17644 pc, err = client.CreateResponder(pc.Response.Response) 17645 if err != nil { 17646 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersCreateFuture", "Result", pc.Response.Response, "Failure responding to request") 17647 } 17648 } 17649 return 17650} 17651 17652// ReplicationProtectionContainersDeleteFuture an abstraction for monitoring and retrieving the results of 17653// a long-running operation. 17654type ReplicationProtectionContainersDeleteFuture struct { 17655 azure.FutureAPI 17656 // Result returns the result of the asynchronous operation. 17657 // If the operation has not completed it will return an error. 17658 Result func(ReplicationProtectionContainersClient) (autorest.Response, error) 17659} 17660 17661// UnmarshalJSON is the custom unmarshaller for CreateFuture. 17662func (future *ReplicationProtectionContainersDeleteFuture) UnmarshalJSON(body []byte) error { 17663 var azFuture azure.Future 17664 if err := json.Unmarshal(body, &azFuture); err != nil { 17665 return err 17666 } 17667 future.FutureAPI = &azFuture 17668 future.Result = future.result 17669 return nil 17670} 17671 17672// result is the default implementation for ReplicationProtectionContainersDeleteFuture.Result. 17673func (future *ReplicationProtectionContainersDeleteFuture) result(client ReplicationProtectionContainersClient) (ar autorest.Response, err error) { 17674 var done bool 17675 done, err = future.DoneWithContext(context.Background(), client) 17676 if err != nil { 17677 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersDeleteFuture", "Result", future.Response(), "Polling failure") 17678 return 17679 } 17680 if !done { 17681 ar.Response = future.Response() 17682 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainersDeleteFuture") 17683 return 17684 } 17685 ar.Response = future.Response() 17686 return 17687} 17688 17689// ReplicationProtectionContainersDiscoverProtectableItemFuture an abstraction for monitoring and 17690// retrieving the results of a long-running operation. 17691type ReplicationProtectionContainersDiscoverProtectableItemFuture struct { 17692 azure.FutureAPI 17693 // Result returns the result of the asynchronous operation. 17694 // If the operation has not completed it will return an error. 17695 Result func(ReplicationProtectionContainersClient) (ProtectionContainer, error) 17696} 17697 17698// UnmarshalJSON is the custom unmarshaller for CreateFuture. 17699func (future *ReplicationProtectionContainersDiscoverProtectableItemFuture) UnmarshalJSON(body []byte) error { 17700 var azFuture azure.Future 17701 if err := json.Unmarshal(body, &azFuture); err != nil { 17702 return err 17703 } 17704 future.FutureAPI = &azFuture 17705 future.Result = future.result 17706 return nil 17707} 17708 17709// result is the default implementation for ReplicationProtectionContainersDiscoverProtectableItemFuture.Result. 17710func (future *ReplicationProtectionContainersDiscoverProtectableItemFuture) result(client ReplicationProtectionContainersClient) (pc ProtectionContainer, err error) { 17711 var done bool 17712 done, err = future.DoneWithContext(context.Background(), client) 17713 if err != nil { 17714 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersDiscoverProtectableItemFuture", "Result", future.Response(), "Polling failure") 17715 return 17716 } 17717 if !done { 17718 pc.Response.Response = future.Response() 17719 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainersDiscoverProtectableItemFuture") 17720 return 17721 } 17722 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 17723 if pc.Response.Response, err = future.GetResult(sender); err == nil && pc.Response.Response.StatusCode != http.StatusNoContent { 17724 pc, err = client.DiscoverProtectableItemResponder(pc.Response.Response) 17725 if err != nil { 17726 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersDiscoverProtectableItemFuture", "Result", pc.Response.Response, "Failure responding to request") 17727 } 17728 } 17729 return 17730} 17731 17732// ReplicationProtectionContainersSwitchProtectionFuture an abstraction for monitoring and retrieving the 17733// results of a long-running operation. 17734type ReplicationProtectionContainersSwitchProtectionFuture struct { 17735 azure.FutureAPI 17736 // Result returns the result of the asynchronous operation. 17737 // If the operation has not completed it will return an error. 17738 Result func(ReplicationProtectionContainersClient) (ProtectionContainer, error) 17739} 17740 17741// UnmarshalJSON is the custom unmarshaller for CreateFuture. 17742func (future *ReplicationProtectionContainersSwitchProtectionFuture) UnmarshalJSON(body []byte) error { 17743 var azFuture azure.Future 17744 if err := json.Unmarshal(body, &azFuture); err != nil { 17745 return err 17746 } 17747 future.FutureAPI = &azFuture 17748 future.Result = future.result 17749 return nil 17750} 17751 17752// result is the default implementation for ReplicationProtectionContainersSwitchProtectionFuture.Result. 17753func (future *ReplicationProtectionContainersSwitchProtectionFuture) result(client ReplicationProtectionContainersClient) (pc ProtectionContainer, err error) { 17754 var done bool 17755 done, err = future.DoneWithContext(context.Background(), client) 17756 if err != nil { 17757 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersSwitchProtectionFuture", "Result", future.Response(), "Polling failure") 17758 return 17759 } 17760 if !done { 17761 pc.Response.Response = future.Response() 17762 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainersSwitchProtectionFuture") 17763 return 17764 } 17765 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 17766 if pc.Response.Response, err = future.GetResult(sender); err == nil && pc.Response.Response.StatusCode != http.StatusNoContent { 17767 pc, err = client.SwitchProtectionResponder(pc.Response.Response) 17768 if err != nil { 17769 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersSwitchProtectionFuture", "Result", pc.Response.Response, "Failure responding to request") 17770 } 17771 } 17772 return 17773} 17774 17775// ReplicationProviderContainerUnmappingInput provider specific input for unpairing operations. 17776type ReplicationProviderContainerUnmappingInput struct { 17777 // InstanceType - The class type. 17778 InstanceType *string `json:"instanceType,omitempty"` 17779} 17780 17781// BasicReplicationProviderSpecificContainerCreationInput provider specific input for container creation operation. 17782type BasicReplicationProviderSpecificContainerCreationInput interface { 17783 AsA2AContainerCreationInput() (*A2AContainerCreationInput, bool) 17784 AsVMwareCbtContainerCreationInput() (*VMwareCbtContainerCreationInput, bool) 17785 AsReplicationProviderSpecificContainerCreationInput() (*ReplicationProviderSpecificContainerCreationInput, bool) 17786} 17787 17788// ReplicationProviderSpecificContainerCreationInput provider specific input for container creation operation. 17789type ReplicationProviderSpecificContainerCreationInput struct { 17790 // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeReplicationProviderSpecificContainerCreationInput', 'InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeA2A', 'InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeVMwareCbt' 17791 InstanceType InstanceTypeBasicReplicationProviderSpecificContainerCreationInput `json:"instanceType,omitempty"` 17792} 17793 17794func unmarshalBasicReplicationProviderSpecificContainerCreationInput(body []byte) (BasicReplicationProviderSpecificContainerCreationInput, error) { 17795 var m map[string]interface{} 17796 err := json.Unmarshal(body, &m) 17797 if err != nil { 17798 return nil, err 17799 } 17800 17801 switch m["instanceType"] { 17802 case string(InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeA2A): 17803 var acci A2AContainerCreationInput 17804 err := json.Unmarshal(body, &acci) 17805 return acci, err 17806 case string(InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeVMwareCbt): 17807 var vmccci VMwareCbtContainerCreationInput 17808 err := json.Unmarshal(body, &vmccci) 17809 return vmccci, err 17810 default: 17811 var rpscci ReplicationProviderSpecificContainerCreationInput 17812 err := json.Unmarshal(body, &rpscci) 17813 return rpscci, err 17814 } 17815} 17816func unmarshalBasicReplicationProviderSpecificContainerCreationInputArray(body []byte) ([]BasicReplicationProviderSpecificContainerCreationInput, error) { 17817 var rawMessages []*json.RawMessage 17818 err := json.Unmarshal(body, &rawMessages) 17819 if err != nil { 17820 return nil, err 17821 } 17822 17823 rpscciArray := make([]BasicReplicationProviderSpecificContainerCreationInput, len(rawMessages)) 17824 17825 for index, rawMessage := range rawMessages { 17826 rpscci, err := unmarshalBasicReplicationProviderSpecificContainerCreationInput(*rawMessage) 17827 if err != nil { 17828 return nil, err 17829 } 17830 rpscciArray[index] = rpscci 17831 } 17832 return rpscciArray, nil 17833} 17834 17835// MarshalJSON is the custom marshaler for ReplicationProviderSpecificContainerCreationInput. 17836func (rpscci ReplicationProviderSpecificContainerCreationInput) MarshalJSON() ([]byte, error) { 17837 rpscci.InstanceType = InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeReplicationProviderSpecificContainerCreationInput 17838 objectMap := make(map[string]interface{}) 17839 if rpscci.InstanceType != "" { 17840 objectMap["instanceType"] = rpscci.InstanceType 17841 } 17842 return json.Marshal(objectMap) 17843} 17844 17845// AsA2AContainerCreationInput is the BasicReplicationProviderSpecificContainerCreationInput implementation for ReplicationProviderSpecificContainerCreationInput. 17846func (rpscci ReplicationProviderSpecificContainerCreationInput) AsA2AContainerCreationInput() (*A2AContainerCreationInput, bool) { 17847 return nil, false 17848} 17849 17850// AsVMwareCbtContainerCreationInput is the BasicReplicationProviderSpecificContainerCreationInput implementation for ReplicationProviderSpecificContainerCreationInput. 17851func (rpscci ReplicationProviderSpecificContainerCreationInput) AsVMwareCbtContainerCreationInput() (*VMwareCbtContainerCreationInput, bool) { 17852 return nil, false 17853} 17854 17855// AsReplicationProviderSpecificContainerCreationInput is the BasicReplicationProviderSpecificContainerCreationInput implementation for ReplicationProviderSpecificContainerCreationInput. 17856func (rpscci ReplicationProviderSpecificContainerCreationInput) AsReplicationProviderSpecificContainerCreationInput() (*ReplicationProviderSpecificContainerCreationInput, bool) { 17857 return &rpscci, true 17858} 17859 17860// AsBasicReplicationProviderSpecificContainerCreationInput is the BasicReplicationProviderSpecificContainerCreationInput implementation for ReplicationProviderSpecificContainerCreationInput. 17861func (rpscci ReplicationProviderSpecificContainerCreationInput) AsBasicReplicationProviderSpecificContainerCreationInput() (BasicReplicationProviderSpecificContainerCreationInput, bool) { 17862 return &rpscci, true 17863} 17864 17865// BasicReplicationProviderSpecificContainerMappingInput provider specific input for pairing operations. 17866type BasicReplicationProviderSpecificContainerMappingInput interface { 17867 AsA2AContainerMappingInput() (*A2AContainerMappingInput, bool) 17868 AsVMwareCbtContainerMappingInput() (*VMwareCbtContainerMappingInput, bool) 17869 AsReplicationProviderSpecificContainerMappingInput() (*ReplicationProviderSpecificContainerMappingInput, bool) 17870} 17871 17872// ReplicationProviderSpecificContainerMappingInput provider specific input for pairing operations. 17873type ReplicationProviderSpecificContainerMappingInput struct { 17874 // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeReplicationProviderSpecificContainerMappingInput', 'InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeA2A', 'InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeVMwareCbt' 17875 InstanceType InstanceTypeBasicReplicationProviderSpecificContainerMappingInput `json:"instanceType,omitempty"` 17876} 17877 17878func unmarshalBasicReplicationProviderSpecificContainerMappingInput(body []byte) (BasicReplicationProviderSpecificContainerMappingInput, error) { 17879 var m map[string]interface{} 17880 err := json.Unmarshal(body, &m) 17881 if err != nil { 17882 return nil, err 17883 } 17884 17885 switch m["instanceType"] { 17886 case string(InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeA2A): 17887 var acmi A2AContainerMappingInput 17888 err := json.Unmarshal(body, &acmi) 17889 return acmi, err 17890 case string(InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeVMwareCbt): 17891 var vmccmi VMwareCbtContainerMappingInput 17892 err := json.Unmarshal(body, &vmccmi) 17893 return vmccmi, err 17894 default: 17895 var rpscmi ReplicationProviderSpecificContainerMappingInput 17896 err := json.Unmarshal(body, &rpscmi) 17897 return rpscmi, err 17898 } 17899} 17900func unmarshalBasicReplicationProviderSpecificContainerMappingInputArray(body []byte) ([]BasicReplicationProviderSpecificContainerMappingInput, error) { 17901 var rawMessages []*json.RawMessage 17902 err := json.Unmarshal(body, &rawMessages) 17903 if err != nil { 17904 return nil, err 17905 } 17906 17907 rpscmiArray := make([]BasicReplicationProviderSpecificContainerMappingInput, len(rawMessages)) 17908 17909 for index, rawMessage := range rawMessages { 17910 rpscmi, err := unmarshalBasicReplicationProviderSpecificContainerMappingInput(*rawMessage) 17911 if err != nil { 17912 return nil, err 17913 } 17914 rpscmiArray[index] = rpscmi 17915 } 17916 return rpscmiArray, nil 17917} 17918 17919// MarshalJSON is the custom marshaler for ReplicationProviderSpecificContainerMappingInput. 17920func (rpscmi ReplicationProviderSpecificContainerMappingInput) MarshalJSON() ([]byte, error) { 17921 rpscmi.InstanceType = InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeReplicationProviderSpecificContainerMappingInput 17922 objectMap := make(map[string]interface{}) 17923 if rpscmi.InstanceType != "" { 17924 objectMap["instanceType"] = rpscmi.InstanceType 17925 } 17926 return json.Marshal(objectMap) 17927} 17928 17929// AsA2AContainerMappingInput is the BasicReplicationProviderSpecificContainerMappingInput implementation for ReplicationProviderSpecificContainerMappingInput. 17930func (rpscmi ReplicationProviderSpecificContainerMappingInput) AsA2AContainerMappingInput() (*A2AContainerMappingInput, bool) { 17931 return nil, false 17932} 17933 17934// AsVMwareCbtContainerMappingInput is the BasicReplicationProviderSpecificContainerMappingInput implementation for ReplicationProviderSpecificContainerMappingInput. 17935func (rpscmi ReplicationProviderSpecificContainerMappingInput) AsVMwareCbtContainerMappingInput() (*VMwareCbtContainerMappingInput, bool) { 17936 return nil, false 17937} 17938 17939// AsReplicationProviderSpecificContainerMappingInput is the BasicReplicationProviderSpecificContainerMappingInput implementation for ReplicationProviderSpecificContainerMappingInput. 17940func (rpscmi ReplicationProviderSpecificContainerMappingInput) AsReplicationProviderSpecificContainerMappingInput() (*ReplicationProviderSpecificContainerMappingInput, bool) { 17941 return &rpscmi, true 17942} 17943 17944// AsBasicReplicationProviderSpecificContainerMappingInput is the BasicReplicationProviderSpecificContainerMappingInput implementation for ReplicationProviderSpecificContainerMappingInput. 17945func (rpscmi ReplicationProviderSpecificContainerMappingInput) AsBasicReplicationProviderSpecificContainerMappingInput() (BasicReplicationProviderSpecificContainerMappingInput, bool) { 17946 return &rpscmi, true 17947} 17948 17949// BasicReplicationProviderSpecificSettings replication provider specific settings. 17950type BasicReplicationProviderSpecificSettings interface { 17951 AsA2AReplicationDetails() (*A2AReplicationDetails, bool) 17952 AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) 17953 AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) 17954 AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) 17955 AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) 17956 AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) 17957 AsInMageReplicationDetails() (*InMageReplicationDetails, bool) 17958 AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) 17959} 17960 17961// ReplicationProviderSpecificSettings replication provider specific settings. 17962type ReplicationProviderSpecificSettings struct { 17963 // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeReplicationProviderSpecificSettings', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeA2A', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaBaseReplicationDetails', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMageAzureV2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMage' 17964 InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"` 17965} 17966 17967func unmarshalBasicReplicationProviderSpecificSettings(body []byte) (BasicReplicationProviderSpecificSettings, error) { 17968 var m map[string]interface{} 17969 err := json.Unmarshal(body, &m) 17970 if err != nil { 17971 return nil, err 17972 } 17973 17974 switch m["instanceType"] { 17975 case string(InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeA2A): 17976 var ard A2AReplicationDetails 17977 err := json.Unmarshal(body, &ard) 17978 return ard, err 17979 case string(InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaAzure): 17980 var hvrard HyperVReplicaAzureReplicationDetails 17981 err := json.Unmarshal(body, &hvrard) 17982 return hvrard, err 17983 case string(InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaBaseReplicationDetails): 17984 var hvrbrd HyperVReplicaBaseReplicationDetails 17985 err := json.Unmarshal(body, &hvrbrd) 17986 return hvrbrd, err 17987 case string(InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012R2): 17988 var hvrbrd HyperVReplicaBlueReplicationDetails 17989 err := json.Unmarshal(body, &hvrbrd) 17990 return hvrbrd, err 17991 case string(InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012): 17992 var hvrrd HyperVReplicaReplicationDetails 17993 err := json.Unmarshal(body, &hvrrd) 17994 return hvrrd, err 17995 case string(InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMageAzureV2): 17996 var imavrd InMageAzureV2ReplicationDetails 17997 err := json.Unmarshal(body, &imavrd) 17998 return imavrd, err 17999 case string(InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMage): 18000 var imrd InMageReplicationDetails 18001 err := json.Unmarshal(body, &imrd) 18002 return imrd, err 18003 default: 18004 var rpss ReplicationProviderSpecificSettings 18005 err := json.Unmarshal(body, &rpss) 18006 return rpss, err 18007 } 18008} 18009func unmarshalBasicReplicationProviderSpecificSettingsArray(body []byte) ([]BasicReplicationProviderSpecificSettings, error) { 18010 var rawMessages []*json.RawMessage 18011 err := json.Unmarshal(body, &rawMessages) 18012 if err != nil { 18013 return nil, err 18014 } 18015 18016 rpssArray := make([]BasicReplicationProviderSpecificSettings, len(rawMessages)) 18017 18018 for index, rawMessage := range rawMessages { 18019 rpss, err := unmarshalBasicReplicationProviderSpecificSettings(*rawMessage) 18020 if err != nil { 18021 return nil, err 18022 } 18023 rpssArray[index] = rpss 18024 } 18025 return rpssArray, nil 18026} 18027 18028// MarshalJSON is the custom marshaler for ReplicationProviderSpecificSettings. 18029func (rpss ReplicationProviderSpecificSettings) MarshalJSON() ([]byte, error) { 18030 rpss.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeReplicationProviderSpecificSettings 18031 objectMap := make(map[string]interface{}) 18032 if rpss.InstanceType != "" { 18033 objectMap["instanceType"] = rpss.InstanceType 18034 } 18035 return json.Marshal(objectMap) 18036} 18037 18038// AsA2AReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for ReplicationProviderSpecificSettings. 18039func (rpss ReplicationProviderSpecificSettings) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) { 18040 return nil, false 18041} 18042 18043// AsHyperVReplicaAzureReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for ReplicationProviderSpecificSettings. 18044func (rpss ReplicationProviderSpecificSettings) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) { 18045 return nil, false 18046} 18047 18048// AsHyperVReplicaBaseReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for ReplicationProviderSpecificSettings. 18049func (rpss ReplicationProviderSpecificSettings) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) { 18050 return nil, false 18051} 18052 18053// AsHyperVReplicaBlueReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for ReplicationProviderSpecificSettings. 18054func (rpss ReplicationProviderSpecificSettings) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) { 18055 return nil, false 18056} 18057 18058// AsHyperVReplicaReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for ReplicationProviderSpecificSettings. 18059func (rpss ReplicationProviderSpecificSettings) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) { 18060 return nil, false 18061} 18062 18063// AsInMageAzureV2ReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for ReplicationProviderSpecificSettings. 18064func (rpss ReplicationProviderSpecificSettings) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) { 18065 return nil, false 18066} 18067 18068// AsInMageReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for ReplicationProviderSpecificSettings. 18069func (rpss ReplicationProviderSpecificSettings) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) { 18070 return nil, false 18071} 18072 18073// AsReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for ReplicationProviderSpecificSettings. 18074func (rpss ReplicationProviderSpecificSettings) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) { 18075 return &rpss, true 18076} 18077 18078// AsBasicReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for ReplicationProviderSpecificSettings. 18079func (rpss ReplicationProviderSpecificSettings) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) { 18080 return &rpss, true 18081} 18082 18083// BasicReplicationProviderSpecificUpdateContainerMappingInput provider specific input for update pairing operations. 18084type BasicReplicationProviderSpecificUpdateContainerMappingInput interface { 18085 AsA2AUpdateContainerMappingInput() (*A2AUpdateContainerMappingInput, bool) 18086 AsReplicationProviderSpecificUpdateContainerMappingInput() (*ReplicationProviderSpecificUpdateContainerMappingInput, bool) 18087} 18088 18089// ReplicationProviderSpecificUpdateContainerMappingInput provider specific input for update pairing 18090// operations. 18091type ReplicationProviderSpecificUpdateContainerMappingInput struct { 18092 // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingInputInstanceTypeReplicationProviderSpecificUpdateContainerMappingInput', 'InstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingInputInstanceTypeA2A' 18093 InstanceType InstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingInput `json:"instanceType,omitempty"` 18094} 18095 18096func unmarshalBasicReplicationProviderSpecificUpdateContainerMappingInput(body []byte) (BasicReplicationProviderSpecificUpdateContainerMappingInput, error) { 18097 var m map[string]interface{} 18098 err := json.Unmarshal(body, &m) 18099 if err != nil { 18100 return nil, err 18101 } 18102 18103 switch m["instanceType"] { 18104 case string(InstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingInputInstanceTypeA2A): 18105 var aucmi A2AUpdateContainerMappingInput 18106 err := json.Unmarshal(body, &aucmi) 18107 return aucmi, err 18108 default: 18109 var rpsucmi ReplicationProviderSpecificUpdateContainerMappingInput 18110 err := json.Unmarshal(body, &rpsucmi) 18111 return rpsucmi, err 18112 } 18113} 18114func unmarshalBasicReplicationProviderSpecificUpdateContainerMappingInputArray(body []byte) ([]BasicReplicationProviderSpecificUpdateContainerMappingInput, error) { 18115 var rawMessages []*json.RawMessage 18116 err := json.Unmarshal(body, &rawMessages) 18117 if err != nil { 18118 return nil, err 18119 } 18120 18121 rpsucmiArray := make([]BasicReplicationProviderSpecificUpdateContainerMappingInput, len(rawMessages)) 18122 18123 for index, rawMessage := range rawMessages { 18124 rpsucmi, err := unmarshalBasicReplicationProviderSpecificUpdateContainerMappingInput(*rawMessage) 18125 if err != nil { 18126 return nil, err 18127 } 18128 rpsucmiArray[index] = rpsucmi 18129 } 18130 return rpsucmiArray, nil 18131} 18132 18133// MarshalJSON is the custom marshaler for ReplicationProviderSpecificUpdateContainerMappingInput. 18134func (rpsucmi ReplicationProviderSpecificUpdateContainerMappingInput) MarshalJSON() ([]byte, error) { 18135 rpsucmi.InstanceType = InstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingInputInstanceTypeReplicationProviderSpecificUpdateContainerMappingInput 18136 objectMap := make(map[string]interface{}) 18137 if rpsucmi.InstanceType != "" { 18138 objectMap["instanceType"] = rpsucmi.InstanceType 18139 } 18140 return json.Marshal(objectMap) 18141} 18142 18143// AsA2AUpdateContainerMappingInput is the BasicReplicationProviderSpecificUpdateContainerMappingInput implementation for ReplicationProviderSpecificUpdateContainerMappingInput. 18144func (rpsucmi ReplicationProviderSpecificUpdateContainerMappingInput) AsA2AUpdateContainerMappingInput() (*A2AUpdateContainerMappingInput, bool) { 18145 return nil, false 18146} 18147 18148// AsReplicationProviderSpecificUpdateContainerMappingInput is the BasicReplicationProviderSpecificUpdateContainerMappingInput implementation for ReplicationProviderSpecificUpdateContainerMappingInput. 18149func (rpsucmi ReplicationProviderSpecificUpdateContainerMappingInput) AsReplicationProviderSpecificUpdateContainerMappingInput() (*ReplicationProviderSpecificUpdateContainerMappingInput, bool) { 18150 return &rpsucmi, true 18151} 18152 18153// AsBasicReplicationProviderSpecificUpdateContainerMappingInput is the BasicReplicationProviderSpecificUpdateContainerMappingInput implementation for ReplicationProviderSpecificUpdateContainerMappingInput. 18154func (rpsucmi ReplicationProviderSpecificUpdateContainerMappingInput) AsBasicReplicationProviderSpecificUpdateContainerMappingInput() (BasicReplicationProviderSpecificUpdateContainerMappingInput, bool) { 18155 return &rpsucmi, true 18156} 18157 18158// ReplicationRecoveryPlansCreateFuture an abstraction for monitoring and retrieving the results of a 18159// long-running operation. 18160type ReplicationRecoveryPlansCreateFuture struct { 18161 azure.FutureAPI 18162 // Result returns the result of the asynchronous operation. 18163 // If the operation has not completed it will return an error. 18164 Result func(ReplicationRecoveryPlansClient) (RecoveryPlan, error) 18165} 18166 18167// UnmarshalJSON is the custom unmarshaller for CreateFuture. 18168func (future *ReplicationRecoveryPlansCreateFuture) UnmarshalJSON(body []byte) error { 18169 var azFuture azure.Future 18170 if err := json.Unmarshal(body, &azFuture); err != nil { 18171 return err 18172 } 18173 future.FutureAPI = &azFuture 18174 future.Result = future.result 18175 return nil 18176} 18177 18178// result is the default implementation for ReplicationRecoveryPlansCreateFuture.Result. 18179func (future *ReplicationRecoveryPlansCreateFuture) result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) { 18180 var done bool 18181 done, err = future.DoneWithContext(context.Background(), client) 18182 if err != nil { 18183 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansCreateFuture", "Result", future.Response(), "Polling failure") 18184 return 18185 } 18186 if !done { 18187 rp.Response.Response = future.Response() 18188 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansCreateFuture") 18189 return 18190 } 18191 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 18192 if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent { 18193 rp, err = client.CreateResponder(rp.Response.Response) 18194 if err != nil { 18195 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansCreateFuture", "Result", rp.Response.Response, "Failure responding to request") 18196 } 18197 } 18198 return 18199} 18200 18201// ReplicationRecoveryPlansDeleteFuture an abstraction for monitoring and retrieving the results of a 18202// long-running operation. 18203type ReplicationRecoveryPlansDeleteFuture struct { 18204 azure.FutureAPI 18205 // Result returns the result of the asynchronous operation. 18206 // If the operation has not completed it will return an error. 18207 Result func(ReplicationRecoveryPlansClient) (autorest.Response, error) 18208} 18209 18210// UnmarshalJSON is the custom unmarshaller for CreateFuture. 18211func (future *ReplicationRecoveryPlansDeleteFuture) UnmarshalJSON(body []byte) error { 18212 var azFuture azure.Future 18213 if err := json.Unmarshal(body, &azFuture); err != nil { 18214 return err 18215 } 18216 future.FutureAPI = &azFuture 18217 future.Result = future.result 18218 return nil 18219} 18220 18221// result is the default implementation for ReplicationRecoveryPlansDeleteFuture.Result. 18222func (future *ReplicationRecoveryPlansDeleteFuture) result(client ReplicationRecoveryPlansClient) (ar autorest.Response, err error) { 18223 var done bool 18224 done, err = future.DoneWithContext(context.Background(), client) 18225 if err != nil { 18226 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansDeleteFuture", "Result", future.Response(), "Polling failure") 18227 return 18228 } 18229 if !done { 18230 ar.Response = future.Response() 18231 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansDeleteFuture") 18232 return 18233 } 18234 ar.Response = future.Response() 18235 return 18236} 18237 18238// ReplicationRecoveryPlansFailoverCommitFuture an abstraction for monitoring and retrieving the results of 18239// a long-running operation. 18240type ReplicationRecoveryPlansFailoverCommitFuture struct { 18241 azure.FutureAPI 18242 // Result returns the result of the asynchronous operation. 18243 // If the operation has not completed it will return an error. 18244 Result func(ReplicationRecoveryPlansClient) (RecoveryPlan, error) 18245} 18246 18247// UnmarshalJSON is the custom unmarshaller for CreateFuture. 18248func (future *ReplicationRecoveryPlansFailoverCommitFuture) UnmarshalJSON(body []byte) error { 18249 var azFuture azure.Future 18250 if err := json.Unmarshal(body, &azFuture); err != nil { 18251 return err 18252 } 18253 future.FutureAPI = &azFuture 18254 future.Result = future.result 18255 return nil 18256} 18257 18258// result is the default implementation for ReplicationRecoveryPlansFailoverCommitFuture.Result. 18259func (future *ReplicationRecoveryPlansFailoverCommitFuture) result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) { 18260 var done bool 18261 done, err = future.DoneWithContext(context.Background(), client) 18262 if err != nil { 18263 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansFailoverCommitFuture", "Result", future.Response(), "Polling failure") 18264 return 18265 } 18266 if !done { 18267 rp.Response.Response = future.Response() 18268 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansFailoverCommitFuture") 18269 return 18270 } 18271 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 18272 if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent { 18273 rp, err = client.FailoverCommitResponder(rp.Response.Response) 18274 if err != nil { 18275 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansFailoverCommitFuture", "Result", rp.Response.Response, "Failure responding to request") 18276 } 18277 } 18278 return 18279} 18280 18281// ReplicationRecoveryPlansPlannedFailoverFuture an abstraction for monitoring and retrieving the results 18282// of a long-running operation. 18283type ReplicationRecoveryPlansPlannedFailoverFuture struct { 18284 azure.FutureAPI 18285 // Result returns the result of the asynchronous operation. 18286 // If the operation has not completed it will return an error. 18287 Result func(ReplicationRecoveryPlansClient) (RecoveryPlan, error) 18288} 18289 18290// UnmarshalJSON is the custom unmarshaller for CreateFuture. 18291func (future *ReplicationRecoveryPlansPlannedFailoverFuture) UnmarshalJSON(body []byte) error { 18292 var azFuture azure.Future 18293 if err := json.Unmarshal(body, &azFuture); err != nil { 18294 return err 18295 } 18296 future.FutureAPI = &azFuture 18297 future.Result = future.result 18298 return nil 18299} 18300 18301// result is the default implementation for ReplicationRecoveryPlansPlannedFailoverFuture.Result. 18302func (future *ReplicationRecoveryPlansPlannedFailoverFuture) result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) { 18303 var done bool 18304 done, err = future.DoneWithContext(context.Background(), client) 18305 if err != nil { 18306 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansPlannedFailoverFuture", "Result", future.Response(), "Polling failure") 18307 return 18308 } 18309 if !done { 18310 rp.Response.Response = future.Response() 18311 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansPlannedFailoverFuture") 18312 return 18313 } 18314 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 18315 if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent { 18316 rp, err = client.PlannedFailoverResponder(rp.Response.Response) 18317 if err != nil { 18318 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansPlannedFailoverFuture", "Result", rp.Response.Response, "Failure responding to request") 18319 } 18320 } 18321 return 18322} 18323 18324// ReplicationRecoveryPlansReprotectFuture an abstraction for monitoring and retrieving the results of a 18325// long-running operation. 18326type ReplicationRecoveryPlansReprotectFuture struct { 18327 azure.FutureAPI 18328 // Result returns the result of the asynchronous operation. 18329 // If the operation has not completed it will return an error. 18330 Result func(ReplicationRecoveryPlansClient) (RecoveryPlan, error) 18331} 18332 18333// UnmarshalJSON is the custom unmarshaller for CreateFuture. 18334func (future *ReplicationRecoveryPlansReprotectFuture) UnmarshalJSON(body []byte) error { 18335 var azFuture azure.Future 18336 if err := json.Unmarshal(body, &azFuture); err != nil { 18337 return err 18338 } 18339 future.FutureAPI = &azFuture 18340 future.Result = future.result 18341 return nil 18342} 18343 18344// result is the default implementation for ReplicationRecoveryPlansReprotectFuture.Result. 18345func (future *ReplicationRecoveryPlansReprotectFuture) result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) { 18346 var done bool 18347 done, err = future.DoneWithContext(context.Background(), client) 18348 if err != nil { 18349 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansReprotectFuture", "Result", future.Response(), "Polling failure") 18350 return 18351 } 18352 if !done { 18353 rp.Response.Response = future.Response() 18354 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansReprotectFuture") 18355 return 18356 } 18357 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 18358 if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent { 18359 rp, err = client.ReprotectResponder(rp.Response.Response) 18360 if err != nil { 18361 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansReprotectFuture", "Result", rp.Response.Response, "Failure responding to request") 18362 } 18363 } 18364 return 18365} 18366 18367// ReplicationRecoveryPlansTestFailoverCleanupFuture an abstraction for monitoring and retrieving the 18368// results of a long-running operation. 18369type ReplicationRecoveryPlansTestFailoverCleanupFuture struct { 18370 azure.FutureAPI 18371 // Result returns the result of the asynchronous operation. 18372 // If the operation has not completed it will return an error. 18373 Result func(ReplicationRecoveryPlansClient) (RecoveryPlan, error) 18374} 18375 18376// UnmarshalJSON is the custom unmarshaller for CreateFuture. 18377func (future *ReplicationRecoveryPlansTestFailoverCleanupFuture) UnmarshalJSON(body []byte) error { 18378 var azFuture azure.Future 18379 if err := json.Unmarshal(body, &azFuture); err != nil { 18380 return err 18381 } 18382 future.FutureAPI = &azFuture 18383 future.Result = future.result 18384 return nil 18385} 18386 18387// result is the default implementation for ReplicationRecoveryPlansTestFailoverCleanupFuture.Result. 18388func (future *ReplicationRecoveryPlansTestFailoverCleanupFuture) result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) { 18389 var done bool 18390 done, err = future.DoneWithContext(context.Background(), client) 18391 if err != nil { 18392 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansTestFailoverCleanupFuture", "Result", future.Response(), "Polling failure") 18393 return 18394 } 18395 if !done { 18396 rp.Response.Response = future.Response() 18397 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansTestFailoverCleanupFuture") 18398 return 18399 } 18400 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 18401 if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent { 18402 rp, err = client.TestFailoverCleanupResponder(rp.Response.Response) 18403 if err != nil { 18404 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansTestFailoverCleanupFuture", "Result", rp.Response.Response, "Failure responding to request") 18405 } 18406 } 18407 return 18408} 18409 18410// ReplicationRecoveryPlansTestFailoverFuture an abstraction for monitoring and retrieving the results of a 18411// long-running operation. 18412type ReplicationRecoveryPlansTestFailoverFuture struct { 18413 azure.FutureAPI 18414 // Result returns the result of the asynchronous operation. 18415 // If the operation has not completed it will return an error. 18416 Result func(ReplicationRecoveryPlansClient) (RecoveryPlan, error) 18417} 18418 18419// UnmarshalJSON is the custom unmarshaller for CreateFuture. 18420func (future *ReplicationRecoveryPlansTestFailoverFuture) UnmarshalJSON(body []byte) error { 18421 var azFuture azure.Future 18422 if err := json.Unmarshal(body, &azFuture); err != nil { 18423 return err 18424 } 18425 future.FutureAPI = &azFuture 18426 future.Result = future.result 18427 return nil 18428} 18429 18430// result is the default implementation for ReplicationRecoveryPlansTestFailoverFuture.Result. 18431func (future *ReplicationRecoveryPlansTestFailoverFuture) result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) { 18432 var done bool 18433 done, err = future.DoneWithContext(context.Background(), client) 18434 if err != nil { 18435 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansTestFailoverFuture", "Result", future.Response(), "Polling failure") 18436 return 18437 } 18438 if !done { 18439 rp.Response.Response = future.Response() 18440 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansTestFailoverFuture") 18441 return 18442 } 18443 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 18444 if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent { 18445 rp, err = client.TestFailoverResponder(rp.Response.Response) 18446 if err != nil { 18447 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansTestFailoverFuture", "Result", rp.Response.Response, "Failure responding to request") 18448 } 18449 } 18450 return 18451} 18452 18453// ReplicationRecoveryPlansUnplannedFailoverFuture an abstraction for monitoring and retrieving the results 18454// of a long-running operation. 18455type ReplicationRecoveryPlansUnplannedFailoverFuture struct { 18456 azure.FutureAPI 18457 // Result returns the result of the asynchronous operation. 18458 // If the operation has not completed it will return an error. 18459 Result func(ReplicationRecoveryPlansClient) (RecoveryPlan, error) 18460} 18461 18462// UnmarshalJSON is the custom unmarshaller for CreateFuture. 18463func (future *ReplicationRecoveryPlansUnplannedFailoverFuture) UnmarshalJSON(body []byte) error { 18464 var azFuture azure.Future 18465 if err := json.Unmarshal(body, &azFuture); err != nil { 18466 return err 18467 } 18468 future.FutureAPI = &azFuture 18469 future.Result = future.result 18470 return nil 18471} 18472 18473// result is the default implementation for ReplicationRecoveryPlansUnplannedFailoverFuture.Result. 18474func (future *ReplicationRecoveryPlansUnplannedFailoverFuture) result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) { 18475 var done bool 18476 done, err = future.DoneWithContext(context.Background(), client) 18477 if err != nil { 18478 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansUnplannedFailoverFuture", "Result", future.Response(), "Polling failure") 18479 return 18480 } 18481 if !done { 18482 rp.Response.Response = future.Response() 18483 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansUnplannedFailoverFuture") 18484 return 18485 } 18486 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 18487 if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent { 18488 rp, err = client.UnplannedFailoverResponder(rp.Response.Response) 18489 if err != nil { 18490 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansUnplannedFailoverFuture", "Result", rp.Response.Response, "Failure responding to request") 18491 } 18492 } 18493 return 18494} 18495 18496// ReplicationRecoveryPlansUpdateFuture an abstraction for monitoring and retrieving the results of a 18497// long-running operation. 18498type ReplicationRecoveryPlansUpdateFuture struct { 18499 azure.FutureAPI 18500 // Result returns the result of the asynchronous operation. 18501 // If the operation has not completed it will return an error. 18502 Result func(ReplicationRecoveryPlansClient) (RecoveryPlan, error) 18503} 18504 18505// UnmarshalJSON is the custom unmarshaller for CreateFuture. 18506func (future *ReplicationRecoveryPlansUpdateFuture) UnmarshalJSON(body []byte) error { 18507 var azFuture azure.Future 18508 if err := json.Unmarshal(body, &azFuture); err != nil { 18509 return err 18510 } 18511 future.FutureAPI = &azFuture 18512 future.Result = future.result 18513 return nil 18514} 18515 18516// result is the default implementation for ReplicationRecoveryPlansUpdateFuture.Result. 18517func (future *ReplicationRecoveryPlansUpdateFuture) result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) { 18518 var done bool 18519 done, err = future.DoneWithContext(context.Background(), client) 18520 if err != nil { 18521 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansUpdateFuture", "Result", future.Response(), "Polling failure") 18522 return 18523 } 18524 if !done { 18525 rp.Response.Response = future.Response() 18526 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansUpdateFuture") 18527 return 18528 } 18529 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 18530 if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent { 18531 rp, err = client.UpdateResponder(rp.Response.Response) 18532 if err != nil { 18533 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansUpdateFuture", "Result", rp.Response.Response, "Failure responding to request") 18534 } 18535 } 18536 return 18537} 18538 18539// ReplicationRecoveryServicesProvidersCreateFuture an abstraction for monitoring and retrieving the 18540// results of a long-running operation. 18541type ReplicationRecoveryServicesProvidersCreateFuture struct { 18542 azure.FutureAPI 18543 // Result returns the result of the asynchronous operation. 18544 // If the operation has not completed it will return an error. 18545 Result func(ReplicationRecoveryServicesProvidersClient) (RecoveryServicesProvider, error) 18546} 18547 18548// UnmarshalJSON is the custom unmarshaller for CreateFuture. 18549func (future *ReplicationRecoveryServicesProvidersCreateFuture) UnmarshalJSON(body []byte) error { 18550 var azFuture azure.Future 18551 if err := json.Unmarshal(body, &azFuture); err != nil { 18552 return err 18553 } 18554 future.FutureAPI = &azFuture 18555 future.Result = future.result 18556 return nil 18557} 18558 18559// result is the default implementation for ReplicationRecoveryServicesProvidersCreateFuture.Result. 18560func (future *ReplicationRecoveryServicesProvidersCreateFuture) result(client ReplicationRecoveryServicesProvidersClient) (rsp RecoveryServicesProvider, err error) { 18561 var done bool 18562 done, err = future.DoneWithContext(context.Background(), client) 18563 if err != nil { 18564 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersCreateFuture", "Result", future.Response(), "Polling failure") 18565 return 18566 } 18567 if !done { 18568 rsp.Response.Response = future.Response() 18569 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryServicesProvidersCreateFuture") 18570 return 18571 } 18572 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 18573 if rsp.Response.Response, err = future.GetResult(sender); err == nil && rsp.Response.Response.StatusCode != http.StatusNoContent { 18574 rsp, err = client.CreateResponder(rsp.Response.Response) 18575 if err != nil { 18576 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersCreateFuture", "Result", rsp.Response.Response, "Failure responding to request") 18577 } 18578 } 18579 return 18580} 18581 18582// ReplicationRecoveryServicesProvidersDeleteFuture an abstraction for monitoring and retrieving the 18583// results of a long-running operation. 18584type ReplicationRecoveryServicesProvidersDeleteFuture struct { 18585 azure.FutureAPI 18586 // Result returns the result of the asynchronous operation. 18587 // If the operation has not completed it will return an error. 18588 Result func(ReplicationRecoveryServicesProvidersClient) (autorest.Response, error) 18589} 18590 18591// UnmarshalJSON is the custom unmarshaller for CreateFuture. 18592func (future *ReplicationRecoveryServicesProvidersDeleteFuture) UnmarshalJSON(body []byte) error { 18593 var azFuture azure.Future 18594 if err := json.Unmarshal(body, &azFuture); err != nil { 18595 return err 18596 } 18597 future.FutureAPI = &azFuture 18598 future.Result = future.result 18599 return nil 18600} 18601 18602// result is the default implementation for ReplicationRecoveryServicesProvidersDeleteFuture.Result. 18603func (future *ReplicationRecoveryServicesProvidersDeleteFuture) result(client ReplicationRecoveryServicesProvidersClient) (ar autorest.Response, err error) { 18604 var done bool 18605 done, err = future.DoneWithContext(context.Background(), client) 18606 if err != nil { 18607 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersDeleteFuture", "Result", future.Response(), "Polling failure") 18608 return 18609 } 18610 if !done { 18611 ar.Response = future.Response() 18612 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryServicesProvidersDeleteFuture") 18613 return 18614 } 18615 ar.Response = future.Response() 18616 return 18617} 18618 18619// ReplicationRecoveryServicesProvidersPurgeFuture an abstraction for monitoring and retrieving the results 18620// of a long-running operation. 18621type ReplicationRecoveryServicesProvidersPurgeFuture struct { 18622 azure.FutureAPI 18623 // Result returns the result of the asynchronous operation. 18624 // If the operation has not completed it will return an error. 18625 Result func(ReplicationRecoveryServicesProvidersClient) (autorest.Response, error) 18626} 18627 18628// UnmarshalJSON is the custom unmarshaller for CreateFuture. 18629func (future *ReplicationRecoveryServicesProvidersPurgeFuture) UnmarshalJSON(body []byte) error { 18630 var azFuture azure.Future 18631 if err := json.Unmarshal(body, &azFuture); err != nil { 18632 return err 18633 } 18634 future.FutureAPI = &azFuture 18635 future.Result = future.result 18636 return nil 18637} 18638 18639// result is the default implementation for ReplicationRecoveryServicesProvidersPurgeFuture.Result. 18640func (future *ReplicationRecoveryServicesProvidersPurgeFuture) result(client ReplicationRecoveryServicesProvidersClient) (ar autorest.Response, err error) { 18641 var done bool 18642 done, err = future.DoneWithContext(context.Background(), client) 18643 if err != nil { 18644 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersPurgeFuture", "Result", future.Response(), "Polling failure") 18645 return 18646 } 18647 if !done { 18648 ar.Response = future.Response() 18649 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryServicesProvidersPurgeFuture") 18650 return 18651 } 18652 ar.Response = future.Response() 18653 return 18654} 18655 18656// ReplicationRecoveryServicesProvidersRefreshProviderFuture an abstraction for monitoring and retrieving 18657// the results of a long-running operation. 18658type ReplicationRecoveryServicesProvidersRefreshProviderFuture struct { 18659 azure.FutureAPI 18660 // Result returns the result of the asynchronous operation. 18661 // If the operation has not completed it will return an error. 18662 Result func(ReplicationRecoveryServicesProvidersClient) (RecoveryServicesProvider, error) 18663} 18664 18665// UnmarshalJSON is the custom unmarshaller for CreateFuture. 18666func (future *ReplicationRecoveryServicesProvidersRefreshProviderFuture) UnmarshalJSON(body []byte) error { 18667 var azFuture azure.Future 18668 if err := json.Unmarshal(body, &azFuture); err != nil { 18669 return err 18670 } 18671 future.FutureAPI = &azFuture 18672 future.Result = future.result 18673 return nil 18674} 18675 18676// result is the default implementation for ReplicationRecoveryServicesProvidersRefreshProviderFuture.Result. 18677func (future *ReplicationRecoveryServicesProvidersRefreshProviderFuture) result(client ReplicationRecoveryServicesProvidersClient) (rsp RecoveryServicesProvider, err error) { 18678 var done bool 18679 done, err = future.DoneWithContext(context.Background(), client) 18680 if err != nil { 18681 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersRefreshProviderFuture", "Result", future.Response(), "Polling failure") 18682 return 18683 } 18684 if !done { 18685 rsp.Response.Response = future.Response() 18686 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryServicesProvidersRefreshProviderFuture") 18687 return 18688 } 18689 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 18690 if rsp.Response.Response, err = future.GetResult(sender); err == nil && rsp.Response.Response.StatusCode != http.StatusNoContent { 18691 rsp, err = client.RefreshProviderResponder(rsp.Response.Response) 18692 if err != nil { 18693 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersRefreshProviderFuture", "Result", rsp.Response.Response, "Failure responding to request") 18694 } 18695 } 18696 return 18697} 18698 18699// ReplicationStorageClassificationMappingsCreateFuture an abstraction for monitoring and retrieving the 18700// results of a long-running operation. 18701type ReplicationStorageClassificationMappingsCreateFuture struct { 18702 azure.FutureAPI 18703 // Result returns the result of the asynchronous operation. 18704 // If the operation has not completed it will return an error. 18705 Result func(ReplicationStorageClassificationMappingsClient) (StorageClassificationMapping, error) 18706} 18707 18708// UnmarshalJSON is the custom unmarshaller for CreateFuture. 18709func (future *ReplicationStorageClassificationMappingsCreateFuture) UnmarshalJSON(body []byte) error { 18710 var azFuture azure.Future 18711 if err := json.Unmarshal(body, &azFuture); err != nil { 18712 return err 18713 } 18714 future.FutureAPI = &azFuture 18715 future.Result = future.result 18716 return nil 18717} 18718 18719// result is the default implementation for ReplicationStorageClassificationMappingsCreateFuture.Result. 18720func (future *ReplicationStorageClassificationMappingsCreateFuture) result(client ReplicationStorageClassificationMappingsClient) (scm StorageClassificationMapping, err error) { 18721 var done bool 18722 done, err = future.DoneWithContext(context.Background(), client) 18723 if err != nil { 18724 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsCreateFuture", "Result", future.Response(), "Polling failure") 18725 return 18726 } 18727 if !done { 18728 scm.Response.Response = future.Response() 18729 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationStorageClassificationMappingsCreateFuture") 18730 return 18731 } 18732 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 18733 if scm.Response.Response, err = future.GetResult(sender); err == nil && scm.Response.Response.StatusCode != http.StatusNoContent { 18734 scm, err = client.CreateResponder(scm.Response.Response) 18735 if err != nil { 18736 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsCreateFuture", "Result", scm.Response.Response, "Failure responding to request") 18737 } 18738 } 18739 return 18740} 18741 18742// ReplicationStorageClassificationMappingsDeleteFuture an abstraction for monitoring and retrieving the 18743// results of a long-running operation. 18744type ReplicationStorageClassificationMappingsDeleteFuture struct { 18745 azure.FutureAPI 18746 // Result returns the result of the asynchronous operation. 18747 // If the operation has not completed it will return an error. 18748 Result func(ReplicationStorageClassificationMappingsClient) (autorest.Response, error) 18749} 18750 18751// UnmarshalJSON is the custom unmarshaller for CreateFuture. 18752func (future *ReplicationStorageClassificationMappingsDeleteFuture) UnmarshalJSON(body []byte) error { 18753 var azFuture azure.Future 18754 if err := json.Unmarshal(body, &azFuture); err != nil { 18755 return err 18756 } 18757 future.FutureAPI = &azFuture 18758 future.Result = future.result 18759 return nil 18760} 18761 18762// result is the default implementation for ReplicationStorageClassificationMappingsDeleteFuture.Result. 18763func (future *ReplicationStorageClassificationMappingsDeleteFuture) result(client ReplicationStorageClassificationMappingsClient) (ar autorest.Response, err error) { 18764 var done bool 18765 done, err = future.DoneWithContext(context.Background(), client) 18766 if err != nil { 18767 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsDeleteFuture", "Result", future.Response(), "Polling failure") 18768 return 18769 } 18770 if !done { 18771 ar.Response = future.Response() 18772 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationStorageClassificationMappingsDeleteFuture") 18773 return 18774 } 18775 ar.Response = future.Response() 18776 return 18777} 18778 18779// ReplicationVaultHealthRefreshFuture an abstraction for monitoring and retrieving the results of a 18780// long-running operation. 18781type ReplicationVaultHealthRefreshFuture struct { 18782 azure.FutureAPI 18783 // Result returns the result of the asynchronous operation. 18784 // If the operation has not completed it will return an error. 18785 Result func(ReplicationVaultHealthClient) (VaultHealthDetails, error) 18786} 18787 18788// UnmarshalJSON is the custom unmarshaller for CreateFuture. 18789func (future *ReplicationVaultHealthRefreshFuture) UnmarshalJSON(body []byte) error { 18790 var azFuture azure.Future 18791 if err := json.Unmarshal(body, &azFuture); err != nil { 18792 return err 18793 } 18794 future.FutureAPI = &azFuture 18795 future.Result = future.result 18796 return nil 18797} 18798 18799// result is the default implementation for ReplicationVaultHealthRefreshFuture.Result. 18800func (future *ReplicationVaultHealthRefreshFuture) result(client ReplicationVaultHealthClient) (vhd VaultHealthDetails, err error) { 18801 var done bool 18802 done, err = future.DoneWithContext(context.Background(), client) 18803 if err != nil { 18804 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationVaultHealthRefreshFuture", "Result", future.Response(), "Polling failure") 18805 return 18806 } 18807 if !done { 18808 vhd.Response.Response = future.Response() 18809 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationVaultHealthRefreshFuture") 18810 return 18811 } 18812 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 18813 if vhd.Response.Response, err = future.GetResult(sender); err == nil && vhd.Response.Response.StatusCode != http.StatusNoContent { 18814 vhd, err = client.RefreshResponder(vhd.Response.Response) 18815 if err != nil { 18816 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationVaultHealthRefreshFuture", "Result", vhd.Response.Response, "Failure responding to request") 18817 } 18818 } 18819 return 18820} 18821 18822// ReplicationvCentersCreateFuture an abstraction for monitoring and retrieving the results of a 18823// long-running operation. 18824type ReplicationvCentersCreateFuture struct { 18825 azure.FutureAPI 18826 // Result returns the result of the asynchronous operation. 18827 // If the operation has not completed it will return an error. 18828 Result func(ReplicationvCentersClient) (VCenter, error) 18829} 18830 18831// UnmarshalJSON is the custom unmarshaller for CreateFuture. 18832func (future *ReplicationvCentersCreateFuture) UnmarshalJSON(body []byte) error { 18833 var azFuture azure.Future 18834 if err := json.Unmarshal(body, &azFuture); err != nil { 18835 return err 18836 } 18837 future.FutureAPI = &azFuture 18838 future.Result = future.result 18839 return nil 18840} 18841 18842// result is the default implementation for ReplicationvCentersCreateFuture.Result. 18843func (future *ReplicationvCentersCreateFuture) result(client ReplicationvCentersClient) (vc VCenter, err error) { 18844 var done bool 18845 done, err = future.DoneWithContext(context.Background(), client) 18846 if err != nil { 18847 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersCreateFuture", "Result", future.Response(), "Polling failure") 18848 return 18849 } 18850 if !done { 18851 vc.Response.Response = future.Response() 18852 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationvCentersCreateFuture") 18853 return 18854 } 18855 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 18856 if vc.Response.Response, err = future.GetResult(sender); err == nil && vc.Response.Response.StatusCode != http.StatusNoContent { 18857 vc, err = client.CreateResponder(vc.Response.Response) 18858 if err != nil { 18859 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersCreateFuture", "Result", vc.Response.Response, "Failure responding to request") 18860 } 18861 } 18862 return 18863} 18864 18865// ReplicationvCentersDeleteFuture an abstraction for monitoring and retrieving the results of a 18866// long-running operation. 18867type ReplicationvCentersDeleteFuture struct { 18868 azure.FutureAPI 18869 // Result returns the result of the asynchronous operation. 18870 // If the operation has not completed it will return an error. 18871 Result func(ReplicationvCentersClient) (autorest.Response, error) 18872} 18873 18874// UnmarshalJSON is the custom unmarshaller for CreateFuture. 18875func (future *ReplicationvCentersDeleteFuture) UnmarshalJSON(body []byte) error { 18876 var azFuture azure.Future 18877 if err := json.Unmarshal(body, &azFuture); err != nil { 18878 return err 18879 } 18880 future.FutureAPI = &azFuture 18881 future.Result = future.result 18882 return nil 18883} 18884 18885// result is the default implementation for ReplicationvCentersDeleteFuture.Result. 18886func (future *ReplicationvCentersDeleteFuture) result(client ReplicationvCentersClient) (ar autorest.Response, err error) { 18887 var done bool 18888 done, err = future.DoneWithContext(context.Background(), client) 18889 if err != nil { 18890 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersDeleteFuture", "Result", future.Response(), "Polling failure") 18891 return 18892 } 18893 if !done { 18894 ar.Response = future.Response() 18895 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationvCentersDeleteFuture") 18896 return 18897 } 18898 ar.Response = future.Response() 18899 return 18900} 18901 18902// ReplicationvCentersUpdateFuture an abstraction for monitoring and retrieving the results of a 18903// long-running operation. 18904type ReplicationvCentersUpdateFuture struct { 18905 azure.FutureAPI 18906 // Result returns the result of the asynchronous operation. 18907 // If the operation has not completed it will return an error. 18908 Result func(ReplicationvCentersClient) (VCenter, error) 18909} 18910 18911// UnmarshalJSON is the custom unmarshaller for CreateFuture. 18912func (future *ReplicationvCentersUpdateFuture) UnmarshalJSON(body []byte) error { 18913 var azFuture azure.Future 18914 if err := json.Unmarshal(body, &azFuture); err != nil { 18915 return err 18916 } 18917 future.FutureAPI = &azFuture 18918 future.Result = future.result 18919 return nil 18920} 18921 18922// result is the default implementation for ReplicationvCentersUpdateFuture.Result. 18923func (future *ReplicationvCentersUpdateFuture) result(client ReplicationvCentersClient) (vc VCenter, err error) { 18924 var done bool 18925 done, err = future.DoneWithContext(context.Background(), client) 18926 if err != nil { 18927 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersUpdateFuture", "Result", future.Response(), "Polling failure") 18928 return 18929 } 18930 if !done { 18931 vc.Response.Response = future.Response() 18932 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationvCentersUpdateFuture") 18933 return 18934 } 18935 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 18936 if vc.Response.Response, err = future.GetResult(sender); err == nil && vc.Response.Response.StatusCode != http.StatusNoContent { 18937 vc, err = client.UpdateResponder(vc.Response.Response) 18938 if err != nil { 18939 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersUpdateFuture", "Result", vc.Response.Response, "Failure responding to request") 18940 } 18941 } 18942 return 18943} 18944 18945// Resource azure resource. 18946type Resource struct { 18947 // ID - READ-ONLY; Resource Id 18948 ID *string `json:"id,omitempty"` 18949 // Name - READ-ONLY; Resource Name 18950 Name *string `json:"name,omitempty"` 18951 // Type - READ-ONLY; Resource Type 18952 Type *string `json:"type,omitempty"` 18953 // Location - Resource Location 18954 Location *string `json:"location,omitempty"` 18955} 18956 18957// MarshalJSON is the custom marshaler for Resource. 18958func (r Resource) MarshalJSON() ([]byte, error) { 18959 objectMap := make(map[string]interface{}) 18960 if r.Location != nil { 18961 objectMap["location"] = r.Location 18962 } 18963 return json.Marshal(objectMap) 18964} 18965 18966// ResourceHealthSummary base class to define the health summary of the resources contained under an Arm 18967// resource. 18968type ResourceHealthSummary struct { 18969 // ResourceCount - The count of total resources under the container. 18970 ResourceCount *int32 `json:"resourceCount,omitempty"` 18971 // Issues - The list of summary of health errors across the resources under the container. 18972 Issues *[]HealthErrorSummary `json:"issues,omitempty"` 18973 // CategorizedResourceCounts - The categorized resource counts. 18974 CategorizedResourceCounts map[string]*int32 `json:"categorizedResourceCounts"` 18975} 18976 18977// MarshalJSON is the custom marshaler for ResourceHealthSummary. 18978func (RHS ResourceHealthSummary) MarshalJSON() ([]byte, error) { 18979 objectMap := make(map[string]interface{}) 18980 if RHS.ResourceCount != nil { 18981 objectMap["resourceCount"] = RHS.ResourceCount 18982 } 18983 if RHS.Issues != nil { 18984 objectMap["issues"] = RHS.Issues 18985 } 18986 if RHS.CategorizedResourceCounts != nil { 18987 objectMap["categorizedResourceCounts"] = RHS.CategorizedResourceCounts 18988 } 18989 return json.Marshal(objectMap) 18990} 18991 18992// ResumeJobParams resume job params. 18993type ResumeJobParams struct { 18994 // Properties - Resume job properties. 18995 Properties *ResumeJobParamsProperties `json:"properties,omitempty"` 18996} 18997 18998// ResumeJobParamsProperties resume job properties. 18999type ResumeJobParamsProperties struct { 19000 // Comments - Resume job comments. 19001 Comments *string `json:"comments,omitempty"` 19002} 19003 19004// ResyncInput resync input. 19005type ResyncInput struct { 19006 // Properties - Resync input properties. 19007 Properties *ResyncInputProperties `json:"properties,omitempty"` 19008} 19009 19010// ResyncInputProperties resync input properties. 19011type ResyncInputProperties struct { 19012 // ProviderSpecificDetails - The provider specific details. 19013 ProviderSpecificDetails BasicResyncProviderSpecificInput `json:"providerSpecificDetails,omitempty"` 19014} 19015 19016// UnmarshalJSON is the custom unmarshaler for ResyncInputProperties struct. 19017func (rip *ResyncInputProperties) UnmarshalJSON(body []byte) error { 19018 var m map[string]*json.RawMessage 19019 err := json.Unmarshal(body, &m) 19020 if err != nil { 19021 return err 19022 } 19023 for k, v := range m { 19024 switch k { 19025 case "providerSpecificDetails": 19026 if v != nil { 19027 providerSpecificDetails, err := unmarshalBasicResyncProviderSpecificInput(*v) 19028 if err != nil { 19029 return err 19030 } 19031 rip.ProviderSpecificDetails = providerSpecificDetails 19032 } 19033 } 19034 } 19035 19036 return nil 19037} 19038 19039// BasicResyncProviderSpecificInput resync provider specific input. 19040type BasicResyncProviderSpecificInput interface { 19041 AsVMwareCbtResyncInput() (*VMwareCbtResyncInput, bool) 19042 AsResyncProviderSpecificInput() (*ResyncProviderSpecificInput, bool) 19043} 19044 19045// ResyncProviderSpecificInput resync provider specific input. 19046type ResyncProviderSpecificInput struct { 19047 // InstanceType - Possible values include: 'InstanceTypeBasicResyncProviderSpecificInputInstanceTypeResyncProviderSpecificInput', 'InstanceTypeBasicResyncProviderSpecificInputInstanceTypeVMwareCbt' 19048 InstanceType InstanceTypeBasicResyncProviderSpecificInput `json:"instanceType,omitempty"` 19049} 19050 19051func unmarshalBasicResyncProviderSpecificInput(body []byte) (BasicResyncProviderSpecificInput, error) { 19052 var m map[string]interface{} 19053 err := json.Unmarshal(body, &m) 19054 if err != nil { 19055 return nil, err 19056 } 19057 19058 switch m["instanceType"] { 19059 case string(InstanceTypeBasicResyncProviderSpecificInputInstanceTypeVMwareCbt): 19060 var vmcri VMwareCbtResyncInput 19061 err := json.Unmarshal(body, &vmcri) 19062 return vmcri, err 19063 default: 19064 var rpsi ResyncProviderSpecificInput 19065 err := json.Unmarshal(body, &rpsi) 19066 return rpsi, err 19067 } 19068} 19069func unmarshalBasicResyncProviderSpecificInputArray(body []byte) ([]BasicResyncProviderSpecificInput, error) { 19070 var rawMessages []*json.RawMessage 19071 err := json.Unmarshal(body, &rawMessages) 19072 if err != nil { 19073 return nil, err 19074 } 19075 19076 rpsiArray := make([]BasicResyncProviderSpecificInput, len(rawMessages)) 19077 19078 for index, rawMessage := range rawMessages { 19079 rpsi, err := unmarshalBasicResyncProviderSpecificInput(*rawMessage) 19080 if err != nil { 19081 return nil, err 19082 } 19083 rpsiArray[index] = rpsi 19084 } 19085 return rpsiArray, nil 19086} 19087 19088// MarshalJSON is the custom marshaler for ResyncProviderSpecificInput. 19089func (rpsi ResyncProviderSpecificInput) MarshalJSON() ([]byte, error) { 19090 rpsi.InstanceType = InstanceTypeBasicResyncProviderSpecificInputInstanceTypeResyncProviderSpecificInput 19091 objectMap := make(map[string]interface{}) 19092 if rpsi.InstanceType != "" { 19093 objectMap["instanceType"] = rpsi.InstanceType 19094 } 19095 return json.Marshal(objectMap) 19096} 19097 19098// AsVMwareCbtResyncInput is the BasicResyncProviderSpecificInput implementation for ResyncProviderSpecificInput. 19099func (rpsi ResyncProviderSpecificInput) AsVMwareCbtResyncInput() (*VMwareCbtResyncInput, bool) { 19100 return nil, false 19101} 19102 19103// AsResyncProviderSpecificInput is the BasicResyncProviderSpecificInput implementation for ResyncProviderSpecificInput. 19104func (rpsi ResyncProviderSpecificInput) AsResyncProviderSpecificInput() (*ResyncProviderSpecificInput, bool) { 19105 return &rpsi, true 19106} 19107 19108// AsBasicResyncProviderSpecificInput is the BasicResyncProviderSpecificInput implementation for ResyncProviderSpecificInput. 19109func (rpsi ResyncProviderSpecificInput) AsBasicResyncProviderSpecificInput() (BasicResyncProviderSpecificInput, bool) { 19110 return &rpsi, true 19111} 19112 19113// RetentionVolume the retention details of the MT. 19114type RetentionVolume struct { 19115 // VolumeName - The volume name. 19116 VolumeName *string `json:"volumeName,omitempty"` 19117 // CapacityInBytes - The volume capacity. 19118 CapacityInBytes *int64 `json:"capacityInBytes,omitempty"` 19119 // FreeSpaceInBytes - The free space available in this volume. 19120 FreeSpaceInBytes *int64 `json:"freeSpaceInBytes,omitempty"` 19121 // ThresholdPercentage - The threshold percentage. 19122 ThresholdPercentage *int32 `json:"thresholdPercentage,omitempty"` 19123} 19124 19125// ReverseReplicationInput reverse replication input. 19126type ReverseReplicationInput struct { 19127 // Properties - Reverse replication properties 19128 Properties *ReverseReplicationInputProperties `json:"properties,omitempty"` 19129} 19130 19131// ReverseReplicationInputProperties reverse replication input properties. 19132type ReverseReplicationInputProperties struct { 19133 // FailoverDirection - Failover direction. 19134 FailoverDirection *string `json:"failoverDirection,omitempty"` 19135 // ProviderSpecificDetails - Provider specific reverse replication input. 19136 ProviderSpecificDetails BasicReverseReplicationProviderSpecificInput `json:"providerSpecificDetails,omitempty"` 19137} 19138 19139// UnmarshalJSON is the custom unmarshaler for ReverseReplicationInputProperties struct. 19140func (rrip *ReverseReplicationInputProperties) UnmarshalJSON(body []byte) error { 19141 var m map[string]*json.RawMessage 19142 err := json.Unmarshal(body, &m) 19143 if err != nil { 19144 return err 19145 } 19146 for k, v := range m { 19147 switch k { 19148 case "failoverDirection": 19149 if v != nil { 19150 var failoverDirection string 19151 err = json.Unmarshal(*v, &failoverDirection) 19152 if err != nil { 19153 return err 19154 } 19155 rrip.FailoverDirection = &failoverDirection 19156 } 19157 case "providerSpecificDetails": 19158 if v != nil { 19159 providerSpecificDetails, err := unmarshalBasicReverseReplicationProviderSpecificInput(*v) 19160 if err != nil { 19161 return err 19162 } 19163 rrip.ProviderSpecificDetails = providerSpecificDetails 19164 } 19165 } 19166 } 19167 19168 return nil 19169} 19170 19171// BasicReverseReplicationProviderSpecificInput provider specific reverse replication input. 19172type BasicReverseReplicationProviderSpecificInput interface { 19173 AsA2AReprotectInput() (*A2AReprotectInput, bool) 19174 AsHyperVReplicaAzureReprotectInput() (*HyperVReplicaAzureReprotectInput, bool) 19175 AsInMageAzureV2ReprotectInput() (*InMageAzureV2ReprotectInput, bool) 19176 AsInMageReprotectInput() (*InMageReprotectInput, bool) 19177 AsReverseReplicationProviderSpecificInput() (*ReverseReplicationProviderSpecificInput, bool) 19178} 19179 19180// ReverseReplicationProviderSpecificInput provider specific reverse replication input. 19181type ReverseReplicationProviderSpecificInput struct { 19182 // InstanceType - Possible values include: 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeReverseReplicationProviderSpecificInput', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMage' 19183 InstanceType InstanceTypeBasicReverseReplicationProviderSpecificInput `json:"instanceType,omitempty"` 19184} 19185 19186func unmarshalBasicReverseReplicationProviderSpecificInput(body []byte) (BasicReverseReplicationProviderSpecificInput, error) { 19187 var m map[string]interface{} 19188 err := json.Unmarshal(body, &m) 19189 if err != nil { 19190 return nil, err 19191 } 19192 19193 switch m["instanceType"] { 19194 case string(InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeA2A): 19195 var ari A2AReprotectInput 19196 err := json.Unmarshal(body, &ari) 19197 return ari, err 19198 case string(InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeHyperVReplicaAzure): 19199 var hvrari HyperVReplicaAzureReprotectInput 19200 err := json.Unmarshal(body, &hvrari) 19201 return hvrari, err 19202 case string(InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMageAzureV2): 19203 var imavri InMageAzureV2ReprotectInput 19204 err := json.Unmarshal(body, &imavri) 19205 return imavri, err 19206 case string(InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMage): 19207 var imri InMageReprotectInput 19208 err := json.Unmarshal(body, &imri) 19209 return imri, err 19210 default: 19211 var rrpsi ReverseReplicationProviderSpecificInput 19212 err := json.Unmarshal(body, &rrpsi) 19213 return rrpsi, err 19214 } 19215} 19216func unmarshalBasicReverseReplicationProviderSpecificInputArray(body []byte) ([]BasicReverseReplicationProviderSpecificInput, error) { 19217 var rawMessages []*json.RawMessage 19218 err := json.Unmarshal(body, &rawMessages) 19219 if err != nil { 19220 return nil, err 19221 } 19222 19223 rrpsiArray := make([]BasicReverseReplicationProviderSpecificInput, len(rawMessages)) 19224 19225 for index, rawMessage := range rawMessages { 19226 rrpsi, err := unmarshalBasicReverseReplicationProviderSpecificInput(*rawMessage) 19227 if err != nil { 19228 return nil, err 19229 } 19230 rrpsiArray[index] = rrpsi 19231 } 19232 return rrpsiArray, nil 19233} 19234 19235// MarshalJSON is the custom marshaler for ReverseReplicationProviderSpecificInput. 19236func (rrpsi ReverseReplicationProviderSpecificInput) MarshalJSON() ([]byte, error) { 19237 rrpsi.InstanceType = InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeReverseReplicationProviderSpecificInput 19238 objectMap := make(map[string]interface{}) 19239 if rrpsi.InstanceType != "" { 19240 objectMap["instanceType"] = rrpsi.InstanceType 19241 } 19242 return json.Marshal(objectMap) 19243} 19244 19245// AsA2AReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for ReverseReplicationProviderSpecificInput. 19246func (rrpsi ReverseReplicationProviderSpecificInput) AsA2AReprotectInput() (*A2AReprotectInput, bool) { 19247 return nil, false 19248} 19249 19250// AsHyperVReplicaAzureReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for ReverseReplicationProviderSpecificInput. 19251func (rrpsi ReverseReplicationProviderSpecificInput) AsHyperVReplicaAzureReprotectInput() (*HyperVReplicaAzureReprotectInput, bool) { 19252 return nil, false 19253} 19254 19255// AsInMageAzureV2ReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for ReverseReplicationProviderSpecificInput. 19256func (rrpsi ReverseReplicationProviderSpecificInput) AsInMageAzureV2ReprotectInput() (*InMageAzureV2ReprotectInput, bool) { 19257 return nil, false 19258} 19259 19260// AsInMageReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for ReverseReplicationProviderSpecificInput. 19261func (rrpsi ReverseReplicationProviderSpecificInput) AsInMageReprotectInput() (*InMageReprotectInput, bool) { 19262 return nil, false 19263} 19264 19265// AsReverseReplicationProviderSpecificInput is the BasicReverseReplicationProviderSpecificInput implementation for ReverseReplicationProviderSpecificInput. 19266func (rrpsi ReverseReplicationProviderSpecificInput) AsReverseReplicationProviderSpecificInput() (*ReverseReplicationProviderSpecificInput, bool) { 19267 return &rrpsi, true 19268} 19269 19270// AsBasicReverseReplicationProviderSpecificInput is the BasicReverseReplicationProviderSpecificInput implementation for ReverseReplicationProviderSpecificInput. 19271func (rrpsi ReverseReplicationProviderSpecificInput) AsBasicReverseReplicationProviderSpecificInput() (BasicReverseReplicationProviderSpecificInput, bool) { 19272 return &rrpsi, true 19273} 19274 19275// RoleAssignment azure role assignment details. 19276type RoleAssignment struct { 19277 // ID - The ARM Id of the role assignment. 19278 ID *string `json:"id,omitempty"` 19279 // Name - The name of the role assignment. 19280 Name *string `json:"name,omitempty"` 19281 // Scope - Role assignment scope. 19282 Scope *string `json:"scope,omitempty"` 19283 // PrincipalID - Principal Id. 19284 PrincipalID *string `json:"principalId,omitempty"` 19285 // RoleDefinitionID - Role definition id. 19286 RoleDefinitionID *string `json:"roleDefinitionId,omitempty"` 19287} 19288 19289// RunAsAccount CS Accounts Details. 19290type RunAsAccount struct { 19291 // AccountID - The CS RunAs account Id. 19292 AccountID *string `json:"accountId,omitempty"` 19293 // AccountName - The CS RunAs account name. 19294 AccountName *string `json:"accountName,omitempty"` 19295} 19296 19297// SanEnableProtectionInput san enable protection provider specific input. 19298type SanEnableProtectionInput struct { 19299 // InstanceType - Possible values include: 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeEnableProtectionProviderSpecificInput', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeSan' 19300 InstanceType InstanceTypeBasicEnableProtectionProviderSpecificInput `json:"instanceType,omitempty"` 19301} 19302 19303// MarshalJSON is the custom marshaler for SanEnableProtectionInput. 19304func (sepi SanEnableProtectionInput) MarshalJSON() ([]byte, error) { 19305 sepi.InstanceType = InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeSan 19306 objectMap := make(map[string]interface{}) 19307 if sepi.InstanceType != "" { 19308 objectMap["instanceType"] = sepi.InstanceType 19309 } 19310 return json.Marshal(objectMap) 19311} 19312 19313// AsA2AEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for SanEnableProtectionInput. 19314func (sepi SanEnableProtectionInput) AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool) { 19315 return nil, false 19316} 19317 19318// AsHyperVReplicaAzureEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for SanEnableProtectionInput. 19319func (sepi SanEnableProtectionInput) AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool) { 19320 return nil, false 19321} 19322 19323// AsInMageAzureV2EnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for SanEnableProtectionInput. 19324func (sepi SanEnableProtectionInput) AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool) { 19325 return nil, false 19326} 19327 19328// AsInMageEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for SanEnableProtectionInput. 19329func (sepi SanEnableProtectionInput) AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool) { 19330 return nil, false 19331} 19332 19333// AsSanEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for SanEnableProtectionInput. 19334func (sepi SanEnableProtectionInput) AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool) { 19335 return &sepi, true 19336} 19337 19338// AsEnableProtectionProviderSpecificInput is the BasicEnableProtectionProviderSpecificInput implementation for SanEnableProtectionInput. 19339func (sepi SanEnableProtectionInput) AsEnableProtectionProviderSpecificInput() (*EnableProtectionProviderSpecificInput, bool) { 19340 return nil, false 19341} 19342 19343// AsBasicEnableProtectionProviderSpecificInput is the BasicEnableProtectionProviderSpecificInput implementation for SanEnableProtectionInput. 19344func (sepi SanEnableProtectionInput) AsBasicEnableProtectionProviderSpecificInput() (BasicEnableProtectionProviderSpecificInput, bool) { 19345 return &sepi, true 19346} 19347 19348// ScriptActionTaskDetails this class represents the script action task details. 19349type ScriptActionTaskDetails struct { 19350 // Name - The name. 19351 Name *string `json:"name,omitempty"` 19352 // Path - The path. 19353 Path *string `json:"path,omitempty"` 19354 // Output - The output. 19355 Output *string `json:"output,omitempty"` 19356 // IsPrimarySideScript - A value indicating whether it is a primary side script or not. 19357 IsPrimarySideScript *bool `json:"isPrimarySideScript,omitempty"` 19358 // InstanceType - Possible values include: 'InstanceTypeTaskTypeDetails', 'InstanceTypeAutomationRunbookTaskDetails', 'InstanceTypeConsistencyCheckTaskDetails', 'InstanceTypeFabricReplicationGroupTaskDetails', 'InstanceTypeJobTaskDetails', 'InstanceTypeManualActionTaskDetails', 'InstanceTypeScriptActionTaskDetails', 'InstanceTypeVirtualMachineTaskDetails', 'InstanceTypeVMNicUpdatesTaskDetails' 19359 InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"` 19360} 19361 19362// MarshalJSON is the custom marshaler for ScriptActionTaskDetails. 19363func (satd ScriptActionTaskDetails) MarshalJSON() ([]byte, error) { 19364 satd.InstanceType = InstanceTypeScriptActionTaskDetails 19365 objectMap := make(map[string]interface{}) 19366 if satd.Name != nil { 19367 objectMap["name"] = satd.Name 19368 } 19369 if satd.Path != nil { 19370 objectMap["path"] = satd.Path 19371 } 19372 if satd.Output != nil { 19373 objectMap["output"] = satd.Output 19374 } 19375 if satd.IsPrimarySideScript != nil { 19376 objectMap["isPrimarySideScript"] = satd.IsPrimarySideScript 19377 } 19378 if satd.InstanceType != "" { 19379 objectMap["instanceType"] = satd.InstanceType 19380 } 19381 return json.Marshal(objectMap) 19382} 19383 19384// AsAutomationRunbookTaskDetails is the BasicTaskTypeDetails implementation for ScriptActionTaskDetails. 19385func (satd ScriptActionTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) { 19386 return nil, false 19387} 19388 19389// AsConsistencyCheckTaskDetails is the BasicTaskTypeDetails implementation for ScriptActionTaskDetails. 19390func (satd ScriptActionTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) { 19391 return nil, false 19392} 19393 19394// AsFabricReplicationGroupTaskDetails is the BasicTaskTypeDetails implementation for ScriptActionTaskDetails. 19395func (satd ScriptActionTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) { 19396 return nil, false 19397} 19398 19399// AsJobTaskDetails is the BasicTaskTypeDetails implementation for ScriptActionTaskDetails. 19400func (satd ScriptActionTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) { 19401 return nil, false 19402} 19403 19404// AsManualActionTaskDetails is the BasicTaskTypeDetails implementation for ScriptActionTaskDetails. 19405func (satd ScriptActionTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) { 19406 return nil, false 19407} 19408 19409// AsScriptActionTaskDetails is the BasicTaskTypeDetails implementation for ScriptActionTaskDetails. 19410func (satd ScriptActionTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) { 19411 return &satd, true 19412} 19413 19414// AsVirtualMachineTaskDetails is the BasicTaskTypeDetails implementation for ScriptActionTaskDetails. 19415func (satd ScriptActionTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) { 19416 return nil, false 19417} 19418 19419// AsVMNicUpdatesTaskDetails is the BasicTaskTypeDetails implementation for ScriptActionTaskDetails. 19420func (satd ScriptActionTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) { 19421 return nil, false 19422} 19423 19424// AsTaskTypeDetails is the BasicTaskTypeDetails implementation for ScriptActionTaskDetails. 19425func (satd ScriptActionTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) { 19426 return nil, false 19427} 19428 19429// AsBasicTaskTypeDetails is the BasicTaskTypeDetails implementation for ScriptActionTaskDetails. 19430func (satd ScriptActionTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) { 19431 return &satd, true 19432} 19433 19434// ServiceError ASR error model 19435type ServiceError struct { 19436 // Code - Error code. 19437 Code *string `json:"code,omitempty"` 19438 // Message - Error message. 19439 Message *string `json:"message,omitempty"` 19440 // PossibleCauses - Possible causes of error. 19441 PossibleCauses *string `json:"possibleCauses,omitempty"` 19442 // RecommendedAction - Recommended action to resolve error. 19443 RecommendedAction *string `json:"recommendedAction,omitempty"` 19444 // ActivityID - Activity Id. 19445 ActivityID *string `json:"activityId,omitempty"` 19446} 19447 19448// StorageClassification storage object definition. 19449type StorageClassification struct { 19450 autorest.Response `json:"-"` 19451 // Properties - Properties of the storage object. 19452 Properties *StorageClassificationProperties `json:"properties,omitempty"` 19453 // ID - READ-ONLY; Resource Id 19454 ID *string `json:"id,omitempty"` 19455 // Name - READ-ONLY; Resource Name 19456 Name *string `json:"name,omitempty"` 19457 // Type - READ-ONLY; Resource Type 19458 Type *string `json:"type,omitempty"` 19459 // Location - Resource Location 19460 Location *string `json:"location,omitempty"` 19461} 19462 19463// MarshalJSON is the custom marshaler for StorageClassification. 19464func (sc StorageClassification) MarshalJSON() ([]byte, error) { 19465 objectMap := make(map[string]interface{}) 19466 if sc.Properties != nil { 19467 objectMap["properties"] = sc.Properties 19468 } 19469 if sc.Location != nil { 19470 objectMap["location"] = sc.Location 19471 } 19472 return json.Marshal(objectMap) 19473} 19474 19475// StorageClassificationCollection collection of storage details. 19476type StorageClassificationCollection struct { 19477 autorest.Response `json:"-"` 19478 // Value - The storage details. 19479 Value *[]StorageClassification `json:"value,omitempty"` 19480 // NextLink - The value of next link. 19481 NextLink *string `json:"nextLink,omitempty"` 19482} 19483 19484// StorageClassificationCollectionIterator provides access to a complete listing of StorageClassification 19485// values. 19486type StorageClassificationCollectionIterator struct { 19487 i int 19488 page StorageClassificationCollectionPage 19489} 19490 19491// NextWithContext advances to the next value. If there was an error making 19492// the request the iterator does not advance and the error is returned. 19493func (iter *StorageClassificationCollectionIterator) NextWithContext(ctx context.Context) (err error) { 19494 if tracing.IsEnabled() { 19495 ctx = tracing.StartSpan(ctx, fqdn+"/StorageClassificationCollectionIterator.NextWithContext") 19496 defer func() { 19497 sc := -1 19498 if iter.Response().Response.Response != nil { 19499 sc = iter.Response().Response.Response.StatusCode 19500 } 19501 tracing.EndSpan(ctx, sc, err) 19502 }() 19503 } 19504 iter.i++ 19505 if iter.i < len(iter.page.Values()) { 19506 return nil 19507 } 19508 err = iter.page.NextWithContext(ctx) 19509 if err != nil { 19510 iter.i-- 19511 return err 19512 } 19513 iter.i = 0 19514 return nil 19515} 19516 19517// Next advances to the next value. If there was an error making 19518// the request the iterator does not advance and the error is returned. 19519// Deprecated: Use NextWithContext() instead. 19520func (iter *StorageClassificationCollectionIterator) Next() error { 19521 return iter.NextWithContext(context.Background()) 19522} 19523 19524// NotDone returns true if the enumeration should be started or is not yet complete. 19525func (iter StorageClassificationCollectionIterator) NotDone() bool { 19526 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 19527} 19528 19529// Response returns the raw server response from the last page request. 19530func (iter StorageClassificationCollectionIterator) Response() StorageClassificationCollection { 19531 return iter.page.Response() 19532} 19533 19534// Value returns the current value or a zero-initialized value if the 19535// iterator has advanced beyond the end of the collection. 19536func (iter StorageClassificationCollectionIterator) Value() StorageClassification { 19537 if !iter.page.NotDone() { 19538 return StorageClassification{} 19539 } 19540 return iter.page.Values()[iter.i] 19541} 19542 19543// Creates a new instance of the StorageClassificationCollectionIterator type. 19544func NewStorageClassificationCollectionIterator(page StorageClassificationCollectionPage) StorageClassificationCollectionIterator { 19545 return StorageClassificationCollectionIterator{page: page} 19546} 19547 19548// IsEmpty returns true if the ListResult contains no values. 19549func (scc StorageClassificationCollection) IsEmpty() bool { 19550 return scc.Value == nil || len(*scc.Value) == 0 19551} 19552 19553// hasNextLink returns true if the NextLink is not empty. 19554func (scc StorageClassificationCollection) hasNextLink() bool { 19555 return scc.NextLink != nil && len(*scc.NextLink) != 0 19556} 19557 19558// storageClassificationCollectionPreparer prepares a request to retrieve the next set of results. 19559// It returns nil if no more results exist. 19560func (scc StorageClassificationCollection) storageClassificationCollectionPreparer(ctx context.Context) (*http.Request, error) { 19561 if !scc.hasNextLink() { 19562 return nil, nil 19563 } 19564 return autorest.Prepare((&http.Request{}).WithContext(ctx), 19565 autorest.AsJSON(), 19566 autorest.AsGet(), 19567 autorest.WithBaseURL(to.String(scc.NextLink))) 19568} 19569 19570// StorageClassificationCollectionPage contains a page of StorageClassification values. 19571type StorageClassificationCollectionPage struct { 19572 fn func(context.Context, StorageClassificationCollection) (StorageClassificationCollection, error) 19573 scc StorageClassificationCollection 19574} 19575 19576// NextWithContext advances to the next page of values. If there was an error making 19577// the request the page does not advance and the error is returned. 19578func (page *StorageClassificationCollectionPage) NextWithContext(ctx context.Context) (err error) { 19579 if tracing.IsEnabled() { 19580 ctx = tracing.StartSpan(ctx, fqdn+"/StorageClassificationCollectionPage.NextWithContext") 19581 defer func() { 19582 sc := -1 19583 if page.Response().Response.Response != nil { 19584 sc = page.Response().Response.Response.StatusCode 19585 } 19586 tracing.EndSpan(ctx, sc, err) 19587 }() 19588 } 19589 for { 19590 next, err := page.fn(ctx, page.scc) 19591 if err != nil { 19592 return err 19593 } 19594 page.scc = next 19595 if !next.hasNextLink() || !next.IsEmpty() { 19596 break 19597 } 19598 } 19599 return nil 19600} 19601 19602// Next advances to the next page of values. If there was an error making 19603// the request the page does not advance and the error is returned. 19604// Deprecated: Use NextWithContext() instead. 19605func (page *StorageClassificationCollectionPage) Next() error { 19606 return page.NextWithContext(context.Background()) 19607} 19608 19609// NotDone returns true if the page enumeration should be started or is not yet complete. 19610func (page StorageClassificationCollectionPage) NotDone() bool { 19611 return !page.scc.IsEmpty() 19612} 19613 19614// Response returns the raw server response from the last page request. 19615func (page StorageClassificationCollectionPage) Response() StorageClassificationCollection { 19616 return page.scc 19617} 19618 19619// Values returns the slice of values for the current page or nil if there are no values. 19620func (page StorageClassificationCollectionPage) Values() []StorageClassification { 19621 if page.scc.IsEmpty() { 19622 return nil 19623 } 19624 return *page.scc.Value 19625} 19626 19627// Creates a new instance of the StorageClassificationCollectionPage type. 19628func NewStorageClassificationCollectionPage(cur StorageClassificationCollection, getNextPage func(context.Context, StorageClassificationCollection) (StorageClassificationCollection, error)) StorageClassificationCollectionPage { 19629 return StorageClassificationCollectionPage{ 19630 fn: getNextPage, 19631 scc: cur, 19632 } 19633} 19634 19635// StorageClassificationMapping storage mapping object. 19636type StorageClassificationMapping struct { 19637 autorest.Response `json:"-"` 19638 // Properties - Properties of the storage mapping object. 19639 Properties *StorageClassificationMappingProperties `json:"properties,omitempty"` 19640 // ID - READ-ONLY; Resource Id 19641 ID *string `json:"id,omitempty"` 19642 // Name - READ-ONLY; Resource Name 19643 Name *string `json:"name,omitempty"` 19644 // Type - READ-ONLY; Resource Type 19645 Type *string `json:"type,omitempty"` 19646 // Location - Resource Location 19647 Location *string `json:"location,omitempty"` 19648} 19649 19650// MarshalJSON is the custom marshaler for StorageClassificationMapping. 19651func (scm StorageClassificationMapping) MarshalJSON() ([]byte, error) { 19652 objectMap := make(map[string]interface{}) 19653 if scm.Properties != nil { 19654 objectMap["properties"] = scm.Properties 19655 } 19656 if scm.Location != nil { 19657 objectMap["location"] = scm.Location 19658 } 19659 return json.Marshal(objectMap) 19660} 19661 19662// StorageClassificationMappingCollection collection of storage mapping details. 19663type StorageClassificationMappingCollection struct { 19664 autorest.Response `json:"-"` 19665 // Value - The storage details. 19666 Value *[]StorageClassificationMapping `json:"value,omitempty"` 19667 // NextLink - The value of next link. 19668 NextLink *string `json:"nextLink,omitempty"` 19669} 19670 19671// StorageClassificationMappingCollectionIterator provides access to a complete listing of 19672// StorageClassificationMapping values. 19673type StorageClassificationMappingCollectionIterator struct { 19674 i int 19675 page StorageClassificationMappingCollectionPage 19676} 19677 19678// NextWithContext advances to the next value. If there was an error making 19679// the request the iterator does not advance and the error is returned. 19680func (iter *StorageClassificationMappingCollectionIterator) NextWithContext(ctx context.Context) (err error) { 19681 if tracing.IsEnabled() { 19682 ctx = tracing.StartSpan(ctx, fqdn+"/StorageClassificationMappingCollectionIterator.NextWithContext") 19683 defer func() { 19684 sc := -1 19685 if iter.Response().Response.Response != nil { 19686 sc = iter.Response().Response.Response.StatusCode 19687 } 19688 tracing.EndSpan(ctx, sc, err) 19689 }() 19690 } 19691 iter.i++ 19692 if iter.i < len(iter.page.Values()) { 19693 return nil 19694 } 19695 err = iter.page.NextWithContext(ctx) 19696 if err != nil { 19697 iter.i-- 19698 return err 19699 } 19700 iter.i = 0 19701 return nil 19702} 19703 19704// Next advances to the next value. If there was an error making 19705// the request the iterator does not advance and the error is returned. 19706// Deprecated: Use NextWithContext() instead. 19707func (iter *StorageClassificationMappingCollectionIterator) Next() error { 19708 return iter.NextWithContext(context.Background()) 19709} 19710 19711// NotDone returns true if the enumeration should be started or is not yet complete. 19712func (iter StorageClassificationMappingCollectionIterator) NotDone() bool { 19713 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 19714} 19715 19716// Response returns the raw server response from the last page request. 19717func (iter StorageClassificationMappingCollectionIterator) Response() StorageClassificationMappingCollection { 19718 return iter.page.Response() 19719} 19720 19721// Value returns the current value or a zero-initialized value if the 19722// iterator has advanced beyond the end of the collection. 19723func (iter StorageClassificationMappingCollectionIterator) Value() StorageClassificationMapping { 19724 if !iter.page.NotDone() { 19725 return StorageClassificationMapping{} 19726 } 19727 return iter.page.Values()[iter.i] 19728} 19729 19730// Creates a new instance of the StorageClassificationMappingCollectionIterator type. 19731func NewStorageClassificationMappingCollectionIterator(page StorageClassificationMappingCollectionPage) StorageClassificationMappingCollectionIterator { 19732 return StorageClassificationMappingCollectionIterator{page: page} 19733} 19734 19735// IsEmpty returns true if the ListResult contains no values. 19736func (scmc StorageClassificationMappingCollection) IsEmpty() bool { 19737 return scmc.Value == nil || len(*scmc.Value) == 0 19738} 19739 19740// hasNextLink returns true if the NextLink is not empty. 19741func (scmc StorageClassificationMappingCollection) hasNextLink() bool { 19742 return scmc.NextLink != nil && len(*scmc.NextLink) != 0 19743} 19744 19745// storageClassificationMappingCollectionPreparer prepares a request to retrieve the next set of results. 19746// It returns nil if no more results exist. 19747func (scmc StorageClassificationMappingCollection) storageClassificationMappingCollectionPreparer(ctx context.Context) (*http.Request, error) { 19748 if !scmc.hasNextLink() { 19749 return nil, nil 19750 } 19751 return autorest.Prepare((&http.Request{}).WithContext(ctx), 19752 autorest.AsJSON(), 19753 autorest.AsGet(), 19754 autorest.WithBaseURL(to.String(scmc.NextLink))) 19755} 19756 19757// StorageClassificationMappingCollectionPage contains a page of StorageClassificationMapping values. 19758type StorageClassificationMappingCollectionPage struct { 19759 fn func(context.Context, StorageClassificationMappingCollection) (StorageClassificationMappingCollection, error) 19760 scmc StorageClassificationMappingCollection 19761} 19762 19763// NextWithContext advances to the next page of values. If there was an error making 19764// the request the page does not advance and the error is returned. 19765func (page *StorageClassificationMappingCollectionPage) NextWithContext(ctx context.Context) (err error) { 19766 if tracing.IsEnabled() { 19767 ctx = tracing.StartSpan(ctx, fqdn+"/StorageClassificationMappingCollectionPage.NextWithContext") 19768 defer func() { 19769 sc := -1 19770 if page.Response().Response.Response != nil { 19771 sc = page.Response().Response.Response.StatusCode 19772 } 19773 tracing.EndSpan(ctx, sc, err) 19774 }() 19775 } 19776 for { 19777 next, err := page.fn(ctx, page.scmc) 19778 if err != nil { 19779 return err 19780 } 19781 page.scmc = next 19782 if !next.hasNextLink() || !next.IsEmpty() { 19783 break 19784 } 19785 } 19786 return nil 19787} 19788 19789// Next advances to the next page of values. If there was an error making 19790// the request the page does not advance and the error is returned. 19791// Deprecated: Use NextWithContext() instead. 19792func (page *StorageClassificationMappingCollectionPage) Next() error { 19793 return page.NextWithContext(context.Background()) 19794} 19795 19796// NotDone returns true if the page enumeration should be started or is not yet complete. 19797func (page StorageClassificationMappingCollectionPage) NotDone() bool { 19798 return !page.scmc.IsEmpty() 19799} 19800 19801// Response returns the raw server response from the last page request. 19802func (page StorageClassificationMappingCollectionPage) Response() StorageClassificationMappingCollection { 19803 return page.scmc 19804} 19805 19806// Values returns the slice of values for the current page or nil if there are no values. 19807func (page StorageClassificationMappingCollectionPage) Values() []StorageClassificationMapping { 19808 if page.scmc.IsEmpty() { 19809 return nil 19810 } 19811 return *page.scmc.Value 19812} 19813 19814// Creates a new instance of the StorageClassificationMappingCollectionPage type. 19815func NewStorageClassificationMappingCollectionPage(cur StorageClassificationMappingCollection, getNextPage func(context.Context, StorageClassificationMappingCollection) (StorageClassificationMappingCollection, error)) StorageClassificationMappingCollectionPage { 19816 return StorageClassificationMappingCollectionPage{ 19817 fn: getNextPage, 19818 scmc: cur, 19819 } 19820} 19821 19822// StorageClassificationMappingInput storage mapping input. 19823type StorageClassificationMappingInput struct { 19824 // Properties - Storage mapping input properties. 19825 Properties *StorageMappingInputProperties `json:"properties,omitempty"` 19826} 19827 19828// StorageClassificationMappingProperties storage mapping properties. 19829type StorageClassificationMappingProperties struct { 19830 // TargetStorageClassificationID - Target storage object Id. 19831 TargetStorageClassificationID *string `json:"targetStorageClassificationId,omitempty"` 19832} 19833 19834// StorageClassificationProperties storage object properties. 19835type StorageClassificationProperties struct { 19836 // FriendlyName - Friendly name of the Storage classification. 19837 FriendlyName *string `json:"friendlyName,omitempty"` 19838} 19839 19840// StorageMappingInputProperties storage mapping input properties. 19841type StorageMappingInputProperties struct { 19842 // TargetStorageClassificationID - The ID of the storage object. 19843 TargetStorageClassificationID *string `json:"targetStorageClassificationId,omitempty"` 19844} 19845 19846// Subnet subnets of the network. 19847type Subnet struct { 19848 // Name - The subnet name. 19849 Name *string `json:"name,omitempty"` 19850 // FriendlyName - The subnet friendly name. 19851 FriendlyName *string `json:"friendlyName,omitempty"` 19852 // AddressList - The list of addresses for the subnet. 19853 AddressList *[]string `json:"addressList,omitempty"` 19854} 19855 19856// SwitchProtectionInput switch protection input. 19857type SwitchProtectionInput struct { 19858 // Properties - Switch protection properties 19859 Properties *SwitchProtectionInputProperties `json:"properties,omitempty"` 19860} 19861 19862// SwitchProtectionInputProperties switch protection input properties. 19863type SwitchProtectionInputProperties struct { 19864 // ReplicationProtectedItemName - The unique replication protected item name. 19865 ReplicationProtectedItemName *string `json:"replicationProtectedItemName,omitempty"` 19866 // ProviderSpecificDetails - Provider specific switch protection input. 19867 ProviderSpecificDetails BasicSwitchProtectionProviderSpecificInput `json:"providerSpecificDetails,omitempty"` 19868} 19869 19870// UnmarshalJSON is the custom unmarshaler for SwitchProtectionInputProperties struct. 19871func (spip *SwitchProtectionInputProperties) UnmarshalJSON(body []byte) error { 19872 var m map[string]*json.RawMessage 19873 err := json.Unmarshal(body, &m) 19874 if err != nil { 19875 return err 19876 } 19877 for k, v := range m { 19878 switch k { 19879 case "replicationProtectedItemName": 19880 if v != nil { 19881 var replicationProtectedItemName string 19882 err = json.Unmarshal(*v, &replicationProtectedItemName) 19883 if err != nil { 19884 return err 19885 } 19886 spip.ReplicationProtectedItemName = &replicationProtectedItemName 19887 } 19888 case "providerSpecificDetails": 19889 if v != nil { 19890 providerSpecificDetails, err := unmarshalBasicSwitchProtectionProviderSpecificInput(*v) 19891 if err != nil { 19892 return err 19893 } 19894 spip.ProviderSpecificDetails = providerSpecificDetails 19895 } 19896 } 19897 } 19898 19899 return nil 19900} 19901 19902// SwitchProtectionJobDetails this class represents details for switch protection job. 19903type SwitchProtectionJobDetails struct { 19904 // NewReplicationProtectedItemID - ARM Id of the new replication protected item. 19905 NewReplicationProtectedItemID *string `json:"newReplicationProtectedItemId,omitempty"` 19906 // AffectedObjectDetails - The affected object properties like source server, source cloud, target server, target cloud etc. based on the workflow object details. 19907 AffectedObjectDetails map[string]*string `json:"affectedObjectDetails"` 19908 // InstanceType - Possible values include: 'InstanceTypeJobDetails', 'InstanceTypeAsrJobDetails', 'InstanceTypeExportJobDetails', 'InstanceTypeFailoverJobDetails', 'InstanceTypeSwitchProtectionJobDetails', 'InstanceTypeTestFailoverJobDetails' 19909 InstanceType InstanceTypeBasicJobDetails `json:"instanceType,omitempty"` 19910} 19911 19912// MarshalJSON is the custom marshaler for SwitchProtectionJobDetails. 19913func (spjd SwitchProtectionJobDetails) MarshalJSON() ([]byte, error) { 19914 spjd.InstanceType = InstanceTypeSwitchProtectionJobDetails 19915 objectMap := make(map[string]interface{}) 19916 if spjd.NewReplicationProtectedItemID != nil { 19917 objectMap["newReplicationProtectedItemId"] = spjd.NewReplicationProtectedItemID 19918 } 19919 if spjd.AffectedObjectDetails != nil { 19920 objectMap["affectedObjectDetails"] = spjd.AffectedObjectDetails 19921 } 19922 if spjd.InstanceType != "" { 19923 objectMap["instanceType"] = spjd.InstanceType 19924 } 19925 return json.Marshal(objectMap) 19926} 19927 19928// AsAsrJobDetails is the BasicJobDetails implementation for SwitchProtectionJobDetails. 19929func (spjd SwitchProtectionJobDetails) AsAsrJobDetails() (*AsrJobDetails, bool) { 19930 return nil, false 19931} 19932 19933// AsExportJobDetails is the BasicJobDetails implementation for SwitchProtectionJobDetails. 19934func (spjd SwitchProtectionJobDetails) AsExportJobDetails() (*ExportJobDetails, bool) { 19935 return nil, false 19936} 19937 19938// AsFailoverJobDetails is the BasicJobDetails implementation for SwitchProtectionJobDetails. 19939func (spjd SwitchProtectionJobDetails) AsFailoverJobDetails() (*FailoverJobDetails, bool) { 19940 return nil, false 19941} 19942 19943// AsSwitchProtectionJobDetails is the BasicJobDetails implementation for SwitchProtectionJobDetails. 19944func (spjd SwitchProtectionJobDetails) AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool) { 19945 return &spjd, true 19946} 19947 19948// AsTestFailoverJobDetails is the BasicJobDetails implementation for SwitchProtectionJobDetails. 19949func (spjd SwitchProtectionJobDetails) AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool) { 19950 return nil, false 19951} 19952 19953// AsJobDetails is the BasicJobDetails implementation for SwitchProtectionJobDetails. 19954func (spjd SwitchProtectionJobDetails) AsJobDetails() (*JobDetails, bool) { 19955 return nil, false 19956} 19957 19958// AsBasicJobDetails is the BasicJobDetails implementation for SwitchProtectionJobDetails. 19959func (spjd SwitchProtectionJobDetails) AsBasicJobDetails() (BasicJobDetails, bool) { 19960 return &spjd, true 19961} 19962 19963// BasicSwitchProtectionProviderSpecificInput provider specific switch protection input. 19964type BasicSwitchProtectionProviderSpecificInput interface { 19965 AsA2ASwitchProtectionInput() (*A2ASwitchProtectionInput, bool) 19966 AsSwitchProtectionProviderSpecificInput() (*SwitchProtectionProviderSpecificInput, bool) 19967} 19968 19969// SwitchProtectionProviderSpecificInput provider specific switch protection input. 19970type SwitchProtectionProviderSpecificInput struct { 19971 // InstanceType - Possible values include: 'InstanceTypeBasicSwitchProtectionProviderSpecificInputInstanceTypeSwitchProtectionProviderSpecificInput', 'InstanceTypeBasicSwitchProtectionProviderSpecificInputInstanceTypeA2A' 19972 InstanceType InstanceTypeBasicSwitchProtectionProviderSpecificInput `json:"instanceType,omitempty"` 19973} 19974 19975func unmarshalBasicSwitchProtectionProviderSpecificInput(body []byte) (BasicSwitchProtectionProviderSpecificInput, error) { 19976 var m map[string]interface{} 19977 err := json.Unmarshal(body, &m) 19978 if err != nil { 19979 return nil, err 19980 } 19981 19982 switch m["instanceType"] { 19983 case string(InstanceTypeBasicSwitchProtectionProviderSpecificInputInstanceTypeA2A): 19984 var aspi A2ASwitchProtectionInput 19985 err := json.Unmarshal(body, &aspi) 19986 return aspi, err 19987 default: 19988 var sppsi SwitchProtectionProviderSpecificInput 19989 err := json.Unmarshal(body, &sppsi) 19990 return sppsi, err 19991 } 19992} 19993func unmarshalBasicSwitchProtectionProviderSpecificInputArray(body []byte) ([]BasicSwitchProtectionProviderSpecificInput, error) { 19994 var rawMessages []*json.RawMessage 19995 err := json.Unmarshal(body, &rawMessages) 19996 if err != nil { 19997 return nil, err 19998 } 19999 20000 sppsiArray := make([]BasicSwitchProtectionProviderSpecificInput, len(rawMessages)) 20001 20002 for index, rawMessage := range rawMessages { 20003 sppsi, err := unmarshalBasicSwitchProtectionProviderSpecificInput(*rawMessage) 20004 if err != nil { 20005 return nil, err 20006 } 20007 sppsiArray[index] = sppsi 20008 } 20009 return sppsiArray, nil 20010} 20011 20012// MarshalJSON is the custom marshaler for SwitchProtectionProviderSpecificInput. 20013func (sppsi SwitchProtectionProviderSpecificInput) MarshalJSON() ([]byte, error) { 20014 sppsi.InstanceType = InstanceTypeBasicSwitchProtectionProviderSpecificInputInstanceTypeSwitchProtectionProviderSpecificInput 20015 objectMap := make(map[string]interface{}) 20016 if sppsi.InstanceType != "" { 20017 objectMap["instanceType"] = sppsi.InstanceType 20018 } 20019 return json.Marshal(objectMap) 20020} 20021 20022// AsA2ASwitchProtectionInput is the BasicSwitchProtectionProviderSpecificInput implementation for SwitchProtectionProviderSpecificInput. 20023func (sppsi SwitchProtectionProviderSpecificInput) AsA2ASwitchProtectionInput() (*A2ASwitchProtectionInput, bool) { 20024 return nil, false 20025} 20026 20027// AsSwitchProtectionProviderSpecificInput is the BasicSwitchProtectionProviderSpecificInput implementation for SwitchProtectionProviderSpecificInput. 20028func (sppsi SwitchProtectionProviderSpecificInput) AsSwitchProtectionProviderSpecificInput() (*SwitchProtectionProviderSpecificInput, bool) { 20029 return &sppsi, true 20030} 20031 20032// AsBasicSwitchProtectionProviderSpecificInput is the BasicSwitchProtectionProviderSpecificInput implementation for SwitchProtectionProviderSpecificInput. 20033func (sppsi SwitchProtectionProviderSpecificInput) AsBasicSwitchProtectionProviderSpecificInput() (BasicSwitchProtectionProviderSpecificInput, bool) { 20034 return &sppsi, true 20035} 20036 20037// TargetComputeSize represents applicable recovery vm sizes. 20038type TargetComputeSize struct { 20039 // ID - The Id. 20040 ID *string `json:"id,omitempty"` 20041 // Name - The name. 20042 Name *string `json:"name,omitempty"` 20043 // Type - The Type of the object. 20044 Type *string `json:"type,omitempty"` 20045 // Properties - The custom data. 20046 Properties *TargetComputeSizeProperties `json:"properties,omitempty"` 20047} 20048 20049// TargetComputeSizeCollection target compute size collection. 20050type TargetComputeSizeCollection struct { 20051 autorest.Response `json:"-"` 20052 // Value - The list of target compute sizes. 20053 Value *[]TargetComputeSize `json:"value,omitempty"` 20054 // NextLink - The value of next link. 20055 NextLink *string `json:"nextLink,omitempty"` 20056} 20057 20058// TargetComputeSizeCollectionIterator provides access to a complete listing of TargetComputeSize values. 20059type TargetComputeSizeCollectionIterator struct { 20060 i int 20061 page TargetComputeSizeCollectionPage 20062} 20063 20064// NextWithContext advances to the next value. If there was an error making 20065// the request the iterator does not advance and the error is returned. 20066func (iter *TargetComputeSizeCollectionIterator) NextWithContext(ctx context.Context) (err error) { 20067 if tracing.IsEnabled() { 20068 ctx = tracing.StartSpan(ctx, fqdn+"/TargetComputeSizeCollectionIterator.NextWithContext") 20069 defer func() { 20070 sc := -1 20071 if iter.Response().Response.Response != nil { 20072 sc = iter.Response().Response.Response.StatusCode 20073 } 20074 tracing.EndSpan(ctx, sc, err) 20075 }() 20076 } 20077 iter.i++ 20078 if iter.i < len(iter.page.Values()) { 20079 return nil 20080 } 20081 err = iter.page.NextWithContext(ctx) 20082 if err != nil { 20083 iter.i-- 20084 return err 20085 } 20086 iter.i = 0 20087 return nil 20088} 20089 20090// Next advances to the next value. If there was an error making 20091// the request the iterator does not advance and the error is returned. 20092// Deprecated: Use NextWithContext() instead. 20093func (iter *TargetComputeSizeCollectionIterator) Next() error { 20094 return iter.NextWithContext(context.Background()) 20095} 20096 20097// NotDone returns true if the enumeration should be started or is not yet complete. 20098func (iter TargetComputeSizeCollectionIterator) NotDone() bool { 20099 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 20100} 20101 20102// Response returns the raw server response from the last page request. 20103func (iter TargetComputeSizeCollectionIterator) Response() TargetComputeSizeCollection { 20104 return iter.page.Response() 20105} 20106 20107// Value returns the current value or a zero-initialized value if the 20108// iterator has advanced beyond the end of the collection. 20109func (iter TargetComputeSizeCollectionIterator) Value() TargetComputeSize { 20110 if !iter.page.NotDone() { 20111 return TargetComputeSize{} 20112 } 20113 return iter.page.Values()[iter.i] 20114} 20115 20116// Creates a new instance of the TargetComputeSizeCollectionIterator type. 20117func NewTargetComputeSizeCollectionIterator(page TargetComputeSizeCollectionPage) TargetComputeSizeCollectionIterator { 20118 return TargetComputeSizeCollectionIterator{page: page} 20119} 20120 20121// IsEmpty returns true if the ListResult contains no values. 20122func (tcsc TargetComputeSizeCollection) IsEmpty() bool { 20123 return tcsc.Value == nil || len(*tcsc.Value) == 0 20124} 20125 20126// hasNextLink returns true if the NextLink is not empty. 20127func (tcsc TargetComputeSizeCollection) hasNextLink() bool { 20128 return tcsc.NextLink != nil && len(*tcsc.NextLink) != 0 20129} 20130 20131// targetComputeSizeCollectionPreparer prepares a request to retrieve the next set of results. 20132// It returns nil if no more results exist. 20133func (tcsc TargetComputeSizeCollection) targetComputeSizeCollectionPreparer(ctx context.Context) (*http.Request, error) { 20134 if !tcsc.hasNextLink() { 20135 return nil, nil 20136 } 20137 return autorest.Prepare((&http.Request{}).WithContext(ctx), 20138 autorest.AsJSON(), 20139 autorest.AsGet(), 20140 autorest.WithBaseURL(to.String(tcsc.NextLink))) 20141} 20142 20143// TargetComputeSizeCollectionPage contains a page of TargetComputeSize values. 20144type TargetComputeSizeCollectionPage struct { 20145 fn func(context.Context, TargetComputeSizeCollection) (TargetComputeSizeCollection, error) 20146 tcsc TargetComputeSizeCollection 20147} 20148 20149// NextWithContext advances to the next page of values. If there was an error making 20150// the request the page does not advance and the error is returned. 20151func (page *TargetComputeSizeCollectionPage) NextWithContext(ctx context.Context) (err error) { 20152 if tracing.IsEnabled() { 20153 ctx = tracing.StartSpan(ctx, fqdn+"/TargetComputeSizeCollectionPage.NextWithContext") 20154 defer func() { 20155 sc := -1 20156 if page.Response().Response.Response != nil { 20157 sc = page.Response().Response.Response.StatusCode 20158 } 20159 tracing.EndSpan(ctx, sc, err) 20160 }() 20161 } 20162 for { 20163 next, err := page.fn(ctx, page.tcsc) 20164 if err != nil { 20165 return err 20166 } 20167 page.tcsc = next 20168 if !next.hasNextLink() || !next.IsEmpty() { 20169 break 20170 } 20171 } 20172 return nil 20173} 20174 20175// Next advances to the next page of values. If there was an error making 20176// the request the page does not advance and the error is returned. 20177// Deprecated: Use NextWithContext() instead. 20178func (page *TargetComputeSizeCollectionPage) Next() error { 20179 return page.NextWithContext(context.Background()) 20180} 20181 20182// NotDone returns true if the page enumeration should be started or is not yet complete. 20183func (page TargetComputeSizeCollectionPage) NotDone() bool { 20184 return !page.tcsc.IsEmpty() 20185} 20186 20187// Response returns the raw server response from the last page request. 20188func (page TargetComputeSizeCollectionPage) Response() TargetComputeSizeCollection { 20189 return page.tcsc 20190} 20191 20192// Values returns the slice of values for the current page or nil if there are no values. 20193func (page TargetComputeSizeCollectionPage) Values() []TargetComputeSize { 20194 if page.tcsc.IsEmpty() { 20195 return nil 20196 } 20197 return *page.tcsc.Value 20198} 20199 20200// Creates a new instance of the TargetComputeSizeCollectionPage type. 20201func NewTargetComputeSizeCollectionPage(cur TargetComputeSizeCollection, getNextPage func(context.Context, TargetComputeSizeCollection) (TargetComputeSizeCollection, error)) TargetComputeSizeCollectionPage { 20202 return TargetComputeSizeCollectionPage{ 20203 fn: getNextPage, 20204 tcsc: cur, 20205 } 20206} 20207 20208// TargetComputeSizeProperties represents applicable recovery vm sizes properties. 20209type TargetComputeSizeProperties struct { 20210 // Name - Target compute size name. 20211 Name *string `json:"name,omitempty"` 20212 // FriendlyName - Target compute size display name. 20213 FriendlyName *string `json:"friendlyName,omitempty"` 20214 // CPUCoresCount - The maximum cpu cores count supported by target compute size. 20215 CPUCoresCount *int32 `json:"cpuCoresCount,omitempty"` 20216 // MemoryInGB - The maximum memory in GB supported by target compute size. 20217 MemoryInGB *float64 `json:"memoryInGB,omitempty"` 20218 // MaxDataDiskCount - The maximum data disks count supported by target compute size. 20219 MaxDataDiskCount *int32 `json:"maxDataDiskCount,omitempty"` 20220 // MaxNicsCount - The maximum Nics count supported by target compute size. 20221 MaxNicsCount *int32 `json:"maxNicsCount,omitempty"` 20222 // Errors - The reasons why the target compute size is not applicable for the protected item. 20223 Errors *[]ComputeSizeErrorDetails `json:"errors,omitempty"` 20224 // HighIopsSupported - The value indicating whether the target compute size supports high Iops. 20225 HighIopsSupported *string `json:"highIopsSupported,omitempty"` 20226} 20227 20228// BasicTaskTypeDetails task details based on specific task type. 20229type BasicTaskTypeDetails interface { 20230 AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) 20231 AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) 20232 AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) 20233 AsJobTaskDetails() (*JobTaskDetails, bool) 20234 AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) 20235 AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) 20236 AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) 20237 AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) 20238 AsTaskTypeDetails() (*TaskTypeDetails, bool) 20239} 20240 20241// TaskTypeDetails task details based on specific task type. 20242type TaskTypeDetails struct { 20243 // InstanceType - Possible values include: 'InstanceTypeTaskTypeDetails', 'InstanceTypeAutomationRunbookTaskDetails', 'InstanceTypeConsistencyCheckTaskDetails', 'InstanceTypeFabricReplicationGroupTaskDetails', 'InstanceTypeJobTaskDetails', 'InstanceTypeManualActionTaskDetails', 'InstanceTypeScriptActionTaskDetails', 'InstanceTypeVirtualMachineTaskDetails', 'InstanceTypeVMNicUpdatesTaskDetails' 20244 InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"` 20245} 20246 20247func unmarshalBasicTaskTypeDetails(body []byte) (BasicTaskTypeDetails, error) { 20248 var m map[string]interface{} 20249 err := json.Unmarshal(body, &m) 20250 if err != nil { 20251 return nil, err 20252 } 20253 20254 switch m["instanceType"] { 20255 case string(InstanceTypeAutomationRunbookTaskDetails): 20256 var artd AutomationRunbookTaskDetails 20257 err := json.Unmarshal(body, &artd) 20258 return artd, err 20259 case string(InstanceTypeConsistencyCheckTaskDetails): 20260 var cctd ConsistencyCheckTaskDetails 20261 err := json.Unmarshal(body, &cctd) 20262 return cctd, err 20263 case string(InstanceTypeFabricReplicationGroupTaskDetails): 20264 var frgtd FabricReplicationGroupTaskDetails 20265 err := json.Unmarshal(body, &frgtd) 20266 return frgtd, err 20267 case string(InstanceTypeJobTaskDetails): 20268 var jtd JobTaskDetails 20269 err := json.Unmarshal(body, &jtd) 20270 return jtd, err 20271 case string(InstanceTypeManualActionTaskDetails): 20272 var matd ManualActionTaskDetails 20273 err := json.Unmarshal(body, &matd) 20274 return matd, err 20275 case string(InstanceTypeScriptActionTaskDetails): 20276 var satd ScriptActionTaskDetails 20277 err := json.Unmarshal(body, &satd) 20278 return satd, err 20279 case string(InstanceTypeVirtualMachineTaskDetails): 20280 var vmtd VirtualMachineTaskDetails 20281 err := json.Unmarshal(body, &vmtd) 20282 return vmtd, err 20283 case string(InstanceTypeVMNicUpdatesTaskDetails): 20284 var vnutd VMNicUpdatesTaskDetails 20285 err := json.Unmarshal(body, &vnutd) 20286 return vnutd, err 20287 default: 20288 var ttd TaskTypeDetails 20289 err := json.Unmarshal(body, &ttd) 20290 return ttd, err 20291 } 20292} 20293func unmarshalBasicTaskTypeDetailsArray(body []byte) ([]BasicTaskTypeDetails, error) { 20294 var rawMessages []*json.RawMessage 20295 err := json.Unmarshal(body, &rawMessages) 20296 if err != nil { 20297 return nil, err 20298 } 20299 20300 ttdArray := make([]BasicTaskTypeDetails, len(rawMessages)) 20301 20302 for index, rawMessage := range rawMessages { 20303 ttd, err := unmarshalBasicTaskTypeDetails(*rawMessage) 20304 if err != nil { 20305 return nil, err 20306 } 20307 ttdArray[index] = ttd 20308 } 20309 return ttdArray, nil 20310} 20311 20312// MarshalJSON is the custom marshaler for TaskTypeDetails. 20313func (ttd TaskTypeDetails) MarshalJSON() ([]byte, error) { 20314 ttd.InstanceType = InstanceTypeTaskTypeDetails 20315 objectMap := make(map[string]interface{}) 20316 if ttd.InstanceType != "" { 20317 objectMap["instanceType"] = ttd.InstanceType 20318 } 20319 return json.Marshal(objectMap) 20320} 20321 20322// AsAutomationRunbookTaskDetails is the BasicTaskTypeDetails implementation for TaskTypeDetails. 20323func (ttd TaskTypeDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) { 20324 return nil, false 20325} 20326 20327// AsConsistencyCheckTaskDetails is the BasicTaskTypeDetails implementation for TaskTypeDetails. 20328func (ttd TaskTypeDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) { 20329 return nil, false 20330} 20331 20332// AsFabricReplicationGroupTaskDetails is the BasicTaskTypeDetails implementation for TaskTypeDetails. 20333func (ttd TaskTypeDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) { 20334 return nil, false 20335} 20336 20337// AsJobTaskDetails is the BasicTaskTypeDetails implementation for TaskTypeDetails. 20338func (ttd TaskTypeDetails) AsJobTaskDetails() (*JobTaskDetails, bool) { 20339 return nil, false 20340} 20341 20342// AsManualActionTaskDetails is the BasicTaskTypeDetails implementation for TaskTypeDetails. 20343func (ttd TaskTypeDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) { 20344 return nil, false 20345} 20346 20347// AsScriptActionTaskDetails is the BasicTaskTypeDetails implementation for TaskTypeDetails. 20348func (ttd TaskTypeDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) { 20349 return nil, false 20350} 20351 20352// AsVirtualMachineTaskDetails is the BasicTaskTypeDetails implementation for TaskTypeDetails. 20353func (ttd TaskTypeDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) { 20354 return nil, false 20355} 20356 20357// AsVMNicUpdatesTaskDetails is the BasicTaskTypeDetails implementation for TaskTypeDetails. 20358func (ttd TaskTypeDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) { 20359 return nil, false 20360} 20361 20362// AsTaskTypeDetails is the BasicTaskTypeDetails implementation for TaskTypeDetails. 20363func (ttd TaskTypeDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) { 20364 return &ttd, true 20365} 20366 20367// AsBasicTaskTypeDetails is the BasicTaskTypeDetails implementation for TaskTypeDetails. 20368func (ttd TaskTypeDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) { 20369 return &ttd, true 20370} 20371 20372// TestFailoverCleanupInput input definition for test failover cleanup. 20373type TestFailoverCleanupInput struct { 20374 // Properties - Test failover cleanup input properties. 20375 Properties *TestFailoverCleanupInputProperties `json:"properties,omitempty"` 20376} 20377 20378// TestFailoverCleanupInputProperties input definition for test failover cleanup input properties. 20379type TestFailoverCleanupInputProperties struct { 20380 // Comments - Test failover cleanup comments. 20381 Comments *string `json:"comments,omitempty"` 20382} 20383 20384// TestFailoverInput input definition for planned failover. 20385type TestFailoverInput struct { 20386 // Properties - Planned failover input properties 20387 Properties *TestFailoverInputProperties `json:"properties,omitempty"` 20388} 20389 20390// TestFailoverInputProperties input definition for planned failover input properties. 20391type TestFailoverInputProperties struct { 20392 // FailoverDirection - Failover direction. 20393 FailoverDirection *string `json:"failoverDirection,omitempty"` 20394 // NetworkType - Network type to be used for test failover. 20395 NetworkType *string `json:"networkType,omitempty"` 20396 // NetworkID - The id of the network to be used for test failover 20397 NetworkID *string `json:"networkId,omitempty"` 20398 // SkipTestFailoverCleanup - A value indicating whether the test failover cleanup is to be skipped. 20399 SkipTestFailoverCleanup *string `json:"skipTestFailoverCleanup,omitempty"` 20400 // ProviderSpecificDetails - Provider specific settings 20401 ProviderSpecificDetails BasicProviderSpecificFailoverInput `json:"providerSpecificDetails,omitempty"` 20402} 20403 20404// UnmarshalJSON is the custom unmarshaler for TestFailoverInputProperties struct. 20405func (tfip *TestFailoverInputProperties) UnmarshalJSON(body []byte) error { 20406 var m map[string]*json.RawMessage 20407 err := json.Unmarshal(body, &m) 20408 if err != nil { 20409 return err 20410 } 20411 for k, v := range m { 20412 switch k { 20413 case "failoverDirection": 20414 if v != nil { 20415 var failoverDirection string 20416 err = json.Unmarshal(*v, &failoverDirection) 20417 if err != nil { 20418 return err 20419 } 20420 tfip.FailoverDirection = &failoverDirection 20421 } 20422 case "networkType": 20423 if v != nil { 20424 var networkType string 20425 err = json.Unmarshal(*v, &networkType) 20426 if err != nil { 20427 return err 20428 } 20429 tfip.NetworkType = &networkType 20430 } 20431 case "networkId": 20432 if v != nil { 20433 var networkID string 20434 err = json.Unmarshal(*v, &networkID) 20435 if err != nil { 20436 return err 20437 } 20438 tfip.NetworkID = &networkID 20439 } 20440 case "skipTestFailoverCleanup": 20441 if v != nil { 20442 var skipTestFailoverCleanup string 20443 err = json.Unmarshal(*v, &skipTestFailoverCleanup) 20444 if err != nil { 20445 return err 20446 } 20447 tfip.SkipTestFailoverCleanup = &skipTestFailoverCleanup 20448 } 20449 case "providerSpecificDetails": 20450 if v != nil { 20451 providerSpecificDetails, err := unmarshalBasicProviderSpecificFailoverInput(*v) 20452 if err != nil { 20453 return err 20454 } 20455 tfip.ProviderSpecificDetails = providerSpecificDetails 20456 } 20457 } 20458 } 20459 20460 return nil 20461} 20462 20463// TestFailoverJobDetails this class represents the details for a test failover job. 20464type TestFailoverJobDetails struct { 20465 // TestFailoverStatus - The test failover status. 20466 TestFailoverStatus *string `json:"testFailoverStatus,omitempty"` 20467 // Comments - The test failover comments. 20468 Comments *string `json:"comments,omitempty"` 20469 // NetworkName - The test network name. 20470 NetworkName *string `json:"networkName,omitempty"` 20471 // NetworkFriendlyName - The test network friendly name. 20472 NetworkFriendlyName *string `json:"networkFriendlyName,omitempty"` 20473 // NetworkType - The test network type (see TestFailoverInput enum for possible values). 20474 NetworkType *string `json:"networkType,omitempty"` 20475 // ProtectedItemDetails - The test VM details. 20476 ProtectedItemDetails *[]FailoverReplicationProtectedItemDetails `json:"protectedItemDetails,omitempty"` 20477 // AffectedObjectDetails - The affected object properties like source server, source cloud, target server, target cloud etc. based on the workflow object details. 20478 AffectedObjectDetails map[string]*string `json:"affectedObjectDetails"` 20479 // InstanceType - Possible values include: 'InstanceTypeJobDetails', 'InstanceTypeAsrJobDetails', 'InstanceTypeExportJobDetails', 'InstanceTypeFailoverJobDetails', 'InstanceTypeSwitchProtectionJobDetails', 'InstanceTypeTestFailoverJobDetails' 20480 InstanceType InstanceTypeBasicJobDetails `json:"instanceType,omitempty"` 20481} 20482 20483// MarshalJSON is the custom marshaler for TestFailoverJobDetails. 20484func (tfjd TestFailoverJobDetails) MarshalJSON() ([]byte, error) { 20485 tfjd.InstanceType = InstanceTypeTestFailoverJobDetails 20486 objectMap := make(map[string]interface{}) 20487 if tfjd.TestFailoverStatus != nil { 20488 objectMap["testFailoverStatus"] = tfjd.TestFailoverStatus 20489 } 20490 if tfjd.Comments != nil { 20491 objectMap["comments"] = tfjd.Comments 20492 } 20493 if tfjd.NetworkName != nil { 20494 objectMap["networkName"] = tfjd.NetworkName 20495 } 20496 if tfjd.NetworkFriendlyName != nil { 20497 objectMap["networkFriendlyName"] = tfjd.NetworkFriendlyName 20498 } 20499 if tfjd.NetworkType != nil { 20500 objectMap["networkType"] = tfjd.NetworkType 20501 } 20502 if tfjd.ProtectedItemDetails != nil { 20503 objectMap["protectedItemDetails"] = tfjd.ProtectedItemDetails 20504 } 20505 if tfjd.AffectedObjectDetails != nil { 20506 objectMap["affectedObjectDetails"] = tfjd.AffectedObjectDetails 20507 } 20508 if tfjd.InstanceType != "" { 20509 objectMap["instanceType"] = tfjd.InstanceType 20510 } 20511 return json.Marshal(objectMap) 20512} 20513 20514// AsAsrJobDetails is the BasicJobDetails implementation for TestFailoverJobDetails. 20515func (tfjd TestFailoverJobDetails) AsAsrJobDetails() (*AsrJobDetails, bool) { 20516 return nil, false 20517} 20518 20519// AsExportJobDetails is the BasicJobDetails implementation for TestFailoverJobDetails. 20520func (tfjd TestFailoverJobDetails) AsExportJobDetails() (*ExportJobDetails, bool) { 20521 return nil, false 20522} 20523 20524// AsFailoverJobDetails is the BasicJobDetails implementation for TestFailoverJobDetails. 20525func (tfjd TestFailoverJobDetails) AsFailoverJobDetails() (*FailoverJobDetails, bool) { 20526 return nil, false 20527} 20528 20529// AsSwitchProtectionJobDetails is the BasicJobDetails implementation for TestFailoverJobDetails. 20530func (tfjd TestFailoverJobDetails) AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool) { 20531 return nil, false 20532} 20533 20534// AsTestFailoverJobDetails is the BasicJobDetails implementation for TestFailoverJobDetails. 20535func (tfjd TestFailoverJobDetails) AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool) { 20536 return &tfjd, true 20537} 20538 20539// AsJobDetails is the BasicJobDetails implementation for TestFailoverJobDetails. 20540func (tfjd TestFailoverJobDetails) AsJobDetails() (*JobDetails, bool) { 20541 return nil, false 20542} 20543 20544// AsBasicJobDetails is the BasicJobDetails implementation for TestFailoverJobDetails. 20545func (tfjd TestFailoverJobDetails) AsBasicJobDetails() (BasicJobDetails, bool) { 20546 return &tfjd, true 20547} 20548 20549// TestMigrateCleanupInput input for test migrate cleanup. 20550type TestMigrateCleanupInput struct { 20551 // Properties - Test migrate cleanup input properties. 20552 Properties *TestMigrateCleanupInputProperties `json:"properties,omitempty"` 20553} 20554 20555// TestMigrateCleanupInputProperties test migrate cleanup input properties. 20556type TestMigrateCleanupInputProperties struct { 20557 // Comments - Test migrate cleanup comments. 20558 Comments *string `json:"comments,omitempty"` 20559} 20560 20561// TestMigrateInput input for test migrate. 20562type TestMigrateInput struct { 20563 // Properties - Test migrate input properties. 20564 Properties *TestMigrateInputProperties `json:"properties,omitempty"` 20565} 20566 20567// TestMigrateInputProperties test migrate input properties. 20568type TestMigrateInputProperties struct { 20569 // ProviderSpecificDetails - The provider specific details. 20570 ProviderSpecificDetails BasicTestMigrateProviderSpecificInput `json:"providerSpecificDetails,omitempty"` 20571} 20572 20573// UnmarshalJSON is the custom unmarshaler for TestMigrateInputProperties struct. 20574func (tmip *TestMigrateInputProperties) UnmarshalJSON(body []byte) error { 20575 var m map[string]*json.RawMessage 20576 err := json.Unmarshal(body, &m) 20577 if err != nil { 20578 return err 20579 } 20580 for k, v := range m { 20581 switch k { 20582 case "providerSpecificDetails": 20583 if v != nil { 20584 providerSpecificDetails, err := unmarshalBasicTestMigrateProviderSpecificInput(*v) 20585 if err != nil { 20586 return err 20587 } 20588 tmip.ProviderSpecificDetails = providerSpecificDetails 20589 } 20590 } 20591 } 20592 20593 return nil 20594} 20595 20596// BasicTestMigrateProviderSpecificInput test migrate provider specific input. 20597type BasicTestMigrateProviderSpecificInput interface { 20598 AsVMwareCbtTestMigrateInput() (*VMwareCbtTestMigrateInput, bool) 20599 AsTestMigrateProviderSpecificInput() (*TestMigrateProviderSpecificInput, bool) 20600} 20601 20602// TestMigrateProviderSpecificInput test migrate provider specific input. 20603type TestMigrateProviderSpecificInput struct { 20604 // InstanceType - Possible values include: 'InstanceTypeBasicTestMigrateProviderSpecificInputInstanceTypeTestMigrateProviderSpecificInput', 'InstanceTypeBasicTestMigrateProviderSpecificInputInstanceTypeVMwareCbt' 20605 InstanceType InstanceTypeBasicTestMigrateProviderSpecificInput `json:"instanceType,omitempty"` 20606} 20607 20608func unmarshalBasicTestMigrateProviderSpecificInput(body []byte) (BasicTestMigrateProviderSpecificInput, error) { 20609 var m map[string]interface{} 20610 err := json.Unmarshal(body, &m) 20611 if err != nil { 20612 return nil, err 20613 } 20614 20615 switch m["instanceType"] { 20616 case string(InstanceTypeBasicTestMigrateProviderSpecificInputInstanceTypeVMwareCbt): 20617 var vmctmi VMwareCbtTestMigrateInput 20618 err := json.Unmarshal(body, &vmctmi) 20619 return vmctmi, err 20620 default: 20621 var tmpsi TestMigrateProviderSpecificInput 20622 err := json.Unmarshal(body, &tmpsi) 20623 return tmpsi, err 20624 } 20625} 20626func unmarshalBasicTestMigrateProviderSpecificInputArray(body []byte) ([]BasicTestMigrateProviderSpecificInput, error) { 20627 var rawMessages []*json.RawMessage 20628 err := json.Unmarshal(body, &rawMessages) 20629 if err != nil { 20630 return nil, err 20631 } 20632 20633 tmpsiArray := make([]BasicTestMigrateProviderSpecificInput, len(rawMessages)) 20634 20635 for index, rawMessage := range rawMessages { 20636 tmpsi, err := unmarshalBasicTestMigrateProviderSpecificInput(*rawMessage) 20637 if err != nil { 20638 return nil, err 20639 } 20640 tmpsiArray[index] = tmpsi 20641 } 20642 return tmpsiArray, nil 20643} 20644 20645// MarshalJSON is the custom marshaler for TestMigrateProviderSpecificInput. 20646func (tmpsi TestMigrateProviderSpecificInput) MarshalJSON() ([]byte, error) { 20647 tmpsi.InstanceType = InstanceTypeBasicTestMigrateProviderSpecificInputInstanceTypeTestMigrateProviderSpecificInput 20648 objectMap := make(map[string]interface{}) 20649 if tmpsi.InstanceType != "" { 20650 objectMap["instanceType"] = tmpsi.InstanceType 20651 } 20652 return json.Marshal(objectMap) 20653} 20654 20655// AsVMwareCbtTestMigrateInput is the BasicTestMigrateProviderSpecificInput implementation for TestMigrateProviderSpecificInput. 20656func (tmpsi TestMigrateProviderSpecificInput) AsVMwareCbtTestMigrateInput() (*VMwareCbtTestMigrateInput, bool) { 20657 return nil, false 20658} 20659 20660// AsTestMigrateProviderSpecificInput is the BasicTestMigrateProviderSpecificInput implementation for TestMigrateProviderSpecificInput. 20661func (tmpsi TestMigrateProviderSpecificInput) AsTestMigrateProviderSpecificInput() (*TestMigrateProviderSpecificInput, bool) { 20662 return &tmpsi, true 20663} 20664 20665// AsBasicTestMigrateProviderSpecificInput is the BasicTestMigrateProviderSpecificInput implementation for TestMigrateProviderSpecificInput. 20666func (tmpsi TestMigrateProviderSpecificInput) AsBasicTestMigrateProviderSpecificInput() (BasicTestMigrateProviderSpecificInput, bool) { 20667 return &tmpsi, true 20668} 20669 20670// UnplannedFailoverInput input definition for planned failover. 20671type UnplannedFailoverInput struct { 20672 // Properties - Planned failover input properties 20673 Properties *UnplannedFailoverInputProperties `json:"properties,omitempty"` 20674} 20675 20676// UnplannedFailoverInputProperties input definition for planned failover input properties. 20677type UnplannedFailoverInputProperties struct { 20678 // FailoverDirection - Failover direction. 20679 FailoverDirection *string `json:"failoverDirection,omitempty"` 20680 // SourceSiteOperations - Source site operations status 20681 SourceSiteOperations *string `json:"sourceSiteOperations,omitempty"` 20682 // ProviderSpecificDetails - Provider specific settings 20683 ProviderSpecificDetails BasicProviderSpecificFailoverInput `json:"providerSpecificDetails,omitempty"` 20684} 20685 20686// UnmarshalJSON is the custom unmarshaler for UnplannedFailoverInputProperties struct. 20687func (ufip *UnplannedFailoverInputProperties) UnmarshalJSON(body []byte) error { 20688 var m map[string]*json.RawMessage 20689 err := json.Unmarshal(body, &m) 20690 if err != nil { 20691 return err 20692 } 20693 for k, v := range m { 20694 switch k { 20695 case "failoverDirection": 20696 if v != nil { 20697 var failoverDirection string 20698 err = json.Unmarshal(*v, &failoverDirection) 20699 if err != nil { 20700 return err 20701 } 20702 ufip.FailoverDirection = &failoverDirection 20703 } 20704 case "sourceSiteOperations": 20705 if v != nil { 20706 var sourceSiteOperations string 20707 err = json.Unmarshal(*v, &sourceSiteOperations) 20708 if err != nil { 20709 return err 20710 } 20711 ufip.SourceSiteOperations = &sourceSiteOperations 20712 } 20713 case "providerSpecificDetails": 20714 if v != nil { 20715 providerSpecificDetails, err := unmarshalBasicProviderSpecificFailoverInput(*v) 20716 if err != nil { 20717 return err 20718 } 20719 ufip.ProviderSpecificDetails = providerSpecificDetails 20720 } 20721 } 20722 } 20723 20724 return nil 20725} 20726 20727// UpdateMigrationItemInput update migration item input. 20728type UpdateMigrationItemInput struct { 20729 // Properties - Update migration item input properties. 20730 Properties *UpdateMigrationItemInputProperties `json:"properties,omitempty"` 20731} 20732 20733// UpdateMigrationItemInputProperties update migration item input properties. 20734type UpdateMigrationItemInputProperties struct { 20735 // ProviderSpecificDetails - The provider specific input to update migration item. 20736 ProviderSpecificDetails BasicUpdateMigrationItemProviderSpecificInput `json:"providerSpecificDetails,omitempty"` 20737} 20738 20739// UnmarshalJSON is the custom unmarshaler for UpdateMigrationItemInputProperties struct. 20740func (umiip *UpdateMigrationItemInputProperties) UnmarshalJSON(body []byte) error { 20741 var m map[string]*json.RawMessage 20742 err := json.Unmarshal(body, &m) 20743 if err != nil { 20744 return err 20745 } 20746 for k, v := range m { 20747 switch k { 20748 case "providerSpecificDetails": 20749 if v != nil { 20750 providerSpecificDetails, err := unmarshalBasicUpdateMigrationItemProviderSpecificInput(*v) 20751 if err != nil { 20752 return err 20753 } 20754 umiip.ProviderSpecificDetails = providerSpecificDetails 20755 } 20756 } 20757 } 20758 20759 return nil 20760} 20761 20762// BasicUpdateMigrationItemProviderSpecificInput update migration item provider specific input. 20763type BasicUpdateMigrationItemProviderSpecificInput interface { 20764 AsVMwareCbtUpdateMigrationItemInput() (*VMwareCbtUpdateMigrationItemInput, bool) 20765 AsUpdateMigrationItemProviderSpecificInput() (*UpdateMigrationItemProviderSpecificInput, bool) 20766} 20767 20768// UpdateMigrationItemProviderSpecificInput update migration item provider specific input. 20769type UpdateMigrationItemProviderSpecificInput struct { 20770 // InstanceType - Possible values include: 'InstanceTypeBasicUpdateMigrationItemProviderSpecificInputInstanceTypeUpdateMigrationItemProviderSpecificInput', 'InstanceTypeBasicUpdateMigrationItemProviderSpecificInputInstanceTypeVMwareCbt' 20771 InstanceType InstanceTypeBasicUpdateMigrationItemProviderSpecificInput `json:"instanceType,omitempty"` 20772} 20773 20774func unmarshalBasicUpdateMigrationItemProviderSpecificInput(body []byte) (BasicUpdateMigrationItemProviderSpecificInput, error) { 20775 var m map[string]interface{} 20776 err := json.Unmarshal(body, &m) 20777 if err != nil { 20778 return nil, err 20779 } 20780 20781 switch m["instanceType"] { 20782 case string(InstanceTypeBasicUpdateMigrationItemProviderSpecificInputInstanceTypeVMwareCbt): 20783 var vmcumii VMwareCbtUpdateMigrationItemInput 20784 err := json.Unmarshal(body, &vmcumii) 20785 return vmcumii, err 20786 default: 20787 var umipsi UpdateMigrationItemProviderSpecificInput 20788 err := json.Unmarshal(body, &umipsi) 20789 return umipsi, err 20790 } 20791} 20792func unmarshalBasicUpdateMigrationItemProviderSpecificInputArray(body []byte) ([]BasicUpdateMigrationItemProviderSpecificInput, error) { 20793 var rawMessages []*json.RawMessage 20794 err := json.Unmarshal(body, &rawMessages) 20795 if err != nil { 20796 return nil, err 20797 } 20798 20799 umipsiArray := make([]BasicUpdateMigrationItemProviderSpecificInput, len(rawMessages)) 20800 20801 for index, rawMessage := range rawMessages { 20802 umipsi, err := unmarshalBasicUpdateMigrationItemProviderSpecificInput(*rawMessage) 20803 if err != nil { 20804 return nil, err 20805 } 20806 umipsiArray[index] = umipsi 20807 } 20808 return umipsiArray, nil 20809} 20810 20811// MarshalJSON is the custom marshaler for UpdateMigrationItemProviderSpecificInput. 20812func (umipsi UpdateMigrationItemProviderSpecificInput) MarshalJSON() ([]byte, error) { 20813 umipsi.InstanceType = InstanceTypeBasicUpdateMigrationItemProviderSpecificInputInstanceTypeUpdateMigrationItemProviderSpecificInput 20814 objectMap := make(map[string]interface{}) 20815 if umipsi.InstanceType != "" { 20816 objectMap["instanceType"] = umipsi.InstanceType 20817 } 20818 return json.Marshal(objectMap) 20819} 20820 20821// AsVMwareCbtUpdateMigrationItemInput is the BasicUpdateMigrationItemProviderSpecificInput implementation for UpdateMigrationItemProviderSpecificInput. 20822func (umipsi UpdateMigrationItemProviderSpecificInput) AsVMwareCbtUpdateMigrationItemInput() (*VMwareCbtUpdateMigrationItemInput, bool) { 20823 return nil, false 20824} 20825 20826// AsUpdateMigrationItemProviderSpecificInput is the BasicUpdateMigrationItemProviderSpecificInput implementation for UpdateMigrationItemProviderSpecificInput. 20827func (umipsi UpdateMigrationItemProviderSpecificInput) AsUpdateMigrationItemProviderSpecificInput() (*UpdateMigrationItemProviderSpecificInput, bool) { 20828 return &umipsi, true 20829} 20830 20831// AsBasicUpdateMigrationItemProviderSpecificInput is the BasicUpdateMigrationItemProviderSpecificInput implementation for UpdateMigrationItemProviderSpecificInput. 20832func (umipsi UpdateMigrationItemProviderSpecificInput) AsBasicUpdateMigrationItemProviderSpecificInput() (BasicUpdateMigrationItemProviderSpecificInput, bool) { 20833 return &umipsi, true 20834} 20835 20836// UpdateMobilityServiceRequest request to update the mobility service on a protected item. 20837type UpdateMobilityServiceRequest struct { 20838 // Properties - The properties of the update mobility service request. 20839 Properties *UpdateMobilityServiceRequestProperties `json:"properties,omitempty"` 20840} 20841 20842// UpdateMobilityServiceRequestProperties the properties of an update mobility service request. 20843type UpdateMobilityServiceRequestProperties struct { 20844 // RunAsAccountID - The CS run as account Id. 20845 RunAsAccountID *string `json:"runAsAccountId,omitempty"` 20846} 20847 20848// UpdateNetworkMappingInput update network mapping input. 20849type UpdateNetworkMappingInput struct { 20850 // Properties - The input properties needed to update network mapping. 20851 Properties *UpdateNetworkMappingInputProperties `json:"properties,omitempty"` 20852} 20853 20854// UpdateNetworkMappingInputProperties common input details for network mapping operation. 20855type UpdateNetworkMappingInputProperties struct { 20856 // RecoveryFabricName - Recovery fabric name. 20857 RecoveryFabricName *string `json:"recoveryFabricName,omitempty"` 20858 // RecoveryNetworkID - Recovery network Id. 20859 RecoveryNetworkID *string `json:"recoveryNetworkId,omitempty"` 20860 // FabricSpecificDetails - Fabrics specific input network Id. 20861 FabricSpecificDetails BasicFabricSpecificUpdateNetworkMappingInput `json:"fabricSpecificDetails,omitempty"` 20862} 20863 20864// UnmarshalJSON is the custom unmarshaler for UpdateNetworkMappingInputProperties struct. 20865func (unmip *UpdateNetworkMappingInputProperties) UnmarshalJSON(body []byte) error { 20866 var m map[string]*json.RawMessage 20867 err := json.Unmarshal(body, &m) 20868 if err != nil { 20869 return err 20870 } 20871 for k, v := range m { 20872 switch k { 20873 case "recoveryFabricName": 20874 if v != nil { 20875 var recoveryFabricName string 20876 err = json.Unmarshal(*v, &recoveryFabricName) 20877 if err != nil { 20878 return err 20879 } 20880 unmip.RecoveryFabricName = &recoveryFabricName 20881 } 20882 case "recoveryNetworkId": 20883 if v != nil { 20884 var recoveryNetworkID string 20885 err = json.Unmarshal(*v, &recoveryNetworkID) 20886 if err != nil { 20887 return err 20888 } 20889 unmip.RecoveryNetworkID = &recoveryNetworkID 20890 } 20891 case "fabricSpecificDetails": 20892 if v != nil { 20893 fabricSpecificDetails, err := unmarshalBasicFabricSpecificUpdateNetworkMappingInput(*v) 20894 if err != nil { 20895 return err 20896 } 20897 unmip.FabricSpecificDetails = fabricSpecificDetails 20898 } 20899 } 20900 } 20901 20902 return nil 20903} 20904 20905// UpdatePolicyInput update policy input. 20906type UpdatePolicyInput struct { 20907 // Properties - The ReplicationProviderSettings. 20908 Properties *UpdatePolicyInputProperties `json:"properties,omitempty"` 20909} 20910 20911// UpdatePolicyInputProperties policy update properties. 20912type UpdatePolicyInputProperties struct { 20913 // ReplicationProviderSettings - The ReplicationProviderSettings. 20914 ReplicationProviderSettings BasicPolicyProviderSpecificInput `json:"replicationProviderSettings,omitempty"` 20915} 20916 20917// UnmarshalJSON is the custom unmarshaler for UpdatePolicyInputProperties struct. 20918func (upip *UpdatePolicyInputProperties) UnmarshalJSON(body []byte) error { 20919 var m map[string]*json.RawMessage 20920 err := json.Unmarshal(body, &m) 20921 if err != nil { 20922 return err 20923 } 20924 for k, v := range m { 20925 switch k { 20926 case "replicationProviderSettings": 20927 if v != nil { 20928 replicationProviderSettings, err := unmarshalBasicPolicyProviderSpecificInput(*v) 20929 if err != nil { 20930 return err 20931 } 20932 upip.ReplicationProviderSettings = replicationProviderSettings 20933 } 20934 } 20935 } 20936 20937 return nil 20938} 20939 20940// UpdateProtectionContainerMappingInput container pairing update input. 20941type UpdateProtectionContainerMappingInput struct { 20942 // Properties - Update protection container mapping input properties. 20943 Properties *UpdateProtectionContainerMappingInputProperties `json:"properties,omitempty"` 20944} 20945 20946// UpdateProtectionContainerMappingInputProperties container pairing update input. 20947type UpdateProtectionContainerMappingInputProperties struct { 20948 // ProviderSpecificInput - Provider specific input for updating protection container mapping. 20949 ProviderSpecificInput BasicReplicationProviderSpecificUpdateContainerMappingInput `json:"providerSpecificInput,omitempty"` 20950} 20951 20952// UnmarshalJSON is the custom unmarshaler for UpdateProtectionContainerMappingInputProperties struct. 20953func (upcmip *UpdateProtectionContainerMappingInputProperties) UnmarshalJSON(body []byte) error { 20954 var m map[string]*json.RawMessage 20955 err := json.Unmarshal(body, &m) 20956 if err != nil { 20957 return err 20958 } 20959 for k, v := range m { 20960 switch k { 20961 case "providerSpecificInput": 20962 if v != nil { 20963 providerSpecificInput, err := unmarshalBasicReplicationProviderSpecificUpdateContainerMappingInput(*v) 20964 if err != nil { 20965 return err 20966 } 20967 upcmip.ProviderSpecificInput = providerSpecificInput 20968 } 20969 } 20970 } 20971 20972 return nil 20973} 20974 20975// UpdateRecoveryPlanInput update recovery plan input class. 20976type UpdateRecoveryPlanInput struct { 20977 // Properties - Recovery plan update properties. 20978 Properties *UpdateRecoveryPlanInputProperties `json:"properties,omitempty"` 20979} 20980 20981// UpdateRecoveryPlanInputProperties recovery plan update properties. 20982type UpdateRecoveryPlanInputProperties struct { 20983 // Groups - The recovery plan groups. 20984 Groups *[]RecoveryPlanGroup `json:"groups,omitempty"` 20985} 20986 20987// UpdateReplicationProtectedItemInput update replication protected item input. 20988type UpdateReplicationProtectedItemInput struct { 20989 // Properties - Update replication protected item properties. 20990 Properties *UpdateReplicationProtectedItemInputProperties `json:"properties,omitempty"` 20991} 20992 20993// UpdateReplicationProtectedItemInputProperties update protected item input properties. 20994type UpdateReplicationProtectedItemInputProperties struct { 20995 // RecoveryAzureVMName - Target azure VM name given by the user. 20996 RecoveryAzureVMName *string `json:"recoveryAzureVMName,omitempty"` 20997 // RecoveryAzureVMSize - Target Azure Vm size. 20998 RecoveryAzureVMSize *string `json:"recoveryAzureVMSize,omitempty"` 20999 // SelectedRecoveryAzureNetworkID - Target Azure Network Id. 21000 SelectedRecoveryAzureNetworkID *string `json:"selectedRecoveryAzureNetworkId,omitempty"` 21001 // SelectedSourceNicID - The selected source nic Id which will be used as the primary nic during failover. 21002 SelectedSourceNicID *string `json:"selectedSourceNicId,omitempty"` 21003 // EnableRdpOnTargetOption - The selected option to enable RDP\SSH on target vm after failover. String value of {SrsDataContract.EnableRDPOnTargetOption} enum. 21004 EnableRdpOnTargetOption *string `json:"enableRdpOnTargetOption,omitempty"` 21005 // VMNics - The list of vm nic details. 21006 VMNics *[]VMNicInputDetails `json:"vmNics,omitempty"` 21007 // LicenseType - License type. Possible values include: 'LicenseTypeNotSpecified', 'LicenseTypeNoLicenseType', 'LicenseTypeWindowsServer' 21008 LicenseType LicenseType `json:"licenseType,omitempty"` 21009 // RecoveryAvailabilitySetID - The target availability set id. 21010 RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"` 21011 // ProviderSpecificDetails - The provider specific input to update replication protected item. 21012 ProviderSpecificDetails BasicUpdateReplicationProtectedItemProviderInput `json:"providerSpecificDetails,omitempty"` 21013} 21014 21015// UnmarshalJSON is the custom unmarshaler for UpdateReplicationProtectedItemInputProperties struct. 21016func (urpiip *UpdateReplicationProtectedItemInputProperties) UnmarshalJSON(body []byte) error { 21017 var m map[string]*json.RawMessage 21018 err := json.Unmarshal(body, &m) 21019 if err != nil { 21020 return err 21021 } 21022 for k, v := range m { 21023 switch k { 21024 case "recoveryAzureVMName": 21025 if v != nil { 21026 var recoveryAzureVMName string 21027 err = json.Unmarshal(*v, &recoveryAzureVMName) 21028 if err != nil { 21029 return err 21030 } 21031 urpiip.RecoveryAzureVMName = &recoveryAzureVMName 21032 } 21033 case "recoveryAzureVMSize": 21034 if v != nil { 21035 var recoveryAzureVMSize string 21036 err = json.Unmarshal(*v, &recoveryAzureVMSize) 21037 if err != nil { 21038 return err 21039 } 21040 urpiip.RecoveryAzureVMSize = &recoveryAzureVMSize 21041 } 21042 case "selectedRecoveryAzureNetworkId": 21043 if v != nil { 21044 var selectedRecoveryAzureNetworkID string 21045 err = json.Unmarshal(*v, &selectedRecoveryAzureNetworkID) 21046 if err != nil { 21047 return err 21048 } 21049 urpiip.SelectedRecoveryAzureNetworkID = &selectedRecoveryAzureNetworkID 21050 } 21051 case "selectedSourceNicId": 21052 if v != nil { 21053 var selectedSourceNicID string 21054 err = json.Unmarshal(*v, &selectedSourceNicID) 21055 if err != nil { 21056 return err 21057 } 21058 urpiip.SelectedSourceNicID = &selectedSourceNicID 21059 } 21060 case "enableRdpOnTargetOption": 21061 if v != nil { 21062 var enableRdpOnTargetOption string 21063 err = json.Unmarshal(*v, &enableRdpOnTargetOption) 21064 if err != nil { 21065 return err 21066 } 21067 urpiip.EnableRdpOnTargetOption = &enableRdpOnTargetOption 21068 } 21069 case "vmNics": 21070 if v != nil { 21071 var VMNics []VMNicInputDetails 21072 err = json.Unmarshal(*v, &VMNics) 21073 if err != nil { 21074 return err 21075 } 21076 urpiip.VMNics = &VMNics 21077 } 21078 case "licenseType": 21079 if v != nil { 21080 var licenseType LicenseType 21081 err = json.Unmarshal(*v, &licenseType) 21082 if err != nil { 21083 return err 21084 } 21085 urpiip.LicenseType = licenseType 21086 } 21087 case "recoveryAvailabilitySetId": 21088 if v != nil { 21089 var recoveryAvailabilitySetID string 21090 err = json.Unmarshal(*v, &recoveryAvailabilitySetID) 21091 if err != nil { 21092 return err 21093 } 21094 urpiip.RecoveryAvailabilitySetID = &recoveryAvailabilitySetID 21095 } 21096 case "providerSpecificDetails": 21097 if v != nil { 21098 providerSpecificDetails, err := unmarshalBasicUpdateReplicationProtectedItemProviderInput(*v) 21099 if err != nil { 21100 return err 21101 } 21102 urpiip.ProviderSpecificDetails = providerSpecificDetails 21103 } 21104 } 21105 } 21106 21107 return nil 21108} 21109 21110// BasicUpdateReplicationProtectedItemProviderInput update replication protected item provider specific input. 21111type BasicUpdateReplicationProtectedItemProviderInput interface { 21112 AsA2AUpdateReplicationProtectedItemInput() (*A2AUpdateReplicationProtectedItemInput, bool) 21113 AsHyperVReplicaAzureUpdateReplicationProtectedItemInput() (*HyperVReplicaAzureUpdateReplicationProtectedItemInput, bool) 21114 AsInMageAzureV2UpdateReplicationProtectedItemInput() (*InMageAzureV2UpdateReplicationProtectedItemInput, bool) 21115 AsUpdateReplicationProtectedItemProviderInput() (*UpdateReplicationProtectedItemProviderInput, bool) 21116} 21117 21118// UpdateReplicationProtectedItemProviderInput update replication protected item provider specific input. 21119type UpdateReplicationProtectedItemProviderInput struct { 21120 // InstanceType - Possible values include: 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeUpdateReplicationProtectedItemProviderInput', 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeA2A', 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeInMageAzureV2' 21121 InstanceType InstanceTypeBasicUpdateReplicationProtectedItemProviderInput `json:"instanceType,omitempty"` 21122} 21123 21124func unmarshalBasicUpdateReplicationProtectedItemProviderInput(body []byte) (BasicUpdateReplicationProtectedItemProviderInput, error) { 21125 var m map[string]interface{} 21126 err := json.Unmarshal(body, &m) 21127 if err != nil { 21128 return nil, err 21129 } 21130 21131 switch m["instanceType"] { 21132 case string(InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeA2A): 21133 var aurpii A2AUpdateReplicationProtectedItemInput 21134 err := json.Unmarshal(body, &aurpii) 21135 return aurpii, err 21136 case string(InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeHyperVReplicaAzure): 21137 var hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput 21138 err := json.Unmarshal(body, &hvraurpii) 21139 return hvraurpii, err 21140 case string(InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeInMageAzureV2): 21141 var imavurpii InMageAzureV2UpdateReplicationProtectedItemInput 21142 err := json.Unmarshal(body, &imavurpii) 21143 return imavurpii, err 21144 default: 21145 var urpipi UpdateReplicationProtectedItemProviderInput 21146 err := json.Unmarshal(body, &urpipi) 21147 return urpipi, err 21148 } 21149} 21150func unmarshalBasicUpdateReplicationProtectedItemProviderInputArray(body []byte) ([]BasicUpdateReplicationProtectedItemProviderInput, error) { 21151 var rawMessages []*json.RawMessage 21152 err := json.Unmarshal(body, &rawMessages) 21153 if err != nil { 21154 return nil, err 21155 } 21156 21157 urpipiArray := make([]BasicUpdateReplicationProtectedItemProviderInput, len(rawMessages)) 21158 21159 for index, rawMessage := range rawMessages { 21160 urpipi, err := unmarshalBasicUpdateReplicationProtectedItemProviderInput(*rawMessage) 21161 if err != nil { 21162 return nil, err 21163 } 21164 urpipiArray[index] = urpipi 21165 } 21166 return urpipiArray, nil 21167} 21168 21169// MarshalJSON is the custom marshaler for UpdateReplicationProtectedItemProviderInput. 21170func (urpipi UpdateReplicationProtectedItemProviderInput) MarshalJSON() ([]byte, error) { 21171 urpipi.InstanceType = InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeUpdateReplicationProtectedItemProviderInput 21172 objectMap := make(map[string]interface{}) 21173 if urpipi.InstanceType != "" { 21174 objectMap["instanceType"] = urpipi.InstanceType 21175 } 21176 return json.Marshal(objectMap) 21177} 21178 21179// AsA2AUpdateReplicationProtectedItemInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for UpdateReplicationProtectedItemProviderInput. 21180func (urpipi UpdateReplicationProtectedItemProviderInput) AsA2AUpdateReplicationProtectedItemInput() (*A2AUpdateReplicationProtectedItemInput, bool) { 21181 return nil, false 21182} 21183 21184// AsHyperVReplicaAzureUpdateReplicationProtectedItemInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for UpdateReplicationProtectedItemProviderInput. 21185func (urpipi UpdateReplicationProtectedItemProviderInput) AsHyperVReplicaAzureUpdateReplicationProtectedItemInput() (*HyperVReplicaAzureUpdateReplicationProtectedItemInput, bool) { 21186 return nil, false 21187} 21188 21189// AsInMageAzureV2UpdateReplicationProtectedItemInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for UpdateReplicationProtectedItemProviderInput. 21190func (urpipi UpdateReplicationProtectedItemProviderInput) AsInMageAzureV2UpdateReplicationProtectedItemInput() (*InMageAzureV2UpdateReplicationProtectedItemInput, bool) { 21191 return nil, false 21192} 21193 21194// AsUpdateReplicationProtectedItemProviderInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for UpdateReplicationProtectedItemProviderInput. 21195func (urpipi UpdateReplicationProtectedItemProviderInput) AsUpdateReplicationProtectedItemProviderInput() (*UpdateReplicationProtectedItemProviderInput, bool) { 21196 return &urpipi, true 21197} 21198 21199// AsBasicUpdateReplicationProtectedItemProviderInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for UpdateReplicationProtectedItemProviderInput. 21200func (urpipi UpdateReplicationProtectedItemProviderInput) AsBasicUpdateReplicationProtectedItemProviderInput() (BasicUpdateReplicationProtectedItemProviderInput, bool) { 21201 return &urpipi, true 21202} 21203 21204// UpdateVCenterRequest input required to update vCenter. 21205type UpdateVCenterRequest struct { 21206 // Properties - The update VCenter Request Properties. 21207 Properties *UpdateVCenterRequestProperties `json:"properties,omitempty"` 21208} 21209 21210// UpdateVCenterRequestProperties the properties of an update vCenter request. 21211type UpdateVCenterRequestProperties struct { 21212 // FriendlyName - The friendly name of the vCenter. 21213 FriendlyName *string `json:"friendlyName,omitempty"` 21214 // IPAddress - The IP address of the vCenter to be discovered. 21215 IPAddress *string `json:"ipAddress,omitempty"` 21216 // ProcessServerID - The process server Id from where the update can be orchestrated. 21217 ProcessServerID *string `json:"processServerId,omitempty"` 21218 // Port - The port number for discovery. 21219 Port *string `json:"port,omitempty"` 21220 // RunAsAccountID - The CS account Id which has privileges to update the vCenter. 21221 RunAsAccountID *string `json:"runAsAccountId,omitempty"` 21222} 21223 21224// VaultHealthDetails vault health details definition. 21225type VaultHealthDetails struct { 21226 autorest.Response `json:"-"` 21227 // Properties - The vault health related data. 21228 Properties *VaultHealthProperties `json:"properties,omitempty"` 21229 // ID - READ-ONLY; Resource Id 21230 ID *string `json:"id,omitempty"` 21231 // Name - READ-ONLY; Resource Name 21232 Name *string `json:"name,omitempty"` 21233 // Type - READ-ONLY; Resource Type 21234 Type *string `json:"type,omitempty"` 21235 // Location - Resource Location 21236 Location *string `json:"location,omitempty"` 21237} 21238 21239// MarshalJSON is the custom marshaler for VaultHealthDetails. 21240func (vhd VaultHealthDetails) MarshalJSON() ([]byte, error) { 21241 objectMap := make(map[string]interface{}) 21242 if vhd.Properties != nil { 21243 objectMap["properties"] = vhd.Properties 21244 } 21245 if vhd.Location != nil { 21246 objectMap["location"] = vhd.Location 21247 } 21248 return json.Marshal(objectMap) 21249} 21250 21251// VaultHealthProperties class to define the health summary of the Vault. 21252type VaultHealthProperties struct { 21253 // VaultErrors - The list of errors on the vault. 21254 VaultErrors *[]HealthError `json:"vaultErrors,omitempty"` 21255 // ProtectedItemsHealth - The list of the health detail of the protected items in the vault. 21256 ProtectedItemsHealth *ResourceHealthSummary `json:"protectedItemsHealth,omitempty"` 21257 // FabricsHealth - The list of the health detail of the fabrics in the vault. 21258 FabricsHealth *ResourceHealthSummary `json:"fabricsHealth,omitempty"` 21259 // ContainersHealth - The list of the health detail of the containers in the vault. 21260 ContainersHealth *ResourceHealthSummary `json:"containersHealth,omitempty"` 21261} 21262 21263// VCenter vCenter definition. 21264type VCenter struct { 21265 autorest.Response `json:"-"` 21266 // Properties - VCenter related data. 21267 Properties *VCenterProperties `json:"properties,omitempty"` 21268 // ID - READ-ONLY; Resource Id 21269 ID *string `json:"id,omitempty"` 21270 // Name - READ-ONLY; Resource Name 21271 Name *string `json:"name,omitempty"` 21272 // Type - READ-ONLY; Resource Type 21273 Type *string `json:"type,omitempty"` 21274 // Location - Resource Location 21275 Location *string `json:"location,omitempty"` 21276} 21277 21278// MarshalJSON is the custom marshaler for VCenter. 21279func (vc VCenter) MarshalJSON() ([]byte, error) { 21280 objectMap := make(map[string]interface{}) 21281 if vc.Properties != nil { 21282 objectMap["properties"] = vc.Properties 21283 } 21284 if vc.Location != nil { 21285 objectMap["location"] = vc.Location 21286 } 21287 return json.Marshal(objectMap) 21288} 21289 21290// VCenterCollection collection of vCenter details. 21291type VCenterCollection struct { 21292 autorest.Response `json:"-"` 21293 // Value - The vCenter details. 21294 Value *[]VCenter `json:"value,omitempty"` 21295 // NextLink - The value of next link. 21296 NextLink *string `json:"nextLink,omitempty"` 21297} 21298 21299// VCenterCollectionIterator provides access to a complete listing of VCenter values. 21300type VCenterCollectionIterator struct { 21301 i int 21302 page VCenterCollectionPage 21303} 21304 21305// NextWithContext advances to the next value. If there was an error making 21306// the request the iterator does not advance and the error is returned. 21307func (iter *VCenterCollectionIterator) NextWithContext(ctx context.Context) (err error) { 21308 if tracing.IsEnabled() { 21309 ctx = tracing.StartSpan(ctx, fqdn+"/VCenterCollectionIterator.NextWithContext") 21310 defer func() { 21311 sc := -1 21312 if iter.Response().Response.Response != nil { 21313 sc = iter.Response().Response.Response.StatusCode 21314 } 21315 tracing.EndSpan(ctx, sc, err) 21316 }() 21317 } 21318 iter.i++ 21319 if iter.i < len(iter.page.Values()) { 21320 return nil 21321 } 21322 err = iter.page.NextWithContext(ctx) 21323 if err != nil { 21324 iter.i-- 21325 return err 21326 } 21327 iter.i = 0 21328 return nil 21329} 21330 21331// Next advances to the next value. If there was an error making 21332// the request the iterator does not advance and the error is returned. 21333// Deprecated: Use NextWithContext() instead. 21334func (iter *VCenterCollectionIterator) Next() error { 21335 return iter.NextWithContext(context.Background()) 21336} 21337 21338// NotDone returns true if the enumeration should be started or is not yet complete. 21339func (iter VCenterCollectionIterator) NotDone() bool { 21340 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 21341} 21342 21343// Response returns the raw server response from the last page request. 21344func (iter VCenterCollectionIterator) Response() VCenterCollection { 21345 return iter.page.Response() 21346} 21347 21348// Value returns the current value or a zero-initialized value if the 21349// iterator has advanced beyond the end of the collection. 21350func (iter VCenterCollectionIterator) Value() VCenter { 21351 if !iter.page.NotDone() { 21352 return VCenter{} 21353 } 21354 return iter.page.Values()[iter.i] 21355} 21356 21357// Creates a new instance of the VCenterCollectionIterator type. 21358func NewVCenterCollectionIterator(page VCenterCollectionPage) VCenterCollectionIterator { 21359 return VCenterCollectionIterator{page: page} 21360} 21361 21362// IsEmpty returns true if the ListResult contains no values. 21363func (vcc VCenterCollection) IsEmpty() bool { 21364 return vcc.Value == nil || len(*vcc.Value) == 0 21365} 21366 21367// hasNextLink returns true if the NextLink is not empty. 21368func (vcc VCenterCollection) hasNextLink() bool { 21369 return vcc.NextLink != nil && len(*vcc.NextLink) != 0 21370} 21371 21372// vCenterCollectionPreparer prepares a request to retrieve the next set of results. 21373// It returns nil if no more results exist. 21374func (vcc VCenterCollection) vCenterCollectionPreparer(ctx context.Context) (*http.Request, error) { 21375 if !vcc.hasNextLink() { 21376 return nil, nil 21377 } 21378 return autorest.Prepare((&http.Request{}).WithContext(ctx), 21379 autorest.AsJSON(), 21380 autorest.AsGet(), 21381 autorest.WithBaseURL(to.String(vcc.NextLink))) 21382} 21383 21384// VCenterCollectionPage contains a page of VCenter values. 21385type VCenterCollectionPage struct { 21386 fn func(context.Context, VCenterCollection) (VCenterCollection, error) 21387 vcc VCenterCollection 21388} 21389 21390// NextWithContext advances to the next page of values. If there was an error making 21391// the request the page does not advance and the error is returned. 21392func (page *VCenterCollectionPage) NextWithContext(ctx context.Context) (err error) { 21393 if tracing.IsEnabled() { 21394 ctx = tracing.StartSpan(ctx, fqdn+"/VCenterCollectionPage.NextWithContext") 21395 defer func() { 21396 sc := -1 21397 if page.Response().Response.Response != nil { 21398 sc = page.Response().Response.Response.StatusCode 21399 } 21400 tracing.EndSpan(ctx, sc, err) 21401 }() 21402 } 21403 for { 21404 next, err := page.fn(ctx, page.vcc) 21405 if err != nil { 21406 return err 21407 } 21408 page.vcc = next 21409 if !next.hasNextLink() || !next.IsEmpty() { 21410 break 21411 } 21412 } 21413 return nil 21414} 21415 21416// Next advances to the next page of values. If there was an error making 21417// the request the page does not advance and the error is returned. 21418// Deprecated: Use NextWithContext() instead. 21419func (page *VCenterCollectionPage) Next() error { 21420 return page.NextWithContext(context.Background()) 21421} 21422 21423// NotDone returns true if the page enumeration should be started or is not yet complete. 21424func (page VCenterCollectionPage) NotDone() bool { 21425 return !page.vcc.IsEmpty() 21426} 21427 21428// Response returns the raw server response from the last page request. 21429func (page VCenterCollectionPage) Response() VCenterCollection { 21430 return page.vcc 21431} 21432 21433// Values returns the slice of values for the current page or nil if there are no values. 21434func (page VCenterCollectionPage) Values() []VCenter { 21435 if page.vcc.IsEmpty() { 21436 return nil 21437 } 21438 return *page.vcc.Value 21439} 21440 21441// Creates a new instance of the VCenterCollectionPage type. 21442func NewVCenterCollectionPage(cur VCenterCollection, getNextPage func(context.Context, VCenterCollection) (VCenterCollection, error)) VCenterCollectionPage { 21443 return VCenterCollectionPage{ 21444 fn: getNextPage, 21445 vcc: cur, 21446 } 21447} 21448 21449// VCenterProperties vCenter properties. 21450type VCenterProperties struct { 21451 // FriendlyName - Friendly name of the vCenter. 21452 FriendlyName *string `json:"friendlyName,omitempty"` 21453 // InternalID - VCenter internal ID. 21454 InternalID *string `json:"internalId,omitempty"` 21455 // LastHeartbeat - The time when the last heartbeat was received by vCenter. 21456 LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"` 21457 // DiscoveryStatus - The VCenter discovery status. 21458 DiscoveryStatus *string `json:"discoveryStatus,omitempty"` 21459 // ProcessServerID - The process server Id. 21460 ProcessServerID *string `json:"processServerId,omitempty"` 21461 // IPAddress - The IP address of the vCenter. 21462 IPAddress *string `json:"ipAddress,omitempty"` 21463 // InfrastructureID - The infrastructure Id of vCenter. 21464 InfrastructureID *string `json:"infrastructureId,omitempty"` 21465 // Port - The port number for discovery. 21466 Port *string `json:"port,omitempty"` 21467 // RunAsAccountID - The account Id which has privileges to discover the vCenter. 21468 RunAsAccountID *string `json:"runAsAccountId,omitempty"` 21469 // FabricArmResourceName - The ARM resource name of the fabric containing this VCenter. 21470 FabricArmResourceName *string `json:"fabricArmResourceName,omitempty"` 21471 // HealthErrors - The health errors for this VCenter. 21472 HealthErrors *[]HealthError `json:"healthErrors,omitempty"` 21473} 21474 21475// VersionDetails version related details. 21476type VersionDetails struct { 21477 // Version - The agent version. 21478 Version *string `json:"version,omitempty"` 21479 // ExpiryDate - Version expiry date. 21480 ExpiryDate *date.Time `json:"expiryDate,omitempty"` 21481 // Status - A value indicating whether security update required. Possible values include: 'Supported', 'NotSupported', 'Deprecated', 'UpdateRequired', 'SecurityUpdateRequired' 21482 Status AgentVersionStatus `json:"status,omitempty"` 21483} 21484 21485// VirtualMachineTaskDetails this class represents the virtual machine task details. 21486type VirtualMachineTaskDetails struct { 21487 // SkippedReason - The skipped reason. 21488 SkippedReason *string `json:"skippedReason,omitempty"` 21489 // SkippedReasonString - The skipped reason string. 21490 SkippedReasonString *string `json:"skippedReasonString,omitempty"` 21491 // JobTask - The job entity. 21492 JobTask *JobEntity `json:"jobTask,omitempty"` 21493 // InstanceType - Possible values include: 'InstanceTypeTaskTypeDetails', 'InstanceTypeAutomationRunbookTaskDetails', 'InstanceTypeConsistencyCheckTaskDetails', 'InstanceTypeFabricReplicationGroupTaskDetails', 'InstanceTypeJobTaskDetails', 'InstanceTypeManualActionTaskDetails', 'InstanceTypeScriptActionTaskDetails', 'InstanceTypeVirtualMachineTaskDetails', 'InstanceTypeVMNicUpdatesTaskDetails' 21494 InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"` 21495} 21496 21497// MarshalJSON is the custom marshaler for VirtualMachineTaskDetails. 21498func (vmtd VirtualMachineTaskDetails) MarshalJSON() ([]byte, error) { 21499 vmtd.InstanceType = InstanceTypeVirtualMachineTaskDetails 21500 objectMap := make(map[string]interface{}) 21501 if vmtd.SkippedReason != nil { 21502 objectMap["skippedReason"] = vmtd.SkippedReason 21503 } 21504 if vmtd.SkippedReasonString != nil { 21505 objectMap["skippedReasonString"] = vmtd.SkippedReasonString 21506 } 21507 if vmtd.JobTask != nil { 21508 objectMap["jobTask"] = vmtd.JobTask 21509 } 21510 if vmtd.InstanceType != "" { 21511 objectMap["instanceType"] = vmtd.InstanceType 21512 } 21513 return json.Marshal(objectMap) 21514} 21515 21516// AsAutomationRunbookTaskDetails is the BasicTaskTypeDetails implementation for VirtualMachineTaskDetails. 21517func (vmtd VirtualMachineTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) { 21518 return nil, false 21519} 21520 21521// AsConsistencyCheckTaskDetails is the BasicTaskTypeDetails implementation for VirtualMachineTaskDetails. 21522func (vmtd VirtualMachineTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) { 21523 return nil, false 21524} 21525 21526// AsFabricReplicationGroupTaskDetails is the BasicTaskTypeDetails implementation for VirtualMachineTaskDetails. 21527func (vmtd VirtualMachineTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) { 21528 return nil, false 21529} 21530 21531// AsJobTaskDetails is the BasicTaskTypeDetails implementation for VirtualMachineTaskDetails. 21532func (vmtd VirtualMachineTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) { 21533 return nil, false 21534} 21535 21536// AsManualActionTaskDetails is the BasicTaskTypeDetails implementation for VirtualMachineTaskDetails. 21537func (vmtd VirtualMachineTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) { 21538 return nil, false 21539} 21540 21541// AsScriptActionTaskDetails is the BasicTaskTypeDetails implementation for VirtualMachineTaskDetails. 21542func (vmtd VirtualMachineTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) { 21543 return nil, false 21544} 21545 21546// AsVirtualMachineTaskDetails is the BasicTaskTypeDetails implementation for VirtualMachineTaskDetails. 21547func (vmtd VirtualMachineTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) { 21548 return &vmtd, true 21549} 21550 21551// AsVMNicUpdatesTaskDetails is the BasicTaskTypeDetails implementation for VirtualMachineTaskDetails. 21552func (vmtd VirtualMachineTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) { 21553 return nil, false 21554} 21555 21556// AsTaskTypeDetails is the BasicTaskTypeDetails implementation for VirtualMachineTaskDetails. 21557func (vmtd VirtualMachineTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) { 21558 return nil, false 21559} 21560 21561// AsBasicTaskTypeDetails is the BasicTaskTypeDetails implementation for VirtualMachineTaskDetails. 21562func (vmtd VirtualMachineTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) { 21563 return &vmtd, true 21564} 21565 21566// VmmDetails VMM fabric specific details. 21567type VmmDetails struct { 21568 // InstanceType - Possible values include: 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeFabricSpecificDetails', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeAzure', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeHyperVSite', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMM', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMware', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMwareV2' 21569 InstanceType InstanceTypeBasicFabricSpecificDetails `json:"instanceType,omitempty"` 21570} 21571 21572// MarshalJSON is the custom marshaler for VmmDetails. 21573func (vd VmmDetails) MarshalJSON() ([]byte, error) { 21574 vd.InstanceType = InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMM 21575 objectMap := make(map[string]interface{}) 21576 if vd.InstanceType != "" { 21577 objectMap["instanceType"] = vd.InstanceType 21578 } 21579 return json.Marshal(objectMap) 21580} 21581 21582// AsAzureFabricSpecificDetails is the BasicFabricSpecificDetails implementation for VmmDetails. 21583func (vd VmmDetails) AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool) { 21584 return nil, false 21585} 21586 21587// AsHyperVSiteDetails is the BasicFabricSpecificDetails implementation for VmmDetails. 21588func (vd VmmDetails) AsHyperVSiteDetails() (*HyperVSiteDetails, bool) { 21589 return nil, false 21590} 21591 21592// AsVmmDetails is the BasicFabricSpecificDetails implementation for VmmDetails. 21593func (vd VmmDetails) AsVmmDetails() (*VmmDetails, bool) { 21594 return &vd, true 21595} 21596 21597// AsVMwareDetails is the BasicFabricSpecificDetails implementation for VmmDetails. 21598func (vd VmmDetails) AsVMwareDetails() (*VMwareDetails, bool) { 21599 return nil, false 21600} 21601 21602// AsVMwareV2FabricSpecificDetails is the BasicFabricSpecificDetails implementation for VmmDetails. 21603func (vd VmmDetails) AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool) { 21604 return nil, false 21605} 21606 21607// AsFabricSpecificDetails is the BasicFabricSpecificDetails implementation for VmmDetails. 21608func (vd VmmDetails) AsFabricSpecificDetails() (*FabricSpecificDetails, bool) { 21609 return nil, false 21610} 21611 21612// AsBasicFabricSpecificDetails is the BasicFabricSpecificDetails implementation for VmmDetails. 21613func (vd VmmDetails) AsBasicFabricSpecificDetails() (BasicFabricSpecificDetails, bool) { 21614 return &vd, true 21615} 21616 21617// VmmToAzureCreateNetworkMappingInput create network mappings input properties/behavior specific to Vmm to 21618// Azure Network mapping. 21619type VmmToAzureCreateNetworkMappingInput struct { 21620 // InstanceType - Possible values include: 'InstanceTypeFabricSpecificCreateNetworkMappingInput', 'InstanceTypeAzureToAzure', 'InstanceTypeVmmToAzure', 'InstanceTypeVmmToVmm' 21621 InstanceType InstanceTypeBasicFabricSpecificCreateNetworkMappingInput `json:"instanceType,omitempty"` 21622} 21623 21624// MarshalJSON is the custom marshaler for VmmToAzureCreateNetworkMappingInput. 21625func (vtacnmi VmmToAzureCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { 21626 vtacnmi.InstanceType = InstanceTypeVmmToAzure 21627 objectMap := make(map[string]interface{}) 21628 if vtacnmi.InstanceType != "" { 21629 objectMap["instanceType"] = vtacnmi.InstanceType 21630 } 21631 return json.Marshal(objectMap) 21632} 21633 21634// AsAzureToAzureCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for VmmToAzureCreateNetworkMappingInput. 21635func (vtacnmi VmmToAzureCreateNetworkMappingInput) AsAzureToAzureCreateNetworkMappingInput() (*AzureToAzureCreateNetworkMappingInput, bool) { 21636 return nil, false 21637} 21638 21639// AsVmmToAzureCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for VmmToAzureCreateNetworkMappingInput. 21640func (vtacnmi VmmToAzureCreateNetworkMappingInput) AsVmmToAzureCreateNetworkMappingInput() (*VmmToAzureCreateNetworkMappingInput, bool) { 21641 return &vtacnmi, true 21642} 21643 21644// AsVmmToVmmCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for VmmToAzureCreateNetworkMappingInput. 21645func (vtacnmi VmmToAzureCreateNetworkMappingInput) AsVmmToVmmCreateNetworkMappingInput() (*VmmToVmmCreateNetworkMappingInput, bool) { 21646 return nil, false 21647} 21648 21649// AsFabricSpecificCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for VmmToAzureCreateNetworkMappingInput. 21650func (vtacnmi VmmToAzureCreateNetworkMappingInput) AsFabricSpecificCreateNetworkMappingInput() (*FabricSpecificCreateNetworkMappingInput, bool) { 21651 return nil, false 21652} 21653 21654// AsBasicFabricSpecificCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for VmmToAzureCreateNetworkMappingInput. 21655func (vtacnmi VmmToAzureCreateNetworkMappingInput) AsBasicFabricSpecificCreateNetworkMappingInput() (BasicFabricSpecificCreateNetworkMappingInput, bool) { 21656 return &vtacnmi, true 21657} 21658 21659// VmmToAzureNetworkMappingSettings e2A Network Mapping fabric specific settings. 21660type VmmToAzureNetworkMappingSettings struct { 21661 // InstanceType - Possible values include: 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeNetworkMappingFabricSpecificSettings', 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeAzureToAzure', 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToAzure', 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToVmm' 21662 InstanceType InstanceTypeBasicNetworkMappingFabricSpecificSettings `json:"instanceType,omitempty"` 21663} 21664 21665// MarshalJSON is the custom marshaler for VmmToAzureNetworkMappingSettings. 21666func (vtanms VmmToAzureNetworkMappingSettings) MarshalJSON() ([]byte, error) { 21667 vtanms.InstanceType = InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToAzure 21668 objectMap := make(map[string]interface{}) 21669 if vtanms.InstanceType != "" { 21670 objectMap["instanceType"] = vtanms.InstanceType 21671 } 21672 return json.Marshal(objectMap) 21673} 21674 21675// AsAzureToAzureNetworkMappingSettings is the BasicNetworkMappingFabricSpecificSettings implementation for VmmToAzureNetworkMappingSettings. 21676func (vtanms VmmToAzureNetworkMappingSettings) AsAzureToAzureNetworkMappingSettings() (*AzureToAzureNetworkMappingSettings, bool) { 21677 return nil, false 21678} 21679 21680// AsVmmToAzureNetworkMappingSettings is the BasicNetworkMappingFabricSpecificSettings implementation for VmmToAzureNetworkMappingSettings. 21681func (vtanms VmmToAzureNetworkMappingSettings) AsVmmToAzureNetworkMappingSettings() (*VmmToAzureNetworkMappingSettings, bool) { 21682 return &vtanms, true 21683} 21684 21685// AsVmmToVmmNetworkMappingSettings is the BasicNetworkMappingFabricSpecificSettings implementation for VmmToAzureNetworkMappingSettings. 21686func (vtanms VmmToAzureNetworkMappingSettings) AsVmmToVmmNetworkMappingSettings() (*VmmToVmmNetworkMappingSettings, bool) { 21687 return nil, false 21688} 21689 21690// AsNetworkMappingFabricSpecificSettings is the BasicNetworkMappingFabricSpecificSettings implementation for VmmToAzureNetworkMappingSettings. 21691func (vtanms VmmToAzureNetworkMappingSettings) AsNetworkMappingFabricSpecificSettings() (*NetworkMappingFabricSpecificSettings, bool) { 21692 return nil, false 21693} 21694 21695// AsBasicNetworkMappingFabricSpecificSettings is the BasicNetworkMappingFabricSpecificSettings implementation for VmmToAzureNetworkMappingSettings. 21696func (vtanms VmmToAzureNetworkMappingSettings) AsBasicNetworkMappingFabricSpecificSettings() (BasicNetworkMappingFabricSpecificSettings, bool) { 21697 return &vtanms, true 21698} 21699 21700// VmmToAzureUpdateNetworkMappingInput update network mappings input properties/behavior specific to vmm to 21701// azure. 21702type VmmToAzureUpdateNetworkMappingInput struct { 21703 // InstanceType - Possible values include: 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeFabricSpecificUpdateNetworkMappingInput', 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeAzureToAzure', 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToAzure', 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToVmm' 21704 InstanceType InstanceTypeBasicFabricSpecificUpdateNetworkMappingInput `json:"instanceType,omitempty"` 21705} 21706 21707// MarshalJSON is the custom marshaler for VmmToAzureUpdateNetworkMappingInput. 21708func (vtaunmi VmmToAzureUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { 21709 vtaunmi.InstanceType = InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToAzure 21710 objectMap := make(map[string]interface{}) 21711 if vtaunmi.InstanceType != "" { 21712 objectMap["instanceType"] = vtaunmi.InstanceType 21713 } 21714 return json.Marshal(objectMap) 21715} 21716 21717// AsAzureToAzureUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for VmmToAzureUpdateNetworkMappingInput. 21718func (vtaunmi VmmToAzureUpdateNetworkMappingInput) AsAzureToAzureUpdateNetworkMappingInput() (*AzureToAzureUpdateNetworkMappingInput, bool) { 21719 return nil, false 21720} 21721 21722// AsVmmToAzureUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for VmmToAzureUpdateNetworkMappingInput. 21723func (vtaunmi VmmToAzureUpdateNetworkMappingInput) AsVmmToAzureUpdateNetworkMappingInput() (*VmmToAzureUpdateNetworkMappingInput, bool) { 21724 return &vtaunmi, true 21725} 21726 21727// AsVmmToVmmUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for VmmToAzureUpdateNetworkMappingInput. 21728func (vtaunmi VmmToAzureUpdateNetworkMappingInput) AsVmmToVmmUpdateNetworkMappingInput() (*VmmToVmmUpdateNetworkMappingInput, bool) { 21729 return nil, false 21730} 21731 21732// AsFabricSpecificUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for VmmToAzureUpdateNetworkMappingInput. 21733func (vtaunmi VmmToAzureUpdateNetworkMappingInput) AsFabricSpecificUpdateNetworkMappingInput() (*FabricSpecificUpdateNetworkMappingInput, bool) { 21734 return nil, false 21735} 21736 21737// AsBasicFabricSpecificUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for VmmToAzureUpdateNetworkMappingInput. 21738func (vtaunmi VmmToAzureUpdateNetworkMappingInput) AsBasicFabricSpecificUpdateNetworkMappingInput() (BasicFabricSpecificUpdateNetworkMappingInput, bool) { 21739 return &vtaunmi, true 21740} 21741 21742// VmmToVmmCreateNetworkMappingInput create network mappings input properties/behavior specific to vmm to 21743// vmm Network mapping. 21744type VmmToVmmCreateNetworkMappingInput struct { 21745 // InstanceType - Possible values include: 'InstanceTypeFabricSpecificCreateNetworkMappingInput', 'InstanceTypeAzureToAzure', 'InstanceTypeVmmToAzure', 'InstanceTypeVmmToVmm' 21746 InstanceType InstanceTypeBasicFabricSpecificCreateNetworkMappingInput `json:"instanceType,omitempty"` 21747} 21748 21749// MarshalJSON is the custom marshaler for VmmToVmmCreateNetworkMappingInput. 21750func (vtvcnmi VmmToVmmCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { 21751 vtvcnmi.InstanceType = InstanceTypeVmmToVmm 21752 objectMap := make(map[string]interface{}) 21753 if vtvcnmi.InstanceType != "" { 21754 objectMap["instanceType"] = vtvcnmi.InstanceType 21755 } 21756 return json.Marshal(objectMap) 21757} 21758 21759// AsAzureToAzureCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for VmmToVmmCreateNetworkMappingInput. 21760func (vtvcnmi VmmToVmmCreateNetworkMappingInput) AsAzureToAzureCreateNetworkMappingInput() (*AzureToAzureCreateNetworkMappingInput, bool) { 21761 return nil, false 21762} 21763 21764// AsVmmToAzureCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for VmmToVmmCreateNetworkMappingInput. 21765func (vtvcnmi VmmToVmmCreateNetworkMappingInput) AsVmmToAzureCreateNetworkMappingInput() (*VmmToAzureCreateNetworkMappingInput, bool) { 21766 return nil, false 21767} 21768 21769// AsVmmToVmmCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for VmmToVmmCreateNetworkMappingInput. 21770func (vtvcnmi VmmToVmmCreateNetworkMappingInput) AsVmmToVmmCreateNetworkMappingInput() (*VmmToVmmCreateNetworkMappingInput, bool) { 21771 return &vtvcnmi, true 21772} 21773 21774// AsFabricSpecificCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for VmmToVmmCreateNetworkMappingInput. 21775func (vtvcnmi VmmToVmmCreateNetworkMappingInput) AsFabricSpecificCreateNetworkMappingInput() (*FabricSpecificCreateNetworkMappingInput, bool) { 21776 return nil, false 21777} 21778 21779// AsBasicFabricSpecificCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for VmmToVmmCreateNetworkMappingInput. 21780func (vtvcnmi VmmToVmmCreateNetworkMappingInput) AsBasicFabricSpecificCreateNetworkMappingInput() (BasicFabricSpecificCreateNetworkMappingInput, bool) { 21781 return &vtvcnmi, true 21782} 21783 21784// VmmToVmmNetworkMappingSettings e2E Network Mapping fabric specific settings. 21785type VmmToVmmNetworkMappingSettings struct { 21786 // InstanceType - Possible values include: 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeNetworkMappingFabricSpecificSettings', 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeAzureToAzure', 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToAzure', 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToVmm' 21787 InstanceType InstanceTypeBasicNetworkMappingFabricSpecificSettings `json:"instanceType,omitempty"` 21788} 21789 21790// MarshalJSON is the custom marshaler for VmmToVmmNetworkMappingSettings. 21791func (vtvnms VmmToVmmNetworkMappingSettings) MarshalJSON() ([]byte, error) { 21792 vtvnms.InstanceType = InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToVmm 21793 objectMap := make(map[string]interface{}) 21794 if vtvnms.InstanceType != "" { 21795 objectMap["instanceType"] = vtvnms.InstanceType 21796 } 21797 return json.Marshal(objectMap) 21798} 21799 21800// AsAzureToAzureNetworkMappingSettings is the BasicNetworkMappingFabricSpecificSettings implementation for VmmToVmmNetworkMappingSettings. 21801func (vtvnms VmmToVmmNetworkMappingSettings) AsAzureToAzureNetworkMappingSettings() (*AzureToAzureNetworkMappingSettings, bool) { 21802 return nil, false 21803} 21804 21805// AsVmmToAzureNetworkMappingSettings is the BasicNetworkMappingFabricSpecificSettings implementation for VmmToVmmNetworkMappingSettings. 21806func (vtvnms VmmToVmmNetworkMappingSettings) AsVmmToAzureNetworkMappingSettings() (*VmmToAzureNetworkMappingSettings, bool) { 21807 return nil, false 21808} 21809 21810// AsVmmToVmmNetworkMappingSettings is the BasicNetworkMappingFabricSpecificSettings implementation for VmmToVmmNetworkMappingSettings. 21811func (vtvnms VmmToVmmNetworkMappingSettings) AsVmmToVmmNetworkMappingSettings() (*VmmToVmmNetworkMappingSettings, bool) { 21812 return &vtvnms, true 21813} 21814 21815// AsNetworkMappingFabricSpecificSettings is the BasicNetworkMappingFabricSpecificSettings implementation for VmmToVmmNetworkMappingSettings. 21816func (vtvnms VmmToVmmNetworkMappingSettings) AsNetworkMappingFabricSpecificSettings() (*NetworkMappingFabricSpecificSettings, bool) { 21817 return nil, false 21818} 21819 21820// AsBasicNetworkMappingFabricSpecificSettings is the BasicNetworkMappingFabricSpecificSettings implementation for VmmToVmmNetworkMappingSettings. 21821func (vtvnms VmmToVmmNetworkMappingSettings) AsBasicNetworkMappingFabricSpecificSettings() (BasicNetworkMappingFabricSpecificSettings, bool) { 21822 return &vtvnms, true 21823} 21824 21825// VmmToVmmUpdateNetworkMappingInput update network mappings input properties/behavior specific to vmm to 21826// vmm. 21827type VmmToVmmUpdateNetworkMappingInput struct { 21828 // InstanceType - Possible values include: 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeFabricSpecificUpdateNetworkMappingInput', 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeAzureToAzure', 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToAzure', 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToVmm' 21829 InstanceType InstanceTypeBasicFabricSpecificUpdateNetworkMappingInput `json:"instanceType,omitempty"` 21830} 21831 21832// MarshalJSON is the custom marshaler for VmmToVmmUpdateNetworkMappingInput. 21833func (vtvunmi VmmToVmmUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { 21834 vtvunmi.InstanceType = InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToVmm 21835 objectMap := make(map[string]interface{}) 21836 if vtvunmi.InstanceType != "" { 21837 objectMap["instanceType"] = vtvunmi.InstanceType 21838 } 21839 return json.Marshal(objectMap) 21840} 21841 21842// AsAzureToAzureUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for VmmToVmmUpdateNetworkMappingInput. 21843func (vtvunmi VmmToVmmUpdateNetworkMappingInput) AsAzureToAzureUpdateNetworkMappingInput() (*AzureToAzureUpdateNetworkMappingInput, bool) { 21844 return nil, false 21845} 21846 21847// AsVmmToAzureUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for VmmToVmmUpdateNetworkMappingInput. 21848func (vtvunmi VmmToVmmUpdateNetworkMappingInput) AsVmmToAzureUpdateNetworkMappingInput() (*VmmToAzureUpdateNetworkMappingInput, bool) { 21849 return nil, false 21850} 21851 21852// AsVmmToVmmUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for VmmToVmmUpdateNetworkMappingInput. 21853func (vtvunmi VmmToVmmUpdateNetworkMappingInput) AsVmmToVmmUpdateNetworkMappingInput() (*VmmToVmmUpdateNetworkMappingInput, bool) { 21854 return &vtvunmi, true 21855} 21856 21857// AsFabricSpecificUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for VmmToVmmUpdateNetworkMappingInput. 21858func (vtvunmi VmmToVmmUpdateNetworkMappingInput) AsFabricSpecificUpdateNetworkMappingInput() (*FabricSpecificUpdateNetworkMappingInput, bool) { 21859 return nil, false 21860} 21861 21862// AsBasicFabricSpecificUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for VmmToVmmUpdateNetworkMappingInput. 21863func (vtvunmi VmmToVmmUpdateNetworkMappingInput) AsBasicFabricSpecificUpdateNetworkMappingInput() (BasicFabricSpecificUpdateNetworkMappingInput, bool) { 21864 return &vtvunmi, true 21865} 21866 21867// VmmVirtualMachineDetails VMM fabric provider specific VM settings. 21868type VmmVirtualMachineDetails struct { 21869 // SourceItemID - The source id of the object. 21870 SourceItemID *string `json:"sourceItemId,omitempty"` 21871 // Generation - The id of the object in fabric. 21872 Generation *string `json:"generation,omitempty"` 21873 // OsDetails - The Last replication time. 21874 OsDetails *OSDetails `json:"osDetails,omitempty"` 21875 // DiskDetails - The Last successful failover time. 21876 DiskDetails *[]DiskDetails `json:"diskDetails,omitempty"` 21877 // HasPhysicalDisk - A value indicating whether the VM has a physical disk attached. String value of {SrsDataContract.PresenceStatus} enum. Possible values include: 'Unknown', 'Present', 'NotPresent' 21878 HasPhysicalDisk PresenceStatus `json:"hasPhysicalDisk,omitempty"` 21879 // HasFibreChannelAdapter - A value indicating whether the VM has a fibre channel adapter attached. String value of {SrsDataContract.PresenceStatus} enum. Possible values include: 'Unknown', 'Present', 'NotPresent' 21880 HasFibreChannelAdapter PresenceStatus `json:"hasFibreChannelAdapter,omitempty"` 21881 // HasSharedVhd - A value indicating whether the VM has a shared VHD attached. String value of {SrsDataContract.PresenceStatus} enum. Possible values include: 'Unknown', 'Present', 'NotPresent' 21882 HasSharedVhd PresenceStatus `json:"hasSharedVhd,omitempty"` 21883 // InstanceType - Possible values include: 'InstanceTypeConfigurationSettings', 'InstanceTypeHyperVVirtualMachine', 'InstanceTypeReplicationGroupDetails', 'InstanceTypeVmmVirtualMachine', 'InstanceTypeVMwareVirtualMachine' 21884 InstanceType InstanceTypeBasicConfigurationSettings `json:"instanceType,omitempty"` 21885} 21886 21887// MarshalJSON is the custom marshaler for VmmVirtualMachineDetails. 21888func (vvmd VmmVirtualMachineDetails) MarshalJSON() ([]byte, error) { 21889 vvmd.InstanceType = InstanceTypeVmmVirtualMachine 21890 objectMap := make(map[string]interface{}) 21891 if vvmd.SourceItemID != nil { 21892 objectMap["sourceItemId"] = vvmd.SourceItemID 21893 } 21894 if vvmd.Generation != nil { 21895 objectMap["generation"] = vvmd.Generation 21896 } 21897 if vvmd.OsDetails != nil { 21898 objectMap["osDetails"] = vvmd.OsDetails 21899 } 21900 if vvmd.DiskDetails != nil { 21901 objectMap["diskDetails"] = vvmd.DiskDetails 21902 } 21903 if vvmd.HasPhysicalDisk != "" { 21904 objectMap["hasPhysicalDisk"] = vvmd.HasPhysicalDisk 21905 } 21906 if vvmd.HasFibreChannelAdapter != "" { 21907 objectMap["hasFibreChannelAdapter"] = vvmd.HasFibreChannelAdapter 21908 } 21909 if vvmd.HasSharedVhd != "" { 21910 objectMap["hasSharedVhd"] = vvmd.HasSharedVhd 21911 } 21912 if vvmd.InstanceType != "" { 21913 objectMap["instanceType"] = vvmd.InstanceType 21914 } 21915 return json.Marshal(objectMap) 21916} 21917 21918// AsHyperVVirtualMachineDetails is the BasicConfigurationSettings implementation for VmmVirtualMachineDetails. 21919func (vvmd VmmVirtualMachineDetails) AsHyperVVirtualMachineDetails() (*HyperVVirtualMachineDetails, bool) { 21920 return nil, false 21921} 21922 21923// AsReplicationGroupDetails is the BasicConfigurationSettings implementation for VmmVirtualMachineDetails. 21924func (vvmd VmmVirtualMachineDetails) AsReplicationGroupDetails() (*ReplicationGroupDetails, bool) { 21925 return nil, false 21926} 21927 21928// AsVmmVirtualMachineDetails is the BasicConfigurationSettings implementation for VmmVirtualMachineDetails. 21929func (vvmd VmmVirtualMachineDetails) AsVmmVirtualMachineDetails() (*VmmVirtualMachineDetails, bool) { 21930 return &vvmd, true 21931} 21932 21933// AsVMwareVirtualMachineDetails is the BasicConfigurationSettings implementation for VmmVirtualMachineDetails. 21934func (vvmd VmmVirtualMachineDetails) AsVMwareVirtualMachineDetails() (*VMwareVirtualMachineDetails, bool) { 21935 return nil, false 21936} 21937 21938// AsConfigurationSettings is the BasicConfigurationSettings implementation for VmmVirtualMachineDetails. 21939func (vvmd VmmVirtualMachineDetails) AsConfigurationSettings() (*ConfigurationSettings, bool) { 21940 return nil, false 21941} 21942 21943// AsBasicConfigurationSettings is the BasicConfigurationSettings implementation for VmmVirtualMachineDetails. 21944func (vvmd VmmVirtualMachineDetails) AsBasicConfigurationSettings() (BasicConfigurationSettings, bool) { 21945 return &vvmd, true 21946} 21947 21948// VMNicDetails hyper V VM network details. 21949type VMNicDetails struct { 21950 // NicID - The nic Id. 21951 NicID *string `json:"nicId,omitempty"` 21952 // ReplicaNicID - The replica nic Id. 21953 ReplicaNicID *string `json:"replicaNicId,omitempty"` 21954 // SourceNicArmID - The source nic ARM Id. 21955 SourceNicArmID *string `json:"sourceNicArmId,omitempty"` 21956 // VMSubnetName - VM subnet name. 21957 VMSubnetName *string `json:"vMSubnetName,omitempty"` 21958 // VMNetworkName - VM network name. 21959 VMNetworkName *string `json:"vMNetworkName,omitempty"` 21960 // RecoveryVMNetworkID - Recovery VM network Id. 21961 RecoveryVMNetworkID *string `json:"recoveryVMNetworkId,omitempty"` 21962 // RecoveryVMSubnetName - Recovery VM subnet name. 21963 RecoveryVMSubnetName *string `json:"recoveryVMSubnetName,omitempty"` 21964 // IPAddressType - Ip address type. 21965 IPAddressType *string `json:"ipAddressType,omitempty"` 21966 // PrimaryNicStaticIPAddress - Primary nic static IP address. 21967 PrimaryNicStaticIPAddress *string `json:"primaryNicStaticIPAddress,omitempty"` 21968 // ReplicaNicStaticIPAddress - Replica nic static IP address. 21969 ReplicaNicStaticIPAddress *string `json:"replicaNicStaticIPAddress,omitempty"` 21970 // SelectionType - Selection type for failover. 21971 SelectionType *string `json:"selectionType,omitempty"` 21972 // RecoveryNicIPAddressType - IP allocation type for recovery VM. 21973 RecoveryNicIPAddressType *string `json:"recoveryNicIpAddressType,omitempty"` 21974 // EnableAcceleratedNetworkingOnRecovery - A value indicating whether the NIC has accelerated networking enabled. 21975 EnableAcceleratedNetworkingOnRecovery *bool `json:"enableAcceleratedNetworkingOnRecovery,omitempty"` 21976} 21977 21978// VMNicInputDetails hyper V VM network input details. 21979type VMNicInputDetails struct { 21980 // NicID - The nic Id. 21981 NicID *string `json:"nicId,omitempty"` 21982 // RecoveryVMSubnetName - Recovery VM subnet name. 21983 RecoveryVMSubnetName *string `json:"recoveryVMSubnetName,omitempty"` 21984 // ReplicaNicStaticIPAddress - Replica nic static IP address. 21985 ReplicaNicStaticIPAddress *string `json:"replicaNicStaticIPAddress,omitempty"` 21986 // SelectionType - Selection type for failover. 21987 SelectionType *string `json:"selectionType,omitempty"` 21988 // EnableAcceleratedNetworkingOnRecovery - Whether the NIC has accelerated networking enabled. 21989 EnableAcceleratedNetworkingOnRecovery *bool `json:"enableAcceleratedNetworkingOnRecovery,omitempty"` 21990} 21991 21992// VMNicUpdatesTaskDetails this class represents the vm NicUpdates task details. 21993type VMNicUpdatesTaskDetails struct { 21994 // VMID - Virtual machine Id. 21995 VMID *string `json:"vmId,omitempty"` 21996 // NicID - Nic Id. 21997 NicID *string `json:"nicId,omitempty"` 21998 // Name - Name of the Nic. 21999 Name *string `json:"name,omitempty"` 22000 // InstanceType - Possible values include: 'InstanceTypeTaskTypeDetails', 'InstanceTypeAutomationRunbookTaskDetails', 'InstanceTypeConsistencyCheckTaskDetails', 'InstanceTypeFabricReplicationGroupTaskDetails', 'InstanceTypeJobTaskDetails', 'InstanceTypeManualActionTaskDetails', 'InstanceTypeScriptActionTaskDetails', 'InstanceTypeVirtualMachineTaskDetails', 'InstanceTypeVMNicUpdatesTaskDetails' 22001 InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"` 22002} 22003 22004// MarshalJSON is the custom marshaler for VMNicUpdatesTaskDetails. 22005func (vnutd VMNicUpdatesTaskDetails) MarshalJSON() ([]byte, error) { 22006 vnutd.InstanceType = InstanceTypeVMNicUpdatesTaskDetails 22007 objectMap := make(map[string]interface{}) 22008 if vnutd.VMID != nil { 22009 objectMap["vmId"] = vnutd.VMID 22010 } 22011 if vnutd.NicID != nil { 22012 objectMap["nicId"] = vnutd.NicID 22013 } 22014 if vnutd.Name != nil { 22015 objectMap["name"] = vnutd.Name 22016 } 22017 if vnutd.InstanceType != "" { 22018 objectMap["instanceType"] = vnutd.InstanceType 22019 } 22020 return json.Marshal(objectMap) 22021} 22022 22023// AsAutomationRunbookTaskDetails is the BasicTaskTypeDetails implementation for VMNicUpdatesTaskDetails. 22024func (vnutd VMNicUpdatesTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) { 22025 return nil, false 22026} 22027 22028// AsConsistencyCheckTaskDetails is the BasicTaskTypeDetails implementation for VMNicUpdatesTaskDetails. 22029func (vnutd VMNicUpdatesTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) { 22030 return nil, false 22031} 22032 22033// AsFabricReplicationGroupTaskDetails is the BasicTaskTypeDetails implementation for VMNicUpdatesTaskDetails. 22034func (vnutd VMNicUpdatesTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) { 22035 return nil, false 22036} 22037 22038// AsJobTaskDetails is the BasicTaskTypeDetails implementation for VMNicUpdatesTaskDetails. 22039func (vnutd VMNicUpdatesTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) { 22040 return nil, false 22041} 22042 22043// AsManualActionTaskDetails is the BasicTaskTypeDetails implementation for VMNicUpdatesTaskDetails. 22044func (vnutd VMNicUpdatesTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) { 22045 return nil, false 22046} 22047 22048// AsScriptActionTaskDetails is the BasicTaskTypeDetails implementation for VMNicUpdatesTaskDetails. 22049func (vnutd VMNicUpdatesTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) { 22050 return nil, false 22051} 22052 22053// AsVirtualMachineTaskDetails is the BasicTaskTypeDetails implementation for VMNicUpdatesTaskDetails. 22054func (vnutd VMNicUpdatesTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) { 22055 return nil, false 22056} 22057 22058// AsVMNicUpdatesTaskDetails is the BasicTaskTypeDetails implementation for VMNicUpdatesTaskDetails. 22059func (vnutd VMNicUpdatesTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) { 22060 return &vnutd, true 22061} 22062 22063// AsTaskTypeDetails is the BasicTaskTypeDetails implementation for VMNicUpdatesTaskDetails. 22064func (vnutd VMNicUpdatesTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) { 22065 return nil, false 22066} 22067 22068// AsBasicTaskTypeDetails is the BasicTaskTypeDetails implementation for VMNicUpdatesTaskDetails. 22069func (vnutd VMNicUpdatesTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) { 22070 return &vnutd, true 22071} 22072 22073// VMwareCbtContainerCreationInput vMwareCbt container creation input. 22074type VMwareCbtContainerCreationInput struct { 22075 // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeReplicationProviderSpecificContainerCreationInput', 'InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeA2A', 'InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeVMwareCbt' 22076 InstanceType InstanceTypeBasicReplicationProviderSpecificContainerCreationInput `json:"instanceType,omitempty"` 22077} 22078 22079// MarshalJSON is the custom marshaler for VMwareCbtContainerCreationInput. 22080func (vmccci VMwareCbtContainerCreationInput) MarshalJSON() ([]byte, error) { 22081 vmccci.InstanceType = InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeVMwareCbt 22082 objectMap := make(map[string]interface{}) 22083 if vmccci.InstanceType != "" { 22084 objectMap["instanceType"] = vmccci.InstanceType 22085 } 22086 return json.Marshal(objectMap) 22087} 22088 22089// AsA2AContainerCreationInput is the BasicReplicationProviderSpecificContainerCreationInput implementation for VMwareCbtContainerCreationInput. 22090func (vmccci VMwareCbtContainerCreationInput) AsA2AContainerCreationInput() (*A2AContainerCreationInput, bool) { 22091 return nil, false 22092} 22093 22094// AsVMwareCbtContainerCreationInput is the BasicReplicationProviderSpecificContainerCreationInput implementation for VMwareCbtContainerCreationInput. 22095func (vmccci VMwareCbtContainerCreationInput) AsVMwareCbtContainerCreationInput() (*VMwareCbtContainerCreationInput, bool) { 22096 return &vmccci, true 22097} 22098 22099// AsReplicationProviderSpecificContainerCreationInput is the BasicReplicationProviderSpecificContainerCreationInput implementation for VMwareCbtContainerCreationInput. 22100func (vmccci VMwareCbtContainerCreationInput) AsReplicationProviderSpecificContainerCreationInput() (*ReplicationProviderSpecificContainerCreationInput, bool) { 22101 return nil, false 22102} 22103 22104// AsBasicReplicationProviderSpecificContainerCreationInput is the BasicReplicationProviderSpecificContainerCreationInput implementation for VMwareCbtContainerCreationInput. 22105func (vmccci VMwareCbtContainerCreationInput) AsBasicReplicationProviderSpecificContainerCreationInput() (BasicReplicationProviderSpecificContainerCreationInput, bool) { 22106 return &vmccci, true 22107} 22108 22109// VMwareCbtContainerMappingInput vMwareCbt container mapping input. 22110type VMwareCbtContainerMappingInput struct { 22111 // KeyVaultID - The target key vault ARM Id. 22112 KeyVaultID *string `json:"keyVaultId,omitempty"` 22113 // KeyVaultURI - The target key vault URL. 22114 KeyVaultURI *string `json:"keyVaultUri,omitempty"` 22115 // StorageAccountID - The storage account ARM Id. 22116 StorageAccountID *string `json:"storageAccountId,omitempty"` 22117 // StorageAccountSasSecretName - The secret name of the storage account. 22118 StorageAccountSasSecretName *string `json:"storageAccountSasSecretName,omitempty"` 22119 // ServiceBusConnectionStringSecretName - The secret name of the service bus connection string. 22120 ServiceBusConnectionStringSecretName *string `json:"serviceBusConnectionStringSecretName,omitempty"` 22121 // TargetLocation - The target location. 22122 TargetLocation *string `json:"targetLocation,omitempty"` 22123 // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeReplicationProviderSpecificContainerMappingInput', 'InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeA2A', 'InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeVMwareCbt' 22124 InstanceType InstanceTypeBasicReplicationProviderSpecificContainerMappingInput `json:"instanceType,omitempty"` 22125} 22126 22127// MarshalJSON is the custom marshaler for VMwareCbtContainerMappingInput. 22128func (vmccmi VMwareCbtContainerMappingInput) MarshalJSON() ([]byte, error) { 22129 vmccmi.InstanceType = InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeVMwareCbt 22130 objectMap := make(map[string]interface{}) 22131 if vmccmi.KeyVaultID != nil { 22132 objectMap["keyVaultId"] = vmccmi.KeyVaultID 22133 } 22134 if vmccmi.KeyVaultURI != nil { 22135 objectMap["keyVaultUri"] = vmccmi.KeyVaultURI 22136 } 22137 if vmccmi.StorageAccountID != nil { 22138 objectMap["storageAccountId"] = vmccmi.StorageAccountID 22139 } 22140 if vmccmi.StorageAccountSasSecretName != nil { 22141 objectMap["storageAccountSasSecretName"] = vmccmi.StorageAccountSasSecretName 22142 } 22143 if vmccmi.ServiceBusConnectionStringSecretName != nil { 22144 objectMap["serviceBusConnectionStringSecretName"] = vmccmi.ServiceBusConnectionStringSecretName 22145 } 22146 if vmccmi.TargetLocation != nil { 22147 objectMap["targetLocation"] = vmccmi.TargetLocation 22148 } 22149 if vmccmi.InstanceType != "" { 22150 objectMap["instanceType"] = vmccmi.InstanceType 22151 } 22152 return json.Marshal(objectMap) 22153} 22154 22155// AsA2AContainerMappingInput is the BasicReplicationProviderSpecificContainerMappingInput implementation for VMwareCbtContainerMappingInput. 22156func (vmccmi VMwareCbtContainerMappingInput) AsA2AContainerMappingInput() (*A2AContainerMappingInput, bool) { 22157 return nil, false 22158} 22159 22160// AsVMwareCbtContainerMappingInput is the BasicReplicationProviderSpecificContainerMappingInput implementation for VMwareCbtContainerMappingInput. 22161func (vmccmi VMwareCbtContainerMappingInput) AsVMwareCbtContainerMappingInput() (*VMwareCbtContainerMappingInput, bool) { 22162 return &vmccmi, true 22163} 22164 22165// AsReplicationProviderSpecificContainerMappingInput is the BasicReplicationProviderSpecificContainerMappingInput implementation for VMwareCbtContainerMappingInput. 22166func (vmccmi VMwareCbtContainerMappingInput) AsReplicationProviderSpecificContainerMappingInput() (*ReplicationProviderSpecificContainerMappingInput, bool) { 22167 return nil, false 22168} 22169 22170// AsBasicReplicationProviderSpecificContainerMappingInput is the BasicReplicationProviderSpecificContainerMappingInput implementation for VMwareCbtContainerMappingInput. 22171func (vmccmi VMwareCbtContainerMappingInput) AsBasicReplicationProviderSpecificContainerMappingInput() (BasicReplicationProviderSpecificContainerMappingInput, bool) { 22172 return &vmccmi, true 22173} 22174 22175// VMwareCbtDiskInput vMwareCbt disk input. 22176type VMwareCbtDiskInput struct { 22177 // DiskID - The disk Id. 22178 DiskID *string `json:"diskId,omitempty"` 22179 // IsOSDisk - A value indicating whether the disk is the OS disk. 22180 IsOSDisk *string `json:"isOSDisk,omitempty"` 22181 // LogStorageAccountID - The log storage account ARM Id. 22182 LogStorageAccountID *string `json:"logStorageAccountId,omitempty"` 22183 // LogStorageAccountSasSecretName - The key vault secret name of the log storage account. 22184 LogStorageAccountSasSecretName *string `json:"logStorageAccountSasSecretName,omitempty"` 22185 // DiskType - The disk type. Possible values include: 'StandardLRS', 'PremiumLRS', 'StandardSSDLRS' 22186 DiskType DiskAccountType `json:"diskType,omitempty"` 22187 // DiskEncryptionSetID - The DiskEncryptionSet ARM Id. 22188 DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"` 22189} 22190 22191// VMwareCbtEnableMigrationInput vMwareCbt specific enable migration input. 22192type VMwareCbtEnableMigrationInput struct { 22193 // VmwareMachineID - The ARM Id of the VM discovered in VMware. 22194 VmwareMachineID *string `json:"vmwareMachineId,omitempty"` 22195 // DisksToInclude - The disks to include list. 22196 DisksToInclude *[]VMwareCbtDiskInput `json:"disksToInclude,omitempty"` 22197 // LicenseType - License type. Possible values include: 'LicenseTypeNotSpecified', 'LicenseTypeNoLicenseType', 'LicenseTypeWindowsServer' 22198 LicenseType LicenseType `json:"licenseType,omitempty"` 22199 // DataMoverRunAsAccountID - The data mover RunAs account Id. 22200 DataMoverRunAsAccountID *string `json:"dataMoverRunAsAccountId,omitempty"` 22201 // SnapshotRunAsAccountID - The snapshot RunAs account Id. 22202 SnapshotRunAsAccountID *string `json:"snapshotRunAsAccountId,omitempty"` 22203 // TargetVMName - The target VM name. 22204 TargetVMName *string `json:"targetVmName,omitempty"` 22205 // TargetVMSize - The target VM size. 22206 TargetVMSize *string `json:"targetVmSize,omitempty"` 22207 // TargetResourceGroupID - The target resource group ARM Id. 22208 TargetResourceGroupID *string `json:"targetResourceGroupId,omitempty"` 22209 // TargetNetworkID - The target network ARM Id. 22210 TargetNetworkID *string `json:"targetNetworkId,omitempty"` 22211 // TargetSubnetName - The target subnet name. 22212 TargetSubnetName *string `json:"targetSubnetName,omitempty"` 22213 // TargetAvailabilitySetID - The target availability set ARM Id. 22214 TargetAvailabilitySetID *string `json:"targetAvailabilitySetId,omitempty"` 22215 // TargetAvailabilityZone - The target availability zone. 22216 TargetAvailabilityZone *string `json:"targetAvailabilityZone,omitempty"` 22217 // TargetBootDiagnosticsStorageAccountID - The target boot diagnostics storage account ARM Id. 22218 TargetBootDiagnosticsStorageAccountID *string `json:"targetBootDiagnosticsStorageAccountId,omitempty"` 22219 // PerformAutoResync - A value indicating whether auto resync is to be done. 22220 PerformAutoResync *string `json:"performAutoResync,omitempty"` 22221 // InstanceType - Possible values include: 'InstanceTypeEnableMigrationProviderSpecificInput', 'InstanceTypeVMwareCbt' 22222 InstanceType InstanceTypeBasicEnableMigrationProviderSpecificInput `json:"instanceType,omitempty"` 22223} 22224 22225// MarshalJSON is the custom marshaler for VMwareCbtEnableMigrationInput. 22226func (vmcemi VMwareCbtEnableMigrationInput) MarshalJSON() ([]byte, error) { 22227 vmcemi.InstanceType = InstanceTypeVMwareCbt 22228 objectMap := make(map[string]interface{}) 22229 if vmcemi.VmwareMachineID != nil { 22230 objectMap["vmwareMachineId"] = vmcemi.VmwareMachineID 22231 } 22232 if vmcemi.DisksToInclude != nil { 22233 objectMap["disksToInclude"] = vmcemi.DisksToInclude 22234 } 22235 if vmcemi.LicenseType != "" { 22236 objectMap["licenseType"] = vmcemi.LicenseType 22237 } 22238 if vmcemi.DataMoverRunAsAccountID != nil { 22239 objectMap["dataMoverRunAsAccountId"] = vmcemi.DataMoverRunAsAccountID 22240 } 22241 if vmcemi.SnapshotRunAsAccountID != nil { 22242 objectMap["snapshotRunAsAccountId"] = vmcemi.SnapshotRunAsAccountID 22243 } 22244 if vmcemi.TargetVMName != nil { 22245 objectMap["targetVmName"] = vmcemi.TargetVMName 22246 } 22247 if vmcemi.TargetVMSize != nil { 22248 objectMap["targetVmSize"] = vmcemi.TargetVMSize 22249 } 22250 if vmcemi.TargetResourceGroupID != nil { 22251 objectMap["targetResourceGroupId"] = vmcemi.TargetResourceGroupID 22252 } 22253 if vmcemi.TargetNetworkID != nil { 22254 objectMap["targetNetworkId"] = vmcemi.TargetNetworkID 22255 } 22256 if vmcemi.TargetSubnetName != nil { 22257 objectMap["targetSubnetName"] = vmcemi.TargetSubnetName 22258 } 22259 if vmcemi.TargetAvailabilitySetID != nil { 22260 objectMap["targetAvailabilitySetId"] = vmcemi.TargetAvailabilitySetID 22261 } 22262 if vmcemi.TargetAvailabilityZone != nil { 22263 objectMap["targetAvailabilityZone"] = vmcemi.TargetAvailabilityZone 22264 } 22265 if vmcemi.TargetBootDiagnosticsStorageAccountID != nil { 22266 objectMap["targetBootDiagnosticsStorageAccountId"] = vmcemi.TargetBootDiagnosticsStorageAccountID 22267 } 22268 if vmcemi.PerformAutoResync != nil { 22269 objectMap["performAutoResync"] = vmcemi.PerformAutoResync 22270 } 22271 if vmcemi.InstanceType != "" { 22272 objectMap["instanceType"] = vmcemi.InstanceType 22273 } 22274 return json.Marshal(objectMap) 22275} 22276 22277// AsVMwareCbtEnableMigrationInput is the BasicEnableMigrationProviderSpecificInput implementation for VMwareCbtEnableMigrationInput. 22278func (vmcemi VMwareCbtEnableMigrationInput) AsVMwareCbtEnableMigrationInput() (*VMwareCbtEnableMigrationInput, bool) { 22279 return &vmcemi, true 22280} 22281 22282// AsEnableMigrationProviderSpecificInput is the BasicEnableMigrationProviderSpecificInput implementation for VMwareCbtEnableMigrationInput. 22283func (vmcemi VMwareCbtEnableMigrationInput) AsEnableMigrationProviderSpecificInput() (*EnableMigrationProviderSpecificInput, bool) { 22284 return nil, false 22285} 22286 22287// AsBasicEnableMigrationProviderSpecificInput is the BasicEnableMigrationProviderSpecificInput implementation for VMwareCbtEnableMigrationInput. 22288func (vmcemi VMwareCbtEnableMigrationInput) AsBasicEnableMigrationProviderSpecificInput() (BasicEnableMigrationProviderSpecificInput, bool) { 22289 return &vmcemi, true 22290} 22291 22292// VMwareCbtEventDetails event details for VMwareCbt provider. 22293type VMwareCbtEventDetails struct { 22294 // MigrationItemName - READ-ONLY; The migration item name. 22295 MigrationItemName *string `json:"migrationItemName,omitempty"` 22296 // InstanceType - Possible values include: 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeEventProviderSpecificDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaBaseEventDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeVMwareCbt' 22297 InstanceType InstanceTypeBasicEventProviderSpecificDetails `json:"instanceType,omitempty"` 22298} 22299 22300// MarshalJSON is the custom marshaler for VMwareCbtEventDetails. 22301func (vmced VMwareCbtEventDetails) MarshalJSON() ([]byte, error) { 22302 vmced.InstanceType = InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeVMwareCbt 22303 objectMap := make(map[string]interface{}) 22304 if vmced.InstanceType != "" { 22305 objectMap["instanceType"] = vmced.InstanceType 22306 } 22307 return json.Marshal(objectMap) 22308} 22309 22310// AsA2AEventDetails is the BasicEventProviderSpecificDetails implementation for VMwareCbtEventDetails. 22311func (vmced VMwareCbtEventDetails) AsA2AEventDetails() (*A2AEventDetails, bool) { 22312 return nil, false 22313} 22314 22315// AsHyperVReplica2012EventDetails is the BasicEventProviderSpecificDetails implementation for VMwareCbtEventDetails. 22316func (vmced VMwareCbtEventDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) { 22317 return nil, false 22318} 22319 22320// AsHyperVReplica2012R2EventDetails is the BasicEventProviderSpecificDetails implementation for VMwareCbtEventDetails. 22321func (vmced VMwareCbtEventDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) { 22322 return nil, false 22323} 22324 22325// AsHyperVReplicaAzureEventDetails is the BasicEventProviderSpecificDetails implementation for VMwareCbtEventDetails. 22326func (vmced VMwareCbtEventDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) { 22327 return nil, false 22328} 22329 22330// AsHyperVReplicaBaseEventDetails is the BasicEventProviderSpecificDetails implementation for VMwareCbtEventDetails. 22331func (vmced VMwareCbtEventDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) { 22332 return nil, false 22333} 22334 22335// AsInMageAzureV2EventDetails is the BasicEventProviderSpecificDetails implementation for VMwareCbtEventDetails. 22336func (vmced VMwareCbtEventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) { 22337 return nil, false 22338} 22339 22340// AsVMwareCbtEventDetails is the BasicEventProviderSpecificDetails implementation for VMwareCbtEventDetails. 22341func (vmced VMwareCbtEventDetails) AsVMwareCbtEventDetails() (*VMwareCbtEventDetails, bool) { 22342 return &vmced, true 22343} 22344 22345// AsEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for VMwareCbtEventDetails. 22346func (vmced VMwareCbtEventDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) { 22347 return nil, false 22348} 22349 22350// AsBasicEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for VMwareCbtEventDetails. 22351func (vmced VMwareCbtEventDetails) AsBasicEventProviderSpecificDetails() (BasicEventProviderSpecificDetails, bool) { 22352 return &vmced, true 22353} 22354 22355// VMwareCbtMigrateInput vMwareCbt specific migrate input. 22356type VMwareCbtMigrateInput struct { 22357 // PerformShutdown - A value indicating whether VM is to be shutdown. 22358 PerformShutdown *string `json:"performShutdown,omitempty"` 22359 // InstanceType - Possible values include: 'InstanceTypeBasicMigrateProviderSpecificInputInstanceTypeMigrateProviderSpecificInput', 'InstanceTypeBasicMigrateProviderSpecificInputInstanceTypeVMwareCbt' 22360 InstanceType InstanceTypeBasicMigrateProviderSpecificInput `json:"instanceType,omitempty"` 22361} 22362 22363// MarshalJSON is the custom marshaler for VMwareCbtMigrateInput. 22364func (vmcmi VMwareCbtMigrateInput) MarshalJSON() ([]byte, error) { 22365 vmcmi.InstanceType = InstanceTypeBasicMigrateProviderSpecificInputInstanceTypeVMwareCbt 22366 objectMap := make(map[string]interface{}) 22367 if vmcmi.PerformShutdown != nil { 22368 objectMap["performShutdown"] = vmcmi.PerformShutdown 22369 } 22370 if vmcmi.InstanceType != "" { 22371 objectMap["instanceType"] = vmcmi.InstanceType 22372 } 22373 return json.Marshal(objectMap) 22374} 22375 22376// AsVMwareCbtMigrateInput is the BasicMigrateProviderSpecificInput implementation for VMwareCbtMigrateInput. 22377func (vmcmi VMwareCbtMigrateInput) AsVMwareCbtMigrateInput() (*VMwareCbtMigrateInput, bool) { 22378 return &vmcmi, true 22379} 22380 22381// AsMigrateProviderSpecificInput is the BasicMigrateProviderSpecificInput implementation for VMwareCbtMigrateInput. 22382func (vmcmi VMwareCbtMigrateInput) AsMigrateProviderSpecificInput() (*MigrateProviderSpecificInput, bool) { 22383 return nil, false 22384} 22385 22386// AsBasicMigrateProviderSpecificInput is the BasicMigrateProviderSpecificInput implementation for VMwareCbtMigrateInput. 22387func (vmcmi VMwareCbtMigrateInput) AsBasicMigrateProviderSpecificInput() (BasicMigrateProviderSpecificInput, bool) { 22388 return &vmcmi, true 22389} 22390 22391// VMwareCbtMigrationDetails vMwareCbt provider specific settings. 22392type VMwareCbtMigrationDetails struct { 22393 // VmwareMachineID - READ-ONLY; The ARM Id of the VM discovered in VMware. 22394 VmwareMachineID *string `json:"vmwareMachineId,omitempty"` 22395 // OsType - READ-ONLY; The type of the OS on the VM. 22396 OsType *string `json:"osType,omitempty"` 22397 // FirmwareType - READ-ONLY; The firmware type. 22398 FirmwareType *string `json:"firmwareType,omitempty"` 22399 // TargetGeneration - READ-ONLY; The target generation. 22400 TargetGeneration *string `json:"targetGeneration,omitempty"` 22401 // LicenseType - License Type of the VM to be used. 22402 LicenseType *string `json:"licenseType,omitempty"` 22403 // DataMoverRunAsAccountID - READ-ONLY; The data mover RunAs account Id. 22404 DataMoverRunAsAccountID *string `json:"dataMoverRunAsAccountId,omitempty"` 22405 // SnapshotRunAsAccountID - READ-ONLY; The snapshot RunAs account Id. 22406 SnapshotRunAsAccountID *string `json:"snapshotRunAsAccountId,omitempty"` 22407 // TargetVMName - Target VM name. 22408 TargetVMName *string `json:"targetVmName,omitempty"` 22409 // TargetVMSize - The target VM size. 22410 TargetVMSize *string `json:"targetVmSize,omitempty"` 22411 // TargetLocation - READ-ONLY; The target location. 22412 TargetLocation *string `json:"targetLocation,omitempty"` 22413 // TargetResourceGroupID - The target resource group Id. 22414 TargetResourceGroupID *string `json:"targetResourceGroupId,omitempty"` 22415 // TargetAvailabilitySetID - The target availability set Id. 22416 TargetAvailabilitySetID *string `json:"targetAvailabilitySetId,omitempty"` 22417 // TargetAvailabilityZone - The target availability zone. 22418 TargetAvailabilityZone *string `json:"targetAvailabilityZone,omitempty"` 22419 // TargetBootDiagnosticsStorageAccountID - The target boot diagnostics storage account ARM Id. 22420 TargetBootDiagnosticsStorageAccountID *string `json:"targetBootDiagnosticsStorageAccountId,omitempty"` 22421 // ProtectedDisks - The list of protected disks. 22422 ProtectedDisks *[]VMwareCbtProtectedDiskDetails `json:"protectedDisks,omitempty"` 22423 // TargetNetworkID - The target network Id. 22424 TargetNetworkID *string `json:"targetNetworkId,omitempty"` 22425 // VMNics - The network details. 22426 VMNics *[]VMwareCbtNicDetails `json:"vmNics,omitempty"` 22427 // MigrationRecoveryPointID - READ-ONLY; The recovery point Id to which the VM was migrated. 22428 MigrationRecoveryPointID *string `json:"migrationRecoveryPointId,omitempty"` 22429 // LastRecoveryPointReceived - READ-ONLY; The last recovery point received time. 22430 LastRecoveryPointReceived *date.Time `json:"lastRecoveryPointReceived,omitempty"` 22431 // LastRecoveryPointID - READ-ONLY; The last recovery point Id. 22432 LastRecoveryPointID *string `json:"lastRecoveryPointId,omitempty"` 22433 // InitialSeedingProgressPercentage - READ-ONLY; The initial seeding progress percentage. 22434 InitialSeedingProgressPercentage *int32 `json:"initialSeedingProgressPercentage,omitempty"` 22435 // MigrationProgressPercentage - READ-ONLY; The migration progress percentage. 22436 MigrationProgressPercentage *int32 `json:"migrationProgressPercentage,omitempty"` 22437 // ResyncProgressPercentage - READ-ONLY; The resync progress percentage. 22438 ResyncProgressPercentage *int32 `json:"resyncProgressPercentage,omitempty"` 22439 // ResyncRequired - READ-ONLY; A value indicating whether resync is required. 22440 ResyncRequired *string `json:"resyncRequired,omitempty"` 22441 // ResyncState - READ-ONLY; The resync state. Possible values include: 'ResyncStateNone', 'ResyncStatePreparedForResynchronization', 'ResyncStateStartedResynchronization' 22442 ResyncState ResyncState `json:"resyncState,omitempty"` 22443 // PerformAutoResync - A value indicating whether auto resync is to be done. 22444 PerformAutoResync *string `json:"performAutoResync,omitempty"` 22445 // InstanceType - Possible values include: 'InstanceTypeBasicMigrationProviderSpecificSettingsInstanceTypeMigrationProviderSpecificSettings', 'InstanceTypeBasicMigrationProviderSpecificSettingsInstanceTypeVMwareCbt' 22446 InstanceType InstanceTypeBasicMigrationProviderSpecificSettings `json:"instanceType,omitempty"` 22447} 22448 22449// MarshalJSON is the custom marshaler for VMwareCbtMigrationDetails. 22450func (vmcmd VMwareCbtMigrationDetails) MarshalJSON() ([]byte, error) { 22451 vmcmd.InstanceType = InstanceTypeBasicMigrationProviderSpecificSettingsInstanceTypeVMwareCbt 22452 objectMap := make(map[string]interface{}) 22453 if vmcmd.LicenseType != nil { 22454 objectMap["licenseType"] = vmcmd.LicenseType 22455 } 22456 if vmcmd.TargetVMName != nil { 22457 objectMap["targetVmName"] = vmcmd.TargetVMName 22458 } 22459 if vmcmd.TargetVMSize != nil { 22460 objectMap["targetVmSize"] = vmcmd.TargetVMSize 22461 } 22462 if vmcmd.TargetResourceGroupID != nil { 22463 objectMap["targetResourceGroupId"] = vmcmd.TargetResourceGroupID 22464 } 22465 if vmcmd.TargetAvailabilitySetID != nil { 22466 objectMap["targetAvailabilitySetId"] = vmcmd.TargetAvailabilitySetID 22467 } 22468 if vmcmd.TargetAvailabilityZone != nil { 22469 objectMap["targetAvailabilityZone"] = vmcmd.TargetAvailabilityZone 22470 } 22471 if vmcmd.TargetBootDiagnosticsStorageAccountID != nil { 22472 objectMap["targetBootDiagnosticsStorageAccountId"] = vmcmd.TargetBootDiagnosticsStorageAccountID 22473 } 22474 if vmcmd.ProtectedDisks != nil { 22475 objectMap["protectedDisks"] = vmcmd.ProtectedDisks 22476 } 22477 if vmcmd.TargetNetworkID != nil { 22478 objectMap["targetNetworkId"] = vmcmd.TargetNetworkID 22479 } 22480 if vmcmd.VMNics != nil { 22481 objectMap["vmNics"] = vmcmd.VMNics 22482 } 22483 if vmcmd.PerformAutoResync != nil { 22484 objectMap["performAutoResync"] = vmcmd.PerformAutoResync 22485 } 22486 if vmcmd.InstanceType != "" { 22487 objectMap["instanceType"] = vmcmd.InstanceType 22488 } 22489 return json.Marshal(objectMap) 22490} 22491 22492// AsVMwareCbtMigrationDetails is the BasicMigrationProviderSpecificSettings implementation for VMwareCbtMigrationDetails. 22493func (vmcmd VMwareCbtMigrationDetails) AsVMwareCbtMigrationDetails() (*VMwareCbtMigrationDetails, bool) { 22494 return &vmcmd, true 22495} 22496 22497// AsMigrationProviderSpecificSettings is the BasicMigrationProviderSpecificSettings implementation for VMwareCbtMigrationDetails. 22498func (vmcmd VMwareCbtMigrationDetails) AsMigrationProviderSpecificSettings() (*MigrationProviderSpecificSettings, bool) { 22499 return nil, false 22500} 22501 22502// AsBasicMigrationProviderSpecificSettings is the BasicMigrationProviderSpecificSettings implementation for VMwareCbtMigrationDetails. 22503func (vmcmd VMwareCbtMigrationDetails) AsBasicMigrationProviderSpecificSettings() (BasicMigrationProviderSpecificSettings, bool) { 22504 return &vmcmd, true 22505} 22506 22507// VMwareCbtNicDetails vMwareCbt NIC details. 22508type VMwareCbtNicDetails struct { 22509 // NicID - READ-ONLY; The NIC Id. 22510 NicID *string `json:"nicId,omitempty"` 22511 // IsPrimaryNic - A value indicating whether this is the primary NIC. 22512 IsPrimaryNic *string `json:"isPrimaryNic,omitempty"` 22513 // SourceIPAddress - READ-ONLY; The source IP address. 22514 SourceIPAddress *string `json:"sourceIPAddress,omitempty"` 22515 // SourceIPAddressType - READ-ONLY; The source IP address type. Possible values include: 'Dynamic', 'Static' 22516 SourceIPAddressType EthernetAddressType `json:"sourceIPAddressType,omitempty"` 22517 // SourceNetworkID - READ-ONLY; Source network Id. 22518 SourceNetworkID *string `json:"sourceNetworkId,omitempty"` 22519 // TargetIPAddress - The target IP address. 22520 TargetIPAddress *string `json:"targetIPAddress,omitempty"` 22521 // TargetIPAddressType - The target IP address type. Possible values include: 'Dynamic', 'Static' 22522 TargetIPAddressType EthernetAddressType `json:"targetIPAddressType,omitempty"` 22523 // TargetSubnetName - Target subnet name. 22524 TargetSubnetName *string `json:"targetSubnetName,omitempty"` 22525 // IsSelectedForMigration - A value indicating whether this NIC is selected for migration. 22526 IsSelectedForMigration *string `json:"isSelectedForMigration,omitempty"` 22527} 22528 22529// MarshalJSON is the custom marshaler for VMwareCbtNicDetails. 22530func (vmcnd VMwareCbtNicDetails) MarshalJSON() ([]byte, error) { 22531 objectMap := make(map[string]interface{}) 22532 if vmcnd.IsPrimaryNic != nil { 22533 objectMap["isPrimaryNic"] = vmcnd.IsPrimaryNic 22534 } 22535 if vmcnd.TargetIPAddress != nil { 22536 objectMap["targetIPAddress"] = vmcnd.TargetIPAddress 22537 } 22538 if vmcnd.TargetIPAddressType != "" { 22539 objectMap["targetIPAddressType"] = vmcnd.TargetIPAddressType 22540 } 22541 if vmcnd.TargetSubnetName != nil { 22542 objectMap["targetSubnetName"] = vmcnd.TargetSubnetName 22543 } 22544 if vmcnd.IsSelectedForMigration != nil { 22545 objectMap["isSelectedForMigration"] = vmcnd.IsSelectedForMigration 22546 } 22547 return json.Marshal(objectMap) 22548} 22549 22550// VMwareCbtNicInput vMwareCbt NIC input. 22551type VMwareCbtNicInput struct { 22552 // NicID - The NIC Id. 22553 NicID *string `json:"nicId,omitempty"` 22554 // IsPrimaryNic - A value indicating whether this is the primary NIC. 22555 IsPrimaryNic *string `json:"isPrimaryNic,omitempty"` 22556 // TargetSubnetName - Target subnet name. 22557 TargetSubnetName *string `json:"targetSubnetName,omitempty"` 22558 // TargetStaticIPAddress - The static IP address. 22559 TargetStaticIPAddress *string `json:"targetStaticIPAddress,omitempty"` 22560 // IsSelectedForMigration - A value indicating whether this NIC is selected for migration. 22561 IsSelectedForMigration *string `json:"isSelectedForMigration,omitempty"` 22562} 22563 22564// VMwareCbtPolicyCreationInput vMware Cbt policy creation input. 22565type VMwareCbtPolicyCreationInput struct { 22566 // RecoveryPointHistoryInMinutes - The duration in minutes until which the recovery points need to be stored. 22567 RecoveryPointHistoryInMinutes *int32 `json:"recoveryPointHistoryInMinutes,omitempty"` 22568 // CrashConsistentFrequencyInMinutes - The crash consistent snapshot frequency (in minutes). 22569 CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"` 22570 // AppConsistentFrequencyInMinutes - The app consistent snapshot frequency (in minutes). 22571 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` 22572 // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypePolicyProviderSpecificInput', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeVMwareCbt' 22573 InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"` 22574} 22575 22576// MarshalJSON is the custom marshaler for VMwareCbtPolicyCreationInput. 22577func (vmcpci VMwareCbtPolicyCreationInput) MarshalJSON() ([]byte, error) { 22578 vmcpci.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeVMwareCbt 22579 objectMap := make(map[string]interface{}) 22580 if vmcpci.RecoveryPointHistoryInMinutes != nil { 22581 objectMap["recoveryPointHistoryInMinutes"] = vmcpci.RecoveryPointHistoryInMinutes 22582 } 22583 if vmcpci.CrashConsistentFrequencyInMinutes != nil { 22584 objectMap["crashConsistentFrequencyInMinutes"] = vmcpci.CrashConsistentFrequencyInMinutes 22585 } 22586 if vmcpci.AppConsistentFrequencyInMinutes != nil { 22587 objectMap["appConsistentFrequencyInMinutes"] = vmcpci.AppConsistentFrequencyInMinutes 22588 } 22589 if vmcpci.InstanceType != "" { 22590 objectMap["instanceType"] = vmcpci.InstanceType 22591 } 22592 return json.Marshal(objectMap) 22593} 22594 22595// AsA2APolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for VMwareCbtPolicyCreationInput. 22596func (vmcpci VMwareCbtPolicyCreationInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) { 22597 return nil, false 22598} 22599 22600// AsHyperVReplicaAzurePolicyInput is the BasicPolicyProviderSpecificInput implementation for VMwareCbtPolicyCreationInput. 22601func (vmcpci VMwareCbtPolicyCreationInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) { 22602 return nil, false 22603} 22604 22605// AsHyperVReplicaBluePolicyInput is the BasicPolicyProviderSpecificInput implementation for VMwareCbtPolicyCreationInput. 22606func (vmcpci VMwareCbtPolicyCreationInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) { 22607 return nil, false 22608} 22609 22610// AsHyperVReplicaPolicyInput is the BasicPolicyProviderSpecificInput implementation for VMwareCbtPolicyCreationInput. 22611func (vmcpci VMwareCbtPolicyCreationInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) { 22612 return nil, false 22613} 22614 22615// AsInMageAzureV2PolicyInput is the BasicPolicyProviderSpecificInput implementation for VMwareCbtPolicyCreationInput. 22616func (vmcpci VMwareCbtPolicyCreationInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) { 22617 return nil, false 22618} 22619 22620// AsInMagePolicyInput is the BasicPolicyProviderSpecificInput implementation for VMwareCbtPolicyCreationInput. 22621func (vmcpci VMwareCbtPolicyCreationInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) { 22622 return nil, false 22623} 22624 22625// AsVMwareCbtPolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for VMwareCbtPolicyCreationInput. 22626func (vmcpci VMwareCbtPolicyCreationInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) { 22627 return &vmcpci, true 22628} 22629 22630// AsPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for VMwareCbtPolicyCreationInput. 22631func (vmcpci VMwareCbtPolicyCreationInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) { 22632 return nil, false 22633} 22634 22635// AsBasicPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for VMwareCbtPolicyCreationInput. 22636func (vmcpci VMwareCbtPolicyCreationInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) { 22637 return &vmcpci, true 22638} 22639 22640// VmwareCbtPolicyDetails vMware Cbt specific policy details. 22641type VmwareCbtPolicyDetails struct { 22642 // RecoveryPointHistoryInMinutes - The duration in minutes until which the recovery points need to be stored. 22643 RecoveryPointHistoryInMinutes *int32 `json:"recoveryPointHistoryInMinutes,omitempty"` 22644 // AppConsistentFrequencyInMinutes - The app consistent snapshot frequency in minutes. 22645 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` 22646 // CrashConsistentFrequencyInMinutes - The crash consistent snapshot frequency in minutes. 22647 CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"` 22648 // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypePolicyProviderSpecificDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt' 22649 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"` 22650} 22651 22652// MarshalJSON is the custom marshaler for VmwareCbtPolicyDetails. 22653func (vcpd VmwareCbtPolicyDetails) MarshalJSON() ([]byte, error) { 22654 vcpd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt 22655 objectMap := make(map[string]interface{}) 22656 if vcpd.RecoveryPointHistoryInMinutes != nil { 22657 objectMap["recoveryPointHistoryInMinutes"] = vcpd.RecoveryPointHistoryInMinutes 22658 } 22659 if vcpd.AppConsistentFrequencyInMinutes != nil { 22660 objectMap["appConsistentFrequencyInMinutes"] = vcpd.AppConsistentFrequencyInMinutes 22661 } 22662 if vcpd.CrashConsistentFrequencyInMinutes != nil { 22663 objectMap["crashConsistentFrequencyInMinutes"] = vcpd.CrashConsistentFrequencyInMinutes 22664 } 22665 if vcpd.InstanceType != "" { 22666 objectMap["instanceType"] = vcpd.InstanceType 22667 } 22668 return json.Marshal(objectMap) 22669} 22670 22671// AsA2APolicyDetails is the BasicPolicyProviderSpecificDetails implementation for VmwareCbtPolicyDetails. 22672func (vcpd VmwareCbtPolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) { 22673 return nil, false 22674} 22675 22676// AsHyperVReplicaAzurePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for VmwareCbtPolicyDetails. 22677func (vcpd VmwareCbtPolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) { 22678 return nil, false 22679} 22680 22681// AsHyperVReplicaBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for VmwareCbtPolicyDetails. 22682func (vcpd VmwareCbtPolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) { 22683 return nil, false 22684} 22685 22686// AsHyperVReplicaBluePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for VmwareCbtPolicyDetails. 22687func (vcpd VmwareCbtPolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) { 22688 return nil, false 22689} 22690 22691// AsHyperVReplicaPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for VmwareCbtPolicyDetails. 22692func (vcpd VmwareCbtPolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) { 22693 return nil, false 22694} 22695 22696// AsInMageAzureV2PolicyDetails is the BasicPolicyProviderSpecificDetails implementation for VmwareCbtPolicyDetails. 22697func (vcpd VmwareCbtPolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) { 22698 return nil, false 22699} 22700 22701// AsInMageBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for VmwareCbtPolicyDetails. 22702func (vcpd VmwareCbtPolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) { 22703 return nil, false 22704} 22705 22706// AsInMagePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for VmwareCbtPolicyDetails. 22707func (vcpd VmwareCbtPolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) { 22708 return nil, false 22709} 22710 22711// AsRcmAzureMigrationPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for VmwareCbtPolicyDetails. 22712func (vcpd VmwareCbtPolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) { 22713 return nil, false 22714} 22715 22716// AsVmwareCbtPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for VmwareCbtPolicyDetails. 22717func (vcpd VmwareCbtPolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) { 22718 return &vcpd, true 22719} 22720 22721// AsPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for VmwareCbtPolicyDetails. 22722func (vcpd VmwareCbtPolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) { 22723 return nil, false 22724} 22725 22726// AsBasicPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for VmwareCbtPolicyDetails. 22727func (vcpd VmwareCbtPolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) { 22728 return &vcpd, true 22729} 22730 22731// VMwareCbtProtectedDiskDetails vMwareCbt protected disk details. 22732type VMwareCbtProtectedDiskDetails struct { 22733 // DiskID - READ-ONLY; The disk id. 22734 DiskID *string `json:"diskId,omitempty"` 22735 // DiskName - READ-ONLY; The disk name. 22736 DiskName *string `json:"diskName,omitempty"` 22737 // DiskPath - READ-ONLY; The disk path. 22738 DiskPath *string `json:"diskPath,omitempty"` 22739 // IsOSDisk - READ-ONLY; A value indicating whether the disk is the OS disk. 22740 IsOSDisk *string `json:"isOSDisk,omitempty"` 22741 // CapacityInBytes - READ-ONLY; The disk capacity in bytes. 22742 CapacityInBytes *int64 `json:"capacityInBytes,omitempty"` 22743 // LogStorageAccountID - READ-ONLY; The log storage account ARM Id. 22744 LogStorageAccountID *string `json:"logStorageAccountId,omitempty"` 22745 // LogStorageAccountSasSecretName - READ-ONLY; The key vault secret name of the log storage account. 22746 LogStorageAccountSasSecretName *string `json:"logStorageAccountSasSecretName,omitempty"` 22747 // DiskEncryptionSetID - READ-ONLY; The DiskEncryptionSet ARM Id. 22748 DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"` 22749 // SeedManagedDiskID - READ-ONLY; The ARM Id of the seed managed disk. 22750 SeedManagedDiskID *string `json:"seedManagedDiskId,omitempty"` 22751 // TargetManagedDiskID - READ-ONLY; The ARM Id of the target managed disk. 22752 TargetManagedDiskID *string `json:"targetManagedDiskId,omitempty"` 22753 // DiskType - The disk type. Possible values include: 'StandardLRS', 'PremiumLRS', 'StandardSSDLRS' 22754 DiskType DiskAccountType `json:"diskType,omitempty"` 22755} 22756 22757// MarshalJSON is the custom marshaler for VMwareCbtProtectedDiskDetails. 22758func (vmcpdd VMwareCbtProtectedDiskDetails) MarshalJSON() ([]byte, error) { 22759 objectMap := make(map[string]interface{}) 22760 if vmcpdd.DiskType != "" { 22761 objectMap["diskType"] = vmcpdd.DiskType 22762 } 22763 return json.Marshal(objectMap) 22764} 22765 22766// VMwareCbtProtectionContainerMappingDetails vMwareCbt provider specific container mapping details. 22767type VMwareCbtProtectionContainerMappingDetails struct { 22768 // KeyVaultID - READ-ONLY; The target key vault ARM Id. 22769 KeyVaultID *string `json:"keyVaultId,omitempty"` 22770 // KeyVaultURI - READ-ONLY; The target key vault URI. 22771 KeyVaultURI *string `json:"keyVaultUri,omitempty"` 22772 // StorageAccountID - READ-ONLY; The storage account ARM Id. 22773 StorageAccountID *string `json:"storageAccountId,omitempty"` 22774 // StorageAccountSasSecretName - READ-ONLY; The secret name of the storage account. 22775 StorageAccountSasSecretName *string `json:"storageAccountSasSecretName,omitempty"` 22776 // ServiceBusConnectionStringSecretName - READ-ONLY; The secret name of the service bus connection string. 22777 ServiceBusConnectionStringSecretName *string `json:"serviceBusConnectionStringSecretName,omitempty"` 22778 // TargetLocation - READ-ONLY; The target location. 22779 TargetLocation *string `json:"targetLocation,omitempty"` 22780 // InstanceType - Possible values include: 'InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeProtectionContainerMappingProviderSpecificDetails', 'InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeVMwareCbt' 22781 InstanceType InstanceTypeBasicProtectionContainerMappingProviderSpecificDetails `json:"instanceType,omitempty"` 22782} 22783 22784// MarshalJSON is the custom marshaler for VMwareCbtProtectionContainerMappingDetails. 22785func (vmcpcmd VMwareCbtProtectionContainerMappingDetails) MarshalJSON() ([]byte, error) { 22786 vmcpcmd.InstanceType = InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeVMwareCbt 22787 objectMap := make(map[string]interface{}) 22788 if vmcpcmd.InstanceType != "" { 22789 objectMap["instanceType"] = vmcpcmd.InstanceType 22790 } 22791 return json.Marshal(objectMap) 22792} 22793 22794// AsA2AProtectionContainerMappingDetails is the BasicProtectionContainerMappingProviderSpecificDetails implementation for VMwareCbtProtectionContainerMappingDetails. 22795func (vmcpcmd VMwareCbtProtectionContainerMappingDetails) AsA2AProtectionContainerMappingDetails() (*A2AProtectionContainerMappingDetails, bool) { 22796 return nil, false 22797} 22798 22799// AsVMwareCbtProtectionContainerMappingDetails is the BasicProtectionContainerMappingProviderSpecificDetails implementation for VMwareCbtProtectionContainerMappingDetails. 22800func (vmcpcmd VMwareCbtProtectionContainerMappingDetails) AsVMwareCbtProtectionContainerMappingDetails() (*VMwareCbtProtectionContainerMappingDetails, bool) { 22801 return &vmcpcmd, true 22802} 22803 22804// AsProtectionContainerMappingProviderSpecificDetails is the BasicProtectionContainerMappingProviderSpecificDetails implementation for VMwareCbtProtectionContainerMappingDetails. 22805func (vmcpcmd VMwareCbtProtectionContainerMappingDetails) AsProtectionContainerMappingProviderSpecificDetails() (*ProtectionContainerMappingProviderSpecificDetails, bool) { 22806 return nil, false 22807} 22808 22809// AsBasicProtectionContainerMappingProviderSpecificDetails is the BasicProtectionContainerMappingProviderSpecificDetails implementation for VMwareCbtProtectionContainerMappingDetails. 22810func (vmcpcmd VMwareCbtProtectionContainerMappingDetails) AsBasicProtectionContainerMappingProviderSpecificDetails() (BasicProtectionContainerMappingProviderSpecificDetails, bool) { 22811 return &vmcpcmd, true 22812} 22813 22814// VMwareCbtResyncInput vMwareCbt specific resync input. 22815type VMwareCbtResyncInput struct { 22816 // SkipCbtReset - A value indicating whether CBT is to be reset. 22817 SkipCbtReset *string `json:"skipCbtReset,omitempty"` 22818 // InstanceType - Possible values include: 'InstanceTypeBasicResyncProviderSpecificInputInstanceTypeResyncProviderSpecificInput', 'InstanceTypeBasicResyncProviderSpecificInputInstanceTypeVMwareCbt' 22819 InstanceType InstanceTypeBasicResyncProviderSpecificInput `json:"instanceType,omitempty"` 22820} 22821 22822// MarshalJSON is the custom marshaler for VMwareCbtResyncInput. 22823func (vmcri VMwareCbtResyncInput) MarshalJSON() ([]byte, error) { 22824 vmcri.InstanceType = InstanceTypeBasicResyncProviderSpecificInputInstanceTypeVMwareCbt 22825 objectMap := make(map[string]interface{}) 22826 if vmcri.SkipCbtReset != nil { 22827 objectMap["skipCbtReset"] = vmcri.SkipCbtReset 22828 } 22829 if vmcri.InstanceType != "" { 22830 objectMap["instanceType"] = vmcri.InstanceType 22831 } 22832 return json.Marshal(objectMap) 22833} 22834 22835// AsVMwareCbtResyncInput is the BasicResyncProviderSpecificInput implementation for VMwareCbtResyncInput. 22836func (vmcri VMwareCbtResyncInput) AsVMwareCbtResyncInput() (*VMwareCbtResyncInput, bool) { 22837 return &vmcri, true 22838} 22839 22840// AsResyncProviderSpecificInput is the BasicResyncProviderSpecificInput implementation for VMwareCbtResyncInput. 22841func (vmcri VMwareCbtResyncInput) AsResyncProviderSpecificInput() (*ResyncProviderSpecificInput, bool) { 22842 return nil, false 22843} 22844 22845// AsBasicResyncProviderSpecificInput is the BasicResyncProviderSpecificInput implementation for VMwareCbtResyncInput. 22846func (vmcri VMwareCbtResyncInput) AsBasicResyncProviderSpecificInput() (BasicResyncProviderSpecificInput, bool) { 22847 return &vmcri, true 22848} 22849 22850// VMwareCbtTestMigrateInput vMwareCbt specific test migrate input. 22851type VMwareCbtTestMigrateInput struct { 22852 // RecoveryPointID - The recovery point Id. 22853 RecoveryPointID *string `json:"recoveryPointId,omitempty"` 22854 // NetworkID - The test network Id. 22855 NetworkID *string `json:"networkId,omitempty"` 22856 // InstanceType - Possible values include: 'InstanceTypeBasicTestMigrateProviderSpecificInputInstanceTypeTestMigrateProviderSpecificInput', 'InstanceTypeBasicTestMigrateProviderSpecificInputInstanceTypeVMwareCbt' 22857 InstanceType InstanceTypeBasicTestMigrateProviderSpecificInput `json:"instanceType,omitempty"` 22858} 22859 22860// MarshalJSON is the custom marshaler for VMwareCbtTestMigrateInput. 22861func (vmctmi VMwareCbtTestMigrateInput) MarshalJSON() ([]byte, error) { 22862 vmctmi.InstanceType = InstanceTypeBasicTestMigrateProviderSpecificInputInstanceTypeVMwareCbt 22863 objectMap := make(map[string]interface{}) 22864 if vmctmi.RecoveryPointID != nil { 22865 objectMap["recoveryPointId"] = vmctmi.RecoveryPointID 22866 } 22867 if vmctmi.NetworkID != nil { 22868 objectMap["networkId"] = vmctmi.NetworkID 22869 } 22870 if vmctmi.InstanceType != "" { 22871 objectMap["instanceType"] = vmctmi.InstanceType 22872 } 22873 return json.Marshal(objectMap) 22874} 22875 22876// AsVMwareCbtTestMigrateInput is the BasicTestMigrateProviderSpecificInput implementation for VMwareCbtTestMigrateInput. 22877func (vmctmi VMwareCbtTestMigrateInput) AsVMwareCbtTestMigrateInput() (*VMwareCbtTestMigrateInput, bool) { 22878 return &vmctmi, true 22879} 22880 22881// AsTestMigrateProviderSpecificInput is the BasicTestMigrateProviderSpecificInput implementation for VMwareCbtTestMigrateInput. 22882func (vmctmi VMwareCbtTestMigrateInput) AsTestMigrateProviderSpecificInput() (*TestMigrateProviderSpecificInput, bool) { 22883 return nil, false 22884} 22885 22886// AsBasicTestMigrateProviderSpecificInput is the BasicTestMigrateProviderSpecificInput implementation for VMwareCbtTestMigrateInput. 22887func (vmctmi VMwareCbtTestMigrateInput) AsBasicTestMigrateProviderSpecificInput() (BasicTestMigrateProviderSpecificInput, bool) { 22888 return &vmctmi, true 22889} 22890 22891// VMwareCbtUpdateMigrationItemInput vMwareCbt specific update migration item input. 22892type VMwareCbtUpdateMigrationItemInput struct { 22893 // TargetVMName - The target VM name. 22894 TargetVMName *string `json:"targetVmName,omitempty"` 22895 // TargetVMSize - The target VM size. 22896 TargetVMSize *string `json:"targetVmSize,omitempty"` 22897 // TargetResourceGroupID - The target resource group ARM Id. 22898 TargetResourceGroupID *string `json:"targetResourceGroupId,omitempty"` 22899 // TargetAvailabilitySetID - The target availability set ARM Id. 22900 TargetAvailabilitySetID *string `json:"targetAvailabilitySetId,omitempty"` 22901 // TargetAvailabilityZone - The target availability zone. 22902 TargetAvailabilityZone *string `json:"targetAvailabilityZone,omitempty"` 22903 // TargetBootDiagnosticsStorageAccountID - The target boot diagnostics storage account ARM Id. 22904 TargetBootDiagnosticsStorageAccountID *string `json:"targetBootDiagnosticsStorageAccountId,omitempty"` 22905 // TargetNetworkID - The target network ARM Id. 22906 TargetNetworkID *string `json:"targetNetworkId,omitempty"` 22907 // VMNics - The list of NIC details. 22908 VMNics *[]VMwareCbtNicInput `json:"vmNics,omitempty"` 22909 // LicenseType - The license type. Possible values include: 'LicenseTypeNotSpecified', 'LicenseTypeNoLicenseType', 'LicenseTypeWindowsServer' 22910 LicenseType LicenseType `json:"licenseType,omitempty"` 22911 // PerformAutoResync - A value indicating whether auto resync is to be done. 22912 PerformAutoResync *string `json:"performAutoResync,omitempty"` 22913 // InstanceType - Possible values include: 'InstanceTypeBasicUpdateMigrationItemProviderSpecificInputInstanceTypeUpdateMigrationItemProviderSpecificInput', 'InstanceTypeBasicUpdateMigrationItemProviderSpecificInputInstanceTypeVMwareCbt' 22914 InstanceType InstanceTypeBasicUpdateMigrationItemProviderSpecificInput `json:"instanceType,omitempty"` 22915} 22916 22917// MarshalJSON is the custom marshaler for VMwareCbtUpdateMigrationItemInput. 22918func (vmcumii VMwareCbtUpdateMigrationItemInput) MarshalJSON() ([]byte, error) { 22919 vmcumii.InstanceType = InstanceTypeBasicUpdateMigrationItemProviderSpecificInputInstanceTypeVMwareCbt 22920 objectMap := make(map[string]interface{}) 22921 if vmcumii.TargetVMName != nil { 22922 objectMap["targetVmName"] = vmcumii.TargetVMName 22923 } 22924 if vmcumii.TargetVMSize != nil { 22925 objectMap["targetVmSize"] = vmcumii.TargetVMSize 22926 } 22927 if vmcumii.TargetResourceGroupID != nil { 22928 objectMap["targetResourceGroupId"] = vmcumii.TargetResourceGroupID 22929 } 22930 if vmcumii.TargetAvailabilitySetID != nil { 22931 objectMap["targetAvailabilitySetId"] = vmcumii.TargetAvailabilitySetID 22932 } 22933 if vmcumii.TargetAvailabilityZone != nil { 22934 objectMap["targetAvailabilityZone"] = vmcumii.TargetAvailabilityZone 22935 } 22936 if vmcumii.TargetBootDiagnosticsStorageAccountID != nil { 22937 objectMap["targetBootDiagnosticsStorageAccountId"] = vmcumii.TargetBootDiagnosticsStorageAccountID 22938 } 22939 if vmcumii.TargetNetworkID != nil { 22940 objectMap["targetNetworkId"] = vmcumii.TargetNetworkID 22941 } 22942 if vmcumii.VMNics != nil { 22943 objectMap["vmNics"] = vmcumii.VMNics 22944 } 22945 if vmcumii.LicenseType != "" { 22946 objectMap["licenseType"] = vmcumii.LicenseType 22947 } 22948 if vmcumii.PerformAutoResync != nil { 22949 objectMap["performAutoResync"] = vmcumii.PerformAutoResync 22950 } 22951 if vmcumii.InstanceType != "" { 22952 objectMap["instanceType"] = vmcumii.InstanceType 22953 } 22954 return json.Marshal(objectMap) 22955} 22956 22957// AsVMwareCbtUpdateMigrationItemInput is the BasicUpdateMigrationItemProviderSpecificInput implementation for VMwareCbtUpdateMigrationItemInput. 22958func (vmcumii VMwareCbtUpdateMigrationItemInput) AsVMwareCbtUpdateMigrationItemInput() (*VMwareCbtUpdateMigrationItemInput, bool) { 22959 return &vmcumii, true 22960} 22961 22962// AsUpdateMigrationItemProviderSpecificInput is the BasicUpdateMigrationItemProviderSpecificInput implementation for VMwareCbtUpdateMigrationItemInput. 22963func (vmcumii VMwareCbtUpdateMigrationItemInput) AsUpdateMigrationItemProviderSpecificInput() (*UpdateMigrationItemProviderSpecificInput, bool) { 22964 return nil, false 22965} 22966 22967// AsBasicUpdateMigrationItemProviderSpecificInput is the BasicUpdateMigrationItemProviderSpecificInput implementation for VMwareCbtUpdateMigrationItemInput. 22968func (vmcumii VMwareCbtUpdateMigrationItemInput) AsBasicUpdateMigrationItemProviderSpecificInput() (BasicUpdateMigrationItemProviderSpecificInput, bool) { 22969 return &vmcumii, true 22970} 22971 22972// VMwareDetails store the fabric details specific to the VMware fabric. 22973type VMwareDetails struct { 22974 // ProcessServers - The list of Process Servers associated with the fabric. 22975 ProcessServers *[]ProcessServer `json:"processServers,omitempty"` 22976 // MasterTargetServers - The list of Master Target servers associated with the fabric. 22977 MasterTargetServers *[]MasterTargetServer `json:"masterTargetServers,omitempty"` 22978 // RunAsAccounts - The list of run as accounts created on the server. 22979 RunAsAccounts *[]RunAsAccount `json:"runAsAccounts,omitempty"` 22980 // ReplicationPairCount - The number of replication pairs configured in this CS. 22981 ReplicationPairCount *string `json:"replicationPairCount,omitempty"` 22982 // ProcessServerCount - The number of process servers. 22983 ProcessServerCount *string `json:"processServerCount,omitempty"` 22984 // AgentCount - The number of source and target servers configured to talk to this CS. 22985 AgentCount *string `json:"agentCount,omitempty"` 22986 // ProtectedServers - The number of protected servers. 22987 ProtectedServers *string `json:"protectedServers,omitempty"` 22988 // SystemLoad - The percentage of the system load. 22989 SystemLoad *string `json:"systemLoad,omitempty"` 22990 // SystemLoadStatus - The system load status. 22991 SystemLoadStatus *string `json:"systemLoadStatus,omitempty"` 22992 // CPULoad - The percentage of the CPU load. 22993 CPULoad *string `json:"cpuLoad,omitempty"` 22994 // CPULoadStatus - The CPU load status. 22995 CPULoadStatus *string `json:"cpuLoadStatus,omitempty"` 22996 // TotalMemoryInBytes - The total memory. 22997 TotalMemoryInBytes *int64 `json:"totalMemoryInBytes,omitempty"` 22998 // AvailableMemoryInBytes - The available memory. 22999 AvailableMemoryInBytes *int64 `json:"availableMemoryInBytes,omitempty"` 23000 // MemoryUsageStatus - The memory usage status. 23001 MemoryUsageStatus *string `json:"memoryUsageStatus,omitempty"` 23002 // TotalSpaceInBytes - The total space. 23003 TotalSpaceInBytes *int64 `json:"totalSpaceInBytes,omitempty"` 23004 // AvailableSpaceInBytes - The available space. 23005 AvailableSpaceInBytes *int64 `json:"availableSpaceInBytes,omitempty"` 23006 // SpaceUsageStatus - The space usage status. 23007 SpaceUsageStatus *string `json:"spaceUsageStatus,omitempty"` 23008 // WebLoad - The web load. 23009 WebLoad *string `json:"webLoad,omitempty"` 23010 // WebLoadStatus - The web load status. 23011 WebLoadStatus *string `json:"webLoadStatus,omitempty"` 23012 // DatabaseServerLoad - The database server load. 23013 DatabaseServerLoad *string `json:"databaseServerLoad,omitempty"` 23014 // DatabaseServerLoadStatus - The database server load status. 23015 DatabaseServerLoadStatus *string `json:"databaseServerLoadStatus,omitempty"` 23016 // CsServiceStatus - The CS service status. 23017 CsServiceStatus *string `json:"csServiceStatus,omitempty"` 23018 // IPAddress - The IP address. 23019 IPAddress *string `json:"ipAddress,omitempty"` 23020 // AgentVersion - The agent Version. 23021 AgentVersion *string `json:"agentVersion,omitempty"` 23022 // HostName - The host name. 23023 HostName *string `json:"hostName,omitempty"` 23024 // LastHeartbeat - The last heartbeat received from CS server. 23025 LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"` 23026 // VersionStatus - Version status 23027 VersionStatus *string `json:"versionStatus,omitempty"` 23028 // SslCertExpiryDate - CS SSL cert expiry date. 23029 SslCertExpiryDate *date.Time `json:"sslCertExpiryDate,omitempty"` 23030 // SslCertExpiryRemainingDays - CS SSL cert expiry date. 23031 SslCertExpiryRemainingDays *int32 `json:"sslCertExpiryRemainingDays,omitempty"` 23032 // PsTemplateVersion - PS template version. 23033 PsTemplateVersion *string `json:"psTemplateVersion,omitempty"` 23034 // AgentExpiryDate - Agent expiry date. 23035 AgentExpiryDate *date.Time `json:"agentExpiryDate,omitempty"` 23036 // AgentVersionDetails - The agent version details. 23037 AgentVersionDetails *VersionDetails `json:"agentVersionDetails,omitempty"` 23038 // InstanceType - Possible values include: 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeFabricSpecificDetails', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeAzure', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeHyperVSite', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMM', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMware', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMwareV2' 23039 InstanceType InstanceTypeBasicFabricSpecificDetails `json:"instanceType,omitempty"` 23040} 23041 23042// MarshalJSON is the custom marshaler for VMwareDetails. 23043func (vmd VMwareDetails) MarshalJSON() ([]byte, error) { 23044 vmd.InstanceType = InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMware 23045 objectMap := make(map[string]interface{}) 23046 if vmd.ProcessServers != nil { 23047 objectMap["processServers"] = vmd.ProcessServers 23048 } 23049 if vmd.MasterTargetServers != nil { 23050 objectMap["masterTargetServers"] = vmd.MasterTargetServers 23051 } 23052 if vmd.RunAsAccounts != nil { 23053 objectMap["runAsAccounts"] = vmd.RunAsAccounts 23054 } 23055 if vmd.ReplicationPairCount != nil { 23056 objectMap["replicationPairCount"] = vmd.ReplicationPairCount 23057 } 23058 if vmd.ProcessServerCount != nil { 23059 objectMap["processServerCount"] = vmd.ProcessServerCount 23060 } 23061 if vmd.AgentCount != nil { 23062 objectMap["agentCount"] = vmd.AgentCount 23063 } 23064 if vmd.ProtectedServers != nil { 23065 objectMap["protectedServers"] = vmd.ProtectedServers 23066 } 23067 if vmd.SystemLoad != nil { 23068 objectMap["systemLoad"] = vmd.SystemLoad 23069 } 23070 if vmd.SystemLoadStatus != nil { 23071 objectMap["systemLoadStatus"] = vmd.SystemLoadStatus 23072 } 23073 if vmd.CPULoad != nil { 23074 objectMap["cpuLoad"] = vmd.CPULoad 23075 } 23076 if vmd.CPULoadStatus != nil { 23077 objectMap["cpuLoadStatus"] = vmd.CPULoadStatus 23078 } 23079 if vmd.TotalMemoryInBytes != nil { 23080 objectMap["totalMemoryInBytes"] = vmd.TotalMemoryInBytes 23081 } 23082 if vmd.AvailableMemoryInBytes != nil { 23083 objectMap["availableMemoryInBytes"] = vmd.AvailableMemoryInBytes 23084 } 23085 if vmd.MemoryUsageStatus != nil { 23086 objectMap["memoryUsageStatus"] = vmd.MemoryUsageStatus 23087 } 23088 if vmd.TotalSpaceInBytes != nil { 23089 objectMap["totalSpaceInBytes"] = vmd.TotalSpaceInBytes 23090 } 23091 if vmd.AvailableSpaceInBytes != nil { 23092 objectMap["availableSpaceInBytes"] = vmd.AvailableSpaceInBytes 23093 } 23094 if vmd.SpaceUsageStatus != nil { 23095 objectMap["spaceUsageStatus"] = vmd.SpaceUsageStatus 23096 } 23097 if vmd.WebLoad != nil { 23098 objectMap["webLoad"] = vmd.WebLoad 23099 } 23100 if vmd.WebLoadStatus != nil { 23101 objectMap["webLoadStatus"] = vmd.WebLoadStatus 23102 } 23103 if vmd.DatabaseServerLoad != nil { 23104 objectMap["databaseServerLoad"] = vmd.DatabaseServerLoad 23105 } 23106 if vmd.DatabaseServerLoadStatus != nil { 23107 objectMap["databaseServerLoadStatus"] = vmd.DatabaseServerLoadStatus 23108 } 23109 if vmd.CsServiceStatus != nil { 23110 objectMap["csServiceStatus"] = vmd.CsServiceStatus 23111 } 23112 if vmd.IPAddress != nil { 23113 objectMap["ipAddress"] = vmd.IPAddress 23114 } 23115 if vmd.AgentVersion != nil { 23116 objectMap["agentVersion"] = vmd.AgentVersion 23117 } 23118 if vmd.HostName != nil { 23119 objectMap["hostName"] = vmd.HostName 23120 } 23121 if vmd.LastHeartbeat != nil { 23122 objectMap["lastHeartbeat"] = vmd.LastHeartbeat 23123 } 23124 if vmd.VersionStatus != nil { 23125 objectMap["versionStatus"] = vmd.VersionStatus 23126 } 23127 if vmd.SslCertExpiryDate != nil { 23128 objectMap["sslCertExpiryDate"] = vmd.SslCertExpiryDate 23129 } 23130 if vmd.SslCertExpiryRemainingDays != nil { 23131 objectMap["sslCertExpiryRemainingDays"] = vmd.SslCertExpiryRemainingDays 23132 } 23133 if vmd.PsTemplateVersion != nil { 23134 objectMap["psTemplateVersion"] = vmd.PsTemplateVersion 23135 } 23136 if vmd.AgentExpiryDate != nil { 23137 objectMap["agentExpiryDate"] = vmd.AgentExpiryDate 23138 } 23139 if vmd.AgentVersionDetails != nil { 23140 objectMap["agentVersionDetails"] = vmd.AgentVersionDetails 23141 } 23142 if vmd.InstanceType != "" { 23143 objectMap["instanceType"] = vmd.InstanceType 23144 } 23145 return json.Marshal(objectMap) 23146} 23147 23148// AsAzureFabricSpecificDetails is the BasicFabricSpecificDetails implementation for VMwareDetails. 23149func (vmd VMwareDetails) AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool) { 23150 return nil, false 23151} 23152 23153// AsHyperVSiteDetails is the BasicFabricSpecificDetails implementation for VMwareDetails. 23154func (vmd VMwareDetails) AsHyperVSiteDetails() (*HyperVSiteDetails, bool) { 23155 return nil, false 23156} 23157 23158// AsVmmDetails is the BasicFabricSpecificDetails implementation for VMwareDetails. 23159func (vmd VMwareDetails) AsVmmDetails() (*VmmDetails, bool) { 23160 return nil, false 23161} 23162 23163// AsVMwareDetails is the BasicFabricSpecificDetails implementation for VMwareDetails. 23164func (vmd VMwareDetails) AsVMwareDetails() (*VMwareDetails, bool) { 23165 return &vmd, true 23166} 23167 23168// AsVMwareV2FabricSpecificDetails is the BasicFabricSpecificDetails implementation for VMwareDetails. 23169func (vmd VMwareDetails) AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool) { 23170 return nil, false 23171} 23172 23173// AsFabricSpecificDetails is the BasicFabricSpecificDetails implementation for VMwareDetails. 23174func (vmd VMwareDetails) AsFabricSpecificDetails() (*FabricSpecificDetails, bool) { 23175 return nil, false 23176} 23177 23178// AsBasicFabricSpecificDetails is the BasicFabricSpecificDetails implementation for VMwareDetails. 23179func (vmd VMwareDetails) AsBasicFabricSpecificDetails() (BasicFabricSpecificDetails, bool) { 23180 return &vmd, true 23181} 23182 23183// VMwareV2FabricCreationInput vMwareV2 fabric provider specific settings. 23184type VMwareV2FabricCreationInput struct { 23185 // VmwareSiteID - The ARM Id of the VMware site. 23186 VmwareSiteID *string `json:"vmwareSiteId,omitempty"` 23187 // PhysicalSiteID - The ARM Id of the physical site. 23188 PhysicalSiteID *string `json:"physicalSiteId,omitempty"` 23189 // MigrationSolutionID - The ARM Id of the migration solution. 23190 MigrationSolutionID *string `json:"migrationSolutionId,omitempty"` 23191 // InstanceType - Possible values include: 'InstanceTypeFabricSpecificCreationInput', 'InstanceTypeAzure', 'InstanceTypeVMwareV2' 23192 InstanceType InstanceTypeBasicFabricSpecificCreationInput `json:"instanceType,omitempty"` 23193} 23194 23195// MarshalJSON is the custom marshaler for VMwareV2FabricCreationInput. 23196func (vmvfci VMwareV2FabricCreationInput) MarshalJSON() ([]byte, error) { 23197 vmvfci.InstanceType = InstanceTypeVMwareV2 23198 objectMap := make(map[string]interface{}) 23199 if vmvfci.VmwareSiteID != nil { 23200 objectMap["vmwareSiteId"] = vmvfci.VmwareSiteID 23201 } 23202 if vmvfci.PhysicalSiteID != nil { 23203 objectMap["physicalSiteId"] = vmvfci.PhysicalSiteID 23204 } 23205 if vmvfci.MigrationSolutionID != nil { 23206 objectMap["migrationSolutionId"] = vmvfci.MigrationSolutionID 23207 } 23208 if vmvfci.InstanceType != "" { 23209 objectMap["instanceType"] = vmvfci.InstanceType 23210 } 23211 return json.Marshal(objectMap) 23212} 23213 23214// AsAzureFabricCreationInput is the BasicFabricSpecificCreationInput implementation for VMwareV2FabricCreationInput. 23215func (vmvfci VMwareV2FabricCreationInput) AsAzureFabricCreationInput() (*AzureFabricCreationInput, bool) { 23216 return nil, false 23217} 23218 23219// AsVMwareV2FabricCreationInput is the BasicFabricSpecificCreationInput implementation for VMwareV2FabricCreationInput. 23220func (vmvfci VMwareV2FabricCreationInput) AsVMwareV2FabricCreationInput() (*VMwareV2FabricCreationInput, bool) { 23221 return &vmvfci, true 23222} 23223 23224// AsFabricSpecificCreationInput is the BasicFabricSpecificCreationInput implementation for VMwareV2FabricCreationInput. 23225func (vmvfci VMwareV2FabricCreationInput) AsFabricSpecificCreationInput() (*FabricSpecificCreationInput, bool) { 23226 return nil, false 23227} 23228 23229// AsBasicFabricSpecificCreationInput is the BasicFabricSpecificCreationInput implementation for VMwareV2FabricCreationInput. 23230func (vmvfci VMwareV2FabricCreationInput) AsBasicFabricSpecificCreationInput() (BasicFabricSpecificCreationInput, bool) { 23231 return &vmvfci, true 23232} 23233 23234// VMwareV2FabricSpecificDetails vMwareV2 fabric specific details. 23235type VMwareV2FabricSpecificDetails struct { 23236 // VmwareSiteID - READ-ONLY; The ARM Id of the VMware site. 23237 VmwareSiteID *string `json:"vmwareSiteId,omitempty"` 23238 // PhysicalSiteID - READ-ONLY; The ARM Id of the physical site. 23239 PhysicalSiteID *string `json:"physicalSiteId,omitempty"` 23240 // MigrationSolutionID - READ-ONLY; The Migration solution ARM Id. 23241 MigrationSolutionID *string `json:"migrationSolutionId,omitempty"` 23242 // ServiceEndpoint - READ-ONLY; The service endpoint. 23243 ServiceEndpoint *string `json:"serviceEndpoint,omitempty"` 23244 // ServiceResourceID - READ-ONLY; The service resource Id. 23245 ServiceResourceID *string `json:"serviceResourceId,omitempty"` 23246 // InstanceType - Possible values include: 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeFabricSpecificDetails', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeAzure', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeHyperVSite', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMM', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMware', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMwareV2' 23247 InstanceType InstanceTypeBasicFabricSpecificDetails `json:"instanceType,omitempty"` 23248} 23249 23250// MarshalJSON is the custom marshaler for VMwareV2FabricSpecificDetails. 23251func (vmvfsd VMwareV2FabricSpecificDetails) MarshalJSON() ([]byte, error) { 23252 vmvfsd.InstanceType = InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMwareV2 23253 objectMap := make(map[string]interface{}) 23254 if vmvfsd.InstanceType != "" { 23255 objectMap["instanceType"] = vmvfsd.InstanceType 23256 } 23257 return json.Marshal(objectMap) 23258} 23259 23260// AsAzureFabricSpecificDetails is the BasicFabricSpecificDetails implementation for VMwareV2FabricSpecificDetails. 23261func (vmvfsd VMwareV2FabricSpecificDetails) AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool) { 23262 return nil, false 23263} 23264 23265// AsHyperVSiteDetails is the BasicFabricSpecificDetails implementation for VMwareV2FabricSpecificDetails. 23266func (vmvfsd VMwareV2FabricSpecificDetails) AsHyperVSiteDetails() (*HyperVSiteDetails, bool) { 23267 return nil, false 23268} 23269 23270// AsVmmDetails is the BasicFabricSpecificDetails implementation for VMwareV2FabricSpecificDetails. 23271func (vmvfsd VMwareV2FabricSpecificDetails) AsVmmDetails() (*VmmDetails, bool) { 23272 return nil, false 23273} 23274 23275// AsVMwareDetails is the BasicFabricSpecificDetails implementation for VMwareV2FabricSpecificDetails. 23276func (vmvfsd VMwareV2FabricSpecificDetails) AsVMwareDetails() (*VMwareDetails, bool) { 23277 return nil, false 23278} 23279 23280// AsVMwareV2FabricSpecificDetails is the BasicFabricSpecificDetails implementation for VMwareV2FabricSpecificDetails. 23281func (vmvfsd VMwareV2FabricSpecificDetails) AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool) { 23282 return &vmvfsd, true 23283} 23284 23285// AsFabricSpecificDetails is the BasicFabricSpecificDetails implementation for VMwareV2FabricSpecificDetails. 23286func (vmvfsd VMwareV2FabricSpecificDetails) AsFabricSpecificDetails() (*FabricSpecificDetails, bool) { 23287 return nil, false 23288} 23289 23290// AsBasicFabricSpecificDetails is the BasicFabricSpecificDetails implementation for VMwareV2FabricSpecificDetails. 23291func (vmvfsd VMwareV2FabricSpecificDetails) AsBasicFabricSpecificDetails() (BasicFabricSpecificDetails, bool) { 23292 return &vmvfsd, true 23293} 23294 23295// VMwareVirtualMachineDetails vMware provider specific settings 23296type VMwareVirtualMachineDetails struct { 23297 // AgentGeneratedID - The ID generated by the InMage agent after it gets installed on guest. This is the ID to be used during InMage CreateProtection. 23298 AgentGeneratedID *string `json:"agentGeneratedId,omitempty"` 23299 // AgentInstalled - The value indicating if InMage scout agent is installed on guest. 23300 AgentInstalled *string `json:"agentInstalled,omitempty"` 23301 // OsType - The OsType installed on VM. 23302 OsType *string `json:"osType,omitempty"` 23303 // AgentVersion - The agent version. 23304 AgentVersion *string `json:"agentVersion,omitempty"` 23305 // IPAddress - The IP address. 23306 IPAddress *string `json:"ipAddress,omitempty"` 23307 // PoweredOn - The value indicating whether VM is powered on. 23308 PoweredOn *string `json:"poweredOn,omitempty"` 23309 // VCenterInfrastructureID - The VCenter infrastructure Id. 23310 VCenterInfrastructureID *string `json:"vCenterInfrastructureId,omitempty"` 23311 // DiscoveryType - A value indicating the discovery type of the machine. Value can be vCenter or physical. 23312 DiscoveryType *string `json:"discoveryType,omitempty"` 23313 // DiskDetails - The disk details. 23314 DiskDetails *[]InMageDiskDetails `json:"diskDetails,omitempty"` 23315 // ValidationErrors - The validation errors. 23316 ValidationErrors *[]HealthError `json:"validationErrors,omitempty"` 23317 // InstanceType - Possible values include: 'InstanceTypeConfigurationSettings', 'InstanceTypeHyperVVirtualMachine', 'InstanceTypeReplicationGroupDetails', 'InstanceTypeVmmVirtualMachine', 'InstanceTypeVMwareVirtualMachine' 23318 InstanceType InstanceTypeBasicConfigurationSettings `json:"instanceType,omitempty"` 23319} 23320 23321// MarshalJSON is the custom marshaler for VMwareVirtualMachineDetails. 23322func (vmvmd VMwareVirtualMachineDetails) MarshalJSON() ([]byte, error) { 23323 vmvmd.InstanceType = InstanceTypeVMwareVirtualMachine 23324 objectMap := make(map[string]interface{}) 23325 if vmvmd.AgentGeneratedID != nil { 23326 objectMap["agentGeneratedId"] = vmvmd.AgentGeneratedID 23327 } 23328 if vmvmd.AgentInstalled != nil { 23329 objectMap["agentInstalled"] = vmvmd.AgentInstalled 23330 } 23331 if vmvmd.OsType != nil { 23332 objectMap["osType"] = vmvmd.OsType 23333 } 23334 if vmvmd.AgentVersion != nil { 23335 objectMap["agentVersion"] = vmvmd.AgentVersion 23336 } 23337 if vmvmd.IPAddress != nil { 23338 objectMap["ipAddress"] = vmvmd.IPAddress 23339 } 23340 if vmvmd.PoweredOn != nil { 23341 objectMap["poweredOn"] = vmvmd.PoweredOn 23342 } 23343 if vmvmd.VCenterInfrastructureID != nil { 23344 objectMap["vCenterInfrastructureId"] = vmvmd.VCenterInfrastructureID 23345 } 23346 if vmvmd.DiscoveryType != nil { 23347 objectMap["discoveryType"] = vmvmd.DiscoveryType 23348 } 23349 if vmvmd.DiskDetails != nil { 23350 objectMap["diskDetails"] = vmvmd.DiskDetails 23351 } 23352 if vmvmd.ValidationErrors != nil { 23353 objectMap["validationErrors"] = vmvmd.ValidationErrors 23354 } 23355 if vmvmd.InstanceType != "" { 23356 objectMap["instanceType"] = vmvmd.InstanceType 23357 } 23358 return json.Marshal(objectMap) 23359} 23360 23361// AsHyperVVirtualMachineDetails is the BasicConfigurationSettings implementation for VMwareVirtualMachineDetails. 23362func (vmvmd VMwareVirtualMachineDetails) AsHyperVVirtualMachineDetails() (*HyperVVirtualMachineDetails, bool) { 23363 return nil, false 23364} 23365 23366// AsReplicationGroupDetails is the BasicConfigurationSettings implementation for VMwareVirtualMachineDetails. 23367func (vmvmd VMwareVirtualMachineDetails) AsReplicationGroupDetails() (*ReplicationGroupDetails, bool) { 23368 return nil, false 23369} 23370 23371// AsVmmVirtualMachineDetails is the BasicConfigurationSettings implementation for VMwareVirtualMachineDetails. 23372func (vmvmd VMwareVirtualMachineDetails) AsVmmVirtualMachineDetails() (*VmmVirtualMachineDetails, bool) { 23373 return nil, false 23374} 23375 23376// AsVMwareVirtualMachineDetails is the BasicConfigurationSettings implementation for VMwareVirtualMachineDetails. 23377func (vmvmd VMwareVirtualMachineDetails) AsVMwareVirtualMachineDetails() (*VMwareVirtualMachineDetails, bool) { 23378 return &vmvmd, true 23379} 23380 23381// AsConfigurationSettings is the BasicConfigurationSettings implementation for VMwareVirtualMachineDetails. 23382func (vmvmd VMwareVirtualMachineDetails) AsConfigurationSettings() (*ConfigurationSettings, bool) { 23383 return nil, false 23384} 23385 23386// AsBasicConfigurationSettings is the BasicConfigurationSettings implementation for VMwareVirtualMachineDetails. 23387func (vmvmd VMwareVirtualMachineDetails) AsBasicConfigurationSettings() (BasicConfigurationSettings, bool) { 23388 return &vmvmd, true 23389} 23390