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/2016-08-10/siterecovery" 22 23// A2AApplyRecoveryPointInput applyRecoveryPoint input specific to A2A provider. 24type A2AApplyRecoveryPointInput struct { 25 // InstanceType - Possible values include: 'InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeApplyRecoveryPointProviderSpecificInput', 'InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeA2A' 26 InstanceType InstanceTypeBasicApplyRecoveryPointProviderSpecificInput `json:"instanceType,omitempty"` 27} 28 29// MarshalJSON is the custom marshaler for A2AApplyRecoveryPointInput. 30func (aarpi A2AApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { 31 aarpi.InstanceType = InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeA2A 32 objectMap := make(map[string]interface{}) 33 if aarpi.InstanceType != "" { 34 objectMap["instanceType"] = aarpi.InstanceType 35 } 36 return json.Marshal(objectMap) 37} 38 39// AsHyperVReplicaAzureApplyRecoveryPointInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for A2AApplyRecoveryPointInput. 40func (aarpi A2AApplyRecoveryPointInput) AsHyperVReplicaAzureApplyRecoveryPointInput() (*HyperVReplicaAzureApplyRecoveryPointInput, bool) { 41 return nil, false 42} 43 44// AsInMageAzureV2ApplyRecoveryPointInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for A2AApplyRecoveryPointInput. 45func (aarpi A2AApplyRecoveryPointInput) AsInMageAzureV2ApplyRecoveryPointInput() (*InMageAzureV2ApplyRecoveryPointInput, bool) { 46 return nil, false 47} 48 49// AsA2AApplyRecoveryPointInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for A2AApplyRecoveryPointInput. 50func (aarpi A2AApplyRecoveryPointInput) AsA2AApplyRecoveryPointInput() (*A2AApplyRecoveryPointInput, bool) { 51 return &aarpi, true 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' 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// AsReplicationProviderSpecificContainerCreationInput is the BasicReplicationProviderSpecificContainerCreationInput implementation for A2AContainerCreationInput. 86func (acci A2AContainerCreationInput) AsReplicationProviderSpecificContainerCreationInput() (*ReplicationProviderSpecificContainerCreationInput, bool) { 87 return nil, false 88} 89 90// AsBasicReplicationProviderSpecificContainerCreationInput is the BasicReplicationProviderSpecificContainerCreationInput implementation for A2AContainerCreationInput. 91func (acci A2AContainerCreationInput) AsBasicReplicationProviderSpecificContainerCreationInput() (BasicReplicationProviderSpecificContainerCreationInput, bool) { 92 return &acci, true 93} 94 95// A2AEnableProtectionInput a2A enable protection input. 96type A2AEnableProtectionInput struct { 97 // FabricObjectID - The fabric specific object Id of the virtual machine. 98 FabricObjectID *string `json:"fabricObjectId,omitempty"` 99 // RecoveryContainerID - The recovery container Id. 100 RecoveryContainerID *string `json:"recoveryContainerId,omitempty"` 101 // RecoveryResourceGroupID - The recovery resource group Id. Valid for V2 scenarios. 102 RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"` 103 // RecoveryCloudServiceID - The recovery cloud service Id. Valid for V1 scenarios. 104 RecoveryCloudServiceID *string `json:"recoveryCloudServiceId,omitempty"` 105 // RecoveryAvailabilitySetID - The recovery availability set Id. 106 RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"` 107 // VMDisks - The list of vm disk details. 108 VMDisks *[]A2AVMDiskInputDetails `json:"vmDisks,omitempty"` 109 // VMManagedDisks - The list of vm managed disk details. 110 VMManagedDisks *[]A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` 111 // InstanceType - Possible values include: 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeEnableProtectionProviderSpecificInput', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeSan', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeA2A' 112 InstanceType InstanceTypeBasicEnableProtectionProviderSpecificInput `json:"instanceType,omitempty"` 113} 114 115// MarshalJSON is the custom marshaler for A2AEnableProtectionInput. 116func (aepi A2AEnableProtectionInput) MarshalJSON() ([]byte, error) { 117 aepi.InstanceType = InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeA2A 118 objectMap := make(map[string]interface{}) 119 if aepi.FabricObjectID != nil { 120 objectMap["fabricObjectId"] = aepi.FabricObjectID 121 } 122 if aepi.RecoveryContainerID != nil { 123 objectMap["recoveryContainerId"] = aepi.RecoveryContainerID 124 } 125 if aepi.RecoveryResourceGroupID != nil { 126 objectMap["recoveryResourceGroupId"] = aepi.RecoveryResourceGroupID 127 } 128 if aepi.RecoveryCloudServiceID != nil { 129 objectMap["recoveryCloudServiceId"] = aepi.RecoveryCloudServiceID 130 } 131 if aepi.RecoveryAvailabilitySetID != nil { 132 objectMap["recoveryAvailabilitySetId"] = aepi.RecoveryAvailabilitySetID 133 } 134 if aepi.VMDisks != nil { 135 objectMap["vmDisks"] = aepi.VMDisks 136 } 137 if aepi.VMManagedDisks != nil { 138 objectMap["vmManagedDisks"] = aepi.VMManagedDisks 139 } 140 if aepi.InstanceType != "" { 141 objectMap["instanceType"] = aepi.InstanceType 142 } 143 return json.Marshal(objectMap) 144} 145 146// AsHyperVReplicaAzureEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for A2AEnableProtectionInput. 147func (aepi A2AEnableProtectionInput) AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool) { 148 return nil, false 149} 150 151// AsSanEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for A2AEnableProtectionInput. 152func (aepi A2AEnableProtectionInput) AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool) { 153 return nil, false 154} 155 156// AsInMageAzureV2EnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for A2AEnableProtectionInput. 157func (aepi A2AEnableProtectionInput) AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool) { 158 return nil, false 159} 160 161// AsInMageEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for A2AEnableProtectionInput. 162func (aepi A2AEnableProtectionInput) AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool) { 163 return nil, false 164} 165 166// AsA2AEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for A2AEnableProtectionInput. 167func (aepi A2AEnableProtectionInput) AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool) { 168 return &aepi, true 169} 170 171// AsEnableProtectionProviderSpecificInput is the BasicEnableProtectionProviderSpecificInput implementation for A2AEnableProtectionInput. 172func (aepi A2AEnableProtectionInput) AsEnableProtectionProviderSpecificInput() (*EnableProtectionProviderSpecificInput, bool) { 173 return nil, false 174} 175 176// AsBasicEnableProtectionProviderSpecificInput is the BasicEnableProtectionProviderSpecificInput implementation for A2AEnableProtectionInput. 177func (aepi A2AEnableProtectionInput) AsBasicEnableProtectionProviderSpecificInput() (BasicEnableProtectionProviderSpecificInput, bool) { 178 return &aepi, true 179} 180 181// A2AEventDetails model class for event details of a A2A event. 182type A2AEventDetails struct { 183 // ProtectedItemName - The protected item arm name. 184 ProtectedItemName *string `json:"protectedItemName,omitempty"` 185 // FabricObjectID - The azure vm arm id. 186 FabricObjectID *string `json:"fabricObjectId,omitempty"` 187 // FabricName - Fabric arm name. 188 FabricName *string `json:"fabricName,omitempty"` 189 // FabricLocation - The fabric location. 190 FabricLocation *string `json:"fabricLocation,omitempty"` 191 // RemoteFabricName - Remote fabric arm name. 192 RemoteFabricName *string `json:"remoteFabricName,omitempty"` 193 // RemoteFabricLocation - Remote fabric location. 194 RemoteFabricLocation *string `json:"remoteFabricLocation,omitempty"` 195 // InstanceType - Possible values include: 'InstanceTypeEventProviderSpecificDetails', 'InstanceTypeHyperVReplicaBaseEventDetails', 'InstanceTypeHyperVReplica2012', 'InstanceTypeHyperVReplica2012R2', 'InstanceTypeHyperVReplicaAzure', 'InstanceTypeA2A', 'InstanceTypeInMageAzureV2' 196 InstanceType InstanceType `json:"instanceType,omitempty"` 197} 198 199// MarshalJSON is the custom marshaler for A2AEventDetails. 200func (aed A2AEventDetails) MarshalJSON() ([]byte, error) { 201 aed.InstanceType = InstanceTypeA2A 202 objectMap := make(map[string]interface{}) 203 if aed.ProtectedItemName != nil { 204 objectMap["protectedItemName"] = aed.ProtectedItemName 205 } 206 if aed.FabricObjectID != nil { 207 objectMap["fabricObjectId"] = aed.FabricObjectID 208 } 209 if aed.FabricName != nil { 210 objectMap["fabricName"] = aed.FabricName 211 } 212 if aed.FabricLocation != nil { 213 objectMap["fabricLocation"] = aed.FabricLocation 214 } 215 if aed.RemoteFabricName != nil { 216 objectMap["remoteFabricName"] = aed.RemoteFabricName 217 } 218 if aed.RemoteFabricLocation != nil { 219 objectMap["remoteFabricLocation"] = aed.RemoteFabricLocation 220 } 221 if aed.InstanceType != "" { 222 objectMap["instanceType"] = aed.InstanceType 223 } 224 return json.Marshal(objectMap) 225} 226 227// AsHyperVReplicaBaseEventDetails is the BasicEventProviderSpecificDetails implementation for A2AEventDetails. 228func (aed A2AEventDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) { 229 return nil, false 230} 231 232// AsHyperVReplica2012EventDetails is the BasicEventProviderSpecificDetails implementation for A2AEventDetails. 233func (aed A2AEventDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) { 234 return nil, false 235} 236 237// AsHyperVReplica2012R2EventDetails is the BasicEventProviderSpecificDetails implementation for A2AEventDetails. 238func (aed A2AEventDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) { 239 return nil, false 240} 241 242// AsHyperVReplicaAzureEventDetails is the BasicEventProviderSpecificDetails implementation for A2AEventDetails. 243func (aed A2AEventDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) { 244 return nil, false 245} 246 247// AsA2AEventDetails is the BasicEventProviderSpecificDetails implementation for A2AEventDetails. 248func (aed A2AEventDetails) AsA2AEventDetails() (*A2AEventDetails, bool) { 249 return &aed, true 250} 251 252// AsInMageAzureV2EventDetails is the BasicEventProviderSpecificDetails implementation for A2AEventDetails. 253func (aed A2AEventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) { 254 return nil, false 255} 256 257// AsEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for A2AEventDetails. 258func (aed A2AEventDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) { 259 return nil, false 260} 261 262// AsBasicEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for A2AEventDetails. 263func (aed A2AEventDetails) AsBasicEventProviderSpecificDetails() (BasicEventProviderSpecificDetails, bool) { 264 return &aed, true 265} 266 267// A2AFailoverProviderInput a2A provider specific input for failover. 268type A2AFailoverProviderInput struct { 269 // 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. 270 RecoveryPointID *string `json:"recoveryPointId,omitempty"` 271 // CloudServiceCreationOption - A value indicating whether to use recovery cloud service for TFO or not. 272 CloudServiceCreationOption *string `json:"cloudServiceCreationOption,omitempty"` 273 // InstanceType - Possible values include: 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeProviderSpecificFailoverInput', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMage', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeA2A' 274 InstanceType InstanceTypeBasicProviderSpecificFailoverInput `json:"instanceType,omitempty"` 275} 276 277// MarshalJSON is the custom marshaler for A2AFailoverProviderInput. 278func (afpi A2AFailoverProviderInput) MarshalJSON() ([]byte, error) { 279 afpi.InstanceType = InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeA2A 280 objectMap := make(map[string]interface{}) 281 if afpi.RecoveryPointID != nil { 282 objectMap["recoveryPointId"] = afpi.RecoveryPointID 283 } 284 if afpi.CloudServiceCreationOption != nil { 285 objectMap["cloudServiceCreationOption"] = afpi.CloudServiceCreationOption 286 } 287 if afpi.InstanceType != "" { 288 objectMap["instanceType"] = afpi.InstanceType 289 } 290 return json.Marshal(objectMap) 291} 292 293// AsHyperVReplicaAzureFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for A2AFailoverProviderInput. 294func (afpi A2AFailoverProviderInput) AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool) { 295 return nil, false 296} 297 298// AsHyperVReplicaAzureFailbackProviderInput is the BasicProviderSpecificFailoverInput implementation for A2AFailoverProviderInput. 299func (afpi A2AFailoverProviderInput) AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool) { 300 return nil, false 301} 302 303// AsInMageAzureV2FailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for A2AFailoverProviderInput. 304func (afpi A2AFailoverProviderInput) AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool) { 305 return nil, false 306} 307 308// AsInMageFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for A2AFailoverProviderInput. 309func (afpi A2AFailoverProviderInput) AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool) { 310 return nil, false 311} 312 313// AsA2AFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for A2AFailoverProviderInput. 314func (afpi A2AFailoverProviderInput) AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool) { 315 return &afpi, true 316} 317 318// AsProviderSpecificFailoverInput is the BasicProviderSpecificFailoverInput implementation for A2AFailoverProviderInput. 319func (afpi A2AFailoverProviderInput) AsProviderSpecificFailoverInput() (*ProviderSpecificFailoverInput, bool) { 320 return nil, false 321} 322 323// AsBasicProviderSpecificFailoverInput is the BasicProviderSpecificFailoverInput implementation for A2AFailoverProviderInput. 324func (afpi A2AFailoverProviderInput) AsBasicProviderSpecificFailoverInput() (BasicProviderSpecificFailoverInput, bool) { 325 return &afpi, true 326} 327 328// A2APolicyCreationInput a2A Policy creation input. 329type A2APolicyCreationInput struct { 330 // RecoveryPointHistory - The duration in minutes until which the recovery points need to be stored. 331 RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` 332 // CrashConsistentFrequencyInMinutes - The crash consistent snapshot frequency (in minutes). 333 CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"` 334 // AppConsistentFrequencyInMinutes - The app consistent snapshot frequency (in minutes). 335 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` 336 // MultiVMSyncStatus - A value indicating whether multi-VM sync has to be enabled. Value should be 'Enabled' or 'Disabled'. Possible values include: 'Enable', 'Disable' 337 MultiVMSyncStatus SetMultiVMSyncStatus `json:"multiVmSyncStatus,omitempty"` 338 // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypePolicyProviderSpecificInput', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeVMwareCbt' 339 InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"` 340} 341 342// MarshalJSON is the custom marshaler for A2APolicyCreationInput. 343func (apci A2APolicyCreationInput) MarshalJSON() ([]byte, error) { 344 apci.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeA2A 345 objectMap := make(map[string]interface{}) 346 if apci.RecoveryPointHistory != nil { 347 objectMap["recoveryPointHistory"] = apci.RecoveryPointHistory 348 } 349 if apci.CrashConsistentFrequencyInMinutes != nil { 350 objectMap["crashConsistentFrequencyInMinutes"] = apci.CrashConsistentFrequencyInMinutes 351 } 352 if apci.AppConsistentFrequencyInMinutes != nil { 353 objectMap["appConsistentFrequencyInMinutes"] = apci.AppConsistentFrequencyInMinutes 354 } 355 if apci.MultiVMSyncStatus != "" { 356 objectMap["multiVmSyncStatus"] = apci.MultiVMSyncStatus 357 } 358 if apci.InstanceType != "" { 359 objectMap["instanceType"] = apci.InstanceType 360 } 361 return json.Marshal(objectMap) 362} 363 364// AsHyperVReplicaAzurePolicyInput is the BasicPolicyProviderSpecificInput implementation for A2APolicyCreationInput. 365func (apci A2APolicyCreationInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) { 366 return nil, false 367} 368 369// AsHyperVReplicaPolicyInput is the BasicPolicyProviderSpecificInput implementation for A2APolicyCreationInput. 370func (apci A2APolicyCreationInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) { 371 return nil, false 372} 373 374// AsHyperVReplicaBluePolicyInput is the BasicPolicyProviderSpecificInput implementation for A2APolicyCreationInput. 375func (apci A2APolicyCreationInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) { 376 return nil, false 377} 378 379// AsInMageAzureV2PolicyInput is the BasicPolicyProviderSpecificInput implementation for A2APolicyCreationInput. 380func (apci A2APolicyCreationInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) { 381 return nil, false 382} 383 384// AsInMagePolicyInput is the BasicPolicyProviderSpecificInput implementation for A2APolicyCreationInput. 385func (apci A2APolicyCreationInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) { 386 return nil, false 387} 388 389// AsA2APolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for A2APolicyCreationInput. 390func (apci A2APolicyCreationInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) { 391 return &apci, true 392} 393 394// AsVMwareCbtPolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for A2APolicyCreationInput. 395func (apci A2APolicyCreationInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) { 396 return nil, false 397} 398 399// AsPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for A2APolicyCreationInput. 400func (apci A2APolicyCreationInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) { 401 return nil, false 402} 403 404// AsBasicPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for A2APolicyCreationInput. 405func (apci A2APolicyCreationInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) { 406 return &apci, true 407} 408 409// A2APolicyDetails a2A specific policy details. 410type A2APolicyDetails struct { 411 // RecoveryPointThresholdInMinutes - The recovery point threshold in minutes. 412 RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"` 413 // RecoveryPointHistory - The duration in minutes until which the recovery points need to be stored. 414 RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` 415 // AppConsistentFrequencyInMinutes - The app consistent snapshot frequency in minutes. 416 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` 417 // MultiVMSyncStatus - A value indicating whether multi-VM sync has to be enabled. 418 MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"` 419 // CrashConsistentFrequencyInMinutes - The crash consistent snapshot frequency in minutes. 420 CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"` 421 // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypePolicyProviderSpecificDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt' 422 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"` 423} 424 425// MarshalJSON is the custom marshaler for A2APolicyDetails. 426func (apd A2APolicyDetails) MarshalJSON() ([]byte, error) { 427 apd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A 428 objectMap := make(map[string]interface{}) 429 if apd.RecoveryPointThresholdInMinutes != nil { 430 objectMap["recoveryPointThresholdInMinutes"] = apd.RecoveryPointThresholdInMinutes 431 } 432 if apd.RecoveryPointHistory != nil { 433 objectMap["recoveryPointHistory"] = apd.RecoveryPointHistory 434 } 435 if apd.AppConsistentFrequencyInMinutes != nil { 436 objectMap["appConsistentFrequencyInMinutes"] = apd.AppConsistentFrequencyInMinutes 437 } 438 if apd.MultiVMSyncStatus != nil { 439 objectMap["multiVmSyncStatus"] = apd.MultiVMSyncStatus 440 } 441 if apd.CrashConsistentFrequencyInMinutes != nil { 442 objectMap["crashConsistentFrequencyInMinutes"] = apd.CrashConsistentFrequencyInMinutes 443 } 444 if apd.InstanceType != "" { 445 objectMap["instanceType"] = apd.InstanceType 446 } 447 return json.Marshal(objectMap) 448} 449 450// AsHyperVReplicaAzurePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for A2APolicyDetails. 451func (apd A2APolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) { 452 return nil, false 453} 454 455// AsHyperVReplicaBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for A2APolicyDetails. 456func (apd A2APolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) { 457 return nil, false 458} 459 460// AsHyperVReplicaPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for A2APolicyDetails. 461func (apd A2APolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) { 462 return nil, false 463} 464 465// AsHyperVReplicaBluePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for A2APolicyDetails. 466func (apd A2APolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) { 467 return nil, false 468} 469 470// AsInMageBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for A2APolicyDetails. 471func (apd A2APolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) { 472 return nil, false 473} 474 475// AsInMageAzureV2PolicyDetails is the BasicPolicyProviderSpecificDetails implementation for A2APolicyDetails. 476func (apd A2APolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) { 477 return nil, false 478} 479 480// AsInMagePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for A2APolicyDetails. 481func (apd A2APolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) { 482 return nil, false 483} 484 485// AsA2APolicyDetails is the BasicPolicyProviderSpecificDetails implementation for A2APolicyDetails. 486func (apd A2APolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) { 487 return &apd, true 488} 489 490// AsRcmAzureMigrationPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for A2APolicyDetails. 491func (apd A2APolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) { 492 return nil, false 493} 494 495// AsVmwareCbtPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for A2APolicyDetails. 496func (apd A2APolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) { 497 return nil, false 498} 499 500// AsPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for A2APolicyDetails. 501func (apd A2APolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) { 502 return nil, false 503} 504 505// AsBasicPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for A2APolicyDetails. 506func (apd A2APolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) { 507 return &apd, true 508} 509 510// A2AProtectedDiskDetails a2A protected disk details. 511type A2AProtectedDiskDetails struct { 512 // DiskURI - The disk uri. 513 DiskURI *string `json:"diskUri,omitempty"` 514 // RecoveryAzureStorageAccountID - The recovery disk storage account. 515 RecoveryAzureStorageAccountID *string `json:"recoveryAzureStorageAccountId,omitempty"` 516 // PrimaryDiskAzureStorageAccountID - The primary disk storage account. 517 PrimaryDiskAzureStorageAccountID *string `json:"primaryDiskAzureStorageAccountId,omitempty"` 518 // RecoveryDiskURI - Recovery disk uri. 519 RecoveryDiskURI *string `json:"recoveryDiskUri,omitempty"` 520 // DiskName - The disk name. 521 DiskName *string `json:"diskName,omitempty"` 522 // DiskCapacityInBytes - The disk capacity in bytes. 523 DiskCapacityInBytes *int64 `json:"diskCapacityInBytes,omitempty"` 524 // PrimaryStagingAzureStorageAccountID - The primary staging storage account. 525 PrimaryStagingAzureStorageAccountID *string `json:"primaryStagingAzureStorageAccountId,omitempty"` 526 // DiskType - The type of disk. 527 DiskType *string `json:"diskType,omitempty"` 528 // ResyncRequired - A value indicating whether resync is required for this disk. 529 ResyncRequired *bool `json:"resyncRequired,omitempty"` 530 // MonitoringPercentageCompletion - The percentage of the monitoring job. The type of the monitoring job is defined by MonitoringJobType property. 531 MonitoringPercentageCompletion *int32 `json:"monitoringPercentageCompletion,omitempty"` 532 // MonitoringJobType - The type of the monitoring job. The progress is contained in MonitoringPercentageCompletion property. 533 MonitoringJobType *string `json:"monitoringJobType,omitempty"` 534 // DataPendingInStagingStorageAccountInMB - The data pending for replication in MB at staging account. 535 DataPendingInStagingStorageAccountInMB *float64 `json:"dataPendingInStagingStorageAccountInMB,omitempty"` 536 // DataPendingAtSourceAgentInMB - The data pending at source virtual machine in MB. 537 DataPendingAtSourceAgentInMB *float64 `json:"dataPendingAtSourceAgentInMB,omitempty"` 538} 539 540// A2AProtectedManagedDiskDetails a2A protected managed disk details. 541type A2AProtectedManagedDiskDetails struct { 542 // DiskID - The managed disk Arm id. 543 DiskID *string `json:"diskId,omitempty"` 544 // RecoveryAzureResourceGroupID - The recovery disk resource group Arm Id. 545 RecoveryAzureResourceGroupID *string `json:"recoveryAzureResourceGroupId,omitempty"` 546 // RecoveryDiskID - Recovery disk Arm Id. 547 RecoveryDiskID *string `json:"recoveryDiskId,omitempty"` 548 // DiskName - The disk name. 549 DiskName *string `json:"diskName,omitempty"` 550 // DiskCapacityInBytes - The disk capacity in bytes. 551 DiskCapacityInBytes *int64 `json:"diskCapacityInBytes,omitempty"` 552 // PrimaryStagingAzureStorageAccountID - The primary staging storage account. 553 PrimaryStagingAzureStorageAccountID *string `json:"primaryStagingAzureStorageAccountId,omitempty"` 554 // DiskType - The type of disk. 555 DiskType *string `json:"diskType,omitempty"` 556 // ResyncRequired - A value indicating whether resync is required for this disk. 557 ResyncRequired *bool `json:"resyncRequired,omitempty"` 558 // MonitoringPercentageCompletion - The percentage of the monitoring job. The type of the monitoring job is defined by MonitoringJobType property. 559 MonitoringPercentageCompletion *int32 `json:"monitoringPercentageCompletion,omitempty"` 560 // MonitoringJobType - The type of the monitoring job. The progress is contained in MonitoringPercentageCompletion property. 561 MonitoringJobType *string `json:"monitoringJobType,omitempty"` 562 // DataPendingInStagingStorageAccountInMB - The data pending for replication in MB at staging account. 563 DataPendingInStagingStorageAccountInMB *float64 `json:"dataPendingInStagingStorageAccountInMB,omitempty"` 564 // DataPendingAtSourceAgentInMB - The data pending at source virtual machine in MB. 565 DataPendingAtSourceAgentInMB *float64 `json:"dataPendingAtSourceAgentInMB,omitempty"` 566} 567 568// A2AReplicationDetails a2A provider specific settings. 569type A2AReplicationDetails struct { 570 // FabricObjectID - The fabric specific object Id of the virtual machine. 571 FabricObjectID *string `json:"fabricObjectId,omitempty"` 572 // MultiVMGroupID - The multi vm group Id. 573 MultiVMGroupID *string `json:"multiVmGroupId,omitempty"` 574 // MultiVMGroupName - The multi vm group name. 575 MultiVMGroupName *string `json:"multiVmGroupName,omitempty"` 576 // ManagementID - The management Id. 577 ManagementID *string `json:"managementId,omitempty"` 578 // ProtectedDisks - The list of protected disks. 579 ProtectedDisks *[]A2AProtectedDiskDetails `json:"protectedDisks,omitempty"` 580 // ProtectedManagedDisks - The list of protected managed disks. 581 ProtectedManagedDisks *[]A2AProtectedManagedDiskDetails `json:"protectedManagedDisks,omitempty"` 582 // PrimaryFabricLocation - Primary fabric location. 583 PrimaryFabricLocation *string `json:"primaryFabricLocation,omitempty"` 584 // RecoveryFabricLocation - The recovery fabric location. 585 RecoveryFabricLocation *string `json:"recoveryFabricLocation,omitempty"` 586 // OsType - The type of operating system. 587 OsType *string `json:"osType,omitempty"` 588 // RecoveryAzureVMSize - The size of recovery virtual machine. 589 RecoveryAzureVMSize *string `json:"recoveryAzureVMSize,omitempty"` 590 // RecoveryAzureVMName - The name of recovery virtual machine. 591 RecoveryAzureVMName *string `json:"recoveryAzureVMName,omitempty"` 592 // RecoveryAzureResourceGroupID - The recovery resource group. 593 RecoveryAzureResourceGroupID *string `json:"recoveryAzureResourceGroupId,omitempty"` 594 // RecoveryCloudService - The recovery cloud service. 595 RecoveryCloudService *string `json:"recoveryCloudService,omitempty"` 596 // RecoveryAvailabilitySet - The recovery availability set. 597 RecoveryAvailabilitySet *string `json:"recoveryAvailabilitySet,omitempty"` 598 // SelectedRecoveryAzureNetworkID - The recovery virtual network. 599 SelectedRecoveryAzureNetworkID *string `json:"selectedRecoveryAzureNetworkId,omitempty"` 600 // VMNics - The virtual machine nic details. 601 VMNics *[]VMNicDetails `json:"vmNics,omitempty"` 602 // VMSyncedConfigDetails - The synced configuration details. 603 VMSyncedConfigDetails *AzureToAzureVMSyncedConfigDetails `json:"vmSyncedConfigDetails,omitempty"` 604 // MonitoringPercentageCompletion - The percentage of the monitoring job. The type of the monitoring job is defined by MonitoringJobType property. 605 MonitoringPercentageCompletion *int32 `json:"monitoringPercentageCompletion,omitempty"` 606 // MonitoringJobType - The type of the monitoring job. The progress is contained in MonitoringPercentageCompletion property. 607 MonitoringJobType *string `json:"monitoringJobType,omitempty"` 608 // LastHeartbeat - The last heartbeat received from the source server. 609 LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"` 610 // AgentVersion - The agent version. 611 AgentVersion *string `json:"agentVersion,omitempty"` 612 // IsReplicationAgentUpdateRequired - A value indicating whether replication agent update is required. 613 IsReplicationAgentUpdateRequired *bool `json:"isReplicationAgentUpdateRequired,omitempty"` 614 // RecoveryFabricObjectID - The recovery fabric object Id. 615 RecoveryFabricObjectID *string `json:"recoveryFabricObjectId,omitempty"` 616 // VMProtectionState - The protection state for the vm. 617 VMProtectionState *string `json:"vmProtectionState,omitempty"` 618 // VMProtectionStateDescription - The protection state description for the vm. 619 VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` 620 // 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. 621 LifecycleID *string `json:"lifecycleId,omitempty"` 622 // TestFailoverRecoveryFabricObjectID - The test failover fabric object Id. 623 TestFailoverRecoveryFabricObjectID *string `json:"testFailoverRecoveryFabricObjectId,omitempty"` 624 // RpoInSeconds - The last RPO value in seconds. 625 RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"` 626 // LastRpoCalculatedTime - The time (in UTC) when the last RPO value was calculated by Protection Service. 627 LastRpoCalculatedTime *date.Time `json:"lastRpoCalculatedTime,omitempty"` 628 // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeReplicationProviderSpecificSettings', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaBaseReplicationDetails', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMageAzureV2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMage', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeA2A' 629 InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"` 630} 631 632// MarshalJSON is the custom marshaler for A2AReplicationDetails. 633func (ard A2AReplicationDetails) MarshalJSON() ([]byte, error) { 634 ard.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeA2A 635 objectMap := make(map[string]interface{}) 636 if ard.FabricObjectID != nil { 637 objectMap["fabricObjectId"] = ard.FabricObjectID 638 } 639 if ard.MultiVMGroupID != nil { 640 objectMap["multiVmGroupId"] = ard.MultiVMGroupID 641 } 642 if ard.MultiVMGroupName != nil { 643 objectMap["multiVmGroupName"] = ard.MultiVMGroupName 644 } 645 if ard.ManagementID != nil { 646 objectMap["managementId"] = ard.ManagementID 647 } 648 if ard.ProtectedDisks != nil { 649 objectMap["protectedDisks"] = ard.ProtectedDisks 650 } 651 if ard.ProtectedManagedDisks != nil { 652 objectMap["protectedManagedDisks"] = ard.ProtectedManagedDisks 653 } 654 if ard.PrimaryFabricLocation != nil { 655 objectMap["primaryFabricLocation"] = ard.PrimaryFabricLocation 656 } 657 if ard.RecoveryFabricLocation != nil { 658 objectMap["recoveryFabricLocation"] = ard.RecoveryFabricLocation 659 } 660 if ard.OsType != nil { 661 objectMap["osType"] = ard.OsType 662 } 663 if ard.RecoveryAzureVMSize != nil { 664 objectMap["recoveryAzureVMSize"] = ard.RecoveryAzureVMSize 665 } 666 if ard.RecoveryAzureVMName != nil { 667 objectMap["recoveryAzureVMName"] = ard.RecoveryAzureVMName 668 } 669 if ard.RecoveryAzureResourceGroupID != nil { 670 objectMap["recoveryAzureResourceGroupId"] = ard.RecoveryAzureResourceGroupID 671 } 672 if ard.RecoveryCloudService != nil { 673 objectMap["recoveryCloudService"] = ard.RecoveryCloudService 674 } 675 if ard.RecoveryAvailabilitySet != nil { 676 objectMap["recoveryAvailabilitySet"] = ard.RecoveryAvailabilitySet 677 } 678 if ard.SelectedRecoveryAzureNetworkID != nil { 679 objectMap["selectedRecoveryAzureNetworkId"] = ard.SelectedRecoveryAzureNetworkID 680 } 681 if ard.VMNics != nil { 682 objectMap["vmNics"] = ard.VMNics 683 } 684 if ard.VMSyncedConfigDetails != nil { 685 objectMap["vmSyncedConfigDetails"] = ard.VMSyncedConfigDetails 686 } 687 if ard.MonitoringPercentageCompletion != nil { 688 objectMap["monitoringPercentageCompletion"] = ard.MonitoringPercentageCompletion 689 } 690 if ard.MonitoringJobType != nil { 691 objectMap["monitoringJobType"] = ard.MonitoringJobType 692 } 693 if ard.LastHeartbeat != nil { 694 objectMap["lastHeartbeat"] = ard.LastHeartbeat 695 } 696 if ard.AgentVersion != nil { 697 objectMap["agentVersion"] = ard.AgentVersion 698 } 699 if ard.IsReplicationAgentUpdateRequired != nil { 700 objectMap["isReplicationAgentUpdateRequired"] = ard.IsReplicationAgentUpdateRequired 701 } 702 if ard.RecoveryFabricObjectID != nil { 703 objectMap["recoveryFabricObjectId"] = ard.RecoveryFabricObjectID 704 } 705 if ard.VMProtectionState != nil { 706 objectMap["vmProtectionState"] = ard.VMProtectionState 707 } 708 if ard.VMProtectionStateDescription != nil { 709 objectMap["vmProtectionStateDescription"] = ard.VMProtectionStateDescription 710 } 711 if ard.LifecycleID != nil { 712 objectMap["lifecycleId"] = ard.LifecycleID 713 } 714 if ard.TestFailoverRecoveryFabricObjectID != nil { 715 objectMap["testFailoverRecoveryFabricObjectId"] = ard.TestFailoverRecoveryFabricObjectID 716 } 717 if ard.RpoInSeconds != nil { 718 objectMap["rpoInSeconds"] = ard.RpoInSeconds 719 } 720 if ard.LastRpoCalculatedTime != nil { 721 objectMap["lastRpoCalculatedTime"] = ard.LastRpoCalculatedTime 722 } 723 if ard.InstanceType != "" { 724 objectMap["instanceType"] = ard.InstanceType 725 } 726 return json.Marshal(objectMap) 727} 728 729// AsHyperVReplicaBaseReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for A2AReplicationDetails. 730func (ard A2AReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) { 731 return nil, false 732} 733 734// AsHyperVReplicaReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for A2AReplicationDetails. 735func (ard A2AReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) { 736 return nil, false 737} 738 739// AsHyperVReplicaBlueReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for A2AReplicationDetails. 740func (ard A2AReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) { 741 return nil, false 742} 743 744// AsHyperVReplicaAzureReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for A2AReplicationDetails. 745func (ard A2AReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) { 746 return nil, false 747} 748 749// AsInMageAzureV2ReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for A2AReplicationDetails. 750func (ard A2AReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) { 751 return nil, false 752} 753 754// AsInMageReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for A2AReplicationDetails. 755func (ard A2AReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) { 756 return nil, false 757} 758 759// AsA2AReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for A2AReplicationDetails. 760func (ard A2AReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) { 761 return &ard, true 762} 763 764// AsReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for A2AReplicationDetails. 765func (ard A2AReplicationDetails) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) { 766 return nil, false 767} 768 769// AsBasicReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for A2AReplicationDetails. 770func (ard A2AReplicationDetails) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) { 771 return &ard, true 772} 773 774// A2AReprotectInput azure specific reprotect input. 775type A2AReprotectInput struct { 776 // RecoveryContainerID - The recovery container Id. 777 RecoveryContainerID *string `json:"recoveryContainerId,omitempty"` 778 // VMDisks - The list of vm disk details. 779 VMDisks *[]A2AVMDiskInputDetails `json:"vmDisks,omitempty"` 780 // RecoveryResourceGroupID - The recovery resource group Id. Valid for V2 scenarios. 781 RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"` 782 // RecoveryCloudServiceID - The recovery cloud service Id. Valid for V1 scenarios. 783 RecoveryCloudServiceID *string `json:"recoveryCloudServiceId,omitempty"` 784 // RecoveryAvailabilitySetID - The recovery availability set. 785 RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"` 786 // PolicyID - The Policy Id. 787 PolicyID *string `json:"policyId,omitempty"` 788 // InstanceType - Possible values include: 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeReverseReplicationProviderSpecificInput', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeA2A' 789 InstanceType InstanceTypeBasicReverseReplicationProviderSpecificInput `json:"instanceType,omitempty"` 790} 791 792// MarshalJSON is the custom marshaler for A2AReprotectInput. 793func (ari A2AReprotectInput) MarshalJSON() ([]byte, error) { 794 ari.InstanceType = InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeA2A 795 objectMap := make(map[string]interface{}) 796 if ari.RecoveryContainerID != nil { 797 objectMap["recoveryContainerId"] = ari.RecoveryContainerID 798 } 799 if ari.VMDisks != nil { 800 objectMap["vmDisks"] = ari.VMDisks 801 } 802 if ari.RecoveryResourceGroupID != nil { 803 objectMap["recoveryResourceGroupId"] = ari.RecoveryResourceGroupID 804 } 805 if ari.RecoveryCloudServiceID != nil { 806 objectMap["recoveryCloudServiceId"] = ari.RecoveryCloudServiceID 807 } 808 if ari.RecoveryAvailabilitySetID != nil { 809 objectMap["recoveryAvailabilitySetId"] = ari.RecoveryAvailabilitySetID 810 } 811 if ari.PolicyID != nil { 812 objectMap["policyId"] = ari.PolicyID 813 } 814 if ari.InstanceType != "" { 815 objectMap["instanceType"] = ari.InstanceType 816 } 817 return json.Marshal(objectMap) 818} 819 820// AsHyperVReplicaAzureReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for A2AReprotectInput. 821func (ari A2AReprotectInput) AsHyperVReplicaAzureReprotectInput() (*HyperVReplicaAzureReprotectInput, bool) { 822 return nil, false 823} 824 825// AsInMageAzureV2ReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for A2AReprotectInput. 826func (ari A2AReprotectInput) AsInMageAzureV2ReprotectInput() (*InMageAzureV2ReprotectInput, bool) { 827 return nil, false 828} 829 830// AsInMageReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for A2AReprotectInput. 831func (ari A2AReprotectInput) AsInMageReprotectInput() (*InMageReprotectInput, bool) { 832 return nil, false 833} 834 835// AsA2AReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for A2AReprotectInput. 836func (ari A2AReprotectInput) AsA2AReprotectInput() (*A2AReprotectInput, bool) { 837 return &ari, true 838} 839 840// AsReverseReplicationProviderSpecificInput is the BasicReverseReplicationProviderSpecificInput implementation for A2AReprotectInput. 841func (ari A2AReprotectInput) AsReverseReplicationProviderSpecificInput() (*ReverseReplicationProviderSpecificInput, bool) { 842 return nil, false 843} 844 845// AsBasicReverseReplicationProviderSpecificInput is the BasicReverseReplicationProviderSpecificInput implementation for A2AReprotectInput. 846func (ari A2AReprotectInput) AsBasicReverseReplicationProviderSpecificInput() (BasicReverseReplicationProviderSpecificInput, bool) { 847 return &ari, true 848} 849 850// A2ASwitchProtectionInput a2A specific switch protection input. 851type A2ASwitchProtectionInput struct { 852 // RecoveryContainerID - The recovery container Id. 853 RecoveryContainerID *string `json:"recoveryContainerId,omitempty"` 854 // VMDisks - The list of vm disk details. 855 VMDisks *[]A2AVMDiskInputDetails `json:"vmDisks,omitempty"` 856 // VMManagedDisks - The list of vm managed disk details. 857 VMManagedDisks *[]A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` 858 // RecoveryResourceGroupID - The recovery resource group Id. Valid for V2 scenarios. 859 RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"` 860 // RecoveryCloudServiceID - The recovery cloud service Id. Valid for V1 scenarios. 861 RecoveryCloudServiceID *string `json:"recoveryCloudServiceId,omitempty"` 862 // RecoveryAvailabilitySetID - The recovery availability set. 863 RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"` 864 // PolicyID - The Policy Id. 865 PolicyID *string `json:"policyId,omitempty"` 866 // InstanceType - Possible values include: 'InstanceTypeBasicSwitchProtectionProviderSpecificInputInstanceTypeSwitchProtectionProviderSpecificInput', 'InstanceTypeBasicSwitchProtectionProviderSpecificInputInstanceTypeA2A' 867 InstanceType InstanceTypeBasicSwitchProtectionProviderSpecificInput `json:"instanceType,omitempty"` 868} 869 870// MarshalJSON is the custom marshaler for A2ASwitchProtectionInput. 871func (aspi A2ASwitchProtectionInput) MarshalJSON() ([]byte, error) { 872 aspi.InstanceType = InstanceTypeBasicSwitchProtectionProviderSpecificInputInstanceTypeA2A 873 objectMap := make(map[string]interface{}) 874 if aspi.RecoveryContainerID != nil { 875 objectMap["recoveryContainerId"] = aspi.RecoveryContainerID 876 } 877 if aspi.VMDisks != nil { 878 objectMap["vmDisks"] = aspi.VMDisks 879 } 880 if aspi.VMManagedDisks != nil { 881 objectMap["vmManagedDisks"] = aspi.VMManagedDisks 882 } 883 if aspi.RecoveryResourceGroupID != nil { 884 objectMap["recoveryResourceGroupId"] = aspi.RecoveryResourceGroupID 885 } 886 if aspi.RecoveryCloudServiceID != nil { 887 objectMap["recoveryCloudServiceId"] = aspi.RecoveryCloudServiceID 888 } 889 if aspi.RecoveryAvailabilitySetID != nil { 890 objectMap["recoveryAvailabilitySetId"] = aspi.RecoveryAvailabilitySetID 891 } 892 if aspi.PolicyID != nil { 893 objectMap["policyId"] = aspi.PolicyID 894 } 895 if aspi.InstanceType != "" { 896 objectMap["instanceType"] = aspi.InstanceType 897 } 898 return json.Marshal(objectMap) 899} 900 901// AsA2ASwitchProtectionInput is the BasicSwitchProtectionProviderSpecificInput implementation for A2ASwitchProtectionInput. 902func (aspi A2ASwitchProtectionInput) AsA2ASwitchProtectionInput() (*A2ASwitchProtectionInput, bool) { 903 return &aspi, true 904} 905 906// AsSwitchProtectionProviderSpecificInput is the BasicSwitchProtectionProviderSpecificInput implementation for A2ASwitchProtectionInput. 907func (aspi A2ASwitchProtectionInput) AsSwitchProtectionProviderSpecificInput() (*SwitchProtectionProviderSpecificInput, bool) { 908 return nil, false 909} 910 911// AsBasicSwitchProtectionProviderSpecificInput is the BasicSwitchProtectionProviderSpecificInput implementation for A2ASwitchProtectionInput. 912func (aspi A2ASwitchProtectionInput) AsBasicSwitchProtectionProviderSpecificInput() (BasicSwitchProtectionProviderSpecificInput, bool) { 913 return &aspi, true 914} 915 916// A2AUpdateReplicationProtectedItemInput inMage Azure V2 input to update replication protected item. 917type A2AUpdateReplicationProtectedItemInput struct { 918 // RecoveryCloudServiceID - The target cloud service ARM Id (for V1). 919 RecoveryCloudServiceID *string `json:"recoveryCloudServiceId,omitempty"` 920 // RecoveryResourceGroupID - The target resource group ARM Id (for V2). 921 RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"` 922 // InstanceType - Possible values include: 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeUpdateReplicationProtectedItemProviderInput', 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeA2A' 923 InstanceType InstanceTypeBasicUpdateReplicationProtectedItemProviderInput `json:"instanceType,omitempty"` 924} 925 926// MarshalJSON is the custom marshaler for A2AUpdateReplicationProtectedItemInput. 927func (aurpii A2AUpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, error) { 928 aurpii.InstanceType = InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeA2A 929 objectMap := make(map[string]interface{}) 930 if aurpii.RecoveryCloudServiceID != nil { 931 objectMap["recoveryCloudServiceId"] = aurpii.RecoveryCloudServiceID 932 } 933 if aurpii.RecoveryResourceGroupID != nil { 934 objectMap["recoveryResourceGroupId"] = aurpii.RecoveryResourceGroupID 935 } 936 if aurpii.InstanceType != "" { 937 objectMap["instanceType"] = aurpii.InstanceType 938 } 939 return json.Marshal(objectMap) 940} 941 942// AsHyperVReplicaAzureUpdateReplicationProtectedItemInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for A2AUpdateReplicationProtectedItemInput. 943func (aurpii A2AUpdateReplicationProtectedItemInput) AsHyperVReplicaAzureUpdateReplicationProtectedItemInput() (*HyperVReplicaAzureUpdateReplicationProtectedItemInput, bool) { 944 return nil, false 945} 946 947// AsInMageAzureV2UpdateReplicationProtectedItemInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for A2AUpdateReplicationProtectedItemInput. 948func (aurpii A2AUpdateReplicationProtectedItemInput) AsInMageAzureV2UpdateReplicationProtectedItemInput() (*InMageAzureV2UpdateReplicationProtectedItemInput, bool) { 949 return nil, false 950} 951 952// AsA2AUpdateReplicationProtectedItemInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for A2AUpdateReplicationProtectedItemInput. 953func (aurpii A2AUpdateReplicationProtectedItemInput) AsA2AUpdateReplicationProtectedItemInput() (*A2AUpdateReplicationProtectedItemInput, bool) { 954 return &aurpii, true 955} 956 957// AsUpdateReplicationProtectedItemProviderInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for A2AUpdateReplicationProtectedItemInput. 958func (aurpii A2AUpdateReplicationProtectedItemInput) AsUpdateReplicationProtectedItemProviderInput() (*UpdateReplicationProtectedItemProviderInput, bool) { 959 return nil, false 960} 961 962// AsBasicUpdateReplicationProtectedItemProviderInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for A2AUpdateReplicationProtectedItemInput. 963func (aurpii A2AUpdateReplicationProtectedItemInput) AsBasicUpdateReplicationProtectedItemProviderInput() (BasicUpdateReplicationProtectedItemProviderInput, bool) { 964 return &aurpii, true 965} 966 967// A2AVMDiskInputDetails azure VM disk input details. 968type A2AVMDiskInputDetails struct { 969 // DiskURI - The disk Uri. 970 DiskURI *string `json:"diskUri,omitempty"` 971 // RecoveryAzureStorageAccountID - The recovery VHD storage account Id. 972 RecoveryAzureStorageAccountID *string `json:"recoveryAzureStorageAccountId,omitempty"` 973 // PrimaryStagingAzureStorageAccountID - The primary staging storage account Id. 974 PrimaryStagingAzureStorageAccountID *string `json:"primaryStagingAzureStorageAccountId,omitempty"` 975} 976 977// A2AVMManagedDiskInputDetails azure VM managed disk input details. 978type A2AVMManagedDiskInputDetails struct { 979 // DiskID - The disk Id. 980 DiskID *string `json:"diskId,omitempty"` 981 // PrimaryStagingAzureStorageAccountID - The primary staging storage account Arm Id. 982 PrimaryStagingAzureStorageAccountID *string `json:"primaryStagingAzureStorageAccountId,omitempty"` 983 // RecoveryResourceGroupID - The target resource group Arm Id. 984 RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"` 985} 986 987// AddVCenterRequest input required to add vCenter. 988type AddVCenterRequest struct { 989 // Properties - The properties of an add vCenter request. 990 Properties *AddVCenterRequestProperties `json:"properties,omitempty"` 991} 992 993// AddVCenterRequestProperties the properties of an add vCenter request. 994type AddVCenterRequestProperties struct { 995 // FriendlyName - The friendly name of the vCenter. 996 FriendlyName *string `json:"friendlyName,omitempty"` 997 // IPAddress - The IP address of the vCenter to be discovered. 998 IPAddress *string `json:"ipAddress,omitempty"` 999 // ProcessServerID - The process server Id from where the discovery is orchestrated. 1000 ProcessServerID *string `json:"processServerId,omitempty"` 1001 // Port - The port number for discovery. 1002 Port *string `json:"port,omitempty"` 1003 // RunAsAccountID - The account Id which has privileges to discover the vCenter. 1004 RunAsAccountID *string `json:"runAsAccountId,omitempty"` 1005} 1006 1007// Alert implements the Alert class. 1008type Alert struct { 1009 autorest.Response `json:"-"` 1010 // Properties - Alert related data. 1011 Properties *AlertProperties `json:"properties,omitempty"` 1012 // ID - READ-ONLY; Resource Id 1013 ID *string `json:"id,omitempty"` 1014 // Name - READ-ONLY; Resource Name 1015 Name *string `json:"name,omitempty"` 1016 // Type - READ-ONLY; Resource Type 1017 Type *string `json:"type,omitempty"` 1018 // Location - Resource Location 1019 Location *string `json:"location,omitempty"` 1020} 1021 1022// MarshalJSON is the custom marshaler for Alert. 1023func (a Alert) MarshalJSON() ([]byte, error) { 1024 objectMap := make(map[string]interface{}) 1025 if a.Properties != nil { 1026 objectMap["properties"] = a.Properties 1027 } 1028 if a.Location != nil { 1029 objectMap["location"] = a.Location 1030 } 1031 return json.Marshal(objectMap) 1032} 1033 1034// AlertCollection collection of alerts. 1035type AlertCollection struct { 1036 autorest.Response `json:"-"` 1037 // Value - The list of alerts. 1038 Value *[]Alert `json:"value,omitempty"` 1039 // NextLink - The value of next link. 1040 NextLink *string `json:"nextLink,omitempty"` 1041} 1042 1043// AlertCollectionIterator provides access to a complete listing of Alert values. 1044type AlertCollectionIterator struct { 1045 i int 1046 page AlertCollectionPage 1047} 1048 1049// NextWithContext advances to the next value. If there was an error making 1050// the request the iterator does not advance and the error is returned. 1051func (iter *AlertCollectionIterator) NextWithContext(ctx context.Context) (err error) { 1052 if tracing.IsEnabled() { 1053 ctx = tracing.StartSpan(ctx, fqdn+"/AlertCollectionIterator.NextWithContext") 1054 defer func() { 1055 sc := -1 1056 if iter.Response().Response.Response != nil { 1057 sc = iter.Response().Response.Response.StatusCode 1058 } 1059 tracing.EndSpan(ctx, sc, err) 1060 }() 1061 } 1062 iter.i++ 1063 if iter.i < len(iter.page.Values()) { 1064 return nil 1065 } 1066 err = iter.page.NextWithContext(ctx) 1067 if err != nil { 1068 iter.i-- 1069 return err 1070 } 1071 iter.i = 0 1072 return nil 1073} 1074 1075// Next advances to the next value. If there was an error making 1076// the request the iterator does not advance and the error is returned. 1077// Deprecated: Use NextWithContext() instead. 1078func (iter *AlertCollectionIterator) Next() error { 1079 return iter.NextWithContext(context.Background()) 1080} 1081 1082// NotDone returns true if the enumeration should be started or is not yet complete. 1083func (iter AlertCollectionIterator) NotDone() bool { 1084 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 1085} 1086 1087// Response returns the raw server response from the last page request. 1088func (iter AlertCollectionIterator) Response() AlertCollection { 1089 return iter.page.Response() 1090} 1091 1092// Value returns the current value or a zero-initialized value if the 1093// iterator has advanced beyond the end of the collection. 1094func (iter AlertCollectionIterator) Value() Alert { 1095 if !iter.page.NotDone() { 1096 return Alert{} 1097 } 1098 return iter.page.Values()[iter.i] 1099} 1100 1101// Creates a new instance of the AlertCollectionIterator type. 1102func NewAlertCollectionIterator(page AlertCollectionPage) AlertCollectionIterator { 1103 return AlertCollectionIterator{page: page} 1104} 1105 1106// IsEmpty returns true if the ListResult contains no values. 1107func (ac AlertCollection) IsEmpty() bool { 1108 return ac.Value == nil || len(*ac.Value) == 0 1109} 1110 1111// hasNextLink returns true if the NextLink is not empty. 1112func (ac AlertCollection) hasNextLink() bool { 1113 return ac.NextLink != nil && len(*ac.NextLink) != 0 1114} 1115 1116// alertCollectionPreparer prepares a request to retrieve the next set of results. 1117// It returns nil if no more results exist. 1118func (ac AlertCollection) alertCollectionPreparer(ctx context.Context) (*http.Request, error) { 1119 if !ac.hasNextLink() { 1120 return nil, nil 1121 } 1122 return autorest.Prepare((&http.Request{}).WithContext(ctx), 1123 autorest.AsJSON(), 1124 autorest.AsGet(), 1125 autorest.WithBaseURL(to.String(ac.NextLink))) 1126} 1127 1128// AlertCollectionPage contains a page of Alert values. 1129type AlertCollectionPage struct { 1130 fn func(context.Context, AlertCollection) (AlertCollection, error) 1131 ac AlertCollection 1132} 1133 1134// NextWithContext advances to the next page of values. If there was an error making 1135// the request the page does not advance and the error is returned. 1136func (page *AlertCollectionPage) NextWithContext(ctx context.Context) (err error) { 1137 if tracing.IsEnabled() { 1138 ctx = tracing.StartSpan(ctx, fqdn+"/AlertCollectionPage.NextWithContext") 1139 defer func() { 1140 sc := -1 1141 if page.Response().Response.Response != nil { 1142 sc = page.Response().Response.Response.StatusCode 1143 } 1144 tracing.EndSpan(ctx, sc, err) 1145 }() 1146 } 1147 for { 1148 next, err := page.fn(ctx, page.ac) 1149 if err != nil { 1150 return err 1151 } 1152 page.ac = next 1153 if !next.hasNextLink() || !next.IsEmpty() { 1154 break 1155 } 1156 } 1157 return nil 1158} 1159 1160// Next advances to the next page of values. If there was an error making 1161// the request the page does not advance and the error is returned. 1162// Deprecated: Use NextWithContext() instead. 1163func (page *AlertCollectionPage) Next() error { 1164 return page.NextWithContext(context.Background()) 1165} 1166 1167// NotDone returns true if the page enumeration should be started or is not yet complete. 1168func (page AlertCollectionPage) NotDone() bool { 1169 return !page.ac.IsEmpty() 1170} 1171 1172// Response returns the raw server response from the last page request. 1173func (page AlertCollectionPage) Response() AlertCollection { 1174 return page.ac 1175} 1176 1177// Values returns the slice of values for the current page or nil if there are no values. 1178func (page AlertCollectionPage) Values() []Alert { 1179 if page.ac.IsEmpty() { 1180 return nil 1181 } 1182 return *page.ac.Value 1183} 1184 1185// Creates a new instance of the AlertCollectionPage type. 1186func NewAlertCollectionPage(cur AlertCollection, getNextPage func(context.Context, AlertCollection) (AlertCollection, error)) AlertCollectionPage { 1187 return AlertCollectionPage{ 1188 fn: getNextPage, 1189 ac: cur, 1190 } 1191} 1192 1193// AlertProperties the properties of an alert. 1194type AlertProperties struct { 1195 // SendToOwners - A value indicating whether to send email to subscription administrator. 1196 SendToOwners *string `json:"sendToOwners,omitempty"` 1197 // CustomEmailAddresses - The custom email address for sending emails. 1198 CustomEmailAddresses *[]string `json:"customEmailAddresses,omitempty"` 1199 // Locale - The locale for the email notification. 1200 Locale *string `json:"locale,omitempty"` 1201} 1202 1203// ApplyRecoveryPointInput input to apply recovery point. 1204type ApplyRecoveryPointInput struct { 1205 // Properties - The input properties to apply recovery point. 1206 Properties *ApplyRecoveryPointInputProperties `json:"properties,omitempty"` 1207} 1208 1209// ApplyRecoveryPointInputProperties input properties to apply recovery point. 1210type ApplyRecoveryPointInputProperties struct { 1211 // RecoveryPointID - The recovery point Id. 1212 RecoveryPointID *string `json:"recoveryPointId,omitempty"` 1213 // ProviderSpecificDetails - Provider specific input for applying recovery point. 1214 ProviderSpecificDetails BasicApplyRecoveryPointProviderSpecificInput `json:"providerSpecificDetails,omitempty"` 1215} 1216 1217// UnmarshalJSON is the custom unmarshaler for ApplyRecoveryPointInputProperties struct. 1218func (arpip *ApplyRecoveryPointInputProperties) UnmarshalJSON(body []byte) error { 1219 var m map[string]*json.RawMessage 1220 err := json.Unmarshal(body, &m) 1221 if err != nil { 1222 return err 1223 } 1224 for k, v := range m { 1225 switch k { 1226 case "recoveryPointId": 1227 if v != nil { 1228 var recoveryPointID string 1229 err = json.Unmarshal(*v, &recoveryPointID) 1230 if err != nil { 1231 return err 1232 } 1233 arpip.RecoveryPointID = &recoveryPointID 1234 } 1235 case "providerSpecificDetails": 1236 if v != nil { 1237 providerSpecificDetails, err := unmarshalBasicApplyRecoveryPointProviderSpecificInput(*v) 1238 if err != nil { 1239 return err 1240 } 1241 arpip.ProviderSpecificDetails = providerSpecificDetails 1242 } 1243 } 1244 } 1245 1246 return nil 1247} 1248 1249// BasicApplyRecoveryPointProviderSpecificInput provider specific input for apply recovery point. 1250type BasicApplyRecoveryPointProviderSpecificInput interface { 1251 AsHyperVReplicaAzureApplyRecoveryPointInput() (*HyperVReplicaAzureApplyRecoveryPointInput, bool) 1252 AsInMageAzureV2ApplyRecoveryPointInput() (*InMageAzureV2ApplyRecoveryPointInput, bool) 1253 AsA2AApplyRecoveryPointInput() (*A2AApplyRecoveryPointInput, bool) 1254 AsApplyRecoveryPointProviderSpecificInput() (*ApplyRecoveryPointProviderSpecificInput, bool) 1255} 1256 1257// ApplyRecoveryPointProviderSpecificInput provider specific input for apply recovery point. 1258type ApplyRecoveryPointProviderSpecificInput struct { 1259 // InstanceType - Possible values include: 'InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeApplyRecoveryPointProviderSpecificInput', 'InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeA2A' 1260 InstanceType InstanceTypeBasicApplyRecoveryPointProviderSpecificInput `json:"instanceType,omitempty"` 1261} 1262 1263func unmarshalBasicApplyRecoveryPointProviderSpecificInput(body []byte) (BasicApplyRecoveryPointProviderSpecificInput, error) { 1264 var m map[string]interface{} 1265 err := json.Unmarshal(body, &m) 1266 if err != nil { 1267 return nil, err 1268 } 1269 1270 switch m["instanceType"] { 1271 case string(InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeHyperVReplicaAzure): 1272 var hvraarpi HyperVReplicaAzureApplyRecoveryPointInput 1273 err := json.Unmarshal(body, &hvraarpi) 1274 return hvraarpi, err 1275 case string(InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeInMageAzureV2): 1276 var imavarpi InMageAzureV2ApplyRecoveryPointInput 1277 err := json.Unmarshal(body, &imavarpi) 1278 return imavarpi, err 1279 case string(InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeA2A): 1280 var aarpi A2AApplyRecoveryPointInput 1281 err := json.Unmarshal(body, &aarpi) 1282 return aarpi, err 1283 default: 1284 var arppsi ApplyRecoveryPointProviderSpecificInput 1285 err := json.Unmarshal(body, &arppsi) 1286 return arppsi, err 1287 } 1288} 1289func unmarshalBasicApplyRecoveryPointProviderSpecificInputArray(body []byte) ([]BasicApplyRecoveryPointProviderSpecificInput, error) { 1290 var rawMessages []*json.RawMessage 1291 err := json.Unmarshal(body, &rawMessages) 1292 if err != nil { 1293 return nil, err 1294 } 1295 1296 arppsiArray := make([]BasicApplyRecoveryPointProviderSpecificInput, len(rawMessages)) 1297 1298 for index, rawMessage := range rawMessages { 1299 arppsi, err := unmarshalBasicApplyRecoveryPointProviderSpecificInput(*rawMessage) 1300 if err != nil { 1301 return nil, err 1302 } 1303 arppsiArray[index] = arppsi 1304 } 1305 return arppsiArray, nil 1306} 1307 1308// MarshalJSON is the custom marshaler for ApplyRecoveryPointProviderSpecificInput. 1309func (arppsi ApplyRecoveryPointProviderSpecificInput) MarshalJSON() ([]byte, error) { 1310 arppsi.InstanceType = InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeApplyRecoveryPointProviderSpecificInput 1311 objectMap := make(map[string]interface{}) 1312 if arppsi.InstanceType != "" { 1313 objectMap["instanceType"] = arppsi.InstanceType 1314 } 1315 return json.Marshal(objectMap) 1316} 1317 1318// AsHyperVReplicaAzureApplyRecoveryPointInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for ApplyRecoveryPointProviderSpecificInput. 1319func (arppsi ApplyRecoveryPointProviderSpecificInput) AsHyperVReplicaAzureApplyRecoveryPointInput() (*HyperVReplicaAzureApplyRecoveryPointInput, bool) { 1320 return nil, false 1321} 1322 1323// AsInMageAzureV2ApplyRecoveryPointInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for ApplyRecoveryPointProviderSpecificInput. 1324func (arppsi ApplyRecoveryPointProviderSpecificInput) AsInMageAzureV2ApplyRecoveryPointInput() (*InMageAzureV2ApplyRecoveryPointInput, bool) { 1325 return nil, false 1326} 1327 1328// AsA2AApplyRecoveryPointInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for ApplyRecoveryPointProviderSpecificInput. 1329func (arppsi ApplyRecoveryPointProviderSpecificInput) AsA2AApplyRecoveryPointInput() (*A2AApplyRecoveryPointInput, bool) { 1330 return nil, false 1331} 1332 1333// AsApplyRecoveryPointProviderSpecificInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for ApplyRecoveryPointProviderSpecificInput. 1334func (arppsi ApplyRecoveryPointProviderSpecificInput) AsApplyRecoveryPointProviderSpecificInput() (*ApplyRecoveryPointProviderSpecificInput, bool) { 1335 return &arppsi, true 1336} 1337 1338// AsBasicApplyRecoveryPointProviderSpecificInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for ApplyRecoveryPointProviderSpecificInput. 1339func (arppsi ApplyRecoveryPointProviderSpecificInput) AsBasicApplyRecoveryPointProviderSpecificInput() (BasicApplyRecoveryPointProviderSpecificInput, bool) { 1340 return &arppsi, true 1341} 1342 1343// ARMException ARM inner exception class. 1344type ARMException struct { 1345 // Code - Gets HTTP status code for the error. 1346 Code *string `json:"code,omitempty"` 1347 // Message - Gets exception message. 1348 Message *string `json:"message,omitempty"` 1349 // Target - Gets exception target. 1350 Target *string `json:"target,omitempty"` 1351 // Details - Gets service based error details. 1352 Details *[]ARMExceptionDetails `json:"details,omitempty"` 1353 // Innererror - Gets private data for service debugging. 1354 Innererror *ARMInnerError `json:"innererror,omitempty"` 1355} 1356 1357// ARMExceptionDetails service based exception details. 1358type ARMExceptionDetails struct { 1359 // Code - Gets service error code. 1360 Code *string `json:"code,omitempty"` 1361 // Message - Gets error message. 1362 Message *string `json:"message,omitempty"` 1363 // PossibleCauses - Gets possible cause for error. 1364 PossibleCauses *string `json:"possibleCauses,omitempty"` 1365 // RecommendedAction - Gets recommended action for the error. 1366 RecommendedAction *string `json:"recommendedAction,omitempty"` 1367 // ClientRequestID - Gets the client request Id for the session. 1368 ClientRequestID *string `json:"clientRequestId,omitempty"` 1369 // ActivityID - Gets the activity Id for the session. 1370 ActivityID *string `json:"activityId,omitempty"` 1371 // Target - Gets exception target. 1372 Target *string `json:"target,omitempty"` 1373} 1374 1375// ARMInnerError ARM internal error class for providing additional debug data. 1376type ARMInnerError struct { 1377 // Trace - Gets complete stack trace of the exception. 1378 Trace *string `json:"trace,omitempty"` 1379 // Source - Gets exception source. 1380 Source *string `json:"source,omitempty"` 1381 // MethodStatus - Gets data related to method which threw the exception. 1382 MethodStatus *MethodCallStatus `json:"methodStatus,omitempty"` 1383 // CloudID - Gets cloud Id in exception. 1384 CloudID *string `json:"cloudId,omitempty"` 1385 // HVHostID - Gets hyperV host ID. 1386 HVHostID *string `json:"hVHostId,omitempty"` 1387 // HVClusterID - Gets hyperV cluster Id. 1388 HVClusterID *string `json:"hVClusterId,omitempty"` 1389 // NetworkID - Gets network Id. 1390 NetworkID *string `json:"networkId,omitempty"` 1391 // VMID - Gets Vm Id. 1392 VMID *string `json:"vmId,omitempty"` 1393 // FabricID - Gets Fabric Id. 1394 FabricID *string `json:"fabricId,omitempty"` 1395 // LiveID - Gets Live Id of the caller. 1396 LiveID *string `json:"liveId,omitempty"` 1397 // ContainerID - Gets container Id of the caller. 1398 ContainerID *string `json:"containerId,omitempty"` 1399 // ResourceID - Gets resource id used in the call. 1400 ResourceID *string `json:"resourceId,omitempty"` 1401 // ResourceName - Gets caller resource name. 1402 ResourceName *string `json:"resourceName,omitempty"` 1403 // SubscriptionID - Gets subscription Id. 1404 SubscriptionID *string `json:"subscriptionId,omitempty"` 1405 // SerializedSRSLogContext - Gets serialized SRS log context. 1406 SerializedSRSLogContext *string `json:"serializedSRSLogContext,omitempty"` 1407} 1408 1409// AsrJobDetails this class represents job details based on specific job type. 1410type AsrJobDetails struct { 1411 // AffectedObjectDetails - The affected object properties like source server, source cloud, target server, target cloud etc. based on the workflow object details. 1412 AffectedObjectDetails map[string]*string `json:"affectedObjectDetails"` 1413 // InstanceType - Possible values include: 'InstanceTypeJobDetails', 'InstanceTypeAsrJobDetails', 'InstanceTypeTestFailoverJobDetails', 'InstanceTypeFailoverJobDetails', 'InstanceTypeExportJobDetails', 'InstanceTypeSwitchProtectionJobDetails' 1414 InstanceType InstanceTypeBasicJobDetails `json:"instanceType,omitempty"` 1415} 1416 1417// MarshalJSON is the custom marshaler for AsrJobDetails. 1418func (ajd AsrJobDetails) MarshalJSON() ([]byte, error) { 1419 ajd.InstanceType = InstanceTypeAsrJobDetails 1420 objectMap := make(map[string]interface{}) 1421 if ajd.AffectedObjectDetails != nil { 1422 objectMap["affectedObjectDetails"] = ajd.AffectedObjectDetails 1423 } 1424 if ajd.InstanceType != "" { 1425 objectMap["instanceType"] = ajd.InstanceType 1426 } 1427 return json.Marshal(objectMap) 1428} 1429 1430// AsAsrJobDetails is the BasicJobDetails implementation for AsrJobDetails. 1431func (ajd AsrJobDetails) AsAsrJobDetails() (*AsrJobDetails, bool) { 1432 return &ajd, true 1433} 1434 1435// AsTestFailoverJobDetails is the BasicJobDetails implementation for AsrJobDetails. 1436func (ajd AsrJobDetails) AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool) { 1437 return nil, false 1438} 1439 1440// AsFailoverJobDetails is the BasicJobDetails implementation for AsrJobDetails. 1441func (ajd AsrJobDetails) AsFailoverJobDetails() (*FailoverJobDetails, bool) { 1442 return nil, false 1443} 1444 1445// AsExportJobDetails is the BasicJobDetails implementation for AsrJobDetails. 1446func (ajd AsrJobDetails) AsExportJobDetails() (*ExportJobDetails, bool) { 1447 return nil, false 1448} 1449 1450// AsSwitchProtectionJobDetails is the BasicJobDetails implementation for AsrJobDetails. 1451func (ajd AsrJobDetails) AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool) { 1452 return nil, false 1453} 1454 1455// AsJobDetails is the BasicJobDetails implementation for AsrJobDetails. 1456func (ajd AsrJobDetails) AsJobDetails() (*JobDetails, bool) { 1457 return nil, false 1458} 1459 1460// AsBasicJobDetails is the BasicJobDetails implementation for AsrJobDetails. 1461func (ajd AsrJobDetails) AsBasicJobDetails() (BasicJobDetails, bool) { 1462 return &ajd, true 1463} 1464 1465// ASRTask task of the Job. 1466type ASRTask struct { 1467 // TaskID - The Id. 1468 TaskID *string `json:"taskId,omitempty"` 1469 // Name - The unique Task name. 1470 Name *string `json:"name,omitempty"` 1471 // StartTime - The start time. 1472 StartTime *date.Time `json:"startTime,omitempty"` 1473 // EndTime - The end time. 1474 EndTime *date.Time `json:"endTime,omitempty"` 1475 // AllowedActions - The state/actions applicable on this task. 1476 AllowedActions *[]string `json:"allowedActions,omitempty"` 1477 // FriendlyName - The name. 1478 FriendlyName *string `json:"friendlyName,omitempty"` 1479 // State - The State. It is one of these values - NotStarted, InProgress, Succeeded, Failed, Cancelled, Suspended or Other. 1480 State *string `json:"state,omitempty"` 1481 // StateDescription - The description of the task state. For example - For Succeeded state, description can be Completed, PartiallySucceeded, CompletedWithInformation or Skipped. 1482 StateDescription *string `json:"stateDescription,omitempty"` 1483 // TaskType - The type of task. Details in CustomDetails property depend on this type. 1484 TaskType *string `json:"taskType,omitempty"` 1485 // CustomDetails - The custom task details based on the task type. 1486 CustomDetails BasicTaskTypeDetails `json:"customDetails,omitempty"` 1487 // GroupTaskCustomDetails - The custom task details based on the task type, if the task type is GroupTaskDetails or one of the types derived from it. 1488 GroupTaskCustomDetails BasicGroupTaskDetails `json:"groupTaskCustomDetails,omitempty"` 1489 // Errors - The task error details. 1490 Errors *[]JobErrorDetails `json:"errors,omitempty"` 1491} 1492 1493// UnmarshalJSON is the custom unmarshaler for ASRTask struct. 1494func (at *ASRTask) UnmarshalJSON(body []byte) error { 1495 var m map[string]*json.RawMessage 1496 err := json.Unmarshal(body, &m) 1497 if err != nil { 1498 return err 1499 } 1500 for k, v := range m { 1501 switch k { 1502 case "taskId": 1503 if v != nil { 1504 var taskID string 1505 err = json.Unmarshal(*v, &taskID) 1506 if err != nil { 1507 return err 1508 } 1509 at.TaskID = &taskID 1510 } 1511 case "name": 1512 if v != nil { 1513 var name string 1514 err = json.Unmarshal(*v, &name) 1515 if err != nil { 1516 return err 1517 } 1518 at.Name = &name 1519 } 1520 case "startTime": 1521 if v != nil { 1522 var startTime date.Time 1523 err = json.Unmarshal(*v, &startTime) 1524 if err != nil { 1525 return err 1526 } 1527 at.StartTime = &startTime 1528 } 1529 case "endTime": 1530 if v != nil { 1531 var endTime date.Time 1532 err = json.Unmarshal(*v, &endTime) 1533 if err != nil { 1534 return err 1535 } 1536 at.EndTime = &endTime 1537 } 1538 case "allowedActions": 1539 if v != nil { 1540 var allowedActions []string 1541 err = json.Unmarshal(*v, &allowedActions) 1542 if err != nil { 1543 return err 1544 } 1545 at.AllowedActions = &allowedActions 1546 } 1547 case "friendlyName": 1548 if v != nil { 1549 var friendlyName string 1550 err = json.Unmarshal(*v, &friendlyName) 1551 if err != nil { 1552 return err 1553 } 1554 at.FriendlyName = &friendlyName 1555 } 1556 case "state": 1557 if v != nil { 1558 var state string 1559 err = json.Unmarshal(*v, &state) 1560 if err != nil { 1561 return err 1562 } 1563 at.State = &state 1564 } 1565 case "stateDescription": 1566 if v != nil { 1567 var stateDescription string 1568 err = json.Unmarshal(*v, &stateDescription) 1569 if err != nil { 1570 return err 1571 } 1572 at.StateDescription = &stateDescription 1573 } 1574 case "taskType": 1575 if v != nil { 1576 var taskType string 1577 err = json.Unmarshal(*v, &taskType) 1578 if err != nil { 1579 return err 1580 } 1581 at.TaskType = &taskType 1582 } 1583 case "customDetails": 1584 if v != nil { 1585 customDetails, err := unmarshalBasicTaskTypeDetails(*v) 1586 if err != nil { 1587 return err 1588 } 1589 at.CustomDetails = customDetails 1590 } 1591 case "groupTaskCustomDetails": 1592 if v != nil { 1593 groupTaskCustomDetails, err := unmarshalBasicGroupTaskDetails(*v) 1594 if err != nil { 1595 return err 1596 } 1597 at.GroupTaskCustomDetails = groupTaskCustomDetails 1598 } 1599 case "errors": 1600 if v != nil { 1601 var errorsVar []JobErrorDetails 1602 err = json.Unmarshal(*v, &errorsVar) 1603 if err != nil { 1604 return err 1605 } 1606 at.Errors = &errorsVar 1607 } 1608 } 1609 } 1610 1611 return nil 1612} 1613 1614// AutomationRunbookTaskDetails this class represents the task details for an automation runbook. 1615type AutomationRunbookTaskDetails struct { 1616 // Name - The recovery plan task name. 1617 Name *string `json:"name,omitempty"` 1618 // CloudServiceName - The cloud service of the automation runbook account. 1619 CloudServiceName *string `json:"cloudServiceName,omitempty"` 1620 // SubscriptionID - The subscription Id of the automation runbook account. 1621 SubscriptionID *string `json:"subscriptionId,omitempty"` 1622 // AccountName - The automation account name of the runbook. 1623 AccountName *string `json:"accountName,omitempty"` 1624 // RunbookID - The runbook Id. 1625 RunbookID *string `json:"runbookId,omitempty"` 1626 // RunbookName - The runbook name. 1627 RunbookName *string `json:"runbookName,omitempty"` 1628 // JobID - The job Id of the runbook execution. 1629 JobID *string `json:"jobId,omitempty"` 1630 // JobOutput - The execution output of the runbook. 1631 JobOutput *string `json:"jobOutput,omitempty"` 1632 // IsPrimarySideScript - A value indicating whether it is a primary side script or not. 1633 IsPrimarySideScript *bool `json:"isPrimarySideScript,omitempty"` 1634 // InstanceType - Possible values include: 'InstanceTypeTaskTypeDetails', 'InstanceTypeJobTaskDetails', 'InstanceTypeVirtualMachineTaskDetails', 'InstanceTypeFabricReplicationGroupTaskDetails', 'InstanceTypeManualActionTaskDetails', 'InstanceTypeScriptActionTaskDetails', 'InstanceTypeVMNicUpdatesTaskDetails', 'InstanceTypeConsistencyCheckTaskDetails', 'InstanceTypeAutomationRunbookTaskDetails' 1635 InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"` 1636} 1637 1638// MarshalJSON is the custom marshaler for AutomationRunbookTaskDetails. 1639func (artd AutomationRunbookTaskDetails) MarshalJSON() ([]byte, error) { 1640 artd.InstanceType = InstanceTypeAutomationRunbookTaskDetails 1641 objectMap := make(map[string]interface{}) 1642 if artd.Name != nil { 1643 objectMap["name"] = artd.Name 1644 } 1645 if artd.CloudServiceName != nil { 1646 objectMap["cloudServiceName"] = artd.CloudServiceName 1647 } 1648 if artd.SubscriptionID != nil { 1649 objectMap["subscriptionId"] = artd.SubscriptionID 1650 } 1651 if artd.AccountName != nil { 1652 objectMap["accountName"] = artd.AccountName 1653 } 1654 if artd.RunbookID != nil { 1655 objectMap["runbookId"] = artd.RunbookID 1656 } 1657 if artd.RunbookName != nil { 1658 objectMap["runbookName"] = artd.RunbookName 1659 } 1660 if artd.JobID != nil { 1661 objectMap["jobId"] = artd.JobID 1662 } 1663 if artd.JobOutput != nil { 1664 objectMap["jobOutput"] = artd.JobOutput 1665 } 1666 if artd.IsPrimarySideScript != nil { 1667 objectMap["isPrimarySideScript"] = artd.IsPrimarySideScript 1668 } 1669 if artd.InstanceType != "" { 1670 objectMap["instanceType"] = artd.InstanceType 1671 } 1672 return json.Marshal(objectMap) 1673} 1674 1675// AsJobTaskDetails is the BasicTaskTypeDetails implementation for AutomationRunbookTaskDetails. 1676func (artd AutomationRunbookTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) { 1677 return nil, false 1678} 1679 1680// AsVirtualMachineTaskDetails is the BasicTaskTypeDetails implementation for AutomationRunbookTaskDetails. 1681func (artd AutomationRunbookTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) { 1682 return nil, false 1683} 1684 1685// AsFabricReplicationGroupTaskDetails is the BasicTaskTypeDetails implementation for AutomationRunbookTaskDetails. 1686func (artd AutomationRunbookTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) { 1687 return nil, false 1688} 1689 1690// AsManualActionTaskDetails is the BasicTaskTypeDetails implementation for AutomationRunbookTaskDetails. 1691func (artd AutomationRunbookTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) { 1692 return nil, false 1693} 1694 1695// AsScriptActionTaskDetails is the BasicTaskTypeDetails implementation for AutomationRunbookTaskDetails. 1696func (artd AutomationRunbookTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) { 1697 return nil, false 1698} 1699 1700// AsVMNicUpdatesTaskDetails is the BasicTaskTypeDetails implementation for AutomationRunbookTaskDetails. 1701func (artd AutomationRunbookTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) { 1702 return nil, false 1703} 1704 1705// AsConsistencyCheckTaskDetails is the BasicTaskTypeDetails implementation for AutomationRunbookTaskDetails. 1706func (artd AutomationRunbookTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) { 1707 return nil, false 1708} 1709 1710// AsAutomationRunbookTaskDetails is the BasicTaskTypeDetails implementation for AutomationRunbookTaskDetails. 1711func (artd AutomationRunbookTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) { 1712 return &artd, true 1713} 1714 1715// AsTaskTypeDetails is the BasicTaskTypeDetails implementation for AutomationRunbookTaskDetails. 1716func (artd AutomationRunbookTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) { 1717 return nil, false 1718} 1719 1720// AsBasicTaskTypeDetails is the BasicTaskTypeDetails implementation for AutomationRunbookTaskDetails. 1721func (artd AutomationRunbookTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) { 1722 return &artd, true 1723} 1724 1725// AzureFabricCreationInput fabric provider specific settings. 1726type AzureFabricCreationInput struct { 1727 // Location - The Location. 1728 Location *string `json:"location,omitempty"` 1729 // InstanceType - Possible values include: 'InstanceTypeFabricSpecificCreationInput', 'InstanceTypeAzure', 'InstanceTypeVMwareV2' 1730 InstanceType InstanceTypeBasicFabricSpecificCreationInput `json:"instanceType,omitempty"` 1731} 1732 1733// MarshalJSON is the custom marshaler for AzureFabricCreationInput. 1734func (afci AzureFabricCreationInput) MarshalJSON() ([]byte, error) { 1735 afci.InstanceType = InstanceTypeAzure 1736 objectMap := make(map[string]interface{}) 1737 if afci.Location != nil { 1738 objectMap["location"] = afci.Location 1739 } 1740 if afci.InstanceType != "" { 1741 objectMap["instanceType"] = afci.InstanceType 1742 } 1743 return json.Marshal(objectMap) 1744} 1745 1746// AsAzureFabricCreationInput is the BasicFabricSpecificCreationInput implementation for AzureFabricCreationInput. 1747func (afci AzureFabricCreationInput) AsAzureFabricCreationInput() (*AzureFabricCreationInput, bool) { 1748 return &afci, true 1749} 1750 1751// AsVMwareV2FabricCreationInput is the BasicFabricSpecificCreationInput implementation for AzureFabricCreationInput. 1752func (afci AzureFabricCreationInput) AsVMwareV2FabricCreationInput() (*VMwareV2FabricCreationInput, bool) { 1753 return nil, false 1754} 1755 1756// AsFabricSpecificCreationInput is the BasicFabricSpecificCreationInput implementation for AzureFabricCreationInput. 1757func (afci AzureFabricCreationInput) AsFabricSpecificCreationInput() (*FabricSpecificCreationInput, bool) { 1758 return nil, false 1759} 1760 1761// AsBasicFabricSpecificCreationInput is the BasicFabricSpecificCreationInput implementation for AzureFabricCreationInput. 1762func (afci AzureFabricCreationInput) AsBasicFabricSpecificCreationInput() (BasicFabricSpecificCreationInput, bool) { 1763 return &afci, true 1764} 1765 1766// AzureFabricSpecificDetails azure Fabric Specific Details. 1767type AzureFabricSpecificDetails struct { 1768 // Location - The Location for the Azure fabric. 1769 Location *string `json:"location,omitempty"` 1770 // ContainerIds - The container Ids for the Azure fabric. 1771 ContainerIds *[]string `json:"containerIds,omitempty"` 1772 // InstanceType - Possible values include: 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeFabricSpecificDetails', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeAzure', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMM', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeHyperVSite', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMware', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMwareV2' 1773 InstanceType InstanceTypeBasicFabricSpecificDetails `json:"instanceType,omitempty"` 1774} 1775 1776// MarshalJSON is the custom marshaler for AzureFabricSpecificDetails. 1777func (afsd AzureFabricSpecificDetails) MarshalJSON() ([]byte, error) { 1778 afsd.InstanceType = InstanceTypeBasicFabricSpecificDetailsInstanceTypeAzure 1779 objectMap := make(map[string]interface{}) 1780 if afsd.Location != nil { 1781 objectMap["location"] = afsd.Location 1782 } 1783 if afsd.ContainerIds != nil { 1784 objectMap["containerIds"] = afsd.ContainerIds 1785 } 1786 if afsd.InstanceType != "" { 1787 objectMap["instanceType"] = afsd.InstanceType 1788 } 1789 return json.Marshal(objectMap) 1790} 1791 1792// AsAzureFabricSpecificDetails is the BasicFabricSpecificDetails implementation for AzureFabricSpecificDetails. 1793func (afsd AzureFabricSpecificDetails) AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool) { 1794 return &afsd, true 1795} 1796 1797// AsVmmDetails is the BasicFabricSpecificDetails implementation for AzureFabricSpecificDetails. 1798func (afsd AzureFabricSpecificDetails) AsVmmDetails() (*VmmDetails, bool) { 1799 return nil, false 1800} 1801 1802// AsHyperVSiteDetails is the BasicFabricSpecificDetails implementation for AzureFabricSpecificDetails. 1803func (afsd AzureFabricSpecificDetails) AsHyperVSiteDetails() (*HyperVSiteDetails, bool) { 1804 return nil, false 1805} 1806 1807// AsVMwareDetails is the BasicFabricSpecificDetails implementation for AzureFabricSpecificDetails. 1808func (afsd AzureFabricSpecificDetails) AsVMwareDetails() (*VMwareDetails, bool) { 1809 return nil, false 1810} 1811 1812// AsVMwareV2FabricSpecificDetails is the BasicFabricSpecificDetails implementation for AzureFabricSpecificDetails. 1813func (afsd AzureFabricSpecificDetails) AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool) { 1814 return nil, false 1815} 1816 1817// AsFabricSpecificDetails is the BasicFabricSpecificDetails implementation for AzureFabricSpecificDetails. 1818func (afsd AzureFabricSpecificDetails) AsFabricSpecificDetails() (*FabricSpecificDetails, bool) { 1819 return nil, false 1820} 1821 1822// AsBasicFabricSpecificDetails is the BasicFabricSpecificDetails implementation for AzureFabricSpecificDetails. 1823func (afsd AzureFabricSpecificDetails) AsBasicFabricSpecificDetails() (BasicFabricSpecificDetails, bool) { 1824 return &afsd, true 1825} 1826 1827// AzureToAzureCreateNetworkMappingInput create network mappings input properties/behavior specific to 1828// Azure to Azure Network mapping. 1829type AzureToAzureCreateNetworkMappingInput struct { 1830 // PrimaryNetworkID - The primary azure vnet Id. 1831 PrimaryNetworkID *string `json:"primaryNetworkId,omitempty"` 1832 // InstanceType - Possible values include: 'InstanceTypeFabricSpecificCreateNetworkMappingInput', 'InstanceTypeAzureToAzure', 'InstanceTypeVmmToAzure', 'InstanceTypeVmmToVmm' 1833 InstanceType InstanceTypeBasicFabricSpecificCreateNetworkMappingInput `json:"instanceType,omitempty"` 1834} 1835 1836// MarshalJSON is the custom marshaler for AzureToAzureCreateNetworkMappingInput. 1837func (atacnmi AzureToAzureCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { 1838 atacnmi.InstanceType = InstanceTypeAzureToAzure 1839 objectMap := make(map[string]interface{}) 1840 if atacnmi.PrimaryNetworkID != nil { 1841 objectMap["primaryNetworkId"] = atacnmi.PrimaryNetworkID 1842 } 1843 if atacnmi.InstanceType != "" { 1844 objectMap["instanceType"] = atacnmi.InstanceType 1845 } 1846 return json.Marshal(objectMap) 1847} 1848 1849// AsAzureToAzureCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for AzureToAzureCreateNetworkMappingInput. 1850func (atacnmi AzureToAzureCreateNetworkMappingInput) AsAzureToAzureCreateNetworkMappingInput() (*AzureToAzureCreateNetworkMappingInput, bool) { 1851 return &atacnmi, true 1852} 1853 1854// AsVmmToAzureCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for AzureToAzureCreateNetworkMappingInput. 1855func (atacnmi AzureToAzureCreateNetworkMappingInput) AsVmmToAzureCreateNetworkMappingInput() (*VmmToAzureCreateNetworkMappingInput, bool) { 1856 return nil, false 1857} 1858 1859// AsVmmToVmmCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for AzureToAzureCreateNetworkMappingInput. 1860func (atacnmi AzureToAzureCreateNetworkMappingInput) AsVmmToVmmCreateNetworkMappingInput() (*VmmToVmmCreateNetworkMappingInput, bool) { 1861 return nil, false 1862} 1863 1864// AsFabricSpecificCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for AzureToAzureCreateNetworkMappingInput. 1865func (atacnmi AzureToAzureCreateNetworkMappingInput) AsFabricSpecificCreateNetworkMappingInput() (*FabricSpecificCreateNetworkMappingInput, bool) { 1866 return nil, false 1867} 1868 1869// AsBasicFabricSpecificCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for AzureToAzureCreateNetworkMappingInput. 1870func (atacnmi AzureToAzureCreateNetworkMappingInput) AsBasicFabricSpecificCreateNetworkMappingInput() (BasicFabricSpecificCreateNetworkMappingInput, bool) { 1871 return &atacnmi, true 1872} 1873 1874// AzureToAzureNetworkMappingSettings a2A Network Mapping fabric specific settings. 1875type AzureToAzureNetworkMappingSettings struct { 1876 // PrimaryFabricLocation - The primary fabric location. 1877 PrimaryFabricLocation *string `json:"primaryFabricLocation,omitempty"` 1878 // RecoveryFabricLocation - The recovery fabric location. 1879 RecoveryFabricLocation *string `json:"recoveryFabricLocation,omitempty"` 1880 // InstanceType - Possible values include: 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeNetworkMappingFabricSpecificSettings', 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeAzureToAzure', 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToAzure', 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToVmm' 1881 InstanceType InstanceTypeBasicNetworkMappingFabricSpecificSettings `json:"instanceType,omitempty"` 1882} 1883 1884// MarshalJSON is the custom marshaler for AzureToAzureNetworkMappingSettings. 1885func (atanms AzureToAzureNetworkMappingSettings) MarshalJSON() ([]byte, error) { 1886 atanms.InstanceType = InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeAzureToAzure 1887 objectMap := make(map[string]interface{}) 1888 if atanms.PrimaryFabricLocation != nil { 1889 objectMap["primaryFabricLocation"] = atanms.PrimaryFabricLocation 1890 } 1891 if atanms.RecoveryFabricLocation != nil { 1892 objectMap["recoveryFabricLocation"] = atanms.RecoveryFabricLocation 1893 } 1894 if atanms.InstanceType != "" { 1895 objectMap["instanceType"] = atanms.InstanceType 1896 } 1897 return json.Marshal(objectMap) 1898} 1899 1900// AsAzureToAzureNetworkMappingSettings is the BasicNetworkMappingFabricSpecificSettings implementation for AzureToAzureNetworkMappingSettings. 1901func (atanms AzureToAzureNetworkMappingSettings) AsAzureToAzureNetworkMappingSettings() (*AzureToAzureNetworkMappingSettings, bool) { 1902 return &atanms, true 1903} 1904 1905// AsVmmToAzureNetworkMappingSettings is the BasicNetworkMappingFabricSpecificSettings implementation for AzureToAzureNetworkMappingSettings. 1906func (atanms AzureToAzureNetworkMappingSettings) AsVmmToAzureNetworkMappingSettings() (*VmmToAzureNetworkMappingSettings, bool) { 1907 return nil, false 1908} 1909 1910// AsVmmToVmmNetworkMappingSettings is the BasicNetworkMappingFabricSpecificSettings implementation for AzureToAzureNetworkMappingSettings. 1911func (atanms AzureToAzureNetworkMappingSettings) AsVmmToVmmNetworkMappingSettings() (*VmmToVmmNetworkMappingSettings, bool) { 1912 return nil, false 1913} 1914 1915// AsNetworkMappingFabricSpecificSettings is the BasicNetworkMappingFabricSpecificSettings implementation for AzureToAzureNetworkMappingSettings. 1916func (atanms AzureToAzureNetworkMappingSettings) AsNetworkMappingFabricSpecificSettings() (*NetworkMappingFabricSpecificSettings, bool) { 1917 return nil, false 1918} 1919 1920// AsBasicNetworkMappingFabricSpecificSettings is the BasicNetworkMappingFabricSpecificSettings implementation for AzureToAzureNetworkMappingSettings. 1921func (atanms AzureToAzureNetworkMappingSettings) AsBasicNetworkMappingFabricSpecificSettings() (BasicNetworkMappingFabricSpecificSettings, bool) { 1922 return &atanms, true 1923} 1924 1925// AzureToAzureUpdateNetworkMappingInput updates network mappings input. 1926type AzureToAzureUpdateNetworkMappingInput struct { 1927 // PrimaryNetworkID - The primary azure vnet Id. 1928 PrimaryNetworkID *string `json:"primaryNetworkId,omitempty"` 1929 // InstanceType - Possible values include: 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeFabricSpecificUpdateNetworkMappingInput', 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeAzureToAzure', 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToAzure', 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToVmm' 1930 InstanceType InstanceTypeBasicFabricSpecificUpdateNetworkMappingInput `json:"instanceType,omitempty"` 1931} 1932 1933// MarshalJSON is the custom marshaler for AzureToAzureUpdateNetworkMappingInput. 1934func (ataunmi AzureToAzureUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { 1935 ataunmi.InstanceType = InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeAzureToAzure 1936 objectMap := make(map[string]interface{}) 1937 if ataunmi.PrimaryNetworkID != nil { 1938 objectMap["primaryNetworkId"] = ataunmi.PrimaryNetworkID 1939 } 1940 if ataunmi.InstanceType != "" { 1941 objectMap["instanceType"] = ataunmi.InstanceType 1942 } 1943 return json.Marshal(objectMap) 1944} 1945 1946// AsAzureToAzureUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for AzureToAzureUpdateNetworkMappingInput. 1947func (ataunmi AzureToAzureUpdateNetworkMappingInput) AsAzureToAzureUpdateNetworkMappingInput() (*AzureToAzureUpdateNetworkMappingInput, bool) { 1948 return &ataunmi, true 1949} 1950 1951// AsVmmToAzureUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for AzureToAzureUpdateNetworkMappingInput. 1952func (ataunmi AzureToAzureUpdateNetworkMappingInput) AsVmmToAzureUpdateNetworkMappingInput() (*VmmToAzureUpdateNetworkMappingInput, bool) { 1953 return nil, false 1954} 1955 1956// AsVmmToVmmUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for AzureToAzureUpdateNetworkMappingInput. 1957func (ataunmi AzureToAzureUpdateNetworkMappingInput) AsVmmToVmmUpdateNetworkMappingInput() (*VmmToVmmUpdateNetworkMappingInput, bool) { 1958 return nil, false 1959} 1960 1961// AsFabricSpecificUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for AzureToAzureUpdateNetworkMappingInput. 1962func (ataunmi AzureToAzureUpdateNetworkMappingInput) AsFabricSpecificUpdateNetworkMappingInput() (*FabricSpecificUpdateNetworkMappingInput, bool) { 1963 return nil, false 1964} 1965 1966// AsBasicFabricSpecificUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for AzureToAzureUpdateNetworkMappingInput. 1967func (ataunmi AzureToAzureUpdateNetworkMappingInput) AsBasicFabricSpecificUpdateNetworkMappingInput() (BasicFabricSpecificUpdateNetworkMappingInput, bool) { 1968 return &ataunmi, true 1969} 1970 1971// AzureToAzureVMSyncedConfigDetails azure to Azure VM synced configuration details. 1972type AzureToAzureVMSyncedConfigDetails struct { 1973 // Tags - The Azure VM tags. 1974 Tags map[string]*string `json:"tags"` 1975 // RoleAssignments - The Azure role assignments. 1976 RoleAssignments *[]RoleAssignment `json:"roleAssignments,omitempty"` 1977 // InputEndpoints - The Azure VM input endpoints. 1978 InputEndpoints *[]InputEndpoint `json:"inputEndpoints,omitempty"` 1979} 1980 1981// MarshalJSON is the custom marshaler for AzureToAzureVMSyncedConfigDetails. 1982func (atavscd AzureToAzureVMSyncedConfigDetails) MarshalJSON() ([]byte, error) { 1983 objectMap := make(map[string]interface{}) 1984 if atavscd.Tags != nil { 1985 objectMap["tags"] = atavscd.Tags 1986 } 1987 if atavscd.RoleAssignments != nil { 1988 objectMap["roleAssignments"] = atavscd.RoleAssignments 1989 } 1990 if atavscd.InputEndpoints != nil { 1991 objectMap["inputEndpoints"] = atavscd.InputEndpoints 1992 } 1993 return json.Marshal(objectMap) 1994} 1995 1996// AzureVMDiskDetails disk details for E2A provider. 1997type AzureVMDiskDetails struct { 1998 // VhdType - VHD type. 1999 VhdType *string `json:"vhdType,omitempty"` 2000 // VhdID - The VHD id. 2001 VhdID *string `json:"vhdId,omitempty"` 2002 // VhdName - VHD name. 2003 VhdName *string `json:"vhdName,omitempty"` 2004 // MaxSizeMB - Max side in MB. 2005 MaxSizeMB *string `json:"maxSizeMB,omitempty"` 2006 // TargetDiskLocation - Blob uri of the Azure disk. 2007 TargetDiskLocation *string `json:"targetDiskLocation,omitempty"` 2008 // TargetDiskName - The target Azure disk name. 2009 TargetDiskName *string `json:"targetDiskName,omitempty"` 2010 // LunID - Ordinal\LunId of the disk for the Azure VM. 2011 LunID *string `json:"lunId,omitempty"` 2012} 2013 2014// BasicConfigurationSettings replication provider specific settings. 2015type BasicConfigurationSettings interface { 2016 AsHyperVVirtualMachineDetails() (*HyperVVirtualMachineDetails, bool) 2017 AsVMwareVirtualMachineDetails() (*VMwareVirtualMachineDetails, bool) 2018 AsReplicationGroupDetails() (*ReplicationGroupDetails, bool) 2019 AsConfigurationSettings() (*ConfigurationSettings, bool) 2020} 2021 2022// ConfigurationSettings replication provider specific settings. 2023type ConfigurationSettings struct { 2024 // InstanceType - Possible values include: 'InstanceTypeConfigurationSettings', 'InstanceTypeHyperVVirtualMachine', 'InstanceTypeVMwareVirtualMachine', 'InstanceTypeReplicationGroupDetails' 2025 InstanceType InstanceTypeBasicConfigurationSettings `json:"instanceType,omitempty"` 2026} 2027 2028func unmarshalBasicConfigurationSettings(body []byte) (BasicConfigurationSettings, error) { 2029 var m map[string]interface{} 2030 err := json.Unmarshal(body, &m) 2031 if err != nil { 2032 return nil, err 2033 } 2034 2035 switch m["instanceType"] { 2036 case string(InstanceTypeHyperVVirtualMachine): 2037 var hvvmd HyperVVirtualMachineDetails 2038 err := json.Unmarshal(body, &hvvmd) 2039 return hvvmd, err 2040 case string(InstanceTypeVMwareVirtualMachine): 2041 var vmvmd VMwareVirtualMachineDetails 2042 err := json.Unmarshal(body, &vmvmd) 2043 return vmvmd, err 2044 case string(InstanceTypeReplicationGroupDetails): 2045 var rgd ReplicationGroupDetails 2046 err := json.Unmarshal(body, &rgd) 2047 return rgd, err 2048 default: 2049 var cs ConfigurationSettings 2050 err := json.Unmarshal(body, &cs) 2051 return cs, err 2052 } 2053} 2054func unmarshalBasicConfigurationSettingsArray(body []byte) ([]BasicConfigurationSettings, error) { 2055 var rawMessages []*json.RawMessage 2056 err := json.Unmarshal(body, &rawMessages) 2057 if err != nil { 2058 return nil, err 2059 } 2060 2061 csArray := make([]BasicConfigurationSettings, len(rawMessages)) 2062 2063 for index, rawMessage := range rawMessages { 2064 cs, err := unmarshalBasicConfigurationSettings(*rawMessage) 2065 if err != nil { 2066 return nil, err 2067 } 2068 csArray[index] = cs 2069 } 2070 return csArray, nil 2071} 2072 2073// MarshalJSON is the custom marshaler for ConfigurationSettings. 2074func (cs ConfigurationSettings) MarshalJSON() ([]byte, error) { 2075 cs.InstanceType = InstanceTypeConfigurationSettings 2076 objectMap := make(map[string]interface{}) 2077 if cs.InstanceType != "" { 2078 objectMap["instanceType"] = cs.InstanceType 2079 } 2080 return json.Marshal(objectMap) 2081} 2082 2083// AsHyperVVirtualMachineDetails is the BasicConfigurationSettings implementation for ConfigurationSettings. 2084func (cs ConfigurationSettings) AsHyperVVirtualMachineDetails() (*HyperVVirtualMachineDetails, bool) { 2085 return nil, false 2086} 2087 2088// AsVMwareVirtualMachineDetails is the BasicConfigurationSettings implementation for ConfigurationSettings. 2089func (cs ConfigurationSettings) AsVMwareVirtualMachineDetails() (*VMwareVirtualMachineDetails, bool) { 2090 return nil, false 2091} 2092 2093// AsReplicationGroupDetails is the BasicConfigurationSettings implementation for ConfigurationSettings. 2094func (cs ConfigurationSettings) AsReplicationGroupDetails() (*ReplicationGroupDetails, bool) { 2095 return nil, false 2096} 2097 2098// AsConfigurationSettings is the BasicConfigurationSettings implementation for ConfigurationSettings. 2099func (cs ConfigurationSettings) AsConfigurationSettings() (*ConfigurationSettings, bool) { 2100 return &cs, true 2101} 2102 2103// AsBasicConfigurationSettings is the BasicConfigurationSettings implementation for ConfigurationSettings. 2104func (cs ConfigurationSettings) AsBasicConfigurationSettings() (BasicConfigurationSettings, bool) { 2105 return &cs, true 2106} 2107 2108// ConfigureAlertRequest request to configure alerts for the system. 2109type ConfigureAlertRequest struct { 2110 // Properties - The properties of a configure alert request. 2111 Properties *ConfigureAlertRequestProperties `json:"properties,omitempty"` 2112} 2113 2114// ConfigureAlertRequestProperties properties of a configure alert request. 2115type ConfigureAlertRequestProperties struct { 2116 // SendToOwners - A value indicating whether to send email to subscription administrator. 2117 SendToOwners *string `json:"sendToOwners,omitempty"` 2118 // CustomEmailAddresses - The custom email address for sending emails. 2119 CustomEmailAddresses *[]string `json:"customEmailAddresses,omitempty"` 2120 // Locale - The locale for the email notification. 2121 Locale *string `json:"locale,omitempty"` 2122} 2123 2124// ConsistencyCheckTaskDetails this class contains monitoring details of all the inconsistent Protected 2125// Entities in Vmm. 2126type ConsistencyCheckTaskDetails struct { 2127 // VMDetails - The list of inconsistent Vm details. 2128 VMDetails *[]InconsistentVMDetails `json:"vmDetails,omitempty"` 2129 // InstanceType - Possible values include: 'InstanceTypeTaskTypeDetails', 'InstanceTypeJobTaskDetails', 'InstanceTypeVirtualMachineTaskDetails', 'InstanceTypeFabricReplicationGroupTaskDetails', 'InstanceTypeManualActionTaskDetails', 'InstanceTypeScriptActionTaskDetails', 'InstanceTypeVMNicUpdatesTaskDetails', 'InstanceTypeConsistencyCheckTaskDetails', 'InstanceTypeAutomationRunbookTaskDetails' 2130 InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"` 2131} 2132 2133// MarshalJSON is the custom marshaler for ConsistencyCheckTaskDetails. 2134func (cctd ConsistencyCheckTaskDetails) MarshalJSON() ([]byte, error) { 2135 cctd.InstanceType = InstanceTypeConsistencyCheckTaskDetails 2136 objectMap := make(map[string]interface{}) 2137 if cctd.VMDetails != nil { 2138 objectMap["vmDetails"] = cctd.VMDetails 2139 } 2140 if cctd.InstanceType != "" { 2141 objectMap["instanceType"] = cctd.InstanceType 2142 } 2143 return json.Marshal(objectMap) 2144} 2145 2146// AsJobTaskDetails is the BasicTaskTypeDetails implementation for ConsistencyCheckTaskDetails. 2147func (cctd ConsistencyCheckTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) { 2148 return nil, false 2149} 2150 2151// AsVirtualMachineTaskDetails is the BasicTaskTypeDetails implementation for ConsistencyCheckTaskDetails. 2152func (cctd ConsistencyCheckTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) { 2153 return nil, false 2154} 2155 2156// AsFabricReplicationGroupTaskDetails is the BasicTaskTypeDetails implementation for ConsistencyCheckTaskDetails. 2157func (cctd ConsistencyCheckTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) { 2158 return nil, false 2159} 2160 2161// AsManualActionTaskDetails is the BasicTaskTypeDetails implementation for ConsistencyCheckTaskDetails. 2162func (cctd ConsistencyCheckTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) { 2163 return nil, false 2164} 2165 2166// AsScriptActionTaskDetails is the BasicTaskTypeDetails implementation for ConsistencyCheckTaskDetails. 2167func (cctd ConsistencyCheckTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) { 2168 return nil, false 2169} 2170 2171// AsVMNicUpdatesTaskDetails is the BasicTaskTypeDetails implementation for ConsistencyCheckTaskDetails. 2172func (cctd ConsistencyCheckTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) { 2173 return nil, false 2174} 2175 2176// AsConsistencyCheckTaskDetails is the BasicTaskTypeDetails implementation for ConsistencyCheckTaskDetails. 2177func (cctd ConsistencyCheckTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) { 2178 return &cctd, true 2179} 2180 2181// AsAutomationRunbookTaskDetails is the BasicTaskTypeDetails implementation for ConsistencyCheckTaskDetails. 2182func (cctd ConsistencyCheckTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) { 2183 return nil, false 2184} 2185 2186// AsTaskTypeDetails is the BasicTaskTypeDetails implementation for ConsistencyCheckTaskDetails. 2187func (cctd ConsistencyCheckTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) { 2188 return nil, false 2189} 2190 2191// AsBasicTaskTypeDetails is the BasicTaskTypeDetails implementation for ConsistencyCheckTaskDetails. 2192func (cctd ConsistencyCheckTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) { 2193 return &cctd, true 2194} 2195 2196// CreateNetworkMappingInput create network mappings input. 2197type CreateNetworkMappingInput struct { 2198 // Properties - Input properties for creating network mapping. 2199 Properties *CreateNetworkMappingInputProperties `json:"properties,omitempty"` 2200} 2201 2202// CreateNetworkMappingInputProperties common input details for network mapping operation. 2203type CreateNetworkMappingInputProperties struct { 2204 // RecoveryFabricName - Recovery fabric Name. 2205 RecoveryFabricName *string `json:"recoveryFabricName,omitempty"` 2206 // RecoveryNetworkID - Recovery network Id. 2207 RecoveryNetworkID *string `json:"recoveryNetworkId,omitempty"` 2208 // FabricSpecificDetails - Fabric specific input properties. 2209 FabricSpecificDetails BasicFabricSpecificCreateNetworkMappingInput `json:"fabricSpecificDetails,omitempty"` 2210} 2211 2212// UnmarshalJSON is the custom unmarshaler for CreateNetworkMappingInputProperties struct. 2213func (cnmip *CreateNetworkMappingInputProperties) UnmarshalJSON(body []byte) error { 2214 var m map[string]*json.RawMessage 2215 err := json.Unmarshal(body, &m) 2216 if err != nil { 2217 return err 2218 } 2219 for k, v := range m { 2220 switch k { 2221 case "recoveryFabricName": 2222 if v != nil { 2223 var recoveryFabricName string 2224 err = json.Unmarshal(*v, &recoveryFabricName) 2225 if err != nil { 2226 return err 2227 } 2228 cnmip.RecoveryFabricName = &recoveryFabricName 2229 } 2230 case "recoveryNetworkId": 2231 if v != nil { 2232 var recoveryNetworkID string 2233 err = json.Unmarshal(*v, &recoveryNetworkID) 2234 if err != nil { 2235 return err 2236 } 2237 cnmip.RecoveryNetworkID = &recoveryNetworkID 2238 } 2239 case "fabricSpecificDetails": 2240 if v != nil { 2241 fabricSpecificDetails, err := unmarshalBasicFabricSpecificCreateNetworkMappingInput(*v) 2242 if err != nil { 2243 return err 2244 } 2245 cnmip.FabricSpecificDetails = fabricSpecificDetails 2246 } 2247 } 2248 } 2249 2250 return nil 2251} 2252 2253// CreatePolicyInput protection profile input. 2254type CreatePolicyInput struct { 2255 // Properties - Policy creation properties. 2256 Properties *CreatePolicyInputProperties `json:"properties,omitempty"` 2257} 2258 2259// CreatePolicyInputProperties policy creation properties. 2260type CreatePolicyInputProperties struct { 2261 // ProviderSpecificInput - The ReplicationProviderSettings. 2262 ProviderSpecificInput BasicPolicyProviderSpecificInput `json:"providerSpecificInput,omitempty"` 2263} 2264 2265// UnmarshalJSON is the custom unmarshaler for CreatePolicyInputProperties struct. 2266func (cpip *CreatePolicyInputProperties) UnmarshalJSON(body []byte) error { 2267 var m map[string]*json.RawMessage 2268 err := json.Unmarshal(body, &m) 2269 if err != nil { 2270 return err 2271 } 2272 for k, v := range m { 2273 switch k { 2274 case "providerSpecificInput": 2275 if v != nil { 2276 providerSpecificInput, err := unmarshalBasicPolicyProviderSpecificInput(*v) 2277 if err != nil { 2278 return err 2279 } 2280 cpip.ProviderSpecificInput = providerSpecificInput 2281 } 2282 } 2283 } 2284 2285 return nil 2286} 2287 2288// CreateProtectionContainerInput create protection container input. 2289type CreateProtectionContainerInput struct { 2290 // Properties - Create protection container input properties. 2291 Properties *CreateProtectionContainerInputProperties `json:"properties,omitempty"` 2292} 2293 2294// CreateProtectionContainerInputProperties create protection container input properties. 2295type CreateProtectionContainerInputProperties struct { 2296 // ProviderSpecificInput - Provider specific inputs for container creation. 2297 ProviderSpecificInput *[]BasicReplicationProviderSpecificContainerCreationInput `json:"providerSpecificInput,omitempty"` 2298} 2299 2300// UnmarshalJSON is the custom unmarshaler for CreateProtectionContainerInputProperties struct. 2301func (cpcip *CreateProtectionContainerInputProperties) UnmarshalJSON(body []byte) error { 2302 var m map[string]*json.RawMessage 2303 err := json.Unmarshal(body, &m) 2304 if err != nil { 2305 return err 2306 } 2307 for k, v := range m { 2308 switch k { 2309 case "providerSpecificInput": 2310 if v != nil { 2311 providerSpecificInput, err := unmarshalBasicReplicationProviderSpecificContainerCreationInputArray(*v) 2312 if err != nil { 2313 return err 2314 } 2315 cpcip.ProviderSpecificInput = &providerSpecificInput 2316 } 2317 } 2318 } 2319 2320 return nil 2321} 2322 2323// CreateProtectionContainerMappingInput configure pairing input. 2324type CreateProtectionContainerMappingInput struct { 2325 // Properties - Configure protection input properties. 2326 Properties *CreateProtectionContainerMappingInputProperties `json:"properties,omitempty"` 2327} 2328 2329// CreateProtectionContainerMappingInputProperties configure pairing input properties. 2330type CreateProtectionContainerMappingInputProperties struct { 2331 // TargetProtectionContainerID - The target unique protection container name. 2332 TargetProtectionContainerID *string `json:"targetProtectionContainerId,omitempty"` 2333 // PolicyID - Applicable policy. 2334 PolicyID *string `json:"PolicyId,omitempty"` 2335 // ProviderSpecificInput - Provider specific input for pairing. 2336 ProviderSpecificInput *ReplicationProviderSpecificContainerMappingInput `json:"providerSpecificInput,omitempty"` 2337} 2338 2339// CreateRecoveryPlanInput create recovery plan input class. 2340type CreateRecoveryPlanInput struct { 2341 // Properties - Recovery plan creation properties. 2342 Properties *CreateRecoveryPlanInputProperties `json:"properties,omitempty"` 2343} 2344 2345// CreateRecoveryPlanInputProperties recovery plan creation properties. 2346type CreateRecoveryPlanInputProperties struct { 2347 // PrimaryFabricID - The primary fabric Id. 2348 PrimaryFabricID *string `json:"primaryFabricId,omitempty"` 2349 // RecoveryFabricID - The recovery fabric Id. 2350 RecoveryFabricID *string `json:"recoveryFabricId,omitempty"` 2351 // FailoverDeploymentModel - The failover deployment model. Possible values include: 'NotApplicable', 'Classic', 'ResourceManager' 2352 FailoverDeploymentModel FailoverDeploymentModel `json:"failoverDeploymentModel,omitempty"` 2353 // Groups - The recovery plan groups. 2354 Groups *[]RecoveryPlanGroup `json:"groups,omitempty"` 2355} 2356 2357// CurrentScenarioDetails current scenario details of the protected entity. 2358type CurrentScenarioDetails struct { 2359 // ScenarioName - Scenario name. 2360 ScenarioName *string `json:"scenarioName,omitempty"` 2361 // JobID - ARM Id of the job being executed. 2362 JobID *string `json:"jobId,omitempty"` 2363 // StartTime - Start time of the workflow. 2364 StartTime *date.Time `json:"startTime,omitempty"` 2365} 2366 2367// DataStore the data store details of the MT. 2368type DataStore struct { 2369 // SymbolicName - The symbolic name of data store. 2370 SymbolicName *string `json:"symbolicName,omitempty"` 2371 // UUID - The uuid of data store. 2372 UUID *string `json:"uuid,omitempty"` 2373 // Capacity - The capacity of data store in GBs. 2374 Capacity *string `json:"capacity,omitempty"` 2375 // FreeSpace - The free space of data store in GBs. 2376 FreeSpace *string `json:"freeSpace,omitempty"` 2377 // Type - The type of data store. 2378 Type *string `json:"type,omitempty"` 2379} 2380 2381// DisableProtectionInput disable protection input. 2382type DisableProtectionInput struct { 2383 // Properties - Disable protection input properties. 2384 Properties *DisableProtectionInputProperties `json:"properties,omitempty"` 2385} 2386 2387// DisableProtectionInputProperties disable protection input properties. 2388type DisableProtectionInputProperties struct { 2389 // DisableProtectionReason - Disable protection reason. It can have values NotSpecified/MigrationComplete. Possible values include: 'NotSpecified', 'MigrationComplete' 2390 DisableProtectionReason DisableProtectionReason `json:"disableProtectionReason,omitempty"` 2391 // ReplicationProviderInput - Replication provider specific input. 2392 ReplicationProviderInput BasicDisableProtectionProviderSpecificInput `json:"replicationProviderInput,omitempty"` 2393} 2394 2395// UnmarshalJSON is the custom unmarshaler for DisableProtectionInputProperties struct. 2396func (dpip *DisableProtectionInputProperties) UnmarshalJSON(body []byte) error { 2397 var m map[string]*json.RawMessage 2398 err := json.Unmarshal(body, &m) 2399 if err != nil { 2400 return err 2401 } 2402 for k, v := range m { 2403 switch k { 2404 case "disableProtectionReason": 2405 if v != nil { 2406 var disableProtectionReason DisableProtectionReason 2407 err = json.Unmarshal(*v, &disableProtectionReason) 2408 if err != nil { 2409 return err 2410 } 2411 dpip.DisableProtectionReason = disableProtectionReason 2412 } 2413 case "replicationProviderInput": 2414 if v != nil { 2415 replicationProviderInput, err := unmarshalBasicDisableProtectionProviderSpecificInput(*v) 2416 if err != nil { 2417 return err 2418 } 2419 dpip.ReplicationProviderInput = replicationProviderInput 2420 } 2421 } 2422 } 2423 2424 return nil 2425} 2426 2427// BasicDisableProtectionProviderSpecificInput disable protection provider specific input. 2428type BasicDisableProtectionProviderSpecificInput interface { 2429 AsInMageDisableProtectionProviderSpecificInput() (*InMageDisableProtectionProviderSpecificInput, bool) 2430 AsDisableProtectionProviderSpecificInput() (*DisableProtectionProviderSpecificInput, bool) 2431} 2432 2433// DisableProtectionProviderSpecificInput disable protection provider specific input. 2434type DisableProtectionProviderSpecificInput struct { 2435 // InstanceType - Possible values include: 'InstanceTypeDisableProtectionProviderSpecificInput', 'InstanceTypeInMage' 2436 InstanceType InstanceTypeBasicDisableProtectionProviderSpecificInput `json:"instanceType,omitempty"` 2437} 2438 2439func unmarshalBasicDisableProtectionProviderSpecificInput(body []byte) (BasicDisableProtectionProviderSpecificInput, error) { 2440 var m map[string]interface{} 2441 err := json.Unmarshal(body, &m) 2442 if err != nil { 2443 return nil, err 2444 } 2445 2446 switch m["instanceType"] { 2447 case string(InstanceTypeInMage): 2448 var imdppsi InMageDisableProtectionProviderSpecificInput 2449 err := json.Unmarshal(body, &imdppsi) 2450 return imdppsi, err 2451 default: 2452 var dppsi DisableProtectionProviderSpecificInput 2453 err := json.Unmarshal(body, &dppsi) 2454 return dppsi, err 2455 } 2456} 2457func unmarshalBasicDisableProtectionProviderSpecificInputArray(body []byte) ([]BasicDisableProtectionProviderSpecificInput, error) { 2458 var rawMessages []*json.RawMessage 2459 err := json.Unmarshal(body, &rawMessages) 2460 if err != nil { 2461 return nil, err 2462 } 2463 2464 dppsiArray := make([]BasicDisableProtectionProviderSpecificInput, len(rawMessages)) 2465 2466 for index, rawMessage := range rawMessages { 2467 dppsi, err := unmarshalBasicDisableProtectionProviderSpecificInput(*rawMessage) 2468 if err != nil { 2469 return nil, err 2470 } 2471 dppsiArray[index] = dppsi 2472 } 2473 return dppsiArray, nil 2474} 2475 2476// MarshalJSON is the custom marshaler for DisableProtectionProviderSpecificInput. 2477func (dppsi DisableProtectionProviderSpecificInput) MarshalJSON() ([]byte, error) { 2478 dppsi.InstanceType = InstanceTypeDisableProtectionProviderSpecificInput 2479 objectMap := make(map[string]interface{}) 2480 if dppsi.InstanceType != "" { 2481 objectMap["instanceType"] = dppsi.InstanceType 2482 } 2483 return json.Marshal(objectMap) 2484} 2485 2486// AsInMageDisableProtectionProviderSpecificInput is the BasicDisableProtectionProviderSpecificInput implementation for DisableProtectionProviderSpecificInput. 2487func (dppsi DisableProtectionProviderSpecificInput) AsInMageDisableProtectionProviderSpecificInput() (*InMageDisableProtectionProviderSpecificInput, bool) { 2488 return nil, false 2489} 2490 2491// AsDisableProtectionProviderSpecificInput is the BasicDisableProtectionProviderSpecificInput implementation for DisableProtectionProviderSpecificInput. 2492func (dppsi DisableProtectionProviderSpecificInput) AsDisableProtectionProviderSpecificInput() (*DisableProtectionProviderSpecificInput, bool) { 2493 return &dppsi, true 2494} 2495 2496// AsBasicDisableProtectionProviderSpecificInput is the BasicDisableProtectionProviderSpecificInput implementation for DisableProtectionProviderSpecificInput. 2497func (dppsi DisableProtectionProviderSpecificInput) AsBasicDisableProtectionProviderSpecificInput() (BasicDisableProtectionProviderSpecificInput, bool) { 2498 return &dppsi, true 2499} 2500 2501// DiscoverProtectableItemRequest request to add a physical machine as a protectable item in a container. 2502type DiscoverProtectableItemRequest struct { 2503 // Properties - The properties of a discover protectable item request. 2504 Properties *DiscoverProtectableItemRequestProperties `json:"properties,omitempty"` 2505} 2506 2507// DiscoverProtectableItemRequestProperties discover protectable item properties. 2508type DiscoverProtectableItemRequestProperties struct { 2509 // FriendlyName - The friendly name of the physical machine. 2510 FriendlyName *string `json:"friendlyName,omitempty"` 2511 // IPAddress - The IP address of the physical machine to be discovered. 2512 IPAddress *string `json:"ipAddress,omitempty"` 2513 // OsType - The OS type on the physical machine. 2514 OsType *string `json:"osType,omitempty"` 2515} 2516 2517// DiskDetails on-prem disk details data. 2518type DiskDetails struct { 2519 // MaxSizeMB - The hard disk max size in MB. 2520 MaxSizeMB *int64 `json:"maxSizeMB,omitempty"` 2521 // VhdType - The type of the volume. 2522 VhdType *string `json:"vhdType,omitempty"` 2523 // VhdID - The VHD Id. 2524 VhdID *string `json:"vhdId,omitempty"` 2525 // VhdName - The VHD name. 2526 VhdName *string `json:"vhdName,omitempty"` 2527} 2528 2529// DiskVolumeDetails volume details. 2530type DiskVolumeDetails struct { 2531 // Label - The volume label. 2532 Label *string `json:"label,omitempty"` 2533 // Name - The volume name. 2534 Name *string `json:"name,omitempty"` 2535} 2536 2537// Display contains the localized display information for this particular operation / action. These value 2538// will be used by several clients for (1) custom role definitions for RBAC; (2) complex query filters for 2539// the event service; and (3) audit history / records for management operations. 2540type Display struct { 2541 // 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." 2542 Provider *string `json:"provider,omitempty"` 2543 // 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" 2544 Resource *string `json:"resource,omitempty"` 2545 // 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' 2546 Operation *string `json:"operation,omitempty"` 2547 // 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' 2548 Description *string `json:"description,omitempty"` 2549} 2550 2551// EnableProtectionInput enable protection input. 2552type EnableProtectionInput struct { 2553 // Properties - Enable protection input properties. 2554 Properties *EnableProtectionInputProperties `json:"properties,omitempty"` 2555} 2556 2557// EnableProtectionInputProperties enable protection input properties. 2558type EnableProtectionInputProperties struct { 2559 // PolicyID - The Policy Id. 2560 PolicyID *string `json:"policyId,omitempty"` 2561 // ProtectableItemID - The protectable item Id. 2562 ProtectableItemID *string `json:"protectableItemId,omitempty"` 2563 // 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. 2564 ProviderSpecificDetails BasicEnableProtectionProviderSpecificInput `json:"providerSpecificDetails,omitempty"` 2565} 2566 2567// UnmarshalJSON is the custom unmarshaler for EnableProtectionInputProperties struct. 2568func (epip *EnableProtectionInputProperties) UnmarshalJSON(body []byte) error { 2569 var m map[string]*json.RawMessage 2570 err := json.Unmarshal(body, &m) 2571 if err != nil { 2572 return err 2573 } 2574 for k, v := range m { 2575 switch k { 2576 case "policyId": 2577 if v != nil { 2578 var policyID string 2579 err = json.Unmarshal(*v, &policyID) 2580 if err != nil { 2581 return err 2582 } 2583 epip.PolicyID = &policyID 2584 } 2585 case "protectableItemId": 2586 if v != nil { 2587 var protectableItemID string 2588 err = json.Unmarshal(*v, &protectableItemID) 2589 if err != nil { 2590 return err 2591 } 2592 epip.ProtectableItemID = &protectableItemID 2593 } 2594 case "providerSpecificDetails": 2595 if v != nil { 2596 providerSpecificDetails, err := unmarshalBasicEnableProtectionProviderSpecificInput(*v) 2597 if err != nil { 2598 return err 2599 } 2600 epip.ProviderSpecificDetails = providerSpecificDetails 2601 } 2602 } 2603 } 2604 2605 return nil 2606} 2607 2608// BasicEnableProtectionProviderSpecificInput enable protection provider specific input. 2609type BasicEnableProtectionProviderSpecificInput interface { 2610 AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool) 2611 AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool) 2612 AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool) 2613 AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool) 2614 AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool) 2615 AsEnableProtectionProviderSpecificInput() (*EnableProtectionProviderSpecificInput, bool) 2616} 2617 2618// EnableProtectionProviderSpecificInput enable protection provider specific input. 2619type EnableProtectionProviderSpecificInput struct { 2620 // InstanceType - Possible values include: 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeEnableProtectionProviderSpecificInput', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeSan', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeA2A' 2621 InstanceType InstanceTypeBasicEnableProtectionProviderSpecificInput `json:"instanceType,omitempty"` 2622} 2623 2624func unmarshalBasicEnableProtectionProviderSpecificInput(body []byte) (BasicEnableProtectionProviderSpecificInput, error) { 2625 var m map[string]interface{} 2626 err := json.Unmarshal(body, &m) 2627 if err != nil { 2628 return nil, err 2629 } 2630 2631 switch m["instanceType"] { 2632 case string(InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeHyperVReplicaAzure): 2633 var hvraepi HyperVReplicaAzureEnableProtectionInput 2634 err := json.Unmarshal(body, &hvraepi) 2635 return hvraepi, err 2636 case string(InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeSan): 2637 var sepi SanEnableProtectionInput 2638 err := json.Unmarshal(body, &sepi) 2639 return sepi, err 2640 case string(InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMageAzureV2): 2641 var imavepi InMageAzureV2EnableProtectionInput 2642 err := json.Unmarshal(body, &imavepi) 2643 return imavepi, err 2644 case string(InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMage): 2645 var imepi InMageEnableProtectionInput 2646 err := json.Unmarshal(body, &imepi) 2647 return imepi, err 2648 case string(InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeA2A): 2649 var aepi A2AEnableProtectionInput 2650 err := json.Unmarshal(body, &aepi) 2651 return aepi, err 2652 default: 2653 var eppsi EnableProtectionProviderSpecificInput 2654 err := json.Unmarshal(body, &eppsi) 2655 return eppsi, err 2656 } 2657} 2658func unmarshalBasicEnableProtectionProviderSpecificInputArray(body []byte) ([]BasicEnableProtectionProviderSpecificInput, error) { 2659 var rawMessages []*json.RawMessage 2660 err := json.Unmarshal(body, &rawMessages) 2661 if err != nil { 2662 return nil, err 2663 } 2664 2665 eppsiArray := make([]BasicEnableProtectionProviderSpecificInput, len(rawMessages)) 2666 2667 for index, rawMessage := range rawMessages { 2668 eppsi, err := unmarshalBasicEnableProtectionProviderSpecificInput(*rawMessage) 2669 if err != nil { 2670 return nil, err 2671 } 2672 eppsiArray[index] = eppsi 2673 } 2674 return eppsiArray, nil 2675} 2676 2677// MarshalJSON is the custom marshaler for EnableProtectionProviderSpecificInput. 2678func (eppsi EnableProtectionProviderSpecificInput) MarshalJSON() ([]byte, error) { 2679 eppsi.InstanceType = InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeEnableProtectionProviderSpecificInput 2680 objectMap := make(map[string]interface{}) 2681 if eppsi.InstanceType != "" { 2682 objectMap["instanceType"] = eppsi.InstanceType 2683 } 2684 return json.Marshal(objectMap) 2685} 2686 2687// AsHyperVReplicaAzureEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for EnableProtectionProviderSpecificInput. 2688func (eppsi EnableProtectionProviderSpecificInput) AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool) { 2689 return nil, false 2690} 2691 2692// AsSanEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for EnableProtectionProviderSpecificInput. 2693func (eppsi EnableProtectionProviderSpecificInput) AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool) { 2694 return nil, false 2695} 2696 2697// AsInMageAzureV2EnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for EnableProtectionProviderSpecificInput. 2698func (eppsi EnableProtectionProviderSpecificInput) AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool) { 2699 return nil, false 2700} 2701 2702// AsInMageEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for EnableProtectionProviderSpecificInput. 2703func (eppsi EnableProtectionProviderSpecificInput) AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool) { 2704 return nil, false 2705} 2706 2707// AsA2AEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for EnableProtectionProviderSpecificInput. 2708func (eppsi EnableProtectionProviderSpecificInput) AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool) { 2709 return nil, false 2710} 2711 2712// AsEnableProtectionProviderSpecificInput is the BasicEnableProtectionProviderSpecificInput implementation for EnableProtectionProviderSpecificInput. 2713func (eppsi EnableProtectionProviderSpecificInput) AsEnableProtectionProviderSpecificInput() (*EnableProtectionProviderSpecificInput, bool) { 2714 return &eppsi, true 2715} 2716 2717// AsBasicEnableProtectionProviderSpecificInput is the BasicEnableProtectionProviderSpecificInput implementation for EnableProtectionProviderSpecificInput. 2718func (eppsi EnableProtectionProviderSpecificInput) AsBasicEnableProtectionProviderSpecificInput() (BasicEnableProtectionProviderSpecificInput, bool) { 2719 return &eppsi, true 2720} 2721 2722// EncryptionDetails encryption details for the fabric. 2723type EncryptionDetails struct { 2724 // KekState - The key encryption key state for the Vmm. 2725 KekState *string `json:"kekState,omitempty"` 2726 // KekCertThumbprint - The key encryption key certificate thumbprint. 2727 KekCertThumbprint *string `json:"kekCertThumbprint,omitempty"` 2728 // KekCertExpiryDate - The key encryption key certificate expiry date. 2729 KekCertExpiryDate *date.Time `json:"kekCertExpiryDate,omitempty"` 2730} 2731 2732// Event implements the Event class. 2733type Event struct { 2734 autorest.Response `json:"-"` 2735 // Properties - Event related data. 2736 Properties *EventProperties `json:"properties,omitempty"` 2737 // ID - READ-ONLY; Resource Id 2738 ID *string `json:"id,omitempty"` 2739 // Name - READ-ONLY; Resource Name 2740 Name *string `json:"name,omitempty"` 2741 // Type - READ-ONLY; Resource Type 2742 Type *string `json:"type,omitempty"` 2743 // Location - Resource Location 2744 Location *string `json:"location,omitempty"` 2745} 2746 2747// MarshalJSON is the custom marshaler for Event. 2748func (e Event) MarshalJSON() ([]byte, error) { 2749 objectMap := make(map[string]interface{}) 2750 if e.Properties != nil { 2751 objectMap["properties"] = e.Properties 2752 } 2753 if e.Location != nil { 2754 objectMap["location"] = e.Location 2755 } 2756 return json.Marshal(objectMap) 2757} 2758 2759// EventCollection collection of fabric details. 2760type EventCollection struct { 2761 autorest.Response `json:"-"` 2762 // Value - The list of events. 2763 Value *[]Event `json:"value,omitempty"` 2764 // NextLink - The value of next link. 2765 NextLink *string `json:"nextLink,omitempty"` 2766} 2767 2768// EventCollectionIterator provides access to a complete listing of Event values. 2769type EventCollectionIterator struct { 2770 i int 2771 page EventCollectionPage 2772} 2773 2774// NextWithContext advances to the next value. If there was an error making 2775// the request the iterator does not advance and the error is returned. 2776func (iter *EventCollectionIterator) NextWithContext(ctx context.Context) (err error) { 2777 if tracing.IsEnabled() { 2778 ctx = tracing.StartSpan(ctx, fqdn+"/EventCollectionIterator.NextWithContext") 2779 defer func() { 2780 sc := -1 2781 if iter.Response().Response.Response != nil { 2782 sc = iter.Response().Response.Response.StatusCode 2783 } 2784 tracing.EndSpan(ctx, sc, err) 2785 }() 2786 } 2787 iter.i++ 2788 if iter.i < len(iter.page.Values()) { 2789 return nil 2790 } 2791 err = iter.page.NextWithContext(ctx) 2792 if err != nil { 2793 iter.i-- 2794 return err 2795 } 2796 iter.i = 0 2797 return nil 2798} 2799 2800// Next advances to the next value. If there was an error making 2801// the request the iterator does not advance and the error is returned. 2802// Deprecated: Use NextWithContext() instead. 2803func (iter *EventCollectionIterator) Next() error { 2804 return iter.NextWithContext(context.Background()) 2805} 2806 2807// NotDone returns true if the enumeration should be started or is not yet complete. 2808func (iter EventCollectionIterator) NotDone() bool { 2809 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 2810} 2811 2812// Response returns the raw server response from the last page request. 2813func (iter EventCollectionIterator) Response() EventCollection { 2814 return iter.page.Response() 2815} 2816 2817// Value returns the current value or a zero-initialized value if the 2818// iterator has advanced beyond the end of the collection. 2819func (iter EventCollectionIterator) Value() Event { 2820 if !iter.page.NotDone() { 2821 return Event{} 2822 } 2823 return iter.page.Values()[iter.i] 2824} 2825 2826// Creates a new instance of the EventCollectionIterator type. 2827func NewEventCollectionIterator(page EventCollectionPage) EventCollectionIterator { 2828 return EventCollectionIterator{page: page} 2829} 2830 2831// IsEmpty returns true if the ListResult contains no values. 2832func (ec EventCollection) IsEmpty() bool { 2833 return ec.Value == nil || len(*ec.Value) == 0 2834} 2835 2836// hasNextLink returns true if the NextLink is not empty. 2837func (ec EventCollection) hasNextLink() bool { 2838 return ec.NextLink != nil && len(*ec.NextLink) != 0 2839} 2840 2841// eventCollectionPreparer prepares a request to retrieve the next set of results. 2842// It returns nil if no more results exist. 2843func (ec EventCollection) eventCollectionPreparer(ctx context.Context) (*http.Request, error) { 2844 if !ec.hasNextLink() { 2845 return nil, nil 2846 } 2847 return autorest.Prepare((&http.Request{}).WithContext(ctx), 2848 autorest.AsJSON(), 2849 autorest.AsGet(), 2850 autorest.WithBaseURL(to.String(ec.NextLink))) 2851} 2852 2853// EventCollectionPage contains a page of Event values. 2854type EventCollectionPage struct { 2855 fn func(context.Context, EventCollection) (EventCollection, error) 2856 ec EventCollection 2857} 2858 2859// NextWithContext advances to the next page of values. If there was an error making 2860// the request the page does not advance and the error is returned. 2861func (page *EventCollectionPage) NextWithContext(ctx context.Context) (err error) { 2862 if tracing.IsEnabled() { 2863 ctx = tracing.StartSpan(ctx, fqdn+"/EventCollectionPage.NextWithContext") 2864 defer func() { 2865 sc := -1 2866 if page.Response().Response.Response != nil { 2867 sc = page.Response().Response.Response.StatusCode 2868 } 2869 tracing.EndSpan(ctx, sc, err) 2870 }() 2871 } 2872 for { 2873 next, err := page.fn(ctx, page.ec) 2874 if err != nil { 2875 return err 2876 } 2877 page.ec = next 2878 if !next.hasNextLink() || !next.IsEmpty() { 2879 break 2880 } 2881 } 2882 return nil 2883} 2884 2885// Next advances to the next page of values. If there was an error making 2886// the request the page does not advance and the error is returned. 2887// Deprecated: Use NextWithContext() instead. 2888func (page *EventCollectionPage) Next() error { 2889 return page.NextWithContext(context.Background()) 2890} 2891 2892// NotDone returns true if the page enumeration should be started or is not yet complete. 2893func (page EventCollectionPage) NotDone() bool { 2894 return !page.ec.IsEmpty() 2895} 2896 2897// Response returns the raw server response from the last page request. 2898func (page EventCollectionPage) Response() EventCollection { 2899 return page.ec 2900} 2901 2902// Values returns the slice of values for the current page or nil if there are no values. 2903func (page EventCollectionPage) Values() []Event { 2904 if page.ec.IsEmpty() { 2905 return nil 2906 } 2907 return *page.ec.Value 2908} 2909 2910// Creates a new instance of the EventCollectionPage type. 2911func NewEventCollectionPage(cur EventCollection, getNextPage func(context.Context, EventCollection) (EventCollection, error)) EventCollectionPage { 2912 return EventCollectionPage{ 2913 fn: getNextPage, 2914 ec: cur, 2915 } 2916} 2917 2918// EventProperties the properties of a monitoring event. 2919type EventProperties struct { 2920 // EventCode - The Id of the monitoring event. 2921 EventCode *string `json:"eventCode,omitempty"` 2922 // Description - The event name. 2923 Description *string `json:"description,omitempty"` 2924 // EventType - The type of the event. for example: VM Health, Server Health, Job Failure etc. 2925 EventType *string `json:"eventType,omitempty"` 2926 // AffectedObjectFriendlyName - The friendly name of the source of the event on which it is raised (for example, VM, VMM etc). 2927 AffectedObjectFriendlyName *string `json:"affectedObjectFriendlyName,omitempty"` 2928 // Severity - The severity of the event. 2929 Severity *string `json:"severity,omitempty"` 2930 // TimeOfOccurrence - The time of occurrence of the event. 2931 TimeOfOccurrence *date.Time `json:"timeOfOccurrence,omitempty"` 2932 // FabricID - The ARM ID of the fabric. 2933 FabricID *string `json:"fabricId,omitempty"` 2934 // ProviderSpecificDetails - The provider specific settings. 2935 ProviderSpecificDetails BasicEventProviderSpecificDetails `json:"providerSpecificDetails,omitempty"` 2936 // EventSpecificDetails - The event specific settings. 2937 EventSpecificDetails BasicEventSpecificDetails `json:"eventSpecificDetails,omitempty"` 2938 // HealthErrors - The list of errors / warnings capturing details associated with the issue(s). 2939 HealthErrors *[]HealthError `json:"healthErrors,omitempty"` 2940} 2941 2942// UnmarshalJSON is the custom unmarshaler for EventProperties struct. 2943func (ep *EventProperties) UnmarshalJSON(body []byte) error { 2944 var m map[string]*json.RawMessage 2945 err := json.Unmarshal(body, &m) 2946 if err != nil { 2947 return err 2948 } 2949 for k, v := range m { 2950 switch k { 2951 case "eventCode": 2952 if v != nil { 2953 var eventCode string 2954 err = json.Unmarshal(*v, &eventCode) 2955 if err != nil { 2956 return err 2957 } 2958 ep.EventCode = &eventCode 2959 } 2960 case "description": 2961 if v != nil { 2962 var description string 2963 err = json.Unmarshal(*v, &description) 2964 if err != nil { 2965 return err 2966 } 2967 ep.Description = &description 2968 } 2969 case "eventType": 2970 if v != nil { 2971 var eventType string 2972 err = json.Unmarshal(*v, &eventType) 2973 if err != nil { 2974 return err 2975 } 2976 ep.EventType = &eventType 2977 } 2978 case "affectedObjectFriendlyName": 2979 if v != nil { 2980 var affectedObjectFriendlyName string 2981 err = json.Unmarshal(*v, &affectedObjectFriendlyName) 2982 if err != nil { 2983 return err 2984 } 2985 ep.AffectedObjectFriendlyName = &affectedObjectFriendlyName 2986 } 2987 case "severity": 2988 if v != nil { 2989 var severity string 2990 err = json.Unmarshal(*v, &severity) 2991 if err != nil { 2992 return err 2993 } 2994 ep.Severity = &severity 2995 } 2996 case "timeOfOccurrence": 2997 if v != nil { 2998 var timeOfOccurrence date.Time 2999 err = json.Unmarshal(*v, &timeOfOccurrence) 3000 if err != nil { 3001 return err 3002 } 3003 ep.TimeOfOccurrence = &timeOfOccurrence 3004 } 3005 case "fabricId": 3006 if v != nil { 3007 var fabricID string 3008 err = json.Unmarshal(*v, &fabricID) 3009 if err != nil { 3010 return err 3011 } 3012 ep.FabricID = &fabricID 3013 } 3014 case "providerSpecificDetails": 3015 if v != nil { 3016 providerSpecificDetails, err := unmarshalBasicEventProviderSpecificDetails(*v) 3017 if err != nil { 3018 return err 3019 } 3020 ep.ProviderSpecificDetails = providerSpecificDetails 3021 } 3022 case "eventSpecificDetails": 3023 if v != nil { 3024 eventSpecificDetails, err := unmarshalBasicEventSpecificDetails(*v) 3025 if err != nil { 3026 return err 3027 } 3028 ep.EventSpecificDetails = eventSpecificDetails 3029 } 3030 case "healthErrors": 3031 if v != nil { 3032 var healthErrors []HealthError 3033 err = json.Unmarshal(*v, &healthErrors) 3034 if err != nil { 3035 return err 3036 } 3037 ep.HealthErrors = &healthErrors 3038 } 3039 } 3040 } 3041 3042 return nil 3043} 3044 3045// BasicEventProviderSpecificDetails model class for provider specific details for an event. 3046type BasicEventProviderSpecificDetails interface { 3047 AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) 3048 AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) 3049 AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) 3050 AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) 3051 AsA2AEventDetails() (*A2AEventDetails, bool) 3052 AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) 3053 AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) 3054} 3055 3056// EventProviderSpecificDetails model class for provider specific details for an event. 3057type EventProviderSpecificDetails struct { 3058 // InstanceType - Possible values include: 'InstanceTypeEventProviderSpecificDetails', 'InstanceTypeHyperVReplicaBaseEventDetails', 'InstanceTypeHyperVReplica2012', 'InstanceTypeHyperVReplica2012R2', 'InstanceTypeHyperVReplicaAzure', 'InstanceTypeA2A', 'InstanceTypeInMageAzureV2' 3059 InstanceType InstanceType `json:"instanceType,omitempty"` 3060} 3061 3062func unmarshalBasicEventProviderSpecificDetails(body []byte) (BasicEventProviderSpecificDetails, error) { 3063 var m map[string]interface{} 3064 err := json.Unmarshal(body, &m) 3065 if err != nil { 3066 return nil, err 3067 } 3068 3069 switch m["instanceType"] { 3070 case string(InstanceTypeHyperVReplicaBaseEventDetails): 3071 var hvrbed HyperVReplicaBaseEventDetails 3072 err := json.Unmarshal(body, &hvrbed) 3073 return hvrbed, err 3074 case string(InstanceTypeHyperVReplica2012): 3075 var hvr2ed HyperVReplica2012EventDetails 3076 err := json.Unmarshal(body, &hvr2ed) 3077 return hvr2ed, err 3078 case string(InstanceTypeHyperVReplica2012R2): 3079 var hvr2ed HyperVReplica2012R2EventDetails 3080 err := json.Unmarshal(body, &hvr2ed) 3081 return hvr2ed, err 3082 case string(InstanceTypeHyperVReplicaAzure): 3083 var hvraed HyperVReplicaAzureEventDetails 3084 err := json.Unmarshal(body, &hvraed) 3085 return hvraed, err 3086 case string(InstanceTypeA2A): 3087 var aed A2AEventDetails 3088 err := json.Unmarshal(body, &aed) 3089 return aed, err 3090 case string(InstanceTypeInMageAzureV2): 3091 var imaved InMageAzureV2EventDetails 3092 err := json.Unmarshal(body, &imaved) 3093 return imaved, err 3094 default: 3095 var epsd EventProviderSpecificDetails 3096 err := json.Unmarshal(body, &epsd) 3097 return epsd, err 3098 } 3099} 3100func unmarshalBasicEventProviderSpecificDetailsArray(body []byte) ([]BasicEventProviderSpecificDetails, error) { 3101 var rawMessages []*json.RawMessage 3102 err := json.Unmarshal(body, &rawMessages) 3103 if err != nil { 3104 return nil, err 3105 } 3106 3107 epsdArray := make([]BasicEventProviderSpecificDetails, len(rawMessages)) 3108 3109 for index, rawMessage := range rawMessages { 3110 epsd, err := unmarshalBasicEventProviderSpecificDetails(*rawMessage) 3111 if err != nil { 3112 return nil, err 3113 } 3114 epsdArray[index] = epsd 3115 } 3116 return epsdArray, nil 3117} 3118 3119// MarshalJSON is the custom marshaler for EventProviderSpecificDetails. 3120func (epsd EventProviderSpecificDetails) MarshalJSON() ([]byte, error) { 3121 epsd.InstanceType = InstanceTypeEventProviderSpecificDetails 3122 objectMap := make(map[string]interface{}) 3123 if epsd.InstanceType != "" { 3124 objectMap["instanceType"] = epsd.InstanceType 3125 } 3126 return json.Marshal(objectMap) 3127} 3128 3129// AsHyperVReplicaBaseEventDetails is the BasicEventProviderSpecificDetails implementation for EventProviderSpecificDetails. 3130func (epsd EventProviderSpecificDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) { 3131 return nil, false 3132} 3133 3134// AsHyperVReplica2012EventDetails is the BasicEventProviderSpecificDetails implementation for EventProviderSpecificDetails. 3135func (epsd EventProviderSpecificDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) { 3136 return nil, false 3137} 3138 3139// AsHyperVReplica2012R2EventDetails is the BasicEventProviderSpecificDetails implementation for EventProviderSpecificDetails. 3140func (epsd EventProviderSpecificDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) { 3141 return nil, false 3142} 3143 3144// AsHyperVReplicaAzureEventDetails is the BasicEventProviderSpecificDetails implementation for EventProviderSpecificDetails. 3145func (epsd EventProviderSpecificDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) { 3146 return nil, false 3147} 3148 3149// AsA2AEventDetails is the BasicEventProviderSpecificDetails implementation for EventProviderSpecificDetails. 3150func (epsd EventProviderSpecificDetails) AsA2AEventDetails() (*A2AEventDetails, bool) { 3151 return nil, false 3152} 3153 3154// AsInMageAzureV2EventDetails is the BasicEventProviderSpecificDetails implementation for EventProviderSpecificDetails. 3155func (epsd EventProviderSpecificDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) { 3156 return nil, false 3157} 3158 3159// AsEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for EventProviderSpecificDetails. 3160func (epsd EventProviderSpecificDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) { 3161 return &epsd, true 3162} 3163 3164// AsBasicEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for EventProviderSpecificDetails. 3165func (epsd EventProviderSpecificDetails) AsBasicEventProviderSpecificDetails() (BasicEventProviderSpecificDetails, bool) { 3166 return &epsd, true 3167} 3168 3169// EventQueryParameter implements the event query parameter. 3170type EventQueryParameter struct { 3171 // EventCode - The source id of the events to be queried. 3172 EventCode *string `json:"EventCode,omitempty"` 3173 // Severity - The severity of the events to be queried. 3174 Severity *string `json:"Severity,omitempty"` 3175 // EventType - The type of the events to be queried. 3176 EventType *string `json:"EventType,omitempty"` 3177 // FabricName - The affected object server id of the events to be queried. 3178 FabricName *string `json:"FabricName,omitempty"` 3179 // AffectedObjectFriendlyName - The affected object name of the events to be queried. 3180 AffectedObjectFriendlyName *string `json:"AffectedObjectFriendlyName,omitempty"` 3181 // StartTime - The start time of the time range within which the events are to be queried. 3182 StartTime *date.Time `json:"StartTime,omitempty"` 3183 // EndTime - The end time of the time range within which the events are to be queried. 3184 EndTime *date.Time `json:"EndTime,omitempty"` 3185} 3186 3187// BasicEventSpecificDetails model class for event specific details for an event. 3188type BasicEventSpecificDetails interface { 3189 AsJobStatusEventDetails() (*JobStatusEventDetails, bool) 3190 AsEventSpecificDetails() (*EventSpecificDetails, bool) 3191} 3192 3193// EventSpecificDetails model class for event specific details for an event. 3194type EventSpecificDetails struct { 3195 // InstanceType - Possible values include: 'InstanceTypeEventSpecificDetails', 'InstanceTypeJobStatus' 3196 InstanceType InstanceTypeBasicEventSpecificDetails `json:"instanceType,omitempty"` 3197} 3198 3199func unmarshalBasicEventSpecificDetails(body []byte) (BasicEventSpecificDetails, error) { 3200 var m map[string]interface{} 3201 err := json.Unmarshal(body, &m) 3202 if err != nil { 3203 return nil, err 3204 } 3205 3206 switch m["instanceType"] { 3207 case string(InstanceTypeJobStatus): 3208 var jsed JobStatusEventDetails 3209 err := json.Unmarshal(body, &jsed) 3210 return jsed, err 3211 default: 3212 var esd EventSpecificDetails 3213 err := json.Unmarshal(body, &esd) 3214 return esd, err 3215 } 3216} 3217func unmarshalBasicEventSpecificDetailsArray(body []byte) ([]BasicEventSpecificDetails, error) { 3218 var rawMessages []*json.RawMessage 3219 err := json.Unmarshal(body, &rawMessages) 3220 if err != nil { 3221 return nil, err 3222 } 3223 3224 esdArray := make([]BasicEventSpecificDetails, len(rawMessages)) 3225 3226 for index, rawMessage := range rawMessages { 3227 esd, err := unmarshalBasicEventSpecificDetails(*rawMessage) 3228 if err != nil { 3229 return nil, err 3230 } 3231 esdArray[index] = esd 3232 } 3233 return esdArray, nil 3234} 3235 3236// MarshalJSON is the custom marshaler for EventSpecificDetails. 3237func (esd EventSpecificDetails) MarshalJSON() ([]byte, error) { 3238 esd.InstanceType = InstanceTypeEventSpecificDetails 3239 objectMap := make(map[string]interface{}) 3240 if esd.InstanceType != "" { 3241 objectMap["instanceType"] = esd.InstanceType 3242 } 3243 return json.Marshal(objectMap) 3244} 3245 3246// AsJobStatusEventDetails is the BasicEventSpecificDetails implementation for EventSpecificDetails. 3247func (esd EventSpecificDetails) AsJobStatusEventDetails() (*JobStatusEventDetails, bool) { 3248 return nil, false 3249} 3250 3251// AsEventSpecificDetails is the BasicEventSpecificDetails implementation for EventSpecificDetails. 3252func (esd EventSpecificDetails) AsEventSpecificDetails() (*EventSpecificDetails, bool) { 3253 return &esd, true 3254} 3255 3256// AsBasicEventSpecificDetails is the BasicEventSpecificDetails implementation for EventSpecificDetails. 3257func (esd EventSpecificDetails) AsBasicEventSpecificDetails() (BasicEventSpecificDetails, bool) { 3258 return &esd, true 3259} 3260 3261// ExportJobDetails this class represents details for export jobs workflow. 3262type ExportJobDetails struct { 3263 // BlobURI - BlobUri of the exported jobs. 3264 BlobURI *string `json:"blobUri,omitempty"` 3265 // SasToken - The sas token to access blob. 3266 SasToken *string `json:"sasToken,omitempty"` 3267 // AffectedObjectDetails - The affected object properties like source server, source cloud, target server, target cloud etc. based on the workflow object details. 3268 AffectedObjectDetails map[string]*string `json:"affectedObjectDetails"` 3269 // InstanceType - Possible values include: 'InstanceTypeJobDetails', 'InstanceTypeAsrJobDetails', 'InstanceTypeTestFailoverJobDetails', 'InstanceTypeFailoverJobDetails', 'InstanceTypeExportJobDetails', 'InstanceTypeSwitchProtectionJobDetails' 3270 InstanceType InstanceTypeBasicJobDetails `json:"instanceType,omitempty"` 3271} 3272 3273// MarshalJSON is the custom marshaler for ExportJobDetails. 3274func (ejd ExportJobDetails) MarshalJSON() ([]byte, error) { 3275 ejd.InstanceType = InstanceTypeExportJobDetails 3276 objectMap := make(map[string]interface{}) 3277 if ejd.BlobURI != nil { 3278 objectMap["blobUri"] = ejd.BlobURI 3279 } 3280 if ejd.SasToken != nil { 3281 objectMap["sasToken"] = ejd.SasToken 3282 } 3283 if ejd.AffectedObjectDetails != nil { 3284 objectMap["affectedObjectDetails"] = ejd.AffectedObjectDetails 3285 } 3286 if ejd.InstanceType != "" { 3287 objectMap["instanceType"] = ejd.InstanceType 3288 } 3289 return json.Marshal(objectMap) 3290} 3291 3292// AsAsrJobDetails is the BasicJobDetails implementation for ExportJobDetails. 3293func (ejd ExportJobDetails) AsAsrJobDetails() (*AsrJobDetails, bool) { 3294 return nil, false 3295} 3296 3297// AsTestFailoverJobDetails is the BasicJobDetails implementation for ExportJobDetails. 3298func (ejd ExportJobDetails) AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool) { 3299 return nil, false 3300} 3301 3302// AsFailoverJobDetails is the BasicJobDetails implementation for ExportJobDetails. 3303func (ejd ExportJobDetails) AsFailoverJobDetails() (*FailoverJobDetails, bool) { 3304 return nil, false 3305} 3306 3307// AsExportJobDetails is the BasicJobDetails implementation for ExportJobDetails. 3308func (ejd ExportJobDetails) AsExportJobDetails() (*ExportJobDetails, bool) { 3309 return &ejd, true 3310} 3311 3312// AsSwitchProtectionJobDetails is the BasicJobDetails implementation for ExportJobDetails. 3313func (ejd ExportJobDetails) AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool) { 3314 return nil, false 3315} 3316 3317// AsJobDetails is the BasicJobDetails implementation for ExportJobDetails. 3318func (ejd ExportJobDetails) AsJobDetails() (*JobDetails, bool) { 3319 return nil, false 3320} 3321 3322// AsBasicJobDetails is the BasicJobDetails implementation for ExportJobDetails. 3323func (ejd ExportJobDetails) AsBasicJobDetails() (BasicJobDetails, bool) { 3324 return &ejd, true 3325} 3326 3327// Fabric fabric definition. 3328type Fabric struct { 3329 autorest.Response `json:"-"` 3330 // Properties - Fabric related data. 3331 Properties *FabricProperties `json:"properties,omitempty"` 3332 // ID - READ-ONLY; Resource Id 3333 ID *string `json:"id,omitempty"` 3334 // Name - READ-ONLY; Resource Name 3335 Name *string `json:"name,omitempty"` 3336 // Type - READ-ONLY; Resource Type 3337 Type *string `json:"type,omitempty"` 3338 // Location - Resource Location 3339 Location *string `json:"location,omitempty"` 3340} 3341 3342// MarshalJSON is the custom marshaler for Fabric. 3343func (f Fabric) MarshalJSON() ([]byte, error) { 3344 objectMap := make(map[string]interface{}) 3345 if f.Properties != nil { 3346 objectMap["properties"] = f.Properties 3347 } 3348 if f.Location != nil { 3349 objectMap["location"] = f.Location 3350 } 3351 return json.Marshal(objectMap) 3352} 3353 3354// FabricCollection collection of fabric details. 3355type FabricCollection struct { 3356 autorest.Response `json:"-"` 3357 // Value - The fabric details. 3358 Value *[]Fabric `json:"value,omitempty"` 3359 // NextLink - The value of next link. 3360 NextLink *string `json:"nextLink,omitempty"` 3361} 3362 3363// FabricCollectionIterator provides access to a complete listing of Fabric values. 3364type FabricCollectionIterator struct { 3365 i int 3366 page FabricCollectionPage 3367} 3368 3369// NextWithContext advances to the next value. If there was an error making 3370// the request the iterator does not advance and the error is returned. 3371func (iter *FabricCollectionIterator) NextWithContext(ctx context.Context) (err error) { 3372 if tracing.IsEnabled() { 3373 ctx = tracing.StartSpan(ctx, fqdn+"/FabricCollectionIterator.NextWithContext") 3374 defer func() { 3375 sc := -1 3376 if iter.Response().Response.Response != nil { 3377 sc = iter.Response().Response.Response.StatusCode 3378 } 3379 tracing.EndSpan(ctx, sc, err) 3380 }() 3381 } 3382 iter.i++ 3383 if iter.i < len(iter.page.Values()) { 3384 return nil 3385 } 3386 err = iter.page.NextWithContext(ctx) 3387 if err != nil { 3388 iter.i-- 3389 return err 3390 } 3391 iter.i = 0 3392 return nil 3393} 3394 3395// Next advances to the next value. If there was an error making 3396// the request the iterator does not advance and the error is returned. 3397// Deprecated: Use NextWithContext() instead. 3398func (iter *FabricCollectionIterator) Next() error { 3399 return iter.NextWithContext(context.Background()) 3400} 3401 3402// NotDone returns true if the enumeration should be started or is not yet complete. 3403func (iter FabricCollectionIterator) NotDone() bool { 3404 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 3405} 3406 3407// Response returns the raw server response from the last page request. 3408func (iter FabricCollectionIterator) Response() FabricCollection { 3409 return iter.page.Response() 3410} 3411 3412// Value returns the current value or a zero-initialized value if the 3413// iterator has advanced beyond the end of the collection. 3414func (iter FabricCollectionIterator) Value() Fabric { 3415 if !iter.page.NotDone() { 3416 return Fabric{} 3417 } 3418 return iter.page.Values()[iter.i] 3419} 3420 3421// Creates a new instance of the FabricCollectionIterator type. 3422func NewFabricCollectionIterator(page FabricCollectionPage) FabricCollectionIterator { 3423 return FabricCollectionIterator{page: page} 3424} 3425 3426// IsEmpty returns true if the ListResult contains no values. 3427func (fc FabricCollection) IsEmpty() bool { 3428 return fc.Value == nil || len(*fc.Value) == 0 3429} 3430 3431// hasNextLink returns true if the NextLink is not empty. 3432func (fc FabricCollection) hasNextLink() bool { 3433 return fc.NextLink != nil && len(*fc.NextLink) != 0 3434} 3435 3436// fabricCollectionPreparer prepares a request to retrieve the next set of results. 3437// It returns nil if no more results exist. 3438func (fc FabricCollection) fabricCollectionPreparer(ctx context.Context) (*http.Request, error) { 3439 if !fc.hasNextLink() { 3440 return nil, nil 3441 } 3442 return autorest.Prepare((&http.Request{}).WithContext(ctx), 3443 autorest.AsJSON(), 3444 autorest.AsGet(), 3445 autorest.WithBaseURL(to.String(fc.NextLink))) 3446} 3447 3448// FabricCollectionPage contains a page of Fabric values. 3449type FabricCollectionPage struct { 3450 fn func(context.Context, FabricCollection) (FabricCollection, error) 3451 fc FabricCollection 3452} 3453 3454// NextWithContext advances to the next page of values. If there was an error making 3455// the request the page does not advance and the error is returned. 3456func (page *FabricCollectionPage) NextWithContext(ctx context.Context) (err error) { 3457 if tracing.IsEnabled() { 3458 ctx = tracing.StartSpan(ctx, fqdn+"/FabricCollectionPage.NextWithContext") 3459 defer func() { 3460 sc := -1 3461 if page.Response().Response.Response != nil { 3462 sc = page.Response().Response.Response.StatusCode 3463 } 3464 tracing.EndSpan(ctx, sc, err) 3465 }() 3466 } 3467 for { 3468 next, err := page.fn(ctx, page.fc) 3469 if err != nil { 3470 return err 3471 } 3472 page.fc = next 3473 if !next.hasNextLink() || !next.IsEmpty() { 3474 break 3475 } 3476 } 3477 return nil 3478} 3479 3480// Next advances to the next page of values. If there was an error making 3481// the request the page does not advance and the error is returned. 3482// Deprecated: Use NextWithContext() instead. 3483func (page *FabricCollectionPage) Next() error { 3484 return page.NextWithContext(context.Background()) 3485} 3486 3487// NotDone returns true if the page enumeration should be started or is not yet complete. 3488func (page FabricCollectionPage) NotDone() bool { 3489 return !page.fc.IsEmpty() 3490} 3491 3492// Response returns the raw server response from the last page request. 3493func (page FabricCollectionPage) Response() FabricCollection { 3494 return page.fc 3495} 3496 3497// Values returns the slice of values for the current page or nil if there are no values. 3498func (page FabricCollectionPage) Values() []Fabric { 3499 if page.fc.IsEmpty() { 3500 return nil 3501 } 3502 return *page.fc.Value 3503} 3504 3505// Creates a new instance of the FabricCollectionPage type. 3506func NewFabricCollectionPage(cur FabricCollection, getNextPage func(context.Context, FabricCollection) (FabricCollection, error)) FabricCollectionPage { 3507 return FabricCollectionPage{ 3508 fn: getNextPage, 3509 fc: cur, 3510 } 3511} 3512 3513// FabricCreationInput site details provided during the time of site creation 3514type FabricCreationInput struct { 3515 // Properties - Fabric creation input. 3516 Properties *FabricCreationInputProperties `json:"properties,omitempty"` 3517} 3518 3519// FabricCreationInputProperties properties of site details provided during the time of site creation 3520type FabricCreationInputProperties struct { 3521 // CustomDetails - Fabric provider specific creation input. 3522 CustomDetails BasicFabricSpecificCreationInput `json:"customDetails,omitempty"` 3523} 3524 3525// UnmarshalJSON is the custom unmarshaler for FabricCreationInputProperties struct. 3526func (fcip *FabricCreationInputProperties) UnmarshalJSON(body []byte) error { 3527 var m map[string]*json.RawMessage 3528 err := json.Unmarshal(body, &m) 3529 if err != nil { 3530 return err 3531 } 3532 for k, v := range m { 3533 switch k { 3534 case "customDetails": 3535 if v != nil { 3536 customDetails, err := unmarshalBasicFabricSpecificCreationInput(*v) 3537 if err != nil { 3538 return err 3539 } 3540 fcip.CustomDetails = customDetails 3541 } 3542 } 3543 } 3544 3545 return nil 3546} 3547 3548// FabricProperties fabric properties. 3549type FabricProperties struct { 3550 // FriendlyName - Friendly name of the fabric. 3551 FriendlyName *string `json:"friendlyName,omitempty"` 3552 // EncryptionDetails - Encryption details for the fabric. 3553 EncryptionDetails *EncryptionDetails `json:"encryptionDetails,omitempty"` 3554 // RolloverEncryptionDetails - Rollover encryption details for the fabric. 3555 RolloverEncryptionDetails *EncryptionDetails `json:"rolloverEncryptionDetails,omitempty"` 3556 // InternalIdentifier - Dra Registration Id. 3557 InternalIdentifier *string `json:"internalIdentifier,omitempty"` 3558 // BcdrState - BCDR state of the fabric. 3559 BcdrState *string `json:"bcdrState,omitempty"` 3560 // CustomDetails - Fabric specific settings. 3561 CustomDetails BasicFabricSpecificDetails `json:"customDetails,omitempty"` 3562 // HealthErrorDetails - Fabric health error details. 3563 HealthErrorDetails *[]HealthError `json:"healthErrorDetails,omitempty"` 3564 // Health - Health of fabric. 3565 Health *string `json:"health,omitempty"` 3566} 3567 3568// UnmarshalJSON is the custom unmarshaler for FabricProperties struct. 3569func (fp *FabricProperties) UnmarshalJSON(body []byte) error { 3570 var m map[string]*json.RawMessage 3571 err := json.Unmarshal(body, &m) 3572 if err != nil { 3573 return err 3574 } 3575 for k, v := range m { 3576 switch k { 3577 case "friendlyName": 3578 if v != nil { 3579 var friendlyName string 3580 err = json.Unmarshal(*v, &friendlyName) 3581 if err != nil { 3582 return err 3583 } 3584 fp.FriendlyName = &friendlyName 3585 } 3586 case "encryptionDetails": 3587 if v != nil { 3588 var encryptionDetails EncryptionDetails 3589 err = json.Unmarshal(*v, &encryptionDetails) 3590 if err != nil { 3591 return err 3592 } 3593 fp.EncryptionDetails = &encryptionDetails 3594 } 3595 case "rolloverEncryptionDetails": 3596 if v != nil { 3597 var rolloverEncryptionDetails EncryptionDetails 3598 err = json.Unmarshal(*v, &rolloverEncryptionDetails) 3599 if err != nil { 3600 return err 3601 } 3602 fp.RolloverEncryptionDetails = &rolloverEncryptionDetails 3603 } 3604 case "internalIdentifier": 3605 if v != nil { 3606 var internalIdentifier string 3607 err = json.Unmarshal(*v, &internalIdentifier) 3608 if err != nil { 3609 return err 3610 } 3611 fp.InternalIdentifier = &internalIdentifier 3612 } 3613 case "bcdrState": 3614 if v != nil { 3615 var bcdrState string 3616 err = json.Unmarshal(*v, &bcdrState) 3617 if err != nil { 3618 return err 3619 } 3620 fp.BcdrState = &bcdrState 3621 } 3622 case "customDetails": 3623 if v != nil { 3624 customDetails, err := unmarshalBasicFabricSpecificDetails(*v) 3625 if err != nil { 3626 return err 3627 } 3628 fp.CustomDetails = customDetails 3629 } 3630 case "healthErrorDetails": 3631 if v != nil { 3632 var healthErrorDetails []HealthError 3633 err = json.Unmarshal(*v, &healthErrorDetails) 3634 if err != nil { 3635 return err 3636 } 3637 fp.HealthErrorDetails = &healthErrorDetails 3638 } 3639 case "health": 3640 if v != nil { 3641 var health string 3642 err = json.Unmarshal(*v, &health) 3643 if err != nil { 3644 return err 3645 } 3646 fp.Health = &health 3647 } 3648 } 3649 } 3650 3651 return nil 3652} 3653 3654// FabricReplicationGroupTaskDetails this class represents the fabric replication group task details. 3655type FabricReplicationGroupTaskDetails struct { 3656 // SkippedReason - The skipped reason. 3657 SkippedReason *string `json:"skippedReason,omitempty"` 3658 // SkippedReasonString - The skipped reason string. 3659 SkippedReasonString *string `json:"skippedReasonString,omitempty"` 3660 // JobTask - The job entity. 3661 JobTask *JobEntity `json:"jobTask,omitempty"` 3662 // InstanceType - Possible values include: 'InstanceTypeTaskTypeDetails', 'InstanceTypeJobTaskDetails', 'InstanceTypeVirtualMachineTaskDetails', 'InstanceTypeFabricReplicationGroupTaskDetails', 'InstanceTypeManualActionTaskDetails', 'InstanceTypeScriptActionTaskDetails', 'InstanceTypeVMNicUpdatesTaskDetails', 'InstanceTypeConsistencyCheckTaskDetails', 'InstanceTypeAutomationRunbookTaskDetails' 3663 InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"` 3664} 3665 3666// MarshalJSON is the custom marshaler for FabricReplicationGroupTaskDetails. 3667func (frgtd FabricReplicationGroupTaskDetails) MarshalJSON() ([]byte, error) { 3668 frgtd.InstanceType = InstanceTypeFabricReplicationGroupTaskDetails 3669 objectMap := make(map[string]interface{}) 3670 if frgtd.SkippedReason != nil { 3671 objectMap["skippedReason"] = frgtd.SkippedReason 3672 } 3673 if frgtd.SkippedReasonString != nil { 3674 objectMap["skippedReasonString"] = frgtd.SkippedReasonString 3675 } 3676 if frgtd.JobTask != nil { 3677 objectMap["jobTask"] = frgtd.JobTask 3678 } 3679 if frgtd.InstanceType != "" { 3680 objectMap["instanceType"] = frgtd.InstanceType 3681 } 3682 return json.Marshal(objectMap) 3683} 3684 3685// AsJobTaskDetails is the BasicTaskTypeDetails implementation for FabricReplicationGroupTaskDetails. 3686func (frgtd FabricReplicationGroupTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) { 3687 return nil, false 3688} 3689 3690// AsVirtualMachineTaskDetails is the BasicTaskTypeDetails implementation for FabricReplicationGroupTaskDetails. 3691func (frgtd FabricReplicationGroupTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) { 3692 return nil, false 3693} 3694 3695// AsFabricReplicationGroupTaskDetails is the BasicTaskTypeDetails implementation for FabricReplicationGroupTaskDetails. 3696func (frgtd FabricReplicationGroupTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) { 3697 return &frgtd, true 3698} 3699 3700// AsManualActionTaskDetails is the BasicTaskTypeDetails implementation for FabricReplicationGroupTaskDetails. 3701func (frgtd FabricReplicationGroupTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) { 3702 return nil, false 3703} 3704 3705// AsScriptActionTaskDetails is the BasicTaskTypeDetails implementation for FabricReplicationGroupTaskDetails. 3706func (frgtd FabricReplicationGroupTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) { 3707 return nil, false 3708} 3709 3710// AsVMNicUpdatesTaskDetails is the BasicTaskTypeDetails implementation for FabricReplicationGroupTaskDetails. 3711func (frgtd FabricReplicationGroupTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) { 3712 return nil, false 3713} 3714 3715// AsConsistencyCheckTaskDetails is the BasicTaskTypeDetails implementation for FabricReplicationGroupTaskDetails. 3716func (frgtd FabricReplicationGroupTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) { 3717 return nil, false 3718} 3719 3720// AsAutomationRunbookTaskDetails is the BasicTaskTypeDetails implementation for FabricReplicationGroupTaskDetails. 3721func (frgtd FabricReplicationGroupTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) { 3722 return nil, false 3723} 3724 3725// AsTaskTypeDetails is the BasicTaskTypeDetails implementation for FabricReplicationGroupTaskDetails. 3726func (frgtd FabricReplicationGroupTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) { 3727 return nil, false 3728} 3729 3730// AsBasicTaskTypeDetails is the BasicTaskTypeDetails implementation for FabricReplicationGroupTaskDetails. 3731func (frgtd FabricReplicationGroupTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) { 3732 return &frgtd, true 3733} 3734 3735// BasicFabricSpecificCreateNetworkMappingInput input details specific to fabrics during Network Mapping. 3736type BasicFabricSpecificCreateNetworkMappingInput interface { 3737 AsAzureToAzureCreateNetworkMappingInput() (*AzureToAzureCreateNetworkMappingInput, bool) 3738 AsVmmToAzureCreateNetworkMappingInput() (*VmmToAzureCreateNetworkMappingInput, bool) 3739 AsVmmToVmmCreateNetworkMappingInput() (*VmmToVmmCreateNetworkMappingInput, bool) 3740 AsFabricSpecificCreateNetworkMappingInput() (*FabricSpecificCreateNetworkMappingInput, bool) 3741} 3742 3743// FabricSpecificCreateNetworkMappingInput input details specific to fabrics during Network Mapping. 3744type FabricSpecificCreateNetworkMappingInput struct { 3745 // InstanceType - Possible values include: 'InstanceTypeFabricSpecificCreateNetworkMappingInput', 'InstanceTypeAzureToAzure', 'InstanceTypeVmmToAzure', 'InstanceTypeVmmToVmm' 3746 InstanceType InstanceTypeBasicFabricSpecificCreateNetworkMappingInput `json:"instanceType,omitempty"` 3747} 3748 3749func unmarshalBasicFabricSpecificCreateNetworkMappingInput(body []byte) (BasicFabricSpecificCreateNetworkMappingInput, error) { 3750 var m map[string]interface{} 3751 err := json.Unmarshal(body, &m) 3752 if err != nil { 3753 return nil, err 3754 } 3755 3756 switch m["instanceType"] { 3757 case string(InstanceTypeAzureToAzure): 3758 var atacnmi AzureToAzureCreateNetworkMappingInput 3759 err := json.Unmarshal(body, &atacnmi) 3760 return atacnmi, err 3761 case string(InstanceTypeVmmToAzure): 3762 var vtacnmi VmmToAzureCreateNetworkMappingInput 3763 err := json.Unmarshal(body, &vtacnmi) 3764 return vtacnmi, err 3765 case string(InstanceTypeVmmToVmm): 3766 var vtvcnmi VmmToVmmCreateNetworkMappingInput 3767 err := json.Unmarshal(body, &vtvcnmi) 3768 return vtvcnmi, err 3769 default: 3770 var fscnmi FabricSpecificCreateNetworkMappingInput 3771 err := json.Unmarshal(body, &fscnmi) 3772 return fscnmi, err 3773 } 3774} 3775func unmarshalBasicFabricSpecificCreateNetworkMappingInputArray(body []byte) ([]BasicFabricSpecificCreateNetworkMappingInput, error) { 3776 var rawMessages []*json.RawMessage 3777 err := json.Unmarshal(body, &rawMessages) 3778 if err != nil { 3779 return nil, err 3780 } 3781 3782 fscnmiArray := make([]BasicFabricSpecificCreateNetworkMappingInput, len(rawMessages)) 3783 3784 for index, rawMessage := range rawMessages { 3785 fscnmi, err := unmarshalBasicFabricSpecificCreateNetworkMappingInput(*rawMessage) 3786 if err != nil { 3787 return nil, err 3788 } 3789 fscnmiArray[index] = fscnmi 3790 } 3791 return fscnmiArray, nil 3792} 3793 3794// MarshalJSON is the custom marshaler for FabricSpecificCreateNetworkMappingInput. 3795func (fscnmi FabricSpecificCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { 3796 fscnmi.InstanceType = InstanceTypeFabricSpecificCreateNetworkMappingInput 3797 objectMap := make(map[string]interface{}) 3798 if fscnmi.InstanceType != "" { 3799 objectMap["instanceType"] = fscnmi.InstanceType 3800 } 3801 return json.Marshal(objectMap) 3802} 3803 3804// AsAzureToAzureCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for FabricSpecificCreateNetworkMappingInput. 3805func (fscnmi FabricSpecificCreateNetworkMappingInput) AsAzureToAzureCreateNetworkMappingInput() (*AzureToAzureCreateNetworkMappingInput, bool) { 3806 return nil, false 3807} 3808 3809// AsVmmToAzureCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for FabricSpecificCreateNetworkMappingInput. 3810func (fscnmi FabricSpecificCreateNetworkMappingInput) AsVmmToAzureCreateNetworkMappingInput() (*VmmToAzureCreateNetworkMappingInput, bool) { 3811 return nil, false 3812} 3813 3814// AsVmmToVmmCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for FabricSpecificCreateNetworkMappingInput. 3815func (fscnmi FabricSpecificCreateNetworkMappingInput) AsVmmToVmmCreateNetworkMappingInput() (*VmmToVmmCreateNetworkMappingInput, bool) { 3816 return nil, false 3817} 3818 3819// AsFabricSpecificCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for FabricSpecificCreateNetworkMappingInput. 3820func (fscnmi FabricSpecificCreateNetworkMappingInput) AsFabricSpecificCreateNetworkMappingInput() (*FabricSpecificCreateNetworkMappingInput, bool) { 3821 return &fscnmi, true 3822} 3823 3824// AsBasicFabricSpecificCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for FabricSpecificCreateNetworkMappingInput. 3825func (fscnmi FabricSpecificCreateNetworkMappingInput) AsBasicFabricSpecificCreateNetworkMappingInput() (BasicFabricSpecificCreateNetworkMappingInput, bool) { 3826 return &fscnmi, true 3827} 3828 3829// BasicFabricSpecificCreationInput fabric provider specific settings. 3830type BasicFabricSpecificCreationInput interface { 3831 AsAzureFabricCreationInput() (*AzureFabricCreationInput, bool) 3832 AsVMwareV2FabricCreationInput() (*VMwareV2FabricCreationInput, bool) 3833 AsFabricSpecificCreationInput() (*FabricSpecificCreationInput, bool) 3834} 3835 3836// FabricSpecificCreationInput fabric provider specific settings. 3837type FabricSpecificCreationInput struct { 3838 // InstanceType - Possible values include: 'InstanceTypeFabricSpecificCreationInput', 'InstanceTypeAzure', 'InstanceTypeVMwareV2' 3839 InstanceType InstanceTypeBasicFabricSpecificCreationInput `json:"instanceType,omitempty"` 3840} 3841 3842func unmarshalBasicFabricSpecificCreationInput(body []byte) (BasicFabricSpecificCreationInput, error) { 3843 var m map[string]interface{} 3844 err := json.Unmarshal(body, &m) 3845 if err != nil { 3846 return nil, err 3847 } 3848 3849 switch m["instanceType"] { 3850 case string(InstanceTypeAzure): 3851 var afci AzureFabricCreationInput 3852 err := json.Unmarshal(body, &afci) 3853 return afci, err 3854 case string(InstanceTypeVMwareV2): 3855 var vmvfci VMwareV2FabricCreationInput 3856 err := json.Unmarshal(body, &vmvfci) 3857 return vmvfci, err 3858 default: 3859 var fsci FabricSpecificCreationInput 3860 err := json.Unmarshal(body, &fsci) 3861 return fsci, err 3862 } 3863} 3864func unmarshalBasicFabricSpecificCreationInputArray(body []byte) ([]BasicFabricSpecificCreationInput, error) { 3865 var rawMessages []*json.RawMessage 3866 err := json.Unmarshal(body, &rawMessages) 3867 if err != nil { 3868 return nil, err 3869 } 3870 3871 fsciArray := make([]BasicFabricSpecificCreationInput, len(rawMessages)) 3872 3873 for index, rawMessage := range rawMessages { 3874 fsci, err := unmarshalBasicFabricSpecificCreationInput(*rawMessage) 3875 if err != nil { 3876 return nil, err 3877 } 3878 fsciArray[index] = fsci 3879 } 3880 return fsciArray, nil 3881} 3882 3883// MarshalJSON is the custom marshaler for FabricSpecificCreationInput. 3884func (fsci FabricSpecificCreationInput) MarshalJSON() ([]byte, error) { 3885 fsci.InstanceType = InstanceTypeFabricSpecificCreationInput 3886 objectMap := make(map[string]interface{}) 3887 if fsci.InstanceType != "" { 3888 objectMap["instanceType"] = fsci.InstanceType 3889 } 3890 return json.Marshal(objectMap) 3891} 3892 3893// AsAzureFabricCreationInput is the BasicFabricSpecificCreationInput implementation for FabricSpecificCreationInput. 3894func (fsci FabricSpecificCreationInput) AsAzureFabricCreationInput() (*AzureFabricCreationInput, bool) { 3895 return nil, false 3896} 3897 3898// AsVMwareV2FabricCreationInput is the BasicFabricSpecificCreationInput implementation for FabricSpecificCreationInput. 3899func (fsci FabricSpecificCreationInput) AsVMwareV2FabricCreationInput() (*VMwareV2FabricCreationInput, bool) { 3900 return nil, false 3901} 3902 3903// AsFabricSpecificCreationInput is the BasicFabricSpecificCreationInput implementation for FabricSpecificCreationInput. 3904func (fsci FabricSpecificCreationInput) AsFabricSpecificCreationInput() (*FabricSpecificCreationInput, bool) { 3905 return &fsci, true 3906} 3907 3908// AsBasicFabricSpecificCreationInput is the BasicFabricSpecificCreationInput implementation for FabricSpecificCreationInput. 3909func (fsci FabricSpecificCreationInput) AsBasicFabricSpecificCreationInput() (BasicFabricSpecificCreationInput, bool) { 3910 return &fsci, true 3911} 3912 3913// BasicFabricSpecificDetails fabric specific details. 3914type BasicFabricSpecificDetails interface { 3915 AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool) 3916 AsVmmDetails() (*VmmDetails, bool) 3917 AsHyperVSiteDetails() (*HyperVSiteDetails, bool) 3918 AsVMwareDetails() (*VMwareDetails, bool) 3919 AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool) 3920 AsFabricSpecificDetails() (*FabricSpecificDetails, bool) 3921} 3922 3923// FabricSpecificDetails fabric specific details. 3924type FabricSpecificDetails struct { 3925 // InstanceType - Possible values include: 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeFabricSpecificDetails', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeAzure', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMM', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeHyperVSite', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMware', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMwareV2' 3926 InstanceType InstanceTypeBasicFabricSpecificDetails `json:"instanceType,omitempty"` 3927} 3928 3929func unmarshalBasicFabricSpecificDetails(body []byte) (BasicFabricSpecificDetails, error) { 3930 var m map[string]interface{} 3931 err := json.Unmarshal(body, &m) 3932 if err != nil { 3933 return nil, err 3934 } 3935 3936 switch m["instanceType"] { 3937 case string(InstanceTypeBasicFabricSpecificDetailsInstanceTypeAzure): 3938 var afsd AzureFabricSpecificDetails 3939 err := json.Unmarshal(body, &afsd) 3940 return afsd, err 3941 case string(InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMM): 3942 var vd VmmDetails 3943 err := json.Unmarshal(body, &vd) 3944 return vd, err 3945 case string(InstanceTypeBasicFabricSpecificDetailsInstanceTypeHyperVSite): 3946 var hvsd HyperVSiteDetails 3947 err := json.Unmarshal(body, &hvsd) 3948 return hvsd, err 3949 case string(InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMware): 3950 var vmd VMwareDetails 3951 err := json.Unmarshal(body, &vmd) 3952 return vmd, err 3953 case string(InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMwareV2): 3954 var vmvfsd VMwareV2FabricSpecificDetails 3955 err := json.Unmarshal(body, &vmvfsd) 3956 return vmvfsd, err 3957 default: 3958 var fsd FabricSpecificDetails 3959 err := json.Unmarshal(body, &fsd) 3960 return fsd, err 3961 } 3962} 3963func unmarshalBasicFabricSpecificDetailsArray(body []byte) ([]BasicFabricSpecificDetails, error) { 3964 var rawMessages []*json.RawMessage 3965 err := json.Unmarshal(body, &rawMessages) 3966 if err != nil { 3967 return nil, err 3968 } 3969 3970 fsdArray := make([]BasicFabricSpecificDetails, len(rawMessages)) 3971 3972 for index, rawMessage := range rawMessages { 3973 fsd, err := unmarshalBasicFabricSpecificDetails(*rawMessage) 3974 if err != nil { 3975 return nil, err 3976 } 3977 fsdArray[index] = fsd 3978 } 3979 return fsdArray, nil 3980} 3981 3982// MarshalJSON is the custom marshaler for FabricSpecificDetails. 3983func (fsd FabricSpecificDetails) MarshalJSON() ([]byte, error) { 3984 fsd.InstanceType = InstanceTypeBasicFabricSpecificDetailsInstanceTypeFabricSpecificDetails 3985 objectMap := make(map[string]interface{}) 3986 if fsd.InstanceType != "" { 3987 objectMap["instanceType"] = fsd.InstanceType 3988 } 3989 return json.Marshal(objectMap) 3990} 3991 3992// AsAzureFabricSpecificDetails is the BasicFabricSpecificDetails implementation for FabricSpecificDetails. 3993func (fsd FabricSpecificDetails) AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool) { 3994 return nil, false 3995} 3996 3997// AsVmmDetails is the BasicFabricSpecificDetails implementation for FabricSpecificDetails. 3998func (fsd FabricSpecificDetails) AsVmmDetails() (*VmmDetails, bool) { 3999 return nil, false 4000} 4001 4002// AsHyperVSiteDetails is the BasicFabricSpecificDetails implementation for FabricSpecificDetails. 4003func (fsd FabricSpecificDetails) AsHyperVSiteDetails() (*HyperVSiteDetails, bool) { 4004 return nil, false 4005} 4006 4007// AsVMwareDetails is the BasicFabricSpecificDetails implementation for FabricSpecificDetails. 4008func (fsd FabricSpecificDetails) AsVMwareDetails() (*VMwareDetails, bool) { 4009 return nil, false 4010} 4011 4012// AsVMwareV2FabricSpecificDetails is the BasicFabricSpecificDetails implementation for FabricSpecificDetails. 4013func (fsd FabricSpecificDetails) AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool) { 4014 return nil, false 4015} 4016 4017// AsFabricSpecificDetails is the BasicFabricSpecificDetails implementation for FabricSpecificDetails. 4018func (fsd FabricSpecificDetails) AsFabricSpecificDetails() (*FabricSpecificDetails, bool) { 4019 return &fsd, true 4020} 4021 4022// AsBasicFabricSpecificDetails is the BasicFabricSpecificDetails implementation for FabricSpecificDetails. 4023func (fsd FabricSpecificDetails) AsBasicFabricSpecificDetails() (BasicFabricSpecificDetails, bool) { 4024 return &fsd, true 4025} 4026 4027// BasicFabricSpecificUpdateNetworkMappingInput input details specific to fabrics during Network Mapping. 4028type BasicFabricSpecificUpdateNetworkMappingInput interface { 4029 AsAzureToAzureUpdateNetworkMappingInput() (*AzureToAzureUpdateNetworkMappingInput, bool) 4030 AsVmmToAzureUpdateNetworkMappingInput() (*VmmToAzureUpdateNetworkMappingInput, bool) 4031 AsVmmToVmmUpdateNetworkMappingInput() (*VmmToVmmUpdateNetworkMappingInput, bool) 4032 AsFabricSpecificUpdateNetworkMappingInput() (*FabricSpecificUpdateNetworkMappingInput, bool) 4033} 4034 4035// FabricSpecificUpdateNetworkMappingInput input details specific to fabrics during Network Mapping. 4036type FabricSpecificUpdateNetworkMappingInput struct { 4037 // InstanceType - Possible values include: 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeFabricSpecificUpdateNetworkMappingInput', 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeAzureToAzure', 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToAzure', 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToVmm' 4038 InstanceType InstanceTypeBasicFabricSpecificUpdateNetworkMappingInput `json:"instanceType,omitempty"` 4039} 4040 4041func unmarshalBasicFabricSpecificUpdateNetworkMappingInput(body []byte) (BasicFabricSpecificUpdateNetworkMappingInput, error) { 4042 var m map[string]interface{} 4043 err := json.Unmarshal(body, &m) 4044 if err != nil { 4045 return nil, err 4046 } 4047 4048 switch m["instanceType"] { 4049 case string(InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeAzureToAzure): 4050 var ataunmi AzureToAzureUpdateNetworkMappingInput 4051 err := json.Unmarshal(body, &ataunmi) 4052 return ataunmi, err 4053 case string(InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToAzure): 4054 var vtaunmi VmmToAzureUpdateNetworkMappingInput 4055 err := json.Unmarshal(body, &vtaunmi) 4056 return vtaunmi, err 4057 case string(InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToVmm): 4058 var vtvunmi VmmToVmmUpdateNetworkMappingInput 4059 err := json.Unmarshal(body, &vtvunmi) 4060 return vtvunmi, err 4061 default: 4062 var fsunmi FabricSpecificUpdateNetworkMappingInput 4063 err := json.Unmarshal(body, &fsunmi) 4064 return fsunmi, err 4065 } 4066} 4067func unmarshalBasicFabricSpecificUpdateNetworkMappingInputArray(body []byte) ([]BasicFabricSpecificUpdateNetworkMappingInput, error) { 4068 var rawMessages []*json.RawMessage 4069 err := json.Unmarshal(body, &rawMessages) 4070 if err != nil { 4071 return nil, err 4072 } 4073 4074 fsunmiArray := make([]BasicFabricSpecificUpdateNetworkMappingInput, len(rawMessages)) 4075 4076 for index, rawMessage := range rawMessages { 4077 fsunmi, err := unmarshalBasicFabricSpecificUpdateNetworkMappingInput(*rawMessage) 4078 if err != nil { 4079 return nil, err 4080 } 4081 fsunmiArray[index] = fsunmi 4082 } 4083 return fsunmiArray, nil 4084} 4085 4086// MarshalJSON is the custom marshaler for FabricSpecificUpdateNetworkMappingInput. 4087func (fsunmi FabricSpecificUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { 4088 fsunmi.InstanceType = InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeFabricSpecificUpdateNetworkMappingInput 4089 objectMap := make(map[string]interface{}) 4090 if fsunmi.InstanceType != "" { 4091 objectMap["instanceType"] = fsunmi.InstanceType 4092 } 4093 return json.Marshal(objectMap) 4094} 4095 4096// AsAzureToAzureUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for FabricSpecificUpdateNetworkMappingInput. 4097func (fsunmi FabricSpecificUpdateNetworkMappingInput) AsAzureToAzureUpdateNetworkMappingInput() (*AzureToAzureUpdateNetworkMappingInput, bool) { 4098 return nil, false 4099} 4100 4101// AsVmmToAzureUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for FabricSpecificUpdateNetworkMappingInput. 4102func (fsunmi FabricSpecificUpdateNetworkMappingInput) AsVmmToAzureUpdateNetworkMappingInput() (*VmmToAzureUpdateNetworkMappingInput, bool) { 4103 return nil, false 4104} 4105 4106// AsVmmToVmmUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for FabricSpecificUpdateNetworkMappingInput. 4107func (fsunmi FabricSpecificUpdateNetworkMappingInput) AsVmmToVmmUpdateNetworkMappingInput() (*VmmToVmmUpdateNetworkMappingInput, bool) { 4108 return nil, false 4109} 4110 4111// AsFabricSpecificUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for FabricSpecificUpdateNetworkMappingInput. 4112func (fsunmi FabricSpecificUpdateNetworkMappingInput) AsFabricSpecificUpdateNetworkMappingInput() (*FabricSpecificUpdateNetworkMappingInput, bool) { 4113 return &fsunmi, true 4114} 4115 4116// AsBasicFabricSpecificUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for FabricSpecificUpdateNetworkMappingInput. 4117func (fsunmi FabricSpecificUpdateNetworkMappingInput) AsBasicFabricSpecificUpdateNetworkMappingInput() (BasicFabricSpecificUpdateNetworkMappingInput, bool) { 4118 return &fsunmi, true 4119} 4120 4121// FailoverJobDetails this class represents the details for a failover job. 4122type FailoverJobDetails struct { 4123 // ProtectedItemDetails - The test VM details. 4124 ProtectedItemDetails *[]FailoverReplicationProtectedItemDetails `json:"protectedItemDetails,omitempty"` 4125 // AffectedObjectDetails - The affected object properties like source server, source cloud, target server, target cloud etc. based on the workflow object details. 4126 AffectedObjectDetails map[string]*string `json:"affectedObjectDetails"` 4127 // InstanceType - Possible values include: 'InstanceTypeJobDetails', 'InstanceTypeAsrJobDetails', 'InstanceTypeTestFailoverJobDetails', 'InstanceTypeFailoverJobDetails', 'InstanceTypeExportJobDetails', 'InstanceTypeSwitchProtectionJobDetails' 4128 InstanceType InstanceTypeBasicJobDetails `json:"instanceType,omitempty"` 4129} 4130 4131// MarshalJSON is the custom marshaler for FailoverJobDetails. 4132func (fjd FailoverJobDetails) MarshalJSON() ([]byte, error) { 4133 fjd.InstanceType = InstanceTypeFailoverJobDetails 4134 objectMap := make(map[string]interface{}) 4135 if fjd.ProtectedItemDetails != nil { 4136 objectMap["protectedItemDetails"] = fjd.ProtectedItemDetails 4137 } 4138 if fjd.AffectedObjectDetails != nil { 4139 objectMap["affectedObjectDetails"] = fjd.AffectedObjectDetails 4140 } 4141 if fjd.InstanceType != "" { 4142 objectMap["instanceType"] = fjd.InstanceType 4143 } 4144 return json.Marshal(objectMap) 4145} 4146 4147// AsAsrJobDetails is the BasicJobDetails implementation for FailoverJobDetails. 4148func (fjd FailoverJobDetails) AsAsrJobDetails() (*AsrJobDetails, bool) { 4149 return nil, false 4150} 4151 4152// AsTestFailoverJobDetails is the BasicJobDetails implementation for FailoverJobDetails. 4153func (fjd FailoverJobDetails) AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool) { 4154 return nil, false 4155} 4156 4157// AsFailoverJobDetails is the BasicJobDetails implementation for FailoverJobDetails. 4158func (fjd FailoverJobDetails) AsFailoverJobDetails() (*FailoverJobDetails, bool) { 4159 return &fjd, true 4160} 4161 4162// AsExportJobDetails is the BasicJobDetails implementation for FailoverJobDetails. 4163func (fjd FailoverJobDetails) AsExportJobDetails() (*ExportJobDetails, bool) { 4164 return nil, false 4165} 4166 4167// AsSwitchProtectionJobDetails is the BasicJobDetails implementation for FailoverJobDetails. 4168func (fjd FailoverJobDetails) AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool) { 4169 return nil, false 4170} 4171 4172// AsJobDetails is the BasicJobDetails implementation for FailoverJobDetails. 4173func (fjd FailoverJobDetails) AsJobDetails() (*JobDetails, bool) { 4174 return nil, false 4175} 4176 4177// AsBasicJobDetails is the BasicJobDetails implementation for FailoverJobDetails. 4178func (fjd FailoverJobDetails) AsBasicJobDetails() (BasicJobDetails, bool) { 4179 return &fjd, true 4180} 4181 4182// FailoverProcessServerRequest request to failover a process server. 4183type FailoverProcessServerRequest struct { 4184 // Properties - The properties of the PS Failover request. 4185 Properties *FailoverProcessServerRequestProperties `json:"properties,omitempty"` 4186} 4187 4188// FailoverProcessServerRequestProperties the properties of the Failover Process Server request. 4189type FailoverProcessServerRequestProperties struct { 4190 // ContainerName - The container identifier. 4191 ContainerName *string `json:"containerName,omitempty"` 4192 // SourceProcessServerID - The source process server. 4193 SourceProcessServerID *string `json:"sourceProcessServerId,omitempty"` 4194 // TargetProcessServerID - The new process server. 4195 TargetProcessServerID *string `json:"targetProcessServerId,omitempty"` 4196 // VmsToMigrate - The VMS to migrate. 4197 VmsToMigrate *[]string `json:"vmsToMigrate,omitempty"` 4198 // UpdateType - A value for failover type. It can be systemlevel/serverlevel 4199 UpdateType *string `json:"updateType,omitempty"` 4200} 4201 4202// FailoverReplicationProtectedItemDetails failover details for a replication protected item. 4203type FailoverReplicationProtectedItemDetails struct { 4204 // Name - The name. 4205 Name *string `json:"name,omitempty"` 4206 // FriendlyName - The friendly name. 4207 FriendlyName *string `json:"friendlyName,omitempty"` 4208 // TestVMName - The test Vm name. 4209 TestVMName *string `json:"testVmName,omitempty"` 4210 // TestVMFriendlyName - The test Vm friendly name. 4211 TestVMFriendlyName *string `json:"testVmFriendlyName,omitempty"` 4212 // NetworkConnectionStatus - The network connection status. 4213 NetworkConnectionStatus *string `json:"networkConnectionStatus,omitempty"` 4214 // NetworkFriendlyName - The network friendly name. 4215 NetworkFriendlyName *string `json:"networkFriendlyName,omitempty"` 4216 // Subnet - The network subnet. 4217 Subnet *string `json:"subnet,omitempty"` 4218 // RecoveryPointID - The recovery point Id. 4219 RecoveryPointID *string `json:"recoveryPointId,omitempty"` 4220 // RecoveryPointTime - The recovery point time. 4221 RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"` 4222} 4223 4224// BasicGroupTaskDetails this class represents the group task details when parent child relationship exists in the 4225// drill down. 4226type BasicGroupTaskDetails interface { 4227 AsInlineWorkflowTaskDetails() (*InlineWorkflowTaskDetails, bool) 4228 AsRecoveryPlanGroupTaskDetails() (*RecoveryPlanGroupTaskDetails, bool) 4229 AsRecoveryPlanShutdownGroupTaskDetails() (*RecoveryPlanShutdownGroupTaskDetails, bool) 4230 AsGroupTaskDetails() (*GroupTaskDetails, bool) 4231} 4232 4233// GroupTaskDetails this class represents the group task details when parent child relationship exists in the 4234// drill down. 4235type GroupTaskDetails struct { 4236 // ChildTasks - The child tasks. 4237 ChildTasks *[]ASRTask `json:"childTasks,omitempty"` 4238 // InstanceType - Possible values include: 'InstanceTypeGroupTaskDetails', 'InstanceTypeInlineWorkflowTaskDetails', 'InstanceTypeRecoveryPlanGroupTaskDetails', 'InstanceTypeRecoveryPlanShutdownGroupTaskDetails' 4239 InstanceType InstanceTypeBasicGroupTaskDetails `json:"instanceType,omitempty"` 4240} 4241 4242func unmarshalBasicGroupTaskDetails(body []byte) (BasicGroupTaskDetails, error) { 4243 var m map[string]interface{} 4244 err := json.Unmarshal(body, &m) 4245 if err != nil { 4246 return nil, err 4247 } 4248 4249 switch m["instanceType"] { 4250 case string(InstanceTypeInlineWorkflowTaskDetails): 4251 var iwtd InlineWorkflowTaskDetails 4252 err := json.Unmarshal(body, &iwtd) 4253 return iwtd, err 4254 case string(InstanceTypeRecoveryPlanGroupTaskDetails): 4255 var rpgtd RecoveryPlanGroupTaskDetails 4256 err := json.Unmarshal(body, &rpgtd) 4257 return rpgtd, err 4258 case string(InstanceTypeRecoveryPlanShutdownGroupTaskDetails): 4259 var rpsgtd RecoveryPlanShutdownGroupTaskDetails 4260 err := json.Unmarshal(body, &rpsgtd) 4261 return rpsgtd, err 4262 default: 4263 var gtd GroupTaskDetails 4264 err := json.Unmarshal(body, >d) 4265 return gtd, err 4266 } 4267} 4268func unmarshalBasicGroupTaskDetailsArray(body []byte) ([]BasicGroupTaskDetails, error) { 4269 var rawMessages []*json.RawMessage 4270 err := json.Unmarshal(body, &rawMessages) 4271 if err != nil { 4272 return nil, err 4273 } 4274 4275 gtdArray := make([]BasicGroupTaskDetails, len(rawMessages)) 4276 4277 for index, rawMessage := range rawMessages { 4278 gtd, err := unmarshalBasicGroupTaskDetails(*rawMessage) 4279 if err != nil { 4280 return nil, err 4281 } 4282 gtdArray[index] = gtd 4283 } 4284 return gtdArray, nil 4285} 4286 4287// MarshalJSON is the custom marshaler for GroupTaskDetails. 4288func (gtd GroupTaskDetails) MarshalJSON() ([]byte, error) { 4289 gtd.InstanceType = InstanceTypeGroupTaskDetails 4290 objectMap := make(map[string]interface{}) 4291 if gtd.ChildTasks != nil { 4292 objectMap["childTasks"] = gtd.ChildTasks 4293 } 4294 if gtd.InstanceType != "" { 4295 objectMap["instanceType"] = gtd.InstanceType 4296 } 4297 return json.Marshal(objectMap) 4298} 4299 4300// AsInlineWorkflowTaskDetails is the BasicGroupTaskDetails implementation for GroupTaskDetails. 4301func (gtd GroupTaskDetails) AsInlineWorkflowTaskDetails() (*InlineWorkflowTaskDetails, bool) { 4302 return nil, false 4303} 4304 4305// AsRecoveryPlanGroupTaskDetails is the BasicGroupTaskDetails implementation for GroupTaskDetails. 4306func (gtd GroupTaskDetails) AsRecoveryPlanGroupTaskDetails() (*RecoveryPlanGroupTaskDetails, bool) { 4307 return nil, false 4308} 4309 4310// AsRecoveryPlanShutdownGroupTaskDetails is the BasicGroupTaskDetails implementation for GroupTaskDetails. 4311func (gtd GroupTaskDetails) AsRecoveryPlanShutdownGroupTaskDetails() (*RecoveryPlanShutdownGroupTaskDetails, bool) { 4312 return nil, false 4313} 4314 4315// AsGroupTaskDetails is the BasicGroupTaskDetails implementation for GroupTaskDetails. 4316func (gtd GroupTaskDetails) AsGroupTaskDetails() (*GroupTaskDetails, bool) { 4317 return >d, true 4318} 4319 4320// AsBasicGroupTaskDetails is the BasicGroupTaskDetails implementation for GroupTaskDetails. 4321func (gtd GroupTaskDetails) AsBasicGroupTaskDetails() (BasicGroupTaskDetails, bool) { 4322 return >d, true 4323} 4324 4325// HealthError health Error 4326type HealthError struct { 4327 // ErrorSource - Source of error. 4328 ErrorSource *string `json:"errorSource,omitempty"` 4329 // ErrorType - Type of error. 4330 ErrorType *string `json:"errorType,omitempty"` 4331 // ErrorLevel - Level of error. 4332 ErrorLevel *string `json:"errorLevel,omitempty"` 4333 // ErrorCode - Error code. 4334 ErrorCode *string `json:"errorCode,omitempty"` 4335 // ErrorMessage - Error message. 4336 ErrorMessage *string `json:"errorMessage,omitempty"` 4337 // PossibleCauses - Possible causes of error. 4338 PossibleCauses *string `json:"possibleCauses,omitempty"` 4339 // RecommendedAction - Recommended action to resolve error. 4340 RecommendedAction *string `json:"recommendedAction,omitempty"` 4341 // CreationTimeUtc - Error creation time (UTC) 4342 CreationTimeUtc *date.Time `json:"creationTimeUtc,omitempty"` 4343 // RecoveryProviderErrorMessage - DRA error message. 4344 RecoveryProviderErrorMessage *string `json:"recoveryProviderErrorMessage,omitempty"` 4345 // EntityID - ID of the entity. 4346 EntityID *string `json:"entityId,omitempty"` 4347 // ChildErrors - The child health errors. 4348 ChildErrors *[]HealthError `json:"childErrors,omitempty"` 4349} 4350 4351// HealthErrorSummary class to define the summary of the health error details. 4352type HealthErrorSummary struct { 4353 // SummaryCode - The code of the health error. 4354 SummaryCode *string `json:"summaryCode,omitempty"` 4355 // Category - The category of the health error. Possible values include: 'Replication', 'TestFailover', 'Configuration' 4356 Category HealthErrorCategory `json:"category,omitempty"` 4357 // Severity - Severity of error. Possible values include: 'NONE', 'Warning', 'Error', 'Info' 4358 Severity Severity `json:"severity,omitempty"` 4359 // SummaryMessage - The summary message of the health error. 4360 SummaryMessage *string `json:"summaryMessage,omitempty"` 4361 // AffectedResourceType - The type of affected ARM resource. 4362 AffectedResourceType *string `json:"affectedResourceType,omitempty"` 4363 // AffectedResourceSubtype - The sub type of any subcomponent within the ARM resource that this might be applicable. Value remains null if not applicable. 4364 AffectedResourceSubtype *string `json:"affectedResourceSubtype,omitempty"` 4365 // 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. 4366 AffectedResourceCorrelationIds *[]string `json:"affectedResourceCorrelationIds,omitempty"` 4367} 4368 4369// HyperVReplica2012EventDetails model class for event details of a HyperVReplica E2E event. 4370type HyperVReplica2012EventDetails struct { 4371 // ContainerName - The container friendly name. 4372 ContainerName *string `json:"containerName,omitempty"` 4373 // FabricName - The fabric friendly name. 4374 FabricName *string `json:"fabricName,omitempty"` 4375 // RemoteContainerName - The remote container name. 4376 RemoteContainerName *string `json:"remoteContainerName,omitempty"` 4377 // RemoteFabricName - The remote fabric name. 4378 RemoteFabricName *string `json:"remoteFabricName,omitempty"` 4379 // InstanceType - Possible values include: 'InstanceTypeEventProviderSpecificDetails', 'InstanceTypeHyperVReplicaBaseEventDetails', 'InstanceTypeHyperVReplica2012', 'InstanceTypeHyperVReplica2012R2', 'InstanceTypeHyperVReplicaAzure', 'InstanceTypeA2A', 'InstanceTypeInMageAzureV2' 4380 InstanceType InstanceType `json:"instanceType,omitempty"` 4381} 4382 4383// MarshalJSON is the custom marshaler for HyperVReplica2012EventDetails. 4384func (hvr2ed HyperVReplica2012EventDetails) MarshalJSON() ([]byte, error) { 4385 hvr2ed.InstanceType = InstanceTypeHyperVReplica2012 4386 objectMap := make(map[string]interface{}) 4387 if hvr2ed.ContainerName != nil { 4388 objectMap["containerName"] = hvr2ed.ContainerName 4389 } 4390 if hvr2ed.FabricName != nil { 4391 objectMap["fabricName"] = hvr2ed.FabricName 4392 } 4393 if hvr2ed.RemoteContainerName != nil { 4394 objectMap["remoteContainerName"] = hvr2ed.RemoteContainerName 4395 } 4396 if hvr2ed.RemoteFabricName != nil { 4397 objectMap["remoteFabricName"] = hvr2ed.RemoteFabricName 4398 } 4399 if hvr2ed.InstanceType != "" { 4400 objectMap["instanceType"] = hvr2ed.InstanceType 4401 } 4402 return json.Marshal(objectMap) 4403} 4404 4405// AsHyperVReplicaBaseEventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012EventDetails. 4406func (hvr2ed HyperVReplica2012EventDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) { 4407 return nil, false 4408} 4409 4410// AsHyperVReplica2012EventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012EventDetails. 4411func (hvr2ed HyperVReplica2012EventDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) { 4412 return &hvr2ed, true 4413} 4414 4415// AsHyperVReplica2012R2EventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012EventDetails. 4416func (hvr2ed HyperVReplica2012EventDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) { 4417 return nil, false 4418} 4419 4420// AsHyperVReplicaAzureEventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012EventDetails. 4421func (hvr2ed HyperVReplica2012EventDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) { 4422 return nil, false 4423} 4424 4425// AsA2AEventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012EventDetails. 4426func (hvr2ed HyperVReplica2012EventDetails) AsA2AEventDetails() (*A2AEventDetails, bool) { 4427 return nil, false 4428} 4429 4430// AsInMageAzureV2EventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012EventDetails. 4431func (hvr2ed HyperVReplica2012EventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) { 4432 return nil, false 4433} 4434 4435// AsEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012EventDetails. 4436func (hvr2ed HyperVReplica2012EventDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) { 4437 return nil, false 4438} 4439 4440// AsBasicEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012EventDetails. 4441func (hvr2ed HyperVReplica2012EventDetails) AsBasicEventProviderSpecificDetails() (BasicEventProviderSpecificDetails, bool) { 4442 return &hvr2ed, true 4443} 4444 4445// HyperVReplica2012R2EventDetails model class for event details of a HyperVReplica blue E2E event. 4446type HyperVReplica2012R2EventDetails struct { 4447 // ContainerName - The container friendly name. 4448 ContainerName *string `json:"containerName,omitempty"` 4449 // FabricName - The fabric friendly name. 4450 FabricName *string `json:"fabricName,omitempty"` 4451 // RemoteContainerName - The remote container name. 4452 RemoteContainerName *string `json:"remoteContainerName,omitempty"` 4453 // RemoteFabricName - The remote fabric name. 4454 RemoteFabricName *string `json:"remoteFabricName,omitempty"` 4455 // InstanceType - Possible values include: 'InstanceTypeEventProviderSpecificDetails', 'InstanceTypeHyperVReplicaBaseEventDetails', 'InstanceTypeHyperVReplica2012', 'InstanceTypeHyperVReplica2012R2', 'InstanceTypeHyperVReplicaAzure', 'InstanceTypeA2A', 'InstanceTypeInMageAzureV2' 4456 InstanceType InstanceType `json:"instanceType,omitempty"` 4457} 4458 4459// MarshalJSON is the custom marshaler for HyperVReplica2012R2EventDetails. 4460func (hvr2ed HyperVReplica2012R2EventDetails) MarshalJSON() ([]byte, error) { 4461 hvr2ed.InstanceType = InstanceTypeHyperVReplica2012R2 4462 objectMap := make(map[string]interface{}) 4463 if hvr2ed.ContainerName != nil { 4464 objectMap["containerName"] = hvr2ed.ContainerName 4465 } 4466 if hvr2ed.FabricName != nil { 4467 objectMap["fabricName"] = hvr2ed.FabricName 4468 } 4469 if hvr2ed.RemoteContainerName != nil { 4470 objectMap["remoteContainerName"] = hvr2ed.RemoteContainerName 4471 } 4472 if hvr2ed.RemoteFabricName != nil { 4473 objectMap["remoteFabricName"] = hvr2ed.RemoteFabricName 4474 } 4475 if hvr2ed.InstanceType != "" { 4476 objectMap["instanceType"] = hvr2ed.InstanceType 4477 } 4478 return json.Marshal(objectMap) 4479} 4480 4481// AsHyperVReplicaBaseEventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012R2EventDetails. 4482func (hvr2ed HyperVReplica2012R2EventDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) { 4483 return nil, false 4484} 4485 4486// AsHyperVReplica2012EventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012R2EventDetails. 4487func (hvr2ed HyperVReplica2012R2EventDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) { 4488 return nil, false 4489} 4490 4491// AsHyperVReplica2012R2EventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012R2EventDetails. 4492func (hvr2ed HyperVReplica2012R2EventDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) { 4493 return &hvr2ed, true 4494} 4495 4496// AsHyperVReplicaAzureEventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012R2EventDetails. 4497func (hvr2ed HyperVReplica2012R2EventDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) { 4498 return nil, false 4499} 4500 4501// AsA2AEventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012R2EventDetails. 4502func (hvr2ed HyperVReplica2012R2EventDetails) AsA2AEventDetails() (*A2AEventDetails, bool) { 4503 return nil, false 4504} 4505 4506// AsInMageAzureV2EventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012R2EventDetails. 4507func (hvr2ed HyperVReplica2012R2EventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) { 4508 return nil, false 4509} 4510 4511// AsEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012R2EventDetails. 4512func (hvr2ed HyperVReplica2012R2EventDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) { 4513 return nil, false 4514} 4515 4516// AsBasicEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012R2EventDetails. 4517func (hvr2ed HyperVReplica2012R2EventDetails) AsBasicEventProviderSpecificDetails() (BasicEventProviderSpecificDetails, bool) { 4518 return &hvr2ed, true 4519} 4520 4521// HyperVReplicaAzureApplyRecoveryPointInput applyRecoveryPoint input specific to HyperVReplicaAzure 4522// provider. 4523type HyperVReplicaAzureApplyRecoveryPointInput struct { 4524 // VaultLocation - The vault location where the recovery Vm resides. 4525 VaultLocation *string `json:"vaultLocation,omitempty"` 4526 // PrimaryKekCertificatePfx - The primary kek certificate pfx. 4527 PrimaryKekCertificatePfx *string `json:"primaryKekCertificatePfx,omitempty"` 4528 // SecondaryKekCertificatePfx - The secondary kek certificate pfx. 4529 SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` 4530 // InstanceType - Possible values include: 'InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeApplyRecoveryPointProviderSpecificInput', 'InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeA2A' 4531 InstanceType InstanceTypeBasicApplyRecoveryPointProviderSpecificInput `json:"instanceType,omitempty"` 4532} 4533 4534// MarshalJSON is the custom marshaler for HyperVReplicaAzureApplyRecoveryPointInput. 4535func (hvraarpi HyperVReplicaAzureApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { 4536 hvraarpi.InstanceType = InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeHyperVReplicaAzure 4537 objectMap := make(map[string]interface{}) 4538 if hvraarpi.VaultLocation != nil { 4539 objectMap["vaultLocation"] = hvraarpi.VaultLocation 4540 } 4541 if hvraarpi.PrimaryKekCertificatePfx != nil { 4542 objectMap["primaryKekCertificatePfx"] = hvraarpi.PrimaryKekCertificatePfx 4543 } 4544 if hvraarpi.SecondaryKekCertificatePfx != nil { 4545 objectMap["secondaryKekCertificatePfx"] = hvraarpi.SecondaryKekCertificatePfx 4546 } 4547 if hvraarpi.InstanceType != "" { 4548 objectMap["instanceType"] = hvraarpi.InstanceType 4549 } 4550 return json.Marshal(objectMap) 4551} 4552 4553// AsHyperVReplicaAzureApplyRecoveryPointInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for HyperVReplicaAzureApplyRecoveryPointInput. 4554func (hvraarpi HyperVReplicaAzureApplyRecoveryPointInput) AsHyperVReplicaAzureApplyRecoveryPointInput() (*HyperVReplicaAzureApplyRecoveryPointInput, bool) { 4555 return &hvraarpi, true 4556} 4557 4558// AsInMageAzureV2ApplyRecoveryPointInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for HyperVReplicaAzureApplyRecoveryPointInput. 4559func (hvraarpi HyperVReplicaAzureApplyRecoveryPointInput) AsInMageAzureV2ApplyRecoveryPointInput() (*InMageAzureV2ApplyRecoveryPointInput, bool) { 4560 return nil, false 4561} 4562 4563// AsA2AApplyRecoveryPointInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for HyperVReplicaAzureApplyRecoveryPointInput. 4564func (hvraarpi HyperVReplicaAzureApplyRecoveryPointInput) AsA2AApplyRecoveryPointInput() (*A2AApplyRecoveryPointInput, bool) { 4565 return nil, false 4566} 4567 4568// AsApplyRecoveryPointProviderSpecificInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for HyperVReplicaAzureApplyRecoveryPointInput. 4569func (hvraarpi HyperVReplicaAzureApplyRecoveryPointInput) AsApplyRecoveryPointProviderSpecificInput() (*ApplyRecoveryPointProviderSpecificInput, bool) { 4570 return nil, false 4571} 4572 4573// AsBasicApplyRecoveryPointProviderSpecificInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for HyperVReplicaAzureApplyRecoveryPointInput. 4574func (hvraarpi HyperVReplicaAzureApplyRecoveryPointInput) AsBasicApplyRecoveryPointProviderSpecificInput() (BasicApplyRecoveryPointProviderSpecificInput, bool) { 4575 return &hvraarpi, true 4576} 4577 4578// HyperVReplicaAzureEnableProtectionInput azure specific enable protection input. 4579type HyperVReplicaAzureEnableProtectionInput struct { 4580 // HvHostVMID - The Hyper-V host Vm Id. 4581 HvHostVMID *string `json:"hvHostVmId,omitempty"` 4582 // VMName - The Vm Name. 4583 VMName *string `json:"vmName,omitempty"` 4584 // OsType - The OS type associated with vm. 4585 OsType *string `json:"osType,omitempty"` 4586 // VhdID - The OS disk VHD id associated with vm. 4587 VhdID *string `json:"vhdId,omitempty"` 4588 // TargetStorageAccountID - The storage account name. 4589 TargetStorageAccountID *string `json:"targetStorageAccountId,omitempty"` 4590 // TargetAzureNetworkID - The selected target Azure network Id. 4591 TargetAzureNetworkID *string `json:"targetAzureNetworkId,omitempty"` 4592 // TargetAzureSubnetID - The selected target Azure subnet Id. 4593 TargetAzureSubnetID *string `json:"targetAzureSubnetId,omitempty"` 4594 // EnableRDPOnTargetOption - The selected option to enable RDP\SSH on target vm after failover. String value of {SrsDataContract.EnableRDPOnTargetOption} enum. 4595 EnableRDPOnTargetOption *string `json:"enableRDPOnTargetOption,omitempty"` 4596 // TargetAzureVMName - The target azure Vm Name. 4597 TargetAzureVMName *string `json:"targetAzureVmName,omitempty"` 4598 // LogStorageAccountID - The storage account to be used for logging during replication. 4599 LogStorageAccountID *string `json:"logStorageAccountId,omitempty"` 4600 // DisksToInclude - The list of VHD IDs of disks to be protected. 4601 DisksToInclude *[]string `json:"disksToInclude,omitempty"` 4602 // TargetAzureV1ResourceGroupID - The Id of the target resource group (for classic deployment) in which the failover VM is to be created. 4603 TargetAzureV1ResourceGroupID *string `json:"targetAzureV1ResourceGroupId,omitempty"` 4604 // TargetAzureV2ResourceGroupID - The Id of the target resource group (for resource manager deployment) in which the failover VM is to be created. 4605 TargetAzureV2ResourceGroupID *string `json:"targetAzureV2ResourceGroupId,omitempty"` 4606 // UseManagedDisks - A value indicating whether managed disks should be used during failover. 4607 UseManagedDisks *string `json:"useManagedDisks,omitempty"` 4608 // InstanceType - Possible values include: 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeEnableProtectionProviderSpecificInput', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeSan', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeA2A' 4609 InstanceType InstanceTypeBasicEnableProtectionProviderSpecificInput `json:"instanceType,omitempty"` 4610} 4611 4612// MarshalJSON is the custom marshaler for HyperVReplicaAzureEnableProtectionInput. 4613func (hvraepi HyperVReplicaAzureEnableProtectionInput) MarshalJSON() ([]byte, error) { 4614 hvraepi.InstanceType = InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeHyperVReplicaAzure 4615 objectMap := make(map[string]interface{}) 4616 if hvraepi.HvHostVMID != nil { 4617 objectMap["hvHostVmId"] = hvraepi.HvHostVMID 4618 } 4619 if hvraepi.VMName != nil { 4620 objectMap["vmName"] = hvraepi.VMName 4621 } 4622 if hvraepi.OsType != nil { 4623 objectMap["osType"] = hvraepi.OsType 4624 } 4625 if hvraepi.VhdID != nil { 4626 objectMap["vhdId"] = hvraepi.VhdID 4627 } 4628 if hvraepi.TargetStorageAccountID != nil { 4629 objectMap["targetStorageAccountId"] = hvraepi.TargetStorageAccountID 4630 } 4631 if hvraepi.TargetAzureNetworkID != nil { 4632 objectMap["targetAzureNetworkId"] = hvraepi.TargetAzureNetworkID 4633 } 4634 if hvraepi.TargetAzureSubnetID != nil { 4635 objectMap["targetAzureSubnetId"] = hvraepi.TargetAzureSubnetID 4636 } 4637 if hvraepi.EnableRDPOnTargetOption != nil { 4638 objectMap["enableRDPOnTargetOption"] = hvraepi.EnableRDPOnTargetOption 4639 } 4640 if hvraepi.TargetAzureVMName != nil { 4641 objectMap["targetAzureVmName"] = hvraepi.TargetAzureVMName 4642 } 4643 if hvraepi.LogStorageAccountID != nil { 4644 objectMap["logStorageAccountId"] = hvraepi.LogStorageAccountID 4645 } 4646 if hvraepi.DisksToInclude != nil { 4647 objectMap["disksToInclude"] = hvraepi.DisksToInclude 4648 } 4649 if hvraepi.TargetAzureV1ResourceGroupID != nil { 4650 objectMap["targetAzureV1ResourceGroupId"] = hvraepi.TargetAzureV1ResourceGroupID 4651 } 4652 if hvraepi.TargetAzureV2ResourceGroupID != nil { 4653 objectMap["targetAzureV2ResourceGroupId"] = hvraepi.TargetAzureV2ResourceGroupID 4654 } 4655 if hvraepi.UseManagedDisks != nil { 4656 objectMap["useManagedDisks"] = hvraepi.UseManagedDisks 4657 } 4658 if hvraepi.InstanceType != "" { 4659 objectMap["instanceType"] = hvraepi.InstanceType 4660 } 4661 return json.Marshal(objectMap) 4662} 4663 4664// AsHyperVReplicaAzureEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for HyperVReplicaAzureEnableProtectionInput. 4665func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool) { 4666 return &hvraepi, true 4667} 4668 4669// AsSanEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for HyperVReplicaAzureEnableProtectionInput. 4670func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool) { 4671 return nil, false 4672} 4673 4674// AsInMageAzureV2EnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for HyperVReplicaAzureEnableProtectionInput. 4675func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool) { 4676 return nil, false 4677} 4678 4679// AsInMageEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for HyperVReplicaAzureEnableProtectionInput. 4680func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool) { 4681 return nil, false 4682} 4683 4684// AsA2AEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for HyperVReplicaAzureEnableProtectionInput. 4685func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool) { 4686 return nil, false 4687} 4688 4689// AsEnableProtectionProviderSpecificInput is the BasicEnableProtectionProviderSpecificInput implementation for HyperVReplicaAzureEnableProtectionInput. 4690func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsEnableProtectionProviderSpecificInput() (*EnableProtectionProviderSpecificInput, bool) { 4691 return nil, false 4692} 4693 4694// AsBasicEnableProtectionProviderSpecificInput is the BasicEnableProtectionProviderSpecificInput implementation for HyperVReplicaAzureEnableProtectionInput. 4695func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsBasicEnableProtectionProviderSpecificInput() (BasicEnableProtectionProviderSpecificInput, bool) { 4696 return &hvraepi, true 4697} 4698 4699// HyperVReplicaAzureEventDetails model class for event details of a HyperVReplica E2A event. 4700type HyperVReplicaAzureEventDetails struct { 4701 // ContainerName - The container friendly name. 4702 ContainerName *string `json:"containerName,omitempty"` 4703 // FabricName - The fabric friendly name. 4704 FabricName *string `json:"fabricName,omitempty"` 4705 // RemoteContainerName - The remote container name. 4706 RemoteContainerName *string `json:"remoteContainerName,omitempty"` 4707 // InstanceType - Possible values include: 'InstanceTypeEventProviderSpecificDetails', 'InstanceTypeHyperVReplicaBaseEventDetails', 'InstanceTypeHyperVReplica2012', 'InstanceTypeHyperVReplica2012R2', 'InstanceTypeHyperVReplicaAzure', 'InstanceTypeA2A', 'InstanceTypeInMageAzureV2' 4708 InstanceType InstanceType `json:"instanceType,omitempty"` 4709} 4710 4711// MarshalJSON is the custom marshaler for HyperVReplicaAzureEventDetails. 4712func (hvraed HyperVReplicaAzureEventDetails) MarshalJSON() ([]byte, error) { 4713 hvraed.InstanceType = InstanceTypeHyperVReplicaAzure 4714 objectMap := make(map[string]interface{}) 4715 if hvraed.ContainerName != nil { 4716 objectMap["containerName"] = hvraed.ContainerName 4717 } 4718 if hvraed.FabricName != nil { 4719 objectMap["fabricName"] = hvraed.FabricName 4720 } 4721 if hvraed.RemoteContainerName != nil { 4722 objectMap["remoteContainerName"] = hvraed.RemoteContainerName 4723 } 4724 if hvraed.InstanceType != "" { 4725 objectMap["instanceType"] = hvraed.InstanceType 4726 } 4727 return json.Marshal(objectMap) 4728} 4729 4730// AsHyperVReplicaBaseEventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaAzureEventDetails. 4731func (hvraed HyperVReplicaAzureEventDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) { 4732 return nil, false 4733} 4734 4735// AsHyperVReplica2012EventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaAzureEventDetails. 4736func (hvraed HyperVReplicaAzureEventDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) { 4737 return nil, false 4738} 4739 4740// AsHyperVReplica2012R2EventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaAzureEventDetails. 4741func (hvraed HyperVReplicaAzureEventDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) { 4742 return nil, false 4743} 4744 4745// AsHyperVReplicaAzureEventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaAzureEventDetails. 4746func (hvraed HyperVReplicaAzureEventDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) { 4747 return &hvraed, true 4748} 4749 4750// AsA2AEventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaAzureEventDetails. 4751func (hvraed HyperVReplicaAzureEventDetails) AsA2AEventDetails() (*A2AEventDetails, bool) { 4752 return nil, false 4753} 4754 4755// AsInMageAzureV2EventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaAzureEventDetails. 4756func (hvraed HyperVReplicaAzureEventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) { 4757 return nil, false 4758} 4759 4760// AsEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaAzureEventDetails. 4761func (hvraed HyperVReplicaAzureEventDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) { 4762 return nil, false 4763} 4764 4765// AsBasicEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaAzureEventDetails. 4766func (hvraed HyperVReplicaAzureEventDetails) AsBasicEventProviderSpecificDetails() (BasicEventProviderSpecificDetails, bool) { 4767 return &hvraed, true 4768} 4769 4770// HyperVReplicaAzureFailbackProviderInput hvrA provider specific input for failback. 4771type HyperVReplicaAzureFailbackProviderInput struct { 4772 // DataSyncOption - Data sync option. 4773 DataSyncOption *string `json:"dataSyncOption,omitempty"` 4774 // RecoveryVMCreationOption - ALR options to create alternate recovery. 4775 RecoveryVMCreationOption *string `json:"recoveryVmCreationOption,omitempty"` 4776 // ProviderIDForAlternateRecovery - Provider ID for alternate location 4777 ProviderIDForAlternateRecovery *string `json:"providerIdForAlternateRecovery,omitempty"` 4778 // InstanceType - Possible values include: 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeProviderSpecificFailoverInput', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMage', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeA2A' 4779 InstanceType InstanceTypeBasicProviderSpecificFailoverInput `json:"instanceType,omitempty"` 4780} 4781 4782// MarshalJSON is the custom marshaler for HyperVReplicaAzureFailbackProviderInput. 4783func (hvrafpi HyperVReplicaAzureFailbackProviderInput) MarshalJSON() ([]byte, error) { 4784 hvrafpi.InstanceType = InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback 4785 objectMap := make(map[string]interface{}) 4786 if hvrafpi.DataSyncOption != nil { 4787 objectMap["dataSyncOption"] = hvrafpi.DataSyncOption 4788 } 4789 if hvrafpi.RecoveryVMCreationOption != nil { 4790 objectMap["recoveryVmCreationOption"] = hvrafpi.RecoveryVMCreationOption 4791 } 4792 if hvrafpi.ProviderIDForAlternateRecovery != nil { 4793 objectMap["providerIdForAlternateRecovery"] = hvrafpi.ProviderIDForAlternateRecovery 4794 } 4795 if hvrafpi.InstanceType != "" { 4796 objectMap["instanceType"] = hvrafpi.InstanceType 4797 } 4798 return json.Marshal(objectMap) 4799} 4800 4801// AsHyperVReplicaAzureFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailbackProviderInput. 4802func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool) { 4803 return nil, false 4804} 4805 4806// AsHyperVReplicaAzureFailbackProviderInput is the BasicProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailbackProviderInput. 4807func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool) { 4808 return &hvrafpi, true 4809} 4810 4811// AsInMageAzureV2FailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailbackProviderInput. 4812func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool) { 4813 return nil, false 4814} 4815 4816// AsInMageFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailbackProviderInput. 4817func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool) { 4818 return nil, false 4819} 4820 4821// AsA2AFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailbackProviderInput. 4822func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool) { 4823 return nil, false 4824} 4825 4826// AsProviderSpecificFailoverInput is the BasicProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailbackProviderInput. 4827func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsProviderSpecificFailoverInput() (*ProviderSpecificFailoverInput, bool) { 4828 return nil, false 4829} 4830 4831// AsBasicProviderSpecificFailoverInput is the BasicProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailbackProviderInput. 4832func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsBasicProviderSpecificFailoverInput() (BasicProviderSpecificFailoverInput, bool) { 4833 return &hvrafpi, true 4834} 4835 4836// HyperVReplicaAzureFailoverProviderInput hvrA provider specific input for failover. 4837type HyperVReplicaAzureFailoverProviderInput struct { 4838 // VaultLocation - Location of the vault. 4839 VaultLocation *string `json:"vaultLocation,omitempty"` 4840 // PrimaryKekCertificatePfx - Primary kek certificate pfx. 4841 PrimaryKekCertificatePfx *string `json:"primaryKekCertificatePfx,omitempty"` 4842 // SecondaryKekCertificatePfx - Secondary kek certificate pfx. 4843 SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` 4844 // 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. 4845 RecoveryPointID *string `json:"recoveryPointId,omitempty"` 4846 // InstanceType - Possible values include: 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeProviderSpecificFailoverInput', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMage', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeA2A' 4847 InstanceType InstanceTypeBasicProviderSpecificFailoverInput `json:"instanceType,omitempty"` 4848} 4849 4850// MarshalJSON is the custom marshaler for HyperVReplicaAzureFailoverProviderInput. 4851func (hvrafpi HyperVReplicaAzureFailoverProviderInput) MarshalJSON() ([]byte, error) { 4852 hvrafpi.InstanceType = InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure 4853 objectMap := make(map[string]interface{}) 4854 if hvrafpi.VaultLocation != nil { 4855 objectMap["vaultLocation"] = hvrafpi.VaultLocation 4856 } 4857 if hvrafpi.PrimaryKekCertificatePfx != nil { 4858 objectMap["primaryKekCertificatePfx"] = hvrafpi.PrimaryKekCertificatePfx 4859 } 4860 if hvrafpi.SecondaryKekCertificatePfx != nil { 4861 objectMap["secondaryKekCertificatePfx"] = hvrafpi.SecondaryKekCertificatePfx 4862 } 4863 if hvrafpi.RecoveryPointID != nil { 4864 objectMap["recoveryPointId"] = hvrafpi.RecoveryPointID 4865 } 4866 if hvrafpi.InstanceType != "" { 4867 objectMap["instanceType"] = hvrafpi.InstanceType 4868 } 4869 return json.Marshal(objectMap) 4870} 4871 4872// AsHyperVReplicaAzureFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailoverProviderInput. 4873func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool) { 4874 return &hvrafpi, true 4875} 4876 4877// AsHyperVReplicaAzureFailbackProviderInput is the BasicProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailoverProviderInput. 4878func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool) { 4879 return nil, false 4880} 4881 4882// AsInMageAzureV2FailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailoverProviderInput. 4883func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool) { 4884 return nil, false 4885} 4886 4887// AsInMageFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailoverProviderInput. 4888func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool) { 4889 return nil, false 4890} 4891 4892// AsA2AFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailoverProviderInput. 4893func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool) { 4894 return nil, false 4895} 4896 4897// AsProviderSpecificFailoverInput is the BasicProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailoverProviderInput. 4898func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsProviderSpecificFailoverInput() (*ProviderSpecificFailoverInput, bool) { 4899 return nil, false 4900} 4901 4902// AsBasicProviderSpecificFailoverInput is the BasicProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailoverProviderInput. 4903func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsBasicProviderSpecificFailoverInput() (BasicProviderSpecificFailoverInput, bool) { 4904 return &hvrafpi, true 4905} 4906 4907// HyperVReplicaAzurePolicyDetails hyper-V Replica Azure specific protection profile details. 4908type HyperVReplicaAzurePolicyDetails struct { 4909 // RecoveryPointHistoryDurationInHours - The duration (in hours) to which point the recovery history needs to be maintained. 4910 RecoveryPointHistoryDurationInHours *int32 `json:"recoveryPointHistoryDurationInHours,omitempty"` 4911 // ApplicationConsistentSnapshotFrequencyInHours - The interval (in hours) at which Hyper-V Replica should create an application consistent snapshot within the VM. 4912 ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` 4913 // ReplicationInterval - The replication interval. 4914 ReplicationInterval *int32 `json:"replicationInterval,omitempty"` 4915 // OnlineReplicationStartTime - The scheduled start time for the initial replication. If this parameter is Null, the initial replication starts immediately. 4916 OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` 4917 // Encryption - A value indicating whether encryption is enabled for virtual machines in this cloud. 4918 Encryption *string `json:"encryption,omitempty"` 4919 // ActiveStorageAccountID - The active storage account Id. 4920 ActiveStorageAccountID *string `json:"activeStorageAccountId,omitempty"` 4921 // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypePolicyProviderSpecificDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt' 4922 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"` 4923} 4924 4925// MarshalJSON is the custom marshaler for HyperVReplicaAzurePolicyDetails. 4926func (hvrapd HyperVReplicaAzurePolicyDetails) MarshalJSON() ([]byte, error) { 4927 hvrapd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure 4928 objectMap := make(map[string]interface{}) 4929 if hvrapd.RecoveryPointHistoryDurationInHours != nil { 4930 objectMap["recoveryPointHistoryDurationInHours"] = hvrapd.RecoveryPointHistoryDurationInHours 4931 } 4932 if hvrapd.ApplicationConsistentSnapshotFrequencyInHours != nil { 4933 objectMap["applicationConsistentSnapshotFrequencyInHours"] = hvrapd.ApplicationConsistentSnapshotFrequencyInHours 4934 } 4935 if hvrapd.ReplicationInterval != nil { 4936 objectMap["replicationInterval"] = hvrapd.ReplicationInterval 4937 } 4938 if hvrapd.OnlineReplicationStartTime != nil { 4939 objectMap["onlineReplicationStartTime"] = hvrapd.OnlineReplicationStartTime 4940 } 4941 if hvrapd.Encryption != nil { 4942 objectMap["encryption"] = hvrapd.Encryption 4943 } 4944 if hvrapd.ActiveStorageAccountID != nil { 4945 objectMap["activeStorageAccountId"] = hvrapd.ActiveStorageAccountID 4946 } 4947 if hvrapd.InstanceType != "" { 4948 objectMap["instanceType"] = hvrapd.InstanceType 4949 } 4950 return json.Marshal(objectMap) 4951} 4952 4953// AsHyperVReplicaAzurePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaAzurePolicyDetails. 4954func (hvrapd HyperVReplicaAzurePolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) { 4955 return &hvrapd, true 4956} 4957 4958// AsHyperVReplicaBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaAzurePolicyDetails. 4959func (hvrapd HyperVReplicaAzurePolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) { 4960 return nil, false 4961} 4962 4963// AsHyperVReplicaPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaAzurePolicyDetails. 4964func (hvrapd HyperVReplicaAzurePolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) { 4965 return nil, false 4966} 4967 4968// AsHyperVReplicaBluePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaAzurePolicyDetails. 4969func (hvrapd HyperVReplicaAzurePolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) { 4970 return nil, false 4971} 4972 4973// AsInMageBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaAzurePolicyDetails. 4974func (hvrapd HyperVReplicaAzurePolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) { 4975 return nil, false 4976} 4977 4978// AsInMageAzureV2PolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaAzurePolicyDetails. 4979func (hvrapd HyperVReplicaAzurePolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) { 4980 return nil, false 4981} 4982 4983// AsInMagePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaAzurePolicyDetails. 4984func (hvrapd HyperVReplicaAzurePolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) { 4985 return nil, false 4986} 4987 4988// AsA2APolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaAzurePolicyDetails. 4989func (hvrapd HyperVReplicaAzurePolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) { 4990 return nil, false 4991} 4992 4993// AsRcmAzureMigrationPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaAzurePolicyDetails. 4994func (hvrapd HyperVReplicaAzurePolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) { 4995 return nil, false 4996} 4997 4998// AsVmwareCbtPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaAzurePolicyDetails. 4999func (hvrapd HyperVReplicaAzurePolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) { 5000 return nil, false 5001} 5002 5003// AsPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaAzurePolicyDetails. 5004func (hvrapd HyperVReplicaAzurePolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) { 5005 return nil, false 5006} 5007 5008// AsBasicPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaAzurePolicyDetails. 5009func (hvrapd HyperVReplicaAzurePolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) { 5010 return &hvrapd, true 5011} 5012 5013// HyperVReplicaAzurePolicyInput hyper-V Replica Azure specific input for creating a protection profile. 5014type HyperVReplicaAzurePolicyInput struct { 5015 // RecoveryPointHistoryDuration - The duration (in hours) to which point the recovery history needs to be maintained. 5016 RecoveryPointHistoryDuration *int32 `json:"recoveryPointHistoryDuration,omitempty"` 5017 // ApplicationConsistentSnapshotFrequencyInHours - The interval (in hours) at which Hyper-V Replica should create an application consistent snapshot within the VM. 5018 ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` 5019 // ReplicationInterval - The replication interval. 5020 ReplicationInterval *int32 `json:"replicationInterval,omitempty"` 5021 // OnlineReplicationStartTime - The scheduled start time for the initial replication. If this parameter is Null, the initial replication starts immediately. 5022 OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` 5023 // Encryption - A value indicating whether encryption needs to be enabled for Vms in this cloud. 5024 Encryption *string `json:"encryption,omitempty"` 5025 // StorageAccounts - The list of storage accounts to which the VMs in the primary cloud can replicate to. 5026 StorageAccounts *[]string `json:"storageAccounts,omitempty"` 5027 // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypePolicyProviderSpecificInput', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeVMwareCbt' 5028 InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"` 5029} 5030 5031// MarshalJSON is the custom marshaler for HyperVReplicaAzurePolicyInput. 5032func (hvrapi HyperVReplicaAzurePolicyInput) MarshalJSON() ([]byte, error) { 5033 hvrapi.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplicaAzure 5034 objectMap := make(map[string]interface{}) 5035 if hvrapi.RecoveryPointHistoryDuration != nil { 5036 objectMap["recoveryPointHistoryDuration"] = hvrapi.RecoveryPointHistoryDuration 5037 } 5038 if hvrapi.ApplicationConsistentSnapshotFrequencyInHours != nil { 5039 objectMap["applicationConsistentSnapshotFrequencyInHours"] = hvrapi.ApplicationConsistentSnapshotFrequencyInHours 5040 } 5041 if hvrapi.ReplicationInterval != nil { 5042 objectMap["replicationInterval"] = hvrapi.ReplicationInterval 5043 } 5044 if hvrapi.OnlineReplicationStartTime != nil { 5045 objectMap["onlineReplicationStartTime"] = hvrapi.OnlineReplicationStartTime 5046 } 5047 if hvrapi.Encryption != nil { 5048 objectMap["encryption"] = hvrapi.Encryption 5049 } 5050 if hvrapi.StorageAccounts != nil { 5051 objectMap["storageAccounts"] = hvrapi.StorageAccounts 5052 } 5053 if hvrapi.InstanceType != "" { 5054 objectMap["instanceType"] = hvrapi.InstanceType 5055 } 5056 return json.Marshal(objectMap) 5057} 5058 5059// AsHyperVReplicaAzurePolicyInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaAzurePolicyInput. 5060func (hvrapi HyperVReplicaAzurePolicyInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) { 5061 return &hvrapi, true 5062} 5063 5064// AsHyperVReplicaPolicyInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaAzurePolicyInput. 5065func (hvrapi HyperVReplicaAzurePolicyInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) { 5066 return nil, false 5067} 5068 5069// AsHyperVReplicaBluePolicyInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaAzurePolicyInput. 5070func (hvrapi HyperVReplicaAzurePolicyInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) { 5071 return nil, false 5072} 5073 5074// AsInMageAzureV2PolicyInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaAzurePolicyInput. 5075func (hvrapi HyperVReplicaAzurePolicyInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) { 5076 return nil, false 5077} 5078 5079// AsInMagePolicyInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaAzurePolicyInput. 5080func (hvrapi HyperVReplicaAzurePolicyInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) { 5081 return nil, false 5082} 5083 5084// AsA2APolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaAzurePolicyInput. 5085func (hvrapi HyperVReplicaAzurePolicyInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) { 5086 return nil, false 5087} 5088 5089// AsVMwareCbtPolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaAzurePolicyInput. 5090func (hvrapi HyperVReplicaAzurePolicyInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) { 5091 return nil, false 5092} 5093 5094// AsPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaAzurePolicyInput. 5095func (hvrapi HyperVReplicaAzurePolicyInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) { 5096 return nil, false 5097} 5098 5099// AsBasicPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaAzurePolicyInput. 5100func (hvrapi HyperVReplicaAzurePolicyInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) { 5101 return &hvrapi, true 5102} 5103 5104// HyperVReplicaAzureReplicationDetails hyper V Replica Azure provider specific settings. 5105type HyperVReplicaAzureReplicationDetails struct { 5106 // AzureVMDiskDetails - Azure VM Disk details. 5107 AzureVMDiskDetails *[]AzureVMDiskDetails `json:"azureVMDiskDetails,omitempty"` 5108 // RecoveryAzureVMName - Recovery Azure given name. 5109 RecoveryAzureVMName *string `json:"recoveryAzureVMName,omitempty"` 5110 // RecoveryAzureVMSize - The Recovery Azure VM size. 5111 RecoveryAzureVMSize *string `json:"recoveryAzureVMSize,omitempty"` 5112 // RecoveryAzureStorageAccount - The recovery Azure storage account. 5113 RecoveryAzureStorageAccount *string `json:"recoveryAzureStorageAccount,omitempty"` 5114 // 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. 5115 RecoveryAzureLogStorageAccountID *string `json:"recoveryAzureLogStorageAccountId,omitempty"` 5116 // LastReplicatedTime - The Last replication time. 5117 LastReplicatedTime *date.Time `json:"lastReplicatedTime,omitempty"` 5118 // VMID - The virtual machine Id. 5119 VMID *string `json:"vmId,omitempty"` 5120 // VMProtectionState - The protection state for the vm. 5121 VMProtectionState *string `json:"vmProtectionState,omitempty"` 5122 // VMProtectionStateDescription - The protection state description for the vm. 5123 VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` 5124 // InitialReplicationDetails - Initial replication details. 5125 InitialReplicationDetails *InitialReplicationDetails `json:"initialReplicationDetails,omitempty"` 5126 // VMNics - The PE Network details. 5127 VMNics *[]VMNicDetails `json:"vmNics,omitempty"` 5128 // SelectedRecoveryAzureNetworkID - The selected recovery azure network Id. 5129 SelectedRecoveryAzureNetworkID *string `json:"selectedRecoveryAzureNetworkId,omitempty"` 5130 // Encryption - The encryption info. 5131 Encryption *string `json:"encryption,omitempty"` 5132 // OSDetails - The operating system info. 5133 OSDetails *OSDetails `json:"oSDetails,omitempty"` 5134 // SourceVMRAMSizeInMB - The RAM size of the VM on the primary side. 5135 SourceVMRAMSizeInMB *int32 `json:"sourceVmRAMSizeInMB,omitempty"` 5136 // SourceVMCPUCount - The CPU count of the VM on the primary side. 5137 SourceVMCPUCount *int32 `json:"sourceVmCPUCount,omitempty"` 5138 // EnableRDPOnTargetOption - The selected option to enable RDP\SSH on target vm after failover. String value of {SrsDataContract.EnableRDPOnTargetOption} enum. 5139 EnableRDPOnTargetOption *string `json:"enableRDPOnTargetOption,omitempty"` 5140 // RecoveryAzureResourceGroupID - The target resource group Id. 5141 RecoveryAzureResourceGroupID *string `json:"recoveryAzureResourceGroupId,omitempty"` 5142 // RecoveryAvailabilitySetID - The recovery availability set Id. 5143 RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"` 5144 // UseManagedDisks - A value indicating whether managed disks should be used during failover. 5145 UseManagedDisks *string `json:"useManagedDisks,omitempty"` 5146 // LicenseType - License Type of the VM to be used. 5147 LicenseType *string `json:"licenseType,omitempty"` 5148 // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeReplicationProviderSpecificSettings', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaBaseReplicationDetails', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMageAzureV2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMage', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeA2A' 5149 InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"` 5150} 5151 5152// MarshalJSON is the custom marshaler for HyperVReplicaAzureReplicationDetails. 5153func (hvrard HyperVReplicaAzureReplicationDetails) MarshalJSON() ([]byte, error) { 5154 hvrard.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaAzure 5155 objectMap := make(map[string]interface{}) 5156 if hvrard.AzureVMDiskDetails != nil { 5157 objectMap["azureVMDiskDetails"] = hvrard.AzureVMDiskDetails 5158 } 5159 if hvrard.RecoveryAzureVMName != nil { 5160 objectMap["recoveryAzureVMName"] = hvrard.RecoveryAzureVMName 5161 } 5162 if hvrard.RecoveryAzureVMSize != nil { 5163 objectMap["recoveryAzureVMSize"] = hvrard.RecoveryAzureVMSize 5164 } 5165 if hvrard.RecoveryAzureStorageAccount != nil { 5166 objectMap["recoveryAzureStorageAccount"] = hvrard.RecoveryAzureStorageAccount 5167 } 5168 if hvrard.RecoveryAzureLogStorageAccountID != nil { 5169 objectMap["recoveryAzureLogStorageAccountId"] = hvrard.RecoveryAzureLogStorageAccountID 5170 } 5171 if hvrard.LastReplicatedTime != nil { 5172 objectMap["lastReplicatedTime"] = hvrard.LastReplicatedTime 5173 } 5174 if hvrard.VMID != nil { 5175 objectMap["vmId"] = hvrard.VMID 5176 } 5177 if hvrard.VMProtectionState != nil { 5178 objectMap["vmProtectionState"] = hvrard.VMProtectionState 5179 } 5180 if hvrard.VMProtectionStateDescription != nil { 5181 objectMap["vmProtectionStateDescription"] = hvrard.VMProtectionStateDescription 5182 } 5183 if hvrard.InitialReplicationDetails != nil { 5184 objectMap["initialReplicationDetails"] = hvrard.InitialReplicationDetails 5185 } 5186 if hvrard.VMNics != nil { 5187 objectMap["vmNics"] = hvrard.VMNics 5188 } 5189 if hvrard.SelectedRecoveryAzureNetworkID != nil { 5190 objectMap["selectedRecoveryAzureNetworkId"] = hvrard.SelectedRecoveryAzureNetworkID 5191 } 5192 if hvrard.Encryption != nil { 5193 objectMap["encryption"] = hvrard.Encryption 5194 } 5195 if hvrard.OSDetails != nil { 5196 objectMap["oSDetails"] = hvrard.OSDetails 5197 } 5198 if hvrard.SourceVMRAMSizeInMB != nil { 5199 objectMap["sourceVmRAMSizeInMB"] = hvrard.SourceVMRAMSizeInMB 5200 } 5201 if hvrard.SourceVMCPUCount != nil { 5202 objectMap["sourceVmCPUCount"] = hvrard.SourceVMCPUCount 5203 } 5204 if hvrard.EnableRDPOnTargetOption != nil { 5205 objectMap["enableRDPOnTargetOption"] = hvrard.EnableRDPOnTargetOption 5206 } 5207 if hvrard.RecoveryAzureResourceGroupID != nil { 5208 objectMap["recoveryAzureResourceGroupId"] = hvrard.RecoveryAzureResourceGroupID 5209 } 5210 if hvrard.RecoveryAvailabilitySetID != nil { 5211 objectMap["recoveryAvailabilitySetId"] = hvrard.RecoveryAvailabilitySetID 5212 } 5213 if hvrard.UseManagedDisks != nil { 5214 objectMap["useManagedDisks"] = hvrard.UseManagedDisks 5215 } 5216 if hvrard.LicenseType != nil { 5217 objectMap["licenseType"] = hvrard.LicenseType 5218 } 5219 if hvrard.InstanceType != "" { 5220 objectMap["instanceType"] = hvrard.InstanceType 5221 } 5222 return json.Marshal(objectMap) 5223} 5224 5225// AsHyperVReplicaBaseReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaAzureReplicationDetails. 5226func (hvrard HyperVReplicaAzureReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) { 5227 return nil, false 5228} 5229 5230// AsHyperVReplicaReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaAzureReplicationDetails. 5231func (hvrard HyperVReplicaAzureReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) { 5232 return nil, false 5233} 5234 5235// AsHyperVReplicaBlueReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaAzureReplicationDetails. 5236func (hvrard HyperVReplicaAzureReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) { 5237 return nil, false 5238} 5239 5240// AsHyperVReplicaAzureReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaAzureReplicationDetails. 5241func (hvrard HyperVReplicaAzureReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) { 5242 return &hvrard, true 5243} 5244 5245// AsInMageAzureV2ReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaAzureReplicationDetails. 5246func (hvrard HyperVReplicaAzureReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) { 5247 return nil, false 5248} 5249 5250// AsInMageReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaAzureReplicationDetails. 5251func (hvrard HyperVReplicaAzureReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) { 5252 return nil, false 5253} 5254 5255// AsA2AReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaAzureReplicationDetails. 5256func (hvrard HyperVReplicaAzureReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) { 5257 return nil, false 5258} 5259 5260// AsReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaAzureReplicationDetails. 5261func (hvrard HyperVReplicaAzureReplicationDetails) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) { 5262 return nil, false 5263} 5264 5265// AsBasicReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaAzureReplicationDetails. 5266func (hvrard HyperVReplicaAzureReplicationDetails) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) { 5267 return &hvrard, true 5268} 5269 5270// HyperVReplicaAzureReprotectInput azure specific reprotect input. 5271type HyperVReplicaAzureReprotectInput struct { 5272 // HvHostVMID - The Hyper-V host Vm Id. 5273 HvHostVMID *string `json:"hvHostVmId,omitempty"` 5274 // VMName - The Vm Name. 5275 VMName *string `json:"vmName,omitempty"` 5276 // OsType - The OS type associated with vm. 5277 OsType *string `json:"osType,omitempty"` 5278 // VHDID - The OS disk VHD id associated with vm. 5279 VHDID *string `json:"vHDId,omitempty"` 5280 // StorageAccountID - The storage account name. 5281 StorageAccountID *string `json:"storageAccountId,omitempty"` 5282 // LogStorageAccountID - The storage account to be used for logging during replication. 5283 LogStorageAccountID *string `json:"logStorageAccountId,omitempty"` 5284 // InstanceType - Possible values include: 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeReverseReplicationProviderSpecificInput', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeA2A' 5285 InstanceType InstanceTypeBasicReverseReplicationProviderSpecificInput `json:"instanceType,omitempty"` 5286} 5287 5288// MarshalJSON is the custom marshaler for HyperVReplicaAzureReprotectInput. 5289func (hvrari HyperVReplicaAzureReprotectInput) MarshalJSON() ([]byte, error) { 5290 hvrari.InstanceType = InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeHyperVReplicaAzure 5291 objectMap := make(map[string]interface{}) 5292 if hvrari.HvHostVMID != nil { 5293 objectMap["hvHostVmId"] = hvrari.HvHostVMID 5294 } 5295 if hvrari.VMName != nil { 5296 objectMap["vmName"] = hvrari.VMName 5297 } 5298 if hvrari.OsType != nil { 5299 objectMap["osType"] = hvrari.OsType 5300 } 5301 if hvrari.VHDID != nil { 5302 objectMap["vHDId"] = hvrari.VHDID 5303 } 5304 if hvrari.StorageAccountID != nil { 5305 objectMap["storageAccountId"] = hvrari.StorageAccountID 5306 } 5307 if hvrari.LogStorageAccountID != nil { 5308 objectMap["logStorageAccountId"] = hvrari.LogStorageAccountID 5309 } 5310 if hvrari.InstanceType != "" { 5311 objectMap["instanceType"] = hvrari.InstanceType 5312 } 5313 return json.Marshal(objectMap) 5314} 5315 5316// AsHyperVReplicaAzureReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for HyperVReplicaAzureReprotectInput. 5317func (hvrari HyperVReplicaAzureReprotectInput) AsHyperVReplicaAzureReprotectInput() (*HyperVReplicaAzureReprotectInput, bool) { 5318 return &hvrari, true 5319} 5320 5321// AsInMageAzureV2ReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for HyperVReplicaAzureReprotectInput. 5322func (hvrari HyperVReplicaAzureReprotectInput) AsInMageAzureV2ReprotectInput() (*InMageAzureV2ReprotectInput, bool) { 5323 return nil, false 5324} 5325 5326// AsInMageReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for HyperVReplicaAzureReprotectInput. 5327func (hvrari HyperVReplicaAzureReprotectInput) AsInMageReprotectInput() (*InMageReprotectInput, bool) { 5328 return nil, false 5329} 5330 5331// AsA2AReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for HyperVReplicaAzureReprotectInput. 5332func (hvrari HyperVReplicaAzureReprotectInput) AsA2AReprotectInput() (*A2AReprotectInput, bool) { 5333 return nil, false 5334} 5335 5336// AsReverseReplicationProviderSpecificInput is the BasicReverseReplicationProviderSpecificInput implementation for HyperVReplicaAzureReprotectInput. 5337func (hvrari HyperVReplicaAzureReprotectInput) AsReverseReplicationProviderSpecificInput() (*ReverseReplicationProviderSpecificInput, bool) { 5338 return nil, false 5339} 5340 5341// AsBasicReverseReplicationProviderSpecificInput is the BasicReverseReplicationProviderSpecificInput implementation for HyperVReplicaAzureReprotectInput. 5342func (hvrari HyperVReplicaAzureReprotectInput) AsBasicReverseReplicationProviderSpecificInput() (BasicReverseReplicationProviderSpecificInput, bool) { 5343 return &hvrari, true 5344} 5345 5346// HyperVReplicaAzureUpdateReplicationProtectedItemInput hyperV replica Azure input to update replication 5347// protected item. 5348type HyperVReplicaAzureUpdateReplicationProtectedItemInput struct { 5349 // RecoveryAzureV1ResourceGroupID - The recovery Azure resource group Id for classic deployment. 5350 RecoveryAzureV1ResourceGroupID *string `json:"recoveryAzureV1ResourceGroupId,omitempty"` 5351 // RecoveryAzureV2ResourceGroupID - The recovery Azure resource group Id for resource manager deployment. 5352 RecoveryAzureV2ResourceGroupID *string `json:"recoveryAzureV2ResourceGroupId,omitempty"` 5353 // UseManagedDisks - A value indicating whether managed disks should be used during failover. 5354 UseManagedDisks *string `json:"useManagedDisks,omitempty"` 5355 // InstanceType - Possible values include: 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeUpdateReplicationProtectedItemProviderInput', 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeA2A' 5356 InstanceType InstanceTypeBasicUpdateReplicationProtectedItemProviderInput `json:"instanceType,omitempty"` 5357} 5358 5359// MarshalJSON is the custom marshaler for HyperVReplicaAzureUpdateReplicationProtectedItemInput. 5360func (hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, error) { 5361 hvraurpii.InstanceType = InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeHyperVReplicaAzure 5362 objectMap := make(map[string]interface{}) 5363 if hvraurpii.RecoveryAzureV1ResourceGroupID != nil { 5364 objectMap["recoveryAzureV1ResourceGroupId"] = hvraurpii.RecoveryAzureV1ResourceGroupID 5365 } 5366 if hvraurpii.RecoveryAzureV2ResourceGroupID != nil { 5367 objectMap["recoveryAzureV2ResourceGroupId"] = hvraurpii.RecoveryAzureV2ResourceGroupID 5368 } 5369 if hvraurpii.UseManagedDisks != nil { 5370 objectMap["useManagedDisks"] = hvraurpii.UseManagedDisks 5371 } 5372 if hvraurpii.InstanceType != "" { 5373 objectMap["instanceType"] = hvraurpii.InstanceType 5374 } 5375 return json.Marshal(objectMap) 5376} 5377 5378// AsHyperVReplicaAzureUpdateReplicationProtectedItemInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for HyperVReplicaAzureUpdateReplicationProtectedItemInput. 5379func (hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput) AsHyperVReplicaAzureUpdateReplicationProtectedItemInput() (*HyperVReplicaAzureUpdateReplicationProtectedItemInput, bool) { 5380 return &hvraurpii, true 5381} 5382 5383// AsInMageAzureV2UpdateReplicationProtectedItemInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for HyperVReplicaAzureUpdateReplicationProtectedItemInput. 5384func (hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput) AsInMageAzureV2UpdateReplicationProtectedItemInput() (*InMageAzureV2UpdateReplicationProtectedItemInput, bool) { 5385 return nil, false 5386} 5387 5388// AsA2AUpdateReplicationProtectedItemInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for HyperVReplicaAzureUpdateReplicationProtectedItemInput. 5389func (hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput) AsA2AUpdateReplicationProtectedItemInput() (*A2AUpdateReplicationProtectedItemInput, bool) { 5390 return nil, false 5391} 5392 5393// AsUpdateReplicationProtectedItemProviderInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for HyperVReplicaAzureUpdateReplicationProtectedItemInput. 5394func (hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput) AsUpdateReplicationProtectedItemProviderInput() (*UpdateReplicationProtectedItemProviderInput, bool) { 5395 return nil, false 5396} 5397 5398// AsBasicUpdateReplicationProtectedItemProviderInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for HyperVReplicaAzureUpdateReplicationProtectedItemInput. 5399func (hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput) AsBasicUpdateReplicationProtectedItemProviderInput() (BasicUpdateReplicationProtectedItemProviderInput, bool) { 5400 return &hvraurpii, true 5401} 5402 5403// HyperVReplicaBaseEventDetails abstract model class for event details of a HyperVReplica E2E event. 5404type HyperVReplicaBaseEventDetails struct { 5405 // ContainerName - The container friendly name. 5406 ContainerName *string `json:"containerName,omitempty"` 5407 // FabricName - The fabric friendly name. 5408 FabricName *string `json:"fabricName,omitempty"` 5409 // RemoteContainerName - The remote container name. 5410 RemoteContainerName *string `json:"remoteContainerName,omitempty"` 5411 // RemoteFabricName - The remote fabric name. 5412 RemoteFabricName *string `json:"remoteFabricName,omitempty"` 5413 // InstanceType - Possible values include: 'InstanceTypeEventProviderSpecificDetails', 'InstanceTypeHyperVReplicaBaseEventDetails', 'InstanceTypeHyperVReplica2012', 'InstanceTypeHyperVReplica2012R2', 'InstanceTypeHyperVReplicaAzure', 'InstanceTypeA2A', 'InstanceTypeInMageAzureV2' 5414 InstanceType InstanceType `json:"instanceType,omitempty"` 5415} 5416 5417// MarshalJSON is the custom marshaler for HyperVReplicaBaseEventDetails. 5418func (hvrbed HyperVReplicaBaseEventDetails) MarshalJSON() ([]byte, error) { 5419 hvrbed.InstanceType = InstanceTypeHyperVReplicaBaseEventDetails 5420 objectMap := make(map[string]interface{}) 5421 if hvrbed.ContainerName != nil { 5422 objectMap["containerName"] = hvrbed.ContainerName 5423 } 5424 if hvrbed.FabricName != nil { 5425 objectMap["fabricName"] = hvrbed.FabricName 5426 } 5427 if hvrbed.RemoteContainerName != nil { 5428 objectMap["remoteContainerName"] = hvrbed.RemoteContainerName 5429 } 5430 if hvrbed.RemoteFabricName != nil { 5431 objectMap["remoteFabricName"] = hvrbed.RemoteFabricName 5432 } 5433 if hvrbed.InstanceType != "" { 5434 objectMap["instanceType"] = hvrbed.InstanceType 5435 } 5436 return json.Marshal(objectMap) 5437} 5438 5439// AsHyperVReplicaBaseEventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaBaseEventDetails. 5440func (hvrbed HyperVReplicaBaseEventDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) { 5441 return &hvrbed, true 5442} 5443 5444// AsHyperVReplica2012EventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaBaseEventDetails. 5445func (hvrbed HyperVReplicaBaseEventDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) { 5446 return nil, false 5447} 5448 5449// AsHyperVReplica2012R2EventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaBaseEventDetails. 5450func (hvrbed HyperVReplicaBaseEventDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) { 5451 return nil, false 5452} 5453 5454// AsHyperVReplicaAzureEventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaBaseEventDetails. 5455func (hvrbed HyperVReplicaBaseEventDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) { 5456 return nil, false 5457} 5458 5459// AsA2AEventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaBaseEventDetails. 5460func (hvrbed HyperVReplicaBaseEventDetails) AsA2AEventDetails() (*A2AEventDetails, bool) { 5461 return nil, false 5462} 5463 5464// AsInMageAzureV2EventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaBaseEventDetails. 5465func (hvrbed HyperVReplicaBaseEventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) { 5466 return nil, false 5467} 5468 5469// AsEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaBaseEventDetails. 5470func (hvrbed HyperVReplicaBaseEventDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) { 5471 return nil, false 5472} 5473 5474// AsBasicEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaBaseEventDetails. 5475func (hvrbed HyperVReplicaBaseEventDetails) AsBasicEventProviderSpecificDetails() (BasicEventProviderSpecificDetails, bool) { 5476 return &hvrbed, true 5477} 5478 5479// HyperVReplicaBasePolicyDetails base class for HyperVReplica policy details. 5480type HyperVReplicaBasePolicyDetails struct { 5481 // RecoveryPoints - A value indicating the number of recovery points. 5482 RecoveryPoints *int32 `json:"recoveryPoints,omitempty"` 5483 // ApplicationConsistentSnapshotFrequencyInHours - A value indicating the application consistent frequency. 5484 ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` 5485 // Compression - A value indicating whether compression has to be enabled. 5486 Compression *string `json:"compression,omitempty"` 5487 // InitialReplicationMethod - A value indicating whether IR is online. 5488 InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"` 5489 // OnlineReplicationStartTime - A value indicating the online IR start time. 5490 OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` 5491 // OfflineReplicationImportPath - A value indicating the offline IR import path. 5492 OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"` 5493 // OfflineReplicationExportPath - A value indicating the offline IR export path. 5494 OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"` 5495 // ReplicationPort - A value indicating the recovery HTTPS port. 5496 ReplicationPort *int32 `json:"replicationPort,omitempty"` 5497 // AllowedAuthenticationType - A value indicating the authentication type. 5498 AllowedAuthenticationType *int32 `json:"allowedAuthenticationType,omitempty"` 5499 // ReplicaDeletionOption - A value indicating whether the VM has to be auto deleted. Supported Values: String.Empty, None, OnRecoveryCloud 5500 ReplicaDeletionOption *string `json:"replicaDeletionOption,omitempty"` 5501 // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypePolicyProviderSpecificDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt' 5502 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"` 5503} 5504 5505// MarshalJSON is the custom marshaler for HyperVReplicaBasePolicyDetails. 5506func (hvrbpd HyperVReplicaBasePolicyDetails) MarshalJSON() ([]byte, error) { 5507 hvrbpd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails 5508 objectMap := make(map[string]interface{}) 5509 if hvrbpd.RecoveryPoints != nil { 5510 objectMap["recoveryPoints"] = hvrbpd.RecoveryPoints 5511 } 5512 if hvrbpd.ApplicationConsistentSnapshotFrequencyInHours != nil { 5513 objectMap["applicationConsistentSnapshotFrequencyInHours"] = hvrbpd.ApplicationConsistentSnapshotFrequencyInHours 5514 } 5515 if hvrbpd.Compression != nil { 5516 objectMap["compression"] = hvrbpd.Compression 5517 } 5518 if hvrbpd.InitialReplicationMethod != nil { 5519 objectMap["initialReplicationMethod"] = hvrbpd.InitialReplicationMethod 5520 } 5521 if hvrbpd.OnlineReplicationStartTime != nil { 5522 objectMap["onlineReplicationStartTime"] = hvrbpd.OnlineReplicationStartTime 5523 } 5524 if hvrbpd.OfflineReplicationImportPath != nil { 5525 objectMap["offlineReplicationImportPath"] = hvrbpd.OfflineReplicationImportPath 5526 } 5527 if hvrbpd.OfflineReplicationExportPath != nil { 5528 objectMap["offlineReplicationExportPath"] = hvrbpd.OfflineReplicationExportPath 5529 } 5530 if hvrbpd.ReplicationPort != nil { 5531 objectMap["replicationPort"] = hvrbpd.ReplicationPort 5532 } 5533 if hvrbpd.AllowedAuthenticationType != nil { 5534 objectMap["allowedAuthenticationType"] = hvrbpd.AllowedAuthenticationType 5535 } 5536 if hvrbpd.ReplicaDeletionOption != nil { 5537 objectMap["replicaDeletionOption"] = hvrbpd.ReplicaDeletionOption 5538 } 5539 if hvrbpd.InstanceType != "" { 5540 objectMap["instanceType"] = hvrbpd.InstanceType 5541 } 5542 return json.Marshal(objectMap) 5543} 5544 5545// AsHyperVReplicaAzurePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBasePolicyDetails. 5546func (hvrbpd HyperVReplicaBasePolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) { 5547 return nil, false 5548} 5549 5550// AsHyperVReplicaBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBasePolicyDetails. 5551func (hvrbpd HyperVReplicaBasePolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) { 5552 return &hvrbpd, true 5553} 5554 5555// AsHyperVReplicaPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBasePolicyDetails. 5556func (hvrbpd HyperVReplicaBasePolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) { 5557 return nil, false 5558} 5559 5560// AsHyperVReplicaBluePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBasePolicyDetails. 5561func (hvrbpd HyperVReplicaBasePolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) { 5562 return nil, false 5563} 5564 5565// AsInMageBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBasePolicyDetails. 5566func (hvrbpd HyperVReplicaBasePolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) { 5567 return nil, false 5568} 5569 5570// AsInMageAzureV2PolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBasePolicyDetails. 5571func (hvrbpd HyperVReplicaBasePolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) { 5572 return nil, false 5573} 5574 5575// AsInMagePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBasePolicyDetails. 5576func (hvrbpd HyperVReplicaBasePolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) { 5577 return nil, false 5578} 5579 5580// AsA2APolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBasePolicyDetails. 5581func (hvrbpd HyperVReplicaBasePolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) { 5582 return nil, false 5583} 5584 5585// AsRcmAzureMigrationPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBasePolicyDetails. 5586func (hvrbpd HyperVReplicaBasePolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) { 5587 return nil, false 5588} 5589 5590// AsVmwareCbtPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBasePolicyDetails. 5591func (hvrbpd HyperVReplicaBasePolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) { 5592 return nil, false 5593} 5594 5595// AsPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBasePolicyDetails. 5596func (hvrbpd HyperVReplicaBasePolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) { 5597 return nil, false 5598} 5599 5600// AsBasicPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBasePolicyDetails. 5601func (hvrbpd HyperVReplicaBasePolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) { 5602 return &hvrbpd, true 5603} 5604 5605// HyperVReplicaBaseReplicationDetails hyper V replica provider specific settings base class. 5606type HyperVReplicaBaseReplicationDetails struct { 5607 // LastReplicatedTime - The Last replication time. 5608 LastReplicatedTime *date.Time `json:"lastReplicatedTime,omitempty"` 5609 // VMNics - The PE Network details. 5610 VMNics *[]VMNicDetails `json:"vmNics,omitempty"` 5611 // VMID - The virtual machine Id. 5612 VMID *string `json:"vmId,omitempty"` 5613 // VMProtectionState - The protection state for the vm. 5614 VMProtectionState *string `json:"vmProtectionState,omitempty"` 5615 // VMProtectionStateDescription - The protection state description for the vm. 5616 VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` 5617 // InitialReplicationDetails - Initial replication details. 5618 InitialReplicationDetails *InitialReplicationDetails `json:"initialReplicationDetails,omitempty"` 5619 // VMDiskDetails - VM disk details. 5620 VMDiskDetails *[]DiskDetails `json:"vMDiskDetails,omitempty"` 5621 // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeReplicationProviderSpecificSettings', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaBaseReplicationDetails', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMageAzureV2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMage', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeA2A' 5622 InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"` 5623} 5624 5625// MarshalJSON is the custom marshaler for HyperVReplicaBaseReplicationDetails. 5626func (hvrbrd HyperVReplicaBaseReplicationDetails) MarshalJSON() ([]byte, error) { 5627 hvrbrd.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaBaseReplicationDetails 5628 objectMap := make(map[string]interface{}) 5629 if hvrbrd.LastReplicatedTime != nil { 5630 objectMap["lastReplicatedTime"] = hvrbrd.LastReplicatedTime 5631 } 5632 if hvrbrd.VMNics != nil { 5633 objectMap["vmNics"] = hvrbrd.VMNics 5634 } 5635 if hvrbrd.VMID != nil { 5636 objectMap["vmId"] = hvrbrd.VMID 5637 } 5638 if hvrbrd.VMProtectionState != nil { 5639 objectMap["vmProtectionState"] = hvrbrd.VMProtectionState 5640 } 5641 if hvrbrd.VMProtectionStateDescription != nil { 5642 objectMap["vmProtectionStateDescription"] = hvrbrd.VMProtectionStateDescription 5643 } 5644 if hvrbrd.InitialReplicationDetails != nil { 5645 objectMap["initialReplicationDetails"] = hvrbrd.InitialReplicationDetails 5646 } 5647 if hvrbrd.VMDiskDetails != nil { 5648 objectMap["vMDiskDetails"] = hvrbrd.VMDiskDetails 5649 } 5650 if hvrbrd.InstanceType != "" { 5651 objectMap["instanceType"] = hvrbrd.InstanceType 5652 } 5653 return json.Marshal(objectMap) 5654} 5655 5656// AsHyperVReplicaBaseReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBaseReplicationDetails. 5657func (hvrbrd HyperVReplicaBaseReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) { 5658 return &hvrbrd, true 5659} 5660 5661// AsHyperVReplicaReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBaseReplicationDetails. 5662func (hvrbrd HyperVReplicaBaseReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) { 5663 return nil, false 5664} 5665 5666// AsHyperVReplicaBlueReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBaseReplicationDetails. 5667func (hvrbrd HyperVReplicaBaseReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) { 5668 return nil, false 5669} 5670 5671// AsHyperVReplicaAzureReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBaseReplicationDetails. 5672func (hvrbrd HyperVReplicaBaseReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) { 5673 return nil, false 5674} 5675 5676// AsInMageAzureV2ReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBaseReplicationDetails. 5677func (hvrbrd HyperVReplicaBaseReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) { 5678 return nil, false 5679} 5680 5681// AsInMageReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBaseReplicationDetails. 5682func (hvrbrd HyperVReplicaBaseReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) { 5683 return nil, false 5684} 5685 5686// AsA2AReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBaseReplicationDetails. 5687func (hvrbrd HyperVReplicaBaseReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) { 5688 return nil, false 5689} 5690 5691// AsReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBaseReplicationDetails. 5692func (hvrbrd HyperVReplicaBaseReplicationDetails) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) { 5693 return nil, false 5694} 5695 5696// AsBasicReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBaseReplicationDetails. 5697func (hvrbrd HyperVReplicaBaseReplicationDetails) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) { 5698 return &hvrbrd, true 5699} 5700 5701// HyperVReplicaBluePolicyDetails hyper-V Replica Blue specific protection profile details. 5702type HyperVReplicaBluePolicyDetails struct { 5703 // ReplicationFrequencyInSeconds - A value indicating the replication interval. 5704 ReplicationFrequencyInSeconds *int32 `json:"replicationFrequencyInSeconds,omitempty"` 5705 // RecoveryPoints - A value indicating the number of recovery points. 5706 RecoveryPoints *int32 `json:"recoveryPoints,omitempty"` 5707 // ApplicationConsistentSnapshotFrequencyInHours - A value indicating the application consistent frequency. 5708 ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` 5709 // Compression - A value indicating whether compression has to be enabled. 5710 Compression *string `json:"compression,omitempty"` 5711 // InitialReplicationMethod - A value indicating whether IR is online. 5712 InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"` 5713 // OnlineReplicationStartTime - A value indicating the online IR start time. 5714 OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` 5715 // OfflineReplicationImportPath - A value indicating the offline IR import path. 5716 OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"` 5717 // OfflineReplicationExportPath - A value indicating the offline IR export path. 5718 OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"` 5719 // ReplicationPort - A value indicating the recovery HTTPS port. 5720 ReplicationPort *int32 `json:"replicationPort,omitempty"` 5721 // AllowedAuthenticationType - A value indicating the authentication type. 5722 AllowedAuthenticationType *int32 `json:"allowedAuthenticationType,omitempty"` 5723 // ReplicaDeletionOption - A value indicating whether the VM has to be auto deleted. Supported Values: String.Empty, None, OnRecoveryCloud 5724 ReplicaDeletionOption *string `json:"replicaDeletionOption,omitempty"` 5725 // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypePolicyProviderSpecificDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt' 5726 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"` 5727} 5728 5729// MarshalJSON is the custom marshaler for HyperVReplicaBluePolicyDetails. 5730func (hvrbpd HyperVReplicaBluePolicyDetails) MarshalJSON() ([]byte, error) { 5731 hvrbpd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2 5732 objectMap := make(map[string]interface{}) 5733 if hvrbpd.ReplicationFrequencyInSeconds != nil { 5734 objectMap["replicationFrequencyInSeconds"] = hvrbpd.ReplicationFrequencyInSeconds 5735 } 5736 if hvrbpd.RecoveryPoints != nil { 5737 objectMap["recoveryPoints"] = hvrbpd.RecoveryPoints 5738 } 5739 if hvrbpd.ApplicationConsistentSnapshotFrequencyInHours != nil { 5740 objectMap["applicationConsistentSnapshotFrequencyInHours"] = hvrbpd.ApplicationConsistentSnapshotFrequencyInHours 5741 } 5742 if hvrbpd.Compression != nil { 5743 objectMap["compression"] = hvrbpd.Compression 5744 } 5745 if hvrbpd.InitialReplicationMethod != nil { 5746 objectMap["initialReplicationMethod"] = hvrbpd.InitialReplicationMethod 5747 } 5748 if hvrbpd.OnlineReplicationStartTime != nil { 5749 objectMap["onlineReplicationStartTime"] = hvrbpd.OnlineReplicationStartTime 5750 } 5751 if hvrbpd.OfflineReplicationImportPath != nil { 5752 objectMap["offlineReplicationImportPath"] = hvrbpd.OfflineReplicationImportPath 5753 } 5754 if hvrbpd.OfflineReplicationExportPath != nil { 5755 objectMap["offlineReplicationExportPath"] = hvrbpd.OfflineReplicationExportPath 5756 } 5757 if hvrbpd.ReplicationPort != nil { 5758 objectMap["replicationPort"] = hvrbpd.ReplicationPort 5759 } 5760 if hvrbpd.AllowedAuthenticationType != nil { 5761 objectMap["allowedAuthenticationType"] = hvrbpd.AllowedAuthenticationType 5762 } 5763 if hvrbpd.ReplicaDeletionOption != nil { 5764 objectMap["replicaDeletionOption"] = hvrbpd.ReplicaDeletionOption 5765 } 5766 if hvrbpd.InstanceType != "" { 5767 objectMap["instanceType"] = hvrbpd.InstanceType 5768 } 5769 return json.Marshal(objectMap) 5770} 5771 5772// AsHyperVReplicaAzurePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBluePolicyDetails. 5773func (hvrbpd HyperVReplicaBluePolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) { 5774 return nil, false 5775} 5776 5777// AsHyperVReplicaBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBluePolicyDetails. 5778func (hvrbpd HyperVReplicaBluePolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) { 5779 return nil, false 5780} 5781 5782// AsHyperVReplicaPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBluePolicyDetails. 5783func (hvrbpd HyperVReplicaBluePolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) { 5784 return nil, false 5785} 5786 5787// AsHyperVReplicaBluePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBluePolicyDetails. 5788func (hvrbpd HyperVReplicaBluePolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) { 5789 return &hvrbpd, true 5790} 5791 5792// AsInMageBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBluePolicyDetails. 5793func (hvrbpd HyperVReplicaBluePolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) { 5794 return nil, false 5795} 5796 5797// AsInMageAzureV2PolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBluePolicyDetails. 5798func (hvrbpd HyperVReplicaBluePolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) { 5799 return nil, false 5800} 5801 5802// AsInMagePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBluePolicyDetails. 5803func (hvrbpd HyperVReplicaBluePolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) { 5804 return nil, false 5805} 5806 5807// AsA2APolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBluePolicyDetails. 5808func (hvrbpd HyperVReplicaBluePolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) { 5809 return nil, false 5810} 5811 5812// AsRcmAzureMigrationPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBluePolicyDetails. 5813func (hvrbpd HyperVReplicaBluePolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) { 5814 return nil, false 5815} 5816 5817// AsVmwareCbtPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBluePolicyDetails. 5818func (hvrbpd HyperVReplicaBluePolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) { 5819 return nil, false 5820} 5821 5822// AsPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBluePolicyDetails. 5823func (hvrbpd HyperVReplicaBluePolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) { 5824 return nil, false 5825} 5826 5827// AsBasicPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBluePolicyDetails. 5828func (hvrbpd HyperVReplicaBluePolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) { 5829 return &hvrbpd, true 5830} 5831 5832// HyperVReplicaBluePolicyInput hyperV Replica Blue policy input. 5833type HyperVReplicaBluePolicyInput struct { 5834 // ReplicationFrequencyInSeconds - A value indicating the replication interval. 5835 ReplicationFrequencyInSeconds *int32 `json:"replicationFrequencyInSeconds,omitempty"` 5836 // RecoveryPoints - A value indicating the number of recovery points. 5837 RecoveryPoints *int32 `json:"recoveryPoints,omitempty"` 5838 // ApplicationConsistentSnapshotFrequencyInHours - A value indicating the application consistent frequency. 5839 ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` 5840 // Compression - A value indicating whether compression has to be enabled. 5841 Compression *string `json:"compression,omitempty"` 5842 // InitialReplicationMethod - A value indicating whether IR is online. 5843 InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"` 5844 // OnlineReplicationStartTime - A value indicating the online IR start time. 5845 OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` 5846 // OfflineReplicationImportPath - A value indicating the offline IR import path. 5847 OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"` 5848 // OfflineReplicationExportPath - A value indicating the offline IR export path. 5849 OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"` 5850 // ReplicationPort - A value indicating the recovery HTTPS port. 5851 ReplicationPort *int32 `json:"replicationPort,omitempty"` 5852 // AllowedAuthenticationType - A value indicating the authentication type. 5853 AllowedAuthenticationType *int32 `json:"allowedAuthenticationType,omitempty"` 5854 // ReplicaDeletion - A value indicating whether the VM has to be auto deleted. 5855 ReplicaDeletion *string `json:"replicaDeletion,omitempty"` 5856 // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypePolicyProviderSpecificInput', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeVMwareCbt' 5857 InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"` 5858} 5859 5860// MarshalJSON is the custom marshaler for HyperVReplicaBluePolicyInput. 5861func (hvrbpi HyperVReplicaBluePolicyInput) MarshalJSON() ([]byte, error) { 5862 hvrbpi.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012R2 5863 objectMap := make(map[string]interface{}) 5864 if hvrbpi.ReplicationFrequencyInSeconds != nil { 5865 objectMap["replicationFrequencyInSeconds"] = hvrbpi.ReplicationFrequencyInSeconds 5866 } 5867 if hvrbpi.RecoveryPoints != nil { 5868 objectMap["recoveryPoints"] = hvrbpi.RecoveryPoints 5869 } 5870 if hvrbpi.ApplicationConsistentSnapshotFrequencyInHours != nil { 5871 objectMap["applicationConsistentSnapshotFrequencyInHours"] = hvrbpi.ApplicationConsistentSnapshotFrequencyInHours 5872 } 5873 if hvrbpi.Compression != nil { 5874 objectMap["compression"] = hvrbpi.Compression 5875 } 5876 if hvrbpi.InitialReplicationMethod != nil { 5877 objectMap["initialReplicationMethod"] = hvrbpi.InitialReplicationMethod 5878 } 5879 if hvrbpi.OnlineReplicationStartTime != nil { 5880 objectMap["onlineReplicationStartTime"] = hvrbpi.OnlineReplicationStartTime 5881 } 5882 if hvrbpi.OfflineReplicationImportPath != nil { 5883 objectMap["offlineReplicationImportPath"] = hvrbpi.OfflineReplicationImportPath 5884 } 5885 if hvrbpi.OfflineReplicationExportPath != nil { 5886 objectMap["offlineReplicationExportPath"] = hvrbpi.OfflineReplicationExportPath 5887 } 5888 if hvrbpi.ReplicationPort != nil { 5889 objectMap["replicationPort"] = hvrbpi.ReplicationPort 5890 } 5891 if hvrbpi.AllowedAuthenticationType != nil { 5892 objectMap["allowedAuthenticationType"] = hvrbpi.AllowedAuthenticationType 5893 } 5894 if hvrbpi.ReplicaDeletion != nil { 5895 objectMap["replicaDeletion"] = hvrbpi.ReplicaDeletion 5896 } 5897 if hvrbpi.InstanceType != "" { 5898 objectMap["instanceType"] = hvrbpi.InstanceType 5899 } 5900 return json.Marshal(objectMap) 5901} 5902 5903// AsHyperVReplicaAzurePolicyInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaBluePolicyInput. 5904func (hvrbpi HyperVReplicaBluePolicyInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) { 5905 return nil, false 5906} 5907 5908// AsHyperVReplicaPolicyInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaBluePolicyInput. 5909func (hvrbpi HyperVReplicaBluePolicyInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) { 5910 return nil, false 5911} 5912 5913// AsHyperVReplicaBluePolicyInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaBluePolicyInput. 5914func (hvrbpi HyperVReplicaBluePolicyInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) { 5915 return &hvrbpi, true 5916} 5917 5918// AsInMageAzureV2PolicyInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaBluePolicyInput. 5919func (hvrbpi HyperVReplicaBluePolicyInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) { 5920 return nil, false 5921} 5922 5923// AsInMagePolicyInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaBluePolicyInput. 5924func (hvrbpi HyperVReplicaBluePolicyInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) { 5925 return nil, false 5926} 5927 5928// AsA2APolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaBluePolicyInput. 5929func (hvrbpi HyperVReplicaBluePolicyInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) { 5930 return nil, false 5931} 5932 5933// AsVMwareCbtPolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaBluePolicyInput. 5934func (hvrbpi HyperVReplicaBluePolicyInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) { 5935 return nil, false 5936} 5937 5938// AsPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaBluePolicyInput. 5939func (hvrbpi HyperVReplicaBluePolicyInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) { 5940 return nil, false 5941} 5942 5943// AsBasicPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaBluePolicyInput. 5944func (hvrbpi HyperVReplicaBluePolicyInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) { 5945 return &hvrbpi, true 5946} 5947 5948// HyperVReplicaBlueReplicationDetails hyperV replica 2012 R2 (Blue) replication details. 5949type HyperVReplicaBlueReplicationDetails struct { 5950 // LastReplicatedTime - The Last replication time. 5951 LastReplicatedTime *date.Time `json:"lastReplicatedTime,omitempty"` 5952 // VMNics - The PE Network details. 5953 VMNics *[]VMNicDetails `json:"vmNics,omitempty"` 5954 // VMID - The virtual machine Id. 5955 VMID *string `json:"vmId,omitempty"` 5956 // VMProtectionState - The protection state for the vm. 5957 VMProtectionState *string `json:"vmProtectionState,omitempty"` 5958 // VMProtectionStateDescription - The protection state description for the vm. 5959 VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` 5960 // InitialReplicationDetails - Initial replication details. 5961 InitialReplicationDetails *InitialReplicationDetails `json:"initialReplicationDetails,omitempty"` 5962 // VMDiskDetails - VM disk details. 5963 VMDiskDetails *[]DiskDetails `json:"vMDiskDetails,omitempty"` 5964 // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeReplicationProviderSpecificSettings', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaBaseReplicationDetails', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMageAzureV2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMage', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeA2A' 5965 InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"` 5966} 5967 5968// MarshalJSON is the custom marshaler for HyperVReplicaBlueReplicationDetails. 5969func (hvrbrd HyperVReplicaBlueReplicationDetails) MarshalJSON() ([]byte, error) { 5970 hvrbrd.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012R2 5971 objectMap := make(map[string]interface{}) 5972 if hvrbrd.LastReplicatedTime != nil { 5973 objectMap["lastReplicatedTime"] = hvrbrd.LastReplicatedTime 5974 } 5975 if hvrbrd.VMNics != nil { 5976 objectMap["vmNics"] = hvrbrd.VMNics 5977 } 5978 if hvrbrd.VMID != nil { 5979 objectMap["vmId"] = hvrbrd.VMID 5980 } 5981 if hvrbrd.VMProtectionState != nil { 5982 objectMap["vmProtectionState"] = hvrbrd.VMProtectionState 5983 } 5984 if hvrbrd.VMProtectionStateDescription != nil { 5985 objectMap["vmProtectionStateDescription"] = hvrbrd.VMProtectionStateDescription 5986 } 5987 if hvrbrd.InitialReplicationDetails != nil { 5988 objectMap["initialReplicationDetails"] = hvrbrd.InitialReplicationDetails 5989 } 5990 if hvrbrd.VMDiskDetails != nil { 5991 objectMap["vMDiskDetails"] = hvrbrd.VMDiskDetails 5992 } 5993 if hvrbrd.InstanceType != "" { 5994 objectMap["instanceType"] = hvrbrd.InstanceType 5995 } 5996 return json.Marshal(objectMap) 5997} 5998 5999// AsHyperVReplicaBaseReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBlueReplicationDetails. 6000func (hvrbrd HyperVReplicaBlueReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) { 6001 return nil, false 6002} 6003 6004// AsHyperVReplicaReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBlueReplicationDetails. 6005func (hvrbrd HyperVReplicaBlueReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) { 6006 return nil, false 6007} 6008 6009// AsHyperVReplicaBlueReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBlueReplicationDetails. 6010func (hvrbrd HyperVReplicaBlueReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) { 6011 return &hvrbrd, true 6012} 6013 6014// AsHyperVReplicaAzureReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBlueReplicationDetails. 6015func (hvrbrd HyperVReplicaBlueReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) { 6016 return nil, false 6017} 6018 6019// AsInMageAzureV2ReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBlueReplicationDetails. 6020func (hvrbrd HyperVReplicaBlueReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) { 6021 return nil, false 6022} 6023 6024// AsInMageReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBlueReplicationDetails. 6025func (hvrbrd HyperVReplicaBlueReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) { 6026 return nil, false 6027} 6028 6029// AsA2AReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBlueReplicationDetails. 6030func (hvrbrd HyperVReplicaBlueReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) { 6031 return nil, false 6032} 6033 6034// AsReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBlueReplicationDetails. 6035func (hvrbrd HyperVReplicaBlueReplicationDetails) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) { 6036 return nil, false 6037} 6038 6039// AsBasicReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBlueReplicationDetails. 6040func (hvrbrd HyperVReplicaBlueReplicationDetails) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) { 6041 return &hvrbrd, true 6042} 6043 6044// HyperVReplicaPolicyDetails hyper-V Replica Blue specific protection profile details. 6045type HyperVReplicaPolicyDetails struct { 6046 // RecoveryPoints - A value indicating the number of recovery points. 6047 RecoveryPoints *int32 `json:"recoveryPoints,omitempty"` 6048 // ApplicationConsistentSnapshotFrequencyInHours - A value indicating the application consistent frequency. 6049 ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` 6050 // Compression - A value indicating whether compression has to be enabled. 6051 Compression *string `json:"compression,omitempty"` 6052 // InitialReplicationMethod - A value indicating whether IR is online. 6053 InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"` 6054 // OnlineReplicationStartTime - A value indicating the online IR start time. 6055 OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` 6056 // OfflineReplicationImportPath - A value indicating the offline IR import path. 6057 OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"` 6058 // OfflineReplicationExportPath - A value indicating the offline IR export path. 6059 OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"` 6060 // ReplicationPort - A value indicating the recovery HTTPS port. 6061 ReplicationPort *int32 `json:"replicationPort,omitempty"` 6062 // AllowedAuthenticationType - A value indicating the authentication type. 6063 AllowedAuthenticationType *int32 `json:"allowedAuthenticationType,omitempty"` 6064 // ReplicaDeletionOption - A value indicating whether the VM has to be auto deleted. Supported Values: String.Empty, None, OnRecoveryCloud 6065 ReplicaDeletionOption *string `json:"replicaDeletionOption,omitempty"` 6066 // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypePolicyProviderSpecificDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt' 6067 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"` 6068} 6069 6070// MarshalJSON is the custom marshaler for HyperVReplicaPolicyDetails. 6071func (hvrpd HyperVReplicaPolicyDetails) MarshalJSON() ([]byte, error) { 6072 hvrpd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012 6073 objectMap := make(map[string]interface{}) 6074 if hvrpd.RecoveryPoints != nil { 6075 objectMap["recoveryPoints"] = hvrpd.RecoveryPoints 6076 } 6077 if hvrpd.ApplicationConsistentSnapshotFrequencyInHours != nil { 6078 objectMap["applicationConsistentSnapshotFrequencyInHours"] = hvrpd.ApplicationConsistentSnapshotFrequencyInHours 6079 } 6080 if hvrpd.Compression != nil { 6081 objectMap["compression"] = hvrpd.Compression 6082 } 6083 if hvrpd.InitialReplicationMethod != nil { 6084 objectMap["initialReplicationMethod"] = hvrpd.InitialReplicationMethod 6085 } 6086 if hvrpd.OnlineReplicationStartTime != nil { 6087 objectMap["onlineReplicationStartTime"] = hvrpd.OnlineReplicationStartTime 6088 } 6089 if hvrpd.OfflineReplicationImportPath != nil { 6090 objectMap["offlineReplicationImportPath"] = hvrpd.OfflineReplicationImportPath 6091 } 6092 if hvrpd.OfflineReplicationExportPath != nil { 6093 objectMap["offlineReplicationExportPath"] = hvrpd.OfflineReplicationExportPath 6094 } 6095 if hvrpd.ReplicationPort != nil { 6096 objectMap["replicationPort"] = hvrpd.ReplicationPort 6097 } 6098 if hvrpd.AllowedAuthenticationType != nil { 6099 objectMap["allowedAuthenticationType"] = hvrpd.AllowedAuthenticationType 6100 } 6101 if hvrpd.ReplicaDeletionOption != nil { 6102 objectMap["replicaDeletionOption"] = hvrpd.ReplicaDeletionOption 6103 } 6104 if hvrpd.InstanceType != "" { 6105 objectMap["instanceType"] = hvrpd.InstanceType 6106 } 6107 return json.Marshal(objectMap) 6108} 6109 6110// AsHyperVReplicaAzurePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaPolicyDetails. 6111func (hvrpd HyperVReplicaPolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) { 6112 return nil, false 6113} 6114 6115// AsHyperVReplicaBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaPolicyDetails. 6116func (hvrpd HyperVReplicaPolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) { 6117 return nil, false 6118} 6119 6120// AsHyperVReplicaPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaPolicyDetails. 6121func (hvrpd HyperVReplicaPolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) { 6122 return &hvrpd, true 6123} 6124 6125// AsHyperVReplicaBluePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaPolicyDetails. 6126func (hvrpd HyperVReplicaPolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) { 6127 return nil, false 6128} 6129 6130// AsInMageBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaPolicyDetails. 6131func (hvrpd HyperVReplicaPolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) { 6132 return nil, false 6133} 6134 6135// AsInMageAzureV2PolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaPolicyDetails. 6136func (hvrpd HyperVReplicaPolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) { 6137 return nil, false 6138} 6139 6140// AsInMagePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaPolicyDetails. 6141func (hvrpd HyperVReplicaPolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) { 6142 return nil, false 6143} 6144 6145// AsA2APolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaPolicyDetails. 6146func (hvrpd HyperVReplicaPolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) { 6147 return nil, false 6148} 6149 6150// AsRcmAzureMigrationPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaPolicyDetails. 6151func (hvrpd HyperVReplicaPolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) { 6152 return nil, false 6153} 6154 6155// AsVmwareCbtPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaPolicyDetails. 6156func (hvrpd HyperVReplicaPolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) { 6157 return nil, false 6158} 6159 6160// AsPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaPolicyDetails. 6161func (hvrpd HyperVReplicaPolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) { 6162 return nil, false 6163} 6164 6165// AsBasicPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaPolicyDetails. 6166func (hvrpd HyperVReplicaPolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) { 6167 return &hvrpd, true 6168} 6169 6170// HyperVReplicaPolicyInput hyper-V Replica specific protection profile Input. 6171type HyperVReplicaPolicyInput struct { 6172 // RecoveryPoints - A value indicating the number of recovery points. 6173 RecoveryPoints *int32 `json:"recoveryPoints,omitempty"` 6174 // ApplicationConsistentSnapshotFrequencyInHours - A value indicating the application consistent frequency. 6175 ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` 6176 // Compression - A value indicating whether compression has to be enabled. 6177 Compression *string `json:"compression,omitempty"` 6178 // InitialReplicationMethod - A value indicating whether IR is online. 6179 InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"` 6180 // OnlineReplicationStartTime - A value indicating the online IR start time. 6181 OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` 6182 // OfflineReplicationImportPath - A value indicating the offline IR import path. 6183 OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"` 6184 // OfflineReplicationExportPath - A value indicating the offline IR export path. 6185 OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"` 6186 // ReplicationPort - A value indicating the recovery HTTPS port. 6187 ReplicationPort *int32 `json:"replicationPort,omitempty"` 6188 // AllowedAuthenticationType - A value indicating the authentication type. 6189 AllowedAuthenticationType *int32 `json:"allowedAuthenticationType,omitempty"` 6190 // ReplicaDeletion - A value indicating whether the VM has to be auto deleted. 6191 ReplicaDeletion *string `json:"replicaDeletion,omitempty"` 6192 // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypePolicyProviderSpecificInput', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeVMwareCbt' 6193 InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"` 6194} 6195 6196// MarshalJSON is the custom marshaler for HyperVReplicaPolicyInput. 6197func (hvrpi HyperVReplicaPolicyInput) MarshalJSON() ([]byte, error) { 6198 hvrpi.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012 6199 objectMap := make(map[string]interface{}) 6200 if hvrpi.RecoveryPoints != nil { 6201 objectMap["recoveryPoints"] = hvrpi.RecoveryPoints 6202 } 6203 if hvrpi.ApplicationConsistentSnapshotFrequencyInHours != nil { 6204 objectMap["applicationConsistentSnapshotFrequencyInHours"] = hvrpi.ApplicationConsistentSnapshotFrequencyInHours 6205 } 6206 if hvrpi.Compression != nil { 6207 objectMap["compression"] = hvrpi.Compression 6208 } 6209 if hvrpi.InitialReplicationMethod != nil { 6210 objectMap["initialReplicationMethod"] = hvrpi.InitialReplicationMethod 6211 } 6212 if hvrpi.OnlineReplicationStartTime != nil { 6213 objectMap["onlineReplicationStartTime"] = hvrpi.OnlineReplicationStartTime 6214 } 6215 if hvrpi.OfflineReplicationImportPath != nil { 6216 objectMap["offlineReplicationImportPath"] = hvrpi.OfflineReplicationImportPath 6217 } 6218 if hvrpi.OfflineReplicationExportPath != nil { 6219 objectMap["offlineReplicationExportPath"] = hvrpi.OfflineReplicationExportPath 6220 } 6221 if hvrpi.ReplicationPort != nil { 6222 objectMap["replicationPort"] = hvrpi.ReplicationPort 6223 } 6224 if hvrpi.AllowedAuthenticationType != nil { 6225 objectMap["allowedAuthenticationType"] = hvrpi.AllowedAuthenticationType 6226 } 6227 if hvrpi.ReplicaDeletion != nil { 6228 objectMap["replicaDeletion"] = hvrpi.ReplicaDeletion 6229 } 6230 if hvrpi.InstanceType != "" { 6231 objectMap["instanceType"] = hvrpi.InstanceType 6232 } 6233 return json.Marshal(objectMap) 6234} 6235 6236// AsHyperVReplicaAzurePolicyInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaPolicyInput. 6237func (hvrpi HyperVReplicaPolicyInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) { 6238 return nil, false 6239} 6240 6241// AsHyperVReplicaPolicyInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaPolicyInput. 6242func (hvrpi HyperVReplicaPolicyInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) { 6243 return &hvrpi, true 6244} 6245 6246// AsHyperVReplicaBluePolicyInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaPolicyInput. 6247func (hvrpi HyperVReplicaPolicyInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) { 6248 return nil, false 6249} 6250 6251// AsInMageAzureV2PolicyInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaPolicyInput. 6252func (hvrpi HyperVReplicaPolicyInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) { 6253 return nil, false 6254} 6255 6256// AsInMagePolicyInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaPolicyInput. 6257func (hvrpi HyperVReplicaPolicyInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) { 6258 return nil, false 6259} 6260 6261// AsA2APolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaPolicyInput. 6262func (hvrpi HyperVReplicaPolicyInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) { 6263 return nil, false 6264} 6265 6266// AsVMwareCbtPolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaPolicyInput. 6267func (hvrpi HyperVReplicaPolicyInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) { 6268 return nil, false 6269} 6270 6271// AsPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaPolicyInput. 6272func (hvrpi HyperVReplicaPolicyInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) { 6273 return nil, false 6274} 6275 6276// AsBasicPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaPolicyInput. 6277func (hvrpi HyperVReplicaPolicyInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) { 6278 return &hvrpi, true 6279} 6280 6281// HyperVReplicaReplicationDetails hyperV replica 2012 replication details. 6282type HyperVReplicaReplicationDetails struct { 6283 // LastReplicatedTime - The Last replication time. 6284 LastReplicatedTime *date.Time `json:"lastReplicatedTime,omitempty"` 6285 // VMNics - The PE Network details. 6286 VMNics *[]VMNicDetails `json:"vmNics,omitempty"` 6287 // VMID - The virtual machine Id. 6288 VMID *string `json:"vmId,omitempty"` 6289 // VMProtectionState - The protection state for the vm. 6290 VMProtectionState *string `json:"vmProtectionState,omitempty"` 6291 // VMProtectionStateDescription - The protection state description for the vm. 6292 VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` 6293 // InitialReplicationDetails - Initial replication details. 6294 InitialReplicationDetails *InitialReplicationDetails `json:"initialReplicationDetails,omitempty"` 6295 // VMDiskDetails - VM disk details. 6296 VMDiskDetails *[]DiskDetails `json:"vMDiskDetails,omitempty"` 6297 // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeReplicationProviderSpecificSettings', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaBaseReplicationDetails', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMageAzureV2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMage', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeA2A' 6298 InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"` 6299} 6300 6301// MarshalJSON is the custom marshaler for HyperVReplicaReplicationDetails. 6302func (hvrrd HyperVReplicaReplicationDetails) MarshalJSON() ([]byte, error) { 6303 hvrrd.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012 6304 objectMap := make(map[string]interface{}) 6305 if hvrrd.LastReplicatedTime != nil { 6306 objectMap["lastReplicatedTime"] = hvrrd.LastReplicatedTime 6307 } 6308 if hvrrd.VMNics != nil { 6309 objectMap["vmNics"] = hvrrd.VMNics 6310 } 6311 if hvrrd.VMID != nil { 6312 objectMap["vmId"] = hvrrd.VMID 6313 } 6314 if hvrrd.VMProtectionState != nil { 6315 objectMap["vmProtectionState"] = hvrrd.VMProtectionState 6316 } 6317 if hvrrd.VMProtectionStateDescription != nil { 6318 objectMap["vmProtectionStateDescription"] = hvrrd.VMProtectionStateDescription 6319 } 6320 if hvrrd.InitialReplicationDetails != nil { 6321 objectMap["initialReplicationDetails"] = hvrrd.InitialReplicationDetails 6322 } 6323 if hvrrd.VMDiskDetails != nil { 6324 objectMap["vMDiskDetails"] = hvrrd.VMDiskDetails 6325 } 6326 if hvrrd.InstanceType != "" { 6327 objectMap["instanceType"] = hvrrd.InstanceType 6328 } 6329 return json.Marshal(objectMap) 6330} 6331 6332// AsHyperVReplicaBaseReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaReplicationDetails. 6333func (hvrrd HyperVReplicaReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) { 6334 return nil, false 6335} 6336 6337// AsHyperVReplicaReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaReplicationDetails. 6338func (hvrrd HyperVReplicaReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) { 6339 return &hvrrd, true 6340} 6341 6342// AsHyperVReplicaBlueReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaReplicationDetails. 6343func (hvrrd HyperVReplicaReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) { 6344 return nil, false 6345} 6346 6347// AsHyperVReplicaAzureReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaReplicationDetails. 6348func (hvrrd HyperVReplicaReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) { 6349 return nil, false 6350} 6351 6352// AsInMageAzureV2ReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaReplicationDetails. 6353func (hvrrd HyperVReplicaReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) { 6354 return nil, false 6355} 6356 6357// AsInMageReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaReplicationDetails. 6358func (hvrrd HyperVReplicaReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) { 6359 return nil, false 6360} 6361 6362// AsA2AReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaReplicationDetails. 6363func (hvrrd HyperVReplicaReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) { 6364 return nil, false 6365} 6366 6367// AsReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaReplicationDetails. 6368func (hvrrd HyperVReplicaReplicationDetails) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) { 6369 return nil, false 6370} 6371 6372// AsBasicReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaReplicationDetails. 6373func (hvrrd HyperVReplicaReplicationDetails) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) { 6374 return &hvrrd, true 6375} 6376 6377// HyperVSiteDetails hyperVSite fabric specific details. 6378type HyperVSiteDetails struct { 6379 // InstanceType - Possible values include: 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeFabricSpecificDetails', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeAzure', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMM', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeHyperVSite', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMware', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMwareV2' 6380 InstanceType InstanceTypeBasicFabricSpecificDetails `json:"instanceType,omitempty"` 6381} 6382 6383// MarshalJSON is the custom marshaler for HyperVSiteDetails. 6384func (hvsd HyperVSiteDetails) MarshalJSON() ([]byte, error) { 6385 hvsd.InstanceType = InstanceTypeBasicFabricSpecificDetailsInstanceTypeHyperVSite 6386 objectMap := make(map[string]interface{}) 6387 if hvsd.InstanceType != "" { 6388 objectMap["instanceType"] = hvsd.InstanceType 6389 } 6390 return json.Marshal(objectMap) 6391} 6392 6393// AsAzureFabricSpecificDetails is the BasicFabricSpecificDetails implementation for HyperVSiteDetails. 6394func (hvsd HyperVSiteDetails) AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool) { 6395 return nil, false 6396} 6397 6398// AsVmmDetails is the BasicFabricSpecificDetails implementation for HyperVSiteDetails. 6399func (hvsd HyperVSiteDetails) AsVmmDetails() (*VmmDetails, bool) { 6400 return nil, false 6401} 6402 6403// AsHyperVSiteDetails is the BasicFabricSpecificDetails implementation for HyperVSiteDetails. 6404func (hvsd HyperVSiteDetails) AsHyperVSiteDetails() (*HyperVSiteDetails, bool) { 6405 return &hvsd, true 6406} 6407 6408// AsVMwareDetails is the BasicFabricSpecificDetails implementation for HyperVSiteDetails. 6409func (hvsd HyperVSiteDetails) AsVMwareDetails() (*VMwareDetails, bool) { 6410 return nil, false 6411} 6412 6413// AsVMwareV2FabricSpecificDetails is the BasicFabricSpecificDetails implementation for HyperVSiteDetails. 6414func (hvsd HyperVSiteDetails) AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool) { 6415 return nil, false 6416} 6417 6418// AsFabricSpecificDetails is the BasicFabricSpecificDetails implementation for HyperVSiteDetails. 6419func (hvsd HyperVSiteDetails) AsFabricSpecificDetails() (*FabricSpecificDetails, bool) { 6420 return nil, false 6421} 6422 6423// AsBasicFabricSpecificDetails is the BasicFabricSpecificDetails implementation for HyperVSiteDetails. 6424func (hvsd HyperVSiteDetails) AsBasicFabricSpecificDetails() (BasicFabricSpecificDetails, bool) { 6425 return &hvsd, true 6426} 6427 6428// HyperVVirtualMachineDetails hyper V replica provider specific settings 6429type HyperVVirtualMachineDetails struct { 6430 // SourceItemID - The source id of the object. 6431 SourceItemID *string `json:"sourceItemId,omitempty"` 6432 // Generation - The id of the object in fabric. 6433 Generation *string `json:"generation,omitempty"` 6434 // OsDetails - The Last replication time. 6435 OsDetails *OSDetails `json:"osDetails,omitempty"` 6436 // DiskDetails - The Last successful failover time. 6437 DiskDetails *[]DiskDetails `json:"diskDetails,omitempty"` 6438 // InstanceType - Possible values include: 'InstanceTypeConfigurationSettings', 'InstanceTypeHyperVVirtualMachine', 'InstanceTypeVMwareVirtualMachine', 'InstanceTypeReplicationGroupDetails' 6439 InstanceType InstanceTypeBasicConfigurationSettings `json:"instanceType,omitempty"` 6440} 6441 6442// MarshalJSON is the custom marshaler for HyperVVirtualMachineDetails. 6443func (hvvmd HyperVVirtualMachineDetails) MarshalJSON() ([]byte, error) { 6444 hvvmd.InstanceType = InstanceTypeHyperVVirtualMachine 6445 objectMap := make(map[string]interface{}) 6446 if hvvmd.SourceItemID != nil { 6447 objectMap["sourceItemId"] = hvvmd.SourceItemID 6448 } 6449 if hvvmd.Generation != nil { 6450 objectMap["generation"] = hvvmd.Generation 6451 } 6452 if hvvmd.OsDetails != nil { 6453 objectMap["osDetails"] = hvvmd.OsDetails 6454 } 6455 if hvvmd.DiskDetails != nil { 6456 objectMap["diskDetails"] = hvvmd.DiskDetails 6457 } 6458 if hvvmd.InstanceType != "" { 6459 objectMap["instanceType"] = hvvmd.InstanceType 6460 } 6461 return json.Marshal(objectMap) 6462} 6463 6464// AsHyperVVirtualMachineDetails is the BasicConfigurationSettings implementation for HyperVVirtualMachineDetails. 6465func (hvvmd HyperVVirtualMachineDetails) AsHyperVVirtualMachineDetails() (*HyperVVirtualMachineDetails, bool) { 6466 return &hvvmd, true 6467} 6468 6469// AsVMwareVirtualMachineDetails is the BasicConfigurationSettings implementation for HyperVVirtualMachineDetails. 6470func (hvvmd HyperVVirtualMachineDetails) AsVMwareVirtualMachineDetails() (*VMwareVirtualMachineDetails, bool) { 6471 return nil, false 6472} 6473 6474// AsReplicationGroupDetails is the BasicConfigurationSettings implementation for HyperVVirtualMachineDetails. 6475func (hvvmd HyperVVirtualMachineDetails) AsReplicationGroupDetails() (*ReplicationGroupDetails, bool) { 6476 return nil, false 6477} 6478 6479// AsConfigurationSettings is the BasicConfigurationSettings implementation for HyperVVirtualMachineDetails. 6480func (hvvmd HyperVVirtualMachineDetails) AsConfigurationSettings() (*ConfigurationSettings, bool) { 6481 return nil, false 6482} 6483 6484// AsBasicConfigurationSettings is the BasicConfigurationSettings implementation for HyperVVirtualMachineDetails. 6485func (hvvmd HyperVVirtualMachineDetails) AsBasicConfigurationSettings() (BasicConfigurationSettings, bool) { 6486 return &hvvmd, true 6487} 6488 6489// IdentityInformation identity details. 6490type IdentityInformation struct { 6491 // IdentityProviderType - The identity provider type. Value is the ToString() of a IdentityProviderType value. Possible values include: 'RecoveryServicesActiveDirectory', 'CustomerActiveDirectory' 6492 IdentityProviderType IdentityProviderType `json:"identityProviderType,omitempty"` 6493 // TenantID - The tenant Id for the service principal with which the on-premise management/data plane components would communicate with our Azure services. 6494 TenantID *string `json:"tenantId,omitempty"` 6495 // ApplicationID - The application/client Id for the service principal with which the on-premise management/data plane components would communicate with our Azure services. 6496 ApplicationID *string `json:"applicationId,omitempty"` 6497 // ObjectID - The object Id of the service principal with which the on-premise management/data plane components would communicate with our Azure services. 6498 ObjectID *string `json:"objectId,omitempty"` 6499 // Audience - The intended Audience of the service principal with which the on-premise management/data plane components would communicate with our Azure services. 6500 Audience *string `json:"audience,omitempty"` 6501 // AadAuthority - The base authority for Azure Active Directory authentication. 6502 AadAuthority *string `json:"aadAuthority,omitempty"` 6503 // CertificateThumbprint - The certificate thumbprint. Applicable only if IdentityProviderType is RecoveryServicesActiveDirectory. 6504 CertificateThumbprint *string `json:"certificateThumbprint,omitempty"` 6505} 6506 6507// InconsistentVMDetails this class stores the monitoring details for consistency check of inconsistent 6508// Protected Entity. 6509type InconsistentVMDetails struct { 6510 // VMName - The Vm name. 6511 VMName *string `json:"vmName,omitempty"` 6512 // CloudName - The Cloud name. 6513 CloudName *string `json:"cloudName,omitempty"` 6514 // Details - The list of details regarding state of the Protected Entity in SRS and On prem. 6515 Details *[]string `json:"details,omitempty"` 6516 // ErrorIds - The list of error ids. 6517 ErrorIds *[]string `json:"errorIds,omitempty"` 6518} 6519 6520// InitialReplicationDetails initial replication details. 6521type InitialReplicationDetails struct { 6522 // InitialReplicationType - Initial replication type. 6523 InitialReplicationType *string `json:"initialReplicationType,omitempty"` 6524 // InitialReplicationProgressPercentage - The initial replication progress percentage. 6525 InitialReplicationProgressPercentage *string `json:"initialReplicationProgressPercentage,omitempty"` 6526} 6527 6528// InlineWorkflowTaskDetails this class represents the inline workflow task details. 6529type InlineWorkflowTaskDetails struct { 6530 // WorkflowIds - The list of child workflow ids. 6531 WorkflowIds *[]string `json:"workflowIds,omitempty"` 6532 // ChildTasks - The child tasks. 6533 ChildTasks *[]ASRTask `json:"childTasks,omitempty"` 6534 // InstanceType - Possible values include: 'InstanceTypeGroupTaskDetails', 'InstanceTypeInlineWorkflowTaskDetails', 'InstanceTypeRecoveryPlanGroupTaskDetails', 'InstanceTypeRecoveryPlanShutdownGroupTaskDetails' 6535 InstanceType InstanceTypeBasicGroupTaskDetails `json:"instanceType,omitempty"` 6536} 6537 6538// MarshalJSON is the custom marshaler for InlineWorkflowTaskDetails. 6539func (iwtd InlineWorkflowTaskDetails) MarshalJSON() ([]byte, error) { 6540 iwtd.InstanceType = InstanceTypeInlineWorkflowTaskDetails 6541 objectMap := make(map[string]interface{}) 6542 if iwtd.WorkflowIds != nil { 6543 objectMap["workflowIds"] = iwtd.WorkflowIds 6544 } 6545 if iwtd.ChildTasks != nil { 6546 objectMap["childTasks"] = iwtd.ChildTasks 6547 } 6548 if iwtd.InstanceType != "" { 6549 objectMap["instanceType"] = iwtd.InstanceType 6550 } 6551 return json.Marshal(objectMap) 6552} 6553 6554// AsInlineWorkflowTaskDetails is the BasicGroupTaskDetails implementation for InlineWorkflowTaskDetails. 6555func (iwtd InlineWorkflowTaskDetails) AsInlineWorkflowTaskDetails() (*InlineWorkflowTaskDetails, bool) { 6556 return &iwtd, true 6557} 6558 6559// AsRecoveryPlanGroupTaskDetails is the BasicGroupTaskDetails implementation for InlineWorkflowTaskDetails. 6560func (iwtd InlineWorkflowTaskDetails) AsRecoveryPlanGroupTaskDetails() (*RecoveryPlanGroupTaskDetails, bool) { 6561 return nil, false 6562} 6563 6564// AsRecoveryPlanShutdownGroupTaskDetails is the BasicGroupTaskDetails implementation for InlineWorkflowTaskDetails. 6565func (iwtd InlineWorkflowTaskDetails) AsRecoveryPlanShutdownGroupTaskDetails() (*RecoveryPlanShutdownGroupTaskDetails, bool) { 6566 return nil, false 6567} 6568 6569// AsGroupTaskDetails is the BasicGroupTaskDetails implementation for InlineWorkflowTaskDetails. 6570func (iwtd InlineWorkflowTaskDetails) AsGroupTaskDetails() (*GroupTaskDetails, bool) { 6571 return nil, false 6572} 6573 6574// AsBasicGroupTaskDetails is the BasicGroupTaskDetails implementation for InlineWorkflowTaskDetails. 6575func (iwtd InlineWorkflowTaskDetails) AsBasicGroupTaskDetails() (BasicGroupTaskDetails, bool) { 6576 return &iwtd, true 6577} 6578 6579// InMageAgentDetails the details of the InMage agent. 6580type InMageAgentDetails struct { 6581 // AgentVersion - The agent version. 6582 AgentVersion *string `json:"agentVersion,omitempty"` 6583 // AgentUpdateStatus - A value indicating whether installed agent needs to be updated. 6584 AgentUpdateStatus *string `json:"agentUpdateStatus,omitempty"` 6585 // PostUpdateRebootStatus - A value indicating whether reboot is required after update is applied. 6586 PostUpdateRebootStatus *string `json:"postUpdateRebootStatus,omitempty"` 6587} 6588 6589// InMageAzureV2ApplyRecoveryPointInput applyRecoveryPoint input specific to InMageAzureV2 provider. 6590type InMageAzureV2ApplyRecoveryPointInput struct { 6591 // VaultLocation - The vault location where the recovery Vm resides. 6592 VaultLocation *string `json:"vaultLocation,omitempty"` 6593 // InstanceType - Possible values include: 'InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeApplyRecoveryPointProviderSpecificInput', 'InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeA2A' 6594 InstanceType InstanceTypeBasicApplyRecoveryPointProviderSpecificInput `json:"instanceType,omitempty"` 6595} 6596 6597// MarshalJSON is the custom marshaler for InMageAzureV2ApplyRecoveryPointInput. 6598func (imavarpi InMageAzureV2ApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { 6599 imavarpi.InstanceType = InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeInMageAzureV2 6600 objectMap := make(map[string]interface{}) 6601 if imavarpi.VaultLocation != nil { 6602 objectMap["vaultLocation"] = imavarpi.VaultLocation 6603 } 6604 if imavarpi.InstanceType != "" { 6605 objectMap["instanceType"] = imavarpi.InstanceType 6606 } 6607 return json.Marshal(objectMap) 6608} 6609 6610// AsHyperVReplicaAzureApplyRecoveryPointInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for InMageAzureV2ApplyRecoveryPointInput. 6611func (imavarpi InMageAzureV2ApplyRecoveryPointInput) AsHyperVReplicaAzureApplyRecoveryPointInput() (*HyperVReplicaAzureApplyRecoveryPointInput, bool) { 6612 return nil, false 6613} 6614 6615// AsInMageAzureV2ApplyRecoveryPointInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for InMageAzureV2ApplyRecoveryPointInput. 6616func (imavarpi InMageAzureV2ApplyRecoveryPointInput) AsInMageAzureV2ApplyRecoveryPointInput() (*InMageAzureV2ApplyRecoveryPointInput, bool) { 6617 return &imavarpi, true 6618} 6619 6620// AsA2AApplyRecoveryPointInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for InMageAzureV2ApplyRecoveryPointInput. 6621func (imavarpi InMageAzureV2ApplyRecoveryPointInput) AsA2AApplyRecoveryPointInput() (*A2AApplyRecoveryPointInput, bool) { 6622 return nil, false 6623} 6624 6625// AsApplyRecoveryPointProviderSpecificInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for InMageAzureV2ApplyRecoveryPointInput. 6626func (imavarpi InMageAzureV2ApplyRecoveryPointInput) AsApplyRecoveryPointProviderSpecificInput() (*ApplyRecoveryPointProviderSpecificInput, bool) { 6627 return nil, false 6628} 6629 6630// AsBasicApplyRecoveryPointProviderSpecificInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for InMageAzureV2ApplyRecoveryPointInput. 6631func (imavarpi InMageAzureV2ApplyRecoveryPointInput) AsBasicApplyRecoveryPointProviderSpecificInput() (BasicApplyRecoveryPointProviderSpecificInput, bool) { 6632 return &imavarpi, true 6633} 6634 6635// InMageAzureV2EnableProtectionInput vMware Azure specific enable protection input. 6636type InMageAzureV2EnableProtectionInput struct { 6637 // MasterTargetID - The Master target Id. 6638 MasterTargetID *string `json:"masterTargetId,omitempty"` 6639 // ProcessServerID - The Process Server Id. 6640 ProcessServerID *string `json:"processServerId,omitempty"` 6641 // StorageAccountID - The storage account name. 6642 StorageAccountID *string `json:"storageAccountId,omitempty"` 6643 // RunAsAccountID - The CS account Id. 6644 RunAsAccountID *string `json:"runAsAccountId,omitempty"` 6645 // MultiVMGroupID - The multi vm group Id. 6646 MultiVMGroupID *string `json:"multiVmGroupId,omitempty"` 6647 // MultiVMGroupName - The multi vm group name. 6648 MultiVMGroupName *string `json:"multiVmGroupName,omitempty"` 6649 // DisksToInclude - The disks to include list. 6650 DisksToInclude *[]string `json:"disksToInclude,omitempty"` 6651 // TargetAzureNetworkID - The selected target Azure network Id. 6652 TargetAzureNetworkID *string `json:"targetAzureNetworkId,omitempty"` 6653 // TargetAzureSubnetID - The selected target Azure subnet Id. 6654 TargetAzureSubnetID *string `json:"targetAzureSubnetId,omitempty"` 6655 // EnableRDPOnTargetOption - The selected option to enable RDP\SSH on target vm after failover. String value of {SrsDataContract.EnableRDPOnTargetOption} enum. 6656 EnableRDPOnTargetOption *string `json:"enableRDPOnTargetOption,omitempty"` 6657 // TargetAzureVMName - The target azure Vm Name. 6658 TargetAzureVMName *string `json:"targetAzureVmName,omitempty"` 6659 // LogStorageAccountID - The storage account to be used for logging during replication. 6660 LogStorageAccountID *string `json:"logStorageAccountId,omitempty"` 6661 // TargetAzureV1ResourceGroupID - The Id of the target resource group (for classic deployment) in which the failover VM is to be created. 6662 TargetAzureV1ResourceGroupID *string `json:"targetAzureV1ResourceGroupId,omitempty"` 6663 // TargetAzureV2ResourceGroupID - The Id of the target resource group (for resource manager deployment) in which the failover VM is to be created. 6664 TargetAzureV2ResourceGroupID *string `json:"targetAzureV2ResourceGroupId,omitempty"` 6665 // UseManagedDisks - A value indicating whether managed disks should be used during failover. 6666 UseManagedDisks *string `json:"useManagedDisks,omitempty"` 6667 // InstanceType - Possible values include: 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeEnableProtectionProviderSpecificInput', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeSan', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeA2A' 6668 InstanceType InstanceTypeBasicEnableProtectionProviderSpecificInput `json:"instanceType,omitempty"` 6669} 6670 6671// MarshalJSON is the custom marshaler for InMageAzureV2EnableProtectionInput. 6672func (imavepi InMageAzureV2EnableProtectionInput) MarshalJSON() ([]byte, error) { 6673 imavepi.InstanceType = InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMageAzureV2 6674 objectMap := make(map[string]interface{}) 6675 if imavepi.MasterTargetID != nil { 6676 objectMap["masterTargetId"] = imavepi.MasterTargetID 6677 } 6678 if imavepi.ProcessServerID != nil { 6679 objectMap["processServerId"] = imavepi.ProcessServerID 6680 } 6681 if imavepi.StorageAccountID != nil { 6682 objectMap["storageAccountId"] = imavepi.StorageAccountID 6683 } 6684 if imavepi.RunAsAccountID != nil { 6685 objectMap["runAsAccountId"] = imavepi.RunAsAccountID 6686 } 6687 if imavepi.MultiVMGroupID != nil { 6688 objectMap["multiVmGroupId"] = imavepi.MultiVMGroupID 6689 } 6690 if imavepi.MultiVMGroupName != nil { 6691 objectMap["multiVmGroupName"] = imavepi.MultiVMGroupName 6692 } 6693 if imavepi.DisksToInclude != nil { 6694 objectMap["disksToInclude"] = imavepi.DisksToInclude 6695 } 6696 if imavepi.TargetAzureNetworkID != nil { 6697 objectMap["targetAzureNetworkId"] = imavepi.TargetAzureNetworkID 6698 } 6699 if imavepi.TargetAzureSubnetID != nil { 6700 objectMap["targetAzureSubnetId"] = imavepi.TargetAzureSubnetID 6701 } 6702 if imavepi.EnableRDPOnTargetOption != nil { 6703 objectMap["enableRDPOnTargetOption"] = imavepi.EnableRDPOnTargetOption 6704 } 6705 if imavepi.TargetAzureVMName != nil { 6706 objectMap["targetAzureVmName"] = imavepi.TargetAzureVMName 6707 } 6708 if imavepi.LogStorageAccountID != nil { 6709 objectMap["logStorageAccountId"] = imavepi.LogStorageAccountID 6710 } 6711 if imavepi.TargetAzureV1ResourceGroupID != nil { 6712 objectMap["targetAzureV1ResourceGroupId"] = imavepi.TargetAzureV1ResourceGroupID 6713 } 6714 if imavepi.TargetAzureV2ResourceGroupID != nil { 6715 objectMap["targetAzureV2ResourceGroupId"] = imavepi.TargetAzureV2ResourceGroupID 6716 } 6717 if imavepi.UseManagedDisks != nil { 6718 objectMap["useManagedDisks"] = imavepi.UseManagedDisks 6719 } 6720 if imavepi.InstanceType != "" { 6721 objectMap["instanceType"] = imavepi.InstanceType 6722 } 6723 return json.Marshal(objectMap) 6724} 6725 6726// AsHyperVReplicaAzureEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for InMageAzureV2EnableProtectionInput. 6727func (imavepi InMageAzureV2EnableProtectionInput) AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool) { 6728 return nil, false 6729} 6730 6731// AsSanEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for InMageAzureV2EnableProtectionInput. 6732func (imavepi InMageAzureV2EnableProtectionInput) AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool) { 6733 return nil, false 6734} 6735 6736// AsInMageAzureV2EnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for InMageAzureV2EnableProtectionInput. 6737func (imavepi InMageAzureV2EnableProtectionInput) AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool) { 6738 return &imavepi, true 6739} 6740 6741// AsInMageEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for InMageAzureV2EnableProtectionInput. 6742func (imavepi InMageAzureV2EnableProtectionInput) AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool) { 6743 return nil, false 6744} 6745 6746// AsA2AEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for InMageAzureV2EnableProtectionInput. 6747func (imavepi InMageAzureV2EnableProtectionInput) AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool) { 6748 return nil, false 6749} 6750 6751// AsEnableProtectionProviderSpecificInput is the BasicEnableProtectionProviderSpecificInput implementation for InMageAzureV2EnableProtectionInput. 6752func (imavepi InMageAzureV2EnableProtectionInput) AsEnableProtectionProviderSpecificInput() (*EnableProtectionProviderSpecificInput, bool) { 6753 return nil, false 6754} 6755 6756// AsBasicEnableProtectionProviderSpecificInput is the BasicEnableProtectionProviderSpecificInput implementation for InMageAzureV2EnableProtectionInput. 6757func (imavepi InMageAzureV2EnableProtectionInput) AsBasicEnableProtectionProviderSpecificInput() (BasicEnableProtectionProviderSpecificInput, bool) { 6758 return &imavepi, true 6759} 6760 6761// InMageAzureV2EventDetails model class for event details of a VMwareAzureV2 event. 6762type InMageAzureV2EventDetails struct { 6763 // EventType - InMage Event type. Takes one of the values of {InMageDataContract.InMageMonitoringEventType}. 6764 EventType *string `json:"eventType,omitempty"` 6765 // Category - InMage Event Category. 6766 Category *string `json:"category,omitempty"` 6767 // Component - InMage Event Component. 6768 Component *string `json:"component,omitempty"` 6769 // CorrectiveAction - Corrective Action string for the event. 6770 CorrectiveAction *string `json:"correctiveAction,omitempty"` 6771 // Details - InMage Event Details. 6772 Details *string `json:"details,omitempty"` 6773 // Summary - InMage Event Summary. 6774 Summary *string `json:"summary,omitempty"` 6775 // SiteName - VMware Site name. 6776 SiteName *string `json:"siteName,omitempty"` 6777 // InstanceType - Possible values include: 'InstanceTypeEventProviderSpecificDetails', 'InstanceTypeHyperVReplicaBaseEventDetails', 'InstanceTypeHyperVReplica2012', 'InstanceTypeHyperVReplica2012R2', 'InstanceTypeHyperVReplicaAzure', 'InstanceTypeA2A', 'InstanceTypeInMageAzureV2' 6778 InstanceType InstanceType `json:"instanceType,omitempty"` 6779} 6780 6781// MarshalJSON is the custom marshaler for InMageAzureV2EventDetails. 6782func (imaved InMageAzureV2EventDetails) MarshalJSON() ([]byte, error) { 6783 imaved.InstanceType = InstanceTypeInMageAzureV2 6784 objectMap := make(map[string]interface{}) 6785 if imaved.EventType != nil { 6786 objectMap["eventType"] = imaved.EventType 6787 } 6788 if imaved.Category != nil { 6789 objectMap["category"] = imaved.Category 6790 } 6791 if imaved.Component != nil { 6792 objectMap["component"] = imaved.Component 6793 } 6794 if imaved.CorrectiveAction != nil { 6795 objectMap["correctiveAction"] = imaved.CorrectiveAction 6796 } 6797 if imaved.Details != nil { 6798 objectMap["details"] = imaved.Details 6799 } 6800 if imaved.Summary != nil { 6801 objectMap["summary"] = imaved.Summary 6802 } 6803 if imaved.SiteName != nil { 6804 objectMap["siteName"] = imaved.SiteName 6805 } 6806 if imaved.InstanceType != "" { 6807 objectMap["instanceType"] = imaved.InstanceType 6808 } 6809 return json.Marshal(objectMap) 6810} 6811 6812// AsHyperVReplicaBaseEventDetails is the BasicEventProviderSpecificDetails implementation for InMageAzureV2EventDetails. 6813func (imaved InMageAzureV2EventDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) { 6814 return nil, false 6815} 6816 6817// AsHyperVReplica2012EventDetails is the BasicEventProviderSpecificDetails implementation for InMageAzureV2EventDetails. 6818func (imaved InMageAzureV2EventDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) { 6819 return nil, false 6820} 6821 6822// AsHyperVReplica2012R2EventDetails is the BasicEventProviderSpecificDetails implementation for InMageAzureV2EventDetails. 6823func (imaved InMageAzureV2EventDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) { 6824 return nil, false 6825} 6826 6827// AsHyperVReplicaAzureEventDetails is the BasicEventProviderSpecificDetails implementation for InMageAzureV2EventDetails. 6828func (imaved InMageAzureV2EventDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) { 6829 return nil, false 6830} 6831 6832// AsA2AEventDetails is the BasicEventProviderSpecificDetails implementation for InMageAzureV2EventDetails. 6833func (imaved InMageAzureV2EventDetails) AsA2AEventDetails() (*A2AEventDetails, bool) { 6834 return nil, false 6835} 6836 6837// AsInMageAzureV2EventDetails is the BasicEventProviderSpecificDetails implementation for InMageAzureV2EventDetails. 6838func (imaved InMageAzureV2EventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) { 6839 return &imaved, true 6840} 6841 6842// AsEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for InMageAzureV2EventDetails. 6843func (imaved InMageAzureV2EventDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) { 6844 return nil, false 6845} 6846 6847// AsBasicEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for InMageAzureV2EventDetails. 6848func (imaved InMageAzureV2EventDetails) AsBasicEventProviderSpecificDetails() (BasicEventProviderSpecificDetails, bool) { 6849 return &imaved, true 6850} 6851 6852// InMageAzureV2FailoverProviderInput inMageAzureV2 provider specific input for failover. 6853type InMageAzureV2FailoverProviderInput struct { 6854 // VaultLocation - Location of the vault. 6855 VaultLocation *string `json:"vaultLocation,omitempty"` 6856 // 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. 6857 RecoveryPointID *string `json:"recoveryPointId,omitempty"` 6858 // InstanceType - Possible values include: 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeProviderSpecificFailoverInput', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMage', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeA2A' 6859 InstanceType InstanceTypeBasicProviderSpecificFailoverInput `json:"instanceType,omitempty"` 6860} 6861 6862// MarshalJSON is the custom marshaler for InMageAzureV2FailoverProviderInput. 6863func (imavfpi InMageAzureV2FailoverProviderInput) MarshalJSON() ([]byte, error) { 6864 imavfpi.InstanceType = InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMageAzureV2 6865 objectMap := make(map[string]interface{}) 6866 if imavfpi.VaultLocation != nil { 6867 objectMap["vaultLocation"] = imavfpi.VaultLocation 6868 } 6869 if imavfpi.RecoveryPointID != nil { 6870 objectMap["recoveryPointId"] = imavfpi.RecoveryPointID 6871 } 6872 if imavfpi.InstanceType != "" { 6873 objectMap["instanceType"] = imavfpi.InstanceType 6874 } 6875 return json.Marshal(objectMap) 6876} 6877 6878// AsHyperVReplicaAzureFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for InMageAzureV2FailoverProviderInput. 6879func (imavfpi InMageAzureV2FailoverProviderInput) AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool) { 6880 return nil, false 6881} 6882 6883// AsHyperVReplicaAzureFailbackProviderInput is the BasicProviderSpecificFailoverInput implementation for InMageAzureV2FailoverProviderInput. 6884func (imavfpi InMageAzureV2FailoverProviderInput) AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool) { 6885 return nil, false 6886} 6887 6888// AsInMageAzureV2FailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for InMageAzureV2FailoverProviderInput. 6889func (imavfpi InMageAzureV2FailoverProviderInput) AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool) { 6890 return &imavfpi, true 6891} 6892 6893// AsInMageFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for InMageAzureV2FailoverProviderInput. 6894func (imavfpi InMageAzureV2FailoverProviderInput) AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool) { 6895 return nil, false 6896} 6897 6898// AsA2AFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for InMageAzureV2FailoverProviderInput. 6899func (imavfpi InMageAzureV2FailoverProviderInput) AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool) { 6900 return nil, false 6901} 6902 6903// AsProviderSpecificFailoverInput is the BasicProviderSpecificFailoverInput implementation for InMageAzureV2FailoverProviderInput. 6904func (imavfpi InMageAzureV2FailoverProviderInput) AsProviderSpecificFailoverInput() (*ProviderSpecificFailoverInput, bool) { 6905 return nil, false 6906} 6907 6908// AsBasicProviderSpecificFailoverInput is the BasicProviderSpecificFailoverInput implementation for InMageAzureV2FailoverProviderInput. 6909func (imavfpi InMageAzureV2FailoverProviderInput) AsBasicProviderSpecificFailoverInput() (BasicProviderSpecificFailoverInput, bool) { 6910 return &imavfpi, true 6911} 6912 6913// InMageAzureV2PolicyDetails inMage Azure v2 specific protection profile details. 6914type InMageAzureV2PolicyDetails struct { 6915 // CrashConsistentFrequencyInMinutes - The crash consistent snapshot frequency in minutes. 6916 CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"` 6917 // RecoveryPointThresholdInMinutes - The recovery point threshold in minutes. 6918 RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"` 6919 // RecoveryPointHistory - The duration in minutes until which the recovery points need to be stored. 6920 RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` 6921 // AppConsistentFrequencyInMinutes - The app consistent snapshot frequency in minutes. 6922 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` 6923 // MultiVMSyncStatus - A value indicating whether multi-VM sync has to be enabled. 6924 MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"` 6925 // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypePolicyProviderSpecificDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt' 6926 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"` 6927} 6928 6929// MarshalJSON is the custom marshaler for InMageAzureV2PolicyDetails. 6930func (imavpd InMageAzureV2PolicyDetails) MarshalJSON() ([]byte, error) { 6931 imavpd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2 6932 objectMap := make(map[string]interface{}) 6933 if imavpd.CrashConsistentFrequencyInMinutes != nil { 6934 objectMap["crashConsistentFrequencyInMinutes"] = imavpd.CrashConsistentFrequencyInMinutes 6935 } 6936 if imavpd.RecoveryPointThresholdInMinutes != nil { 6937 objectMap["recoveryPointThresholdInMinutes"] = imavpd.RecoveryPointThresholdInMinutes 6938 } 6939 if imavpd.RecoveryPointHistory != nil { 6940 objectMap["recoveryPointHistory"] = imavpd.RecoveryPointHistory 6941 } 6942 if imavpd.AppConsistentFrequencyInMinutes != nil { 6943 objectMap["appConsistentFrequencyInMinutes"] = imavpd.AppConsistentFrequencyInMinutes 6944 } 6945 if imavpd.MultiVMSyncStatus != nil { 6946 objectMap["multiVmSyncStatus"] = imavpd.MultiVMSyncStatus 6947 } 6948 if imavpd.InstanceType != "" { 6949 objectMap["instanceType"] = imavpd.InstanceType 6950 } 6951 return json.Marshal(objectMap) 6952} 6953 6954// AsHyperVReplicaAzurePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageAzureV2PolicyDetails. 6955func (imavpd InMageAzureV2PolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) { 6956 return nil, false 6957} 6958 6959// AsHyperVReplicaBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageAzureV2PolicyDetails. 6960func (imavpd InMageAzureV2PolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) { 6961 return nil, false 6962} 6963 6964// AsHyperVReplicaPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageAzureV2PolicyDetails. 6965func (imavpd InMageAzureV2PolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) { 6966 return nil, false 6967} 6968 6969// AsHyperVReplicaBluePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageAzureV2PolicyDetails. 6970func (imavpd InMageAzureV2PolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) { 6971 return nil, false 6972} 6973 6974// AsInMageBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageAzureV2PolicyDetails. 6975func (imavpd InMageAzureV2PolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) { 6976 return nil, false 6977} 6978 6979// AsInMageAzureV2PolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageAzureV2PolicyDetails. 6980func (imavpd InMageAzureV2PolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) { 6981 return &imavpd, true 6982} 6983 6984// AsInMagePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageAzureV2PolicyDetails. 6985func (imavpd InMageAzureV2PolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) { 6986 return nil, false 6987} 6988 6989// AsA2APolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageAzureV2PolicyDetails. 6990func (imavpd InMageAzureV2PolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) { 6991 return nil, false 6992} 6993 6994// AsRcmAzureMigrationPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageAzureV2PolicyDetails. 6995func (imavpd InMageAzureV2PolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) { 6996 return nil, false 6997} 6998 6999// AsVmwareCbtPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageAzureV2PolicyDetails. 7000func (imavpd InMageAzureV2PolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) { 7001 return nil, false 7002} 7003 7004// AsPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for InMageAzureV2PolicyDetails. 7005func (imavpd InMageAzureV2PolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) { 7006 return nil, false 7007} 7008 7009// AsBasicPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for InMageAzureV2PolicyDetails. 7010func (imavpd InMageAzureV2PolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) { 7011 return &imavpd, true 7012} 7013 7014// InMageAzureV2PolicyInput vMWare Azure specific protection profile Input. 7015type InMageAzureV2PolicyInput struct { 7016 // RecoveryPointThresholdInMinutes - The recovery point threshold in minutes. 7017 RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"` 7018 // RecoveryPointHistory - The duration in minutes until which the recovery points need to be stored. 7019 RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` 7020 // CrashConsistentFrequencyInMinutes - The crash consistent snapshot frequency (in minutes). 7021 CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"` 7022 // AppConsistentFrequencyInMinutes - The app consistent snapshot frequency (in minutes). 7023 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` 7024 // MultiVMSyncStatus - A value indicating whether multi-VM sync has to be enabled. Value should be 'Enabled' or 'Disabled'. Possible values include: 'Enable', 'Disable' 7025 MultiVMSyncStatus SetMultiVMSyncStatus `json:"multiVmSyncStatus,omitempty"` 7026 // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypePolicyProviderSpecificInput', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeVMwareCbt' 7027 InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"` 7028} 7029 7030// MarshalJSON is the custom marshaler for InMageAzureV2PolicyInput. 7031func (imavpi InMageAzureV2PolicyInput) MarshalJSON() ([]byte, error) { 7032 imavpi.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMageAzureV2 7033 objectMap := make(map[string]interface{}) 7034 if imavpi.RecoveryPointThresholdInMinutes != nil { 7035 objectMap["recoveryPointThresholdInMinutes"] = imavpi.RecoveryPointThresholdInMinutes 7036 } 7037 if imavpi.RecoveryPointHistory != nil { 7038 objectMap["recoveryPointHistory"] = imavpi.RecoveryPointHistory 7039 } 7040 if imavpi.CrashConsistentFrequencyInMinutes != nil { 7041 objectMap["crashConsistentFrequencyInMinutes"] = imavpi.CrashConsistentFrequencyInMinutes 7042 } 7043 if imavpi.AppConsistentFrequencyInMinutes != nil { 7044 objectMap["appConsistentFrequencyInMinutes"] = imavpi.AppConsistentFrequencyInMinutes 7045 } 7046 if imavpi.MultiVMSyncStatus != "" { 7047 objectMap["multiVmSyncStatus"] = imavpi.MultiVMSyncStatus 7048 } 7049 if imavpi.InstanceType != "" { 7050 objectMap["instanceType"] = imavpi.InstanceType 7051 } 7052 return json.Marshal(objectMap) 7053} 7054 7055// AsHyperVReplicaAzurePolicyInput is the BasicPolicyProviderSpecificInput implementation for InMageAzureV2PolicyInput. 7056func (imavpi InMageAzureV2PolicyInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) { 7057 return nil, false 7058} 7059 7060// AsHyperVReplicaPolicyInput is the BasicPolicyProviderSpecificInput implementation for InMageAzureV2PolicyInput. 7061func (imavpi InMageAzureV2PolicyInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) { 7062 return nil, false 7063} 7064 7065// AsHyperVReplicaBluePolicyInput is the BasicPolicyProviderSpecificInput implementation for InMageAzureV2PolicyInput. 7066func (imavpi InMageAzureV2PolicyInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) { 7067 return nil, false 7068} 7069 7070// AsInMageAzureV2PolicyInput is the BasicPolicyProviderSpecificInput implementation for InMageAzureV2PolicyInput. 7071func (imavpi InMageAzureV2PolicyInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) { 7072 return &imavpi, true 7073} 7074 7075// AsInMagePolicyInput is the BasicPolicyProviderSpecificInput implementation for InMageAzureV2PolicyInput. 7076func (imavpi InMageAzureV2PolicyInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) { 7077 return nil, false 7078} 7079 7080// AsA2APolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for InMageAzureV2PolicyInput. 7081func (imavpi InMageAzureV2PolicyInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) { 7082 return nil, false 7083} 7084 7085// AsVMwareCbtPolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for InMageAzureV2PolicyInput. 7086func (imavpi InMageAzureV2PolicyInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) { 7087 return nil, false 7088} 7089 7090// AsPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for InMageAzureV2PolicyInput. 7091func (imavpi InMageAzureV2PolicyInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) { 7092 return nil, false 7093} 7094 7095// AsBasicPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for InMageAzureV2PolicyInput. 7096func (imavpi InMageAzureV2PolicyInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) { 7097 return &imavpi, true 7098} 7099 7100// InMageAzureV2ProtectedDiskDetails inMageAzureV2 protected disk details. 7101type InMageAzureV2ProtectedDiskDetails struct { 7102 // DiskID - The disk id. 7103 DiskID *string `json:"diskId,omitempty"` 7104 // DiskName - The disk name. 7105 DiskName *string `json:"diskName,omitempty"` 7106 // ProtectionStage - The protection stage. 7107 ProtectionStage *string `json:"protectionStage,omitempty"` 7108 // HealthErrorCode - The health error code for the disk. 7109 HealthErrorCode *string `json:"healthErrorCode,omitempty"` 7110 // RpoInSeconds - The RPO in seconds. 7111 RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"` 7112 // ResyncRequired - A value indicating whether resync is required for this disk. 7113 ResyncRequired *string `json:"resyncRequired,omitempty"` 7114 // ResyncProgressPercentage - The resync progress percentage. 7115 ResyncProgressPercentage *int32 `json:"resyncProgressPercentage,omitempty"` 7116 // ResyncDurationInSeconds - The resync duration in seconds. 7117 ResyncDurationInSeconds *int64 `json:"resyncDurationInSeconds,omitempty"` 7118 // DiskCapacityInBytes - The disk capacity in bytes. 7119 DiskCapacityInBytes *int64 `json:"diskCapacityInBytes,omitempty"` 7120 // FileSystemCapacityInBytes - The disk file system capacity in bytes. 7121 FileSystemCapacityInBytes *int64 `json:"fileSystemCapacityInBytes,omitempty"` 7122 // SourceDataInMegaBytes - The source data transit in MB. 7123 SourceDataInMegaBytes *float64 `json:"sourceDataInMegaBytes,omitempty"` 7124 // PsDataInMegaBytes - The PS data transit in MB. 7125 PsDataInMegaBytes *float64 `json:"psDataInMegaBytes,omitempty"` 7126 // TargetDataInMegaBytes - The target data transit in MB. 7127 TargetDataInMegaBytes *float64 `json:"targetDataInMegaBytes,omitempty"` 7128 // DiskResized - A value indicating whether disk is resized. 7129 DiskResized *string `json:"diskResized,omitempty"` 7130 // LastRpoCalculatedTime - The last RPO calculated time. 7131 LastRpoCalculatedTime *date.Time `json:"lastRpoCalculatedTime,omitempty"` 7132} 7133 7134// InMageAzureV2RecoveryPointDetails inMage Azure V2 provider specific recovery point details. 7135type InMageAzureV2RecoveryPointDetails struct { 7136 // InstanceType - READ-ONLY; Gets the instance type. 7137 InstanceType *string `json:"instanceType,omitempty"` 7138 // IsMultiVMSyncPoint - A value indicating whether the recovery point is multi VM consistent. 7139 IsMultiVMSyncPoint *string `json:"isMultiVmSyncPoint,omitempty"` 7140 // Type - READ-ONLY; Gets the provider type. 7141 Type *string `json:"Type,omitempty"` 7142} 7143 7144// MarshalJSON is the custom marshaler for InMageAzureV2RecoveryPointDetails. 7145func (imavrpd InMageAzureV2RecoveryPointDetails) MarshalJSON() ([]byte, error) { 7146 objectMap := make(map[string]interface{}) 7147 if imavrpd.IsMultiVMSyncPoint != nil { 7148 objectMap["isMultiVmSyncPoint"] = imavrpd.IsMultiVMSyncPoint 7149 } 7150 return json.Marshal(objectMap) 7151} 7152 7153// InMageAzureV2ReplicationDetails inMageAzureV2 provider specific settings 7154type InMageAzureV2ReplicationDetails struct { 7155 // InfrastructureVMID - The infrastructure VM Id. 7156 InfrastructureVMID *string `json:"infrastructureVmId,omitempty"` 7157 // VCenterInfrastructureID - The vCenter infrastructure Id. 7158 VCenterInfrastructureID *string `json:"vCenterInfrastructureId,omitempty"` 7159 // ProtectionStage - The protection stage. 7160 ProtectionStage *string `json:"protectionStage,omitempty"` 7161 // VMID - The virtual machine Id. 7162 VMID *string `json:"vmId,omitempty"` 7163 // VMProtectionState - The protection state for the vm. 7164 VMProtectionState *string `json:"vmProtectionState,omitempty"` 7165 // VMProtectionStateDescription - The protection state description for the vm. 7166 VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` 7167 // ResyncProgressPercentage - The resync progress percentage. 7168 ResyncProgressPercentage *int32 `json:"resyncProgressPercentage,omitempty"` 7169 // RpoInSeconds - The RPO in seconds. 7170 RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"` 7171 // CompressedDataRateInMB - The compressed data change rate in MB. 7172 CompressedDataRateInMB *float64 `json:"compressedDataRateInMB,omitempty"` 7173 // UncompressedDataRateInMB - The uncompressed data change rate in MB. 7174 UncompressedDataRateInMB *float64 `json:"uncompressedDataRateInMB,omitempty"` 7175 // IPAddress - The source IP address. 7176 IPAddress *string `json:"ipAddress,omitempty"` 7177 // AgentVersion - The agent version. 7178 AgentVersion *string `json:"agentVersion,omitempty"` 7179 // IsAgentUpdateRequired - A value indicating whether installed agent needs to be updated. 7180 IsAgentUpdateRequired *string `json:"isAgentUpdateRequired,omitempty"` 7181 // IsRebootAfterUpdateRequired - A value indicating whether the source server requires a restart after update. 7182 IsRebootAfterUpdateRequired *string `json:"isRebootAfterUpdateRequired,omitempty"` 7183 // LastHeartbeat - The last heartbeat received from the source server. 7184 LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"` 7185 // ProcessServerID - The process server Id. 7186 ProcessServerID *string `json:"processServerId,omitempty"` 7187 // MultiVMGroupID - The multi vm group Id. 7188 MultiVMGroupID *string `json:"multiVmGroupId,omitempty"` 7189 // MultiVMGroupName - The multi vm group name. 7190 MultiVMGroupName *string `json:"multiVmGroupName,omitempty"` 7191 // MultiVMSyncStatus - A value indicating whether multi vm sync is enabled or disabled. 7192 MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"` 7193 // ProtectedDisks - The list of protected disks. 7194 ProtectedDisks *[]InMageAzureV2ProtectedDiskDetails `json:"protectedDisks,omitempty"` 7195 // DiskResized - A value indicating whether any disk is resized for this VM. 7196 DiskResized *string `json:"diskResized,omitempty"` 7197 // MasterTargetID - The master target Id. 7198 MasterTargetID *string `json:"masterTargetId,omitempty"` 7199 // SourceVMCPUCount - The CPU count of the VM on the primary side. 7200 SourceVMCPUCount *int32 `json:"sourceVmCPUCount,omitempty"` 7201 // SourceVMRAMSizeInMB - The RAM size of the VM on the primary side. 7202 SourceVMRAMSizeInMB *int32 `json:"sourceVmRAMSizeInMB,omitempty"` 7203 // OsType - The type of the OS on the VM. 7204 OsType *string `json:"osType,omitempty"` 7205 // VhdName - The OS disk VHD name. 7206 VhdName *string `json:"vhdName,omitempty"` 7207 // OsDiskID - The id of the disk containing the OS. 7208 OsDiskID *string `json:"osDiskId,omitempty"` 7209 // AzureVMDiskDetails - Azure VM Disk details. 7210 AzureVMDiskDetails *[]AzureVMDiskDetails `json:"azureVMDiskDetails,omitempty"` 7211 // RecoveryAzureVMName - Recovery Azure given name. 7212 RecoveryAzureVMName *string `json:"recoveryAzureVMName,omitempty"` 7213 // RecoveryAzureVMSize - The Recovery Azure VM size. 7214 RecoveryAzureVMSize *string `json:"recoveryAzureVMSize,omitempty"` 7215 // RecoveryAzureStorageAccount - The recovery Azure storage account. 7216 RecoveryAzureStorageAccount *string `json:"recoveryAzureStorageAccount,omitempty"` 7217 // 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. 7218 RecoveryAzureLogStorageAccountID *string `json:"recoveryAzureLogStorageAccountId,omitempty"` 7219 // VMNics - The PE Network details. 7220 VMNics *[]VMNicDetails `json:"vmNics,omitempty"` 7221 // SelectedRecoveryAzureNetworkID - The selected recovery azure network Id. 7222 SelectedRecoveryAzureNetworkID *string `json:"selectedRecoveryAzureNetworkId,omitempty"` 7223 // DiscoveryType - A value indicating the discovery type of the machine. Value can be vCenter or physical. 7224 DiscoveryType *string `json:"discoveryType,omitempty"` 7225 // EnableRDPOnTargetOption - The selected option to enable RDP\SSH on target vm after failover. String value of {SrsDataContract.EnableRDPOnTargetOption} enum. 7226 EnableRDPOnTargetOption *string `json:"enableRDPOnTargetOption,omitempty"` 7227 // Datastores - The data stores of the on-premise machine. Value can be list of strings that contain data store names. 7228 Datastores *[]string `json:"datastores,omitempty"` 7229 // 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. 7230 TargetVMID *string `json:"targetVmId,omitempty"` 7231 // RecoveryAzureResourceGroupID - The target resource group Id. 7232 RecoveryAzureResourceGroupID *string `json:"recoveryAzureResourceGroupId,omitempty"` 7233 // RecoveryAvailabilitySetID - The recovery availability set Id. 7234 RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"` 7235 // UseManagedDisks - A value indicating whether managed disks should be used during failover. 7236 UseManagedDisks *string `json:"useManagedDisks,omitempty"` 7237 // LicenseType - License Type of the VM to be used. 7238 LicenseType *string `json:"licenseType,omitempty"` 7239 // ValidationErrors - The validation errors of the on-premise machine Value can be list of validation errors. 7240 ValidationErrors *[]HealthError `json:"validationErrors,omitempty"` 7241 // LastRpoCalculatedTime - The last RPO calculated time. 7242 LastRpoCalculatedTime *date.Time `json:"lastRpoCalculatedTime,omitempty"` 7243 // LastUpdateReceivedTime - The last update time received from on-prem components. 7244 LastUpdateReceivedTime *date.Time `json:"lastUpdateReceivedTime,omitempty"` 7245 // ReplicaID - The replica id of the protected item. 7246 ReplicaID *string `json:"replicaId,omitempty"` 7247 // OsVersion - The OS Version of the protected item. 7248 OsVersion *string `json:"osVersion,omitempty"` 7249 // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeReplicationProviderSpecificSettings', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaBaseReplicationDetails', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMageAzureV2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMage', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeA2A' 7250 InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"` 7251} 7252 7253// MarshalJSON is the custom marshaler for InMageAzureV2ReplicationDetails. 7254func (imavrd InMageAzureV2ReplicationDetails) MarshalJSON() ([]byte, error) { 7255 imavrd.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMageAzureV2 7256 objectMap := make(map[string]interface{}) 7257 if imavrd.InfrastructureVMID != nil { 7258 objectMap["infrastructureVmId"] = imavrd.InfrastructureVMID 7259 } 7260 if imavrd.VCenterInfrastructureID != nil { 7261 objectMap["vCenterInfrastructureId"] = imavrd.VCenterInfrastructureID 7262 } 7263 if imavrd.ProtectionStage != nil { 7264 objectMap["protectionStage"] = imavrd.ProtectionStage 7265 } 7266 if imavrd.VMID != nil { 7267 objectMap["vmId"] = imavrd.VMID 7268 } 7269 if imavrd.VMProtectionState != nil { 7270 objectMap["vmProtectionState"] = imavrd.VMProtectionState 7271 } 7272 if imavrd.VMProtectionStateDescription != nil { 7273 objectMap["vmProtectionStateDescription"] = imavrd.VMProtectionStateDescription 7274 } 7275 if imavrd.ResyncProgressPercentage != nil { 7276 objectMap["resyncProgressPercentage"] = imavrd.ResyncProgressPercentage 7277 } 7278 if imavrd.RpoInSeconds != nil { 7279 objectMap["rpoInSeconds"] = imavrd.RpoInSeconds 7280 } 7281 if imavrd.CompressedDataRateInMB != nil { 7282 objectMap["compressedDataRateInMB"] = imavrd.CompressedDataRateInMB 7283 } 7284 if imavrd.UncompressedDataRateInMB != nil { 7285 objectMap["uncompressedDataRateInMB"] = imavrd.UncompressedDataRateInMB 7286 } 7287 if imavrd.IPAddress != nil { 7288 objectMap["ipAddress"] = imavrd.IPAddress 7289 } 7290 if imavrd.AgentVersion != nil { 7291 objectMap["agentVersion"] = imavrd.AgentVersion 7292 } 7293 if imavrd.IsAgentUpdateRequired != nil { 7294 objectMap["isAgentUpdateRequired"] = imavrd.IsAgentUpdateRequired 7295 } 7296 if imavrd.IsRebootAfterUpdateRequired != nil { 7297 objectMap["isRebootAfterUpdateRequired"] = imavrd.IsRebootAfterUpdateRequired 7298 } 7299 if imavrd.LastHeartbeat != nil { 7300 objectMap["lastHeartbeat"] = imavrd.LastHeartbeat 7301 } 7302 if imavrd.ProcessServerID != nil { 7303 objectMap["processServerId"] = imavrd.ProcessServerID 7304 } 7305 if imavrd.MultiVMGroupID != nil { 7306 objectMap["multiVmGroupId"] = imavrd.MultiVMGroupID 7307 } 7308 if imavrd.MultiVMGroupName != nil { 7309 objectMap["multiVmGroupName"] = imavrd.MultiVMGroupName 7310 } 7311 if imavrd.MultiVMSyncStatus != nil { 7312 objectMap["multiVmSyncStatus"] = imavrd.MultiVMSyncStatus 7313 } 7314 if imavrd.ProtectedDisks != nil { 7315 objectMap["protectedDisks"] = imavrd.ProtectedDisks 7316 } 7317 if imavrd.DiskResized != nil { 7318 objectMap["diskResized"] = imavrd.DiskResized 7319 } 7320 if imavrd.MasterTargetID != nil { 7321 objectMap["masterTargetId"] = imavrd.MasterTargetID 7322 } 7323 if imavrd.SourceVMCPUCount != nil { 7324 objectMap["sourceVmCPUCount"] = imavrd.SourceVMCPUCount 7325 } 7326 if imavrd.SourceVMRAMSizeInMB != nil { 7327 objectMap["sourceVmRAMSizeInMB"] = imavrd.SourceVMRAMSizeInMB 7328 } 7329 if imavrd.OsType != nil { 7330 objectMap["osType"] = imavrd.OsType 7331 } 7332 if imavrd.VhdName != nil { 7333 objectMap["vhdName"] = imavrd.VhdName 7334 } 7335 if imavrd.OsDiskID != nil { 7336 objectMap["osDiskId"] = imavrd.OsDiskID 7337 } 7338 if imavrd.AzureVMDiskDetails != nil { 7339 objectMap["azureVMDiskDetails"] = imavrd.AzureVMDiskDetails 7340 } 7341 if imavrd.RecoveryAzureVMName != nil { 7342 objectMap["recoveryAzureVMName"] = imavrd.RecoveryAzureVMName 7343 } 7344 if imavrd.RecoveryAzureVMSize != nil { 7345 objectMap["recoveryAzureVMSize"] = imavrd.RecoveryAzureVMSize 7346 } 7347 if imavrd.RecoveryAzureStorageAccount != nil { 7348 objectMap["recoveryAzureStorageAccount"] = imavrd.RecoveryAzureStorageAccount 7349 } 7350 if imavrd.RecoveryAzureLogStorageAccountID != nil { 7351 objectMap["recoveryAzureLogStorageAccountId"] = imavrd.RecoveryAzureLogStorageAccountID 7352 } 7353 if imavrd.VMNics != nil { 7354 objectMap["vmNics"] = imavrd.VMNics 7355 } 7356 if imavrd.SelectedRecoveryAzureNetworkID != nil { 7357 objectMap["selectedRecoveryAzureNetworkId"] = imavrd.SelectedRecoveryAzureNetworkID 7358 } 7359 if imavrd.DiscoveryType != nil { 7360 objectMap["discoveryType"] = imavrd.DiscoveryType 7361 } 7362 if imavrd.EnableRDPOnTargetOption != nil { 7363 objectMap["enableRDPOnTargetOption"] = imavrd.EnableRDPOnTargetOption 7364 } 7365 if imavrd.Datastores != nil { 7366 objectMap["datastores"] = imavrd.Datastores 7367 } 7368 if imavrd.TargetVMID != nil { 7369 objectMap["targetVmId"] = imavrd.TargetVMID 7370 } 7371 if imavrd.RecoveryAzureResourceGroupID != nil { 7372 objectMap["recoveryAzureResourceGroupId"] = imavrd.RecoveryAzureResourceGroupID 7373 } 7374 if imavrd.RecoveryAvailabilitySetID != nil { 7375 objectMap["recoveryAvailabilitySetId"] = imavrd.RecoveryAvailabilitySetID 7376 } 7377 if imavrd.UseManagedDisks != nil { 7378 objectMap["useManagedDisks"] = imavrd.UseManagedDisks 7379 } 7380 if imavrd.LicenseType != nil { 7381 objectMap["licenseType"] = imavrd.LicenseType 7382 } 7383 if imavrd.ValidationErrors != nil { 7384 objectMap["validationErrors"] = imavrd.ValidationErrors 7385 } 7386 if imavrd.LastRpoCalculatedTime != nil { 7387 objectMap["lastRpoCalculatedTime"] = imavrd.LastRpoCalculatedTime 7388 } 7389 if imavrd.LastUpdateReceivedTime != nil { 7390 objectMap["lastUpdateReceivedTime"] = imavrd.LastUpdateReceivedTime 7391 } 7392 if imavrd.ReplicaID != nil { 7393 objectMap["replicaId"] = imavrd.ReplicaID 7394 } 7395 if imavrd.OsVersion != nil { 7396 objectMap["osVersion"] = imavrd.OsVersion 7397 } 7398 if imavrd.InstanceType != "" { 7399 objectMap["instanceType"] = imavrd.InstanceType 7400 } 7401 return json.Marshal(objectMap) 7402} 7403 7404// AsHyperVReplicaBaseReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for InMageAzureV2ReplicationDetails. 7405func (imavrd InMageAzureV2ReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) { 7406 return nil, false 7407} 7408 7409// AsHyperVReplicaReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for InMageAzureV2ReplicationDetails. 7410func (imavrd InMageAzureV2ReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) { 7411 return nil, false 7412} 7413 7414// AsHyperVReplicaBlueReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for InMageAzureV2ReplicationDetails. 7415func (imavrd InMageAzureV2ReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) { 7416 return nil, false 7417} 7418 7419// AsHyperVReplicaAzureReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for InMageAzureV2ReplicationDetails. 7420func (imavrd InMageAzureV2ReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) { 7421 return nil, false 7422} 7423 7424// AsInMageAzureV2ReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for InMageAzureV2ReplicationDetails. 7425func (imavrd InMageAzureV2ReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) { 7426 return &imavrd, true 7427} 7428 7429// AsInMageReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for InMageAzureV2ReplicationDetails. 7430func (imavrd InMageAzureV2ReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) { 7431 return nil, false 7432} 7433 7434// AsA2AReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for InMageAzureV2ReplicationDetails. 7435func (imavrd InMageAzureV2ReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) { 7436 return nil, false 7437} 7438 7439// AsReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for InMageAzureV2ReplicationDetails. 7440func (imavrd InMageAzureV2ReplicationDetails) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) { 7441 return nil, false 7442} 7443 7444// AsBasicReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for InMageAzureV2ReplicationDetails. 7445func (imavrd InMageAzureV2ReplicationDetails) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) { 7446 return &imavrd, true 7447} 7448 7449// InMageAzureV2ReprotectInput inMageAzureV2 specific provider input. 7450type InMageAzureV2ReprotectInput struct { 7451 // MasterTargetID - The Master target Id. 7452 MasterTargetID *string `json:"masterTargetId,omitempty"` 7453 // ProcessServerID - The Process Server Id. 7454 ProcessServerID *string `json:"processServerId,omitempty"` 7455 // StorageAccountID - The storage account id. 7456 StorageAccountID *string `json:"storageAccountId,omitempty"` 7457 // RunAsAccountID - The CS account Id. 7458 RunAsAccountID *string `json:"runAsAccountId,omitempty"` 7459 // PolicyID - The Policy Id. 7460 PolicyID *string `json:"policyId,omitempty"` 7461 // LogStorageAccountID - The storage account to be used for logging during replication. 7462 LogStorageAccountID *string `json:"logStorageAccountId,omitempty"` 7463 // DisksToInclude - The disks to include list. 7464 DisksToInclude *[]string `json:"disksToInclude,omitempty"` 7465 // InstanceType - Possible values include: 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeReverseReplicationProviderSpecificInput', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeA2A' 7466 InstanceType InstanceTypeBasicReverseReplicationProviderSpecificInput `json:"instanceType,omitempty"` 7467} 7468 7469// MarshalJSON is the custom marshaler for InMageAzureV2ReprotectInput. 7470func (imavri InMageAzureV2ReprotectInput) MarshalJSON() ([]byte, error) { 7471 imavri.InstanceType = InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMageAzureV2 7472 objectMap := make(map[string]interface{}) 7473 if imavri.MasterTargetID != nil { 7474 objectMap["masterTargetId"] = imavri.MasterTargetID 7475 } 7476 if imavri.ProcessServerID != nil { 7477 objectMap["processServerId"] = imavri.ProcessServerID 7478 } 7479 if imavri.StorageAccountID != nil { 7480 objectMap["storageAccountId"] = imavri.StorageAccountID 7481 } 7482 if imavri.RunAsAccountID != nil { 7483 objectMap["runAsAccountId"] = imavri.RunAsAccountID 7484 } 7485 if imavri.PolicyID != nil { 7486 objectMap["policyId"] = imavri.PolicyID 7487 } 7488 if imavri.LogStorageAccountID != nil { 7489 objectMap["logStorageAccountId"] = imavri.LogStorageAccountID 7490 } 7491 if imavri.DisksToInclude != nil { 7492 objectMap["disksToInclude"] = imavri.DisksToInclude 7493 } 7494 if imavri.InstanceType != "" { 7495 objectMap["instanceType"] = imavri.InstanceType 7496 } 7497 return json.Marshal(objectMap) 7498} 7499 7500// AsHyperVReplicaAzureReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for InMageAzureV2ReprotectInput. 7501func (imavri InMageAzureV2ReprotectInput) AsHyperVReplicaAzureReprotectInput() (*HyperVReplicaAzureReprotectInput, bool) { 7502 return nil, false 7503} 7504 7505// AsInMageAzureV2ReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for InMageAzureV2ReprotectInput. 7506func (imavri InMageAzureV2ReprotectInput) AsInMageAzureV2ReprotectInput() (*InMageAzureV2ReprotectInput, bool) { 7507 return &imavri, true 7508} 7509 7510// AsInMageReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for InMageAzureV2ReprotectInput. 7511func (imavri InMageAzureV2ReprotectInput) AsInMageReprotectInput() (*InMageReprotectInput, bool) { 7512 return nil, false 7513} 7514 7515// AsA2AReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for InMageAzureV2ReprotectInput. 7516func (imavri InMageAzureV2ReprotectInput) AsA2AReprotectInput() (*A2AReprotectInput, bool) { 7517 return nil, false 7518} 7519 7520// AsReverseReplicationProviderSpecificInput is the BasicReverseReplicationProviderSpecificInput implementation for InMageAzureV2ReprotectInput. 7521func (imavri InMageAzureV2ReprotectInput) AsReverseReplicationProviderSpecificInput() (*ReverseReplicationProviderSpecificInput, bool) { 7522 return nil, false 7523} 7524 7525// AsBasicReverseReplicationProviderSpecificInput is the BasicReverseReplicationProviderSpecificInput implementation for InMageAzureV2ReprotectInput. 7526func (imavri InMageAzureV2ReprotectInput) AsBasicReverseReplicationProviderSpecificInput() (BasicReverseReplicationProviderSpecificInput, bool) { 7527 return &imavri, true 7528} 7529 7530// InMageAzureV2UpdateReplicationProtectedItemInput inMage Azure V2 input to update replication protected 7531// item. 7532type InMageAzureV2UpdateReplicationProtectedItemInput struct { 7533 // RecoveryAzureV1ResourceGroupID - The recovery Azure resource group Id for classic deployment. 7534 RecoveryAzureV1ResourceGroupID *string `json:"recoveryAzureV1ResourceGroupId,omitempty"` 7535 // RecoveryAzureV2ResourceGroupID - The recovery Azure resource group Id for resource manager deployment. 7536 RecoveryAzureV2ResourceGroupID *string `json:"recoveryAzureV2ResourceGroupId,omitempty"` 7537 // UseManagedDisks - A value indicating whether managed disks should be used during failover. 7538 UseManagedDisks *string `json:"useManagedDisks,omitempty"` 7539 // InstanceType - Possible values include: 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeUpdateReplicationProtectedItemProviderInput', 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeA2A' 7540 InstanceType InstanceTypeBasicUpdateReplicationProtectedItemProviderInput `json:"instanceType,omitempty"` 7541} 7542 7543// MarshalJSON is the custom marshaler for InMageAzureV2UpdateReplicationProtectedItemInput. 7544func (imavurpii InMageAzureV2UpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, error) { 7545 imavurpii.InstanceType = InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeInMageAzureV2 7546 objectMap := make(map[string]interface{}) 7547 if imavurpii.RecoveryAzureV1ResourceGroupID != nil { 7548 objectMap["recoveryAzureV1ResourceGroupId"] = imavurpii.RecoveryAzureV1ResourceGroupID 7549 } 7550 if imavurpii.RecoveryAzureV2ResourceGroupID != nil { 7551 objectMap["recoveryAzureV2ResourceGroupId"] = imavurpii.RecoveryAzureV2ResourceGroupID 7552 } 7553 if imavurpii.UseManagedDisks != nil { 7554 objectMap["useManagedDisks"] = imavurpii.UseManagedDisks 7555 } 7556 if imavurpii.InstanceType != "" { 7557 objectMap["instanceType"] = imavurpii.InstanceType 7558 } 7559 return json.Marshal(objectMap) 7560} 7561 7562// AsHyperVReplicaAzureUpdateReplicationProtectedItemInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for InMageAzureV2UpdateReplicationProtectedItemInput. 7563func (imavurpii InMageAzureV2UpdateReplicationProtectedItemInput) AsHyperVReplicaAzureUpdateReplicationProtectedItemInput() (*HyperVReplicaAzureUpdateReplicationProtectedItemInput, bool) { 7564 return nil, false 7565} 7566 7567// AsInMageAzureV2UpdateReplicationProtectedItemInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for InMageAzureV2UpdateReplicationProtectedItemInput. 7568func (imavurpii InMageAzureV2UpdateReplicationProtectedItemInput) AsInMageAzureV2UpdateReplicationProtectedItemInput() (*InMageAzureV2UpdateReplicationProtectedItemInput, bool) { 7569 return &imavurpii, true 7570} 7571 7572// AsA2AUpdateReplicationProtectedItemInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for InMageAzureV2UpdateReplicationProtectedItemInput. 7573func (imavurpii InMageAzureV2UpdateReplicationProtectedItemInput) AsA2AUpdateReplicationProtectedItemInput() (*A2AUpdateReplicationProtectedItemInput, bool) { 7574 return nil, false 7575} 7576 7577// AsUpdateReplicationProtectedItemProviderInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for InMageAzureV2UpdateReplicationProtectedItemInput. 7578func (imavurpii InMageAzureV2UpdateReplicationProtectedItemInput) AsUpdateReplicationProtectedItemProviderInput() (*UpdateReplicationProtectedItemProviderInput, bool) { 7579 return nil, false 7580} 7581 7582// AsBasicUpdateReplicationProtectedItemProviderInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for InMageAzureV2UpdateReplicationProtectedItemInput. 7583func (imavurpii InMageAzureV2UpdateReplicationProtectedItemInput) AsBasicUpdateReplicationProtectedItemProviderInput() (BasicUpdateReplicationProtectedItemProviderInput, bool) { 7584 return &imavurpii, true 7585} 7586 7587// InMageBasePolicyDetails base class for the policies of providers using InMage replication. 7588type InMageBasePolicyDetails struct { 7589 // RecoveryPointThresholdInMinutes - The recovery point threshold in minutes. 7590 RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"` 7591 // RecoveryPointHistory - The duration in minutes until which the recovery points need to be stored. 7592 RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` 7593 // AppConsistentFrequencyInMinutes - The app consistent snapshot frequency in minutes. 7594 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` 7595 // MultiVMSyncStatus - A value indicating whether multi-VM sync has to be enabled. 7596 MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"` 7597 // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypePolicyProviderSpecificDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt' 7598 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"` 7599} 7600 7601// MarshalJSON is the custom marshaler for InMageBasePolicyDetails. 7602func (imbpd InMageBasePolicyDetails) MarshalJSON() ([]byte, error) { 7603 imbpd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails 7604 objectMap := make(map[string]interface{}) 7605 if imbpd.RecoveryPointThresholdInMinutes != nil { 7606 objectMap["recoveryPointThresholdInMinutes"] = imbpd.RecoveryPointThresholdInMinutes 7607 } 7608 if imbpd.RecoveryPointHistory != nil { 7609 objectMap["recoveryPointHistory"] = imbpd.RecoveryPointHistory 7610 } 7611 if imbpd.AppConsistentFrequencyInMinutes != nil { 7612 objectMap["appConsistentFrequencyInMinutes"] = imbpd.AppConsistentFrequencyInMinutes 7613 } 7614 if imbpd.MultiVMSyncStatus != nil { 7615 objectMap["multiVmSyncStatus"] = imbpd.MultiVMSyncStatus 7616 } 7617 if imbpd.InstanceType != "" { 7618 objectMap["instanceType"] = imbpd.InstanceType 7619 } 7620 return json.Marshal(objectMap) 7621} 7622 7623// AsHyperVReplicaAzurePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageBasePolicyDetails. 7624func (imbpd InMageBasePolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) { 7625 return nil, false 7626} 7627 7628// AsHyperVReplicaBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageBasePolicyDetails. 7629func (imbpd InMageBasePolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) { 7630 return nil, false 7631} 7632 7633// AsHyperVReplicaPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageBasePolicyDetails. 7634func (imbpd InMageBasePolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) { 7635 return nil, false 7636} 7637 7638// AsHyperVReplicaBluePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageBasePolicyDetails. 7639func (imbpd InMageBasePolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) { 7640 return nil, false 7641} 7642 7643// AsInMageBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageBasePolicyDetails. 7644func (imbpd InMageBasePolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) { 7645 return &imbpd, true 7646} 7647 7648// AsInMageAzureV2PolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageBasePolicyDetails. 7649func (imbpd InMageBasePolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) { 7650 return nil, false 7651} 7652 7653// AsInMagePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageBasePolicyDetails. 7654func (imbpd InMageBasePolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) { 7655 return nil, false 7656} 7657 7658// AsA2APolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageBasePolicyDetails. 7659func (imbpd InMageBasePolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) { 7660 return nil, false 7661} 7662 7663// AsRcmAzureMigrationPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageBasePolicyDetails. 7664func (imbpd InMageBasePolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) { 7665 return nil, false 7666} 7667 7668// AsVmwareCbtPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageBasePolicyDetails. 7669func (imbpd InMageBasePolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) { 7670 return nil, false 7671} 7672 7673// AsPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for InMageBasePolicyDetails. 7674func (imbpd InMageBasePolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) { 7675 return nil, false 7676} 7677 7678// AsBasicPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for InMageBasePolicyDetails. 7679func (imbpd InMageBasePolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) { 7680 return &imbpd, true 7681} 7682 7683// InMageDisableProtectionProviderSpecificInput inMage disable protection provider specific input. 7684type InMageDisableProtectionProviderSpecificInput struct { 7685 // ReplicaVMDeletionStatus - A value indicating whether the replica VM should be destroyed or retained. Values from Delete and Retain. 7686 ReplicaVMDeletionStatus *string `json:"replicaVmDeletionStatus,omitempty"` 7687 // InstanceType - Possible values include: 'InstanceTypeDisableProtectionProviderSpecificInput', 'InstanceTypeInMage' 7688 InstanceType InstanceTypeBasicDisableProtectionProviderSpecificInput `json:"instanceType,omitempty"` 7689} 7690 7691// MarshalJSON is the custom marshaler for InMageDisableProtectionProviderSpecificInput. 7692func (imdppsi InMageDisableProtectionProviderSpecificInput) MarshalJSON() ([]byte, error) { 7693 imdppsi.InstanceType = InstanceTypeInMage 7694 objectMap := make(map[string]interface{}) 7695 if imdppsi.ReplicaVMDeletionStatus != nil { 7696 objectMap["replicaVmDeletionStatus"] = imdppsi.ReplicaVMDeletionStatus 7697 } 7698 if imdppsi.InstanceType != "" { 7699 objectMap["instanceType"] = imdppsi.InstanceType 7700 } 7701 return json.Marshal(objectMap) 7702} 7703 7704// AsInMageDisableProtectionProviderSpecificInput is the BasicDisableProtectionProviderSpecificInput implementation for InMageDisableProtectionProviderSpecificInput. 7705func (imdppsi InMageDisableProtectionProviderSpecificInput) AsInMageDisableProtectionProviderSpecificInput() (*InMageDisableProtectionProviderSpecificInput, bool) { 7706 return &imdppsi, true 7707} 7708 7709// AsDisableProtectionProviderSpecificInput is the BasicDisableProtectionProviderSpecificInput implementation for InMageDisableProtectionProviderSpecificInput. 7710func (imdppsi InMageDisableProtectionProviderSpecificInput) AsDisableProtectionProviderSpecificInput() (*DisableProtectionProviderSpecificInput, bool) { 7711 return nil, false 7712} 7713 7714// AsBasicDisableProtectionProviderSpecificInput is the BasicDisableProtectionProviderSpecificInput implementation for InMageDisableProtectionProviderSpecificInput. 7715func (imdppsi InMageDisableProtectionProviderSpecificInput) AsBasicDisableProtectionProviderSpecificInput() (BasicDisableProtectionProviderSpecificInput, bool) { 7716 return &imdppsi, true 7717} 7718 7719// InMageDiskDetails vMware/Physical specific Disk Details 7720type InMageDiskDetails struct { 7721 // DiskID - The disk Id. 7722 DiskID *string `json:"diskId,omitempty"` 7723 // DiskName - The disk name. 7724 DiskName *string `json:"diskName,omitempty"` 7725 // DiskSizeInMB - The disk size in MB. 7726 DiskSizeInMB *string `json:"diskSizeInMB,omitempty"` 7727 // DiskType - Whether disk is system disk or data disk. 7728 DiskType *string `json:"diskType,omitempty"` 7729 // DiskConfiguration - Whether disk is dynamic disk or basic disk. 7730 DiskConfiguration *string `json:"diskConfiguration,omitempty"` 7731 // VolumeList - Volumes of the disk. 7732 VolumeList *[]DiskVolumeDetails `json:"volumeList,omitempty"` 7733} 7734 7735// InMageDiskExclusionInput diskExclusionInput when doing enable protection of virtual machine in InMage 7736// provider. 7737type InMageDiskExclusionInput struct { 7738 // VolumeOptions - The volume label based option for disk exclusion. 7739 VolumeOptions *[]InMageVolumeExclusionOptions `json:"volumeOptions,omitempty"` 7740 // DiskSignatureOptions - The guest disk signature based option for disk exclusion. 7741 DiskSignatureOptions *[]InMageDiskSignatureExclusionOptions `json:"diskSignatureOptions,omitempty"` 7742} 7743 7744// InMageDiskSignatureExclusionOptions guest disk signature based disk exclusion option when doing enable 7745// protection of virtual machine in InMage provider. 7746type InMageDiskSignatureExclusionOptions struct { 7747 // DiskSignature - The guest signature of disk to be excluded from replication. 7748 DiskSignature *string `json:"diskSignature,omitempty"` 7749} 7750 7751// InMageEnableProtectionInput vMware Azure specific enable protection input. 7752type InMageEnableProtectionInput struct { 7753 // VMFriendlyName - The Vm Name. 7754 VMFriendlyName *string `json:"vmFriendlyName,omitempty"` 7755 // MasterTargetID - The Master Target Id. 7756 MasterTargetID *string `json:"masterTargetId,omitempty"` 7757 // ProcessServerID - The Process Server Id. 7758 ProcessServerID *string `json:"processServerId,omitempty"` 7759 // RetentionDrive - The retention drive to use on the MT. 7760 RetentionDrive *string `json:"retentionDrive,omitempty"` 7761 // RunAsAccountID - The CS account Id. 7762 RunAsAccountID *string `json:"runAsAccountId,omitempty"` 7763 // MultiVMGroupID - The multi vm group Id. 7764 MultiVMGroupID *string `json:"multiVmGroupId,omitempty"` 7765 // MultiVMGroupName - The multi vm group name. 7766 MultiVMGroupName *string `json:"multiVmGroupName,omitempty"` 7767 // DatastoreName - The target data store name. 7768 DatastoreName *string `json:"datastoreName,omitempty"` 7769 // DiskExclusionInput - The enable disk exclusion input. 7770 DiskExclusionInput *InMageDiskExclusionInput `json:"diskExclusionInput,omitempty"` 7771 // DisksToInclude - The disks to include list. 7772 DisksToInclude *[]string `json:"disksToInclude,omitempty"` 7773 // InstanceType - Possible values include: 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeEnableProtectionProviderSpecificInput', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeSan', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeA2A' 7774 InstanceType InstanceTypeBasicEnableProtectionProviderSpecificInput `json:"instanceType,omitempty"` 7775} 7776 7777// MarshalJSON is the custom marshaler for InMageEnableProtectionInput. 7778func (imepi InMageEnableProtectionInput) MarshalJSON() ([]byte, error) { 7779 imepi.InstanceType = InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMage 7780 objectMap := make(map[string]interface{}) 7781 if imepi.VMFriendlyName != nil { 7782 objectMap["vmFriendlyName"] = imepi.VMFriendlyName 7783 } 7784 if imepi.MasterTargetID != nil { 7785 objectMap["masterTargetId"] = imepi.MasterTargetID 7786 } 7787 if imepi.ProcessServerID != nil { 7788 objectMap["processServerId"] = imepi.ProcessServerID 7789 } 7790 if imepi.RetentionDrive != nil { 7791 objectMap["retentionDrive"] = imepi.RetentionDrive 7792 } 7793 if imepi.RunAsAccountID != nil { 7794 objectMap["runAsAccountId"] = imepi.RunAsAccountID 7795 } 7796 if imepi.MultiVMGroupID != nil { 7797 objectMap["multiVmGroupId"] = imepi.MultiVMGroupID 7798 } 7799 if imepi.MultiVMGroupName != nil { 7800 objectMap["multiVmGroupName"] = imepi.MultiVMGroupName 7801 } 7802 if imepi.DatastoreName != nil { 7803 objectMap["datastoreName"] = imepi.DatastoreName 7804 } 7805 if imepi.DiskExclusionInput != nil { 7806 objectMap["diskExclusionInput"] = imepi.DiskExclusionInput 7807 } 7808 if imepi.DisksToInclude != nil { 7809 objectMap["disksToInclude"] = imepi.DisksToInclude 7810 } 7811 if imepi.InstanceType != "" { 7812 objectMap["instanceType"] = imepi.InstanceType 7813 } 7814 return json.Marshal(objectMap) 7815} 7816 7817// AsHyperVReplicaAzureEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for InMageEnableProtectionInput. 7818func (imepi InMageEnableProtectionInput) AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool) { 7819 return nil, false 7820} 7821 7822// AsSanEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for InMageEnableProtectionInput. 7823func (imepi InMageEnableProtectionInput) AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool) { 7824 return nil, false 7825} 7826 7827// AsInMageAzureV2EnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for InMageEnableProtectionInput. 7828func (imepi InMageEnableProtectionInput) AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool) { 7829 return nil, false 7830} 7831 7832// AsInMageEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for InMageEnableProtectionInput. 7833func (imepi InMageEnableProtectionInput) AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool) { 7834 return &imepi, true 7835} 7836 7837// AsA2AEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for InMageEnableProtectionInput. 7838func (imepi InMageEnableProtectionInput) AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool) { 7839 return nil, false 7840} 7841 7842// AsEnableProtectionProviderSpecificInput is the BasicEnableProtectionProviderSpecificInput implementation for InMageEnableProtectionInput. 7843func (imepi InMageEnableProtectionInput) AsEnableProtectionProviderSpecificInput() (*EnableProtectionProviderSpecificInput, bool) { 7844 return nil, false 7845} 7846 7847// AsBasicEnableProtectionProviderSpecificInput is the BasicEnableProtectionProviderSpecificInput implementation for InMageEnableProtectionInput. 7848func (imepi InMageEnableProtectionInput) AsBasicEnableProtectionProviderSpecificInput() (BasicEnableProtectionProviderSpecificInput, bool) { 7849 return &imepi, true 7850} 7851 7852// InMageFailoverProviderInput provider specific input for InMage failover. 7853type InMageFailoverProviderInput struct { 7854 // 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' 7855 RecoveryPointType RecoveryPointType `json:"recoveryPointType,omitempty"` 7856 // 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. 7857 RecoveryPointID *string `json:"recoveryPointId,omitempty"` 7858 // InstanceType - Possible values include: 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeProviderSpecificFailoverInput', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMage', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeA2A' 7859 InstanceType InstanceTypeBasicProviderSpecificFailoverInput `json:"instanceType,omitempty"` 7860} 7861 7862// MarshalJSON is the custom marshaler for InMageFailoverProviderInput. 7863func (imfpi InMageFailoverProviderInput) MarshalJSON() ([]byte, error) { 7864 imfpi.InstanceType = InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMage 7865 objectMap := make(map[string]interface{}) 7866 if imfpi.RecoveryPointType != "" { 7867 objectMap["recoveryPointType"] = imfpi.RecoveryPointType 7868 } 7869 if imfpi.RecoveryPointID != nil { 7870 objectMap["recoveryPointId"] = imfpi.RecoveryPointID 7871 } 7872 if imfpi.InstanceType != "" { 7873 objectMap["instanceType"] = imfpi.InstanceType 7874 } 7875 return json.Marshal(objectMap) 7876} 7877 7878// AsHyperVReplicaAzureFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for InMageFailoverProviderInput. 7879func (imfpi InMageFailoverProviderInput) AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool) { 7880 return nil, false 7881} 7882 7883// AsHyperVReplicaAzureFailbackProviderInput is the BasicProviderSpecificFailoverInput implementation for InMageFailoverProviderInput. 7884func (imfpi InMageFailoverProviderInput) AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool) { 7885 return nil, false 7886} 7887 7888// AsInMageAzureV2FailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for InMageFailoverProviderInput. 7889func (imfpi InMageFailoverProviderInput) AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool) { 7890 return nil, false 7891} 7892 7893// AsInMageFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for InMageFailoverProviderInput. 7894func (imfpi InMageFailoverProviderInput) AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool) { 7895 return &imfpi, true 7896} 7897 7898// AsA2AFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for InMageFailoverProviderInput. 7899func (imfpi InMageFailoverProviderInput) AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool) { 7900 return nil, false 7901} 7902 7903// AsProviderSpecificFailoverInput is the BasicProviderSpecificFailoverInput implementation for InMageFailoverProviderInput. 7904func (imfpi InMageFailoverProviderInput) AsProviderSpecificFailoverInput() (*ProviderSpecificFailoverInput, bool) { 7905 return nil, false 7906} 7907 7908// AsBasicProviderSpecificFailoverInput is the BasicProviderSpecificFailoverInput implementation for InMageFailoverProviderInput. 7909func (imfpi InMageFailoverProviderInput) AsBasicProviderSpecificFailoverInput() (BasicProviderSpecificFailoverInput, bool) { 7910 return &imfpi, true 7911} 7912 7913// InMagePolicyDetails inMage specific protection profile details. 7914type InMagePolicyDetails struct { 7915 // RecoveryPointThresholdInMinutes - The recovery point threshold in minutes. 7916 RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"` 7917 // RecoveryPointHistory - The duration in minutes until which the recovery points need to be stored. 7918 RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` 7919 // AppConsistentFrequencyInMinutes - The app consistent snapshot frequency in minutes. 7920 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` 7921 // MultiVMSyncStatus - A value indicating whether multi-VM sync has to be enabled. 7922 MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"` 7923 // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypePolicyProviderSpecificDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt' 7924 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"` 7925} 7926 7927// MarshalJSON is the custom marshaler for InMagePolicyDetails. 7928func (impd InMagePolicyDetails) MarshalJSON() ([]byte, error) { 7929 impd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage 7930 objectMap := make(map[string]interface{}) 7931 if impd.RecoveryPointThresholdInMinutes != nil { 7932 objectMap["recoveryPointThresholdInMinutes"] = impd.RecoveryPointThresholdInMinutes 7933 } 7934 if impd.RecoveryPointHistory != nil { 7935 objectMap["recoveryPointHistory"] = impd.RecoveryPointHistory 7936 } 7937 if impd.AppConsistentFrequencyInMinutes != nil { 7938 objectMap["appConsistentFrequencyInMinutes"] = impd.AppConsistentFrequencyInMinutes 7939 } 7940 if impd.MultiVMSyncStatus != nil { 7941 objectMap["multiVmSyncStatus"] = impd.MultiVMSyncStatus 7942 } 7943 if impd.InstanceType != "" { 7944 objectMap["instanceType"] = impd.InstanceType 7945 } 7946 return json.Marshal(objectMap) 7947} 7948 7949// AsHyperVReplicaAzurePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMagePolicyDetails. 7950func (impd InMagePolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) { 7951 return nil, false 7952} 7953 7954// AsHyperVReplicaBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMagePolicyDetails. 7955func (impd InMagePolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) { 7956 return nil, false 7957} 7958 7959// AsHyperVReplicaPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMagePolicyDetails. 7960func (impd InMagePolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) { 7961 return nil, false 7962} 7963 7964// AsHyperVReplicaBluePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMagePolicyDetails. 7965func (impd InMagePolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) { 7966 return nil, false 7967} 7968 7969// AsInMageBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMagePolicyDetails. 7970func (impd InMagePolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) { 7971 return nil, false 7972} 7973 7974// AsInMageAzureV2PolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMagePolicyDetails. 7975func (impd InMagePolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) { 7976 return nil, false 7977} 7978 7979// AsInMagePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMagePolicyDetails. 7980func (impd InMagePolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) { 7981 return &impd, true 7982} 7983 7984// AsA2APolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMagePolicyDetails. 7985func (impd InMagePolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) { 7986 return nil, false 7987} 7988 7989// AsRcmAzureMigrationPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMagePolicyDetails. 7990func (impd InMagePolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) { 7991 return nil, false 7992} 7993 7994// AsVmwareCbtPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMagePolicyDetails. 7995func (impd InMagePolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) { 7996 return nil, false 7997} 7998 7999// AsPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for InMagePolicyDetails. 8000func (impd InMagePolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) { 8001 return nil, false 8002} 8003 8004// AsBasicPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for InMagePolicyDetails. 8005func (impd InMagePolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) { 8006 return &impd, true 8007} 8008 8009// InMagePolicyInput vMWare Azure specific protection profile Input. 8010type InMagePolicyInput struct { 8011 // RecoveryPointThresholdInMinutes - The recovery point threshold in minutes. 8012 RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"` 8013 // RecoveryPointHistory - The duration in minutes until which the recovery points need to be stored. 8014 RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` 8015 // AppConsistentFrequencyInMinutes - The app consistent snapshot frequency (in minutes). 8016 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` 8017 // MultiVMSyncStatus - A value indicating whether multi-VM sync has to be enabled. Value should be 'Enabled' or 'Disabled'. Possible values include: 'Enable', 'Disable' 8018 MultiVMSyncStatus SetMultiVMSyncStatus `json:"multiVmSyncStatus,omitempty"` 8019 // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypePolicyProviderSpecificInput', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeVMwareCbt' 8020 InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"` 8021} 8022 8023// MarshalJSON is the custom marshaler for InMagePolicyInput. 8024func (impi InMagePolicyInput) MarshalJSON() ([]byte, error) { 8025 impi.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMage 8026 objectMap := make(map[string]interface{}) 8027 if impi.RecoveryPointThresholdInMinutes != nil { 8028 objectMap["recoveryPointThresholdInMinutes"] = impi.RecoveryPointThresholdInMinutes 8029 } 8030 if impi.RecoveryPointHistory != nil { 8031 objectMap["recoveryPointHistory"] = impi.RecoveryPointHistory 8032 } 8033 if impi.AppConsistentFrequencyInMinutes != nil { 8034 objectMap["appConsistentFrequencyInMinutes"] = impi.AppConsistentFrequencyInMinutes 8035 } 8036 if impi.MultiVMSyncStatus != "" { 8037 objectMap["multiVmSyncStatus"] = impi.MultiVMSyncStatus 8038 } 8039 if impi.InstanceType != "" { 8040 objectMap["instanceType"] = impi.InstanceType 8041 } 8042 return json.Marshal(objectMap) 8043} 8044 8045// AsHyperVReplicaAzurePolicyInput is the BasicPolicyProviderSpecificInput implementation for InMagePolicyInput. 8046func (impi InMagePolicyInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) { 8047 return nil, false 8048} 8049 8050// AsHyperVReplicaPolicyInput is the BasicPolicyProviderSpecificInput implementation for InMagePolicyInput. 8051func (impi InMagePolicyInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) { 8052 return nil, false 8053} 8054 8055// AsHyperVReplicaBluePolicyInput is the BasicPolicyProviderSpecificInput implementation for InMagePolicyInput. 8056func (impi InMagePolicyInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) { 8057 return nil, false 8058} 8059 8060// AsInMageAzureV2PolicyInput is the BasicPolicyProviderSpecificInput implementation for InMagePolicyInput. 8061func (impi InMagePolicyInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) { 8062 return nil, false 8063} 8064 8065// AsInMagePolicyInput is the BasicPolicyProviderSpecificInput implementation for InMagePolicyInput. 8066func (impi InMagePolicyInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) { 8067 return &impi, true 8068} 8069 8070// AsA2APolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for InMagePolicyInput. 8071func (impi InMagePolicyInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) { 8072 return nil, false 8073} 8074 8075// AsVMwareCbtPolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for InMagePolicyInput. 8076func (impi InMagePolicyInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) { 8077 return nil, false 8078} 8079 8080// AsPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for InMagePolicyInput. 8081func (impi InMagePolicyInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) { 8082 return nil, false 8083} 8084 8085// AsBasicPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for InMagePolicyInput. 8086func (impi InMagePolicyInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) { 8087 return &impi, true 8088} 8089 8090// InMageProtectedDiskDetails inMage protected disk details. 8091type InMageProtectedDiskDetails struct { 8092 // DiskID - The disk id. 8093 DiskID *string `json:"diskId,omitempty"` 8094 // DiskName - The disk name. 8095 DiskName *string `json:"diskName,omitempty"` 8096 // ProtectionStage - The protection stage. 8097 ProtectionStage *string `json:"protectionStage,omitempty"` 8098 // HealthErrorCode - The health error code for the disk. 8099 HealthErrorCode *string `json:"healthErrorCode,omitempty"` 8100 // RpoInSeconds - The RPO in seconds. 8101 RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"` 8102 // ResyncRequired - A value indicating whether resync is required for this disk. 8103 ResyncRequired *string `json:"resyncRequired,omitempty"` 8104 // ResyncProgressPercentage - The resync progress percentage. 8105 ResyncProgressPercentage *int32 `json:"resyncProgressPercentage,omitempty"` 8106 // ResyncDurationInSeconds - The resync duration in seconds. 8107 ResyncDurationInSeconds *int64 `json:"resyncDurationInSeconds,omitempty"` 8108 // DiskCapacityInBytes - The disk capacity in bytes. 8109 DiskCapacityInBytes *int64 `json:"diskCapacityInBytes,omitempty"` 8110 // FileSystemCapacityInBytes - The file system capacity in bytes. 8111 FileSystemCapacityInBytes *int64 `json:"fileSystemCapacityInBytes,omitempty"` 8112 // SourceDataInMB - The source data transit in MB. 8113 SourceDataInMB *float64 `json:"sourceDataInMB,omitempty"` 8114 // PsDataInMB - The PS data transit in MB. 8115 PsDataInMB *float64 `json:"psDataInMB,omitempty"` 8116 // TargetDataInMB - The target data transit in MB. 8117 TargetDataInMB *float64 `json:"targetDataInMB,omitempty"` 8118 // DiskResized - A value indicating whether disk is resized. 8119 DiskResized *string `json:"diskResized,omitempty"` 8120 // LastRpoCalculatedTime - The last RPO calculated time. 8121 LastRpoCalculatedTime *date.Time `json:"lastRpoCalculatedTime,omitempty"` 8122} 8123 8124// InMageReplicationDetails inMage provider specific settings 8125type InMageReplicationDetails struct { 8126 // 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. 8127 ActiveSiteType *string `json:"activeSiteType,omitempty"` 8128 // SourceVMCPUCount - The CPU count of the VM on the primary side. 8129 SourceVMCPUCount *int32 `json:"sourceVmCPUCount,omitempty"` 8130 // SourceVMRAMSizeInMB - The RAM size of the VM on the primary side. 8131 SourceVMRAMSizeInMB *int32 `json:"sourceVmRAMSizeInMB,omitempty"` 8132 // OsDetails - The OS details. 8133 OsDetails *OSDiskDetails `json:"osDetails,omitempty"` 8134 // ProtectionStage - The protection stage. 8135 ProtectionStage *string `json:"protectionStage,omitempty"` 8136 // VMID - The virtual machine Id. 8137 VMID *string `json:"vmId,omitempty"` 8138 // VMProtectionState - The protection state for the vm. 8139 VMProtectionState *string `json:"vmProtectionState,omitempty"` 8140 // VMProtectionStateDescription - The protection state description for the vm. 8141 VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` 8142 // ResyncDetails - The resync details of the machine 8143 ResyncDetails *InitialReplicationDetails `json:"resyncDetails,omitempty"` 8144 // RetentionWindowStart - The retention window start time. 8145 RetentionWindowStart *date.Time `json:"retentionWindowStart,omitempty"` 8146 // RetentionWindowEnd - The retention window end time. 8147 RetentionWindowEnd *date.Time `json:"retentionWindowEnd,omitempty"` 8148 // CompressedDataRateInMB - The compressed data change rate in MB. 8149 CompressedDataRateInMB *float64 `json:"compressedDataRateInMB,omitempty"` 8150 // UncompressedDataRateInMB - The uncompressed data change rate in MB. 8151 UncompressedDataRateInMB *float64 `json:"uncompressedDataRateInMB,omitempty"` 8152 // RpoInSeconds - The RPO in seconds. 8153 RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"` 8154 // ProtectedDisks - The list of protected disks. 8155 ProtectedDisks *[]InMageProtectedDiskDetails `json:"protectedDisks,omitempty"` 8156 // IPAddress - The source IP address. 8157 IPAddress *string `json:"ipAddress,omitempty"` 8158 // LastHeartbeat - The last heartbeat received from the source server. 8159 LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"` 8160 // ProcessServerID - The process server Id. 8161 ProcessServerID *string `json:"processServerId,omitempty"` 8162 // MasterTargetID - The master target Id. 8163 MasterTargetID *string `json:"masterTargetId,omitempty"` 8164 // ConsistencyPoints - The collection of Consistency points. 8165 ConsistencyPoints map[string]*date.Time `json:"consistencyPoints"` 8166 // DiskResized - A value indicating whether any disk is resized for this VM. 8167 DiskResized *string `json:"diskResized,omitempty"` 8168 // RebootAfterUpdateStatus - A value indicating whether the source server requires a restart after update. 8169 RebootAfterUpdateStatus *string `json:"rebootAfterUpdateStatus,omitempty"` 8170 // MultiVMGroupID - The multi vm group Id, if any. 8171 MultiVMGroupID *string `json:"multiVmGroupId,omitempty"` 8172 // MultiVMGroupName - The multi vm group name, if any. 8173 MultiVMGroupName *string `json:"multiVmGroupName,omitempty"` 8174 // MultiVMSyncStatus - A value indicating whether the multi vm sync is enabled or disabled. 8175 MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"` 8176 // AgentDetails - The agent details. 8177 AgentDetails *InMageAgentDetails `json:"agentDetails,omitempty"` 8178 // VCenterInfrastructureID - The vCenter infrastructure Id. 8179 VCenterInfrastructureID *string `json:"vCenterInfrastructureId,omitempty"` 8180 // InfrastructureVMID - The infrastructure VM Id. 8181 InfrastructureVMID *string `json:"infrastructureVmId,omitempty"` 8182 // VMNics - The PE Network details. 8183 VMNics *[]VMNicDetails `json:"vmNics,omitempty"` 8184 // DiscoveryType - A value indicating the discovery type of the machine. 8185 DiscoveryType *string `json:"discoveryType,omitempty"` 8186 // AzureStorageAccountID - A value indicating the underlying Azure storage account. If the VM is not running in Azure, this value shall be set to null. 8187 AzureStorageAccountID *string `json:"azureStorageAccountId,omitempty"` 8188 // Datastores - The data stores of the on-premise machine Value can be list of strings that contain data store names 8189 Datastores *[]string `json:"datastores,omitempty"` 8190 // ValidationErrors - The validation errors of the on-premise machine Value can be list of validation errors 8191 ValidationErrors *[]HealthError `json:"validationErrors,omitempty"` 8192 // LastRpoCalculatedTime - The last RPO calculated time. 8193 LastRpoCalculatedTime *date.Time `json:"lastRpoCalculatedTime,omitempty"` 8194 // LastUpdateReceivedTime - The last update time received from on-prem components. 8195 LastUpdateReceivedTime *date.Time `json:"lastUpdateReceivedTime,omitempty"` 8196 // ReplicaID - The replica id of the protected item. 8197 ReplicaID *string `json:"replicaId,omitempty"` 8198 // OsVersion - The OS Version of the protected item. 8199 OsVersion *string `json:"osVersion,omitempty"` 8200 // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeReplicationProviderSpecificSettings', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaBaseReplicationDetails', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMageAzureV2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMage', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeA2A' 8201 InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"` 8202} 8203 8204// MarshalJSON is the custom marshaler for InMageReplicationDetails. 8205func (imrd InMageReplicationDetails) MarshalJSON() ([]byte, error) { 8206 imrd.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMage 8207 objectMap := make(map[string]interface{}) 8208 if imrd.ActiveSiteType != nil { 8209 objectMap["activeSiteType"] = imrd.ActiveSiteType 8210 } 8211 if imrd.SourceVMCPUCount != nil { 8212 objectMap["sourceVmCPUCount"] = imrd.SourceVMCPUCount 8213 } 8214 if imrd.SourceVMRAMSizeInMB != nil { 8215 objectMap["sourceVmRAMSizeInMB"] = imrd.SourceVMRAMSizeInMB 8216 } 8217 if imrd.OsDetails != nil { 8218 objectMap["osDetails"] = imrd.OsDetails 8219 } 8220 if imrd.ProtectionStage != nil { 8221 objectMap["protectionStage"] = imrd.ProtectionStage 8222 } 8223 if imrd.VMID != nil { 8224 objectMap["vmId"] = imrd.VMID 8225 } 8226 if imrd.VMProtectionState != nil { 8227 objectMap["vmProtectionState"] = imrd.VMProtectionState 8228 } 8229 if imrd.VMProtectionStateDescription != nil { 8230 objectMap["vmProtectionStateDescription"] = imrd.VMProtectionStateDescription 8231 } 8232 if imrd.ResyncDetails != nil { 8233 objectMap["resyncDetails"] = imrd.ResyncDetails 8234 } 8235 if imrd.RetentionWindowStart != nil { 8236 objectMap["retentionWindowStart"] = imrd.RetentionWindowStart 8237 } 8238 if imrd.RetentionWindowEnd != nil { 8239 objectMap["retentionWindowEnd"] = imrd.RetentionWindowEnd 8240 } 8241 if imrd.CompressedDataRateInMB != nil { 8242 objectMap["compressedDataRateInMB"] = imrd.CompressedDataRateInMB 8243 } 8244 if imrd.UncompressedDataRateInMB != nil { 8245 objectMap["uncompressedDataRateInMB"] = imrd.UncompressedDataRateInMB 8246 } 8247 if imrd.RpoInSeconds != nil { 8248 objectMap["rpoInSeconds"] = imrd.RpoInSeconds 8249 } 8250 if imrd.ProtectedDisks != nil { 8251 objectMap["protectedDisks"] = imrd.ProtectedDisks 8252 } 8253 if imrd.IPAddress != nil { 8254 objectMap["ipAddress"] = imrd.IPAddress 8255 } 8256 if imrd.LastHeartbeat != nil { 8257 objectMap["lastHeartbeat"] = imrd.LastHeartbeat 8258 } 8259 if imrd.ProcessServerID != nil { 8260 objectMap["processServerId"] = imrd.ProcessServerID 8261 } 8262 if imrd.MasterTargetID != nil { 8263 objectMap["masterTargetId"] = imrd.MasterTargetID 8264 } 8265 if imrd.ConsistencyPoints != nil { 8266 objectMap["consistencyPoints"] = imrd.ConsistencyPoints 8267 } 8268 if imrd.DiskResized != nil { 8269 objectMap["diskResized"] = imrd.DiskResized 8270 } 8271 if imrd.RebootAfterUpdateStatus != nil { 8272 objectMap["rebootAfterUpdateStatus"] = imrd.RebootAfterUpdateStatus 8273 } 8274 if imrd.MultiVMGroupID != nil { 8275 objectMap["multiVmGroupId"] = imrd.MultiVMGroupID 8276 } 8277 if imrd.MultiVMGroupName != nil { 8278 objectMap["multiVmGroupName"] = imrd.MultiVMGroupName 8279 } 8280 if imrd.MultiVMSyncStatus != nil { 8281 objectMap["multiVmSyncStatus"] = imrd.MultiVMSyncStatus 8282 } 8283 if imrd.AgentDetails != nil { 8284 objectMap["agentDetails"] = imrd.AgentDetails 8285 } 8286 if imrd.VCenterInfrastructureID != nil { 8287 objectMap["vCenterInfrastructureId"] = imrd.VCenterInfrastructureID 8288 } 8289 if imrd.InfrastructureVMID != nil { 8290 objectMap["infrastructureVmId"] = imrd.InfrastructureVMID 8291 } 8292 if imrd.VMNics != nil { 8293 objectMap["vmNics"] = imrd.VMNics 8294 } 8295 if imrd.DiscoveryType != nil { 8296 objectMap["discoveryType"] = imrd.DiscoveryType 8297 } 8298 if imrd.AzureStorageAccountID != nil { 8299 objectMap["azureStorageAccountId"] = imrd.AzureStorageAccountID 8300 } 8301 if imrd.Datastores != nil { 8302 objectMap["datastores"] = imrd.Datastores 8303 } 8304 if imrd.ValidationErrors != nil { 8305 objectMap["validationErrors"] = imrd.ValidationErrors 8306 } 8307 if imrd.LastRpoCalculatedTime != nil { 8308 objectMap["lastRpoCalculatedTime"] = imrd.LastRpoCalculatedTime 8309 } 8310 if imrd.LastUpdateReceivedTime != nil { 8311 objectMap["lastUpdateReceivedTime"] = imrd.LastUpdateReceivedTime 8312 } 8313 if imrd.ReplicaID != nil { 8314 objectMap["replicaId"] = imrd.ReplicaID 8315 } 8316 if imrd.OsVersion != nil { 8317 objectMap["osVersion"] = imrd.OsVersion 8318 } 8319 if imrd.InstanceType != "" { 8320 objectMap["instanceType"] = imrd.InstanceType 8321 } 8322 return json.Marshal(objectMap) 8323} 8324 8325// AsHyperVReplicaBaseReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for InMageReplicationDetails. 8326func (imrd InMageReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) { 8327 return nil, false 8328} 8329 8330// AsHyperVReplicaReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for InMageReplicationDetails. 8331func (imrd InMageReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) { 8332 return nil, false 8333} 8334 8335// AsHyperVReplicaBlueReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for InMageReplicationDetails. 8336func (imrd InMageReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) { 8337 return nil, false 8338} 8339 8340// AsHyperVReplicaAzureReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for InMageReplicationDetails. 8341func (imrd InMageReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) { 8342 return nil, false 8343} 8344 8345// AsInMageAzureV2ReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for InMageReplicationDetails. 8346func (imrd InMageReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) { 8347 return nil, false 8348} 8349 8350// AsInMageReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for InMageReplicationDetails. 8351func (imrd InMageReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) { 8352 return &imrd, true 8353} 8354 8355// AsA2AReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for InMageReplicationDetails. 8356func (imrd InMageReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) { 8357 return nil, false 8358} 8359 8360// AsReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for InMageReplicationDetails. 8361func (imrd InMageReplicationDetails) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) { 8362 return nil, false 8363} 8364 8365// AsBasicReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for InMageReplicationDetails. 8366func (imrd InMageReplicationDetails) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) { 8367 return &imrd, true 8368} 8369 8370// InMageReprotectInput inMageAzureV2 specific provider input. 8371type InMageReprotectInput struct { 8372 // MasterTargetID - The Master Target Id. 8373 MasterTargetID *string `json:"masterTargetId,omitempty"` 8374 // ProcessServerID - The Process Server Id. 8375 ProcessServerID *string `json:"processServerId,omitempty"` 8376 // RetentionDrive - The retention drive to use on the MT. 8377 RetentionDrive *string `json:"retentionDrive,omitempty"` 8378 // RunAsAccountID - The CS account Id. 8379 RunAsAccountID *string `json:"runAsAccountId,omitempty"` 8380 // DatastoreName - The target data store name. 8381 DatastoreName *string `json:"datastoreName,omitempty"` 8382 // DiskExclusionInput - The enable disk exclusion input. 8383 DiskExclusionInput *InMageDiskExclusionInput `json:"diskExclusionInput,omitempty"` 8384 // ProfileID - The Policy Id. 8385 ProfileID *string `json:"profileId,omitempty"` 8386 // DisksToInclude - The disks to include list. 8387 DisksToInclude *[]string `json:"disksToInclude,omitempty"` 8388 // InstanceType - Possible values include: 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeReverseReplicationProviderSpecificInput', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeA2A' 8389 InstanceType InstanceTypeBasicReverseReplicationProviderSpecificInput `json:"instanceType,omitempty"` 8390} 8391 8392// MarshalJSON is the custom marshaler for InMageReprotectInput. 8393func (imri InMageReprotectInput) MarshalJSON() ([]byte, error) { 8394 imri.InstanceType = InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMage 8395 objectMap := make(map[string]interface{}) 8396 if imri.MasterTargetID != nil { 8397 objectMap["masterTargetId"] = imri.MasterTargetID 8398 } 8399 if imri.ProcessServerID != nil { 8400 objectMap["processServerId"] = imri.ProcessServerID 8401 } 8402 if imri.RetentionDrive != nil { 8403 objectMap["retentionDrive"] = imri.RetentionDrive 8404 } 8405 if imri.RunAsAccountID != nil { 8406 objectMap["runAsAccountId"] = imri.RunAsAccountID 8407 } 8408 if imri.DatastoreName != nil { 8409 objectMap["datastoreName"] = imri.DatastoreName 8410 } 8411 if imri.DiskExclusionInput != nil { 8412 objectMap["diskExclusionInput"] = imri.DiskExclusionInput 8413 } 8414 if imri.ProfileID != nil { 8415 objectMap["profileId"] = imri.ProfileID 8416 } 8417 if imri.DisksToInclude != nil { 8418 objectMap["disksToInclude"] = imri.DisksToInclude 8419 } 8420 if imri.InstanceType != "" { 8421 objectMap["instanceType"] = imri.InstanceType 8422 } 8423 return json.Marshal(objectMap) 8424} 8425 8426// AsHyperVReplicaAzureReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for InMageReprotectInput. 8427func (imri InMageReprotectInput) AsHyperVReplicaAzureReprotectInput() (*HyperVReplicaAzureReprotectInput, bool) { 8428 return nil, false 8429} 8430 8431// AsInMageAzureV2ReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for InMageReprotectInput. 8432func (imri InMageReprotectInput) AsInMageAzureV2ReprotectInput() (*InMageAzureV2ReprotectInput, bool) { 8433 return nil, false 8434} 8435 8436// AsInMageReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for InMageReprotectInput. 8437func (imri InMageReprotectInput) AsInMageReprotectInput() (*InMageReprotectInput, bool) { 8438 return &imri, true 8439} 8440 8441// AsA2AReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for InMageReprotectInput. 8442func (imri InMageReprotectInput) AsA2AReprotectInput() (*A2AReprotectInput, bool) { 8443 return nil, false 8444} 8445 8446// AsReverseReplicationProviderSpecificInput is the BasicReverseReplicationProviderSpecificInput implementation for InMageReprotectInput. 8447func (imri InMageReprotectInput) AsReverseReplicationProviderSpecificInput() (*ReverseReplicationProviderSpecificInput, bool) { 8448 return nil, false 8449} 8450 8451// AsBasicReverseReplicationProviderSpecificInput is the BasicReverseReplicationProviderSpecificInput implementation for InMageReprotectInput. 8452func (imri InMageReprotectInput) AsBasicReverseReplicationProviderSpecificInput() (BasicReverseReplicationProviderSpecificInput, bool) { 8453 return &imri, true 8454} 8455 8456// InMageVolumeExclusionOptions guest disk signature based disk exclusion option when doing enable 8457// protection of virtual machine in InMage provider. 8458type InMageVolumeExclusionOptions struct { 8459 // VolumeLabel - The volume label. The disk having any volume with this label will be excluded from replication. 8460 VolumeLabel *string `json:"volumeLabel,omitempty"` 8461 // 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. 8462 OnlyExcludeIfSingleVolume *string `json:"OnlyExcludeIfSingleVolume,omitempty"` 8463} 8464 8465// InputEndpoint azure VM input endpoint details. 8466type InputEndpoint struct { 8467 // EndpointName - The input endpoint name. 8468 EndpointName *string `json:"endpointName,omitempty"` 8469 // PrivatePort - The input endpoint private port. 8470 PrivatePort *int32 `json:"privatePort,omitempty"` 8471 // PublicPort - The input endpoint public port. 8472 PublicPort *int32 `json:"publicPort,omitempty"` 8473 // Protocol - The input endpoint protocol. 8474 Protocol *string `json:"protocol,omitempty"` 8475} 8476 8477// Job job details. 8478type Job struct { 8479 autorest.Response `json:"-"` 8480 // Properties - The custom data. 8481 Properties *JobProperties `json:"properties,omitempty"` 8482 // Status - The status of the Job. ARM expects the terminal status to be one of (1) Succeeded, (2) Failed or (3) Canceled. All other values imply that the operation is still running / being applied. 8483 Status *string `json:"status,omitempty"` 8484 // Error - The error. 8485 Error *ARMException `json:"error,omitempty"` 8486 // StartTime - The start time. 8487 StartTime *string `json:"startTime,omitempty"` 8488 // EndTime - The start time. 8489 EndTime *string `json:"endTime,omitempty"` 8490 // ID - READ-ONLY; Resource Id 8491 ID *string `json:"id,omitempty"` 8492 // Name - READ-ONLY; Resource Name 8493 Name *string `json:"name,omitempty"` 8494 // Type - READ-ONLY; Resource Type 8495 Type *string `json:"type,omitempty"` 8496 // Location - Resource Location 8497 Location *string `json:"location,omitempty"` 8498} 8499 8500// MarshalJSON is the custom marshaler for Job. 8501func (j Job) MarshalJSON() ([]byte, error) { 8502 objectMap := make(map[string]interface{}) 8503 if j.Properties != nil { 8504 objectMap["properties"] = j.Properties 8505 } 8506 if j.Status != nil { 8507 objectMap["status"] = j.Status 8508 } 8509 if j.Error != nil { 8510 objectMap["error"] = j.Error 8511 } 8512 if j.StartTime != nil { 8513 objectMap["startTime"] = j.StartTime 8514 } 8515 if j.EndTime != nil { 8516 objectMap["endTime"] = j.EndTime 8517 } 8518 if j.Location != nil { 8519 objectMap["location"] = j.Location 8520 } 8521 return json.Marshal(objectMap) 8522} 8523 8524// JobCollection collection of jobs. 8525type JobCollection struct { 8526 autorest.Response `json:"-"` 8527 // Value - The list of jobs. 8528 Value *[]Job `json:"value,omitempty"` 8529 // NextLink - The value of next link. 8530 NextLink *string `json:"nextLink,omitempty"` 8531} 8532 8533// JobCollectionIterator provides access to a complete listing of Job values. 8534type JobCollectionIterator struct { 8535 i int 8536 page JobCollectionPage 8537} 8538 8539// NextWithContext advances to the next value. If there was an error making 8540// the request the iterator does not advance and the error is returned. 8541func (iter *JobCollectionIterator) NextWithContext(ctx context.Context) (err error) { 8542 if tracing.IsEnabled() { 8543 ctx = tracing.StartSpan(ctx, fqdn+"/JobCollectionIterator.NextWithContext") 8544 defer func() { 8545 sc := -1 8546 if iter.Response().Response.Response != nil { 8547 sc = iter.Response().Response.Response.StatusCode 8548 } 8549 tracing.EndSpan(ctx, sc, err) 8550 }() 8551 } 8552 iter.i++ 8553 if iter.i < len(iter.page.Values()) { 8554 return nil 8555 } 8556 err = iter.page.NextWithContext(ctx) 8557 if err != nil { 8558 iter.i-- 8559 return err 8560 } 8561 iter.i = 0 8562 return nil 8563} 8564 8565// Next advances to the next value. If there was an error making 8566// the request the iterator does not advance and the error is returned. 8567// Deprecated: Use NextWithContext() instead. 8568func (iter *JobCollectionIterator) Next() error { 8569 return iter.NextWithContext(context.Background()) 8570} 8571 8572// NotDone returns true if the enumeration should be started or is not yet complete. 8573func (iter JobCollectionIterator) NotDone() bool { 8574 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 8575} 8576 8577// Response returns the raw server response from the last page request. 8578func (iter JobCollectionIterator) Response() JobCollection { 8579 return iter.page.Response() 8580} 8581 8582// Value returns the current value or a zero-initialized value if the 8583// iterator has advanced beyond the end of the collection. 8584func (iter JobCollectionIterator) Value() Job { 8585 if !iter.page.NotDone() { 8586 return Job{} 8587 } 8588 return iter.page.Values()[iter.i] 8589} 8590 8591// Creates a new instance of the JobCollectionIterator type. 8592func NewJobCollectionIterator(page JobCollectionPage) JobCollectionIterator { 8593 return JobCollectionIterator{page: page} 8594} 8595 8596// IsEmpty returns true if the ListResult contains no values. 8597func (jc JobCollection) IsEmpty() bool { 8598 return jc.Value == nil || len(*jc.Value) == 0 8599} 8600 8601// hasNextLink returns true if the NextLink is not empty. 8602func (jc JobCollection) hasNextLink() bool { 8603 return jc.NextLink != nil && len(*jc.NextLink) != 0 8604} 8605 8606// jobCollectionPreparer prepares a request to retrieve the next set of results. 8607// It returns nil if no more results exist. 8608func (jc JobCollection) jobCollectionPreparer(ctx context.Context) (*http.Request, error) { 8609 if !jc.hasNextLink() { 8610 return nil, nil 8611 } 8612 return autorest.Prepare((&http.Request{}).WithContext(ctx), 8613 autorest.AsJSON(), 8614 autorest.AsGet(), 8615 autorest.WithBaseURL(to.String(jc.NextLink))) 8616} 8617 8618// JobCollectionPage contains a page of Job values. 8619type JobCollectionPage struct { 8620 fn func(context.Context, JobCollection) (JobCollection, error) 8621 jc JobCollection 8622} 8623 8624// NextWithContext advances to the next page of values. If there was an error making 8625// the request the page does not advance and the error is returned. 8626func (page *JobCollectionPage) NextWithContext(ctx context.Context) (err error) { 8627 if tracing.IsEnabled() { 8628 ctx = tracing.StartSpan(ctx, fqdn+"/JobCollectionPage.NextWithContext") 8629 defer func() { 8630 sc := -1 8631 if page.Response().Response.Response != nil { 8632 sc = page.Response().Response.Response.StatusCode 8633 } 8634 tracing.EndSpan(ctx, sc, err) 8635 }() 8636 } 8637 for { 8638 next, err := page.fn(ctx, page.jc) 8639 if err != nil { 8640 return err 8641 } 8642 page.jc = next 8643 if !next.hasNextLink() || !next.IsEmpty() { 8644 break 8645 } 8646 } 8647 return nil 8648} 8649 8650// Next advances to the next page of values. If there was an error making 8651// the request the page does not advance and the error is returned. 8652// Deprecated: Use NextWithContext() instead. 8653func (page *JobCollectionPage) Next() error { 8654 return page.NextWithContext(context.Background()) 8655} 8656 8657// NotDone returns true if the page enumeration should be started or is not yet complete. 8658func (page JobCollectionPage) NotDone() bool { 8659 return !page.jc.IsEmpty() 8660} 8661 8662// Response returns the raw server response from the last page request. 8663func (page JobCollectionPage) Response() JobCollection { 8664 return page.jc 8665} 8666 8667// Values returns the slice of values for the current page or nil if there are no values. 8668func (page JobCollectionPage) Values() []Job { 8669 if page.jc.IsEmpty() { 8670 return nil 8671 } 8672 return *page.jc.Value 8673} 8674 8675// Creates a new instance of the JobCollectionPage type. 8676func NewJobCollectionPage(cur JobCollection, getNextPage func(context.Context, JobCollection) (JobCollection, error)) JobCollectionPage { 8677 return JobCollectionPage{ 8678 fn: getNextPage, 8679 jc: cur, 8680 } 8681} 8682 8683// BasicJobDetails job details based on specific job type. 8684type BasicJobDetails interface { 8685 AsAsrJobDetails() (*AsrJobDetails, bool) 8686 AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool) 8687 AsFailoverJobDetails() (*FailoverJobDetails, bool) 8688 AsExportJobDetails() (*ExportJobDetails, bool) 8689 AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool) 8690 AsJobDetails() (*JobDetails, bool) 8691} 8692 8693// JobDetails job details based on specific job type. 8694type JobDetails struct { 8695 // AffectedObjectDetails - The affected object properties like source server, source cloud, target server, target cloud etc. based on the workflow object details. 8696 AffectedObjectDetails map[string]*string `json:"affectedObjectDetails"` 8697 // InstanceType - Possible values include: 'InstanceTypeJobDetails', 'InstanceTypeAsrJobDetails', 'InstanceTypeTestFailoverJobDetails', 'InstanceTypeFailoverJobDetails', 'InstanceTypeExportJobDetails', 'InstanceTypeSwitchProtectionJobDetails' 8698 InstanceType InstanceTypeBasicJobDetails `json:"instanceType,omitempty"` 8699} 8700 8701func unmarshalBasicJobDetails(body []byte) (BasicJobDetails, error) { 8702 var m map[string]interface{} 8703 err := json.Unmarshal(body, &m) 8704 if err != nil { 8705 return nil, err 8706 } 8707 8708 switch m["instanceType"] { 8709 case string(InstanceTypeAsrJobDetails): 8710 var ajd AsrJobDetails 8711 err := json.Unmarshal(body, &ajd) 8712 return ajd, err 8713 case string(InstanceTypeTestFailoverJobDetails): 8714 var tfjd TestFailoverJobDetails 8715 err := json.Unmarshal(body, &tfjd) 8716 return tfjd, err 8717 case string(InstanceTypeFailoverJobDetails): 8718 var fjd FailoverJobDetails 8719 err := json.Unmarshal(body, &fjd) 8720 return fjd, err 8721 case string(InstanceTypeExportJobDetails): 8722 var ejd ExportJobDetails 8723 err := json.Unmarshal(body, &ejd) 8724 return ejd, err 8725 case string(InstanceTypeSwitchProtectionJobDetails): 8726 var spjd SwitchProtectionJobDetails 8727 err := json.Unmarshal(body, &spjd) 8728 return spjd, err 8729 default: 8730 var jd JobDetails 8731 err := json.Unmarshal(body, &jd) 8732 return jd, err 8733 } 8734} 8735func unmarshalBasicJobDetailsArray(body []byte) ([]BasicJobDetails, error) { 8736 var rawMessages []*json.RawMessage 8737 err := json.Unmarshal(body, &rawMessages) 8738 if err != nil { 8739 return nil, err 8740 } 8741 8742 jdArray := make([]BasicJobDetails, len(rawMessages)) 8743 8744 for index, rawMessage := range rawMessages { 8745 jd, err := unmarshalBasicJobDetails(*rawMessage) 8746 if err != nil { 8747 return nil, err 8748 } 8749 jdArray[index] = jd 8750 } 8751 return jdArray, nil 8752} 8753 8754// MarshalJSON is the custom marshaler for JobDetails. 8755func (jd JobDetails) MarshalJSON() ([]byte, error) { 8756 jd.InstanceType = InstanceTypeJobDetails 8757 objectMap := make(map[string]interface{}) 8758 if jd.AffectedObjectDetails != nil { 8759 objectMap["affectedObjectDetails"] = jd.AffectedObjectDetails 8760 } 8761 if jd.InstanceType != "" { 8762 objectMap["instanceType"] = jd.InstanceType 8763 } 8764 return json.Marshal(objectMap) 8765} 8766 8767// AsAsrJobDetails is the BasicJobDetails implementation for JobDetails. 8768func (jd JobDetails) AsAsrJobDetails() (*AsrJobDetails, bool) { 8769 return nil, false 8770} 8771 8772// AsTestFailoverJobDetails is the BasicJobDetails implementation for JobDetails. 8773func (jd JobDetails) AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool) { 8774 return nil, false 8775} 8776 8777// AsFailoverJobDetails is the BasicJobDetails implementation for JobDetails. 8778func (jd JobDetails) AsFailoverJobDetails() (*FailoverJobDetails, bool) { 8779 return nil, false 8780} 8781 8782// AsExportJobDetails is the BasicJobDetails implementation for JobDetails. 8783func (jd JobDetails) AsExportJobDetails() (*ExportJobDetails, bool) { 8784 return nil, false 8785} 8786 8787// AsSwitchProtectionJobDetails is the BasicJobDetails implementation for JobDetails. 8788func (jd JobDetails) AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool) { 8789 return nil, false 8790} 8791 8792// AsJobDetails is the BasicJobDetails implementation for JobDetails. 8793func (jd JobDetails) AsJobDetails() (*JobDetails, bool) { 8794 return &jd, true 8795} 8796 8797// AsBasicJobDetails is the BasicJobDetails implementation for JobDetails. 8798func (jd JobDetails) AsBasicJobDetails() (BasicJobDetails, bool) { 8799 return &jd, true 8800} 8801 8802// JobEntity this class contains the minimal job details required to navigate to the desired drill down. 8803type JobEntity struct { 8804 // JobID - The job id. 8805 JobID *string `json:"jobId,omitempty"` 8806 // JobFriendlyName - The job display name. 8807 JobFriendlyName *string `json:"jobFriendlyName,omitempty"` 8808 // TargetObjectID - The object id. 8809 TargetObjectID *string `json:"targetObjectId,omitempty"` 8810 // TargetObjectName - The object name. 8811 TargetObjectName *string `json:"targetObjectName,omitempty"` 8812 // TargetInstanceType - The workflow affected object type. 8813 TargetInstanceType *string `json:"targetInstanceType,omitempty"` 8814 // JobScenarioName - The job name. Enum type ScenarioName. 8815 JobScenarioName *string `json:"jobScenarioName,omitempty"` 8816} 8817 8818// JobErrorDetails this class contains the error details per object. 8819type JobErrorDetails struct { 8820 // ServiceErrorDetails - The Service error details. 8821 ServiceErrorDetails *ServiceError `json:"serviceErrorDetails,omitempty"` 8822 // ProviderErrorDetails - The Provider error details. 8823 ProviderErrorDetails *ProviderError `json:"providerErrorDetails,omitempty"` 8824 // ErrorLevel - Error level of error. 8825 ErrorLevel *string `json:"errorLevel,omitempty"` 8826 // CreationTime - The creation time of job error. 8827 CreationTime *date.Time `json:"creationTime,omitempty"` 8828 // TaskID - The Id of the task. 8829 TaskID *string `json:"taskId,omitempty"` 8830} 8831 8832// JobProperties job custom data details. 8833type JobProperties struct { 8834 // ActivityID - The activity id. 8835 ActivityID *string `json:"activityId,omitempty"` 8836 // ScenarioName - The ScenarioName. 8837 ScenarioName *string `json:"scenarioName,omitempty"` 8838 // FriendlyName - The DisplayName. 8839 FriendlyName *string `json:"friendlyName,omitempty"` 8840 // State - The status of the Job. It is one of these values - NotStarted, InProgress, Succeeded, Failed, Cancelled, Suspended or Other. 8841 State *string `json:"state,omitempty"` 8842 // StateDescription - The description of the state of the Job. For e.g. - For Succeeded state, description can be Completed, PartiallySucceeded, CompletedWithInformation or Skipped. 8843 StateDescription *string `json:"stateDescription,omitempty"` 8844 // Tasks - The tasks. 8845 Tasks *[]ASRTask `json:"tasks,omitempty"` 8846 // Errors - The errors. 8847 Errors *[]JobErrorDetails `json:"errors,omitempty"` 8848 // StartTime - The start time. 8849 StartTime *date.Time `json:"startTime,omitempty"` 8850 // EndTime - The end time. 8851 EndTime *date.Time `json:"endTime,omitempty"` 8852 // AllowedActions - The Allowed action the job. 8853 AllowedActions *[]string `json:"allowedActions,omitempty"` 8854 // TargetObjectID - The affected Object Id. 8855 TargetObjectID *string `json:"targetObjectId,omitempty"` 8856 // TargetObjectName - The name of the affected object. 8857 TargetObjectName *string `json:"targetObjectName,omitempty"` 8858 // TargetInstanceType - The type of the affected object which is of {Microsoft.Azure.SiteRecovery.V2015_11_10.AffectedObjectType} class. 8859 TargetInstanceType *string `json:"targetInstanceType,omitempty"` 8860 // CustomDetails - The custom job details like test failover job details. 8861 CustomDetails BasicJobDetails `json:"customDetails,omitempty"` 8862} 8863 8864// UnmarshalJSON is the custom unmarshaler for JobProperties struct. 8865func (jp *JobProperties) UnmarshalJSON(body []byte) error { 8866 var m map[string]*json.RawMessage 8867 err := json.Unmarshal(body, &m) 8868 if err != nil { 8869 return err 8870 } 8871 for k, v := range m { 8872 switch k { 8873 case "activityId": 8874 if v != nil { 8875 var activityID string 8876 err = json.Unmarshal(*v, &activityID) 8877 if err != nil { 8878 return err 8879 } 8880 jp.ActivityID = &activityID 8881 } 8882 case "scenarioName": 8883 if v != nil { 8884 var scenarioName string 8885 err = json.Unmarshal(*v, &scenarioName) 8886 if err != nil { 8887 return err 8888 } 8889 jp.ScenarioName = &scenarioName 8890 } 8891 case "friendlyName": 8892 if v != nil { 8893 var friendlyName string 8894 err = json.Unmarshal(*v, &friendlyName) 8895 if err != nil { 8896 return err 8897 } 8898 jp.FriendlyName = &friendlyName 8899 } 8900 case "state": 8901 if v != nil { 8902 var state string 8903 err = json.Unmarshal(*v, &state) 8904 if err != nil { 8905 return err 8906 } 8907 jp.State = &state 8908 } 8909 case "stateDescription": 8910 if v != nil { 8911 var stateDescription string 8912 err = json.Unmarshal(*v, &stateDescription) 8913 if err != nil { 8914 return err 8915 } 8916 jp.StateDescription = &stateDescription 8917 } 8918 case "tasks": 8919 if v != nil { 8920 var tasks []ASRTask 8921 err = json.Unmarshal(*v, &tasks) 8922 if err != nil { 8923 return err 8924 } 8925 jp.Tasks = &tasks 8926 } 8927 case "errors": 8928 if v != nil { 8929 var errorsVar []JobErrorDetails 8930 err = json.Unmarshal(*v, &errorsVar) 8931 if err != nil { 8932 return err 8933 } 8934 jp.Errors = &errorsVar 8935 } 8936 case "startTime": 8937 if v != nil { 8938 var startTime date.Time 8939 err = json.Unmarshal(*v, &startTime) 8940 if err != nil { 8941 return err 8942 } 8943 jp.StartTime = &startTime 8944 } 8945 case "endTime": 8946 if v != nil { 8947 var endTime date.Time 8948 err = json.Unmarshal(*v, &endTime) 8949 if err != nil { 8950 return err 8951 } 8952 jp.EndTime = &endTime 8953 } 8954 case "allowedActions": 8955 if v != nil { 8956 var allowedActions []string 8957 err = json.Unmarshal(*v, &allowedActions) 8958 if err != nil { 8959 return err 8960 } 8961 jp.AllowedActions = &allowedActions 8962 } 8963 case "targetObjectId": 8964 if v != nil { 8965 var targetObjectID string 8966 err = json.Unmarshal(*v, &targetObjectID) 8967 if err != nil { 8968 return err 8969 } 8970 jp.TargetObjectID = &targetObjectID 8971 } 8972 case "targetObjectName": 8973 if v != nil { 8974 var targetObjectName string 8975 err = json.Unmarshal(*v, &targetObjectName) 8976 if err != nil { 8977 return err 8978 } 8979 jp.TargetObjectName = &targetObjectName 8980 } 8981 case "targetInstanceType": 8982 if v != nil { 8983 var targetInstanceType string 8984 err = json.Unmarshal(*v, &targetInstanceType) 8985 if err != nil { 8986 return err 8987 } 8988 jp.TargetInstanceType = &targetInstanceType 8989 } 8990 case "customDetails": 8991 if v != nil { 8992 customDetails, err := unmarshalBasicJobDetails(*v) 8993 if err != nil { 8994 return err 8995 } 8996 jp.CustomDetails = customDetails 8997 } 8998 } 8999 } 9000 9001 return nil 9002} 9003 9004// JobQueryParameter query parameter to enumerate jobs. 9005type JobQueryParameter struct { 9006 // StartTime - Date time to get jobs from. 9007 StartTime *string `json:"startTime,omitempty"` 9008 // EndTime - Date time to get jobs up to. 9009 EndTime *string `json:"endTime,omitempty"` 9010 // FabricID - The Id of the fabric to search jobs under. 9011 FabricID *string `json:"fabricId,omitempty"` 9012 // AffectedObjectTypes - The type of objects. 9013 AffectedObjectTypes *[]string `json:"affectedObjectTypes,omitempty"` 9014 // JobStatus - The states of the job to be filtered can be in. 9015 JobStatus *[]string `json:"jobStatus,omitempty"` 9016} 9017 9018// JobStatusEventDetails model class for event details of a job status event. 9019type JobStatusEventDetails struct { 9020 // JobID - Job arm id for the event. 9021 JobID *string `json:"jobId,omitempty"` 9022 // JobFriendlyName - JobName for the Event. 9023 JobFriendlyName *string `json:"jobFriendlyName,omitempty"` 9024 // JobStatus - JobStatus for the Event. 9025 JobStatus *string `json:"jobStatus,omitempty"` 9026 // AffectedObjectType - AffectedObjectType for the event. 9027 AffectedObjectType *string `json:"affectedObjectType,omitempty"` 9028 // InstanceType - Possible values include: 'InstanceTypeEventSpecificDetails', 'InstanceTypeJobStatus' 9029 InstanceType InstanceTypeBasicEventSpecificDetails `json:"instanceType,omitempty"` 9030} 9031 9032// MarshalJSON is the custom marshaler for JobStatusEventDetails. 9033func (jsed JobStatusEventDetails) MarshalJSON() ([]byte, error) { 9034 jsed.InstanceType = InstanceTypeJobStatus 9035 objectMap := make(map[string]interface{}) 9036 if jsed.JobID != nil { 9037 objectMap["jobId"] = jsed.JobID 9038 } 9039 if jsed.JobFriendlyName != nil { 9040 objectMap["jobFriendlyName"] = jsed.JobFriendlyName 9041 } 9042 if jsed.JobStatus != nil { 9043 objectMap["jobStatus"] = jsed.JobStatus 9044 } 9045 if jsed.AffectedObjectType != nil { 9046 objectMap["affectedObjectType"] = jsed.AffectedObjectType 9047 } 9048 if jsed.InstanceType != "" { 9049 objectMap["instanceType"] = jsed.InstanceType 9050 } 9051 return json.Marshal(objectMap) 9052} 9053 9054// AsJobStatusEventDetails is the BasicEventSpecificDetails implementation for JobStatusEventDetails. 9055func (jsed JobStatusEventDetails) AsJobStatusEventDetails() (*JobStatusEventDetails, bool) { 9056 return &jsed, true 9057} 9058 9059// AsEventSpecificDetails is the BasicEventSpecificDetails implementation for JobStatusEventDetails. 9060func (jsed JobStatusEventDetails) AsEventSpecificDetails() (*EventSpecificDetails, bool) { 9061 return nil, false 9062} 9063 9064// AsBasicEventSpecificDetails is the BasicEventSpecificDetails implementation for JobStatusEventDetails. 9065func (jsed JobStatusEventDetails) AsBasicEventSpecificDetails() (BasicEventSpecificDetails, bool) { 9066 return &jsed, true 9067} 9068 9069// JobTaskDetails this class represents a task which is actually a workflow so that one can navigate to its 9070// individual drill down. 9071type JobTaskDetails struct { 9072 // JobTask - The job entity. 9073 JobTask *JobEntity `json:"jobTask,omitempty"` 9074 // InstanceType - Possible values include: 'InstanceTypeTaskTypeDetails', 'InstanceTypeJobTaskDetails', 'InstanceTypeVirtualMachineTaskDetails', 'InstanceTypeFabricReplicationGroupTaskDetails', 'InstanceTypeManualActionTaskDetails', 'InstanceTypeScriptActionTaskDetails', 'InstanceTypeVMNicUpdatesTaskDetails', 'InstanceTypeConsistencyCheckTaskDetails', 'InstanceTypeAutomationRunbookTaskDetails' 9075 InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"` 9076} 9077 9078// MarshalJSON is the custom marshaler for JobTaskDetails. 9079func (jtd JobTaskDetails) MarshalJSON() ([]byte, error) { 9080 jtd.InstanceType = InstanceTypeJobTaskDetails 9081 objectMap := make(map[string]interface{}) 9082 if jtd.JobTask != nil { 9083 objectMap["jobTask"] = jtd.JobTask 9084 } 9085 if jtd.InstanceType != "" { 9086 objectMap["instanceType"] = jtd.InstanceType 9087 } 9088 return json.Marshal(objectMap) 9089} 9090 9091// AsJobTaskDetails is the BasicTaskTypeDetails implementation for JobTaskDetails. 9092func (jtd JobTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) { 9093 return &jtd, true 9094} 9095 9096// AsVirtualMachineTaskDetails is the BasicTaskTypeDetails implementation for JobTaskDetails. 9097func (jtd JobTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) { 9098 return nil, false 9099} 9100 9101// AsFabricReplicationGroupTaskDetails is the BasicTaskTypeDetails implementation for JobTaskDetails. 9102func (jtd JobTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) { 9103 return nil, false 9104} 9105 9106// AsManualActionTaskDetails is the BasicTaskTypeDetails implementation for JobTaskDetails. 9107func (jtd JobTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) { 9108 return nil, false 9109} 9110 9111// AsScriptActionTaskDetails is the BasicTaskTypeDetails implementation for JobTaskDetails. 9112func (jtd JobTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) { 9113 return nil, false 9114} 9115 9116// AsVMNicUpdatesTaskDetails is the BasicTaskTypeDetails implementation for JobTaskDetails. 9117func (jtd JobTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) { 9118 return nil, false 9119} 9120 9121// AsConsistencyCheckTaskDetails is the BasicTaskTypeDetails implementation for JobTaskDetails. 9122func (jtd JobTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) { 9123 return nil, false 9124} 9125 9126// AsAutomationRunbookTaskDetails is the BasicTaskTypeDetails implementation for JobTaskDetails. 9127func (jtd JobTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) { 9128 return nil, false 9129} 9130 9131// AsTaskTypeDetails is the BasicTaskTypeDetails implementation for JobTaskDetails. 9132func (jtd JobTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) { 9133 return nil, false 9134} 9135 9136// AsBasicTaskTypeDetails is the BasicTaskTypeDetails implementation for JobTaskDetails. 9137func (jtd JobTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) { 9138 return &jtd, true 9139} 9140 9141// LogicalNetwork logical network data model. 9142type LogicalNetwork struct { 9143 autorest.Response `json:"-"` 9144 // Properties - The Logical Network Properties. 9145 Properties *LogicalNetworkProperties `json:"properties,omitempty"` 9146 // ID - READ-ONLY; Resource Id 9147 ID *string `json:"id,omitempty"` 9148 // Name - READ-ONLY; Resource Name 9149 Name *string `json:"name,omitempty"` 9150 // Type - READ-ONLY; Resource Type 9151 Type *string `json:"type,omitempty"` 9152 // Location - Resource Location 9153 Location *string `json:"location,omitempty"` 9154} 9155 9156// MarshalJSON is the custom marshaler for LogicalNetwork. 9157func (ln LogicalNetwork) MarshalJSON() ([]byte, error) { 9158 objectMap := make(map[string]interface{}) 9159 if ln.Properties != nil { 9160 objectMap["properties"] = ln.Properties 9161 } 9162 if ln.Location != nil { 9163 objectMap["location"] = ln.Location 9164 } 9165 return json.Marshal(objectMap) 9166} 9167 9168// LogicalNetworkCollection list of logical networks. 9169type LogicalNetworkCollection struct { 9170 autorest.Response `json:"-"` 9171 // Value - The Logical Networks list details. 9172 Value *[]LogicalNetwork `json:"value,omitempty"` 9173 // NextLink - The value of next link. 9174 NextLink *string `json:"nextLink,omitempty"` 9175} 9176 9177// LogicalNetworkCollectionIterator provides access to a complete listing of LogicalNetwork values. 9178type LogicalNetworkCollectionIterator struct { 9179 i int 9180 page LogicalNetworkCollectionPage 9181} 9182 9183// NextWithContext advances to the next value. If there was an error making 9184// the request the iterator does not advance and the error is returned. 9185func (iter *LogicalNetworkCollectionIterator) NextWithContext(ctx context.Context) (err error) { 9186 if tracing.IsEnabled() { 9187 ctx = tracing.StartSpan(ctx, fqdn+"/LogicalNetworkCollectionIterator.NextWithContext") 9188 defer func() { 9189 sc := -1 9190 if iter.Response().Response.Response != nil { 9191 sc = iter.Response().Response.Response.StatusCode 9192 } 9193 tracing.EndSpan(ctx, sc, err) 9194 }() 9195 } 9196 iter.i++ 9197 if iter.i < len(iter.page.Values()) { 9198 return nil 9199 } 9200 err = iter.page.NextWithContext(ctx) 9201 if err != nil { 9202 iter.i-- 9203 return err 9204 } 9205 iter.i = 0 9206 return nil 9207} 9208 9209// Next advances to the next value. If there was an error making 9210// the request the iterator does not advance and the error is returned. 9211// Deprecated: Use NextWithContext() instead. 9212func (iter *LogicalNetworkCollectionIterator) Next() error { 9213 return iter.NextWithContext(context.Background()) 9214} 9215 9216// NotDone returns true if the enumeration should be started or is not yet complete. 9217func (iter LogicalNetworkCollectionIterator) NotDone() bool { 9218 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 9219} 9220 9221// Response returns the raw server response from the last page request. 9222func (iter LogicalNetworkCollectionIterator) Response() LogicalNetworkCollection { 9223 return iter.page.Response() 9224} 9225 9226// Value returns the current value or a zero-initialized value if the 9227// iterator has advanced beyond the end of the collection. 9228func (iter LogicalNetworkCollectionIterator) Value() LogicalNetwork { 9229 if !iter.page.NotDone() { 9230 return LogicalNetwork{} 9231 } 9232 return iter.page.Values()[iter.i] 9233} 9234 9235// Creates a new instance of the LogicalNetworkCollectionIterator type. 9236func NewLogicalNetworkCollectionIterator(page LogicalNetworkCollectionPage) LogicalNetworkCollectionIterator { 9237 return LogicalNetworkCollectionIterator{page: page} 9238} 9239 9240// IsEmpty returns true if the ListResult contains no values. 9241func (lnc LogicalNetworkCollection) IsEmpty() bool { 9242 return lnc.Value == nil || len(*lnc.Value) == 0 9243} 9244 9245// hasNextLink returns true if the NextLink is not empty. 9246func (lnc LogicalNetworkCollection) hasNextLink() bool { 9247 return lnc.NextLink != nil && len(*lnc.NextLink) != 0 9248} 9249 9250// logicalNetworkCollectionPreparer prepares a request to retrieve the next set of results. 9251// It returns nil if no more results exist. 9252func (lnc LogicalNetworkCollection) logicalNetworkCollectionPreparer(ctx context.Context) (*http.Request, error) { 9253 if !lnc.hasNextLink() { 9254 return nil, nil 9255 } 9256 return autorest.Prepare((&http.Request{}).WithContext(ctx), 9257 autorest.AsJSON(), 9258 autorest.AsGet(), 9259 autorest.WithBaseURL(to.String(lnc.NextLink))) 9260} 9261 9262// LogicalNetworkCollectionPage contains a page of LogicalNetwork values. 9263type LogicalNetworkCollectionPage struct { 9264 fn func(context.Context, LogicalNetworkCollection) (LogicalNetworkCollection, error) 9265 lnc LogicalNetworkCollection 9266} 9267 9268// NextWithContext advances to the next page of values. If there was an error making 9269// the request the page does not advance and the error is returned. 9270func (page *LogicalNetworkCollectionPage) NextWithContext(ctx context.Context) (err error) { 9271 if tracing.IsEnabled() { 9272 ctx = tracing.StartSpan(ctx, fqdn+"/LogicalNetworkCollectionPage.NextWithContext") 9273 defer func() { 9274 sc := -1 9275 if page.Response().Response.Response != nil { 9276 sc = page.Response().Response.Response.StatusCode 9277 } 9278 tracing.EndSpan(ctx, sc, err) 9279 }() 9280 } 9281 for { 9282 next, err := page.fn(ctx, page.lnc) 9283 if err != nil { 9284 return err 9285 } 9286 page.lnc = next 9287 if !next.hasNextLink() || !next.IsEmpty() { 9288 break 9289 } 9290 } 9291 return nil 9292} 9293 9294// Next advances to the next page of values. If there was an error making 9295// the request the page does not advance and the error is returned. 9296// Deprecated: Use NextWithContext() instead. 9297func (page *LogicalNetworkCollectionPage) Next() error { 9298 return page.NextWithContext(context.Background()) 9299} 9300 9301// NotDone returns true if the page enumeration should be started or is not yet complete. 9302func (page LogicalNetworkCollectionPage) NotDone() bool { 9303 return !page.lnc.IsEmpty() 9304} 9305 9306// Response returns the raw server response from the last page request. 9307func (page LogicalNetworkCollectionPage) Response() LogicalNetworkCollection { 9308 return page.lnc 9309} 9310 9311// Values returns the slice of values for the current page or nil if there are no values. 9312func (page LogicalNetworkCollectionPage) Values() []LogicalNetwork { 9313 if page.lnc.IsEmpty() { 9314 return nil 9315 } 9316 return *page.lnc.Value 9317} 9318 9319// Creates a new instance of the LogicalNetworkCollectionPage type. 9320func NewLogicalNetworkCollectionPage(cur LogicalNetworkCollection, getNextPage func(context.Context, LogicalNetworkCollection) (LogicalNetworkCollection, error)) LogicalNetworkCollectionPage { 9321 return LogicalNetworkCollectionPage{ 9322 fn: getNextPage, 9323 lnc: cur, 9324 } 9325} 9326 9327// LogicalNetworkProperties logical Network Properties. 9328type LogicalNetworkProperties struct { 9329 // FriendlyName - The Friendly Name. 9330 FriendlyName *string `json:"friendlyName,omitempty"` 9331 // NetworkVirtualizationStatus - A value indicating whether Network Virtualization is enabled for the logical network. 9332 NetworkVirtualizationStatus *string `json:"networkVirtualizationStatus,omitempty"` 9333 // LogicalNetworkUsage - A value indicating whether logical network is used as private test network by test failover. 9334 LogicalNetworkUsage *string `json:"logicalNetworkUsage,omitempty"` 9335 // LogicalNetworkDefinitionsStatus - A value indicating whether logical network definitions are isolated. 9336 LogicalNetworkDefinitionsStatus *string `json:"logicalNetworkDefinitionsStatus,omitempty"` 9337} 9338 9339// ManualActionTaskDetails this class represents the manual action task details. 9340type ManualActionTaskDetails struct { 9341 // Name - The name. 9342 Name *string `json:"name,omitempty"` 9343 // Instructions - The instructions. 9344 Instructions *string `json:"instructions,omitempty"` 9345 // Observation - The observation. 9346 Observation *string `json:"observation,omitempty"` 9347 // InstanceType - Possible values include: 'InstanceTypeTaskTypeDetails', 'InstanceTypeJobTaskDetails', 'InstanceTypeVirtualMachineTaskDetails', 'InstanceTypeFabricReplicationGroupTaskDetails', 'InstanceTypeManualActionTaskDetails', 'InstanceTypeScriptActionTaskDetails', 'InstanceTypeVMNicUpdatesTaskDetails', 'InstanceTypeConsistencyCheckTaskDetails', 'InstanceTypeAutomationRunbookTaskDetails' 9348 InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"` 9349} 9350 9351// MarshalJSON is the custom marshaler for ManualActionTaskDetails. 9352func (matd ManualActionTaskDetails) MarshalJSON() ([]byte, error) { 9353 matd.InstanceType = InstanceTypeManualActionTaskDetails 9354 objectMap := make(map[string]interface{}) 9355 if matd.Name != nil { 9356 objectMap["name"] = matd.Name 9357 } 9358 if matd.Instructions != nil { 9359 objectMap["instructions"] = matd.Instructions 9360 } 9361 if matd.Observation != nil { 9362 objectMap["observation"] = matd.Observation 9363 } 9364 if matd.InstanceType != "" { 9365 objectMap["instanceType"] = matd.InstanceType 9366 } 9367 return json.Marshal(objectMap) 9368} 9369 9370// AsJobTaskDetails is the BasicTaskTypeDetails implementation for ManualActionTaskDetails. 9371func (matd ManualActionTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) { 9372 return nil, false 9373} 9374 9375// AsVirtualMachineTaskDetails is the BasicTaskTypeDetails implementation for ManualActionTaskDetails. 9376func (matd ManualActionTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) { 9377 return nil, false 9378} 9379 9380// AsFabricReplicationGroupTaskDetails is the BasicTaskTypeDetails implementation for ManualActionTaskDetails. 9381func (matd ManualActionTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) { 9382 return nil, false 9383} 9384 9385// AsManualActionTaskDetails is the BasicTaskTypeDetails implementation for ManualActionTaskDetails. 9386func (matd ManualActionTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) { 9387 return &matd, true 9388} 9389 9390// AsScriptActionTaskDetails is the BasicTaskTypeDetails implementation for ManualActionTaskDetails. 9391func (matd ManualActionTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) { 9392 return nil, false 9393} 9394 9395// AsVMNicUpdatesTaskDetails is the BasicTaskTypeDetails implementation for ManualActionTaskDetails. 9396func (matd ManualActionTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) { 9397 return nil, false 9398} 9399 9400// AsConsistencyCheckTaskDetails is the BasicTaskTypeDetails implementation for ManualActionTaskDetails. 9401func (matd ManualActionTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) { 9402 return nil, false 9403} 9404 9405// AsAutomationRunbookTaskDetails is the BasicTaskTypeDetails implementation for ManualActionTaskDetails. 9406func (matd ManualActionTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) { 9407 return nil, false 9408} 9409 9410// AsTaskTypeDetails is the BasicTaskTypeDetails implementation for ManualActionTaskDetails. 9411func (matd ManualActionTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) { 9412 return nil, false 9413} 9414 9415// AsBasicTaskTypeDetails is the BasicTaskTypeDetails implementation for ManualActionTaskDetails. 9416func (matd ManualActionTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) { 9417 return &matd, true 9418} 9419 9420// MasterTargetServer details of a Master Target Server. 9421type MasterTargetServer struct { 9422 // ID - The server Id. 9423 ID *string `json:"id,omitempty"` 9424 // IPAddress - The IP address of the server. 9425 IPAddress *string `json:"ipAddress,omitempty"` 9426 // Name - The server name. 9427 Name *string `json:"name,omitempty"` 9428 // OsType - The OS type of the server. 9429 OsType *string `json:"osType,omitempty"` 9430 // AgentVersion - The version of the scout component on the server. 9431 AgentVersion *string `json:"agentVersion,omitempty"` 9432 // LastHeartbeat - The last heartbeat received from the server. 9433 LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"` 9434 // VersionStatus - Version status 9435 VersionStatus *string `json:"versionStatus,omitempty"` 9436 // RetentionVolumes - The retention volumes of Master target Server. 9437 RetentionVolumes *[]RetentionVolume `json:"retentionVolumes,omitempty"` 9438 // DataStores - The list of data stores in the fabric. 9439 DataStores *[]DataStore `json:"dataStores,omitempty"` 9440 // ValidationErrors - Validation errors. 9441 ValidationErrors *[]HealthError `json:"validationErrors,omitempty"` 9442 // DiskCount - Disk count of the master target. 9443 DiskCount *int32 `json:"diskCount,omitempty"` 9444 // OsVersion - OS Version of the master target. 9445 OsVersion *string `json:"osVersion,omitempty"` 9446} 9447 9448// MethodCallStatus reports method status where exception was raised. 9449type MethodCallStatus struct { 9450 // IsVirtual - Gets a value indicating whether called method was virtual 9451 IsVirtual *string `json:"isVirtual,omitempty"` 9452 // Parameters - Gets parameter list passed to method. 9453 Parameters *[]string `json:"parameters,omitempty"` 9454 // ContainsGenericParameters - Gets a value indicating whether method container generic params. 9455 ContainsGenericParameters *string `json:"containsGenericParameters,omitempty"` 9456} 9457 9458// MobilityServiceUpdate the Mobility Service update details. 9459type MobilityServiceUpdate struct { 9460 // Version - The version of the latest update. 9461 Version *string `json:"version,omitempty"` 9462 // RebootStatus - The reboot status of the update - whether it is required or not. 9463 RebootStatus *string `json:"rebootStatus,omitempty"` 9464 // OsType - The OS type. 9465 OsType *string `json:"osType,omitempty"` 9466} 9467 9468// Network network model. 9469type Network struct { 9470 autorest.Response `json:"-"` 9471 // Properties - The Network Properties. 9472 Properties *NetworkProperties `json:"properties,omitempty"` 9473 // ID - READ-ONLY; Resource Id 9474 ID *string `json:"id,omitempty"` 9475 // Name - READ-ONLY; Resource Name 9476 Name *string `json:"name,omitempty"` 9477 // Type - READ-ONLY; Resource Type 9478 Type *string `json:"type,omitempty"` 9479 // Location - Resource Location 9480 Location *string `json:"location,omitempty"` 9481} 9482 9483// MarshalJSON is the custom marshaler for Network. 9484func (n Network) MarshalJSON() ([]byte, error) { 9485 objectMap := make(map[string]interface{}) 9486 if n.Properties != nil { 9487 objectMap["properties"] = n.Properties 9488 } 9489 if n.Location != nil { 9490 objectMap["location"] = n.Location 9491 } 9492 return json.Marshal(objectMap) 9493} 9494 9495// NetworkCollection list of networks. 9496type NetworkCollection struct { 9497 autorest.Response `json:"-"` 9498 // Value - The Networks list details. 9499 Value *[]Network `json:"value,omitempty"` 9500 // NextLink - The value of next link. 9501 NextLink *string `json:"nextLink,omitempty"` 9502} 9503 9504// NetworkCollectionIterator provides access to a complete listing of Network values. 9505type NetworkCollectionIterator struct { 9506 i int 9507 page NetworkCollectionPage 9508} 9509 9510// NextWithContext advances to the next value. If there was an error making 9511// the request the iterator does not advance and the error is returned. 9512func (iter *NetworkCollectionIterator) NextWithContext(ctx context.Context) (err error) { 9513 if tracing.IsEnabled() { 9514 ctx = tracing.StartSpan(ctx, fqdn+"/NetworkCollectionIterator.NextWithContext") 9515 defer func() { 9516 sc := -1 9517 if iter.Response().Response.Response != nil { 9518 sc = iter.Response().Response.Response.StatusCode 9519 } 9520 tracing.EndSpan(ctx, sc, err) 9521 }() 9522 } 9523 iter.i++ 9524 if iter.i < len(iter.page.Values()) { 9525 return nil 9526 } 9527 err = iter.page.NextWithContext(ctx) 9528 if err != nil { 9529 iter.i-- 9530 return err 9531 } 9532 iter.i = 0 9533 return nil 9534} 9535 9536// Next advances to the next value. If there was an error making 9537// the request the iterator does not advance and the error is returned. 9538// Deprecated: Use NextWithContext() instead. 9539func (iter *NetworkCollectionIterator) Next() error { 9540 return iter.NextWithContext(context.Background()) 9541} 9542 9543// NotDone returns true if the enumeration should be started or is not yet complete. 9544func (iter NetworkCollectionIterator) NotDone() bool { 9545 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 9546} 9547 9548// Response returns the raw server response from the last page request. 9549func (iter NetworkCollectionIterator) Response() NetworkCollection { 9550 return iter.page.Response() 9551} 9552 9553// Value returns the current value or a zero-initialized value if the 9554// iterator has advanced beyond the end of the collection. 9555func (iter NetworkCollectionIterator) Value() Network { 9556 if !iter.page.NotDone() { 9557 return Network{} 9558 } 9559 return iter.page.Values()[iter.i] 9560} 9561 9562// Creates a new instance of the NetworkCollectionIterator type. 9563func NewNetworkCollectionIterator(page NetworkCollectionPage) NetworkCollectionIterator { 9564 return NetworkCollectionIterator{page: page} 9565} 9566 9567// IsEmpty returns true if the ListResult contains no values. 9568func (nc NetworkCollection) IsEmpty() bool { 9569 return nc.Value == nil || len(*nc.Value) == 0 9570} 9571 9572// hasNextLink returns true if the NextLink is not empty. 9573func (nc NetworkCollection) hasNextLink() bool { 9574 return nc.NextLink != nil && len(*nc.NextLink) != 0 9575} 9576 9577// networkCollectionPreparer prepares a request to retrieve the next set of results. 9578// It returns nil if no more results exist. 9579func (nc NetworkCollection) networkCollectionPreparer(ctx context.Context) (*http.Request, error) { 9580 if !nc.hasNextLink() { 9581 return nil, nil 9582 } 9583 return autorest.Prepare((&http.Request{}).WithContext(ctx), 9584 autorest.AsJSON(), 9585 autorest.AsGet(), 9586 autorest.WithBaseURL(to.String(nc.NextLink))) 9587} 9588 9589// NetworkCollectionPage contains a page of Network values. 9590type NetworkCollectionPage struct { 9591 fn func(context.Context, NetworkCollection) (NetworkCollection, error) 9592 nc NetworkCollection 9593} 9594 9595// NextWithContext advances to the next page of values. If there was an error making 9596// the request the page does not advance and the error is returned. 9597func (page *NetworkCollectionPage) NextWithContext(ctx context.Context) (err error) { 9598 if tracing.IsEnabled() { 9599 ctx = tracing.StartSpan(ctx, fqdn+"/NetworkCollectionPage.NextWithContext") 9600 defer func() { 9601 sc := -1 9602 if page.Response().Response.Response != nil { 9603 sc = page.Response().Response.Response.StatusCode 9604 } 9605 tracing.EndSpan(ctx, sc, err) 9606 }() 9607 } 9608 for { 9609 next, err := page.fn(ctx, page.nc) 9610 if err != nil { 9611 return err 9612 } 9613 page.nc = next 9614 if !next.hasNextLink() || !next.IsEmpty() { 9615 break 9616 } 9617 } 9618 return nil 9619} 9620 9621// Next advances to the next page of values. If there was an error making 9622// the request the page does not advance and the error is returned. 9623// Deprecated: Use NextWithContext() instead. 9624func (page *NetworkCollectionPage) Next() error { 9625 return page.NextWithContext(context.Background()) 9626} 9627 9628// NotDone returns true if the page enumeration should be started or is not yet complete. 9629func (page NetworkCollectionPage) NotDone() bool { 9630 return !page.nc.IsEmpty() 9631} 9632 9633// Response returns the raw server response from the last page request. 9634func (page NetworkCollectionPage) Response() NetworkCollection { 9635 return page.nc 9636} 9637 9638// Values returns the slice of values for the current page or nil if there are no values. 9639func (page NetworkCollectionPage) Values() []Network { 9640 if page.nc.IsEmpty() { 9641 return nil 9642 } 9643 return *page.nc.Value 9644} 9645 9646// Creates a new instance of the NetworkCollectionPage type. 9647func NewNetworkCollectionPage(cur NetworkCollection, getNextPage func(context.Context, NetworkCollection) (NetworkCollection, error)) NetworkCollectionPage { 9648 return NetworkCollectionPage{ 9649 fn: getNextPage, 9650 nc: cur, 9651 } 9652} 9653 9654// NetworkMapping network Mapping model. Ideally it should have been possible to inherit this class from 9655// prev version in InheritedModels as long as there is no difference in structure or method signature. 9656// Since there were no base Models for certain fields and methods viz NetworkMappingProperties and Load 9657// with required return type, the class has been introduced in its entirety with references to base models 9658// to facilitate extensions in subsequent versions. 9659type NetworkMapping struct { 9660 autorest.Response `json:"-"` 9661 // Properties - The Network Mapping Properties. 9662 Properties *NetworkMappingProperties `json:"properties,omitempty"` 9663 // ID - READ-ONLY; Resource Id 9664 ID *string `json:"id,omitempty"` 9665 // Name - READ-ONLY; Resource Name 9666 Name *string `json:"name,omitempty"` 9667 // Type - READ-ONLY; Resource Type 9668 Type *string `json:"type,omitempty"` 9669 // Location - Resource Location 9670 Location *string `json:"location,omitempty"` 9671} 9672 9673// MarshalJSON is the custom marshaler for NetworkMapping. 9674func (nm NetworkMapping) MarshalJSON() ([]byte, error) { 9675 objectMap := make(map[string]interface{}) 9676 if nm.Properties != nil { 9677 objectMap["properties"] = nm.Properties 9678 } 9679 if nm.Location != nil { 9680 objectMap["location"] = nm.Location 9681 } 9682 return json.Marshal(objectMap) 9683} 9684 9685// NetworkMappingCollection list of network mappings. As with NetworkMapping, it should be possible to 9686// reuse a prev version of this class. It doesn't seem likely this class could be anything more than a 9687// slightly bespoke collection of NetworkMapping. Hence it makes sense to override Load with 9688// Base.NetworkMapping instead of existing CurrentVersion.NetworkMapping. 9689type NetworkMappingCollection struct { 9690 autorest.Response `json:"-"` 9691 // Value - The Network Mappings list. 9692 Value *[]NetworkMapping `json:"value,omitempty"` 9693 // NextLink - The value of next link. 9694 NextLink *string `json:"nextLink,omitempty"` 9695} 9696 9697// NetworkMappingCollectionIterator provides access to a complete listing of NetworkMapping values. 9698type NetworkMappingCollectionIterator struct { 9699 i int 9700 page NetworkMappingCollectionPage 9701} 9702 9703// NextWithContext advances to the next value. If there was an error making 9704// the request the iterator does not advance and the error is returned. 9705func (iter *NetworkMappingCollectionIterator) NextWithContext(ctx context.Context) (err error) { 9706 if tracing.IsEnabled() { 9707 ctx = tracing.StartSpan(ctx, fqdn+"/NetworkMappingCollectionIterator.NextWithContext") 9708 defer func() { 9709 sc := -1 9710 if iter.Response().Response.Response != nil { 9711 sc = iter.Response().Response.Response.StatusCode 9712 } 9713 tracing.EndSpan(ctx, sc, err) 9714 }() 9715 } 9716 iter.i++ 9717 if iter.i < len(iter.page.Values()) { 9718 return nil 9719 } 9720 err = iter.page.NextWithContext(ctx) 9721 if err != nil { 9722 iter.i-- 9723 return err 9724 } 9725 iter.i = 0 9726 return nil 9727} 9728 9729// Next advances to the next value. If there was an error making 9730// the request the iterator does not advance and the error is returned. 9731// Deprecated: Use NextWithContext() instead. 9732func (iter *NetworkMappingCollectionIterator) Next() error { 9733 return iter.NextWithContext(context.Background()) 9734} 9735 9736// NotDone returns true if the enumeration should be started or is not yet complete. 9737func (iter NetworkMappingCollectionIterator) NotDone() bool { 9738 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 9739} 9740 9741// Response returns the raw server response from the last page request. 9742func (iter NetworkMappingCollectionIterator) Response() NetworkMappingCollection { 9743 return iter.page.Response() 9744} 9745 9746// Value returns the current value or a zero-initialized value if the 9747// iterator has advanced beyond the end of the collection. 9748func (iter NetworkMappingCollectionIterator) Value() NetworkMapping { 9749 if !iter.page.NotDone() { 9750 return NetworkMapping{} 9751 } 9752 return iter.page.Values()[iter.i] 9753} 9754 9755// Creates a new instance of the NetworkMappingCollectionIterator type. 9756func NewNetworkMappingCollectionIterator(page NetworkMappingCollectionPage) NetworkMappingCollectionIterator { 9757 return NetworkMappingCollectionIterator{page: page} 9758} 9759 9760// IsEmpty returns true if the ListResult contains no values. 9761func (nmc NetworkMappingCollection) IsEmpty() bool { 9762 return nmc.Value == nil || len(*nmc.Value) == 0 9763} 9764 9765// hasNextLink returns true if the NextLink is not empty. 9766func (nmc NetworkMappingCollection) hasNextLink() bool { 9767 return nmc.NextLink != nil && len(*nmc.NextLink) != 0 9768} 9769 9770// networkMappingCollectionPreparer prepares a request to retrieve the next set of results. 9771// It returns nil if no more results exist. 9772func (nmc NetworkMappingCollection) networkMappingCollectionPreparer(ctx context.Context) (*http.Request, error) { 9773 if !nmc.hasNextLink() { 9774 return nil, nil 9775 } 9776 return autorest.Prepare((&http.Request{}).WithContext(ctx), 9777 autorest.AsJSON(), 9778 autorest.AsGet(), 9779 autorest.WithBaseURL(to.String(nmc.NextLink))) 9780} 9781 9782// NetworkMappingCollectionPage contains a page of NetworkMapping values. 9783type NetworkMappingCollectionPage struct { 9784 fn func(context.Context, NetworkMappingCollection) (NetworkMappingCollection, error) 9785 nmc NetworkMappingCollection 9786} 9787 9788// NextWithContext advances to the next page of values. If there was an error making 9789// the request the page does not advance and the error is returned. 9790func (page *NetworkMappingCollectionPage) NextWithContext(ctx context.Context) (err error) { 9791 if tracing.IsEnabled() { 9792 ctx = tracing.StartSpan(ctx, fqdn+"/NetworkMappingCollectionPage.NextWithContext") 9793 defer func() { 9794 sc := -1 9795 if page.Response().Response.Response != nil { 9796 sc = page.Response().Response.Response.StatusCode 9797 } 9798 tracing.EndSpan(ctx, sc, err) 9799 }() 9800 } 9801 for { 9802 next, err := page.fn(ctx, page.nmc) 9803 if err != nil { 9804 return err 9805 } 9806 page.nmc = next 9807 if !next.hasNextLink() || !next.IsEmpty() { 9808 break 9809 } 9810 } 9811 return nil 9812} 9813 9814// Next advances to the next page of values. If there was an error making 9815// the request the page does not advance and the error is returned. 9816// Deprecated: Use NextWithContext() instead. 9817func (page *NetworkMappingCollectionPage) Next() error { 9818 return page.NextWithContext(context.Background()) 9819} 9820 9821// NotDone returns true if the page enumeration should be started or is not yet complete. 9822func (page NetworkMappingCollectionPage) NotDone() bool { 9823 return !page.nmc.IsEmpty() 9824} 9825 9826// Response returns the raw server response from the last page request. 9827func (page NetworkMappingCollectionPage) Response() NetworkMappingCollection { 9828 return page.nmc 9829} 9830 9831// Values returns the slice of values for the current page or nil if there are no values. 9832func (page NetworkMappingCollectionPage) Values() []NetworkMapping { 9833 if page.nmc.IsEmpty() { 9834 return nil 9835 } 9836 return *page.nmc.Value 9837} 9838 9839// Creates a new instance of the NetworkMappingCollectionPage type. 9840func NewNetworkMappingCollectionPage(cur NetworkMappingCollection, getNextPage func(context.Context, NetworkMappingCollection) (NetworkMappingCollection, error)) NetworkMappingCollectionPage { 9841 return NetworkMappingCollectionPage{ 9842 fn: getNextPage, 9843 nmc: cur, 9844 } 9845} 9846 9847// BasicNetworkMappingFabricSpecificSettings network Mapping fabric specific settings. 9848type BasicNetworkMappingFabricSpecificSettings interface { 9849 AsAzureToAzureNetworkMappingSettings() (*AzureToAzureNetworkMappingSettings, bool) 9850 AsVmmToAzureNetworkMappingSettings() (*VmmToAzureNetworkMappingSettings, bool) 9851 AsVmmToVmmNetworkMappingSettings() (*VmmToVmmNetworkMappingSettings, bool) 9852 AsNetworkMappingFabricSpecificSettings() (*NetworkMappingFabricSpecificSettings, bool) 9853} 9854 9855// NetworkMappingFabricSpecificSettings network Mapping fabric specific settings. 9856type NetworkMappingFabricSpecificSettings struct { 9857 // InstanceType - Possible values include: 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeNetworkMappingFabricSpecificSettings', 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeAzureToAzure', 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToAzure', 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToVmm' 9858 InstanceType InstanceTypeBasicNetworkMappingFabricSpecificSettings `json:"instanceType,omitempty"` 9859} 9860 9861func unmarshalBasicNetworkMappingFabricSpecificSettings(body []byte) (BasicNetworkMappingFabricSpecificSettings, error) { 9862 var m map[string]interface{} 9863 err := json.Unmarshal(body, &m) 9864 if err != nil { 9865 return nil, err 9866 } 9867 9868 switch m["instanceType"] { 9869 case string(InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeAzureToAzure): 9870 var atanms AzureToAzureNetworkMappingSettings 9871 err := json.Unmarshal(body, &atanms) 9872 return atanms, err 9873 case string(InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToAzure): 9874 var vtanms VmmToAzureNetworkMappingSettings 9875 err := json.Unmarshal(body, &vtanms) 9876 return vtanms, err 9877 case string(InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToVmm): 9878 var vtvnms VmmToVmmNetworkMappingSettings 9879 err := json.Unmarshal(body, &vtvnms) 9880 return vtvnms, err 9881 default: 9882 var nmfss NetworkMappingFabricSpecificSettings 9883 err := json.Unmarshal(body, &nmfss) 9884 return nmfss, err 9885 } 9886} 9887func unmarshalBasicNetworkMappingFabricSpecificSettingsArray(body []byte) ([]BasicNetworkMappingFabricSpecificSettings, error) { 9888 var rawMessages []*json.RawMessage 9889 err := json.Unmarshal(body, &rawMessages) 9890 if err != nil { 9891 return nil, err 9892 } 9893 9894 nmfssArray := make([]BasicNetworkMappingFabricSpecificSettings, len(rawMessages)) 9895 9896 for index, rawMessage := range rawMessages { 9897 nmfss, err := unmarshalBasicNetworkMappingFabricSpecificSettings(*rawMessage) 9898 if err != nil { 9899 return nil, err 9900 } 9901 nmfssArray[index] = nmfss 9902 } 9903 return nmfssArray, nil 9904} 9905 9906// MarshalJSON is the custom marshaler for NetworkMappingFabricSpecificSettings. 9907func (nmfss NetworkMappingFabricSpecificSettings) MarshalJSON() ([]byte, error) { 9908 nmfss.InstanceType = InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeNetworkMappingFabricSpecificSettings 9909 objectMap := make(map[string]interface{}) 9910 if nmfss.InstanceType != "" { 9911 objectMap["instanceType"] = nmfss.InstanceType 9912 } 9913 return json.Marshal(objectMap) 9914} 9915 9916// AsAzureToAzureNetworkMappingSettings is the BasicNetworkMappingFabricSpecificSettings implementation for NetworkMappingFabricSpecificSettings. 9917func (nmfss NetworkMappingFabricSpecificSettings) AsAzureToAzureNetworkMappingSettings() (*AzureToAzureNetworkMappingSettings, bool) { 9918 return nil, false 9919} 9920 9921// AsVmmToAzureNetworkMappingSettings is the BasicNetworkMappingFabricSpecificSettings implementation for NetworkMappingFabricSpecificSettings. 9922func (nmfss NetworkMappingFabricSpecificSettings) AsVmmToAzureNetworkMappingSettings() (*VmmToAzureNetworkMappingSettings, bool) { 9923 return nil, false 9924} 9925 9926// AsVmmToVmmNetworkMappingSettings is the BasicNetworkMappingFabricSpecificSettings implementation for NetworkMappingFabricSpecificSettings. 9927func (nmfss NetworkMappingFabricSpecificSettings) AsVmmToVmmNetworkMappingSettings() (*VmmToVmmNetworkMappingSettings, bool) { 9928 return nil, false 9929} 9930 9931// AsNetworkMappingFabricSpecificSettings is the BasicNetworkMappingFabricSpecificSettings implementation for NetworkMappingFabricSpecificSettings. 9932func (nmfss NetworkMappingFabricSpecificSettings) AsNetworkMappingFabricSpecificSettings() (*NetworkMappingFabricSpecificSettings, bool) { 9933 return &nmfss, true 9934} 9935 9936// AsBasicNetworkMappingFabricSpecificSettings is the BasicNetworkMappingFabricSpecificSettings implementation for NetworkMappingFabricSpecificSettings. 9937func (nmfss NetworkMappingFabricSpecificSettings) AsBasicNetworkMappingFabricSpecificSettings() (BasicNetworkMappingFabricSpecificSettings, bool) { 9938 return &nmfss, true 9939} 9940 9941// NetworkMappingProperties network Mapping Properties. 9942type NetworkMappingProperties struct { 9943 // State - The pairing state for network mapping. 9944 State *string `json:"state,omitempty"` 9945 // PrimaryNetworkFriendlyName - The primary network friendly name. 9946 PrimaryNetworkFriendlyName *string `json:"primaryNetworkFriendlyName,omitempty"` 9947 // PrimaryNetworkID - The primary network id for network mapping. 9948 PrimaryNetworkID *string `json:"primaryNetworkId,omitempty"` 9949 // PrimaryFabricFriendlyName - The primary fabric friendly name. 9950 PrimaryFabricFriendlyName *string `json:"primaryFabricFriendlyName,omitempty"` 9951 // RecoveryNetworkFriendlyName - The recovery network friendly name. 9952 RecoveryNetworkFriendlyName *string `json:"recoveryNetworkFriendlyName,omitempty"` 9953 // RecoveryNetworkID - The recovery network id for network mapping. 9954 RecoveryNetworkID *string `json:"recoveryNetworkId,omitempty"` 9955 // RecoveryFabricArmID - The recovery fabric ARM id. 9956 RecoveryFabricArmID *string `json:"recoveryFabricArmId,omitempty"` 9957 // RecoveryFabricFriendlyName - The recovery fabric friendly name. 9958 RecoveryFabricFriendlyName *string `json:"recoveryFabricFriendlyName,omitempty"` 9959 // FabricSpecificSettings - The fabric specific settings. 9960 FabricSpecificSettings BasicNetworkMappingFabricSpecificSettings `json:"fabricSpecificSettings,omitempty"` 9961} 9962 9963// UnmarshalJSON is the custom unmarshaler for NetworkMappingProperties struct. 9964func (nmp *NetworkMappingProperties) UnmarshalJSON(body []byte) error { 9965 var m map[string]*json.RawMessage 9966 err := json.Unmarshal(body, &m) 9967 if err != nil { 9968 return err 9969 } 9970 for k, v := range m { 9971 switch k { 9972 case "state": 9973 if v != nil { 9974 var state string 9975 err = json.Unmarshal(*v, &state) 9976 if err != nil { 9977 return err 9978 } 9979 nmp.State = &state 9980 } 9981 case "primaryNetworkFriendlyName": 9982 if v != nil { 9983 var primaryNetworkFriendlyName string 9984 err = json.Unmarshal(*v, &primaryNetworkFriendlyName) 9985 if err != nil { 9986 return err 9987 } 9988 nmp.PrimaryNetworkFriendlyName = &primaryNetworkFriendlyName 9989 } 9990 case "primaryNetworkId": 9991 if v != nil { 9992 var primaryNetworkID string 9993 err = json.Unmarshal(*v, &primaryNetworkID) 9994 if err != nil { 9995 return err 9996 } 9997 nmp.PrimaryNetworkID = &primaryNetworkID 9998 } 9999 case "primaryFabricFriendlyName": 10000 if v != nil { 10001 var primaryFabricFriendlyName string 10002 err = json.Unmarshal(*v, &primaryFabricFriendlyName) 10003 if err != nil { 10004 return err 10005 } 10006 nmp.PrimaryFabricFriendlyName = &primaryFabricFriendlyName 10007 } 10008 case "recoveryNetworkFriendlyName": 10009 if v != nil { 10010 var recoveryNetworkFriendlyName string 10011 err = json.Unmarshal(*v, &recoveryNetworkFriendlyName) 10012 if err != nil { 10013 return err 10014 } 10015 nmp.RecoveryNetworkFriendlyName = &recoveryNetworkFriendlyName 10016 } 10017 case "recoveryNetworkId": 10018 if v != nil { 10019 var recoveryNetworkID string 10020 err = json.Unmarshal(*v, &recoveryNetworkID) 10021 if err != nil { 10022 return err 10023 } 10024 nmp.RecoveryNetworkID = &recoveryNetworkID 10025 } 10026 case "recoveryFabricArmId": 10027 if v != nil { 10028 var recoveryFabricArmID string 10029 err = json.Unmarshal(*v, &recoveryFabricArmID) 10030 if err != nil { 10031 return err 10032 } 10033 nmp.RecoveryFabricArmID = &recoveryFabricArmID 10034 } 10035 case "recoveryFabricFriendlyName": 10036 if v != nil { 10037 var recoveryFabricFriendlyName string 10038 err = json.Unmarshal(*v, &recoveryFabricFriendlyName) 10039 if err != nil { 10040 return err 10041 } 10042 nmp.RecoveryFabricFriendlyName = &recoveryFabricFriendlyName 10043 } 10044 case "fabricSpecificSettings": 10045 if v != nil { 10046 fabricSpecificSettings, err := unmarshalBasicNetworkMappingFabricSpecificSettings(*v) 10047 if err != nil { 10048 return err 10049 } 10050 nmp.FabricSpecificSettings = fabricSpecificSettings 10051 } 10052 } 10053 } 10054 10055 return nil 10056} 10057 10058// NetworkProperties network Properties 10059type NetworkProperties struct { 10060 // FabricType - The Fabric Type. 10061 FabricType *string `json:"fabricType,omitempty"` 10062 // Subnets - The List of subnets. 10063 Subnets *[]Subnet `json:"subnets,omitempty"` 10064 // FriendlyName - The Friendly Name. 10065 FriendlyName *string `json:"friendlyName,omitempty"` 10066 // NetworkType - The Network Type. 10067 NetworkType *string `json:"networkType,omitempty"` 10068} 10069 10070// OperationsDiscovery operations discovery class. 10071type OperationsDiscovery struct { 10072 // 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) 10073 Name *string `json:"name,omitempty"` 10074 // Display - Object type 10075 Display *Display `json:"display,omitempty"` 10076 // 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" 10077 Origin *string `json:"origin,omitempty"` 10078 // Properties - Properties. Reserved for future use. 10079 Properties interface{} `json:"properties,omitempty"` 10080} 10081 10082// OperationsDiscoveryCollection collection of ClientDiscovery details. 10083type OperationsDiscoveryCollection struct { 10084 autorest.Response `json:"-"` 10085 // Value - The ClientDiscovery details. 10086 Value *[]OperationsDiscovery `json:"value,omitempty"` 10087 // NextLink - The value of next link. 10088 NextLink *string `json:"nextLink,omitempty"` 10089} 10090 10091// OperationsDiscoveryCollectionIterator provides access to a complete listing of OperationsDiscovery 10092// values. 10093type OperationsDiscoveryCollectionIterator struct { 10094 i int 10095 page OperationsDiscoveryCollectionPage 10096} 10097 10098// NextWithContext advances to the next value. If there was an error making 10099// the request the iterator does not advance and the error is returned. 10100func (iter *OperationsDiscoveryCollectionIterator) NextWithContext(ctx context.Context) (err error) { 10101 if tracing.IsEnabled() { 10102 ctx = tracing.StartSpan(ctx, fqdn+"/OperationsDiscoveryCollectionIterator.NextWithContext") 10103 defer func() { 10104 sc := -1 10105 if iter.Response().Response.Response != nil { 10106 sc = iter.Response().Response.Response.StatusCode 10107 } 10108 tracing.EndSpan(ctx, sc, err) 10109 }() 10110 } 10111 iter.i++ 10112 if iter.i < len(iter.page.Values()) { 10113 return nil 10114 } 10115 err = iter.page.NextWithContext(ctx) 10116 if err != nil { 10117 iter.i-- 10118 return err 10119 } 10120 iter.i = 0 10121 return nil 10122} 10123 10124// Next advances to the next value. If there was an error making 10125// the request the iterator does not advance and the error is returned. 10126// Deprecated: Use NextWithContext() instead. 10127func (iter *OperationsDiscoveryCollectionIterator) Next() error { 10128 return iter.NextWithContext(context.Background()) 10129} 10130 10131// NotDone returns true if the enumeration should be started or is not yet complete. 10132func (iter OperationsDiscoveryCollectionIterator) NotDone() bool { 10133 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 10134} 10135 10136// Response returns the raw server response from the last page request. 10137func (iter OperationsDiscoveryCollectionIterator) Response() OperationsDiscoveryCollection { 10138 return iter.page.Response() 10139} 10140 10141// Value returns the current value or a zero-initialized value if the 10142// iterator has advanced beyond the end of the collection. 10143func (iter OperationsDiscoveryCollectionIterator) Value() OperationsDiscovery { 10144 if !iter.page.NotDone() { 10145 return OperationsDiscovery{} 10146 } 10147 return iter.page.Values()[iter.i] 10148} 10149 10150// Creates a new instance of the OperationsDiscoveryCollectionIterator type. 10151func NewOperationsDiscoveryCollectionIterator(page OperationsDiscoveryCollectionPage) OperationsDiscoveryCollectionIterator { 10152 return OperationsDiscoveryCollectionIterator{page: page} 10153} 10154 10155// IsEmpty returns true if the ListResult contains no values. 10156func (odc OperationsDiscoveryCollection) IsEmpty() bool { 10157 return odc.Value == nil || len(*odc.Value) == 0 10158} 10159 10160// hasNextLink returns true if the NextLink is not empty. 10161func (odc OperationsDiscoveryCollection) hasNextLink() bool { 10162 return odc.NextLink != nil && len(*odc.NextLink) != 0 10163} 10164 10165// operationsDiscoveryCollectionPreparer prepares a request to retrieve the next set of results. 10166// It returns nil if no more results exist. 10167func (odc OperationsDiscoveryCollection) operationsDiscoveryCollectionPreparer(ctx context.Context) (*http.Request, error) { 10168 if !odc.hasNextLink() { 10169 return nil, nil 10170 } 10171 return autorest.Prepare((&http.Request{}).WithContext(ctx), 10172 autorest.AsJSON(), 10173 autorest.AsGet(), 10174 autorest.WithBaseURL(to.String(odc.NextLink))) 10175} 10176 10177// OperationsDiscoveryCollectionPage contains a page of OperationsDiscovery values. 10178type OperationsDiscoveryCollectionPage struct { 10179 fn func(context.Context, OperationsDiscoveryCollection) (OperationsDiscoveryCollection, error) 10180 odc OperationsDiscoveryCollection 10181} 10182 10183// NextWithContext advances to the next page of values. If there was an error making 10184// the request the page does not advance and the error is returned. 10185func (page *OperationsDiscoveryCollectionPage) NextWithContext(ctx context.Context) (err error) { 10186 if tracing.IsEnabled() { 10187 ctx = tracing.StartSpan(ctx, fqdn+"/OperationsDiscoveryCollectionPage.NextWithContext") 10188 defer func() { 10189 sc := -1 10190 if page.Response().Response.Response != nil { 10191 sc = page.Response().Response.Response.StatusCode 10192 } 10193 tracing.EndSpan(ctx, sc, err) 10194 }() 10195 } 10196 for { 10197 next, err := page.fn(ctx, page.odc) 10198 if err != nil { 10199 return err 10200 } 10201 page.odc = next 10202 if !next.hasNextLink() || !next.IsEmpty() { 10203 break 10204 } 10205 } 10206 return nil 10207} 10208 10209// Next advances to the next page of values. If there was an error making 10210// the request the page does not advance and the error is returned. 10211// Deprecated: Use NextWithContext() instead. 10212func (page *OperationsDiscoveryCollectionPage) Next() error { 10213 return page.NextWithContext(context.Background()) 10214} 10215 10216// NotDone returns true if the page enumeration should be started or is not yet complete. 10217func (page OperationsDiscoveryCollectionPage) NotDone() bool { 10218 return !page.odc.IsEmpty() 10219} 10220 10221// Response returns the raw server response from the last page request. 10222func (page OperationsDiscoveryCollectionPage) Response() OperationsDiscoveryCollection { 10223 return page.odc 10224} 10225 10226// Values returns the slice of values for the current page or nil if there are no values. 10227func (page OperationsDiscoveryCollectionPage) Values() []OperationsDiscovery { 10228 if page.odc.IsEmpty() { 10229 return nil 10230 } 10231 return *page.odc.Value 10232} 10233 10234// Creates a new instance of the OperationsDiscoveryCollectionPage type. 10235func NewOperationsDiscoveryCollectionPage(cur OperationsDiscoveryCollection, getNextPage func(context.Context, OperationsDiscoveryCollection) (OperationsDiscoveryCollection, error)) OperationsDiscoveryCollectionPage { 10236 return OperationsDiscoveryCollectionPage{ 10237 fn: getNextPage, 10238 odc: cur, 10239 } 10240} 10241 10242// OSDetails disk Details. 10243type OSDetails struct { 10244 // OsType - VM Disk details. 10245 OsType *string `json:"osType,omitempty"` 10246 // ProductType - Product type. 10247 ProductType *string `json:"productType,omitempty"` 10248 // OsEdition - The OSEdition. 10249 OsEdition *string `json:"osEdition,omitempty"` 10250 // OSVersion - The OS Version. 10251 OSVersion *string `json:"oSVersion,omitempty"` 10252 // OSMajorVersion - The OS Major Version. 10253 OSMajorVersion *string `json:"oSMajorVersion,omitempty"` 10254 // OSMinorVersion - The OS Minor Version. 10255 OSMinorVersion *string `json:"oSMinorVersion,omitempty"` 10256} 10257 10258// OSDiskDetails details of the OS Disk. 10259type OSDiskDetails struct { 10260 // OsVhdID - The id of the disk containing the OS. 10261 OsVhdID *string `json:"osVhdId,omitempty"` 10262 // OsType - The type of the OS on the VM. 10263 OsType *string `json:"osType,omitempty"` 10264 // VhdName - The OS disk VHD name. 10265 VhdName *string `json:"vhdName,omitempty"` 10266} 10267 10268// PlannedFailoverInput input definition for planned failover. 10269type PlannedFailoverInput struct { 10270 // Properties - Planned failover input properties 10271 Properties *PlannedFailoverInputProperties `json:"properties,omitempty"` 10272} 10273 10274// PlannedFailoverInputProperties input definition for planned failover input properties. 10275type PlannedFailoverInputProperties struct { 10276 // FailoverDirection - Failover direction. 10277 FailoverDirection *string `json:"failoverDirection,omitempty"` 10278 // ProviderSpecificDetails - Provider specific settings 10279 ProviderSpecificDetails BasicProviderSpecificFailoverInput `json:"providerSpecificDetails,omitempty"` 10280} 10281 10282// UnmarshalJSON is the custom unmarshaler for PlannedFailoverInputProperties struct. 10283func (pfip *PlannedFailoverInputProperties) UnmarshalJSON(body []byte) error { 10284 var m map[string]*json.RawMessage 10285 err := json.Unmarshal(body, &m) 10286 if err != nil { 10287 return err 10288 } 10289 for k, v := range m { 10290 switch k { 10291 case "failoverDirection": 10292 if v != nil { 10293 var failoverDirection string 10294 err = json.Unmarshal(*v, &failoverDirection) 10295 if err != nil { 10296 return err 10297 } 10298 pfip.FailoverDirection = &failoverDirection 10299 } 10300 case "providerSpecificDetails": 10301 if v != nil { 10302 providerSpecificDetails, err := unmarshalBasicProviderSpecificFailoverInput(*v) 10303 if err != nil { 10304 return err 10305 } 10306 pfip.ProviderSpecificDetails = providerSpecificDetails 10307 } 10308 } 10309 } 10310 10311 return nil 10312} 10313 10314// Policy protection profile details. 10315type Policy struct { 10316 autorest.Response `json:"-"` 10317 // Properties - The custom data. 10318 Properties *PolicyProperties `json:"properties,omitempty"` 10319 // ID - READ-ONLY; Resource Id 10320 ID *string `json:"id,omitempty"` 10321 // Name - READ-ONLY; Resource Name 10322 Name *string `json:"name,omitempty"` 10323 // Type - READ-ONLY; Resource Type 10324 Type *string `json:"type,omitempty"` 10325 // Location - Resource Location 10326 Location *string `json:"location,omitempty"` 10327} 10328 10329// MarshalJSON is the custom marshaler for Policy. 10330func (p Policy) MarshalJSON() ([]byte, error) { 10331 objectMap := make(map[string]interface{}) 10332 if p.Properties != nil { 10333 objectMap["properties"] = p.Properties 10334 } 10335 if p.Location != nil { 10336 objectMap["location"] = p.Location 10337 } 10338 return json.Marshal(objectMap) 10339} 10340 10341// PolicyCollection protection Profile Collection details. 10342type PolicyCollection struct { 10343 autorest.Response `json:"-"` 10344 // Value - The policy details. 10345 Value *[]Policy `json:"value,omitempty"` 10346 // NextLink - The value of next link. 10347 NextLink *string `json:"nextLink,omitempty"` 10348} 10349 10350// PolicyCollectionIterator provides access to a complete listing of Policy values. 10351type PolicyCollectionIterator struct { 10352 i int 10353 page PolicyCollectionPage 10354} 10355 10356// NextWithContext advances to the next value. If there was an error making 10357// the request the iterator does not advance and the error is returned. 10358func (iter *PolicyCollectionIterator) NextWithContext(ctx context.Context) (err error) { 10359 if tracing.IsEnabled() { 10360 ctx = tracing.StartSpan(ctx, fqdn+"/PolicyCollectionIterator.NextWithContext") 10361 defer func() { 10362 sc := -1 10363 if iter.Response().Response.Response != nil { 10364 sc = iter.Response().Response.Response.StatusCode 10365 } 10366 tracing.EndSpan(ctx, sc, err) 10367 }() 10368 } 10369 iter.i++ 10370 if iter.i < len(iter.page.Values()) { 10371 return nil 10372 } 10373 err = iter.page.NextWithContext(ctx) 10374 if err != nil { 10375 iter.i-- 10376 return err 10377 } 10378 iter.i = 0 10379 return nil 10380} 10381 10382// Next advances to the next value. If there was an error making 10383// the request the iterator does not advance and the error is returned. 10384// Deprecated: Use NextWithContext() instead. 10385func (iter *PolicyCollectionIterator) Next() error { 10386 return iter.NextWithContext(context.Background()) 10387} 10388 10389// NotDone returns true if the enumeration should be started or is not yet complete. 10390func (iter PolicyCollectionIterator) NotDone() bool { 10391 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 10392} 10393 10394// Response returns the raw server response from the last page request. 10395func (iter PolicyCollectionIterator) Response() PolicyCollection { 10396 return iter.page.Response() 10397} 10398 10399// Value returns the current value or a zero-initialized value if the 10400// iterator has advanced beyond the end of the collection. 10401func (iter PolicyCollectionIterator) Value() Policy { 10402 if !iter.page.NotDone() { 10403 return Policy{} 10404 } 10405 return iter.page.Values()[iter.i] 10406} 10407 10408// Creates a new instance of the PolicyCollectionIterator type. 10409func NewPolicyCollectionIterator(page PolicyCollectionPage) PolicyCollectionIterator { 10410 return PolicyCollectionIterator{page: page} 10411} 10412 10413// IsEmpty returns true if the ListResult contains no values. 10414func (pc PolicyCollection) IsEmpty() bool { 10415 return pc.Value == nil || len(*pc.Value) == 0 10416} 10417 10418// hasNextLink returns true if the NextLink is not empty. 10419func (pc PolicyCollection) hasNextLink() bool { 10420 return pc.NextLink != nil && len(*pc.NextLink) != 0 10421} 10422 10423// policyCollectionPreparer prepares a request to retrieve the next set of results. 10424// It returns nil if no more results exist. 10425func (pc PolicyCollection) policyCollectionPreparer(ctx context.Context) (*http.Request, error) { 10426 if !pc.hasNextLink() { 10427 return nil, nil 10428 } 10429 return autorest.Prepare((&http.Request{}).WithContext(ctx), 10430 autorest.AsJSON(), 10431 autorest.AsGet(), 10432 autorest.WithBaseURL(to.String(pc.NextLink))) 10433} 10434 10435// PolicyCollectionPage contains a page of Policy values. 10436type PolicyCollectionPage struct { 10437 fn func(context.Context, PolicyCollection) (PolicyCollection, error) 10438 pc PolicyCollection 10439} 10440 10441// NextWithContext advances to the next page of values. If there was an error making 10442// the request the page does not advance and the error is returned. 10443func (page *PolicyCollectionPage) NextWithContext(ctx context.Context) (err error) { 10444 if tracing.IsEnabled() { 10445 ctx = tracing.StartSpan(ctx, fqdn+"/PolicyCollectionPage.NextWithContext") 10446 defer func() { 10447 sc := -1 10448 if page.Response().Response.Response != nil { 10449 sc = page.Response().Response.Response.StatusCode 10450 } 10451 tracing.EndSpan(ctx, sc, err) 10452 }() 10453 } 10454 for { 10455 next, err := page.fn(ctx, page.pc) 10456 if err != nil { 10457 return err 10458 } 10459 page.pc = next 10460 if !next.hasNextLink() || !next.IsEmpty() { 10461 break 10462 } 10463 } 10464 return nil 10465} 10466 10467// Next advances to the next page of values. If there was an error making 10468// the request the page does not advance and the error is returned. 10469// Deprecated: Use NextWithContext() instead. 10470func (page *PolicyCollectionPage) Next() error { 10471 return page.NextWithContext(context.Background()) 10472} 10473 10474// NotDone returns true if the page enumeration should be started or is not yet complete. 10475func (page PolicyCollectionPage) NotDone() bool { 10476 return !page.pc.IsEmpty() 10477} 10478 10479// Response returns the raw server response from the last page request. 10480func (page PolicyCollectionPage) Response() PolicyCollection { 10481 return page.pc 10482} 10483 10484// Values returns the slice of values for the current page or nil if there are no values. 10485func (page PolicyCollectionPage) Values() []Policy { 10486 if page.pc.IsEmpty() { 10487 return nil 10488 } 10489 return *page.pc.Value 10490} 10491 10492// Creates a new instance of the PolicyCollectionPage type. 10493func NewPolicyCollectionPage(cur PolicyCollection, getNextPage func(context.Context, PolicyCollection) (PolicyCollection, error)) PolicyCollectionPage { 10494 return PolicyCollectionPage{ 10495 fn: getNextPage, 10496 pc: cur, 10497 } 10498} 10499 10500// PolicyProperties protection profile custom data details. 10501type PolicyProperties struct { 10502 // FriendlyName - The FriendlyName. 10503 FriendlyName *string `json:"friendlyName,omitempty"` 10504 // ProviderSpecificDetails - The ReplicationChannelSetting. 10505 ProviderSpecificDetails BasicPolicyProviderSpecificDetails `json:"providerSpecificDetails,omitempty"` 10506} 10507 10508// UnmarshalJSON is the custom unmarshaler for PolicyProperties struct. 10509func (pp *PolicyProperties) UnmarshalJSON(body []byte) error { 10510 var m map[string]*json.RawMessage 10511 err := json.Unmarshal(body, &m) 10512 if err != nil { 10513 return err 10514 } 10515 for k, v := range m { 10516 switch k { 10517 case "friendlyName": 10518 if v != nil { 10519 var friendlyName string 10520 err = json.Unmarshal(*v, &friendlyName) 10521 if err != nil { 10522 return err 10523 } 10524 pp.FriendlyName = &friendlyName 10525 } 10526 case "providerSpecificDetails": 10527 if v != nil { 10528 providerSpecificDetails, err := unmarshalBasicPolicyProviderSpecificDetails(*v) 10529 if err != nil { 10530 return err 10531 } 10532 pp.ProviderSpecificDetails = providerSpecificDetails 10533 } 10534 } 10535 } 10536 10537 return nil 10538} 10539 10540// BasicPolicyProviderSpecificDetails base class for Provider specific details for policies. 10541type BasicPolicyProviderSpecificDetails interface { 10542 AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) 10543 AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) 10544 AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) 10545 AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) 10546 AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) 10547 AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) 10548 AsInMagePolicyDetails() (*InMagePolicyDetails, bool) 10549 AsA2APolicyDetails() (*A2APolicyDetails, bool) 10550 AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) 10551 AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) 10552 AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) 10553} 10554 10555// PolicyProviderSpecificDetails base class for Provider specific details for policies. 10556type PolicyProviderSpecificDetails struct { 10557 // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypePolicyProviderSpecificDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt' 10558 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"` 10559} 10560 10561func unmarshalBasicPolicyProviderSpecificDetails(body []byte) (BasicPolicyProviderSpecificDetails, error) { 10562 var m map[string]interface{} 10563 err := json.Unmarshal(body, &m) 10564 if err != nil { 10565 return nil, err 10566 } 10567 10568 switch m["instanceType"] { 10569 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure): 10570 var hvrapd HyperVReplicaAzurePolicyDetails 10571 err := json.Unmarshal(body, &hvrapd) 10572 return hvrapd, err 10573 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails): 10574 var hvrbpd HyperVReplicaBasePolicyDetails 10575 err := json.Unmarshal(body, &hvrbpd) 10576 return hvrbpd, err 10577 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012): 10578 var hvrpd HyperVReplicaPolicyDetails 10579 err := json.Unmarshal(body, &hvrpd) 10580 return hvrpd, err 10581 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2): 10582 var hvrbpd HyperVReplicaBluePolicyDetails 10583 err := json.Unmarshal(body, &hvrbpd) 10584 return hvrbpd, err 10585 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails): 10586 var imbpd InMageBasePolicyDetails 10587 err := json.Unmarshal(body, &imbpd) 10588 return imbpd, err 10589 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2): 10590 var imavpd InMageAzureV2PolicyDetails 10591 err := json.Unmarshal(body, &imavpd) 10592 return imavpd, err 10593 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage): 10594 var impd InMagePolicyDetails 10595 err := json.Unmarshal(body, &impd) 10596 return impd, err 10597 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A): 10598 var apd A2APolicyDetails 10599 err := json.Unmarshal(body, &apd) 10600 return apd, err 10601 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration): 10602 var rampd RcmAzureMigrationPolicyDetails 10603 err := json.Unmarshal(body, &rampd) 10604 return rampd, err 10605 case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt): 10606 var vcpd VmwareCbtPolicyDetails 10607 err := json.Unmarshal(body, &vcpd) 10608 return vcpd, err 10609 default: 10610 var ppsd PolicyProviderSpecificDetails 10611 err := json.Unmarshal(body, &ppsd) 10612 return ppsd, err 10613 } 10614} 10615func unmarshalBasicPolicyProviderSpecificDetailsArray(body []byte) ([]BasicPolicyProviderSpecificDetails, error) { 10616 var rawMessages []*json.RawMessage 10617 err := json.Unmarshal(body, &rawMessages) 10618 if err != nil { 10619 return nil, err 10620 } 10621 10622 ppsdArray := make([]BasicPolicyProviderSpecificDetails, len(rawMessages)) 10623 10624 for index, rawMessage := range rawMessages { 10625 ppsd, err := unmarshalBasicPolicyProviderSpecificDetails(*rawMessage) 10626 if err != nil { 10627 return nil, err 10628 } 10629 ppsdArray[index] = ppsd 10630 } 10631 return ppsdArray, nil 10632} 10633 10634// MarshalJSON is the custom marshaler for PolicyProviderSpecificDetails. 10635func (ppsd PolicyProviderSpecificDetails) MarshalJSON() ([]byte, error) { 10636 ppsd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypePolicyProviderSpecificDetails 10637 objectMap := make(map[string]interface{}) 10638 if ppsd.InstanceType != "" { 10639 objectMap["instanceType"] = ppsd.InstanceType 10640 } 10641 return json.Marshal(objectMap) 10642} 10643 10644// AsHyperVReplicaAzurePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for PolicyProviderSpecificDetails. 10645func (ppsd PolicyProviderSpecificDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) { 10646 return nil, false 10647} 10648 10649// AsHyperVReplicaBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for PolicyProviderSpecificDetails. 10650func (ppsd PolicyProviderSpecificDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) { 10651 return nil, false 10652} 10653 10654// AsHyperVReplicaPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for PolicyProviderSpecificDetails. 10655func (ppsd PolicyProviderSpecificDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) { 10656 return nil, false 10657} 10658 10659// AsHyperVReplicaBluePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for PolicyProviderSpecificDetails. 10660func (ppsd PolicyProviderSpecificDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) { 10661 return nil, false 10662} 10663 10664// AsInMageBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for PolicyProviderSpecificDetails. 10665func (ppsd PolicyProviderSpecificDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) { 10666 return nil, false 10667} 10668 10669// AsInMageAzureV2PolicyDetails is the BasicPolicyProviderSpecificDetails implementation for PolicyProviderSpecificDetails. 10670func (ppsd PolicyProviderSpecificDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) { 10671 return nil, false 10672} 10673 10674// AsInMagePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for PolicyProviderSpecificDetails. 10675func (ppsd PolicyProviderSpecificDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) { 10676 return nil, false 10677} 10678 10679// AsA2APolicyDetails is the BasicPolicyProviderSpecificDetails implementation for PolicyProviderSpecificDetails. 10680func (ppsd PolicyProviderSpecificDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) { 10681 return nil, false 10682} 10683 10684// AsRcmAzureMigrationPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for PolicyProviderSpecificDetails. 10685func (ppsd PolicyProviderSpecificDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) { 10686 return nil, false 10687} 10688 10689// AsVmwareCbtPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for PolicyProviderSpecificDetails. 10690func (ppsd PolicyProviderSpecificDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) { 10691 return nil, false 10692} 10693 10694// AsPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for PolicyProviderSpecificDetails. 10695func (ppsd PolicyProviderSpecificDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) { 10696 return &ppsd, true 10697} 10698 10699// AsBasicPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for PolicyProviderSpecificDetails. 10700func (ppsd PolicyProviderSpecificDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) { 10701 return &ppsd, true 10702} 10703 10704// BasicPolicyProviderSpecificInput base class for provider specific input 10705type BasicPolicyProviderSpecificInput interface { 10706 AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) 10707 AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) 10708 AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) 10709 AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) 10710 AsInMagePolicyInput() (*InMagePolicyInput, bool) 10711 AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) 10712 AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) 10713 AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) 10714} 10715 10716// PolicyProviderSpecificInput base class for provider specific input 10717type PolicyProviderSpecificInput struct { 10718 // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypePolicyProviderSpecificInput', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeVMwareCbt' 10719 InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"` 10720} 10721 10722func unmarshalBasicPolicyProviderSpecificInput(body []byte) (BasicPolicyProviderSpecificInput, error) { 10723 var m map[string]interface{} 10724 err := json.Unmarshal(body, &m) 10725 if err != nil { 10726 return nil, err 10727 } 10728 10729 switch m["instanceType"] { 10730 case string(InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplicaAzure): 10731 var hvrapi HyperVReplicaAzurePolicyInput 10732 err := json.Unmarshal(body, &hvrapi) 10733 return hvrapi, err 10734 case string(InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012): 10735 var hvrpi HyperVReplicaPolicyInput 10736 err := json.Unmarshal(body, &hvrpi) 10737 return hvrpi, err 10738 case string(InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012R2): 10739 var hvrbpi HyperVReplicaBluePolicyInput 10740 err := json.Unmarshal(body, &hvrbpi) 10741 return hvrbpi, err 10742 case string(InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMageAzureV2): 10743 var imavpi InMageAzureV2PolicyInput 10744 err := json.Unmarshal(body, &imavpi) 10745 return imavpi, err 10746 case string(InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMage): 10747 var impi InMagePolicyInput 10748 err := json.Unmarshal(body, &impi) 10749 return impi, err 10750 case string(InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeA2A): 10751 var apci A2APolicyCreationInput 10752 err := json.Unmarshal(body, &apci) 10753 return apci, err 10754 case string(InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeVMwareCbt): 10755 var vmcpci VMwareCbtPolicyCreationInput 10756 err := json.Unmarshal(body, &vmcpci) 10757 return vmcpci, err 10758 default: 10759 var ppsi PolicyProviderSpecificInput 10760 err := json.Unmarshal(body, &ppsi) 10761 return ppsi, err 10762 } 10763} 10764func unmarshalBasicPolicyProviderSpecificInputArray(body []byte) ([]BasicPolicyProviderSpecificInput, error) { 10765 var rawMessages []*json.RawMessage 10766 err := json.Unmarshal(body, &rawMessages) 10767 if err != nil { 10768 return nil, err 10769 } 10770 10771 ppsiArray := make([]BasicPolicyProviderSpecificInput, len(rawMessages)) 10772 10773 for index, rawMessage := range rawMessages { 10774 ppsi, err := unmarshalBasicPolicyProviderSpecificInput(*rawMessage) 10775 if err != nil { 10776 return nil, err 10777 } 10778 ppsiArray[index] = ppsi 10779 } 10780 return ppsiArray, nil 10781} 10782 10783// MarshalJSON is the custom marshaler for PolicyProviderSpecificInput. 10784func (ppsi PolicyProviderSpecificInput) MarshalJSON() ([]byte, error) { 10785 ppsi.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypePolicyProviderSpecificInput 10786 objectMap := make(map[string]interface{}) 10787 if ppsi.InstanceType != "" { 10788 objectMap["instanceType"] = ppsi.InstanceType 10789 } 10790 return json.Marshal(objectMap) 10791} 10792 10793// AsHyperVReplicaAzurePolicyInput is the BasicPolicyProviderSpecificInput implementation for PolicyProviderSpecificInput. 10794func (ppsi PolicyProviderSpecificInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) { 10795 return nil, false 10796} 10797 10798// AsHyperVReplicaPolicyInput is the BasicPolicyProviderSpecificInput implementation for PolicyProviderSpecificInput. 10799func (ppsi PolicyProviderSpecificInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) { 10800 return nil, false 10801} 10802 10803// AsHyperVReplicaBluePolicyInput is the BasicPolicyProviderSpecificInput implementation for PolicyProviderSpecificInput. 10804func (ppsi PolicyProviderSpecificInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) { 10805 return nil, false 10806} 10807 10808// AsInMageAzureV2PolicyInput is the BasicPolicyProviderSpecificInput implementation for PolicyProviderSpecificInput. 10809func (ppsi PolicyProviderSpecificInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) { 10810 return nil, false 10811} 10812 10813// AsInMagePolicyInput is the BasicPolicyProviderSpecificInput implementation for PolicyProviderSpecificInput. 10814func (ppsi PolicyProviderSpecificInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) { 10815 return nil, false 10816} 10817 10818// AsA2APolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for PolicyProviderSpecificInput. 10819func (ppsi PolicyProviderSpecificInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) { 10820 return nil, false 10821} 10822 10823// AsVMwareCbtPolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for PolicyProviderSpecificInput. 10824func (ppsi PolicyProviderSpecificInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) { 10825 return nil, false 10826} 10827 10828// AsPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for PolicyProviderSpecificInput. 10829func (ppsi PolicyProviderSpecificInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) { 10830 return &ppsi, true 10831} 10832 10833// AsBasicPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for PolicyProviderSpecificInput. 10834func (ppsi PolicyProviderSpecificInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) { 10835 return &ppsi, true 10836} 10837 10838// ProcessServer details of the Process Server. 10839type ProcessServer struct { 10840 // FriendlyName - The Process Server's friendly name. 10841 FriendlyName *string `json:"friendlyName,omitempty"` 10842 // ID - The Process Server Id. 10843 ID *string `json:"id,omitempty"` 10844 // IPAddress - The IP address of the server. 10845 IPAddress *string `json:"ipAddress,omitempty"` 10846 // OsType - The OS type of the server. 10847 OsType *string `json:"osType,omitempty"` 10848 // AgentVersion - The version of the scout component on the server. 10849 AgentVersion *string `json:"agentVersion,omitempty"` 10850 // LastHeartbeat - The last heartbeat received from the server. 10851 LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"` 10852 // VersionStatus - Version status 10853 VersionStatus *string `json:"versionStatus,omitempty"` 10854 // MobilityServiceUpdates - The list of the mobility service updates available on the Process Server. 10855 MobilityServiceUpdates *[]MobilityServiceUpdate `json:"mobilityServiceUpdates,omitempty"` 10856 // HostID - The agent generated Id. 10857 HostID *string `json:"hostId,omitempty"` 10858 // MachineCount - The servers configured with this PS. 10859 MachineCount *string `json:"machineCount,omitempty"` 10860 // ReplicationPairCount - The number of replication pairs configured in this PS. 10861 ReplicationPairCount *string `json:"replicationPairCount,omitempty"` 10862 // SystemLoad - The percentage of the system load. 10863 SystemLoad *string `json:"systemLoad,omitempty"` 10864 // SystemLoadStatus - The system load status. 10865 SystemLoadStatus *string `json:"systemLoadStatus,omitempty"` 10866 // CPULoad - The percentage of the CPU load. 10867 CPULoad *string `json:"cpuLoad,omitempty"` 10868 // CPULoadStatus - The CPU load status. 10869 CPULoadStatus *string `json:"cpuLoadStatus,omitempty"` 10870 // TotalMemoryInBytes - The total memory. 10871 TotalMemoryInBytes *int64 `json:"totalMemoryInBytes,omitempty"` 10872 // AvailableMemoryInBytes - The available memory. 10873 AvailableMemoryInBytes *int64 `json:"availableMemoryInBytes,omitempty"` 10874 // MemoryUsageStatus - The memory usage status. 10875 MemoryUsageStatus *string `json:"memoryUsageStatus,omitempty"` 10876 // TotalSpaceInBytes - The total space. 10877 TotalSpaceInBytes *int64 `json:"totalSpaceInBytes,omitempty"` 10878 // AvailableSpaceInBytes - The available space. 10879 AvailableSpaceInBytes *int64 `json:"availableSpaceInBytes,omitempty"` 10880 // SpaceUsageStatus - The space usage status. 10881 SpaceUsageStatus *string `json:"spaceUsageStatus,omitempty"` 10882 // PsServiceStatus - The PS service status. 10883 PsServiceStatus *string `json:"psServiceStatus,omitempty"` 10884 // SslCertExpiryDate - The PS SSL cert expiry date. 10885 SslCertExpiryDate *date.Time `json:"sslCertExpiryDate,omitempty"` 10886 // SslCertExpiryRemainingDays - CS SSL cert expiry date. 10887 SslCertExpiryRemainingDays *int32 `json:"sslCertExpiryRemainingDays,omitempty"` 10888 // OsVersion - OS Version of the process server. Note: This will get populated if user has CS version greater than 9.12.0.0. 10889 OsVersion *string `json:"osVersion,omitempty"` 10890} 10891 10892// ProtectableItem replication protected item 10893type ProtectableItem struct { 10894 autorest.Response `json:"-"` 10895 // Properties - The custom data. 10896 Properties *ProtectableItemProperties `json:"properties,omitempty"` 10897 // ID - READ-ONLY; Resource Id 10898 ID *string `json:"id,omitempty"` 10899 // Name - READ-ONLY; Resource Name 10900 Name *string `json:"name,omitempty"` 10901 // Type - READ-ONLY; Resource Type 10902 Type *string `json:"type,omitempty"` 10903 // Location - Resource Location 10904 Location *string `json:"location,omitempty"` 10905} 10906 10907// MarshalJSON is the custom marshaler for ProtectableItem. 10908func (pi ProtectableItem) MarshalJSON() ([]byte, error) { 10909 objectMap := make(map[string]interface{}) 10910 if pi.Properties != nil { 10911 objectMap["properties"] = pi.Properties 10912 } 10913 if pi.Location != nil { 10914 objectMap["location"] = pi.Location 10915 } 10916 return json.Marshal(objectMap) 10917} 10918 10919// ProtectableItemCollection protectable item collection. 10920type ProtectableItemCollection struct { 10921 autorest.Response `json:"-"` 10922 // Value - The Protectable item details. 10923 Value *[]ProtectableItem `json:"value,omitempty"` 10924 // NextLink - The value of next link. 10925 NextLink *string `json:"nextLink,omitempty"` 10926} 10927 10928// ProtectableItemCollectionIterator provides access to a complete listing of ProtectableItem values. 10929type ProtectableItemCollectionIterator struct { 10930 i int 10931 page ProtectableItemCollectionPage 10932} 10933 10934// NextWithContext advances to the next value. If there was an error making 10935// the request the iterator does not advance and the error is returned. 10936func (iter *ProtectableItemCollectionIterator) NextWithContext(ctx context.Context) (err error) { 10937 if tracing.IsEnabled() { 10938 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableItemCollectionIterator.NextWithContext") 10939 defer func() { 10940 sc := -1 10941 if iter.Response().Response.Response != nil { 10942 sc = iter.Response().Response.Response.StatusCode 10943 } 10944 tracing.EndSpan(ctx, sc, err) 10945 }() 10946 } 10947 iter.i++ 10948 if iter.i < len(iter.page.Values()) { 10949 return nil 10950 } 10951 err = iter.page.NextWithContext(ctx) 10952 if err != nil { 10953 iter.i-- 10954 return err 10955 } 10956 iter.i = 0 10957 return nil 10958} 10959 10960// Next advances to the next value. If there was an error making 10961// the request the iterator does not advance and the error is returned. 10962// Deprecated: Use NextWithContext() instead. 10963func (iter *ProtectableItemCollectionIterator) Next() error { 10964 return iter.NextWithContext(context.Background()) 10965} 10966 10967// NotDone returns true if the enumeration should be started or is not yet complete. 10968func (iter ProtectableItemCollectionIterator) NotDone() bool { 10969 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 10970} 10971 10972// Response returns the raw server response from the last page request. 10973func (iter ProtectableItemCollectionIterator) Response() ProtectableItemCollection { 10974 return iter.page.Response() 10975} 10976 10977// Value returns the current value or a zero-initialized value if the 10978// iterator has advanced beyond the end of the collection. 10979func (iter ProtectableItemCollectionIterator) Value() ProtectableItem { 10980 if !iter.page.NotDone() { 10981 return ProtectableItem{} 10982 } 10983 return iter.page.Values()[iter.i] 10984} 10985 10986// Creates a new instance of the ProtectableItemCollectionIterator type. 10987func NewProtectableItemCollectionIterator(page ProtectableItemCollectionPage) ProtectableItemCollectionIterator { 10988 return ProtectableItemCollectionIterator{page: page} 10989} 10990 10991// IsEmpty returns true if the ListResult contains no values. 10992func (pic ProtectableItemCollection) IsEmpty() bool { 10993 return pic.Value == nil || len(*pic.Value) == 0 10994} 10995 10996// hasNextLink returns true if the NextLink is not empty. 10997func (pic ProtectableItemCollection) hasNextLink() bool { 10998 return pic.NextLink != nil && len(*pic.NextLink) != 0 10999} 11000 11001// protectableItemCollectionPreparer prepares a request to retrieve the next set of results. 11002// It returns nil if no more results exist. 11003func (pic ProtectableItemCollection) protectableItemCollectionPreparer(ctx context.Context) (*http.Request, error) { 11004 if !pic.hasNextLink() { 11005 return nil, nil 11006 } 11007 return autorest.Prepare((&http.Request{}).WithContext(ctx), 11008 autorest.AsJSON(), 11009 autorest.AsGet(), 11010 autorest.WithBaseURL(to.String(pic.NextLink))) 11011} 11012 11013// ProtectableItemCollectionPage contains a page of ProtectableItem values. 11014type ProtectableItemCollectionPage struct { 11015 fn func(context.Context, ProtectableItemCollection) (ProtectableItemCollection, error) 11016 pic ProtectableItemCollection 11017} 11018 11019// NextWithContext advances to the next page of values. If there was an error making 11020// the request the page does not advance and the error is returned. 11021func (page *ProtectableItemCollectionPage) NextWithContext(ctx context.Context) (err error) { 11022 if tracing.IsEnabled() { 11023 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableItemCollectionPage.NextWithContext") 11024 defer func() { 11025 sc := -1 11026 if page.Response().Response.Response != nil { 11027 sc = page.Response().Response.Response.StatusCode 11028 } 11029 tracing.EndSpan(ctx, sc, err) 11030 }() 11031 } 11032 for { 11033 next, err := page.fn(ctx, page.pic) 11034 if err != nil { 11035 return err 11036 } 11037 page.pic = next 11038 if !next.hasNextLink() || !next.IsEmpty() { 11039 break 11040 } 11041 } 11042 return nil 11043} 11044 11045// Next advances to the next page of values. If there was an error making 11046// the request the page does not advance and the error is returned. 11047// Deprecated: Use NextWithContext() instead. 11048func (page *ProtectableItemCollectionPage) Next() error { 11049 return page.NextWithContext(context.Background()) 11050} 11051 11052// NotDone returns true if the page enumeration should be started or is not yet complete. 11053func (page ProtectableItemCollectionPage) NotDone() bool { 11054 return !page.pic.IsEmpty() 11055} 11056 11057// Response returns the raw server response from the last page request. 11058func (page ProtectableItemCollectionPage) Response() ProtectableItemCollection { 11059 return page.pic 11060} 11061 11062// Values returns the slice of values for the current page or nil if there are no values. 11063func (page ProtectableItemCollectionPage) Values() []ProtectableItem { 11064 if page.pic.IsEmpty() { 11065 return nil 11066 } 11067 return *page.pic.Value 11068} 11069 11070// Creates a new instance of the ProtectableItemCollectionPage type. 11071func NewProtectableItemCollectionPage(cur ProtectableItemCollection, getNextPage func(context.Context, ProtectableItemCollection) (ProtectableItemCollection, error)) ProtectableItemCollectionPage { 11072 return ProtectableItemCollectionPage{ 11073 fn: getNextPage, 11074 pic: cur, 11075 } 11076} 11077 11078// ProtectableItemProperties replication protected item custom data details. 11079type ProtectableItemProperties struct { 11080 // FriendlyName - The name. 11081 FriendlyName *string `json:"friendlyName,omitempty"` 11082 // ProtectionStatus - The protection status. 11083 ProtectionStatus *string `json:"protectionStatus,omitempty"` 11084 // ReplicationProtectedItemID - The ARM resource of protected items. 11085 ReplicationProtectedItemID *string `json:"replicationProtectedItemId,omitempty"` 11086 // RecoveryServicesProviderID - The recovery provider ARM Id. 11087 RecoveryServicesProviderID *string `json:"recoveryServicesProviderId,omitempty"` 11088 // ProtectionReadinessErrors - The Current protection readiness errors. 11089 ProtectionReadinessErrors *[]string `json:"protectionReadinessErrors,omitempty"` 11090 // SupportedReplicationProviders - The list of replication providers supported for the protectable item. 11091 SupportedReplicationProviders *[]string `json:"supportedReplicationProviders,omitempty"` 11092 // CustomDetails - The Replication provider custom settings. 11093 CustomDetails BasicConfigurationSettings `json:"customDetails,omitempty"` 11094} 11095 11096// UnmarshalJSON is the custom unmarshaler for ProtectableItemProperties struct. 11097func (pip *ProtectableItemProperties) UnmarshalJSON(body []byte) error { 11098 var m map[string]*json.RawMessage 11099 err := json.Unmarshal(body, &m) 11100 if err != nil { 11101 return err 11102 } 11103 for k, v := range m { 11104 switch k { 11105 case "friendlyName": 11106 if v != nil { 11107 var friendlyName string 11108 err = json.Unmarshal(*v, &friendlyName) 11109 if err != nil { 11110 return err 11111 } 11112 pip.FriendlyName = &friendlyName 11113 } 11114 case "protectionStatus": 11115 if v != nil { 11116 var protectionStatus string 11117 err = json.Unmarshal(*v, &protectionStatus) 11118 if err != nil { 11119 return err 11120 } 11121 pip.ProtectionStatus = &protectionStatus 11122 } 11123 case "replicationProtectedItemId": 11124 if v != nil { 11125 var replicationProtectedItemID string 11126 err = json.Unmarshal(*v, &replicationProtectedItemID) 11127 if err != nil { 11128 return err 11129 } 11130 pip.ReplicationProtectedItemID = &replicationProtectedItemID 11131 } 11132 case "recoveryServicesProviderId": 11133 if v != nil { 11134 var recoveryServicesProviderID string 11135 err = json.Unmarshal(*v, &recoveryServicesProviderID) 11136 if err != nil { 11137 return err 11138 } 11139 pip.RecoveryServicesProviderID = &recoveryServicesProviderID 11140 } 11141 case "protectionReadinessErrors": 11142 if v != nil { 11143 var protectionReadinessErrors []string 11144 err = json.Unmarshal(*v, &protectionReadinessErrors) 11145 if err != nil { 11146 return err 11147 } 11148 pip.ProtectionReadinessErrors = &protectionReadinessErrors 11149 } 11150 case "supportedReplicationProviders": 11151 if v != nil { 11152 var supportedReplicationProviders []string 11153 err = json.Unmarshal(*v, &supportedReplicationProviders) 11154 if err != nil { 11155 return err 11156 } 11157 pip.SupportedReplicationProviders = &supportedReplicationProviders 11158 } 11159 case "customDetails": 11160 if v != nil { 11161 customDetails, err := unmarshalBasicConfigurationSettings(*v) 11162 if err != nil { 11163 return err 11164 } 11165 pip.CustomDetails = customDetails 11166 } 11167 } 11168 } 11169 11170 return nil 11171} 11172 11173// ProtectedItemsQueryParameter query parameter to enumerate protected items. 11174type ProtectedItemsQueryParameter struct { 11175 // SourceFabricName - The source fabric name filter. 11176 SourceFabricName *string `json:"sourceFabricName,omitempty"` 11177 // RecoveryPlanName - The recovery plan filter. 11178 RecoveryPlanName *string `json:"recoveryPlanName,omitempty"` 11179 // VCenterName - The vCenter name filter. 11180 VCenterName *string `json:"vCenterName,omitempty"` 11181} 11182 11183// ProtectionContainer protection container details. 11184type ProtectionContainer struct { 11185 autorest.Response `json:"-"` 11186 // Properties - The custom data. 11187 Properties *ProtectionContainerProperties `json:"properties,omitempty"` 11188 // ID - READ-ONLY; Resource Id 11189 ID *string `json:"id,omitempty"` 11190 // Name - READ-ONLY; Resource Name 11191 Name *string `json:"name,omitempty"` 11192 // Type - READ-ONLY; Resource Type 11193 Type *string `json:"type,omitempty"` 11194 // Location - Resource Location 11195 Location *string `json:"location,omitempty"` 11196} 11197 11198// MarshalJSON is the custom marshaler for ProtectionContainer. 11199func (pc ProtectionContainer) MarshalJSON() ([]byte, error) { 11200 objectMap := make(map[string]interface{}) 11201 if pc.Properties != nil { 11202 objectMap["properties"] = pc.Properties 11203 } 11204 if pc.Location != nil { 11205 objectMap["location"] = pc.Location 11206 } 11207 return json.Marshal(objectMap) 11208} 11209 11210// ProtectionContainerCollection protection Container collection. 11211type ProtectionContainerCollection struct { 11212 autorest.Response `json:"-"` 11213 // Value - The Protection Container details. 11214 Value *[]ProtectionContainer `json:"value,omitempty"` 11215 // NextLink - The value of next link. 11216 NextLink *string `json:"nextLink,omitempty"` 11217} 11218 11219// ProtectionContainerCollectionIterator provides access to a complete listing of ProtectionContainer 11220// values. 11221type ProtectionContainerCollectionIterator struct { 11222 i int 11223 page ProtectionContainerCollectionPage 11224} 11225 11226// NextWithContext advances to the next value. If there was an error making 11227// the request the iterator does not advance and the error is returned. 11228func (iter *ProtectionContainerCollectionIterator) NextWithContext(ctx context.Context) (err error) { 11229 if tracing.IsEnabled() { 11230 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerCollectionIterator.NextWithContext") 11231 defer func() { 11232 sc := -1 11233 if iter.Response().Response.Response != nil { 11234 sc = iter.Response().Response.Response.StatusCode 11235 } 11236 tracing.EndSpan(ctx, sc, err) 11237 }() 11238 } 11239 iter.i++ 11240 if iter.i < len(iter.page.Values()) { 11241 return nil 11242 } 11243 err = iter.page.NextWithContext(ctx) 11244 if err != nil { 11245 iter.i-- 11246 return err 11247 } 11248 iter.i = 0 11249 return nil 11250} 11251 11252// Next advances to the next value. If there was an error making 11253// the request the iterator does not advance and the error is returned. 11254// Deprecated: Use NextWithContext() instead. 11255func (iter *ProtectionContainerCollectionIterator) Next() error { 11256 return iter.NextWithContext(context.Background()) 11257} 11258 11259// NotDone returns true if the enumeration should be started or is not yet complete. 11260func (iter ProtectionContainerCollectionIterator) NotDone() bool { 11261 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 11262} 11263 11264// Response returns the raw server response from the last page request. 11265func (iter ProtectionContainerCollectionIterator) Response() ProtectionContainerCollection { 11266 return iter.page.Response() 11267} 11268 11269// Value returns the current value or a zero-initialized value if the 11270// iterator has advanced beyond the end of the collection. 11271func (iter ProtectionContainerCollectionIterator) Value() ProtectionContainer { 11272 if !iter.page.NotDone() { 11273 return ProtectionContainer{} 11274 } 11275 return iter.page.Values()[iter.i] 11276} 11277 11278// Creates a new instance of the ProtectionContainerCollectionIterator type. 11279func NewProtectionContainerCollectionIterator(page ProtectionContainerCollectionPage) ProtectionContainerCollectionIterator { 11280 return ProtectionContainerCollectionIterator{page: page} 11281} 11282 11283// IsEmpty returns true if the ListResult contains no values. 11284func (pcc ProtectionContainerCollection) IsEmpty() bool { 11285 return pcc.Value == nil || len(*pcc.Value) == 0 11286} 11287 11288// hasNextLink returns true if the NextLink is not empty. 11289func (pcc ProtectionContainerCollection) hasNextLink() bool { 11290 return pcc.NextLink != nil && len(*pcc.NextLink) != 0 11291} 11292 11293// protectionContainerCollectionPreparer prepares a request to retrieve the next set of results. 11294// It returns nil if no more results exist. 11295func (pcc ProtectionContainerCollection) protectionContainerCollectionPreparer(ctx context.Context) (*http.Request, error) { 11296 if !pcc.hasNextLink() { 11297 return nil, nil 11298 } 11299 return autorest.Prepare((&http.Request{}).WithContext(ctx), 11300 autorest.AsJSON(), 11301 autorest.AsGet(), 11302 autorest.WithBaseURL(to.String(pcc.NextLink))) 11303} 11304 11305// ProtectionContainerCollectionPage contains a page of ProtectionContainer values. 11306type ProtectionContainerCollectionPage struct { 11307 fn func(context.Context, ProtectionContainerCollection) (ProtectionContainerCollection, error) 11308 pcc ProtectionContainerCollection 11309} 11310 11311// NextWithContext advances to the next page of values. If there was an error making 11312// the request the page does not advance and the error is returned. 11313func (page *ProtectionContainerCollectionPage) NextWithContext(ctx context.Context) (err error) { 11314 if tracing.IsEnabled() { 11315 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerCollectionPage.NextWithContext") 11316 defer func() { 11317 sc := -1 11318 if page.Response().Response.Response != nil { 11319 sc = page.Response().Response.Response.StatusCode 11320 } 11321 tracing.EndSpan(ctx, sc, err) 11322 }() 11323 } 11324 for { 11325 next, err := page.fn(ctx, page.pcc) 11326 if err != nil { 11327 return err 11328 } 11329 page.pcc = next 11330 if !next.hasNextLink() || !next.IsEmpty() { 11331 break 11332 } 11333 } 11334 return nil 11335} 11336 11337// Next advances to the next page of values. If there was an error making 11338// the request the page does not advance and the error is returned. 11339// Deprecated: Use NextWithContext() instead. 11340func (page *ProtectionContainerCollectionPage) Next() error { 11341 return page.NextWithContext(context.Background()) 11342} 11343 11344// NotDone returns true if the page enumeration should be started or is not yet complete. 11345func (page ProtectionContainerCollectionPage) NotDone() bool { 11346 return !page.pcc.IsEmpty() 11347} 11348 11349// Response returns the raw server response from the last page request. 11350func (page ProtectionContainerCollectionPage) Response() ProtectionContainerCollection { 11351 return page.pcc 11352} 11353 11354// Values returns the slice of values for the current page or nil if there are no values. 11355func (page ProtectionContainerCollectionPage) Values() []ProtectionContainer { 11356 if page.pcc.IsEmpty() { 11357 return nil 11358 } 11359 return *page.pcc.Value 11360} 11361 11362// Creates a new instance of the ProtectionContainerCollectionPage type. 11363func NewProtectionContainerCollectionPage(cur ProtectionContainerCollection, getNextPage func(context.Context, ProtectionContainerCollection) (ProtectionContainerCollection, error)) ProtectionContainerCollectionPage { 11364 return ProtectionContainerCollectionPage{ 11365 fn: getNextPage, 11366 pcc: cur, 11367 } 11368} 11369 11370// ProtectionContainerFabricSpecificDetails base class for fabric specific details of container. 11371type ProtectionContainerFabricSpecificDetails struct { 11372 // InstanceType - READ-ONLY; Gets the class type. Overridden in derived classes. 11373 InstanceType *string `json:"instanceType,omitempty"` 11374} 11375 11376// MarshalJSON is the custom marshaler for ProtectionContainerFabricSpecificDetails. 11377func (pcfsd ProtectionContainerFabricSpecificDetails) MarshalJSON() ([]byte, error) { 11378 objectMap := make(map[string]interface{}) 11379 return json.Marshal(objectMap) 11380} 11381 11382// ProtectionContainerMapping protection container mapping object. 11383type ProtectionContainerMapping struct { 11384 autorest.Response `json:"-"` 11385 // Properties - The custom data. 11386 Properties *ProtectionContainerMappingProperties `json:"properties,omitempty"` 11387 // ID - READ-ONLY; Resource Id 11388 ID *string `json:"id,omitempty"` 11389 // Name - READ-ONLY; Resource Name 11390 Name *string `json:"name,omitempty"` 11391 // Type - READ-ONLY; Resource Type 11392 Type *string `json:"type,omitempty"` 11393 // Location - Resource Location 11394 Location *string `json:"location,omitempty"` 11395} 11396 11397// MarshalJSON is the custom marshaler for ProtectionContainerMapping. 11398func (pcm ProtectionContainerMapping) MarshalJSON() ([]byte, error) { 11399 objectMap := make(map[string]interface{}) 11400 if pcm.Properties != nil { 11401 objectMap["properties"] = pcm.Properties 11402 } 11403 if pcm.Location != nil { 11404 objectMap["location"] = pcm.Location 11405 } 11406 return json.Marshal(objectMap) 11407} 11408 11409// ProtectionContainerMappingCollection protection container mapping collection class. 11410type ProtectionContainerMappingCollection struct { 11411 autorest.Response `json:"-"` 11412 // Value - List of container mappings. 11413 Value *[]ProtectionContainerMapping `json:"value,omitempty"` 11414 // NextLink - Link to fetch rest of the data. 11415 NextLink *string `json:"nextLink,omitempty"` 11416} 11417 11418// ProtectionContainerMappingCollectionIterator provides access to a complete listing of 11419// ProtectionContainerMapping values. 11420type ProtectionContainerMappingCollectionIterator struct { 11421 i int 11422 page ProtectionContainerMappingCollectionPage 11423} 11424 11425// NextWithContext advances to the next value. If there was an error making 11426// the request the iterator does not advance and the error is returned. 11427func (iter *ProtectionContainerMappingCollectionIterator) NextWithContext(ctx context.Context) (err error) { 11428 if tracing.IsEnabled() { 11429 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerMappingCollectionIterator.NextWithContext") 11430 defer func() { 11431 sc := -1 11432 if iter.Response().Response.Response != nil { 11433 sc = iter.Response().Response.Response.StatusCode 11434 } 11435 tracing.EndSpan(ctx, sc, err) 11436 }() 11437 } 11438 iter.i++ 11439 if iter.i < len(iter.page.Values()) { 11440 return nil 11441 } 11442 err = iter.page.NextWithContext(ctx) 11443 if err != nil { 11444 iter.i-- 11445 return err 11446 } 11447 iter.i = 0 11448 return nil 11449} 11450 11451// Next advances to the next value. If there was an error making 11452// the request the iterator does not advance and the error is returned. 11453// Deprecated: Use NextWithContext() instead. 11454func (iter *ProtectionContainerMappingCollectionIterator) Next() error { 11455 return iter.NextWithContext(context.Background()) 11456} 11457 11458// NotDone returns true if the enumeration should be started or is not yet complete. 11459func (iter ProtectionContainerMappingCollectionIterator) NotDone() bool { 11460 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 11461} 11462 11463// Response returns the raw server response from the last page request. 11464func (iter ProtectionContainerMappingCollectionIterator) Response() ProtectionContainerMappingCollection { 11465 return iter.page.Response() 11466} 11467 11468// Value returns the current value or a zero-initialized value if the 11469// iterator has advanced beyond the end of the collection. 11470func (iter ProtectionContainerMappingCollectionIterator) Value() ProtectionContainerMapping { 11471 if !iter.page.NotDone() { 11472 return ProtectionContainerMapping{} 11473 } 11474 return iter.page.Values()[iter.i] 11475} 11476 11477// Creates a new instance of the ProtectionContainerMappingCollectionIterator type. 11478func NewProtectionContainerMappingCollectionIterator(page ProtectionContainerMappingCollectionPage) ProtectionContainerMappingCollectionIterator { 11479 return ProtectionContainerMappingCollectionIterator{page: page} 11480} 11481 11482// IsEmpty returns true if the ListResult contains no values. 11483func (pcmc ProtectionContainerMappingCollection) IsEmpty() bool { 11484 return pcmc.Value == nil || len(*pcmc.Value) == 0 11485} 11486 11487// hasNextLink returns true if the NextLink is not empty. 11488func (pcmc ProtectionContainerMappingCollection) hasNextLink() bool { 11489 return pcmc.NextLink != nil && len(*pcmc.NextLink) != 0 11490} 11491 11492// protectionContainerMappingCollectionPreparer prepares a request to retrieve the next set of results. 11493// It returns nil if no more results exist. 11494func (pcmc ProtectionContainerMappingCollection) protectionContainerMappingCollectionPreparer(ctx context.Context) (*http.Request, error) { 11495 if !pcmc.hasNextLink() { 11496 return nil, nil 11497 } 11498 return autorest.Prepare((&http.Request{}).WithContext(ctx), 11499 autorest.AsJSON(), 11500 autorest.AsGet(), 11501 autorest.WithBaseURL(to.String(pcmc.NextLink))) 11502} 11503 11504// ProtectionContainerMappingCollectionPage contains a page of ProtectionContainerMapping values. 11505type ProtectionContainerMappingCollectionPage struct { 11506 fn func(context.Context, ProtectionContainerMappingCollection) (ProtectionContainerMappingCollection, error) 11507 pcmc ProtectionContainerMappingCollection 11508} 11509 11510// NextWithContext advances to the next page of values. If there was an error making 11511// the request the page does not advance and the error is returned. 11512func (page *ProtectionContainerMappingCollectionPage) NextWithContext(ctx context.Context) (err error) { 11513 if tracing.IsEnabled() { 11514 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerMappingCollectionPage.NextWithContext") 11515 defer func() { 11516 sc := -1 11517 if page.Response().Response.Response != nil { 11518 sc = page.Response().Response.Response.StatusCode 11519 } 11520 tracing.EndSpan(ctx, sc, err) 11521 }() 11522 } 11523 for { 11524 next, err := page.fn(ctx, page.pcmc) 11525 if err != nil { 11526 return err 11527 } 11528 page.pcmc = next 11529 if !next.hasNextLink() || !next.IsEmpty() { 11530 break 11531 } 11532 } 11533 return nil 11534} 11535 11536// Next advances to the next page of values. If there was an error making 11537// the request the page does not advance and the error is returned. 11538// Deprecated: Use NextWithContext() instead. 11539func (page *ProtectionContainerMappingCollectionPage) Next() error { 11540 return page.NextWithContext(context.Background()) 11541} 11542 11543// NotDone returns true if the page enumeration should be started or is not yet complete. 11544func (page ProtectionContainerMappingCollectionPage) NotDone() bool { 11545 return !page.pcmc.IsEmpty() 11546} 11547 11548// Response returns the raw server response from the last page request. 11549func (page ProtectionContainerMappingCollectionPage) Response() ProtectionContainerMappingCollection { 11550 return page.pcmc 11551} 11552 11553// Values returns the slice of values for the current page or nil if there are no values. 11554func (page ProtectionContainerMappingCollectionPage) Values() []ProtectionContainerMapping { 11555 if page.pcmc.IsEmpty() { 11556 return nil 11557 } 11558 return *page.pcmc.Value 11559} 11560 11561// Creates a new instance of the ProtectionContainerMappingCollectionPage type. 11562func NewProtectionContainerMappingCollectionPage(cur ProtectionContainerMappingCollection, getNextPage func(context.Context, ProtectionContainerMappingCollection) (ProtectionContainerMappingCollection, error)) ProtectionContainerMappingCollectionPage { 11563 return ProtectionContainerMappingCollectionPage{ 11564 fn: getNextPage, 11565 pcmc: cur, 11566 } 11567} 11568 11569// ProtectionContainerMappingProperties protection container mapping properties. 11570type ProtectionContainerMappingProperties struct { 11571 // TargetProtectionContainerID - Paired protection container ARM ID. 11572 TargetProtectionContainerID *string `json:"targetProtectionContainerId,omitempty"` 11573 // TargetProtectionContainerFriendlyName - Friendly name of paired container. 11574 TargetProtectionContainerFriendlyName *string `json:"targetProtectionContainerFriendlyName,omitempty"` 11575 // ProviderSpecificDetails - Provider specific provider details. 11576 ProviderSpecificDetails *ProtectionContainerMappingProviderSpecificDetails `json:"providerSpecificDetails,omitempty"` 11577 // Health - Health of pairing. 11578 Health *string `json:"health,omitempty"` 11579 // HealthErrorDetails - Health error. 11580 HealthErrorDetails *[]HealthError `json:"healthErrorDetails,omitempty"` 11581 // PolicyID - Policy ARM Id. 11582 PolicyID *string `json:"policyId,omitempty"` 11583 // State - Association Status 11584 State *string `json:"state,omitempty"` 11585 // SourceProtectionContainerFriendlyName - Friendly name of source protection container. 11586 SourceProtectionContainerFriendlyName *string `json:"sourceProtectionContainerFriendlyName,omitempty"` 11587 // SourceFabricFriendlyName - Friendly name of source fabric. 11588 SourceFabricFriendlyName *string `json:"sourceFabricFriendlyName,omitempty"` 11589 // TargetFabricFriendlyName - Friendly name of target fabric. 11590 TargetFabricFriendlyName *string `json:"targetFabricFriendlyName,omitempty"` 11591 // PolicyFriendlyName - Friendly name of replication policy. 11592 PolicyFriendlyName *string `json:"policyFriendlyName,omitempty"` 11593} 11594 11595// ProtectionContainerMappingProviderSpecificDetails container mapping provider specific details. 11596type ProtectionContainerMappingProviderSpecificDetails struct { 11597 // InstanceType - READ-ONLY; Gets the class type. Overridden in derived classes. 11598 InstanceType *string `json:"instanceType,omitempty"` 11599} 11600 11601// MarshalJSON is the custom marshaler for ProtectionContainerMappingProviderSpecificDetails. 11602func (pcmpsd ProtectionContainerMappingProviderSpecificDetails) MarshalJSON() ([]byte, error) { 11603 objectMap := make(map[string]interface{}) 11604 return json.Marshal(objectMap) 11605} 11606 11607// ProtectionContainerProperties protection profile custom data details. 11608type ProtectionContainerProperties struct { 11609 // FabricFriendlyName - Fabric friendly name. 11610 FabricFriendlyName *string `json:"fabricFriendlyName,omitempty"` 11611 // FriendlyName - The name. 11612 FriendlyName *string `json:"friendlyName,omitempty"` 11613 // FabricType - The fabric type. 11614 FabricType *string `json:"fabricType,omitempty"` 11615 // ProtectedItemCount - Number of protected PEs 11616 ProtectedItemCount *int32 `json:"protectedItemCount,omitempty"` 11617 // PairingStatus - The pairing status of this cloud. 11618 PairingStatus *string `json:"pairingStatus,omitempty"` 11619 // Role - The role of this cloud. 11620 Role *string `json:"role,omitempty"` 11621 // FabricSpecificDetails - Fabric specific details. 11622 FabricSpecificDetails *ProtectionContainerFabricSpecificDetails `json:"fabricSpecificDetails,omitempty"` 11623} 11624 11625// ProviderError this class contains the error details per object. 11626type ProviderError struct { 11627 // ErrorCode - The Error code. 11628 ErrorCode *int32 `json:"errorCode,omitempty"` 11629 // ErrorMessage - The Error message. 11630 ErrorMessage *string `json:"errorMessage,omitempty"` 11631 // ErrorID - The Provider error Id. 11632 ErrorID *string `json:"errorId,omitempty"` 11633 // PossibleCauses - The possible causes for the error. 11634 PossibleCauses *string `json:"possibleCauses,omitempty"` 11635 // RecommendedAction - The recommended action to resolve the error. 11636 RecommendedAction *string `json:"recommendedAction,omitempty"` 11637} 11638 11639// BasicProviderSpecificFailoverInput provider specific failover input. 11640type BasicProviderSpecificFailoverInput interface { 11641 AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool) 11642 AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool) 11643 AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool) 11644 AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool) 11645 AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool) 11646 AsProviderSpecificFailoverInput() (*ProviderSpecificFailoverInput, bool) 11647} 11648 11649// ProviderSpecificFailoverInput provider specific failover input. 11650type ProviderSpecificFailoverInput struct { 11651 // InstanceType - Possible values include: 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeProviderSpecificFailoverInput', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMage', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeA2A' 11652 InstanceType InstanceTypeBasicProviderSpecificFailoverInput `json:"instanceType,omitempty"` 11653} 11654 11655func unmarshalBasicProviderSpecificFailoverInput(body []byte) (BasicProviderSpecificFailoverInput, error) { 11656 var m map[string]interface{} 11657 err := json.Unmarshal(body, &m) 11658 if err != nil { 11659 return nil, err 11660 } 11661 11662 switch m["instanceType"] { 11663 case string(InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure): 11664 var hvrafpi HyperVReplicaAzureFailoverProviderInput 11665 err := json.Unmarshal(body, &hvrafpi) 11666 return hvrafpi, err 11667 case string(InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback): 11668 var hvrafpi HyperVReplicaAzureFailbackProviderInput 11669 err := json.Unmarshal(body, &hvrafpi) 11670 return hvrafpi, err 11671 case string(InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMageAzureV2): 11672 var imavfpi InMageAzureV2FailoverProviderInput 11673 err := json.Unmarshal(body, &imavfpi) 11674 return imavfpi, err 11675 case string(InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMage): 11676 var imfpi InMageFailoverProviderInput 11677 err := json.Unmarshal(body, &imfpi) 11678 return imfpi, err 11679 case string(InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeA2A): 11680 var afpi A2AFailoverProviderInput 11681 err := json.Unmarshal(body, &afpi) 11682 return afpi, err 11683 default: 11684 var psfi ProviderSpecificFailoverInput 11685 err := json.Unmarshal(body, &psfi) 11686 return psfi, err 11687 } 11688} 11689func unmarshalBasicProviderSpecificFailoverInputArray(body []byte) ([]BasicProviderSpecificFailoverInput, error) { 11690 var rawMessages []*json.RawMessage 11691 err := json.Unmarshal(body, &rawMessages) 11692 if err != nil { 11693 return nil, err 11694 } 11695 11696 psfiArray := make([]BasicProviderSpecificFailoverInput, len(rawMessages)) 11697 11698 for index, rawMessage := range rawMessages { 11699 psfi, err := unmarshalBasicProviderSpecificFailoverInput(*rawMessage) 11700 if err != nil { 11701 return nil, err 11702 } 11703 psfiArray[index] = psfi 11704 } 11705 return psfiArray, nil 11706} 11707 11708// MarshalJSON is the custom marshaler for ProviderSpecificFailoverInput. 11709func (psfi ProviderSpecificFailoverInput) MarshalJSON() ([]byte, error) { 11710 psfi.InstanceType = InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeProviderSpecificFailoverInput 11711 objectMap := make(map[string]interface{}) 11712 if psfi.InstanceType != "" { 11713 objectMap["instanceType"] = psfi.InstanceType 11714 } 11715 return json.Marshal(objectMap) 11716} 11717 11718// AsHyperVReplicaAzureFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for ProviderSpecificFailoverInput. 11719func (psfi ProviderSpecificFailoverInput) AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool) { 11720 return nil, false 11721} 11722 11723// AsHyperVReplicaAzureFailbackProviderInput is the BasicProviderSpecificFailoverInput implementation for ProviderSpecificFailoverInput. 11724func (psfi ProviderSpecificFailoverInput) AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool) { 11725 return nil, false 11726} 11727 11728// AsInMageAzureV2FailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for ProviderSpecificFailoverInput. 11729func (psfi ProviderSpecificFailoverInput) AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool) { 11730 return nil, false 11731} 11732 11733// AsInMageFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for ProviderSpecificFailoverInput. 11734func (psfi ProviderSpecificFailoverInput) AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool) { 11735 return nil, false 11736} 11737 11738// AsA2AFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for ProviderSpecificFailoverInput. 11739func (psfi ProviderSpecificFailoverInput) AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool) { 11740 return nil, false 11741} 11742 11743// AsProviderSpecificFailoverInput is the BasicProviderSpecificFailoverInput implementation for ProviderSpecificFailoverInput. 11744func (psfi ProviderSpecificFailoverInput) AsProviderSpecificFailoverInput() (*ProviderSpecificFailoverInput, bool) { 11745 return &psfi, true 11746} 11747 11748// AsBasicProviderSpecificFailoverInput is the BasicProviderSpecificFailoverInput implementation for ProviderSpecificFailoverInput. 11749func (psfi ProviderSpecificFailoverInput) AsBasicProviderSpecificFailoverInput() (BasicProviderSpecificFailoverInput, bool) { 11750 return &psfi, true 11751} 11752 11753// ProviderSpecificRecoveryPointDetails replication provider specific recovery point details. 11754type ProviderSpecificRecoveryPointDetails struct { 11755 // Type - READ-ONLY; Gets the provider type. 11756 Type *string `json:"Type,omitempty"` 11757} 11758 11759// MarshalJSON is the custom marshaler for ProviderSpecificRecoveryPointDetails. 11760func (psrpd ProviderSpecificRecoveryPointDetails) MarshalJSON() ([]byte, error) { 11761 objectMap := make(map[string]interface{}) 11762 return json.Marshal(objectMap) 11763} 11764 11765// RcmAzureMigrationPolicyDetails RCM based Azure migration specific policy details. 11766type RcmAzureMigrationPolicyDetails struct { 11767 // RecoveryPointThresholdInMinutes - The recovery point threshold in minutes. 11768 RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"` 11769 // RecoveryPointHistory - The duration in minutes until which the recovery points need to be stored. 11770 RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` 11771 // AppConsistentFrequencyInMinutes - The app consistent snapshot frequency in minutes. 11772 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` 11773 // MultiVMSyncStatus - A value indicating whether multi-VM sync has to be enabled. Possible values include: 'Enabled', 'Disabled' 11774 MultiVMSyncStatus MultiVMSyncStatus `json:"multiVmSyncStatus,omitempty"` 11775 // CrashConsistentFrequencyInMinutes - The crash consistent snapshot frequency in minutes. 11776 CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"` 11777 // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypePolicyProviderSpecificDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt' 11778 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"` 11779} 11780 11781// MarshalJSON is the custom marshaler for RcmAzureMigrationPolicyDetails. 11782func (rampd RcmAzureMigrationPolicyDetails) MarshalJSON() ([]byte, error) { 11783 rampd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration 11784 objectMap := make(map[string]interface{}) 11785 if rampd.RecoveryPointThresholdInMinutes != nil { 11786 objectMap["recoveryPointThresholdInMinutes"] = rampd.RecoveryPointThresholdInMinutes 11787 } 11788 if rampd.RecoveryPointHistory != nil { 11789 objectMap["recoveryPointHistory"] = rampd.RecoveryPointHistory 11790 } 11791 if rampd.AppConsistentFrequencyInMinutes != nil { 11792 objectMap["appConsistentFrequencyInMinutes"] = rampd.AppConsistentFrequencyInMinutes 11793 } 11794 if rampd.MultiVMSyncStatus != "" { 11795 objectMap["multiVmSyncStatus"] = rampd.MultiVMSyncStatus 11796 } 11797 if rampd.CrashConsistentFrequencyInMinutes != nil { 11798 objectMap["crashConsistentFrequencyInMinutes"] = rampd.CrashConsistentFrequencyInMinutes 11799 } 11800 if rampd.InstanceType != "" { 11801 objectMap["instanceType"] = rampd.InstanceType 11802 } 11803 return json.Marshal(objectMap) 11804} 11805 11806// AsHyperVReplicaAzurePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for RcmAzureMigrationPolicyDetails. 11807func (rampd RcmAzureMigrationPolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) { 11808 return nil, false 11809} 11810 11811// AsHyperVReplicaBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for RcmAzureMigrationPolicyDetails. 11812func (rampd RcmAzureMigrationPolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) { 11813 return nil, false 11814} 11815 11816// AsHyperVReplicaPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for RcmAzureMigrationPolicyDetails. 11817func (rampd RcmAzureMigrationPolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) { 11818 return nil, false 11819} 11820 11821// AsHyperVReplicaBluePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for RcmAzureMigrationPolicyDetails. 11822func (rampd RcmAzureMigrationPolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) { 11823 return nil, false 11824} 11825 11826// AsInMageBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for RcmAzureMigrationPolicyDetails. 11827func (rampd RcmAzureMigrationPolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) { 11828 return nil, false 11829} 11830 11831// AsInMageAzureV2PolicyDetails is the BasicPolicyProviderSpecificDetails implementation for RcmAzureMigrationPolicyDetails. 11832func (rampd RcmAzureMigrationPolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) { 11833 return nil, false 11834} 11835 11836// AsInMagePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for RcmAzureMigrationPolicyDetails. 11837func (rampd RcmAzureMigrationPolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) { 11838 return nil, false 11839} 11840 11841// AsA2APolicyDetails is the BasicPolicyProviderSpecificDetails implementation for RcmAzureMigrationPolicyDetails. 11842func (rampd RcmAzureMigrationPolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) { 11843 return nil, false 11844} 11845 11846// AsRcmAzureMigrationPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for RcmAzureMigrationPolicyDetails. 11847func (rampd RcmAzureMigrationPolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) { 11848 return &rampd, true 11849} 11850 11851// AsVmwareCbtPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for RcmAzureMigrationPolicyDetails. 11852func (rampd RcmAzureMigrationPolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) { 11853 return nil, false 11854} 11855 11856// AsPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for RcmAzureMigrationPolicyDetails. 11857func (rampd RcmAzureMigrationPolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) { 11858 return nil, false 11859} 11860 11861// AsBasicPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for RcmAzureMigrationPolicyDetails. 11862func (rampd RcmAzureMigrationPolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) { 11863 return &rampd, true 11864} 11865 11866// RecoveryPlan recovery plan details. 11867type RecoveryPlan struct { 11868 autorest.Response `json:"-"` 11869 // Properties - The custom details. 11870 Properties *RecoveryPlanProperties `json:"properties,omitempty"` 11871 // ID - READ-ONLY; Resource Id 11872 ID *string `json:"id,omitempty"` 11873 // Name - READ-ONLY; Resource Name 11874 Name *string `json:"name,omitempty"` 11875 // Type - READ-ONLY; Resource Type 11876 Type *string `json:"type,omitempty"` 11877 // Location - Resource Location 11878 Location *string `json:"location,omitempty"` 11879} 11880 11881// MarshalJSON is the custom marshaler for RecoveryPlan. 11882func (rp RecoveryPlan) MarshalJSON() ([]byte, error) { 11883 objectMap := make(map[string]interface{}) 11884 if rp.Properties != nil { 11885 objectMap["properties"] = rp.Properties 11886 } 11887 if rp.Location != nil { 11888 objectMap["location"] = rp.Location 11889 } 11890 return json.Marshal(objectMap) 11891} 11892 11893// RecoveryPlanA2AFailoverInput recovery plan A2A failover input. 11894type RecoveryPlanA2AFailoverInput struct { 11895 // RecoveryPointType - The recovery point type. Possible values include: 'Latest', 'LatestApplicationConsistent', 'LatestCrashConsistent', 'LatestProcessed' 11896 RecoveryPointType A2ARpRecoveryPointType `json:"recoveryPointType,omitempty"` 11897 // CloudServiceCreationOption - A value indicating whether to use recovery cloud service for TFO or not. 11898 CloudServiceCreationOption *string `json:"cloudServiceCreationOption,omitempty"` 11899 // InstanceType - Possible values include: 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeRecoveryPlanProviderSpecificFailoverInput', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMage', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeA2A' 11900 InstanceType InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput `json:"instanceType,omitempty"` 11901} 11902 11903// MarshalJSON is the custom marshaler for RecoveryPlanA2AFailoverInput. 11904func (rpafi RecoveryPlanA2AFailoverInput) MarshalJSON() ([]byte, error) { 11905 rpafi.InstanceType = InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeA2A 11906 objectMap := make(map[string]interface{}) 11907 if rpafi.RecoveryPointType != "" { 11908 objectMap["recoveryPointType"] = rpafi.RecoveryPointType 11909 } 11910 if rpafi.CloudServiceCreationOption != nil { 11911 objectMap["cloudServiceCreationOption"] = rpafi.CloudServiceCreationOption 11912 } 11913 if rpafi.InstanceType != "" { 11914 objectMap["instanceType"] = rpafi.InstanceType 11915 } 11916 return json.Marshal(objectMap) 11917} 11918 11919// AsRecoveryPlanHyperVReplicaAzureFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanA2AFailoverInput. 11920func (rpafi RecoveryPlanA2AFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool) { 11921 return nil, false 11922} 11923 11924// AsRecoveryPlanHyperVReplicaAzureFailbackInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanA2AFailoverInput. 11925func (rpafi RecoveryPlanA2AFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool) { 11926 return nil, false 11927} 11928 11929// AsRecoveryPlanInMageAzureV2FailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanA2AFailoverInput. 11930func (rpafi RecoveryPlanA2AFailoverInput) AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool) { 11931 return nil, false 11932} 11933 11934// AsRecoveryPlanInMageFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanA2AFailoverInput. 11935func (rpafi RecoveryPlanA2AFailoverInput) AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool) { 11936 return nil, false 11937} 11938 11939// AsRecoveryPlanA2AFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanA2AFailoverInput. 11940func (rpafi RecoveryPlanA2AFailoverInput) AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) { 11941 return &rpafi, true 11942} 11943 11944// AsRecoveryPlanProviderSpecificFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanA2AFailoverInput. 11945func (rpafi RecoveryPlanA2AFailoverInput) AsRecoveryPlanProviderSpecificFailoverInput() (*RecoveryPlanProviderSpecificFailoverInput, bool) { 11946 return nil, false 11947} 11948 11949// AsBasicRecoveryPlanProviderSpecificFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanA2AFailoverInput. 11950func (rpafi RecoveryPlanA2AFailoverInput) AsBasicRecoveryPlanProviderSpecificFailoverInput() (BasicRecoveryPlanProviderSpecificFailoverInput, bool) { 11951 return &rpafi, true 11952} 11953 11954// RecoveryPlanAction recovery plan action details. 11955type RecoveryPlanAction struct { 11956 // ActionName - The action name. 11957 ActionName *string `json:"actionName,omitempty"` 11958 // FailoverTypes - The list of failover types. 11959 FailoverTypes *[]ReplicationProtectedItemOperation `json:"failoverTypes,omitempty"` 11960 // FailoverDirections - The list of failover directions. 11961 FailoverDirections *[]PossibleOperationsDirections `json:"failoverDirections,omitempty"` 11962 // CustomDetails - The custom details. 11963 CustomDetails BasicRecoveryPlanActionDetails `json:"customDetails,omitempty"` 11964} 11965 11966// UnmarshalJSON is the custom unmarshaler for RecoveryPlanAction struct. 11967func (rpa *RecoveryPlanAction) UnmarshalJSON(body []byte) error { 11968 var m map[string]*json.RawMessage 11969 err := json.Unmarshal(body, &m) 11970 if err != nil { 11971 return err 11972 } 11973 for k, v := range m { 11974 switch k { 11975 case "actionName": 11976 if v != nil { 11977 var actionName string 11978 err = json.Unmarshal(*v, &actionName) 11979 if err != nil { 11980 return err 11981 } 11982 rpa.ActionName = &actionName 11983 } 11984 case "failoverTypes": 11985 if v != nil { 11986 var failoverTypes []ReplicationProtectedItemOperation 11987 err = json.Unmarshal(*v, &failoverTypes) 11988 if err != nil { 11989 return err 11990 } 11991 rpa.FailoverTypes = &failoverTypes 11992 } 11993 case "failoverDirections": 11994 if v != nil { 11995 var failoverDirections []PossibleOperationsDirections 11996 err = json.Unmarshal(*v, &failoverDirections) 11997 if err != nil { 11998 return err 11999 } 12000 rpa.FailoverDirections = &failoverDirections 12001 } 12002 case "customDetails": 12003 if v != nil { 12004 customDetails, err := unmarshalBasicRecoveryPlanActionDetails(*v) 12005 if err != nil { 12006 return err 12007 } 12008 rpa.CustomDetails = customDetails 12009 } 12010 } 12011 } 12012 12013 return nil 12014} 12015 12016// BasicRecoveryPlanActionDetails recovery plan action custom details. 12017type BasicRecoveryPlanActionDetails interface { 12018 AsRecoveryPlanScriptActionDetails() (*RecoveryPlanScriptActionDetails, bool) 12019 AsRecoveryPlanAutomationRunbookActionDetails() (*RecoveryPlanAutomationRunbookActionDetails, bool) 12020 AsRecoveryPlanManualActionDetails() (*RecoveryPlanManualActionDetails, bool) 12021 AsRecoveryPlanActionDetails() (*RecoveryPlanActionDetails, bool) 12022} 12023 12024// RecoveryPlanActionDetails recovery plan action custom details. 12025type RecoveryPlanActionDetails struct { 12026 // InstanceType - Possible values include: 'InstanceTypeRecoveryPlanActionDetails', 'InstanceTypeScriptActionDetails', 'InstanceTypeAutomationRunbookActionDetails', 'InstanceTypeManualActionDetails' 12027 InstanceType InstanceTypeBasicRecoveryPlanActionDetails `json:"instanceType,omitempty"` 12028} 12029 12030func unmarshalBasicRecoveryPlanActionDetails(body []byte) (BasicRecoveryPlanActionDetails, error) { 12031 var m map[string]interface{} 12032 err := json.Unmarshal(body, &m) 12033 if err != nil { 12034 return nil, err 12035 } 12036 12037 switch m["instanceType"] { 12038 case string(InstanceTypeScriptActionDetails): 12039 var rpsad RecoveryPlanScriptActionDetails 12040 err := json.Unmarshal(body, &rpsad) 12041 return rpsad, err 12042 case string(InstanceTypeAutomationRunbookActionDetails): 12043 var rparad RecoveryPlanAutomationRunbookActionDetails 12044 err := json.Unmarshal(body, &rparad) 12045 return rparad, err 12046 case string(InstanceTypeManualActionDetails): 12047 var rpmad RecoveryPlanManualActionDetails 12048 err := json.Unmarshal(body, &rpmad) 12049 return rpmad, err 12050 default: 12051 var rpad RecoveryPlanActionDetails 12052 err := json.Unmarshal(body, &rpad) 12053 return rpad, err 12054 } 12055} 12056func unmarshalBasicRecoveryPlanActionDetailsArray(body []byte) ([]BasicRecoveryPlanActionDetails, error) { 12057 var rawMessages []*json.RawMessage 12058 err := json.Unmarshal(body, &rawMessages) 12059 if err != nil { 12060 return nil, err 12061 } 12062 12063 rpadArray := make([]BasicRecoveryPlanActionDetails, len(rawMessages)) 12064 12065 for index, rawMessage := range rawMessages { 12066 rpad, err := unmarshalBasicRecoveryPlanActionDetails(*rawMessage) 12067 if err != nil { 12068 return nil, err 12069 } 12070 rpadArray[index] = rpad 12071 } 12072 return rpadArray, nil 12073} 12074 12075// MarshalJSON is the custom marshaler for RecoveryPlanActionDetails. 12076func (rpad RecoveryPlanActionDetails) MarshalJSON() ([]byte, error) { 12077 rpad.InstanceType = InstanceTypeRecoveryPlanActionDetails 12078 objectMap := make(map[string]interface{}) 12079 if rpad.InstanceType != "" { 12080 objectMap["instanceType"] = rpad.InstanceType 12081 } 12082 return json.Marshal(objectMap) 12083} 12084 12085// AsRecoveryPlanScriptActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanActionDetails. 12086func (rpad RecoveryPlanActionDetails) AsRecoveryPlanScriptActionDetails() (*RecoveryPlanScriptActionDetails, bool) { 12087 return nil, false 12088} 12089 12090// AsRecoveryPlanAutomationRunbookActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanActionDetails. 12091func (rpad RecoveryPlanActionDetails) AsRecoveryPlanAutomationRunbookActionDetails() (*RecoveryPlanAutomationRunbookActionDetails, bool) { 12092 return nil, false 12093} 12094 12095// AsRecoveryPlanManualActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanActionDetails. 12096func (rpad RecoveryPlanActionDetails) AsRecoveryPlanManualActionDetails() (*RecoveryPlanManualActionDetails, bool) { 12097 return nil, false 12098} 12099 12100// AsRecoveryPlanActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanActionDetails. 12101func (rpad RecoveryPlanActionDetails) AsRecoveryPlanActionDetails() (*RecoveryPlanActionDetails, bool) { 12102 return &rpad, true 12103} 12104 12105// AsBasicRecoveryPlanActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanActionDetails. 12106func (rpad RecoveryPlanActionDetails) AsBasicRecoveryPlanActionDetails() (BasicRecoveryPlanActionDetails, bool) { 12107 return &rpad, true 12108} 12109 12110// RecoveryPlanAutomationRunbookActionDetails recovery plan Automation runbook action details. 12111type RecoveryPlanAutomationRunbookActionDetails struct { 12112 // RunbookID - The runbook ARM Id. 12113 RunbookID *string `json:"runbookId,omitempty"` 12114 // Timeout - The runbook timeout. 12115 Timeout *string `json:"timeout,omitempty"` 12116 // FabricLocation - The fabric location. Possible values include: 'Primary', 'Recovery' 12117 FabricLocation RecoveryPlanActionLocation `json:"fabricLocation,omitempty"` 12118 // InstanceType - Possible values include: 'InstanceTypeRecoveryPlanActionDetails', 'InstanceTypeScriptActionDetails', 'InstanceTypeAutomationRunbookActionDetails', 'InstanceTypeManualActionDetails' 12119 InstanceType InstanceTypeBasicRecoveryPlanActionDetails `json:"instanceType,omitempty"` 12120} 12121 12122// MarshalJSON is the custom marshaler for RecoveryPlanAutomationRunbookActionDetails. 12123func (rparad RecoveryPlanAutomationRunbookActionDetails) MarshalJSON() ([]byte, error) { 12124 rparad.InstanceType = InstanceTypeAutomationRunbookActionDetails 12125 objectMap := make(map[string]interface{}) 12126 if rparad.RunbookID != nil { 12127 objectMap["runbookId"] = rparad.RunbookID 12128 } 12129 if rparad.Timeout != nil { 12130 objectMap["timeout"] = rparad.Timeout 12131 } 12132 if rparad.FabricLocation != "" { 12133 objectMap["fabricLocation"] = rparad.FabricLocation 12134 } 12135 if rparad.InstanceType != "" { 12136 objectMap["instanceType"] = rparad.InstanceType 12137 } 12138 return json.Marshal(objectMap) 12139} 12140 12141// AsRecoveryPlanScriptActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanAutomationRunbookActionDetails. 12142func (rparad RecoveryPlanAutomationRunbookActionDetails) AsRecoveryPlanScriptActionDetails() (*RecoveryPlanScriptActionDetails, bool) { 12143 return nil, false 12144} 12145 12146// AsRecoveryPlanAutomationRunbookActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanAutomationRunbookActionDetails. 12147func (rparad RecoveryPlanAutomationRunbookActionDetails) AsRecoveryPlanAutomationRunbookActionDetails() (*RecoveryPlanAutomationRunbookActionDetails, bool) { 12148 return &rparad, true 12149} 12150 12151// AsRecoveryPlanManualActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanAutomationRunbookActionDetails. 12152func (rparad RecoveryPlanAutomationRunbookActionDetails) AsRecoveryPlanManualActionDetails() (*RecoveryPlanManualActionDetails, bool) { 12153 return nil, false 12154} 12155 12156// AsRecoveryPlanActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanAutomationRunbookActionDetails. 12157func (rparad RecoveryPlanAutomationRunbookActionDetails) AsRecoveryPlanActionDetails() (*RecoveryPlanActionDetails, bool) { 12158 return nil, false 12159} 12160 12161// AsBasicRecoveryPlanActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanAutomationRunbookActionDetails. 12162func (rparad RecoveryPlanAutomationRunbookActionDetails) AsBasicRecoveryPlanActionDetails() (BasicRecoveryPlanActionDetails, bool) { 12163 return &rparad, true 12164} 12165 12166// RecoveryPlanCollection recovery plan collection details. 12167type RecoveryPlanCollection struct { 12168 autorest.Response `json:"-"` 12169 // Value - The list of recovery plans. 12170 Value *[]RecoveryPlan `json:"value,omitempty"` 12171 // NextLink - The value of next link. 12172 NextLink *string `json:"nextLink,omitempty"` 12173} 12174 12175// RecoveryPlanCollectionIterator provides access to a complete listing of RecoveryPlan values. 12176type RecoveryPlanCollectionIterator struct { 12177 i int 12178 page RecoveryPlanCollectionPage 12179} 12180 12181// NextWithContext advances to the next value. If there was an error making 12182// the request the iterator does not advance and the error is returned. 12183func (iter *RecoveryPlanCollectionIterator) NextWithContext(ctx context.Context) (err error) { 12184 if tracing.IsEnabled() { 12185 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPlanCollectionIterator.NextWithContext") 12186 defer func() { 12187 sc := -1 12188 if iter.Response().Response.Response != nil { 12189 sc = iter.Response().Response.Response.StatusCode 12190 } 12191 tracing.EndSpan(ctx, sc, err) 12192 }() 12193 } 12194 iter.i++ 12195 if iter.i < len(iter.page.Values()) { 12196 return nil 12197 } 12198 err = iter.page.NextWithContext(ctx) 12199 if err != nil { 12200 iter.i-- 12201 return err 12202 } 12203 iter.i = 0 12204 return nil 12205} 12206 12207// Next advances to the next value. If there was an error making 12208// the request the iterator does not advance and the error is returned. 12209// Deprecated: Use NextWithContext() instead. 12210func (iter *RecoveryPlanCollectionIterator) Next() error { 12211 return iter.NextWithContext(context.Background()) 12212} 12213 12214// NotDone returns true if the enumeration should be started or is not yet complete. 12215func (iter RecoveryPlanCollectionIterator) NotDone() bool { 12216 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 12217} 12218 12219// Response returns the raw server response from the last page request. 12220func (iter RecoveryPlanCollectionIterator) Response() RecoveryPlanCollection { 12221 return iter.page.Response() 12222} 12223 12224// Value returns the current value or a zero-initialized value if the 12225// iterator has advanced beyond the end of the collection. 12226func (iter RecoveryPlanCollectionIterator) Value() RecoveryPlan { 12227 if !iter.page.NotDone() { 12228 return RecoveryPlan{} 12229 } 12230 return iter.page.Values()[iter.i] 12231} 12232 12233// Creates a new instance of the RecoveryPlanCollectionIterator type. 12234func NewRecoveryPlanCollectionIterator(page RecoveryPlanCollectionPage) RecoveryPlanCollectionIterator { 12235 return RecoveryPlanCollectionIterator{page: page} 12236} 12237 12238// IsEmpty returns true if the ListResult contains no values. 12239func (RPCVar RecoveryPlanCollection) IsEmpty() bool { 12240 return RPCVar.Value == nil || len(*RPCVar.Value) == 0 12241} 12242 12243// hasNextLink returns true if the NextLink is not empty. 12244func (RPCVar RecoveryPlanCollection) hasNextLink() bool { 12245 return RPCVar.NextLink != nil && len(*RPCVar.NextLink) != 0 12246} 12247 12248// recoveryPlanCollectionPreparer prepares a request to retrieve the next set of results. 12249// It returns nil if no more results exist. 12250func (RPCVar RecoveryPlanCollection) recoveryPlanCollectionPreparer(ctx context.Context) (*http.Request, error) { 12251 if !RPCVar.hasNextLink() { 12252 return nil, nil 12253 } 12254 return autorest.Prepare((&http.Request{}).WithContext(ctx), 12255 autorest.AsJSON(), 12256 autorest.AsGet(), 12257 autorest.WithBaseURL(to.String(RPCVar.NextLink))) 12258} 12259 12260// RecoveryPlanCollectionPage contains a page of RecoveryPlan values. 12261type RecoveryPlanCollectionPage struct { 12262 fn func(context.Context, RecoveryPlanCollection) (RecoveryPlanCollection, error) 12263 RPCVar RecoveryPlanCollection 12264} 12265 12266// NextWithContext advances to the next page of values. If there was an error making 12267// the request the page does not advance and the error is returned. 12268func (page *RecoveryPlanCollectionPage) NextWithContext(ctx context.Context) (err error) { 12269 if tracing.IsEnabled() { 12270 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPlanCollectionPage.NextWithContext") 12271 defer func() { 12272 sc := -1 12273 if page.Response().Response.Response != nil { 12274 sc = page.Response().Response.Response.StatusCode 12275 } 12276 tracing.EndSpan(ctx, sc, err) 12277 }() 12278 } 12279 for { 12280 next, err := page.fn(ctx, page.RPCVar) 12281 if err != nil { 12282 return err 12283 } 12284 page.RPCVar = next 12285 if !next.hasNextLink() || !next.IsEmpty() { 12286 break 12287 } 12288 } 12289 return nil 12290} 12291 12292// Next advances to the next page of values. If there was an error making 12293// the request the page does not advance and the error is returned. 12294// Deprecated: Use NextWithContext() instead. 12295func (page *RecoveryPlanCollectionPage) Next() error { 12296 return page.NextWithContext(context.Background()) 12297} 12298 12299// NotDone returns true if the page enumeration should be started or is not yet complete. 12300func (page RecoveryPlanCollectionPage) NotDone() bool { 12301 return !page.RPCVar.IsEmpty() 12302} 12303 12304// Response returns the raw server response from the last page request. 12305func (page RecoveryPlanCollectionPage) Response() RecoveryPlanCollection { 12306 return page.RPCVar 12307} 12308 12309// Values returns the slice of values for the current page or nil if there are no values. 12310func (page RecoveryPlanCollectionPage) Values() []RecoveryPlan { 12311 if page.RPCVar.IsEmpty() { 12312 return nil 12313 } 12314 return *page.RPCVar.Value 12315} 12316 12317// Creates a new instance of the RecoveryPlanCollectionPage type. 12318func NewRecoveryPlanCollectionPage(cur RecoveryPlanCollection, getNextPage func(context.Context, RecoveryPlanCollection) (RecoveryPlanCollection, error)) RecoveryPlanCollectionPage { 12319 return RecoveryPlanCollectionPage{ 12320 fn: getNextPage, 12321 RPCVar: cur, 12322 } 12323} 12324 12325// RecoveryPlanGroup recovery plan group details. 12326type RecoveryPlanGroup struct { 12327 // GroupType - The group type. Possible values include: 'Shutdown', 'Boot', 'Failover' 12328 GroupType RecoveryPlanGroupType `json:"groupType,omitempty"` 12329 // ReplicationProtectedItems - The list of protected items. 12330 ReplicationProtectedItems *[]RecoveryPlanProtectedItem `json:"replicationProtectedItems,omitempty"` 12331 // StartGroupActions - The start group actions. 12332 StartGroupActions *[]RecoveryPlanAction `json:"startGroupActions,omitempty"` 12333 // EndGroupActions - The end group actions. 12334 EndGroupActions *[]RecoveryPlanAction `json:"endGroupActions,omitempty"` 12335} 12336 12337// RecoveryPlanGroupTaskDetails this class represents the recovery plan group task. 12338type RecoveryPlanGroupTaskDetails struct { 12339 // Name - The name. 12340 Name *string `json:"name,omitempty"` 12341 // GroupID - The group identifier. 12342 GroupID *string `json:"groupId,omitempty"` 12343 // RpGroupType - The group type. 12344 RpGroupType *string `json:"rpGroupType,omitempty"` 12345 // ChildTasks - The child tasks. 12346 ChildTasks *[]ASRTask `json:"childTasks,omitempty"` 12347 // InstanceType - Possible values include: 'InstanceTypeGroupTaskDetails', 'InstanceTypeInlineWorkflowTaskDetails', 'InstanceTypeRecoveryPlanGroupTaskDetails', 'InstanceTypeRecoveryPlanShutdownGroupTaskDetails' 12348 InstanceType InstanceTypeBasicGroupTaskDetails `json:"instanceType,omitempty"` 12349} 12350 12351// MarshalJSON is the custom marshaler for RecoveryPlanGroupTaskDetails. 12352func (rpgtd RecoveryPlanGroupTaskDetails) MarshalJSON() ([]byte, error) { 12353 rpgtd.InstanceType = InstanceTypeRecoveryPlanGroupTaskDetails 12354 objectMap := make(map[string]interface{}) 12355 if rpgtd.Name != nil { 12356 objectMap["name"] = rpgtd.Name 12357 } 12358 if rpgtd.GroupID != nil { 12359 objectMap["groupId"] = rpgtd.GroupID 12360 } 12361 if rpgtd.RpGroupType != nil { 12362 objectMap["rpGroupType"] = rpgtd.RpGroupType 12363 } 12364 if rpgtd.ChildTasks != nil { 12365 objectMap["childTasks"] = rpgtd.ChildTasks 12366 } 12367 if rpgtd.InstanceType != "" { 12368 objectMap["instanceType"] = rpgtd.InstanceType 12369 } 12370 return json.Marshal(objectMap) 12371} 12372 12373// AsInlineWorkflowTaskDetails is the BasicGroupTaskDetails implementation for RecoveryPlanGroupTaskDetails. 12374func (rpgtd RecoveryPlanGroupTaskDetails) AsInlineWorkflowTaskDetails() (*InlineWorkflowTaskDetails, bool) { 12375 return nil, false 12376} 12377 12378// AsRecoveryPlanGroupTaskDetails is the BasicGroupTaskDetails implementation for RecoveryPlanGroupTaskDetails. 12379func (rpgtd RecoveryPlanGroupTaskDetails) AsRecoveryPlanGroupTaskDetails() (*RecoveryPlanGroupTaskDetails, bool) { 12380 return &rpgtd, true 12381} 12382 12383// AsRecoveryPlanShutdownGroupTaskDetails is the BasicGroupTaskDetails implementation for RecoveryPlanGroupTaskDetails. 12384func (rpgtd RecoveryPlanGroupTaskDetails) AsRecoveryPlanShutdownGroupTaskDetails() (*RecoveryPlanShutdownGroupTaskDetails, bool) { 12385 return nil, false 12386} 12387 12388// AsGroupTaskDetails is the BasicGroupTaskDetails implementation for RecoveryPlanGroupTaskDetails. 12389func (rpgtd RecoveryPlanGroupTaskDetails) AsGroupTaskDetails() (*GroupTaskDetails, bool) { 12390 return nil, false 12391} 12392 12393// AsBasicGroupTaskDetails is the BasicGroupTaskDetails implementation for RecoveryPlanGroupTaskDetails. 12394func (rpgtd RecoveryPlanGroupTaskDetails) AsBasicGroupTaskDetails() (BasicGroupTaskDetails, bool) { 12395 return &rpgtd, true 12396} 12397 12398// RecoveryPlanHyperVReplicaAzureFailbackInput recovery plan HVR Azure failback input. 12399type RecoveryPlanHyperVReplicaAzureFailbackInput struct { 12400 // DataSyncOption - The data sync option. Possible values include: 'ForDownTime', 'ForSynchronization' 12401 DataSyncOption DataSyncStatus `json:"dataSyncOption,omitempty"` 12402 // RecoveryVMCreationOption - The ALR option. Possible values include: 'CreateVMIfNotFound', 'NoAction' 12403 RecoveryVMCreationOption AlternateLocationRecoveryOption `json:"recoveryVmCreationOption,omitempty"` 12404 // InstanceType - Possible values include: 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeRecoveryPlanProviderSpecificFailoverInput', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMage', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeA2A' 12405 InstanceType InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput `json:"instanceType,omitempty"` 12406} 12407 12408// MarshalJSON is the custom marshaler for RecoveryPlanHyperVReplicaAzureFailbackInput. 12409func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) MarshalJSON() ([]byte, error) { 12410 rphvrafi.InstanceType = InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback 12411 objectMap := make(map[string]interface{}) 12412 if rphvrafi.DataSyncOption != "" { 12413 objectMap["dataSyncOption"] = rphvrafi.DataSyncOption 12414 } 12415 if rphvrafi.RecoveryVMCreationOption != "" { 12416 objectMap["recoveryVmCreationOption"] = rphvrafi.RecoveryVMCreationOption 12417 } 12418 if rphvrafi.InstanceType != "" { 12419 objectMap["instanceType"] = rphvrafi.InstanceType 12420 } 12421 return json.Marshal(objectMap) 12422} 12423 12424// AsRecoveryPlanHyperVReplicaAzureFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailbackInput. 12425func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool) { 12426 return nil, false 12427} 12428 12429// AsRecoveryPlanHyperVReplicaAzureFailbackInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailbackInput. 12430func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool) { 12431 return &rphvrafi, true 12432} 12433 12434// AsRecoveryPlanInMageAzureV2FailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailbackInput. 12435func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool) { 12436 return nil, false 12437} 12438 12439// AsRecoveryPlanInMageFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailbackInput. 12440func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool) { 12441 return nil, false 12442} 12443 12444// AsRecoveryPlanA2AFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailbackInput. 12445func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) { 12446 return nil, false 12447} 12448 12449// AsRecoveryPlanProviderSpecificFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailbackInput. 12450func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsRecoveryPlanProviderSpecificFailoverInput() (*RecoveryPlanProviderSpecificFailoverInput, bool) { 12451 return nil, false 12452} 12453 12454// AsBasicRecoveryPlanProviderSpecificFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailbackInput. 12455func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsBasicRecoveryPlanProviderSpecificFailoverInput() (BasicRecoveryPlanProviderSpecificFailoverInput, bool) { 12456 return &rphvrafi, true 12457} 12458 12459// RecoveryPlanHyperVReplicaAzureFailoverInput recovery plan HVR Azure failover input. 12460type RecoveryPlanHyperVReplicaAzureFailoverInput struct { 12461 // VaultLocation - The vault location. 12462 VaultLocation *string `json:"vaultLocation,omitempty"` 12463 // PrimaryKekCertificatePfx - The primary KEK certificate PFX. 12464 PrimaryKekCertificatePfx *string `json:"primaryKekCertificatePfx,omitempty"` 12465 // SecondaryKekCertificatePfx - The secondary KEK certificate PFX. 12466 SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` 12467 // RecoveryPointType - The recovery point type. Possible values include: 'HyperVReplicaAzureRpRecoveryPointTypeLatest', 'HyperVReplicaAzureRpRecoveryPointTypeLatestApplicationConsistent', 'HyperVReplicaAzureRpRecoveryPointTypeLatestProcessed' 12468 RecoveryPointType HyperVReplicaAzureRpRecoveryPointType `json:"recoveryPointType,omitempty"` 12469 // InstanceType - Possible values include: 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeRecoveryPlanProviderSpecificFailoverInput', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMage', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeA2A' 12470 InstanceType InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput `json:"instanceType,omitempty"` 12471} 12472 12473// MarshalJSON is the custom marshaler for RecoveryPlanHyperVReplicaAzureFailoverInput. 12474func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) MarshalJSON() ([]byte, error) { 12475 rphvrafi.InstanceType = InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure 12476 objectMap := make(map[string]interface{}) 12477 if rphvrafi.VaultLocation != nil { 12478 objectMap["vaultLocation"] = rphvrafi.VaultLocation 12479 } 12480 if rphvrafi.PrimaryKekCertificatePfx != nil { 12481 objectMap["primaryKekCertificatePfx"] = rphvrafi.PrimaryKekCertificatePfx 12482 } 12483 if rphvrafi.SecondaryKekCertificatePfx != nil { 12484 objectMap["secondaryKekCertificatePfx"] = rphvrafi.SecondaryKekCertificatePfx 12485 } 12486 if rphvrafi.RecoveryPointType != "" { 12487 objectMap["recoveryPointType"] = rphvrafi.RecoveryPointType 12488 } 12489 if rphvrafi.InstanceType != "" { 12490 objectMap["instanceType"] = rphvrafi.InstanceType 12491 } 12492 return json.Marshal(objectMap) 12493} 12494 12495// AsRecoveryPlanHyperVReplicaAzureFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailoverInput. 12496func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool) { 12497 return &rphvrafi, true 12498} 12499 12500// AsRecoveryPlanHyperVReplicaAzureFailbackInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailoverInput. 12501func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool) { 12502 return nil, false 12503} 12504 12505// AsRecoveryPlanInMageAzureV2FailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailoverInput. 12506func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool) { 12507 return nil, false 12508} 12509 12510// AsRecoveryPlanInMageFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailoverInput. 12511func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool) { 12512 return nil, false 12513} 12514 12515// AsRecoveryPlanA2AFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailoverInput. 12516func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) { 12517 return nil, false 12518} 12519 12520// AsRecoveryPlanProviderSpecificFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailoverInput. 12521func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsRecoveryPlanProviderSpecificFailoverInput() (*RecoveryPlanProviderSpecificFailoverInput, bool) { 12522 return nil, false 12523} 12524 12525// AsBasicRecoveryPlanProviderSpecificFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailoverInput. 12526func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsBasicRecoveryPlanProviderSpecificFailoverInput() (BasicRecoveryPlanProviderSpecificFailoverInput, bool) { 12527 return &rphvrafi, true 12528} 12529 12530// RecoveryPlanInMageAzureV2FailoverInput recovery plan InMageAzureV2 failover input. 12531type RecoveryPlanInMageAzureV2FailoverInput struct { 12532 // VaultLocation - The vault location. 12533 VaultLocation *string `json:"vaultLocation,omitempty"` 12534 // RecoveryPointType - The recovery point type. Possible values include: 'InMageV2RpRecoveryPointTypeLatest', 'InMageV2RpRecoveryPointTypeLatestApplicationConsistent', 'InMageV2RpRecoveryPointTypeLatestCrashConsistent', 'InMageV2RpRecoveryPointTypeLatestProcessed' 12535 RecoveryPointType InMageV2RpRecoveryPointType `json:"recoveryPointType,omitempty"` 12536 // UseMultiVMSyncPoint - A value indicating whether multi VM sync enabled VMs should use multi VM sync points for failover. 12537 UseMultiVMSyncPoint *string `json:"useMultiVmSyncPoint,omitempty"` 12538 // InstanceType - Possible values include: 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeRecoveryPlanProviderSpecificFailoverInput', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMage', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeA2A' 12539 InstanceType InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput `json:"instanceType,omitempty"` 12540} 12541 12542// MarshalJSON is the custom marshaler for RecoveryPlanInMageAzureV2FailoverInput. 12543func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) MarshalJSON() ([]byte, error) { 12544 rpimavfi.InstanceType = InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMageAzureV2 12545 objectMap := make(map[string]interface{}) 12546 if rpimavfi.VaultLocation != nil { 12547 objectMap["vaultLocation"] = rpimavfi.VaultLocation 12548 } 12549 if rpimavfi.RecoveryPointType != "" { 12550 objectMap["recoveryPointType"] = rpimavfi.RecoveryPointType 12551 } 12552 if rpimavfi.UseMultiVMSyncPoint != nil { 12553 objectMap["useMultiVmSyncPoint"] = rpimavfi.UseMultiVMSyncPoint 12554 } 12555 if rpimavfi.InstanceType != "" { 12556 objectMap["instanceType"] = rpimavfi.InstanceType 12557 } 12558 return json.Marshal(objectMap) 12559} 12560 12561// AsRecoveryPlanHyperVReplicaAzureFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageAzureV2FailoverInput. 12562func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool) { 12563 return nil, false 12564} 12565 12566// AsRecoveryPlanHyperVReplicaAzureFailbackInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageAzureV2FailoverInput. 12567func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool) { 12568 return nil, false 12569} 12570 12571// AsRecoveryPlanInMageAzureV2FailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageAzureV2FailoverInput. 12572func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool) { 12573 return &rpimavfi, true 12574} 12575 12576// AsRecoveryPlanInMageFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageAzureV2FailoverInput. 12577func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool) { 12578 return nil, false 12579} 12580 12581// AsRecoveryPlanA2AFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageAzureV2FailoverInput. 12582func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) { 12583 return nil, false 12584} 12585 12586// AsRecoveryPlanProviderSpecificFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageAzureV2FailoverInput. 12587func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsRecoveryPlanProviderSpecificFailoverInput() (*RecoveryPlanProviderSpecificFailoverInput, bool) { 12588 return nil, false 12589} 12590 12591// AsBasicRecoveryPlanProviderSpecificFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageAzureV2FailoverInput. 12592func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsBasicRecoveryPlanProviderSpecificFailoverInput() (BasicRecoveryPlanProviderSpecificFailoverInput, bool) { 12593 return &rpimavfi, true 12594} 12595 12596// RecoveryPlanInMageFailoverInput recovery plan InMage failover input. 12597type RecoveryPlanInMageFailoverInput struct { 12598 // RecoveryPointType - The recovery point type. Possible values include: 'RpInMageRecoveryPointTypeLatestTime', 'RpInMageRecoveryPointTypeLatestTag', 'RpInMageRecoveryPointTypeCustom' 12599 RecoveryPointType RpInMageRecoveryPointType `json:"recoveryPointType,omitempty"` 12600 // InstanceType - Possible values include: 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeRecoveryPlanProviderSpecificFailoverInput', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMage', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeA2A' 12601 InstanceType InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput `json:"instanceType,omitempty"` 12602} 12603 12604// MarshalJSON is the custom marshaler for RecoveryPlanInMageFailoverInput. 12605func (rpimfi RecoveryPlanInMageFailoverInput) MarshalJSON() ([]byte, error) { 12606 rpimfi.InstanceType = InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMage 12607 objectMap := make(map[string]interface{}) 12608 if rpimfi.RecoveryPointType != "" { 12609 objectMap["recoveryPointType"] = rpimfi.RecoveryPointType 12610 } 12611 if rpimfi.InstanceType != "" { 12612 objectMap["instanceType"] = rpimfi.InstanceType 12613 } 12614 return json.Marshal(objectMap) 12615} 12616 12617// AsRecoveryPlanHyperVReplicaAzureFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageFailoverInput. 12618func (rpimfi RecoveryPlanInMageFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool) { 12619 return nil, false 12620} 12621 12622// AsRecoveryPlanHyperVReplicaAzureFailbackInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageFailoverInput. 12623func (rpimfi RecoveryPlanInMageFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool) { 12624 return nil, false 12625} 12626 12627// AsRecoveryPlanInMageAzureV2FailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageFailoverInput. 12628func (rpimfi RecoveryPlanInMageFailoverInput) AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool) { 12629 return nil, false 12630} 12631 12632// AsRecoveryPlanInMageFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageFailoverInput. 12633func (rpimfi RecoveryPlanInMageFailoverInput) AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool) { 12634 return &rpimfi, true 12635} 12636 12637// AsRecoveryPlanA2AFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageFailoverInput. 12638func (rpimfi RecoveryPlanInMageFailoverInput) AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) { 12639 return nil, false 12640} 12641 12642// AsRecoveryPlanProviderSpecificFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageFailoverInput. 12643func (rpimfi RecoveryPlanInMageFailoverInput) AsRecoveryPlanProviderSpecificFailoverInput() (*RecoveryPlanProviderSpecificFailoverInput, bool) { 12644 return nil, false 12645} 12646 12647// AsBasicRecoveryPlanProviderSpecificFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageFailoverInput. 12648func (rpimfi RecoveryPlanInMageFailoverInput) AsBasicRecoveryPlanProviderSpecificFailoverInput() (BasicRecoveryPlanProviderSpecificFailoverInput, bool) { 12649 return &rpimfi, true 12650} 12651 12652// RecoveryPlanManualActionDetails recovery plan manual action details. 12653type RecoveryPlanManualActionDetails struct { 12654 // Description - The manual action description. 12655 Description *string `json:"description,omitempty"` 12656 // InstanceType - Possible values include: 'InstanceTypeRecoveryPlanActionDetails', 'InstanceTypeScriptActionDetails', 'InstanceTypeAutomationRunbookActionDetails', 'InstanceTypeManualActionDetails' 12657 InstanceType InstanceTypeBasicRecoveryPlanActionDetails `json:"instanceType,omitempty"` 12658} 12659 12660// MarshalJSON is the custom marshaler for RecoveryPlanManualActionDetails. 12661func (rpmad RecoveryPlanManualActionDetails) MarshalJSON() ([]byte, error) { 12662 rpmad.InstanceType = InstanceTypeManualActionDetails 12663 objectMap := make(map[string]interface{}) 12664 if rpmad.Description != nil { 12665 objectMap["description"] = rpmad.Description 12666 } 12667 if rpmad.InstanceType != "" { 12668 objectMap["instanceType"] = rpmad.InstanceType 12669 } 12670 return json.Marshal(objectMap) 12671} 12672 12673// AsRecoveryPlanScriptActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanManualActionDetails. 12674func (rpmad RecoveryPlanManualActionDetails) AsRecoveryPlanScriptActionDetails() (*RecoveryPlanScriptActionDetails, bool) { 12675 return nil, false 12676} 12677 12678// AsRecoveryPlanAutomationRunbookActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanManualActionDetails. 12679func (rpmad RecoveryPlanManualActionDetails) AsRecoveryPlanAutomationRunbookActionDetails() (*RecoveryPlanAutomationRunbookActionDetails, bool) { 12680 return nil, false 12681} 12682 12683// AsRecoveryPlanManualActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanManualActionDetails. 12684func (rpmad RecoveryPlanManualActionDetails) AsRecoveryPlanManualActionDetails() (*RecoveryPlanManualActionDetails, bool) { 12685 return &rpmad, true 12686} 12687 12688// AsRecoveryPlanActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanManualActionDetails. 12689func (rpmad RecoveryPlanManualActionDetails) AsRecoveryPlanActionDetails() (*RecoveryPlanActionDetails, bool) { 12690 return nil, false 12691} 12692 12693// AsBasicRecoveryPlanActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanManualActionDetails. 12694func (rpmad RecoveryPlanManualActionDetails) AsBasicRecoveryPlanActionDetails() (BasicRecoveryPlanActionDetails, bool) { 12695 return &rpmad, true 12696} 12697 12698// RecoveryPlanPlannedFailoverInput recovery plan planned failover input. 12699type RecoveryPlanPlannedFailoverInput struct { 12700 // Properties - The recovery plan planned failover input properties. 12701 Properties *RecoveryPlanPlannedFailoverInputProperties `json:"properties,omitempty"` 12702} 12703 12704// RecoveryPlanPlannedFailoverInputProperties recovery plan planned failover input properties. 12705type RecoveryPlanPlannedFailoverInputProperties struct { 12706 // FailoverDirection - The failover direction. Possible values include: 'PrimaryToRecovery', 'RecoveryToPrimary' 12707 FailoverDirection PossibleOperationsDirections `json:"failoverDirection,omitempty"` 12708 // ProviderSpecificDetails - The provider specific properties. 12709 ProviderSpecificDetails *[]BasicRecoveryPlanProviderSpecificFailoverInput `json:"providerSpecificDetails,omitempty"` 12710} 12711 12712// UnmarshalJSON is the custom unmarshaler for RecoveryPlanPlannedFailoverInputProperties struct. 12713func (rppfip *RecoveryPlanPlannedFailoverInputProperties) UnmarshalJSON(body []byte) error { 12714 var m map[string]*json.RawMessage 12715 err := json.Unmarshal(body, &m) 12716 if err != nil { 12717 return err 12718 } 12719 for k, v := range m { 12720 switch k { 12721 case "failoverDirection": 12722 if v != nil { 12723 var failoverDirection PossibleOperationsDirections 12724 err = json.Unmarshal(*v, &failoverDirection) 12725 if err != nil { 12726 return err 12727 } 12728 rppfip.FailoverDirection = failoverDirection 12729 } 12730 case "providerSpecificDetails": 12731 if v != nil { 12732 providerSpecificDetails, err := unmarshalBasicRecoveryPlanProviderSpecificFailoverInputArray(*v) 12733 if err != nil { 12734 return err 12735 } 12736 rppfip.ProviderSpecificDetails = &providerSpecificDetails 12737 } 12738 } 12739 } 12740 12741 return nil 12742} 12743 12744// RecoveryPlanProperties recovery plan custom details. 12745type RecoveryPlanProperties struct { 12746 // FriendlyName - The friendly name. 12747 FriendlyName *string `json:"friendlyName,omitempty"` 12748 // PrimaryFabricID - The primary fabric Id. 12749 PrimaryFabricID *string `json:"primaryFabricId,omitempty"` 12750 // PrimaryFabricFriendlyName - The primary fabric friendly name. 12751 PrimaryFabricFriendlyName *string `json:"primaryFabricFriendlyName,omitempty"` 12752 // RecoveryFabricID - The recovery fabric Id. 12753 RecoveryFabricID *string `json:"recoveryFabricId,omitempty"` 12754 // RecoveryFabricFriendlyName - The recovery fabric friendly name. 12755 RecoveryFabricFriendlyName *string `json:"recoveryFabricFriendlyName,omitempty"` 12756 // FailoverDeploymentModel - The failover deployment model. 12757 FailoverDeploymentModel *string `json:"failoverDeploymentModel,omitempty"` 12758 // ReplicationProviders - The list of replication providers. 12759 ReplicationProviders *[]string `json:"replicationProviders,omitempty"` 12760 // AllowedOperations - The list of allowed operations. 12761 AllowedOperations *[]string `json:"allowedOperations,omitempty"` 12762 // LastPlannedFailoverTime - The start time of the last planned failover. 12763 LastPlannedFailoverTime *date.Time `json:"lastPlannedFailoverTime,omitempty"` 12764 // LastUnplannedFailoverTime - The start time of the last unplanned failover. 12765 LastUnplannedFailoverTime *date.Time `json:"lastUnplannedFailoverTime,omitempty"` 12766 // LastTestFailoverTime - The start time of the last test failover. 12767 LastTestFailoverTime *date.Time `json:"lastTestFailoverTime,omitempty"` 12768 // CurrentScenario - The current scenario details. 12769 CurrentScenario *CurrentScenarioDetails `json:"currentScenario,omitempty"` 12770 // CurrentScenarioStatus - The recovery plan status. 12771 CurrentScenarioStatus *string `json:"currentScenarioStatus,omitempty"` 12772 // CurrentScenarioStatusDescription - The recovery plan status description. 12773 CurrentScenarioStatusDescription *string `json:"currentScenarioStatusDescription,omitempty"` 12774 // Groups - The recovery plan groups. 12775 Groups *[]RecoveryPlanGroup `json:"groups,omitempty"` 12776} 12777 12778// RecoveryPlanProtectedItem recovery plan protected item. 12779type RecoveryPlanProtectedItem struct { 12780 // ID - The ARM Id of the recovery plan protected item. 12781 ID *string `json:"id,omitempty"` 12782 // VirtualMachineID - The virtual machine Id. 12783 VirtualMachineID *string `json:"virtualMachineId,omitempty"` 12784} 12785 12786// BasicRecoveryPlanProviderSpecificFailoverInput recovery plan provider specific failover input base class. 12787type BasicRecoveryPlanProviderSpecificFailoverInput interface { 12788 AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool) 12789 AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool) 12790 AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool) 12791 AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool) 12792 AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) 12793 AsRecoveryPlanProviderSpecificFailoverInput() (*RecoveryPlanProviderSpecificFailoverInput, bool) 12794} 12795 12796// RecoveryPlanProviderSpecificFailoverInput recovery plan provider specific failover input base class. 12797type RecoveryPlanProviderSpecificFailoverInput struct { 12798 // InstanceType - Possible values include: 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeRecoveryPlanProviderSpecificFailoverInput', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMage', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeA2A' 12799 InstanceType InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput `json:"instanceType,omitempty"` 12800} 12801 12802func unmarshalBasicRecoveryPlanProviderSpecificFailoverInput(body []byte) (BasicRecoveryPlanProviderSpecificFailoverInput, error) { 12803 var m map[string]interface{} 12804 err := json.Unmarshal(body, &m) 12805 if err != nil { 12806 return nil, err 12807 } 12808 12809 switch m["instanceType"] { 12810 case string(InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure): 12811 var rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput 12812 err := json.Unmarshal(body, &rphvrafi) 12813 return rphvrafi, err 12814 case string(InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback): 12815 var rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput 12816 err := json.Unmarshal(body, &rphvrafi) 12817 return rphvrafi, err 12818 case string(InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMageAzureV2): 12819 var rpimavfi RecoveryPlanInMageAzureV2FailoverInput 12820 err := json.Unmarshal(body, &rpimavfi) 12821 return rpimavfi, err 12822 case string(InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMage): 12823 var rpimfi RecoveryPlanInMageFailoverInput 12824 err := json.Unmarshal(body, &rpimfi) 12825 return rpimfi, err 12826 case string(InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeA2A): 12827 var rpafi RecoveryPlanA2AFailoverInput 12828 err := json.Unmarshal(body, &rpafi) 12829 return rpafi, err 12830 default: 12831 var rppsfi RecoveryPlanProviderSpecificFailoverInput 12832 err := json.Unmarshal(body, &rppsfi) 12833 return rppsfi, err 12834 } 12835} 12836func unmarshalBasicRecoveryPlanProviderSpecificFailoverInputArray(body []byte) ([]BasicRecoveryPlanProviderSpecificFailoverInput, error) { 12837 var rawMessages []*json.RawMessage 12838 err := json.Unmarshal(body, &rawMessages) 12839 if err != nil { 12840 return nil, err 12841 } 12842 12843 rppsfiArray := make([]BasicRecoveryPlanProviderSpecificFailoverInput, len(rawMessages)) 12844 12845 for index, rawMessage := range rawMessages { 12846 rppsfi, err := unmarshalBasicRecoveryPlanProviderSpecificFailoverInput(*rawMessage) 12847 if err != nil { 12848 return nil, err 12849 } 12850 rppsfiArray[index] = rppsfi 12851 } 12852 return rppsfiArray, nil 12853} 12854 12855// MarshalJSON is the custom marshaler for RecoveryPlanProviderSpecificFailoverInput. 12856func (rppsfi RecoveryPlanProviderSpecificFailoverInput) MarshalJSON() ([]byte, error) { 12857 rppsfi.InstanceType = InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeRecoveryPlanProviderSpecificFailoverInput 12858 objectMap := make(map[string]interface{}) 12859 if rppsfi.InstanceType != "" { 12860 objectMap["instanceType"] = rppsfi.InstanceType 12861 } 12862 return json.Marshal(objectMap) 12863} 12864 12865// AsRecoveryPlanHyperVReplicaAzureFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanProviderSpecificFailoverInput. 12866func (rppsfi RecoveryPlanProviderSpecificFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool) { 12867 return nil, false 12868} 12869 12870// AsRecoveryPlanHyperVReplicaAzureFailbackInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanProviderSpecificFailoverInput. 12871func (rppsfi RecoveryPlanProviderSpecificFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool) { 12872 return nil, false 12873} 12874 12875// AsRecoveryPlanInMageAzureV2FailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanProviderSpecificFailoverInput. 12876func (rppsfi RecoveryPlanProviderSpecificFailoverInput) AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool) { 12877 return nil, false 12878} 12879 12880// AsRecoveryPlanInMageFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanProviderSpecificFailoverInput. 12881func (rppsfi RecoveryPlanProviderSpecificFailoverInput) AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool) { 12882 return nil, false 12883} 12884 12885// AsRecoveryPlanA2AFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanProviderSpecificFailoverInput. 12886func (rppsfi RecoveryPlanProviderSpecificFailoverInput) AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) { 12887 return nil, false 12888} 12889 12890// AsRecoveryPlanProviderSpecificFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanProviderSpecificFailoverInput. 12891func (rppsfi RecoveryPlanProviderSpecificFailoverInput) AsRecoveryPlanProviderSpecificFailoverInput() (*RecoveryPlanProviderSpecificFailoverInput, bool) { 12892 return &rppsfi, true 12893} 12894 12895// AsBasicRecoveryPlanProviderSpecificFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanProviderSpecificFailoverInput. 12896func (rppsfi RecoveryPlanProviderSpecificFailoverInput) AsBasicRecoveryPlanProviderSpecificFailoverInput() (BasicRecoveryPlanProviderSpecificFailoverInput, bool) { 12897 return &rppsfi, true 12898} 12899 12900// RecoveryPlanScriptActionDetails recovery plan script action details. 12901type RecoveryPlanScriptActionDetails struct { 12902 // Path - The script path. 12903 Path *string `json:"path,omitempty"` 12904 // Timeout - The script timeout. 12905 Timeout *string `json:"timeout,omitempty"` 12906 // FabricLocation - The fabric location. Possible values include: 'Primary', 'Recovery' 12907 FabricLocation RecoveryPlanActionLocation `json:"fabricLocation,omitempty"` 12908 // InstanceType - Possible values include: 'InstanceTypeRecoveryPlanActionDetails', 'InstanceTypeScriptActionDetails', 'InstanceTypeAutomationRunbookActionDetails', 'InstanceTypeManualActionDetails' 12909 InstanceType InstanceTypeBasicRecoveryPlanActionDetails `json:"instanceType,omitempty"` 12910} 12911 12912// MarshalJSON is the custom marshaler for RecoveryPlanScriptActionDetails. 12913func (rpsad RecoveryPlanScriptActionDetails) MarshalJSON() ([]byte, error) { 12914 rpsad.InstanceType = InstanceTypeScriptActionDetails 12915 objectMap := make(map[string]interface{}) 12916 if rpsad.Path != nil { 12917 objectMap["path"] = rpsad.Path 12918 } 12919 if rpsad.Timeout != nil { 12920 objectMap["timeout"] = rpsad.Timeout 12921 } 12922 if rpsad.FabricLocation != "" { 12923 objectMap["fabricLocation"] = rpsad.FabricLocation 12924 } 12925 if rpsad.InstanceType != "" { 12926 objectMap["instanceType"] = rpsad.InstanceType 12927 } 12928 return json.Marshal(objectMap) 12929} 12930 12931// AsRecoveryPlanScriptActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanScriptActionDetails. 12932func (rpsad RecoveryPlanScriptActionDetails) AsRecoveryPlanScriptActionDetails() (*RecoveryPlanScriptActionDetails, bool) { 12933 return &rpsad, true 12934} 12935 12936// AsRecoveryPlanAutomationRunbookActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanScriptActionDetails. 12937func (rpsad RecoveryPlanScriptActionDetails) AsRecoveryPlanAutomationRunbookActionDetails() (*RecoveryPlanAutomationRunbookActionDetails, bool) { 12938 return nil, false 12939} 12940 12941// AsRecoveryPlanManualActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanScriptActionDetails. 12942func (rpsad RecoveryPlanScriptActionDetails) AsRecoveryPlanManualActionDetails() (*RecoveryPlanManualActionDetails, bool) { 12943 return nil, false 12944} 12945 12946// AsRecoveryPlanActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanScriptActionDetails. 12947func (rpsad RecoveryPlanScriptActionDetails) AsRecoveryPlanActionDetails() (*RecoveryPlanActionDetails, bool) { 12948 return nil, false 12949} 12950 12951// AsBasicRecoveryPlanActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanScriptActionDetails. 12952func (rpsad RecoveryPlanScriptActionDetails) AsBasicRecoveryPlanActionDetails() (BasicRecoveryPlanActionDetails, bool) { 12953 return &rpsad, true 12954} 12955 12956// RecoveryPlanShutdownGroupTaskDetails this class represents the recovery plan shutdown group task 12957// details. 12958type RecoveryPlanShutdownGroupTaskDetails struct { 12959 // Name - The name. 12960 Name *string `json:"name,omitempty"` 12961 // GroupID - The group identifier. 12962 GroupID *string `json:"groupId,omitempty"` 12963 // RpGroupType - The group type. 12964 RpGroupType *string `json:"rpGroupType,omitempty"` 12965 // ChildTasks - The child tasks. 12966 ChildTasks *[]ASRTask `json:"childTasks,omitempty"` 12967 // InstanceType - Possible values include: 'InstanceTypeGroupTaskDetails', 'InstanceTypeInlineWorkflowTaskDetails', 'InstanceTypeRecoveryPlanGroupTaskDetails', 'InstanceTypeRecoveryPlanShutdownGroupTaskDetails' 12968 InstanceType InstanceTypeBasicGroupTaskDetails `json:"instanceType,omitempty"` 12969} 12970 12971// MarshalJSON is the custom marshaler for RecoveryPlanShutdownGroupTaskDetails. 12972func (rpsgtd RecoveryPlanShutdownGroupTaskDetails) MarshalJSON() ([]byte, error) { 12973 rpsgtd.InstanceType = InstanceTypeRecoveryPlanShutdownGroupTaskDetails 12974 objectMap := make(map[string]interface{}) 12975 if rpsgtd.Name != nil { 12976 objectMap["name"] = rpsgtd.Name 12977 } 12978 if rpsgtd.GroupID != nil { 12979 objectMap["groupId"] = rpsgtd.GroupID 12980 } 12981 if rpsgtd.RpGroupType != nil { 12982 objectMap["rpGroupType"] = rpsgtd.RpGroupType 12983 } 12984 if rpsgtd.ChildTasks != nil { 12985 objectMap["childTasks"] = rpsgtd.ChildTasks 12986 } 12987 if rpsgtd.InstanceType != "" { 12988 objectMap["instanceType"] = rpsgtd.InstanceType 12989 } 12990 return json.Marshal(objectMap) 12991} 12992 12993// AsInlineWorkflowTaskDetails is the BasicGroupTaskDetails implementation for RecoveryPlanShutdownGroupTaskDetails. 12994func (rpsgtd RecoveryPlanShutdownGroupTaskDetails) AsInlineWorkflowTaskDetails() (*InlineWorkflowTaskDetails, bool) { 12995 return nil, false 12996} 12997 12998// AsRecoveryPlanGroupTaskDetails is the BasicGroupTaskDetails implementation for RecoveryPlanShutdownGroupTaskDetails. 12999func (rpsgtd RecoveryPlanShutdownGroupTaskDetails) AsRecoveryPlanGroupTaskDetails() (*RecoveryPlanGroupTaskDetails, bool) { 13000 return nil, false 13001} 13002 13003// AsRecoveryPlanShutdownGroupTaskDetails is the BasicGroupTaskDetails implementation for RecoveryPlanShutdownGroupTaskDetails. 13004func (rpsgtd RecoveryPlanShutdownGroupTaskDetails) AsRecoveryPlanShutdownGroupTaskDetails() (*RecoveryPlanShutdownGroupTaskDetails, bool) { 13005 return &rpsgtd, true 13006} 13007 13008// AsGroupTaskDetails is the BasicGroupTaskDetails implementation for RecoveryPlanShutdownGroupTaskDetails. 13009func (rpsgtd RecoveryPlanShutdownGroupTaskDetails) AsGroupTaskDetails() (*GroupTaskDetails, bool) { 13010 return nil, false 13011} 13012 13013// AsBasicGroupTaskDetails is the BasicGroupTaskDetails implementation for RecoveryPlanShutdownGroupTaskDetails. 13014func (rpsgtd RecoveryPlanShutdownGroupTaskDetails) AsBasicGroupTaskDetails() (BasicGroupTaskDetails, bool) { 13015 return &rpsgtd, true 13016} 13017 13018// RecoveryPlanTestFailoverCleanupInput recovery plan test failover cleanup input. 13019type RecoveryPlanTestFailoverCleanupInput struct { 13020 // Properties - The recovery plan test failover cleanup input properties. 13021 Properties *RecoveryPlanTestFailoverCleanupInputProperties `json:"properties,omitempty"` 13022} 13023 13024// RecoveryPlanTestFailoverCleanupInputProperties recovery plan test failover cleanup input properties. 13025type RecoveryPlanTestFailoverCleanupInputProperties struct { 13026 // Comments - The test failover cleanup comments. 13027 Comments *string `json:"comments,omitempty"` 13028} 13029 13030// RecoveryPlanTestFailoverInput recovery plan test failover input. 13031type RecoveryPlanTestFailoverInput struct { 13032 // Properties - The recovery plan test failover input properties. 13033 Properties *RecoveryPlanTestFailoverInputProperties `json:"properties,omitempty"` 13034} 13035 13036// RecoveryPlanTestFailoverInputProperties recovery plan test failover input properties. 13037type RecoveryPlanTestFailoverInputProperties struct { 13038 // FailoverDirection - The failover direction. Possible values include: 'PrimaryToRecovery', 'RecoveryToPrimary' 13039 FailoverDirection PossibleOperationsDirections `json:"failoverDirection,omitempty"` 13040 // NetworkType - The network type to be used for test failover. 13041 NetworkType *string `json:"networkType,omitempty"` 13042 // NetworkID - The Id of the network to be used for test failover. 13043 NetworkID *string `json:"networkId,omitempty"` 13044 // SkipTestFailoverCleanup - A value indicating whether the test failover cleanup is to be skipped. 13045 SkipTestFailoverCleanup *string `json:"skipTestFailoverCleanup,omitempty"` 13046 // ProviderSpecificDetails - The provider specific properties. 13047 ProviderSpecificDetails *[]BasicRecoveryPlanProviderSpecificFailoverInput `json:"providerSpecificDetails,omitempty"` 13048} 13049 13050// UnmarshalJSON is the custom unmarshaler for RecoveryPlanTestFailoverInputProperties struct. 13051func (rptfip *RecoveryPlanTestFailoverInputProperties) UnmarshalJSON(body []byte) error { 13052 var m map[string]*json.RawMessage 13053 err := json.Unmarshal(body, &m) 13054 if err != nil { 13055 return err 13056 } 13057 for k, v := range m { 13058 switch k { 13059 case "failoverDirection": 13060 if v != nil { 13061 var failoverDirection PossibleOperationsDirections 13062 err = json.Unmarshal(*v, &failoverDirection) 13063 if err != nil { 13064 return err 13065 } 13066 rptfip.FailoverDirection = failoverDirection 13067 } 13068 case "networkType": 13069 if v != nil { 13070 var networkType string 13071 err = json.Unmarshal(*v, &networkType) 13072 if err != nil { 13073 return err 13074 } 13075 rptfip.NetworkType = &networkType 13076 } 13077 case "networkId": 13078 if v != nil { 13079 var networkID string 13080 err = json.Unmarshal(*v, &networkID) 13081 if err != nil { 13082 return err 13083 } 13084 rptfip.NetworkID = &networkID 13085 } 13086 case "skipTestFailoverCleanup": 13087 if v != nil { 13088 var skipTestFailoverCleanup string 13089 err = json.Unmarshal(*v, &skipTestFailoverCleanup) 13090 if err != nil { 13091 return err 13092 } 13093 rptfip.SkipTestFailoverCleanup = &skipTestFailoverCleanup 13094 } 13095 case "providerSpecificDetails": 13096 if v != nil { 13097 providerSpecificDetails, err := unmarshalBasicRecoveryPlanProviderSpecificFailoverInputArray(*v) 13098 if err != nil { 13099 return err 13100 } 13101 rptfip.ProviderSpecificDetails = &providerSpecificDetails 13102 } 13103 } 13104 } 13105 13106 return nil 13107} 13108 13109// RecoveryPlanUnplannedFailoverInput recovery plan unplanned failover input. 13110type RecoveryPlanUnplannedFailoverInput struct { 13111 // Properties - The recovery plan unplanned failover input properties. 13112 Properties *RecoveryPlanUnplannedFailoverInputProperties `json:"properties,omitempty"` 13113} 13114 13115// RecoveryPlanUnplannedFailoverInputProperties recovery plan unplanned failover input properties. 13116type RecoveryPlanUnplannedFailoverInputProperties struct { 13117 // FailoverDirection - The failover direction. Possible values include: 'PrimaryToRecovery', 'RecoveryToPrimary' 13118 FailoverDirection PossibleOperationsDirections `json:"failoverDirection,omitempty"` 13119 // SourceSiteOperations - A value indicating whether source site operations are required. Possible values include: 'Required', 'NotRequired' 13120 SourceSiteOperations SourceSiteOperations `json:"sourceSiteOperations,omitempty"` 13121 // ProviderSpecificDetails - The provider specific properties. 13122 ProviderSpecificDetails *[]BasicRecoveryPlanProviderSpecificFailoverInput `json:"providerSpecificDetails,omitempty"` 13123} 13124 13125// UnmarshalJSON is the custom unmarshaler for RecoveryPlanUnplannedFailoverInputProperties struct. 13126func (rpufip *RecoveryPlanUnplannedFailoverInputProperties) UnmarshalJSON(body []byte) error { 13127 var m map[string]*json.RawMessage 13128 err := json.Unmarshal(body, &m) 13129 if err != nil { 13130 return err 13131 } 13132 for k, v := range m { 13133 switch k { 13134 case "failoverDirection": 13135 if v != nil { 13136 var failoverDirection PossibleOperationsDirections 13137 err = json.Unmarshal(*v, &failoverDirection) 13138 if err != nil { 13139 return err 13140 } 13141 rpufip.FailoverDirection = failoverDirection 13142 } 13143 case "sourceSiteOperations": 13144 if v != nil { 13145 var sourceSiteOperations SourceSiteOperations 13146 err = json.Unmarshal(*v, &sourceSiteOperations) 13147 if err != nil { 13148 return err 13149 } 13150 rpufip.SourceSiteOperations = sourceSiteOperations 13151 } 13152 case "providerSpecificDetails": 13153 if v != nil { 13154 providerSpecificDetails, err := unmarshalBasicRecoveryPlanProviderSpecificFailoverInputArray(*v) 13155 if err != nil { 13156 return err 13157 } 13158 rpufip.ProviderSpecificDetails = &providerSpecificDetails 13159 } 13160 } 13161 } 13162 13163 return nil 13164} 13165 13166// RecoveryPoint base class representing a recovery point. 13167type RecoveryPoint struct { 13168 autorest.Response `json:"-"` 13169 // Properties - Recovery point related data. 13170 Properties *RecoveryPointProperties `json:"properties,omitempty"` 13171 // ID - READ-ONLY; Resource Id 13172 ID *string `json:"id,omitempty"` 13173 // Name - READ-ONLY; Resource Name 13174 Name *string `json:"name,omitempty"` 13175 // Type - READ-ONLY; Resource Type 13176 Type *string `json:"type,omitempty"` 13177 // Location - Resource Location 13178 Location *string `json:"location,omitempty"` 13179} 13180 13181// MarshalJSON is the custom marshaler for RecoveryPoint. 13182func (rp RecoveryPoint) MarshalJSON() ([]byte, error) { 13183 objectMap := make(map[string]interface{}) 13184 if rp.Properties != nil { 13185 objectMap["properties"] = rp.Properties 13186 } 13187 if rp.Location != nil { 13188 objectMap["location"] = rp.Location 13189 } 13190 return json.Marshal(objectMap) 13191} 13192 13193// RecoveryPointCollection collection of recovery point details. 13194type RecoveryPointCollection struct { 13195 autorest.Response `json:"-"` 13196 // Value - The recovery point details. 13197 Value *[]RecoveryPoint `json:"value,omitempty"` 13198 // NextLink - The value of next link. 13199 NextLink *string `json:"nextLink,omitempty"` 13200} 13201 13202// RecoveryPointCollectionIterator provides access to a complete listing of RecoveryPoint values. 13203type RecoveryPointCollectionIterator struct { 13204 i int 13205 page RecoveryPointCollectionPage 13206} 13207 13208// NextWithContext advances to the next value. If there was an error making 13209// the request the iterator does not advance and the error is returned. 13210func (iter *RecoveryPointCollectionIterator) NextWithContext(ctx context.Context) (err error) { 13211 if tracing.IsEnabled() { 13212 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPointCollectionIterator.NextWithContext") 13213 defer func() { 13214 sc := -1 13215 if iter.Response().Response.Response != nil { 13216 sc = iter.Response().Response.Response.StatusCode 13217 } 13218 tracing.EndSpan(ctx, sc, err) 13219 }() 13220 } 13221 iter.i++ 13222 if iter.i < len(iter.page.Values()) { 13223 return nil 13224 } 13225 err = iter.page.NextWithContext(ctx) 13226 if err != nil { 13227 iter.i-- 13228 return err 13229 } 13230 iter.i = 0 13231 return nil 13232} 13233 13234// Next advances to the next value. If there was an error making 13235// the request the iterator does not advance and the error is returned. 13236// Deprecated: Use NextWithContext() instead. 13237func (iter *RecoveryPointCollectionIterator) Next() error { 13238 return iter.NextWithContext(context.Background()) 13239} 13240 13241// NotDone returns true if the enumeration should be started or is not yet complete. 13242func (iter RecoveryPointCollectionIterator) NotDone() bool { 13243 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 13244} 13245 13246// Response returns the raw server response from the last page request. 13247func (iter RecoveryPointCollectionIterator) Response() RecoveryPointCollection { 13248 return iter.page.Response() 13249} 13250 13251// Value returns the current value or a zero-initialized value if the 13252// iterator has advanced beyond the end of the collection. 13253func (iter RecoveryPointCollectionIterator) Value() RecoveryPoint { 13254 if !iter.page.NotDone() { 13255 return RecoveryPoint{} 13256 } 13257 return iter.page.Values()[iter.i] 13258} 13259 13260// Creates a new instance of the RecoveryPointCollectionIterator type. 13261func NewRecoveryPointCollectionIterator(page RecoveryPointCollectionPage) RecoveryPointCollectionIterator { 13262 return RecoveryPointCollectionIterator{page: page} 13263} 13264 13265// IsEmpty returns true if the ListResult contains no values. 13266func (RPCVar RecoveryPointCollection) IsEmpty() bool { 13267 return RPCVar.Value == nil || len(*RPCVar.Value) == 0 13268} 13269 13270// hasNextLink returns true if the NextLink is not empty. 13271func (RPCVar RecoveryPointCollection) hasNextLink() bool { 13272 return RPCVar.NextLink != nil && len(*RPCVar.NextLink) != 0 13273} 13274 13275// recoveryPointCollectionPreparer prepares a request to retrieve the next set of results. 13276// It returns nil if no more results exist. 13277func (RPCVar RecoveryPointCollection) recoveryPointCollectionPreparer(ctx context.Context) (*http.Request, error) { 13278 if !RPCVar.hasNextLink() { 13279 return nil, nil 13280 } 13281 return autorest.Prepare((&http.Request{}).WithContext(ctx), 13282 autorest.AsJSON(), 13283 autorest.AsGet(), 13284 autorest.WithBaseURL(to.String(RPCVar.NextLink))) 13285} 13286 13287// RecoveryPointCollectionPage contains a page of RecoveryPoint values. 13288type RecoveryPointCollectionPage struct { 13289 fn func(context.Context, RecoveryPointCollection) (RecoveryPointCollection, error) 13290 RPCVar RecoveryPointCollection 13291} 13292 13293// NextWithContext advances to the next page of values. If there was an error making 13294// the request the page does not advance and the error is returned. 13295func (page *RecoveryPointCollectionPage) NextWithContext(ctx context.Context) (err error) { 13296 if tracing.IsEnabled() { 13297 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPointCollectionPage.NextWithContext") 13298 defer func() { 13299 sc := -1 13300 if page.Response().Response.Response != nil { 13301 sc = page.Response().Response.Response.StatusCode 13302 } 13303 tracing.EndSpan(ctx, sc, err) 13304 }() 13305 } 13306 for { 13307 next, err := page.fn(ctx, page.RPCVar) 13308 if err != nil { 13309 return err 13310 } 13311 page.RPCVar = next 13312 if !next.hasNextLink() || !next.IsEmpty() { 13313 break 13314 } 13315 } 13316 return nil 13317} 13318 13319// Next advances to the next page of values. If there was an error making 13320// the request the page does not advance and the error is returned. 13321// Deprecated: Use NextWithContext() instead. 13322func (page *RecoveryPointCollectionPage) Next() error { 13323 return page.NextWithContext(context.Background()) 13324} 13325 13326// NotDone returns true if the page enumeration should be started or is not yet complete. 13327func (page RecoveryPointCollectionPage) NotDone() bool { 13328 return !page.RPCVar.IsEmpty() 13329} 13330 13331// Response returns the raw server response from the last page request. 13332func (page RecoveryPointCollectionPage) Response() RecoveryPointCollection { 13333 return page.RPCVar 13334} 13335 13336// Values returns the slice of values for the current page or nil if there are no values. 13337func (page RecoveryPointCollectionPage) Values() []RecoveryPoint { 13338 if page.RPCVar.IsEmpty() { 13339 return nil 13340 } 13341 return *page.RPCVar.Value 13342} 13343 13344// Creates a new instance of the RecoveryPointCollectionPage type. 13345func NewRecoveryPointCollectionPage(cur RecoveryPointCollection, getNextPage func(context.Context, RecoveryPointCollection) (RecoveryPointCollection, error)) RecoveryPointCollectionPage { 13346 return RecoveryPointCollectionPage{ 13347 fn: getNextPage, 13348 RPCVar: cur, 13349 } 13350} 13351 13352// RecoveryPointProperties recovery point properties. 13353type RecoveryPointProperties struct { 13354 // RecoveryPointTime - The recovery point time. 13355 RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"` 13356 // RecoveryPointType - The recovery point type: ApplicationConsistent, CrashConsistent. 13357 RecoveryPointType *string `json:"recoveryPointType,omitempty"` 13358 // ProviderSpecificDetails - The provider specific details for the recovery point. 13359 ProviderSpecificDetails *ProviderSpecificRecoveryPointDetails `json:"providerSpecificDetails,omitempty"` 13360} 13361 13362// RecoveryServicesProvider provider details. 13363type RecoveryServicesProvider struct { 13364 autorest.Response `json:"-"` 13365 // Properties - Provider properties. 13366 Properties *RecoveryServicesProviderProperties `json:"properties,omitempty"` 13367 // ID - READ-ONLY; Resource Id 13368 ID *string `json:"id,omitempty"` 13369 // Name - READ-ONLY; Resource Name 13370 Name *string `json:"name,omitempty"` 13371 // Type - READ-ONLY; Resource Type 13372 Type *string `json:"type,omitempty"` 13373 // Location - Resource Location 13374 Location *string `json:"location,omitempty"` 13375} 13376 13377// MarshalJSON is the custom marshaler for RecoveryServicesProvider. 13378func (rsp RecoveryServicesProvider) MarshalJSON() ([]byte, error) { 13379 objectMap := make(map[string]interface{}) 13380 if rsp.Properties != nil { 13381 objectMap["properties"] = rsp.Properties 13382 } 13383 if rsp.Location != nil { 13384 objectMap["location"] = rsp.Location 13385 } 13386 return json.Marshal(objectMap) 13387} 13388 13389// RecoveryServicesProviderCollection collection of providers. 13390type RecoveryServicesProviderCollection struct { 13391 autorest.Response `json:"-"` 13392 // Value - The Servers details. 13393 Value *[]RecoveryServicesProvider `json:"value,omitempty"` 13394 // NextLink - The value of next link. 13395 NextLink *string `json:"nextLink,omitempty"` 13396} 13397 13398// RecoveryServicesProviderCollectionIterator provides access to a complete listing of 13399// RecoveryServicesProvider values. 13400type RecoveryServicesProviderCollectionIterator struct { 13401 i int 13402 page RecoveryServicesProviderCollectionPage 13403} 13404 13405// NextWithContext advances to the next value. If there was an error making 13406// the request the iterator does not advance and the error is returned. 13407func (iter *RecoveryServicesProviderCollectionIterator) NextWithContext(ctx context.Context) (err error) { 13408 if tracing.IsEnabled() { 13409 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryServicesProviderCollectionIterator.NextWithContext") 13410 defer func() { 13411 sc := -1 13412 if iter.Response().Response.Response != nil { 13413 sc = iter.Response().Response.Response.StatusCode 13414 } 13415 tracing.EndSpan(ctx, sc, err) 13416 }() 13417 } 13418 iter.i++ 13419 if iter.i < len(iter.page.Values()) { 13420 return nil 13421 } 13422 err = iter.page.NextWithContext(ctx) 13423 if err != nil { 13424 iter.i-- 13425 return err 13426 } 13427 iter.i = 0 13428 return nil 13429} 13430 13431// Next advances to the next value. If there was an error making 13432// the request the iterator does not advance and the error is returned. 13433// Deprecated: Use NextWithContext() instead. 13434func (iter *RecoveryServicesProviderCollectionIterator) Next() error { 13435 return iter.NextWithContext(context.Background()) 13436} 13437 13438// NotDone returns true if the enumeration should be started or is not yet complete. 13439func (iter RecoveryServicesProviderCollectionIterator) NotDone() bool { 13440 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 13441} 13442 13443// Response returns the raw server response from the last page request. 13444func (iter RecoveryServicesProviderCollectionIterator) Response() RecoveryServicesProviderCollection { 13445 return iter.page.Response() 13446} 13447 13448// Value returns the current value or a zero-initialized value if the 13449// iterator has advanced beyond the end of the collection. 13450func (iter RecoveryServicesProviderCollectionIterator) Value() RecoveryServicesProvider { 13451 if !iter.page.NotDone() { 13452 return RecoveryServicesProvider{} 13453 } 13454 return iter.page.Values()[iter.i] 13455} 13456 13457// Creates a new instance of the RecoveryServicesProviderCollectionIterator type. 13458func NewRecoveryServicesProviderCollectionIterator(page RecoveryServicesProviderCollectionPage) RecoveryServicesProviderCollectionIterator { 13459 return RecoveryServicesProviderCollectionIterator{page: page} 13460} 13461 13462// IsEmpty returns true if the ListResult contains no values. 13463func (rspc RecoveryServicesProviderCollection) IsEmpty() bool { 13464 return rspc.Value == nil || len(*rspc.Value) == 0 13465} 13466 13467// hasNextLink returns true if the NextLink is not empty. 13468func (rspc RecoveryServicesProviderCollection) hasNextLink() bool { 13469 return rspc.NextLink != nil && len(*rspc.NextLink) != 0 13470} 13471 13472// recoveryServicesProviderCollectionPreparer prepares a request to retrieve the next set of results. 13473// It returns nil if no more results exist. 13474func (rspc RecoveryServicesProviderCollection) recoveryServicesProviderCollectionPreparer(ctx context.Context) (*http.Request, error) { 13475 if !rspc.hasNextLink() { 13476 return nil, nil 13477 } 13478 return autorest.Prepare((&http.Request{}).WithContext(ctx), 13479 autorest.AsJSON(), 13480 autorest.AsGet(), 13481 autorest.WithBaseURL(to.String(rspc.NextLink))) 13482} 13483 13484// RecoveryServicesProviderCollectionPage contains a page of RecoveryServicesProvider values. 13485type RecoveryServicesProviderCollectionPage struct { 13486 fn func(context.Context, RecoveryServicesProviderCollection) (RecoveryServicesProviderCollection, error) 13487 rspc RecoveryServicesProviderCollection 13488} 13489 13490// NextWithContext advances to the next page of values. If there was an error making 13491// the request the page does not advance and the error is returned. 13492func (page *RecoveryServicesProviderCollectionPage) NextWithContext(ctx context.Context) (err error) { 13493 if tracing.IsEnabled() { 13494 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryServicesProviderCollectionPage.NextWithContext") 13495 defer func() { 13496 sc := -1 13497 if page.Response().Response.Response != nil { 13498 sc = page.Response().Response.Response.StatusCode 13499 } 13500 tracing.EndSpan(ctx, sc, err) 13501 }() 13502 } 13503 for { 13504 next, err := page.fn(ctx, page.rspc) 13505 if err != nil { 13506 return err 13507 } 13508 page.rspc = next 13509 if !next.hasNextLink() || !next.IsEmpty() { 13510 break 13511 } 13512 } 13513 return nil 13514} 13515 13516// Next advances to the next page of values. If there was an error making 13517// the request the page does not advance and the error is returned. 13518// Deprecated: Use NextWithContext() instead. 13519func (page *RecoveryServicesProviderCollectionPage) Next() error { 13520 return page.NextWithContext(context.Background()) 13521} 13522 13523// NotDone returns true if the page enumeration should be started or is not yet complete. 13524func (page RecoveryServicesProviderCollectionPage) NotDone() bool { 13525 return !page.rspc.IsEmpty() 13526} 13527 13528// Response returns the raw server response from the last page request. 13529func (page RecoveryServicesProviderCollectionPage) Response() RecoveryServicesProviderCollection { 13530 return page.rspc 13531} 13532 13533// Values returns the slice of values for the current page or nil if there are no values. 13534func (page RecoveryServicesProviderCollectionPage) Values() []RecoveryServicesProvider { 13535 if page.rspc.IsEmpty() { 13536 return nil 13537 } 13538 return *page.rspc.Value 13539} 13540 13541// Creates a new instance of the RecoveryServicesProviderCollectionPage type. 13542func NewRecoveryServicesProviderCollectionPage(cur RecoveryServicesProviderCollection, getNextPage func(context.Context, RecoveryServicesProviderCollection) (RecoveryServicesProviderCollection, error)) RecoveryServicesProviderCollectionPage { 13543 return RecoveryServicesProviderCollectionPage{ 13544 fn: getNextPage, 13545 rspc: cur, 13546 } 13547} 13548 13549// RecoveryServicesProviderProperties recovery services provider properties. 13550type RecoveryServicesProviderProperties struct { 13551 // FabricType - Type of the site. 13552 FabricType *string `json:"fabricType,omitempty"` 13553 // FriendlyName - Friendly name of the DRA. 13554 FriendlyName *string `json:"friendlyName,omitempty"` 13555 // ProviderVersion - The provider version. 13556 ProviderVersion *string `json:"providerVersion,omitempty"` 13557 // ServerVersion - The fabric provider. 13558 ServerVersion *string `json:"serverVersion,omitempty"` 13559 // ProviderVersionState - DRA version status. 13560 ProviderVersionState *string `json:"providerVersionState,omitempty"` 13561 // ProviderVersionExpiryDate - Expiry date if the version is deprecated. 13562 ProviderVersionExpiryDate *date.Time `json:"providerVersionExpiryDate,omitempty"` 13563 // FabricFriendlyName - The fabric friendly name. 13564 FabricFriendlyName *string `json:"fabricFriendlyName,omitempty"` 13565 // LastHeartBeat - Time when last heartbeat was sent by the DRA. 13566 LastHeartBeat *date.Time `json:"lastHeartBeat,omitempty"` 13567 // ConnectionStatus - A value indicating whether DRA is responsive. 13568 ConnectionStatus *string `json:"connectionStatus,omitempty"` 13569 // ProtectedItemCount - Number of protected VMs currently managed by the DRA. 13570 ProtectedItemCount *int32 `json:"protectedItemCount,omitempty"` 13571 // AllowedScenarios - The scenarios allowed on this provider. 13572 AllowedScenarios *[]string `json:"allowedScenarios,omitempty"` 13573 // HealthErrorDetails - The recovery services provider health error details. 13574 HealthErrorDetails *[]HealthError `json:"healthErrorDetails,omitempty"` 13575 // DraIdentifier - The DRA Id. 13576 DraIdentifier *string `json:"draIdentifier,omitempty"` 13577 // IdentityDetails - The identity details. 13578 IdentityDetails *IdentityInformation `json:"identityDetails,omitempty"` 13579} 13580 13581// RemoveProtectionContainerMappingInput container unpairing input. 13582type RemoveProtectionContainerMappingInput struct { 13583 // Properties - Configure protection input properties. 13584 Properties *RemoveProtectionContainerMappingInputProperties `json:"properties,omitempty"` 13585} 13586 13587// RemoveProtectionContainerMappingInputProperties unpairing input properties. 13588type RemoveProtectionContainerMappingInputProperties struct { 13589 // ProviderSpecificInput - Provider specific input for unpairing. 13590 ProviderSpecificInput *ReplicationProviderContainerUnmappingInput `json:"providerSpecificInput,omitempty"` 13591} 13592 13593// RenewCertificateInput certificate renewal input. 13594type RenewCertificateInput struct { 13595 // Properties - Renew certificate input properties. 13596 Properties *RenewCertificateInputProperties `json:"properties,omitempty"` 13597} 13598 13599// RenewCertificateInputProperties renew Certificate input properties. 13600type RenewCertificateInputProperties struct { 13601 // RenewCertificateType - Renew certificate type. 13602 RenewCertificateType *string `json:"renewCertificateType,omitempty"` 13603} 13604 13605// ReplicationFabricsCheckConsistencyFuture an abstraction for monitoring and retrieving the results of a 13606// long-running operation. 13607type ReplicationFabricsCheckConsistencyFuture struct { 13608 azure.FutureAPI 13609 // Result returns the result of the asynchronous operation. 13610 // If the operation has not completed it will return an error. 13611 Result func(ReplicationFabricsClient) (Fabric, error) 13612} 13613 13614// UnmarshalJSON is the custom unmarshaller for CreateFuture. 13615func (future *ReplicationFabricsCheckConsistencyFuture) UnmarshalJSON(body []byte) error { 13616 var azFuture azure.Future 13617 if err := json.Unmarshal(body, &azFuture); err != nil { 13618 return err 13619 } 13620 future.FutureAPI = &azFuture 13621 future.Result = future.result 13622 return nil 13623} 13624 13625// result is the default implementation for ReplicationFabricsCheckConsistencyFuture.Result. 13626func (future *ReplicationFabricsCheckConsistencyFuture) result(client ReplicationFabricsClient) (f Fabric, err error) { 13627 var done bool 13628 done, err = future.DoneWithContext(context.Background(), client) 13629 if err != nil { 13630 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsCheckConsistencyFuture", "Result", future.Response(), "Polling failure") 13631 return 13632 } 13633 if !done { 13634 f.Response.Response = future.Response() 13635 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsCheckConsistencyFuture") 13636 return 13637 } 13638 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 13639 if f.Response.Response, err = future.GetResult(sender); err == nil && f.Response.Response.StatusCode != http.StatusNoContent { 13640 f, err = client.CheckConsistencyResponder(f.Response.Response) 13641 if err != nil { 13642 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsCheckConsistencyFuture", "Result", f.Response.Response, "Failure responding to request") 13643 } 13644 } 13645 return 13646} 13647 13648// ReplicationFabricsCreateFuture an abstraction for monitoring and retrieving the results of a 13649// long-running operation. 13650type ReplicationFabricsCreateFuture struct { 13651 azure.FutureAPI 13652 // Result returns the result of the asynchronous operation. 13653 // If the operation has not completed it will return an error. 13654 Result func(ReplicationFabricsClient) (Fabric, error) 13655} 13656 13657// UnmarshalJSON is the custom unmarshaller for CreateFuture. 13658func (future *ReplicationFabricsCreateFuture) UnmarshalJSON(body []byte) error { 13659 var azFuture azure.Future 13660 if err := json.Unmarshal(body, &azFuture); err != nil { 13661 return err 13662 } 13663 future.FutureAPI = &azFuture 13664 future.Result = future.result 13665 return nil 13666} 13667 13668// result is the default implementation for ReplicationFabricsCreateFuture.Result. 13669func (future *ReplicationFabricsCreateFuture) result(client ReplicationFabricsClient) (f Fabric, err error) { 13670 var done bool 13671 done, err = future.DoneWithContext(context.Background(), client) 13672 if err != nil { 13673 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsCreateFuture", "Result", future.Response(), "Polling failure") 13674 return 13675 } 13676 if !done { 13677 f.Response.Response = future.Response() 13678 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsCreateFuture") 13679 return 13680 } 13681 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 13682 if f.Response.Response, err = future.GetResult(sender); err == nil && f.Response.Response.StatusCode != http.StatusNoContent { 13683 f, err = client.CreateResponder(f.Response.Response) 13684 if err != nil { 13685 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsCreateFuture", "Result", f.Response.Response, "Failure responding to request") 13686 } 13687 } 13688 return 13689} 13690 13691// ReplicationFabricsDeleteFuture an abstraction for monitoring and retrieving the results of a 13692// long-running operation. 13693type ReplicationFabricsDeleteFuture struct { 13694 azure.FutureAPI 13695 // Result returns the result of the asynchronous operation. 13696 // If the operation has not completed it will return an error. 13697 Result func(ReplicationFabricsClient) (autorest.Response, error) 13698} 13699 13700// UnmarshalJSON is the custom unmarshaller for CreateFuture. 13701func (future *ReplicationFabricsDeleteFuture) UnmarshalJSON(body []byte) error { 13702 var azFuture azure.Future 13703 if err := json.Unmarshal(body, &azFuture); err != nil { 13704 return err 13705 } 13706 future.FutureAPI = &azFuture 13707 future.Result = future.result 13708 return nil 13709} 13710 13711// result is the default implementation for ReplicationFabricsDeleteFuture.Result. 13712func (future *ReplicationFabricsDeleteFuture) result(client ReplicationFabricsClient) (ar autorest.Response, err error) { 13713 var done bool 13714 done, err = future.DoneWithContext(context.Background(), client) 13715 if err != nil { 13716 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsDeleteFuture", "Result", future.Response(), "Polling failure") 13717 return 13718 } 13719 if !done { 13720 ar.Response = future.Response() 13721 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsDeleteFuture") 13722 return 13723 } 13724 ar.Response = future.Response() 13725 return 13726} 13727 13728// ReplicationFabricsMigrateToAadFuture an abstraction for monitoring and retrieving the results of a 13729// long-running operation. 13730type ReplicationFabricsMigrateToAadFuture struct { 13731 azure.FutureAPI 13732 // Result returns the result of the asynchronous operation. 13733 // If the operation has not completed it will return an error. 13734 Result func(ReplicationFabricsClient) (autorest.Response, error) 13735} 13736 13737// UnmarshalJSON is the custom unmarshaller for CreateFuture. 13738func (future *ReplicationFabricsMigrateToAadFuture) UnmarshalJSON(body []byte) error { 13739 var azFuture azure.Future 13740 if err := json.Unmarshal(body, &azFuture); err != nil { 13741 return err 13742 } 13743 future.FutureAPI = &azFuture 13744 future.Result = future.result 13745 return nil 13746} 13747 13748// result is the default implementation for ReplicationFabricsMigrateToAadFuture.Result. 13749func (future *ReplicationFabricsMigrateToAadFuture) result(client ReplicationFabricsClient) (ar autorest.Response, err error) { 13750 var done bool 13751 done, err = future.DoneWithContext(context.Background(), client) 13752 if err != nil { 13753 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsMigrateToAadFuture", "Result", future.Response(), "Polling failure") 13754 return 13755 } 13756 if !done { 13757 ar.Response = future.Response() 13758 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsMigrateToAadFuture") 13759 return 13760 } 13761 ar.Response = future.Response() 13762 return 13763} 13764 13765// ReplicationFabricsPurgeFuture an abstraction for monitoring and retrieving the results of a long-running 13766// operation. 13767type ReplicationFabricsPurgeFuture struct { 13768 azure.FutureAPI 13769 // Result returns the result of the asynchronous operation. 13770 // If the operation has not completed it will return an error. 13771 Result func(ReplicationFabricsClient) (autorest.Response, error) 13772} 13773 13774// UnmarshalJSON is the custom unmarshaller for CreateFuture. 13775func (future *ReplicationFabricsPurgeFuture) UnmarshalJSON(body []byte) error { 13776 var azFuture azure.Future 13777 if err := json.Unmarshal(body, &azFuture); err != nil { 13778 return err 13779 } 13780 future.FutureAPI = &azFuture 13781 future.Result = future.result 13782 return nil 13783} 13784 13785// result is the default implementation for ReplicationFabricsPurgeFuture.Result. 13786func (future *ReplicationFabricsPurgeFuture) result(client ReplicationFabricsClient) (ar autorest.Response, err error) { 13787 var done bool 13788 done, err = future.DoneWithContext(context.Background(), client) 13789 if err != nil { 13790 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsPurgeFuture", "Result", future.Response(), "Polling failure") 13791 return 13792 } 13793 if !done { 13794 ar.Response = future.Response() 13795 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsPurgeFuture") 13796 return 13797 } 13798 ar.Response = future.Response() 13799 return 13800} 13801 13802// ReplicationFabricsReassociateGatewayFuture an abstraction for monitoring and retrieving the results of a 13803// long-running operation. 13804type ReplicationFabricsReassociateGatewayFuture struct { 13805 azure.FutureAPI 13806 // Result returns the result of the asynchronous operation. 13807 // If the operation has not completed it will return an error. 13808 Result func(ReplicationFabricsClient) (Fabric, error) 13809} 13810 13811// UnmarshalJSON is the custom unmarshaller for CreateFuture. 13812func (future *ReplicationFabricsReassociateGatewayFuture) UnmarshalJSON(body []byte) error { 13813 var azFuture azure.Future 13814 if err := json.Unmarshal(body, &azFuture); err != nil { 13815 return err 13816 } 13817 future.FutureAPI = &azFuture 13818 future.Result = future.result 13819 return nil 13820} 13821 13822// result is the default implementation for ReplicationFabricsReassociateGatewayFuture.Result. 13823func (future *ReplicationFabricsReassociateGatewayFuture) result(client ReplicationFabricsClient) (f Fabric, err error) { 13824 var done bool 13825 done, err = future.DoneWithContext(context.Background(), client) 13826 if err != nil { 13827 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsReassociateGatewayFuture", "Result", future.Response(), "Polling failure") 13828 return 13829 } 13830 if !done { 13831 f.Response.Response = future.Response() 13832 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsReassociateGatewayFuture") 13833 return 13834 } 13835 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 13836 if f.Response.Response, err = future.GetResult(sender); err == nil && f.Response.Response.StatusCode != http.StatusNoContent { 13837 f, err = client.ReassociateGatewayResponder(f.Response.Response) 13838 if err != nil { 13839 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsReassociateGatewayFuture", "Result", f.Response.Response, "Failure responding to request") 13840 } 13841 } 13842 return 13843} 13844 13845// ReplicationFabricsRenewCertificateFuture an abstraction for monitoring and retrieving the results of a 13846// long-running operation. 13847type ReplicationFabricsRenewCertificateFuture struct { 13848 azure.FutureAPI 13849 // Result returns the result of the asynchronous operation. 13850 // If the operation has not completed it will return an error. 13851 Result func(ReplicationFabricsClient) (Fabric, error) 13852} 13853 13854// UnmarshalJSON is the custom unmarshaller for CreateFuture. 13855func (future *ReplicationFabricsRenewCertificateFuture) UnmarshalJSON(body []byte) error { 13856 var azFuture azure.Future 13857 if err := json.Unmarshal(body, &azFuture); err != nil { 13858 return err 13859 } 13860 future.FutureAPI = &azFuture 13861 future.Result = future.result 13862 return nil 13863} 13864 13865// result is the default implementation for ReplicationFabricsRenewCertificateFuture.Result. 13866func (future *ReplicationFabricsRenewCertificateFuture) result(client ReplicationFabricsClient) (f Fabric, err error) { 13867 var done bool 13868 done, err = future.DoneWithContext(context.Background(), client) 13869 if err != nil { 13870 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsRenewCertificateFuture", "Result", future.Response(), "Polling failure") 13871 return 13872 } 13873 if !done { 13874 f.Response.Response = future.Response() 13875 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsRenewCertificateFuture") 13876 return 13877 } 13878 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 13879 if f.Response.Response, err = future.GetResult(sender); err == nil && f.Response.Response.StatusCode != http.StatusNoContent { 13880 f, err = client.RenewCertificateResponder(f.Response.Response) 13881 if err != nil { 13882 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsRenewCertificateFuture", "Result", f.Response.Response, "Failure responding to request") 13883 } 13884 } 13885 return 13886} 13887 13888// ReplicationGroupDetails replication group details. This will be used in case of San and Wvr. 13889type ReplicationGroupDetails struct { 13890 // InstanceType - Possible values include: 'InstanceTypeConfigurationSettings', 'InstanceTypeHyperVVirtualMachine', 'InstanceTypeVMwareVirtualMachine', 'InstanceTypeReplicationGroupDetails' 13891 InstanceType InstanceTypeBasicConfigurationSettings `json:"instanceType,omitempty"` 13892} 13893 13894// MarshalJSON is the custom marshaler for ReplicationGroupDetails. 13895func (rgd ReplicationGroupDetails) MarshalJSON() ([]byte, error) { 13896 rgd.InstanceType = InstanceTypeReplicationGroupDetails 13897 objectMap := make(map[string]interface{}) 13898 if rgd.InstanceType != "" { 13899 objectMap["instanceType"] = rgd.InstanceType 13900 } 13901 return json.Marshal(objectMap) 13902} 13903 13904// AsHyperVVirtualMachineDetails is the BasicConfigurationSettings implementation for ReplicationGroupDetails. 13905func (rgd ReplicationGroupDetails) AsHyperVVirtualMachineDetails() (*HyperVVirtualMachineDetails, bool) { 13906 return nil, false 13907} 13908 13909// AsVMwareVirtualMachineDetails is the BasicConfigurationSettings implementation for ReplicationGroupDetails. 13910func (rgd ReplicationGroupDetails) AsVMwareVirtualMachineDetails() (*VMwareVirtualMachineDetails, bool) { 13911 return nil, false 13912} 13913 13914// AsReplicationGroupDetails is the BasicConfigurationSettings implementation for ReplicationGroupDetails. 13915func (rgd ReplicationGroupDetails) AsReplicationGroupDetails() (*ReplicationGroupDetails, bool) { 13916 return &rgd, true 13917} 13918 13919// AsConfigurationSettings is the BasicConfigurationSettings implementation for ReplicationGroupDetails. 13920func (rgd ReplicationGroupDetails) AsConfigurationSettings() (*ConfigurationSettings, bool) { 13921 return nil, false 13922} 13923 13924// AsBasicConfigurationSettings is the BasicConfigurationSettings implementation for ReplicationGroupDetails. 13925func (rgd ReplicationGroupDetails) AsBasicConfigurationSettings() (BasicConfigurationSettings, bool) { 13926 return &rgd, true 13927} 13928 13929// ReplicationJobsCancelFuture an abstraction for monitoring and retrieving the results of a long-running 13930// operation. 13931type ReplicationJobsCancelFuture struct { 13932 azure.FutureAPI 13933 // Result returns the result of the asynchronous operation. 13934 // If the operation has not completed it will return an error. 13935 Result func(ReplicationJobsClient) (Job, error) 13936} 13937 13938// UnmarshalJSON is the custom unmarshaller for CreateFuture. 13939func (future *ReplicationJobsCancelFuture) UnmarshalJSON(body []byte) error { 13940 var azFuture azure.Future 13941 if err := json.Unmarshal(body, &azFuture); err != nil { 13942 return err 13943 } 13944 future.FutureAPI = &azFuture 13945 future.Result = future.result 13946 return nil 13947} 13948 13949// result is the default implementation for ReplicationJobsCancelFuture.Result. 13950func (future *ReplicationJobsCancelFuture) result(client ReplicationJobsClient) (j Job, err error) { 13951 var done bool 13952 done, err = future.DoneWithContext(context.Background(), client) 13953 if err != nil { 13954 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsCancelFuture", "Result", future.Response(), "Polling failure") 13955 return 13956 } 13957 if !done { 13958 j.Response.Response = future.Response() 13959 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationJobsCancelFuture") 13960 return 13961 } 13962 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 13963 if j.Response.Response, err = future.GetResult(sender); err == nil && j.Response.Response.StatusCode != http.StatusNoContent { 13964 j, err = client.CancelResponder(j.Response.Response) 13965 if err != nil { 13966 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsCancelFuture", "Result", j.Response.Response, "Failure responding to request") 13967 } 13968 } 13969 return 13970} 13971 13972// ReplicationJobsExportFuture an abstraction for monitoring and retrieving the results of a long-running 13973// operation. 13974type ReplicationJobsExportFuture struct { 13975 azure.FutureAPI 13976 // Result returns the result of the asynchronous operation. 13977 // If the operation has not completed it will return an error. 13978 Result func(ReplicationJobsClient) (Job, error) 13979} 13980 13981// UnmarshalJSON is the custom unmarshaller for CreateFuture. 13982func (future *ReplicationJobsExportFuture) UnmarshalJSON(body []byte) error { 13983 var azFuture azure.Future 13984 if err := json.Unmarshal(body, &azFuture); err != nil { 13985 return err 13986 } 13987 future.FutureAPI = &azFuture 13988 future.Result = future.result 13989 return nil 13990} 13991 13992// result is the default implementation for ReplicationJobsExportFuture.Result. 13993func (future *ReplicationJobsExportFuture) result(client ReplicationJobsClient) (j Job, err error) { 13994 var done bool 13995 done, err = future.DoneWithContext(context.Background(), client) 13996 if err != nil { 13997 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsExportFuture", "Result", future.Response(), "Polling failure") 13998 return 13999 } 14000 if !done { 14001 j.Response.Response = future.Response() 14002 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationJobsExportFuture") 14003 return 14004 } 14005 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 14006 if j.Response.Response, err = future.GetResult(sender); err == nil && j.Response.Response.StatusCode != http.StatusNoContent { 14007 j, err = client.ExportResponder(j.Response.Response) 14008 if err != nil { 14009 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsExportFuture", "Result", j.Response.Response, "Failure responding to request") 14010 } 14011 } 14012 return 14013} 14014 14015// ReplicationJobsRestartFuture an abstraction for monitoring and retrieving the results of a long-running 14016// operation. 14017type ReplicationJobsRestartFuture struct { 14018 azure.FutureAPI 14019 // Result returns the result of the asynchronous operation. 14020 // If the operation has not completed it will return an error. 14021 Result func(ReplicationJobsClient) (Job, error) 14022} 14023 14024// UnmarshalJSON is the custom unmarshaller for CreateFuture. 14025func (future *ReplicationJobsRestartFuture) UnmarshalJSON(body []byte) error { 14026 var azFuture azure.Future 14027 if err := json.Unmarshal(body, &azFuture); err != nil { 14028 return err 14029 } 14030 future.FutureAPI = &azFuture 14031 future.Result = future.result 14032 return nil 14033} 14034 14035// result is the default implementation for ReplicationJobsRestartFuture.Result. 14036func (future *ReplicationJobsRestartFuture) result(client ReplicationJobsClient) (j Job, err error) { 14037 var done bool 14038 done, err = future.DoneWithContext(context.Background(), client) 14039 if err != nil { 14040 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsRestartFuture", "Result", future.Response(), "Polling failure") 14041 return 14042 } 14043 if !done { 14044 j.Response.Response = future.Response() 14045 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationJobsRestartFuture") 14046 return 14047 } 14048 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 14049 if j.Response.Response, err = future.GetResult(sender); err == nil && j.Response.Response.StatusCode != http.StatusNoContent { 14050 j, err = client.RestartResponder(j.Response.Response) 14051 if err != nil { 14052 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsRestartFuture", "Result", j.Response.Response, "Failure responding to request") 14053 } 14054 } 14055 return 14056} 14057 14058// ReplicationJobsResumeFuture an abstraction for monitoring and retrieving the results of a long-running 14059// operation. 14060type ReplicationJobsResumeFuture struct { 14061 azure.FutureAPI 14062 // Result returns the result of the asynchronous operation. 14063 // If the operation has not completed it will return an error. 14064 Result func(ReplicationJobsClient) (Job, error) 14065} 14066 14067// UnmarshalJSON is the custom unmarshaller for CreateFuture. 14068func (future *ReplicationJobsResumeFuture) UnmarshalJSON(body []byte) error { 14069 var azFuture azure.Future 14070 if err := json.Unmarshal(body, &azFuture); err != nil { 14071 return err 14072 } 14073 future.FutureAPI = &azFuture 14074 future.Result = future.result 14075 return nil 14076} 14077 14078// result is the default implementation for ReplicationJobsResumeFuture.Result. 14079func (future *ReplicationJobsResumeFuture) result(client ReplicationJobsClient) (j Job, err error) { 14080 var done bool 14081 done, err = future.DoneWithContext(context.Background(), client) 14082 if err != nil { 14083 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsResumeFuture", "Result", future.Response(), "Polling failure") 14084 return 14085 } 14086 if !done { 14087 j.Response.Response = future.Response() 14088 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationJobsResumeFuture") 14089 return 14090 } 14091 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 14092 if j.Response.Response, err = future.GetResult(sender); err == nil && j.Response.Response.StatusCode != http.StatusNoContent { 14093 j, err = client.ResumeResponder(j.Response.Response) 14094 if err != nil { 14095 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsResumeFuture", "Result", j.Response.Response, "Failure responding to request") 14096 } 14097 } 14098 return 14099} 14100 14101// ReplicationNetworkMappingsCreateFuture an abstraction for monitoring and retrieving the results of a 14102// long-running operation. 14103type ReplicationNetworkMappingsCreateFuture struct { 14104 azure.FutureAPI 14105 // Result returns the result of the asynchronous operation. 14106 // If the operation has not completed it will return an error. 14107 Result func(ReplicationNetworkMappingsClient) (NetworkMapping, error) 14108} 14109 14110// UnmarshalJSON is the custom unmarshaller for CreateFuture. 14111func (future *ReplicationNetworkMappingsCreateFuture) UnmarshalJSON(body []byte) error { 14112 var azFuture azure.Future 14113 if err := json.Unmarshal(body, &azFuture); err != nil { 14114 return err 14115 } 14116 future.FutureAPI = &azFuture 14117 future.Result = future.result 14118 return nil 14119} 14120 14121// result is the default implementation for ReplicationNetworkMappingsCreateFuture.Result. 14122func (future *ReplicationNetworkMappingsCreateFuture) result(client ReplicationNetworkMappingsClient) (nm NetworkMapping, err error) { 14123 var done bool 14124 done, err = future.DoneWithContext(context.Background(), client) 14125 if err != nil { 14126 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsCreateFuture", "Result", future.Response(), "Polling failure") 14127 return 14128 } 14129 if !done { 14130 nm.Response.Response = future.Response() 14131 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationNetworkMappingsCreateFuture") 14132 return 14133 } 14134 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 14135 if nm.Response.Response, err = future.GetResult(sender); err == nil && nm.Response.Response.StatusCode != http.StatusNoContent { 14136 nm, err = client.CreateResponder(nm.Response.Response) 14137 if err != nil { 14138 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsCreateFuture", "Result", nm.Response.Response, "Failure responding to request") 14139 } 14140 } 14141 return 14142} 14143 14144// ReplicationNetworkMappingsDeleteFuture an abstraction for monitoring and retrieving the results of a 14145// long-running operation. 14146type ReplicationNetworkMappingsDeleteFuture struct { 14147 azure.FutureAPI 14148 // Result returns the result of the asynchronous operation. 14149 // If the operation has not completed it will return an error. 14150 Result func(ReplicationNetworkMappingsClient) (autorest.Response, error) 14151} 14152 14153// UnmarshalJSON is the custom unmarshaller for CreateFuture. 14154func (future *ReplicationNetworkMappingsDeleteFuture) UnmarshalJSON(body []byte) error { 14155 var azFuture azure.Future 14156 if err := json.Unmarshal(body, &azFuture); err != nil { 14157 return err 14158 } 14159 future.FutureAPI = &azFuture 14160 future.Result = future.result 14161 return nil 14162} 14163 14164// result is the default implementation for ReplicationNetworkMappingsDeleteFuture.Result. 14165func (future *ReplicationNetworkMappingsDeleteFuture) result(client ReplicationNetworkMappingsClient) (ar autorest.Response, err error) { 14166 var done bool 14167 done, err = future.DoneWithContext(context.Background(), client) 14168 if err != nil { 14169 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsDeleteFuture", "Result", future.Response(), "Polling failure") 14170 return 14171 } 14172 if !done { 14173 ar.Response = future.Response() 14174 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationNetworkMappingsDeleteFuture") 14175 return 14176 } 14177 ar.Response = future.Response() 14178 return 14179} 14180 14181// ReplicationNetworkMappingsUpdateFuture an abstraction for monitoring and retrieving the results of a 14182// long-running operation. 14183type ReplicationNetworkMappingsUpdateFuture struct { 14184 azure.FutureAPI 14185 // Result returns the result of the asynchronous operation. 14186 // If the operation has not completed it will return an error. 14187 Result func(ReplicationNetworkMappingsClient) (NetworkMapping, error) 14188} 14189 14190// UnmarshalJSON is the custom unmarshaller for CreateFuture. 14191func (future *ReplicationNetworkMappingsUpdateFuture) UnmarshalJSON(body []byte) error { 14192 var azFuture azure.Future 14193 if err := json.Unmarshal(body, &azFuture); err != nil { 14194 return err 14195 } 14196 future.FutureAPI = &azFuture 14197 future.Result = future.result 14198 return nil 14199} 14200 14201// result is the default implementation for ReplicationNetworkMappingsUpdateFuture.Result. 14202func (future *ReplicationNetworkMappingsUpdateFuture) result(client ReplicationNetworkMappingsClient) (nm NetworkMapping, err error) { 14203 var done bool 14204 done, err = future.DoneWithContext(context.Background(), client) 14205 if err != nil { 14206 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsUpdateFuture", "Result", future.Response(), "Polling failure") 14207 return 14208 } 14209 if !done { 14210 nm.Response.Response = future.Response() 14211 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationNetworkMappingsUpdateFuture") 14212 return 14213 } 14214 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 14215 if nm.Response.Response, err = future.GetResult(sender); err == nil && nm.Response.Response.StatusCode != http.StatusNoContent { 14216 nm, err = client.UpdateResponder(nm.Response.Response) 14217 if err != nil { 14218 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsUpdateFuture", "Result", nm.Response.Response, "Failure responding to request") 14219 } 14220 } 14221 return 14222} 14223 14224// ReplicationPoliciesCreateFuture an abstraction for monitoring and retrieving the results of a 14225// long-running operation. 14226type ReplicationPoliciesCreateFuture struct { 14227 azure.FutureAPI 14228 // Result returns the result of the asynchronous operation. 14229 // If the operation has not completed it will return an error. 14230 Result func(ReplicationPoliciesClient) (Policy, error) 14231} 14232 14233// UnmarshalJSON is the custom unmarshaller for CreateFuture. 14234func (future *ReplicationPoliciesCreateFuture) UnmarshalJSON(body []byte) error { 14235 var azFuture azure.Future 14236 if err := json.Unmarshal(body, &azFuture); err != nil { 14237 return err 14238 } 14239 future.FutureAPI = &azFuture 14240 future.Result = future.result 14241 return nil 14242} 14243 14244// result is the default implementation for ReplicationPoliciesCreateFuture.Result. 14245func (future *ReplicationPoliciesCreateFuture) result(client ReplicationPoliciesClient) (p Policy, err error) { 14246 var done bool 14247 done, err = future.DoneWithContext(context.Background(), client) 14248 if err != nil { 14249 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesCreateFuture", "Result", future.Response(), "Polling failure") 14250 return 14251 } 14252 if !done { 14253 p.Response.Response = future.Response() 14254 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationPoliciesCreateFuture") 14255 return 14256 } 14257 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 14258 if p.Response.Response, err = future.GetResult(sender); err == nil && p.Response.Response.StatusCode != http.StatusNoContent { 14259 p, err = client.CreateResponder(p.Response.Response) 14260 if err != nil { 14261 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesCreateFuture", "Result", p.Response.Response, "Failure responding to request") 14262 } 14263 } 14264 return 14265} 14266 14267// ReplicationPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a 14268// long-running operation. 14269type ReplicationPoliciesDeleteFuture struct { 14270 azure.FutureAPI 14271 // Result returns the result of the asynchronous operation. 14272 // If the operation has not completed it will return an error. 14273 Result func(ReplicationPoliciesClient) (autorest.Response, error) 14274} 14275 14276// UnmarshalJSON is the custom unmarshaller for CreateFuture. 14277func (future *ReplicationPoliciesDeleteFuture) UnmarshalJSON(body []byte) error { 14278 var azFuture azure.Future 14279 if err := json.Unmarshal(body, &azFuture); err != nil { 14280 return err 14281 } 14282 future.FutureAPI = &azFuture 14283 future.Result = future.result 14284 return nil 14285} 14286 14287// result is the default implementation for ReplicationPoliciesDeleteFuture.Result. 14288func (future *ReplicationPoliciesDeleteFuture) result(client ReplicationPoliciesClient) (ar autorest.Response, err error) { 14289 var done bool 14290 done, err = future.DoneWithContext(context.Background(), client) 14291 if err != nil { 14292 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesDeleteFuture", "Result", future.Response(), "Polling failure") 14293 return 14294 } 14295 if !done { 14296 ar.Response = future.Response() 14297 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationPoliciesDeleteFuture") 14298 return 14299 } 14300 ar.Response = future.Response() 14301 return 14302} 14303 14304// ReplicationPoliciesUpdateFuture an abstraction for monitoring and retrieving the results of a 14305// long-running operation. 14306type ReplicationPoliciesUpdateFuture struct { 14307 azure.FutureAPI 14308 // Result returns the result of the asynchronous operation. 14309 // If the operation has not completed it will return an error. 14310 Result func(ReplicationPoliciesClient) (Policy, error) 14311} 14312 14313// UnmarshalJSON is the custom unmarshaller for CreateFuture. 14314func (future *ReplicationPoliciesUpdateFuture) UnmarshalJSON(body []byte) error { 14315 var azFuture azure.Future 14316 if err := json.Unmarshal(body, &azFuture); err != nil { 14317 return err 14318 } 14319 future.FutureAPI = &azFuture 14320 future.Result = future.result 14321 return nil 14322} 14323 14324// result is the default implementation for ReplicationPoliciesUpdateFuture.Result. 14325func (future *ReplicationPoliciesUpdateFuture) result(client ReplicationPoliciesClient) (p Policy, err error) { 14326 var done bool 14327 done, err = future.DoneWithContext(context.Background(), client) 14328 if err != nil { 14329 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesUpdateFuture", "Result", future.Response(), "Polling failure") 14330 return 14331 } 14332 if !done { 14333 p.Response.Response = future.Response() 14334 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationPoliciesUpdateFuture") 14335 return 14336 } 14337 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 14338 if p.Response.Response, err = future.GetResult(sender); err == nil && p.Response.Response.StatusCode != http.StatusNoContent { 14339 p, err = client.UpdateResponder(p.Response.Response) 14340 if err != nil { 14341 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesUpdateFuture", "Result", p.Response.Response, "Failure responding to request") 14342 } 14343 } 14344 return 14345} 14346 14347// ReplicationProtectedItem replication protected item. 14348type ReplicationProtectedItem struct { 14349 autorest.Response `json:"-"` 14350 // Properties - The custom data. 14351 Properties *ReplicationProtectedItemProperties `json:"properties,omitempty"` 14352 // ID - READ-ONLY; Resource Id 14353 ID *string `json:"id,omitempty"` 14354 // Name - READ-ONLY; Resource Name 14355 Name *string `json:"name,omitempty"` 14356 // Type - READ-ONLY; Resource Type 14357 Type *string `json:"type,omitempty"` 14358 // Location - Resource Location 14359 Location *string `json:"location,omitempty"` 14360} 14361 14362// MarshalJSON is the custom marshaler for ReplicationProtectedItem. 14363func (rpi ReplicationProtectedItem) MarshalJSON() ([]byte, error) { 14364 objectMap := make(map[string]interface{}) 14365 if rpi.Properties != nil { 14366 objectMap["properties"] = rpi.Properties 14367 } 14368 if rpi.Location != nil { 14369 objectMap["location"] = rpi.Location 14370 } 14371 return json.Marshal(objectMap) 14372} 14373 14374// ReplicationProtectedItemCollection replication protected item collection. 14375type ReplicationProtectedItemCollection struct { 14376 autorest.Response `json:"-"` 14377 // Value - The Replication protected item details. 14378 Value *[]ReplicationProtectedItem `json:"value,omitempty"` 14379 // NextLink - The value of next link. 14380 NextLink *string `json:"nextLink,omitempty"` 14381} 14382 14383// ReplicationProtectedItemCollectionIterator provides access to a complete listing of 14384// ReplicationProtectedItem values. 14385type ReplicationProtectedItemCollectionIterator struct { 14386 i int 14387 page ReplicationProtectedItemCollectionPage 14388} 14389 14390// NextWithContext advances to the next value. If there was an error making 14391// the request the iterator does not advance and the error is returned. 14392func (iter *ReplicationProtectedItemCollectionIterator) NextWithContext(ctx context.Context) (err error) { 14393 if tracing.IsEnabled() { 14394 ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectedItemCollectionIterator.NextWithContext") 14395 defer func() { 14396 sc := -1 14397 if iter.Response().Response.Response != nil { 14398 sc = iter.Response().Response.Response.StatusCode 14399 } 14400 tracing.EndSpan(ctx, sc, err) 14401 }() 14402 } 14403 iter.i++ 14404 if iter.i < len(iter.page.Values()) { 14405 return nil 14406 } 14407 err = iter.page.NextWithContext(ctx) 14408 if err != nil { 14409 iter.i-- 14410 return err 14411 } 14412 iter.i = 0 14413 return nil 14414} 14415 14416// Next advances to the next value. If there was an error making 14417// the request the iterator does not advance and the error is returned. 14418// Deprecated: Use NextWithContext() instead. 14419func (iter *ReplicationProtectedItemCollectionIterator) Next() error { 14420 return iter.NextWithContext(context.Background()) 14421} 14422 14423// NotDone returns true if the enumeration should be started or is not yet complete. 14424func (iter ReplicationProtectedItemCollectionIterator) NotDone() bool { 14425 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 14426} 14427 14428// Response returns the raw server response from the last page request. 14429func (iter ReplicationProtectedItemCollectionIterator) Response() ReplicationProtectedItemCollection { 14430 return iter.page.Response() 14431} 14432 14433// Value returns the current value or a zero-initialized value if the 14434// iterator has advanced beyond the end of the collection. 14435func (iter ReplicationProtectedItemCollectionIterator) Value() ReplicationProtectedItem { 14436 if !iter.page.NotDone() { 14437 return ReplicationProtectedItem{} 14438 } 14439 return iter.page.Values()[iter.i] 14440} 14441 14442// Creates a new instance of the ReplicationProtectedItemCollectionIterator type. 14443func NewReplicationProtectedItemCollectionIterator(page ReplicationProtectedItemCollectionPage) ReplicationProtectedItemCollectionIterator { 14444 return ReplicationProtectedItemCollectionIterator{page: page} 14445} 14446 14447// IsEmpty returns true if the ListResult contains no values. 14448func (rpic ReplicationProtectedItemCollection) IsEmpty() bool { 14449 return rpic.Value == nil || len(*rpic.Value) == 0 14450} 14451 14452// hasNextLink returns true if the NextLink is not empty. 14453func (rpic ReplicationProtectedItemCollection) hasNextLink() bool { 14454 return rpic.NextLink != nil && len(*rpic.NextLink) != 0 14455} 14456 14457// replicationProtectedItemCollectionPreparer prepares a request to retrieve the next set of results. 14458// It returns nil if no more results exist. 14459func (rpic ReplicationProtectedItemCollection) replicationProtectedItemCollectionPreparer(ctx context.Context) (*http.Request, error) { 14460 if !rpic.hasNextLink() { 14461 return nil, nil 14462 } 14463 return autorest.Prepare((&http.Request{}).WithContext(ctx), 14464 autorest.AsJSON(), 14465 autorest.AsGet(), 14466 autorest.WithBaseURL(to.String(rpic.NextLink))) 14467} 14468 14469// ReplicationProtectedItemCollectionPage contains a page of ReplicationProtectedItem values. 14470type ReplicationProtectedItemCollectionPage struct { 14471 fn func(context.Context, ReplicationProtectedItemCollection) (ReplicationProtectedItemCollection, error) 14472 rpic ReplicationProtectedItemCollection 14473} 14474 14475// NextWithContext advances to the next page of values. If there was an error making 14476// the request the page does not advance and the error is returned. 14477func (page *ReplicationProtectedItemCollectionPage) NextWithContext(ctx context.Context) (err error) { 14478 if tracing.IsEnabled() { 14479 ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectedItemCollectionPage.NextWithContext") 14480 defer func() { 14481 sc := -1 14482 if page.Response().Response.Response != nil { 14483 sc = page.Response().Response.Response.StatusCode 14484 } 14485 tracing.EndSpan(ctx, sc, err) 14486 }() 14487 } 14488 for { 14489 next, err := page.fn(ctx, page.rpic) 14490 if err != nil { 14491 return err 14492 } 14493 page.rpic = next 14494 if !next.hasNextLink() || !next.IsEmpty() { 14495 break 14496 } 14497 } 14498 return nil 14499} 14500 14501// Next advances to the next page of values. If there was an error making 14502// the request the page does not advance and the error is returned. 14503// Deprecated: Use NextWithContext() instead. 14504func (page *ReplicationProtectedItemCollectionPage) Next() error { 14505 return page.NextWithContext(context.Background()) 14506} 14507 14508// NotDone returns true if the page enumeration should be started or is not yet complete. 14509func (page ReplicationProtectedItemCollectionPage) NotDone() bool { 14510 return !page.rpic.IsEmpty() 14511} 14512 14513// Response returns the raw server response from the last page request. 14514func (page ReplicationProtectedItemCollectionPage) Response() ReplicationProtectedItemCollection { 14515 return page.rpic 14516} 14517 14518// Values returns the slice of values for the current page or nil if there are no values. 14519func (page ReplicationProtectedItemCollectionPage) Values() []ReplicationProtectedItem { 14520 if page.rpic.IsEmpty() { 14521 return nil 14522 } 14523 return *page.rpic.Value 14524} 14525 14526// Creates a new instance of the ReplicationProtectedItemCollectionPage type. 14527func NewReplicationProtectedItemCollectionPage(cur ReplicationProtectedItemCollection, getNextPage func(context.Context, ReplicationProtectedItemCollection) (ReplicationProtectedItemCollection, error)) ReplicationProtectedItemCollectionPage { 14528 return ReplicationProtectedItemCollectionPage{ 14529 fn: getNextPage, 14530 rpic: cur, 14531 } 14532} 14533 14534// ReplicationProtectedItemProperties replication protected item custom data details. 14535type ReplicationProtectedItemProperties struct { 14536 // FriendlyName - The name. 14537 FriendlyName *string `json:"friendlyName,omitempty"` 14538 // ProtectedItemType - The type of protected item type. 14539 ProtectedItemType *string `json:"protectedItemType,omitempty"` 14540 // ProtectableItemID - The protected item ARM Id. 14541 ProtectableItemID *string `json:"protectableItemId,omitempty"` 14542 // RecoveryServicesProviderID - The recovery provider ARM Id. 14543 RecoveryServicesProviderID *string `json:"recoveryServicesProviderId,omitempty"` 14544 // PrimaryFabricFriendlyName - The friendly name of the primary fabric. 14545 PrimaryFabricFriendlyName *string `json:"primaryFabricFriendlyName,omitempty"` 14546 // RecoveryFabricFriendlyName - The friendly name of recovery fabric. 14547 RecoveryFabricFriendlyName *string `json:"recoveryFabricFriendlyName,omitempty"` 14548 // RecoveryFabricID - The Arm Id of recovery fabric. 14549 RecoveryFabricID *string `json:"recoveryFabricId,omitempty"` 14550 // PrimaryProtectionContainerFriendlyName - The name of primary protection container friendly name. 14551 PrimaryProtectionContainerFriendlyName *string `json:"primaryProtectionContainerFriendlyName,omitempty"` 14552 // RecoveryProtectionContainerFriendlyName - The name of recovery container friendly name. 14553 RecoveryProtectionContainerFriendlyName *string `json:"recoveryProtectionContainerFriendlyName,omitempty"` 14554 // ProtectionState - The protection status. 14555 ProtectionState *string `json:"protectionState,omitempty"` 14556 // ProtectionStateDescription - The protection state description. 14557 ProtectionStateDescription *string `json:"protectionStateDescription,omitempty"` 14558 // ActiveLocation - The Current active location of the PE. 14559 ActiveLocation *string `json:"activeLocation,omitempty"` 14560 // TestFailoverState - The Test failover state. 14561 TestFailoverState *string `json:"testFailoverState,omitempty"` 14562 // TestFailoverStateDescription - The Test failover state description. 14563 TestFailoverStateDescription *string `json:"testFailoverStateDescription,omitempty"` 14564 // AllowedOperations - The allowed operations on the Replication protected item. 14565 AllowedOperations *[]string `json:"allowedOperations,omitempty"` 14566 // 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. 14567 ReplicationHealth *string `json:"replicationHealth,omitempty"` 14568 // FailoverHealth - The consolidated failover health for the VM. 14569 FailoverHealth *string `json:"failoverHealth,omitempty"` 14570 // ReplicationHealthErrors - List of replication health errors. 14571 ReplicationHealthErrors *[]HealthError `json:"replicationHealthErrors,omitempty"` 14572 // FailoverHealthErrors - List of failover health errors. 14573 FailoverHealthErrors *[]HealthError `json:"failoverHealthErrors,omitempty"` 14574 // PolicyID - The ID of Policy governing this PE. 14575 PolicyID *string `json:"policyId,omitempty"` 14576 // PolicyFriendlyName - The name of Policy governing this PE. 14577 PolicyFriendlyName *string `json:"policyFriendlyName,omitempty"` 14578 // LastSuccessfulFailoverTime - The Last successful failover time. 14579 LastSuccessfulFailoverTime *date.Time `json:"lastSuccessfulFailoverTime,omitempty"` 14580 // LastSuccessfulTestFailoverTime - The Last successful test failover time. 14581 LastSuccessfulTestFailoverTime *date.Time `json:"lastSuccessfulTestFailoverTime,omitempty"` 14582 // CurrentScenario - The current scenario. 14583 CurrentScenario *CurrentScenarioDetails `json:"currentScenario,omitempty"` 14584 // FailoverRecoveryPointID - The recovery point ARM Id to which the Vm was failed over. 14585 FailoverRecoveryPointID *string `json:"failoverRecoveryPointId,omitempty"` 14586 // ProviderSpecificDetails - The Replication provider custom settings. 14587 ProviderSpecificDetails BasicReplicationProviderSpecificSettings `json:"providerSpecificDetails,omitempty"` 14588 // RecoveryContainerID - The recovery container Id. 14589 RecoveryContainerID *string `json:"recoveryContainerId,omitempty"` 14590} 14591 14592// UnmarshalJSON is the custom unmarshaler for ReplicationProtectedItemProperties struct. 14593func (rpip *ReplicationProtectedItemProperties) UnmarshalJSON(body []byte) error { 14594 var m map[string]*json.RawMessage 14595 err := json.Unmarshal(body, &m) 14596 if err != nil { 14597 return err 14598 } 14599 for k, v := range m { 14600 switch k { 14601 case "friendlyName": 14602 if v != nil { 14603 var friendlyName string 14604 err = json.Unmarshal(*v, &friendlyName) 14605 if err != nil { 14606 return err 14607 } 14608 rpip.FriendlyName = &friendlyName 14609 } 14610 case "protectedItemType": 14611 if v != nil { 14612 var protectedItemType string 14613 err = json.Unmarshal(*v, &protectedItemType) 14614 if err != nil { 14615 return err 14616 } 14617 rpip.ProtectedItemType = &protectedItemType 14618 } 14619 case "protectableItemId": 14620 if v != nil { 14621 var protectableItemID string 14622 err = json.Unmarshal(*v, &protectableItemID) 14623 if err != nil { 14624 return err 14625 } 14626 rpip.ProtectableItemID = &protectableItemID 14627 } 14628 case "recoveryServicesProviderId": 14629 if v != nil { 14630 var recoveryServicesProviderID string 14631 err = json.Unmarshal(*v, &recoveryServicesProviderID) 14632 if err != nil { 14633 return err 14634 } 14635 rpip.RecoveryServicesProviderID = &recoveryServicesProviderID 14636 } 14637 case "primaryFabricFriendlyName": 14638 if v != nil { 14639 var primaryFabricFriendlyName string 14640 err = json.Unmarshal(*v, &primaryFabricFriendlyName) 14641 if err != nil { 14642 return err 14643 } 14644 rpip.PrimaryFabricFriendlyName = &primaryFabricFriendlyName 14645 } 14646 case "recoveryFabricFriendlyName": 14647 if v != nil { 14648 var recoveryFabricFriendlyName string 14649 err = json.Unmarshal(*v, &recoveryFabricFriendlyName) 14650 if err != nil { 14651 return err 14652 } 14653 rpip.RecoveryFabricFriendlyName = &recoveryFabricFriendlyName 14654 } 14655 case "recoveryFabricId": 14656 if v != nil { 14657 var recoveryFabricID string 14658 err = json.Unmarshal(*v, &recoveryFabricID) 14659 if err != nil { 14660 return err 14661 } 14662 rpip.RecoveryFabricID = &recoveryFabricID 14663 } 14664 case "primaryProtectionContainerFriendlyName": 14665 if v != nil { 14666 var primaryProtectionContainerFriendlyName string 14667 err = json.Unmarshal(*v, &primaryProtectionContainerFriendlyName) 14668 if err != nil { 14669 return err 14670 } 14671 rpip.PrimaryProtectionContainerFriendlyName = &primaryProtectionContainerFriendlyName 14672 } 14673 case "recoveryProtectionContainerFriendlyName": 14674 if v != nil { 14675 var recoveryProtectionContainerFriendlyName string 14676 err = json.Unmarshal(*v, &recoveryProtectionContainerFriendlyName) 14677 if err != nil { 14678 return err 14679 } 14680 rpip.RecoveryProtectionContainerFriendlyName = &recoveryProtectionContainerFriendlyName 14681 } 14682 case "protectionState": 14683 if v != nil { 14684 var protectionState string 14685 err = json.Unmarshal(*v, &protectionState) 14686 if err != nil { 14687 return err 14688 } 14689 rpip.ProtectionState = &protectionState 14690 } 14691 case "protectionStateDescription": 14692 if v != nil { 14693 var protectionStateDescription string 14694 err = json.Unmarshal(*v, &protectionStateDescription) 14695 if err != nil { 14696 return err 14697 } 14698 rpip.ProtectionStateDescription = &protectionStateDescription 14699 } 14700 case "activeLocation": 14701 if v != nil { 14702 var activeLocation string 14703 err = json.Unmarshal(*v, &activeLocation) 14704 if err != nil { 14705 return err 14706 } 14707 rpip.ActiveLocation = &activeLocation 14708 } 14709 case "testFailoverState": 14710 if v != nil { 14711 var testFailoverState string 14712 err = json.Unmarshal(*v, &testFailoverState) 14713 if err != nil { 14714 return err 14715 } 14716 rpip.TestFailoverState = &testFailoverState 14717 } 14718 case "testFailoverStateDescription": 14719 if v != nil { 14720 var testFailoverStateDescription string 14721 err = json.Unmarshal(*v, &testFailoverStateDescription) 14722 if err != nil { 14723 return err 14724 } 14725 rpip.TestFailoverStateDescription = &testFailoverStateDescription 14726 } 14727 case "allowedOperations": 14728 if v != nil { 14729 var allowedOperations []string 14730 err = json.Unmarshal(*v, &allowedOperations) 14731 if err != nil { 14732 return err 14733 } 14734 rpip.AllowedOperations = &allowedOperations 14735 } 14736 case "replicationHealth": 14737 if v != nil { 14738 var replicationHealth string 14739 err = json.Unmarshal(*v, &replicationHealth) 14740 if err != nil { 14741 return err 14742 } 14743 rpip.ReplicationHealth = &replicationHealth 14744 } 14745 case "failoverHealth": 14746 if v != nil { 14747 var failoverHealth string 14748 err = json.Unmarshal(*v, &failoverHealth) 14749 if err != nil { 14750 return err 14751 } 14752 rpip.FailoverHealth = &failoverHealth 14753 } 14754 case "replicationHealthErrors": 14755 if v != nil { 14756 var replicationHealthErrors []HealthError 14757 err = json.Unmarshal(*v, &replicationHealthErrors) 14758 if err != nil { 14759 return err 14760 } 14761 rpip.ReplicationHealthErrors = &replicationHealthErrors 14762 } 14763 case "failoverHealthErrors": 14764 if v != nil { 14765 var failoverHealthErrors []HealthError 14766 err = json.Unmarshal(*v, &failoverHealthErrors) 14767 if err != nil { 14768 return err 14769 } 14770 rpip.FailoverHealthErrors = &failoverHealthErrors 14771 } 14772 case "policyId": 14773 if v != nil { 14774 var policyID string 14775 err = json.Unmarshal(*v, &policyID) 14776 if err != nil { 14777 return err 14778 } 14779 rpip.PolicyID = &policyID 14780 } 14781 case "policyFriendlyName": 14782 if v != nil { 14783 var policyFriendlyName string 14784 err = json.Unmarshal(*v, &policyFriendlyName) 14785 if err != nil { 14786 return err 14787 } 14788 rpip.PolicyFriendlyName = &policyFriendlyName 14789 } 14790 case "lastSuccessfulFailoverTime": 14791 if v != nil { 14792 var lastSuccessfulFailoverTime date.Time 14793 err = json.Unmarshal(*v, &lastSuccessfulFailoverTime) 14794 if err != nil { 14795 return err 14796 } 14797 rpip.LastSuccessfulFailoverTime = &lastSuccessfulFailoverTime 14798 } 14799 case "lastSuccessfulTestFailoverTime": 14800 if v != nil { 14801 var lastSuccessfulTestFailoverTime date.Time 14802 err = json.Unmarshal(*v, &lastSuccessfulTestFailoverTime) 14803 if err != nil { 14804 return err 14805 } 14806 rpip.LastSuccessfulTestFailoverTime = &lastSuccessfulTestFailoverTime 14807 } 14808 case "currentScenario": 14809 if v != nil { 14810 var currentScenario CurrentScenarioDetails 14811 err = json.Unmarshal(*v, ¤tScenario) 14812 if err != nil { 14813 return err 14814 } 14815 rpip.CurrentScenario = ¤tScenario 14816 } 14817 case "failoverRecoveryPointId": 14818 if v != nil { 14819 var failoverRecoveryPointID string 14820 err = json.Unmarshal(*v, &failoverRecoveryPointID) 14821 if err != nil { 14822 return err 14823 } 14824 rpip.FailoverRecoveryPointID = &failoverRecoveryPointID 14825 } 14826 case "providerSpecificDetails": 14827 if v != nil { 14828 providerSpecificDetails, err := unmarshalBasicReplicationProviderSpecificSettings(*v) 14829 if err != nil { 14830 return err 14831 } 14832 rpip.ProviderSpecificDetails = providerSpecificDetails 14833 } 14834 case "recoveryContainerId": 14835 if v != nil { 14836 var recoveryContainerID string 14837 err = json.Unmarshal(*v, &recoveryContainerID) 14838 if err != nil { 14839 return err 14840 } 14841 rpip.RecoveryContainerID = &recoveryContainerID 14842 } 14843 } 14844 } 14845 14846 return nil 14847} 14848 14849// ReplicationProtectedItemsApplyRecoveryPointFuture an abstraction for monitoring and retrieving the 14850// results of a long-running operation. 14851type ReplicationProtectedItemsApplyRecoveryPointFuture struct { 14852 azure.FutureAPI 14853 // Result returns the result of the asynchronous operation. 14854 // If the operation has not completed it will return an error. 14855 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error) 14856} 14857 14858// UnmarshalJSON is the custom unmarshaller for CreateFuture. 14859func (future *ReplicationProtectedItemsApplyRecoveryPointFuture) UnmarshalJSON(body []byte) error { 14860 var azFuture azure.Future 14861 if err := json.Unmarshal(body, &azFuture); err != nil { 14862 return err 14863 } 14864 future.FutureAPI = &azFuture 14865 future.Result = future.result 14866 return nil 14867} 14868 14869// result is the default implementation for ReplicationProtectedItemsApplyRecoveryPointFuture.Result. 14870func (future *ReplicationProtectedItemsApplyRecoveryPointFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) { 14871 var done bool 14872 done, err = future.DoneWithContext(context.Background(), client) 14873 if err != nil { 14874 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsApplyRecoveryPointFuture", "Result", future.Response(), "Polling failure") 14875 return 14876 } 14877 if !done { 14878 rpi.Response.Response = future.Response() 14879 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsApplyRecoveryPointFuture") 14880 return 14881 } 14882 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 14883 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent { 14884 rpi, err = client.ApplyRecoveryPointResponder(rpi.Response.Response) 14885 if err != nil { 14886 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsApplyRecoveryPointFuture", "Result", rpi.Response.Response, "Failure responding to request") 14887 } 14888 } 14889 return 14890} 14891 14892// ReplicationProtectedItemsCreateFuture an abstraction for monitoring and retrieving the results of a 14893// long-running operation. 14894type ReplicationProtectedItemsCreateFuture struct { 14895 azure.FutureAPI 14896 // Result returns the result of the asynchronous operation. 14897 // If the operation has not completed it will return an error. 14898 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error) 14899} 14900 14901// UnmarshalJSON is the custom unmarshaller for CreateFuture. 14902func (future *ReplicationProtectedItemsCreateFuture) UnmarshalJSON(body []byte) error { 14903 var azFuture azure.Future 14904 if err := json.Unmarshal(body, &azFuture); err != nil { 14905 return err 14906 } 14907 future.FutureAPI = &azFuture 14908 future.Result = future.result 14909 return nil 14910} 14911 14912// result is the default implementation for ReplicationProtectedItemsCreateFuture.Result. 14913func (future *ReplicationProtectedItemsCreateFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) { 14914 var done bool 14915 done, err = future.DoneWithContext(context.Background(), client) 14916 if err != nil { 14917 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsCreateFuture", "Result", future.Response(), "Polling failure") 14918 return 14919 } 14920 if !done { 14921 rpi.Response.Response = future.Response() 14922 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsCreateFuture") 14923 return 14924 } 14925 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 14926 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent { 14927 rpi, err = client.CreateResponder(rpi.Response.Response) 14928 if err != nil { 14929 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsCreateFuture", "Result", rpi.Response.Response, "Failure responding to request") 14930 } 14931 } 14932 return 14933} 14934 14935// ReplicationProtectedItemsDeleteFuture an abstraction for monitoring and retrieving the results of a 14936// long-running operation. 14937type ReplicationProtectedItemsDeleteFuture struct { 14938 azure.FutureAPI 14939 // Result returns the result of the asynchronous operation. 14940 // If the operation has not completed it will return an error. 14941 Result func(ReplicationProtectedItemsClient) (autorest.Response, error) 14942} 14943 14944// UnmarshalJSON is the custom unmarshaller for CreateFuture. 14945func (future *ReplicationProtectedItemsDeleteFuture) UnmarshalJSON(body []byte) error { 14946 var azFuture azure.Future 14947 if err := json.Unmarshal(body, &azFuture); err != nil { 14948 return err 14949 } 14950 future.FutureAPI = &azFuture 14951 future.Result = future.result 14952 return nil 14953} 14954 14955// result is the default implementation for ReplicationProtectedItemsDeleteFuture.Result. 14956func (future *ReplicationProtectedItemsDeleteFuture) result(client ReplicationProtectedItemsClient) (ar autorest.Response, err error) { 14957 var done bool 14958 done, err = future.DoneWithContext(context.Background(), client) 14959 if err != nil { 14960 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsDeleteFuture", "Result", future.Response(), "Polling failure") 14961 return 14962 } 14963 if !done { 14964 ar.Response = future.Response() 14965 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsDeleteFuture") 14966 return 14967 } 14968 ar.Response = future.Response() 14969 return 14970} 14971 14972// ReplicationProtectedItemsFailoverCommitFuture an abstraction for monitoring and retrieving the results 14973// of a long-running operation. 14974type ReplicationProtectedItemsFailoverCommitFuture struct { 14975 azure.FutureAPI 14976 // Result returns the result of the asynchronous operation. 14977 // If the operation has not completed it will return an error. 14978 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error) 14979} 14980 14981// UnmarshalJSON is the custom unmarshaller for CreateFuture. 14982func (future *ReplicationProtectedItemsFailoverCommitFuture) UnmarshalJSON(body []byte) error { 14983 var azFuture azure.Future 14984 if err := json.Unmarshal(body, &azFuture); err != nil { 14985 return err 14986 } 14987 future.FutureAPI = &azFuture 14988 future.Result = future.result 14989 return nil 14990} 14991 14992// result is the default implementation for ReplicationProtectedItemsFailoverCommitFuture.Result. 14993func (future *ReplicationProtectedItemsFailoverCommitFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) { 14994 var done bool 14995 done, err = future.DoneWithContext(context.Background(), client) 14996 if err != nil { 14997 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsFailoverCommitFuture", "Result", future.Response(), "Polling failure") 14998 return 14999 } 15000 if !done { 15001 rpi.Response.Response = future.Response() 15002 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsFailoverCommitFuture") 15003 return 15004 } 15005 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 15006 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent { 15007 rpi, err = client.FailoverCommitResponder(rpi.Response.Response) 15008 if err != nil { 15009 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsFailoverCommitFuture", "Result", rpi.Response.Response, "Failure responding to request") 15010 } 15011 } 15012 return 15013} 15014 15015// ReplicationProtectedItemsPlannedFailoverFuture an abstraction for monitoring and retrieving the results 15016// of a long-running operation. 15017type ReplicationProtectedItemsPlannedFailoverFuture struct { 15018 azure.FutureAPI 15019 // Result returns the result of the asynchronous operation. 15020 // If the operation has not completed it will return an error. 15021 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error) 15022} 15023 15024// UnmarshalJSON is the custom unmarshaller for CreateFuture. 15025func (future *ReplicationProtectedItemsPlannedFailoverFuture) UnmarshalJSON(body []byte) error { 15026 var azFuture azure.Future 15027 if err := json.Unmarshal(body, &azFuture); err != nil { 15028 return err 15029 } 15030 future.FutureAPI = &azFuture 15031 future.Result = future.result 15032 return nil 15033} 15034 15035// result is the default implementation for ReplicationProtectedItemsPlannedFailoverFuture.Result. 15036func (future *ReplicationProtectedItemsPlannedFailoverFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) { 15037 var done bool 15038 done, err = future.DoneWithContext(context.Background(), client) 15039 if err != nil { 15040 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsPlannedFailoverFuture", "Result", future.Response(), "Polling failure") 15041 return 15042 } 15043 if !done { 15044 rpi.Response.Response = future.Response() 15045 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsPlannedFailoverFuture") 15046 return 15047 } 15048 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 15049 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent { 15050 rpi, err = client.PlannedFailoverResponder(rpi.Response.Response) 15051 if err != nil { 15052 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsPlannedFailoverFuture", "Result", rpi.Response.Response, "Failure responding to request") 15053 } 15054 } 15055 return 15056} 15057 15058// ReplicationProtectedItemsPurgeFuture an abstraction for monitoring and retrieving the results of a 15059// long-running operation. 15060type ReplicationProtectedItemsPurgeFuture struct { 15061 azure.FutureAPI 15062 // Result returns the result of the asynchronous operation. 15063 // If the operation has not completed it will return an error. 15064 Result func(ReplicationProtectedItemsClient) (autorest.Response, error) 15065} 15066 15067// UnmarshalJSON is the custom unmarshaller for CreateFuture. 15068func (future *ReplicationProtectedItemsPurgeFuture) UnmarshalJSON(body []byte) error { 15069 var azFuture azure.Future 15070 if err := json.Unmarshal(body, &azFuture); err != nil { 15071 return err 15072 } 15073 future.FutureAPI = &azFuture 15074 future.Result = future.result 15075 return nil 15076} 15077 15078// result is the default implementation for ReplicationProtectedItemsPurgeFuture.Result. 15079func (future *ReplicationProtectedItemsPurgeFuture) result(client ReplicationProtectedItemsClient) (ar autorest.Response, err error) { 15080 var done bool 15081 done, err = future.DoneWithContext(context.Background(), client) 15082 if err != nil { 15083 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsPurgeFuture", "Result", future.Response(), "Polling failure") 15084 return 15085 } 15086 if !done { 15087 ar.Response = future.Response() 15088 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsPurgeFuture") 15089 return 15090 } 15091 ar.Response = future.Response() 15092 return 15093} 15094 15095// ReplicationProtectedItemsRepairReplicationFuture an abstraction for monitoring and retrieving the 15096// results of a long-running operation. 15097type ReplicationProtectedItemsRepairReplicationFuture struct { 15098 azure.FutureAPI 15099 // Result returns the result of the asynchronous operation. 15100 // If the operation has not completed it will return an error. 15101 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error) 15102} 15103 15104// UnmarshalJSON is the custom unmarshaller for CreateFuture. 15105func (future *ReplicationProtectedItemsRepairReplicationFuture) UnmarshalJSON(body []byte) error { 15106 var azFuture azure.Future 15107 if err := json.Unmarshal(body, &azFuture); err != nil { 15108 return err 15109 } 15110 future.FutureAPI = &azFuture 15111 future.Result = future.result 15112 return nil 15113} 15114 15115// result is the default implementation for ReplicationProtectedItemsRepairReplicationFuture.Result. 15116func (future *ReplicationProtectedItemsRepairReplicationFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) { 15117 var done bool 15118 done, err = future.DoneWithContext(context.Background(), client) 15119 if err != nil { 15120 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsRepairReplicationFuture", "Result", future.Response(), "Polling failure") 15121 return 15122 } 15123 if !done { 15124 rpi.Response.Response = future.Response() 15125 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsRepairReplicationFuture") 15126 return 15127 } 15128 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 15129 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent { 15130 rpi, err = client.RepairReplicationResponder(rpi.Response.Response) 15131 if err != nil { 15132 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsRepairReplicationFuture", "Result", rpi.Response.Response, "Failure responding to request") 15133 } 15134 } 15135 return 15136} 15137 15138// ReplicationProtectedItemsReprotectFuture an abstraction for monitoring and retrieving the results of a 15139// long-running operation. 15140type ReplicationProtectedItemsReprotectFuture struct { 15141 azure.FutureAPI 15142 // Result returns the result of the asynchronous operation. 15143 // If the operation has not completed it will return an error. 15144 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error) 15145} 15146 15147// UnmarshalJSON is the custom unmarshaller for CreateFuture. 15148func (future *ReplicationProtectedItemsReprotectFuture) UnmarshalJSON(body []byte) error { 15149 var azFuture azure.Future 15150 if err := json.Unmarshal(body, &azFuture); err != nil { 15151 return err 15152 } 15153 future.FutureAPI = &azFuture 15154 future.Result = future.result 15155 return nil 15156} 15157 15158// result is the default implementation for ReplicationProtectedItemsReprotectFuture.Result. 15159func (future *ReplicationProtectedItemsReprotectFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) { 15160 var done bool 15161 done, err = future.DoneWithContext(context.Background(), client) 15162 if err != nil { 15163 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsReprotectFuture", "Result", future.Response(), "Polling failure") 15164 return 15165 } 15166 if !done { 15167 rpi.Response.Response = future.Response() 15168 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsReprotectFuture") 15169 return 15170 } 15171 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 15172 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent { 15173 rpi, err = client.ReprotectResponder(rpi.Response.Response) 15174 if err != nil { 15175 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsReprotectFuture", "Result", rpi.Response.Response, "Failure responding to request") 15176 } 15177 } 15178 return 15179} 15180 15181// ReplicationProtectedItemsTestFailoverCleanupFuture an abstraction for monitoring and retrieving the 15182// results of a long-running operation. 15183type ReplicationProtectedItemsTestFailoverCleanupFuture struct { 15184 azure.FutureAPI 15185 // Result returns the result of the asynchronous operation. 15186 // If the operation has not completed it will return an error. 15187 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error) 15188} 15189 15190// UnmarshalJSON is the custom unmarshaller for CreateFuture. 15191func (future *ReplicationProtectedItemsTestFailoverCleanupFuture) UnmarshalJSON(body []byte) error { 15192 var azFuture azure.Future 15193 if err := json.Unmarshal(body, &azFuture); err != nil { 15194 return err 15195 } 15196 future.FutureAPI = &azFuture 15197 future.Result = future.result 15198 return nil 15199} 15200 15201// result is the default implementation for ReplicationProtectedItemsTestFailoverCleanupFuture.Result. 15202func (future *ReplicationProtectedItemsTestFailoverCleanupFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) { 15203 var done bool 15204 done, err = future.DoneWithContext(context.Background(), client) 15205 if err != nil { 15206 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsTestFailoverCleanupFuture", "Result", future.Response(), "Polling failure") 15207 return 15208 } 15209 if !done { 15210 rpi.Response.Response = future.Response() 15211 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsTestFailoverCleanupFuture") 15212 return 15213 } 15214 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 15215 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent { 15216 rpi, err = client.TestFailoverCleanupResponder(rpi.Response.Response) 15217 if err != nil { 15218 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsTestFailoverCleanupFuture", "Result", rpi.Response.Response, "Failure responding to request") 15219 } 15220 } 15221 return 15222} 15223 15224// ReplicationProtectedItemsTestFailoverFuture an abstraction for monitoring and retrieving the results of 15225// a long-running operation. 15226type ReplicationProtectedItemsTestFailoverFuture struct { 15227 azure.FutureAPI 15228 // Result returns the result of the asynchronous operation. 15229 // If the operation has not completed it will return an error. 15230 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error) 15231} 15232 15233// UnmarshalJSON is the custom unmarshaller for CreateFuture. 15234func (future *ReplicationProtectedItemsTestFailoverFuture) UnmarshalJSON(body []byte) error { 15235 var azFuture azure.Future 15236 if err := json.Unmarshal(body, &azFuture); err != nil { 15237 return err 15238 } 15239 future.FutureAPI = &azFuture 15240 future.Result = future.result 15241 return nil 15242} 15243 15244// result is the default implementation for ReplicationProtectedItemsTestFailoverFuture.Result. 15245func (future *ReplicationProtectedItemsTestFailoverFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) { 15246 var done bool 15247 done, err = future.DoneWithContext(context.Background(), client) 15248 if err != nil { 15249 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsTestFailoverFuture", "Result", future.Response(), "Polling failure") 15250 return 15251 } 15252 if !done { 15253 rpi.Response.Response = future.Response() 15254 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsTestFailoverFuture") 15255 return 15256 } 15257 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 15258 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent { 15259 rpi, err = client.TestFailoverResponder(rpi.Response.Response) 15260 if err != nil { 15261 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsTestFailoverFuture", "Result", rpi.Response.Response, "Failure responding to request") 15262 } 15263 } 15264 return 15265} 15266 15267// ReplicationProtectedItemsUnplannedFailoverFuture an abstraction for monitoring and retrieving the 15268// results of a long-running operation. 15269type ReplicationProtectedItemsUnplannedFailoverFuture struct { 15270 azure.FutureAPI 15271 // Result returns the result of the asynchronous operation. 15272 // If the operation has not completed it will return an error. 15273 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error) 15274} 15275 15276// UnmarshalJSON is the custom unmarshaller for CreateFuture. 15277func (future *ReplicationProtectedItemsUnplannedFailoverFuture) UnmarshalJSON(body []byte) error { 15278 var azFuture azure.Future 15279 if err := json.Unmarshal(body, &azFuture); err != nil { 15280 return err 15281 } 15282 future.FutureAPI = &azFuture 15283 future.Result = future.result 15284 return nil 15285} 15286 15287// result is the default implementation for ReplicationProtectedItemsUnplannedFailoverFuture.Result. 15288func (future *ReplicationProtectedItemsUnplannedFailoverFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) { 15289 var done bool 15290 done, err = future.DoneWithContext(context.Background(), client) 15291 if err != nil { 15292 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUnplannedFailoverFuture", "Result", future.Response(), "Polling failure") 15293 return 15294 } 15295 if !done { 15296 rpi.Response.Response = future.Response() 15297 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsUnplannedFailoverFuture") 15298 return 15299 } 15300 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 15301 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent { 15302 rpi, err = client.UnplannedFailoverResponder(rpi.Response.Response) 15303 if err != nil { 15304 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUnplannedFailoverFuture", "Result", rpi.Response.Response, "Failure responding to request") 15305 } 15306 } 15307 return 15308} 15309 15310// ReplicationProtectedItemsUpdateFuture an abstraction for monitoring and retrieving the results of a 15311// long-running operation. 15312type ReplicationProtectedItemsUpdateFuture struct { 15313 azure.FutureAPI 15314 // Result returns the result of the asynchronous operation. 15315 // If the operation has not completed it will return an error. 15316 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error) 15317} 15318 15319// UnmarshalJSON is the custom unmarshaller for CreateFuture. 15320func (future *ReplicationProtectedItemsUpdateFuture) UnmarshalJSON(body []byte) error { 15321 var azFuture azure.Future 15322 if err := json.Unmarshal(body, &azFuture); err != nil { 15323 return err 15324 } 15325 future.FutureAPI = &azFuture 15326 future.Result = future.result 15327 return nil 15328} 15329 15330// result is the default implementation for ReplicationProtectedItemsUpdateFuture.Result. 15331func (future *ReplicationProtectedItemsUpdateFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) { 15332 var done bool 15333 done, err = future.DoneWithContext(context.Background(), client) 15334 if err != nil { 15335 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUpdateFuture", "Result", future.Response(), "Polling failure") 15336 return 15337 } 15338 if !done { 15339 rpi.Response.Response = future.Response() 15340 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsUpdateFuture") 15341 return 15342 } 15343 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 15344 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent { 15345 rpi, err = client.UpdateResponder(rpi.Response.Response) 15346 if err != nil { 15347 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUpdateFuture", "Result", rpi.Response.Response, "Failure responding to request") 15348 } 15349 } 15350 return 15351} 15352 15353// ReplicationProtectedItemsUpdateMobilityServiceFuture an abstraction for monitoring and retrieving the 15354// results of a long-running operation. 15355type ReplicationProtectedItemsUpdateMobilityServiceFuture struct { 15356 azure.FutureAPI 15357 // Result returns the result of the asynchronous operation. 15358 // If the operation has not completed it will return an error. 15359 Result func(ReplicationProtectedItemsClient) (ReplicationProtectedItem, error) 15360} 15361 15362// UnmarshalJSON is the custom unmarshaller for CreateFuture. 15363func (future *ReplicationProtectedItemsUpdateMobilityServiceFuture) UnmarshalJSON(body []byte) error { 15364 var azFuture azure.Future 15365 if err := json.Unmarshal(body, &azFuture); err != nil { 15366 return err 15367 } 15368 future.FutureAPI = &azFuture 15369 future.Result = future.result 15370 return nil 15371} 15372 15373// result is the default implementation for ReplicationProtectedItemsUpdateMobilityServiceFuture.Result. 15374func (future *ReplicationProtectedItemsUpdateMobilityServiceFuture) result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) { 15375 var done bool 15376 done, err = future.DoneWithContext(context.Background(), client) 15377 if err != nil { 15378 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUpdateMobilityServiceFuture", "Result", future.Response(), "Polling failure") 15379 return 15380 } 15381 if !done { 15382 rpi.Response.Response = future.Response() 15383 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsUpdateMobilityServiceFuture") 15384 return 15385 } 15386 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 15387 if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent { 15388 rpi, err = client.UpdateMobilityServiceResponder(rpi.Response.Response) 15389 if err != nil { 15390 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUpdateMobilityServiceFuture", "Result", rpi.Response.Response, "Failure responding to request") 15391 } 15392 } 15393 return 15394} 15395 15396// ReplicationProtectionContainerMappingsCreateFuture an abstraction for monitoring and retrieving the 15397// results of a long-running operation. 15398type ReplicationProtectionContainerMappingsCreateFuture struct { 15399 azure.FutureAPI 15400 // Result returns the result of the asynchronous operation. 15401 // If the operation has not completed it will return an error. 15402 Result func(ReplicationProtectionContainerMappingsClient) (ProtectionContainerMapping, error) 15403} 15404 15405// UnmarshalJSON is the custom unmarshaller for CreateFuture. 15406func (future *ReplicationProtectionContainerMappingsCreateFuture) UnmarshalJSON(body []byte) error { 15407 var azFuture azure.Future 15408 if err := json.Unmarshal(body, &azFuture); err != nil { 15409 return err 15410 } 15411 future.FutureAPI = &azFuture 15412 future.Result = future.result 15413 return nil 15414} 15415 15416// result is the default implementation for ReplicationProtectionContainerMappingsCreateFuture.Result. 15417func (future *ReplicationProtectionContainerMappingsCreateFuture) result(client ReplicationProtectionContainerMappingsClient) (pcm ProtectionContainerMapping, err error) { 15418 var done bool 15419 done, err = future.DoneWithContext(context.Background(), client) 15420 if err != nil { 15421 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsCreateFuture", "Result", future.Response(), "Polling failure") 15422 return 15423 } 15424 if !done { 15425 pcm.Response.Response = future.Response() 15426 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainerMappingsCreateFuture") 15427 return 15428 } 15429 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 15430 if pcm.Response.Response, err = future.GetResult(sender); err == nil && pcm.Response.Response.StatusCode != http.StatusNoContent { 15431 pcm, err = client.CreateResponder(pcm.Response.Response) 15432 if err != nil { 15433 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsCreateFuture", "Result", pcm.Response.Response, "Failure responding to request") 15434 } 15435 } 15436 return 15437} 15438 15439// ReplicationProtectionContainerMappingsDeleteFuture an abstraction for monitoring and retrieving the 15440// results of a long-running operation. 15441type ReplicationProtectionContainerMappingsDeleteFuture struct { 15442 azure.FutureAPI 15443 // Result returns the result of the asynchronous operation. 15444 // If the operation has not completed it will return an error. 15445 Result func(ReplicationProtectionContainerMappingsClient) (autorest.Response, error) 15446} 15447 15448// UnmarshalJSON is the custom unmarshaller for CreateFuture. 15449func (future *ReplicationProtectionContainerMappingsDeleteFuture) UnmarshalJSON(body []byte) error { 15450 var azFuture azure.Future 15451 if err := json.Unmarshal(body, &azFuture); err != nil { 15452 return err 15453 } 15454 future.FutureAPI = &azFuture 15455 future.Result = future.result 15456 return nil 15457} 15458 15459// result is the default implementation for ReplicationProtectionContainerMappingsDeleteFuture.Result. 15460func (future *ReplicationProtectionContainerMappingsDeleteFuture) result(client ReplicationProtectionContainerMappingsClient) (ar autorest.Response, err error) { 15461 var done bool 15462 done, err = future.DoneWithContext(context.Background(), client) 15463 if err != nil { 15464 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsDeleteFuture", "Result", future.Response(), "Polling failure") 15465 return 15466 } 15467 if !done { 15468 ar.Response = future.Response() 15469 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainerMappingsDeleteFuture") 15470 return 15471 } 15472 ar.Response = future.Response() 15473 return 15474} 15475 15476// ReplicationProtectionContainerMappingsPurgeFuture an abstraction for monitoring and retrieving the 15477// results of a long-running operation. 15478type ReplicationProtectionContainerMappingsPurgeFuture struct { 15479 azure.FutureAPI 15480 // Result returns the result of the asynchronous operation. 15481 // If the operation has not completed it will return an error. 15482 Result func(ReplicationProtectionContainerMappingsClient) (autorest.Response, error) 15483} 15484 15485// UnmarshalJSON is the custom unmarshaller for CreateFuture. 15486func (future *ReplicationProtectionContainerMappingsPurgeFuture) UnmarshalJSON(body []byte) error { 15487 var azFuture azure.Future 15488 if err := json.Unmarshal(body, &azFuture); err != nil { 15489 return err 15490 } 15491 future.FutureAPI = &azFuture 15492 future.Result = future.result 15493 return nil 15494} 15495 15496// result is the default implementation for ReplicationProtectionContainerMappingsPurgeFuture.Result. 15497func (future *ReplicationProtectionContainerMappingsPurgeFuture) result(client ReplicationProtectionContainerMappingsClient) (ar autorest.Response, err error) { 15498 var done bool 15499 done, err = future.DoneWithContext(context.Background(), client) 15500 if err != nil { 15501 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsPurgeFuture", "Result", future.Response(), "Polling failure") 15502 return 15503 } 15504 if !done { 15505 ar.Response = future.Response() 15506 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainerMappingsPurgeFuture") 15507 return 15508 } 15509 ar.Response = future.Response() 15510 return 15511} 15512 15513// ReplicationProtectionContainersCreateFuture an abstraction for monitoring and retrieving the results of 15514// a long-running operation. 15515type ReplicationProtectionContainersCreateFuture struct { 15516 azure.FutureAPI 15517 // Result returns the result of the asynchronous operation. 15518 // If the operation has not completed it will return an error. 15519 Result func(ReplicationProtectionContainersClient) (ProtectionContainer, error) 15520} 15521 15522// UnmarshalJSON is the custom unmarshaller for CreateFuture. 15523func (future *ReplicationProtectionContainersCreateFuture) UnmarshalJSON(body []byte) error { 15524 var azFuture azure.Future 15525 if err := json.Unmarshal(body, &azFuture); err != nil { 15526 return err 15527 } 15528 future.FutureAPI = &azFuture 15529 future.Result = future.result 15530 return nil 15531} 15532 15533// result is the default implementation for ReplicationProtectionContainersCreateFuture.Result. 15534func (future *ReplicationProtectionContainersCreateFuture) result(client ReplicationProtectionContainersClient) (pc ProtectionContainer, err error) { 15535 var done bool 15536 done, err = future.DoneWithContext(context.Background(), client) 15537 if err != nil { 15538 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersCreateFuture", "Result", future.Response(), "Polling failure") 15539 return 15540 } 15541 if !done { 15542 pc.Response.Response = future.Response() 15543 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainersCreateFuture") 15544 return 15545 } 15546 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 15547 if pc.Response.Response, err = future.GetResult(sender); err == nil && pc.Response.Response.StatusCode != http.StatusNoContent { 15548 pc, err = client.CreateResponder(pc.Response.Response) 15549 if err != nil { 15550 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersCreateFuture", "Result", pc.Response.Response, "Failure responding to request") 15551 } 15552 } 15553 return 15554} 15555 15556// ReplicationProtectionContainersDeleteFuture an abstraction for monitoring and retrieving the results of 15557// a long-running operation. 15558type ReplicationProtectionContainersDeleteFuture struct { 15559 azure.FutureAPI 15560 // Result returns the result of the asynchronous operation. 15561 // If the operation has not completed it will return an error. 15562 Result func(ReplicationProtectionContainersClient) (autorest.Response, error) 15563} 15564 15565// UnmarshalJSON is the custom unmarshaller for CreateFuture. 15566func (future *ReplicationProtectionContainersDeleteFuture) UnmarshalJSON(body []byte) error { 15567 var azFuture azure.Future 15568 if err := json.Unmarshal(body, &azFuture); err != nil { 15569 return err 15570 } 15571 future.FutureAPI = &azFuture 15572 future.Result = future.result 15573 return nil 15574} 15575 15576// result is the default implementation for ReplicationProtectionContainersDeleteFuture.Result. 15577func (future *ReplicationProtectionContainersDeleteFuture) result(client ReplicationProtectionContainersClient) (ar autorest.Response, err error) { 15578 var done bool 15579 done, err = future.DoneWithContext(context.Background(), client) 15580 if err != nil { 15581 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersDeleteFuture", "Result", future.Response(), "Polling failure") 15582 return 15583 } 15584 if !done { 15585 ar.Response = future.Response() 15586 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainersDeleteFuture") 15587 return 15588 } 15589 ar.Response = future.Response() 15590 return 15591} 15592 15593// ReplicationProtectionContainersDiscoverProtectableItemFuture an abstraction for monitoring and 15594// retrieving the results of a long-running operation. 15595type ReplicationProtectionContainersDiscoverProtectableItemFuture struct { 15596 azure.FutureAPI 15597 // Result returns the result of the asynchronous operation. 15598 // If the operation has not completed it will return an error. 15599 Result func(ReplicationProtectionContainersClient) (ProtectionContainer, error) 15600} 15601 15602// UnmarshalJSON is the custom unmarshaller for CreateFuture. 15603func (future *ReplicationProtectionContainersDiscoverProtectableItemFuture) UnmarshalJSON(body []byte) error { 15604 var azFuture azure.Future 15605 if err := json.Unmarshal(body, &azFuture); err != nil { 15606 return err 15607 } 15608 future.FutureAPI = &azFuture 15609 future.Result = future.result 15610 return nil 15611} 15612 15613// result is the default implementation for ReplicationProtectionContainersDiscoverProtectableItemFuture.Result. 15614func (future *ReplicationProtectionContainersDiscoverProtectableItemFuture) result(client ReplicationProtectionContainersClient) (pc ProtectionContainer, err error) { 15615 var done bool 15616 done, err = future.DoneWithContext(context.Background(), client) 15617 if err != nil { 15618 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersDiscoverProtectableItemFuture", "Result", future.Response(), "Polling failure") 15619 return 15620 } 15621 if !done { 15622 pc.Response.Response = future.Response() 15623 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainersDiscoverProtectableItemFuture") 15624 return 15625 } 15626 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 15627 if pc.Response.Response, err = future.GetResult(sender); err == nil && pc.Response.Response.StatusCode != http.StatusNoContent { 15628 pc, err = client.DiscoverProtectableItemResponder(pc.Response.Response) 15629 if err != nil { 15630 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersDiscoverProtectableItemFuture", "Result", pc.Response.Response, "Failure responding to request") 15631 } 15632 } 15633 return 15634} 15635 15636// ReplicationProtectionContainersSwitchProtectionFuture an abstraction for monitoring and retrieving the 15637// results of a long-running operation. 15638type ReplicationProtectionContainersSwitchProtectionFuture struct { 15639 azure.FutureAPI 15640 // Result returns the result of the asynchronous operation. 15641 // If the operation has not completed it will return an error. 15642 Result func(ReplicationProtectionContainersClient) (ProtectionContainer, error) 15643} 15644 15645// UnmarshalJSON is the custom unmarshaller for CreateFuture. 15646func (future *ReplicationProtectionContainersSwitchProtectionFuture) UnmarshalJSON(body []byte) error { 15647 var azFuture azure.Future 15648 if err := json.Unmarshal(body, &azFuture); err != nil { 15649 return err 15650 } 15651 future.FutureAPI = &azFuture 15652 future.Result = future.result 15653 return nil 15654} 15655 15656// result is the default implementation for ReplicationProtectionContainersSwitchProtectionFuture.Result. 15657func (future *ReplicationProtectionContainersSwitchProtectionFuture) result(client ReplicationProtectionContainersClient) (pc ProtectionContainer, err error) { 15658 var done bool 15659 done, err = future.DoneWithContext(context.Background(), client) 15660 if err != nil { 15661 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersSwitchProtectionFuture", "Result", future.Response(), "Polling failure") 15662 return 15663 } 15664 if !done { 15665 pc.Response.Response = future.Response() 15666 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainersSwitchProtectionFuture") 15667 return 15668 } 15669 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 15670 if pc.Response.Response, err = future.GetResult(sender); err == nil && pc.Response.Response.StatusCode != http.StatusNoContent { 15671 pc, err = client.SwitchProtectionResponder(pc.Response.Response) 15672 if err != nil { 15673 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersSwitchProtectionFuture", "Result", pc.Response.Response, "Failure responding to request") 15674 } 15675 } 15676 return 15677} 15678 15679// ReplicationProviderContainerUnmappingInput provider specific input for unpairing operations. 15680type ReplicationProviderContainerUnmappingInput struct { 15681 // InstanceType - The class type. 15682 InstanceType *string `json:"instanceType,omitempty"` 15683} 15684 15685// BasicReplicationProviderSpecificContainerCreationInput provider specific input for container creation operation. 15686type BasicReplicationProviderSpecificContainerCreationInput interface { 15687 AsA2AContainerCreationInput() (*A2AContainerCreationInput, bool) 15688 AsReplicationProviderSpecificContainerCreationInput() (*ReplicationProviderSpecificContainerCreationInput, bool) 15689} 15690 15691// ReplicationProviderSpecificContainerCreationInput provider specific input for container creation operation. 15692type ReplicationProviderSpecificContainerCreationInput struct { 15693 // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeReplicationProviderSpecificContainerCreationInput', 'InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeA2A' 15694 InstanceType InstanceTypeBasicReplicationProviderSpecificContainerCreationInput `json:"instanceType,omitempty"` 15695} 15696 15697func unmarshalBasicReplicationProviderSpecificContainerCreationInput(body []byte) (BasicReplicationProviderSpecificContainerCreationInput, error) { 15698 var m map[string]interface{} 15699 err := json.Unmarshal(body, &m) 15700 if err != nil { 15701 return nil, err 15702 } 15703 15704 switch m["instanceType"] { 15705 case string(InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeA2A): 15706 var acci A2AContainerCreationInput 15707 err := json.Unmarshal(body, &acci) 15708 return acci, err 15709 default: 15710 var rpscci ReplicationProviderSpecificContainerCreationInput 15711 err := json.Unmarshal(body, &rpscci) 15712 return rpscci, err 15713 } 15714} 15715func unmarshalBasicReplicationProviderSpecificContainerCreationInputArray(body []byte) ([]BasicReplicationProviderSpecificContainerCreationInput, error) { 15716 var rawMessages []*json.RawMessage 15717 err := json.Unmarshal(body, &rawMessages) 15718 if err != nil { 15719 return nil, err 15720 } 15721 15722 rpscciArray := make([]BasicReplicationProviderSpecificContainerCreationInput, len(rawMessages)) 15723 15724 for index, rawMessage := range rawMessages { 15725 rpscci, err := unmarshalBasicReplicationProviderSpecificContainerCreationInput(*rawMessage) 15726 if err != nil { 15727 return nil, err 15728 } 15729 rpscciArray[index] = rpscci 15730 } 15731 return rpscciArray, nil 15732} 15733 15734// MarshalJSON is the custom marshaler for ReplicationProviderSpecificContainerCreationInput. 15735func (rpscci ReplicationProviderSpecificContainerCreationInput) MarshalJSON() ([]byte, error) { 15736 rpscci.InstanceType = InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeReplicationProviderSpecificContainerCreationInput 15737 objectMap := make(map[string]interface{}) 15738 if rpscci.InstanceType != "" { 15739 objectMap["instanceType"] = rpscci.InstanceType 15740 } 15741 return json.Marshal(objectMap) 15742} 15743 15744// AsA2AContainerCreationInput is the BasicReplicationProviderSpecificContainerCreationInput implementation for ReplicationProviderSpecificContainerCreationInput. 15745func (rpscci ReplicationProviderSpecificContainerCreationInput) AsA2AContainerCreationInput() (*A2AContainerCreationInput, bool) { 15746 return nil, false 15747} 15748 15749// AsReplicationProviderSpecificContainerCreationInput is the BasicReplicationProviderSpecificContainerCreationInput implementation for ReplicationProviderSpecificContainerCreationInput. 15750func (rpscci ReplicationProviderSpecificContainerCreationInput) AsReplicationProviderSpecificContainerCreationInput() (*ReplicationProviderSpecificContainerCreationInput, bool) { 15751 return &rpscci, true 15752} 15753 15754// AsBasicReplicationProviderSpecificContainerCreationInput is the BasicReplicationProviderSpecificContainerCreationInput implementation for ReplicationProviderSpecificContainerCreationInput. 15755func (rpscci ReplicationProviderSpecificContainerCreationInput) AsBasicReplicationProviderSpecificContainerCreationInput() (BasicReplicationProviderSpecificContainerCreationInput, bool) { 15756 return &rpscci, true 15757} 15758 15759// ReplicationProviderSpecificContainerMappingInput provider specific input for pairing operations. 15760type ReplicationProviderSpecificContainerMappingInput struct { 15761 // InstanceType - The class type. 15762 InstanceType *string `json:"instanceType,omitempty"` 15763} 15764 15765// BasicReplicationProviderSpecificSettings replication provider specific settings. 15766type BasicReplicationProviderSpecificSettings interface { 15767 AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) 15768 AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) 15769 AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) 15770 AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) 15771 AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) 15772 AsInMageReplicationDetails() (*InMageReplicationDetails, bool) 15773 AsA2AReplicationDetails() (*A2AReplicationDetails, bool) 15774 AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) 15775} 15776 15777// ReplicationProviderSpecificSettings replication provider specific settings. 15778type ReplicationProviderSpecificSettings struct { 15779 // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeReplicationProviderSpecificSettings', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaBaseReplicationDetails', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMageAzureV2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMage', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeA2A' 15780 InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"` 15781} 15782 15783func unmarshalBasicReplicationProviderSpecificSettings(body []byte) (BasicReplicationProviderSpecificSettings, error) { 15784 var m map[string]interface{} 15785 err := json.Unmarshal(body, &m) 15786 if err != nil { 15787 return nil, err 15788 } 15789 15790 switch m["instanceType"] { 15791 case string(InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaBaseReplicationDetails): 15792 var hvrbrd HyperVReplicaBaseReplicationDetails 15793 err := json.Unmarshal(body, &hvrbrd) 15794 return hvrbrd, err 15795 case string(InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012): 15796 var hvrrd HyperVReplicaReplicationDetails 15797 err := json.Unmarshal(body, &hvrrd) 15798 return hvrrd, err 15799 case string(InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012R2): 15800 var hvrbrd HyperVReplicaBlueReplicationDetails 15801 err := json.Unmarshal(body, &hvrbrd) 15802 return hvrbrd, err 15803 case string(InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaAzure): 15804 var hvrard HyperVReplicaAzureReplicationDetails 15805 err := json.Unmarshal(body, &hvrard) 15806 return hvrard, err 15807 case string(InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMageAzureV2): 15808 var imavrd InMageAzureV2ReplicationDetails 15809 err := json.Unmarshal(body, &imavrd) 15810 return imavrd, err 15811 case string(InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMage): 15812 var imrd InMageReplicationDetails 15813 err := json.Unmarshal(body, &imrd) 15814 return imrd, err 15815 case string(InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeA2A): 15816 var ard A2AReplicationDetails 15817 err := json.Unmarshal(body, &ard) 15818 return ard, err 15819 default: 15820 var rpss ReplicationProviderSpecificSettings 15821 err := json.Unmarshal(body, &rpss) 15822 return rpss, err 15823 } 15824} 15825func unmarshalBasicReplicationProviderSpecificSettingsArray(body []byte) ([]BasicReplicationProviderSpecificSettings, error) { 15826 var rawMessages []*json.RawMessage 15827 err := json.Unmarshal(body, &rawMessages) 15828 if err != nil { 15829 return nil, err 15830 } 15831 15832 rpssArray := make([]BasicReplicationProviderSpecificSettings, len(rawMessages)) 15833 15834 for index, rawMessage := range rawMessages { 15835 rpss, err := unmarshalBasicReplicationProviderSpecificSettings(*rawMessage) 15836 if err != nil { 15837 return nil, err 15838 } 15839 rpssArray[index] = rpss 15840 } 15841 return rpssArray, nil 15842} 15843 15844// MarshalJSON is the custom marshaler for ReplicationProviderSpecificSettings. 15845func (rpss ReplicationProviderSpecificSettings) MarshalJSON() ([]byte, error) { 15846 rpss.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeReplicationProviderSpecificSettings 15847 objectMap := make(map[string]interface{}) 15848 if rpss.InstanceType != "" { 15849 objectMap["instanceType"] = rpss.InstanceType 15850 } 15851 return json.Marshal(objectMap) 15852} 15853 15854// AsHyperVReplicaBaseReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for ReplicationProviderSpecificSettings. 15855func (rpss ReplicationProviderSpecificSettings) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) { 15856 return nil, false 15857} 15858 15859// AsHyperVReplicaReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for ReplicationProviderSpecificSettings. 15860func (rpss ReplicationProviderSpecificSettings) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) { 15861 return nil, false 15862} 15863 15864// AsHyperVReplicaBlueReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for ReplicationProviderSpecificSettings. 15865func (rpss ReplicationProviderSpecificSettings) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) { 15866 return nil, false 15867} 15868 15869// AsHyperVReplicaAzureReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for ReplicationProviderSpecificSettings. 15870func (rpss ReplicationProviderSpecificSettings) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) { 15871 return nil, false 15872} 15873 15874// AsInMageAzureV2ReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for ReplicationProviderSpecificSettings. 15875func (rpss ReplicationProviderSpecificSettings) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) { 15876 return nil, false 15877} 15878 15879// AsInMageReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for ReplicationProviderSpecificSettings. 15880func (rpss ReplicationProviderSpecificSettings) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) { 15881 return nil, false 15882} 15883 15884// AsA2AReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for ReplicationProviderSpecificSettings. 15885func (rpss ReplicationProviderSpecificSettings) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) { 15886 return nil, false 15887} 15888 15889// AsReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for ReplicationProviderSpecificSettings. 15890func (rpss ReplicationProviderSpecificSettings) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) { 15891 return &rpss, true 15892} 15893 15894// AsBasicReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for ReplicationProviderSpecificSettings. 15895func (rpss ReplicationProviderSpecificSettings) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) { 15896 return &rpss, true 15897} 15898 15899// ReplicationRecoveryPlansCreateFuture an abstraction for monitoring and retrieving the results of a 15900// long-running operation. 15901type ReplicationRecoveryPlansCreateFuture struct { 15902 azure.FutureAPI 15903 // Result returns the result of the asynchronous operation. 15904 // If the operation has not completed it will return an error. 15905 Result func(ReplicationRecoveryPlansClient) (RecoveryPlan, error) 15906} 15907 15908// UnmarshalJSON is the custom unmarshaller for CreateFuture. 15909func (future *ReplicationRecoveryPlansCreateFuture) UnmarshalJSON(body []byte) error { 15910 var azFuture azure.Future 15911 if err := json.Unmarshal(body, &azFuture); err != nil { 15912 return err 15913 } 15914 future.FutureAPI = &azFuture 15915 future.Result = future.result 15916 return nil 15917} 15918 15919// result is the default implementation for ReplicationRecoveryPlansCreateFuture.Result. 15920func (future *ReplicationRecoveryPlansCreateFuture) result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) { 15921 var done bool 15922 done, err = future.DoneWithContext(context.Background(), client) 15923 if err != nil { 15924 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansCreateFuture", "Result", future.Response(), "Polling failure") 15925 return 15926 } 15927 if !done { 15928 rp.Response.Response = future.Response() 15929 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansCreateFuture") 15930 return 15931 } 15932 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 15933 if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent { 15934 rp, err = client.CreateResponder(rp.Response.Response) 15935 if err != nil { 15936 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansCreateFuture", "Result", rp.Response.Response, "Failure responding to request") 15937 } 15938 } 15939 return 15940} 15941 15942// ReplicationRecoveryPlansDeleteFuture an abstraction for monitoring and retrieving the results of a 15943// long-running operation. 15944type ReplicationRecoveryPlansDeleteFuture struct { 15945 azure.FutureAPI 15946 // Result returns the result of the asynchronous operation. 15947 // If the operation has not completed it will return an error. 15948 Result func(ReplicationRecoveryPlansClient) (autorest.Response, error) 15949} 15950 15951// UnmarshalJSON is the custom unmarshaller for CreateFuture. 15952func (future *ReplicationRecoveryPlansDeleteFuture) UnmarshalJSON(body []byte) error { 15953 var azFuture azure.Future 15954 if err := json.Unmarshal(body, &azFuture); err != nil { 15955 return err 15956 } 15957 future.FutureAPI = &azFuture 15958 future.Result = future.result 15959 return nil 15960} 15961 15962// result is the default implementation for ReplicationRecoveryPlansDeleteFuture.Result. 15963func (future *ReplicationRecoveryPlansDeleteFuture) result(client ReplicationRecoveryPlansClient) (ar autorest.Response, err error) { 15964 var done bool 15965 done, err = future.DoneWithContext(context.Background(), client) 15966 if err != nil { 15967 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansDeleteFuture", "Result", future.Response(), "Polling failure") 15968 return 15969 } 15970 if !done { 15971 ar.Response = future.Response() 15972 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansDeleteFuture") 15973 return 15974 } 15975 ar.Response = future.Response() 15976 return 15977} 15978 15979// ReplicationRecoveryPlansFailoverCommitFuture an abstraction for monitoring and retrieving the results of 15980// a long-running operation. 15981type ReplicationRecoveryPlansFailoverCommitFuture struct { 15982 azure.FutureAPI 15983 // Result returns the result of the asynchronous operation. 15984 // If the operation has not completed it will return an error. 15985 Result func(ReplicationRecoveryPlansClient) (RecoveryPlan, error) 15986} 15987 15988// UnmarshalJSON is the custom unmarshaller for CreateFuture. 15989func (future *ReplicationRecoveryPlansFailoverCommitFuture) UnmarshalJSON(body []byte) error { 15990 var azFuture azure.Future 15991 if err := json.Unmarshal(body, &azFuture); err != nil { 15992 return err 15993 } 15994 future.FutureAPI = &azFuture 15995 future.Result = future.result 15996 return nil 15997} 15998 15999// result is the default implementation for ReplicationRecoveryPlansFailoverCommitFuture.Result. 16000func (future *ReplicationRecoveryPlansFailoverCommitFuture) result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) { 16001 var done bool 16002 done, err = future.DoneWithContext(context.Background(), client) 16003 if err != nil { 16004 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansFailoverCommitFuture", "Result", future.Response(), "Polling failure") 16005 return 16006 } 16007 if !done { 16008 rp.Response.Response = future.Response() 16009 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansFailoverCommitFuture") 16010 return 16011 } 16012 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 16013 if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent { 16014 rp, err = client.FailoverCommitResponder(rp.Response.Response) 16015 if err != nil { 16016 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansFailoverCommitFuture", "Result", rp.Response.Response, "Failure responding to request") 16017 } 16018 } 16019 return 16020} 16021 16022// ReplicationRecoveryPlansPlannedFailoverFuture an abstraction for monitoring and retrieving the results 16023// of a long-running operation. 16024type ReplicationRecoveryPlansPlannedFailoverFuture struct { 16025 azure.FutureAPI 16026 // Result returns the result of the asynchronous operation. 16027 // If the operation has not completed it will return an error. 16028 Result func(ReplicationRecoveryPlansClient) (RecoveryPlan, error) 16029} 16030 16031// UnmarshalJSON is the custom unmarshaller for CreateFuture. 16032func (future *ReplicationRecoveryPlansPlannedFailoverFuture) UnmarshalJSON(body []byte) error { 16033 var azFuture azure.Future 16034 if err := json.Unmarshal(body, &azFuture); err != nil { 16035 return err 16036 } 16037 future.FutureAPI = &azFuture 16038 future.Result = future.result 16039 return nil 16040} 16041 16042// result is the default implementation for ReplicationRecoveryPlansPlannedFailoverFuture.Result. 16043func (future *ReplicationRecoveryPlansPlannedFailoverFuture) result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) { 16044 var done bool 16045 done, err = future.DoneWithContext(context.Background(), client) 16046 if err != nil { 16047 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansPlannedFailoverFuture", "Result", future.Response(), "Polling failure") 16048 return 16049 } 16050 if !done { 16051 rp.Response.Response = future.Response() 16052 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansPlannedFailoverFuture") 16053 return 16054 } 16055 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 16056 if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent { 16057 rp, err = client.PlannedFailoverResponder(rp.Response.Response) 16058 if err != nil { 16059 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansPlannedFailoverFuture", "Result", rp.Response.Response, "Failure responding to request") 16060 } 16061 } 16062 return 16063} 16064 16065// ReplicationRecoveryPlansReprotectFuture an abstraction for monitoring and retrieving the results of a 16066// long-running operation. 16067type ReplicationRecoveryPlansReprotectFuture struct { 16068 azure.FutureAPI 16069 // Result returns the result of the asynchronous operation. 16070 // If the operation has not completed it will return an error. 16071 Result func(ReplicationRecoveryPlansClient) (RecoveryPlan, error) 16072} 16073 16074// UnmarshalJSON is the custom unmarshaller for CreateFuture. 16075func (future *ReplicationRecoveryPlansReprotectFuture) UnmarshalJSON(body []byte) error { 16076 var azFuture azure.Future 16077 if err := json.Unmarshal(body, &azFuture); err != nil { 16078 return err 16079 } 16080 future.FutureAPI = &azFuture 16081 future.Result = future.result 16082 return nil 16083} 16084 16085// result is the default implementation for ReplicationRecoveryPlansReprotectFuture.Result. 16086func (future *ReplicationRecoveryPlansReprotectFuture) result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) { 16087 var done bool 16088 done, err = future.DoneWithContext(context.Background(), client) 16089 if err != nil { 16090 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansReprotectFuture", "Result", future.Response(), "Polling failure") 16091 return 16092 } 16093 if !done { 16094 rp.Response.Response = future.Response() 16095 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansReprotectFuture") 16096 return 16097 } 16098 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 16099 if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent { 16100 rp, err = client.ReprotectResponder(rp.Response.Response) 16101 if err != nil { 16102 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansReprotectFuture", "Result", rp.Response.Response, "Failure responding to request") 16103 } 16104 } 16105 return 16106} 16107 16108// ReplicationRecoveryPlansTestFailoverCleanupFuture an abstraction for monitoring and retrieving the 16109// results of a long-running operation. 16110type ReplicationRecoveryPlansTestFailoverCleanupFuture struct { 16111 azure.FutureAPI 16112 // Result returns the result of the asynchronous operation. 16113 // If the operation has not completed it will return an error. 16114 Result func(ReplicationRecoveryPlansClient) (RecoveryPlan, error) 16115} 16116 16117// UnmarshalJSON is the custom unmarshaller for CreateFuture. 16118func (future *ReplicationRecoveryPlansTestFailoverCleanupFuture) UnmarshalJSON(body []byte) error { 16119 var azFuture azure.Future 16120 if err := json.Unmarshal(body, &azFuture); err != nil { 16121 return err 16122 } 16123 future.FutureAPI = &azFuture 16124 future.Result = future.result 16125 return nil 16126} 16127 16128// result is the default implementation for ReplicationRecoveryPlansTestFailoverCleanupFuture.Result. 16129func (future *ReplicationRecoveryPlansTestFailoverCleanupFuture) result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) { 16130 var done bool 16131 done, err = future.DoneWithContext(context.Background(), client) 16132 if err != nil { 16133 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansTestFailoverCleanupFuture", "Result", future.Response(), "Polling failure") 16134 return 16135 } 16136 if !done { 16137 rp.Response.Response = future.Response() 16138 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansTestFailoverCleanupFuture") 16139 return 16140 } 16141 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 16142 if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent { 16143 rp, err = client.TestFailoverCleanupResponder(rp.Response.Response) 16144 if err != nil { 16145 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansTestFailoverCleanupFuture", "Result", rp.Response.Response, "Failure responding to request") 16146 } 16147 } 16148 return 16149} 16150 16151// ReplicationRecoveryPlansTestFailoverFuture an abstraction for monitoring and retrieving the results of a 16152// long-running operation. 16153type ReplicationRecoveryPlansTestFailoverFuture struct { 16154 azure.FutureAPI 16155 // Result returns the result of the asynchronous operation. 16156 // If the operation has not completed it will return an error. 16157 Result func(ReplicationRecoveryPlansClient) (RecoveryPlan, error) 16158} 16159 16160// UnmarshalJSON is the custom unmarshaller for CreateFuture. 16161func (future *ReplicationRecoveryPlansTestFailoverFuture) UnmarshalJSON(body []byte) error { 16162 var azFuture azure.Future 16163 if err := json.Unmarshal(body, &azFuture); err != nil { 16164 return err 16165 } 16166 future.FutureAPI = &azFuture 16167 future.Result = future.result 16168 return nil 16169} 16170 16171// result is the default implementation for ReplicationRecoveryPlansTestFailoverFuture.Result. 16172func (future *ReplicationRecoveryPlansTestFailoverFuture) result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) { 16173 var done bool 16174 done, err = future.DoneWithContext(context.Background(), client) 16175 if err != nil { 16176 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansTestFailoverFuture", "Result", future.Response(), "Polling failure") 16177 return 16178 } 16179 if !done { 16180 rp.Response.Response = future.Response() 16181 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansTestFailoverFuture") 16182 return 16183 } 16184 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 16185 if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent { 16186 rp, err = client.TestFailoverResponder(rp.Response.Response) 16187 if err != nil { 16188 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansTestFailoverFuture", "Result", rp.Response.Response, "Failure responding to request") 16189 } 16190 } 16191 return 16192} 16193 16194// ReplicationRecoveryPlansUnplannedFailoverFuture an abstraction for monitoring and retrieving the results 16195// of a long-running operation. 16196type ReplicationRecoveryPlansUnplannedFailoverFuture struct { 16197 azure.FutureAPI 16198 // Result returns the result of the asynchronous operation. 16199 // If the operation has not completed it will return an error. 16200 Result func(ReplicationRecoveryPlansClient) (RecoveryPlan, error) 16201} 16202 16203// UnmarshalJSON is the custom unmarshaller for CreateFuture. 16204func (future *ReplicationRecoveryPlansUnplannedFailoverFuture) UnmarshalJSON(body []byte) error { 16205 var azFuture azure.Future 16206 if err := json.Unmarshal(body, &azFuture); err != nil { 16207 return err 16208 } 16209 future.FutureAPI = &azFuture 16210 future.Result = future.result 16211 return nil 16212} 16213 16214// result is the default implementation for ReplicationRecoveryPlansUnplannedFailoverFuture.Result. 16215func (future *ReplicationRecoveryPlansUnplannedFailoverFuture) result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) { 16216 var done bool 16217 done, err = future.DoneWithContext(context.Background(), client) 16218 if err != nil { 16219 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansUnplannedFailoverFuture", "Result", future.Response(), "Polling failure") 16220 return 16221 } 16222 if !done { 16223 rp.Response.Response = future.Response() 16224 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansUnplannedFailoverFuture") 16225 return 16226 } 16227 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 16228 if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent { 16229 rp, err = client.UnplannedFailoverResponder(rp.Response.Response) 16230 if err != nil { 16231 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansUnplannedFailoverFuture", "Result", rp.Response.Response, "Failure responding to request") 16232 } 16233 } 16234 return 16235} 16236 16237// ReplicationRecoveryPlansUpdateFuture an abstraction for monitoring and retrieving the results of a 16238// long-running operation. 16239type ReplicationRecoveryPlansUpdateFuture struct { 16240 azure.FutureAPI 16241 // Result returns the result of the asynchronous operation. 16242 // If the operation has not completed it will return an error. 16243 Result func(ReplicationRecoveryPlansClient) (RecoveryPlan, error) 16244} 16245 16246// UnmarshalJSON is the custom unmarshaller for CreateFuture. 16247func (future *ReplicationRecoveryPlansUpdateFuture) UnmarshalJSON(body []byte) error { 16248 var azFuture azure.Future 16249 if err := json.Unmarshal(body, &azFuture); err != nil { 16250 return err 16251 } 16252 future.FutureAPI = &azFuture 16253 future.Result = future.result 16254 return nil 16255} 16256 16257// result is the default implementation for ReplicationRecoveryPlansUpdateFuture.Result. 16258func (future *ReplicationRecoveryPlansUpdateFuture) result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) { 16259 var done bool 16260 done, err = future.DoneWithContext(context.Background(), client) 16261 if err != nil { 16262 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansUpdateFuture", "Result", future.Response(), "Polling failure") 16263 return 16264 } 16265 if !done { 16266 rp.Response.Response = future.Response() 16267 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansUpdateFuture") 16268 return 16269 } 16270 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 16271 if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent { 16272 rp, err = client.UpdateResponder(rp.Response.Response) 16273 if err != nil { 16274 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansUpdateFuture", "Result", rp.Response.Response, "Failure responding to request") 16275 } 16276 } 16277 return 16278} 16279 16280// ReplicationRecoveryServicesProvidersDeleteFuture an abstraction for monitoring and retrieving the 16281// results of a long-running operation. 16282type ReplicationRecoveryServicesProvidersDeleteFuture struct { 16283 azure.FutureAPI 16284 // Result returns the result of the asynchronous operation. 16285 // If the operation has not completed it will return an error. 16286 Result func(ReplicationRecoveryServicesProvidersClient) (autorest.Response, error) 16287} 16288 16289// UnmarshalJSON is the custom unmarshaller for CreateFuture. 16290func (future *ReplicationRecoveryServicesProvidersDeleteFuture) UnmarshalJSON(body []byte) error { 16291 var azFuture azure.Future 16292 if err := json.Unmarshal(body, &azFuture); err != nil { 16293 return err 16294 } 16295 future.FutureAPI = &azFuture 16296 future.Result = future.result 16297 return nil 16298} 16299 16300// result is the default implementation for ReplicationRecoveryServicesProvidersDeleteFuture.Result. 16301func (future *ReplicationRecoveryServicesProvidersDeleteFuture) result(client ReplicationRecoveryServicesProvidersClient) (ar autorest.Response, err error) { 16302 var done bool 16303 done, err = future.DoneWithContext(context.Background(), client) 16304 if err != nil { 16305 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersDeleteFuture", "Result", future.Response(), "Polling failure") 16306 return 16307 } 16308 if !done { 16309 ar.Response = future.Response() 16310 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryServicesProvidersDeleteFuture") 16311 return 16312 } 16313 ar.Response = future.Response() 16314 return 16315} 16316 16317// ReplicationRecoveryServicesProvidersPurgeFuture an abstraction for monitoring and retrieving the results 16318// of a long-running operation. 16319type ReplicationRecoveryServicesProvidersPurgeFuture struct { 16320 azure.FutureAPI 16321 // Result returns the result of the asynchronous operation. 16322 // If the operation has not completed it will return an error. 16323 Result func(ReplicationRecoveryServicesProvidersClient) (autorest.Response, error) 16324} 16325 16326// UnmarshalJSON is the custom unmarshaller for CreateFuture. 16327func (future *ReplicationRecoveryServicesProvidersPurgeFuture) UnmarshalJSON(body []byte) error { 16328 var azFuture azure.Future 16329 if err := json.Unmarshal(body, &azFuture); err != nil { 16330 return err 16331 } 16332 future.FutureAPI = &azFuture 16333 future.Result = future.result 16334 return nil 16335} 16336 16337// result is the default implementation for ReplicationRecoveryServicesProvidersPurgeFuture.Result. 16338func (future *ReplicationRecoveryServicesProvidersPurgeFuture) result(client ReplicationRecoveryServicesProvidersClient) (ar autorest.Response, err error) { 16339 var done bool 16340 done, err = future.DoneWithContext(context.Background(), client) 16341 if err != nil { 16342 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersPurgeFuture", "Result", future.Response(), "Polling failure") 16343 return 16344 } 16345 if !done { 16346 ar.Response = future.Response() 16347 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryServicesProvidersPurgeFuture") 16348 return 16349 } 16350 ar.Response = future.Response() 16351 return 16352} 16353 16354// ReplicationRecoveryServicesProvidersRefreshProviderFuture an abstraction for monitoring and retrieving 16355// the results of a long-running operation. 16356type ReplicationRecoveryServicesProvidersRefreshProviderFuture struct { 16357 azure.FutureAPI 16358 // Result returns the result of the asynchronous operation. 16359 // If the operation has not completed it will return an error. 16360 Result func(ReplicationRecoveryServicesProvidersClient) (RecoveryServicesProvider, error) 16361} 16362 16363// UnmarshalJSON is the custom unmarshaller for CreateFuture. 16364func (future *ReplicationRecoveryServicesProvidersRefreshProviderFuture) UnmarshalJSON(body []byte) error { 16365 var azFuture azure.Future 16366 if err := json.Unmarshal(body, &azFuture); err != nil { 16367 return err 16368 } 16369 future.FutureAPI = &azFuture 16370 future.Result = future.result 16371 return nil 16372} 16373 16374// result is the default implementation for ReplicationRecoveryServicesProvidersRefreshProviderFuture.Result. 16375func (future *ReplicationRecoveryServicesProvidersRefreshProviderFuture) result(client ReplicationRecoveryServicesProvidersClient) (rsp RecoveryServicesProvider, err error) { 16376 var done bool 16377 done, err = future.DoneWithContext(context.Background(), client) 16378 if err != nil { 16379 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersRefreshProviderFuture", "Result", future.Response(), "Polling failure") 16380 return 16381 } 16382 if !done { 16383 rsp.Response.Response = future.Response() 16384 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryServicesProvidersRefreshProviderFuture") 16385 return 16386 } 16387 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 16388 if rsp.Response.Response, err = future.GetResult(sender); err == nil && rsp.Response.Response.StatusCode != http.StatusNoContent { 16389 rsp, err = client.RefreshProviderResponder(rsp.Response.Response) 16390 if err != nil { 16391 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersRefreshProviderFuture", "Result", rsp.Response.Response, "Failure responding to request") 16392 } 16393 } 16394 return 16395} 16396 16397// ReplicationStorageClassificationMappingsCreateFuture an abstraction for monitoring and retrieving the 16398// results of a long-running operation. 16399type ReplicationStorageClassificationMappingsCreateFuture struct { 16400 azure.FutureAPI 16401 // Result returns the result of the asynchronous operation. 16402 // If the operation has not completed it will return an error. 16403 Result func(ReplicationStorageClassificationMappingsClient) (StorageClassificationMapping, error) 16404} 16405 16406// UnmarshalJSON is the custom unmarshaller for CreateFuture. 16407func (future *ReplicationStorageClassificationMappingsCreateFuture) UnmarshalJSON(body []byte) error { 16408 var azFuture azure.Future 16409 if err := json.Unmarshal(body, &azFuture); err != nil { 16410 return err 16411 } 16412 future.FutureAPI = &azFuture 16413 future.Result = future.result 16414 return nil 16415} 16416 16417// result is the default implementation for ReplicationStorageClassificationMappingsCreateFuture.Result. 16418func (future *ReplicationStorageClassificationMappingsCreateFuture) result(client ReplicationStorageClassificationMappingsClient) (scm StorageClassificationMapping, err error) { 16419 var done bool 16420 done, err = future.DoneWithContext(context.Background(), client) 16421 if err != nil { 16422 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsCreateFuture", "Result", future.Response(), "Polling failure") 16423 return 16424 } 16425 if !done { 16426 scm.Response.Response = future.Response() 16427 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationStorageClassificationMappingsCreateFuture") 16428 return 16429 } 16430 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 16431 if scm.Response.Response, err = future.GetResult(sender); err == nil && scm.Response.Response.StatusCode != http.StatusNoContent { 16432 scm, err = client.CreateResponder(scm.Response.Response) 16433 if err != nil { 16434 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsCreateFuture", "Result", scm.Response.Response, "Failure responding to request") 16435 } 16436 } 16437 return 16438} 16439 16440// ReplicationStorageClassificationMappingsDeleteFuture an abstraction for monitoring and retrieving the 16441// results of a long-running operation. 16442type ReplicationStorageClassificationMappingsDeleteFuture struct { 16443 azure.FutureAPI 16444 // Result returns the result of the asynchronous operation. 16445 // If the operation has not completed it will return an error. 16446 Result func(ReplicationStorageClassificationMappingsClient) (autorest.Response, error) 16447} 16448 16449// UnmarshalJSON is the custom unmarshaller for CreateFuture. 16450func (future *ReplicationStorageClassificationMappingsDeleteFuture) UnmarshalJSON(body []byte) error { 16451 var azFuture azure.Future 16452 if err := json.Unmarshal(body, &azFuture); err != nil { 16453 return err 16454 } 16455 future.FutureAPI = &azFuture 16456 future.Result = future.result 16457 return nil 16458} 16459 16460// result is the default implementation for ReplicationStorageClassificationMappingsDeleteFuture.Result. 16461func (future *ReplicationStorageClassificationMappingsDeleteFuture) result(client ReplicationStorageClassificationMappingsClient) (ar autorest.Response, err error) { 16462 var done bool 16463 done, err = future.DoneWithContext(context.Background(), client) 16464 if err != nil { 16465 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsDeleteFuture", "Result", future.Response(), "Polling failure") 16466 return 16467 } 16468 if !done { 16469 ar.Response = future.Response() 16470 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationStorageClassificationMappingsDeleteFuture") 16471 return 16472 } 16473 ar.Response = future.Response() 16474 return 16475} 16476 16477// ReplicationvCentersCreateFuture an abstraction for monitoring and retrieving the results of a 16478// long-running operation. 16479type ReplicationvCentersCreateFuture struct { 16480 azure.FutureAPI 16481 // Result returns the result of the asynchronous operation. 16482 // If the operation has not completed it will return an error. 16483 Result func(ReplicationvCentersClient) (VCenter, error) 16484} 16485 16486// UnmarshalJSON is the custom unmarshaller for CreateFuture. 16487func (future *ReplicationvCentersCreateFuture) UnmarshalJSON(body []byte) error { 16488 var azFuture azure.Future 16489 if err := json.Unmarshal(body, &azFuture); err != nil { 16490 return err 16491 } 16492 future.FutureAPI = &azFuture 16493 future.Result = future.result 16494 return nil 16495} 16496 16497// result is the default implementation for ReplicationvCentersCreateFuture.Result. 16498func (future *ReplicationvCentersCreateFuture) result(client ReplicationvCentersClient) (vc VCenter, err error) { 16499 var done bool 16500 done, err = future.DoneWithContext(context.Background(), client) 16501 if err != nil { 16502 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersCreateFuture", "Result", future.Response(), "Polling failure") 16503 return 16504 } 16505 if !done { 16506 vc.Response.Response = future.Response() 16507 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationvCentersCreateFuture") 16508 return 16509 } 16510 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 16511 if vc.Response.Response, err = future.GetResult(sender); err == nil && vc.Response.Response.StatusCode != http.StatusNoContent { 16512 vc, err = client.CreateResponder(vc.Response.Response) 16513 if err != nil { 16514 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersCreateFuture", "Result", vc.Response.Response, "Failure responding to request") 16515 } 16516 } 16517 return 16518} 16519 16520// ReplicationvCentersDeleteFuture an abstraction for monitoring and retrieving the results of a 16521// long-running operation. 16522type ReplicationvCentersDeleteFuture struct { 16523 azure.FutureAPI 16524 // Result returns the result of the asynchronous operation. 16525 // If the operation has not completed it will return an error. 16526 Result func(ReplicationvCentersClient) (autorest.Response, error) 16527} 16528 16529// UnmarshalJSON is the custom unmarshaller for CreateFuture. 16530func (future *ReplicationvCentersDeleteFuture) UnmarshalJSON(body []byte) error { 16531 var azFuture azure.Future 16532 if err := json.Unmarshal(body, &azFuture); err != nil { 16533 return err 16534 } 16535 future.FutureAPI = &azFuture 16536 future.Result = future.result 16537 return nil 16538} 16539 16540// result is the default implementation for ReplicationvCentersDeleteFuture.Result. 16541func (future *ReplicationvCentersDeleteFuture) result(client ReplicationvCentersClient) (ar autorest.Response, err error) { 16542 var done bool 16543 done, err = future.DoneWithContext(context.Background(), client) 16544 if err != nil { 16545 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersDeleteFuture", "Result", future.Response(), "Polling failure") 16546 return 16547 } 16548 if !done { 16549 ar.Response = future.Response() 16550 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationvCentersDeleteFuture") 16551 return 16552 } 16553 ar.Response = future.Response() 16554 return 16555} 16556 16557// ReplicationvCentersUpdateFuture an abstraction for monitoring and retrieving the results of a 16558// long-running operation. 16559type ReplicationvCentersUpdateFuture struct { 16560 azure.FutureAPI 16561 // Result returns the result of the asynchronous operation. 16562 // If the operation has not completed it will return an error. 16563 Result func(ReplicationvCentersClient) (VCenter, error) 16564} 16565 16566// UnmarshalJSON is the custom unmarshaller for CreateFuture. 16567func (future *ReplicationvCentersUpdateFuture) UnmarshalJSON(body []byte) error { 16568 var azFuture azure.Future 16569 if err := json.Unmarshal(body, &azFuture); err != nil { 16570 return err 16571 } 16572 future.FutureAPI = &azFuture 16573 future.Result = future.result 16574 return nil 16575} 16576 16577// result is the default implementation for ReplicationvCentersUpdateFuture.Result. 16578func (future *ReplicationvCentersUpdateFuture) result(client ReplicationvCentersClient) (vc VCenter, err error) { 16579 var done bool 16580 done, err = future.DoneWithContext(context.Background(), client) 16581 if err != nil { 16582 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersUpdateFuture", "Result", future.Response(), "Polling failure") 16583 return 16584 } 16585 if !done { 16586 vc.Response.Response = future.Response() 16587 err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationvCentersUpdateFuture") 16588 return 16589 } 16590 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 16591 if vc.Response.Response, err = future.GetResult(sender); err == nil && vc.Response.Response.StatusCode != http.StatusNoContent { 16592 vc, err = client.UpdateResponder(vc.Response.Response) 16593 if err != nil { 16594 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersUpdateFuture", "Result", vc.Response.Response, "Failure responding to request") 16595 } 16596 } 16597 return 16598} 16599 16600// Resource azure resource. 16601type Resource struct { 16602 // ID - READ-ONLY; Resource Id 16603 ID *string `json:"id,omitempty"` 16604 // Name - READ-ONLY; Resource Name 16605 Name *string `json:"name,omitempty"` 16606 // Type - READ-ONLY; Resource Type 16607 Type *string `json:"type,omitempty"` 16608 // Location - Resource Location 16609 Location *string `json:"location,omitempty"` 16610} 16611 16612// MarshalJSON is the custom marshaler for Resource. 16613func (r Resource) MarshalJSON() ([]byte, error) { 16614 objectMap := make(map[string]interface{}) 16615 if r.Location != nil { 16616 objectMap["location"] = r.Location 16617 } 16618 return json.Marshal(objectMap) 16619} 16620 16621// ResourceHealthSummary base class to define the health summary of the resources contained under an Arm 16622// resource. 16623type ResourceHealthSummary struct { 16624 // ResourceCount - The count of total resources under the container. 16625 ResourceCount *int32 `json:"resourceCount,omitempty"` 16626 // Issues - The list of summary of health errors across the resources under the container. 16627 Issues *[]HealthErrorSummary `json:"issues,omitempty"` 16628} 16629 16630// ResumeJobParams resume job params. 16631type ResumeJobParams struct { 16632 // Properties - Resume job properties. 16633 Properties *ResumeJobParamsProperties `json:"properties,omitempty"` 16634} 16635 16636// ResumeJobParamsProperties resume job properties. 16637type ResumeJobParamsProperties struct { 16638 // Comments - Resume job comments. 16639 Comments *string `json:"comments,omitempty"` 16640} 16641 16642// RetentionVolume the retention details of the MT. 16643type RetentionVolume struct { 16644 // VolumeName - The volume name. 16645 VolumeName *string `json:"volumeName,omitempty"` 16646 // CapacityInBytes - The volume capacity. 16647 CapacityInBytes *int64 `json:"capacityInBytes,omitempty"` 16648 // FreeSpaceInBytes - The free space available in this volume. 16649 FreeSpaceInBytes *int64 `json:"freeSpaceInBytes,omitempty"` 16650 // ThresholdPercentage - The threshold percentage. 16651 ThresholdPercentage *int32 `json:"thresholdPercentage,omitempty"` 16652} 16653 16654// ReverseReplicationInput reverse replication input. 16655type ReverseReplicationInput struct { 16656 // Properties - Reverse replication properties 16657 Properties *ReverseReplicationInputProperties `json:"properties,omitempty"` 16658} 16659 16660// ReverseReplicationInputProperties reverse replication input properties. 16661type ReverseReplicationInputProperties struct { 16662 // FailoverDirection - Failover direction. 16663 FailoverDirection *string `json:"failoverDirection,omitempty"` 16664 // ProviderSpecificDetails - Provider specific reverse replication input. 16665 ProviderSpecificDetails BasicReverseReplicationProviderSpecificInput `json:"providerSpecificDetails,omitempty"` 16666} 16667 16668// UnmarshalJSON is the custom unmarshaler for ReverseReplicationInputProperties struct. 16669func (rrip *ReverseReplicationInputProperties) UnmarshalJSON(body []byte) error { 16670 var m map[string]*json.RawMessage 16671 err := json.Unmarshal(body, &m) 16672 if err != nil { 16673 return err 16674 } 16675 for k, v := range m { 16676 switch k { 16677 case "failoverDirection": 16678 if v != nil { 16679 var failoverDirection string 16680 err = json.Unmarshal(*v, &failoverDirection) 16681 if err != nil { 16682 return err 16683 } 16684 rrip.FailoverDirection = &failoverDirection 16685 } 16686 case "providerSpecificDetails": 16687 if v != nil { 16688 providerSpecificDetails, err := unmarshalBasicReverseReplicationProviderSpecificInput(*v) 16689 if err != nil { 16690 return err 16691 } 16692 rrip.ProviderSpecificDetails = providerSpecificDetails 16693 } 16694 } 16695 } 16696 16697 return nil 16698} 16699 16700// BasicReverseReplicationProviderSpecificInput provider specific reverse replication input. 16701type BasicReverseReplicationProviderSpecificInput interface { 16702 AsHyperVReplicaAzureReprotectInput() (*HyperVReplicaAzureReprotectInput, bool) 16703 AsInMageAzureV2ReprotectInput() (*InMageAzureV2ReprotectInput, bool) 16704 AsInMageReprotectInput() (*InMageReprotectInput, bool) 16705 AsA2AReprotectInput() (*A2AReprotectInput, bool) 16706 AsReverseReplicationProviderSpecificInput() (*ReverseReplicationProviderSpecificInput, bool) 16707} 16708 16709// ReverseReplicationProviderSpecificInput provider specific reverse replication input. 16710type ReverseReplicationProviderSpecificInput struct { 16711 // InstanceType - Possible values include: 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeReverseReplicationProviderSpecificInput', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeA2A' 16712 InstanceType InstanceTypeBasicReverseReplicationProviderSpecificInput `json:"instanceType,omitempty"` 16713} 16714 16715func unmarshalBasicReverseReplicationProviderSpecificInput(body []byte) (BasicReverseReplicationProviderSpecificInput, error) { 16716 var m map[string]interface{} 16717 err := json.Unmarshal(body, &m) 16718 if err != nil { 16719 return nil, err 16720 } 16721 16722 switch m["instanceType"] { 16723 case string(InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeHyperVReplicaAzure): 16724 var hvrari HyperVReplicaAzureReprotectInput 16725 err := json.Unmarshal(body, &hvrari) 16726 return hvrari, err 16727 case string(InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMageAzureV2): 16728 var imavri InMageAzureV2ReprotectInput 16729 err := json.Unmarshal(body, &imavri) 16730 return imavri, err 16731 case string(InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMage): 16732 var imri InMageReprotectInput 16733 err := json.Unmarshal(body, &imri) 16734 return imri, err 16735 case string(InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeA2A): 16736 var ari A2AReprotectInput 16737 err := json.Unmarshal(body, &ari) 16738 return ari, err 16739 default: 16740 var rrpsi ReverseReplicationProviderSpecificInput 16741 err := json.Unmarshal(body, &rrpsi) 16742 return rrpsi, err 16743 } 16744} 16745func unmarshalBasicReverseReplicationProviderSpecificInputArray(body []byte) ([]BasicReverseReplicationProviderSpecificInput, error) { 16746 var rawMessages []*json.RawMessage 16747 err := json.Unmarshal(body, &rawMessages) 16748 if err != nil { 16749 return nil, err 16750 } 16751 16752 rrpsiArray := make([]BasicReverseReplicationProviderSpecificInput, len(rawMessages)) 16753 16754 for index, rawMessage := range rawMessages { 16755 rrpsi, err := unmarshalBasicReverseReplicationProviderSpecificInput(*rawMessage) 16756 if err != nil { 16757 return nil, err 16758 } 16759 rrpsiArray[index] = rrpsi 16760 } 16761 return rrpsiArray, nil 16762} 16763 16764// MarshalJSON is the custom marshaler for ReverseReplicationProviderSpecificInput. 16765func (rrpsi ReverseReplicationProviderSpecificInput) MarshalJSON() ([]byte, error) { 16766 rrpsi.InstanceType = InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeReverseReplicationProviderSpecificInput 16767 objectMap := make(map[string]interface{}) 16768 if rrpsi.InstanceType != "" { 16769 objectMap["instanceType"] = rrpsi.InstanceType 16770 } 16771 return json.Marshal(objectMap) 16772} 16773 16774// AsHyperVReplicaAzureReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for ReverseReplicationProviderSpecificInput. 16775func (rrpsi ReverseReplicationProviderSpecificInput) AsHyperVReplicaAzureReprotectInput() (*HyperVReplicaAzureReprotectInput, bool) { 16776 return nil, false 16777} 16778 16779// AsInMageAzureV2ReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for ReverseReplicationProviderSpecificInput. 16780func (rrpsi ReverseReplicationProviderSpecificInput) AsInMageAzureV2ReprotectInput() (*InMageAzureV2ReprotectInput, bool) { 16781 return nil, false 16782} 16783 16784// AsInMageReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for ReverseReplicationProviderSpecificInput. 16785func (rrpsi ReverseReplicationProviderSpecificInput) AsInMageReprotectInput() (*InMageReprotectInput, bool) { 16786 return nil, false 16787} 16788 16789// AsA2AReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for ReverseReplicationProviderSpecificInput. 16790func (rrpsi ReverseReplicationProviderSpecificInput) AsA2AReprotectInput() (*A2AReprotectInput, bool) { 16791 return nil, false 16792} 16793 16794// AsReverseReplicationProviderSpecificInput is the BasicReverseReplicationProviderSpecificInput implementation for ReverseReplicationProviderSpecificInput. 16795func (rrpsi ReverseReplicationProviderSpecificInput) AsReverseReplicationProviderSpecificInput() (*ReverseReplicationProviderSpecificInput, bool) { 16796 return &rrpsi, true 16797} 16798 16799// AsBasicReverseReplicationProviderSpecificInput is the BasicReverseReplicationProviderSpecificInput implementation for ReverseReplicationProviderSpecificInput. 16800func (rrpsi ReverseReplicationProviderSpecificInput) AsBasicReverseReplicationProviderSpecificInput() (BasicReverseReplicationProviderSpecificInput, bool) { 16801 return &rrpsi, true 16802} 16803 16804// RoleAssignment azure role assignment details. 16805type RoleAssignment struct { 16806 // ID - The ARM Id of the role assignment. 16807 ID *string `json:"id,omitempty"` 16808 // Name - The name of the role assignment. 16809 Name *string `json:"name,omitempty"` 16810 // Scope - Role assignment scope. 16811 Scope *string `json:"scope,omitempty"` 16812 // PrincipalID - Principal Id. 16813 PrincipalID *string `json:"principalId,omitempty"` 16814 // RoleDefinitionID - Role definition id. 16815 RoleDefinitionID *string `json:"roleDefinitionId,omitempty"` 16816} 16817 16818// RunAsAccount CS Accounts Details. 16819type RunAsAccount struct { 16820 // AccountID - The CS RunAs account Id. 16821 AccountID *string `json:"accountId,omitempty"` 16822 // AccountName - The CS RunAs account name. 16823 AccountName *string `json:"accountName,omitempty"` 16824} 16825 16826// SanEnableProtectionInput san enable protection provider specific input. 16827type SanEnableProtectionInput struct { 16828 // InstanceType - Possible values include: 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeEnableProtectionProviderSpecificInput', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeSan', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeA2A' 16829 InstanceType InstanceTypeBasicEnableProtectionProviderSpecificInput `json:"instanceType,omitempty"` 16830} 16831 16832// MarshalJSON is the custom marshaler for SanEnableProtectionInput. 16833func (sepi SanEnableProtectionInput) MarshalJSON() ([]byte, error) { 16834 sepi.InstanceType = InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeSan 16835 objectMap := make(map[string]interface{}) 16836 if sepi.InstanceType != "" { 16837 objectMap["instanceType"] = sepi.InstanceType 16838 } 16839 return json.Marshal(objectMap) 16840} 16841 16842// AsHyperVReplicaAzureEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for SanEnableProtectionInput. 16843func (sepi SanEnableProtectionInput) AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool) { 16844 return nil, false 16845} 16846 16847// AsSanEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for SanEnableProtectionInput. 16848func (sepi SanEnableProtectionInput) AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool) { 16849 return &sepi, true 16850} 16851 16852// AsInMageAzureV2EnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for SanEnableProtectionInput. 16853func (sepi SanEnableProtectionInput) AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool) { 16854 return nil, false 16855} 16856 16857// AsInMageEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for SanEnableProtectionInput. 16858func (sepi SanEnableProtectionInput) AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool) { 16859 return nil, false 16860} 16861 16862// AsA2AEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for SanEnableProtectionInput. 16863func (sepi SanEnableProtectionInput) AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool) { 16864 return nil, false 16865} 16866 16867// AsEnableProtectionProviderSpecificInput is the BasicEnableProtectionProviderSpecificInput implementation for SanEnableProtectionInput. 16868func (sepi SanEnableProtectionInput) AsEnableProtectionProviderSpecificInput() (*EnableProtectionProviderSpecificInput, bool) { 16869 return nil, false 16870} 16871 16872// AsBasicEnableProtectionProviderSpecificInput is the BasicEnableProtectionProviderSpecificInput implementation for SanEnableProtectionInput. 16873func (sepi SanEnableProtectionInput) AsBasicEnableProtectionProviderSpecificInput() (BasicEnableProtectionProviderSpecificInput, bool) { 16874 return &sepi, true 16875} 16876 16877// ScriptActionTaskDetails this class represents the script action task details. 16878type ScriptActionTaskDetails struct { 16879 // Name - The name. 16880 Name *string `json:"name,omitempty"` 16881 // Path - The path. 16882 Path *string `json:"path,omitempty"` 16883 // Output - The output. 16884 Output *string `json:"output,omitempty"` 16885 // IsPrimarySideScript - A value indicating whether it is a primary side script or not. 16886 IsPrimarySideScript *bool `json:"isPrimarySideScript,omitempty"` 16887 // InstanceType - Possible values include: 'InstanceTypeTaskTypeDetails', 'InstanceTypeJobTaskDetails', 'InstanceTypeVirtualMachineTaskDetails', 'InstanceTypeFabricReplicationGroupTaskDetails', 'InstanceTypeManualActionTaskDetails', 'InstanceTypeScriptActionTaskDetails', 'InstanceTypeVMNicUpdatesTaskDetails', 'InstanceTypeConsistencyCheckTaskDetails', 'InstanceTypeAutomationRunbookTaskDetails' 16888 InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"` 16889} 16890 16891// MarshalJSON is the custom marshaler for ScriptActionTaskDetails. 16892func (satd ScriptActionTaskDetails) MarshalJSON() ([]byte, error) { 16893 satd.InstanceType = InstanceTypeScriptActionTaskDetails 16894 objectMap := make(map[string]interface{}) 16895 if satd.Name != nil { 16896 objectMap["name"] = satd.Name 16897 } 16898 if satd.Path != nil { 16899 objectMap["path"] = satd.Path 16900 } 16901 if satd.Output != nil { 16902 objectMap["output"] = satd.Output 16903 } 16904 if satd.IsPrimarySideScript != nil { 16905 objectMap["isPrimarySideScript"] = satd.IsPrimarySideScript 16906 } 16907 if satd.InstanceType != "" { 16908 objectMap["instanceType"] = satd.InstanceType 16909 } 16910 return json.Marshal(objectMap) 16911} 16912 16913// AsJobTaskDetails is the BasicTaskTypeDetails implementation for ScriptActionTaskDetails. 16914func (satd ScriptActionTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) { 16915 return nil, false 16916} 16917 16918// AsVirtualMachineTaskDetails is the BasicTaskTypeDetails implementation for ScriptActionTaskDetails. 16919func (satd ScriptActionTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) { 16920 return nil, false 16921} 16922 16923// AsFabricReplicationGroupTaskDetails is the BasicTaskTypeDetails implementation for ScriptActionTaskDetails. 16924func (satd ScriptActionTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) { 16925 return nil, false 16926} 16927 16928// AsManualActionTaskDetails is the BasicTaskTypeDetails implementation for ScriptActionTaskDetails. 16929func (satd ScriptActionTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) { 16930 return nil, false 16931} 16932 16933// AsScriptActionTaskDetails is the BasicTaskTypeDetails implementation for ScriptActionTaskDetails. 16934func (satd ScriptActionTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) { 16935 return &satd, true 16936} 16937 16938// AsVMNicUpdatesTaskDetails is the BasicTaskTypeDetails implementation for ScriptActionTaskDetails. 16939func (satd ScriptActionTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) { 16940 return nil, false 16941} 16942 16943// AsConsistencyCheckTaskDetails is the BasicTaskTypeDetails implementation for ScriptActionTaskDetails. 16944func (satd ScriptActionTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) { 16945 return nil, false 16946} 16947 16948// AsAutomationRunbookTaskDetails is the BasicTaskTypeDetails implementation for ScriptActionTaskDetails. 16949func (satd ScriptActionTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) { 16950 return nil, false 16951} 16952 16953// AsTaskTypeDetails is the BasicTaskTypeDetails implementation for ScriptActionTaskDetails. 16954func (satd ScriptActionTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) { 16955 return nil, false 16956} 16957 16958// AsBasicTaskTypeDetails is the BasicTaskTypeDetails implementation for ScriptActionTaskDetails. 16959func (satd ScriptActionTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) { 16960 return &satd, true 16961} 16962 16963// ServiceError ASR error model 16964type ServiceError struct { 16965 // Code - Error code. 16966 Code *string `json:"code,omitempty"` 16967 // Message - Error message. 16968 Message *string `json:"message,omitempty"` 16969 // PossibleCauses - Possible causes of error. 16970 PossibleCauses *string `json:"possibleCauses,omitempty"` 16971 // RecommendedAction - Recommended action to resolve error. 16972 RecommendedAction *string `json:"recommendedAction,omitempty"` 16973 // ActivityID - Activity Id. 16974 ActivityID *string `json:"activityId,omitempty"` 16975} 16976 16977// StorageClassification storage object definition. 16978type StorageClassification struct { 16979 autorest.Response `json:"-"` 16980 // Properties - Properties of the storage object. 16981 Properties *StorageClassificationProperties `json:"properties,omitempty"` 16982 // ID - READ-ONLY; Resource Id 16983 ID *string `json:"id,omitempty"` 16984 // Name - READ-ONLY; Resource Name 16985 Name *string `json:"name,omitempty"` 16986 // Type - READ-ONLY; Resource Type 16987 Type *string `json:"type,omitempty"` 16988 // Location - Resource Location 16989 Location *string `json:"location,omitempty"` 16990} 16991 16992// MarshalJSON is the custom marshaler for StorageClassification. 16993func (sc StorageClassification) MarshalJSON() ([]byte, error) { 16994 objectMap := make(map[string]interface{}) 16995 if sc.Properties != nil { 16996 objectMap["properties"] = sc.Properties 16997 } 16998 if sc.Location != nil { 16999 objectMap["location"] = sc.Location 17000 } 17001 return json.Marshal(objectMap) 17002} 17003 17004// StorageClassificationCollection collection of storage details. 17005type StorageClassificationCollection struct { 17006 autorest.Response `json:"-"` 17007 // Value - The storage details. 17008 Value *[]StorageClassification `json:"value,omitempty"` 17009 // NextLink - The value of next link. 17010 NextLink *string `json:"nextLink,omitempty"` 17011} 17012 17013// StorageClassificationCollectionIterator provides access to a complete listing of StorageClassification 17014// values. 17015type StorageClassificationCollectionIterator struct { 17016 i int 17017 page StorageClassificationCollectionPage 17018} 17019 17020// NextWithContext advances to the next value. If there was an error making 17021// the request the iterator does not advance and the error is returned. 17022func (iter *StorageClassificationCollectionIterator) NextWithContext(ctx context.Context) (err error) { 17023 if tracing.IsEnabled() { 17024 ctx = tracing.StartSpan(ctx, fqdn+"/StorageClassificationCollectionIterator.NextWithContext") 17025 defer func() { 17026 sc := -1 17027 if iter.Response().Response.Response != nil { 17028 sc = iter.Response().Response.Response.StatusCode 17029 } 17030 tracing.EndSpan(ctx, sc, err) 17031 }() 17032 } 17033 iter.i++ 17034 if iter.i < len(iter.page.Values()) { 17035 return nil 17036 } 17037 err = iter.page.NextWithContext(ctx) 17038 if err != nil { 17039 iter.i-- 17040 return err 17041 } 17042 iter.i = 0 17043 return nil 17044} 17045 17046// Next advances to the next value. If there was an error making 17047// the request the iterator does not advance and the error is returned. 17048// Deprecated: Use NextWithContext() instead. 17049func (iter *StorageClassificationCollectionIterator) Next() error { 17050 return iter.NextWithContext(context.Background()) 17051} 17052 17053// NotDone returns true if the enumeration should be started or is not yet complete. 17054func (iter StorageClassificationCollectionIterator) NotDone() bool { 17055 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 17056} 17057 17058// Response returns the raw server response from the last page request. 17059func (iter StorageClassificationCollectionIterator) Response() StorageClassificationCollection { 17060 return iter.page.Response() 17061} 17062 17063// Value returns the current value or a zero-initialized value if the 17064// iterator has advanced beyond the end of the collection. 17065func (iter StorageClassificationCollectionIterator) Value() StorageClassification { 17066 if !iter.page.NotDone() { 17067 return StorageClassification{} 17068 } 17069 return iter.page.Values()[iter.i] 17070} 17071 17072// Creates a new instance of the StorageClassificationCollectionIterator type. 17073func NewStorageClassificationCollectionIterator(page StorageClassificationCollectionPage) StorageClassificationCollectionIterator { 17074 return StorageClassificationCollectionIterator{page: page} 17075} 17076 17077// IsEmpty returns true if the ListResult contains no values. 17078func (scc StorageClassificationCollection) IsEmpty() bool { 17079 return scc.Value == nil || len(*scc.Value) == 0 17080} 17081 17082// hasNextLink returns true if the NextLink is not empty. 17083func (scc StorageClassificationCollection) hasNextLink() bool { 17084 return scc.NextLink != nil && len(*scc.NextLink) != 0 17085} 17086 17087// storageClassificationCollectionPreparer prepares a request to retrieve the next set of results. 17088// It returns nil if no more results exist. 17089func (scc StorageClassificationCollection) storageClassificationCollectionPreparer(ctx context.Context) (*http.Request, error) { 17090 if !scc.hasNextLink() { 17091 return nil, nil 17092 } 17093 return autorest.Prepare((&http.Request{}).WithContext(ctx), 17094 autorest.AsJSON(), 17095 autorest.AsGet(), 17096 autorest.WithBaseURL(to.String(scc.NextLink))) 17097} 17098 17099// StorageClassificationCollectionPage contains a page of StorageClassification values. 17100type StorageClassificationCollectionPage struct { 17101 fn func(context.Context, StorageClassificationCollection) (StorageClassificationCollection, error) 17102 scc StorageClassificationCollection 17103} 17104 17105// NextWithContext advances to the next page of values. If there was an error making 17106// the request the page does not advance and the error is returned. 17107func (page *StorageClassificationCollectionPage) NextWithContext(ctx context.Context) (err error) { 17108 if tracing.IsEnabled() { 17109 ctx = tracing.StartSpan(ctx, fqdn+"/StorageClassificationCollectionPage.NextWithContext") 17110 defer func() { 17111 sc := -1 17112 if page.Response().Response.Response != nil { 17113 sc = page.Response().Response.Response.StatusCode 17114 } 17115 tracing.EndSpan(ctx, sc, err) 17116 }() 17117 } 17118 for { 17119 next, err := page.fn(ctx, page.scc) 17120 if err != nil { 17121 return err 17122 } 17123 page.scc = next 17124 if !next.hasNextLink() || !next.IsEmpty() { 17125 break 17126 } 17127 } 17128 return nil 17129} 17130 17131// Next advances to the next page of values. If there was an error making 17132// the request the page does not advance and the error is returned. 17133// Deprecated: Use NextWithContext() instead. 17134func (page *StorageClassificationCollectionPage) Next() error { 17135 return page.NextWithContext(context.Background()) 17136} 17137 17138// NotDone returns true if the page enumeration should be started or is not yet complete. 17139func (page StorageClassificationCollectionPage) NotDone() bool { 17140 return !page.scc.IsEmpty() 17141} 17142 17143// Response returns the raw server response from the last page request. 17144func (page StorageClassificationCollectionPage) Response() StorageClassificationCollection { 17145 return page.scc 17146} 17147 17148// Values returns the slice of values for the current page or nil if there are no values. 17149func (page StorageClassificationCollectionPage) Values() []StorageClassification { 17150 if page.scc.IsEmpty() { 17151 return nil 17152 } 17153 return *page.scc.Value 17154} 17155 17156// Creates a new instance of the StorageClassificationCollectionPage type. 17157func NewStorageClassificationCollectionPage(cur StorageClassificationCollection, getNextPage func(context.Context, StorageClassificationCollection) (StorageClassificationCollection, error)) StorageClassificationCollectionPage { 17158 return StorageClassificationCollectionPage{ 17159 fn: getNextPage, 17160 scc: cur, 17161 } 17162} 17163 17164// StorageClassificationMapping storage mapping object. 17165type StorageClassificationMapping struct { 17166 autorest.Response `json:"-"` 17167 // Properties - Properties of the storage mapping object. 17168 Properties *StorageClassificationMappingProperties `json:"properties,omitempty"` 17169 // ID - READ-ONLY; Resource Id 17170 ID *string `json:"id,omitempty"` 17171 // Name - READ-ONLY; Resource Name 17172 Name *string `json:"name,omitempty"` 17173 // Type - READ-ONLY; Resource Type 17174 Type *string `json:"type,omitempty"` 17175 // Location - Resource Location 17176 Location *string `json:"location,omitempty"` 17177} 17178 17179// MarshalJSON is the custom marshaler for StorageClassificationMapping. 17180func (scm StorageClassificationMapping) MarshalJSON() ([]byte, error) { 17181 objectMap := make(map[string]interface{}) 17182 if scm.Properties != nil { 17183 objectMap["properties"] = scm.Properties 17184 } 17185 if scm.Location != nil { 17186 objectMap["location"] = scm.Location 17187 } 17188 return json.Marshal(objectMap) 17189} 17190 17191// StorageClassificationMappingCollection collection of storage mapping details. 17192type StorageClassificationMappingCollection struct { 17193 autorest.Response `json:"-"` 17194 // Value - The storage details. 17195 Value *[]StorageClassificationMapping `json:"value,omitempty"` 17196 // NextLink - The value of next link. 17197 NextLink *string `json:"nextLink,omitempty"` 17198} 17199 17200// StorageClassificationMappingCollectionIterator provides access to a complete listing of 17201// StorageClassificationMapping values. 17202type StorageClassificationMappingCollectionIterator struct { 17203 i int 17204 page StorageClassificationMappingCollectionPage 17205} 17206 17207// NextWithContext advances to the next value. If there was an error making 17208// the request the iterator does not advance and the error is returned. 17209func (iter *StorageClassificationMappingCollectionIterator) NextWithContext(ctx context.Context) (err error) { 17210 if tracing.IsEnabled() { 17211 ctx = tracing.StartSpan(ctx, fqdn+"/StorageClassificationMappingCollectionIterator.NextWithContext") 17212 defer func() { 17213 sc := -1 17214 if iter.Response().Response.Response != nil { 17215 sc = iter.Response().Response.Response.StatusCode 17216 } 17217 tracing.EndSpan(ctx, sc, err) 17218 }() 17219 } 17220 iter.i++ 17221 if iter.i < len(iter.page.Values()) { 17222 return nil 17223 } 17224 err = iter.page.NextWithContext(ctx) 17225 if err != nil { 17226 iter.i-- 17227 return err 17228 } 17229 iter.i = 0 17230 return nil 17231} 17232 17233// Next advances to the next value. If there was an error making 17234// the request the iterator does not advance and the error is returned. 17235// Deprecated: Use NextWithContext() instead. 17236func (iter *StorageClassificationMappingCollectionIterator) Next() error { 17237 return iter.NextWithContext(context.Background()) 17238} 17239 17240// NotDone returns true if the enumeration should be started or is not yet complete. 17241func (iter StorageClassificationMappingCollectionIterator) NotDone() bool { 17242 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 17243} 17244 17245// Response returns the raw server response from the last page request. 17246func (iter StorageClassificationMappingCollectionIterator) Response() StorageClassificationMappingCollection { 17247 return iter.page.Response() 17248} 17249 17250// Value returns the current value or a zero-initialized value if the 17251// iterator has advanced beyond the end of the collection. 17252func (iter StorageClassificationMappingCollectionIterator) Value() StorageClassificationMapping { 17253 if !iter.page.NotDone() { 17254 return StorageClassificationMapping{} 17255 } 17256 return iter.page.Values()[iter.i] 17257} 17258 17259// Creates a new instance of the StorageClassificationMappingCollectionIterator type. 17260func NewStorageClassificationMappingCollectionIterator(page StorageClassificationMappingCollectionPage) StorageClassificationMappingCollectionIterator { 17261 return StorageClassificationMappingCollectionIterator{page: page} 17262} 17263 17264// IsEmpty returns true if the ListResult contains no values. 17265func (scmc StorageClassificationMappingCollection) IsEmpty() bool { 17266 return scmc.Value == nil || len(*scmc.Value) == 0 17267} 17268 17269// hasNextLink returns true if the NextLink is not empty. 17270func (scmc StorageClassificationMappingCollection) hasNextLink() bool { 17271 return scmc.NextLink != nil && len(*scmc.NextLink) != 0 17272} 17273 17274// storageClassificationMappingCollectionPreparer prepares a request to retrieve the next set of results. 17275// It returns nil if no more results exist. 17276func (scmc StorageClassificationMappingCollection) storageClassificationMappingCollectionPreparer(ctx context.Context) (*http.Request, error) { 17277 if !scmc.hasNextLink() { 17278 return nil, nil 17279 } 17280 return autorest.Prepare((&http.Request{}).WithContext(ctx), 17281 autorest.AsJSON(), 17282 autorest.AsGet(), 17283 autorest.WithBaseURL(to.String(scmc.NextLink))) 17284} 17285 17286// StorageClassificationMappingCollectionPage contains a page of StorageClassificationMapping values. 17287type StorageClassificationMappingCollectionPage struct { 17288 fn func(context.Context, StorageClassificationMappingCollection) (StorageClassificationMappingCollection, error) 17289 scmc StorageClassificationMappingCollection 17290} 17291 17292// NextWithContext advances to the next page of values. If there was an error making 17293// the request the page does not advance and the error is returned. 17294func (page *StorageClassificationMappingCollectionPage) NextWithContext(ctx context.Context) (err error) { 17295 if tracing.IsEnabled() { 17296 ctx = tracing.StartSpan(ctx, fqdn+"/StorageClassificationMappingCollectionPage.NextWithContext") 17297 defer func() { 17298 sc := -1 17299 if page.Response().Response.Response != nil { 17300 sc = page.Response().Response.Response.StatusCode 17301 } 17302 tracing.EndSpan(ctx, sc, err) 17303 }() 17304 } 17305 for { 17306 next, err := page.fn(ctx, page.scmc) 17307 if err != nil { 17308 return err 17309 } 17310 page.scmc = next 17311 if !next.hasNextLink() || !next.IsEmpty() { 17312 break 17313 } 17314 } 17315 return nil 17316} 17317 17318// Next advances to the next page of values. If there was an error making 17319// the request the page does not advance and the error is returned. 17320// Deprecated: Use NextWithContext() instead. 17321func (page *StorageClassificationMappingCollectionPage) Next() error { 17322 return page.NextWithContext(context.Background()) 17323} 17324 17325// NotDone returns true if the page enumeration should be started or is not yet complete. 17326func (page StorageClassificationMappingCollectionPage) NotDone() bool { 17327 return !page.scmc.IsEmpty() 17328} 17329 17330// Response returns the raw server response from the last page request. 17331func (page StorageClassificationMappingCollectionPage) Response() StorageClassificationMappingCollection { 17332 return page.scmc 17333} 17334 17335// Values returns the slice of values for the current page or nil if there are no values. 17336func (page StorageClassificationMappingCollectionPage) Values() []StorageClassificationMapping { 17337 if page.scmc.IsEmpty() { 17338 return nil 17339 } 17340 return *page.scmc.Value 17341} 17342 17343// Creates a new instance of the StorageClassificationMappingCollectionPage type. 17344func NewStorageClassificationMappingCollectionPage(cur StorageClassificationMappingCollection, getNextPage func(context.Context, StorageClassificationMappingCollection) (StorageClassificationMappingCollection, error)) StorageClassificationMappingCollectionPage { 17345 return StorageClassificationMappingCollectionPage{ 17346 fn: getNextPage, 17347 scmc: cur, 17348 } 17349} 17350 17351// StorageClassificationMappingInput storage mapping input. 17352type StorageClassificationMappingInput struct { 17353 // Properties - Storage mapping input properties. 17354 Properties *StorageMappingInputProperties `json:"properties,omitempty"` 17355} 17356 17357// StorageClassificationMappingProperties storage mapping properties. 17358type StorageClassificationMappingProperties struct { 17359 // TargetStorageClassificationID - Target storage object Id. 17360 TargetStorageClassificationID *string `json:"targetStorageClassificationId,omitempty"` 17361} 17362 17363// StorageClassificationProperties storage object properties. 17364type StorageClassificationProperties struct { 17365 // FriendlyName - Friendly name of the Storage classification. 17366 FriendlyName *string `json:"friendlyName,omitempty"` 17367} 17368 17369// StorageMappingInputProperties storage mapping input properties. 17370type StorageMappingInputProperties struct { 17371 // TargetStorageClassificationID - The ID of the storage object. 17372 TargetStorageClassificationID *string `json:"targetStorageClassificationId,omitempty"` 17373} 17374 17375// Subnet subnets of the network. 17376type Subnet struct { 17377 // Name - The subnet name. 17378 Name *string `json:"name,omitempty"` 17379 // FriendlyName - The subnet friendly name. 17380 FriendlyName *string `json:"friendlyName,omitempty"` 17381 // AddressList - The list of addresses for the subnet. 17382 AddressList *[]string `json:"addressList,omitempty"` 17383} 17384 17385// SwitchProtectionInput switch protection input. 17386type SwitchProtectionInput struct { 17387 // Properties - Switch protection properties 17388 Properties *SwitchProtectionInputProperties `json:"properties,omitempty"` 17389} 17390 17391// SwitchProtectionInputProperties switch protection input properties. 17392type SwitchProtectionInputProperties struct { 17393 // ReplicationProtectedItemName - The unique replication protected item name. 17394 ReplicationProtectedItemName *string `json:"replicationProtectedItemName,omitempty"` 17395 // ProviderSpecificDetails - Provider specific switch protection input. 17396 ProviderSpecificDetails BasicSwitchProtectionProviderSpecificInput `json:"providerSpecificDetails,omitempty"` 17397} 17398 17399// UnmarshalJSON is the custom unmarshaler for SwitchProtectionInputProperties struct. 17400func (spip *SwitchProtectionInputProperties) UnmarshalJSON(body []byte) error { 17401 var m map[string]*json.RawMessage 17402 err := json.Unmarshal(body, &m) 17403 if err != nil { 17404 return err 17405 } 17406 for k, v := range m { 17407 switch k { 17408 case "replicationProtectedItemName": 17409 if v != nil { 17410 var replicationProtectedItemName string 17411 err = json.Unmarshal(*v, &replicationProtectedItemName) 17412 if err != nil { 17413 return err 17414 } 17415 spip.ReplicationProtectedItemName = &replicationProtectedItemName 17416 } 17417 case "providerSpecificDetails": 17418 if v != nil { 17419 providerSpecificDetails, err := unmarshalBasicSwitchProtectionProviderSpecificInput(*v) 17420 if err != nil { 17421 return err 17422 } 17423 spip.ProviderSpecificDetails = providerSpecificDetails 17424 } 17425 } 17426 } 17427 17428 return nil 17429} 17430 17431// SwitchProtectionJobDetails this class represents details for switch protection job. 17432type SwitchProtectionJobDetails struct { 17433 // NewReplicationProtectedItemID - ARM Id of the new replication protected item. 17434 NewReplicationProtectedItemID *string `json:"newReplicationProtectedItemId,omitempty"` 17435 // AffectedObjectDetails - The affected object properties like source server, source cloud, target server, target cloud etc. based on the workflow object details. 17436 AffectedObjectDetails map[string]*string `json:"affectedObjectDetails"` 17437 // InstanceType - Possible values include: 'InstanceTypeJobDetails', 'InstanceTypeAsrJobDetails', 'InstanceTypeTestFailoverJobDetails', 'InstanceTypeFailoverJobDetails', 'InstanceTypeExportJobDetails', 'InstanceTypeSwitchProtectionJobDetails' 17438 InstanceType InstanceTypeBasicJobDetails `json:"instanceType,omitempty"` 17439} 17440 17441// MarshalJSON is the custom marshaler for SwitchProtectionJobDetails. 17442func (spjd SwitchProtectionJobDetails) MarshalJSON() ([]byte, error) { 17443 spjd.InstanceType = InstanceTypeSwitchProtectionJobDetails 17444 objectMap := make(map[string]interface{}) 17445 if spjd.NewReplicationProtectedItemID != nil { 17446 objectMap["newReplicationProtectedItemId"] = spjd.NewReplicationProtectedItemID 17447 } 17448 if spjd.AffectedObjectDetails != nil { 17449 objectMap["affectedObjectDetails"] = spjd.AffectedObjectDetails 17450 } 17451 if spjd.InstanceType != "" { 17452 objectMap["instanceType"] = spjd.InstanceType 17453 } 17454 return json.Marshal(objectMap) 17455} 17456 17457// AsAsrJobDetails is the BasicJobDetails implementation for SwitchProtectionJobDetails. 17458func (spjd SwitchProtectionJobDetails) AsAsrJobDetails() (*AsrJobDetails, bool) { 17459 return nil, false 17460} 17461 17462// AsTestFailoverJobDetails is the BasicJobDetails implementation for SwitchProtectionJobDetails. 17463func (spjd SwitchProtectionJobDetails) AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool) { 17464 return nil, false 17465} 17466 17467// AsFailoverJobDetails is the BasicJobDetails implementation for SwitchProtectionJobDetails. 17468func (spjd SwitchProtectionJobDetails) AsFailoverJobDetails() (*FailoverJobDetails, bool) { 17469 return nil, false 17470} 17471 17472// AsExportJobDetails is the BasicJobDetails implementation for SwitchProtectionJobDetails. 17473func (spjd SwitchProtectionJobDetails) AsExportJobDetails() (*ExportJobDetails, bool) { 17474 return nil, false 17475} 17476 17477// AsSwitchProtectionJobDetails is the BasicJobDetails implementation for SwitchProtectionJobDetails. 17478func (spjd SwitchProtectionJobDetails) AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool) { 17479 return &spjd, true 17480} 17481 17482// AsJobDetails is the BasicJobDetails implementation for SwitchProtectionJobDetails. 17483func (spjd SwitchProtectionJobDetails) AsJobDetails() (*JobDetails, bool) { 17484 return nil, false 17485} 17486 17487// AsBasicJobDetails is the BasicJobDetails implementation for SwitchProtectionJobDetails. 17488func (spjd SwitchProtectionJobDetails) AsBasicJobDetails() (BasicJobDetails, bool) { 17489 return &spjd, true 17490} 17491 17492// BasicSwitchProtectionProviderSpecificInput provider specific switch protection input. 17493type BasicSwitchProtectionProviderSpecificInput interface { 17494 AsA2ASwitchProtectionInput() (*A2ASwitchProtectionInput, bool) 17495 AsSwitchProtectionProviderSpecificInput() (*SwitchProtectionProviderSpecificInput, bool) 17496} 17497 17498// SwitchProtectionProviderSpecificInput provider specific switch protection input. 17499type SwitchProtectionProviderSpecificInput struct { 17500 // InstanceType - Possible values include: 'InstanceTypeBasicSwitchProtectionProviderSpecificInputInstanceTypeSwitchProtectionProviderSpecificInput', 'InstanceTypeBasicSwitchProtectionProviderSpecificInputInstanceTypeA2A' 17501 InstanceType InstanceTypeBasicSwitchProtectionProviderSpecificInput `json:"instanceType,omitempty"` 17502} 17503 17504func unmarshalBasicSwitchProtectionProviderSpecificInput(body []byte) (BasicSwitchProtectionProviderSpecificInput, error) { 17505 var m map[string]interface{} 17506 err := json.Unmarshal(body, &m) 17507 if err != nil { 17508 return nil, err 17509 } 17510 17511 switch m["instanceType"] { 17512 case string(InstanceTypeBasicSwitchProtectionProviderSpecificInputInstanceTypeA2A): 17513 var aspi A2ASwitchProtectionInput 17514 err := json.Unmarshal(body, &aspi) 17515 return aspi, err 17516 default: 17517 var sppsi SwitchProtectionProviderSpecificInput 17518 err := json.Unmarshal(body, &sppsi) 17519 return sppsi, err 17520 } 17521} 17522func unmarshalBasicSwitchProtectionProviderSpecificInputArray(body []byte) ([]BasicSwitchProtectionProviderSpecificInput, error) { 17523 var rawMessages []*json.RawMessage 17524 err := json.Unmarshal(body, &rawMessages) 17525 if err != nil { 17526 return nil, err 17527 } 17528 17529 sppsiArray := make([]BasicSwitchProtectionProviderSpecificInput, len(rawMessages)) 17530 17531 for index, rawMessage := range rawMessages { 17532 sppsi, err := unmarshalBasicSwitchProtectionProviderSpecificInput(*rawMessage) 17533 if err != nil { 17534 return nil, err 17535 } 17536 sppsiArray[index] = sppsi 17537 } 17538 return sppsiArray, nil 17539} 17540 17541// MarshalJSON is the custom marshaler for SwitchProtectionProviderSpecificInput. 17542func (sppsi SwitchProtectionProviderSpecificInput) MarshalJSON() ([]byte, error) { 17543 sppsi.InstanceType = InstanceTypeBasicSwitchProtectionProviderSpecificInputInstanceTypeSwitchProtectionProviderSpecificInput 17544 objectMap := make(map[string]interface{}) 17545 if sppsi.InstanceType != "" { 17546 objectMap["instanceType"] = sppsi.InstanceType 17547 } 17548 return json.Marshal(objectMap) 17549} 17550 17551// AsA2ASwitchProtectionInput is the BasicSwitchProtectionProviderSpecificInput implementation for SwitchProtectionProviderSpecificInput. 17552func (sppsi SwitchProtectionProviderSpecificInput) AsA2ASwitchProtectionInput() (*A2ASwitchProtectionInput, bool) { 17553 return nil, false 17554} 17555 17556// AsSwitchProtectionProviderSpecificInput is the BasicSwitchProtectionProviderSpecificInput implementation for SwitchProtectionProviderSpecificInput. 17557func (sppsi SwitchProtectionProviderSpecificInput) AsSwitchProtectionProviderSpecificInput() (*SwitchProtectionProviderSpecificInput, bool) { 17558 return &sppsi, true 17559} 17560 17561// AsBasicSwitchProtectionProviderSpecificInput is the BasicSwitchProtectionProviderSpecificInput implementation for SwitchProtectionProviderSpecificInput. 17562func (sppsi SwitchProtectionProviderSpecificInput) AsBasicSwitchProtectionProviderSpecificInput() (BasicSwitchProtectionProviderSpecificInput, bool) { 17563 return &sppsi, true 17564} 17565 17566// BasicTaskTypeDetails task details based on specific task type. 17567type BasicTaskTypeDetails interface { 17568 AsJobTaskDetails() (*JobTaskDetails, bool) 17569 AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) 17570 AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) 17571 AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) 17572 AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) 17573 AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) 17574 AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) 17575 AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) 17576 AsTaskTypeDetails() (*TaskTypeDetails, bool) 17577} 17578 17579// TaskTypeDetails task details based on specific task type. 17580type TaskTypeDetails struct { 17581 // InstanceType - Possible values include: 'InstanceTypeTaskTypeDetails', 'InstanceTypeJobTaskDetails', 'InstanceTypeVirtualMachineTaskDetails', 'InstanceTypeFabricReplicationGroupTaskDetails', 'InstanceTypeManualActionTaskDetails', 'InstanceTypeScriptActionTaskDetails', 'InstanceTypeVMNicUpdatesTaskDetails', 'InstanceTypeConsistencyCheckTaskDetails', 'InstanceTypeAutomationRunbookTaskDetails' 17582 InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"` 17583} 17584 17585func unmarshalBasicTaskTypeDetails(body []byte) (BasicTaskTypeDetails, error) { 17586 var m map[string]interface{} 17587 err := json.Unmarshal(body, &m) 17588 if err != nil { 17589 return nil, err 17590 } 17591 17592 switch m["instanceType"] { 17593 case string(InstanceTypeJobTaskDetails): 17594 var jtd JobTaskDetails 17595 err := json.Unmarshal(body, &jtd) 17596 return jtd, err 17597 case string(InstanceTypeVirtualMachineTaskDetails): 17598 var vmtd VirtualMachineTaskDetails 17599 err := json.Unmarshal(body, &vmtd) 17600 return vmtd, err 17601 case string(InstanceTypeFabricReplicationGroupTaskDetails): 17602 var frgtd FabricReplicationGroupTaskDetails 17603 err := json.Unmarshal(body, &frgtd) 17604 return frgtd, err 17605 case string(InstanceTypeManualActionTaskDetails): 17606 var matd ManualActionTaskDetails 17607 err := json.Unmarshal(body, &matd) 17608 return matd, err 17609 case string(InstanceTypeScriptActionTaskDetails): 17610 var satd ScriptActionTaskDetails 17611 err := json.Unmarshal(body, &satd) 17612 return satd, err 17613 case string(InstanceTypeVMNicUpdatesTaskDetails): 17614 var vnutd VMNicUpdatesTaskDetails 17615 err := json.Unmarshal(body, &vnutd) 17616 return vnutd, err 17617 case string(InstanceTypeConsistencyCheckTaskDetails): 17618 var cctd ConsistencyCheckTaskDetails 17619 err := json.Unmarshal(body, &cctd) 17620 return cctd, err 17621 case string(InstanceTypeAutomationRunbookTaskDetails): 17622 var artd AutomationRunbookTaskDetails 17623 err := json.Unmarshal(body, &artd) 17624 return artd, err 17625 default: 17626 var ttd TaskTypeDetails 17627 err := json.Unmarshal(body, &ttd) 17628 return ttd, err 17629 } 17630} 17631func unmarshalBasicTaskTypeDetailsArray(body []byte) ([]BasicTaskTypeDetails, error) { 17632 var rawMessages []*json.RawMessage 17633 err := json.Unmarshal(body, &rawMessages) 17634 if err != nil { 17635 return nil, err 17636 } 17637 17638 ttdArray := make([]BasicTaskTypeDetails, len(rawMessages)) 17639 17640 for index, rawMessage := range rawMessages { 17641 ttd, err := unmarshalBasicTaskTypeDetails(*rawMessage) 17642 if err != nil { 17643 return nil, err 17644 } 17645 ttdArray[index] = ttd 17646 } 17647 return ttdArray, nil 17648} 17649 17650// MarshalJSON is the custom marshaler for TaskTypeDetails. 17651func (ttd TaskTypeDetails) MarshalJSON() ([]byte, error) { 17652 ttd.InstanceType = InstanceTypeTaskTypeDetails 17653 objectMap := make(map[string]interface{}) 17654 if ttd.InstanceType != "" { 17655 objectMap["instanceType"] = ttd.InstanceType 17656 } 17657 return json.Marshal(objectMap) 17658} 17659 17660// AsJobTaskDetails is the BasicTaskTypeDetails implementation for TaskTypeDetails. 17661func (ttd TaskTypeDetails) AsJobTaskDetails() (*JobTaskDetails, bool) { 17662 return nil, false 17663} 17664 17665// AsVirtualMachineTaskDetails is the BasicTaskTypeDetails implementation for TaskTypeDetails. 17666func (ttd TaskTypeDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) { 17667 return nil, false 17668} 17669 17670// AsFabricReplicationGroupTaskDetails is the BasicTaskTypeDetails implementation for TaskTypeDetails. 17671func (ttd TaskTypeDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) { 17672 return nil, false 17673} 17674 17675// AsManualActionTaskDetails is the BasicTaskTypeDetails implementation for TaskTypeDetails. 17676func (ttd TaskTypeDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) { 17677 return nil, false 17678} 17679 17680// AsScriptActionTaskDetails is the BasicTaskTypeDetails implementation for TaskTypeDetails. 17681func (ttd TaskTypeDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) { 17682 return nil, false 17683} 17684 17685// AsVMNicUpdatesTaskDetails is the BasicTaskTypeDetails implementation for TaskTypeDetails. 17686func (ttd TaskTypeDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) { 17687 return nil, false 17688} 17689 17690// AsConsistencyCheckTaskDetails is the BasicTaskTypeDetails implementation for TaskTypeDetails. 17691func (ttd TaskTypeDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) { 17692 return nil, false 17693} 17694 17695// AsAutomationRunbookTaskDetails is the BasicTaskTypeDetails implementation for TaskTypeDetails. 17696func (ttd TaskTypeDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) { 17697 return nil, false 17698} 17699 17700// AsTaskTypeDetails is the BasicTaskTypeDetails implementation for TaskTypeDetails. 17701func (ttd TaskTypeDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) { 17702 return &ttd, true 17703} 17704 17705// AsBasicTaskTypeDetails is the BasicTaskTypeDetails implementation for TaskTypeDetails. 17706func (ttd TaskTypeDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) { 17707 return &ttd, true 17708} 17709 17710// TestFailoverCleanupInput input definition for test failover cleanup. 17711type TestFailoverCleanupInput struct { 17712 // Properties - Test failover cleanup input properties. 17713 Properties *TestFailoverCleanupInputProperties `json:"properties,omitempty"` 17714} 17715 17716// TestFailoverCleanupInputProperties input definition for test failover cleanup input properties. 17717type TestFailoverCleanupInputProperties struct { 17718 // Comments - Test failover cleanup comments. 17719 Comments *string `json:"comments,omitempty"` 17720} 17721 17722// TestFailoverInput input definition for planned failover. 17723type TestFailoverInput struct { 17724 // Properties - Planned failover input properties 17725 Properties *TestFailoverInputProperties `json:"properties,omitempty"` 17726} 17727 17728// TestFailoverInputProperties input definition for planned failover input properties. 17729type TestFailoverInputProperties struct { 17730 // FailoverDirection - Failover direction. 17731 FailoverDirection *string `json:"failoverDirection,omitempty"` 17732 // NetworkType - Network type to be used for test failover. 17733 NetworkType *string `json:"networkType,omitempty"` 17734 // NetworkID - The id of the network to be used for test failover 17735 NetworkID *string `json:"networkId,omitempty"` 17736 // SkipTestFailoverCleanup - A value indicating whether the test failover cleanup is to be skipped. 17737 SkipTestFailoverCleanup *string `json:"skipTestFailoverCleanup,omitempty"` 17738 // ProviderSpecificDetails - Provider specific settings 17739 ProviderSpecificDetails BasicProviderSpecificFailoverInput `json:"providerSpecificDetails,omitempty"` 17740} 17741 17742// UnmarshalJSON is the custom unmarshaler for TestFailoverInputProperties struct. 17743func (tfip *TestFailoverInputProperties) UnmarshalJSON(body []byte) error { 17744 var m map[string]*json.RawMessage 17745 err := json.Unmarshal(body, &m) 17746 if err != nil { 17747 return err 17748 } 17749 for k, v := range m { 17750 switch k { 17751 case "failoverDirection": 17752 if v != nil { 17753 var failoverDirection string 17754 err = json.Unmarshal(*v, &failoverDirection) 17755 if err != nil { 17756 return err 17757 } 17758 tfip.FailoverDirection = &failoverDirection 17759 } 17760 case "networkType": 17761 if v != nil { 17762 var networkType string 17763 err = json.Unmarshal(*v, &networkType) 17764 if err != nil { 17765 return err 17766 } 17767 tfip.NetworkType = &networkType 17768 } 17769 case "networkId": 17770 if v != nil { 17771 var networkID string 17772 err = json.Unmarshal(*v, &networkID) 17773 if err != nil { 17774 return err 17775 } 17776 tfip.NetworkID = &networkID 17777 } 17778 case "skipTestFailoverCleanup": 17779 if v != nil { 17780 var skipTestFailoverCleanup string 17781 err = json.Unmarshal(*v, &skipTestFailoverCleanup) 17782 if err != nil { 17783 return err 17784 } 17785 tfip.SkipTestFailoverCleanup = &skipTestFailoverCleanup 17786 } 17787 case "providerSpecificDetails": 17788 if v != nil { 17789 providerSpecificDetails, err := unmarshalBasicProviderSpecificFailoverInput(*v) 17790 if err != nil { 17791 return err 17792 } 17793 tfip.ProviderSpecificDetails = providerSpecificDetails 17794 } 17795 } 17796 } 17797 17798 return nil 17799} 17800 17801// TestFailoverJobDetails this class represents the details for a test failover job. 17802type TestFailoverJobDetails struct { 17803 // TestFailoverStatus - The test failover status. 17804 TestFailoverStatus *string `json:"testFailoverStatus,omitempty"` 17805 // Comments - The test failover comments. 17806 Comments *string `json:"comments,omitempty"` 17807 // NetworkName - The test network name. 17808 NetworkName *string `json:"networkName,omitempty"` 17809 // NetworkFriendlyName - The test network friendly name. 17810 NetworkFriendlyName *string `json:"networkFriendlyName,omitempty"` 17811 // NetworkType - The test network type (see TestFailoverInput enum for possible values). 17812 NetworkType *string `json:"networkType,omitempty"` 17813 // ProtectedItemDetails - The test VM details. 17814 ProtectedItemDetails *[]FailoverReplicationProtectedItemDetails `json:"protectedItemDetails,omitempty"` 17815 // AffectedObjectDetails - The affected object properties like source server, source cloud, target server, target cloud etc. based on the workflow object details. 17816 AffectedObjectDetails map[string]*string `json:"affectedObjectDetails"` 17817 // InstanceType - Possible values include: 'InstanceTypeJobDetails', 'InstanceTypeAsrJobDetails', 'InstanceTypeTestFailoverJobDetails', 'InstanceTypeFailoverJobDetails', 'InstanceTypeExportJobDetails', 'InstanceTypeSwitchProtectionJobDetails' 17818 InstanceType InstanceTypeBasicJobDetails `json:"instanceType,omitempty"` 17819} 17820 17821// MarshalJSON is the custom marshaler for TestFailoverJobDetails. 17822func (tfjd TestFailoverJobDetails) MarshalJSON() ([]byte, error) { 17823 tfjd.InstanceType = InstanceTypeTestFailoverJobDetails 17824 objectMap := make(map[string]interface{}) 17825 if tfjd.TestFailoverStatus != nil { 17826 objectMap["testFailoverStatus"] = tfjd.TestFailoverStatus 17827 } 17828 if tfjd.Comments != nil { 17829 objectMap["comments"] = tfjd.Comments 17830 } 17831 if tfjd.NetworkName != nil { 17832 objectMap["networkName"] = tfjd.NetworkName 17833 } 17834 if tfjd.NetworkFriendlyName != nil { 17835 objectMap["networkFriendlyName"] = tfjd.NetworkFriendlyName 17836 } 17837 if tfjd.NetworkType != nil { 17838 objectMap["networkType"] = tfjd.NetworkType 17839 } 17840 if tfjd.ProtectedItemDetails != nil { 17841 objectMap["protectedItemDetails"] = tfjd.ProtectedItemDetails 17842 } 17843 if tfjd.AffectedObjectDetails != nil { 17844 objectMap["affectedObjectDetails"] = tfjd.AffectedObjectDetails 17845 } 17846 if tfjd.InstanceType != "" { 17847 objectMap["instanceType"] = tfjd.InstanceType 17848 } 17849 return json.Marshal(objectMap) 17850} 17851 17852// AsAsrJobDetails is the BasicJobDetails implementation for TestFailoverJobDetails. 17853func (tfjd TestFailoverJobDetails) AsAsrJobDetails() (*AsrJobDetails, bool) { 17854 return nil, false 17855} 17856 17857// AsTestFailoverJobDetails is the BasicJobDetails implementation for TestFailoverJobDetails. 17858func (tfjd TestFailoverJobDetails) AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool) { 17859 return &tfjd, true 17860} 17861 17862// AsFailoverJobDetails is the BasicJobDetails implementation for TestFailoverJobDetails. 17863func (tfjd TestFailoverJobDetails) AsFailoverJobDetails() (*FailoverJobDetails, bool) { 17864 return nil, false 17865} 17866 17867// AsExportJobDetails is the BasicJobDetails implementation for TestFailoverJobDetails. 17868func (tfjd TestFailoverJobDetails) AsExportJobDetails() (*ExportJobDetails, bool) { 17869 return nil, false 17870} 17871 17872// AsSwitchProtectionJobDetails is the BasicJobDetails implementation for TestFailoverJobDetails. 17873func (tfjd TestFailoverJobDetails) AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool) { 17874 return nil, false 17875} 17876 17877// AsJobDetails is the BasicJobDetails implementation for TestFailoverJobDetails. 17878func (tfjd TestFailoverJobDetails) AsJobDetails() (*JobDetails, bool) { 17879 return nil, false 17880} 17881 17882// AsBasicJobDetails is the BasicJobDetails implementation for TestFailoverJobDetails. 17883func (tfjd TestFailoverJobDetails) AsBasicJobDetails() (BasicJobDetails, bool) { 17884 return &tfjd, true 17885} 17886 17887// UnplannedFailoverInput input definition for planned failover. 17888type UnplannedFailoverInput struct { 17889 // Properties - Planned failover input properties 17890 Properties *UnplannedFailoverInputProperties `json:"properties,omitempty"` 17891} 17892 17893// UnplannedFailoverInputProperties input definition for planned failover input properties. 17894type UnplannedFailoverInputProperties struct { 17895 // FailoverDirection - Failover direction. 17896 FailoverDirection *string `json:"failoverDirection,omitempty"` 17897 // SourceSiteOperations - Source site operations status 17898 SourceSiteOperations *string `json:"sourceSiteOperations,omitempty"` 17899 // ProviderSpecificDetails - Provider specific settings 17900 ProviderSpecificDetails BasicProviderSpecificFailoverInput `json:"providerSpecificDetails,omitempty"` 17901} 17902 17903// UnmarshalJSON is the custom unmarshaler for UnplannedFailoverInputProperties struct. 17904func (ufip *UnplannedFailoverInputProperties) UnmarshalJSON(body []byte) error { 17905 var m map[string]*json.RawMessage 17906 err := json.Unmarshal(body, &m) 17907 if err != nil { 17908 return err 17909 } 17910 for k, v := range m { 17911 switch k { 17912 case "failoverDirection": 17913 if v != nil { 17914 var failoverDirection string 17915 err = json.Unmarshal(*v, &failoverDirection) 17916 if err != nil { 17917 return err 17918 } 17919 ufip.FailoverDirection = &failoverDirection 17920 } 17921 case "sourceSiteOperations": 17922 if v != nil { 17923 var sourceSiteOperations string 17924 err = json.Unmarshal(*v, &sourceSiteOperations) 17925 if err != nil { 17926 return err 17927 } 17928 ufip.SourceSiteOperations = &sourceSiteOperations 17929 } 17930 case "providerSpecificDetails": 17931 if v != nil { 17932 providerSpecificDetails, err := unmarshalBasicProviderSpecificFailoverInput(*v) 17933 if err != nil { 17934 return err 17935 } 17936 ufip.ProviderSpecificDetails = providerSpecificDetails 17937 } 17938 } 17939 } 17940 17941 return nil 17942} 17943 17944// UpdateMobilityServiceRequest request to update the mobility service on a protected item. 17945type UpdateMobilityServiceRequest struct { 17946 // Properties - The properties of the update mobility service request. 17947 Properties *UpdateMobilityServiceRequestProperties `json:"properties,omitempty"` 17948} 17949 17950// UpdateMobilityServiceRequestProperties the properties of an update mobility service request. 17951type UpdateMobilityServiceRequestProperties struct { 17952 // RunAsAccountID - The CS run as account Id. 17953 RunAsAccountID *string `json:"runAsAccountId,omitempty"` 17954} 17955 17956// UpdateNetworkMappingInput update network mapping input. 17957type UpdateNetworkMappingInput struct { 17958 // Properties - The input properties needed to update network mapping. 17959 Properties *UpdateNetworkMappingInputProperties `json:"properties,omitempty"` 17960} 17961 17962// UpdateNetworkMappingInputProperties common input details for network mapping operation. 17963type UpdateNetworkMappingInputProperties struct { 17964 // RecoveryFabricName - Recovery fabric name. 17965 RecoveryFabricName *string `json:"recoveryFabricName,omitempty"` 17966 // RecoveryNetworkID - Recovery network Id. 17967 RecoveryNetworkID *string `json:"recoveryNetworkId,omitempty"` 17968 // FabricSpecificDetails - Fabrics specific input network Id. 17969 FabricSpecificDetails BasicFabricSpecificUpdateNetworkMappingInput `json:"fabricSpecificDetails,omitempty"` 17970} 17971 17972// UnmarshalJSON is the custom unmarshaler for UpdateNetworkMappingInputProperties struct. 17973func (unmip *UpdateNetworkMappingInputProperties) UnmarshalJSON(body []byte) error { 17974 var m map[string]*json.RawMessage 17975 err := json.Unmarshal(body, &m) 17976 if err != nil { 17977 return err 17978 } 17979 for k, v := range m { 17980 switch k { 17981 case "recoveryFabricName": 17982 if v != nil { 17983 var recoveryFabricName string 17984 err = json.Unmarshal(*v, &recoveryFabricName) 17985 if err != nil { 17986 return err 17987 } 17988 unmip.RecoveryFabricName = &recoveryFabricName 17989 } 17990 case "recoveryNetworkId": 17991 if v != nil { 17992 var recoveryNetworkID string 17993 err = json.Unmarshal(*v, &recoveryNetworkID) 17994 if err != nil { 17995 return err 17996 } 17997 unmip.RecoveryNetworkID = &recoveryNetworkID 17998 } 17999 case "fabricSpecificDetails": 18000 if v != nil { 18001 fabricSpecificDetails, err := unmarshalBasicFabricSpecificUpdateNetworkMappingInput(*v) 18002 if err != nil { 18003 return err 18004 } 18005 unmip.FabricSpecificDetails = fabricSpecificDetails 18006 } 18007 } 18008 } 18009 18010 return nil 18011} 18012 18013// UpdatePolicyInput update protection profile input. 18014type UpdatePolicyInput struct { 18015 // Properties - The ReplicationProviderSettings. 18016 Properties *UpdatePolicyInputProperties `json:"properties,omitempty"` 18017} 18018 18019// UpdatePolicyInputProperties policy update properties. 18020type UpdatePolicyInputProperties struct { 18021 // ReplicationProviderSettings - The ReplicationProviderSettings. 18022 ReplicationProviderSettings BasicPolicyProviderSpecificInput `json:"replicationProviderSettings,omitempty"` 18023} 18024 18025// UnmarshalJSON is the custom unmarshaler for UpdatePolicyInputProperties struct. 18026func (upip *UpdatePolicyInputProperties) UnmarshalJSON(body []byte) error { 18027 var m map[string]*json.RawMessage 18028 err := json.Unmarshal(body, &m) 18029 if err != nil { 18030 return err 18031 } 18032 for k, v := range m { 18033 switch k { 18034 case "replicationProviderSettings": 18035 if v != nil { 18036 replicationProviderSettings, err := unmarshalBasicPolicyProviderSpecificInput(*v) 18037 if err != nil { 18038 return err 18039 } 18040 upip.ReplicationProviderSettings = replicationProviderSettings 18041 } 18042 } 18043 } 18044 18045 return nil 18046} 18047 18048// UpdateRecoveryPlanInput update recovery plan input class. 18049type UpdateRecoveryPlanInput struct { 18050 // Properties - Recovery plan update properties. 18051 Properties *UpdateRecoveryPlanInputProperties `json:"properties,omitempty"` 18052} 18053 18054// UpdateRecoveryPlanInputProperties recovery plan update properties. 18055type UpdateRecoveryPlanInputProperties struct { 18056 // Groups - The recovery plan groups. 18057 Groups *[]RecoveryPlanGroup `json:"groups,omitempty"` 18058} 18059 18060// UpdateReplicationProtectedItemInput update replication protected item input. 18061type UpdateReplicationProtectedItemInput struct { 18062 // Properties - Update replication protected item properties. 18063 Properties *UpdateReplicationProtectedItemInputProperties `json:"properties,omitempty"` 18064} 18065 18066// UpdateReplicationProtectedItemInputProperties update protected item input properties. 18067type UpdateReplicationProtectedItemInputProperties struct { 18068 // RecoveryAzureVMName - Target azure VM name given by the user. 18069 RecoveryAzureVMName *string `json:"recoveryAzureVMName,omitempty"` 18070 // RecoveryAzureVMSize - Target Azure Vm size. 18071 RecoveryAzureVMSize *string `json:"recoveryAzureVMSize,omitempty"` 18072 // SelectedRecoveryAzureNetworkID - Target Azure Network Id. 18073 SelectedRecoveryAzureNetworkID *string `json:"selectedRecoveryAzureNetworkId,omitempty"` 18074 // EnableRDPOnTargetOption - The selected option to enable RDP\SSH on target vm after failover. String value of {SrsDataContract.EnableRDPOnTargetOption} enum. 18075 EnableRDPOnTargetOption *string `json:"enableRDPOnTargetOption,omitempty"` 18076 // VMNics - The list of vm nic details. 18077 VMNics *[]VMNicInputDetails `json:"vmNics,omitempty"` 18078 // LicenseType - License type. Possible values include: 'LicenseTypeNotSpecified', 'LicenseTypeNoLicenseType', 'LicenseTypeWindowsServer' 18079 LicenseType LicenseType `json:"licenseType,omitempty"` 18080 // RecoveryAvailabilitySetID - The target availability set id. 18081 RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"` 18082 // ProviderSpecificDetails - The provider specific input to update replication protected item. 18083 ProviderSpecificDetails BasicUpdateReplicationProtectedItemProviderInput `json:"providerSpecificDetails,omitempty"` 18084} 18085 18086// UnmarshalJSON is the custom unmarshaler for UpdateReplicationProtectedItemInputProperties struct. 18087func (urpiip *UpdateReplicationProtectedItemInputProperties) UnmarshalJSON(body []byte) error { 18088 var m map[string]*json.RawMessage 18089 err := json.Unmarshal(body, &m) 18090 if err != nil { 18091 return err 18092 } 18093 for k, v := range m { 18094 switch k { 18095 case "recoveryAzureVMName": 18096 if v != nil { 18097 var recoveryAzureVMName string 18098 err = json.Unmarshal(*v, &recoveryAzureVMName) 18099 if err != nil { 18100 return err 18101 } 18102 urpiip.RecoveryAzureVMName = &recoveryAzureVMName 18103 } 18104 case "recoveryAzureVMSize": 18105 if v != nil { 18106 var recoveryAzureVMSize string 18107 err = json.Unmarshal(*v, &recoveryAzureVMSize) 18108 if err != nil { 18109 return err 18110 } 18111 urpiip.RecoveryAzureVMSize = &recoveryAzureVMSize 18112 } 18113 case "selectedRecoveryAzureNetworkId": 18114 if v != nil { 18115 var selectedRecoveryAzureNetworkID string 18116 err = json.Unmarshal(*v, &selectedRecoveryAzureNetworkID) 18117 if err != nil { 18118 return err 18119 } 18120 urpiip.SelectedRecoveryAzureNetworkID = &selectedRecoveryAzureNetworkID 18121 } 18122 case "enableRDPOnTargetOption": 18123 if v != nil { 18124 var enableRDPOnTargetOption string 18125 err = json.Unmarshal(*v, &enableRDPOnTargetOption) 18126 if err != nil { 18127 return err 18128 } 18129 urpiip.EnableRDPOnTargetOption = &enableRDPOnTargetOption 18130 } 18131 case "vmNics": 18132 if v != nil { 18133 var VMNics []VMNicInputDetails 18134 err = json.Unmarshal(*v, &VMNics) 18135 if err != nil { 18136 return err 18137 } 18138 urpiip.VMNics = &VMNics 18139 } 18140 case "licenseType": 18141 if v != nil { 18142 var licenseType LicenseType 18143 err = json.Unmarshal(*v, &licenseType) 18144 if err != nil { 18145 return err 18146 } 18147 urpiip.LicenseType = licenseType 18148 } 18149 case "recoveryAvailabilitySetId": 18150 if v != nil { 18151 var recoveryAvailabilitySetID string 18152 err = json.Unmarshal(*v, &recoveryAvailabilitySetID) 18153 if err != nil { 18154 return err 18155 } 18156 urpiip.RecoveryAvailabilitySetID = &recoveryAvailabilitySetID 18157 } 18158 case "providerSpecificDetails": 18159 if v != nil { 18160 providerSpecificDetails, err := unmarshalBasicUpdateReplicationProtectedItemProviderInput(*v) 18161 if err != nil { 18162 return err 18163 } 18164 urpiip.ProviderSpecificDetails = providerSpecificDetails 18165 } 18166 } 18167 } 18168 18169 return nil 18170} 18171 18172// BasicUpdateReplicationProtectedItemProviderInput update replication protected item provider specific input. 18173type BasicUpdateReplicationProtectedItemProviderInput interface { 18174 AsHyperVReplicaAzureUpdateReplicationProtectedItemInput() (*HyperVReplicaAzureUpdateReplicationProtectedItemInput, bool) 18175 AsInMageAzureV2UpdateReplicationProtectedItemInput() (*InMageAzureV2UpdateReplicationProtectedItemInput, bool) 18176 AsA2AUpdateReplicationProtectedItemInput() (*A2AUpdateReplicationProtectedItemInput, bool) 18177 AsUpdateReplicationProtectedItemProviderInput() (*UpdateReplicationProtectedItemProviderInput, bool) 18178} 18179 18180// UpdateReplicationProtectedItemProviderInput update replication protected item provider specific input. 18181type UpdateReplicationProtectedItemProviderInput struct { 18182 // InstanceType - Possible values include: 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeUpdateReplicationProtectedItemProviderInput', 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeA2A' 18183 InstanceType InstanceTypeBasicUpdateReplicationProtectedItemProviderInput `json:"instanceType,omitempty"` 18184} 18185 18186func unmarshalBasicUpdateReplicationProtectedItemProviderInput(body []byte) (BasicUpdateReplicationProtectedItemProviderInput, error) { 18187 var m map[string]interface{} 18188 err := json.Unmarshal(body, &m) 18189 if err != nil { 18190 return nil, err 18191 } 18192 18193 switch m["instanceType"] { 18194 case string(InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeHyperVReplicaAzure): 18195 var hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput 18196 err := json.Unmarshal(body, &hvraurpii) 18197 return hvraurpii, err 18198 case string(InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeInMageAzureV2): 18199 var imavurpii InMageAzureV2UpdateReplicationProtectedItemInput 18200 err := json.Unmarshal(body, &imavurpii) 18201 return imavurpii, err 18202 case string(InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeA2A): 18203 var aurpii A2AUpdateReplicationProtectedItemInput 18204 err := json.Unmarshal(body, &aurpii) 18205 return aurpii, err 18206 default: 18207 var urpipi UpdateReplicationProtectedItemProviderInput 18208 err := json.Unmarshal(body, &urpipi) 18209 return urpipi, err 18210 } 18211} 18212func unmarshalBasicUpdateReplicationProtectedItemProviderInputArray(body []byte) ([]BasicUpdateReplicationProtectedItemProviderInput, error) { 18213 var rawMessages []*json.RawMessage 18214 err := json.Unmarshal(body, &rawMessages) 18215 if err != nil { 18216 return nil, err 18217 } 18218 18219 urpipiArray := make([]BasicUpdateReplicationProtectedItemProviderInput, len(rawMessages)) 18220 18221 for index, rawMessage := range rawMessages { 18222 urpipi, err := unmarshalBasicUpdateReplicationProtectedItemProviderInput(*rawMessage) 18223 if err != nil { 18224 return nil, err 18225 } 18226 urpipiArray[index] = urpipi 18227 } 18228 return urpipiArray, nil 18229} 18230 18231// MarshalJSON is the custom marshaler for UpdateReplicationProtectedItemProviderInput. 18232func (urpipi UpdateReplicationProtectedItemProviderInput) MarshalJSON() ([]byte, error) { 18233 urpipi.InstanceType = InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeUpdateReplicationProtectedItemProviderInput 18234 objectMap := make(map[string]interface{}) 18235 if urpipi.InstanceType != "" { 18236 objectMap["instanceType"] = urpipi.InstanceType 18237 } 18238 return json.Marshal(objectMap) 18239} 18240 18241// AsHyperVReplicaAzureUpdateReplicationProtectedItemInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for UpdateReplicationProtectedItemProviderInput. 18242func (urpipi UpdateReplicationProtectedItemProviderInput) AsHyperVReplicaAzureUpdateReplicationProtectedItemInput() (*HyperVReplicaAzureUpdateReplicationProtectedItemInput, bool) { 18243 return nil, false 18244} 18245 18246// AsInMageAzureV2UpdateReplicationProtectedItemInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for UpdateReplicationProtectedItemProviderInput. 18247func (urpipi UpdateReplicationProtectedItemProviderInput) AsInMageAzureV2UpdateReplicationProtectedItemInput() (*InMageAzureV2UpdateReplicationProtectedItemInput, bool) { 18248 return nil, false 18249} 18250 18251// AsA2AUpdateReplicationProtectedItemInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for UpdateReplicationProtectedItemProviderInput. 18252func (urpipi UpdateReplicationProtectedItemProviderInput) AsA2AUpdateReplicationProtectedItemInput() (*A2AUpdateReplicationProtectedItemInput, bool) { 18253 return nil, false 18254} 18255 18256// AsUpdateReplicationProtectedItemProviderInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for UpdateReplicationProtectedItemProviderInput. 18257func (urpipi UpdateReplicationProtectedItemProviderInput) AsUpdateReplicationProtectedItemProviderInput() (*UpdateReplicationProtectedItemProviderInput, bool) { 18258 return &urpipi, true 18259} 18260 18261// AsBasicUpdateReplicationProtectedItemProviderInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for UpdateReplicationProtectedItemProviderInput. 18262func (urpipi UpdateReplicationProtectedItemProviderInput) AsBasicUpdateReplicationProtectedItemProviderInput() (BasicUpdateReplicationProtectedItemProviderInput, bool) { 18263 return &urpipi, true 18264} 18265 18266// UpdateVCenterRequest input required to update vCenter. 18267type UpdateVCenterRequest struct { 18268 // Properties - The update VCenter Request Properties. 18269 Properties *UpdateVCenterRequestProperties `json:"properties,omitempty"` 18270} 18271 18272// UpdateVCenterRequestProperties the properties of an update vCenter request. 18273type UpdateVCenterRequestProperties struct { 18274 // FriendlyName - The friendly name of the vCenter. 18275 FriendlyName *string `json:"friendlyName,omitempty"` 18276 // IPAddress - The IP address of the vCenter to be discovered. 18277 IPAddress *string `json:"ipAddress,omitempty"` 18278 // ProcessServerID - The process server Id from where the update can be orchestrated. 18279 ProcessServerID *string `json:"processServerId,omitempty"` 18280 // Port - The port number for discovery. 18281 Port *string `json:"port,omitempty"` 18282 // RunAsAccountID - The CS account Id which has privileges to update the vCenter. 18283 RunAsAccountID *string `json:"runAsAccountId,omitempty"` 18284} 18285 18286// VaultHealthDetails vault health details definition. 18287type VaultHealthDetails struct { 18288 autorest.Response `json:"-"` 18289 // Properties - The vault health related data. 18290 Properties *VaultHealthProperties `json:"properties,omitempty"` 18291 // ID - READ-ONLY; Resource Id 18292 ID *string `json:"id,omitempty"` 18293 // Name - READ-ONLY; Resource Name 18294 Name *string `json:"name,omitempty"` 18295 // Type - READ-ONLY; Resource Type 18296 Type *string `json:"type,omitempty"` 18297 // Location - Resource Location 18298 Location *string `json:"location,omitempty"` 18299} 18300 18301// MarshalJSON is the custom marshaler for VaultHealthDetails. 18302func (vhd VaultHealthDetails) MarshalJSON() ([]byte, error) { 18303 objectMap := make(map[string]interface{}) 18304 if vhd.Properties != nil { 18305 objectMap["properties"] = vhd.Properties 18306 } 18307 if vhd.Location != nil { 18308 objectMap["location"] = vhd.Location 18309 } 18310 return json.Marshal(objectMap) 18311} 18312 18313// VaultHealthProperties class to define the health summary of the Vault. 18314type VaultHealthProperties struct { 18315 // VaultErrors - The list of errors on the vault. 18316 VaultErrors *[]HealthError `json:"vaultErrors,omitempty"` 18317 // ProtectedItemsHealth - The list of the health detail of the protected items in the vault. 18318 ProtectedItemsHealth *ResourceHealthSummary `json:"protectedItemsHealth,omitempty"` 18319 // FabricsHealth - The list of the health detail of the fabrics in the vault. 18320 FabricsHealth *ResourceHealthSummary `json:"fabricsHealth,omitempty"` 18321} 18322 18323// VCenter vCenter definition. 18324type VCenter struct { 18325 autorest.Response `json:"-"` 18326 // Properties - VCenter related data. 18327 Properties *VCenterProperties `json:"properties,omitempty"` 18328 // ID - READ-ONLY; Resource Id 18329 ID *string `json:"id,omitempty"` 18330 // Name - READ-ONLY; Resource Name 18331 Name *string `json:"name,omitempty"` 18332 // Type - READ-ONLY; Resource Type 18333 Type *string `json:"type,omitempty"` 18334 // Location - Resource Location 18335 Location *string `json:"location,omitempty"` 18336} 18337 18338// MarshalJSON is the custom marshaler for VCenter. 18339func (vc VCenter) MarshalJSON() ([]byte, error) { 18340 objectMap := make(map[string]interface{}) 18341 if vc.Properties != nil { 18342 objectMap["properties"] = vc.Properties 18343 } 18344 if vc.Location != nil { 18345 objectMap["location"] = vc.Location 18346 } 18347 return json.Marshal(objectMap) 18348} 18349 18350// VCenterCollection collection of vCenter details. 18351type VCenterCollection struct { 18352 autorest.Response `json:"-"` 18353 // Value - The vCenter details. 18354 Value *[]VCenter `json:"value,omitempty"` 18355 // NextLink - The value of next link. 18356 NextLink *string `json:"nextLink,omitempty"` 18357} 18358 18359// VCenterCollectionIterator provides access to a complete listing of VCenter values. 18360type VCenterCollectionIterator struct { 18361 i int 18362 page VCenterCollectionPage 18363} 18364 18365// NextWithContext advances to the next value. If there was an error making 18366// the request the iterator does not advance and the error is returned. 18367func (iter *VCenterCollectionIterator) NextWithContext(ctx context.Context) (err error) { 18368 if tracing.IsEnabled() { 18369 ctx = tracing.StartSpan(ctx, fqdn+"/VCenterCollectionIterator.NextWithContext") 18370 defer func() { 18371 sc := -1 18372 if iter.Response().Response.Response != nil { 18373 sc = iter.Response().Response.Response.StatusCode 18374 } 18375 tracing.EndSpan(ctx, sc, err) 18376 }() 18377 } 18378 iter.i++ 18379 if iter.i < len(iter.page.Values()) { 18380 return nil 18381 } 18382 err = iter.page.NextWithContext(ctx) 18383 if err != nil { 18384 iter.i-- 18385 return err 18386 } 18387 iter.i = 0 18388 return nil 18389} 18390 18391// Next advances to the next value. If there was an error making 18392// the request the iterator does not advance and the error is returned. 18393// Deprecated: Use NextWithContext() instead. 18394func (iter *VCenterCollectionIterator) Next() error { 18395 return iter.NextWithContext(context.Background()) 18396} 18397 18398// NotDone returns true if the enumeration should be started or is not yet complete. 18399func (iter VCenterCollectionIterator) NotDone() bool { 18400 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 18401} 18402 18403// Response returns the raw server response from the last page request. 18404func (iter VCenterCollectionIterator) Response() VCenterCollection { 18405 return iter.page.Response() 18406} 18407 18408// Value returns the current value or a zero-initialized value if the 18409// iterator has advanced beyond the end of the collection. 18410func (iter VCenterCollectionIterator) Value() VCenter { 18411 if !iter.page.NotDone() { 18412 return VCenter{} 18413 } 18414 return iter.page.Values()[iter.i] 18415} 18416 18417// Creates a new instance of the VCenterCollectionIterator type. 18418func NewVCenterCollectionIterator(page VCenterCollectionPage) VCenterCollectionIterator { 18419 return VCenterCollectionIterator{page: page} 18420} 18421 18422// IsEmpty returns true if the ListResult contains no values. 18423func (vcc VCenterCollection) IsEmpty() bool { 18424 return vcc.Value == nil || len(*vcc.Value) == 0 18425} 18426 18427// hasNextLink returns true if the NextLink is not empty. 18428func (vcc VCenterCollection) hasNextLink() bool { 18429 return vcc.NextLink != nil && len(*vcc.NextLink) != 0 18430} 18431 18432// vCenterCollectionPreparer prepares a request to retrieve the next set of results. 18433// It returns nil if no more results exist. 18434func (vcc VCenterCollection) vCenterCollectionPreparer(ctx context.Context) (*http.Request, error) { 18435 if !vcc.hasNextLink() { 18436 return nil, nil 18437 } 18438 return autorest.Prepare((&http.Request{}).WithContext(ctx), 18439 autorest.AsJSON(), 18440 autorest.AsGet(), 18441 autorest.WithBaseURL(to.String(vcc.NextLink))) 18442} 18443 18444// VCenterCollectionPage contains a page of VCenter values. 18445type VCenterCollectionPage struct { 18446 fn func(context.Context, VCenterCollection) (VCenterCollection, error) 18447 vcc VCenterCollection 18448} 18449 18450// NextWithContext advances to the next page of values. If there was an error making 18451// the request the page does not advance and the error is returned. 18452func (page *VCenterCollectionPage) NextWithContext(ctx context.Context) (err error) { 18453 if tracing.IsEnabled() { 18454 ctx = tracing.StartSpan(ctx, fqdn+"/VCenterCollectionPage.NextWithContext") 18455 defer func() { 18456 sc := -1 18457 if page.Response().Response.Response != nil { 18458 sc = page.Response().Response.Response.StatusCode 18459 } 18460 tracing.EndSpan(ctx, sc, err) 18461 }() 18462 } 18463 for { 18464 next, err := page.fn(ctx, page.vcc) 18465 if err != nil { 18466 return err 18467 } 18468 page.vcc = next 18469 if !next.hasNextLink() || !next.IsEmpty() { 18470 break 18471 } 18472 } 18473 return nil 18474} 18475 18476// Next advances to the next page of values. If there was an error making 18477// the request the page does not advance and the error is returned. 18478// Deprecated: Use NextWithContext() instead. 18479func (page *VCenterCollectionPage) Next() error { 18480 return page.NextWithContext(context.Background()) 18481} 18482 18483// NotDone returns true if the page enumeration should be started or is not yet complete. 18484func (page VCenterCollectionPage) NotDone() bool { 18485 return !page.vcc.IsEmpty() 18486} 18487 18488// Response returns the raw server response from the last page request. 18489func (page VCenterCollectionPage) Response() VCenterCollection { 18490 return page.vcc 18491} 18492 18493// Values returns the slice of values for the current page or nil if there are no values. 18494func (page VCenterCollectionPage) Values() []VCenter { 18495 if page.vcc.IsEmpty() { 18496 return nil 18497 } 18498 return *page.vcc.Value 18499} 18500 18501// Creates a new instance of the VCenterCollectionPage type. 18502func NewVCenterCollectionPage(cur VCenterCollection, getNextPage func(context.Context, VCenterCollection) (VCenterCollection, error)) VCenterCollectionPage { 18503 return VCenterCollectionPage{ 18504 fn: getNextPage, 18505 vcc: cur, 18506 } 18507} 18508 18509// VCenterProperties vCenter properties. 18510type VCenterProperties struct { 18511 // FriendlyName - Friendly name of the vCenter. 18512 FriendlyName *string `json:"friendlyName,omitempty"` 18513 // InternalID - VCenter internal ID. 18514 InternalID *string `json:"internalId,omitempty"` 18515 // LastHeartbeat - The time when the last heartbeat was received by vCenter. 18516 LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"` 18517 // DiscoveryStatus - The VCenter discovery status. 18518 DiscoveryStatus *string `json:"discoveryStatus,omitempty"` 18519 // ProcessServerID - The process server Id. 18520 ProcessServerID *string `json:"processServerId,omitempty"` 18521 // IPAddress - The IP address of the vCenter. 18522 IPAddress *string `json:"ipAddress,omitempty"` 18523 // InfrastructureID - The infrastructure Id of vCenter. 18524 InfrastructureID *string `json:"infrastructureId,omitempty"` 18525 // Port - The port number for discovery. 18526 Port *string `json:"port,omitempty"` 18527 // RunAsAccountID - The account Id which has privileges to discover the vCenter. 18528 RunAsAccountID *string `json:"runAsAccountId,omitempty"` 18529 // FabricArmResourceName - The ARM resource name of the fabric containing this VCenter. 18530 FabricArmResourceName *string `json:"fabricArmResourceName,omitempty"` 18531} 18532 18533// VirtualMachineTaskDetails this class represents the virtual machine task details. 18534type VirtualMachineTaskDetails struct { 18535 // SkippedReason - The skipped reason. 18536 SkippedReason *string `json:"skippedReason,omitempty"` 18537 // SkippedReasonString - The skipped reason string. 18538 SkippedReasonString *string `json:"skippedReasonString,omitempty"` 18539 // JobTask - The job entity. 18540 JobTask *JobEntity `json:"jobTask,omitempty"` 18541 // InstanceType - Possible values include: 'InstanceTypeTaskTypeDetails', 'InstanceTypeJobTaskDetails', 'InstanceTypeVirtualMachineTaskDetails', 'InstanceTypeFabricReplicationGroupTaskDetails', 'InstanceTypeManualActionTaskDetails', 'InstanceTypeScriptActionTaskDetails', 'InstanceTypeVMNicUpdatesTaskDetails', 'InstanceTypeConsistencyCheckTaskDetails', 'InstanceTypeAutomationRunbookTaskDetails' 18542 InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"` 18543} 18544 18545// MarshalJSON is the custom marshaler for VirtualMachineTaskDetails. 18546func (vmtd VirtualMachineTaskDetails) MarshalJSON() ([]byte, error) { 18547 vmtd.InstanceType = InstanceTypeVirtualMachineTaskDetails 18548 objectMap := make(map[string]interface{}) 18549 if vmtd.SkippedReason != nil { 18550 objectMap["skippedReason"] = vmtd.SkippedReason 18551 } 18552 if vmtd.SkippedReasonString != nil { 18553 objectMap["skippedReasonString"] = vmtd.SkippedReasonString 18554 } 18555 if vmtd.JobTask != nil { 18556 objectMap["jobTask"] = vmtd.JobTask 18557 } 18558 if vmtd.InstanceType != "" { 18559 objectMap["instanceType"] = vmtd.InstanceType 18560 } 18561 return json.Marshal(objectMap) 18562} 18563 18564// AsJobTaskDetails is the BasicTaskTypeDetails implementation for VirtualMachineTaskDetails. 18565func (vmtd VirtualMachineTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) { 18566 return nil, false 18567} 18568 18569// AsVirtualMachineTaskDetails is the BasicTaskTypeDetails implementation for VirtualMachineTaskDetails. 18570func (vmtd VirtualMachineTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) { 18571 return &vmtd, true 18572} 18573 18574// AsFabricReplicationGroupTaskDetails is the BasicTaskTypeDetails implementation for VirtualMachineTaskDetails. 18575func (vmtd VirtualMachineTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) { 18576 return nil, false 18577} 18578 18579// AsManualActionTaskDetails is the BasicTaskTypeDetails implementation for VirtualMachineTaskDetails. 18580func (vmtd VirtualMachineTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) { 18581 return nil, false 18582} 18583 18584// AsScriptActionTaskDetails is the BasicTaskTypeDetails implementation for VirtualMachineTaskDetails. 18585func (vmtd VirtualMachineTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) { 18586 return nil, false 18587} 18588 18589// AsVMNicUpdatesTaskDetails is the BasicTaskTypeDetails implementation for VirtualMachineTaskDetails. 18590func (vmtd VirtualMachineTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) { 18591 return nil, false 18592} 18593 18594// AsConsistencyCheckTaskDetails is the BasicTaskTypeDetails implementation for VirtualMachineTaskDetails. 18595func (vmtd VirtualMachineTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) { 18596 return nil, false 18597} 18598 18599// AsAutomationRunbookTaskDetails is the BasicTaskTypeDetails implementation for VirtualMachineTaskDetails. 18600func (vmtd VirtualMachineTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) { 18601 return nil, false 18602} 18603 18604// AsTaskTypeDetails is the BasicTaskTypeDetails implementation for VirtualMachineTaskDetails. 18605func (vmtd VirtualMachineTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) { 18606 return nil, false 18607} 18608 18609// AsBasicTaskTypeDetails is the BasicTaskTypeDetails implementation for VirtualMachineTaskDetails. 18610func (vmtd VirtualMachineTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) { 18611 return &vmtd, true 18612} 18613 18614// VmmDetails VMM fabric specific details. 18615type VmmDetails struct { 18616 // InstanceType - Possible values include: 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeFabricSpecificDetails', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeAzure', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMM', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeHyperVSite', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMware', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMwareV2' 18617 InstanceType InstanceTypeBasicFabricSpecificDetails `json:"instanceType,omitempty"` 18618} 18619 18620// MarshalJSON is the custom marshaler for VmmDetails. 18621func (vd VmmDetails) MarshalJSON() ([]byte, error) { 18622 vd.InstanceType = InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMM 18623 objectMap := make(map[string]interface{}) 18624 if vd.InstanceType != "" { 18625 objectMap["instanceType"] = vd.InstanceType 18626 } 18627 return json.Marshal(objectMap) 18628} 18629 18630// AsAzureFabricSpecificDetails is the BasicFabricSpecificDetails implementation for VmmDetails. 18631func (vd VmmDetails) AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool) { 18632 return nil, false 18633} 18634 18635// AsVmmDetails is the BasicFabricSpecificDetails implementation for VmmDetails. 18636func (vd VmmDetails) AsVmmDetails() (*VmmDetails, bool) { 18637 return &vd, true 18638} 18639 18640// AsHyperVSiteDetails is the BasicFabricSpecificDetails implementation for VmmDetails. 18641func (vd VmmDetails) AsHyperVSiteDetails() (*HyperVSiteDetails, bool) { 18642 return nil, false 18643} 18644 18645// AsVMwareDetails is the BasicFabricSpecificDetails implementation for VmmDetails. 18646func (vd VmmDetails) AsVMwareDetails() (*VMwareDetails, bool) { 18647 return nil, false 18648} 18649 18650// AsVMwareV2FabricSpecificDetails is the BasicFabricSpecificDetails implementation for VmmDetails. 18651func (vd VmmDetails) AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool) { 18652 return nil, false 18653} 18654 18655// AsFabricSpecificDetails is the BasicFabricSpecificDetails implementation for VmmDetails. 18656func (vd VmmDetails) AsFabricSpecificDetails() (*FabricSpecificDetails, bool) { 18657 return nil, false 18658} 18659 18660// AsBasicFabricSpecificDetails is the BasicFabricSpecificDetails implementation for VmmDetails. 18661func (vd VmmDetails) AsBasicFabricSpecificDetails() (BasicFabricSpecificDetails, bool) { 18662 return &vd, true 18663} 18664 18665// VmmToAzureCreateNetworkMappingInput create network mappings input properties/behavior specific to Vmm to 18666// Azure Network mapping. 18667type VmmToAzureCreateNetworkMappingInput struct { 18668 // InstanceType - Possible values include: 'InstanceTypeFabricSpecificCreateNetworkMappingInput', 'InstanceTypeAzureToAzure', 'InstanceTypeVmmToAzure', 'InstanceTypeVmmToVmm' 18669 InstanceType InstanceTypeBasicFabricSpecificCreateNetworkMappingInput `json:"instanceType,omitempty"` 18670} 18671 18672// MarshalJSON is the custom marshaler for VmmToAzureCreateNetworkMappingInput. 18673func (vtacnmi VmmToAzureCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { 18674 vtacnmi.InstanceType = InstanceTypeVmmToAzure 18675 objectMap := make(map[string]interface{}) 18676 if vtacnmi.InstanceType != "" { 18677 objectMap["instanceType"] = vtacnmi.InstanceType 18678 } 18679 return json.Marshal(objectMap) 18680} 18681 18682// AsAzureToAzureCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for VmmToAzureCreateNetworkMappingInput. 18683func (vtacnmi VmmToAzureCreateNetworkMappingInput) AsAzureToAzureCreateNetworkMappingInput() (*AzureToAzureCreateNetworkMappingInput, bool) { 18684 return nil, false 18685} 18686 18687// AsVmmToAzureCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for VmmToAzureCreateNetworkMappingInput. 18688func (vtacnmi VmmToAzureCreateNetworkMappingInput) AsVmmToAzureCreateNetworkMappingInput() (*VmmToAzureCreateNetworkMappingInput, bool) { 18689 return &vtacnmi, true 18690} 18691 18692// AsVmmToVmmCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for VmmToAzureCreateNetworkMappingInput. 18693func (vtacnmi VmmToAzureCreateNetworkMappingInput) AsVmmToVmmCreateNetworkMappingInput() (*VmmToVmmCreateNetworkMappingInput, bool) { 18694 return nil, false 18695} 18696 18697// AsFabricSpecificCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for VmmToAzureCreateNetworkMappingInput. 18698func (vtacnmi VmmToAzureCreateNetworkMappingInput) AsFabricSpecificCreateNetworkMappingInput() (*FabricSpecificCreateNetworkMappingInput, bool) { 18699 return nil, false 18700} 18701 18702// AsBasicFabricSpecificCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for VmmToAzureCreateNetworkMappingInput. 18703func (vtacnmi VmmToAzureCreateNetworkMappingInput) AsBasicFabricSpecificCreateNetworkMappingInput() (BasicFabricSpecificCreateNetworkMappingInput, bool) { 18704 return &vtacnmi, true 18705} 18706 18707// VmmToAzureNetworkMappingSettings e2A Network Mapping fabric specific settings. 18708type VmmToAzureNetworkMappingSettings struct { 18709 // InstanceType - Possible values include: 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeNetworkMappingFabricSpecificSettings', 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeAzureToAzure', 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToAzure', 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToVmm' 18710 InstanceType InstanceTypeBasicNetworkMappingFabricSpecificSettings `json:"instanceType,omitempty"` 18711} 18712 18713// MarshalJSON is the custom marshaler for VmmToAzureNetworkMappingSettings. 18714func (vtanms VmmToAzureNetworkMappingSettings) MarshalJSON() ([]byte, error) { 18715 vtanms.InstanceType = InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToAzure 18716 objectMap := make(map[string]interface{}) 18717 if vtanms.InstanceType != "" { 18718 objectMap["instanceType"] = vtanms.InstanceType 18719 } 18720 return json.Marshal(objectMap) 18721} 18722 18723// AsAzureToAzureNetworkMappingSettings is the BasicNetworkMappingFabricSpecificSettings implementation for VmmToAzureNetworkMappingSettings. 18724func (vtanms VmmToAzureNetworkMappingSettings) AsAzureToAzureNetworkMappingSettings() (*AzureToAzureNetworkMappingSettings, bool) { 18725 return nil, false 18726} 18727 18728// AsVmmToAzureNetworkMappingSettings is the BasicNetworkMappingFabricSpecificSettings implementation for VmmToAzureNetworkMappingSettings. 18729func (vtanms VmmToAzureNetworkMappingSettings) AsVmmToAzureNetworkMappingSettings() (*VmmToAzureNetworkMappingSettings, bool) { 18730 return &vtanms, true 18731} 18732 18733// AsVmmToVmmNetworkMappingSettings is the BasicNetworkMappingFabricSpecificSettings implementation for VmmToAzureNetworkMappingSettings. 18734func (vtanms VmmToAzureNetworkMappingSettings) AsVmmToVmmNetworkMappingSettings() (*VmmToVmmNetworkMappingSettings, bool) { 18735 return nil, false 18736} 18737 18738// AsNetworkMappingFabricSpecificSettings is the BasicNetworkMappingFabricSpecificSettings implementation for VmmToAzureNetworkMappingSettings. 18739func (vtanms VmmToAzureNetworkMappingSettings) AsNetworkMappingFabricSpecificSettings() (*NetworkMappingFabricSpecificSettings, bool) { 18740 return nil, false 18741} 18742 18743// AsBasicNetworkMappingFabricSpecificSettings is the BasicNetworkMappingFabricSpecificSettings implementation for VmmToAzureNetworkMappingSettings. 18744func (vtanms VmmToAzureNetworkMappingSettings) AsBasicNetworkMappingFabricSpecificSettings() (BasicNetworkMappingFabricSpecificSettings, bool) { 18745 return &vtanms, true 18746} 18747 18748// VmmToAzureUpdateNetworkMappingInput update network mappings input properties/behavior specific to vmm to 18749// azure. 18750type VmmToAzureUpdateNetworkMappingInput struct { 18751 // InstanceType - Possible values include: 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeFabricSpecificUpdateNetworkMappingInput', 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeAzureToAzure', 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToAzure', 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToVmm' 18752 InstanceType InstanceTypeBasicFabricSpecificUpdateNetworkMappingInput `json:"instanceType,omitempty"` 18753} 18754 18755// MarshalJSON is the custom marshaler for VmmToAzureUpdateNetworkMappingInput. 18756func (vtaunmi VmmToAzureUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { 18757 vtaunmi.InstanceType = InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToAzure 18758 objectMap := make(map[string]interface{}) 18759 if vtaunmi.InstanceType != "" { 18760 objectMap["instanceType"] = vtaunmi.InstanceType 18761 } 18762 return json.Marshal(objectMap) 18763} 18764 18765// AsAzureToAzureUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for VmmToAzureUpdateNetworkMappingInput. 18766func (vtaunmi VmmToAzureUpdateNetworkMappingInput) AsAzureToAzureUpdateNetworkMappingInput() (*AzureToAzureUpdateNetworkMappingInput, bool) { 18767 return nil, false 18768} 18769 18770// AsVmmToAzureUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for VmmToAzureUpdateNetworkMappingInput. 18771func (vtaunmi VmmToAzureUpdateNetworkMappingInput) AsVmmToAzureUpdateNetworkMappingInput() (*VmmToAzureUpdateNetworkMappingInput, bool) { 18772 return &vtaunmi, true 18773} 18774 18775// AsVmmToVmmUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for VmmToAzureUpdateNetworkMappingInput. 18776func (vtaunmi VmmToAzureUpdateNetworkMappingInput) AsVmmToVmmUpdateNetworkMappingInput() (*VmmToVmmUpdateNetworkMappingInput, bool) { 18777 return nil, false 18778} 18779 18780// AsFabricSpecificUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for VmmToAzureUpdateNetworkMappingInput. 18781func (vtaunmi VmmToAzureUpdateNetworkMappingInput) AsFabricSpecificUpdateNetworkMappingInput() (*FabricSpecificUpdateNetworkMappingInput, bool) { 18782 return nil, false 18783} 18784 18785// AsBasicFabricSpecificUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for VmmToAzureUpdateNetworkMappingInput. 18786func (vtaunmi VmmToAzureUpdateNetworkMappingInput) AsBasicFabricSpecificUpdateNetworkMappingInput() (BasicFabricSpecificUpdateNetworkMappingInput, bool) { 18787 return &vtaunmi, true 18788} 18789 18790// VmmToVmmCreateNetworkMappingInput create network mappings input properties/behavior specific to vmm to 18791// vmm Network mapping. 18792type VmmToVmmCreateNetworkMappingInput struct { 18793 // InstanceType - Possible values include: 'InstanceTypeFabricSpecificCreateNetworkMappingInput', 'InstanceTypeAzureToAzure', 'InstanceTypeVmmToAzure', 'InstanceTypeVmmToVmm' 18794 InstanceType InstanceTypeBasicFabricSpecificCreateNetworkMappingInput `json:"instanceType,omitempty"` 18795} 18796 18797// MarshalJSON is the custom marshaler for VmmToVmmCreateNetworkMappingInput. 18798func (vtvcnmi VmmToVmmCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { 18799 vtvcnmi.InstanceType = InstanceTypeVmmToVmm 18800 objectMap := make(map[string]interface{}) 18801 if vtvcnmi.InstanceType != "" { 18802 objectMap["instanceType"] = vtvcnmi.InstanceType 18803 } 18804 return json.Marshal(objectMap) 18805} 18806 18807// AsAzureToAzureCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for VmmToVmmCreateNetworkMappingInput. 18808func (vtvcnmi VmmToVmmCreateNetworkMappingInput) AsAzureToAzureCreateNetworkMappingInput() (*AzureToAzureCreateNetworkMappingInput, bool) { 18809 return nil, false 18810} 18811 18812// AsVmmToAzureCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for VmmToVmmCreateNetworkMappingInput. 18813func (vtvcnmi VmmToVmmCreateNetworkMappingInput) AsVmmToAzureCreateNetworkMappingInput() (*VmmToAzureCreateNetworkMappingInput, bool) { 18814 return nil, false 18815} 18816 18817// AsVmmToVmmCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for VmmToVmmCreateNetworkMappingInput. 18818func (vtvcnmi VmmToVmmCreateNetworkMappingInput) AsVmmToVmmCreateNetworkMappingInput() (*VmmToVmmCreateNetworkMappingInput, bool) { 18819 return &vtvcnmi, true 18820} 18821 18822// AsFabricSpecificCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for VmmToVmmCreateNetworkMappingInput. 18823func (vtvcnmi VmmToVmmCreateNetworkMappingInput) AsFabricSpecificCreateNetworkMappingInput() (*FabricSpecificCreateNetworkMappingInput, bool) { 18824 return nil, false 18825} 18826 18827// AsBasicFabricSpecificCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for VmmToVmmCreateNetworkMappingInput. 18828func (vtvcnmi VmmToVmmCreateNetworkMappingInput) AsBasicFabricSpecificCreateNetworkMappingInput() (BasicFabricSpecificCreateNetworkMappingInput, bool) { 18829 return &vtvcnmi, true 18830} 18831 18832// VmmToVmmNetworkMappingSettings e2E Network Mapping fabric specific settings. 18833type VmmToVmmNetworkMappingSettings struct { 18834 // InstanceType - Possible values include: 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeNetworkMappingFabricSpecificSettings', 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeAzureToAzure', 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToAzure', 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToVmm' 18835 InstanceType InstanceTypeBasicNetworkMappingFabricSpecificSettings `json:"instanceType,omitempty"` 18836} 18837 18838// MarshalJSON is the custom marshaler for VmmToVmmNetworkMappingSettings. 18839func (vtvnms VmmToVmmNetworkMappingSettings) MarshalJSON() ([]byte, error) { 18840 vtvnms.InstanceType = InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToVmm 18841 objectMap := make(map[string]interface{}) 18842 if vtvnms.InstanceType != "" { 18843 objectMap["instanceType"] = vtvnms.InstanceType 18844 } 18845 return json.Marshal(objectMap) 18846} 18847 18848// AsAzureToAzureNetworkMappingSettings is the BasicNetworkMappingFabricSpecificSettings implementation for VmmToVmmNetworkMappingSettings. 18849func (vtvnms VmmToVmmNetworkMappingSettings) AsAzureToAzureNetworkMappingSettings() (*AzureToAzureNetworkMappingSettings, bool) { 18850 return nil, false 18851} 18852 18853// AsVmmToAzureNetworkMappingSettings is the BasicNetworkMappingFabricSpecificSettings implementation for VmmToVmmNetworkMappingSettings. 18854func (vtvnms VmmToVmmNetworkMappingSettings) AsVmmToAzureNetworkMappingSettings() (*VmmToAzureNetworkMappingSettings, bool) { 18855 return nil, false 18856} 18857 18858// AsVmmToVmmNetworkMappingSettings is the BasicNetworkMappingFabricSpecificSettings implementation for VmmToVmmNetworkMappingSettings. 18859func (vtvnms VmmToVmmNetworkMappingSettings) AsVmmToVmmNetworkMappingSettings() (*VmmToVmmNetworkMappingSettings, bool) { 18860 return &vtvnms, true 18861} 18862 18863// AsNetworkMappingFabricSpecificSettings is the BasicNetworkMappingFabricSpecificSettings implementation for VmmToVmmNetworkMappingSettings. 18864func (vtvnms VmmToVmmNetworkMappingSettings) AsNetworkMappingFabricSpecificSettings() (*NetworkMappingFabricSpecificSettings, bool) { 18865 return nil, false 18866} 18867 18868// AsBasicNetworkMappingFabricSpecificSettings is the BasicNetworkMappingFabricSpecificSettings implementation for VmmToVmmNetworkMappingSettings. 18869func (vtvnms VmmToVmmNetworkMappingSettings) AsBasicNetworkMappingFabricSpecificSettings() (BasicNetworkMappingFabricSpecificSettings, bool) { 18870 return &vtvnms, true 18871} 18872 18873// VmmToVmmUpdateNetworkMappingInput update network mappings input properties/behavior specific to vmm to 18874// vmm. 18875type VmmToVmmUpdateNetworkMappingInput struct { 18876 // InstanceType - Possible values include: 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeFabricSpecificUpdateNetworkMappingInput', 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeAzureToAzure', 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToAzure', 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToVmm' 18877 InstanceType InstanceTypeBasicFabricSpecificUpdateNetworkMappingInput `json:"instanceType,omitempty"` 18878} 18879 18880// MarshalJSON is the custom marshaler for VmmToVmmUpdateNetworkMappingInput. 18881func (vtvunmi VmmToVmmUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { 18882 vtvunmi.InstanceType = InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToVmm 18883 objectMap := make(map[string]interface{}) 18884 if vtvunmi.InstanceType != "" { 18885 objectMap["instanceType"] = vtvunmi.InstanceType 18886 } 18887 return json.Marshal(objectMap) 18888} 18889 18890// AsAzureToAzureUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for VmmToVmmUpdateNetworkMappingInput. 18891func (vtvunmi VmmToVmmUpdateNetworkMappingInput) AsAzureToAzureUpdateNetworkMappingInput() (*AzureToAzureUpdateNetworkMappingInput, bool) { 18892 return nil, false 18893} 18894 18895// AsVmmToAzureUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for VmmToVmmUpdateNetworkMappingInput. 18896func (vtvunmi VmmToVmmUpdateNetworkMappingInput) AsVmmToAzureUpdateNetworkMappingInput() (*VmmToAzureUpdateNetworkMappingInput, bool) { 18897 return nil, false 18898} 18899 18900// AsVmmToVmmUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for VmmToVmmUpdateNetworkMappingInput. 18901func (vtvunmi VmmToVmmUpdateNetworkMappingInput) AsVmmToVmmUpdateNetworkMappingInput() (*VmmToVmmUpdateNetworkMappingInput, bool) { 18902 return &vtvunmi, true 18903} 18904 18905// AsFabricSpecificUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for VmmToVmmUpdateNetworkMappingInput. 18906func (vtvunmi VmmToVmmUpdateNetworkMappingInput) AsFabricSpecificUpdateNetworkMappingInput() (*FabricSpecificUpdateNetworkMappingInput, bool) { 18907 return nil, false 18908} 18909 18910// AsBasicFabricSpecificUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for VmmToVmmUpdateNetworkMappingInput. 18911func (vtvunmi VmmToVmmUpdateNetworkMappingInput) AsBasicFabricSpecificUpdateNetworkMappingInput() (BasicFabricSpecificUpdateNetworkMappingInput, bool) { 18912 return &vtvunmi, true 18913} 18914 18915// VMNicDetails hyper V VM network details. 18916type VMNicDetails struct { 18917 // NicID - The nic Id. 18918 NicID *string `json:"nicId,omitempty"` 18919 // ReplicaNicID - The replica nic Id. 18920 ReplicaNicID *string `json:"replicaNicId,omitempty"` 18921 // SourceNicArmID - The source nic ARM Id. 18922 SourceNicArmID *string `json:"sourceNicArmId,omitempty"` 18923 // VMSubnetName - VM subnet name. 18924 VMSubnetName *string `json:"vMSubnetName,omitempty"` 18925 // VMNetworkName - VM network name. 18926 VMNetworkName *string `json:"vMNetworkName,omitempty"` 18927 // RecoveryVMNetworkID - Recovery VM network Id. 18928 RecoveryVMNetworkID *string `json:"recoveryVMNetworkId,omitempty"` 18929 // RecoveryVMSubnetName - Recovery VM subnet name. 18930 RecoveryVMSubnetName *string `json:"recoveryVMSubnetName,omitempty"` 18931 // IPAddressType - Ip address type. 18932 IPAddressType *string `json:"ipAddressType,omitempty"` 18933 // PrimaryNicStaticIPAddress - Primary nic static IP address. 18934 PrimaryNicStaticIPAddress *string `json:"primaryNicStaticIPAddress,omitempty"` 18935 // ReplicaNicStaticIPAddress - Replica nic static IP address. 18936 ReplicaNicStaticIPAddress *string `json:"replicaNicStaticIPAddress,omitempty"` 18937 // SelectionType - Selection type for failover. 18938 SelectionType *string `json:"selectionType,omitempty"` 18939 // RecoveryNicIPAddressType - IP allocation type for recovery VM. 18940 RecoveryNicIPAddressType *string `json:"recoveryNicIpAddressType,omitempty"` 18941} 18942 18943// VMNicInputDetails hyper V VM network input details. 18944type VMNicInputDetails struct { 18945 // NicID - The nic Id. 18946 NicID *string `json:"nicId,omitempty"` 18947 // RecoveryVMSubnetName - Recovery VM subnet name. 18948 RecoveryVMSubnetName *string `json:"recoveryVMSubnetName,omitempty"` 18949 // ReplicaNicStaticIPAddress - Replica nic static IP address. 18950 ReplicaNicStaticIPAddress *string `json:"replicaNicStaticIPAddress,omitempty"` 18951 // SelectionType - Selection type for failover. 18952 SelectionType *string `json:"selectionType,omitempty"` 18953} 18954 18955// VMNicUpdatesTaskDetails this class represents the vm NicUpdates task details. 18956type VMNicUpdatesTaskDetails struct { 18957 // VMID - Virtual machine Id. 18958 VMID *string `json:"vmId,omitempty"` 18959 // NicID - Nic Id. 18960 NicID *string `json:"nicId,omitempty"` 18961 // Name - Name of the Nic. 18962 Name *string `json:"name,omitempty"` 18963 // InstanceType - Possible values include: 'InstanceTypeTaskTypeDetails', 'InstanceTypeJobTaskDetails', 'InstanceTypeVirtualMachineTaskDetails', 'InstanceTypeFabricReplicationGroupTaskDetails', 'InstanceTypeManualActionTaskDetails', 'InstanceTypeScriptActionTaskDetails', 'InstanceTypeVMNicUpdatesTaskDetails', 'InstanceTypeConsistencyCheckTaskDetails', 'InstanceTypeAutomationRunbookTaskDetails' 18964 InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"` 18965} 18966 18967// MarshalJSON is the custom marshaler for VMNicUpdatesTaskDetails. 18968func (vnutd VMNicUpdatesTaskDetails) MarshalJSON() ([]byte, error) { 18969 vnutd.InstanceType = InstanceTypeVMNicUpdatesTaskDetails 18970 objectMap := make(map[string]interface{}) 18971 if vnutd.VMID != nil { 18972 objectMap["vmId"] = vnutd.VMID 18973 } 18974 if vnutd.NicID != nil { 18975 objectMap["nicId"] = vnutd.NicID 18976 } 18977 if vnutd.Name != nil { 18978 objectMap["name"] = vnutd.Name 18979 } 18980 if vnutd.InstanceType != "" { 18981 objectMap["instanceType"] = vnutd.InstanceType 18982 } 18983 return json.Marshal(objectMap) 18984} 18985 18986// AsJobTaskDetails is the BasicTaskTypeDetails implementation for VMNicUpdatesTaskDetails. 18987func (vnutd VMNicUpdatesTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) { 18988 return nil, false 18989} 18990 18991// AsVirtualMachineTaskDetails is the BasicTaskTypeDetails implementation for VMNicUpdatesTaskDetails. 18992func (vnutd VMNicUpdatesTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) { 18993 return nil, false 18994} 18995 18996// AsFabricReplicationGroupTaskDetails is the BasicTaskTypeDetails implementation for VMNicUpdatesTaskDetails. 18997func (vnutd VMNicUpdatesTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) { 18998 return nil, false 18999} 19000 19001// AsManualActionTaskDetails is the BasicTaskTypeDetails implementation for VMNicUpdatesTaskDetails. 19002func (vnutd VMNicUpdatesTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) { 19003 return nil, false 19004} 19005 19006// AsScriptActionTaskDetails is the BasicTaskTypeDetails implementation for VMNicUpdatesTaskDetails. 19007func (vnutd VMNicUpdatesTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) { 19008 return nil, false 19009} 19010 19011// AsVMNicUpdatesTaskDetails is the BasicTaskTypeDetails implementation for VMNicUpdatesTaskDetails. 19012func (vnutd VMNicUpdatesTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) { 19013 return &vnutd, true 19014} 19015 19016// AsConsistencyCheckTaskDetails is the BasicTaskTypeDetails implementation for VMNicUpdatesTaskDetails. 19017func (vnutd VMNicUpdatesTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) { 19018 return nil, false 19019} 19020 19021// AsAutomationRunbookTaskDetails is the BasicTaskTypeDetails implementation for VMNicUpdatesTaskDetails. 19022func (vnutd VMNicUpdatesTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) { 19023 return nil, false 19024} 19025 19026// AsTaskTypeDetails is the BasicTaskTypeDetails implementation for VMNicUpdatesTaskDetails. 19027func (vnutd VMNicUpdatesTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) { 19028 return nil, false 19029} 19030 19031// AsBasicTaskTypeDetails is the BasicTaskTypeDetails implementation for VMNicUpdatesTaskDetails. 19032func (vnutd VMNicUpdatesTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) { 19033 return &vnutd, true 19034} 19035 19036// VMwareCbtPolicyCreationInput vMware Cbt Policy creation input. 19037type VMwareCbtPolicyCreationInput struct { 19038 // RecoveryPointHistory - The duration in minutes until which the recovery points need to be stored. 19039 RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` 19040 // CrashConsistentFrequencyInMinutes - The crash consistent snapshot frequency (in minutes). 19041 CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"` 19042 // AppConsistentFrequencyInMinutes - The app consistent snapshot frequency (in minutes). 19043 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` 19044 // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypePolicyProviderSpecificInput', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeVMwareCbt' 19045 InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"` 19046} 19047 19048// MarshalJSON is the custom marshaler for VMwareCbtPolicyCreationInput. 19049func (vmcpci VMwareCbtPolicyCreationInput) MarshalJSON() ([]byte, error) { 19050 vmcpci.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeVMwareCbt 19051 objectMap := make(map[string]interface{}) 19052 if vmcpci.RecoveryPointHistory != nil { 19053 objectMap["recoveryPointHistory"] = vmcpci.RecoveryPointHistory 19054 } 19055 if vmcpci.CrashConsistentFrequencyInMinutes != nil { 19056 objectMap["crashConsistentFrequencyInMinutes"] = vmcpci.CrashConsistentFrequencyInMinutes 19057 } 19058 if vmcpci.AppConsistentFrequencyInMinutes != nil { 19059 objectMap["appConsistentFrequencyInMinutes"] = vmcpci.AppConsistentFrequencyInMinutes 19060 } 19061 if vmcpci.InstanceType != "" { 19062 objectMap["instanceType"] = vmcpci.InstanceType 19063 } 19064 return json.Marshal(objectMap) 19065} 19066 19067// AsHyperVReplicaAzurePolicyInput is the BasicPolicyProviderSpecificInput implementation for VMwareCbtPolicyCreationInput. 19068func (vmcpci VMwareCbtPolicyCreationInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) { 19069 return nil, false 19070} 19071 19072// AsHyperVReplicaPolicyInput is the BasicPolicyProviderSpecificInput implementation for VMwareCbtPolicyCreationInput. 19073func (vmcpci VMwareCbtPolicyCreationInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) { 19074 return nil, false 19075} 19076 19077// AsHyperVReplicaBluePolicyInput is the BasicPolicyProviderSpecificInput implementation for VMwareCbtPolicyCreationInput. 19078func (vmcpci VMwareCbtPolicyCreationInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) { 19079 return nil, false 19080} 19081 19082// AsInMageAzureV2PolicyInput is the BasicPolicyProviderSpecificInput implementation for VMwareCbtPolicyCreationInput. 19083func (vmcpci VMwareCbtPolicyCreationInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) { 19084 return nil, false 19085} 19086 19087// AsInMagePolicyInput is the BasicPolicyProviderSpecificInput implementation for VMwareCbtPolicyCreationInput. 19088func (vmcpci VMwareCbtPolicyCreationInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) { 19089 return nil, false 19090} 19091 19092// AsA2APolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for VMwareCbtPolicyCreationInput. 19093func (vmcpci VMwareCbtPolicyCreationInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) { 19094 return nil, false 19095} 19096 19097// AsVMwareCbtPolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for VMwareCbtPolicyCreationInput. 19098func (vmcpci VMwareCbtPolicyCreationInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) { 19099 return &vmcpci, true 19100} 19101 19102// AsPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for VMwareCbtPolicyCreationInput. 19103func (vmcpci VMwareCbtPolicyCreationInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) { 19104 return nil, false 19105} 19106 19107// AsBasicPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for VMwareCbtPolicyCreationInput. 19108func (vmcpci VMwareCbtPolicyCreationInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) { 19109 return &vmcpci, true 19110} 19111 19112// VmwareCbtPolicyDetails vMware Cbt specific policy details. 19113type VmwareCbtPolicyDetails struct { 19114 // RecoveryPointThresholdInMinutes - The recovery point threshold in minutes. 19115 RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"` 19116 // RecoveryPointHistory - The duration in minutes until which the recovery points need to be stored. 19117 RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` 19118 // AppConsistentFrequencyInMinutes - The app consistent snapshot frequency in minutes. 19119 AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` 19120 // CrashConsistentFrequencyInMinutes - The crash consistent snapshot frequency in minutes. 19121 CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"` 19122 // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypePolicyProviderSpecificDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt' 19123 InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"` 19124} 19125 19126// MarshalJSON is the custom marshaler for VmwareCbtPolicyDetails. 19127func (vcpd VmwareCbtPolicyDetails) MarshalJSON() ([]byte, error) { 19128 vcpd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt 19129 objectMap := make(map[string]interface{}) 19130 if vcpd.RecoveryPointThresholdInMinutes != nil { 19131 objectMap["recoveryPointThresholdInMinutes"] = vcpd.RecoveryPointThresholdInMinutes 19132 } 19133 if vcpd.RecoveryPointHistory != nil { 19134 objectMap["recoveryPointHistory"] = vcpd.RecoveryPointHistory 19135 } 19136 if vcpd.AppConsistentFrequencyInMinutes != nil { 19137 objectMap["appConsistentFrequencyInMinutes"] = vcpd.AppConsistentFrequencyInMinutes 19138 } 19139 if vcpd.CrashConsistentFrequencyInMinutes != nil { 19140 objectMap["crashConsistentFrequencyInMinutes"] = vcpd.CrashConsistentFrequencyInMinutes 19141 } 19142 if vcpd.InstanceType != "" { 19143 objectMap["instanceType"] = vcpd.InstanceType 19144 } 19145 return json.Marshal(objectMap) 19146} 19147 19148// AsHyperVReplicaAzurePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for VmwareCbtPolicyDetails. 19149func (vcpd VmwareCbtPolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) { 19150 return nil, false 19151} 19152 19153// AsHyperVReplicaBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for VmwareCbtPolicyDetails. 19154func (vcpd VmwareCbtPolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) { 19155 return nil, false 19156} 19157 19158// AsHyperVReplicaPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for VmwareCbtPolicyDetails. 19159func (vcpd VmwareCbtPolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) { 19160 return nil, false 19161} 19162 19163// AsHyperVReplicaBluePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for VmwareCbtPolicyDetails. 19164func (vcpd VmwareCbtPolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) { 19165 return nil, false 19166} 19167 19168// AsInMageBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for VmwareCbtPolicyDetails. 19169func (vcpd VmwareCbtPolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) { 19170 return nil, false 19171} 19172 19173// AsInMageAzureV2PolicyDetails is the BasicPolicyProviderSpecificDetails implementation for VmwareCbtPolicyDetails. 19174func (vcpd VmwareCbtPolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) { 19175 return nil, false 19176} 19177 19178// AsInMagePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for VmwareCbtPolicyDetails. 19179func (vcpd VmwareCbtPolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) { 19180 return nil, false 19181} 19182 19183// AsA2APolicyDetails is the BasicPolicyProviderSpecificDetails implementation for VmwareCbtPolicyDetails. 19184func (vcpd VmwareCbtPolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) { 19185 return nil, false 19186} 19187 19188// AsRcmAzureMigrationPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for VmwareCbtPolicyDetails. 19189func (vcpd VmwareCbtPolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) { 19190 return nil, false 19191} 19192 19193// AsVmwareCbtPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for VmwareCbtPolicyDetails. 19194func (vcpd VmwareCbtPolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) { 19195 return &vcpd, true 19196} 19197 19198// AsPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for VmwareCbtPolicyDetails. 19199func (vcpd VmwareCbtPolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) { 19200 return nil, false 19201} 19202 19203// AsBasicPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for VmwareCbtPolicyDetails. 19204func (vcpd VmwareCbtPolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) { 19205 return &vcpd, true 19206} 19207 19208// VMwareDetails store the fabric details specific to the VMware fabric. 19209type VMwareDetails struct { 19210 // ProcessServers - The list of Process Servers associated with the fabric. 19211 ProcessServers *[]ProcessServer `json:"processServers,omitempty"` 19212 // MasterTargetServers - The list of Master Target servers associated with the fabric. 19213 MasterTargetServers *[]MasterTargetServer `json:"masterTargetServers,omitempty"` 19214 // RunAsAccounts - The list of run as accounts created on the server. 19215 RunAsAccounts *[]RunAsAccount `json:"runAsAccounts,omitempty"` 19216 // ReplicationPairCount - The number of replication pairs configured in this CS. 19217 ReplicationPairCount *string `json:"replicationPairCount,omitempty"` 19218 // ProcessServerCount - The number of process servers. 19219 ProcessServerCount *string `json:"processServerCount,omitempty"` 19220 // AgentCount - The number of source and target servers configured to talk to this CS. 19221 AgentCount *string `json:"agentCount,omitempty"` 19222 // ProtectedServers - The number of protected servers. 19223 ProtectedServers *string `json:"protectedServers,omitempty"` 19224 // SystemLoad - The percentage of the system load. 19225 SystemLoad *string `json:"systemLoad,omitempty"` 19226 // SystemLoadStatus - The system load status. 19227 SystemLoadStatus *string `json:"systemLoadStatus,omitempty"` 19228 // CPULoad - The percentage of the CPU load. 19229 CPULoad *string `json:"cpuLoad,omitempty"` 19230 // CPULoadStatus - The CPU load status. 19231 CPULoadStatus *string `json:"cpuLoadStatus,omitempty"` 19232 // TotalMemoryInBytes - The total memory. 19233 TotalMemoryInBytes *int64 `json:"totalMemoryInBytes,omitempty"` 19234 // AvailableMemoryInBytes - The available memory. 19235 AvailableMemoryInBytes *int64 `json:"availableMemoryInBytes,omitempty"` 19236 // MemoryUsageStatus - The memory usage status. 19237 MemoryUsageStatus *string `json:"memoryUsageStatus,omitempty"` 19238 // TotalSpaceInBytes - The total space. 19239 TotalSpaceInBytes *int64 `json:"totalSpaceInBytes,omitempty"` 19240 // AvailableSpaceInBytes - The available space. 19241 AvailableSpaceInBytes *int64 `json:"availableSpaceInBytes,omitempty"` 19242 // SpaceUsageStatus - The space usage status. 19243 SpaceUsageStatus *string `json:"spaceUsageStatus,omitempty"` 19244 // WebLoad - The web load. 19245 WebLoad *string `json:"webLoad,omitempty"` 19246 // WebLoadStatus - The web load status. 19247 WebLoadStatus *string `json:"webLoadStatus,omitempty"` 19248 // DatabaseServerLoad - The database server load. 19249 DatabaseServerLoad *string `json:"databaseServerLoad,omitempty"` 19250 // DatabaseServerLoadStatus - The database server load status. 19251 DatabaseServerLoadStatus *string `json:"databaseServerLoadStatus,omitempty"` 19252 // CsServiceStatus - The CS service status. 19253 CsServiceStatus *string `json:"csServiceStatus,omitempty"` 19254 // IPAddress - The IP address. 19255 IPAddress *string `json:"ipAddress,omitempty"` 19256 // AgentVersion - The agent Version. 19257 AgentVersion *string `json:"agentVersion,omitempty"` 19258 // HostName - The host name. 19259 HostName *string `json:"hostName,omitempty"` 19260 // LastHeartbeat - The last heartbeat received from CS server. 19261 LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"` 19262 // VersionStatus - Version status 19263 VersionStatus *string `json:"versionStatus,omitempty"` 19264 // SslCertExpiryDate - CS SSL cert expiry date. 19265 SslCertExpiryDate *date.Time `json:"sslCertExpiryDate,omitempty"` 19266 // SslCertExpiryRemainingDays - CS SSL cert expiry date. 19267 SslCertExpiryRemainingDays *int32 `json:"sslCertExpiryRemainingDays,omitempty"` 19268 // PsTemplateVersion - PS template version. 19269 PsTemplateVersion *string `json:"psTemplateVersion,omitempty"` 19270 // InstanceType - Possible values include: 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeFabricSpecificDetails', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeAzure', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMM', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeHyperVSite', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMware', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMwareV2' 19271 InstanceType InstanceTypeBasicFabricSpecificDetails `json:"instanceType,omitempty"` 19272} 19273 19274// MarshalJSON is the custom marshaler for VMwareDetails. 19275func (vmd VMwareDetails) MarshalJSON() ([]byte, error) { 19276 vmd.InstanceType = InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMware 19277 objectMap := make(map[string]interface{}) 19278 if vmd.ProcessServers != nil { 19279 objectMap["processServers"] = vmd.ProcessServers 19280 } 19281 if vmd.MasterTargetServers != nil { 19282 objectMap["masterTargetServers"] = vmd.MasterTargetServers 19283 } 19284 if vmd.RunAsAccounts != nil { 19285 objectMap["runAsAccounts"] = vmd.RunAsAccounts 19286 } 19287 if vmd.ReplicationPairCount != nil { 19288 objectMap["replicationPairCount"] = vmd.ReplicationPairCount 19289 } 19290 if vmd.ProcessServerCount != nil { 19291 objectMap["processServerCount"] = vmd.ProcessServerCount 19292 } 19293 if vmd.AgentCount != nil { 19294 objectMap["agentCount"] = vmd.AgentCount 19295 } 19296 if vmd.ProtectedServers != nil { 19297 objectMap["protectedServers"] = vmd.ProtectedServers 19298 } 19299 if vmd.SystemLoad != nil { 19300 objectMap["systemLoad"] = vmd.SystemLoad 19301 } 19302 if vmd.SystemLoadStatus != nil { 19303 objectMap["systemLoadStatus"] = vmd.SystemLoadStatus 19304 } 19305 if vmd.CPULoad != nil { 19306 objectMap["cpuLoad"] = vmd.CPULoad 19307 } 19308 if vmd.CPULoadStatus != nil { 19309 objectMap["cpuLoadStatus"] = vmd.CPULoadStatus 19310 } 19311 if vmd.TotalMemoryInBytes != nil { 19312 objectMap["totalMemoryInBytes"] = vmd.TotalMemoryInBytes 19313 } 19314 if vmd.AvailableMemoryInBytes != nil { 19315 objectMap["availableMemoryInBytes"] = vmd.AvailableMemoryInBytes 19316 } 19317 if vmd.MemoryUsageStatus != nil { 19318 objectMap["memoryUsageStatus"] = vmd.MemoryUsageStatus 19319 } 19320 if vmd.TotalSpaceInBytes != nil { 19321 objectMap["totalSpaceInBytes"] = vmd.TotalSpaceInBytes 19322 } 19323 if vmd.AvailableSpaceInBytes != nil { 19324 objectMap["availableSpaceInBytes"] = vmd.AvailableSpaceInBytes 19325 } 19326 if vmd.SpaceUsageStatus != nil { 19327 objectMap["spaceUsageStatus"] = vmd.SpaceUsageStatus 19328 } 19329 if vmd.WebLoad != nil { 19330 objectMap["webLoad"] = vmd.WebLoad 19331 } 19332 if vmd.WebLoadStatus != nil { 19333 objectMap["webLoadStatus"] = vmd.WebLoadStatus 19334 } 19335 if vmd.DatabaseServerLoad != nil { 19336 objectMap["databaseServerLoad"] = vmd.DatabaseServerLoad 19337 } 19338 if vmd.DatabaseServerLoadStatus != nil { 19339 objectMap["databaseServerLoadStatus"] = vmd.DatabaseServerLoadStatus 19340 } 19341 if vmd.CsServiceStatus != nil { 19342 objectMap["csServiceStatus"] = vmd.CsServiceStatus 19343 } 19344 if vmd.IPAddress != nil { 19345 objectMap["ipAddress"] = vmd.IPAddress 19346 } 19347 if vmd.AgentVersion != nil { 19348 objectMap["agentVersion"] = vmd.AgentVersion 19349 } 19350 if vmd.HostName != nil { 19351 objectMap["hostName"] = vmd.HostName 19352 } 19353 if vmd.LastHeartbeat != nil { 19354 objectMap["lastHeartbeat"] = vmd.LastHeartbeat 19355 } 19356 if vmd.VersionStatus != nil { 19357 objectMap["versionStatus"] = vmd.VersionStatus 19358 } 19359 if vmd.SslCertExpiryDate != nil { 19360 objectMap["sslCertExpiryDate"] = vmd.SslCertExpiryDate 19361 } 19362 if vmd.SslCertExpiryRemainingDays != nil { 19363 objectMap["sslCertExpiryRemainingDays"] = vmd.SslCertExpiryRemainingDays 19364 } 19365 if vmd.PsTemplateVersion != nil { 19366 objectMap["psTemplateVersion"] = vmd.PsTemplateVersion 19367 } 19368 if vmd.InstanceType != "" { 19369 objectMap["instanceType"] = vmd.InstanceType 19370 } 19371 return json.Marshal(objectMap) 19372} 19373 19374// AsAzureFabricSpecificDetails is the BasicFabricSpecificDetails implementation for VMwareDetails. 19375func (vmd VMwareDetails) AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool) { 19376 return nil, false 19377} 19378 19379// AsVmmDetails is the BasicFabricSpecificDetails implementation for VMwareDetails. 19380func (vmd VMwareDetails) AsVmmDetails() (*VmmDetails, bool) { 19381 return nil, false 19382} 19383 19384// AsHyperVSiteDetails is the BasicFabricSpecificDetails implementation for VMwareDetails. 19385func (vmd VMwareDetails) AsHyperVSiteDetails() (*HyperVSiteDetails, bool) { 19386 return nil, false 19387} 19388 19389// AsVMwareDetails is the BasicFabricSpecificDetails implementation for VMwareDetails. 19390func (vmd VMwareDetails) AsVMwareDetails() (*VMwareDetails, bool) { 19391 return &vmd, true 19392} 19393 19394// AsVMwareV2FabricSpecificDetails is the BasicFabricSpecificDetails implementation for VMwareDetails. 19395func (vmd VMwareDetails) AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool) { 19396 return nil, false 19397} 19398 19399// AsFabricSpecificDetails is the BasicFabricSpecificDetails implementation for VMwareDetails. 19400func (vmd VMwareDetails) AsFabricSpecificDetails() (*FabricSpecificDetails, bool) { 19401 return nil, false 19402} 19403 19404// AsBasicFabricSpecificDetails is the BasicFabricSpecificDetails implementation for VMwareDetails. 19405func (vmd VMwareDetails) AsBasicFabricSpecificDetails() (BasicFabricSpecificDetails, bool) { 19406 return &vmd, true 19407} 19408 19409// VMwareV2FabricCreationInput fabric provider specific settings. 19410type VMwareV2FabricCreationInput struct { 19411 // InstanceType - Possible values include: 'InstanceTypeFabricSpecificCreationInput', 'InstanceTypeAzure', 'InstanceTypeVMwareV2' 19412 InstanceType InstanceTypeBasicFabricSpecificCreationInput `json:"instanceType,omitempty"` 19413} 19414 19415// MarshalJSON is the custom marshaler for VMwareV2FabricCreationInput. 19416func (vmvfci VMwareV2FabricCreationInput) MarshalJSON() ([]byte, error) { 19417 vmvfci.InstanceType = InstanceTypeVMwareV2 19418 objectMap := make(map[string]interface{}) 19419 if vmvfci.InstanceType != "" { 19420 objectMap["instanceType"] = vmvfci.InstanceType 19421 } 19422 return json.Marshal(objectMap) 19423} 19424 19425// AsAzureFabricCreationInput is the BasicFabricSpecificCreationInput implementation for VMwareV2FabricCreationInput. 19426func (vmvfci VMwareV2FabricCreationInput) AsAzureFabricCreationInput() (*AzureFabricCreationInput, bool) { 19427 return nil, false 19428} 19429 19430// AsVMwareV2FabricCreationInput is the BasicFabricSpecificCreationInput implementation for VMwareV2FabricCreationInput. 19431func (vmvfci VMwareV2FabricCreationInput) AsVMwareV2FabricCreationInput() (*VMwareV2FabricCreationInput, bool) { 19432 return &vmvfci, true 19433} 19434 19435// AsFabricSpecificCreationInput is the BasicFabricSpecificCreationInput implementation for VMwareV2FabricCreationInput. 19436func (vmvfci VMwareV2FabricCreationInput) AsFabricSpecificCreationInput() (*FabricSpecificCreationInput, bool) { 19437 return nil, false 19438} 19439 19440// AsBasicFabricSpecificCreationInput is the BasicFabricSpecificCreationInput implementation for VMwareV2FabricCreationInput. 19441func (vmvfci VMwareV2FabricCreationInput) AsBasicFabricSpecificCreationInput() (BasicFabricSpecificCreationInput, bool) { 19442 return &vmvfci, true 19443} 19444 19445// VMwareV2FabricSpecificDetails vMwareV2 fabric Specific Details. 19446type VMwareV2FabricSpecificDetails struct { 19447 // SrsServiceEndpoint - The endpoint for making requests to the SRS Service. 19448 SrsServiceEndpoint *string `json:"srsServiceEndpoint,omitempty"` 19449 // RcmServiceEndpoint - The endpoint for making requests to the RCM Service. 19450 RcmServiceEndpoint *string `json:"rcmServiceEndpoint,omitempty"` 19451 // InstanceType - Possible values include: 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeFabricSpecificDetails', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeAzure', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMM', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeHyperVSite', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMware', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMwareV2' 19452 InstanceType InstanceTypeBasicFabricSpecificDetails `json:"instanceType,omitempty"` 19453} 19454 19455// MarshalJSON is the custom marshaler for VMwareV2FabricSpecificDetails. 19456func (vmvfsd VMwareV2FabricSpecificDetails) MarshalJSON() ([]byte, error) { 19457 vmvfsd.InstanceType = InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMwareV2 19458 objectMap := make(map[string]interface{}) 19459 if vmvfsd.SrsServiceEndpoint != nil { 19460 objectMap["srsServiceEndpoint"] = vmvfsd.SrsServiceEndpoint 19461 } 19462 if vmvfsd.RcmServiceEndpoint != nil { 19463 objectMap["rcmServiceEndpoint"] = vmvfsd.RcmServiceEndpoint 19464 } 19465 if vmvfsd.InstanceType != "" { 19466 objectMap["instanceType"] = vmvfsd.InstanceType 19467 } 19468 return json.Marshal(objectMap) 19469} 19470 19471// AsAzureFabricSpecificDetails is the BasicFabricSpecificDetails implementation for VMwareV2FabricSpecificDetails. 19472func (vmvfsd VMwareV2FabricSpecificDetails) AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool) { 19473 return nil, false 19474} 19475 19476// AsVmmDetails is the BasicFabricSpecificDetails implementation for VMwareV2FabricSpecificDetails. 19477func (vmvfsd VMwareV2FabricSpecificDetails) AsVmmDetails() (*VmmDetails, bool) { 19478 return nil, false 19479} 19480 19481// AsHyperVSiteDetails is the BasicFabricSpecificDetails implementation for VMwareV2FabricSpecificDetails. 19482func (vmvfsd VMwareV2FabricSpecificDetails) AsHyperVSiteDetails() (*HyperVSiteDetails, bool) { 19483 return nil, false 19484} 19485 19486// AsVMwareDetails is the BasicFabricSpecificDetails implementation for VMwareV2FabricSpecificDetails. 19487func (vmvfsd VMwareV2FabricSpecificDetails) AsVMwareDetails() (*VMwareDetails, bool) { 19488 return nil, false 19489} 19490 19491// AsVMwareV2FabricSpecificDetails is the BasicFabricSpecificDetails implementation for VMwareV2FabricSpecificDetails. 19492func (vmvfsd VMwareV2FabricSpecificDetails) AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool) { 19493 return &vmvfsd, true 19494} 19495 19496// AsFabricSpecificDetails is the BasicFabricSpecificDetails implementation for VMwareV2FabricSpecificDetails. 19497func (vmvfsd VMwareV2FabricSpecificDetails) AsFabricSpecificDetails() (*FabricSpecificDetails, bool) { 19498 return nil, false 19499} 19500 19501// AsBasicFabricSpecificDetails is the BasicFabricSpecificDetails implementation for VMwareV2FabricSpecificDetails. 19502func (vmvfsd VMwareV2FabricSpecificDetails) AsBasicFabricSpecificDetails() (BasicFabricSpecificDetails, bool) { 19503 return &vmvfsd, true 19504} 19505 19506// VMwareVirtualMachineDetails vMware provider specific settings 19507type VMwareVirtualMachineDetails struct { 19508 // AgentGeneratedID - The ID generated by the InMage agent after it gets installed on guest. This is the ID to be used during InMage CreateProtection. 19509 AgentGeneratedID *string `json:"agentGeneratedId,omitempty"` 19510 // AgentInstalled - The value indicating if InMage scout agent is installed on guest. 19511 AgentInstalled *string `json:"agentInstalled,omitempty"` 19512 // OsType - The OsType installed on VM. 19513 OsType *string `json:"osType,omitempty"` 19514 // AgentVersion - The agent version. 19515 AgentVersion *string `json:"agentVersion,omitempty"` 19516 // IPAddress - The IP address. 19517 IPAddress *string `json:"ipAddress,omitempty"` 19518 // PoweredOn - The value indicating whether VM is powered on. 19519 PoweredOn *string `json:"poweredOn,omitempty"` 19520 // VCenterInfrastructureID - The VCenter infrastructure Id. 19521 VCenterInfrastructureID *string `json:"vCenterInfrastructureId,omitempty"` 19522 // DiscoveryType - A value indicating the discovery type of the machine. Value can be vCenter or physical. 19523 DiscoveryType *string `json:"discoveryType,omitempty"` 19524 // DiskDetails - The disk details. 19525 DiskDetails *[]InMageDiskDetails `json:"diskDetails,omitempty"` 19526 // ValidationErrors - The validation errors. 19527 ValidationErrors *[]HealthError `json:"validationErrors,omitempty"` 19528 // InstanceType - Possible values include: 'InstanceTypeConfigurationSettings', 'InstanceTypeHyperVVirtualMachine', 'InstanceTypeVMwareVirtualMachine', 'InstanceTypeReplicationGroupDetails' 19529 InstanceType InstanceTypeBasicConfigurationSettings `json:"instanceType,omitempty"` 19530} 19531 19532// MarshalJSON is the custom marshaler for VMwareVirtualMachineDetails. 19533func (vmvmd VMwareVirtualMachineDetails) MarshalJSON() ([]byte, error) { 19534 vmvmd.InstanceType = InstanceTypeVMwareVirtualMachine 19535 objectMap := make(map[string]interface{}) 19536 if vmvmd.AgentGeneratedID != nil { 19537 objectMap["agentGeneratedId"] = vmvmd.AgentGeneratedID 19538 } 19539 if vmvmd.AgentInstalled != nil { 19540 objectMap["agentInstalled"] = vmvmd.AgentInstalled 19541 } 19542 if vmvmd.OsType != nil { 19543 objectMap["osType"] = vmvmd.OsType 19544 } 19545 if vmvmd.AgentVersion != nil { 19546 objectMap["agentVersion"] = vmvmd.AgentVersion 19547 } 19548 if vmvmd.IPAddress != nil { 19549 objectMap["ipAddress"] = vmvmd.IPAddress 19550 } 19551 if vmvmd.PoweredOn != nil { 19552 objectMap["poweredOn"] = vmvmd.PoweredOn 19553 } 19554 if vmvmd.VCenterInfrastructureID != nil { 19555 objectMap["vCenterInfrastructureId"] = vmvmd.VCenterInfrastructureID 19556 } 19557 if vmvmd.DiscoveryType != nil { 19558 objectMap["discoveryType"] = vmvmd.DiscoveryType 19559 } 19560 if vmvmd.DiskDetails != nil { 19561 objectMap["diskDetails"] = vmvmd.DiskDetails 19562 } 19563 if vmvmd.ValidationErrors != nil { 19564 objectMap["validationErrors"] = vmvmd.ValidationErrors 19565 } 19566 if vmvmd.InstanceType != "" { 19567 objectMap["instanceType"] = vmvmd.InstanceType 19568 } 19569 return json.Marshal(objectMap) 19570} 19571 19572// AsHyperVVirtualMachineDetails is the BasicConfigurationSettings implementation for VMwareVirtualMachineDetails. 19573func (vmvmd VMwareVirtualMachineDetails) AsHyperVVirtualMachineDetails() (*HyperVVirtualMachineDetails, bool) { 19574 return nil, false 19575} 19576 19577// AsVMwareVirtualMachineDetails is the BasicConfigurationSettings implementation for VMwareVirtualMachineDetails. 19578func (vmvmd VMwareVirtualMachineDetails) AsVMwareVirtualMachineDetails() (*VMwareVirtualMachineDetails, bool) { 19579 return &vmvmd, true 19580} 19581 19582// AsReplicationGroupDetails is the BasicConfigurationSettings implementation for VMwareVirtualMachineDetails. 19583func (vmvmd VMwareVirtualMachineDetails) AsReplicationGroupDetails() (*ReplicationGroupDetails, bool) { 19584 return nil, false 19585} 19586 19587// AsConfigurationSettings is the BasicConfigurationSettings implementation for VMwareVirtualMachineDetails. 19588func (vmvmd VMwareVirtualMachineDetails) AsConfigurationSettings() (*ConfigurationSettings, bool) { 19589 return nil, false 19590} 19591 19592// AsBasicConfigurationSettings is the BasicConfigurationSettings implementation for VMwareVirtualMachineDetails. 19593func (vmvmd VMwareVirtualMachineDetails) AsBasicConfigurationSettings() (BasicConfigurationSettings, bool) { 19594 return &vmvmd, true 19595} 19596