1package backup 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/date" 14 "github.com/Azure/go-autorest/autorest/to" 15 "github.com/Azure/go-autorest/tracing" 16 "net/http" 17) 18 19// The package's fully qualified name. 20const fqdn = "github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2019-05-13/backup" 21 22// AzureBackupGoalFeatureSupportRequest azure backup goal feature specific request. 23type AzureBackupGoalFeatureSupportRequest struct { 24 // FeatureType - Possible values include: 'FeatureTypeFeatureSupportRequest', 'FeatureTypeAzureBackupGoals', 'FeatureTypeAzureVMResourceBackup' 25 FeatureType FeatureType `json:"featureType,omitempty"` 26} 27 28// MarshalJSON is the custom marshaler for AzureBackupGoalFeatureSupportRequest. 29func (abgfsr AzureBackupGoalFeatureSupportRequest) MarshalJSON() ([]byte, error) { 30 abgfsr.FeatureType = FeatureTypeAzureBackupGoals 31 objectMap := make(map[string]interface{}) 32 if abgfsr.FeatureType != "" { 33 objectMap["featureType"] = abgfsr.FeatureType 34 } 35 return json.Marshal(objectMap) 36} 37 38// AsAzureBackupGoalFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureBackupGoalFeatureSupportRequest. 39func (abgfsr AzureBackupGoalFeatureSupportRequest) AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool) { 40 return &abgfsr, true 41} 42 43// AsAzureVMResourceFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureBackupGoalFeatureSupportRequest. 44func (abgfsr AzureBackupGoalFeatureSupportRequest) AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool) { 45 return nil, false 46} 47 48// AsFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureBackupGoalFeatureSupportRequest. 49func (abgfsr AzureBackupGoalFeatureSupportRequest) AsFeatureSupportRequest() (*FeatureSupportRequest, bool) { 50 return nil, false 51} 52 53// AsBasicFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureBackupGoalFeatureSupportRequest. 54func (abgfsr AzureBackupGoalFeatureSupportRequest) AsBasicFeatureSupportRequest() (BasicFeatureSupportRequest, bool) { 55 return &abgfsr, true 56} 57 58// AzureBackupServerContainer azureBackupServer (DPMVenus) workload-specific protection container. 59type AzureBackupServerContainer struct { 60 // CanReRegister - Specifies whether the container is re-registrable. 61 CanReRegister *bool `json:"canReRegister,omitempty"` 62 // ContainerID - ID of container. 63 ContainerID *string `json:"containerId,omitempty"` 64 // ProtectedItemCount - Number of protected items in the BackupEngine 65 ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` 66 // DpmAgentVersion - Backup engine Agent version 67 DpmAgentVersion *string `json:"dpmAgentVersion,omitempty"` 68 // DpmServers - List of BackupEngines protecting the container 69 DpmServers *[]string `json:"dpmServers,omitempty"` 70 // UpgradeAvailable - To check if upgrade available 71 UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` 72 // ProtectionStatus - Protection status of the container. 73 ProtectionStatus *string `json:"protectionStatus,omitempty"` 74 // ExtendedInfo - Extended Info of the container. 75 ExtendedInfo *DPMContainerExtendedInfo `json:"extendedInfo,omitempty"` 76 // FriendlyName - Friendly name of the container. 77 FriendlyName *string `json:"friendlyName,omitempty"` 78 // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 79 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 80 // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. 81 RegistrationStatus *string `json:"registrationStatus,omitempty"` 82 // HealthStatus - Status of health of the container. 83 HealthStatus *string `json:"healthStatus,omitempty"` 84 // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' 85 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` 86} 87 88// MarshalJSON is the custom marshaler for AzureBackupServerContainer. 89func (absc AzureBackupServerContainer) MarshalJSON() ([]byte, error) { 90 absc.ContainerType = ContainerTypeAzureBackupServerContainer1 91 objectMap := make(map[string]interface{}) 92 if absc.CanReRegister != nil { 93 objectMap["canReRegister"] = absc.CanReRegister 94 } 95 if absc.ContainerID != nil { 96 objectMap["containerId"] = absc.ContainerID 97 } 98 if absc.ProtectedItemCount != nil { 99 objectMap["protectedItemCount"] = absc.ProtectedItemCount 100 } 101 if absc.DpmAgentVersion != nil { 102 objectMap["dpmAgentVersion"] = absc.DpmAgentVersion 103 } 104 if absc.DpmServers != nil { 105 objectMap["dpmServers"] = absc.DpmServers 106 } 107 if absc.UpgradeAvailable != nil { 108 objectMap["upgradeAvailable"] = absc.UpgradeAvailable 109 } 110 if absc.ProtectionStatus != nil { 111 objectMap["protectionStatus"] = absc.ProtectionStatus 112 } 113 if absc.ExtendedInfo != nil { 114 objectMap["extendedInfo"] = absc.ExtendedInfo 115 } 116 if absc.FriendlyName != nil { 117 objectMap["friendlyName"] = absc.FriendlyName 118 } 119 if absc.BackupManagementType != "" { 120 objectMap["backupManagementType"] = absc.BackupManagementType 121 } 122 if absc.RegistrationStatus != nil { 123 objectMap["registrationStatus"] = absc.RegistrationStatus 124 } 125 if absc.HealthStatus != nil { 126 objectMap["healthStatus"] = absc.HealthStatus 127 } 128 if absc.ContainerType != "" { 129 objectMap["containerType"] = absc.ContainerType 130 } 131 return json.Marshal(objectMap) 132} 133 134// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. 135func (absc AzureBackupServerContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { 136 return &absc, true 137} 138 139// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. 140func (absc AzureBackupServerContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { 141 return nil, false 142} 143 144// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. 145func (absc AzureBackupServerContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { 146 return nil, false 147} 148 149// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. 150func (absc AzureBackupServerContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { 151 return nil, false 152} 153 154// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. 155func (absc AzureBackupServerContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { 156 return nil, false 157} 158 159// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. 160func (absc AzureBackupServerContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { 161 return nil, false 162} 163 164// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. 165func (absc AzureBackupServerContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { 166 return nil, false 167} 168 169// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. 170func (absc AzureBackupServerContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { 171 return nil, false 172} 173 174// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. 175func (absc AzureBackupServerContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { 176 return nil, false 177} 178 179// AsDpmContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. 180func (absc AzureBackupServerContainer) AsDpmContainer() (*DpmContainer, bool) { 181 return nil, false 182} 183 184// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. 185func (absc AzureBackupServerContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { 186 return &absc, true 187} 188 189// AsGenericContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. 190func (absc AzureBackupServerContainer) AsGenericContainer() (*GenericContainer, bool) { 191 return nil, false 192} 193 194// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. 195func (absc AzureBackupServerContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { 196 return nil, false 197} 198 199// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. 200func (absc AzureBackupServerContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { 201 return nil, false 202} 203 204// AsMabContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. 205func (absc AzureBackupServerContainer) AsMabContainer() (*MabContainer, bool) { 206 return nil, false 207} 208 209// AsProtectionContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. 210func (absc AzureBackupServerContainer) AsProtectionContainer() (*ProtectionContainer, bool) { 211 return nil, false 212} 213 214// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. 215func (absc AzureBackupServerContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { 216 return &absc, true 217} 218 219// AzureBackupServerEngine backup engine type when Azure Backup Server is used to manage the backups. 220type AzureBackupServerEngine struct { 221 // FriendlyName - Friendly name of the backup engine. 222 FriendlyName *string `json:"friendlyName,omitempty"` 223 // BackupManagementType - Type of backup management for the backup engine. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 224 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 225 // RegistrationStatus - Registration status of the backup engine with the Recovery Services Vault. 226 RegistrationStatus *string `json:"registrationStatus,omitempty"` 227 // BackupEngineState - Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed} 228 BackupEngineState *string `json:"backupEngineState,omitempty"` 229 // HealthStatus - Backup status of the backup engine. 230 HealthStatus *string `json:"healthStatus,omitempty"` 231 // CanReRegister - Flag indicating if the backup engine be registered, once already registered. 232 CanReRegister *bool `json:"canReRegister,omitempty"` 233 // BackupEngineID - ID of the backup engine. 234 BackupEngineID *string `json:"backupEngineId,omitempty"` 235 // DpmVersion - Backup engine version 236 DpmVersion *string `json:"dpmVersion,omitempty"` 237 // AzureBackupAgentVersion - Backup agent version 238 AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"` 239 // IsAzureBackupAgentUpgradeAvailable - To check if backup agent upgrade available 240 IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"` 241 // IsDpmUpgradeAvailable - To check if backup engine upgrade available 242 IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"` 243 // ExtendedInfo - Extended info of the backupengine 244 ExtendedInfo *EngineExtendedInfo `json:"extendedInfo,omitempty"` 245 // BackupEngineType - Possible values include: 'BackupEngineTypeBackupEngineBase', 'BackupEngineTypeAzureBackupServerEngine', 'BackupEngineTypeDpmBackupEngine' 246 BackupEngineType EngineType `json:"backupEngineType,omitempty"` 247} 248 249// MarshalJSON is the custom marshaler for AzureBackupServerEngine. 250func (abse AzureBackupServerEngine) MarshalJSON() ([]byte, error) { 251 abse.BackupEngineType = BackupEngineTypeAzureBackupServerEngine 252 objectMap := make(map[string]interface{}) 253 if abse.FriendlyName != nil { 254 objectMap["friendlyName"] = abse.FriendlyName 255 } 256 if abse.BackupManagementType != "" { 257 objectMap["backupManagementType"] = abse.BackupManagementType 258 } 259 if abse.RegistrationStatus != nil { 260 objectMap["registrationStatus"] = abse.RegistrationStatus 261 } 262 if abse.BackupEngineState != nil { 263 objectMap["backupEngineState"] = abse.BackupEngineState 264 } 265 if abse.HealthStatus != nil { 266 objectMap["healthStatus"] = abse.HealthStatus 267 } 268 if abse.CanReRegister != nil { 269 objectMap["canReRegister"] = abse.CanReRegister 270 } 271 if abse.BackupEngineID != nil { 272 objectMap["backupEngineId"] = abse.BackupEngineID 273 } 274 if abse.DpmVersion != nil { 275 objectMap["dpmVersion"] = abse.DpmVersion 276 } 277 if abse.AzureBackupAgentVersion != nil { 278 objectMap["azureBackupAgentVersion"] = abse.AzureBackupAgentVersion 279 } 280 if abse.IsAzureBackupAgentUpgradeAvailable != nil { 281 objectMap["isAzureBackupAgentUpgradeAvailable"] = abse.IsAzureBackupAgentUpgradeAvailable 282 } 283 if abse.IsDpmUpgradeAvailable != nil { 284 objectMap["isDpmUpgradeAvailable"] = abse.IsDpmUpgradeAvailable 285 } 286 if abse.ExtendedInfo != nil { 287 objectMap["extendedInfo"] = abse.ExtendedInfo 288 } 289 if abse.BackupEngineType != "" { 290 objectMap["backupEngineType"] = abse.BackupEngineType 291 } 292 return json.Marshal(objectMap) 293} 294 295// AsAzureBackupServerEngine is the BasicEngineBase implementation for AzureBackupServerEngine. 296func (abse AzureBackupServerEngine) AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) { 297 return &abse, true 298} 299 300// AsDpmBackupEngine is the BasicEngineBase implementation for AzureBackupServerEngine. 301func (abse AzureBackupServerEngine) AsDpmBackupEngine() (*DpmBackupEngine, bool) { 302 return nil, false 303} 304 305// AsEngineBase is the BasicEngineBase implementation for AzureBackupServerEngine. 306func (abse AzureBackupServerEngine) AsEngineBase() (*EngineBase, bool) { 307 return nil, false 308} 309 310// AsBasicEngineBase is the BasicEngineBase implementation for AzureBackupServerEngine. 311func (abse AzureBackupServerEngine) AsBasicEngineBase() (BasicEngineBase, bool) { 312 return &abse, true 313} 314 315// AzureFileShareBackupRequest azureFileShare workload-specific backup request. 316type AzureFileShareBackupRequest struct { 317 // RecoveryPointExpiryTimeInUTC - Backup copy will expire after the time specified (UTC). 318 RecoveryPointExpiryTimeInUTC *date.Time `json:"recoveryPointExpiryTimeInUTC,omitempty"` 319 // ObjectType - Possible values include: 'ObjectTypeBackupRequest', 'ObjectTypeAzureFileShareBackupRequest', 'ObjectTypeAzureWorkloadBackupRequest', 'ObjectTypeIaasVMBackupRequest' 320 ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"` 321} 322 323// MarshalJSON is the custom marshaler for AzureFileShareBackupRequest. 324func (afsbr AzureFileShareBackupRequest) MarshalJSON() ([]byte, error) { 325 afsbr.ObjectType = ObjectTypeAzureFileShareBackupRequest 326 objectMap := make(map[string]interface{}) 327 if afsbr.RecoveryPointExpiryTimeInUTC != nil { 328 objectMap["recoveryPointExpiryTimeInUTC"] = afsbr.RecoveryPointExpiryTimeInUTC 329 } 330 if afsbr.ObjectType != "" { 331 objectMap["objectType"] = afsbr.ObjectType 332 } 333 return json.Marshal(objectMap) 334} 335 336// AsAzureFileShareBackupRequest is the BasicRequest implementation for AzureFileShareBackupRequest. 337func (afsbr AzureFileShareBackupRequest) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) { 338 return &afsbr, true 339} 340 341// AsAzureWorkloadBackupRequest is the BasicRequest implementation for AzureFileShareBackupRequest. 342func (afsbr AzureFileShareBackupRequest) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) { 343 return nil, false 344} 345 346// AsIaasVMBackupRequest is the BasicRequest implementation for AzureFileShareBackupRequest. 347func (afsbr AzureFileShareBackupRequest) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) { 348 return nil, false 349} 350 351// AsRequest is the BasicRequest implementation for AzureFileShareBackupRequest. 352func (afsbr AzureFileShareBackupRequest) AsRequest() (*Request, bool) { 353 return nil, false 354} 355 356// AsBasicRequest is the BasicRequest implementation for AzureFileShareBackupRequest. 357func (afsbr AzureFileShareBackupRequest) AsBasicRequest() (BasicRequest, bool) { 358 return &afsbr, true 359} 360 361// AzureFileShareProtectableItem protectable item for Azure Fileshare workloads. 362type AzureFileShareProtectableItem struct { 363 // ParentContainerFabricID - Full Fabric ID of container to which this protectable item belongs. For example, ARM ID. 364 ParentContainerFabricID *string `json:"parentContainerFabricId,omitempty"` 365 // ParentContainerFriendlyName - Friendly name of container to which this protectable item belongs. 366 ParentContainerFriendlyName *string `json:"parentContainerFriendlyName,omitempty"` 367 // AzureFileShareType - File Share type XSync or XSMB. Possible values include: 'Invalid', 'XSMB', 'XSync' 368 AzureFileShareType AzureFileShareType `json:"azureFileShareType,omitempty"` 369 // BackupManagementType - Type of backup management to backup an item. 370 BackupManagementType *string `json:"backupManagementType,omitempty"` 371 // WorkloadType - Type of workload for the backup management 372 WorkloadType *string `json:"workloadType,omitempty"` 373 // FriendlyName - Friendly name of the backup item. 374 FriendlyName *string `json:"friendlyName,omitempty"` 375 // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 376 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 377 // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' 378 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` 379} 380 381// MarshalJSON is the custom marshaler for AzureFileShareProtectableItem. 382func (afspi AzureFileShareProtectableItem) MarshalJSON() ([]byte, error) { 383 afspi.ProtectableItemType = ProtectableItemTypeAzureFileShare 384 objectMap := make(map[string]interface{}) 385 if afspi.ParentContainerFabricID != nil { 386 objectMap["parentContainerFabricId"] = afspi.ParentContainerFabricID 387 } 388 if afspi.ParentContainerFriendlyName != nil { 389 objectMap["parentContainerFriendlyName"] = afspi.ParentContainerFriendlyName 390 } 391 if afspi.AzureFileShareType != "" { 392 objectMap["azureFileShareType"] = afspi.AzureFileShareType 393 } 394 if afspi.BackupManagementType != nil { 395 objectMap["backupManagementType"] = afspi.BackupManagementType 396 } 397 if afspi.WorkloadType != nil { 398 objectMap["workloadType"] = afspi.WorkloadType 399 } 400 if afspi.FriendlyName != nil { 401 objectMap["friendlyName"] = afspi.FriendlyName 402 } 403 if afspi.ProtectionState != "" { 404 objectMap["protectionState"] = afspi.ProtectionState 405 } 406 if afspi.ProtectableItemType != "" { 407 objectMap["protectableItemType"] = afspi.ProtectableItemType 408 } 409 return json.Marshal(objectMap) 410} 411 412// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. 413func (afspi AzureFileShareProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { 414 return &afspi, true 415} 416 417// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. 418func (afspi AzureFileShareProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { 419 return nil, false 420} 421 422// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. 423func (afspi AzureFileShareProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { 424 return nil, false 425} 426 427// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. 428func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { 429 return nil, false 430} 431 432// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. 433func (afspi AzureFileShareProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { 434 return nil, false 435} 436 437// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. 438func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { 439 return nil, false 440} 441 442// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. 443func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { 444 return nil, false 445} 446 447// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. 448func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { 449 return nil, false 450} 451 452// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. 453func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { 454 return nil, false 455} 456 457// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. 458func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { 459 return nil, false 460} 461 462// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. 463func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { 464 return nil, false 465} 466 467// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. 468func (afspi AzureFileShareProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { 469 return nil, false 470} 471 472// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. 473func (afspi AzureFileShareProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { 474 return nil, false 475} 476 477// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. 478func (afspi AzureFileShareProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { 479 return nil, false 480} 481 482// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. 483func (afspi AzureFileShareProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { 484 return &afspi, true 485} 486 487// AzureFileshareProtectedItem azure File Share workload-specific backup item. 488type AzureFileshareProtectedItem struct { 489 // FriendlyName - Friendly name of the fileshare represented by this backup item. 490 FriendlyName *string `json:"friendlyName,omitempty"` 491 // ProtectionStatus - Backup status of this backup item. 492 ProtectionStatus *string `json:"protectionStatus,omitempty"` 493 // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' 494 ProtectionState ProtectionState `json:"protectionState,omitempty"` 495 // HealthStatus - backups running status for this backup item. Possible values include: 'HealthStatusPassed', 'HealthStatusActionRequired', 'HealthStatusActionSuggested', 'HealthStatusInvalid' 496 HealthStatus HealthStatus `json:"healthStatus,omitempty"` 497 // LastBackupStatus - Last backup operation status. Possible values: Healthy, Unhealthy. 498 LastBackupStatus *string `json:"lastBackupStatus,omitempty"` 499 // LastBackupTime - Timestamp of the last backup operation on this backup item. 500 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` 501 // ExtendedInfo - Additional information with this backup item. 502 ExtendedInfo *AzureFileshareProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` 503 // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 504 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 505 // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' 506 WorkloadType DataSourceType `json:"workloadType,omitempty"` 507 // ContainerName - Unique name of container 508 ContainerName *string `json:"containerName,omitempty"` 509 // SourceResourceID - ARM ID of the resource to be backed up. 510 SourceResourceID *string `json:"sourceResourceId,omitempty"` 511 // PolicyID - ID of the backup policy with which this item is backed up. 512 PolicyID *string `json:"policyId,omitempty"` 513 // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. 514 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` 515 // BackupSetName - Name of the backup set the backup item belongs to 516 BackupSetName *string `json:"backupSetName,omitempty"` 517 // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' 518 CreateMode CreateMode `json:"createMode,omitempty"` 519 // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC 520 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` 521 // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete 522 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` 523 // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted 524 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` 525 // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon 526 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` 527 // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state 528 IsRehydrate *bool `json:"isRehydrate,omitempty"` 529 // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' 530 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` 531} 532 533// MarshalJSON is the custom marshaler for AzureFileshareProtectedItem. 534func (afpi AzureFileshareProtectedItem) MarshalJSON() ([]byte, error) { 535 afpi.ProtectedItemType = ProtectedItemTypeAzureFileShareProtectedItem 536 objectMap := make(map[string]interface{}) 537 if afpi.FriendlyName != nil { 538 objectMap["friendlyName"] = afpi.FriendlyName 539 } 540 if afpi.ProtectionStatus != nil { 541 objectMap["protectionStatus"] = afpi.ProtectionStatus 542 } 543 if afpi.ProtectionState != "" { 544 objectMap["protectionState"] = afpi.ProtectionState 545 } 546 if afpi.HealthStatus != "" { 547 objectMap["healthStatus"] = afpi.HealthStatus 548 } 549 if afpi.LastBackupStatus != nil { 550 objectMap["lastBackupStatus"] = afpi.LastBackupStatus 551 } 552 if afpi.LastBackupTime != nil { 553 objectMap["lastBackupTime"] = afpi.LastBackupTime 554 } 555 if afpi.ExtendedInfo != nil { 556 objectMap["extendedInfo"] = afpi.ExtendedInfo 557 } 558 if afpi.BackupManagementType != "" { 559 objectMap["backupManagementType"] = afpi.BackupManagementType 560 } 561 if afpi.WorkloadType != "" { 562 objectMap["workloadType"] = afpi.WorkloadType 563 } 564 if afpi.ContainerName != nil { 565 objectMap["containerName"] = afpi.ContainerName 566 } 567 if afpi.SourceResourceID != nil { 568 objectMap["sourceResourceId"] = afpi.SourceResourceID 569 } 570 if afpi.PolicyID != nil { 571 objectMap["policyId"] = afpi.PolicyID 572 } 573 if afpi.LastRecoveryPoint != nil { 574 objectMap["lastRecoveryPoint"] = afpi.LastRecoveryPoint 575 } 576 if afpi.BackupSetName != nil { 577 objectMap["backupSetName"] = afpi.BackupSetName 578 } 579 if afpi.CreateMode != "" { 580 objectMap["createMode"] = afpi.CreateMode 581 } 582 if afpi.DeferredDeleteTimeInUTC != nil { 583 objectMap["deferredDeleteTimeInUTC"] = afpi.DeferredDeleteTimeInUTC 584 } 585 if afpi.IsScheduledForDeferredDelete != nil { 586 objectMap["isScheduledForDeferredDelete"] = afpi.IsScheduledForDeferredDelete 587 } 588 if afpi.DeferredDeleteTimeRemaining != nil { 589 objectMap["deferredDeleteTimeRemaining"] = afpi.DeferredDeleteTimeRemaining 590 } 591 if afpi.IsDeferredDeleteScheduleUpcoming != nil { 592 objectMap["isDeferredDeleteScheduleUpcoming"] = afpi.IsDeferredDeleteScheduleUpcoming 593 } 594 if afpi.IsRehydrate != nil { 595 objectMap["isRehydrate"] = afpi.IsRehydrate 596 } 597 if afpi.ProtectedItemType != "" { 598 objectMap["protectedItemType"] = afpi.ProtectedItemType 599 } 600 return json.Marshal(objectMap) 601} 602 603// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. 604func (afpi AzureFileshareProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { 605 return &afpi, true 606} 607 608// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. 609func (afpi AzureFileshareProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { 610 return nil, false 611} 612 613// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. 614func (afpi AzureFileshareProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { 615 return nil, false 616} 617 618// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. 619func (afpi AzureFileshareProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { 620 return nil, false 621} 622 623// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. 624func (afpi AzureFileshareProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { 625 return nil, false 626} 627 628// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. 629func (afpi AzureFileshareProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { 630 return nil, false 631} 632 633// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. 634func (afpi AzureFileshareProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { 635 return nil, false 636} 637 638// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. 639func (afpi AzureFileshareProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { 640 return nil, false 641} 642 643// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. 644func (afpi AzureFileshareProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { 645 return nil, false 646} 647 648// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. 649func (afpi AzureFileshareProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { 650 return nil, false 651} 652 653// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. 654func (afpi AzureFileshareProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { 655 return nil, false 656} 657 658// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. 659func (afpi AzureFileshareProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { 660 return nil, false 661} 662 663// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. 664func (afpi AzureFileshareProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { 665 return nil, false 666} 667 668// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. 669func (afpi AzureFileshareProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { 670 return nil, false 671} 672 673// AsProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. 674func (afpi AzureFileshareProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { 675 return nil, false 676} 677 678// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. 679func (afpi AzureFileshareProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { 680 return &afpi, true 681} 682 683// AzureFileshareProtectedItemExtendedInfo additional information about Azure File Share backup item. 684type AzureFileshareProtectedItemExtendedInfo struct { 685 // OldestRecoveryPoint - The oldest backup copy available for this item in the service. 686 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"` 687 // RecoveryPointCount - Number of available backup copies associated with this backup item. 688 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"` 689 // PolicyState - Indicates consistency of policy object and policy applied to this backup item. 690 PolicyState *string `json:"policyState,omitempty"` 691 // ResourceState - READ-ONLY; Indicates the state of this resource. Possible values are from enum ResourceState {Invalid, Active, SoftDeleted, Deleted} 692 ResourceState *string `json:"resourceState,omitempty"` 693 // ResourceStateSyncTime - READ-ONLY; The resource state sync time for this backup item. 694 ResourceStateSyncTime *date.Time `json:"resourceStateSyncTime,omitempty"` 695} 696 697// MarshalJSON is the custom marshaler for AzureFileshareProtectedItemExtendedInfo. 698func (afpiei AzureFileshareProtectedItemExtendedInfo) MarshalJSON() ([]byte, error) { 699 objectMap := make(map[string]interface{}) 700 if afpiei.OldestRecoveryPoint != nil { 701 objectMap["oldestRecoveryPoint"] = afpiei.OldestRecoveryPoint 702 } 703 if afpiei.RecoveryPointCount != nil { 704 objectMap["recoveryPointCount"] = afpiei.RecoveryPointCount 705 } 706 if afpiei.PolicyState != nil { 707 objectMap["policyState"] = afpiei.PolicyState 708 } 709 return json.Marshal(objectMap) 710} 711 712// AzureFileShareProtectionPolicy azureStorage backup policy. 713type AzureFileShareProtectionPolicy struct { 714 // WorkLoadType - Type of workload for the backup management. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' 715 WorkLoadType WorkloadType `json:"workLoadType,omitempty"` 716 // SchedulePolicy - Backup schedule specified as part of backup policy. 717 SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"` 718 // RetentionPolicy - Retention policy with the details on backup copy retention ranges. 719 RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"` 720 // TimeZone - TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". 721 TimeZone *string `json:"timeZone,omitempty"` 722 // ProtectedItemsCount - Number of items associated with this policy. 723 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` 724 // BackupManagementType - Possible values include: 'BackupManagementTypeProtectionPolicy', 'BackupManagementTypeAzureWorkload', 'BackupManagementTypeAzureStorage', 'BackupManagementTypeAzureIaasVM', 'BackupManagementTypeAzureSQL', 'BackupManagementTypeGenericProtectionPolicy', 'BackupManagementTypeMAB' 725 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"` 726} 727 728// MarshalJSON is the custom marshaler for AzureFileShareProtectionPolicy. 729func (afspp AzureFileShareProtectionPolicy) MarshalJSON() ([]byte, error) { 730 afspp.BackupManagementType = BackupManagementTypeAzureStorage 731 objectMap := make(map[string]interface{}) 732 if afspp.WorkLoadType != "" { 733 objectMap["workLoadType"] = afspp.WorkLoadType 734 } 735 objectMap["schedulePolicy"] = afspp.SchedulePolicy 736 objectMap["retentionPolicy"] = afspp.RetentionPolicy 737 if afspp.TimeZone != nil { 738 objectMap["timeZone"] = afspp.TimeZone 739 } 740 if afspp.ProtectedItemsCount != nil { 741 objectMap["protectedItemsCount"] = afspp.ProtectedItemsCount 742 } 743 if afspp.BackupManagementType != "" { 744 objectMap["backupManagementType"] = afspp.BackupManagementType 745 } 746 return json.Marshal(objectMap) 747} 748 749// AsAzureVMWorkloadProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy. 750func (afspp AzureFileShareProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) { 751 return nil, false 752} 753 754// AsAzureFileShareProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy. 755func (afspp AzureFileShareProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) { 756 return &afspp, true 757} 758 759// AsAzureIaaSVMProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy. 760func (afspp AzureFileShareProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) { 761 return nil, false 762} 763 764// AsAzureSQLProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy. 765func (afspp AzureFileShareProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) { 766 return nil, false 767} 768 769// AsGenericProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy. 770func (afspp AzureFileShareProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) { 771 return nil, false 772} 773 774// AsMabProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy. 775func (afspp AzureFileShareProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) { 776 return nil, false 777} 778 779// AsProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy. 780func (afspp AzureFileShareProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) { 781 return nil, false 782} 783 784// AsBasicProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy. 785func (afspp AzureFileShareProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) { 786 return &afspp, true 787} 788 789// UnmarshalJSON is the custom unmarshaler for AzureFileShareProtectionPolicy struct. 790func (afspp *AzureFileShareProtectionPolicy) UnmarshalJSON(body []byte) error { 791 var m map[string]*json.RawMessage 792 err := json.Unmarshal(body, &m) 793 if err != nil { 794 return err 795 } 796 for k, v := range m { 797 switch k { 798 case "workLoadType": 799 if v != nil { 800 var workLoadType WorkloadType 801 err = json.Unmarshal(*v, &workLoadType) 802 if err != nil { 803 return err 804 } 805 afspp.WorkLoadType = workLoadType 806 } 807 case "schedulePolicy": 808 if v != nil { 809 schedulePolicy, err := unmarshalBasicSchedulePolicy(*v) 810 if err != nil { 811 return err 812 } 813 afspp.SchedulePolicy = schedulePolicy 814 } 815 case "retentionPolicy": 816 if v != nil { 817 retentionPolicy, err := unmarshalBasicRetentionPolicy(*v) 818 if err != nil { 819 return err 820 } 821 afspp.RetentionPolicy = retentionPolicy 822 } 823 case "timeZone": 824 if v != nil { 825 var timeZone string 826 err = json.Unmarshal(*v, &timeZone) 827 if err != nil { 828 return err 829 } 830 afspp.TimeZone = &timeZone 831 } 832 case "protectedItemsCount": 833 if v != nil { 834 var protectedItemsCount int32 835 err = json.Unmarshal(*v, &protectedItemsCount) 836 if err != nil { 837 return err 838 } 839 afspp.ProtectedItemsCount = &protectedItemsCount 840 } 841 case "backupManagementType": 842 if v != nil { 843 var backupManagementType ManagementTypeBasicProtectionPolicy 844 err = json.Unmarshal(*v, &backupManagementType) 845 if err != nil { 846 return err 847 } 848 afspp.BackupManagementType = backupManagementType 849 } 850 } 851 } 852 853 return nil 854} 855 856// AzureFileShareProvisionILRRequest update snapshot Uri with the correct friendly Name of the source Azure 857// file share. 858type AzureFileShareProvisionILRRequest struct { 859 // RecoveryPointID - Recovery point ID. 860 RecoveryPointID *string `json:"recoveryPointId,omitempty"` 861 // SourceResourceID - Source Storage account ARM Id 862 SourceResourceID *string `json:"sourceResourceId,omitempty"` 863 // ObjectType - Possible values include: 'ObjectTypeILRRequest', 'ObjectTypeAzureFileShareProvisionILRRequest', 'ObjectTypeIaasVMILRRegistrationRequest' 864 ObjectType ObjectTypeBasicILRRequest `json:"objectType,omitempty"` 865} 866 867// MarshalJSON is the custom marshaler for AzureFileShareProvisionILRRequest. 868func (afspir AzureFileShareProvisionILRRequest) MarshalJSON() ([]byte, error) { 869 afspir.ObjectType = ObjectTypeAzureFileShareProvisionILRRequest 870 objectMap := make(map[string]interface{}) 871 if afspir.RecoveryPointID != nil { 872 objectMap["recoveryPointId"] = afspir.RecoveryPointID 873 } 874 if afspir.SourceResourceID != nil { 875 objectMap["sourceResourceId"] = afspir.SourceResourceID 876 } 877 if afspir.ObjectType != "" { 878 objectMap["objectType"] = afspir.ObjectType 879 } 880 return json.Marshal(objectMap) 881} 882 883// AsAzureFileShareProvisionILRRequest is the BasicILRRequest implementation for AzureFileShareProvisionILRRequest. 884func (afspir AzureFileShareProvisionILRRequest) AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) { 885 return &afspir, true 886} 887 888// AsIaasVMILRRegistrationRequest is the BasicILRRequest implementation for AzureFileShareProvisionILRRequest. 889func (afspir AzureFileShareProvisionILRRequest) AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) { 890 return nil, false 891} 892 893// AsILRRequest is the BasicILRRequest implementation for AzureFileShareProvisionILRRequest. 894func (afspir AzureFileShareProvisionILRRequest) AsILRRequest() (*ILRRequest, bool) { 895 return nil, false 896} 897 898// AsBasicILRRequest is the BasicILRRequest implementation for AzureFileShareProvisionILRRequest. 899func (afspir AzureFileShareProvisionILRRequest) AsBasicILRRequest() (BasicILRRequest, bool) { 900 return &afspir, true 901} 902 903// AzureFileShareRecoveryPoint azure File Share workload specific backup copy. 904type AzureFileShareRecoveryPoint struct { 905 // RecoveryPointType - READ-ONLY; Type of the backup copy. Specifies whether it is a crash consistent backup or app consistent. 906 RecoveryPointType *string `json:"recoveryPointType,omitempty"` 907 // RecoveryPointTime - READ-ONLY; Time at which this backup copy was created. 908 RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"` 909 // FileShareSnapshotURI - READ-ONLY; Contains Url to the snapshot of fileshare, if applicable 910 FileShareSnapshotURI *string `json:"fileShareSnapshotUri,omitempty"` 911 // RecoveryPointSizeInGB - READ-ONLY; Contains recovery point size 912 RecoveryPointSizeInGB *int32 `json:"recoveryPointSizeInGB,omitempty"` 913 // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' 914 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` 915} 916 917// MarshalJSON is the custom marshaler for AzureFileShareRecoveryPoint. 918func (afsrp AzureFileShareRecoveryPoint) MarshalJSON() ([]byte, error) { 919 afsrp.ObjectType = ObjectTypeAzureFileShareRecoveryPoint 920 objectMap := make(map[string]interface{}) 921 if afsrp.ObjectType != "" { 922 objectMap["objectType"] = afsrp.ObjectType 923 } 924 return json.Marshal(objectMap) 925} 926 927// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. 928func (afsrp AzureFileShareRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { 929 return &afsrp, true 930} 931 932// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. 933func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { 934 return nil, false 935} 936 937// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. 938func (afsrp AzureFileShareRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { 939 return nil, false 940} 941 942// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. 943func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { 944 return nil, false 945} 946 947// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. 948func (afsrp AzureFileShareRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { 949 return nil, false 950} 951 952// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. 953func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { 954 return nil, false 955} 956 957// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. 958func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { 959 return nil, false 960} 961 962// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. 963func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { 964 return nil, false 965} 966 967// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. 968func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { 969 return nil, false 970} 971 972// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. 973func (afsrp AzureFileShareRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { 974 return nil, false 975} 976 977// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. 978func (afsrp AzureFileShareRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { 979 return nil, false 980} 981 982// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. 983func (afsrp AzureFileShareRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { 984 return nil, false 985} 986 987// AsRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. 988func (afsrp AzureFileShareRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { 989 return nil, false 990} 991 992// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. 993func (afsrp AzureFileShareRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { 994 return &afsrp, true 995} 996 997// AzureFileShareRestoreRequest azureFileShare Restore Request 998type AzureFileShareRestoreRequest struct { 999 // RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline' 1000 RecoveryType RecoveryType `json:"recoveryType,omitempty"` 1001 // SourceResourceID - Source storage account ARM Id 1002 SourceResourceID *string `json:"sourceResourceId,omitempty"` 1003 // CopyOptions - Options to resolve copy conflicts. Possible values include: 'CopyOptionsInvalid', 'CopyOptionsCreateCopy', 'CopyOptionsSkip', 'CopyOptionsOverwrite', 'CopyOptionsFailOnConflict' 1004 CopyOptions CopyOptions `json:"copyOptions,omitempty"` 1005 // RestoreRequestType - Restore Type (FullShareRestore or ItemLevelRestore). Possible values include: 'RestoreRequestTypeInvalid', 'RestoreRequestTypeFullShareRestore', 'RestoreRequestTypeItemLevelRestore' 1006 RestoreRequestType RestoreRequestType `json:"restoreRequestType,omitempty"` 1007 // RestoreFileSpecs - List of Source Files/Folders(which need to recover) and TargetFolderPath details 1008 RestoreFileSpecs *[]RestoreFileSpecs `json:"restoreFileSpecs,omitempty"` 1009 // TargetDetails - Target File Share Details 1010 TargetDetails *TargetAFSRestoreInfo `json:"targetDetails,omitempty"` 1011 // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' 1012 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` 1013} 1014 1015// MarshalJSON is the custom marshaler for AzureFileShareRestoreRequest. 1016func (afsrr AzureFileShareRestoreRequest) MarshalJSON() ([]byte, error) { 1017 afsrr.ObjectType = ObjectTypeAzureFileShareRestoreRequest 1018 objectMap := make(map[string]interface{}) 1019 if afsrr.RecoveryType != "" { 1020 objectMap["recoveryType"] = afsrr.RecoveryType 1021 } 1022 if afsrr.SourceResourceID != nil { 1023 objectMap["sourceResourceId"] = afsrr.SourceResourceID 1024 } 1025 if afsrr.CopyOptions != "" { 1026 objectMap["copyOptions"] = afsrr.CopyOptions 1027 } 1028 if afsrr.RestoreRequestType != "" { 1029 objectMap["restoreRequestType"] = afsrr.RestoreRequestType 1030 } 1031 if afsrr.RestoreFileSpecs != nil { 1032 objectMap["restoreFileSpecs"] = afsrr.RestoreFileSpecs 1033 } 1034 if afsrr.TargetDetails != nil { 1035 objectMap["targetDetails"] = afsrr.TargetDetails 1036 } 1037 if afsrr.ObjectType != "" { 1038 objectMap["objectType"] = afsrr.ObjectType 1039 } 1040 return json.Marshal(objectMap) 1041} 1042 1043// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. 1044func (afsrr AzureFileShareRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { 1045 return &afsrr, true 1046} 1047 1048// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. 1049func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { 1050 return nil, false 1051} 1052 1053// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. 1054func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { 1055 return nil, false 1056} 1057 1058// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. 1059func (afsrr AzureFileShareRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { 1060 return nil, false 1061} 1062 1063// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. 1064func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { 1065 return nil, false 1066} 1067 1068// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. 1069func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { 1070 return nil, false 1071} 1072 1073// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. 1074func (afsrr AzureFileShareRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { 1075 return nil, false 1076} 1077 1078// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. 1079func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { 1080 return nil, false 1081} 1082 1083// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. 1084func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { 1085 return nil, false 1086} 1087 1088// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. 1089func (afsrr AzureFileShareRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { 1090 return nil, false 1091} 1092 1093// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. 1094func (afsrr AzureFileShareRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { 1095 return nil, false 1096} 1097 1098// AsRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. 1099func (afsrr AzureFileShareRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { 1100 return nil, false 1101} 1102 1103// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. 1104func (afsrr AzureFileShareRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { 1105 return &afsrr, true 1106} 1107 1108// AzureIaaSClassicComputeVMContainer iaaS VM workload-specific backup item representing a classic virtual 1109// machine. 1110type AzureIaaSClassicComputeVMContainer struct { 1111 // VirtualMachineID - Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. 1112 VirtualMachineID *string `json:"virtualMachineId,omitempty"` 1113 // VirtualMachineVersion - Specifies whether the container represents a Classic or an Azure Resource Manager VM. 1114 VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` 1115 // ResourceGroup - Resource group name of Recovery Services Vault. 1116 ResourceGroup *string `json:"resourceGroup,omitempty"` 1117 // FriendlyName - Friendly name of the container. 1118 FriendlyName *string `json:"friendlyName,omitempty"` 1119 // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 1120 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 1121 // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. 1122 RegistrationStatus *string `json:"registrationStatus,omitempty"` 1123 // HealthStatus - Status of health of the container. 1124 HealthStatus *string `json:"healthStatus,omitempty"` 1125 // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' 1126 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` 1127} 1128 1129// MarshalJSON is the custom marshaler for AzureIaaSClassicComputeVMContainer. 1130func (aisccvc AzureIaaSClassicComputeVMContainer) MarshalJSON() ([]byte, error) { 1131 aisccvc.ContainerType = ContainerTypeMicrosoftClassicComputevirtualMachines 1132 objectMap := make(map[string]interface{}) 1133 if aisccvc.VirtualMachineID != nil { 1134 objectMap["virtualMachineId"] = aisccvc.VirtualMachineID 1135 } 1136 if aisccvc.VirtualMachineVersion != nil { 1137 objectMap["virtualMachineVersion"] = aisccvc.VirtualMachineVersion 1138 } 1139 if aisccvc.ResourceGroup != nil { 1140 objectMap["resourceGroup"] = aisccvc.ResourceGroup 1141 } 1142 if aisccvc.FriendlyName != nil { 1143 objectMap["friendlyName"] = aisccvc.FriendlyName 1144 } 1145 if aisccvc.BackupManagementType != "" { 1146 objectMap["backupManagementType"] = aisccvc.BackupManagementType 1147 } 1148 if aisccvc.RegistrationStatus != nil { 1149 objectMap["registrationStatus"] = aisccvc.RegistrationStatus 1150 } 1151 if aisccvc.HealthStatus != nil { 1152 objectMap["healthStatus"] = aisccvc.HealthStatus 1153 } 1154 if aisccvc.ContainerType != "" { 1155 objectMap["containerType"] = aisccvc.ContainerType 1156 } 1157 return json.Marshal(objectMap) 1158} 1159 1160// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. 1161func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { 1162 return nil, false 1163} 1164 1165// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. 1166func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { 1167 return &aisccvc, true 1168} 1169 1170// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. 1171func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { 1172 return nil, false 1173} 1174 1175// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. 1176func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { 1177 return nil, false 1178} 1179 1180// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. 1181func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { 1182 return nil, false 1183} 1184 1185// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. 1186func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { 1187 return nil, false 1188} 1189 1190// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. 1191func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { 1192 return nil, false 1193} 1194 1195// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. 1196func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { 1197 return nil, false 1198} 1199 1200// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. 1201func (aisccvc AzureIaaSClassicComputeVMContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { 1202 return nil, false 1203} 1204 1205// AsDpmContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. 1206func (aisccvc AzureIaaSClassicComputeVMContainer) AsDpmContainer() (*DpmContainer, bool) { 1207 return nil, false 1208} 1209 1210// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. 1211func (aisccvc AzureIaaSClassicComputeVMContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { 1212 return nil, false 1213} 1214 1215// AsGenericContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. 1216func (aisccvc AzureIaaSClassicComputeVMContainer) AsGenericContainer() (*GenericContainer, bool) { 1217 return nil, false 1218} 1219 1220// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. 1221func (aisccvc AzureIaaSClassicComputeVMContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { 1222 return nil, false 1223} 1224 1225// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. 1226func (aisccvc AzureIaaSClassicComputeVMContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { 1227 return &aisccvc, true 1228} 1229 1230// AsMabContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. 1231func (aisccvc AzureIaaSClassicComputeVMContainer) AsMabContainer() (*MabContainer, bool) { 1232 return nil, false 1233} 1234 1235// AsProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. 1236func (aisccvc AzureIaaSClassicComputeVMContainer) AsProtectionContainer() (*ProtectionContainer, bool) { 1237 return nil, false 1238} 1239 1240// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. 1241func (aisccvc AzureIaaSClassicComputeVMContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { 1242 return &aisccvc, true 1243} 1244 1245// AzureIaaSClassicComputeVMProtectableItem iaaS VM workload-specific backup item representing the Classic 1246// Compute VM. 1247type AzureIaaSClassicComputeVMProtectableItem struct { 1248 // VirtualMachineID - Fully qualified ARM ID of the virtual machine. 1249 VirtualMachineID *string `json:"virtualMachineId,omitempty"` 1250 // BackupManagementType - Type of backup management to backup an item. 1251 BackupManagementType *string `json:"backupManagementType,omitempty"` 1252 // WorkloadType - Type of workload for the backup management 1253 WorkloadType *string `json:"workloadType,omitempty"` 1254 // FriendlyName - Friendly name of the backup item. 1255 FriendlyName *string `json:"friendlyName,omitempty"` 1256 // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 1257 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 1258 // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' 1259 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` 1260} 1261 1262// MarshalJSON is the custom marshaler for AzureIaaSClassicComputeVMProtectableItem. 1263func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) MarshalJSON() ([]byte, error) { 1264 aisccvpi.ProtectableItemType = ProtectableItemTypeMicrosoftClassicComputevirtualMachines 1265 objectMap := make(map[string]interface{}) 1266 if aisccvpi.VirtualMachineID != nil { 1267 objectMap["virtualMachineId"] = aisccvpi.VirtualMachineID 1268 } 1269 if aisccvpi.BackupManagementType != nil { 1270 objectMap["backupManagementType"] = aisccvpi.BackupManagementType 1271 } 1272 if aisccvpi.WorkloadType != nil { 1273 objectMap["workloadType"] = aisccvpi.WorkloadType 1274 } 1275 if aisccvpi.FriendlyName != nil { 1276 objectMap["friendlyName"] = aisccvpi.FriendlyName 1277 } 1278 if aisccvpi.ProtectionState != "" { 1279 objectMap["protectionState"] = aisccvpi.ProtectionState 1280 } 1281 if aisccvpi.ProtectableItemType != "" { 1282 objectMap["protectableItemType"] = aisccvpi.ProtectableItemType 1283 } 1284 return json.Marshal(objectMap) 1285} 1286 1287// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. 1288func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { 1289 return nil, false 1290} 1291 1292// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. 1293func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { 1294 return &aisccvpi, true 1295} 1296 1297// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. 1298func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { 1299 return nil, false 1300} 1301 1302// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. 1303func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { 1304 return nil, false 1305} 1306 1307// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. 1308func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { 1309 return nil, false 1310} 1311 1312// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. 1313func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { 1314 return nil, false 1315} 1316 1317// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. 1318func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { 1319 return nil, false 1320} 1321 1322// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. 1323func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { 1324 return nil, false 1325} 1326 1327// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. 1328func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { 1329 return nil, false 1330} 1331 1332// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. 1333func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { 1334 return nil, false 1335} 1336 1337// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. 1338func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { 1339 return nil, false 1340} 1341 1342// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. 1343func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { 1344 return nil, false 1345} 1346 1347// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. 1348func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { 1349 return &aisccvpi, true 1350} 1351 1352// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. 1353func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { 1354 return nil, false 1355} 1356 1357// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. 1358func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { 1359 return &aisccvpi, true 1360} 1361 1362// AzureIaaSClassicComputeVMProtectedItem iaaS VM workload-specific backup item representing the Classic 1363// Compute VM. 1364type AzureIaaSClassicComputeVMProtectedItem struct { 1365 // FriendlyName - Friendly name of the VM represented by this backup item. 1366 FriendlyName *string `json:"friendlyName,omitempty"` 1367 // VirtualMachineID - Fully qualified ARM ID of the virtual machine represented by this item. 1368 VirtualMachineID *string `json:"virtualMachineId,omitempty"` 1369 // ProtectionStatus - Backup status of this backup item. 1370 ProtectionStatus *string `json:"protectionStatus,omitempty"` 1371 // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' 1372 ProtectionState ProtectionState `json:"protectionState,omitempty"` 1373 // HealthStatus - Health status of protected item. Possible values include: 'HealthStatusPassed', 'HealthStatusActionRequired', 'HealthStatusActionSuggested', 'HealthStatusInvalid' 1374 HealthStatus HealthStatus `json:"healthStatus,omitempty"` 1375 // HealthDetails - Health details on this backup item. 1376 HealthDetails *[]AzureIaaSVMHealthDetails `json:"healthDetails,omitempty"` 1377 // LastBackupStatus - Last backup operation status. 1378 LastBackupStatus *string `json:"lastBackupStatus,omitempty"` 1379 // LastBackupTime - Timestamp of the last backup operation on this backup item. 1380 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` 1381 // ProtectedItemDataID - Data ID of the protected item. 1382 ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"` 1383 // ExtendedInfo - Additional information for this backup item. 1384 ExtendedInfo *AzureIaaSVMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` 1385 ExtendedProperties *ExtendedProperties `json:"extendedProperties,omitempty"` 1386 // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 1387 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 1388 // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' 1389 WorkloadType DataSourceType `json:"workloadType,omitempty"` 1390 // ContainerName - Unique name of container 1391 ContainerName *string `json:"containerName,omitempty"` 1392 // SourceResourceID - ARM ID of the resource to be backed up. 1393 SourceResourceID *string `json:"sourceResourceId,omitempty"` 1394 // PolicyID - ID of the backup policy with which this item is backed up. 1395 PolicyID *string `json:"policyId,omitempty"` 1396 // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. 1397 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` 1398 // BackupSetName - Name of the backup set the backup item belongs to 1399 BackupSetName *string `json:"backupSetName,omitempty"` 1400 // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' 1401 CreateMode CreateMode `json:"createMode,omitempty"` 1402 // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC 1403 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` 1404 // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete 1405 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` 1406 // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted 1407 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` 1408 // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon 1409 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` 1410 // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state 1411 IsRehydrate *bool `json:"isRehydrate,omitempty"` 1412 // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' 1413 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` 1414} 1415 1416// MarshalJSON is the custom marshaler for AzureIaaSClassicComputeVMProtectedItem. 1417func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) MarshalJSON() ([]byte, error) { 1418 aisccvpi.ProtectedItemType = ProtectedItemTypeMicrosoftClassicComputevirtualMachines 1419 objectMap := make(map[string]interface{}) 1420 if aisccvpi.FriendlyName != nil { 1421 objectMap["friendlyName"] = aisccvpi.FriendlyName 1422 } 1423 if aisccvpi.VirtualMachineID != nil { 1424 objectMap["virtualMachineId"] = aisccvpi.VirtualMachineID 1425 } 1426 if aisccvpi.ProtectionStatus != nil { 1427 objectMap["protectionStatus"] = aisccvpi.ProtectionStatus 1428 } 1429 if aisccvpi.ProtectionState != "" { 1430 objectMap["protectionState"] = aisccvpi.ProtectionState 1431 } 1432 if aisccvpi.HealthStatus != "" { 1433 objectMap["healthStatus"] = aisccvpi.HealthStatus 1434 } 1435 if aisccvpi.HealthDetails != nil { 1436 objectMap["healthDetails"] = aisccvpi.HealthDetails 1437 } 1438 if aisccvpi.LastBackupStatus != nil { 1439 objectMap["lastBackupStatus"] = aisccvpi.LastBackupStatus 1440 } 1441 if aisccvpi.LastBackupTime != nil { 1442 objectMap["lastBackupTime"] = aisccvpi.LastBackupTime 1443 } 1444 if aisccvpi.ProtectedItemDataID != nil { 1445 objectMap["protectedItemDataId"] = aisccvpi.ProtectedItemDataID 1446 } 1447 if aisccvpi.ExtendedInfo != nil { 1448 objectMap["extendedInfo"] = aisccvpi.ExtendedInfo 1449 } 1450 if aisccvpi.ExtendedProperties != nil { 1451 objectMap["extendedProperties"] = aisccvpi.ExtendedProperties 1452 } 1453 if aisccvpi.BackupManagementType != "" { 1454 objectMap["backupManagementType"] = aisccvpi.BackupManagementType 1455 } 1456 if aisccvpi.WorkloadType != "" { 1457 objectMap["workloadType"] = aisccvpi.WorkloadType 1458 } 1459 if aisccvpi.ContainerName != nil { 1460 objectMap["containerName"] = aisccvpi.ContainerName 1461 } 1462 if aisccvpi.SourceResourceID != nil { 1463 objectMap["sourceResourceId"] = aisccvpi.SourceResourceID 1464 } 1465 if aisccvpi.PolicyID != nil { 1466 objectMap["policyId"] = aisccvpi.PolicyID 1467 } 1468 if aisccvpi.LastRecoveryPoint != nil { 1469 objectMap["lastRecoveryPoint"] = aisccvpi.LastRecoveryPoint 1470 } 1471 if aisccvpi.BackupSetName != nil { 1472 objectMap["backupSetName"] = aisccvpi.BackupSetName 1473 } 1474 if aisccvpi.CreateMode != "" { 1475 objectMap["createMode"] = aisccvpi.CreateMode 1476 } 1477 if aisccvpi.DeferredDeleteTimeInUTC != nil { 1478 objectMap["deferredDeleteTimeInUTC"] = aisccvpi.DeferredDeleteTimeInUTC 1479 } 1480 if aisccvpi.IsScheduledForDeferredDelete != nil { 1481 objectMap["isScheduledForDeferredDelete"] = aisccvpi.IsScheduledForDeferredDelete 1482 } 1483 if aisccvpi.DeferredDeleteTimeRemaining != nil { 1484 objectMap["deferredDeleteTimeRemaining"] = aisccvpi.DeferredDeleteTimeRemaining 1485 } 1486 if aisccvpi.IsDeferredDeleteScheduleUpcoming != nil { 1487 objectMap["isDeferredDeleteScheduleUpcoming"] = aisccvpi.IsDeferredDeleteScheduleUpcoming 1488 } 1489 if aisccvpi.IsRehydrate != nil { 1490 objectMap["isRehydrate"] = aisccvpi.IsRehydrate 1491 } 1492 if aisccvpi.ProtectedItemType != "" { 1493 objectMap["protectedItemType"] = aisccvpi.ProtectedItemType 1494 } 1495 return json.Marshal(objectMap) 1496} 1497 1498// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1499func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { 1500 return nil, false 1501} 1502 1503// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1504func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { 1505 return &aisccvpi, true 1506} 1507 1508// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1509func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { 1510 return nil, false 1511} 1512 1513// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1514func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { 1515 return nil, false 1516} 1517 1518// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1519func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { 1520 return &aisccvpi, true 1521} 1522 1523// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1524func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { 1525 return nil, false 1526} 1527 1528// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1529func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { 1530 return nil, false 1531} 1532 1533// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1534func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { 1535 return nil, false 1536} 1537 1538// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1539func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { 1540 return nil, false 1541} 1542 1543// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1544func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { 1545 return nil, false 1546} 1547 1548// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1549func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { 1550 return nil, false 1551} 1552 1553// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1554func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { 1555 return nil, false 1556} 1557 1558// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1559func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { 1560 return nil, false 1561} 1562 1563// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1564func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { 1565 return nil, false 1566} 1567 1568// AsProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1569func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { 1570 return nil, false 1571} 1572 1573// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1574func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { 1575 return &aisccvpi, true 1576} 1577 1578// AzureIaaSComputeVMContainer iaaS VM workload-specific backup item representing an Azure Resource Manager 1579// virtual machine. 1580type AzureIaaSComputeVMContainer struct { 1581 // VirtualMachineID - Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. 1582 VirtualMachineID *string `json:"virtualMachineId,omitempty"` 1583 // VirtualMachineVersion - Specifies whether the container represents a Classic or an Azure Resource Manager VM. 1584 VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` 1585 // ResourceGroup - Resource group name of Recovery Services Vault. 1586 ResourceGroup *string `json:"resourceGroup,omitempty"` 1587 // FriendlyName - Friendly name of the container. 1588 FriendlyName *string `json:"friendlyName,omitempty"` 1589 // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 1590 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 1591 // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. 1592 RegistrationStatus *string `json:"registrationStatus,omitempty"` 1593 // HealthStatus - Status of health of the container. 1594 HealthStatus *string `json:"healthStatus,omitempty"` 1595 // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' 1596 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` 1597} 1598 1599// MarshalJSON is the custom marshaler for AzureIaaSComputeVMContainer. 1600func (aiscvc AzureIaaSComputeVMContainer) MarshalJSON() ([]byte, error) { 1601 aiscvc.ContainerType = ContainerTypeMicrosoftComputevirtualMachines 1602 objectMap := make(map[string]interface{}) 1603 if aiscvc.VirtualMachineID != nil { 1604 objectMap["virtualMachineId"] = aiscvc.VirtualMachineID 1605 } 1606 if aiscvc.VirtualMachineVersion != nil { 1607 objectMap["virtualMachineVersion"] = aiscvc.VirtualMachineVersion 1608 } 1609 if aiscvc.ResourceGroup != nil { 1610 objectMap["resourceGroup"] = aiscvc.ResourceGroup 1611 } 1612 if aiscvc.FriendlyName != nil { 1613 objectMap["friendlyName"] = aiscvc.FriendlyName 1614 } 1615 if aiscvc.BackupManagementType != "" { 1616 objectMap["backupManagementType"] = aiscvc.BackupManagementType 1617 } 1618 if aiscvc.RegistrationStatus != nil { 1619 objectMap["registrationStatus"] = aiscvc.RegistrationStatus 1620 } 1621 if aiscvc.HealthStatus != nil { 1622 objectMap["healthStatus"] = aiscvc.HealthStatus 1623 } 1624 if aiscvc.ContainerType != "" { 1625 objectMap["containerType"] = aiscvc.ContainerType 1626 } 1627 return json.Marshal(objectMap) 1628} 1629 1630// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1631func (aiscvc AzureIaaSComputeVMContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { 1632 return nil, false 1633} 1634 1635// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1636func (aiscvc AzureIaaSComputeVMContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { 1637 return nil, false 1638} 1639 1640// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1641func (aiscvc AzureIaaSComputeVMContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { 1642 return &aiscvc, true 1643} 1644 1645// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1646func (aiscvc AzureIaaSComputeVMContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { 1647 return nil, false 1648} 1649 1650// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1651func (aiscvc AzureIaaSComputeVMContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { 1652 return nil, false 1653} 1654 1655// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1656func (aiscvc AzureIaaSComputeVMContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { 1657 return nil, false 1658} 1659 1660// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1661func (aiscvc AzureIaaSComputeVMContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { 1662 return nil, false 1663} 1664 1665// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1666func (aiscvc AzureIaaSComputeVMContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { 1667 return nil, false 1668} 1669 1670// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1671func (aiscvc AzureIaaSComputeVMContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { 1672 return nil, false 1673} 1674 1675// AsDpmContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1676func (aiscvc AzureIaaSComputeVMContainer) AsDpmContainer() (*DpmContainer, bool) { 1677 return nil, false 1678} 1679 1680// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1681func (aiscvc AzureIaaSComputeVMContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { 1682 return nil, false 1683} 1684 1685// AsGenericContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1686func (aiscvc AzureIaaSComputeVMContainer) AsGenericContainer() (*GenericContainer, bool) { 1687 return nil, false 1688} 1689 1690// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1691func (aiscvc AzureIaaSComputeVMContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { 1692 return nil, false 1693} 1694 1695// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1696func (aiscvc AzureIaaSComputeVMContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { 1697 return &aiscvc, true 1698} 1699 1700// AsMabContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1701func (aiscvc AzureIaaSComputeVMContainer) AsMabContainer() (*MabContainer, bool) { 1702 return nil, false 1703} 1704 1705// AsProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1706func (aiscvc AzureIaaSComputeVMContainer) AsProtectionContainer() (*ProtectionContainer, bool) { 1707 return nil, false 1708} 1709 1710// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1711func (aiscvc AzureIaaSComputeVMContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { 1712 return &aiscvc, true 1713} 1714 1715// AzureIaaSComputeVMProtectableItem iaaS VM workload-specific backup item representing the Azure Resource 1716// Manager VM. 1717type AzureIaaSComputeVMProtectableItem struct { 1718 // VirtualMachineID - Fully qualified ARM ID of the virtual machine. 1719 VirtualMachineID *string `json:"virtualMachineId,omitempty"` 1720 // BackupManagementType - Type of backup management to backup an item. 1721 BackupManagementType *string `json:"backupManagementType,omitempty"` 1722 // WorkloadType - Type of workload for the backup management 1723 WorkloadType *string `json:"workloadType,omitempty"` 1724 // FriendlyName - Friendly name of the backup item. 1725 FriendlyName *string `json:"friendlyName,omitempty"` 1726 // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 1727 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 1728 // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' 1729 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` 1730} 1731 1732// MarshalJSON is the custom marshaler for AzureIaaSComputeVMProtectableItem. 1733func (aiscvpi AzureIaaSComputeVMProtectableItem) MarshalJSON() ([]byte, error) { 1734 aiscvpi.ProtectableItemType = ProtectableItemTypeMicrosoftComputevirtualMachines 1735 objectMap := make(map[string]interface{}) 1736 if aiscvpi.VirtualMachineID != nil { 1737 objectMap["virtualMachineId"] = aiscvpi.VirtualMachineID 1738 } 1739 if aiscvpi.BackupManagementType != nil { 1740 objectMap["backupManagementType"] = aiscvpi.BackupManagementType 1741 } 1742 if aiscvpi.WorkloadType != nil { 1743 objectMap["workloadType"] = aiscvpi.WorkloadType 1744 } 1745 if aiscvpi.FriendlyName != nil { 1746 objectMap["friendlyName"] = aiscvpi.FriendlyName 1747 } 1748 if aiscvpi.ProtectionState != "" { 1749 objectMap["protectionState"] = aiscvpi.ProtectionState 1750 } 1751 if aiscvpi.ProtectableItemType != "" { 1752 objectMap["protectableItemType"] = aiscvpi.ProtectableItemType 1753 } 1754 return json.Marshal(objectMap) 1755} 1756 1757// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. 1758func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { 1759 return nil, false 1760} 1761 1762// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. 1763func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { 1764 return nil, false 1765} 1766 1767// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. 1768func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { 1769 return &aiscvpi, true 1770} 1771 1772// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. 1773func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { 1774 return nil, false 1775} 1776 1777// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. 1778func (aiscvpi AzureIaaSComputeVMProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { 1779 return nil, false 1780} 1781 1782// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. 1783func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { 1784 return nil, false 1785} 1786 1787// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. 1788func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { 1789 return nil, false 1790} 1791 1792// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. 1793func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { 1794 return nil, false 1795} 1796 1797// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. 1798func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { 1799 return nil, false 1800} 1801 1802// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. 1803func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { 1804 return nil, false 1805} 1806 1807// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. 1808func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { 1809 return nil, false 1810} 1811 1812// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. 1813func (aiscvpi AzureIaaSComputeVMProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { 1814 return nil, false 1815} 1816 1817// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. 1818func (aiscvpi AzureIaaSComputeVMProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { 1819 return &aiscvpi, true 1820} 1821 1822// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. 1823func (aiscvpi AzureIaaSComputeVMProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { 1824 return nil, false 1825} 1826 1827// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. 1828func (aiscvpi AzureIaaSComputeVMProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { 1829 return &aiscvpi, true 1830} 1831 1832// AzureIaaSComputeVMProtectedItem iaaS VM workload-specific backup item representing the Azure Resource 1833// Manager VM. 1834type AzureIaaSComputeVMProtectedItem struct { 1835 // FriendlyName - Friendly name of the VM represented by this backup item. 1836 FriendlyName *string `json:"friendlyName,omitempty"` 1837 // VirtualMachineID - Fully qualified ARM ID of the virtual machine represented by this item. 1838 VirtualMachineID *string `json:"virtualMachineId,omitempty"` 1839 // ProtectionStatus - Backup status of this backup item. 1840 ProtectionStatus *string `json:"protectionStatus,omitempty"` 1841 // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' 1842 ProtectionState ProtectionState `json:"protectionState,omitempty"` 1843 // HealthStatus - Health status of protected item. Possible values include: 'HealthStatusPassed', 'HealthStatusActionRequired', 'HealthStatusActionSuggested', 'HealthStatusInvalid' 1844 HealthStatus HealthStatus `json:"healthStatus,omitempty"` 1845 // HealthDetails - Health details on this backup item. 1846 HealthDetails *[]AzureIaaSVMHealthDetails `json:"healthDetails,omitempty"` 1847 // LastBackupStatus - Last backup operation status. 1848 LastBackupStatus *string `json:"lastBackupStatus,omitempty"` 1849 // LastBackupTime - Timestamp of the last backup operation on this backup item. 1850 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` 1851 // ProtectedItemDataID - Data ID of the protected item. 1852 ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"` 1853 // ExtendedInfo - Additional information for this backup item. 1854 ExtendedInfo *AzureIaaSVMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` 1855 ExtendedProperties *ExtendedProperties `json:"extendedProperties,omitempty"` 1856 // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 1857 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 1858 // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' 1859 WorkloadType DataSourceType `json:"workloadType,omitempty"` 1860 // ContainerName - Unique name of container 1861 ContainerName *string `json:"containerName,omitempty"` 1862 // SourceResourceID - ARM ID of the resource to be backed up. 1863 SourceResourceID *string `json:"sourceResourceId,omitempty"` 1864 // PolicyID - ID of the backup policy with which this item is backed up. 1865 PolicyID *string `json:"policyId,omitempty"` 1866 // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. 1867 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` 1868 // BackupSetName - Name of the backup set the backup item belongs to 1869 BackupSetName *string `json:"backupSetName,omitempty"` 1870 // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' 1871 CreateMode CreateMode `json:"createMode,omitempty"` 1872 // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC 1873 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` 1874 // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete 1875 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` 1876 // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted 1877 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` 1878 // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon 1879 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` 1880 // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state 1881 IsRehydrate *bool `json:"isRehydrate,omitempty"` 1882 // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' 1883 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` 1884} 1885 1886// MarshalJSON is the custom marshaler for AzureIaaSComputeVMProtectedItem. 1887func (aiscvpi AzureIaaSComputeVMProtectedItem) MarshalJSON() ([]byte, error) { 1888 aiscvpi.ProtectedItemType = ProtectedItemTypeMicrosoftComputevirtualMachines 1889 objectMap := make(map[string]interface{}) 1890 if aiscvpi.FriendlyName != nil { 1891 objectMap["friendlyName"] = aiscvpi.FriendlyName 1892 } 1893 if aiscvpi.VirtualMachineID != nil { 1894 objectMap["virtualMachineId"] = aiscvpi.VirtualMachineID 1895 } 1896 if aiscvpi.ProtectionStatus != nil { 1897 objectMap["protectionStatus"] = aiscvpi.ProtectionStatus 1898 } 1899 if aiscvpi.ProtectionState != "" { 1900 objectMap["protectionState"] = aiscvpi.ProtectionState 1901 } 1902 if aiscvpi.HealthStatus != "" { 1903 objectMap["healthStatus"] = aiscvpi.HealthStatus 1904 } 1905 if aiscvpi.HealthDetails != nil { 1906 objectMap["healthDetails"] = aiscvpi.HealthDetails 1907 } 1908 if aiscvpi.LastBackupStatus != nil { 1909 objectMap["lastBackupStatus"] = aiscvpi.LastBackupStatus 1910 } 1911 if aiscvpi.LastBackupTime != nil { 1912 objectMap["lastBackupTime"] = aiscvpi.LastBackupTime 1913 } 1914 if aiscvpi.ProtectedItemDataID != nil { 1915 objectMap["protectedItemDataId"] = aiscvpi.ProtectedItemDataID 1916 } 1917 if aiscvpi.ExtendedInfo != nil { 1918 objectMap["extendedInfo"] = aiscvpi.ExtendedInfo 1919 } 1920 if aiscvpi.ExtendedProperties != nil { 1921 objectMap["extendedProperties"] = aiscvpi.ExtendedProperties 1922 } 1923 if aiscvpi.BackupManagementType != "" { 1924 objectMap["backupManagementType"] = aiscvpi.BackupManagementType 1925 } 1926 if aiscvpi.WorkloadType != "" { 1927 objectMap["workloadType"] = aiscvpi.WorkloadType 1928 } 1929 if aiscvpi.ContainerName != nil { 1930 objectMap["containerName"] = aiscvpi.ContainerName 1931 } 1932 if aiscvpi.SourceResourceID != nil { 1933 objectMap["sourceResourceId"] = aiscvpi.SourceResourceID 1934 } 1935 if aiscvpi.PolicyID != nil { 1936 objectMap["policyId"] = aiscvpi.PolicyID 1937 } 1938 if aiscvpi.LastRecoveryPoint != nil { 1939 objectMap["lastRecoveryPoint"] = aiscvpi.LastRecoveryPoint 1940 } 1941 if aiscvpi.BackupSetName != nil { 1942 objectMap["backupSetName"] = aiscvpi.BackupSetName 1943 } 1944 if aiscvpi.CreateMode != "" { 1945 objectMap["createMode"] = aiscvpi.CreateMode 1946 } 1947 if aiscvpi.DeferredDeleteTimeInUTC != nil { 1948 objectMap["deferredDeleteTimeInUTC"] = aiscvpi.DeferredDeleteTimeInUTC 1949 } 1950 if aiscvpi.IsScheduledForDeferredDelete != nil { 1951 objectMap["isScheduledForDeferredDelete"] = aiscvpi.IsScheduledForDeferredDelete 1952 } 1953 if aiscvpi.DeferredDeleteTimeRemaining != nil { 1954 objectMap["deferredDeleteTimeRemaining"] = aiscvpi.DeferredDeleteTimeRemaining 1955 } 1956 if aiscvpi.IsDeferredDeleteScheduleUpcoming != nil { 1957 objectMap["isDeferredDeleteScheduleUpcoming"] = aiscvpi.IsDeferredDeleteScheduleUpcoming 1958 } 1959 if aiscvpi.IsRehydrate != nil { 1960 objectMap["isRehydrate"] = aiscvpi.IsRehydrate 1961 } 1962 if aiscvpi.ProtectedItemType != "" { 1963 objectMap["protectedItemType"] = aiscvpi.ProtectedItemType 1964 } 1965 return json.Marshal(objectMap) 1966} 1967 1968// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 1969func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { 1970 return nil, false 1971} 1972 1973// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 1974func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { 1975 return nil, false 1976} 1977 1978// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 1979func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { 1980 return &aiscvpi, true 1981} 1982 1983// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 1984func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { 1985 return nil, false 1986} 1987 1988// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 1989func (aiscvpi AzureIaaSComputeVMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { 1990 return &aiscvpi, true 1991} 1992 1993// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 1994func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { 1995 return nil, false 1996} 1997 1998// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 1999func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { 2000 return nil, false 2001} 2002 2003// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 2004func (aiscvpi AzureIaaSComputeVMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { 2005 return nil, false 2006} 2007 2008// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 2009func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { 2010 return nil, false 2011} 2012 2013// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 2014func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { 2015 return nil, false 2016} 2017 2018// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 2019func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { 2020 return nil, false 2021} 2022 2023// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 2024func (aiscvpi AzureIaaSComputeVMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { 2025 return nil, false 2026} 2027 2028// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 2029func (aiscvpi AzureIaaSComputeVMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { 2030 return nil, false 2031} 2032 2033// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 2034func (aiscvpi AzureIaaSComputeVMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { 2035 return nil, false 2036} 2037 2038// AsProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 2039func (aiscvpi AzureIaaSComputeVMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { 2040 return nil, false 2041} 2042 2043// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 2044func (aiscvpi AzureIaaSComputeVMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { 2045 return &aiscvpi, true 2046} 2047 2048// AzureIaaSVMErrorInfo azure IaaS VM workload-specific error information. 2049type AzureIaaSVMErrorInfo struct { 2050 // ErrorCode - READ-ONLY; Error code. 2051 ErrorCode *int32 `json:"errorCode,omitempty"` 2052 // ErrorTitle - READ-ONLY; Title: Typically, the entity that the error pertains to. 2053 ErrorTitle *string `json:"errorTitle,omitempty"` 2054 // ErrorString - READ-ONLY; Localized error string. 2055 ErrorString *string `json:"errorString,omitempty"` 2056 // Recommendations - READ-ONLY; List of localized recommendations for above error code. 2057 Recommendations *[]string `json:"recommendations,omitempty"` 2058} 2059 2060// MarshalJSON is the custom marshaler for AzureIaaSVMErrorInfo. 2061func (aisei AzureIaaSVMErrorInfo) MarshalJSON() ([]byte, error) { 2062 objectMap := make(map[string]interface{}) 2063 return json.Marshal(objectMap) 2064} 2065 2066// AzureIaaSVMHealthDetails azure IaaS VM workload-specific Health Details. 2067type AzureIaaSVMHealthDetails struct { 2068 // Code - READ-ONLY; Health Code 2069 Code *int32 `json:"code,omitempty"` 2070 // Title - READ-ONLY; Health Title 2071 Title *string `json:"title,omitempty"` 2072 // Message - READ-ONLY; Health Message 2073 Message *string `json:"message,omitempty"` 2074 // Recommendations - READ-ONLY; Health Recommended Actions 2075 Recommendations *[]string `json:"recommendations,omitempty"` 2076} 2077 2078// MarshalJSON is the custom marshaler for AzureIaaSVMHealthDetails. 2079func (aishd AzureIaaSVMHealthDetails) MarshalJSON() ([]byte, error) { 2080 objectMap := make(map[string]interface{}) 2081 return json.Marshal(objectMap) 2082} 2083 2084// AzureIaaSVMJob azure IaaS VM workload-specific job object. 2085type AzureIaaSVMJob struct { 2086 // Duration - Time elapsed during the execution of this job. 2087 Duration *string `json:"duration,omitempty"` 2088 // ActionsInfo - Gets or sets the state/actions applicable on this job like cancel/retry. 2089 ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"` 2090 // ErrorDetails - Error details on execution of this job. 2091 ErrorDetails *[]AzureIaaSVMErrorInfo `json:"errorDetails,omitempty"` 2092 // VirtualMachineVersion - Specifies whether the backup item is a Classic or an Azure Resource Manager VM. 2093 VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` 2094 // ExtendedInfo - Additional information for this job. 2095 ExtendedInfo *AzureIaaSVMJobExtendedInfo `json:"extendedInfo,omitempty"` 2096 // EntityFriendlyName - Friendly name of the entity on which the current job is executing. 2097 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` 2098 // BackupManagementType - Backup management type to execute the current job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 2099 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 2100 // Operation - The operation name. 2101 Operation *string `json:"operation,omitempty"` 2102 // Status - Job status. 2103 Status *string `json:"status,omitempty"` 2104 // StartTime - The start time. 2105 StartTime *date.Time `json:"startTime,omitempty"` 2106 // EndTime - The end time. 2107 EndTime *date.Time `json:"endTime,omitempty"` 2108 // ActivityID - ActivityId of job. 2109 ActivityID *string `json:"activityId,omitempty"` 2110 // JobType - Possible values include: 'JobTypeJob', 'JobTypeAzureIaaSVMJob', 'JobTypeAzureStorageJob', 'JobTypeAzureWorkloadJob', 'JobTypeDpmJob', 'JobTypeMabJob' 2111 JobType JobType `json:"jobType,omitempty"` 2112} 2113 2114// MarshalJSON is the custom marshaler for AzureIaaSVMJob. 2115func (aisj AzureIaaSVMJob) MarshalJSON() ([]byte, error) { 2116 aisj.JobType = JobTypeAzureIaaSVMJob 2117 objectMap := make(map[string]interface{}) 2118 if aisj.Duration != nil { 2119 objectMap["duration"] = aisj.Duration 2120 } 2121 if aisj.ActionsInfo != nil { 2122 objectMap["actionsInfo"] = aisj.ActionsInfo 2123 } 2124 if aisj.ErrorDetails != nil { 2125 objectMap["errorDetails"] = aisj.ErrorDetails 2126 } 2127 if aisj.VirtualMachineVersion != nil { 2128 objectMap["virtualMachineVersion"] = aisj.VirtualMachineVersion 2129 } 2130 if aisj.ExtendedInfo != nil { 2131 objectMap["extendedInfo"] = aisj.ExtendedInfo 2132 } 2133 if aisj.EntityFriendlyName != nil { 2134 objectMap["entityFriendlyName"] = aisj.EntityFriendlyName 2135 } 2136 if aisj.BackupManagementType != "" { 2137 objectMap["backupManagementType"] = aisj.BackupManagementType 2138 } 2139 if aisj.Operation != nil { 2140 objectMap["operation"] = aisj.Operation 2141 } 2142 if aisj.Status != nil { 2143 objectMap["status"] = aisj.Status 2144 } 2145 if aisj.StartTime != nil { 2146 objectMap["startTime"] = aisj.StartTime 2147 } 2148 if aisj.EndTime != nil { 2149 objectMap["endTime"] = aisj.EndTime 2150 } 2151 if aisj.ActivityID != nil { 2152 objectMap["activityId"] = aisj.ActivityID 2153 } 2154 if aisj.JobType != "" { 2155 objectMap["jobType"] = aisj.JobType 2156 } 2157 return json.Marshal(objectMap) 2158} 2159 2160// AsAzureIaaSVMJob is the BasicJob implementation for AzureIaaSVMJob. 2161func (aisj AzureIaaSVMJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) { 2162 return &aisj, true 2163} 2164 2165// AsAzureStorageJob is the BasicJob implementation for AzureIaaSVMJob. 2166func (aisj AzureIaaSVMJob) AsAzureStorageJob() (*AzureStorageJob, bool) { 2167 return nil, false 2168} 2169 2170// AsAzureWorkloadJob is the BasicJob implementation for AzureIaaSVMJob. 2171func (aisj AzureIaaSVMJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) { 2172 return nil, false 2173} 2174 2175// AsDpmJob is the BasicJob implementation for AzureIaaSVMJob. 2176func (aisj AzureIaaSVMJob) AsDpmJob() (*DpmJob, bool) { 2177 return nil, false 2178} 2179 2180// AsMabJob is the BasicJob implementation for AzureIaaSVMJob. 2181func (aisj AzureIaaSVMJob) AsMabJob() (*MabJob, bool) { 2182 return nil, false 2183} 2184 2185// AsJob is the BasicJob implementation for AzureIaaSVMJob. 2186func (aisj AzureIaaSVMJob) AsJob() (*Job, bool) { 2187 return nil, false 2188} 2189 2190// AsBasicJob is the BasicJob implementation for AzureIaaSVMJob. 2191func (aisj AzureIaaSVMJob) AsBasicJob() (BasicJob, bool) { 2192 return &aisj, true 2193} 2194 2195// AzureIaaSVMJobExtendedInfo azure IaaS VM workload-specific additional information for job. 2196type AzureIaaSVMJobExtendedInfo struct { 2197 // TasksList - List of tasks associated with this job. 2198 TasksList *[]AzureIaaSVMJobTaskDetails `json:"tasksList,omitempty"` 2199 // PropertyBag - Job properties. 2200 PropertyBag map[string]*string `json:"propertyBag"` 2201 // InternalPropertyBag - Job internal properties. 2202 InternalPropertyBag map[string]*string `json:"internalPropertyBag"` 2203 // ProgressPercentage - Indicates progress of the job. Null if it has not started or completed. 2204 ProgressPercentage *float64 `json:"progressPercentage,omitempty"` 2205 // EstimatedRemainingDuration - Time remaining for execution of this job. 2206 EstimatedRemainingDuration *string `json:"estimatedRemainingDuration,omitempty"` 2207 // DynamicErrorMessage - Non localized error message on job execution. 2208 DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"` 2209} 2210 2211// MarshalJSON is the custom marshaler for AzureIaaSVMJobExtendedInfo. 2212func (aisjei AzureIaaSVMJobExtendedInfo) MarshalJSON() ([]byte, error) { 2213 objectMap := make(map[string]interface{}) 2214 if aisjei.TasksList != nil { 2215 objectMap["tasksList"] = aisjei.TasksList 2216 } 2217 if aisjei.PropertyBag != nil { 2218 objectMap["propertyBag"] = aisjei.PropertyBag 2219 } 2220 if aisjei.InternalPropertyBag != nil { 2221 objectMap["internalPropertyBag"] = aisjei.InternalPropertyBag 2222 } 2223 if aisjei.ProgressPercentage != nil { 2224 objectMap["progressPercentage"] = aisjei.ProgressPercentage 2225 } 2226 if aisjei.EstimatedRemainingDuration != nil { 2227 objectMap["estimatedRemainingDuration"] = aisjei.EstimatedRemainingDuration 2228 } 2229 if aisjei.DynamicErrorMessage != nil { 2230 objectMap["dynamicErrorMessage"] = aisjei.DynamicErrorMessage 2231 } 2232 return json.Marshal(objectMap) 2233} 2234 2235// AzureIaaSVMJobTaskDetails azure IaaS VM workload-specific job task details. 2236type AzureIaaSVMJobTaskDetails struct { 2237 // TaskID - The task display name. 2238 TaskID *string `json:"taskId,omitempty"` 2239 // StartTime - The start time. 2240 StartTime *date.Time `json:"startTime,omitempty"` 2241 // EndTime - The end time. 2242 EndTime *date.Time `json:"endTime,omitempty"` 2243 // InstanceID - The instanceId. 2244 InstanceID *string `json:"instanceId,omitempty"` 2245 // Duration - Time elapsed for task. 2246 Duration *string `json:"duration,omitempty"` 2247 // Status - The status. 2248 Status *string `json:"status,omitempty"` 2249 // ProgressPercentage - Progress of the task. 2250 ProgressPercentage *float64 `json:"progressPercentage,omitempty"` 2251 // TaskExecutionDetails - Details about execution of the task. 2252 // eg: number of bytes transferred etc 2253 TaskExecutionDetails *string `json:"taskExecutionDetails,omitempty"` 2254} 2255 2256// BasicAzureIaaSVMProtectedItem iaaS VM workload-specific backup item. 2257type BasicAzureIaaSVMProtectedItem interface { 2258 AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) 2259 AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) 2260 AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) 2261} 2262 2263// AzureIaaSVMProtectedItem iaaS VM workload-specific backup item. 2264type AzureIaaSVMProtectedItem struct { 2265 // FriendlyName - Friendly name of the VM represented by this backup item. 2266 FriendlyName *string `json:"friendlyName,omitempty"` 2267 // VirtualMachineID - Fully qualified ARM ID of the virtual machine represented by this item. 2268 VirtualMachineID *string `json:"virtualMachineId,omitempty"` 2269 // ProtectionStatus - Backup status of this backup item. 2270 ProtectionStatus *string `json:"protectionStatus,omitempty"` 2271 // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' 2272 ProtectionState ProtectionState `json:"protectionState,omitempty"` 2273 // HealthStatus - Health status of protected item. Possible values include: 'HealthStatusPassed', 'HealthStatusActionRequired', 'HealthStatusActionSuggested', 'HealthStatusInvalid' 2274 HealthStatus HealthStatus `json:"healthStatus,omitempty"` 2275 // HealthDetails - Health details on this backup item. 2276 HealthDetails *[]AzureIaaSVMHealthDetails `json:"healthDetails,omitempty"` 2277 // LastBackupStatus - Last backup operation status. 2278 LastBackupStatus *string `json:"lastBackupStatus,omitempty"` 2279 // LastBackupTime - Timestamp of the last backup operation on this backup item. 2280 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` 2281 // ProtectedItemDataID - Data ID of the protected item. 2282 ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"` 2283 // ExtendedInfo - Additional information for this backup item. 2284 ExtendedInfo *AzureIaaSVMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` 2285 ExtendedProperties *ExtendedProperties `json:"extendedProperties,omitempty"` 2286 // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 2287 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 2288 // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' 2289 WorkloadType DataSourceType `json:"workloadType,omitempty"` 2290 // ContainerName - Unique name of container 2291 ContainerName *string `json:"containerName,omitempty"` 2292 // SourceResourceID - ARM ID of the resource to be backed up. 2293 SourceResourceID *string `json:"sourceResourceId,omitempty"` 2294 // PolicyID - ID of the backup policy with which this item is backed up. 2295 PolicyID *string `json:"policyId,omitempty"` 2296 // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. 2297 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` 2298 // BackupSetName - Name of the backup set the backup item belongs to 2299 BackupSetName *string `json:"backupSetName,omitempty"` 2300 // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' 2301 CreateMode CreateMode `json:"createMode,omitempty"` 2302 // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC 2303 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` 2304 // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete 2305 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` 2306 // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted 2307 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` 2308 // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon 2309 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` 2310 // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state 2311 IsRehydrate *bool `json:"isRehydrate,omitempty"` 2312 // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' 2313 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` 2314} 2315 2316func unmarshalBasicAzureIaaSVMProtectedItem(body []byte) (BasicAzureIaaSVMProtectedItem, error) { 2317 var m map[string]interface{} 2318 err := json.Unmarshal(body, &m) 2319 if err != nil { 2320 return nil, err 2321 } 2322 2323 switch m["protectedItemType"] { 2324 case string(ProtectedItemTypeMicrosoftClassicComputevirtualMachines): 2325 var aisccvpi AzureIaaSClassicComputeVMProtectedItem 2326 err := json.Unmarshal(body, &aisccvpi) 2327 return aisccvpi, err 2328 case string(ProtectedItemTypeMicrosoftComputevirtualMachines): 2329 var aiscvpi AzureIaaSComputeVMProtectedItem 2330 err := json.Unmarshal(body, &aiscvpi) 2331 return aiscvpi, err 2332 default: 2333 var aispi AzureIaaSVMProtectedItem 2334 err := json.Unmarshal(body, &aispi) 2335 return aispi, err 2336 } 2337} 2338func unmarshalBasicAzureIaaSVMProtectedItemArray(body []byte) ([]BasicAzureIaaSVMProtectedItem, error) { 2339 var rawMessages []*json.RawMessage 2340 err := json.Unmarshal(body, &rawMessages) 2341 if err != nil { 2342 return nil, err 2343 } 2344 2345 aispiArray := make([]BasicAzureIaaSVMProtectedItem, len(rawMessages)) 2346 2347 for index, rawMessage := range rawMessages { 2348 aispi, err := unmarshalBasicAzureIaaSVMProtectedItem(*rawMessage) 2349 if err != nil { 2350 return nil, err 2351 } 2352 aispiArray[index] = aispi 2353 } 2354 return aispiArray, nil 2355} 2356 2357// MarshalJSON is the custom marshaler for AzureIaaSVMProtectedItem. 2358func (aispi AzureIaaSVMProtectedItem) MarshalJSON() ([]byte, error) { 2359 aispi.ProtectedItemType = ProtectedItemTypeAzureIaaSVMProtectedItem 2360 objectMap := make(map[string]interface{}) 2361 if aispi.FriendlyName != nil { 2362 objectMap["friendlyName"] = aispi.FriendlyName 2363 } 2364 if aispi.VirtualMachineID != nil { 2365 objectMap["virtualMachineId"] = aispi.VirtualMachineID 2366 } 2367 if aispi.ProtectionStatus != nil { 2368 objectMap["protectionStatus"] = aispi.ProtectionStatus 2369 } 2370 if aispi.ProtectionState != "" { 2371 objectMap["protectionState"] = aispi.ProtectionState 2372 } 2373 if aispi.HealthStatus != "" { 2374 objectMap["healthStatus"] = aispi.HealthStatus 2375 } 2376 if aispi.HealthDetails != nil { 2377 objectMap["healthDetails"] = aispi.HealthDetails 2378 } 2379 if aispi.LastBackupStatus != nil { 2380 objectMap["lastBackupStatus"] = aispi.LastBackupStatus 2381 } 2382 if aispi.LastBackupTime != nil { 2383 objectMap["lastBackupTime"] = aispi.LastBackupTime 2384 } 2385 if aispi.ProtectedItemDataID != nil { 2386 objectMap["protectedItemDataId"] = aispi.ProtectedItemDataID 2387 } 2388 if aispi.ExtendedInfo != nil { 2389 objectMap["extendedInfo"] = aispi.ExtendedInfo 2390 } 2391 if aispi.ExtendedProperties != nil { 2392 objectMap["extendedProperties"] = aispi.ExtendedProperties 2393 } 2394 if aispi.BackupManagementType != "" { 2395 objectMap["backupManagementType"] = aispi.BackupManagementType 2396 } 2397 if aispi.WorkloadType != "" { 2398 objectMap["workloadType"] = aispi.WorkloadType 2399 } 2400 if aispi.ContainerName != nil { 2401 objectMap["containerName"] = aispi.ContainerName 2402 } 2403 if aispi.SourceResourceID != nil { 2404 objectMap["sourceResourceId"] = aispi.SourceResourceID 2405 } 2406 if aispi.PolicyID != nil { 2407 objectMap["policyId"] = aispi.PolicyID 2408 } 2409 if aispi.LastRecoveryPoint != nil { 2410 objectMap["lastRecoveryPoint"] = aispi.LastRecoveryPoint 2411 } 2412 if aispi.BackupSetName != nil { 2413 objectMap["backupSetName"] = aispi.BackupSetName 2414 } 2415 if aispi.CreateMode != "" { 2416 objectMap["createMode"] = aispi.CreateMode 2417 } 2418 if aispi.DeferredDeleteTimeInUTC != nil { 2419 objectMap["deferredDeleteTimeInUTC"] = aispi.DeferredDeleteTimeInUTC 2420 } 2421 if aispi.IsScheduledForDeferredDelete != nil { 2422 objectMap["isScheduledForDeferredDelete"] = aispi.IsScheduledForDeferredDelete 2423 } 2424 if aispi.DeferredDeleteTimeRemaining != nil { 2425 objectMap["deferredDeleteTimeRemaining"] = aispi.DeferredDeleteTimeRemaining 2426 } 2427 if aispi.IsDeferredDeleteScheduleUpcoming != nil { 2428 objectMap["isDeferredDeleteScheduleUpcoming"] = aispi.IsDeferredDeleteScheduleUpcoming 2429 } 2430 if aispi.IsRehydrate != nil { 2431 objectMap["isRehydrate"] = aispi.IsRehydrate 2432 } 2433 if aispi.ProtectedItemType != "" { 2434 objectMap["protectedItemType"] = aispi.ProtectedItemType 2435 } 2436 return json.Marshal(objectMap) 2437} 2438 2439// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. 2440func (aispi AzureIaaSVMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { 2441 return nil, false 2442} 2443 2444// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. 2445func (aispi AzureIaaSVMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { 2446 return nil, false 2447} 2448 2449// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. 2450func (aispi AzureIaaSVMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { 2451 return nil, false 2452} 2453 2454// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. 2455func (aispi AzureIaaSVMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { 2456 return &aispi, true 2457} 2458 2459// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. 2460func (aispi AzureIaaSVMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { 2461 return &aispi, true 2462} 2463 2464// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. 2465func (aispi AzureIaaSVMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { 2466 return nil, false 2467} 2468 2469// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. 2470func (aispi AzureIaaSVMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { 2471 return nil, false 2472} 2473 2474// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. 2475func (aispi AzureIaaSVMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { 2476 return nil, false 2477} 2478 2479// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. 2480func (aispi AzureIaaSVMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { 2481 return nil, false 2482} 2483 2484// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. 2485func (aispi AzureIaaSVMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { 2486 return nil, false 2487} 2488 2489// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. 2490func (aispi AzureIaaSVMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { 2491 return nil, false 2492} 2493 2494// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. 2495func (aispi AzureIaaSVMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { 2496 return nil, false 2497} 2498 2499// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. 2500func (aispi AzureIaaSVMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { 2501 return nil, false 2502} 2503 2504// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. 2505func (aispi AzureIaaSVMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { 2506 return nil, false 2507} 2508 2509// AsProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. 2510func (aispi AzureIaaSVMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { 2511 return nil, false 2512} 2513 2514// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. 2515func (aispi AzureIaaSVMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { 2516 return &aispi, true 2517} 2518 2519// AzureIaaSVMProtectedItemExtendedInfo additional information on Azure IaaS VM specific backup item. 2520type AzureIaaSVMProtectedItemExtendedInfo struct { 2521 // OldestRecoveryPoint - The oldest backup copy available for this backup item. 2522 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"` 2523 // RecoveryPointCount - Number of backup copies available for this backup item. 2524 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"` 2525 // PolicyInconsistent - Specifies if backup policy associated with the backup item is inconsistent. 2526 PolicyInconsistent *bool `json:"policyInconsistent,omitempty"` 2527} 2528 2529// AzureIaaSVMProtectionPolicy iaaS VM workload-specific backup policy. 2530type AzureIaaSVMProtectionPolicy struct { 2531 // SchedulePolicy - Backup schedule specified as part of backup policy. 2532 SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"` 2533 // RetentionPolicy - Retention policy with the details on backup copy retention ranges. 2534 RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"` 2535 // InstantRpRetentionRangeInDays - Instant RP retention policy range in days 2536 InstantRpRetentionRangeInDays *int32 `json:"instantRpRetentionRangeInDays,omitempty"` 2537 // TimeZone - TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". 2538 TimeZone *string `json:"timeZone,omitempty"` 2539 // ProtectedItemsCount - Number of items associated with this policy. 2540 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` 2541 // BackupManagementType - Possible values include: 'BackupManagementTypeProtectionPolicy', 'BackupManagementTypeAzureWorkload', 'BackupManagementTypeAzureStorage', 'BackupManagementTypeAzureIaasVM', 'BackupManagementTypeAzureSQL', 'BackupManagementTypeGenericProtectionPolicy', 'BackupManagementTypeMAB' 2542 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"` 2543} 2544 2545// MarshalJSON is the custom marshaler for AzureIaaSVMProtectionPolicy. 2546func (aispp AzureIaaSVMProtectionPolicy) MarshalJSON() ([]byte, error) { 2547 aispp.BackupManagementType = BackupManagementTypeAzureIaasVM 2548 objectMap := make(map[string]interface{}) 2549 objectMap["schedulePolicy"] = aispp.SchedulePolicy 2550 objectMap["retentionPolicy"] = aispp.RetentionPolicy 2551 if aispp.InstantRpRetentionRangeInDays != nil { 2552 objectMap["instantRpRetentionRangeInDays"] = aispp.InstantRpRetentionRangeInDays 2553 } 2554 if aispp.TimeZone != nil { 2555 objectMap["timeZone"] = aispp.TimeZone 2556 } 2557 if aispp.ProtectedItemsCount != nil { 2558 objectMap["protectedItemsCount"] = aispp.ProtectedItemsCount 2559 } 2560 if aispp.BackupManagementType != "" { 2561 objectMap["backupManagementType"] = aispp.BackupManagementType 2562 } 2563 return json.Marshal(objectMap) 2564} 2565 2566// AsAzureVMWorkloadProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy. 2567func (aispp AzureIaaSVMProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) { 2568 return nil, false 2569} 2570 2571// AsAzureFileShareProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy. 2572func (aispp AzureIaaSVMProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) { 2573 return nil, false 2574} 2575 2576// AsAzureIaaSVMProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy. 2577func (aispp AzureIaaSVMProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) { 2578 return &aispp, true 2579} 2580 2581// AsAzureSQLProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy. 2582func (aispp AzureIaaSVMProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) { 2583 return nil, false 2584} 2585 2586// AsGenericProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy. 2587func (aispp AzureIaaSVMProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) { 2588 return nil, false 2589} 2590 2591// AsMabProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy. 2592func (aispp AzureIaaSVMProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) { 2593 return nil, false 2594} 2595 2596// AsProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy. 2597func (aispp AzureIaaSVMProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) { 2598 return nil, false 2599} 2600 2601// AsBasicProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy. 2602func (aispp AzureIaaSVMProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) { 2603 return &aispp, true 2604} 2605 2606// UnmarshalJSON is the custom unmarshaler for AzureIaaSVMProtectionPolicy struct. 2607func (aispp *AzureIaaSVMProtectionPolicy) UnmarshalJSON(body []byte) error { 2608 var m map[string]*json.RawMessage 2609 err := json.Unmarshal(body, &m) 2610 if err != nil { 2611 return err 2612 } 2613 for k, v := range m { 2614 switch k { 2615 case "schedulePolicy": 2616 if v != nil { 2617 schedulePolicy, err := unmarshalBasicSchedulePolicy(*v) 2618 if err != nil { 2619 return err 2620 } 2621 aispp.SchedulePolicy = schedulePolicy 2622 } 2623 case "retentionPolicy": 2624 if v != nil { 2625 retentionPolicy, err := unmarshalBasicRetentionPolicy(*v) 2626 if err != nil { 2627 return err 2628 } 2629 aispp.RetentionPolicy = retentionPolicy 2630 } 2631 case "instantRpRetentionRangeInDays": 2632 if v != nil { 2633 var instantRpRetentionRangeInDays int32 2634 err = json.Unmarshal(*v, &instantRpRetentionRangeInDays) 2635 if err != nil { 2636 return err 2637 } 2638 aispp.InstantRpRetentionRangeInDays = &instantRpRetentionRangeInDays 2639 } 2640 case "timeZone": 2641 if v != nil { 2642 var timeZone string 2643 err = json.Unmarshal(*v, &timeZone) 2644 if err != nil { 2645 return err 2646 } 2647 aispp.TimeZone = &timeZone 2648 } 2649 case "protectedItemsCount": 2650 if v != nil { 2651 var protectedItemsCount int32 2652 err = json.Unmarshal(*v, &protectedItemsCount) 2653 if err != nil { 2654 return err 2655 } 2656 aispp.ProtectedItemsCount = &protectedItemsCount 2657 } 2658 case "backupManagementType": 2659 if v != nil { 2660 var backupManagementType ManagementTypeBasicProtectionPolicy 2661 err = json.Unmarshal(*v, &backupManagementType) 2662 if err != nil { 2663 return err 2664 } 2665 aispp.BackupManagementType = backupManagementType 2666 } 2667 } 2668 } 2669 2670 return nil 2671} 2672 2673// BasicAzureRecoveryServiceVaultProtectionIntent azure Recovery Services Vault specific protection intent item. 2674type BasicAzureRecoveryServiceVaultProtectionIntent interface { 2675 AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) 2676 AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) 2677 AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) 2678 AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) 2679} 2680 2681// AzureRecoveryServiceVaultProtectionIntent azure Recovery Services Vault specific protection intent item. 2682type AzureRecoveryServiceVaultProtectionIntent struct { 2683 // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 2684 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 2685 // SourceResourceID - ARM ID of the resource to be backed up. 2686 SourceResourceID *string `json:"sourceResourceId,omitempty"` 2687 // ItemID - ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId 2688 ItemID *string `json:"itemId,omitempty"` 2689 // PolicyID - ID of the backup policy with which this item is backed up. 2690 PolicyID *string `json:"policyId,omitempty"` 2691 // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 2692 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 2693 // ProtectionIntentItemType - Possible values include: 'ProtectionIntentItemTypeProtectionIntent', 'ProtectionIntentItemTypeRecoveryServiceVaultItem', 'ProtectionIntentItemTypeAzureResourceItem', 'ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent', 'ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent' 2694 ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"` 2695} 2696 2697func unmarshalBasicAzureRecoveryServiceVaultProtectionIntent(body []byte) (BasicAzureRecoveryServiceVaultProtectionIntent, error) { 2698 var m map[string]interface{} 2699 err := json.Unmarshal(body, &m) 2700 if err != nil { 2701 return nil, err 2702 } 2703 2704 switch m["protectionIntentItemType"] { 2705 case string(ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent): 2706 var awapi AzureWorkloadAutoProtectionIntent 2707 err := json.Unmarshal(body, &awapi) 2708 return awapi, err 2709 case string(ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent): 2710 var awsapi AzureWorkloadSQLAutoProtectionIntent 2711 err := json.Unmarshal(body, &awsapi) 2712 return awsapi, err 2713 default: 2714 var arsvpi AzureRecoveryServiceVaultProtectionIntent 2715 err := json.Unmarshal(body, &arsvpi) 2716 return arsvpi, err 2717 } 2718} 2719func unmarshalBasicAzureRecoveryServiceVaultProtectionIntentArray(body []byte) ([]BasicAzureRecoveryServiceVaultProtectionIntent, error) { 2720 var rawMessages []*json.RawMessage 2721 err := json.Unmarshal(body, &rawMessages) 2722 if err != nil { 2723 return nil, err 2724 } 2725 2726 arsvpiArray := make([]BasicAzureRecoveryServiceVaultProtectionIntent, len(rawMessages)) 2727 2728 for index, rawMessage := range rawMessages { 2729 arsvpi, err := unmarshalBasicAzureRecoveryServiceVaultProtectionIntent(*rawMessage) 2730 if err != nil { 2731 return nil, err 2732 } 2733 arsvpiArray[index] = arsvpi 2734 } 2735 return arsvpiArray, nil 2736} 2737 2738// MarshalJSON is the custom marshaler for AzureRecoveryServiceVaultProtectionIntent. 2739func (arsvpi AzureRecoveryServiceVaultProtectionIntent) MarshalJSON() ([]byte, error) { 2740 arsvpi.ProtectionIntentItemType = ProtectionIntentItemTypeRecoveryServiceVaultItem 2741 objectMap := make(map[string]interface{}) 2742 if arsvpi.BackupManagementType != "" { 2743 objectMap["backupManagementType"] = arsvpi.BackupManagementType 2744 } 2745 if arsvpi.SourceResourceID != nil { 2746 objectMap["sourceResourceId"] = arsvpi.SourceResourceID 2747 } 2748 if arsvpi.ItemID != nil { 2749 objectMap["itemId"] = arsvpi.ItemID 2750 } 2751 if arsvpi.PolicyID != nil { 2752 objectMap["policyId"] = arsvpi.PolicyID 2753 } 2754 if arsvpi.ProtectionState != "" { 2755 objectMap["protectionState"] = arsvpi.ProtectionState 2756 } 2757 if arsvpi.ProtectionIntentItemType != "" { 2758 objectMap["protectionIntentItemType"] = arsvpi.ProtectionIntentItemType 2759 } 2760 return json.Marshal(objectMap) 2761} 2762 2763// AsAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. 2764func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) { 2765 return &arsvpi, true 2766} 2767 2768// AsBasicAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. 2769func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) { 2770 return &arsvpi, true 2771} 2772 2773// AsAzureResourceProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. 2774func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) { 2775 return nil, false 2776} 2777 2778// AsAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. 2779func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) { 2780 return nil, false 2781} 2782 2783// AsBasicAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. 2784func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) { 2785 return nil, false 2786} 2787 2788// AsAzureWorkloadSQLAutoProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. 2789func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) { 2790 return nil, false 2791} 2792 2793// AsProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. 2794func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) { 2795 return nil, false 2796} 2797 2798// AsBasicProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. 2799func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) { 2800 return &arsvpi, true 2801} 2802 2803// AzureResourceProtectionIntent iaaS VM specific backup protection intent item. 2804type AzureResourceProtectionIntent struct { 2805 // FriendlyName - Friendly name of the VM represented by this backup item. 2806 FriendlyName *string `json:"friendlyName,omitempty"` 2807 // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 2808 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 2809 // SourceResourceID - ARM ID of the resource to be backed up. 2810 SourceResourceID *string `json:"sourceResourceId,omitempty"` 2811 // ItemID - ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId 2812 ItemID *string `json:"itemId,omitempty"` 2813 // PolicyID - ID of the backup policy with which this item is backed up. 2814 PolicyID *string `json:"policyId,omitempty"` 2815 // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 2816 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 2817 // ProtectionIntentItemType - Possible values include: 'ProtectionIntentItemTypeProtectionIntent', 'ProtectionIntentItemTypeRecoveryServiceVaultItem', 'ProtectionIntentItemTypeAzureResourceItem', 'ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent', 'ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent' 2818 ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"` 2819} 2820 2821// MarshalJSON is the custom marshaler for AzureResourceProtectionIntent. 2822func (arpi AzureResourceProtectionIntent) MarshalJSON() ([]byte, error) { 2823 arpi.ProtectionIntentItemType = ProtectionIntentItemTypeAzureResourceItem 2824 objectMap := make(map[string]interface{}) 2825 if arpi.FriendlyName != nil { 2826 objectMap["friendlyName"] = arpi.FriendlyName 2827 } 2828 if arpi.BackupManagementType != "" { 2829 objectMap["backupManagementType"] = arpi.BackupManagementType 2830 } 2831 if arpi.SourceResourceID != nil { 2832 objectMap["sourceResourceId"] = arpi.SourceResourceID 2833 } 2834 if arpi.ItemID != nil { 2835 objectMap["itemId"] = arpi.ItemID 2836 } 2837 if arpi.PolicyID != nil { 2838 objectMap["policyId"] = arpi.PolicyID 2839 } 2840 if arpi.ProtectionState != "" { 2841 objectMap["protectionState"] = arpi.ProtectionState 2842 } 2843 if arpi.ProtectionIntentItemType != "" { 2844 objectMap["protectionIntentItemType"] = arpi.ProtectionIntentItemType 2845 } 2846 return json.Marshal(objectMap) 2847} 2848 2849// AsAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. 2850func (arpi AzureResourceProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) { 2851 return nil, false 2852} 2853 2854// AsBasicAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. 2855func (arpi AzureResourceProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) { 2856 return nil, false 2857} 2858 2859// AsAzureResourceProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. 2860func (arpi AzureResourceProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) { 2861 return &arpi, true 2862} 2863 2864// AsAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. 2865func (arpi AzureResourceProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) { 2866 return nil, false 2867} 2868 2869// AsBasicAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. 2870func (arpi AzureResourceProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) { 2871 return nil, false 2872} 2873 2874// AsAzureWorkloadSQLAutoProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. 2875func (arpi AzureResourceProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) { 2876 return nil, false 2877} 2878 2879// AsProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. 2880func (arpi AzureResourceProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) { 2881 return nil, false 2882} 2883 2884// AsBasicProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. 2885func (arpi AzureResourceProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) { 2886 return &arpi, true 2887} 2888 2889// AzureSQLAGWorkloadContainerProtectionContainer container for SQL workloads under SQL Availability Group. 2890type AzureSQLAGWorkloadContainerProtectionContainer struct { 2891 // SourceResourceID - ARM ID of the virtual machine represented by this Azure Workload Container 2892 SourceResourceID *string `json:"sourceResourceId,omitempty"` 2893 // LastUpdatedTime - Time stamp when this container was updated. 2894 LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"` 2895 // ExtendedInfo - Additional details of a workload container. 2896 ExtendedInfo *AzureWorkloadContainerExtendedInfo `json:"extendedInfo,omitempty"` 2897 // WorkloadType - Workload type for which registration was sent. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' 2898 WorkloadType WorkloadType `json:"workloadType,omitempty"` 2899 // OperationType - Re-Do Operation. Possible values include: 'OperationTypeInvalid', 'OperationTypeRegister', 'OperationTypeReregister' 2900 OperationType OperationType `json:"operationType,omitempty"` 2901 // FriendlyName - Friendly name of the container. 2902 FriendlyName *string `json:"friendlyName,omitempty"` 2903 // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 2904 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 2905 // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. 2906 RegistrationStatus *string `json:"registrationStatus,omitempty"` 2907 // HealthStatus - Status of health of the container. 2908 HealthStatus *string `json:"healthStatus,omitempty"` 2909 // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' 2910 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` 2911} 2912 2913// MarshalJSON is the custom marshaler for AzureSQLAGWorkloadContainerProtectionContainer. 2914func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) MarshalJSON() ([]byte, error) { 2915 aswcpc.ContainerType = ContainerTypeSQLAGWorkLoadContainer1 2916 objectMap := make(map[string]interface{}) 2917 if aswcpc.SourceResourceID != nil { 2918 objectMap["sourceResourceId"] = aswcpc.SourceResourceID 2919 } 2920 if aswcpc.LastUpdatedTime != nil { 2921 objectMap["lastUpdatedTime"] = aswcpc.LastUpdatedTime 2922 } 2923 if aswcpc.ExtendedInfo != nil { 2924 objectMap["extendedInfo"] = aswcpc.ExtendedInfo 2925 } 2926 if aswcpc.WorkloadType != "" { 2927 objectMap["workloadType"] = aswcpc.WorkloadType 2928 } 2929 if aswcpc.OperationType != "" { 2930 objectMap["operationType"] = aswcpc.OperationType 2931 } 2932 if aswcpc.FriendlyName != nil { 2933 objectMap["friendlyName"] = aswcpc.FriendlyName 2934 } 2935 if aswcpc.BackupManagementType != "" { 2936 objectMap["backupManagementType"] = aswcpc.BackupManagementType 2937 } 2938 if aswcpc.RegistrationStatus != nil { 2939 objectMap["registrationStatus"] = aswcpc.RegistrationStatus 2940 } 2941 if aswcpc.HealthStatus != nil { 2942 objectMap["healthStatus"] = aswcpc.HealthStatus 2943 } 2944 if aswcpc.ContainerType != "" { 2945 objectMap["containerType"] = aswcpc.ContainerType 2946 } 2947 return json.Marshal(objectMap) 2948} 2949 2950// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. 2951func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { 2952 return nil, false 2953} 2954 2955// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. 2956func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { 2957 return nil, false 2958} 2959 2960// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. 2961func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { 2962 return nil, false 2963} 2964 2965// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. 2966func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { 2967 return &aswcpc, true 2968} 2969 2970// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. 2971func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { 2972 return nil, false 2973} 2974 2975// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. 2976func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { 2977 return nil, false 2978} 2979 2980// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. 2981func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { 2982 return nil, false 2983} 2984 2985// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. 2986func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { 2987 return nil, false 2988} 2989 2990// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. 2991func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { 2992 return &aswcpc, true 2993} 2994 2995// AsDpmContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. 2996func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsDpmContainer() (*DpmContainer, bool) { 2997 return nil, false 2998} 2999 3000// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. 3001func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { 3002 return nil, false 3003} 3004 3005// AsGenericContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. 3006func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsGenericContainer() (*GenericContainer, bool) { 3007 return nil, false 3008} 3009 3010// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. 3011func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { 3012 return nil, false 3013} 3014 3015// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. 3016func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { 3017 return nil, false 3018} 3019 3020// AsMabContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. 3021func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsMabContainer() (*MabContainer, bool) { 3022 return nil, false 3023} 3024 3025// AsProtectionContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. 3026func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsProtectionContainer() (*ProtectionContainer, bool) { 3027 return nil, false 3028} 3029 3030// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. 3031func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { 3032 return &aswcpc, true 3033} 3034 3035// AzureSQLContainer azure Sql workload-specific container. 3036type AzureSQLContainer struct { 3037 // FriendlyName - Friendly name of the container. 3038 FriendlyName *string `json:"friendlyName,omitempty"` 3039 // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 3040 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 3041 // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. 3042 RegistrationStatus *string `json:"registrationStatus,omitempty"` 3043 // HealthStatus - Status of health of the container. 3044 HealthStatus *string `json:"healthStatus,omitempty"` 3045 // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' 3046 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` 3047} 3048 3049// MarshalJSON is the custom marshaler for AzureSQLContainer. 3050func (asc AzureSQLContainer) MarshalJSON() ([]byte, error) { 3051 asc.ContainerType = ContainerTypeAzureSQLContainer1 3052 objectMap := make(map[string]interface{}) 3053 if asc.FriendlyName != nil { 3054 objectMap["friendlyName"] = asc.FriendlyName 3055 } 3056 if asc.BackupManagementType != "" { 3057 objectMap["backupManagementType"] = asc.BackupManagementType 3058 } 3059 if asc.RegistrationStatus != nil { 3060 objectMap["registrationStatus"] = asc.RegistrationStatus 3061 } 3062 if asc.HealthStatus != nil { 3063 objectMap["healthStatus"] = asc.HealthStatus 3064 } 3065 if asc.ContainerType != "" { 3066 objectMap["containerType"] = asc.ContainerType 3067 } 3068 return json.Marshal(objectMap) 3069} 3070 3071// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureSQLContainer. 3072func (asc AzureSQLContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { 3073 return nil, false 3074} 3075 3076// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureSQLContainer. 3077func (asc AzureSQLContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { 3078 return nil, false 3079} 3080 3081// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureSQLContainer. 3082func (asc AzureSQLContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { 3083 return nil, false 3084} 3085 3086// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureSQLContainer. 3087func (asc AzureSQLContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { 3088 return nil, false 3089} 3090 3091// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureSQLContainer. 3092func (asc AzureSQLContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { 3093 return &asc, true 3094} 3095 3096// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureSQLContainer. 3097func (asc AzureSQLContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { 3098 return nil, false 3099} 3100 3101// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureSQLContainer. 3102func (asc AzureSQLContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { 3103 return nil, false 3104} 3105 3106// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureSQLContainer. 3107func (asc AzureSQLContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { 3108 return nil, false 3109} 3110 3111// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureSQLContainer. 3112func (asc AzureSQLContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { 3113 return nil, false 3114} 3115 3116// AsDpmContainer is the BasicProtectionContainer implementation for AzureSQLContainer. 3117func (asc AzureSQLContainer) AsDpmContainer() (*DpmContainer, bool) { 3118 return nil, false 3119} 3120 3121// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureSQLContainer. 3122func (asc AzureSQLContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { 3123 return nil, false 3124} 3125 3126// AsGenericContainer is the BasicProtectionContainer implementation for AzureSQLContainer. 3127func (asc AzureSQLContainer) AsGenericContainer() (*GenericContainer, bool) { 3128 return nil, false 3129} 3130 3131// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureSQLContainer. 3132func (asc AzureSQLContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { 3133 return nil, false 3134} 3135 3136// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureSQLContainer. 3137func (asc AzureSQLContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { 3138 return nil, false 3139} 3140 3141// AsMabContainer is the BasicProtectionContainer implementation for AzureSQLContainer. 3142func (asc AzureSQLContainer) AsMabContainer() (*MabContainer, bool) { 3143 return nil, false 3144} 3145 3146// AsProtectionContainer is the BasicProtectionContainer implementation for AzureSQLContainer. 3147func (asc AzureSQLContainer) AsProtectionContainer() (*ProtectionContainer, bool) { 3148 return nil, false 3149} 3150 3151// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureSQLContainer. 3152func (asc AzureSQLContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { 3153 return &asc, true 3154} 3155 3156// AzureSQLProtectedItem azure SQL workload-specific backup item. 3157type AzureSQLProtectedItem struct { 3158 // ProtectedItemDataID - Internal ID of a backup item. Used by Azure SQL Backup engine to contact Recovery Services. 3159 ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"` 3160 // ProtectionState - Backup state of the backed up item. Possible values include: 'ProtectedItemStateInvalid', 'ProtectedItemStateIRPending', 'ProtectedItemStateProtected', 'ProtectedItemStateProtectionError', 'ProtectedItemStateProtectionStopped', 'ProtectedItemStateProtectionPaused' 3161 ProtectionState ProtectedItemState `json:"protectionState,omitempty"` 3162 // ExtendedInfo - Additional information for this backup item. 3163 ExtendedInfo *AzureSQLProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` 3164 // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 3165 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 3166 // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' 3167 WorkloadType DataSourceType `json:"workloadType,omitempty"` 3168 // ContainerName - Unique name of container 3169 ContainerName *string `json:"containerName,omitempty"` 3170 // SourceResourceID - ARM ID of the resource to be backed up. 3171 SourceResourceID *string `json:"sourceResourceId,omitempty"` 3172 // PolicyID - ID of the backup policy with which this item is backed up. 3173 PolicyID *string `json:"policyId,omitempty"` 3174 // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. 3175 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` 3176 // BackupSetName - Name of the backup set the backup item belongs to 3177 BackupSetName *string `json:"backupSetName,omitempty"` 3178 // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' 3179 CreateMode CreateMode `json:"createMode,omitempty"` 3180 // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC 3181 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` 3182 // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete 3183 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` 3184 // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted 3185 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` 3186 // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon 3187 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` 3188 // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state 3189 IsRehydrate *bool `json:"isRehydrate,omitempty"` 3190 // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' 3191 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` 3192} 3193 3194// MarshalJSON is the custom marshaler for AzureSQLProtectedItem. 3195func (aspi AzureSQLProtectedItem) MarshalJSON() ([]byte, error) { 3196 aspi.ProtectedItemType = ProtectedItemTypeMicrosoftSqlserversdatabases 3197 objectMap := make(map[string]interface{}) 3198 if aspi.ProtectedItemDataID != nil { 3199 objectMap["protectedItemDataId"] = aspi.ProtectedItemDataID 3200 } 3201 if aspi.ProtectionState != "" { 3202 objectMap["protectionState"] = aspi.ProtectionState 3203 } 3204 if aspi.ExtendedInfo != nil { 3205 objectMap["extendedInfo"] = aspi.ExtendedInfo 3206 } 3207 if aspi.BackupManagementType != "" { 3208 objectMap["backupManagementType"] = aspi.BackupManagementType 3209 } 3210 if aspi.WorkloadType != "" { 3211 objectMap["workloadType"] = aspi.WorkloadType 3212 } 3213 if aspi.ContainerName != nil { 3214 objectMap["containerName"] = aspi.ContainerName 3215 } 3216 if aspi.SourceResourceID != nil { 3217 objectMap["sourceResourceId"] = aspi.SourceResourceID 3218 } 3219 if aspi.PolicyID != nil { 3220 objectMap["policyId"] = aspi.PolicyID 3221 } 3222 if aspi.LastRecoveryPoint != nil { 3223 objectMap["lastRecoveryPoint"] = aspi.LastRecoveryPoint 3224 } 3225 if aspi.BackupSetName != nil { 3226 objectMap["backupSetName"] = aspi.BackupSetName 3227 } 3228 if aspi.CreateMode != "" { 3229 objectMap["createMode"] = aspi.CreateMode 3230 } 3231 if aspi.DeferredDeleteTimeInUTC != nil { 3232 objectMap["deferredDeleteTimeInUTC"] = aspi.DeferredDeleteTimeInUTC 3233 } 3234 if aspi.IsScheduledForDeferredDelete != nil { 3235 objectMap["isScheduledForDeferredDelete"] = aspi.IsScheduledForDeferredDelete 3236 } 3237 if aspi.DeferredDeleteTimeRemaining != nil { 3238 objectMap["deferredDeleteTimeRemaining"] = aspi.DeferredDeleteTimeRemaining 3239 } 3240 if aspi.IsDeferredDeleteScheduleUpcoming != nil { 3241 objectMap["isDeferredDeleteScheduleUpcoming"] = aspi.IsDeferredDeleteScheduleUpcoming 3242 } 3243 if aspi.IsRehydrate != nil { 3244 objectMap["isRehydrate"] = aspi.IsRehydrate 3245 } 3246 if aspi.ProtectedItemType != "" { 3247 objectMap["protectedItemType"] = aspi.ProtectedItemType 3248 } 3249 return json.Marshal(objectMap) 3250} 3251 3252// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. 3253func (aspi AzureSQLProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { 3254 return nil, false 3255} 3256 3257// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. 3258func (aspi AzureSQLProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { 3259 return nil, false 3260} 3261 3262// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. 3263func (aspi AzureSQLProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { 3264 return nil, false 3265} 3266 3267// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. 3268func (aspi AzureSQLProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { 3269 return nil, false 3270} 3271 3272// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. 3273func (aspi AzureSQLProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { 3274 return nil, false 3275} 3276 3277// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. 3278func (aspi AzureSQLProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { 3279 return &aspi, true 3280} 3281 3282// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. 3283func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { 3284 return nil, false 3285} 3286 3287// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. 3288func (aspi AzureSQLProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { 3289 return nil, false 3290} 3291 3292// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. 3293func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { 3294 return nil, false 3295} 3296 3297// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. 3298func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { 3299 return nil, false 3300} 3301 3302// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. 3303func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { 3304 return nil, false 3305} 3306 3307// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. 3308func (aspi AzureSQLProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { 3309 return nil, false 3310} 3311 3312// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. 3313func (aspi AzureSQLProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { 3314 return nil, false 3315} 3316 3317// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. 3318func (aspi AzureSQLProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { 3319 return nil, false 3320} 3321 3322// AsProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. 3323func (aspi AzureSQLProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { 3324 return nil, false 3325} 3326 3327// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. 3328func (aspi AzureSQLProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { 3329 return &aspi, true 3330} 3331 3332// AzureSQLProtectedItemExtendedInfo additional information on Azure Sql specific protected item. 3333type AzureSQLProtectedItemExtendedInfo struct { 3334 // OldestRecoveryPoint - The oldest backup copy available for this item in the service. 3335 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"` 3336 // RecoveryPointCount - Number of available backup copies associated with this backup item. 3337 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"` 3338 // PolicyState - State of the backup policy associated with this backup item. 3339 PolicyState *string `json:"policyState,omitempty"` 3340} 3341 3342// AzureSQLProtectionPolicy azure SQL workload-specific backup policy. 3343type AzureSQLProtectionPolicy struct { 3344 // RetentionPolicy - Retention policy details. 3345 RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"` 3346 // ProtectedItemsCount - Number of items associated with this policy. 3347 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` 3348 // BackupManagementType - Possible values include: 'BackupManagementTypeProtectionPolicy', 'BackupManagementTypeAzureWorkload', 'BackupManagementTypeAzureStorage', 'BackupManagementTypeAzureIaasVM', 'BackupManagementTypeAzureSQL', 'BackupManagementTypeGenericProtectionPolicy', 'BackupManagementTypeMAB' 3349 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"` 3350} 3351 3352// MarshalJSON is the custom marshaler for AzureSQLProtectionPolicy. 3353func (aspp AzureSQLProtectionPolicy) MarshalJSON() ([]byte, error) { 3354 aspp.BackupManagementType = BackupManagementTypeAzureSQL 3355 objectMap := make(map[string]interface{}) 3356 objectMap["retentionPolicy"] = aspp.RetentionPolicy 3357 if aspp.ProtectedItemsCount != nil { 3358 objectMap["protectedItemsCount"] = aspp.ProtectedItemsCount 3359 } 3360 if aspp.BackupManagementType != "" { 3361 objectMap["backupManagementType"] = aspp.BackupManagementType 3362 } 3363 return json.Marshal(objectMap) 3364} 3365 3366// AsAzureVMWorkloadProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy. 3367func (aspp AzureSQLProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) { 3368 return nil, false 3369} 3370 3371// AsAzureFileShareProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy. 3372func (aspp AzureSQLProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) { 3373 return nil, false 3374} 3375 3376// AsAzureIaaSVMProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy. 3377func (aspp AzureSQLProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) { 3378 return nil, false 3379} 3380 3381// AsAzureSQLProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy. 3382func (aspp AzureSQLProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) { 3383 return &aspp, true 3384} 3385 3386// AsGenericProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy. 3387func (aspp AzureSQLProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) { 3388 return nil, false 3389} 3390 3391// AsMabProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy. 3392func (aspp AzureSQLProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) { 3393 return nil, false 3394} 3395 3396// AsProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy. 3397func (aspp AzureSQLProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) { 3398 return nil, false 3399} 3400 3401// AsBasicProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy. 3402func (aspp AzureSQLProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) { 3403 return &aspp, true 3404} 3405 3406// UnmarshalJSON is the custom unmarshaler for AzureSQLProtectionPolicy struct. 3407func (aspp *AzureSQLProtectionPolicy) UnmarshalJSON(body []byte) error { 3408 var m map[string]*json.RawMessage 3409 err := json.Unmarshal(body, &m) 3410 if err != nil { 3411 return err 3412 } 3413 for k, v := range m { 3414 switch k { 3415 case "retentionPolicy": 3416 if v != nil { 3417 retentionPolicy, err := unmarshalBasicRetentionPolicy(*v) 3418 if err != nil { 3419 return err 3420 } 3421 aspp.RetentionPolicy = retentionPolicy 3422 } 3423 case "protectedItemsCount": 3424 if v != nil { 3425 var protectedItemsCount int32 3426 err = json.Unmarshal(*v, &protectedItemsCount) 3427 if err != nil { 3428 return err 3429 } 3430 aspp.ProtectedItemsCount = &protectedItemsCount 3431 } 3432 case "backupManagementType": 3433 if v != nil { 3434 var backupManagementType ManagementTypeBasicProtectionPolicy 3435 err = json.Unmarshal(*v, &backupManagementType) 3436 if err != nil { 3437 return err 3438 } 3439 aspp.BackupManagementType = backupManagementType 3440 } 3441 } 3442 } 3443 3444 return nil 3445} 3446 3447// AzureStorageContainer azure Storage Account workload-specific container. 3448type AzureStorageContainer struct { 3449 // SourceResourceID - Fully qualified ARM url. 3450 SourceResourceID *string `json:"sourceResourceId,omitempty"` 3451 // StorageAccountVersion - Storage account version. 3452 StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` 3453 // ResourceGroup - Resource group name of Recovery Services Vault. 3454 ResourceGroup *string `json:"resourceGroup,omitempty"` 3455 // ProtectedItemCount - Number of items backed up in this container. 3456 ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` 3457 // FriendlyName - Friendly name of the container. 3458 FriendlyName *string `json:"friendlyName,omitempty"` 3459 // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 3460 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 3461 // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. 3462 RegistrationStatus *string `json:"registrationStatus,omitempty"` 3463 // HealthStatus - Status of health of the container. 3464 HealthStatus *string `json:"healthStatus,omitempty"` 3465 // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' 3466 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` 3467} 3468 3469// MarshalJSON is the custom marshaler for AzureStorageContainer. 3470func (asc AzureStorageContainer) MarshalJSON() ([]byte, error) { 3471 asc.ContainerType = ContainerTypeStorageContainer1 3472 objectMap := make(map[string]interface{}) 3473 if asc.SourceResourceID != nil { 3474 objectMap["sourceResourceId"] = asc.SourceResourceID 3475 } 3476 if asc.StorageAccountVersion != nil { 3477 objectMap["storageAccountVersion"] = asc.StorageAccountVersion 3478 } 3479 if asc.ResourceGroup != nil { 3480 objectMap["resourceGroup"] = asc.ResourceGroup 3481 } 3482 if asc.ProtectedItemCount != nil { 3483 objectMap["protectedItemCount"] = asc.ProtectedItemCount 3484 } 3485 if asc.FriendlyName != nil { 3486 objectMap["friendlyName"] = asc.FriendlyName 3487 } 3488 if asc.BackupManagementType != "" { 3489 objectMap["backupManagementType"] = asc.BackupManagementType 3490 } 3491 if asc.RegistrationStatus != nil { 3492 objectMap["registrationStatus"] = asc.RegistrationStatus 3493 } 3494 if asc.HealthStatus != nil { 3495 objectMap["healthStatus"] = asc.HealthStatus 3496 } 3497 if asc.ContainerType != "" { 3498 objectMap["containerType"] = asc.ContainerType 3499 } 3500 return json.Marshal(objectMap) 3501} 3502 3503// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureStorageContainer. 3504func (asc AzureStorageContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { 3505 return nil, false 3506} 3507 3508// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureStorageContainer. 3509func (asc AzureStorageContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { 3510 return nil, false 3511} 3512 3513// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureStorageContainer. 3514func (asc AzureStorageContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { 3515 return nil, false 3516} 3517 3518// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureStorageContainer. 3519func (asc AzureStorageContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { 3520 return nil, false 3521} 3522 3523// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureStorageContainer. 3524func (asc AzureStorageContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { 3525 return nil, false 3526} 3527 3528// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureStorageContainer. 3529func (asc AzureStorageContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { 3530 return &asc, true 3531} 3532 3533// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureStorageContainer. 3534func (asc AzureStorageContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { 3535 return nil, false 3536} 3537 3538// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureStorageContainer. 3539func (asc AzureStorageContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { 3540 return nil, false 3541} 3542 3543// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureStorageContainer. 3544func (asc AzureStorageContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { 3545 return nil, false 3546} 3547 3548// AsDpmContainer is the BasicProtectionContainer implementation for AzureStorageContainer. 3549func (asc AzureStorageContainer) AsDpmContainer() (*DpmContainer, bool) { 3550 return nil, false 3551} 3552 3553// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureStorageContainer. 3554func (asc AzureStorageContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { 3555 return nil, false 3556} 3557 3558// AsGenericContainer is the BasicProtectionContainer implementation for AzureStorageContainer. 3559func (asc AzureStorageContainer) AsGenericContainer() (*GenericContainer, bool) { 3560 return nil, false 3561} 3562 3563// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureStorageContainer. 3564func (asc AzureStorageContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { 3565 return nil, false 3566} 3567 3568// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureStorageContainer. 3569func (asc AzureStorageContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { 3570 return nil, false 3571} 3572 3573// AsMabContainer is the BasicProtectionContainer implementation for AzureStorageContainer. 3574func (asc AzureStorageContainer) AsMabContainer() (*MabContainer, bool) { 3575 return nil, false 3576} 3577 3578// AsProtectionContainer is the BasicProtectionContainer implementation for AzureStorageContainer. 3579func (asc AzureStorageContainer) AsProtectionContainer() (*ProtectionContainer, bool) { 3580 return nil, false 3581} 3582 3583// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureStorageContainer. 3584func (asc AzureStorageContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { 3585 return &asc, true 3586} 3587 3588// AzureStorageErrorInfo azure storage specific error information 3589type AzureStorageErrorInfo struct { 3590 // ErrorCode - Error code. 3591 ErrorCode *int32 `json:"errorCode,omitempty"` 3592 // ErrorString - Localized error string. 3593 ErrorString *string `json:"errorString,omitempty"` 3594 // Recommendations - List of localized recommendations for above error code. 3595 Recommendations *[]string `json:"recommendations,omitempty"` 3596} 3597 3598// AzureStorageJob azure storage specific job. 3599type AzureStorageJob struct { 3600 // Duration - Time elapsed during the execution of this job. 3601 Duration *string `json:"duration,omitempty"` 3602 // ActionsInfo - Gets or sets the state/actions applicable on this job like cancel/retry. 3603 ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"` 3604 // ErrorDetails - Error details on execution of this job. 3605 ErrorDetails *[]AzureStorageErrorInfo `json:"errorDetails,omitempty"` 3606 // StorageAccountName - Specifies friendly name of the storage account. 3607 StorageAccountName *string `json:"storageAccountName,omitempty"` 3608 // StorageAccountVersion - Specifies whether the Storage account is a Classic or an Azure Resource Manager Storage account. 3609 StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` 3610 // ExtendedInfo - Additional information about the job. 3611 ExtendedInfo *AzureStorageJobExtendedInfo `json:"extendedInfo,omitempty"` 3612 // EntityFriendlyName - Friendly name of the entity on which the current job is executing. 3613 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` 3614 // BackupManagementType - Backup management type to execute the current job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 3615 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 3616 // Operation - The operation name. 3617 Operation *string `json:"operation,omitempty"` 3618 // Status - Job status. 3619 Status *string `json:"status,omitempty"` 3620 // StartTime - The start time. 3621 StartTime *date.Time `json:"startTime,omitempty"` 3622 // EndTime - The end time. 3623 EndTime *date.Time `json:"endTime,omitempty"` 3624 // ActivityID - ActivityId of job. 3625 ActivityID *string `json:"activityId,omitempty"` 3626 // JobType - Possible values include: 'JobTypeJob', 'JobTypeAzureIaaSVMJob', 'JobTypeAzureStorageJob', 'JobTypeAzureWorkloadJob', 'JobTypeDpmJob', 'JobTypeMabJob' 3627 JobType JobType `json:"jobType,omitempty"` 3628} 3629 3630// MarshalJSON is the custom marshaler for AzureStorageJob. 3631func (asj AzureStorageJob) MarshalJSON() ([]byte, error) { 3632 asj.JobType = JobTypeAzureStorageJob 3633 objectMap := make(map[string]interface{}) 3634 if asj.Duration != nil { 3635 objectMap["duration"] = asj.Duration 3636 } 3637 if asj.ActionsInfo != nil { 3638 objectMap["actionsInfo"] = asj.ActionsInfo 3639 } 3640 if asj.ErrorDetails != nil { 3641 objectMap["errorDetails"] = asj.ErrorDetails 3642 } 3643 if asj.StorageAccountName != nil { 3644 objectMap["storageAccountName"] = asj.StorageAccountName 3645 } 3646 if asj.StorageAccountVersion != nil { 3647 objectMap["storageAccountVersion"] = asj.StorageAccountVersion 3648 } 3649 if asj.ExtendedInfo != nil { 3650 objectMap["extendedInfo"] = asj.ExtendedInfo 3651 } 3652 if asj.EntityFriendlyName != nil { 3653 objectMap["entityFriendlyName"] = asj.EntityFriendlyName 3654 } 3655 if asj.BackupManagementType != "" { 3656 objectMap["backupManagementType"] = asj.BackupManagementType 3657 } 3658 if asj.Operation != nil { 3659 objectMap["operation"] = asj.Operation 3660 } 3661 if asj.Status != nil { 3662 objectMap["status"] = asj.Status 3663 } 3664 if asj.StartTime != nil { 3665 objectMap["startTime"] = asj.StartTime 3666 } 3667 if asj.EndTime != nil { 3668 objectMap["endTime"] = asj.EndTime 3669 } 3670 if asj.ActivityID != nil { 3671 objectMap["activityId"] = asj.ActivityID 3672 } 3673 if asj.JobType != "" { 3674 objectMap["jobType"] = asj.JobType 3675 } 3676 return json.Marshal(objectMap) 3677} 3678 3679// AsAzureIaaSVMJob is the BasicJob implementation for AzureStorageJob. 3680func (asj AzureStorageJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) { 3681 return nil, false 3682} 3683 3684// AsAzureStorageJob is the BasicJob implementation for AzureStorageJob. 3685func (asj AzureStorageJob) AsAzureStorageJob() (*AzureStorageJob, bool) { 3686 return &asj, true 3687} 3688 3689// AsAzureWorkloadJob is the BasicJob implementation for AzureStorageJob. 3690func (asj AzureStorageJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) { 3691 return nil, false 3692} 3693 3694// AsDpmJob is the BasicJob implementation for AzureStorageJob. 3695func (asj AzureStorageJob) AsDpmJob() (*DpmJob, bool) { 3696 return nil, false 3697} 3698 3699// AsMabJob is the BasicJob implementation for AzureStorageJob. 3700func (asj AzureStorageJob) AsMabJob() (*MabJob, bool) { 3701 return nil, false 3702} 3703 3704// AsJob is the BasicJob implementation for AzureStorageJob. 3705func (asj AzureStorageJob) AsJob() (*Job, bool) { 3706 return nil, false 3707} 3708 3709// AsBasicJob is the BasicJob implementation for AzureStorageJob. 3710func (asj AzureStorageJob) AsBasicJob() (BasicJob, bool) { 3711 return &asj, true 3712} 3713 3714// AzureStorageJobExtendedInfo azure Storage workload-specific additional information for job. 3715type AzureStorageJobExtendedInfo struct { 3716 // TasksList - List of tasks for this job 3717 TasksList *[]AzureStorageJobTaskDetails `json:"tasksList,omitempty"` 3718 // PropertyBag - Job properties. 3719 PropertyBag map[string]*string `json:"propertyBag"` 3720 // DynamicErrorMessage - Non localized error message on job execution. 3721 DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"` 3722} 3723 3724// MarshalJSON is the custom marshaler for AzureStorageJobExtendedInfo. 3725func (asjei AzureStorageJobExtendedInfo) MarshalJSON() ([]byte, error) { 3726 objectMap := make(map[string]interface{}) 3727 if asjei.TasksList != nil { 3728 objectMap["tasksList"] = asjei.TasksList 3729 } 3730 if asjei.PropertyBag != nil { 3731 objectMap["propertyBag"] = asjei.PropertyBag 3732 } 3733 if asjei.DynamicErrorMessage != nil { 3734 objectMap["dynamicErrorMessage"] = asjei.DynamicErrorMessage 3735 } 3736 return json.Marshal(objectMap) 3737} 3738 3739// AzureStorageJobTaskDetails azure storage workload specific job task details. 3740type AzureStorageJobTaskDetails struct { 3741 // TaskID - The task display name. 3742 TaskID *string `json:"taskId,omitempty"` 3743 // Status - The status. 3744 Status *string `json:"status,omitempty"` 3745} 3746 3747// AzureStorageProtectableContainer azure Storage-specific protectable containers 3748type AzureStorageProtectableContainer struct { 3749 // FriendlyName - Friendly name of the container. 3750 FriendlyName *string `json:"friendlyName,omitempty"` 3751 // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 3752 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 3753 // HealthStatus - Status of health of the container. 3754 HealthStatus *string `json:"healthStatus,omitempty"` 3755 // ContainerID - Fabric Id of the container such as ARM Id. 3756 ContainerID *string `json:"containerId,omitempty"` 3757 // ProtectableContainerType - Possible values include: 'ProtectableContainerTypeProtectableContainer', 'ProtectableContainerTypeStorageContainer', 'ProtectableContainerTypeVMAppContainer' 3758 ProtectableContainerType ProtectableContainerType `json:"protectableContainerType,omitempty"` 3759} 3760 3761// MarshalJSON is the custom marshaler for AzureStorageProtectableContainer. 3762func (aspc AzureStorageProtectableContainer) MarshalJSON() ([]byte, error) { 3763 aspc.ProtectableContainerType = ProtectableContainerTypeStorageContainer 3764 objectMap := make(map[string]interface{}) 3765 if aspc.FriendlyName != nil { 3766 objectMap["friendlyName"] = aspc.FriendlyName 3767 } 3768 if aspc.BackupManagementType != "" { 3769 objectMap["backupManagementType"] = aspc.BackupManagementType 3770 } 3771 if aspc.HealthStatus != nil { 3772 objectMap["healthStatus"] = aspc.HealthStatus 3773 } 3774 if aspc.ContainerID != nil { 3775 objectMap["containerId"] = aspc.ContainerID 3776 } 3777 if aspc.ProtectableContainerType != "" { 3778 objectMap["protectableContainerType"] = aspc.ProtectableContainerType 3779 } 3780 return json.Marshal(objectMap) 3781} 3782 3783// AsAzureStorageProtectableContainer is the BasicProtectableContainer implementation for AzureStorageProtectableContainer. 3784func (aspc AzureStorageProtectableContainer) AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) { 3785 return &aspc, true 3786} 3787 3788// AsAzureVMAppContainerProtectableContainer is the BasicProtectableContainer implementation for AzureStorageProtectableContainer. 3789func (aspc AzureStorageProtectableContainer) AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) { 3790 return nil, false 3791} 3792 3793// AsProtectableContainer is the BasicProtectableContainer implementation for AzureStorageProtectableContainer. 3794func (aspc AzureStorageProtectableContainer) AsProtectableContainer() (*ProtectableContainer, bool) { 3795 return nil, false 3796} 3797 3798// AsBasicProtectableContainer is the BasicProtectableContainer implementation for AzureStorageProtectableContainer. 3799func (aspc AzureStorageProtectableContainer) AsBasicProtectableContainer() (BasicProtectableContainer, bool) { 3800 return &aspc, true 3801} 3802 3803// AzureVMAppContainerProtectableContainer azure workload-specific container 3804type AzureVMAppContainerProtectableContainer struct { 3805 // FriendlyName - Friendly name of the container. 3806 FriendlyName *string `json:"friendlyName,omitempty"` 3807 // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 3808 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 3809 // HealthStatus - Status of health of the container. 3810 HealthStatus *string `json:"healthStatus,omitempty"` 3811 // ContainerID - Fabric Id of the container such as ARM Id. 3812 ContainerID *string `json:"containerId,omitempty"` 3813 // ProtectableContainerType - Possible values include: 'ProtectableContainerTypeProtectableContainer', 'ProtectableContainerTypeStorageContainer', 'ProtectableContainerTypeVMAppContainer' 3814 ProtectableContainerType ProtectableContainerType `json:"protectableContainerType,omitempty"` 3815} 3816 3817// MarshalJSON is the custom marshaler for AzureVMAppContainerProtectableContainer. 3818func (avacpc AzureVMAppContainerProtectableContainer) MarshalJSON() ([]byte, error) { 3819 avacpc.ProtectableContainerType = ProtectableContainerTypeVMAppContainer 3820 objectMap := make(map[string]interface{}) 3821 if avacpc.FriendlyName != nil { 3822 objectMap["friendlyName"] = avacpc.FriendlyName 3823 } 3824 if avacpc.BackupManagementType != "" { 3825 objectMap["backupManagementType"] = avacpc.BackupManagementType 3826 } 3827 if avacpc.HealthStatus != nil { 3828 objectMap["healthStatus"] = avacpc.HealthStatus 3829 } 3830 if avacpc.ContainerID != nil { 3831 objectMap["containerId"] = avacpc.ContainerID 3832 } 3833 if avacpc.ProtectableContainerType != "" { 3834 objectMap["protectableContainerType"] = avacpc.ProtectableContainerType 3835 } 3836 return json.Marshal(objectMap) 3837} 3838 3839// AsAzureStorageProtectableContainer is the BasicProtectableContainer implementation for AzureVMAppContainerProtectableContainer. 3840func (avacpc AzureVMAppContainerProtectableContainer) AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) { 3841 return nil, false 3842} 3843 3844// AsAzureVMAppContainerProtectableContainer is the BasicProtectableContainer implementation for AzureVMAppContainerProtectableContainer. 3845func (avacpc AzureVMAppContainerProtectableContainer) AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) { 3846 return &avacpc, true 3847} 3848 3849// AsProtectableContainer is the BasicProtectableContainer implementation for AzureVMAppContainerProtectableContainer. 3850func (avacpc AzureVMAppContainerProtectableContainer) AsProtectableContainer() (*ProtectableContainer, bool) { 3851 return nil, false 3852} 3853 3854// AsBasicProtectableContainer is the BasicProtectableContainer implementation for AzureVMAppContainerProtectableContainer. 3855func (avacpc AzureVMAppContainerProtectableContainer) AsBasicProtectableContainer() (BasicProtectableContainer, bool) { 3856 return &avacpc, true 3857} 3858 3859// AzureVMAppContainerProtectionContainer container for SQL workloads under Azure Virtual Machines. 3860type AzureVMAppContainerProtectionContainer struct { 3861 // SourceResourceID - ARM ID of the virtual machine represented by this Azure Workload Container 3862 SourceResourceID *string `json:"sourceResourceId,omitempty"` 3863 // LastUpdatedTime - Time stamp when this container was updated. 3864 LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"` 3865 // ExtendedInfo - Additional details of a workload container. 3866 ExtendedInfo *AzureWorkloadContainerExtendedInfo `json:"extendedInfo,omitempty"` 3867 // WorkloadType - Workload type for which registration was sent. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' 3868 WorkloadType WorkloadType `json:"workloadType,omitempty"` 3869 // OperationType - Re-Do Operation. Possible values include: 'OperationTypeInvalid', 'OperationTypeRegister', 'OperationTypeReregister' 3870 OperationType OperationType `json:"operationType,omitempty"` 3871 // FriendlyName - Friendly name of the container. 3872 FriendlyName *string `json:"friendlyName,omitempty"` 3873 // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 3874 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 3875 // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. 3876 RegistrationStatus *string `json:"registrationStatus,omitempty"` 3877 // HealthStatus - Status of health of the container. 3878 HealthStatus *string `json:"healthStatus,omitempty"` 3879 // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' 3880 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` 3881} 3882 3883// MarshalJSON is the custom marshaler for AzureVMAppContainerProtectionContainer. 3884func (avacpc AzureVMAppContainerProtectionContainer) MarshalJSON() ([]byte, error) { 3885 avacpc.ContainerType = ContainerTypeVMAppContainer1 3886 objectMap := make(map[string]interface{}) 3887 if avacpc.SourceResourceID != nil { 3888 objectMap["sourceResourceId"] = avacpc.SourceResourceID 3889 } 3890 if avacpc.LastUpdatedTime != nil { 3891 objectMap["lastUpdatedTime"] = avacpc.LastUpdatedTime 3892 } 3893 if avacpc.ExtendedInfo != nil { 3894 objectMap["extendedInfo"] = avacpc.ExtendedInfo 3895 } 3896 if avacpc.WorkloadType != "" { 3897 objectMap["workloadType"] = avacpc.WorkloadType 3898 } 3899 if avacpc.OperationType != "" { 3900 objectMap["operationType"] = avacpc.OperationType 3901 } 3902 if avacpc.FriendlyName != nil { 3903 objectMap["friendlyName"] = avacpc.FriendlyName 3904 } 3905 if avacpc.BackupManagementType != "" { 3906 objectMap["backupManagementType"] = avacpc.BackupManagementType 3907 } 3908 if avacpc.RegistrationStatus != nil { 3909 objectMap["registrationStatus"] = avacpc.RegistrationStatus 3910 } 3911 if avacpc.HealthStatus != nil { 3912 objectMap["healthStatus"] = avacpc.HealthStatus 3913 } 3914 if avacpc.ContainerType != "" { 3915 objectMap["containerType"] = avacpc.ContainerType 3916 } 3917 return json.Marshal(objectMap) 3918} 3919 3920// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. 3921func (avacpc AzureVMAppContainerProtectionContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { 3922 return nil, false 3923} 3924 3925// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. 3926func (avacpc AzureVMAppContainerProtectionContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { 3927 return nil, false 3928} 3929 3930// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. 3931func (avacpc AzureVMAppContainerProtectionContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { 3932 return nil, false 3933} 3934 3935// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. 3936func (avacpc AzureVMAppContainerProtectionContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { 3937 return nil, false 3938} 3939 3940// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. 3941func (avacpc AzureVMAppContainerProtectionContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { 3942 return nil, false 3943} 3944 3945// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. 3946func (avacpc AzureVMAppContainerProtectionContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { 3947 return nil, false 3948} 3949 3950// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. 3951func (avacpc AzureVMAppContainerProtectionContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { 3952 return &avacpc, true 3953} 3954 3955// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. 3956func (avacpc AzureVMAppContainerProtectionContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { 3957 return nil, false 3958} 3959 3960// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. 3961func (avacpc AzureVMAppContainerProtectionContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { 3962 return &avacpc, true 3963} 3964 3965// AsDpmContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. 3966func (avacpc AzureVMAppContainerProtectionContainer) AsDpmContainer() (*DpmContainer, bool) { 3967 return nil, false 3968} 3969 3970// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. 3971func (avacpc AzureVMAppContainerProtectionContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { 3972 return nil, false 3973} 3974 3975// AsGenericContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. 3976func (avacpc AzureVMAppContainerProtectionContainer) AsGenericContainer() (*GenericContainer, bool) { 3977 return nil, false 3978} 3979 3980// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. 3981func (avacpc AzureVMAppContainerProtectionContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { 3982 return nil, false 3983} 3984 3985// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. 3986func (avacpc AzureVMAppContainerProtectionContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { 3987 return nil, false 3988} 3989 3990// AsMabContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. 3991func (avacpc AzureVMAppContainerProtectionContainer) AsMabContainer() (*MabContainer, bool) { 3992 return nil, false 3993} 3994 3995// AsProtectionContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. 3996func (avacpc AzureVMAppContainerProtectionContainer) AsProtectionContainer() (*ProtectionContainer, bool) { 3997 return nil, false 3998} 3999 4000// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. 4001func (avacpc AzureVMAppContainerProtectionContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { 4002 return &avacpc, true 4003} 4004 4005// AzureVMResourceFeatureSupportRequest azureResource(IaaS VM) Specific feature support request 4006type AzureVMResourceFeatureSupportRequest struct { 4007 // VMSize - Size of the resource: VM size(A/D series etc) in case of IaasVM 4008 VMSize *string `json:"vmSize,omitempty"` 4009 // VMSku - SKUs (Premium/Managed etc) in case of IaasVM 4010 VMSku *string `json:"vmSku,omitempty"` 4011 // FeatureType - Possible values include: 'FeatureTypeFeatureSupportRequest', 'FeatureTypeAzureBackupGoals', 'FeatureTypeAzureVMResourceBackup' 4012 FeatureType FeatureType `json:"featureType,omitempty"` 4013} 4014 4015// MarshalJSON is the custom marshaler for AzureVMResourceFeatureSupportRequest. 4016func (avrfsr AzureVMResourceFeatureSupportRequest) MarshalJSON() ([]byte, error) { 4017 avrfsr.FeatureType = FeatureTypeAzureVMResourceBackup 4018 objectMap := make(map[string]interface{}) 4019 if avrfsr.VMSize != nil { 4020 objectMap["vmSize"] = avrfsr.VMSize 4021 } 4022 if avrfsr.VMSku != nil { 4023 objectMap["vmSku"] = avrfsr.VMSku 4024 } 4025 if avrfsr.FeatureType != "" { 4026 objectMap["featureType"] = avrfsr.FeatureType 4027 } 4028 return json.Marshal(objectMap) 4029} 4030 4031// AsAzureBackupGoalFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureVMResourceFeatureSupportRequest. 4032func (avrfsr AzureVMResourceFeatureSupportRequest) AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool) { 4033 return nil, false 4034} 4035 4036// AsAzureVMResourceFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureVMResourceFeatureSupportRequest. 4037func (avrfsr AzureVMResourceFeatureSupportRequest) AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool) { 4038 return &avrfsr, true 4039} 4040 4041// AsFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureVMResourceFeatureSupportRequest. 4042func (avrfsr AzureVMResourceFeatureSupportRequest) AsFeatureSupportRequest() (*FeatureSupportRequest, bool) { 4043 return nil, false 4044} 4045 4046// AsBasicFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureVMResourceFeatureSupportRequest. 4047func (avrfsr AzureVMResourceFeatureSupportRequest) AsBasicFeatureSupportRequest() (BasicFeatureSupportRequest, bool) { 4048 return &avrfsr, true 4049} 4050 4051// AzureVMResourceFeatureSupportResponse response for feature support requests for Azure IaasVm 4052type AzureVMResourceFeatureSupportResponse struct { 4053 autorest.Response `json:"-"` 4054 // SupportStatus - Support status of feature. Possible values include: 'SupportStatusInvalid', 'SupportStatusSupported', 'SupportStatusDefaultOFF', 'SupportStatusDefaultON', 'SupportStatusNotSupported' 4055 SupportStatus SupportStatus `json:"supportStatus,omitempty"` 4056} 4057 4058// BasicAzureVMWorkloadItem azure VM workload-specific workload item. 4059type BasicAzureVMWorkloadItem interface { 4060 AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) 4061 AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) 4062 AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) 4063 AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) 4064 AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) 4065 AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) 4066 AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) 4067} 4068 4069// AzureVMWorkloadItem azure VM workload-specific workload item. 4070type AzureVMWorkloadItem struct { 4071 // ParentName - Name for instance or AG 4072 ParentName *string `json:"parentName,omitempty"` 4073 // ServerName - Host/Cluster Name for instance or AG 4074 ServerName *string `json:"serverName,omitempty"` 4075 // IsAutoProtectable - Indicates if workload item is auto-protectable 4076 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` 4077 // Subinquireditemcount - For instance or AG, indicates number of DB's present 4078 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` 4079 // SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected 4080 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` 4081 // BackupManagementType - Type of backup management to backup an item. 4082 BackupManagementType *string `json:"backupManagementType,omitempty"` 4083 // WorkloadType - Type of workload for the backup management 4084 WorkloadType *string `json:"workloadType,omitempty"` 4085 // FriendlyName - Friendly name of the backup item. 4086 FriendlyName *string `json:"friendlyName,omitempty"` 4087 // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 4088 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 4089 // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' 4090 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` 4091} 4092 4093func unmarshalBasicAzureVMWorkloadItem(body []byte) (BasicAzureVMWorkloadItem, error) { 4094 var m map[string]interface{} 4095 err := json.Unmarshal(body, &m) 4096 if err != nil { 4097 return nil, err 4098 } 4099 4100 switch m["workloadItemType"] { 4101 case string(WorkloadItemTypeSAPAseDatabase1): 4102 var avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem 4103 err := json.Unmarshal(body, &avwsadwi) 4104 return avwsadwi, err 4105 case string(WorkloadItemTypeSAPAseSystem1): 4106 var avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem 4107 err := json.Unmarshal(body, &avwsaswi) 4108 return avwsaswi, err 4109 case string(WorkloadItemTypeSAPHanaDatabase1): 4110 var avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem 4111 err := json.Unmarshal(body, &avwshdwi) 4112 return avwshdwi, err 4113 case string(WorkloadItemTypeSAPHanaSystem1): 4114 var avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem 4115 err := json.Unmarshal(body, &avwshswi) 4116 return avwshswi, err 4117 case string(WorkloadItemTypeSQLDataBase1): 4118 var avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem 4119 err := json.Unmarshal(body, &avwsdwi) 4120 return avwsdwi, err 4121 case string(WorkloadItemTypeSQLInstance1): 4122 var avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem 4123 err := json.Unmarshal(body, &avwsiwi) 4124 return avwsiwi, err 4125 default: 4126 var avwi AzureVMWorkloadItem 4127 err := json.Unmarshal(body, &avwi) 4128 return avwi, err 4129 } 4130} 4131func unmarshalBasicAzureVMWorkloadItemArray(body []byte) ([]BasicAzureVMWorkloadItem, error) { 4132 var rawMessages []*json.RawMessage 4133 err := json.Unmarshal(body, &rawMessages) 4134 if err != nil { 4135 return nil, err 4136 } 4137 4138 avwiArray := make([]BasicAzureVMWorkloadItem, len(rawMessages)) 4139 4140 for index, rawMessage := range rawMessages { 4141 avwi, err := unmarshalBasicAzureVMWorkloadItem(*rawMessage) 4142 if err != nil { 4143 return nil, err 4144 } 4145 avwiArray[index] = avwi 4146 } 4147 return avwiArray, nil 4148} 4149 4150// MarshalJSON is the custom marshaler for AzureVMWorkloadItem. 4151func (avwi AzureVMWorkloadItem) MarshalJSON() ([]byte, error) { 4152 avwi.WorkloadItemType = WorkloadItemTypeAzureVMWorkloadItem 4153 objectMap := make(map[string]interface{}) 4154 if avwi.ParentName != nil { 4155 objectMap["parentName"] = avwi.ParentName 4156 } 4157 if avwi.ServerName != nil { 4158 objectMap["serverName"] = avwi.ServerName 4159 } 4160 if avwi.IsAutoProtectable != nil { 4161 objectMap["isAutoProtectable"] = avwi.IsAutoProtectable 4162 } 4163 if avwi.Subinquireditemcount != nil { 4164 objectMap["subinquireditemcount"] = avwi.Subinquireditemcount 4165 } 4166 if avwi.SubWorkloadItemCount != nil { 4167 objectMap["subWorkloadItemCount"] = avwi.SubWorkloadItemCount 4168 } 4169 if avwi.BackupManagementType != nil { 4170 objectMap["backupManagementType"] = avwi.BackupManagementType 4171 } 4172 if avwi.WorkloadType != nil { 4173 objectMap["workloadType"] = avwi.WorkloadType 4174 } 4175 if avwi.FriendlyName != nil { 4176 objectMap["friendlyName"] = avwi.FriendlyName 4177 } 4178 if avwi.ProtectionState != "" { 4179 objectMap["protectionState"] = avwi.ProtectionState 4180 } 4181 if avwi.WorkloadItemType != "" { 4182 objectMap["workloadItemType"] = avwi.WorkloadItemType 4183 } 4184 return json.Marshal(objectMap) 4185} 4186 4187// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. 4188func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { 4189 return &avwi, true 4190} 4191 4192// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. 4193func (avwi AzureVMWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { 4194 return &avwi, true 4195} 4196 4197// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. 4198func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { 4199 return nil, false 4200} 4201 4202// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. 4203func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { 4204 return nil, false 4205} 4206 4207// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. 4208func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { 4209 return nil, false 4210} 4211 4212// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. 4213func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { 4214 return nil, false 4215} 4216 4217// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. 4218func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { 4219 return nil, false 4220} 4221 4222// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. 4223func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { 4224 return nil, false 4225} 4226 4227// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. 4228func (avwi AzureVMWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { 4229 return nil, false 4230} 4231 4232// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. 4233func (avwi AzureVMWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { 4234 return &avwi, true 4235} 4236 4237// BasicAzureVMWorkloadProtectableItem azure VM workload-specific protectable item. 4238type BasicAzureVMWorkloadProtectableItem interface { 4239 AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) 4240 AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) 4241 AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) 4242 AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) 4243 AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) 4244 AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) 4245 AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) 4246} 4247 4248// AzureVMWorkloadProtectableItem azure VM workload-specific protectable item. 4249type AzureVMWorkloadProtectableItem struct { 4250 // ParentName - Name for instance or AG 4251 ParentName *string `json:"parentName,omitempty"` 4252 // ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent 4253 // Only Applicable for data bases where the parent would be either Instance or a SQL AG. 4254 ParentUniqueName *string `json:"parentUniqueName,omitempty"` 4255 // ServerName - Host/Cluster Name for instance or AG 4256 ServerName *string `json:"serverName,omitempty"` 4257 // IsAutoProtectable - Indicates if protectable item is auto-protectable 4258 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` 4259 // IsAutoProtected - Indicates if protectable item is auto-protected 4260 IsAutoProtected *bool `json:"isAutoProtected,omitempty"` 4261 // Subinquireditemcount - For instance or AG, indicates number of DB's present 4262 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` 4263 // Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected 4264 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` 4265 // Prebackupvalidation - Pre-backup validation for protectable objects 4266 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` 4267 // BackupManagementType - Type of backup management to backup an item. 4268 BackupManagementType *string `json:"backupManagementType,omitempty"` 4269 // WorkloadType - Type of workload for the backup management 4270 WorkloadType *string `json:"workloadType,omitempty"` 4271 // FriendlyName - Friendly name of the backup item. 4272 FriendlyName *string `json:"friendlyName,omitempty"` 4273 // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 4274 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 4275 // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' 4276 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` 4277} 4278 4279func unmarshalBasicAzureVMWorkloadProtectableItem(body []byte) (BasicAzureVMWorkloadProtectableItem, error) { 4280 var m map[string]interface{} 4281 err := json.Unmarshal(body, &m) 4282 if err != nil { 4283 return nil, err 4284 } 4285 4286 switch m["protectableItemType"] { 4287 case string(ProtectableItemTypeSAPAseSystem): 4288 var avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem 4289 err := json.Unmarshal(body, &avwsaspi) 4290 return avwsaspi, err 4291 case string(ProtectableItemTypeSAPHanaDatabase): 4292 var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem 4293 err := json.Unmarshal(body, &avwshdpi) 4294 return avwshdpi, err 4295 case string(ProtectableItemTypeSAPHanaSystem): 4296 var avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem 4297 err := json.Unmarshal(body, &avwshspi) 4298 return avwshspi, err 4299 case string(ProtectableItemTypeSQLAvailabilityGroupContainer): 4300 var avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem 4301 err := json.Unmarshal(body, &avwsagpi) 4302 return avwsagpi, err 4303 case string(ProtectableItemTypeSQLDataBase): 4304 var avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem 4305 err := json.Unmarshal(body, &avwsdpi) 4306 return avwsdpi, err 4307 case string(ProtectableItemTypeSQLInstance): 4308 var avwsipi AzureVMWorkloadSQLInstanceProtectableItem 4309 err := json.Unmarshal(body, &avwsipi) 4310 return avwsipi, err 4311 default: 4312 var avwpi AzureVMWorkloadProtectableItem 4313 err := json.Unmarshal(body, &avwpi) 4314 return avwpi, err 4315 } 4316} 4317func unmarshalBasicAzureVMWorkloadProtectableItemArray(body []byte) ([]BasicAzureVMWorkloadProtectableItem, error) { 4318 var rawMessages []*json.RawMessage 4319 err := json.Unmarshal(body, &rawMessages) 4320 if err != nil { 4321 return nil, err 4322 } 4323 4324 avwpiArray := make([]BasicAzureVMWorkloadProtectableItem, len(rawMessages)) 4325 4326 for index, rawMessage := range rawMessages { 4327 avwpi, err := unmarshalBasicAzureVMWorkloadProtectableItem(*rawMessage) 4328 if err != nil { 4329 return nil, err 4330 } 4331 avwpiArray[index] = avwpi 4332 } 4333 return avwpiArray, nil 4334} 4335 4336// MarshalJSON is the custom marshaler for AzureVMWorkloadProtectableItem. 4337func (avwpi AzureVMWorkloadProtectableItem) MarshalJSON() ([]byte, error) { 4338 avwpi.ProtectableItemType = ProtectableItemTypeAzureVMWorkloadProtectableItem 4339 objectMap := make(map[string]interface{}) 4340 if avwpi.ParentName != nil { 4341 objectMap["parentName"] = avwpi.ParentName 4342 } 4343 if avwpi.ParentUniqueName != nil { 4344 objectMap["parentUniqueName"] = avwpi.ParentUniqueName 4345 } 4346 if avwpi.ServerName != nil { 4347 objectMap["serverName"] = avwpi.ServerName 4348 } 4349 if avwpi.IsAutoProtectable != nil { 4350 objectMap["isAutoProtectable"] = avwpi.IsAutoProtectable 4351 } 4352 if avwpi.IsAutoProtected != nil { 4353 objectMap["isAutoProtected"] = avwpi.IsAutoProtected 4354 } 4355 if avwpi.Subinquireditemcount != nil { 4356 objectMap["subinquireditemcount"] = avwpi.Subinquireditemcount 4357 } 4358 if avwpi.Subprotectableitemcount != nil { 4359 objectMap["subprotectableitemcount"] = avwpi.Subprotectableitemcount 4360 } 4361 if avwpi.Prebackupvalidation != nil { 4362 objectMap["prebackupvalidation"] = avwpi.Prebackupvalidation 4363 } 4364 if avwpi.BackupManagementType != nil { 4365 objectMap["backupManagementType"] = avwpi.BackupManagementType 4366 } 4367 if avwpi.WorkloadType != nil { 4368 objectMap["workloadType"] = avwpi.WorkloadType 4369 } 4370 if avwpi.FriendlyName != nil { 4371 objectMap["friendlyName"] = avwpi.FriendlyName 4372 } 4373 if avwpi.ProtectionState != "" { 4374 objectMap["protectionState"] = avwpi.ProtectionState 4375 } 4376 if avwpi.ProtectableItemType != "" { 4377 objectMap["protectableItemType"] = avwpi.ProtectableItemType 4378 } 4379 return json.Marshal(objectMap) 4380} 4381 4382// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. 4383func (avwpi AzureVMWorkloadProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { 4384 return nil, false 4385} 4386 4387// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. 4388func (avwpi AzureVMWorkloadProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { 4389 return nil, false 4390} 4391 4392// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. 4393func (avwpi AzureVMWorkloadProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { 4394 return nil, false 4395} 4396 4397// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. 4398func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { 4399 return &avwpi, true 4400} 4401 4402// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. 4403func (avwpi AzureVMWorkloadProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { 4404 return &avwpi, true 4405} 4406 4407// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. 4408func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { 4409 return nil, false 4410} 4411 4412// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. 4413func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { 4414 return nil, false 4415} 4416 4417// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. 4418func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { 4419 return nil, false 4420} 4421 4422// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. 4423func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { 4424 return nil, false 4425} 4426 4427// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. 4428func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { 4429 return nil, false 4430} 4431 4432// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. 4433func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { 4434 return nil, false 4435} 4436 4437// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. 4438func (avwpi AzureVMWorkloadProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { 4439 return nil, false 4440} 4441 4442// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. 4443func (avwpi AzureVMWorkloadProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { 4444 return nil, false 4445} 4446 4447// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. 4448func (avwpi AzureVMWorkloadProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { 4449 return nil, false 4450} 4451 4452// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. 4453func (avwpi AzureVMWorkloadProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { 4454 return &avwpi, true 4455} 4456 4457// BasicAzureVMWorkloadProtectedItem azure VM workload-specific protected item. 4458type BasicAzureVMWorkloadProtectedItem interface { 4459 AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) 4460 AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) 4461 AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) 4462 AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) 4463} 4464 4465// AzureVMWorkloadProtectedItem azure VM workload-specific protected item. 4466type AzureVMWorkloadProtectedItem struct { 4467 // FriendlyName - Friendly name of the DB represented by this backup item. 4468 FriendlyName *string `json:"friendlyName,omitempty"` 4469 // ServerName - Host/Cluster Name for instance or AG 4470 ServerName *string `json:"serverName,omitempty"` 4471 // ParentName - Parent name of the DB such as Instance or Availability Group. 4472 ParentName *string `json:"parentName,omitempty"` 4473 // ParentType - Parent type of protected item, example: for a DB, standalone server or distributed 4474 ParentType *string `json:"parentType,omitempty"` 4475 // ProtectionStatus - Backup status of this backup item. 4476 ProtectionStatus *string `json:"protectionStatus,omitempty"` 4477 // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' 4478 ProtectionState ProtectionState `json:"protectionState,omitempty"` 4479 // LastBackupStatus - Last backup operation status. Possible values: Healthy, Unhealthy. Possible values include: 'LastBackupStatusInvalid', 'LastBackupStatusHealthy', 'LastBackupStatusUnhealthy', 'LastBackupStatusIRPending' 4480 LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"` 4481 // LastBackupTime - Timestamp of the last backup operation on this backup item. 4482 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` 4483 // LastBackupErrorDetail - Error details in last backup 4484 LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"` 4485 // ProtectedItemDataSourceID - Data ID of the protected item. 4486 ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"` 4487 // ProtectedItemHealthStatus - Health status of the backup item, evaluated based on last heartbeat received. Possible values include: 'ProtectedItemHealthStatusInvalid', 'ProtectedItemHealthStatusHealthy', 'ProtectedItemHealthStatusUnhealthy', 'ProtectedItemHealthStatusNotReachable', 'ProtectedItemHealthStatusIRPending' 4488 ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"` 4489 // ExtendedInfo - Additional information for this backup item. 4490 ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` 4491 // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 4492 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 4493 // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' 4494 WorkloadType DataSourceType `json:"workloadType,omitempty"` 4495 // ContainerName - Unique name of container 4496 ContainerName *string `json:"containerName,omitempty"` 4497 // SourceResourceID - ARM ID of the resource to be backed up. 4498 SourceResourceID *string `json:"sourceResourceId,omitempty"` 4499 // PolicyID - ID of the backup policy with which this item is backed up. 4500 PolicyID *string `json:"policyId,omitempty"` 4501 // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. 4502 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` 4503 // BackupSetName - Name of the backup set the backup item belongs to 4504 BackupSetName *string `json:"backupSetName,omitempty"` 4505 // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' 4506 CreateMode CreateMode `json:"createMode,omitempty"` 4507 // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC 4508 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` 4509 // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete 4510 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` 4511 // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted 4512 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` 4513 // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon 4514 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` 4515 // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state 4516 IsRehydrate *bool `json:"isRehydrate,omitempty"` 4517 // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' 4518 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` 4519} 4520 4521func unmarshalBasicAzureVMWorkloadProtectedItem(body []byte) (BasicAzureVMWorkloadProtectedItem, error) { 4522 var m map[string]interface{} 4523 err := json.Unmarshal(body, &m) 4524 if err != nil { 4525 return nil, err 4526 } 4527 4528 switch m["protectedItemType"] { 4529 case string(ProtectedItemTypeAzureVMWorkloadSAPAseDatabase): 4530 var avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem 4531 err := json.Unmarshal(body, &avwsadpi) 4532 return avwsadpi, err 4533 case string(ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase): 4534 var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem 4535 err := json.Unmarshal(body, &avwshdpi) 4536 return avwshdpi, err 4537 case string(ProtectedItemTypeAzureVMWorkloadSQLDatabase): 4538 var avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem 4539 err := json.Unmarshal(body, &avwsdpi) 4540 return avwsdpi, err 4541 default: 4542 var avwpi AzureVMWorkloadProtectedItem 4543 err := json.Unmarshal(body, &avwpi) 4544 return avwpi, err 4545 } 4546} 4547func unmarshalBasicAzureVMWorkloadProtectedItemArray(body []byte) ([]BasicAzureVMWorkloadProtectedItem, error) { 4548 var rawMessages []*json.RawMessage 4549 err := json.Unmarshal(body, &rawMessages) 4550 if err != nil { 4551 return nil, err 4552 } 4553 4554 avwpiArray := make([]BasicAzureVMWorkloadProtectedItem, len(rawMessages)) 4555 4556 for index, rawMessage := range rawMessages { 4557 avwpi, err := unmarshalBasicAzureVMWorkloadProtectedItem(*rawMessage) 4558 if err != nil { 4559 return nil, err 4560 } 4561 avwpiArray[index] = avwpi 4562 } 4563 return avwpiArray, nil 4564} 4565 4566// MarshalJSON is the custom marshaler for AzureVMWorkloadProtectedItem. 4567func (avwpi AzureVMWorkloadProtectedItem) MarshalJSON() ([]byte, error) { 4568 avwpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadProtectedItem 4569 objectMap := make(map[string]interface{}) 4570 if avwpi.FriendlyName != nil { 4571 objectMap["friendlyName"] = avwpi.FriendlyName 4572 } 4573 if avwpi.ServerName != nil { 4574 objectMap["serverName"] = avwpi.ServerName 4575 } 4576 if avwpi.ParentName != nil { 4577 objectMap["parentName"] = avwpi.ParentName 4578 } 4579 if avwpi.ParentType != nil { 4580 objectMap["parentType"] = avwpi.ParentType 4581 } 4582 if avwpi.ProtectionStatus != nil { 4583 objectMap["protectionStatus"] = avwpi.ProtectionStatus 4584 } 4585 if avwpi.ProtectionState != "" { 4586 objectMap["protectionState"] = avwpi.ProtectionState 4587 } 4588 if avwpi.LastBackupStatus != "" { 4589 objectMap["lastBackupStatus"] = avwpi.LastBackupStatus 4590 } 4591 if avwpi.LastBackupTime != nil { 4592 objectMap["lastBackupTime"] = avwpi.LastBackupTime 4593 } 4594 if avwpi.LastBackupErrorDetail != nil { 4595 objectMap["lastBackupErrorDetail"] = avwpi.LastBackupErrorDetail 4596 } 4597 if avwpi.ProtectedItemDataSourceID != nil { 4598 objectMap["protectedItemDataSourceId"] = avwpi.ProtectedItemDataSourceID 4599 } 4600 if avwpi.ProtectedItemHealthStatus != "" { 4601 objectMap["protectedItemHealthStatus"] = avwpi.ProtectedItemHealthStatus 4602 } 4603 if avwpi.ExtendedInfo != nil { 4604 objectMap["extendedInfo"] = avwpi.ExtendedInfo 4605 } 4606 if avwpi.BackupManagementType != "" { 4607 objectMap["backupManagementType"] = avwpi.BackupManagementType 4608 } 4609 if avwpi.WorkloadType != "" { 4610 objectMap["workloadType"] = avwpi.WorkloadType 4611 } 4612 if avwpi.ContainerName != nil { 4613 objectMap["containerName"] = avwpi.ContainerName 4614 } 4615 if avwpi.SourceResourceID != nil { 4616 objectMap["sourceResourceId"] = avwpi.SourceResourceID 4617 } 4618 if avwpi.PolicyID != nil { 4619 objectMap["policyId"] = avwpi.PolicyID 4620 } 4621 if avwpi.LastRecoveryPoint != nil { 4622 objectMap["lastRecoveryPoint"] = avwpi.LastRecoveryPoint 4623 } 4624 if avwpi.BackupSetName != nil { 4625 objectMap["backupSetName"] = avwpi.BackupSetName 4626 } 4627 if avwpi.CreateMode != "" { 4628 objectMap["createMode"] = avwpi.CreateMode 4629 } 4630 if avwpi.DeferredDeleteTimeInUTC != nil { 4631 objectMap["deferredDeleteTimeInUTC"] = avwpi.DeferredDeleteTimeInUTC 4632 } 4633 if avwpi.IsScheduledForDeferredDelete != nil { 4634 objectMap["isScheduledForDeferredDelete"] = avwpi.IsScheduledForDeferredDelete 4635 } 4636 if avwpi.DeferredDeleteTimeRemaining != nil { 4637 objectMap["deferredDeleteTimeRemaining"] = avwpi.DeferredDeleteTimeRemaining 4638 } 4639 if avwpi.IsDeferredDeleteScheduleUpcoming != nil { 4640 objectMap["isDeferredDeleteScheduleUpcoming"] = avwpi.IsDeferredDeleteScheduleUpcoming 4641 } 4642 if avwpi.IsRehydrate != nil { 4643 objectMap["isRehydrate"] = avwpi.IsRehydrate 4644 } 4645 if avwpi.ProtectedItemType != "" { 4646 objectMap["protectedItemType"] = avwpi.ProtectedItemType 4647 } 4648 return json.Marshal(objectMap) 4649} 4650 4651// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. 4652func (avwpi AzureVMWorkloadProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { 4653 return nil, false 4654} 4655 4656// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. 4657func (avwpi AzureVMWorkloadProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { 4658 return nil, false 4659} 4660 4661// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. 4662func (avwpi AzureVMWorkloadProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { 4663 return nil, false 4664} 4665 4666// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. 4667func (avwpi AzureVMWorkloadProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { 4668 return nil, false 4669} 4670 4671// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. 4672func (avwpi AzureVMWorkloadProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { 4673 return nil, false 4674} 4675 4676// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. 4677func (avwpi AzureVMWorkloadProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { 4678 return nil, false 4679} 4680 4681// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. 4682func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { 4683 return &avwpi, true 4684} 4685 4686// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. 4687func (avwpi AzureVMWorkloadProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { 4688 return &avwpi, true 4689} 4690 4691// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. 4692func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { 4693 return nil, false 4694} 4695 4696// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. 4697func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { 4698 return nil, false 4699} 4700 4701// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. 4702func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { 4703 return nil, false 4704} 4705 4706// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. 4707func (avwpi AzureVMWorkloadProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { 4708 return nil, false 4709} 4710 4711// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. 4712func (avwpi AzureVMWorkloadProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { 4713 return nil, false 4714} 4715 4716// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. 4717func (avwpi AzureVMWorkloadProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { 4718 return nil, false 4719} 4720 4721// AsProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. 4722func (avwpi AzureVMWorkloadProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { 4723 return nil, false 4724} 4725 4726// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. 4727func (avwpi AzureVMWorkloadProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { 4728 return &avwpi, true 4729} 4730 4731// AzureVMWorkloadProtectedItemExtendedInfo additional information on Azure Workload for SQL specific 4732// backup item. 4733type AzureVMWorkloadProtectedItemExtendedInfo struct { 4734 // OldestRecoveryPoint - The oldest backup copy available for this backup item. 4735 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"` 4736 // RecoveryPointCount - Number of backup copies available for this backup item. 4737 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"` 4738 // PolicyState - Indicates consistency of policy object and policy applied to this backup item. 4739 PolicyState *string `json:"policyState,omitempty"` 4740} 4741 4742// AzureVMWorkloadProtectionPolicy azure VM (Mercury) workload-specific backup policy. 4743type AzureVMWorkloadProtectionPolicy struct { 4744 // WorkLoadType - Type of workload for the backup management. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' 4745 WorkLoadType WorkloadType `json:"workLoadType,omitempty"` 4746 // Settings - Common settings for the backup management 4747 Settings *Settings `json:"settings,omitempty"` 4748 // SubProtectionPolicy - List of sub-protection policies which includes schedule and retention 4749 SubProtectionPolicy *[]SubProtectionPolicy `json:"subProtectionPolicy,omitempty"` 4750 // MakePolicyConsistent - Fix the policy inconsistency 4751 MakePolicyConsistent *bool `json:"makePolicyConsistent,omitempty"` 4752 // ProtectedItemsCount - Number of items associated with this policy. 4753 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` 4754 // BackupManagementType - Possible values include: 'BackupManagementTypeProtectionPolicy', 'BackupManagementTypeAzureWorkload', 'BackupManagementTypeAzureStorage', 'BackupManagementTypeAzureIaasVM', 'BackupManagementTypeAzureSQL', 'BackupManagementTypeGenericProtectionPolicy', 'BackupManagementTypeMAB' 4755 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"` 4756} 4757 4758// MarshalJSON is the custom marshaler for AzureVMWorkloadProtectionPolicy. 4759func (avwpp AzureVMWorkloadProtectionPolicy) MarshalJSON() ([]byte, error) { 4760 avwpp.BackupManagementType = BackupManagementTypeAzureWorkload 4761 objectMap := make(map[string]interface{}) 4762 if avwpp.WorkLoadType != "" { 4763 objectMap["workLoadType"] = avwpp.WorkLoadType 4764 } 4765 if avwpp.Settings != nil { 4766 objectMap["settings"] = avwpp.Settings 4767 } 4768 if avwpp.SubProtectionPolicy != nil { 4769 objectMap["subProtectionPolicy"] = avwpp.SubProtectionPolicy 4770 } 4771 if avwpp.MakePolicyConsistent != nil { 4772 objectMap["makePolicyConsistent"] = avwpp.MakePolicyConsistent 4773 } 4774 if avwpp.ProtectedItemsCount != nil { 4775 objectMap["protectedItemsCount"] = avwpp.ProtectedItemsCount 4776 } 4777 if avwpp.BackupManagementType != "" { 4778 objectMap["backupManagementType"] = avwpp.BackupManagementType 4779 } 4780 return json.Marshal(objectMap) 4781} 4782 4783// AsAzureVMWorkloadProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy. 4784func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) { 4785 return &avwpp, true 4786} 4787 4788// AsAzureFileShareProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy. 4789func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) { 4790 return nil, false 4791} 4792 4793// AsAzureIaaSVMProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy. 4794func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) { 4795 return nil, false 4796} 4797 4798// AsAzureSQLProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy. 4799func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) { 4800 return nil, false 4801} 4802 4803// AsGenericProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy. 4804func (avwpp AzureVMWorkloadProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) { 4805 return nil, false 4806} 4807 4808// AsMabProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy. 4809func (avwpp AzureVMWorkloadProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) { 4810 return nil, false 4811} 4812 4813// AsProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy. 4814func (avwpp AzureVMWorkloadProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) { 4815 return nil, false 4816} 4817 4818// AsBasicProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy. 4819func (avwpp AzureVMWorkloadProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) { 4820 return &avwpp, true 4821} 4822 4823// AzureVMWorkloadSAPAseDatabaseProtectedItem azure VM workload-specific protected item representing SAP 4824// ASE Database. 4825type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { 4826 // FriendlyName - Friendly name of the DB represented by this backup item. 4827 FriendlyName *string `json:"friendlyName,omitempty"` 4828 // ServerName - Host/Cluster Name for instance or AG 4829 ServerName *string `json:"serverName,omitempty"` 4830 // ParentName - Parent name of the DB such as Instance or Availability Group. 4831 ParentName *string `json:"parentName,omitempty"` 4832 // ParentType - Parent type of protected item, example: for a DB, standalone server or distributed 4833 ParentType *string `json:"parentType,omitempty"` 4834 // ProtectionStatus - Backup status of this backup item. 4835 ProtectionStatus *string `json:"protectionStatus,omitempty"` 4836 // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' 4837 ProtectionState ProtectionState `json:"protectionState,omitempty"` 4838 // LastBackupStatus - Last backup operation status. Possible values: Healthy, Unhealthy. Possible values include: 'LastBackupStatusInvalid', 'LastBackupStatusHealthy', 'LastBackupStatusUnhealthy', 'LastBackupStatusIRPending' 4839 LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"` 4840 // LastBackupTime - Timestamp of the last backup operation on this backup item. 4841 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` 4842 // LastBackupErrorDetail - Error details in last backup 4843 LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"` 4844 // ProtectedItemDataSourceID - Data ID of the protected item. 4845 ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"` 4846 // ProtectedItemHealthStatus - Health status of the backup item, evaluated based on last heartbeat received. Possible values include: 'ProtectedItemHealthStatusInvalid', 'ProtectedItemHealthStatusHealthy', 'ProtectedItemHealthStatusUnhealthy', 'ProtectedItemHealthStatusNotReachable', 'ProtectedItemHealthStatusIRPending' 4847 ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"` 4848 // ExtendedInfo - Additional information for this backup item. 4849 ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` 4850 // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 4851 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 4852 // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' 4853 WorkloadType DataSourceType `json:"workloadType,omitempty"` 4854 // ContainerName - Unique name of container 4855 ContainerName *string `json:"containerName,omitempty"` 4856 // SourceResourceID - ARM ID of the resource to be backed up. 4857 SourceResourceID *string `json:"sourceResourceId,omitempty"` 4858 // PolicyID - ID of the backup policy with which this item is backed up. 4859 PolicyID *string `json:"policyId,omitempty"` 4860 // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. 4861 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` 4862 // BackupSetName - Name of the backup set the backup item belongs to 4863 BackupSetName *string `json:"backupSetName,omitempty"` 4864 // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' 4865 CreateMode CreateMode `json:"createMode,omitempty"` 4866 // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC 4867 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` 4868 // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete 4869 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` 4870 // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted 4871 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` 4872 // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon 4873 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` 4874 // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state 4875 IsRehydrate *bool `json:"isRehydrate,omitempty"` 4876 // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' 4877 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` 4878} 4879 4880// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPAseDatabaseProtectedItem. 4881func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) MarshalJSON() ([]byte, error) { 4882 avwsadpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadSAPAseDatabase 4883 objectMap := make(map[string]interface{}) 4884 if avwsadpi.FriendlyName != nil { 4885 objectMap["friendlyName"] = avwsadpi.FriendlyName 4886 } 4887 if avwsadpi.ServerName != nil { 4888 objectMap["serverName"] = avwsadpi.ServerName 4889 } 4890 if avwsadpi.ParentName != nil { 4891 objectMap["parentName"] = avwsadpi.ParentName 4892 } 4893 if avwsadpi.ParentType != nil { 4894 objectMap["parentType"] = avwsadpi.ParentType 4895 } 4896 if avwsadpi.ProtectionStatus != nil { 4897 objectMap["protectionStatus"] = avwsadpi.ProtectionStatus 4898 } 4899 if avwsadpi.ProtectionState != "" { 4900 objectMap["protectionState"] = avwsadpi.ProtectionState 4901 } 4902 if avwsadpi.LastBackupStatus != "" { 4903 objectMap["lastBackupStatus"] = avwsadpi.LastBackupStatus 4904 } 4905 if avwsadpi.LastBackupTime != nil { 4906 objectMap["lastBackupTime"] = avwsadpi.LastBackupTime 4907 } 4908 if avwsadpi.LastBackupErrorDetail != nil { 4909 objectMap["lastBackupErrorDetail"] = avwsadpi.LastBackupErrorDetail 4910 } 4911 if avwsadpi.ProtectedItemDataSourceID != nil { 4912 objectMap["protectedItemDataSourceId"] = avwsadpi.ProtectedItemDataSourceID 4913 } 4914 if avwsadpi.ProtectedItemHealthStatus != "" { 4915 objectMap["protectedItemHealthStatus"] = avwsadpi.ProtectedItemHealthStatus 4916 } 4917 if avwsadpi.ExtendedInfo != nil { 4918 objectMap["extendedInfo"] = avwsadpi.ExtendedInfo 4919 } 4920 if avwsadpi.BackupManagementType != "" { 4921 objectMap["backupManagementType"] = avwsadpi.BackupManagementType 4922 } 4923 if avwsadpi.WorkloadType != "" { 4924 objectMap["workloadType"] = avwsadpi.WorkloadType 4925 } 4926 if avwsadpi.ContainerName != nil { 4927 objectMap["containerName"] = avwsadpi.ContainerName 4928 } 4929 if avwsadpi.SourceResourceID != nil { 4930 objectMap["sourceResourceId"] = avwsadpi.SourceResourceID 4931 } 4932 if avwsadpi.PolicyID != nil { 4933 objectMap["policyId"] = avwsadpi.PolicyID 4934 } 4935 if avwsadpi.LastRecoveryPoint != nil { 4936 objectMap["lastRecoveryPoint"] = avwsadpi.LastRecoveryPoint 4937 } 4938 if avwsadpi.BackupSetName != nil { 4939 objectMap["backupSetName"] = avwsadpi.BackupSetName 4940 } 4941 if avwsadpi.CreateMode != "" { 4942 objectMap["createMode"] = avwsadpi.CreateMode 4943 } 4944 if avwsadpi.DeferredDeleteTimeInUTC != nil { 4945 objectMap["deferredDeleteTimeInUTC"] = avwsadpi.DeferredDeleteTimeInUTC 4946 } 4947 if avwsadpi.IsScheduledForDeferredDelete != nil { 4948 objectMap["isScheduledForDeferredDelete"] = avwsadpi.IsScheduledForDeferredDelete 4949 } 4950 if avwsadpi.DeferredDeleteTimeRemaining != nil { 4951 objectMap["deferredDeleteTimeRemaining"] = avwsadpi.DeferredDeleteTimeRemaining 4952 } 4953 if avwsadpi.IsDeferredDeleteScheduleUpcoming != nil { 4954 objectMap["isDeferredDeleteScheduleUpcoming"] = avwsadpi.IsDeferredDeleteScheduleUpcoming 4955 } 4956 if avwsadpi.IsRehydrate != nil { 4957 objectMap["isRehydrate"] = avwsadpi.IsRehydrate 4958 } 4959 if avwsadpi.ProtectedItemType != "" { 4960 objectMap["protectedItemType"] = avwsadpi.ProtectedItemType 4961 } 4962 return json.Marshal(objectMap) 4963} 4964 4965// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. 4966func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { 4967 return nil, false 4968} 4969 4970// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. 4971func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { 4972 return nil, false 4973} 4974 4975// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. 4976func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { 4977 return nil, false 4978} 4979 4980// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. 4981func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { 4982 return nil, false 4983} 4984 4985// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. 4986func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { 4987 return nil, false 4988} 4989 4990// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. 4991func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { 4992 return nil, false 4993} 4994 4995// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. 4996func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { 4997 return nil, false 4998} 4999 5000// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. 5001func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { 5002 return &avwsadpi, true 5003} 5004 5005// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. 5006func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { 5007 return &avwsadpi, true 5008} 5009 5010// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. 5011func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { 5012 return nil, false 5013} 5014 5015// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. 5016func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { 5017 return nil, false 5018} 5019 5020// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. 5021func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { 5022 return nil, false 5023} 5024 5025// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. 5026func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { 5027 return nil, false 5028} 5029 5030// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. 5031func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { 5032 return nil, false 5033} 5034 5035// AsProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. 5036func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { 5037 return nil, false 5038} 5039 5040// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. 5041func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { 5042 return &avwsadpi, true 5043} 5044 5045// AzureVMWorkloadSAPAseDatabaseWorkloadItem azure VM workload-specific workload item representing SAP ASE 5046// Database. 5047type AzureVMWorkloadSAPAseDatabaseWorkloadItem struct { 5048 // ParentName - Name for instance or AG 5049 ParentName *string `json:"parentName,omitempty"` 5050 // ServerName - Host/Cluster Name for instance or AG 5051 ServerName *string `json:"serverName,omitempty"` 5052 // IsAutoProtectable - Indicates if workload item is auto-protectable 5053 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` 5054 // Subinquireditemcount - For instance or AG, indicates number of DB's present 5055 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` 5056 // SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected 5057 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` 5058 // BackupManagementType - Type of backup management to backup an item. 5059 BackupManagementType *string `json:"backupManagementType,omitempty"` 5060 // WorkloadType - Type of workload for the backup management 5061 WorkloadType *string `json:"workloadType,omitempty"` 5062 // FriendlyName - Friendly name of the backup item. 5063 FriendlyName *string `json:"friendlyName,omitempty"` 5064 // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 5065 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 5066 // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' 5067 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` 5068} 5069 5070// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPAseDatabaseWorkloadItem. 5071func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { 5072 avwsadwi.WorkloadItemType = WorkloadItemTypeSAPAseDatabase1 5073 objectMap := make(map[string]interface{}) 5074 if avwsadwi.ParentName != nil { 5075 objectMap["parentName"] = avwsadwi.ParentName 5076 } 5077 if avwsadwi.ServerName != nil { 5078 objectMap["serverName"] = avwsadwi.ServerName 5079 } 5080 if avwsadwi.IsAutoProtectable != nil { 5081 objectMap["isAutoProtectable"] = avwsadwi.IsAutoProtectable 5082 } 5083 if avwsadwi.Subinquireditemcount != nil { 5084 objectMap["subinquireditemcount"] = avwsadwi.Subinquireditemcount 5085 } 5086 if avwsadwi.SubWorkloadItemCount != nil { 5087 objectMap["subWorkloadItemCount"] = avwsadwi.SubWorkloadItemCount 5088 } 5089 if avwsadwi.BackupManagementType != nil { 5090 objectMap["backupManagementType"] = avwsadwi.BackupManagementType 5091 } 5092 if avwsadwi.WorkloadType != nil { 5093 objectMap["workloadType"] = avwsadwi.WorkloadType 5094 } 5095 if avwsadwi.FriendlyName != nil { 5096 objectMap["friendlyName"] = avwsadwi.FriendlyName 5097 } 5098 if avwsadwi.ProtectionState != "" { 5099 objectMap["protectionState"] = avwsadwi.ProtectionState 5100 } 5101 if avwsadwi.WorkloadItemType != "" { 5102 objectMap["workloadItemType"] = avwsadwi.WorkloadItemType 5103 } 5104 return json.Marshal(objectMap) 5105} 5106 5107// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. 5108func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { 5109 return nil, false 5110} 5111 5112// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. 5113func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { 5114 return &avwsadwi, true 5115} 5116 5117// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. 5118func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { 5119 return &avwsadwi, true 5120} 5121 5122// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. 5123func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { 5124 return nil, false 5125} 5126 5127// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. 5128func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { 5129 return nil, false 5130} 5131 5132// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. 5133func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { 5134 return nil, false 5135} 5136 5137// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. 5138func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { 5139 return nil, false 5140} 5141 5142// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. 5143func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { 5144 return nil, false 5145} 5146 5147// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. 5148func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { 5149 return nil, false 5150} 5151 5152// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. 5153func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { 5154 return &avwsadwi, true 5155} 5156 5157// AzureVMWorkloadSAPAseSystemProtectableItem azure VM workload-specific protectable item representing SAP 5158// ASE System. 5159type AzureVMWorkloadSAPAseSystemProtectableItem struct { 5160 // ParentName - Name for instance or AG 5161 ParentName *string `json:"parentName,omitempty"` 5162 // ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent 5163 // Only Applicable for data bases where the parent would be either Instance or a SQL AG. 5164 ParentUniqueName *string `json:"parentUniqueName,omitempty"` 5165 // ServerName - Host/Cluster Name for instance or AG 5166 ServerName *string `json:"serverName,omitempty"` 5167 // IsAutoProtectable - Indicates if protectable item is auto-protectable 5168 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` 5169 // IsAutoProtected - Indicates if protectable item is auto-protected 5170 IsAutoProtected *bool `json:"isAutoProtected,omitempty"` 5171 // Subinquireditemcount - For instance or AG, indicates number of DB's present 5172 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` 5173 // Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected 5174 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` 5175 // Prebackupvalidation - Pre-backup validation for protectable objects 5176 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` 5177 // BackupManagementType - Type of backup management to backup an item. 5178 BackupManagementType *string `json:"backupManagementType,omitempty"` 5179 // WorkloadType - Type of workload for the backup management 5180 WorkloadType *string `json:"workloadType,omitempty"` 5181 // FriendlyName - Friendly name of the backup item. 5182 FriendlyName *string `json:"friendlyName,omitempty"` 5183 // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 5184 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 5185 // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' 5186 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` 5187} 5188 5189// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPAseSystemProtectableItem. 5190func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) MarshalJSON() ([]byte, error) { 5191 avwsaspi.ProtectableItemType = ProtectableItemTypeSAPAseSystem 5192 objectMap := make(map[string]interface{}) 5193 if avwsaspi.ParentName != nil { 5194 objectMap["parentName"] = avwsaspi.ParentName 5195 } 5196 if avwsaspi.ParentUniqueName != nil { 5197 objectMap["parentUniqueName"] = avwsaspi.ParentUniqueName 5198 } 5199 if avwsaspi.ServerName != nil { 5200 objectMap["serverName"] = avwsaspi.ServerName 5201 } 5202 if avwsaspi.IsAutoProtectable != nil { 5203 objectMap["isAutoProtectable"] = avwsaspi.IsAutoProtectable 5204 } 5205 if avwsaspi.IsAutoProtected != nil { 5206 objectMap["isAutoProtected"] = avwsaspi.IsAutoProtected 5207 } 5208 if avwsaspi.Subinquireditemcount != nil { 5209 objectMap["subinquireditemcount"] = avwsaspi.Subinquireditemcount 5210 } 5211 if avwsaspi.Subprotectableitemcount != nil { 5212 objectMap["subprotectableitemcount"] = avwsaspi.Subprotectableitemcount 5213 } 5214 if avwsaspi.Prebackupvalidation != nil { 5215 objectMap["prebackupvalidation"] = avwsaspi.Prebackupvalidation 5216 } 5217 if avwsaspi.BackupManagementType != nil { 5218 objectMap["backupManagementType"] = avwsaspi.BackupManagementType 5219 } 5220 if avwsaspi.WorkloadType != nil { 5221 objectMap["workloadType"] = avwsaspi.WorkloadType 5222 } 5223 if avwsaspi.FriendlyName != nil { 5224 objectMap["friendlyName"] = avwsaspi.FriendlyName 5225 } 5226 if avwsaspi.ProtectionState != "" { 5227 objectMap["protectionState"] = avwsaspi.ProtectionState 5228 } 5229 if avwsaspi.ProtectableItemType != "" { 5230 objectMap["protectableItemType"] = avwsaspi.ProtectableItemType 5231 } 5232 return json.Marshal(objectMap) 5233} 5234 5235// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. 5236func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { 5237 return nil, false 5238} 5239 5240// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. 5241func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { 5242 return nil, false 5243} 5244 5245// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. 5246func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { 5247 return nil, false 5248} 5249 5250// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. 5251func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { 5252 return nil, false 5253} 5254 5255// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. 5256func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { 5257 return &avwsaspi, true 5258} 5259 5260// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. 5261func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { 5262 return &avwsaspi, true 5263} 5264 5265// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. 5266func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { 5267 return nil, false 5268} 5269 5270// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. 5271func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { 5272 return nil, false 5273} 5274 5275// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. 5276func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { 5277 return nil, false 5278} 5279 5280// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. 5281func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { 5282 return nil, false 5283} 5284 5285// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. 5286func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { 5287 return nil, false 5288} 5289 5290// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. 5291func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { 5292 return nil, false 5293} 5294 5295// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. 5296func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { 5297 return nil, false 5298} 5299 5300// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. 5301func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { 5302 return nil, false 5303} 5304 5305// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. 5306func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { 5307 return &avwsaspi, true 5308} 5309 5310// AzureVMWorkloadSAPAseSystemWorkloadItem azure VM workload-specific workload item representing SAP ASE 5311// System. 5312type AzureVMWorkloadSAPAseSystemWorkloadItem struct { 5313 // ParentName - Name for instance or AG 5314 ParentName *string `json:"parentName,omitempty"` 5315 // ServerName - Host/Cluster Name for instance or AG 5316 ServerName *string `json:"serverName,omitempty"` 5317 // IsAutoProtectable - Indicates if workload item is auto-protectable 5318 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` 5319 // Subinquireditemcount - For instance or AG, indicates number of DB's present 5320 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` 5321 // SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected 5322 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` 5323 // BackupManagementType - Type of backup management to backup an item. 5324 BackupManagementType *string `json:"backupManagementType,omitempty"` 5325 // WorkloadType - Type of workload for the backup management 5326 WorkloadType *string `json:"workloadType,omitempty"` 5327 // FriendlyName - Friendly name of the backup item. 5328 FriendlyName *string `json:"friendlyName,omitempty"` 5329 // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 5330 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 5331 // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' 5332 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` 5333} 5334 5335// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPAseSystemWorkloadItem. 5336func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) MarshalJSON() ([]byte, error) { 5337 avwsaswi.WorkloadItemType = WorkloadItemTypeSAPAseSystem1 5338 objectMap := make(map[string]interface{}) 5339 if avwsaswi.ParentName != nil { 5340 objectMap["parentName"] = avwsaswi.ParentName 5341 } 5342 if avwsaswi.ServerName != nil { 5343 objectMap["serverName"] = avwsaswi.ServerName 5344 } 5345 if avwsaswi.IsAutoProtectable != nil { 5346 objectMap["isAutoProtectable"] = avwsaswi.IsAutoProtectable 5347 } 5348 if avwsaswi.Subinquireditemcount != nil { 5349 objectMap["subinquireditemcount"] = avwsaswi.Subinquireditemcount 5350 } 5351 if avwsaswi.SubWorkloadItemCount != nil { 5352 objectMap["subWorkloadItemCount"] = avwsaswi.SubWorkloadItemCount 5353 } 5354 if avwsaswi.BackupManagementType != nil { 5355 objectMap["backupManagementType"] = avwsaswi.BackupManagementType 5356 } 5357 if avwsaswi.WorkloadType != nil { 5358 objectMap["workloadType"] = avwsaswi.WorkloadType 5359 } 5360 if avwsaswi.FriendlyName != nil { 5361 objectMap["friendlyName"] = avwsaswi.FriendlyName 5362 } 5363 if avwsaswi.ProtectionState != "" { 5364 objectMap["protectionState"] = avwsaswi.ProtectionState 5365 } 5366 if avwsaswi.WorkloadItemType != "" { 5367 objectMap["workloadItemType"] = avwsaswi.WorkloadItemType 5368 } 5369 return json.Marshal(objectMap) 5370} 5371 5372// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. 5373func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { 5374 return nil, false 5375} 5376 5377// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. 5378func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { 5379 return &avwsaswi, true 5380} 5381 5382// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. 5383func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { 5384 return nil, false 5385} 5386 5387// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. 5388func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { 5389 return &avwsaswi, true 5390} 5391 5392// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. 5393func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { 5394 return nil, false 5395} 5396 5397// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. 5398func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { 5399 return nil, false 5400} 5401 5402// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. 5403func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { 5404 return nil, false 5405} 5406 5407// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. 5408func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { 5409 return nil, false 5410} 5411 5412// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. 5413func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { 5414 return nil, false 5415} 5416 5417// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. 5418func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { 5419 return &avwsaswi, true 5420} 5421 5422// AzureVMWorkloadSAPHanaDatabaseProtectableItem azure VM workload-specific protectable item representing 5423// SAP HANA Database. 5424type AzureVMWorkloadSAPHanaDatabaseProtectableItem struct { 5425 // ParentName - Name for instance or AG 5426 ParentName *string `json:"parentName,omitempty"` 5427 // ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent 5428 // Only Applicable for data bases where the parent would be either Instance or a SQL AG. 5429 ParentUniqueName *string `json:"parentUniqueName,omitempty"` 5430 // ServerName - Host/Cluster Name for instance or AG 5431 ServerName *string `json:"serverName,omitempty"` 5432 // IsAutoProtectable - Indicates if protectable item is auto-protectable 5433 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` 5434 // IsAutoProtected - Indicates if protectable item is auto-protected 5435 IsAutoProtected *bool `json:"isAutoProtected,omitempty"` 5436 // Subinquireditemcount - For instance or AG, indicates number of DB's present 5437 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` 5438 // Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected 5439 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` 5440 // Prebackupvalidation - Pre-backup validation for protectable objects 5441 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` 5442 // BackupManagementType - Type of backup management to backup an item. 5443 BackupManagementType *string `json:"backupManagementType,omitempty"` 5444 // WorkloadType - Type of workload for the backup management 5445 WorkloadType *string `json:"workloadType,omitempty"` 5446 // FriendlyName - Friendly name of the backup item. 5447 FriendlyName *string `json:"friendlyName,omitempty"` 5448 // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 5449 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 5450 // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' 5451 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` 5452} 5453 5454// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPHanaDatabaseProtectableItem. 5455func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) MarshalJSON() ([]byte, error) { 5456 avwshdpi.ProtectableItemType = ProtectableItemTypeSAPHanaDatabase 5457 objectMap := make(map[string]interface{}) 5458 if avwshdpi.ParentName != nil { 5459 objectMap["parentName"] = avwshdpi.ParentName 5460 } 5461 if avwshdpi.ParentUniqueName != nil { 5462 objectMap["parentUniqueName"] = avwshdpi.ParentUniqueName 5463 } 5464 if avwshdpi.ServerName != nil { 5465 objectMap["serverName"] = avwshdpi.ServerName 5466 } 5467 if avwshdpi.IsAutoProtectable != nil { 5468 objectMap["isAutoProtectable"] = avwshdpi.IsAutoProtectable 5469 } 5470 if avwshdpi.IsAutoProtected != nil { 5471 objectMap["isAutoProtected"] = avwshdpi.IsAutoProtected 5472 } 5473 if avwshdpi.Subinquireditemcount != nil { 5474 objectMap["subinquireditemcount"] = avwshdpi.Subinquireditemcount 5475 } 5476 if avwshdpi.Subprotectableitemcount != nil { 5477 objectMap["subprotectableitemcount"] = avwshdpi.Subprotectableitemcount 5478 } 5479 if avwshdpi.Prebackupvalidation != nil { 5480 objectMap["prebackupvalidation"] = avwshdpi.Prebackupvalidation 5481 } 5482 if avwshdpi.BackupManagementType != nil { 5483 objectMap["backupManagementType"] = avwshdpi.BackupManagementType 5484 } 5485 if avwshdpi.WorkloadType != nil { 5486 objectMap["workloadType"] = avwshdpi.WorkloadType 5487 } 5488 if avwshdpi.FriendlyName != nil { 5489 objectMap["friendlyName"] = avwshdpi.FriendlyName 5490 } 5491 if avwshdpi.ProtectionState != "" { 5492 objectMap["protectionState"] = avwshdpi.ProtectionState 5493 } 5494 if avwshdpi.ProtectableItemType != "" { 5495 objectMap["protectableItemType"] = avwshdpi.ProtectableItemType 5496 } 5497 return json.Marshal(objectMap) 5498} 5499 5500// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. 5501func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { 5502 return nil, false 5503} 5504 5505// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. 5506func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { 5507 return nil, false 5508} 5509 5510// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. 5511func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { 5512 return nil, false 5513} 5514 5515// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. 5516func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { 5517 return nil, false 5518} 5519 5520// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. 5521func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { 5522 return &avwshdpi, true 5523} 5524 5525// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. 5526func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { 5527 return nil, false 5528} 5529 5530// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. 5531func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { 5532 return &avwshdpi, true 5533} 5534 5535// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. 5536func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { 5537 return nil, false 5538} 5539 5540// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. 5541func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { 5542 return nil, false 5543} 5544 5545// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. 5546func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { 5547 return nil, false 5548} 5549 5550// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. 5551func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { 5552 return nil, false 5553} 5554 5555// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. 5556func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { 5557 return nil, false 5558} 5559 5560// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. 5561func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { 5562 return nil, false 5563} 5564 5565// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. 5566func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { 5567 return nil, false 5568} 5569 5570// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. 5571func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { 5572 return &avwshdpi, true 5573} 5574 5575// AzureVMWorkloadSAPHanaDatabaseProtectedItem azure VM workload-specific protected item representing SAP 5576// HANA Database. 5577type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { 5578 // FriendlyName - Friendly name of the DB represented by this backup item. 5579 FriendlyName *string `json:"friendlyName,omitempty"` 5580 // ServerName - Host/Cluster Name for instance or AG 5581 ServerName *string `json:"serverName,omitempty"` 5582 // ParentName - Parent name of the DB such as Instance or Availability Group. 5583 ParentName *string `json:"parentName,omitempty"` 5584 // ParentType - Parent type of protected item, example: for a DB, standalone server or distributed 5585 ParentType *string `json:"parentType,omitempty"` 5586 // ProtectionStatus - Backup status of this backup item. 5587 ProtectionStatus *string `json:"protectionStatus,omitempty"` 5588 // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' 5589 ProtectionState ProtectionState `json:"protectionState,omitempty"` 5590 // LastBackupStatus - Last backup operation status. Possible values: Healthy, Unhealthy. Possible values include: 'LastBackupStatusInvalid', 'LastBackupStatusHealthy', 'LastBackupStatusUnhealthy', 'LastBackupStatusIRPending' 5591 LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"` 5592 // LastBackupTime - Timestamp of the last backup operation on this backup item. 5593 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` 5594 // LastBackupErrorDetail - Error details in last backup 5595 LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"` 5596 // ProtectedItemDataSourceID - Data ID of the protected item. 5597 ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"` 5598 // ProtectedItemHealthStatus - Health status of the backup item, evaluated based on last heartbeat received. Possible values include: 'ProtectedItemHealthStatusInvalid', 'ProtectedItemHealthStatusHealthy', 'ProtectedItemHealthStatusUnhealthy', 'ProtectedItemHealthStatusNotReachable', 'ProtectedItemHealthStatusIRPending' 5599 ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"` 5600 // ExtendedInfo - Additional information for this backup item. 5601 ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` 5602 // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 5603 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 5604 // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' 5605 WorkloadType DataSourceType `json:"workloadType,omitempty"` 5606 // ContainerName - Unique name of container 5607 ContainerName *string `json:"containerName,omitempty"` 5608 // SourceResourceID - ARM ID of the resource to be backed up. 5609 SourceResourceID *string `json:"sourceResourceId,omitempty"` 5610 // PolicyID - ID of the backup policy with which this item is backed up. 5611 PolicyID *string `json:"policyId,omitempty"` 5612 // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. 5613 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` 5614 // BackupSetName - Name of the backup set the backup item belongs to 5615 BackupSetName *string `json:"backupSetName,omitempty"` 5616 // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' 5617 CreateMode CreateMode `json:"createMode,omitempty"` 5618 // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC 5619 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` 5620 // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete 5621 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` 5622 // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted 5623 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` 5624 // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon 5625 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` 5626 // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state 5627 IsRehydrate *bool `json:"isRehydrate,omitempty"` 5628 // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' 5629 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` 5630} 5631 5632// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPHanaDatabaseProtectedItem. 5633func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) MarshalJSON() ([]byte, error) { 5634 avwshdpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase 5635 objectMap := make(map[string]interface{}) 5636 if avwshdpi.FriendlyName != nil { 5637 objectMap["friendlyName"] = avwshdpi.FriendlyName 5638 } 5639 if avwshdpi.ServerName != nil { 5640 objectMap["serverName"] = avwshdpi.ServerName 5641 } 5642 if avwshdpi.ParentName != nil { 5643 objectMap["parentName"] = avwshdpi.ParentName 5644 } 5645 if avwshdpi.ParentType != nil { 5646 objectMap["parentType"] = avwshdpi.ParentType 5647 } 5648 if avwshdpi.ProtectionStatus != nil { 5649 objectMap["protectionStatus"] = avwshdpi.ProtectionStatus 5650 } 5651 if avwshdpi.ProtectionState != "" { 5652 objectMap["protectionState"] = avwshdpi.ProtectionState 5653 } 5654 if avwshdpi.LastBackupStatus != "" { 5655 objectMap["lastBackupStatus"] = avwshdpi.LastBackupStatus 5656 } 5657 if avwshdpi.LastBackupTime != nil { 5658 objectMap["lastBackupTime"] = avwshdpi.LastBackupTime 5659 } 5660 if avwshdpi.LastBackupErrorDetail != nil { 5661 objectMap["lastBackupErrorDetail"] = avwshdpi.LastBackupErrorDetail 5662 } 5663 if avwshdpi.ProtectedItemDataSourceID != nil { 5664 objectMap["protectedItemDataSourceId"] = avwshdpi.ProtectedItemDataSourceID 5665 } 5666 if avwshdpi.ProtectedItemHealthStatus != "" { 5667 objectMap["protectedItemHealthStatus"] = avwshdpi.ProtectedItemHealthStatus 5668 } 5669 if avwshdpi.ExtendedInfo != nil { 5670 objectMap["extendedInfo"] = avwshdpi.ExtendedInfo 5671 } 5672 if avwshdpi.BackupManagementType != "" { 5673 objectMap["backupManagementType"] = avwshdpi.BackupManagementType 5674 } 5675 if avwshdpi.WorkloadType != "" { 5676 objectMap["workloadType"] = avwshdpi.WorkloadType 5677 } 5678 if avwshdpi.ContainerName != nil { 5679 objectMap["containerName"] = avwshdpi.ContainerName 5680 } 5681 if avwshdpi.SourceResourceID != nil { 5682 objectMap["sourceResourceId"] = avwshdpi.SourceResourceID 5683 } 5684 if avwshdpi.PolicyID != nil { 5685 objectMap["policyId"] = avwshdpi.PolicyID 5686 } 5687 if avwshdpi.LastRecoveryPoint != nil { 5688 objectMap["lastRecoveryPoint"] = avwshdpi.LastRecoveryPoint 5689 } 5690 if avwshdpi.BackupSetName != nil { 5691 objectMap["backupSetName"] = avwshdpi.BackupSetName 5692 } 5693 if avwshdpi.CreateMode != "" { 5694 objectMap["createMode"] = avwshdpi.CreateMode 5695 } 5696 if avwshdpi.DeferredDeleteTimeInUTC != nil { 5697 objectMap["deferredDeleteTimeInUTC"] = avwshdpi.DeferredDeleteTimeInUTC 5698 } 5699 if avwshdpi.IsScheduledForDeferredDelete != nil { 5700 objectMap["isScheduledForDeferredDelete"] = avwshdpi.IsScheduledForDeferredDelete 5701 } 5702 if avwshdpi.DeferredDeleteTimeRemaining != nil { 5703 objectMap["deferredDeleteTimeRemaining"] = avwshdpi.DeferredDeleteTimeRemaining 5704 } 5705 if avwshdpi.IsDeferredDeleteScheduleUpcoming != nil { 5706 objectMap["isDeferredDeleteScheduleUpcoming"] = avwshdpi.IsDeferredDeleteScheduleUpcoming 5707 } 5708 if avwshdpi.IsRehydrate != nil { 5709 objectMap["isRehydrate"] = avwshdpi.IsRehydrate 5710 } 5711 if avwshdpi.ProtectedItemType != "" { 5712 objectMap["protectedItemType"] = avwshdpi.ProtectedItemType 5713 } 5714 return json.Marshal(objectMap) 5715} 5716 5717// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. 5718func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { 5719 return nil, false 5720} 5721 5722// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. 5723func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { 5724 return nil, false 5725} 5726 5727// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. 5728func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { 5729 return nil, false 5730} 5731 5732// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. 5733func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { 5734 return nil, false 5735} 5736 5737// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. 5738func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { 5739 return nil, false 5740} 5741 5742// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. 5743func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { 5744 return nil, false 5745} 5746 5747// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. 5748func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { 5749 return nil, false 5750} 5751 5752// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. 5753func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { 5754 return &avwshdpi, true 5755} 5756 5757// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. 5758func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { 5759 return nil, false 5760} 5761 5762// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. 5763func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { 5764 return &avwshdpi, true 5765} 5766 5767// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. 5768func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { 5769 return nil, false 5770} 5771 5772// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. 5773func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { 5774 return nil, false 5775} 5776 5777// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. 5778func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { 5779 return nil, false 5780} 5781 5782// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. 5783func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { 5784 return nil, false 5785} 5786 5787// AsProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. 5788func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { 5789 return nil, false 5790} 5791 5792// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. 5793func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { 5794 return &avwshdpi, true 5795} 5796 5797// AzureVMWorkloadSAPHanaDatabaseWorkloadItem azure VM workload-specific workload item representing SAP 5798// HANA Database. 5799type AzureVMWorkloadSAPHanaDatabaseWorkloadItem struct { 5800 // ParentName - Name for instance or AG 5801 ParentName *string `json:"parentName,omitempty"` 5802 // ServerName - Host/Cluster Name for instance or AG 5803 ServerName *string `json:"serverName,omitempty"` 5804 // IsAutoProtectable - Indicates if workload item is auto-protectable 5805 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` 5806 // Subinquireditemcount - For instance or AG, indicates number of DB's present 5807 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` 5808 // SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected 5809 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` 5810 // BackupManagementType - Type of backup management to backup an item. 5811 BackupManagementType *string `json:"backupManagementType,omitempty"` 5812 // WorkloadType - Type of workload for the backup management 5813 WorkloadType *string `json:"workloadType,omitempty"` 5814 // FriendlyName - Friendly name of the backup item. 5815 FriendlyName *string `json:"friendlyName,omitempty"` 5816 // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 5817 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 5818 // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' 5819 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` 5820} 5821 5822// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. 5823func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { 5824 avwshdwi.WorkloadItemType = WorkloadItemTypeSAPHanaDatabase1 5825 objectMap := make(map[string]interface{}) 5826 if avwshdwi.ParentName != nil { 5827 objectMap["parentName"] = avwshdwi.ParentName 5828 } 5829 if avwshdwi.ServerName != nil { 5830 objectMap["serverName"] = avwshdwi.ServerName 5831 } 5832 if avwshdwi.IsAutoProtectable != nil { 5833 objectMap["isAutoProtectable"] = avwshdwi.IsAutoProtectable 5834 } 5835 if avwshdwi.Subinquireditemcount != nil { 5836 objectMap["subinquireditemcount"] = avwshdwi.Subinquireditemcount 5837 } 5838 if avwshdwi.SubWorkloadItemCount != nil { 5839 objectMap["subWorkloadItemCount"] = avwshdwi.SubWorkloadItemCount 5840 } 5841 if avwshdwi.BackupManagementType != nil { 5842 objectMap["backupManagementType"] = avwshdwi.BackupManagementType 5843 } 5844 if avwshdwi.WorkloadType != nil { 5845 objectMap["workloadType"] = avwshdwi.WorkloadType 5846 } 5847 if avwshdwi.FriendlyName != nil { 5848 objectMap["friendlyName"] = avwshdwi.FriendlyName 5849 } 5850 if avwshdwi.ProtectionState != "" { 5851 objectMap["protectionState"] = avwshdwi.ProtectionState 5852 } 5853 if avwshdwi.WorkloadItemType != "" { 5854 objectMap["workloadItemType"] = avwshdwi.WorkloadItemType 5855 } 5856 return json.Marshal(objectMap) 5857} 5858 5859// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. 5860func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { 5861 return nil, false 5862} 5863 5864// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. 5865func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { 5866 return &avwshdwi, true 5867} 5868 5869// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. 5870func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { 5871 return nil, false 5872} 5873 5874// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. 5875func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { 5876 return nil, false 5877} 5878 5879// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. 5880func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { 5881 return &avwshdwi, true 5882} 5883 5884// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. 5885func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { 5886 return nil, false 5887} 5888 5889// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. 5890func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { 5891 return nil, false 5892} 5893 5894// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. 5895func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { 5896 return nil, false 5897} 5898 5899// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. 5900func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { 5901 return nil, false 5902} 5903 5904// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. 5905func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { 5906 return &avwshdwi, true 5907} 5908 5909// AzureVMWorkloadSAPHanaSystemProtectableItem azure VM workload-specific protectable item representing SAP 5910// HANA System. 5911type AzureVMWorkloadSAPHanaSystemProtectableItem struct { 5912 // ParentName - Name for instance or AG 5913 ParentName *string `json:"parentName,omitempty"` 5914 // ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent 5915 // Only Applicable for data bases where the parent would be either Instance or a SQL AG. 5916 ParentUniqueName *string `json:"parentUniqueName,omitempty"` 5917 // ServerName - Host/Cluster Name for instance or AG 5918 ServerName *string `json:"serverName,omitempty"` 5919 // IsAutoProtectable - Indicates if protectable item is auto-protectable 5920 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` 5921 // IsAutoProtected - Indicates if protectable item is auto-protected 5922 IsAutoProtected *bool `json:"isAutoProtected,omitempty"` 5923 // Subinquireditemcount - For instance or AG, indicates number of DB's present 5924 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` 5925 // Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected 5926 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` 5927 // Prebackupvalidation - Pre-backup validation for protectable objects 5928 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` 5929 // BackupManagementType - Type of backup management to backup an item. 5930 BackupManagementType *string `json:"backupManagementType,omitempty"` 5931 // WorkloadType - Type of workload for the backup management 5932 WorkloadType *string `json:"workloadType,omitempty"` 5933 // FriendlyName - Friendly name of the backup item. 5934 FriendlyName *string `json:"friendlyName,omitempty"` 5935 // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 5936 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 5937 // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' 5938 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` 5939} 5940 5941// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPHanaSystemProtectableItem. 5942func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) MarshalJSON() ([]byte, error) { 5943 avwshspi.ProtectableItemType = ProtectableItemTypeSAPHanaSystem 5944 objectMap := make(map[string]interface{}) 5945 if avwshspi.ParentName != nil { 5946 objectMap["parentName"] = avwshspi.ParentName 5947 } 5948 if avwshspi.ParentUniqueName != nil { 5949 objectMap["parentUniqueName"] = avwshspi.ParentUniqueName 5950 } 5951 if avwshspi.ServerName != nil { 5952 objectMap["serverName"] = avwshspi.ServerName 5953 } 5954 if avwshspi.IsAutoProtectable != nil { 5955 objectMap["isAutoProtectable"] = avwshspi.IsAutoProtectable 5956 } 5957 if avwshspi.IsAutoProtected != nil { 5958 objectMap["isAutoProtected"] = avwshspi.IsAutoProtected 5959 } 5960 if avwshspi.Subinquireditemcount != nil { 5961 objectMap["subinquireditemcount"] = avwshspi.Subinquireditemcount 5962 } 5963 if avwshspi.Subprotectableitemcount != nil { 5964 objectMap["subprotectableitemcount"] = avwshspi.Subprotectableitemcount 5965 } 5966 if avwshspi.Prebackupvalidation != nil { 5967 objectMap["prebackupvalidation"] = avwshspi.Prebackupvalidation 5968 } 5969 if avwshspi.BackupManagementType != nil { 5970 objectMap["backupManagementType"] = avwshspi.BackupManagementType 5971 } 5972 if avwshspi.WorkloadType != nil { 5973 objectMap["workloadType"] = avwshspi.WorkloadType 5974 } 5975 if avwshspi.FriendlyName != nil { 5976 objectMap["friendlyName"] = avwshspi.FriendlyName 5977 } 5978 if avwshspi.ProtectionState != "" { 5979 objectMap["protectionState"] = avwshspi.ProtectionState 5980 } 5981 if avwshspi.ProtectableItemType != "" { 5982 objectMap["protectableItemType"] = avwshspi.ProtectableItemType 5983 } 5984 return json.Marshal(objectMap) 5985} 5986 5987// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. 5988func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { 5989 return nil, false 5990} 5991 5992// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. 5993func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { 5994 return nil, false 5995} 5996 5997// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. 5998func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { 5999 return nil, false 6000} 6001 6002// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. 6003func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { 6004 return nil, false 6005} 6006 6007// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. 6008func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { 6009 return &avwshspi, true 6010} 6011 6012// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. 6013func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { 6014 return nil, false 6015} 6016 6017// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. 6018func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { 6019 return nil, false 6020} 6021 6022// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. 6023func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { 6024 return &avwshspi, true 6025} 6026 6027// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. 6028func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { 6029 return nil, false 6030} 6031 6032// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. 6033func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { 6034 return nil, false 6035} 6036 6037// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. 6038func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { 6039 return nil, false 6040} 6041 6042// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. 6043func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { 6044 return nil, false 6045} 6046 6047// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. 6048func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { 6049 return nil, false 6050} 6051 6052// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. 6053func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { 6054 return nil, false 6055} 6056 6057// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. 6058func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { 6059 return &avwshspi, true 6060} 6061 6062// AzureVMWorkloadSAPHanaSystemWorkloadItem azure VM workload-specific workload item representing SAP HANA 6063// System. 6064type AzureVMWorkloadSAPHanaSystemWorkloadItem struct { 6065 // ParentName - Name for instance or AG 6066 ParentName *string `json:"parentName,omitempty"` 6067 // ServerName - Host/Cluster Name for instance or AG 6068 ServerName *string `json:"serverName,omitempty"` 6069 // IsAutoProtectable - Indicates if workload item is auto-protectable 6070 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` 6071 // Subinquireditemcount - For instance or AG, indicates number of DB's present 6072 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` 6073 // SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected 6074 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` 6075 // BackupManagementType - Type of backup management to backup an item. 6076 BackupManagementType *string `json:"backupManagementType,omitempty"` 6077 // WorkloadType - Type of workload for the backup management 6078 WorkloadType *string `json:"workloadType,omitempty"` 6079 // FriendlyName - Friendly name of the backup item. 6080 FriendlyName *string `json:"friendlyName,omitempty"` 6081 // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 6082 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 6083 // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' 6084 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` 6085} 6086 6087// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPHanaSystemWorkloadItem. 6088func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) MarshalJSON() ([]byte, error) { 6089 avwshswi.WorkloadItemType = WorkloadItemTypeSAPHanaSystem1 6090 objectMap := make(map[string]interface{}) 6091 if avwshswi.ParentName != nil { 6092 objectMap["parentName"] = avwshswi.ParentName 6093 } 6094 if avwshswi.ServerName != nil { 6095 objectMap["serverName"] = avwshswi.ServerName 6096 } 6097 if avwshswi.IsAutoProtectable != nil { 6098 objectMap["isAutoProtectable"] = avwshswi.IsAutoProtectable 6099 } 6100 if avwshswi.Subinquireditemcount != nil { 6101 objectMap["subinquireditemcount"] = avwshswi.Subinquireditemcount 6102 } 6103 if avwshswi.SubWorkloadItemCount != nil { 6104 objectMap["subWorkloadItemCount"] = avwshswi.SubWorkloadItemCount 6105 } 6106 if avwshswi.BackupManagementType != nil { 6107 objectMap["backupManagementType"] = avwshswi.BackupManagementType 6108 } 6109 if avwshswi.WorkloadType != nil { 6110 objectMap["workloadType"] = avwshswi.WorkloadType 6111 } 6112 if avwshswi.FriendlyName != nil { 6113 objectMap["friendlyName"] = avwshswi.FriendlyName 6114 } 6115 if avwshswi.ProtectionState != "" { 6116 objectMap["protectionState"] = avwshswi.ProtectionState 6117 } 6118 if avwshswi.WorkloadItemType != "" { 6119 objectMap["workloadItemType"] = avwshswi.WorkloadItemType 6120 } 6121 return json.Marshal(objectMap) 6122} 6123 6124// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. 6125func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { 6126 return nil, false 6127} 6128 6129// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. 6130func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { 6131 return &avwshswi, true 6132} 6133 6134// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. 6135func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { 6136 return nil, false 6137} 6138 6139// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. 6140func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { 6141 return nil, false 6142} 6143 6144// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. 6145func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { 6146 return nil, false 6147} 6148 6149// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. 6150func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { 6151 return &avwshswi, true 6152} 6153 6154// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. 6155func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { 6156 return nil, false 6157} 6158 6159// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. 6160func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { 6161 return nil, false 6162} 6163 6164// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. 6165func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { 6166 return nil, false 6167} 6168 6169// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. 6170func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { 6171 return &avwshswi, true 6172} 6173 6174// AzureVMWorkloadSQLAvailabilityGroupProtectableItem azure VM workload-specific protectable item 6175// representing SQL Availability Group. 6176type AzureVMWorkloadSQLAvailabilityGroupProtectableItem struct { 6177 // ParentName - Name for instance or AG 6178 ParentName *string `json:"parentName,omitempty"` 6179 // ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent 6180 // Only Applicable for data bases where the parent would be either Instance or a SQL AG. 6181 ParentUniqueName *string `json:"parentUniqueName,omitempty"` 6182 // ServerName - Host/Cluster Name for instance or AG 6183 ServerName *string `json:"serverName,omitempty"` 6184 // IsAutoProtectable - Indicates if protectable item is auto-protectable 6185 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` 6186 // IsAutoProtected - Indicates if protectable item is auto-protected 6187 IsAutoProtected *bool `json:"isAutoProtected,omitempty"` 6188 // Subinquireditemcount - For instance or AG, indicates number of DB's present 6189 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` 6190 // Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected 6191 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` 6192 // Prebackupvalidation - Pre-backup validation for protectable objects 6193 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` 6194 // BackupManagementType - Type of backup management to backup an item. 6195 BackupManagementType *string `json:"backupManagementType,omitempty"` 6196 // WorkloadType - Type of workload for the backup management 6197 WorkloadType *string `json:"workloadType,omitempty"` 6198 // FriendlyName - Friendly name of the backup item. 6199 FriendlyName *string `json:"friendlyName,omitempty"` 6200 // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 6201 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 6202 // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' 6203 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` 6204} 6205 6206// MarshalJSON is the custom marshaler for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. 6207func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) MarshalJSON() ([]byte, error) { 6208 avwsagpi.ProtectableItemType = ProtectableItemTypeSQLAvailabilityGroupContainer 6209 objectMap := make(map[string]interface{}) 6210 if avwsagpi.ParentName != nil { 6211 objectMap["parentName"] = avwsagpi.ParentName 6212 } 6213 if avwsagpi.ParentUniqueName != nil { 6214 objectMap["parentUniqueName"] = avwsagpi.ParentUniqueName 6215 } 6216 if avwsagpi.ServerName != nil { 6217 objectMap["serverName"] = avwsagpi.ServerName 6218 } 6219 if avwsagpi.IsAutoProtectable != nil { 6220 objectMap["isAutoProtectable"] = avwsagpi.IsAutoProtectable 6221 } 6222 if avwsagpi.IsAutoProtected != nil { 6223 objectMap["isAutoProtected"] = avwsagpi.IsAutoProtected 6224 } 6225 if avwsagpi.Subinquireditemcount != nil { 6226 objectMap["subinquireditemcount"] = avwsagpi.Subinquireditemcount 6227 } 6228 if avwsagpi.Subprotectableitemcount != nil { 6229 objectMap["subprotectableitemcount"] = avwsagpi.Subprotectableitemcount 6230 } 6231 if avwsagpi.Prebackupvalidation != nil { 6232 objectMap["prebackupvalidation"] = avwsagpi.Prebackupvalidation 6233 } 6234 if avwsagpi.BackupManagementType != nil { 6235 objectMap["backupManagementType"] = avwsagpi.BackupManagementType 6236 } 6237 if avwsagpi.WorkloadType != nil { 6238 objectMap["workloadType"] = avwsagpi.WorkloadType 6239 } 6240 if avwsagpi.FriendlyName != nil { 6241 objectMap["friendlyName"] = avwsagpi.FriendlyName 6242 } 6243 if avwsagpi.ProtectionState != "" { 6244 objectMap["protectionState"] = avwsagpi.ProtectionState 6245 } 6246 if avwsagpi.ProtectableItemType != "" { 6247 objectMap["protectableItemType"] = avwsagpi.ProtectableItemType 6248 } 6249 return json.Marshal(objectMap) 6250} 6251 6252// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. 6253func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { 6254 return nil, false 6255} 6256 6257// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. 6258func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { 6259 return nil, false 6260} 6261 6262// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. 6263func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { 6264 return nil, false 6265} 6266 6267// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. 6268func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { 6269 return nil, false 6270} 6271 6272// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. 6273func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { 6274 return &avwsagpi, true 6275} 6276 6277// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. 6278func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { 6279 return nil, false 6280} 6281 6282// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. 6283func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { 6284 return nil, false 6285} 6286 6287// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. 6288func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { 6289 return nil, false 6290} 6291 6292// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. 6293func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { 6294 return &avwsagpi, true 6295} 6296 6297// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. 6298func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { 6299 return nil, false 6300} 6301 6302// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. 6303func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { 6304 return nil, false 6305} 6306 6307// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. 6308func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { 6309 return nil, false 6310} 6311 6312// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. 6313func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { 6314 return nil, false 6315} 6316 6317// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. 6318func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { 6319 return nil, false 6320} 6321 6322// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. 6323func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { 6324 return &avwsagpi, true 6325} 6326 6327// AzureVMWorkloadSQLDatabaseProtectableItem azure VM workload-specific protectable item representing SQL 6328// Database. 6329type AzureVMWorkloadSQLDatabaseProtectableItem struct { 6330 // ParentName - Name for instance or AG 6331 ParentName *string `json:"parentName,omitempty"` 6332 // ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent 6333 // Only Applicable for data bases where the parent would be either Instance or a SQL AG. 6334 ParentUniqueName *string `json:"parentUniqueName,omitempty"` 6335 // ServerName - Host/Cluster Name for instance or AG 6336 ServerName *string `json:"serverName,omitempty"` 6337 // IsAutoProtectable - Indicates if protectable item is auto-protectable 6338 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` 6339 // IsAutoProtected - Indicates if protectable item is auto-protected 6340 IsAutoProtected *bool `json:"isAutoProtected,omitempty"` 6341 // Subinquireditemcount - For instance or AG, indicates number of DB's present 6342 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` 6343 // Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected 6344 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` 6345 // Prebackupvalidation - Pre-backup validation for protectable objects 6346 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` 6347 // BackupManagementType - Type of backup management to backup an item. 6348 BackupManagementType *string `json:"backupManagementType,omitempty"` 6349 // WorkloadType - Type of workload for the backup management 6350 WorkloadType *string `json:"workloadType,omitempty"` 6351 // FriendlyName - Friendly name of the backup item. 6352 FriendlyName *string `json:"friendlyName,omitempty"` 6353 // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 6354 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 6355 // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' 6356 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` 6357} 6358 6359// MarshalJSON is the custom marshaler for AzureVMWorkloadSQLDatabaseProtectableItem. 6360func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) MarshalJSON() ([]byte, error) { 6361 avwsdpi.ProtectableItemType = ProtectableItemTypeSQLDataBase 6362 objectMap := make(map[string]interface{}) 6363 if avwsdpi.ParentName != nil { 6364 objectMap["parentName"] = avwsdpi.ParentName 6365 } 6366 if avwsdpi.ParentUniqueName != nil { 6367 objectMap["parentUniqueName"] = avwsdpi.ParentUniqueName 6368 } 6369 if avwsdpi.ServerName != nil { 6370 objectMap["serverName"] = avwsdpi.ServerName 6371 } 6372 if avwsdpi.IsAutoProtectable != nil { 6373 objectMap["isAutoProtectable"] = avwsdpi.IsAutoProtectable 6374 } 6375 if avwsdpi.IsAutoProtected != nil { 6376 objectMap["isAutoProtected"] = avwsdpi.IsAutoProtected 6377 } 6378 if avwsdpi.Subinquireditemcount != nil { 6379 objectMap["subinquireditemcount"] = avwsdpi.Subinquireditemcount 6380 } 6381 if avwsdpi.Subprotectableitemcount != nil { 6382 objectMap["subprotectableitemcount"] = avwsdpi.Subprotectableitemcount 6383 } 6384 if avwsdpi.Prebackupvalidation != nil { 6385 objectMap["prebackupvalidation"] = avwsdpi.Prebackupvalidation 6386 } 6387 if avwsdpi.BackupManagementType != nil { 6388 objectMap["backupManagementType"] = avwsdpi.BackupManagementType 6389 } 6390 if avwsdpi.WorkloadType != nil { 6391 objectMap["workloadType"] = avwsdpi.WorkloadType 6392 } 6393 if avwsdpi.FriendlyName != nil { 6394 objectMap["friendlyName"] = avwsdpi.FriendlyName 6395 } 6396 if avwsdpi.ProtectionState != "" { 6397 objectMap["protectionState"] = avwsdpi.ProtectionState 6398 } 6399 if avwsdpi.ProtectableItemType != "" { 6400 objectMap["protectableItemType"] = avwsdpi.ProtectableItemType 6401 } 6402 return json.Marshal(objectMap) 6403} 6404 6405// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. 6406func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { 6407 return nil, false 6408} 6409 6410// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. 6411func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { 6412 return nil, false 6413} 6414 6415// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. 6416func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { 6417 return nil, false 6418} 6419 6420// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. 6421func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { 6422 return nil, false 6423} 6424 6425// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. 6426func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { 6427 return &avwsdpi, true 6428} 6429 6430// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. 6431func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { 6432 return nil, false 6433} 6434 6435// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. 6436func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { 6437 return nil, false 6438} 6439 6440// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. 6441func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { 6442 return nil, false 6443} 6444 6445// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. 6446func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { 6447 return nil, false 6448} 6449 6450// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. 6451func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { 6452 return &avwsdpi, true 6453} 6454 6455// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. 6456func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { 6457 return nil, false 6458} 6459 6460// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. 6461func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { 6462 return nil, false 6463} 6464 6465// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. 6466func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { 6467 return nil, false 6468} 6469 6470// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. 6471func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { 6472 return nil, false 6473} 6474 6475// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. 6476func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { 6477 return &avwsdpi, true 6478} 6479 6480// AzureVMWorkloadSQLDatabaseProtectedItem azure VM workload-specific protected item representing SQL 6481// Database. 6482type AzureVMWorkloadSQLDatabaseProtectedItem struct { 6483 // FriendlyName - Friendly name of the DB represented by this backup item. 6484 FriendlyName *string `json:"friendlyName,omitempty"` 6485 // ServerName - Host/Cluster Name for instance or AG 6486 ServerName *string `json:"serverName,omitempty"` 6487 // ParentName - Parent name of the DB such as Instance or Availability Group. 6488 ParentName *string `json:"parentName,omitempty"` 6489 // ParentType - Parent type of protected item, example: for a DB, standalone server or distributed 6490 ParentType *string `json:"parentType,omitempty"` 6491 // ProtectionStatus - Backup status of this backup item. 6492 ProtectionStatus *string `json:"protectionStatus,omitempty"` 6493 // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' 6494 ProtectionState ProtectionState `json:"protectionState,omitempty"` 6495 // LastBackupStatus - Last backup operation status. Possible values: Healthy, Unhealthy. Possible values include: 'LastBackupStatusInvalid', 'LastBackupStatusHealthy', 'LastBackupStatusUnhealthy', 'LastBackupStatusIRPending' 6496 LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"` 6497 // LastBackupTime - Timestamp of the last backup operation on this backup item. 6498 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` 6499 // LastBackupErrorDetail - Error details in last backup 6500 LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"` 6501 // ProtectedItemDataSourceID - Data ID of the protected item. 6502 ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"` 6503 // ProtectedItemHealthStatus - Health status of the backup item, evaluated based on last heartbeat received. Possible values include: 'ProtectedItemHealthStatusInvalid', 'ProtectedItemHealthStatusHealthy', 'ProtectedItemHealthStatusUnhealthy', 'ProtectedItemHealthStatusNotReachable', 'ProtectedItemHealthStatusIRPending' 6504 ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"` 6505 // ExtendedInfo - Additional information for this backup item. 6506 ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` 6507 // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 6508 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 6509 // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' 6510 WorkloadType DataSourceType `json:"workloadType,omitempty"` 6511 // ContainerName - Unique name of container 6512 ContainerName *string `json:"containerName,omitempty"` 6513 // SourceResourceID - ARM ID of the resource to be backed up. 6514 SourceResourceID *string `json:"sourceResourceId,omitempty"` 6515 // PolicyID - ID of the backup policy with which this item is backed up. 6516 PolicyID *string `json:"policyId,omitempty"` 6517 // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. 6518 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` 6519 // BackupSetName - Name of the backup set the backup item belongs to 6520 BackupSetName *string `json:"backupSetName,omitempty"` 6521 // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' 6522 CreateMode CreateMode `json:"createMode,omitempty"` 6523 // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC 6524 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` 6525 // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete 6526 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` 6527 // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted 6528 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` 6529 // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon 6530 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` 6531 // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state 6532 IsRehydrate *bool `json:"isRehydrate,omitempty"` 6533 // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' 6534 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` 6535} 6536 6537// MarshalJSON is the custom marshaler for AzureVMWorkloadSQLDatabaseProtectedItem. 6538func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) MarshalJSON() ([]byte, error) { 6539 avwsdpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadSQLDatabase 6540 objectMap := make(map[string]interface{}) 6541 if avwsdpi.FriendlyName != nil { 6542 objectMap["friendlyName"] = avwsdpi.FriendlyName 6543 } 6544 if avwsdpi.ServerName != nil { 6545 objectMap["serverName"] = avwsdpi.ServerName 6546 } 6547 if avwsdpi.ParentName != nil { 6548 objectMap["parentName"] = avwsdpi.ParentName 6549 } 6550 if avwsdpi.ParentType != nil { 6551 objectMap["parentType"] = avwsdpi.ParentType 6552 } 6553 if avwsdpi.ProtectionStatus != nil { 6554 objectMap["protectionStatus"] = avwsdpi.ProtectionStatus 6555 } 6556 if avwsdpi.ProtectionState != "" { 6557 objectMap["protectionState"] = avwsdpi.ProtectionState 6558 } 6559 if avwsdpi.LastBackupStatus != "" { 6560 objectMap["lastBackupStatus"] = avwsdpi.LastBackupStatus 6561 } 6562 if avwsdpi.LastBackupTime != nil { 6563 objectMap["lastBackupTime"] = avwsdpi.LastBackupTime 6564 } 6565 if avwsdpi.LastBackupErrorDetail != nil { 6566 objectMap["lastBackupErrorDetail"] = avwsdpi.LastBackupErrorDetail 6567 } 6568 if avwsdpi.ProtectedItemDataSourceID != nil { 6569 objectMap["protectedItemDataSourceId"] = avwsdpi.ProtectedItemDataSourceID 6570 } 6571 if avwsdpi.ProtectedItemHealthStatus != "" { 6572 objectMap["protectedItemHealthStatus"] = avwsdpi.ProtectedItemHealthStatus 6573 } 6574 if avwsdpi.ExtendedInfo != nil { 6575 objectMap["extendedInfo"] = avwsdpi.ExtendedInfo 6576 } 6577 if avwsdpi.BackupManagementType != "" { 6578 objectMap["backupManagementType"] = avwsdpi.BackupManagementType 6579 } 6580 if avwsdpi.WorkloadType != "" { 6581 objectMap["workloadType"] = avwsdpi.WorkloadType 6582 } 6583 if avwsdpi.ContainerName != nil { 6584 objectMap["containerName"] = avwsdpi.ContainerName 6585 } 6586 if avwsdpi.SourceResourceID != nil { 6587 objectMap["sourceResourceId"] = avwsdpi.SourceResourceID 6588 } 6589 if avwsdpi.PolicyID != nil { 6590 objectMap["policyId"] = avwsdpi.PolicyID 6591 } 6592 if avwsdpi.LastRecoveryPoint != nil { 6593 objectMap["lastRecoveryPoint"] = avwsdpi.LastRecoveryPoint 6594 } 6595 if avwsdpi.BackupSetName != nil { 6596 objectMap["backupSetName"] = avwsdpi.BackupSetName 6597 } 6598 if avwsdpi.CreateMode != "" { 6599 objectMap["createMode"] = avwsdpi.CreateMode 6600 } 6601 if avwsdpi.DeferredDeleteTimeInUTC != nil { 6602 objectMap["deferredDeleteTimeInUTC"] = avwsdpi.DeferredDeleteTimeInUTC 6603 } 6604 if avwsdpi.IsScheduledForDeferredDelete != nil { 6605 objectMap["isScheduledForDeferredDelete"] = avwsdpi.IsScheduledForDeferredDelete 6606 } 6607 if avwsdpi.DeferredDeleteTimeRemaining != nil { 6608 objectMap["deferredDeleteTimeRemaining"] = avwsdpi.DeferredDeleteTimeRemaining 6609 } 6610 if avwsdpi.IsDeferredDeleteScheduleUpcoming != nil { 6611 objectMap["isDeferredDeleteScheduleUpcoming"] = avwsdpi.IsDeferredDeleteScheduleUpcoming 6612 } 6613 if avwsdpi.IsRehydrate != nil { 6614 objectMap["isRehydrate"] = avwsdpi.IsRehydrate 6615 } 6616 if avwsdpi.ProtectedItemType != "" { 6617 objectMap["protectedItemType"] = avwsdpi.ProtectedItemType 6618 } 6619 return json.Marshal(objectMap) 6620} 6621 6622// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. 6623func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { 6624 return nil, false 6625} 6626 6627// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. 6628func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { 6629 return nil, false 6630} 6631 6632// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. 6633func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { 6634 return nil, false 6635} 6636 6637// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. 6638func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { 6639 return nil, false 6640} 6641 6642// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. 6643func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { 6644 return nil, false 6645} 6646 6647// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. 6648func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { 6649 return nil, false 6650} 6651 6652// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. 6653func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { 6654 return nil, false 6655} 6656 6657// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. 6658func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { 6659 return &avwsdpi, true 6660} 6661 6662// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. 6663func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { 6664 return nil, false 6665} 6666 6667// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. 6668func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { 6669 return nil, false 6670} 6671 6672// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. 6673func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { 6674 return &avwsdpi, true 6675} 6676 6677// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. 6678func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { 6679 return nil, false 6680} 6681 6682// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. 6683func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { 6684 return nil, false 6685} 6686 6687// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. 6688func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { 6689 return nil, false 6690} 6691 6692// AsProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. 6693func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { 6694 return nil, false 6695} 6696 6697// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. 6698func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { 6699 return &avwsdpi, true 6700} 6701 6702// AzureVMWorkloadSQLDatabaseWorkloadItem azure VM workload-specific workload item representing SQL 6703// Database. 6704type AzureVMWorkloadSQLDatabaseWorkloadItem struct { 6705 // ParentName - Name for instance or AG 6706 ParentName *string `json:"parentName,omitempty"` 6707 // ServerName - Host/Cluster Name for instance or AG 6708 ServerName *string `json:"serverName,omitempty"` 6709 // IsAutoProtectable - Indicates if workload item is auto-protectable 6710 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` 6711 // Subinquireditemcount - For instance or AG, indicates number of DB's present 6712 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` 6713 // SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected 6714 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` 6715 // BackupManagementType - Type of backup management to backup an item. 6716 BackupManagementType *string `json:"backupManagementType,omitempty"` 6717 // WorkloadType - Type of workload for the backup management 6718 WorkloadType *string `json:"workloadType,omitempty"` 6719 // FriendlyName - Friendly name of the backup item. 6720 FriendlyName *string `json:"friendlyName,omitempty"` 6721 // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 6722 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 6723 // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' 6724 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` 6725} 6726 6727// MarshalJSON is the custom marshaler for AzureVMWorkloadSQLDatabaseWorkloadItem. 6728func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { 6729 avwsdwi.WorkloadItemType = WorkloadItemTypeSQLDataBase1 6730 objectMap := make(map[string]interface{}) 6731 if avwsdwi.ParentName != nil { 6732 objectMap["parentName"] = avwsdwi.ParentName 6733 } 6734 if avwsdwi.ServerName != nil { 6735 objectMap["serverName"] = avwsdwi.ServerName 6736 } 6737 if avwsdwi.IsAutoProtectable != nil { 6738 objectMap["isAutoProtectable"] = avwsdwi.IsAutoProtectable 6739 } 6740 if avwsdwi.Subinquireditemcount != nil { 6741 objectMap["subinquireditemcount"] = avwsdwi.Subinquireditemcount 6742 } 6743 if avwsdwi.SubWorkloadItemCount != nil { 6744 objectMap["subWorkloadItemCount"] = avwsdwi.SubWorkloadItemCount 6745 } 6746 if avwsdwi.BackupManagementType != nil { 6747 objectMap["backupManagementType"] = avwsdwi.BackupManagementType 6748 } 6749 if avwsdwi.WorkloadType != nil { 6750 objectMap["workloadType"] = avwsdwi.WorkloadType 6751 } 6752 if avwsdwi.FriendlyName != nil { 6753 objectMap["friendlyName"] = avwsdwi.FriendlyName 6754 } 6755 if avwsdwi.ProtectionState != "" { 6756 objectMap["protectionState"] = avwsdwi.ProtectionState 6757 } 6758 if avwsdwi.WorkloadItemType != "" { 6759 objectMap["workloadItemType"] = avwsdwi.WorkloadItemType 6760 } 6761 return json.Marshal(objectMap) 6762} 6763 6764// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. 6765func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { 6766 return nil, false 6767} 6768 6769// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. 6770func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { 6771 return &avwsdwi, true 6772} 6773 6774// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. 6775func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { 6776 return nil, false 6777} 6778 6779// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. 6780func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { 6781 return nil, false 6782} 6783 6784// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. 6785func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { 6786 return nil, false 6787} 6788 6789// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. 6790func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { 6791 return nil, false 6792} 6793 6794// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. 6795func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { 6796 return &avwsdwi, true 6797} 6798 6799// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. 6800func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { 6801 return nil, false 6802} 6803 6804// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. 6805func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { 6806 return nil, false 6807} 6808 6809// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. 6810func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { 6811 return &avwsdwi, true 6812} 6813 6814// AzureVMWorkloadSQLInstanceProtectableItem azure VM workload-specific protectable item representing SQL 6815// Instance. 6816type AzureVMWorkloadSQLInstanceProtectableItem struct { 6817 // ParentName - Name for instance or AG 6818 ParentName *string `json:"parentName,omitempty"` 6819 // ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent 6820 // Only Applicable for data bases where the parent would be either Instance or a SQL AG. 6821 ParentUniqueName *string `json:"parentUniqueName,omitempty"` 6822 // ServerName - Host/Cluster Name for instance or AG 6823 ServerName *string `json:"serverName,omitempty"` 6824 // IsAutoProtectable - Indicates if protectable item is auto-protectable 6825 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` 6826 // IsAutoProtected - Indicates if protectable item is auto-protected 6827 IsAutoProtected *bool `json:"isAutoProtected,omitempty"` 6828 // Subinquireditemcount - For instance or AG, indicates number of DB's present 6829 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` 6830 // Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected 6831 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` 6832 // Prebackupvalidation - Pre-backup validation for protectable objects 6833 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` 6834 // BackupManagementType - Type of backup management to backup an item. 6835 BackupManagementType *string `json:"backupManagementType,omitempty"` 6836 // WorkloadType - Type of workload for the backup management 6837 WorkloadType *string `json:"workloadType,omitempty"` 6838 // FriendlyName - Friendly name of the backup item. 6839 FriendlyName *string `json:"friendlyName,omitempty"` 6840 // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 6841 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 6842 // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' 6843 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` 6844} 6845 6846// MarshalJSON is the custom marshaler for AzureVMWorkloadSQLInstanceProtectableItem. 6847func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) MarshalJSON() ([]byte, error) { 6848 avwsipi.ProtectableItemType = ProtectableItemTypeSQLInstance 6849 objectMap := make(map[string]interface{}) 6850 if avwsipi.ParentName != nil { 6851 objectMap["parentName"] = avwsipi.ParentName 6852 } 6853 if avwsipi.ParentUniqueName != nil { 6854 objectMap["parentUniqueName"] = avwsipi.ParentUniqueName 6855 } 6856 if avwsipi.ServerName != nil { 6857 objectMap["serverName"] = avwsipi.ServerName 6858 } 6859 if avwsipi.IsAutoProtectable != nil { 6860 objectMap["isAutoProtectable"] = avwsipi.IsAutoProtectable 6861 } 6862 if avwsipi.IsAutoProtected != nil { 6863 objectMap["isAutoProtected"] = avwsipi.IsAutoProtected 6864 } 6865 if avwsipi.Subinquireditemcount != nil { 6866 objectMap["subinquireditemcount"] = avwsipi.Subinquireditemcount 6867 } 6868 if avwsipi.Subprotectableitemcount != nil { 6869 objectMap["subprotectableitemcount"] = avwsipi.Subprotectableitemcount 6870 } 6871 if avwsipi.Prebackupvalidation != nil { 6872 objectMap["prebackupvalidation"] = avwsipi.Prebackupvalidation 6873 } 6874 if avwsipi.BackupManagementType != nil { 6875 objectMap["backupManagementType"] = avwsipi.BackupManagementType 6876 } 6877 if avwsipi.WorkloadType != nil { 6878 objectMap["workloadType"] = avwsipi.WorkloadType 6879 } 6880 if avwsipi.FriendlyName != nil { 6881 objectMap["friendlyName"] = avwsipi.FriendlyName 6882 } 6883 if avwsipi.ProtectionState != "" { 6884 objectMap["protectionState"] = avwsipi.ProtectionState 6885 } 6886 if avwsipi.ProtectableItemType != "" { 6887 objectMap["protectableItemType"] = avwsipi.ProtectableItemType 6888 } 6889 return json.Marshal(objectMap) 6890} 6891 6892// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. 6893func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { 6894 return nil, false 6895} 6896 6897// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. 6898func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { 6899 return nil, false 6900} 6901 6902// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. 6903func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { 6904 return nil, false 6905} 6906 6907// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. 6908func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { 6909 return nil, false 6910} 6911 6912// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. 6913func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { 6914 return &avwsipi, true 6915} 6916 6917// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. 6918func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { 6919 return nil, false 6920} 6921 6922// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. 6923func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { 6924 return nil, false 6925} 6926 6927// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. 6928func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { 6929 return nil, false 6930} 6931 6932// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. 6933func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { 6934 return nil, false 6935} 6936 6937// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. 6938func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { 6939 return nil, false 6940} 6941 6942// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. 6943func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { 6944 return &avwsipi, true 6945} 6946 6947// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. 6948func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { 6949 return nil, false 6950} 6951 6952// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. 6953func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { 6954 return nil, false 6955} 6956 6957// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. 6958func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { 6959 return nil, false 6960} 6961 6962// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. 6963func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { 6964 return &avwsipi, true 6965} 6966 6967// AzureVMWorkloadSQLInstanceWorkloadItem azure VM workload-specific workload item representing SQL 6968// Instance. 6969type AzureVMWorkloadSQLInstanceWorkloadItem struct { 6970 // DataDirectoryPaths - Data Directory Paths for default directories 6971 DataDirectoryPaths *[]SQLDataDirectory `json:"dataDirectoryPaths,omitempty"` 6972 // ParentName - Name for instance or AG 6973 ParentName *string `json:"parentName,omitempty"` 6974 // ServerName - Host/Cluster Name for instance or AG 6975 ServerName *string `json:"serverName,omitempty"` 6976 // IsAutoProtectable - Indicates if workload item is auto-protectable 6977 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` 6978 // Subinquireditemcount - For instance or AG, indicates number of DB's present 6979 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` 6980 // SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected 6981 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` 6982 // BackupManagementType - Type of backup management to backup an item. 6983 BackupManagementType *string `json:"backupManagementType,omitempty"` 6984 // WorkloadType - Type of workload for the backup management 6985 WorkloadType *string `json:"workloadType,omitempty"` 6986 // FriendlyName - Friendly name of the backup item. 6987 FriendlyName *string `json:"friendlyName,omitempty"` 6988 // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 6989 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 6990 // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' 6991 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` 6992} 6993 6994// MarshalJSON is the custom marshaler for AzureVMWorkloadSQLInstanceWorkloadItem. 6995func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) MarshalJSON() ([]byte, error) { 6996 avwsiwi.WorkloadItemType = WorkloadItemTypeSQLInstance1 6997 objectMap := make(map[string]interface{}) 6998 if avwsiwi.DataDirectoryPaths != nil { 6999 objectMap["dataDirectoryPaths"] = avwsiwi.DataDirectoryPaths 7000 } 7001 if avwsiwi.ParentName != nil { 7002 objectMap["parentName"] = avwsiwi.ParentName 7003 } 7004 if avwsiwi.ServerName != nil { 7005 objectMap["serverName"] = avwsiwi.ServerName 7006 } 7007 if avwsiwi.IsAutoProtectable != nil { 7008 objectMap["isAutoProtectable"] = avwsiwi.IsAutoProtectable 7009 } 7010 if avwsiwi.Subinquireditemcount != nil { 7011 objectMap["subinquireditemcount"] = avwsiwi.Subinquireditemcount 7012 } 7013 if avwsiwi.SubWorkloadItemCount != nil { 7014 objectMap["subWorkloadItemCount"] = avwsiwi.SubWorkloadItemCount 7015 } 7016 if avwsiwi.BackupManagementType != nil { 7017 objectMap["backupManagementType"] = avwsiwi.BackupManagementType 7018 } 7019 if avwsiwi.WorkloadType != nil { 7020 objectMap["workloadType"] = avwsiwi.WorkloadType 7021 } 7022 if avwsiwi.FriendlyName != nil { 7023 objectMap["friendlyName"] = avwsiwi.FriendlyName 7024 } 7025 if avwsiwi.ProtectionState != "" { 7026 objectMap["protectionState"] = avwsiwi.ProtectionState 7027 } 7028 if avwsiwi.WorkloadItemType != "" { 7029 objectMap["workloadItemType"] = avwsiwi.WorkloadItemType 7030 } 7031 return json.Marshal(objectMap) 7032} 7033 7034// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. 7035func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { 7036 return nil, false 7037} 7038 7039// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. 7040func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { 7041 return &avwsiwi, true 7042} 7043 7044// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. 7045func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { 7046 return nil, false 7047} 7048 7049// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. 7050func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { 7051 return nil, false 7052} 7053 7054// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. 7055func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { 7056 return nil, false 7057} 7058 7059// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. 7060func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { 7061 return nil, false 7062} 7063 7064// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. 7065func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { 7066 return nil, false 7067} 7068 7069// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. 7070func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { 7071 return &avwsiwi, true 7072} 7073 7074// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. 7075func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { 7076 return nil, false 7077} 7078 7079// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. 7080func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { 7081 return &avwsiwi, true 7082} 7083 7084// BasicAzureWorkloadAutoProtectionIntent azure Recovery Services Vault specific protection intent item. 7085type BasicAzureWorkloadAutoProtectionIntent interface { 7086 AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) 7087 AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) 7088} 7089 7090// AzureWorkloadAutoProtectionIntent azure Recovery Services Vault specific protection intent item. 7091type AzureWorkloadAutoProtectionIntent struct { 7092 // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 7093 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 7094 // SourceResourceID - ARM ID of the resource to be backed up. 7095 SourceResourceID *string `json:"sourceResourceId,omitempty"` 7096 // ItemID - ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId 7097 ItemID *string `json:"itemId,omitempty"` 7098 // PolicyID - ID of the backup policy with which this item is backed up. 7099 PolicyID *string `json:"policyId,omitempty"` 7100 // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 7101 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 7102 // ProtectionIntentItemType - Possible values include: 'ProtectionIntentItemTypeProtectionIntent', 'ProtectionIntentItemTypeRecoveryServiceVaultItem', 'ProtectionIntentItemTypeAzureResourceItem', 'ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent', 'ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent' 7103 ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"` 7104} 7105 7106func unmarshalBasicAzureWorkloadAutoProtectionIntent(body []byte) (BasicAzureWorkloadAutoProtectionIntent, error) { 7107 var m map[string]interface{} 7108 err := json.Unmarshal(body, &m) 7109 if err != nil { 7110 return nil, err 7111 } 7112 7113 switch m["protectionIntentItemType"] { 7114 case string(ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent): 7115 var awsapi AzureWorkloadSQLAutoProtectionIntent 7116 err := json.Unmarshal(body, &awsapi) 7117 return awsapi, err 7118 default: 7119 var awapi AzureWorkloadAutoProtectionIntent 7120 err := json.Unmarshal(body, &awapi) 7121 return awapi, err 7122 } 7123} 7124func unmarshalBasicAzureWorkloadAutoProtectionIntentArray(body []byte) ([]BasicAzureWorkloadAutoProtectionIntent, error) { 7125 var rawMessages []*json.RawMessage 7126 err := json.Unmarshal(body, &rawMessages) 7127 if err != nil { 7128 return nil, err 7129 } 7130 7131 awapiArray := make([]BasicAzureWorkloadAutoProtectionIntent, len(rawMessages)) 7132 7133 for index, rawMessage := range rawMessages { 7134 awapi, err := unmarshalBasicAzureWorkloadAutoProtectionIntent(*rawMessage) 7135 if err != nil { 7136 return nil, err 7137 } 7138 awapiArray[index] = awapi 7139 } 7140 return awapiArray, nil 7141} 7142 7143// MarshalJSON is the custom marshaler for AzureWorkloadAutoProtectionIntent. 7144func (awapi AzureWorkloadAutoProtectionIntent) MarshalJSON() ([]byte, error) { 7145 awapi.ProtectionIntentItemType = ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent 7146 objectMap := make(map[string]interface{}) 7147 if awapi.BackupManagementType != "" { 7148 objectMap["backupManagementType"] = awapi.BackupManagementType 7149 } 7150 if awapi.SourceResourceID != nil { 7151 objectMap["sourceResourceId"] = awapi.SourceResourceID 7152 } 7153 if awapi.ItemID != nil { 7154 objectMap["itemId"] = awapi.ItemID 7155 } 7156 if awapi.PolicyID != nil { 7157 objectMap["policyId"] = awapi.PolicyID 7158 } 7159 if awapi.ProtectionState != "" { 7160 objectMap["protectionState"] = awapi.ProtectionState 7161 } 7162 if awapi.ProtectionIntentItemType != "" { 7163 objectMap["protectionIntentItemType"] = awapi.ProtectionIntentItemType 7164 } 7165 return json.Marshal(objectMap) 7166} 7167 7168// AsAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. 7169func (awapi AzureWorkloadAutoProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) { 7170 return nil, false 7171} 7172 7173// AsBasicAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. 7174func (awapi AzureWorkloadAutoProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) { 7175 return &awapi, true 7176} 7177 7178// AsAzureResourceProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. 7179func (awapi AzureWorkloadAutoProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) { 7180 return nil, false 7181} 7182 7183// AsAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. 7184func (awapi AzureWorkloadAutoProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) { 7185 return &awapi, true 7186} 7187 7188// AsBasicAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. 7189func (awapi AzureWorkloadAutoProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) { 7190 return &awapi, true 7191} 7192 7193// AsAzureWorkloadSQLAutoProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. 7194func (awapi AzureWorkloadAutoProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) { 7195 return nil, false 7196} 7197 7198// AsProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. 7199func (awapi AzureWorkloadAutoProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) { 7200 return nil, false 7201} 7202 7203// AsBasicProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. 7204func (awapi AzureWorkloadAutoProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) { 7205 return &awapi, true 7206} 7207 7208// AzureWorkloadBackupRequest azureWorkload workload-specific backup request. 7209type AzureWorkloadBackupRequest struct { 7210 // BackupType - Type of backup, viz. Full, Differential, Log or CopyOnlyFull. Possible values include: 'TypeEnumInvalid', 'TypeEnumFull', 'TypeEnumDifferential', 'TypeEnumLog', 'TypeEnumCopyOnlyFull' 7211 BackupType TypeEnum `json:"backupType,omitempty"` 7212 // EnableCompression - Bool for Compression setting 7213 EnableCompression *bool `json:"enableCompression,omitempty"` 7214 // RecoveryPointExpiryTimeInUTC - Backup copy will expire after the time specified (UTC). 7215 RecoveryPointExpiryTimeInUTC *date.Time `json:"recoveryPointExpiryTimeInUTC,omitempty"` 7216 // ObjectType - Possible values include: 'ObjectTypeBackupRequest', 'ObjectTypeAzureFileShareBackupRequest', 'ObjectTypeAzureWorkloadBackupRequest', 'ObjectTypeIaasVMBackupRequest' 7217 ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"` 7218} 7219 7220// MarshalJSON is the custom marshaler for AzureWorkloadBackupRequest. 7221func (awbr AzureWorkloadBackupRequest) MarshalJSON() ([]byte, error) { 7222 awbr.ObjectType = ObjectTypeAzureWorkloadBackupRequest 7223 objectMap := make(map[string]interface{}) 7224 if awbr.BackupType != "" { 7225 objectMap["backupType"] = awbr.BackupType 7226 } 7227 if awbr.EnableCompression != nil { 7228 objectMap["enableCompression"] = awbr.EnableCompression 7229 } 7230 if awbr.RecoveryPointExpiryTimeInUTC != nil { 7231 objectMap["recoveryPointExpiryTimeInUTC"] = awbr.RecoveryPointExpiryTimeInUTC 7232 } 7233 if awbr.ObjectType != "" { 7234 objectMap["objectType"] = awbr.ObjectType 7235 } 7236 return json.Marshal(objectMap) 7237} 7238 7239// AsAzureFileShareBackupRequest is the BasicRequest implementation for AzureWorkloadBackupRequest. 7240func (awbr AzureWorkloadBackupRequest) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) { 7241 return nil, false 7242} 7243 7244// AsAzureWorkloadBackupRequest is the BasicRequest implementation for AzureWorkloadBackupRequest. 7245func (awbr AzureWorkloadBackupRequest) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) { 7246 return &awbr, true 7247} 7248 7249// AsIaasVMBackupRequest is the BasicRequest implementation for AzureWorkloadBackupRequest. 7250func (awbr AzureWorkloadBackupRequest) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) { 7251 return nil, false 7252} 7253 7254// AsRequest is the BasicRequest implementation for AzureWorkloadBackupRequest. 7255func (awbr AzureWorkloadBackupRequest) AsRequest() (*Request, bool) { 7256 return nil, false 7257} 7258 7259// AsBasicRequest is the BasicRequest implementation for AzureWorkloadBackupRequest. 7260func (awbr AzureWorkloadBackupRequest) AsBasicRequest() (BasicRequest, bool) { 7261 return &awbr, true 7262} 7263 7264// BasicAzureWorkloadContainer container for the workloads running inside Azure Compute or Classic Compute. 7265type BasicAzureWorkloadContainer interface { 7266 AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) 7267 AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) 7268 AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) 7269} 7270 7271// AzureWorkloadContainer container for the workloads running inside Azure Compute or Classic Compute. 7272type AzureWorkloadContainer struct { 7273 // SourceResourceID - ARM ID of the virtual machine represented by this Azure Workload Container 7274 SourceResourceID *string `json:"sourceResourceId,omitempty"` 7275 // LastUpdatedTime - Time stamp when this container was updated. 7276 LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"` 7277 // ExtendedInfo - Additional details of a workload container. 7278 ExtendedInfo *AzureWorkloadContainerExtendedInfo `json:"extendedInfo,omitempty"` 7279 // WorkloadType - Workload type for which registration was sent. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' 7280 WorkloadType WorkloadType `json:"workloadType,omitempty"` 7281 // OperationType - Re-Do Operation. Possible values include: 'OperationTypeInvalid', 'OperationTypeRegister', 'OperationTypeReregister' 7282 OperationType OperationType `json:"operationType,omitempty"` 7283 // FriendlyName - Friendly name of the container. 7284 FriendlyName *string `json:"friendlyName,omitempty"` 7285 // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 7286 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 7287 // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. 7288 RegistrationStatus *string `json:"registrationStatus,omitempty"` 7289 // HealthStatus - Status of health of the container. 7290 HealthStatus *string `json:"healthStatus,omitempty"` 7291 // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' 7292 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` 7293} 7294 7295func unmarshalBasicAzureWorkloadContainer(body []byte) (BasicAzureWorkloadContainer, error) { 7296 var m map[string]interface{} 7297 err := json.Unmarshal(body, &m) 7298 if err != nil { 7299 return nil, err 7300 } 7301 7302 switch m["containerType"] { 7303 case string(ContainerTypeSQLAGWorkLoadContainer1): 7304 var aswcpc AzureSQLAGWorkloadContainerProtectionContainer 7305 err := json.Unmarshal(body, &aswcpc) 7306 return aswcpc, err 7307 case string(ContainerTypeVMAppContainer1): 7308 var avacpc AzureVMAppContainerProtectionContainer 7309 err := json.Unmarshal(body, &avacpc) 7310 return avacpc, err 7311 default: 7312 var awc AzureWorkloadContainer 7313 err := json.Unmarshal(body, &awc) 7314 return awc, err 7315 } 7316} 7317func unmarshalBasicAzureWorkloadContainerArray(body []byte) ([]BasicAzureWorkloadContainer, error) { 7318 var rawMessages []*json.RawMessage 7319 err := json.Unmarshal(body, &rawMessages) 7320 if err != nil { 7321 return nil, err 7322 } 7323 7324 awcArray := make([]BasicAzureWorkloadContainer, len(rawMessages)) 7325 7326 for index, rawMessage := range rawMessages { 7327 awc, err := unmarshalBasicAzureWorkloadContainer(*rawMessage) 7328 if err != nil { 7329 return nil, err 7330 } 7331 awcArray[index] = awc 7332 } 7333 return awcArray, nil 7334} 7335 7336// MarshalJSON is the custom marshaler for AzureWorkloadContainer. 7337func (awc AzureWorkloadContainer) MarshalJSON() ([]byte, error) { 7338 awc.ContainerType = ContainerTypeAzureWorkloadContainer 7339 objectMap := make(map[string]interface{}) 7340 if awc.SourceResourceID != nil { 7341 objectMap["sourceResourceId"] = awc.SourceResourceID 7342 } 7343 if awc.LastUpdatedTime != nil { 7344 objectMap["lastUpdatedTime"] = awc.LastUpdatedTime 7345 } 7346 if awc.ExtendedInfo != nil { 7347 objectMap["extendedInfo"] = awc.ExtendedInfo 7348 } 7349 if awc.WorkloadType != "" { 7350 objectMap["workloadType"] = awc.WorkloadType 7351 } 7352 if awc.OperationType != "" { 7353 objectMap["operationType"] = awc.OperationType 7354 } 7355 if awc.FriendlyName != nil { 7356 objectMap["friendlyName"] = awc.FriendlyName 7357 } 7358 if awc.BackupManagementType != "" { 7359 objectMap["backupManagementType"] = awc.BackupManagementType 7360 } 7361 if awc.RegistrationStatus != nil { 7362 objectMap["registrationStatus"] = awc.RegistrationStatus 7363 } 7364 if awc.HealthStatus != nil { 7365 objectMap["healthStatus"] = awc.HealthStatus 7366 } 7367 if awc.ContainerType != "" { 7368 objectMap["containerType"] = awc.ContainerType 7369 } 7370 return json.Marshal(objectMap) 7371} 7372 7373// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. 7374func (awc AzureWorkloadContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { 7375 return nil, false 7376} 7377 7378// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. 7379func (awc AzureWorkloadContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { 7380 return nil, false 7381} 7382 7383// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. 7384func (awc AzureWorkloadContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { 7385 return nil, false 7386} 7387 7388// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. 7389func (awc AzureWorkloadContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { 7390 return nil, false 7391} 7392 7393// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. 7394func (awc AzureWorkloadContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { 7395 return nil, false 7396} 7397 7398// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. 7399func (awc AzureWorkloadContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { 7400 return nil, false 7401} 7402 7403// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. 7404func (awc AzureWorkloadContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { 7405 return nil, false 7406} 7407 7408// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. 7409func (awc AzureWorkloadContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { 7410 return &awc, true 7411} 7412 7413// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. 7414func (awc AzureWorkloadContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { 7415 return &awc, true 7416} 7417 7418// AsDpmContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. 7419func (awc AzureWorkloadContainer) AsDpmContainer() (*DpmContainer, bool) { 7420 return nil, false 7421} 7422 7423// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. 7424func (awc AzureWorkloadContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { 7425 return nil, false 7426} 7427 7428// AsGenericContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. 7429func (awc AzureWorkloadContainer) AsGenericContainer() (*GenericContainer, bool) { 7430 return nil, false 7431} 7432 7433// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. 7434func (awc AzureWorkloadContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { 7435 return nil, false 7436} 7437 7438// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. 7439func (awc AzureWorkloadContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { 7440 return nil, false 7441} 7442 7443// AsMabContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. 7444func (awc AzureWorkloadContainer) AsMabContainer() (*MabContainer, bool) { 7445 return nil, false 7446} 7447 7448// AsProtectionContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. 7449func (awc AzureWorkloadContainer) AsProtectionContainer() (*ProtectionContainer, bool) { 7450 return nil, false 7451} 7452 7453// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. 7454func (awc AzureWorkloadContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { 7455 return &awc, true 7456} 7457 7458// AzureWorkloadContainerExtendedInfo extended information of the container. 7459type AzureWorkloadContainerExtendedInfo struct { 7460 // HostServerName - Host Os Name in case of Stand Alone and Cluster Name in case of distributed container. 7461 HostServerName *string `json:"hostServerName,omitempty"` 7462 // InquiryInfo - Inquiry Status for the container. 7463 InquiryInfo *InquiryInfo `json:"inquiryInfo,omitempty"` 7464 // NodesList - List of the nodes in case of distributed container. 7465 NodesList *[]DistributedNodesInfo `json:"nodesList,omitempty"` 7466} 7467 7468// AzureWorkloadErrorInfo azure storage specific error information 7469type AzureWorkloadErrorInfo struct { 7470 // ErrorCode - Error code. 7471 ErrorCode *int32 `json:"errorCode,omitempty"` 7472 // ErrorString - Localized error string. 7473 ErrorString *string `json:"errorString,omitempty"` 7474 // ErrorTitle - Title: Typically, the entity that the error pertains to. 7475 ErrorTitle *string `json:"errorTitle,omitempty"` 7476 // Recommendations - List of localized recommendations for above error code. 7477 Recommendations *[]string `json:"recommendations,omitempty"` 7478 // AdditionalDetails - Additional details for above error code. 7479 AdditionalDetails *string `json:"additionalDetails,omitempty"` 7480} 7481 7482// AzureWorkloadJob azure storage specific job. 7483type AzureWorkloadJob struct { 7484 // WorkloadType - Workload type of the job 7485 WorkloadType *string `json:"workloadType,omitempty"` 7486 // Duration - Time elapsed during the execution of this job. 7487 Duration *string `json:"duration,omitempty"` 7488 // ActionsInfo - Gets or sets the state/actions applicable on this job like cancel/retry. 7489 ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"` 7490 // ErrorDetails - Error details on execution of this job. 7491 ErrorDetails *[]AzureWorkloadErrorInfo `json:"errorDetails,omitempty"` 7492 // ExtendedInfo - Additional information about the job. 7493 ExtendedInfo *AzureWorkloadJobExtendedInfo `json:"extendedInfo,omitempty"` 7494 // EntityFriendlyName - Friendly name of the entity on which the current job is executing. 7495 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` 7496 // BackupManagementType - Backup management type to execute the current job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 7497 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 7498 // Operation - The operation name. 7499 Operation *string `json:"operation,omitempty"` 7500 // Status - Job status. 7501 Status *string `json:"status,omitempty"` 7502 // StartTime - The start time. 7503 StartTime *date.Time `json:"startTime,omitempty"` 7504 // EndTime - The end time. 7505 EndTime *date.Time `json:"endTime,omitempty"` 7506 // ActivityID - ActivityId of job. 7507 ActivityID *string `json:"activityId,omitempty"` 7508 // JobType - Possible values include: 'JobTypeJob', 'JobTypeAzureIaaSVMJob', 'JobTypeAzureStorageJob', 'JobTypeAzureWorkloadJob', 'JobTypeDpmJob', 'JobTypeMabJob' 7509 JobType JobType `json:"jobType,omitempty"` 7510} 7511 7512// MarshalJSON is the custom marshaler for AzureWorkloadJob. 7513func (awj AzureWorkloadJob) MarshalJSON() ([]byte, error) { 7514 awj.JobType = JobTypeAzureWorkloadJob 7515 objectMap := make(map[string]interface{}) 7516 if awj.WorkloadType != nil { 7517 objectMap["workloadType"] = awj.WorkloadType 7518 } 7519 if awj.Duration != nil { 7520 objectMap["duration"] = awj.Duration 7521 } 7522 if awj.ActionsInfo != nil { 7523 objectMap["actionsInfo"] = awj.ActionsInfo 7524 } 7525 if awj.ErrorDetails != nil { 7526 objectMap["errorDetails"] = awj.ErrorDetails 7527 } 7528 if awj.ExtendedInfo != nil { 7529 objectMap["extendedInfo"] = awj.ExtendedInfo 7530 } 7531 if awj.EntityFriendlyName != nil { 7532 objectMap["entityFriendlyName"] = awj.EntityFriendlyName 7533 } 7534 if awj.BackupManagementType != "" { 7535 objectMap["backupManagementType"] = awj.BackupManagementType 7536 } 7537 if awj.Operation != nil { 7538 objectMap["operation"] = awj.Operation 7539 } 7540 if awj.Status != nil { 7541 objectMap["status"] = awj.Status 7542 } 7543 if awj.StartTime != nil { 7544 objectMap["startTime"] = awj.StartTime 7545 } 7546 if awj.EndTime != nil { 7547 objectMap["endTime"] = awj.EndTime 7548 } 7549 if awj.ActivityID != nil { 7550 objectMap["activityId"] = awj.ActivityID 7551 } 7552 if awj.JobType != "" { 7553 objectMap["jobType"] = awj.JobType 7554 } 7555 return json.Marshal(objectMap) 7556} 7557 7558// AsAzureIaaSVMJob is the BasicJob implementation for AzureWorkloadJob. 7559func (awj AzureWorkloadJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) { 7560 return nil, false 7561} 7562 7563// AsAzureStorageJob is the BasicJob implementation for AzureWorkloadJob. 7564func (awj AzureWorkloadJob) AsAzureStorageJob() (*AzureStorageJob, bool) { 7565 return nil, false 7566} 7567 7568// AsAzureWorkloadJob is the BasicJob implementation for AzureWorkloadJob. 7569func (awj AzureWorkloadJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) { 7570 return &awj, true 7571} 7572 7573// AsDpmJob is the BasicJob implementation for AzureWorkloadJob. 7574func (awj AzureWorkloadJob) AsDpmJob() (*DpmJob, bool) { 7575 return nil, false 7576} 7577 7578// AsMabJob is the BasicJob implementation for AzureWorkloadJob. 7579func (awj AzureWorkloadJob) AsMabJob() (*MabJob, bool) { 7580 return nil, false 7581} 7582 7583// AsJob is the BasicJob implementation for AzureWorkloadJob. 7584func (awj AzureWorkloadJob) AsJob() (*Job, bool) { 7585 return nil, false 7586} 7587 7588// AsBasicJob is the BasicJob implementation for AzureWorkloadJob. 7589func (awj AzureWorkloadJob) AsBasicJob() (BasicJob, bool) { 7590 return &awj, true 7591} 7592 7593// AzureWorkloadJobExtendedInfo azure VM workload-specific additional information for job. 7594type AzureWorkloadJobExtendedInfo struct { 7595 // TasksList - List of tasks for this job 7596 TasksList *[]AzureWorkloadJobTaskDetails `json:"tasksList,omitempty"` 7597 // PropertyBag - Job properties. 7598 PropertyBag map[string]*string `json:"propertyBag"` 7599 // DynamicErrorMessage - Non localized error message on job execution. 7600 DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"` 7601} 7602 7603// MarshalJSON is the custom marshaler for AzureWorkloadJobExtendedInfo. 7604func (awjei AzureWorkloadJobExtendedInfo) MarshalJSON() ([]byte, error) { 7605 objectMap := make(map[string]interface{}) 7606 if awjei.TasksList != nil { 7607 objectMap["tasksList"] = awjei.TasksList 7608 } 7609 if awjei.PropertyBag != nil { 7610 objectMap["propertyBag"] = awjei.PropertyBag 7611 } 7612 if awjei.DynamicErrorMessage != nil { 7613 objectMap["dynamicErrorMessage"] = awjei.DynamicErrorMessage 7614 } 7615 return json.Marshal(objectMap) 7616} 7617 7618// AzureWorkloadJobTaskDetails azure VM workload specific job task details. 7619type AzureWorkloadJobTaskDetails struct { 7620 // TaskID - The task display name. 7621 TaskID *string `json:"taskId,omitempty"` 7622 // Status - The status. 7623 Status *string `json:"status,omitempty"` 7624} 7625 7626// BasicAzureWorkloadPointInTimeRecoveryPoint recovery point specific to PointInTime 7627type BasicAzureWorkloadPointInTimeRecoveryPoint interface { 7628 AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) 7629 AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) 7630} 7631 7632// AzureWorkloadPointInTimeRecoveryPoint recovery point specific to PointInTime 7633type AzureWorkloadPointInTimeRecoveryPoint struct { 7634 // TimeRanges - List of log ranges 7635 TimeRanges *[]PointInTimeRange `json:"timeRanges,omitempty"` 7636 // RecoveryPointTimeInUTC - READ-ONLY; UTC time at which recovery point was created 7637 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"` 7638 // Type - READ-ONLY; Type of restore point. Possible values include: 'RestorePointTypeInvalid', 'RestorePointTypeFull', 'RestorePointTypeLog', 'RestorePointTypeDifferential' 7639 Type RestorePointType `json:"type,omitempty"` 7640 // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' 7641 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` 7642} 7643 7644func unmarshalBasicAzureWorkloadPointInTimeRecoveryPoint(body []byte) (BasicAzureWorkloadPointInTimeRecoveryPoint, error) { 7645 var m map[string]interface{} 7646 err := json.Unmarshal(body, &m) 7647 if err != nil { 7648 return nil, err 7649 } 7650 7651 switch m["objectType"] { 7652 case string(ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint): 7653 var awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint 7654 err := json.Unmarshal(body, &awshpitrp) 7655 return awshpitrp, err 7656 default: 7657 var awpitrp AzureWorkloadPointInTimeRecoveryPoint 7658 err := json.Unmarshal(body, &awpitrp) 7659 return awpitrp, err 7660 } 7661} 7662func unmarshalBasicAzureWorkloadPointInTimeRecoveryPointArray(body []byte) ([]BasicAzureWorkloadPointInTimeRecoveryPoint, error) { 7663 var rawMessages []*json.RawMessage 7664 err := json.Unmarshal(body, &rawMessages) 7665 if err != nil { 7666 return nil, err 7667 } 7668 7669 awpitrpArray := make([]BasicAzureWorkloadPointInTimeRecoveryPoint, len(rawMessages)) 7670 7671 for index, rawMessage := range rawMessages { 7672 awpitrp, err := unmarshalBasicAzureWorkloadPointInTimeRecoveryPoint(*rawMessage) 7673 if err != nil { 7674 return nil, err 7675 } 7676 awpitrpArray[index] = awpitrp 7677 } 7678 return awpitrpArray, nil 7679} 7680 7681// MarshalJSON is the custom marshaler for AzureWorkloadPointInTimeRecoveryPoint. 7682func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) { 7683 awpitrp.ObjectType = ObjectTypeAzureWorkloadPointInTimeRecoveryPoint 7684 objectMap := make(map[string]interface{}) 7685 if awpitrp.TimeRanges != nil { 7686 objectMap["timeRanges"] = awpitrp.TimeRanges 7687 } 7688 if awpitrp.ObjectType != "" { 7689 objectMap["objectType"] = awpitrp.ObjectType 7690 } 7691 return json.Marshal(objectMap) 7692} 7693 7694// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. 7695func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { 7696 return nil, false 7697} 7698 7699// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. 7700func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { 7701 return &awpitrp, true 7702} 7703 7704// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. 7705func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { 7706 return &awpitrp, true 7707} 7708 7709// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. 7710func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { 7711 return nil, false 7712} 7713 7714// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. 7715func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { 7716 return &awpitrp, true 7717} 7718 7719// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. 7720func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { 7721 return nil, false 7722} 7723 7724// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. 7725func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { 7726 return nil, false 7727} 7728 7729// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. 7730func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { 7731 return nil, false 7732} 7733 7734// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. 7735func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { 7736 return nil, false 7737} 7738 7739// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. 7740func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { 7741 return nil, false 7742} 7743 7744// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. 7745func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { 7746 return nil, false 7747} 7748 7749// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. 7750func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { 7751 return nil, false 7752} 7753 7754// AsRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. 7755func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { 7756 return nil, false 7757} 7758 7759// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. 7760func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { 7761 return &awpitrp, true 7762} 7763 7764// AzureWorkloadPointInTimeRestoreRequest azureWorkload SAP Hana -specific restore. Specifically for 7765// PointInTime/Log restore 7766type AzureWorkloadPointInTimeRestoreRequest struct { 7767 // PointInTime - PointInTime value 7768 PointInTime *date.Time `json:"pointInTime,omitempty"` 7769 // RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline' 7770 RecoveryType RecoveryType `json:"recoveryType,omitempty"` 7771 // SourceResourceID - Fully qualified ARM ID of the VM on which workload that was running is being recovered. 7772 SourceResourceID *string `json:"sourceResourceId,omitempty"` 7773 // PropertyBag - Workload specific property bag. 7774 PropertyBag map[string]*string `json:"propertyBag"` 7775 // TargetInfo - Details of target database 7776 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"` 7777 // RecoveryMode - Defines whether the current recovery mode is file restore or database restore. Possible values include: 'RecoveryModeInvalid', 'RecoveryModeFileRecovery', 'RecoveryModeWorkloadRecovery' 7778 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"` 7779 // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' 7780 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` 7781} 7782 7783// MarshalJSON is the custom marshaler for AzureWorkloadPointInTimeRestoreRequest. 7784func (awpitrr AzureWorkloadPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { 7785 awpitrr.ObjectType = ObjectTypeAzureWorkloadPointInTimeRestoreRequest 7786 objectMap := make(map[string]interface{}) 7787 if awpitrr.PointInTime != nil { 7788 objectMap["pointInTime"] = awpitrr.PointInTime 7789 } 7790 if awpitrr.RecoveryType != "" { 7791 objectMap["recoveryType"] = awpitrr.RecoveryType 7792 } 7793 if awpitrr.SourceResourceID != nil { 7794 objectMap["sourceResourceId"] = awpitrr.SourceResourceID 7795 } 7796 if awpitrr.PropertyBag != nil { 7797 objectMap["propertyBag"] = awpitrr.PropertyBag 7798 } 7799 if awpitrr.TargetInfo != nil { 7800 objectMap["targetInfo"] = awpitrr.TargetInfo 7801 } 7802 if awpitrr.RecoveryMode != "" { 7803 objectMap["recoveryMode"] = awpitrr.RecoveryMode 7804 } 7805 if awpitrr.ObjectType != "" { 7806 objectMap["objectType"] = awpitrr.ObjectType 7807 } 7808 return json.Marshal(objectMap) 7809} 7810 7811// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. 7812func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { 7813 return nil, false 7814} 7815 7816// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. 7817func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { 7818 return &awpitrr, true 7819} 7820 7821// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. 7822func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { 7823 return nil, false 7824} 7825 7826// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. 7827func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { 7828 return &awpitrr, true 7829} 7830 7831// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. 7832func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { 7833 return nil, false 7834} 7835 7836// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. 7837func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { 7838 return nil, false 7839} 7840 7841// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. 7842func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { 7843 return nil, false 7844} 7845 7846// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. 7847func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { 7848 return nil, false 7849} 7850 7851// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. 7852func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { 7853 return nil, false 7854} 7855 7856// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. 7857func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { 7858 return nil, false 7859} 7860 7861// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. 7862func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { 7863 return nil, false 7864} 7865 7866// AsRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. 7867func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { 7868 return nil, false 7869} 7870 7871// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. 7872func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { 7873 return &awpitrr, true 7874} 7875 7876// BasicAzureWorkloadRecoveryPoint workload specific recovery point, specifically encapsulates full/diff recovery point 7877type BasicAzureWorkloadRecoveryPoint interface { 7878 AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) 7879 AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) 7880 AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) 7881 AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) 7882 AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) 7883 AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) 7884 AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) 7885 AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) 7886} 7887 7888// AzureWorkloadRecoveryPoint workload specific recovery point, specifically encapsulates full/diff recovery 7889// point 7890type AzureWorkloadRecoveryPoint struct { 7891 // RecoveryPointTimeInUTC - READ-ONLY; UTC time at which recovery point was created 7892 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"` 7893 // Type - READ-ONLY; Type of restore point. Possible values include: 'RestorePointTypeInvalid', 'RestorePointTypeFull', 'RestorePointTypeLog', 'RestorePointTypeDifferential' 7894 Type RestorePointType `json:"type,omitempty"` 7895 // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' 7896 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` 7897} 7898 7899func unmarshalBasicAzureWorkloadRecoveryPoint(body []byte) (BasicAzureWorkloadRecoveryPoint, error) { 7900 var m map[string]interface{} 7901 err := json.Unmarshal(body, &m) 7902 if err != nil { 7903 return nil, err 7904 } 7905 7906 switch m["objectType"] { 7907 case string(ObjectTypeAzureWorkloadPointInTimeRecoveryPoint): 7908 var awpitrp AzureWorkloadPointInTimeRecoveryPoint 7909 err := json.Unmarshal(body, &awpitrp) 7910 return awpitrp, err 7911 case string(ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint): 7912 var awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint 7913 err := json.Unmarshal(body, &awshpitrp) 7914 return awshpitrp, err 7915 case string(ObjectTypeAzureWorkloadSAPHanaRecoveryPoint): 7916 var awshrp AzureWorkloadSAPHanaRecoveryPoint 7917 err := json.Unmarshal(body, &awshrp) 7918 return awshrp, err 7919 case string(ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint): 7920 var awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint 7921 err := json.Unmarshal(body, &awspitrp) 7922 return awspitrp, err 7923 case string(ObjectTypeAzureWorkloadSQLRecoveryPoint): 7924 var awsrp AzureWorkloadSQLRecoveryPoint 7925 err := json.Unmarshal(body, &awsrp) 7926 return awsrp, err 7927 default: 7928 var awrp AzureWorkloadRecoveryPoint 7929 err := json.Unmarshal(body, &awrp) 7930 return awrp, err 7931 } 7932} 7933func unmarshalBasicAzureWorkloadRecoveryPointArray(body []byte) ([]BasicAzureWorkloadRecoveryPoint, error) { 7934 var rawMessages []*json.RawMessage 7935 err := json.Unmarshal(body, &rawMessages) 7936 if err != nil { 7937 return nil, err 7938 } 7939 7940 awrpArray := make([]BasicAzureWorkloadRecoveryPoint, len(rawMessages)) 7941 7942 for index, rawMessage := range rawMessages { 7943 awrp, err := unmarshalBasicAzureWorkloadRecoveryPoint(*rawMessage) 7944 if err != nil { 7945 return nil, err 7946 } 7947 awrpArray[index] = awrp 7948 } 7949 return awrpArray, nil 7950} 7951 7952// MarshalJSON is the custom marshaler for AzureWorkloadRecoveryPoint. 7953func (awrp AzureWorkloadRecoveryPoint) MarshalJSON() ([]byte, error) { 7954 awrp.ObjectType = ObjectTypeAzureWorkloadRecoveryPoint 7955 objectMap := make(map[string]interface{}) 7956 if awrp.ObjectType != "" { 7957 objectMap["objectType"] = awrp.ObjectType 7958 } 7959 return json.Marshal(objectMap) 7960} 7961 7962// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. 7963func (awrp AzureWorkloadRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { 7964 return nil, false 7965} 7966 7967// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. 7968func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { 7969 return nil, false 7970} 7971 7972// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. 7973func (awrp AzureWorkloadRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { 7974 return nil, false 7975} 7976 7977// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. 7978func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { 7979 return &awrp, true 7980} 7981 7982// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. 7983func (awrp AzureWorkloadRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { 7984 return &awrp, true 7985} 7986 7987// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. 7988func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { 7989 return nil, false 7990} 7991 7992// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. 7993func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { 7994 return nil, false 7995} 7996 7997// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. 7998func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { 7999 return nil, false 8000} 8001 8002// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. 8003func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { 8004 return nil, false 8005} 8006 8007// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. 8008func (awrp AzureWorkloadRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { 8009 return nil, false 8010} 8011 8012// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. 8013func (awrp AzureWorkloadRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { 8014 return nil, false 8015} 8016 8017// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. 8018func (awrp AzureWorkloadRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { 8019 return nil, false 8020} 8021 8022// AsRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. 8023func (awrp AzureWorkloadRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { 8024 return nil, false 8025} 8026 8027// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. 8028func (awrp AzureWorkloadRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { 8029 return &awrp, true 8030} 8031 8032// BasicAzureWorkloadRestoreRequest azureWorkload-specific restore. 8033type BasicAzureWorkloadRestoreRequest interface { 8034 AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) 8035 AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) 8036 AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) 8037 AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) 8038 AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) 8039 AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) 8040 AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) 8041 AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) 8042} 8043 8044// AzureWorkloadRestoreRequest azureWorkload-specific restore. 8045type AzureWorkloadRestoreRequest struct { 8046 // RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline' 8047 RecoveryType RecoveryType `json:"recoveryType,omitempty"` 8048 // SourceResourceID - Fully qualified ARM ID of the VM on which workload that was running is being recovered. 8049 SourceResourceID *string `json:"sourceResourceId,omitempty"` 8050 // PropertyBag - Workload specific property bag. 8051 PropertyBag map[string]*string `json:"propertyBag"` 8052 // TargetInfo - Details of target database 8053 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"` 8054 // RecoveryMode - Defines whether the current recovery mode is file restore or database restore. Possible values include: 'RecoveryModeInvalid', 'RecoveryModeFileRecovery', 'RecoveryModeWorkloadRecovery' 8055 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"` 8056 // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' 8057 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` 8058} 8059 8060func unmarshalBasicAzureWorkloadRestoreRequest(body []byte) (BasicAzureWorkloadRestoreRequest, error) { 8061 var m map[string]interface{} 8062 err := json.Unmarshal(body, &m) 8063 if err != nil { 8064 return nil, err 8065 } 8066 8067 switch m["objectType"] { 8068 case string(ObjectTypeAzureWorkloadPointInTimeRestoreRequest): 8069 var awpitrr AzureWorkloadPointInTimeRestoreRequest 8070 err := json.Unmarshal(body, &awpitrr) 8071 return awpitrr, err 8072 case string(ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest): 8073 var awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest 8074 err := json.Unmarshal(body, &awshpitrr) 8075 return awshpitrr, err 8076 case string(ObjectTypeAzureWorkloadSAPHanaRestoreRequest): 8077 var awshrr AzureWorkloadSAPHanaRestoreRequest 8078 err := json.Unmarshal(body, &awshrr) 8079 return awshrr, err 8080 case string(ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest): 8081 var awspitrr AzureWorkloadSQLPointInTimeRestoreRequest 8082 err := json.Unmarshal(body, &awspitrr) 8083 return awspitrr, err 8084 case string(ObjectTypeAzureWorkloadSQLRestoreRequest): 8085 var awsrr AzureWorkloadSQLRestoreRequest 8086 err := json.Unmarshal(body, &awsrr) 8087 return awsrr, err 8088 default: 8089 var awrr AzureWorkloadRestoreRequest 8090 err := json.Unmarshal(body, &awrr) 8091 return awrr, err 8092 } 8093} 8094func unmarshalBasicAzureWorkloadRestoreRequestArray(body []byte) ([]BasicAzureWorkloadRestoreRequest, error) { 8095 var rawMessages []*json.RawMessage 8096 err := json.Unmarshal(body, &rawMessages) 8097 if err != nil { 8098 return nil, err 8099 } 8100 8101 awrrArray := make([]BasicAzureWorkloadRestoreRequest, len(rawMessages)) 8102 8103 for index, rawMessage := range rawMessages { 8104 awrr, err := unmarshalBasicAzureWorkloadRestoreRequest(*rawMessage) 8105 if err != nil { 8106 return nil, err 8107 } 8108 awrrArray[index] = awrr 8109 } 8110 return awrrArray, nil 8111} 8112 8113// MarshalJSON is the custom marshaler for AzureWorkloadRestoreRequest. 8114func (awrr AzureWorkloadRestoreRequest) MarshalJSON() ([]byte, error) { 8115 awrr.ObjectType = ObjectTypeAzureWorkloadRestoreRequest 8116 objectMap := make(map[string]interface{}) 8117 if awrr.RecoveryType != "" { 8118 objectMap["recoveryType"] = awrr.RecoveryType 8119 } 8120 if awrr.SourceResourceID != nil { 8121 objectMap["sourceResourceId"] = awrr.SourceResourceID 8122 } 8123 if awrr.PropertyBag != nil { 8124 objectMap["propertyBag"] = awrr.PropertyBag 8125 } 8126 if awrr.TargetInfo != nil { 8127 objectMap["targetInfo"] = awrr.TargetInfo 8128 } 8129 if awrr.RecoveryMode != "" { 8130 objectMap["recoveryMode"] = awrr.RecoveryMode 8131 } 8132 if awrr.ObjectType != "" { 8133 objectMap["objectType"] = awrr.ObjectType 8134 } 8135 return json.Marshal(objectMap) 8136} 8137 8138// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. 8139func (awrr AzureWorkloadRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { 8140 return nil, false 8141} 8142 8143// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. 8144func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { 8145 return nil, false 8146} 8147 8148// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. 8149func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { 8150 return &awrr, true 8151} 8152 8153// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. 8154func (awrr AzureWorkloadRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { 8155 return &awrr, true 8156} 8157 8158// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. 8159func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { 8160 return nil, false 8161} 8162 8163// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. 8164func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { 8165 return nil, false 8166} 8167 8168// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. 8169func (awrr AzureWorkloadRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { 8170 return nil, false 8171} 8172 8173// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. 8174func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { 8175 return nil, false 8176} 8177 8178// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. 8179func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { 8180 return nil, false 8181} 8182 8183// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. 8184func (awrr AzureWorkloadRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { 8185 return nil, false 8186} 8187 8188// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. 8189func (awrr AzureWorkloadRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { 8190 return nil, false 8191} 8192 8193// AsRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. 8194func (awrr AzureWorkloadRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { 8195 return nil, false 8196} 8197 8198// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. 8199func (awrr AzureWorkloadRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { 8200 return &awrr, true 8201} 8202 8203// AzureWorkloadSAPHanaPointInTimeRecoveryPoint recovery point specific to PointInTime in SAPHana 8204type AzureWorkloadSAPHanaPointInTimeRecoveryPoint struct { 8205 // TimeRanges - List of log ranges 8206 TimeRanges *[]PointInTimeRange `json:"timeRanges,omitempty"` 8207 // RecoveryPointTimeInUTC - READ-ONLY; UTC time at which recovery point was created 8208 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"` 8209 // Type - READ-ONLY; Type of restore point. Possible values include: 'RestorePointTypeInvalid', 'RestorePointTypeFull', 'RestorePointTypeLog', 'RestorePointTypeDifferential' 8210 Type RestorePointType `json:"type,omitempty"` 8211 // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' 8212 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` 8213} 8214 8215// MarshalJSON is the custom marshaler for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. 8216func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) { 8217 awshpitrp.ObjectType = ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint 8218 objectMap := make(map[string]interface{}) 8219 if awshpitrp.TimeRanges != nil { 8220 objectMap["timeRanges"] = awshpitrp.TimeRanges 8221 } 8222 if awshpitrp.ObjectType != "" { 8223 objectMap["objectType"] = awshpitrp.ObjectType 8224 } 8225 return json.Marshal(objectMap) 8226} 8227 8228// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. 8229func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { 8230 return nil, false 8231} 8232 8233// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. 8234func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { 8235 return nil, false 8236} 8237 8238// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. 8239func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { 8240 return &awshpitrp, true 8241} 8242 8243// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. 8244func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { 8245 return nil, false 8246} 8247 8248// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. 8249func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { 8250 return &awshpitrp, true 8251} 8252 8253// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. 8254func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { 8255 return &awshpitrp, true 8256} 8257 8258// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. 8259func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { 8260 return nil, false 8261} 8262 8263// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. 8264func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { 8265 return nil, false 8266} 8267 8268// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. 8269func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { 8270 return nil, false 8271} 8272 8273// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. 8274func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { 8275 return nil, false 8276} 8277 8278// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. 8279func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { 8280 return nil, false 8281} 8282 8283// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. 8284func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { 8285 return nil, false 8286} 8287 8288// AsRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. 8289func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { 8290 return nil, false 8291} 8292 8293// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. 8294func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { 8295 return &awshpitrp, true 8296} 8297 8298// AzureWorkloadSAPHanaPointInTimeRestoreRequest azureWorkload SAP Hana -specific restore. Specifically for 8299// PointInTime/Log restore 8300type AzureWorkloadSAPHanaPointInTimeRestoreRequest struct { 8301 // PointInTime - PointInTime value 8302 PointInTime *date.Time `json:"pointInTime,omitempty"` 8303 // RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline' 8304 RecoveryType RecoveryType `json:"recoveryType,omitempty"` 8305 // SourceResourceID - Fully qualified ARM ID of the VM on which workload that was running is being recovered. 8306 SourceResourceID *string `json:"sourceResourceId,omitempty"` 8307 // PropertyBag - Workload specific property bag. 8308 PropertyBag map[string]*string `json:"propertyBag"` 8309 // TargetInfo - Details of target database 8310 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"` 8311 // RecoveryMode - Defines whether the current recovery mode is file restore or database restore. Possible values include: 'RecoveryModeInvalid', 'RecoveryModeFileRecovery', 'RecoveryModeWorkloadRecovery' 8312 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"` 8313 // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' 8314 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` 8315} 8316 8317// MarshalJSON is the custom marshaler for AzureWorkloadSAPHanaPointInTimeRestoreRequest. 8318func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { 8319 awshpitrr.ObjectType = ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest 8320 objectMap := make(map[string]interface{}) 8321 if awshpitrr.PointInTime != nil { 8322 objectMap["pointInTime"] = awshpitrr.PointInTime 8323 } 8324 if awshpitrr.RecoveryType != "" { 8325 objectMap["recoveryType"] = awshpitrr.RecoveryType 8326 } 8327 if awshpitrr.SourceResourceID != nil { 8328 objectMap["sourceResourceId"] = awshpitrr.SourceResourceID 8329 } 8330 if awshpitrr.PropertyBag != nil { 8331 objectMap["propertyBag"] = awshpitrr.PropertyBag 8332 } 8333 if awshpitrr.TargetInfo != nil { 8334 objectMap["targetInfo"] = awshpitrr.TargetInfo 8335 } 8336 if awshpitrr.RecoveryMode != "" { 8337 objectMap["recoveryMode"] = awshpitrr.RecoveryMode 8338 } 8339 if awshpitrr.ObjectType != "" { 8340 objectMap["objectType"] = awshpitrr.ObjectType 8341 } 8342 return json.Marshal(objectMap) 8343} 8344 8345// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. 8346func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { 8347 return nil, false 8348} 8349 8350// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. 8351func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { 8352 return nil, false 8353} 8354 8355// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. 8356func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { 8357 return nil, false 8358} 8359 8360// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. 8361func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { 8362 return &awshpitrr, true 8363} 8364 8365// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. 8366func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { 8367 return &awshpitrr, true 8368} 8369 8370// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. 8371func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { 8372 return nil, false 8373} 8374 8375// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. 8376func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { 8377 return &awshpitrr, true 8378} 8379 8380// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. 8381func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { 8382 return nil, false 8383} 8384 8385// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. 8386func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { 8387 return nil, false 8388} 8389 8390// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. 8391func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { 8392 return nil, false 8393} 8394 8395// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. 8396func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { 8397 return nil, false 8398} 8399 8400// AsRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. 8401func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { 8402 return nil, false 8403} 8404 8405// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. 8406func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { 8407 return &awshpitrr, true 8408} 8409 8410// AzureWorkloadSAPHanaRecoveryPoint sAPHana specific recoverypoint, specifically encapsulates full/diff 8411// recoverypoints 8412type AzureWorkloadSAPHanaRecoveryPoint struct { 8413 // RecoveryPointTimeInUTC - READ-ONLY; UTC time at which recovery point was created 8414 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"` 8415 // Type - READ-ONLY; Type of restore point. Possible values include: 'RestorePointTypeInvalid', 'RestorePointTypeFull', 'RestorePointTypeLog', 'RestorePointTypeDifferential' 8416 Type RestorePointType `json:"type,omitempty"` 8417 // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' 8418 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` 8419} 8420 8421// MarshalJSON is the custom marshaler for AzureWorkloadSAPHanaRecoveryPoint. 8422func (awshrp AzureWorkloadSAPHanaRecoveryPoint) MarshalJSON() ([]byte, error) { 8423 awshrp.ObjectType = ObjectTypeAzureWorkloadSAPHanaRecoveryPoint 8424 objectMap := make(map[string]interface{}) 8425 if awshrp.ObjectType != "" { 8426 objectMap["objectType"] = awshrp.ObjectType 8427 } 8428 return json.Marshal(objectMap) 8429} 8430 8431// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. 8432func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { 8433 return nil, false 8434} 8435 8436// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. 8437func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { 8438 return nil, false 8439} 8440 8441// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. 8442func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { 8443 return nil, false 8444} 8445 8446// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. 8447func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { 8448 return nil, false 8449} 8450 8451// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. 8452func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { 8453 return &awshrp, true 8454} 8455 8456// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. 8457func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { 8458 return nil, false 8459} 8460 8461// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. 8462func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { 8463 return &awshrp, true 8464} 8465 8466// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. 8467func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { 8468 return nil, false 8469} 8470 8471// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. 8472func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { 8473 return nil, false 8474} 8475 8476// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. 8477func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { 8478 return nil, false 8479} 8480 8481// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. 8482func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { 8483 return nil, false 8484} 8485 8486// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. 8487func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { 8488 return nil, false 8489} 8490 8491// AsRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. 8492func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { 8493 return nil, false 8494} 8495 8496// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. 8497func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { 8498 return &awshrp, true 8499} 8500 8501// BasicAzureWorkloadSAPHanaRestoreRequest azureWorkload SAP Hana-specific restore. 8502type BasicAzureWorkloadSAPHanaRestoreRequest interface { 8503 AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) 8504 AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) 8505} 8506 8507// AzureWorkloadSAPHanaRestoreRequest azureWorkload SAP Hana-specific restore. 8508type AzureWorkloadSAPHanaRestoreRequest struct { 8509 // RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline' 8510 RecoveryType RecoveryType `json:"recoveryType,omitempty"` 8511 // SourceResourceID - Fully qualified ARM ID of the VM on which workload that was running is being recovered. 8512 SourceResourceID *string `json:"sourceResourceId,omitempty"` 8513 // PropertyBag - Workload specific property bag. 8514 PropertyBag map[string]*string `json:"propertyBag"` 8515 // TargetInfo - Details of target database 8516 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"` 8517 // RecoveryMode - Defines whether the current recovery mode is file restore or database restore. Possible values include: 'RecoveryModeInvalid', 'RecoveryModeFileRecovery', 'RecoveryModeWorkloadRecovery' 8518 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"` 8519 // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' 8520 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` 8521} 8522 8523func unmarshalBasicAzureWorkloadSAPHanaRestoreRequest(body []byte) (BasicAzureWorkloadSAPHanaRestoreRequest, error) { 8524 var m map[string]interface{} 8525 err := json.Unmarshal(body, &m) 8526 if err != nil { 8527 return nil, err 8528 } 8529 8530 switch m["objectType"] { 8531 case string(ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest): 8532 var awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest 8533 err := json.Unmarshal(body, &awshpitrr) 8534 return awshpitrr, err 8535 default: 8536 var awshrr AzureWorkloadSAPHanaRestoreRequest 8537 err := json.Unmarshal(body, &awshrr) 8538 return awshrr, err 8539 } 8540} 8541func unmarshalBasicAzureWorkloadSAPHanaRestoreRequestArray(body []byte) ([]BasicAzureWorkloadSAPHanaRestoreRequest, error) { 8542 var rawMessages []*json.RawMessage 8543 err := json.Unmarshal(body, &rawMessages) 8544 if err != nil { 8545 return nil, err 8546 } 8547 8548 awshrrArray := make([]BasicAzureWorkloadSAPHanaRestoreRequest, len(rawMessages)) 8549 8550 for index, rawMessage := range rawMessages { 8551 awshrr, err := unmarshalBasicAzureWorkloadSAPHanaRestoreRequest(*rawMessage) 8552 if err != nil { 8553 return nil, err 8554 } 8555 awshrrArray[index] = awshrr 8556 } 8557 return awshrrArray, nil 8558} 8559 8560// MarshalJSON is the custom marshaler for AzureWorkloadSAPHanaRestoreRequest. 8561func (awshrr AzureWorkloadSAPHanaRestoreRequest) MarshalJSON() ([]byte, error) { 8562 awshrr.ObjectType = ObjectTypeAzureWorkloadSAPHanaRestoreRequest 8563 objectMap := make(map[string]interface{}) 8564 if awshrr.RecoveryType != "" { 8565 objectMap["recoveryType"] = awshrr.RecoveryType 8566 } 8567 if awshrr.SourceResourceID != nil { 8568 objectMap["sourceResourceId"] = awshrr.SourceResourceID 8569 } 8570 if awshrr.PropertyBag != nil { 8571 objectMap["propertyBag"] = awshrr.PropertyBag 8572 } 8573 if awshrr.TargetInfo != nil { 8574 objectMap["targetInfo"] = awshrr.TargetInfo 8575 } 8576 if awshrr.RecoveryMode != "" { 8577 objectMap["recoveryMode"] = awshrr.RecoveryMode 8578 } 8579 if awshrr.ObjectType != "" { 8580 objectMap["objectType"] = awshrr.ObjectType 8581 } 8582 return json.Marshal(objectMap) 8583} 8584 8585// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. 8586func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { 8587 return nil, false 8588} 8589 8590// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. 8591func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { 8592 return nil, false 8593} 8594 8595// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. 8596func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { 8597 return nil, false 8598} 8599 8600// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. 8601func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { 8602 return &awshrr, true 8603} 8604 8605// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. 8606func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { 8607 return nil, false 8608} 8609 8610// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. 8611func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { 8612 return &awshrr, true 8613} 8614 8615// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. 8616func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { 8617 return &awshrr, true 8618} 8619 8620// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. 8621func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { 8622 return nil, false 8623} 8624 8625// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. 8626func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { 8627 return nil, false 8628} 8629 8630// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. 8631func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { 8632 return nil, false 8633} 8634 8635// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. 8636func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { 8637 return nil, false 8638} 8639 8640// AsRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. 8641func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { 8642 return nil, false 8643} 8644 8645// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. 8646func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { 8647 return &awshrr, true 8648} 8649 8650// AzureWorkloadSQLAutoProtectionIntent azure Workload SQL Auto Protection intent item. 8651type AzureWorkloadSQLAutoProtectionIntent struct { 8652 // WorkloadItemType - Workload item type of the item for which intent is to be set. Possible values include: 'WorkloadItemTypeInvalid', 'WorkloadItemTypeSQLInstance', 'WorkloadItemTypeSQLDataBase', 'WorkloadItemTypeSAPHanaSystem', 'WorkloadItemTypeSAPHanaDatabase', 'WorkloadItemTypeSAPAseSystem', 'WorkloadItemTypeSAPAseDatabase' 8653 WorkloadItemType WorkloadItemType `json:"workloadItemType,omitempty"` 8654 // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 8655 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 8656 // SourceResourceID - ARM ID of the resource to be backed up. 8657 SourceResourceID *string `json:"sourceResourceId,omitempty"` 8658 // ItemID - ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId 8659 ItemID *string `json:"itemId,omitempty"` 8660 // PolicyID - ID of the backup policy with which this item is backed up. 8661 PolicyID *string `json:"policyId,omitempty"` 8662 // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 8663 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 8664 // ProtectionIntentItemType - Possible values include: 'ProtectionIntentItemTypeProtectionIntent', 'ProtectionIntentItemTypeRecoveryServiceVaultItem', 'ProtectionIntentItemTypeAzureResourceItem', 'ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent', 'ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent' 8665 ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"` 8666} 8667 8668// MarshalJSON is the custom marshaler for AzureWorkloadSQLAutoProtectionIntent. 8669func (awsapi AzureWorkloadSQLAutoProtectionIntent) MarshalJSON() ([]byte, error) { 8670 awsapi.ProtectionIntentItemType = ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent 8671 objectMap := make(map[string]interface{}) 8672 if awsapi.WorkloadItemType != "" { 8673 objectMap["workloadItemType"] = awsapi.WorkloadItemType 8674 } 8675 if awsapi.BackupManagementType != "" { 8676 objectMap["backupManagementType"] = awsapi.BackupManagementType 8677 } 8678 if awsapi.SourceResourceID != nil { 8679 objectMap["sourceResourceId"] = awsapi.SourceResourceID 8680 } 8681 if awsapi.ItemID != nil { 8682 objectMap["itemId"] = awsapi.ItemID 8683 } 8684 if awsapi.PolicyID != nil { 8685 objectMap["policyId"] = awsapi.PolicyID 8686 } 8687 if awsapi.ProtectionState != "" { 8688 objectMap["protectionState"] = awsapi.ProtectionState 8689 } 8690 if awsapi.ProtectionIntentItemType != "" { 8691 objectMap["protectionIntentItemType"] = awsapi.ProtectionIntentItemType 8692 } 8693 return json.Marshal(objectMap) 8694} 8695 8696// AsAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. 8697func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) { 8698 return nil, false 8699} 8700 8701// AsBasicAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. 8702func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) { 8703 return &awsapi, true 8704} 8705 8706// AsAzureResourceProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. 8707func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) { 8708 return nil, false 8709} 8710 8711// AsAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. 8712func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) { 8713 return nil, false 8714} 8715 8716// AsBasicAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. 8717func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) { 8718 return &awsapi, true 8719} 8720 8721// AsAzureWorkloadSQLAutoProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. 8722func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) { 8723 return &awsapi, true 8724} 8725 8726// AsProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. 8727func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) { 8728 return nil, false 8729} 8730 8731// AsBasicProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. 8732func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) { 8733 return &awsapi, true 8734} 8735 8736// AzureWorkloadSQLPointInTimeRecoveryPoint recovery point specific to PointInTime 8737type AzureWorkloadSQLPointInTimeRecoveryPoint struct { 8738 // TimeRanges - List of log ranges 8739 TimeRanges *[]PointInTimeRange `json:"timeRanges,omitempty"` 8740 // ExtendedInfo - Extended Info that provides data directory details. Will be populated in two cases: 8741 // When a specific recovery point is accessed using GetRecoveryPoint 8742 // Or when ListRecoveryPoints is called for Log RP only with ExtendedInfo query filter 8743 ExtendedInfo *AzureWorkloadSQLRecoveryPointExtendedInfo `json:"extendedInfo,omitempty"` 8744 // RecoveryPointTimeInUTC - READ-ONLY; UTC time at which recovery point was created 8745 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"` 8746 // Type - READ-ONLY; Type of restore point. Possible values include: 'RestorePointTypeInvalid', 'RestorePointTypeFull', 'RestorePointTypeLog', 'RestorePointTypeDifferential' 8747 Type RestorePointType `json:"type,omitempty"` 8748 // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' 8749 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` 8750} 8751 8752// MarshalJSON is the custom marshaler for AzureWorkloadSQLPointInTimeRecoveryPoint. 8753func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) { 8754 awspitrp.ObjectType = ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint 8755 objectMap := make(map[string]interface{}) 8756 if awspitrp.TimeRanges != nil { 8757 objectMap["timeRanges"] = awspitrp.TimeRanges 8758 } 8759 if awspitrp.ExtendedInfo != nil { 8760 objectMap["extendedInfo"] = awspitrp.ExtendedInfo 8761 } 8762 if awspitrp.ObjectType != "" { 8763 objectMap["objectType"] = awspitrp.ObjectType 8764 } 8765 return json.Marshal(objectMap) 8766} 8767 8768// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. 8769func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { 8770 return nil, false 8771} 8772 8773// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. 8774func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { 8775 return nil, false 8776} 8777 8778// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. 8779func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { 8780 return nil, false 8781} 8782 8783// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. 8784func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { 8785 return nil, false 8786} 8787 8788// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. 8789func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { 8790 return &awspitrp, true 8791} 8792 8793// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. 8794func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { 8795 return nil, false 8796} 8797 8798// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. 8799func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { 8800 return nil, false 8801} 8802 8803// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. 8804func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { 8805 return &awspitrp, true 8806} 8807 8808// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. 8809func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { 8810 return nil, false 8811} 8812 8813// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. 8814func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { 8815 return &awspitrp, true 8816} 8817 8818// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. 8819func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { 8820 return nil, false 8821} 8822 8823// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. 8824func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { 8825 return nil, false 8826} 8827 8828// AsRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. 8829func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { 8830 return nil, false 8831} 8832 8833// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. 8834func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { 8835 return &awspitrp, true 8836} 8837 8838// AzureWorkloadSQLPointInTimeRestoreRequest azureWorkload SQL -specific restore. Specifically for 8839// PointInTime/Log restore 8840type AzureWorkloadSQLPointInTimeRestoreRequest struct { 8841 // PointInTime - PointInTime value 8842 PointInTime *date.Time `json:"pointInTime,omitempty"` 8843 // ShouldUseAlternateTargetLocation - Default option set to true. If this is set to false, alternate data directory must be provided 8844 ShouldUseAlternateTargetLocation *bool `json:"shouldUseAlternateTargetLocation,omitempty"` 8845 // IsNonRecoverable - SQL specific property where user can chose to set no-recovery when restore operation is tried 8846 IsNonRecoverable *bool `json:"isNonRecoverable,omitempty"` 8847 // AlternateDirectoryPaths - Data directory details 8848 AlternateDirectoryPaths *[]SQLDataDirectoryMapping `json:"alternateDirectoryPaths,omitempty"` 8849 // RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline' 8850 RecoveryType RecoveryType `json:"recoveryType,omitempty"` 8851 // SourceResourceID - Fully qualified ARM ID of the VM on which workload that was running is being recovered. 8852 SourceResourceID *string `json:"sourceResourceId,omitempty"` 8853 // PropertyBag - Workload specific property bag. 8854 PropertyBag map[string]*string `json:"propertyBag"` 8855 // TargetInfo - Details of target database 8856 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"` 8857 // RecoveryMode - Defines whether the current recovery mode is file restore or database restore. Possible values include: 'RecoveryModeInvalid', 'RecoveryModeFileRecovery', 'RecoveryModeWorkloadRecovery' 8858 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"` 8859 // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' 8860 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` 8861} 8862 8863// MarshalJSON is the custom marshaler for AzureWorkloadSQLPointInTimeRestoreRequest. 8864func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { 8865 awspitrr.ObjectType = ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest 8866 objectMap := make(map[string]interface{}) 8867 if awspitrr.PointInTime != nil { 8868 objectMap["pointInTime"] = awspitrr.PointInTime 8869 } 8870 if awspitrr.ShouldUseAlternateTargetLocation != nil { 8871 objectMap["shouldUseAlternateTargetLocation"] = awspitrr.ShouldUseAlternateTargetLocation 8872 } 8873 if awspitrr.IsNonRecoverable != nil { 8874 objectMap["isNonRecoverable"] = awspitrr.IsNonRecoverable 8875 } 8876 if awspitrr.AlternateDirectoryPaths != nil { 8877 objectMap["alternateDirectoryPaths"] = awspitrr.AlternateDirectoryPaths 8878 } 8879 if awspitrr.RecoveryType != "" { 8880 objectMap["recoveryType"] = awspitrr.RecoveryType 8881 } 8882 if awspitrr.SourceResourceID != nil { 8883 objectMap["sourceResourceId"] = awspitrr.SourceResourceID 8884 } 8885 if awspitrr.PropertyBag != nil { 8886 objectMap["propertyBag"] = awspitrr.PropertyBag 8887 } 8888 if awspitrr.TargetInfo != nil { 8889 objectMap["targetInfo"] = awspitrr.TargetInfo 8890 } 8891 if awspitrr.RecoveryMode != "" { 8892 objectMap["recoveryMode"] = awspitrr.RecoveryMode 8893 } 8894 if awspitrr.ObjectType != "" { 8895 objectMap["objectType"] = awspitrr.ObjectType 8896 } 8897 return json.Marshal(objectMap) 8898} 8899 8900// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. 8901func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { 8902 return nil, false 8903} 8904 8905// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. 8906func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { 8907 return nil, false 8908} 8909 8910// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. 8911func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { 8912 return nil, false 8913} 8914 8915// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. 8916func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { 8917 return &awspitrr, true 8918} 8919 8920// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. 8921func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { 8922 return nil, false 8923} 8924 8925// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. 8926func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { 8927 return nil, false 8928} 8929 8930// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. 8931func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { 8932 return nil, false 8933} 8934 8935// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. 8936func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { 8937 return &awspitrr, true 8938} 8939 8940// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. 8941func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { 8942 return nil, false 8943} 8944 8945// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. 8946func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { 8947 return &awspitrr, true 8948} 8949 8950// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. 8951func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { 8952 return nil, false 8953} 8954 8955// AsRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. 8956func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { 8957 return nil, false 8958} 8959 8960// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. 8961func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { 8962 return &awspitrr, true 8963} 8964 8965// BasicAzureWorkloadSQLRecoveryPoint SQL specific recoverypoint, specifically encapsulates full/diff recoverypoint 8966// along with extended info 8967type BasicAzureWorkloadSQLRecoveryPoint interface { 8968 AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) 8969 AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) 8970} 8971 8972// AzureWorkloadSQLRecoveryPoint SQL specific recoverypoint, specifically encapsulates full/diff recoverypoint 8973// along with extended info 8974type AzureWorkloadSQLRecoveryPoint struct { 8975 // ExtendedInfo - Extended Info that provides data directory details. Will be populated in two cases: 8976 // When a specific recovery point is accessed using GetRecoveryPoint 8977 // Or when ListRecoveryPoints is called for Log RP only with ExtendedInfo query filter 8978 ExtendedInfo *AzureWorkloadSQLRecoveryPointExtendedInfo `json:"extendedInfo,omitempty"` 8979 // RecoveryPointTimeInUTC - READ-ONLY; UTC time at which recovery point was created 8980 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"` 8981 // Type - READ-ONLY; Type of restore point. Possible values include: 'RestorePointTypeInvalid', 'RestorePointTypeFull', 'RestorePointTypeLog', 'RestorePointTypeDifferential' 8982 Type RestorePointType `json:"type,omitempty"` 8983 // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' 8984 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` 8985} 8986 8987func unmarshalBasicAzureWorkloadSQLRecoveryPoint(body []byte) (BasicAzureWorkloadSQLRecoveryPoint, error) { 8988 var m map[string]interface{} 8989 err := json.Unmarshal(body, &m) 8990 if err != nil { 8991 return nil, err 8992 } 8993 8994 switch m["objectType"] { 8995 case string(ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint): 8996 var awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint 8997 err := json.Unmarshal(body, &awspitrp) 8998 return awspitrp, err 8999 default: 9000 var awsrp AzureWorkloadSQLRecoveryPoint 9001 err := json.Unmarshal(body, &awsrp) 9002 return awsrp, err 9003 } 9004} 9005func unmarshalBasicAzureWorkloadSQLRecoveryPointArray(body []byte) ([]BasicAzureWorkloadSQLRecoveryPoint, error) { 9006 var rawMessages []*json.RawMessage 9007 err := json.Unmarshal(body, &rawMessages) 9008 if err != nil { 9009 return nil, err 9010 } 9011 9012 awsrpArray := make([]BasicAzureWorkloadSQLRecoveryPoint, len(rawMessages)) 9013 9014 for index, rawMessage := range rawMessages { 9015 awsrp, err := unmarshalBasicAzureWorkloadSQLRecoveryPoint(*rawMessage) 9016 if err != nil { 9017 return nil, err 9018 } 9019 awsrpArray[index] = awsrp 9020 } 9021 return awsrpArray, nil 9022} 9023 9024// MarshalJSON is the custom marshaler for AzureWorkloadSQLRecoveryPoint. 9025func (awsrp AzureWorkloadSQLRecoveryPoint) MarshalJSON() ([]byte, error) { 9026 awsrp.ObjectType = ObjectTypeAzureWorkloadSQLRecoveryPoint 9027 objectMap := make(map[string]interface{}) 9028 if awsrp.ExtendedInfo != nil { 9029 objectMap["extendedInfo"] = awsrp.ExtendedInfo 9030 } 9031 if awsrp.ObjectType != "" { 9032 objectMap["objectType"] = awsrp.ObjectType 9033 } 9034 return json.Marshal(objectMap) 9035} 9036 9037// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. 9038func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { 9039 return nil, false 9040} 9041 9042// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. 9043func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { 9044 return nil, false 9045} 9046 9047// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. 9048func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { 9049 return nil, false 9050} 9051 9052// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. 9053func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { 9054 return nil, false 9055} 9056 9057// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. 9058func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { 9059 return &awsrp, true 9060} 9061 9062// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. 9063func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { 9064 return nil, false 9065} 9066 9067// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. 9068func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { 9069 return nil, false 9070} 9071 9072// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. 9073func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { 9074 return nil, false 9075} 9076 9077// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. 9078func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { 9079 return &awsrp, true 9080} 9081 9082// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. 9083func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { 9084 return &awsrp, true 9085} 9086 9087// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. 9088func (awsrp AzureWorkloadSQLRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { 9089 return nil, false 9090} 9091 9092// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. 9093func (awsrp AzureWorkloadSQLRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { 9094 return nil, false 9095} 9096 9097// AsRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. 9098func (awsrp AzureWorkloadSQLRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { 9099 return nil, false 9100} 9101 9102// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. 9103func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { 9104 return &awsrp, true 9105} 9106 9107// AzureWorkloadSQLRecoveryPointExtendedInfo extended info class details 9108type AzureWorkloadSQLRecoveryPointExtendedInfo struct { 9109 // DataDirectoryTimeInUTC - READ-ONLY; UTC time at which data directory info was captured 9110 DataDirectoryTimeInUTC *date.Time `json:"dataDirectoryTimeInUTC,omitempty"` 9111 // DataDirectoryPaths - READ-ONLY; List of data directory paths during restore operation. 9112 DataDirectoryPaths *[]SQLDataDirectory `json:"dataDirectoryPaths,omitempty"` 9113} 9114 9115// MarshalJSON is the custom marshaler for AzureWorkloadSQLRecoveryPointExtendedInfo. 9116func (awsrpei AzureWorkloadSQLRecoveryPointExtendedInfo) MarshalJSON() ([]byte, error) { 9117 objectMap := make(map[string]interface{}) 9118 return json.Marshal(objectMap) 9119} 9120 9121// BasicAzureWorkloadSQLRestoreRequest azureWorkload SQL -specific restore. Specifically for full/diff restore 9122type BasicAzureWorkloadSQLRestoreRequest interface { 9123 AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) 9124 AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) 9125} 9126 9127// AzureWorkloadSQLRestoreRequest azureWorkload SQL -specific restore. Specifically for full/diff restore 9128type AzureWorkloadSQLRestoreRequest struct { 9129 // ShouldUseAlternateTargetLocation - Default option set to true. If this is set to false, alternate data directory must be provided 9130 ShouldUseAlternateTargetLocation *bool `json:"shouldUseAlternateTargetLocation,omitempty"` 9131 // IsNonRecoverable - SQL specific property where user can chose to set no-recovery when restore operation is tried 9132 IsNonRecoverable *bool `json:"isNonRecoverable,omitempty"` 9133 // AlternateDirectoryPaths - Data directory details 9134 AlternateDirectoryPaths *[]SQLDataDirectoryMapping `json:"alternateDirectoryPaths,omitempty"` 9135 // RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline' 9136 RecoveryType RecoveryType `json:"recoveryType,omitempty"` 9137 // SourceResourceID - Fully qualified ARM ID of the VM on which workload that was running is being recovered. 9138 SourceResourceID *string `json:"sourceResourceId,omitempty"` 9139 // PropertyBag - Workload specific property bag. 9140 PropertyBag map[string]*string `json:"propertyBag"` 9141 // TargetInfo - Details of target database 9142 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"` 9143 // RecoveryMode - Defines whether the current recovery mode is file restore or database restore. Possible values include: 'RecoveryModeInvalid', 'RecoveryModeFileRecovery', 'RecoveryModeWorkloadRecovery' 9144 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"` 9145 // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' 9146 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` 9147} 9148 9149func unmarshalBasicAzureWorkloadSQLRestoreRequest(body []byte) (BasicAzureWorkloadSQLRestoreRequest, error) { 9150 var m map[string]interface{} 9151 err := json.Unmarshal(body, &m) 9152 if err != nil { 9153 return nil, err 9154 } 9155 9156 switch m["objectType"] { 9157 case string(ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest): 9158 var awspitrr AzureWorkloadSQLPointInTimeRestoreRequest 9159 err := json.Unmarshal(body, &awspitrr) 9160 return awspitrr, err 9161 default: 9162 var awsrr AzureWorkloadSQLRestoreRequest 9163 err := json.Unmarshal(body, &awsrr) 9164 return awsrr, err 9165 } 9166} 9167func unmarshalBasicAzureWorkloadSQLRestoreRequestArray(body []byte) ([]BasicAzureWorkloadSQLRestoreRequest, error) { 9168 var rawMessages []*json.RawMessage 9169 err := json.Unmarshal(body, &rawMessages) 9170 if err != nil { 9171 return nil, err 9172 } 9173 9174 awsrrArray := make([]BasicAzureWorkloadSQLRestoreRequest, len(rawMessages)) 9175 9176 for index, rawMessage := range rawMessages { 9177 awsrr, err := unmarshalBasicAzureWorkloadSQLRestoreRequest(*rawMessage) 9178 if err != nil { 9179 return nil, err 9180 } 9181 awsrrArray[index] = awsrr 9182 } 9183 return awsrrArray, nil 9184} 9185 9186// MarshalJSON is the custom marshaler for AzureWorkloadSQLRestoreRequest. 9187func (awsrr AzureWorkloadSQLRestoreRequest) MarshalJSON() ([]byte, error) { 9188 awsrr.ObjectType = ObjectTypeAzureWorkloadSQLRestoreRequest 9189 objectMap := make(map[string]interface{}) 9190 if awsrr.ShouldUseAlternateTargetLocation != nil { 9191 objectMap["shouldUseAlternateTargetLocation"] = awsrr.ShouldUseAlternateTargetLocation 9192 } 9193 if awsrr.IsNonRecoverable != nil { 9194 objectMap["isNonRecoverable"] = awsrr.IsNonRecoverable 9195 } 9196 if awsrr.AlternateDirectoryPaths != nil { 9197 objectMap["alternateDirectoryPaths"] = awsrr.AlternateDirectoryPaths 9198 } 9199 if awsrr.RecoveryType != "" { 9200 objectMap["recoveryType"] = awsrr.RecoveryType 9201 } 9202 if awsrr.SourceResourceID != nil { 9203 objectMap["sourceResourceId"] = awsrr.SourceResourceID 9204 } 9205 if awsrr.PropertyBag != nil { 9206 objectMap["propertyBag"] = awsrr.PropertyBag 9207 } 9208 if awsrr.TargetInfo != nil { 9209 objectMap["targetInfo"] = awsrr.TargetInfo 9210 } 9211 if awsrr.RecoveryMode != "" { 9212 objectMap["recoveryMode"] = awsrr.RecoveryMode 9213 } 9214 if awsrr.ObjectType != "" { 9215 objectMap["objectType"] = awsrr.ObjectType 9216 } 9217 return json.Marshal(objectMap) 9218} 9219 9220// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. 9221func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { 9222 return nil, false 9223} 9224 9225// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. 9226func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { 9227 return nil, false 9228} 9229 9230// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. 9231func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { 9232 return nil, false 9233} 9234 9235// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. 9236func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { 9237 return &awsrr, true 9238} 9239 9240// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. 9241func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { 9242 return nil, false 9243} 9244 9245// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. 9246func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { 9247 return nil, false 9248} 9249 9250// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. 9251func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { 9252 return nil, false 9253} 9254 9255// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. 9256func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { 9257 return nil, false 9258} 9259 9260// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. 9261func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { 9262 return &awsrr, true 9263} 9264 9265// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. 9266func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { 9267 return &awsrr, true 9268} 9269 9270// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. 9271func (awsrr AzureWorkloadSQLRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { 9272 return nil, false 9273} 9274 9275// AsRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. 9276func (awsrr AzureWorkloadSQLRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { 9277 return nil, false 9278} 9279 9280// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. 9281func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { 9282 return &awsrr, true 9283} 9284 9285// BEKDetails BEK is bitlocker encryption key. 9286type BEKDetails struct { 9287 // SecretURL - Secret is BEK. 9288 SecretURL *string `json:"secretUrl,omitempty"` 9289 // SecretVaultID - ID of the Key Vault where this Secret is stored. 9290 SecretVaultID *string `json:"secretVaultId,omitempty"` 9291 // SecretData - BEK data. 9292 SecretData *string `json:"secretData,omitempty"` 9293} 9294 9295// BMSBackupEngineQueryObject query parameters to fetch list of backup engines. 9296type BMSBackupEngineQueryObject struct { 9297 // Expand - attribute to add extended info 9298 Expand *string `json:"expand,omitempty"` 9299} 9300 9301// BMSBackupEnginesQueryObject query parameters to fetch list of backup engines. 9302type BMSBackupEnginesQueryObject struct { 9303 // BackupManagementType - Backup management type for the backup engine. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 9304 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 9305 // FriendlyName - Friendly name of the backup engine. 9306 FriendlyName *string `json:"friendlyName,omitempty"` 9307 // Expand - Attribute to add extended info. 9308 Expand *string `json:"expand,omitempty"` 9309} 9310 9311// BMSBackupSummariesQueryObject query parameters to fetch backup summaries. 9312type BMSBackupSummariesQueryObject struct { 9313 // Type - Backup management type for this container. Possible values include: 'TypeInvalid', 'TypeBackupProtectedItemCountSummary', 'TypeBackupProtectionContainerCountSummary' 9314 Type Type `json:"type,omitempty"` 9315} 9316 9317// BMSContainerQueryObject the query filters that can be used with the list containers API. 9318type BMSContainerQueryObject struct { 9319 // BackupManagementType - Backup management type for this container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 9320 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 9321 // ContainerType - Type of container for filter. Possible values include: 'ContainerTypeInvalid', 'ContainerTypeUnknown', 'ContainerTypeIaasVMContainer', 'ContainerTypeIaasVMServiceContainer', 'ContainerTypeDPMContainer', 'ContainerTypeAzureBackupServerContainer', 'ContainerTypeMABContainer', 'ContainerTypeCluster', 'ContainerTypeAzureSQLContainer', 'ContainerTypeWindows', 'ContainerTypeVCenter', 'ContainerTypeVMAppContainer', 'ContainerTypeSQLAGWorkLoadContainer', 'ContainerTypeStorageContainer', 'ContainerTypeGenericContainer' 9322 ContainerType ContainerType `json:"containerType,omitempty"` 9323 // BackupEngineName - Backup engine name 9324 BackupEngineName *string `json:"backupEngineName,omitempty"` 9325 // FabricName - Fabric name for filter 9326 FabricName *string `json:"fabricName,omitempty"` 9327 // Status - Status of registration of this container with the Recovery Services Vault. 9328 Status *string `json:"status,omitempty"` 9329 // FriendlyName - Friendly name of this container. 9330 FriendlyName *string `json:"friendlyName,omitempty"` 9331} 9332 9333// BMSContainersInquiryQueryObject the query filters that can be used with the inquire container API. 9334type BMSContainersInquiryQueryObject struct { 9335 // BackupManagementType - Backup management type for this container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 9336 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 9337 // WorkloadType - Workload type for this container. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' 9338 WorkloadType WorkloadType `json:"workloadType,omitempty"` 9339} 9340 9341// BMSPOQueryObject filters to list items that can be backed up. 9342type BMSPOQueryObject struct { 9343 // BackupManagementType - Backup management type. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 9344 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 9345 // WorkloadType - Workload type. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' 9346 WorkloadType WorkloadType `json:"workloadType,omitempty"` 9347 // ContainerName - Full name of the container whose Protectable Objects should be returned. 9348 ContainerName *string `json:"containerName,omitempty"` 9349 // Status - Backup status query parameter. 9350 Status *string `json:"status,omitempty"` 9351 // FriendlyName - Friendly name. 9352 FriendlyName *string `json:"friendlyName,omitempty"` 9353} 9354 9355// BMSRefreshContainersQueryObject the query filters that can be used with the refresh container API. 9356type BMSRefreshContainersQueryObject struct { 9357 // BackupManagementType - Backup management type for this container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 9358 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 9359} 9360 9361// BMSRPQueryObject filters to list backup copies. 9362type BMSRPQueryObject struct { 9363 // StartDate - Backup copies created after this time. 9364 StartDate *date.Time `json:"startDate,omitempty"` 9365 // EndDate - Backup copies created before this time. 9366 EndDate *date.Time `json:"endDate,omitempty"` 9367 // RestorePointQueryType - RestorePoint type. Possible values include: 'RestorePointQueryTypeInvalid', 'RestorePointQueryTypeFull', 'RestorePointQueryTypeLog', 'RestorePointQueryTypeDifferential', 'RestorePointQueryTypeFullAndDifferential', 'RestorePointQueryTypeAll' 9368 RestorePointQueryType RestorePointQueryType `json:"restorePointQueryType,omitempty"` 9369 // ExtendedInfo - In Get Recovery Point, it tells whether extended information about recovery point is asked. 9370 ExtendedInfo *bool `json:"extendedInfo,omitempty"` 9371} 9372 9373// BMSWorkloadItemQueryObject filters to list items that can be backed up. 9374type BMSWorkloadItemQueryObject struct { 9375 // BackupManagementType - Backup management type. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 9376 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 9377 // WorkloadItemType - Workload Item type. Possible values include: 'WorkloadItemTypeInvalid', 'WorkloadItemTypeSQLInstance', 'WorkloadItemTypeSQLDataBase', 'WorkloadItemTypeSAPHanaSystem', 'WorkloadItemTypeSAPHanaDatabase', 'WorkloadItemTypeSAPAseSystem', 'WorkloadItemTypeSAPAseDatabase' 9378 WorkloadItemType WorkloadItemType `json:"workloadItemType,omitempty"` 9379 // WorkloadType - Workload type. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' 9380 WorkloadType WorkloadType `json:"workloadType,omitempty"` 9381 // ProtectionStatus - Backup status query parameter. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 9382 ProtectionStatus ProtectionStatus `json:"protectionStatus,omitempty"` 9383} 9384 9385// ClientDiscoveryDisplay localized display information of an operation. 9386type ClientDiscoveryDisplay struct { 9387 // Provider - Name of the provider for display purposes 9388 Provider *string `json:"provider,omitempty"` 9389 // Resource - ResourceType for which this Operation can be performed. 9390 Resource *string `json:"resource,omitempty"` 9391 // Operation - Operations Name itself. 9392 Operation *string `json:"operation,omitempty"` 9393 // Description - Description of the operation having details of what operation is about. 9394 Description *string `json:"description,omitempty"` 9395} 9396 9397// ClientDiscoveryForLogSpecification class to represent shoebox log specification in json client 9398// discovery. 9399type ClientDiscoveryForLogSpecification struct { 9400 // Name - Name for shoebox log specification. 9401 Name *string `json:"name,omitempty"` 9402 // DisplayName - Localized display name 9403 DisplayName *string `json:"displayName,omitempty"` 9404 // BlobDuration - blob duration of shoebox log specification 9405 BlobDuration *string `json:"blobDuration,omitempty"` 9406} 9407 9408// ClientDiscoveryForProperties class to represent shoebox properties in json client discovery. 9409type ClientDiscoveryForProperties struct { 9410 // ServiceSpecification - Operation properties. 9411 ServiceSpecification *ClientDiscoveryForServiceSpecification `json:"serviceSpecification,omitempty"` 9412} 9413 9414// ClientDiscoveryForServiceSpecification class to represent shoebox service specification in json client 9415// discovery. 9416type ClientDiscoveryForServiceSpecification struct { 9417 // LogSpecifications - List of log specifications of this operation. 9418 LogSpecifications *[]ClientDiscoveryForLogSpecification `json:"logSpecifications,omitempty"` 9419} 9420 9421// ClientDiscoveryResponse operations List response which contains list of available APIs. 9422type ClientDiscoveryResponse struct { 9423 autorest.Response `json:"-"` 9424 // Value - List of available operations. 9425 Value *[]ClientDiscoveryValueForSingleAPI `json:"value,omitempty"` 9426 // NextLink - Link to the next chunk of Response. 9427 NextLink *string `json:"nextLink,omitempty"` 9428} 9429 9430// ClientDiscoveryResponseIterator provides access to a complete listing of 9431// ClientDiscoveryValueForSingleAPI values. 9432type ClientDiscoveryResponseIterator struct { 9433 i int 9434 page ClientDiscoveryResponsePage 9435} 9436 9437// NextWithContext advances to the next value. If there was an error making 9438// the request the iterator does not advance and the error is returned. 9439func (iter *ClientDiscoveryResponseIterator) NextWithContext(ctx context.Context) (err error) { 9440 if tracing.IsEnabled() { 9441 ctx = tracing.StartSpan(ctx, fqdn+"/ClientDiscoveryResponseIterator.NextWithContext") 9442 defer func() { 9443 sc := -1 9444 if iter.Response().Response.Response != nil { 9445 sc = iter.Response().Response.Response.StatusCode 9446 } 9447 tracing.EndSpan(ctx, sc, err) 9448 }() 9449 } 9450 iter.i++ 9451 if iter.i < len(iter.page.Values()) { 9452 return nil 9453 } 9454 err = iter.page.NextWithContext(ctx) 9455 if err != nil { 9456 iter.i-- 9457 return err 9458 } 9459 iter.i = 0 9460 return nil 9461} 9462 9463// Next advances to the next value. If there was an error making 9464// the request the iterator does not advance and the error is returned. 9465// Deprecated: Use NextWithContext() instead. 9466func (iter *ClientDiscoveryResponseIterator) Next() error { 9467 return iter.NextWithContext(context.Background()) 9468} 9469 9470// NotDone returns true if the enumeration should be started or is not yet complete. 9471func (iter ClientDiscoveryResponseIterator) NotDone() bool { 9472 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 9473} 9474 9475// Response returns the raw server response from the last page request. 9476func (iter ClientDiscoveryResponseIterator) Response() ClientDiscoveryResponse { 9477 return iter.page.Response() 9478} 9479 9480// Value returns the current value or a zero-initialized value if the 9481// iterator has advanced beyond the end of the collection. 9482func (iter ClientDiscoveryResponseIterator) Value() ClientDiscoveryValueForSingleAPI { 9483 if !iter.page.NotDone() { 9484 return ClientDiscoveryValueForSingleAPI{} 9485 } 9486 return iter.page.Values()[iter.i] 9487} 9488 9489// Creates a new instance of the ClientDiscoveryResponseIterator type. 9490func NewClientDiscoveryResponseIterator(page ClientDiscoveryResponsePage) ClientDiscoveryResponseIterator { 9491 return ClientDiscoveryResponseIterator{page: page} 9492} 9493 9494// IsEmpty returns true if the ListResult contains no values. 9495func (cdr ClientDiscoveryResponse) IsEmpty() bool { 9496 return cdr.Value == nil || len(*cdr.Value) == 0 9497} 9498 9499// hasNextLink returns true if the NextLink is not empty. 9500func (cdr ClientDiscoveryResponse) hasNextLink() bool { 9501 return cdr.NextLink != nil && len(*cdr.NextLink) != 0 9502} 9503 9504// clientDiscoveryResponsePreparer prepares a request to retrieve the next set of results. 9505// It returns nil if no more results exist. 9506func (cdr ClientDiscoveryResponse) clientDiscoveryResponsePreparer(ctx context.Context) (*http.Request, error) { 9507 if !cdr.hasNextLink() { 9508 return nil, nil 9509 } 9510 return autorest.Prepare((&http.Request{}).WithContext(ctx), 9511 autorest.AsJSON(), 9512 autorest.AsGet(), 9513 autorest.WithBaseURL(to.String(cdr.NextLink))) 9514} 9515 9516// ClientDiscoveryResponsePage contains a page of ClientDiscoveryValueForSingleAPI values. 9517type ClientDiscoveryResponsePage struct { 9518 fn func(context.Context, ClientDiscoveryResponse) (ClientDiscoveryResponse, error) 9519 cdr ClientDiscoveryResponse 9520} 9521 9522// NextWithContext advances to the next page of values. If there was an error making 9523// the request the page does not advance and the error is returned. 9524func (page *ClientDiscoveryResponsePage) NextWithContext(ctx context.Context) (err error) { 9525 if tracing.IsEnabled() { 9526 ctx = tracing.StartSpan(ctx, fqdn+"/ClientDiscoveryResponsePage.NextWithContext") 9527 defer func() { 9528 sc := -1 9529 if page.Response().Response.Response != nil { 9530 sc = page.Response().Response.Response.StatusCode 9531 } 9532 tracing.EndSpan(ctx, sc, err) 9533 }() 9534 } 9535 for { 9536 next, err := page.fn(ctx, page.cdr) 9537 if err != nil { 9538 return err 9539 } 9540 page.cdr = next 9541 if !next.hasNextLink() || !next.IsEmpty() { 9542 break 9543 } 9544 } 9545 return nil 9546} 9547 9548// Next advances to the next page of values. If there was an error making 9549// the request the page does not advance and the error is returned. 9550// Deprecated: Use NextWithContext() instead. 9551func (page *ClientDiscoveryResponsePage) Next() error { 9552 return page.NextWithContext(context.Background()) 9553} 9554 9555// NotDone returns true if the page enumeration should be started or is not yet complete. 9556func (page ClientDiscoveryResponsePage) NotDone() bool { 9557 return !page.cdr.IsEmpty() 9558} 9559 9560// Response returns the raw server response from the last page request. 9561func (page ClientDiscoveryResponsePage) Response() ClientDiscoveryResponse { 9562 return page.cdr 9563} 9564 9565// Values returns the slice of values for the current page or nil if there are no values. 9566func (page ClientDiscoveryResponsePage) Values() []ClientDiscoveryValueForSingleAPI { 9567 if page.cdr.IsEmpty() { 9568 return nil 9569 } 9570 return *page.cdr.Value 9571} 9572 9573// Creates a new instance of the ClientDiscoveryResponsePage type. 9574func NewClientDiscoveryResponsePage(cur ClientDiscoveryResponse, getNextPage func(context.Context, ClientDiscoveryResponse) (ClientDiscoveryResponse, error)) ClientDiscoveryResponsePage { 9575 return ClientDiscoveryResponsePage{ 9576 fn: getNextPage, 9577 cdr: cur, 9578 } 9579} 9580 9581// ClientDiscoveryValueForSingleAPI available operation details. 9582type ClientDiscoveryValueForSingleAPI struct { 9583 // Name - Name of the Operation. 9584 Name *string `json:"name,omitempty"` 9585 // Display - Contains the localized display information for this particular operation 9586 Display *ClientDiscoveryDisplay `json:"display,omitempty"` 9587 // Origin - The intended executor of the operation;governs the display of the operation in the RBAC UX and the audit logs UX 9588 Origin *string `json:"origin,omitempty"` 9589 // Properties - ShoeBox properties for the given operation. 9590 Properties *ClientDiscoveryForProperties `json:"properties,omitempty"` 9591} 9592 9593// ClientScriptForConnect client script details for file / folder restore. 9594type ClientScriptForConnect struct { 9595 // ScriptContent - File content of the client script for file / folder restore. 9596 ScriptContent *string `json:"scriptContent,omitempty"` 9597 // ScriptExtension - File extension of the client script for file / folder restore - .ps1 , .sh , etc. 9598 ScriptExtension *string `json:"scriptExtension,omitempty"` 9599 // OsType - OS type - Windows, Linux etc. for which this file / folder restore client script works. 9600 OsType *string `json:"osType,omitempty"` 9601 // URL - URL of Executable from where to source the content. If this is not null then ScriptContent should not be used 9602 URL *string `json:"url,omitempty"` 9603 // ScriptNameSuffix - Mandatory suffix that should be added to the name of script that is given for download to user. 9604 // If its null or empty then , ignore it. 9605 ScriptNameSuffix *string `json:"scriptNameSuffix,omitempty"` 9606} 9607 9608// ContainerIdentityInfo container identity information 9609type ContainerIdentityInfo struct { 9610 // UniqueName - Unique name of the container 9611 UniqueName *string `json:"uniqueName,omitempty"` 9612 // AadTenantID - Protection container identity - AAD Tenant 9613 AadTenantID *string `json:"aadTenantId,omitempty"` 9614 // ServicePrincipalClientID - Protection container identity - AAD Service Principal 9615 ServicePrincipalClientID *string `json:"servicePrincipalClientId,omitempty"` 9616 // Audience - Protection container identity - Audience 9617 Audience *string `json:"audience,omitempty"` 9618} 9619 9620// DailyRetentionFormat daily retention format. 9621type DailyRetentionFormat struct { 9622 // DaysOfTheMonth - List of days of the month. 9623 DaysOfTheMonth *[]Day `json:"daysOfTheMonth,omitempty"` 9624} 9625 9626// DailyRetentionSchedule daily retention schedule. 9627type DailyRetentionSchedule struct { 9628 // RetentionTimes - Retention times of retention policy. 9629 RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"` 9630 // RetentionDuration - Retention duration of retention Policy. 9631 RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` 9632} 9633 9634// Day day of the week. 9635type Day struct { 9636 // Date - Date of the month 9637 Date *int32 `json:"date,omitempty"` 9638 // IsLast - Whether Date is last date of month 9639 IsLast *bool `json:"isLast,omitempty"` 9640} 9641 9642// DiskExclusionProperties ... 9643type DiskExclusionProperties struct { 9644 // DiskLunList - List of Disks' Logical Unit Numbers (LUN) to be used for VM Protection. 9645 DiskLunList *[]int32 `json:"diskLunList,omitempty"` 9646 // IsInclusionList - Flag to indicate whether DiskLunList is to be included/ excluded from backup. 9647 IsInclusionList *bool `json:"isInclusionList,omitempty"` 9648} 9649 9650// DiskInformation disk information 9651type DiskInformation struct { 9652 Lun *int32 `json:"lun,omitempty"` 9653 Name *string `json:"name,omitempty"` 9654} 9655 9656// DistributedNodesInfo this is used to represent the various nodes of the distributed container. 9657type DistributedNodesInfo struct { 9658 // NodeName - Name of the node under a distributed container. 9659 NodeName *string `json:"nodeName,omitempty"` 9660 // Status - Status of this Node. 9661 // Failed | Succeeded 9662 Status *string `json:"status,omitempty"` 9663 // ErrorDetail - Error Details if the Status is non-success. 9664 ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"` 9665} 9666 9667// DpmBackupEngine data Protection Manager (DPM) specific backup engine. 9668type DpmBackupEngine struct { 9669 // FriendlyName - Friendly name of the backup engine. 9670 FriendlyName *string `json:"friendlyName,omitempty"` 9671 // BackupManagementType - Type of backup management for the backup engine. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 9672 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 9673 // RegistrationStatus - Registration status of the backup engine with the Recovery Services Vault. 9674 RegistrationStatus *string `json:"registrationStatus,omitempty"` 9675 // BackupEngineState - Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed} 9676 BackupEngineState *string `json:"backupEngineState,omitempty"` 9677 // HealthStatus - Backup status of the backup engine. 9678 HealthStatus *string `json:"healthStatus,omitempty"` 9679 // CanReRegister - Flag indicating if the backup engine be registered, once already registered. 9680 CanReRegister *bool `json:"canReRegister,omitempty"` 9681 // BackupEngineID - ID of the backup engine. 9682 BackupEngineID *string `json:"backupEngineId,omitempty"` 9683 // DpmVersion - Backup engine version 9684 DpmVersion *string `json:"dpmVersion,omitempty"` 9685 // AzureBackupAgentVersion - Backup agent version 9686 AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"` 9687 // IsAzureBackupAgentUpgradeAvailable - To check if backup agent upgrade available 9688 IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"` 9689 // IsDpmUpgradeAvailable - To check if backup engine upgrade available 9690 IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"` 9691 // ExtendedInfo - Extended info of the backupengine 9692 ExtendedInfo *EngineExtendedInfo `json:"extendedInfo,omitempty"` 9693 // BackupEngineType - Possible values include: 'BackupEngineTypeBackupEngineBase', 'BackupEngineTypeAzureBackupServerEngine', 'BackupEngineTypeDpmBackupEngine' 9694 BackupEngineType EngineType `json:"backupEngineType,omitempty"` 9695} 9696 9697// MarshalJSON is the custom marshaler for DpmBackupEngine. 9698func (dbe DpmBackupEngine) MarshalJSON() ([]byte, error) { 9699 dbe.BackupEngineType = BackupEngineTypeDpmBackupEngine 9700 objectMap := make(map[string]interface{}) 9701 if dbe.FriendlyName != nil { 9702 objectMap["friendlyName"] = dbe.FriendlyName 9703 } 9704 if dbe.BackupManagementType != "" { 9705 objectMap["backupManagementType"] = dbe.BackupManagementType 9706 } 9707 if dbe.RegistrationStatus != nil { 9708 objectMap["registrationStatus"] = dbe.RegistrationStatus 9709 } 9710 if dbe.BackupEngineState != nil { 9711 objectMap["backupEngineState"] = dbe.BackupEngineState 9712 } 9713 if dbe.HealthStatus != nil { 9714 objectMap["healthStatus"] = dbe.HealthStatus 9715 } 9716 if dbe.CanReRegister != nil { 9717 objectMap["canReRegister"] = dbe.CanReRegister 9718 } 9719 if dbe.BackupEngineID != nil { 9720 objectMap["backupEngineId"] = dbe.BackupEngineID 9721 } 9722 if dbe.DpmVersion != nil { 9723 objectMap["dpmVersion"] = dbe.DpmVersion 9724 } 9725 if dbe.AzureBackupAgentVersion != nil { 9726 objectMap["azureBackupAgentVersion"] = dbe.AzureBackupAgentVersion 9727 } 9728 if dbe.IsAzureBackupAgentUpgradeAvailable != nil { 9729 objectMap["isAzureBackupAgentUpgradeAvailable"] = dbe.IsAzureBackupAgentUpgradeAvailable 9730 } 9731 if dbe.IsDpmUpgradeAvailable != nil { 9732 objectMap["isDpmUpgradeAvailable"] = dbe.IsDpmUpgradeAvailable 9733 } 9734 if dbe.ExtendedInfo != nil { 9735 objectMap["extendedInfo"] = dbe.ExtendedInfo 9736 } 9737 if dbe.BackupEngineType != "" { 9738 objectMap["backupEngineType"] = dbe.BackupEngineType 9739 } 9740 return json.Marshal(objectMap) 9741} 9742 9743// AsAzureBackupServerEngine is the BasicEngineBase implementation for DpmBackupEngine. 9744func (dbe DpmBackupEngine) AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) { 9745 return nil, false 9746} 9747 9748// AsDpmBackupEngine is the BasicEngineBase implementation for DpmBackupEngine. 9749func (dbe DpmBackupEngine) AsDpmBackupEngine() (*DpmBackupEngine, bool) { 9750 return &dbe, true 9751} 9752 9753// AsEngineBase is the BasicEngineBase implementation for DpmBackupEngine. 9754func (dbe DpmBackupEngine) AsEngineBase() (*EngineBase, bool) { 9755 return nil, false 9756} 9757 9758// AsBasicEngineBase is the BasicEngineBase implementation for DpmBackupEngine. 9759func (dbe DpmBackupEngine) AsBasicEngineBase() (BasicEngineBase, bool) { 9760 return &dbe, true 9761} 9762 9763// BasicDpmContainer DPM workload-specific protection container. 9764type BasicDpmContainer interface { 9765 AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) 9766 AsDpmContainer() (*DpmContainer, bool) 9767} 9768 9769// DpmContainer DPM workload-specific protection container. 9770type DpmContainer struct { 9771 // CanReRegister - Specifies whether the container is re-registrable. 9772 CanReRegister *bool `json:"canReRegister,omitempty"` 9773 // ContainerID - ID of container. 9774 ContainerID *string `json:"containerId,omitempty"` 9775 // ProtectedItemCount - Number of protected items in the BackupEngine 9776 ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` 9777 // DpmAgentVersion - Backup engine Agent version 9778 DpmAgentVersion *string `json:"dpmAgentVersion,omitempty"` 9779 // DpmServers - List of BackupEngines protecting the container 9780 DpmServers *[]string `json:"dpmServers,omitempty"` 9781 // UpgradeAvailable - To check if upgrade available 9782 UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` 9783 // ProtectionStatus - Protection status of the container. 9784 ProtectionStatus *string `json:"protectionStatus,omitempty"` 9785 // ExtendedInfo - Extended Info of the container. 9786 ExtendedInfo *DPMContainerExtendedInfo `json:"extendedInfo,omitempty"` 9787 // FriendlyName - Friendly name of the container. 9788 FriendlyName *string `json:"friendlyName,omitempty"` 9789 // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 9790 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 9791 // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. 9792 RegistrationStatus *string `json:"registrationStatus,omitempty"` 9793 // HealthStatus - Status of health of the container. 9794 HealthStatus *string `json:"healthStatus,omitempty"` 9795 // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' 9796 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` 9797} 9798 9799func unmarshalBasicDpmContainer(body []byte) (BasicDpmContainer, error) { 9800 var m map[string]interface{} 9801 err := json.Unmarshal(body, &m) 9802 if err != nil { 9803 return nil, err 9804 } 9805 9806 switch m["containerType"] { 9807 case string(ContainerTypeAzureBackupServerContainer1): 9808 var absc AzureBackupServerContainer 9809 err := json.Unmarshal(body, &absc) 9810 return absc, err 9811 default: 9812 var dc DpmContainer 9813 err := json.Unmarshal(body, &dc) 9814 return dc, err 9815 } 9816} 9817func unmarshalBasicDpmContainerArray(body []byte) ([]BasicDpmContainer, error) { 9818 var rawMessages []*json.RawMessage 9819 err := json.Unmarshal(body, &rawMessages) 9820 if err != nil { 9821 return nil, err 9822 } 9823 9824 dcArray := make([]BasicDpmContainer, len(rawMessages)) 9825 9826 for index, rawMessage := range rawMessages { 9827 dc, err := unmarshalBasicDpmContainer(*rawMessage) 9828 if err != nil { 9829 return nil, err 9830 } 9831 dcArray[index] = dc 9832 } 9833 return dcArray, nil 9834} 9835 9836// MarshalJSON is the custom marshaler for DpmContainer. 9837func (dc DpmContainer) MarshalJSON() ([]byte, error) { 9838 dc.ContainerType = ContainerTypeDPMContainer1 9839 objectMap := make(map[string]interface{}) 9840 if dc.CanReRegister != nil { 9841 objectMap["canReRegister"] = dc.CanReRegister 9842 } 9843 if dc.ContainerID != nil { 9844 objectMap["containerId"] = dc.ContainerID 9845 } 9846 if dc.ProtectedItemCount != nil { 9847 objectMap["protectedItemCount"] = dc.ProtectedItemCount 9848 } 9849 if dc.DpmAgentVersion != nil { 9850 objectMap["dpmAgentVersion"] = dc.DpmAgentVersion 9851 } 9852 if dc.DpmServers != nil { 9853 objectMap["dpmServers"] = dc.DpmServers 9854 } 9855 if dc.UpgradeAvailable != nil { 9856 objectMap["upgradeAvailable"] = dc.UpgradeAvailable 9857 } 9858 if dc.ProtectionStatus != nil { 9859 objectMap["protectionStatus"] = dc.ProtectionStatus 9860 } 9861 if dc.ExtendedInfo != nil { 9862 objectMap["extendedInfo"] = dc.ExtendedInfo 9863 } 9864 if dc.FriendlyName != nil { 9865 objectMap["friendlyName"] = dc.FriendlyName 9866 } 9867 if dc.BackupManagementType != "" { 9868 objectMap["backupManagementType"] = dc.BackupManagementType 9869 } 9870 if dc.RegistrationStatus != nil { 9871 objectMap["registrationStatus"] = dc.RegistrationStatus 9872 } 9873 if dc.HealthStatus != nil { 9874 objectMap["healthStatus"] = dc.HealthStatus 9875 } 9876 if dc.ContainerType != "" { 9877 objectMap["containerType"] = dc.ContainerType 9878 } 9879 return json.Marshal(objectMap) 9880} 9881 9882// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for DpmContainer. 9883func (dc DpmContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { 9884 return nil, false 9885} 9886 9887// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for DpmContainer. 9888func (dc DpmContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { 9889 return nil, false 9890} 9891 9892// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for DpmContainer. 9893func (dc DpmContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { 9894 return nil, false 9895} 9896 9897// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for DpmContainer. 9898func (dc DpmContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { 9899 return nil, false 9900} 9901 9902// AsAzureSQLContainer is the BasicProtectionContainer implementation for DpmContainer. 9903func (dc DpmContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { 9904 return nil, false 9905} 9906 9907// AsAzureStorageContainer is the BasicProtectionContainer implementation for DpmContainer. 9908func (dc DpmContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { 9909 return nil, false 9910} 9911 9912// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for DpmContainer. 9913func (dc DpmContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { 9914 return nil, false 9915} 9916 9917// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for DpmContainer. 9918func (dc DpmContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { 9919 return nil, false 9920} 9921 9922// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for DpmContainer. 9923func (dc DpmContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { 9924 return nil, false 9925} 9926 9927// AsDpmContainer is the BasicProtectionContainer implementation for DpmContainer. 9928func (dc DpmContainer) AsDpmContainer() (*DpmContainer, bool) { 9929 return &dc, true 9930} 9931 9932// AsBasicDpmContainer is the BasicProtectionContainer implementation for DpmContainer. 9933func (dc DpmContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { 9934 return &dc, true 9935} 9936 9937// AsGenericContainer is the BasicProtectionContainer implementation for DpmContainer. 9938func (dc DpmContainer) AsGenericContainer() (*GenericContainer, bool) { 9939 return nil, false 9940} 9941 9942// AsIaaSVMContainer is the BasicProtectionContainer implementation for DpmContainer. 9943func (dc DpmContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { 9944 return nil, false 9945} 9946 9947// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for DpmContainer. 9948func (dc DpmContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { 9949 return nil, false 9950} 9951 9952// AsMabContainer is the BasicProtectionContainer implementation for DpmContainer. 9953func (dc DpmContainer) AsMabContainer() (*MabContainer, bool) { 9954 return nil, false 9955} 9956 9957// AsProtectionContainer is the BasicProtectionContainer implementation for DpmContainer. 9958func (dc DpmContainer) AsProtectionContainer() (*ProtectionContainer, bool) { 9959 return nil, false 9960} 9961 9962// AsBasicProtectionContainer is the BasicProtectionContainer implementation for DpmContainer. 9963func (dc DpmContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { 9964 return &dc, true 9965} 9966 9967// DPMContainerExtendedInfo additional information of the DPMContainer. 9968type DPMContainerExtendedInfo struct { 9969 // LastRefreshedAt - Last refresh time of the DPMContainer. 9970 LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"` 9971} 9972 9973// DpmErrorInfo DPM workload-specific error information. 9974type DpmErrorInfo struct { 9975 // ErrorString - Localized error string. 9976 ErrorString *string `json:"errorString,omitempty"` 9977 // Recommendations - List of localized recommendations for above error code. 9978 Recommendations *[]string `json:"recommendations,omitempty"` 9979} 9980 9981// DpmJob DPM workload-specific job object. 9982type DpmJob struct { 9983 // Duration - Time elapsed for job. 9984 Duration *string `json:"duration,omitempty"` 9985 // DpmServerName - DPM server name managing the backup item or backup job. 9986 DpmServerName *string `json:"dpmServerName,omitempty"` 9987 // ContainerName - Name of cluster/server protecting current backup item, if any. 9988 ContainerName *string `json:"containerName,omitempty"` 9989 // ContainerType - Type of container. 9990 ContainerType *string `json:"containerType,omitempty"` 9991 // WorkloadType - Type of backup item. 9992 WorkloadType *string `json:"workloadType,omitempty"` 9993 // ActionsInfo - The state/actions applicable on this job like cancel/retry. 9994 ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"` 9995 // ErrorDetails - The errors. 9996 ErrorDetails *[]DpmErrorInfo `json:"errorDetails,omitempty"` 9997 // ExtendedInfo - Additional information for this job. 9998 ExtendedInfo *DpmJobExtendedInfo `json:"extendedInfo,omitempty"` 9999 // EntityFriendlyName - Friendly name of the entity on which the current job is executing. 10000 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` 10001 // BackupManagementType - Backup management type to execute the current job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 10002 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 10003 // Operation - The operation name. 10004 Operation *string `json:"operation,omitempty"` 10005 // Status - Job status. 10006 Status *string `json:"status,omitempty"` 10007 // StartTime - The start time. 10008 StartTime *date.Time `json:"startTime,omitempty"` 10009 // EndTime - The end time. 10010 EndTime *date.Time `json:"endTime,omitempty"` 10011 // ActivityID - ActivityId of job. 10012 ActivityID *string `json:"activityId,omitempty"` 10013 // JobType - Possible values include: 'JobTypeJob', 'JobTypeAzureIaaSVMJob', 'JobTypeAzureStorageJob', 'JobTypeAzureWorkloadJob', 'JobTypeDpmJob', 'JobTypeMabJob' 10014 JobType JobType `json:"jobType,omitempty"` 10015} 10016 10017// MarshalJSON is the custom marshaler for DpmJob. 10018func (dj DpmJob) MarshalJSON() ([]byte, error) { 10019 dj.JobType = JobTypeDpmJob 10020 objectMap := make(map[string]interface{}) 10021 if dj.Duration != nil { 10022 objectMap["duration"] = dj.Duration 10023 } 10024 if dj.DpmServerName != nil { 10025 objectMap["dpmServerName"] = dj.DpmServerName 10026 } 10027 if dj.ContainerName != nil { 10028 objectMap["containerName"] = dj.ContainerName 10029 } 10030 if dj.ContainerType != nil { 10031 objectMap["containerType"] = dj.ContainerType 10032 } 10033 if dj.WorkloadType != nil { 10034 objectMap["workloadType"] = dj.WorkloadType 10035 } 10036 if dj.ActionsInfo != nil { 10037 objectMap["actionsInfo"] = dj.ActionsInfo 10038 } 10039 if dj.ErrorDetails != nil { 10040 objectMap["errorDetails"] = dj.ErrorDetails 10041 } 10042 if dj.ExtendedInfo != nil { 10043 objectMap["extendedInfo"] = dj.ExtendedInfo 10044 } 10045 if dj.EntityFriendlyName != nil { 10046 objectMap["entityFriendlyName"] = dj.EntityFriendlyName 10047 } 10048 if dj.BackupManagementType != "" { 10049 objectMap["backupManagementType"] = dj.BackupManagementType 10050 } 10051 if dj.Operation != nil { 10052 objectMap["operation"] = dj.Operation 10053 } 10054 if dj.Status != nil { 10055 objectMap["status"] = dj.Status 10056 } 10057 if dj.StartTime != nil { 10058 objectMap["startTime"] = dj.StartTime 10059 } 10060 if dj.EndTime != nil { 10061 objectMap["endTime"] = dj.EndTime 10062 } 10063 if dj.ActivityID != nil { 10064 objectMap["activityId"] = dj.ActivityID 10065 } 10066 if dj.JobType != "" { 10067 objectMap["jobType"] = dj.JobType 10068 } 10069 return json.Marshal(objectMap) 10070} 10071 10072// AsAzureIaaSVMJob is the BasicJob implementation for DpmJob. 10073func (dj DpmJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) { 10074 return nil, false 10075} 10076 10077// AsAzureStorageJob is the BasicJob implementation for DpmJob. 10078func (dj DpmJob) AsAzureStorageJob() (*AzureStorageJob, bool) { 10079 return nil, false 10080} 10081 10082// AsAzureWorkloadJob is the BasicJob implementation for DpmJob. 10083func (dj DpmJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) { 10084 return nil, false 10085} 10086 10087// AsDpmJob is the BasicJob implementation for DpmJob. 10088func (dj DpmJob) AsDpmJob() (*DpmJob, bool) { 10089 return &dj, true 10090} 10091 10092// AsMabJob is the BasicJob implementation for DpmJob. 10093func (dj DpmJob) AsMabJob() (*MabJob, bool) { 10094 return nil, false 10095} 10096 10097// AsJob is the BasicJob implementation for DpmJob. 10098func (dj DpmJob) AsJob() (*Job, bool) { 10099 return nil, false 10100} 10101 10102// AsBasicJob is the BasicJob implementation for DpmJob. 10103func (dj DpmJob) AsBasicJob() (BasicJob, bool) { 10104 return &dj, true 10105} 10106 10107// DpmJobExtendedInfo additional information on the DPM workload-specific job. 10108type DpmJobExtendedInfo struct { 10109 // TasksList - List of tasks associated with this job. 10110 TasksList *[]DpmJobTaskDetails `json:"tasksList,omitempty"` 10111 // PropertyBag - The job properties. 10112 PropertyBag map[string]*string `json:"propertyBag"` 10113 // DynamicErrorMessage - Non localized error message on job execution. 10114 DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"` 10115} 10116 10117// MarshalJSON is the custom marshaler for DpmJobExtendedInfo. 10118func (djei DpmJobExtendedInfo) MarshalJSON() ([]byte, error) { 10119 objectMap := make(map[string]interface{}) 10120 if djei.TasksList != nil { 10121 objectMap["tasksList"] = djei.TasksList 10122 } 10123 if djei.PropertyBag != nil { 10124 objectMap["propertyBag"] = djei.PropertyBag 10125 } 10126 if djei.DynamicErrorMessage != nil { 10127 objectMap["dynamicErrorMessage"] = djei.DynamicErrorMessage 10128 } 10129 return json.Marshal(objectMap) 10130} 10131 10132// DpmJobTaskDetails DPM workload-specific job task details. 10133type DpmJobTaskDetails struct { 10134 // TaskID - The task display name. 10135 TaskID *string `json:"taskId,omitempty"` 10136 // StartTime - The start time. 10137 StartTime *date.Time `json:"startTime,omitempty"` 10138 // EndTime - The end time. 10139 EndTime *date.Time `json:"endTime,omitempty"` 10140 // Duration - Time elapsed for task. 10141 Duration *string `json:"duration,omitempty"` 10142 // Status - The status. 10143 Status *string `json:"status,omitempty"` 10144} 10145 10146// DPMProtectedItem additional information on Backup engine specific backup item. 10147type DPMProtectedItem struct { 10148 // FriendlyName - Friendly name of the managed item 10149 FriendlyName *string `json:"friendlyName,omitempty"` 10150 // BackupEngineName - Backup Management server protecting this backup item 10151 BackupEngineName *string `json:"backupEngineName,omitempty"` 10152 // ProtectionState - Protection state of the backup engine. Possible values include: 'ProtectedItemStateInvalid', 'ProtectedItemStateIRPending', 'ProtectedItemStateProtected', 'ProtectedItemStateProtectionError', 'ProtectedItemStateProtectionStopped', 'ProtectedItemStateProtectionPaused' 10153 ProtectionState ProtectedItemState `json:"protectionState,omitempty"` 10154 // ExtendedInfo - Extended info of the backup item. 10155 ExtendedInfo *DPMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` 10156 // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 10157 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 10158 // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' 10159 WorkloadType DataSourceType `json:"workloadType,omitempty"` 10160 // ContainerName - Unique name of container 10161 ContainerName *string `json:"containerName,omitempty"` 10162 // SourceResourceID - ARM ID of the resource to be backed up. 10163 SourceResourceID *string `json:"sourceResourceId,omitempty"` 10164 // PolicyID - ID of the backup policy with which this item is backed up. 10165 PolicyID *string `json:"policyId,omitempty"` 10166 // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. 10167 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` 10168 // BackupSetName - Name of the backup set the backup item belongs to 10169 BackupSetName *string `json:"backupSetName,omitempty"` 10170 // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' 10171 CreateMode CreateMode `json:"createMode,omitempty"` 10172 // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC 10173 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` 10174 // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete 10175 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` 10176 // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted 10177 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` 10178 // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon 10179 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` 10180 // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state 10181 IsRehydrate *bool `json:"isRehydrate,omitempty"` 10182 // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' 10183 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` 10184} 10185 10186// MarshalJSON is the custom marshaler for DPMProtectedItem. 10187func (dpi DPMProtectedItem) MarshalJSON() ([]byte, error) { 10188 dpi.ProtectedItemType = ProtectedItemTypeDPMProtectedItem 10189 objectMap := make(map[string]interface{}) 10190 if dpi.FriendlyName != nil { 10191 objectMap["friendlyName"] = dpi.FriendlyName 10192 } 10193 if dpi.BackupEngineName != nil { 10194 objectMap["backupEngineName"] = dpi.BackupEngineName 10195 } 10196 if dpi.ProtectionState != "" { 10197 objectMap["protectionState"] = dpi.ProtectionState 10198 } 10199 if dpi.ExtendedInfo != nil { 10200 objectMap["extendedInfo"] = dpi.ExtendedInfo 10201 } 10202 if dpi.BackupManagementType != "" { 10203 objectMap["backupManagementType"] = dpi.BackupManagementType 10204 } 10205 if dpi.WorkloadType != "" { 10206 objectMap["workloadType"] = dpi.WorkloadType 10207 } 10208 if dpi.ContainerName != nil { 10209 objectMap["containerName"] = dpi.ContainerName 10210 } 10211 if dpi.SourceResourceID != nil { 10212 objectMap["sourceResourceId"] = dpi.SourceResourceID 10213 } 10214 if dpi.PolicyID != nil { 10215 objectMap["policyId"] = dpi.PolicyID 10216 } 10217 if dpi.LastRecoveryPoint != nil { 10218 objectMap["lastRecoveryPoint"] = dpi.LastRecoveryPoint 10219 } 10220 if dpi.BackupSetName != nil { 10221 objectMap["backupSetName"] = dpi.BackupSetName 10222 } 10223 if dpi.CreateMode != "" { 10224 objectMap["createMode"] = dpi.CreateMode 10225 } 10226 if dpi.DeferredDeleteTimeInUTC != nil { 10227 objectMap["deferredDeleteTimeInUTC"] = dpi.DeferredDeleteTimeInUTC 10228 } 10229 if dpi.IsScheduledForDeferredDelete != nil { 10230 objectMap["isScheduledForDeferredDelete"] = dpi.IsScheduledForDeferredDelete 10231 } 10232 if dpi.DeferredDeleteTimeRemaining != nil { 10233 objectMap["deferredDeleteTimeRemaining"] = dpi.DeferredDeleteTimeRemaining 10234 } 10235 if dpi.IsDeferredDeleteScheduleUpcoming != nil { 10236 objectMap["isDeferredDeleteScheduleUpcoming"] = dpi.IsDeferredDeleteScheduleUpcoming 10237 } 10238 if dpi.IsRehydrate != nil { 10239 objectMap["isRehydrate"] = dpi.IsRehydrate 10240 } 10241 if dpi.ProtectedItemType != "" { 10242 objectMap["protectedItemType"] = dpi.ProtectedItemType 10243 } 10244 return json.Marshal(objectMap) 10245} 10246 10247// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10248func (dpi DPMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { 10249 return nil, false 10250} 10251 10252// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10253func (dpi DPMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { 10254 return nil, false 10255} 10256 10257// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10258func (dpi DPMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { 10259 return nil, false 10260} 10261 10262// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10263func (dpi DPMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { 10264 return nil, false 10265} 10266 10267// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10268func (dpi DPMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { 10269 return nil, false 10270} 10271 10272// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10273func (dpi DPMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { 10274 return nil, false 10275} 10276 10277// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10278func (dpi DPMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { 10279 return nil, false 10280} 10281 10282// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10283func (dpi DPMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { 10284 return nil, false 10285} 10286 10287// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10288func (dpi DPMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { 10289 return nil, false 10290} 10291 10292// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10293func (dpi DPMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { 10294 return nil, false 10295} 10296 10297// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10298func (dpi DPMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { 10299 return nil, false 10300} 10301 10302// AsDPMProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10303func (dpi DPMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { 10304 return &dpi, true 10305} 10306 10307// AsGenericProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10308func (dpi DPMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { 10309 return nil, false 10310} 10311 10312// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10313func (dpi DPMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { 10314 return nil, false 10315} 10316 10317// AsProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10318func (dpi DPMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { 10319 return nil, false 10320} 10321 10322// AsBasicProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10323func (dpi DPMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { 10324 return &dpi, true 10325} 10326 10327// DPMProtectedItemExtendedInfo additional information of DPM Protected item. 10328type DPMProtectedItemExtendedInfo struct { 10329 // ProtectableObjectLoadPath - Attribute to provide information on various DBs. 10330 ProtectableObjectLoadPath map[string]*string `json:"protectableObjectLoadPath"` 10331 // Protected - To check if backup item is disk protected. 10332 Protected *bool `json:"protected,omitempty"` 10333 // IsPresentOnCloud - To check if backup item is cloud protected. 10334 IsPresentOnCloud *bool `json:"isPresentOnCloud,omitempty"` 10335 // LastBackupStatus - Last backup status information on backup item. 10336 LastBackupStatus *string `json:"lastBackupStatus,omitempty"` 10337 // LastRefreshedAt - Last refresh time on backup item. 10338 LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"` 10339 // OldestRecoveryPoint - Oldest cloud recovery point time. 10340 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"` 10341 // RecoveryPointCount - cloud recovery point count. 10342 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"` 10343 // OnPremiseOldestRecoveryPoint - Oldest disk recovery point time. 10344 OnPremiseOldestRecoveryPoint *date.Time `json:"onPremiseOldestRecoveryPoint,omitempty"` 10345 // OnPremiseLatestRecoveryPoint - latest disk recovery point time. 10346 OnPremiseLatestRecoveryPoint *date.Time `json:"onPremiseLatestRecoveryPoint,omitempty"` 10347 // OnPremiseRecoveryPointCount - disk recovery point count. 10348 OnPremiseRecoveryPointCount *int32 `json:"onPremiseRecoveryPointCount,omitempty"` 10349 // IsCollocated - To check if backup item is collocated. 10350 IsCollocated *bool `json:"isCollocated,omitempty"` 10351 // ProtectionGroupName - Protection group name of the backup item. 10352 ProtectionGroupName *string `json:"protectionGroupName,omitempty"` 10353 // DiskStorageUsedInBytes - Used Disk storage in bytes. 10354 DiskStorageUsedInBytes *string `json:"diskStorageUsedInBytes,omitempty"` 10355 // TotalDiskStorageSizeInBytes - total Disk storage in bytes. 10356 TotalDiskStorageSizeInBytes *string `json:"totalDiskStorageSizeInBytes,omitempty"` 10357} 10358 10359// MarshalJSON is the custom marshaler for DPMProtectedItemExtendedInfo. 10360func (dpiei DPMProtectedItemExtendedInfo) MarshalJSON() ([]byte, error) { 10361 objectMap := make(map[string]interface{}) 10362 if dpiei.ProtectableObjectLoadPath != nil { 10363 objectMap["protectableObjectLoadPath"] = dpiei.ProtectableObjectLoadPath 10364 } 10365 if dpiei.Protected != nil { 10366 objectMap["protected"] = dpiei.Protected 10367 } 10368 if dpiei.IsPresentOnCloud != nil { 10369 objectMap["isPresentOnCloud"] = dpiei.IsPresentOnCloud 10370 } 10371 if dpiei.LastBackupStatus != nil { 10372 objectMap["lastBackupStatus"] = dpiei.LastBackupStatus 10373 } 10374 if dpiei.LastRefreshedAt != nil { 10375 objectMap["lastRefreshedAt"] = dpiei.LastRefreshedAt 10376 } 10377 if dpiei.OldestRecoveryPoint != nil { 10378 objectMap["oldestRecoveryPoint"] = dpiei.OldestRecoveryPoint 10379 } 10380 if dpiei.RecoveryPointCount != nil { 10381 objectMap["recoveryPointCount"] = dpiei.RecoveryPointCount 10382 } 10383 if dpiei.OnPremiseOldestRecoveryPoint != nil { 10384 objectMap["onPremiseOldestRecoveryPoint"] = dpiei.OnPremiseOldestRecoveryPoint 10385 } 10386 if dpiei.OnPremiseLatestRecoveryPoint != nil { 10387 objectMap["onPremiseLatestRecoveryPoint"] = dpiei.OnPremiseLatestRecoveryPoint 10388 } 10389 if dpiei.OnPremiseRecoveryPointCount != nil { 10390 objectMap["onPremiseRecoveryPointCount"] = dpiei.OnPremiseRecoveryPointCount 10391 } 10392 if dpiei.IsCollocated != nil { 10393 objectMap["isCollocated"] = dpiei.IsCollocated 10394 } 10395 if dpiei.ProtectionGroupName != nil { 10396 objectMap["protectionGroupName"] = dpiei.ProtectionGroupName 10397 } 10398 if dpiei.DiskStorageUsedInBytes != nil { 10399 objectMap["diskStorageUsedInBytes"] = dpiei.DiskStorageUsedInBytes 10400 } 10401 if dpiei.TotalDiskStorageSizeInBytes != nil { 10402 objectMap["totalDiskStorageSizeInBytes"] = dpiei.TotalDiskStorageSizeInBytes 10403 } 10404 return json.Marshal(objectMap) 10405} 10406 10407// EncryptionDetails details needed if the VM was encrypted at the time of backup. 10408type EncryptionDetails struct { 10409 // EncryptionEnabled - Identifies whether this backup copy represents an encrypted VM at the time of backup. 10410 EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"` 10411 // KekURL - Key Url. 10412 KekURL *string `json:"kekUrl,omitempty"` 10413 // SecretKeyURL - Secret Url. 10414 SecretKeyURL *string `json:"secretKeyUrl,omitempty"` 10415 // KekVaultID - ID of Key Vault where KEK is stored. 10416 KekVaultID *string `json:"kekVaultId,omitempty"` 10417 // SecretKeyVaultID - ID of Key Vault where Secret is stored. 10418 SecretKeyVaultID *string `json:"secretKeyVaultId,omitempty"` 10419} 10420 10421// BasicEngineBase the base backup engine class. All workload specific backup engines derive from this class. 10422type BasicEngineBase interface { 10423 AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) 10424 AsDpmBackupEngine() (*DpmBackupEngine, bool) 10425 AsEngineBase() (*EngineBase, bool) 10426} 10427 10428// EngineBase the base backup engine class. All workload specific backup engines derive from this class. 10429type EngineBase struct { 10430 // FriendlyName - Friendly name of the backup engine. 10431 FriendlyName *string `json:"friendlyName,omitempty"` 10432 // BackupManagementType - Type of backup management for the backup engine. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 10433 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 10434 // RegistrationStatus - Registration status of the backup engine with the Recovery Services Vault. 10435 RegistrationStatus *string `json:"registrationStatus,omitempty"` 10436 // BackupEngineState - Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed} 10437 BackupEngineState *string `json:"backupEngineState,omitempty"` 10438 // HealthStatus - Backup status of the backup engine. 10439 HealthStatus *string `json:"healthStatus,omitempty"` 10440 // CanReRegister - Flag indicating if the backup engine be registered, once already registered. 10441 CanReRegister *bool `json:"canReRegister,omitempty"` 10442 // BackupEngineID - ID of the backup engine. 10443 BackupEngineID *string `json:"backupEngineId,omitempty"` 10444 // DpmVersion - Backup engine version 10445 DpmVersion *string `json:"dpmVersion,omitempty"` 10446 // AzureBackupAgentVersion - Backup agent version 10447 AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"` 10448 // IsAzureBackupAgentUpgradeAvailable - To check if backup agent upgrade available 10449 IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"` 10450 // IsDpmUpgradeAvailable - To check if backup engine upgrade available 10451 IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"` 10452 // ExtendedInfo - Extended info of the backupengine 10453 ExtendedInfo *EngineExtendedInfo `json:"extendedInfo,omitempty"` 10454 // BackupEngineType - Possible values include: 'BackupEngineTypeBackupEngineBase', 'BackupEngineTypeAzureBackupServerEngine', 'BackupEngineTypeDpmBackupEngine' 10455 BackupEngineType EngineType `json:"backupEngineType,omitempty"` 10456} 10457 10458func unmarshalBasicEngineBase(body []byte) (BasicEngineBase, error) { 10459 var m map[string]interface{} 10460 err := json.Unmarshal(body, &m) 10461 if err != nil { 10462 return nil, err 10463 } 10464 10465 switch m["backupEngineType"] { 10466 case string(BackupEngineTypeAzureBackupServerEngine): 10467 var abse AzureBackupServerEngine 10468 err := json.Unmarshal(body, &abse) 10469 return abse, err 10470 case string(BackupEngineTypeDpmBackupEngine): 10471 var dbe DpmBackupEngine 10472 err := json.Unmarshal(body, &dbe) 10473 return dbe, err 10474 default: 10475 var eb EngineBase 10476 err := json.Unmarshal(body, &eb) 10477 return eb, err 10478 } 10479} 10480func unmarshalBasicEngineBaseArray(body []byte) ([]BasicEngineBase, error) { 10481 var rawMessages []*json.RawMessage 10482 err := json.Unmarshal(body, &rawMessages) 10483 if err != nil { 10484 return nil, err 10485 } 10486 10487 ebArray := make([]BasicEngineBase, len(rawMessages)) 10488 10489 for index, rawMessage := range rawMessages { 10490 eb, err := unmarshalBasicEngineBase(*rawMessage) 10491 if err != nil { 10492 return nil, err 10493 } 10494 ebArray[index] = eb 10495 } 10496 return ebArray, nil 10497} 10498 10499// MarshalJSON is the custom marshaler for EngineBase. 10500func (eb EngineBase) MarshalJSON() ([]byte, error) { 10501 eb.BackupEngineType = BackupEngineTypeBackupEngineBase 10502 objectMap := make(map[string]interface{}) 10503 if eb.FriendlyName != nil { 10504 objectMap["friendlyName"] = eb.FriendlyName 10505 } 10506 if eb.BackupManagementType != "" { 10507 objectMap["backupManagementType"] = eb.BackupManagementType 10508 } 10509 if eb.RegistrationStatus != nil { 10510 objectMap["registrationStatus"] = eb.RegistrationStatus 10511 } 10512 if eb.BackupEngineState != nil { 10513 objectMap["backupEngineState"] = eb.BackupEngineState 10514 } 10515 if eb.HealthStatus != nil { 10516 objectMap["healthStatus"] = eb.HealthStatus 10517 } 10518 if eb.CanReRegister != nil { 10519 objectMap["canReRegister"] = eb.CanReRegister 10520 } 10521 if eb.BackupEngineID != nil { 10522 objectMap["backupEngineId"] = eb.BackupEngineID 10523 } 10524 if eb.DpmVersion != nil { 10525 objectMap["dpmVersion"] = eb.DpmVersion 10526 } 10527 if eb.AzureBackupAgentVersion != nil { 10528 objectMap["azureBackupAgentVersion"] = eb.AzureBackupAgentVersion 10529 } 10530 if eb.IsAzureBackupAgentUpgradeAvailable != nil { 10531 objectMap["isAzureBackupAgentUpgradeAvailable"] = eb.IsAzureBackupAgentUpgradeAvailable 10532 } 10533 if eb.IsDpmUpgradeAvailable != nil { 10534 objectMap["isDpmUpgradeAvailable"] = eb.IsDpmUpgradeAvailable 10535 } 10536 if eb.ExtendedInfo != nil { 10537 objectMap["extendedInfo"] = eb.ExtendedInfo 10538 } 10539 if eb.BackupEngineType != "" { 10540 objectMap["backupEngineType"] = eb.BackupEngineType 10541 } 10542 return json.Marshal(objectMap) 10543} 10544 10545// AsAzureBackupServerEngine is the BasicEngineBase implementation for EngineBase. 10546func (eb EngineBase) AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) { 10547 return nil, false 10548} 10549 10550// AsDpmBackupEngine is the BasicEngineBase implementation for EngineBase. 10551func (eb EngineBase) AsDpmBackupEngine() (*DpmBackupEngine, bool) { 10552 return nil, false 10553} 10554 10555// AsEngineBase is the BasicEngineBase implementation for EngineBase. 10556func (eb EngineBase) AsEngineBase() (*EngineBase, bool) { 10557 return &eb, true 10558} 10559 10560// AsBasicEngineBase is the BasicEngineBase implementation for EngineBase. 10561func (eb EngineBase) AsBasicEngineBase() (BasicEngineBase, bool) { 10562 return &eb, true 10563} 10564 10565// EngineBaseResource the base backup engine class. All workload specific backup engines derive from this 10566// class. 10567type EngineBaseResource struct { 10568 autorest.Response `json:"-"` 10569 // Properties - BackupEngineBaseResource properties 10570 Properties BasicEngineBase `json:"properties,omitempty"` 10571 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 10572 ID *string `json:"id,omitempty"` 10573 // Name - READ-ONLY; Resource name associated with the resource. 10574 Name *string `json:"name,omitempty"` 10575 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 10576 Type *string `json:"type,omitempty"` 10577 // Location - Resource location. 10578 Location *string `json:"location,omitempty"` 10579 // Tags - Resource tags. 10580 Tags map[string]*string `json:"tags"` 10581 // ETag - Optional ETag. 10582 ETag *string `json:"eTag,omitempty"` 10583} 10584 10585// MarshalJSON is the custom marshaler for EngineBaseResource. 10586func (ebr EngineBaseResource) MarshalJSON() ([]byte, error) { 10587 objectMap := make(map[string]interface{}) 10588 objectMap["properties"] = ebr.Properties 10589 if ebr.Location != nil { 10590 objectMap["location"] = ebr.Location 10591 } 10592 if ebr.Tags != nil { 10593 objectMap["tags"] = ebr.Tags 10594 } 10595 if ebr.ETag != nil { 10596 objectMap["eTag"] = ebr.ETag 10597 } 10598 return json.Marshal(objectMap) 10599} 10600 10601// UnmarshalJSON is the custom unmarshaler for EngineBaseResource struct. 10602func (ebr *EngineBaseResource) UnmarshalJSON(body []byte) error { 10603 var m map[string]*json.RawMessage 10604 err := json.Unmarshal(body, &m) 10605 if err != nil { 10606 return err 10607 } 10608 for k, v := range m { 10609 switch k { 10610 case "properties": 10611 if v != nil { 10612 properties, err := unmarshalBasicEngineBase(*v) 10613 if err != nil { 10614 return err 10615 } 10616 ebr.Properties = properties 10617 } 10618 case "id": 10619 if v != nil { 10620 var ID string 10621 err = json.Unmarshal(*v, &ID) 10622 if err != nil { 10623 return err 10624 } 10625 ebr.ID = &ID 10626 } 10627 case "name": 10628 if v != nil { 10629 var name string 10630 err = json.Unmarshal(*v, &name) 10631 if err != nil { 10632 return err 10633 } 10634 ebr.Name = &name 10635 } 10636 case "type": 10637 if v != nil { 10638 var typeVar string 10639 err = json.Unmarshal(*v, &typeVar) 10640 if err != nil { 10641 return err 10642 } 10643 ebr.Type = &typeVar 10644 } 10645 case "location": 10646 if v != nil { 10647 var location string 10648 err = json.Unmarshal(*v, &location) 10649 if err != nil { 10650 return err 10651 } 10652 ebr.Location = &location 10653 } 10654 case "tags": 10655 if v != nil { 10656 var tags map[string]*string 10657 err = json.Unmarshal(*v, &tags) 10658 if err != nil { 10659 return err 10660 } 10661 ebr.Tags = tags 10662 } 10663 case "eTag": 10664 if v != nil { 10665 var eTag string 10666 err = json.Unmarshal(*v, &eTag) 10667 if err != nil { 10668 return err 10669 } 10670 ebr.ETag = &eTag 10671 } 10672 } 10673 } 10674 10675 return nil 10676} 10677 10678// EngineBaseResourceList list of BackupEngineBase resources 10679type EngineBaseResourceList struct { 10680 autorest.Response `json:"-"` 10681 // Value - List of resources. 10682 Value *[]EngineBaseResource `json:"value,omitempty"` 10683 // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. 10684 NextLink *string `json:"nextLink,omitempty"` 10685} 10686 10687// EngineBaseResourceListIterator provides access to a complete listing of EngineBaseResource values. 10688type EngineBaseResourceListIterator struct { 10689 i int 10690 page EngineBaseResourceListPage 10691} 10692 10693// NextWithContext advances to the next value. If there was an error making 10694// the request the iterator does not advance and the error is returned. 10695func (iter *EngineBaseResourceListIterator) NextWithContext(ctx context.Context) (err error) { 10696 if tracing.IsEnabled() { 10697 ctx = tracing.StartSpan(ctx, fqdn+"/EngineBaseResourceListIterator.NextWithContext") 10698 defer func() { 10699 sc := -1 10700 if iter.Response().Response.Response != nil { 10701 sc = iter.Response().Response.Response.StatusCode 10702 } 10703 tracing.EndSpan(ctx, sc, err) 10704 }() 10705 } 10706 iter.i++ 10707 if iter.i < len(iter.page.Values()) { 10708 return nil 10709 } 10710 err = iter.page.NextWithContext(ctx) 10711 if err != nil { 10712 iter.i-- 10713 return err 10714 } 10715 iter.i = 0 10716 return nil 10717} 10718 10719// Next advances to the next value. If there was an error making 10720// the request the iterator does not advance and the error is returned. 10721// Deprecated: Use NextWithContext() instead. 10722func (iter *EngineBaseResourceListIterator) Next() error { 10723 return iter.NextWithContext(context.Background()) 10724} 10725 10726// NotDone returns true if the enumeration should be started or is not yet complete. 10727func (iter EngineBaseResourceListIterator) NotDone() bool { 10728 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 10729} 10730 10731// Response returns the raw server response from the last page request. 10732func (iter EngineBaseResourceListIterator) Response() EngineBaseResourceList { 10733 return iter.page.Response() 10734} 10735 10736// Value returns the current value or a zero-initialized value if the 10737// iterator has advanced beyond the end of the collection. 10738func (iter EngineBaseResourceListIterator) Value() EngineBaseResource { 10739 if !iter.page.NotDone() { 10740 return EngineBaseResource{} 10741 } 10742 return iter.page.Values()[iter.i] 10743} 10744 10745// Creates a new instance of the EngineBaseResourceListIterator type. 10746func NewEngineBaseResourceListIterator(page EngineBaseResourceListPage) EngineBaseResourceListIterator { 10747 return EngineBaseResourceListIterator{page: page} 10748} 10749 10750// IsEmpty returns true if the ListResult contains no values. 10751func (ebrl EngineBaseResourceList) IsEmpty() bool { 10752 return ebrl.Value == nil || len(*ebrl.Value) == 0 10753} 10754 10755// hasNextLink returns true if the NextLink is not empty. 10756func (ebrl EngineBaseResourceList) hasNextLink() bool { 10757 return ebrl.NextLink != nil && len(*ebrl.NextLink) != 0 10758} 10759 10760// engineBaseResourceListPreparer prepares a request to retrieve the next set of results. 10761// It returns nil if no more results exist. 10762func (ebrl EngineBaseResourceList) engineBaseResourceListPreparer(ctx context.Context) (*http.Request, error) { 10763 if !ebrl.hasNextLink() { 10764 return nil, nil 10765 } 10766 return autorest.Prepare((&http.Request{}).WithContext(ctx), 10767 autorest.AsJSON(), 10768 autorest.AsGet(), 10769 autorest.WithBaseURL(to.String(ebrl.NextLink))) 10770} 10771 10772// EngineBaseResourceListPage contains a page of EngineBaseResource values. 10773type EngineBaseResourceListPage struct { 10774 fn func(context.Context, EngineBaseResourceList) (EngineBaseResourceList, error) 10775 ebrl EngineBaseResourceList 10776} 10777 10778// NextWithContext advances to the next page of values. If there was an error making 10779// the request the page does not advance and the error is returned. 10780func (page *EngineBaseResourceListPage) NextWithContext(ctx context.Context) (err error) { 10781 if tracing.IsEnabled() { 10782 ctx = tracing.StartSpan(ctx, fqdn+"/EngineBaseResourceListPage.NextWithContext") 10783 defer func() { 10784 sc := -1 10785 if page.Response().Response.Response != nil { 10786 sc = page.Response().Response.Response.StatusCode 10787 } 10788 tracing.EndSpan(ctx, sc, err) 10789 }() 10790 } 10791 for { 10792 next, err := page.fn(ctx, page.ebrl) 10793 if err != nil { 10794 return err 10795 } 10796 page.ebrl = next 10797 if !next.hasNextLink() || !next.IsEmpty() { 10798 break 10799 } 10800 } 10801 return nil 10802} 10803 10804// Next advances to the next page of values. If there was an error making 10805// the request the page does not advance and the error is returned. 10806// Deprecated: Use NextWithContext() instead. 10807func (page *EngineBaseResourceListPage) Next() error { 10808 return page.NextWithContext(context.Background()) 10809} 10810 10811// NotDone returns true if the page enumeration should be started or is not yet complete. 10812func (page EngineBaseResourceListPage) NotDone() bool { 10813 return !page.ebrl.IsEmpty() 10814} 10815 10816// Response returns the raw server response from the last page request. 10817func (page EngineBaseResourceListPage) Response() EngineBaseResourceList { 10818 return page.ebrl 10819} 10820 10821// Values returns the slice of values for the current page or nil if there are no values. 10822func (page EngineBaseResourceListPage) Values() []EngineBaseResource { 10823 if page.ebrl.IsEmpty() { 10824 return nil 10825 } 10826 return *page.ebrl.Value 10827} 10828 10829// Creates a new instance of the EngineBaseResourceListPage type. 10830func NewEngineBaseResourceListPage(cur EngineBaseResourceList, getNextPage func(context.Context, EngineBaseResourceList) (EngineBaseResourceList, error)) EngineBaseResourceListPage { 10831 return EngineBaseResourceListPage{ 10832 fn: getNextPage, 10833 ebrl: cur, 10834 } 10835} 10836 10837// EngineExtendedInfo additional information on backup engine. 10838type EngineExtendedInfo struct { 10839 // DatabaseName - Database name of backup engine. 10840 DatabaseName *string `json:"databaseName,omitempty"` 10841 // ProtectedItemsCount - Number of protected items in the backup engine. 10842 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` 10843 // ProtectedServersCount - Number of protected servers in the backup engine. 10844 ProtectedServersCount *int32 `json:"protectedServersCount,omitempty"` 10845 // DiskCount - Number of disks in the backup engine. 10846 DiskCount *int32 `json:"diskCount,omitempty"` 10847 // UsedDiskSpace - Disk space used in the backup engine. 10848 UsedDiskSpace *float64 `json:"usedDiskSpace,omitempty"` 10849 // AvailableDiskSpace - Disk space currently available in the backup engine. 10850 AvailableDiskSpace *float64 `json:"availableDiskSpace,omitempty"` 10851 // RefreshedAt - Last refresh time in the backup engine. 10852 RefreshedAt *date.Time `json:"refreshedAt,omitempty"` 10853 // AzureProtectedInstances - Protected instances in the backup engine. 10854 AzureProtectedInstances *int32 `json:"azureProtectedInstances,omitempty"` 10855} 10856 10857// ErrorDetail error Detail class which encapsulates Code, Message and Recommendations. 10858type ErrorDetail struct { 10859 // Code - READ-ONLY; Error code. 10860 Code *string `json:"code,omitempty"` 10861 // Message - READ-ONLY; Error Message related to the Code. 10862 Message *string `json:"message,omitempty"` 10863 // Recommendations - READ-ONLY; List of recommendation strings. 10864 Recommendations *[]string `json:"recommendations,omitempty"` 10865} 10866 10867// MarshalJSON is the custom marshaler for ErrorDetail. 10868func (ed ErrorDetail) MarshalJSON() ([]byte, error) { 10869 objectMap := make(map[string]interface{}) 10870 return json.Marshal(objectMap) 10871} 10872 10873// ExportJobsOperationResultInfo this class is used to send blob details after exporting jobs. 10874type ExportJobsOperationResultInfo struct { 10875 // BlobURL - URL of the blob into which the serialized string of list of jobs is exported. 10876 BlobURL *string `json:"blobUrl,omitempty"` 10877 // BlobSasKey - SAS key to access the blob. It expires in 15 mins. 10878 BlobSasKey *string `json:"blobSasKey,omitempty"` 10879 // ExcelFileBlobURL - URL of the blob into which the ExcelFile is uploaded. 10880 ExcelFileBlobURL *string `json:"excelFileBlobUrl,omitempty"` 10881 // ExcelFileBlobSasKey - SAS key to access the blob. It expires in 15 mins. 10882 ExcelFileBlobSasKey *string `json:"excelFileBlobSasKey,omitempty"` 10883 // ObjectType - Possible values include: 'ObjectTypeOperationResultInfoBase', 'ObjectTypeExportJobsOperationResultInfo', 'ObjectTypeOperationResultInfo' 10884 ObjectType ObjectType `json:"objectType,omitempty"` 10885} 10886 10887// MarshalJSON is the custom marshaler for ExportJobsOperationResultInfo. 10888func (ejori ExportJobsOperationResultInfo) MarshalJSON() ([]byte, error) { 10889 ejori.ObjectType = ObjectTypeExportJobsOperationResultInfo 10890 objectMap := make(map[string]interface{}) 10891 if ejori.BlobURL != nil { 10892 objectMap["blobUrl"] = ejori.BlobURL 10893 } 10894 if ejori.BlobSasKey != nil { 10895 objectMap["blobSasKey"] = ejori.BlobSasKey 10896 } 10897 if ejori.ExcelFileBlobURL != nil { 10898 objectMap["excelFileBlobUrl"] = ejori.ExcelFileBlobURL 10899 } 10900 if ejori.ExcelFileBlobSasKey != nil { 10901 objectMap["excelFileBlobSasKey"] = ejori.ExcelFileBlobSasKey 10902 } 10903 if ejori.ObjectType != "" { 10904 objectMap["objectType"] = ejori.ObjectType 10905 } 10906 return json.Marshal(objectMap) 10907} 10908 10909// AsExportJobsOperationResultInfo is the BasicOperationResultInfoBase implementation for ExportJobsOperationResultInfo. 10910func (ejori ExportJobsOperationResultInfo) AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) { 10911 return &ejori, true 10912} 10913 10914// AsOperationResultInfo is the BasicOperationResultInfoBase implementation for ExportJobsOperationResultInfo. 10915func (ejori ExportJobsOperationResultInfo) AsOperationResultInfo() (*OperationResultInfo, bool) { 10916 return nil, false 10917} 10918 10919// AsOperationResultInfoBase is the BasicOperationResultInfoBase implementation for ExportJobsOperationResultInfo. 10920func (ejori ExportJobsOperationResultInfo) AsOperationResultInfoBase() (*OperationResultInfoBase, bool) { 10921 return nil, false 10922} 10923 10924// AsBasicOperationResultInfoBase is the BasicOperationResultInfoBase implementation for ExportJobsOperationResultInfo. 10925func (ejori ExportJobsOperationResultInfo) AsBasicOperationResultInfoBase() (BasicOperationResultInfoBase, bool) { 10926 return &ejori, true 10927} 10928 10929// ExtendedProperties extended Properties for Azure IaasVM Backup. 10930type ExtendedProperties struct { 10931 // DiskExclusionProperties - Extended Properties for Disk Exclusion. 10932 DiskExclusionProperties *DiskExclusionProperties `json:"diskExclusionProperties,omitempty"` 10933} 10934 10935// BasicFeatureSupportRequest base class for feature request 10936type BasicFeatureSupportRequest interface { 10937 AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool) 10938 AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool) 10939 AsFeatureSupportRequest() (*FeatureSupportRequest, bool) 10940} 10941 10942// FeatureSupportRequest base class for feature request 10943type FeatureSupportRequest struct { 10944 // FeatureType - Possible values include: 'FeatureTypeFeatureSupportRequest', 'FeatureTypeAzureBackupGoals', 'FeatureTypeAzureVMResourceBackup' 10945 FeatureType FeatureType `json:"featureType,omitempty"` 10946} 10947 10948func unmarshalBasicFeatureSupportRequest(body []byte) (BasicFeatureSupportRequest, error) { 10949 var m map[string]interface{} 10950 err := json.Unmarshal(body, &m) 10951 if err != nil { 10952 return nil, err 10953 } 10954 10955 switch m["featureType"] { 10956 case string(FeatureTypeAzureBackupGoals): 10957 var abgfsr AzureBackupGoalFeatureSupportRequest 10958 err := json.Unmarshal(body, &abgfsr) 10959 return abgfsr, err 10960 case string(FeatureTypeAzureVMResourceBackup): 10961 var avrfsr AzureVMResourceFeatureSupportRequest 10962 err := json.Unmarshal(body, &avrfsr) 10963 return avrfsr, err 10964 default: 10965 var fsr FeatureSupportRequest 10966 err := json.Unmarshal(body, &fsr) 10967 return fsr, err 10968 } 10969} 10970func unmarshalBasicFeatureSupportRequestArray(body []byte) ([]BasicFeatureSupportRequest, error) { 10971 var rawMessages []*json.RawMessage 10972 err := json.Unmarshal(body, &rawMessages) 10973 if err != nil { 10974 return nil, err 10975 } 10976 10977 fsrArray := make([]BasicFeatureSupportRequest, len(rawMessages)) 10978 10979 for index, rawMessage := range rawMessages { 10980 fsr, err := unmarshalBasicFeatureSupportRequest(*rawMessage) 10981 if err != nil { 10982 return nil, err 10983 } 10984 fsrArray[index] = fsr 10985 } 10986 return fsrArray, nil 10987} 10988 10989// MarshalJSON is the custom marshaler for FeatureSupportRequest. 10990func (fsr FeatureSupportRequest) MarshalJSON() ([]byte, error) { 10991 fsr.FeatureType = FeatureTypeFeatureSupportRequest 10992 objectMap := make(map[string]interface{}) 10993 if fsr.FeatureType != "" { 10994 objectMap["featureType"] = fsr.FeatureType 10995 } 10996 return json.Marshal(objectMap) 10997} 10998 10999// AsAzureBackupGoalFeatureSupportRequest is the BasicFeatureSupportRequest implementation for FeatureSupportRequest. 11000func (fsr FeatureSupportRequest) AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool) { 11001 return nil, false 11002} 11003 11004// AsAzureVMResourceFeatureSupportRequest is the BasicFeatureSupportRequest implementation for FeatureSupportRequest. 11005func (fsr FeatureSupportRequest) AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool) { 11006 return nil, false 11007} 11008 11009// AsFeatureSupportRequest is the BasicFeatureSupportRequest implementation for FeatureSupportRequest. 11010func (fsr FeatureSupportRequest) AsFeatureSupportRequest() (*FeatureSupportRequest, bool) { 11011 return &fsr, true 11012} 11013 11014// AsBasicFeatureSupportRequest is the BasicFeatureSupportRequest implementation for FeatureSupportRequest. 11015func (fsr FeatureSupportRequest) AsBasicFeatureSupportRequest() (BasicFeatureSupportRequest, bool) { 11016 return &fsr, true 11017} 11018 11019// GenericContainer base class for generic container of backup items 11020type GenericContainer struct { 11021 // FabricName - Name of the container's fabric 11022 FabricName *string `json:"fabricName,omitempty"` 11023 // ExtendedInformation - Extended information (not returned in List container API calls) 11024 ExtendedInformation *GenericContainerExtendedInfo `json:"extendedInformation,omitempty"` 11025 // FriendlyName - Friendly name of the container. 11026 FriendlyName *string `json:"friendlyName,omitempty"` 11027 // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 11028 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 11029 // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. 11030 RegistrationStatus *string `json:"registrationStatus,omitempty"` 11031 // HealthStatus - Status of health of the container. 11032 HealthStatus *string `json:"healthStatus,omitempty"` 11033 // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' 11034 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` 11035} 11036 11037// MarshalJSON is the custom marshaler for GenericContainer. 11038func (gc GenericContainer) MarshalJSON() ([]byte, error) { 11039 gc.ContainerType = ContainerTypeGenericContainer1 11040 objectMap := make(map[string]interface{}) 11041 if gc.FabricName != nil { 11042 objectMap["fabricName"] = gc.FabricName 11043 } 11044 if gc.ExtendedInformation != nil { 11045 objectMap["extendedInformation"] = gc.ExtendedInformation 11046 } 11047 if gc.FriendlyName != nil { 11048 objectMap["friendlyName"] = gc.FriendlyName 11049 } 11050 if gc.BackupManagementType != "" { 11051 objectMap["backupManagementType"] = gc.BackupManagementType 11052 } 11053 if gc.RegistrationStatus != nil { 11054 objectMap["registrationStatus"] = gc.RegistrationStatus 11055 } 11056 if gc.HealthStatus != nil { 11057 objectMap["healthStatus"] = gc.HealthStatus 11058 } 11059 if gc.ContainerType != "" { 11060 objectMap["containerType"] = gc.ContainerType 11061 } 11062 return json.Marshal(objectMap) 11063} 11064 11065// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for GenericContainer. 11066func (gc GenericContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { 11067 return nil, false 11068} 11069 11070// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for GenericContainer. 11071func (gc GenericContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { 11072 return nil, false 11073} 11074 11075// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for GenericContainer. 11076func (gc GenericContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { 11077 return nil, false 11078} 11079 11080// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for GenericContainer. 11081func (gc GenericContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { 11082 return nil, false 11083} 11084 11085// AsAzureSQLContainer is the BasicProtectionContainer implementation for GenericContainer. 11086func (gc GenericContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { 11087 return nil, false 11088} 11089 11090// AsAzureStorageContainer is the BasicProtectionContainer implementation for GenericContainer. 11091func (gc GenericContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { 11092 return nil, false 11093} 11094 11095// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for GenericContainer. 11096func (gc GenericContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { 11097 return nil, false 11098} 11099 11100// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for GenericContainer. 11101func (gc GenericContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { 11102 return nil, false 11103} 11104 11105// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for GenericContainer. 11106func (gc GenericContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { 11107 return nil, false 11108} 11109 11110// AsDpmContainer is the BasicProtectionContainer implementation for GenericContainer. 11111func (gc GenericContainer) AsDpmContainer() (*DpmContainer, bool) { 11112 return nil, false 11113} 11114 11115// AsBasicDpmContainer is the BasicProtectionContainer implementation for GenericContainer. 11116func (gc GenericContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { 11117 return nil, false 11118} 11119 11120// AsGenericContainer is the BasicProtectionContainer implementation for GenericContainer. 11121func (gc GenericContainer) AsGenericContainer() (*GenericContainer, bool) { 11122 return &gc, true 11123} 11124 11125// AsIaaSVMContainer is the BasicProtectionContainer implementation for GenericContainer. 11126func (gc GenericContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { 11127 return nil, false 11128} 11129 11130// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for GenericContainer. 11131func (gc GenericContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { 11132 return nil, false 11133} 11134 11135// AsMabContainer is the BasicProtectionContainer implementation for GenericContainer. 11136func (gc GenericContainer) AsMabContainer() (*MabContainer, bool) { 11137 return nil, false 11138} 11139 11140// AsProtectionContainer is the BasicProtectionContainer implementation for GenericContainer. 11141func (gc GenericContainer) AsProtectionContainer() (*ProtectionContainer, bool) { 11142 return nil, false 11143} 11144 11145// AsBasicProtectionContainer is the BasicProtectionContainer implementation for GenericContainer. 11146func (gc GenericContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { 11147 return &gc, true 11148} 11149 11150// GenericContainerExtendedInfo container extended information 11151type GenericContainerExtendedInfo struct { 11152 // RawCertData - Public key of container cert 11153 RawCertData *string `json:"rawCertData,omitempty"` 11154 // ContainerIdentityInfo - Container identity information 11155 ContainerIdentityInfo *ContainerIdentityInfo `json:"containerIdentityInfo,omitempty"` 11156 // ServiceEndpoints - Azure Backup Service Endpoints for the container 11157 ServiceEndpoints map[string]*string `json:"serviceEndpoints"` 11158} 11159 11160// MarshalJSON is the custom marshaler for GenericContainerExtendedInfo. 11161func (gcei GenericContainerExtendedInfo) MarshalJSON() ([]byte, error) { 11162 objectMap := make(map[string]interface{}) 11163 if gcei.RawCertData != nil { 11164 objectMap["rawCertData"] = gcei.RawCertData 11165 } 11166 if gcei.ContainerIdentityInfo != nil { 11167 objectMap["containerIdentityInfo"] = gcei.ContainerIdentityInfo 11168 } 11169 if gcei.ServiceEndpoints != nil { 11170 objectMap["serviceEndpoints"] = gcei.ServiceEndpoints 11171 } 11172 return json.Marshal(objectMap) 11173} 11174 11175// GenericProtectedItem base class for backup items. 11176type GenericProtectedItem struct { 11177 // FriendlyName - Friendly name of the container. 11178 FriendlyName *string `json:"friendlyName,omitempty"` 11179 // PolicyState - Indicates consistency of policy object and policy applied to this backup item. 11180 PolicyState *string `json:"policyState,omitempty"` 11181 // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' 11182 ProtectionState ProtectionState `json:"protectionState,omitempty"` 11183 // ProtectedItemID - Data Plane Service ID of the protected item. 11184 ProtectedItemID *int64 `json:"protectedItemId,omitempty"` 11185 // SourceAssociations - Loosely coupled (type, value) associations (example - parent of a protected item) 11186 SourceAssociations map[string]*string `json:"sourceAssociations"` 11187 // FabricName - Name of this backup item's fabric. 11188 FabricName *string `json:"fabricName,omitempty"` 11189 // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 11190 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 11191 // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' 11192 WorkloadType DataSourceType `json:"workloadType,omitempty"` 11193 // ContainerName - Unique name of container 11194 ContainerName *string `json:"containerName,omitempty"` 11195 // SourceResourceID - ARM ID of the resource to be backed up. 11196 SourceResourceID *string `json:"sourceResourceId,omitempty"` 11197 // PolicyID - ID of the backup policy with which this item is backed up. 11198 PolicyID *string `json:"policyId,omitempty"` 11199 // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. 11200 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` 11201 // BackupSetName - Name of the backup set the backup item belongs to 11202 BackupSetName *string `json:"backupSetName,omitempty"` 11203 // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' 11204 CreateMode CreateMode `json:"createMode,omitempty"` 11205 // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC 11206 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` 11207 // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete 11208 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` 11209 // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted 11210 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` 11211 // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon 11212 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` 11213 // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state 11214 IsRehydrate *bool `json:"isRehydrate,omitempty"` 11215 // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' 11216 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` 11217} 11218 11219// MarshalJSON is the custom marshaler for GenericProtectedItem. 11220func (gpi GenericProtectedItem) MarshalJSON() ([]byte, error) { 11221 gpi.ProtectedItemType = ProtectedItemTypeGenericProtectedItem 11222 objectMap := make(map[string]interface{}) 11223 if gpi.FriendlyName != nil { 11224 objectMap["friendlyName"] = gpi.FriendlyName 11225 } 11226 if gpi.PolicyState != nil { 11227 objectMap["policyState"] = gpi.PolicyState 11228 } 11229 if gpi.ProtectionState != "" { 11230 objectMap["protectionState"] = gpi.ProtectionState 11231 } 11232 if gpi.ProtectedItemID != nil { 11233 objectMap["protectedItemId"] = gpi.ProtectedItemID 11234 } 11235 if gpi.SourceAssociations != nil { 11236 objectMap["sourceAssociations"] = gpi.SourceAssociations 11237 } 11238 if gpi.FabricName != nil { 11239 objectMap["fabricName"] = gpi.FabricName 11240 } 11241 if gpi.BackupManagementType != "" { 11242 objectMap["backupManagementType"] = gpi.BackupManagementType 11243 } 11244 if gpi.WorkloadType != "" { 11245 objectMap["workloadType"] = gpi.WorkloadType 11246 } 11247 if gpi.ContainerName != nil { 11248 objectMap["containerName"] = gpi.ContainerName 11249 } 11250 if gpi.SourceResourceID != nil { 11251 objectMap["sourceResourceId"] = gpi.SourceResourceID 11252 } 11253 if gpi.PolicyID != nil { 11254 objectMap["policyId"] = gpi.PolicyID 11255 } 11256 if gpi.LastRecoveryPoint != nil { 11257 objectMap["lastRecoveryPoint"] = gpi.LastRecoveryPoint 11258 } 11259 if gpi.BackupSetName != nil { 11260 objectMap["backupSetName"] = gpi.BackupSetName 11261 } 11262 if gpi.CreateMode != "" { 11263 objectMap["createMode"] = gpi.CreateMode 11264 } 11265 if gpi.DeferredDeleteTimeInUTC != nil { 11266 objectMap["deferredDeleteTimeInUTC"] = gpi.DeferredDeleteTimeInUTC 11267 } 11268 if gpi.IsScheduledForDeferredDelete != nil { 11269 objectMap["isScheduledForDeferredDelete"] = gpi.IsScheduledForDeferredDelete 11270 } 11271 if gpi.DeferredDeleteTimeRemaining != nil { 11272 objectMap["deferredDeleteTimeRemaining"] = gpi.DeferredDeleteTimeRemaining 11273 } 11274 if gpi.IsDeferredDeleteScheduleUpcoming != nil { 11275 objectMap["isDeferredDeleteScheduleUpcoming"] = gpi.IsDeferredDeleteScheduleUpcoming 11276 } 11277 if gpi.IsRehydrate != nil { 11278 objectMap["isRehydrate"] = gpi.IsRehydrate 11279 } 11280 if gpi.ProtectedItemType != "" { 11281 objectMap["protectedItemType"] = gpi.ProtectedItemType 11282 } 11283 return json.Marshal(objectMap) 11284} 11285 11286// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11287func (gpi GenericProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { 11288 return nil, false 11289} 11290 11291// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11292func (gpi GenericProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { 11293 return nil, false 11294} 11295 11296// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11297func (gpi GenericProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { 11298 return nil, false 11299} 11300 11301// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11302func (gpi GenericProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { 11303 return nil, false 11304} 11305 11306// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11307func (gpi GenericProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { 11308 return nil, false 11309} 11310 11311// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11312func (gpi GenericProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { 11313 return nil, false 11314} 11315 11316// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11317func (gpi GenericProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { 11318 return nil, false 11319} 11320 11321// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11322func (gpi GenericProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { 11323 return nil, false 11324} 11325 11326// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11327func (gpi GenericProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { 11328 return nil, false 11329} 11330 11331// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11332func (gpi GenericProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { 11333 return nil, false 11334} 11335 11336// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11337func (gpi GenericProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { 11338 return nil, false 11339} 11340 11341// AsDPMProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11342func (gpi GenericProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { 11343 return nil, false 11344} 11345 11346// AsGenericProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11347func (gpi GenericProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { 11348 return &gpi, true 11349} 11350 11351// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11352func (gpi GenericProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { 11353 return nil, false 11354} 11355 11356// AsProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11357func (gpi GenericProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { 11358 return nil, false 11359} 11360 11361// AsBasicProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11362func (gpi GenericProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { 11363 return &gpi, true 11364} 11365 11366// GenericProtectionPolicy azure VM (Mercury) workload-specific backup policy. 11367type GenericProtectionPolicy struct { 11368 // SubProtectionPolicy - List of sub-protection policies which includes schedule and retention 11369 SubProtectionPolicy *[]SubProtectionPolicy `json:"subProtectionPolicy,omitempty"` 11370 // TimeZone - TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". 11371 TimeZone *string `json:"timeZone,omitempty"` 11372 // FabricName - Name of this policy's fabric. 11373 FabricName *string `json:"fabricName,omitempty"` 11374 // ProtectedItemsCount - Number of items associated with this policy. 11375 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` 11376 // BackupManagementType - Possible values include: 'BackupManagementTypeProtectionPolicy', 'BackupManagementTypeAzureWorkload', 'BackupManagementTypeAzureStorage', 'BackupManagementTypeAzureIaasVM', 'BackupManagementTypeAzureSQL', 'BackupManagementTypeGenericProtectionPolicy', 'BackupManagementTypeMAB' 11377 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"` 11378} 11379 11380// MarshalJSON is the custom marshaler for GenericProtectionPolicy. 11381func (gpp GenericProtectionPolicy) MarshalJSON() ([]byte, error) { 11382 gpp.BackupManagementType = BackupManagementTypeGenericProtectionPolicy 11383 objectMap := make(map[string]interface{}) 11384 if gpp.SubProtectionPolicy != nil { 11385 objectMap["subProtectionPolicy"] = gpp.SubProtectionPolicy 11386 } 11387 if gpp.TimeZone != nil { 11388 objectMap["timeZone"] = gpp.TimeZone 11389 } 11390 if gpp.FabricName != nil { 11391 objectMap["fabricName"] = gpp.FabricName 11392 } 11393 if gpp.ProtectedItemsCount != nil { 11394 objectMap["protectedItemsCount"] = gpp.ProtectedItemsCount 11395 } 11396 if gpp.BackupManagementType != "" { 11397 objectMap["backupManagementType"] = gpp.BackupManagementType 11398 } 11399 return json.Marshal(objectMap) 11400} 11401 11402// AsAzureVMWorkloadProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. 11403func (gpp GenericProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) { 11404 return nil, false 11405} 11406 11407// AsAzureFileShareProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. 11408func (gpp GenericProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) { 11409 return nil, false 11410} 11411 11412// AsAzureIaaSVMProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. 11413func (gpp GenericProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) { 11414 return nil, false 11415} 11416 11417// AsAzureSQLProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. 11418func (gpp GenericProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) { 11419 return nil, false 11420} 11421 11422// AsGenericProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. 11423func (gpp GenericProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) { 11424 return &gpp, true 11425} 11426 11427// AsMabProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. 11428func (gpp GenericProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) { 11429 return nil, false 11430} 11431 11432// AsProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. 11433func (gpp GenericProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) { 11434 return nil, false 11435} 11436 11437// AsBasicProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. 11438func (gpp GenericProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) { 11439 return &gpp, true 11440} 11441 11442// GenericRecoveryPoint generic backup copy. 11443type GenericRecoveryPoint struct { 11444 // FriendlyName - Friendly name of the backup copy. 11445 FriendlyName *string `json:"friendlyName,omitempty"` 11446 // RecoveryPointType - Type of the backup copy. 11447 RecoveryPointType *string `json:"recoveryPointType,omitempty"` 11448 // RecoveryPointTime - Time at which this backup copy was created. 11449 RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"` 11450 // RecoveryPointAdditionalInfo - Additional information associated with this backup copy. 11451 RecoveryPointAdditionalInfo *string `json:"recoveryPointAdditionalInfo,omitempty"` 11452 // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' 11453 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` 11454} 11455 11456// MarshalJSON is the custom marshaler for GenericRecoveryPoint. 11457func (grp GenericRecoveryPoint) MarshalJSON() ([]byte, error) { 11458 grp.ObjectType = ObjectTypeGenericRecoveryPoint 11459 objectMap := make(map[string]interface{}) 11460 if grp.FriendlyName != nil { 11461 objectMap["friendlyName"] = grp.FriendlyName 11462 } 11463 if grp.RecoveryPointType != nil { 11464 objectMap["recoveryPointType"] = grp.RecoveryPointType 11465 } 11466 if grp.RecoveryPointTime != nil { 11467 objectMap["recoveryPointTime"] = grp.RecoveryPointTime 11468 } 11469 if grp.RecoveryPointAdditionalInfo != nil { 11470 objectMap["recoveryPointAdditionalInfo"] = grp.RecoveryPointAdditionalInfo 11471 } 11472 if grp.ObjectType != "" { 11473 objectMap["objectType"] = grp.ObjectType 11474 } 11475 return json.Marshal(objectMap) 11476} 11477 11478// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. 11479func (grp GenericRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { 11480 return nil, false 11481} 11482 11483// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. 11484func (grp GenericRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { 11485 return nil, false 11486} 11487 11488// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. 11489func (grp GenericRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { 11490 return nil, false 11491} 11492 11493// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. 11494func (grp GenericRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { 11495 return nil, false 11496} 11497 11498// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. 11499func (grp GenericRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { 11500 return nil, false 11501} 11502 11503// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. 11504func (grp GenericRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { 11505 return nil, false 11506} 11507 11508// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. 11509func (grp GenericRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { 11510 return nil, false 11511} 11512 11513// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. 11514func (grp GenericRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { 11515 return nil, false 11516} 11517 11518// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. 11519func (grp GenericRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { 11520 return nil, false 11521} 11522 11523// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. 11524func (grp GenericRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { 11525 return nil, false 11526} 11527 11528// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. 11529func (grp GenericRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { 11530 return &grp, true 11531} 11532 11533// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. 11534func (grp GenericRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { 11535 return nil, false 11536} 11537 11538// AsRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. 11539func (grp GenericRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { 11540 return nil, false 11541} 11542 11543// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. 11544func (grp GenericRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { 11545 return &grp, true 11546} 11547 11548// GetProtectedItemQueryObject filters to list backup items. 11549type GetProtectedItemQueryObject struct { 11550 // Expand - Specifies if the additional information should be provided for this item. 11551 Expand *string `json:"expand,omitempty"` 11552} 11553 11554// IaasVMBackupRequest iaaS VM workload-specific backup request. 11555type IaasVMBackupRequest struct { 11556 // RecoveryPointExpiryTimeInUTC - Backup copy will expire after the time specified (UTC). 11557 RecoveryPointExpiryTimeInUTC *date.Time `json:"recoveryPointExpiryTimeInUTC,omitempty"` 11558 // ObjectType - Possible values include: 'ObjectTypeBackupRequest', 'ObjectTypeAzureFileShareBackupRequest', 'ObjectTypeAzureWorkloadBackupRequest', 'ObjectTypeIaasVMBackupRequest' 11559 ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"` 11560} 11561 11562// MarshalJSON is the custom marshaler for IaasVMBackupRequest. 11563func (ivbr IaasVMBackupRequest) MarshalJSON() ([]byte, error) { 11564 ivbr.ObjectType = ObjectTypeIaasVMBackupRequest 11565 objectMap := make(map[string]interface{}) 11566 if ivbr.RecoveryPointExpiryTimeInUTC != nil { 11567 objectMap["recoveryPointExpiryTimeInUTC"] = ivbr.RecoveryPointExpiryTimeInUTC 11568 } 11569 if ivbr.ObjectType != "" { 11570 objectMap["objectType"] = ivbr.ObjectType 11571 } 11572 return json.Marshal(objectMap) 11573} 11574 11575// AsAzureFileShareBackupRequest is the BasicRequest implementation for IaasVMBackupRequest. 11576func (ivbr IaasVMBackupRequest) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) { 11577 return nil, false 11578} 11579 11580// AsAzureWorkloadBackupRequest is the BasicRequest implementation for IaasVMBackupRequest. 11581func (ivbr IaasVMBackupRequest) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) { 11582 return nil, false 11583} 11584 11585// AsIaasVMBackupRequest is the BasicRequest implementation for IaasVMBackupRequest. 11586func (ivbr IaasVMBackupRequest) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) { 11587 return &ivbr, true 11588} 11589 11590// AsRequest is the BasicRequest implementation for IaasVMBackupRequest. 11591func (ivbr IaasVMBackupRequest) AsRequest() (*Request, bool) { 11592 return nil, false 11593} 11594 11595// AsBasicRequest is the BasicRequest implementation for IaasVMBackupRequest. 11596func (ivbr IaasVMBackupRequest) AsBasicRequest() (BasicRequest, bool) { 11597 return &ivbr, true 11598} 11599 11600// BasicIaaSVMContainer iaaS VM workload-specific container. 11601type BasicIaaSVMContainer interface { 11602 AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) 11603 AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) 11604 AsIaaSVMContainer() (*IaaSVMContainer, bool) 11605} 11606 11607// IaaSVMContainer iaaS VM workload-specific container. 11608type IaaSVMContainer struct { 11609 // VirtualMachineID - Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. 11610 VirtualMachineID *string `json:"virtualMachineId,omitempty"` 11611 // VirtualMachineVersion - Specifies whether the container represents a Classic or an Azure Resource Manager VM. 11612 VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` 11613 // ResourceGroup - Resource group name of Recovery Services Vault. 11614 ResourceGroup *string `json:"resourceGroup,omitempty"` 11615 // FriendlyName - Friendly name of the container. 11616 FriendlyName *string `json:"friendlyName,omitempty"` 11617 // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 11618 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 11619 // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. 11620 RegistrationStatus *string `json:"registrationStatus,omitempty"` 11621 // HealthStatus - Status of health of the container. 11622 HealthStatus *string `json:"healthStatus,omitempty"` 11623 // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' 11624 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` 11625} 11626 11627func unmarshalBasicIaaSVMContainer(body []byte) (BasicIaaSVMContainer, error) { 11628 var m map[string]interface{} 11629 err := json.Unmarshal(body, &m) 11630 if err != nil { 11631 return nil, err 11632 } 11633 11634 switch m["containerType"] { 11635 case string(ContainerTypeMicrosoftClassicComputevirtualMachines): 11636 var aisccvc AzureIaaSClassicComputeVMContainer 11637 err := json.Unmarshal(body, &aisccvc) 11638 return aisccvc, err 11639 case string(ContainerTypeMicrosoftComputevirtualMachines): 11640 var aiscvc AzureIaaSComputeVMContainer 11641 err := json.Unmarshal(body, &aiscvc) 11642 return aiscvc, err 11643 default: 11644 var isc IaaSVMContainer 11645 err := json.Unmarshal(body, &isc) 11646 return isc, err 11647 } 11648} 11649func unmarshalBasicIaaSVMContainerArray(body []byte) ([]BasicIaaSVMContainer, error) { 11650 var rawMessages []*json.RawMessage 11651 err := json.Unmarshal(body, &rawMessages) 11652 if err != nil { 11653 return nil, err 11654 } 11655 11656 iscArray := make([]BasicIaaSVMContainer, len(rawMessages)) 11657 11658 for index, rawMessage := range rawMessages { 11659 isc, err := unmarshalBasicIaaSVMContainer(*rawMessage) 11660 if err != nil { 11661 return nil, err 11662 } 11663 iscArray[index] = isc 11664 } 11665 return iscArray, nil 11666} 11667 11668// MarshalJSON is the custom marshaler for IaaSVMContainer. 11669func (isc IaaSVMContainer) MarshalJSON() ([]byte, error) { 11670 isc.ContainerType = ContainerTypeIaaSVMContainer 11671 objectMap := make(map[string]interface{}) 11672 if isc.VirtualMachineID != nil { 11673 objectMap["virtualMachineId"] = isc.VirtualMachineID 11674 } 11675 if isc.VirtualMachineVersion != nil { 11676 objectMap["virtualMachineVersion"] = isc.VirtualMachineVersion 11677 } 11678 if isc.ResourceGroup != nil { 11679 objectMap["resourceGroup"] = isc.ResourceGroup 11680 } 11681 if isc.FriendlyName != nil { 11682 objectMap["friendlyName"] = isc.FriendlyName 11683 } 11684 if isc.BackupManagementType != "" { 11685 objectMap["backupManagementType"] = isc.BackupManagementType 11686 } 11687 if isc.RegistrationStatus != nil { 11688 objectMap["registrationStatus"] = isc.RegistrationStatus 11689 } 11690 if isc.HealthStatus != nil { 11691 objectMap["healthStatus"] = isc.HealthStatus 11692 } 11693 if isc.ContainerType != "" { 11694 objectMap["containerType"] = isc.ContainerType 11695 } 11696 return json.Marshal(objectMap) 11697} 11698 11699// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11700func (isc IaaSVMContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { 11701 return nil, false 11702} 11703 11704// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11705func (isc IaaSVMContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { 11706 return nil, false 11707} 11708 11709// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11710func (isc IaaSVMContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { 11711 return nil, false 11712} 11713 11714// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11715func (isc IaaSVMContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { 11716 return nil, false 11717} 11718 11719// AsAzureSQLContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11720func (isc IaaSVMContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { 11721 return nil, false 11722} 11723 11724// AsAzureStorageContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11725func (isc IaaSVMContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { 11726 return nil, false 11727} 11728 11729// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11730func (isc IaaSVMContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { 11731 return nil, false 11732} 11733 11734// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11735func (isc IaaSVMContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { 11736 return nil, false 11737} 11738 11739// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11740func (isc IaaSVMContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { 11741 return nil, false 11742} 11743 11744// AsDpmContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11745func (isc IaaSVMContainer) AsDpmContainer() (*DpmContainer, bool) { 11746 return nil, false 11747} 11748 11749// AsBasicDpmContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11750func (isc IaaSVMContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { 11751 return nil, false 11752} 11753 11754// AsGenericContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11755func (isc IaaSVMContainer) AsGenericContainer() (*GenericContainer, bool) { 11756 return nil, false 11757} 11758 11759// AsIaaSVMContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11760func (isc IaaSVMContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { 11761 return &isc, true 11762} 11763 11764// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11765func (isc IaaSVMContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { 11766 return &isc, true 11767} 11768 11769// AsMabContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11770func (isc IaaSVMContainer) AsMabContainer() (*MabContainer, bool) { 11771 return nil, false 11772} 11773 11774// AsProtectionContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11775func (isc IaaSVMContainer) AsProtectionContainer() (*ProtectionContainer, bool) { 11776 return nil, false 11777} 11778 11779// AsBasicProtectionContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11780func (isc IaaSVMContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { 11781 return &isc, true 11782} 11783 11784// IaasVMILRRegistrationRequest restore files/folders from a backup copy of IaaS VM. 11785type IaasVMILRRegistrationRequest struct { 11786 // RecoveryPointID - ID of the IaaS VM backup copy from where the files/folders have to be restored. 11787 RecoveryPointID *string `json:"recoveryPointId,omitempty"` 11788 // VirtualMachineID - Fully qualified ARM ID of the virtual machine whose the files / folders have to be restored. 11789 VirtualMachineID *string `json:"virtualMachineId,omitempty"` 11790 // InitiatorName - iSCSI initiator name. 11791 InitiatorName *string `json:"initiatorName,omitempty"` 11792 // RenewExistingRegistration - Whether to renew existing registration with the iSCSI server. 11793 RenewExistingRegistration *bool `json:"renewExistingRegistration,omitempty"` 11794 // ObjectType - Possible values include: 'ObjectTypeILRRequest', 'ObjectTypeAzureFileShareProvisionILRRequest', 'ObjectTypeIaasVMILRRegistrationRequest' 11795 ObjectType ObjectTypeBasicILRRequest `json:"objectType,omitempty"` 11796} 11797 11798// MarshalJSON is the custom marshaler for IaasVMILRRegistrationRequest. 11799func (ivrr IaasVMILRRegistrationRequest) MarshalJSON() ([]byte, error) { 11800 ivrr.ObjectType = ObjectTypeIaasVMILRRegistrationRequest 11801 objectMap := make(map[string]interface{}) 11802 if ivrr.RecoveryPointID != nil { 11803 objectMap["recoveryPointId"] = ivrr.RecoveryPointID 11804 } 11805 if ivrr.VirtualMachineID != nil { 11806 objectMap["virtualMachineId"] = ivrr.VirtualMachineID 11807 } 11808 if ivrr.InitiatorName != nil { 11809 objectMap["initiatorName"] = ivrr.InitiatorName 11810 } 11811 if ivrr.RenewExistingRegistration != nil { 11812 objectMap["renewExistingRegistration"] = ivrr.RenewExistingRegistration 11813 } 11814 if ivrr.ObjectType != "" { 11815 objectMap["objectType"] = ivrr.ObjectType 11816 } 11817 return json.Marshal(objectMap) 11818} 11819 11820// AsAzureFileShareProvisionILRRequest is the BasicILRRequest implementation for IaasVMILRRegistrationRequest. 11821func (ivrr IaasVMILRRegistrationRequest) AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) { 11822 return nil, false 11823} 11824 11825// AsIaasVMILRRegistrationRequest is the BasicILRRequest implementation for IaasVMILRRegistrationRequest. 11826func (ivrr IaasVMILRRegistrationRequest) AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) { 11827 return &ivrr, true 11828} 11829 11830// AsILRRequest is the BasicILRRequest implementation for IaasVMILRRegistrationRequest. 11831func (ivrr IaasVMILRRegistrationRequest) AsILRRequest() (*ILRRequest, bool) { 11832 return nil, false 11833} 11834 11835// AsBasicILRRequest is the BasicILRRequest implementation for IaasVMILRRegistrationRequest. 11836func (ivrr IaasVMILRRegistrationRequest) AsBasicILRRequest() (BasicILRRequest, bool) { 11837 return &ivrr, true 11838} 11839 11840// BasicIaaSVMProtectableItem iaaS VM workload-specific backup item. 11841type BasicIaaSVMProtectableItem interface { 11842 AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) 11843 AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) 11844 AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) 11845} 11846 11847// IaaSVMProtectableItem iaaS VM workload-specific backup item. 11848type IaaSVMProtectableItem struct { 11849 // VirtualMachineID - Fully qualified ARM ID of the virtual machine. 11850 VirtualMachineID *string `json:"virtualMachineId,omitempty"` 11851 // BackupManagementType - Type of backup management to backup an item. 11852 BackupManagementType *string `json:"backupManagementType,omitempty"` 11853 // WorkloadType - Type of workload for the backup management 11854 WorkloadType *string `json:"workloadType,omitempty"` 11855 // FriendlyName - Friendly name of the backup item. 11856 FriendlyName *string `json:"friendlyName,omitempty"` 11857 // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 11858 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 11859 // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' 11860 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` 11861} 11862 11863func unmarshalBasicIaaSVMProtectableItem(body []byte) (BasicIaaSVMProtectableItem, error) { 11864 var m map[string]interface{} 11865 err := json.Unmarshal(body, &m) 11866 if err != nil { 11867 return nil, err 11868 } 11869 11870 switch m["protectableItemType"] { 11871 case string(ProtectableItemTypeMicrosoftClassicComputevirtualMachines): 11872 var aisccvpi AzureIaaSClassicComputeVMProtectableItem 11873 err := json.Unmarshal(body, &aisccvpi) 11874 return aisccvpi, err 11875 case string(ProtectableItemTypeMicrosoftComputevirtualMachines): 11876 var aiscvpi AzureIaaSComputeVMProtectableItem 11877 err := json.Unmarshal(body, &aiscvpi) 11878 return aiscvpi, err 11879 default: 11880 var ispi IaaSVMProtectableItem 11881 err := json.Unmarshal(body, &ispi) 11882 return ispi, err 11883 } 11884} 11885func unmarshalBasicIaaSVMProtectableItemArray(body []byte) ([]BasicIaaSVMProtectableItem, error) { 11886 var rawMessages []*json.RawMessage 11887 err := json.Unmarshal(body, &rawMessages) 11888 if err != nil { 11889 return nil, err 11890 } 11891 11892 ispiArray := make([]BasicIaaSVMProtectableItem, len(rawMessages)) 11893 11894 for index, rawMessage := range rawMessages { 11895 ispi, err := unmarshalBasicIaaSVMProtectableItem(*rawMessage) 11896 if err != nil { 11897 return nil, err 11898 } 11899 ispiArray[index] = ispi 11900 } 11901 return ispiArray, nil 11902} 11903 11904// MarshalJSON is the custom marshaler for IaaSVMProtectableItem. 11905func (ispi IaaSVMProtectableItem) MarshalJSON() ([]byte, error) { 11906 ispi.ProtectableItemType = ProtectableItemTypeIaaSVMProtectableItem 11907 objectMap := make(map[string]interface{}) 11908 if ispi.VirtualMachineID != nil { 11909 objectMap["virtualMachineId"] = ispi.VirtualMachineID 11910 } 11911 if ispi.BackupManagementType != nil { 11912 objectMap["backupManagementType"] = ispi.BackupManagementType 11913 } 11914 if ispi.WorkloadType != nil { 11915 objectMap["workloadType"] = ispi.WorkloadType 11916 } 11917 if ispi.FriendlyName != nil { 11918 objectMap["friendlyName"] = ispi.FriendlyName 11919 } 11920 if ispi.ProtectionState != "" { 11921 objectMap["protectionState"] = ispi.ProtectionState 11922 } 11923 if ispi.ProtectableItemType != "" { 11924 objectMap["protectableItemType"] = ispi.ProtectableItemType 11925 } 11926 return json.Marshal(objectMap) 11927} 11928 11929// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. 11930func (ispi IaaSVMProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { 11931 return nil, false 11932} 11933 11934// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. 11935func (ispi IaaSVMProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { 11936 return nil, false 11937} 11938 11939// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. 11940func (ispi IaaSVMProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { 11941 return nil, false 11942} 11943 11944// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. 11945func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { 11946 return nil, false 11947} 11948 11949// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. 11950func (ispi IaaSVMProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { 11951 return nil, false 11952} 11953 11954// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. 11955func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { 11956 return nil, false 11957} 11958 11959// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. 11960func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { 11961 return nil, false 11962} 11963 11964// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. 11965func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { 11966 return nil, false 11967} 11968 11969// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. 11970func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { 11971 return nil, false 11972} 11973 11974// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. 11975func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { 11976 return nil, false 11977} 11978 11979// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. 11980func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { 11981 return nil, false 11982} 11983 11984// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. 11985func (ispi IaaSVMProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { 11986 return &ispi, true 11987} 11988 11989// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. 11990func (ispi IaaSVMProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { 11991 return &ispi, true 11992} 11993 11994// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. 11995func (ispi IaaSVMProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { 11996 return nil, false 11997} 11998 11999// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. 12000func (ispi IaaSVMProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { 12001 return &ispi, true 12002} 12003 12004// IaasVMRecoveryPoint iaaS VM workload specific backup copy. 12005type IaasVMRecoveryPoint struct { 12006 // RecoveryPointType - READ-ONLY; Type of the backup copy. 12007 RecoveryPointType *string `json:"recoveryPointType,omitempty"` 12008 // RecoveryPointTime - READ-ONLY; Time at which this backup copy was created. 12009 RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"` 12010 // RecoveryPointAdditionalInfo - READ-ONLY; Additional information associated with this backup copy. 12011 RecoveryPointAdditionalInfo *string `json:"recoveryPointAdditionalInfo,omitempty"` 12012 // SourceVMStorageType - READ-ONLY; Storage type of the VM whose backup copy is created. 12013 SourceVMStorageType *string `json:"sourceVMStorageType,omitempty"` 12014 // IsSourceVMEncrypted - READ-ONLY; Identifies whether the VM was encrypted when the backup copy is created. 12015 IsSourceVMEncrypted *bool `json:"isSourceVMEncrypted,omitempty"` 12016 // KeyAndSecret - Required details for recovering an encrypted VM. Applicable only when IsSourceVMEncrypted is true. 12017 KeyAndSecret *KeyAndSecretDetails `json:"keyAndSecret,omitempty"` 12018 // IsInstantIlrSessionActive - Is the session to recover items from this backup copy still active. 12019 IsInstantIlrSessionActive *bool `json:"isInstantIlrSessionActive,omitempty"` 12020 // RecoveryPointTierDetails - Recovery point tier information. 12021 RecoveryPointTierDetails *[]RecoveryPointTierInformation `json:"recoveryPointTierDetails,omitempty"` 12022 // IsManagedVirtualMachine - Whether VM is with Managed Disks 12023 IsManagedVirtualMachine *bool `json:"isManagedVirtualMachine,omitempty"` 12024 // VirtualMachineSize - Virtual Machine Size 12025 VirtualMachineSize *string `json:"virtualMachineSize,omitempty"` 12026 // OriginalStorageAccountOption - Original Storage Account Option 12027 OriginalStorageAccountOption *bool `json:"originalStorageAccountOption,omitempty"` 12028 // OsType - OS type 12029 OsType *string `json:"osType,omitempty"` 12030 // RecoveryPointDiskConfiguration - Disk configuration 12031 RecoveryPointDiskConfiguration *RecoveryPointDiskConfiguration `json:"recoveryPointDiskConfiguration,omitempty"` 12032 // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' 12033 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` 12034} 12035 12036// MarshalJSON is the custom marshaler for IaasVMRecoveryPoint. 12037func (ivrp IaasVMRecoveryPoint) MarshalJSON() ([]byte, error) { 12038 ivrp.ObjectType = ObjectTypeIaasVMRecoveryPoint 12039 objectMap := make(map[string]interface{}) 12040 if ivrp.KeyAndSecret != nil { 12041 objectMap["keyAndSecret"] = ivrp.KeyAndSecret 12042 } 12043 if ivrp.IsInstantIlrSessionActive != nil { 12044 objectMap["isInstantIlrSessionActive"] = ivrp.IsInstantIlrSessionActive 12045 } 12046 if ivrp.RecoveryPointTierDetails != nil { 12047 objectMap["recoveryPointTierDetails"] = ivrp.RecoveryPointTierDetails 12048 } 12049 if ivrp.IsManagedVirtualMachine != nil { 12050 objectMap["isManagedVirtualMachine"] = ivrp.IsManagedVirtualMachine 12051 } 12052 if ivrp.VirtualMachineSize != nil { 12053 objectMap["virtualMachineSize"] = ivrp.VirtualMachineSize 12054 } 12055 if ivrp.OriginalStorageAccountOption != nil { 12056 objectMap["originalStorageAccountOption"] = ivrp.OriginalStorageAccountOption 12057 } 12058 if ivrp.OsType != nil { 12059 objectMap["osType"] = ivrp.OsType 12060 } 12061 if ivrp.RecoveryPointDiskConfiguration != nil { 12062 objectMap["recoveryPointDiskConfiguration"] = ivrp.RecoveryPointDiskConfiguration 12063 } 12064 if ivrp.ObjectType != "" { 12065 objectMap["objectType"] = ivrp.ObjectType 12066 } 12067 return json.Marshal(objectMap) 12068} 12069 12070// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. 12071func (ivrp IaasVMRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { 12072 return nil, false 12073} 12074 12075// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. 12076func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { 12077 return nil, false 12078} 12079 12080// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. 12081func (ivrp IaasVMRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { 12082 return nil, false 12083} 12084 12085// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. 12086func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { 12087 return nil, false 12088} 12089 12090// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. 12091func (ivrp IaasVMRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { 12092 return nil, false 12093} 12094 12095// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. 12096func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { 12097 return nil, false 12098} 12099 12100// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. 12101func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { 12102 return nil, false 12103} 12104 12105// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. 12106func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { 12107 return nil, false 12108} 12109 12110// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. 12111func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { 12112 return nil, false 12113} 12114 12115// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. 12116func (ivrp IaasVMRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { 12117 return nil, false 12118} 12119 12120// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. 12121func (ivrp IaasVMRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { 12122 return nil, false 12123} 12124 12125// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. 12126func (ivrp IaasVMRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { 12127 return &ivrp, true 12128} 12129 12130// AsRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. 12131func (ivrp IaasVMRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { 12132 return nil, false 12133} 12134 12135// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. 12136func (ivrp IaasVMRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { 12137 return &ivrp, true 12138} 12139 12140// IaasVMRestoreRequest iaaS VM workload-specific restore. 12141type IaasVMRestoreRequest struct { 12142 // RecoveryPointID - ID of the backup copy to be recovered. 12143 RecoveryPointID *string `json:"recoveryPointId,omitempty"` 12144 // RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline' 12145 RecoveryType RecoveryType `json:"recoveryType,omitempty"` 12146 // SourceResourceID - Fully qualified ARM ID of the VM which is being recovered. 12147 SourceResourceID *string `json:"sourceResourceId,omitempty"` 12148 // TargetVirtualMachineID - This is the complete ARM Id of the VM that will be created. 12149 // For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} 12150 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"` 12151 // TargetResourceGroupID - This is the ARM Id of the resource group that you want to create for this Virtual machine and other artifacts. 12152 // For e.g. /subscriptions/{subId}/resourcegroups/{rg} 12153 TargetResourceGroupID *string `json:"targetResourceGroupId,omitempty"` 12154 // StorageAccountID - Fully qualified ARM ID of the storage account to which the VM has to be restored. 12155 StorageAccountID *string `json:"storageAccountId,omitempty"` 12156 // VirtualNetworkID - This is the virtual network Id of the vnet that will be attached to the virtual machine. 12157 // User will be validated for join action permissions in the linked access. 12158 VirtualNetworkID *string `json:"virtualNetworkId,omitempty"` 12159 // SubnetID - Subnet ID, is the subnet ID associated with the to be restored VM. For Classic VMs it would be 12160 // {VnetID}/Subnet/{SubnetName} and, for the Azure Resource Manager VMs it would be ARM resource ID used to represent 12161 // the subnet. 12162 SubnetID *string `json:"subnetId,omitempty"` 12163 // TargetDomainNameID - Fully qualified ARM ID of the domain name to be associated to the VM being restored. This applies only to Classic 12164 // Virtual Machines. 12165 TargetDomainNameID *string `json:"targetDomainNameId,omitempty"` 12166 // Region - Region in which the virtual machine is restored. 12167 Region *string `json:"region,omitempty"` 12168 // AffinityGroup - Affinity group associated to VM to be restored. Used only for Classic Compute Virtual Machines. 12169 AffinityGroup *string `json:"affinityGroup,omitempty"` 12170 // CreateNewCloudService - Should a new cloud service be created while restoring the VM. If this is false, VM will be restored to the same 12171 // cloud service as it was at the time of backup. 12172 CreateNewCloudService *bool `json:"createNewCloudService,omitempty"` 12173 // OriginalStorageAccountOption - Original Storage Account Option 12174 OriginalStorageAccountOption *bool `json:"originalStorageAccountOption,omitempty"` 12175 // EncryptionDetails - Details needed if the VM was encrypted at the time of backup. 12176 EncryptionDetails *EncryptionDetails `json:"encryptionDetails,omitempty"` 12177 // RestoreDiskLunList - List of Disk LUNs for partial restore 12178 RestoreDiskLunList *[]int32 `json:"restoreDiskLunList,omitempty"` 12179 // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' 12180 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` 12181} 12182 12183// MarshalJSON is the custom marshaler for IaasVMRestoreRequest. 12184func (ivrr IaasVMRestoreRequest) MarshalJSON() ([]byte, error) { 12185 ivrr.ObjectType = ObjectTypeIaasVMRestoreRequest 12186 objectMap := make(map[string]interface{}) 12187 if ivrr.RecoveryPointID != nil { 12188 objectMap["recoveryPointId"] = ivrr.RecoveryPointID 12189 } 12190 if ivrr.RecoveryType != "" { 12191 objectMap["recoveryType"] = ivrr.RecoveryType 12192 } 12193 if ivrr.SourceResourceID != nil { 12194 objectMap["sourceResourceId"] = ivrr.SourceResourceID 12195 } 12196 if ivrr.TargetVirtualMachineID != nil { 12197 objectMap["targetVirtualMachineId"] = ivrr.TargetVirtualMachineID 12198 } 12199 if ivrr.TargetResourceGroupID != nil { 12200 objectMap["targetResourceGroupId"] = ivrr.TargetResourceGroupID 12201 } 12202 if ivrr.StorageAccountID != nil { 12203 objectMap["storageAccountId"] = ivrr.StorageAccountID 12204 } 12205 if ivrr.VirtualNetworkID != nil { 12206 objectMap["virtualNetworkId"] = ivrr.VirtualNetworkID 12207 } 12208 if ivrr.SubnetID != nil { 12209 objectMap["subnetId"] = ivrr.SubnetID 12210 } 12211 if ivrr.TargetDomainNameID != nil { 12212 objectMap["targetDomainNameId"] = ivrr.TargetDomainNameID 12213 } 12214 if ivrr.Region != nil { 12215 objectMap["region"] = ivrr.Region 12216 } 12217 if ivrr.AffinityGroup != nil { 12218 objectMap["affinityGroup"] = ivrr.AffinityGroup 12219 } 12220 if ivrr.CreateNewCloudService != nil { 12221 objectMap["createNewCloudService"] = ivrr.CreateNewCloudService 12222 } 12223 if ivrr.OriginalStorageAccountOption != nil { 12224 objectMap["originalStorageAccountOption"] = ivrr.OriginalStorageAccountOption 12225 } 12226 if ivrr.EncryptionDetails != nil { 12227 objectMap["encryptionDetails"] = ivrr.EncryptionDetails 12228 } 12229 if ivrr.RestoreDiskLunList != nil { 12230 objectMap["restoreDiskLunList"] = ivrr.RestoreDiskLunList 12231 } 12232 if ivrr.ObjectType != "" { 12233 objectMap["objectType"] = ivrr.ObjectType 12234 } 12235 return json.Marshal(objectMap) 12236} 12237 12238// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. 12239func (ivrr IaasVMRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { 12240 return nil, false 12241} 12242 12243// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. 12244func (ivrr IaasVMRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { 12245 return nil, false 12246} 12247 12248// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. 12249func (ivrr IaasVMRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { 12250 return nil, false 12251} 12252 12253// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. 12254func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { 12255 return nil, false 12256} 12257 12258// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. 12259func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { 12260 return nil, false 12261} 12262 12263// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. 12264func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { 12265 return nil, false 12266} 12267 12268// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. 12269func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { 12270 return nil, false 12271} 12272 12273// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. 12274func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { 12275 return nil, false 12276} 12277 12278// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. 12279func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { 12280 return nil, false 12281} 12282 12283// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. 12284func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { 12285 return nil, false 12286} 12287 12288// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. 12289func (ivrr IaasVMRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { 12290 return &ivrr, true 12291} 12292 12293// AsRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. 12294func (ivrr IaasVMRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { 12295 return nil, false 12296} 12297 12298// AsBasicRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. 12299func (ivrr IaasVMRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { 12300 return &ivrr, true 12301} 12302 12303// BasicILRRequest parameters to Provision ILR API. 12304type BasicILRRequest interface { 12305 AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) 12306 AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) 12307 AsILRRequest() (*ILRRequest, bool) 12308} 12309 12310// ILRRequest parameters to Provision ILR API. 12311type ILRRequest struct { 12312 // ObjectType - Possible values include: 'ObjectTypeILRRequest', 'ObjectTypeAzureFileShareProvisionILRRequest', 'ObjectTypeIaasVMILRRegistrationRequest' 12313 ObjectType ObjectTypeBasicILRRequest `json:"objectType,omitempty"` 12314} 12315 12316func unmarshalBasicILRRequest(body []byte) (BasicILRRequest, error) { 12317 var m map[string]interface{} 12318 err := json.Unmarshal(body, &m) 12319 if err != nil { 12320 return nil, err 12321 } 12322 12323 switch m["objectType"] { 12324 case string(ObjectTypeAzureFileShareProvisionILRRequest): 12325 var afspir AzureFileShareProvisionILRRequest 12326 err := json.Unmarshal(body, &afspir) 12327 return afspir, err 12328 case string(ObjectTypeIaasVMILRRegistrationRequest): 12329 var ivrr IaasVMILRRegistrationRequest 12330 err := json.Unmarshal(body, &ivrr) 12331 return ivrr, err 12332 default: 12333 var ir ILRRequest 12334 err := json.Unmarshal(body, &ir) 12335 return ir, err 12336 } 12337} 12338func unmarshalBasicILRRequestArray(body []byte) ([]BasicILRRequest, error) { 12339 var rawMessages []*json.RawMessage 12340 err := json.Unmarshal(body, &rawMessages) 12341 if err != nil { 12342 return nil, err 12343 } 12344 12345 irArray := make([]BasicILRRequest, len(rawMessages)) 12346 12347 for index, rawMessage := range rawMessages { 12348 ir, err := unmarshalBasicILRRequest(*rawMessage) 12349 if err != nil { 12350 return nil, err 12351 } 12352 irArray[index] = ir 12353 } 12354 return irArray, nil 12355} 12356 12357// MarshalJSON is the custom marshaler for ILRRequest. 12358func (ir ILRRequest) MarshalJSON() ([]byte, error) { 12359 ir.ObjectType = ObjectTypeILRRequest 12360 objectMap := make(map[string]interface{}) 12361 if ir.ObjectType != "" { 12362 objectMap["objectType"] = ir.ObjectType 12363 } 12364 return json.Marshal(objectMap) 12365} 12366 12367// AsAzureFileShareProvisionILRRequest is the BasicILRRequest implementation for ILRRequest. 12368func (ir ILRRequest) AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) { 12369 return nil, false 12370} 12371 12372// AsIaasVMILRRegistrationRequest is the BasicILRRequest implementation for ILRRequest. 12373func (ir ILRRequest) AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) { 12374 return nil, false 12375} 12376 12377// AsILRRequest is the BasicILRRequest implementation for ILRRequest. 12378func (ir ILRRequest) AsILRRequest() (*ILRRequest, bool) { 12379 return &ir, true 12380} 12381 12382// AsBasicILRRequest is the BasicILRRequest implementation for ILRRequest. 12383func (ir ILRRequest) AsBasicILRRequest() (BasicILRRequest, bool) { 12384 return &ir, true 12385} 12386 12387// ILRRequestResource parameters to Provision ILR API. 12388type ILRRequestResource struct { 12389 // Properties - ILRRequestResource properties 12390 Properties BasicILRRequest `json:"properties,omitempty"` 12391 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 12392 ID *string `json:"id,omitempty"` 12393 // Name - READ-ONLY; Resource name associated with the resource. 12394 Name *string `json:"name,omitempty"` 12395 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 12396 Type *string `json:"type,omitempty"` 12397 // Location - Resource location. 12398 Location *string `json:"location,omitempty"` 12399 // Tags - Resource tags. 12400 Tags map[string]*string `json:"tags"` 12401 // ETag - Optional ETag. 12402 ETag *string `json:"eTag,omitempty"` 12403} 12404 12405// MarshalJSON is the custom marshaler for ILRRequestResource. 12406func (irr ILRRequestResource) MarshalJSON() ([]byte, error) { 12407 objectMap := make(map[string]interface{}) 12408 objectMap["properties"] = irr.Properties 12409 if irr.Location != nil { 12410 objectMap["location"] = irr.Location 12411 } 12412 if irr.Tags != nil { 12413 objectMap["tags"] = irr.Tags 12414 } 12415 if irr.ETag != nil { 12416 objectMap["eTag"] = irr.ETag 12417 } 12418 return json.Marshal(objectMap) 12419} 12420 12421// UnmarshalJSON is the custom unmarshaler for ILRRequestResource struct. 12422func (irr *ILRRequestResource) UnmarshalJSON(body []byte) error { 12423 var m map[string]*json.RawMessage 12424 err := json.Unmarshal(body, &m) 12425 if err != nil { 12426 return err 12427 } 12428 for k, v := range m { 12429 switch k { 12430 case "properties": 12431 if v != nil { 12432 properties, err := unmarshalBasicILRRequest(*v) 12433 if err != nil { 12434 return err 12435 } 12436 irr.Properties = properties 12437 } 12438 case "id": 12439 if v != nil { 12440 var ID string 12441 err = json.Unmarshal(*v, &ID) 12442 if err != nil { 12443 return err 12444 } 12445 irr.ID = &ID 12446 } 12447 case "name": 12448 if v != nil { 12449 var name string 12450 err = json.Unmarshal(*v, &name) 12451 if err != nil { 12452 return err 12453 } 12454 irr.Name = &name 12455 } 12456 case "type": 12457 if v != nil { 12458 var typeVar string 12459 err = json.Unmarshal(*v, &typeVar) 12460 if err != nil { 12461 return err 12462 } 12463 irr.Type = &typeVar 12464 } 12465 case "location": 12466 if v != nil { 12467 var location string 12468 err = json.Unmarshal(*v, &location) 12469 if err != nil { 12470 return err 12471 } 12472 irr.Location = &location 12473 } 12474 case "tags": 12475 if v != nil { 12476 var tags map[string]*string 12477 err = json.Unmarshal(*v, &tags) 12478 if err != nil { 12479 return err 12480 } 12481 irr.Tags = tags 12482 } 12483 case "eTag": 12484 if v != nil { 12485 var eTag string 12486 err = json.Unmarshal(*v, &eTag) 12487 if err != nil { 12488 return err 12489 } 12490 irr.ETag = &eTag 12491 } 12492 } 12493 } 12494 12495 return nil 12496} 12497 12498// InquiryInfo details about inquired protectable items under a given container. 12499type InquiryInfo struct { 12500 // Status - Inquiry Status for this container such as 12501 // InProgress | Failed | Succeeded 12502 Status *string `json:"status,omitempty"` 12503 // ErrorDetail - Error Details if the Status is non-success. 12504 ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"` 12505 // InquiryDetails - Inquiry Details which will have workload specific details. 12506 // For e.g. - For SQL and oracle this will contain different details. 12507 InquiryDetails *[]WorkloadInquiryDetails `json:"inquiryDetails,omitempty"` 12508} 12509 12510// InquiryValidation validation for inquired protectable items under a given container. 12511type InquiryValidation struct { 12512 // Status - Status for the Inquiry Validation. 12513 Status *string `json:"status,omitempty"` 12514 // ErrorDetail - Error Detail in case the status is non-success. 12515 ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"` 12516 // AdditionalDetail - READ-ONLY; Error Additional Detail in case the status is non-success. 12517 AdditionalDetail *string `json:"additionalDetail,omitempty"` 12518} 12519 12520// MarshalJSON is the custom marshaler for InquiryValidation. 12521func (iv InquiryValidation) MarshalJSON() ([]byte, error) { 12522 objectMap := make(map[string]interface{}) 12523 if iv.Status != nil { 12524 objectMap["status"] = iv.Status 12525 } 12526 if iv.ErrorDetail != nil { 12527 objectMap["errorDetail"] = iv.ErrorDetail 12528 } 12529 return json.Marshal(objectMap) 12530} 12531 12532// InstantItemRecoveryTarget target details for file / folder restore. 12533type InstantItemRecoveryTarget struct { 12534 // ClientScripts - List of client scripts. 12535 ClientScripts *[]ClientScriptForConnect `json:"clientScripts,omitempty"` 12536} 12537 12538// InstantRPAdditionalDetails ... 12539type InstantRPAdditionalDetails struct { 12540 AzureBackupRGNamePrefix *string `json:"azureBackupRGNamePrefix,omitempty"` 12541 AzureBackupRGNameSuffix *string `json:"azureBackupRGNameSuffix,omitempty"` 12542} 12543 12544// BasicJob defines workload agnostic properties for a job. 12545type BasicJob interface { 12546 AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) 12547 AsAzureStorageJob() (*AzureStorageJob, bool) 12548 AsAzureWorkloadJob() (*AzureWorkloadJob, bool) 12549 AsDpmJob() (*DpmJob, bool) 12550 AsMabJob() (*MabJob, bool) 12551 AsJob() (*Job, bool) 12552} 12553 12554// Job defines workload agnostic properties for a job. 12555type Job struct { 12556 // EntityFriendlyName - Friendly name of the entity on which the current job is executing. 12557 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` 12558 // BackupManagementType - Backup management type to execute the current job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 12559 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 12560 // Operation - The operation name. 12561 Operation *string `json:"operation,omitempty"` 12562 // Status - Job status. 12563 Status *string `json:"status,omitempty"` 12564 // StartTime - The start time. 12565 StartTime *date.Time `json:"startTime,omitempty"` 12566 // EndTime - The end time. 12567 EndTime *date.Time `json:"endTime,omitempty"` 12568 // ActivityID - ActivityId of job. 12569 ActivityID *string `json:"activityId,omitempty"` 12570 // JobType - Possible values include: 'JobTypeJob', 'JobTypeAzureIaaSVMJob', 'JobTypeAzureStorageJob', 'JobTypeAzureWorkloadJob', 'JobTypeDpmJob', 'JobTypeMabJob' 12571 JobType JobType `json:"jobType,omitempty"` 12572} 12573 12574func unmarshalBasicJob(body []byte) (BasicJob, error) { 12575 var m map[string]interface{} 12576 err := json.Unmarshal(body, &m) 12577 if err != nil { 12578 return nil, err 12579 } 12580 12581 switch m["jobType"] { 12582 case string(JobTypeAzureIaaSVMJob): 12583 var aisj AzureIaaSVMJob 12584 err := json.Unmarshal(body, &aisj) 12585 return aisj, err 12586 case string(JobTypeAzureStorageJob): 12587 var asj AzureStorageJob 12588 err := json.Unmarshal(body, &asj) 12589 return asj, err 12590 case string(JobTypeAzureWorkloadJob): 12591 var awj AzureWorkloadJob 12592 err := json.Unmarshal(body, &awj) 12593 return awj, err 12594 case string(JobTypeDpmJob): 12595 var dj DpmJob 12596 err := json.Unmarshal(body, &dj) 12597 return dj, err 12598 case string(JobTypeMabJob): 12599 var mj MabJob 12600 err := json.Unmarshal(body, &mj) 12601 return mj, err 12602 default: 12603 var j Job 12604 err := json.Unmarshal(body, &j) 12605 return j, err 12606 } 12607} 12608func unmarshalBasicJobArray(body []byte) ([]BasicJob, error) { 12609 var rawMessages []*json.RawMessage 12610 err := json.Unmarshal(body, &rawMessages) 12611 if err != nil { 12612 return nil, err 12613 } 12614 12615 jArray := make([]BasicJob, len(rawMessages)) 12616 12617 for index, rawMessage := range rawMessages { 12618 j, err := unmarshalBasicJob(*rawMessage) 12619 if err != nil { 12620 return nil, err 12621 } 12622 jArray[index] = j 12623 } 12624 return jArray, nil 12625} 12626 12627// MarshalJSON is the custom marshaler for Job. 12628func (j Job) MarshalJSON() ([]byte, error) { 12629 j.JobType = JobTypeJob 12630 objectMap := make(map[string]interface{}) 12631 if j.EntityFriendlyName != nil { 12632 objectMap["entityFriendlyName"] = j.EntityFriendlyName 12633 } 12634 if j.BackupManagementType != "" { 12635 objectMap["backupManagementType"] = j.BackupManagementType 12636 } 12637 if j.Operation != nil { 12638 objectMap["operation"] = j.Operation 12639 } 12640 if j.Status != nil { 12641 objectMap["status"] = j.Status 12642 } 12643 if j.StartTime != nil { 12644 objectMap["startTime"] = j.StartTime 12645 } 12646 if j.EndTime != nil { 12647 objectMap["endTime"] = j.EndTime 12648 } 12649 if j.ActivityID != nil { 12650 objectMap["activityId"] = j.ActivityID 12651 } 12652 if j.JobType != "" { 12653 objectMap["jobType"] = j.JobType 12654 } 12655 return json.Marshal(objectMap) 12656} 12657 12658// AsAzureIaaSVMJob is the BasicJob implementation for Job. 12659func (j Job) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) { 12660 return nil, false 12661} 12662 12663// AsAzureStorageJob is the BasicJob implementation for Job. 12664func (j Job) AsAzureStorageJob() (*AzureStorageJob, bool) { 12665 return nil, false 12666} 12667 12668// AsAzureWorkloadJob is the BasicJob implementation for Job. 12669func (j Job) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) { 12670 return nil, false 12671} 12672 12673// AsDpmJob is the BasicJob implementation for Job. 12674func (j Job) AsDpmJob() (*DpmJob, bool) { 12675 return nil, false 12676} 12677 12678// AsMabJob is the BasicJob implementation for Job. 12679func (j Job) AsMabJob() (*MabJob, bool) { 12680 return nil, false 12681} 12682 12683// AsJob is the BasicJob implementation for Job. 12684func (j Job) AsJob() (*Job, bool) { 12685 return &j, true 12686} 12687 12688// AsBasicJob is the BasicJob implementation for Job. 12689func (j Job) AsBasicJob() (BasicJob, bool) { 12690 return &j, true 12691} 12692 12693// JobQueryObject filters to list the jobs. 12694type JobQueryObject struct { 12695 // Status - Status of the job. Possible values include: 'JobStatusInvalid', 'JobStatusInProgress', 'JobStatusCompleted', 'JobStatusFailed', 'JobStatusCompletedWithWarnings', 'JobStatusCancelled', 'JobStatusCancelling' 12696 Status JobStatus `json:"status,omitempty"` 12697 // BackupManagementType - Type of backup management for the job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 12698 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 12699 // Operation - Type of operation. Possible values include: 'JobOperationTypeInvalid', 'JobOperationTypeRegister', 'JobOperationTypeUnRegister', 'JobOperationTypeConfigureBackup', 'JobOperationTypeBackup', 'JobOperationTypeRestore', 'JobOperationTypeDisableBackup', 'JobOperationTypeDeleteBackupData', 'JobOperationTypeCrossRegionRestore', 'JobOperationTypeUndelete' 12700 Operation JobOperationType `json:"operation,omitempty"` 12701 // JobID - JobID represents the job uniquely. 12702 JobID *string `json:"jobId,omitempty"` 12703 // StartTime - Job has started at this time. Value is in UTC. 12704 StartTime *date.Time `json:"startTime,omitempty"` 12705 // EndTime - Job has ended at this time. Value is in UTC. 12706 EndTime *date.Time `json:"endTime,omitempty"` 12707} 12708 12709// JobResource defines workload agnostic properties for a job. 12710type JobResource struct { 12711 autorest.Response `json:"-"` 12712 // Properties - JobResource properties 12713 Properties BasicJob `json:"properties,omitempty"` 12714 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 12715 ID *string `json:"id,omitempty"` 12716 // Name - READ-ONLY; Resource name associated with the resource. 12717 Name *string `json:"name,omitempty"` 12718 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 12719 Type *string `json:"type,omitempty"` 12720 // Location - Resource location. 12721 Location *string `json:"location,omitempty"` 12722 // Tags - Resource tags. 12723 Tags map[string]*string `json:"tags"` 12724 // ETag - Optional ETag. 12725 ETag *string `json:"eTag,omitempty"` 12726} 12727 12728// MarshalJSON is the custom marshaler for JobResource. 12729func (jr JobResource) MarshalJSON() ([]byte, error) { 12730 objectMap := make(map[string]interface{}) 12731 objectMap["properties"] = jr.Properties 12732 if jr.Location != nil { 12733 objectMap["location"] = jr.Location 12734 } 12735 if jr.Tags != nil { 12736 objectMap["tags"] = jr.Tags 12737 } 12738 if jr.ETag != nil { 12739 objectMap["eTag"] = jr.ETag 12740 } 12741 return json.Marshal(objectMap) 12742} 12743 12744// UnmarshalJSON is the custom unmarshaler for JobResource struct. 12745func (jr *JobResource) UnmarshalJSON(body []byte) error { 12746 var m map[string]*json.RawMessage 12747 err := json.Unmarshal(body, &m) 12748 if err != nil { 12749 return err 12750 } 12751 for k, v := range m { 12752 switch k { 12753 case "properties": 12754 if v != nil { 12755 properties, err := unmarshalBasicJob(*v) 12756 if err != nil { 12757 return err 12758 } 12759 jr.Properties = properties 12760 } 12761 case "id": 12762 if v != nil { 12763 var ID string 12764 err = json.Unmarshal(*v, &ID) 12765 if err != nil { 12766 return err 12767 } 12768 jr.ID = &ID 12769 } 12770 case "name": 12771 if v != nil { 12772 var name string 12773 err = json.Unmarshal(*v, &name) 12774 if err != nil { 12775 return err 12776 } 12777 jr.Name = &name 12778 } 12779 case "type": 12780 if v != nil { 12781 var typeVar string 12782 err = json.Unmarshal(*v, &typeVar) 12783 if err != nil { 12784 return err 12785 } 12786 jr.Type = &typeVar 12787 } 12788 case "location": 12789 if v != nil { 12790 var location string 12791 err = json.Unmarshal(*v, &location) 12792 if err != nil { 12793 return err 12794 } 12795 jr.Location = &location 12796 } 12797 case "tags": 12798 if v != nil { 12799 var tags map[string]*string 12800 err = json.Unmarshal(*v, &tags) 12801 if err != nil { 12802 return err 12803 } 12804 jr.Tags = tags 12805 } 12806 case "eTag": 12807 if v != nil { 12808 var eTag string 12809 err = json.Unmarshal(*v, &eTag) 12810 if err != nil { 12811 return err 12812 } 12813 jr.ETag = &eTag 12814 } 12815 } 12816 } 12817 12818 return nil 12819} 12820 12821// JobResourceList list of Job resources 12822type JobResourceList struct { 12823 autorest.Response `json:"-"` 12824 // Value - List of resources. 12825 Value *[]JobResource `json:"value,omitempty"` 12826 // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. 12827 NextLink *string `json:"nextLink,omitempty"` 12828} 12829 12830// JobResourceListIterator provides access to a complete listing of JobResource values. 12831type JobResourceListIterator struct { 12832 i int 12833 page JobResourceListPage 12834} 12835 12836// NextWithContext advances to the next value. If there was an error making 12837// the request the iterator does not advance and the error is returned. 12838func (iter *JobResourceListIterator) NextWithContext(ctx context.Context) (err error) { 12839 if tracing.IsEnabled() { 12840 ctx = tracing.StartSpan(ctx, fqdn+"/JobResourceListIterator.NextWithContext") 12841 defer func() { 12842 sc := -1 12843 if iter.Response().Response.Response != nil { 12844 sc = iter.Response().Response.Response.StatusCode 12845 } 12846 tracing.EndSpan(ctx, sc, err) 12847 }() 12848 } 12849 iter.i++ 12850 if iter.i < len(iter.page.Values()) { 12851 return nil 12852 } 12853 err = iter.page.NextWithContext(ctx) 12854 if err != nil { 12855 iter.i-- 12856 return err 12857 } 12858 iter.i = 0 12859 return nil 12860} 12861 12862// Next advances to the next value. If there was an error making 12863// the request the iterator does not advance and the error is returned. 12864// Deprecated: Use NextWithContext() instead. 12865func (iter *JobResourceListIterator) Next() error { 12866 return iter.NextWithContext(context.Background()) 12867} 12868 12869// NotDone returns true if the enumeration should be started or is not yet complete. 12870func (iter JobResourceListIterator) NotDone() bool { 12871 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 12872} 12873 12874// Response returns the raw server response from the last page request. 12875func (iter JobResourceListIterator) Response() JobResourceList { 12876 return iter.page.Response() 12877} 12878 12879// Value returns the current value or a zero-initialized value if the 12880// iterator has advanced beyond the end of the collection. 12881func (iter JobResourceListIterator) Value() JobResource { 12882 if !iter.page.NotDone() { 12883 return JobResource{} 12884 } 12885 return iter.page.Values()[iter.i] 12886} 12887 12888// Creates a new instance of the JobResourceListIterator type. 12889func NewJobResourceListIterator(page JobResourceListPage) JobResourceListIterator { 12890 return JobResourceListIterator{page: page} 12891} 12892 12893// IsEmpty returns true if the ListResult contains no values. 12894func (jrl JobResourceList) IsEmpty() bool { 12895 return jrl.Value == nil || len(*jrl.Value) == 0 12896} 12897 12898// hasNextLink returns true if the NextLink is not empty. 12899func (jrl JobResourceList) hasNextLink() bool { 12900 return jrl.NextLink != nil && len(*jrl.NextLink) != 0 12901} 12902 12903// jobResourceListPreparer prepares a request to retrieve the next set of results. 12904// It returns nil if no more results exist. 12905func (jrl JobResourceList) jobResourceListPreparer(ctx context.Context) (*http.Request, error) { 12906 if !jrl.hasNextLink() { 12907 return nil, nil 12908 } 12909 return autorest.Prepare((&http.Request{}).WithContext(ctx), 12910 autorest.AsJSON(), 12911 autorest.AsGet(), 12912 autorest.WithBaseURL(to.String(jrl.NextLink))) 12913} 12914 12915// JobResourceListPage contains a page of JobResource values. 12916type JobResourceListPage struct { 12917 fn func(context.Context, JobResourceList) (JobResourceList, error) 12918 jrl JobResourceList 12919} 12920 12921// NextWithContext advances to the next page of values. If there was an error making 12922// the request the page does not advance and the error is returned. 12923func (page *JobResourceListPage) NextWithContext(ctx context.Context) (err error) { 12924 if tracing.IsEnabled() { 12925 ctx = tracing.StartSpan(ctx, fqdn+"/JobResourceListPage.NextWithContext") 12926 defer func() { 12927 sc := -1 12928 if page.Response().Response.Response != nil { 12929 sc = page.Response().Response.Response.StatusCode 12930 } 12931 tracing.EndSpan(ctx, sc, err) 12932 }() 12933 } 12934 for { 12935 next, err := page.fn(ctx, page.jrl) 12936 if err != nil { 12937 return err 12938 } 12939 page.jrl = next 12940 if !next.hasNextLink() || !next.IsEmpty() { 12941 break 12942 } 12943 } 12944 return nil 12945} 12946 12947// Next advances to the next page of values. If there was an error making 12948// the request the page does not advance and the error is returned. 12949// Deprecated: Use NextWithContext() instead. 12950func (page *JobResourceListPage) Next() error { 12951 return page.NextWithContext(context.Background()) 12952} 12953 12954// NotDone returns true if the page enumeration should be started or is not yet complete. 12955func (page JobResourceListPage) NotDone() bool { 12956 return !page.jrl.IsEmpty() 12957} 12958 12959// Response returns the raw server response from the last page request. 12960func (page JobResourceListPage) Response() JobResourceList { 12961 return page.jrl 12962} 12963 12964// Values returns the slice of values for the current page or nil if there are no values. 12965func (page JobResourceListPage) Values() []JobResource { 12966 if page.jrl.IsEmpty() { 12967 return nil 12968 } 12969 return *page.jrl.Value 12970} 12971 12972// Creates a new instance of the JobResourceListPage type. 12973func NewJobResourceListPage(cur JobResourceList, getNextPage func(context.Context, JobResourceList) (JobResourceList, error)) JobResourceListPage { 12974 return JobResourceListPage{ 12975 fn: getNextPage, 12976 jrl: cur, 12977 } 12978} 12979 12980// KEKDetails KEK is encryption key for BEK. 12981type KEKDetails struct { 12982 // KeyURL - Key is KEK. 12983 KeyURL *string `json:"keyUrl,omitempty"` 12984 // KeyVaultID - Key Vault ID where this Key is stored. 12985 KeyVaultID *string `json:"keyVaultId,omitempty"` 12986 // KeyBackupData - KEK data. 12987 KeyBackupData *string `json:"keyBackupData,omitempty"` 12988} 12989 12990// KeyAndSecretDetails BEK is bitlocker key. 12991// KEK is encryption key for BEK 12992// If the VM was encrypted then we will store following details : 12993// 1. Secret(BEK) - Url + Backup Data + vaultId. 12994// 2. Key(KEK) - Url + Backup Data + vaultId. 12995// 3. EncryptionMechanism 12996// BEK and KEK can potentially have different vault ids. 12997type KeyAndSecretDetails struct { 12998 // KekDetails - KEK is encryption key for BEK. 12999 KekDetails *KEKDetails `json:"kekDetails,omitempty"` 13000 // BekDetails - BEK is bitlocker encryption key. 13001 BekDetails *BEKDetails `json:"bekDetails,omitempty"` 13002 // EncryptionMechanism - Encryption mechanism: None/ SinglePass/ DoublePass 13003 EncryptionMechanism *string `json:"encryptionMechanism,omitempty"` 13004} 13005 13006// LogSchedulePolicy log policy schedule. 13007type LogSchedulePolicy struct { 13008 // ScheduleFrequencyInMins - Frequency of the log schedule operation of this policy in minutes. 13009 ScheduleFrequencyInMins *int32 `json:"scheduleFrequencyInMins,omitempty"` 13010 // SchedulePolicyType - Possible values include: 'SchedulePolicyTypeSchedulePolicy', 'SchedulePolicyTypeLogSchedulePolicy', 'SchedulePolicyTypeLongTermSchedulePolicy', 'SchedulePolicyTypeSimpleSchedulePolicy' 13011 SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"` 13012} 13013 13014// MarshalJSON is the custom marshaler for LogSchedulePolicy. 13015func (lsp LogSchedulePolicy) MarshalJSON() ([]byte, error) { 13016 lsp.SchedulePolicyType = SchedulePolicyTypeLogSchedulePolicy 13017 objectMap := make(map[string]interface{}) 13018 if lsp.ScheduleFrequencyInMins != nil { 13019 objectMap["scheduleFrequencyInMins"] = lsp.ScheduleFrequencyInMins 13020 } 13021 if lsp.SchedulePolicyType != "" { 13022 objectMap["schedulePolicyType"] = lsp.SchedulePolicyType 13023 } 13024 return json.Marshal(objectMap) 13025} 13026 13027// AsLogSchedulePolicy is the BasicSchedulePolicy implementation for LogSchedulePolicy. 13028func (lsp LogSchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) { 13029 return &lsp, true 13030} 13031 13032// AsLongTermSchedulePolicy is the BasicSchedulePolicy implementation for LogSchedulePolicy. 13033func (lsp LogSchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) { 13034 return nil, false 13035} 13036 13037// AsSimpleSchedulePolicy is the BasicSchedulePolicy implementation for LogSchedulePolicy. 13038func (lsp LogSchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) { 13039 return nil, false 13040} 13041 13042// AsSchedulePolicy is the BasicSchedulePolicy implementation for LogSchedulePolicy. 13043func (lsp LogSchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) { 13044 return nil, false 13045} 13046 13047// AsBasicSchedulePolicy is the BasicSchedulePolicy implementation for LogSchedulePolicy. 13048func (lsp LogSchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) { 13049 return &lsp, true 13050} 13051 13052// LongTermRetentionPolicy long term retention policy. 13053type LongTermRetentionPolicy struct { 13054 // DailySchedule - Daily retention schedule of the protection policy. 13055 DailySchedule *DailyRetentionSchedule `json:"dailySchedule,omitempty"` 13056 // WeeklySchedule - Weekly retention schedule of the protection policy. 13057 WeeklySchedule *WeeklyRetentionSchedule `json:"weeklySchedule,omitempty"` 13058 // MonthlySchedule - Monthly retention schedule of the protection policy. 13059 MonthlySchedule *MonthlyRetentionSchedule `json:"monthlySchedule,omitempty"` 13060 // YearlySchedule - Yearly retention schedule of the protection policy. 13061 YearlySchedule *YearlyRetentionSchedule `json:"yearlySchedule,omitempty"` 13062 // RetentionPolicyType - Possible values include: 'RetentionPolicyTypeRetentionPolicy', 'RetentionPolicyTypeLongTermRetentionPolicy', 'RetentionPolicyTypeSimpleRetentionPolicy' 13063 RetentionPolicyType RetentionPolicyType `json:"retentionPolicyType,omitempty"` 13064} 13065 13066// MarshalJSON is the custom marshaler for LongTermRetentionPolicy. 13067func (ltrp LongTermRetentionPolicy) MarshalJSON() ([]byte, error) { 13068 ltrp.RetentionPolicyType = RetentionPolicyTypeLongTermRetentionPolicy 13069 objectMap := make(map[string]interface{}) 13070 if ltrp.DailySchedule != nil { 13071 objectMap["dailySchedule"] = ltrp.DailySchedule 13072 } 13073 if ltrp.WeeklySchedule != nil { 13074 objectMap["weeklySchedule"] = ltrp.WeeklySchedule 13075 } 13076 if ltrp.MonthlySchedule != nil { 13077 objectMap["monthlySchedule"] = ltrp.MonthlySchedule 13078 } 13079 if ltrp.YearlySchedule != nil { 13080 objectMap["yearlySchedule"] = ltrp.YearlySchedule 13081 } 13082 if ltrp.RetentionPolicyType != "" { 13083 objectMap["retentionPolicyType"] = ltrp.RetentionPolicyType 13084 } 13085 return json.Marshal(objectMap) 13086} 13087 13088// AsLongTermRetentionPolicy is the BasicRetentionPolicy implementation for LongTermRetentionPolicy. 13089func (ltrp LongTermRetentionPolicy) AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) { 13090 return <rp, true 13091} 13092 13093// AsSimpleRetentionPolicy is the BasicRetentionPolicy implementation for LongTermRetentionPolicy. 13094func (ltrp LongTermRetentionPolicy) AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) { 13095 return nil, false 13096} 13097 13098// AsRetentionPolicy is the BasicRetentionPolicy implementation for LongTermRetentionPolicy. 13099func (ltrp LongTermRetentionPolicy) AsRetentionPolicy() (*RetentionPolicy, bool) { 13100 return nil, false 13101} 13102 13103// AsBasicRetentionPolicy is the BasicRetentionPolicy implementation for LongTermRetentionPolicy. 13104func (ltrp LongTermRetentionPolicy) AsBasicRetentionPolicy() (BasicRetentionPolicy, bool) { 13105 return <rp, true 13106} 13107 13108// LongTermSchedulePolicy long term policy schedule. 13109type LongTermSchedulePolicy struct { 13110 // SchedulePolicyType - Possible values include: 'SchedulePolicyTypeSchedulePolicy', 'SchedulePolicyTypeLogSchedulePolicy', 'SchedulePolicyTypeLongTermSchedulePolicy', 'SchedulePolicyTypeSimpleSchedulePolicy' 13111 SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"` 13112} 13113 13114// MarshalJSON is the custom marshaler for LongTermSchedulePolicy. 13115func (ltsp LongTermSchedulePolicy) MarshalJSON() ([]byte, error) { 13116 ltsp.SchedulePolicyType = SchedulePolicyTypeLongTermSchedulePolicy 13117 objectMap := make(map[string]interface{}) 13118 if ltsp.SchedulePolicyType != "" { 13119 objectMap["schedulePolicyType"] = ltsp.SchedulePolicyType 13120 } 13121 return json.Marshal(objectMap) 13122} 13123 13124// AsLogSchedulePolicy is the BasicSchedulePolicy implementation for LongTermSchedulePolicy. 13125func (ltsp LongTermSchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) { 13126 return nil, false 13127} 13128 13129// AsLongTermSchedulePolicy is the BasicSchedulePolicy implementation for LongTermSchedulePolicy. 13130func (ltsp LongTermSchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) { 13131 return <sp, true 13132} 13133 13134// AsSimpleSchedulePolicy is the BasicSchedulePolicy implementation for LongTermSchedulePolicy. 13135func (ltsp LongTermSchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) { 13136 return nil, false 13137} 13138 13139// AsSchedulePolicy is the BasicSchedulePolicy implementation for LongTermSchedulePolicy. 13140func (ltsp LongTermSchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) { 13141 return nil, false 13142} 13143 13144// AsBasicSchedulePolicy is the BasicSchedulePolicy implementation for LongTermSchedulePolicy. 13145func (ltsp LongTermSchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) { 13146 return <sp, true 13147} 13148 13149// MabContainer container with items backed up using MAB backup engine. 13150type MabContainer struct { 13151 // CanReRegister - Can the container be registered one more time. 13152 CanReRegister *bool `json:"canReRegister,omitempty"` 13153 // ContainerID - ContainerID represents the container. 13154 ContainerID *int64 `json:"containerId,omitempty"` 13155 // ProtectedItemCount - Number of items backed up in this container. 13156 ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` 13157 // AgentVersion - Agent version of this container. 13158 AgentVersion *string `json:"agentVersion,omitempty"` 13159 // ExtendedInfo - Additional information for this container 13160 ExtendedInfo *MabContainerExtendedInfo `json:"extendedInfo,omitempty"` 13161 // MabContainerHealthDetails - Health details on this mab container. 13162 MabContainerHealthDetails *[]MABContainerHealthDetails `json:"mabContainerHealthDetails,omitempty"` 13163 // ContainerHealthState - Health state of mab container. 13164 ContainerHealthState *string `json:"containerHealthState,omitempty"` 13165 // FriendlyName - Friendly name of the container. 13166 FriendlyName *string `json:"friendlyName,omitempty"` 13167 // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 13168 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 13169 // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. 13170 RegistrationStatus *string `json:"registrationStatus,omitempty"` 13171 // HealthStatus - Status of health of the container. 13172 HealthStatus *string `json:"healthStatus,omitempty"` 13173 // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' 13174 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` 13175} 13176 13177// MarshalJSON is the custom marshaler for MabContainer. 13178func (mc MabContainer) MarshalJSON() ([]byte, error) { 13179 mc.ContainerType = ContainerTypeWindows1 13180 objectMap := make(map[string]interface{}) 13181 if mc.CanReRegister != nil { 13182 objectMap["canReRegister"] = mc.CanReRegister 13183 } 13184 if mc.ContainerID != nil { 13185 objectMap["containerId"] = mc.ContainerID 13186 } 13187 if mc.ProtectedItemCount != nil { 13188 objectMap["protectedItemCount"] = mc.ProtectedItemCount 13189 } 13190 if mc.AgentVersion != nil { 13191 objectMap["agentVersion"] = mc.AgentVersion 13192 } 13193 if mc.ExtendedInfo != nil { 13194 objectMap["extendedInfo"] = mc.ExtendedInfo 13195 } 13196 if mc.MabContainerHealthDetails != nil { 13197 objectMap["mabContainerHealthDetails"] = mc.MabContainerHealthDetails 13198 } 13199 if mc.ContainerHealthState != nil { 13200 objectMap["containerHealthState"] = mc.ContainerHealthState 13201 } 13202 if mc.FriendlyName != nil { 13203 objectMap["friendlyName"] = mc.FriendlyName 13204 } 13205 if mc.BackupManagementType != "" { 13206 objectMap["backupManagementType"] = mc.BackupManagementType 13207 } 13208 if mc.RegistrationStatus != nil { 13209 objectMap["registrationStatus"] = mc.RegistrationStatus 13210 } 13211 if mc.HealthStatus != nil { 13212 objectMap["healthStatus"] = mc.HealthStatus 13213 } 13214 if mc.ContainerType != "" { 13215 objectMap["containerType"] = mc.ContainerType 13216 } 13217 return json.Marshal(objectMap) 13218} 13219 13220// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for MabContainer. 13221func (mc MabContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { 13222 return nil, false 13223} 13224 13225// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for MabContainer. 13226func (mc MabContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { 13227 return nil, false 13228} 13229 13230// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for MabContainer. 13231func (mc MabContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { 13232 return nil, false 13233} 13234 13235// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for MabContainer. 13236func (mc MabContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { 13237 return nil, false 13238} 13239 13240// AsAzureSQLContainer is the BasicProtectionContainer implementation for MabContainer. 13241func (mc MabContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { 13242 return nil, false 13243} 13244 13245// AsAzureStorageContainer is the BasicProtectionContainer implementation for MabContainer. 13246func (mc MabContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { 13247 return nil, false 13248} 13249 13250// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for MabContainer. 13251func (mc MabContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { 13252 return nil, false 13253} 13254 13255// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for MabContainer. 13256func (mc MabContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { 13257 return nil, false 13258} 13259 13260// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for MabContainer. 13261func (mc MabContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { 13262 return nil, false 13263} 13264 13265// AsDpmContainer is the BasicProtectionContainer implementation for MabContainer. 13266func (mc MabContainer) AsDpmContainer() (*DpmContainer, bool) { 13267 return nil, false 13268} 13269 13270// AsBasicDpmContainer is the BasicProtectionContainer implementation for MabContainer. 13271func (mc MabContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { 13272 return nil, false 13273} 13274 13275// AsGenericContainer is the BasicProtectionContainer implementation for MabContainer. 13276func (mc MabContainer) AsGenericContainer() (*GenericContainer, bool) { 13277 return nil, false 13278} 13279 13280// AsIaaSVMContainer is the BasicProtectionContainer implementation for MabContainer. 13281func (mc MabContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { 13282 return nil, false 13283} 13284 13285// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for MabContainer. 13286func (mc MabContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { 13287 return nil, false 13288} 13289 13290// AsMabContainer is the BasicProtectionContainer implementation for MabContainer. 13291func (mc MabContainer) AsMabContainer() (*MabContainer, bool) { 13292 return &mc, true 13293} 13294 13295// AsProtectionContainer is the BasicProtectionContainer implementation for MabContainer. 13296func (mc MabContainer) AsProtectionContainer() (*ProtectionContainer, bool) { 13297 return nil, false 13298} 13299 13300// AsBasicProtectionContainer is the BasicProtectionContainer implementation for MabContainer. 13301func (mc MabContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { 13302 return &mc, true 13303} 13304 13305// MabContainerExtendedInfo additional information of the container. 13306type MabContainerExtendedInfo struct { 13307 // LastRefreshedAt - Time stamp when this container was refreshed. 13308 LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"` 13309 // BackupItemType - Type of backup items associated with this container. Possible values include: 'ItemTypeInvalid', 'ItemTypeVM', 'ItemTypeFileFolder', 'ItemTypeAzureSQLDb', 'ItemTypeSQLDB', 'ItemTypeExchange', 'ItemTypeSharepoint', 'ItemTypeVMwareVM', 'ItemTypeSystemState', 'ItemTypeClient', 'ItemTypeGenericDataSource', 'ItemTypeSQLDataBase', 'ItemTypeAzureFileShare', 'ItemTypeSAPHanaDatabase', 'ItemTypeSAPAseDatabase' 13310 BackupItemType ItemType `json:"backupItemType,omitempty"` 13311 // BackupItems - List of backup items associated with this container. 13312 BackupItems *[]string `json:"backupItems,omitempty"` 13313 // PolicyName - Backup policy associated with this container. 13314 PolicyName *string `json:"policyName,omitempty"` 13315 // LastBackupStatus - Latest backup status of this container. 13316 LastBackupStatus *string `json:"lastBackupStatus,omitempty"` 13317} 13318 13319// MABContainerHealthDetails MAB workload-specific Health Details. 13320type MABContainerHealthDetails struct { 13321 // Code - Health Code 13322 Code *int32 `json:"code,omitempty"` 13323 // Title - Health Title 13324 Title *string `json:"title,omitempty"` 13325 // Message - Health Message 13326 Message *string `json:"message,omitempty"` 13327 // Recommendations - Health Recommended Actions 13328 Recommendations *[]string `json:"recommendations,omitempty"` 13329} 13330 13331// MabErrorInfo MAB workload-specific error information. 13332type MabErrorInfo struct { 13333 // ErrorString - READ-ONLY; Localized error string. 13334 ErrorString *string `json:"errorString,omitempty"` 13335 // Recommendations - READ-ONLY; List of localized recommendations. 13336 Recommendations *[]string `json:"recommendations,omitempty"` 13337} 13338 13339// MarshalJSON is the custom marshaler for MabErrorInfo. 13340func (mei MabErrorInfo) MarshalJSON() ([]byte, error) { 13341 objectMap := make(map[string]interface{}) 13342 return json.Marshal(objectMap) 13343} 13344 13345// MabFileFolderProtectedItem MAB workload-specific backup item. 13346type MabFileFolderProtectedItem struct { 13347 // FriendlyName - Friendly name of this backup item. 13348 FriendlyName *string `json:"friendlyName,omitempty"` 13349 // ComputerName - Name of the computer associated with this backup item. 13350 ComputerName *string `json:"computerName,omitempty"` 13351 // LastBackupStatus - Status of last backup operation. 13352 LastBackupStatus *string `json:"lastBackupStatus,omitempty"` 13353 // LastBackupTime - Timestamp of the last backup operation on this backup item. 13354 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` 13355 // ProtectionState - Protected, ProtectionStopped, IRPending or ProtectionError 13356 ProtectionState *string `json:"protectionState,omitempty"` 13357 // DeferredDeleteSyncTimeInUTC - Sync time for deferred deletion in UTC 13358 DeferredDeleteSyncTimeInUTC *int64 `json:"deferredDeleteSyncTimeInUTC,omitempty"` 13359 // ExtendedInfo - Additional information with this backup item. 13360 ExtendedInfo *MabFileFolderProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` 13361 // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 13362 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 13363 // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' 13364 WorkloadType DataSourceType `json:"workloadType,omitempty"` 13365 // ContainerName - Unique name of container 13366 ContainerName *string `json:"containerName,omitempty"` 13367 // SourceResourceID - ARM ID of the resource to be backed up. 13368 SourceResourceID *string `json:"sourceResourceId,omitempty"` 13369 // PolicyID - ID of the backup policy with which this item is backed up. 13370 PolicyID *string `json:"policyId,omitempty"` 13371 // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. 13372 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` 13373 // BackupSetName - Name of the backup set the backup item belongs to 13374 BackupSetName *string `json:"backupSetName,omitempty"` 13375 // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' 13376 CreateMode CreateMode `json:"createMode,omitempty"` 13377 // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC 13378 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` 13379 // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete 13380 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` 13381 // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted 13382 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` 13383 // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon 13384 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` 13385 // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state 13386 IsRehydrate *bool `json:"isRehydrate,omitempty"` 13387 // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' 13388 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` 13389} 13390 13391// MarshalJSON is the custom marshaler for MabFileFolderProtectedItem. 13392func (mffpi MabFileFolderProtectedItem) MarshalJSON() ([]byte, error) { 13393 mffpi.ProtectedItemType = ProtectedItemTypeMabFileFolderProtectedItem 13394 objectMap := make(map[string]interface{}) 13395 if mffpi.FriendlyName != nil { 13396 objectMap["friendlyName"] = mffpi.FriendlyName 13397 } 13398 if mffpi.ComputerName != nil { 13399 objectMap["computerName"] = mffpi.ComputerName 13400 } 13401 if mffpi.LastBackupStatus != nil { 13402 objectMap["lastBackupStatus"] = mffpi.LastBackupStatus 13403 } 13404 if mffpi.LastBackupTime != nil { 13405 objectMap["lastBackupTime"] = mffpi.LastBackupTime 13406 } 13407 if mffpi.ProtectionState != nil { 13408 objectMap["protectionState"] = mffpi.ProtectionState 13409 } 13410 if mffpi.DeferredDeleteSyncTimeInUTC != nil { 13411 objectMap["deferredDeleteSyncTimeInUTC"] = mffpi.DeferredDeleteSyncTimeInUTC 13412 } 13413 if mffpi.ExtendedInfo != nil { 13414 objectMap["extendedInfo"] = mffpi.ExtendedInfo 13415 } 13416 if mffpi.BackupManagementType != "" { 13417 objectMap["backupManagementType"] = mffpi.BackupManagementType 13418 } 13419 if mffpi.WorkloadType != "" { 13420 objectMap["workloadType"] = mffpi.WorkloadType 13421 } 13422 if mffpi.ContainerName != nil { 13423 objectMap["containerName"] = mffpi.ContainerName 13424 } 13425 if mffpi.SourceResourceID != nil { 13426 objectMap["sourceResourceId"] = mffpi.SourceResourceID 13427 } 13428 if mffpi.PolicyID != nil { 13429 objectMap["policyId"] = mffpi.PolicyID 13430 } 13431 if mffpi.LastRecoveryPoint != nil { 13432 objectMap["lastRecoveryPoint"] = mffpi.LastRecoveryPoint 13433 } 13434 if mffpi.BackupSetName != nil { 13435 objectMap["backupSetName"] = mffpi.BackupSetName 13436 } 13437 if mffpi.CreateMode != "" { 13438 objectMap["createMode"] = mffpi.CreateMode 13439 } 13440 if mffpi.DeferredDeleteTimeInUTC != nil { 13441 objectMap["deferredDeleteTimeInUTC"] = mffpi.DeferredDeleteTimeInUTC 13442 } 13443 if mffpi.IsScheduledForDeferredDelete != nil { 13444 objectMap["isScheduledForDeferredDelete"] = mffpi.IsScheduledForDeferredDelete 13445 } 13446 if mffpi.DeferredDeleteTimeRemaining != nil { 13447 objectMap["deferredDeleteTimeRemaining"] = mffpi.DeferredDeleteTimeRemaining 13448 } 13449 if mffpi.IsDeferredDeleteScheduleUpcoming != nil { 13450 objectMap["isDeferredDeleteScheduleUpcoming"] = mffpi.IsDeferredDeleteScheduleUpcoming 13451 } 13452 if mffpi.IsRehydrate != nil { 13453 objectMap["isRehydrate"] = mffpi.IsRehydrate 13454 } 13455 if mffpi.ProtectedItemType != "" { 13456 objectMap["protectedItemType"] = mffpi.ProtectedItemType 13457 } 13458 return json.Marshal(objectMap) 13459} 13460 13461// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13462func (mffpi MabFileFolderProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { 13463 return nil, false 13464} 13465 13466// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13467func (mffpi MabFileFolderProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { 13468 return nil, false 13469} 13470 13471// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13472func (mffpi MabFileFolderProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { 13473 return nil, false 13474} 13475 13476// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13477func (mffpi MabFileFolderProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { 13478 return nil, false 13479} 13480 13481// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13482func (mffpi MabFileFolderProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { 13483 return nil, false 13484} 13485 13486// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13487func (mffpi MabFileFolderProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { 13488 return nil, false 13489} 13490 13491// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13492func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { 13493 return nil, false 13494} 13495 13496// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13497func (mffpi MabFileFolderProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { 13498 return nil, false 13499} 13500 13501// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13502func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { 13503 return nil, false 13504} 13505 13506// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13507func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { 13508 return nil, false 13509} 13510 13511// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13512func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { 13513 return nil, false 13514} 13515 13516// AsDPMProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13517func (mffpi MabFileFolderProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { 13518 return nil, false 13519} 13520 13521// AsGenericProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13522func (mffpi MabFileFolderProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { 13523 return nil, false 13524} 13525 13526// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13527func (mffpi MabFileFolderProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { 13528 return &mffpi, true 13529} 13530 13531// AsProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13532func (mffpi MabFileFolderProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { 13533 return nil, false 13534} 13535 13536// AsBasicProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13537func (mffpi MabFileFolderProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { 13538 return &mffpi, true 13539} 13540 13541// MabFileFolderProtectedItemExtendedInfo additional information on the backed up item. 13542type MabFileFolderProtectedItemExtendedInfo struct { 13543 // LastRefreshedAt - Last time when the agent data synced to service. 13544 LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"` 13545 // OldestRecoveryPoint - The oldest backup copy available. 13546 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"` 13547 // RecoveryPointCount - Number of backup copies associated with the backup item. 13548 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"` 13549} 13550 13551// MabJob MAB workload-specific job. 13552type MabJob struct { 13553 // Duration - Time taken by job to run. 13554 Duration *string `json:"duration,omitempty"` 13555 // ActionsInfo - The state/actions applicable on jobs like cancel/retry. 13556 ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"` 13557 // MabServerName - Name of server protecting the DS. 13558 MabServerName *string `json:"mabServerName,omitempty"` 13559 // MabServerType - Server type of MAB container. Possible values include: 'MabServerTypeInvalid', 'MabServerTypeUnknown', 'MabServerTypeIaasVMContainer', 'MabServerTypeIaasVMServiceContainer', 'MabServerTypeDPMContainer', 'MabServerTypeAzureBackupServerContainer', 'MabServerTypeMABContainer', 'MabServerTypeCluster', 'MabServerTypeAzureSQLContainer', 'MabServerTypeWindows', 'MabServerTypeVCenter', 'MabServerTypeVMAppContainer', 'MabServerTypeSQLAGWorkLoadContainer', 'MabServerTypeStorageContainer', 'MabServerTypeGenericContainer' 13560 MabServerType MabServerType `json:"mabServerType,omitempty"` 13561 // WorkloadType - Workload type of backup item. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' 13562 WorkloadType WorkloadType `json:"workloadType,omitempty"` 13563 // ErrorDetails - The errors. 13564 ErrorDetails *[]MabErrorInfo `json:"errorDetails,omitempty"` 13565 // ExtendedInfo - Additional information on the job. 13566 ExtendedInfo *MabJobExtendedInfo `json:"extendedInfo,omitempty"` 13567 // EntityFriendlyName - Friendly name of the entity on which the current job is executing. 13568 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` 13569 // BackupManagementType - Backup management type to execute the current job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 13570 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 13571 // Operation - The operation name. 13572 Operation *string `json:"operation,omitempty"` 13573 // Status - Job status. 13574 Status *string `json:"status,omitempty"` 13575 // StartTime - The start time. 13576 StartTime *date.Time `json:"startTime,omitempty"` 13577 // EndTime - The end time. 13578 EndTime *date.Time `json:"endTime,omitempty"` 13579 // ActivityID - ActivityId of job. 13580 ActivityID *string `json:"activityId,omitempty"` 13581 // JobType - Possible values include: 'JobTypeJob', 'JobTypeAzureIaaSVMJob', 'JobTypeAzureStorageJob', 'JobTypeAzureWorkloadJob', 'JobTypeDpmJob', 'JobTypeMabJob' 13582 JobType JobType `json:"jobType,omitempty"` 13583} 13584 13585// MarshalJSON is the custom marshaler for MabJob. 13586func (mj MabJob) MarshalJSON() ([]byte, error) { 13587 mj.JobType = JobTypeMabJob 13588 objectMap := make(map[string]interface{}) 13589 if mj.Duration != nil { 13590 objectMap["duration"] = mj.Duration 13591 } 13592 if mj.ActionsInfo != nil { 13593 objectMap["actionsInfo"] = mj.ActionsInfo 13594 } 13595 if mj.MabServerName != nil { 13596 objectMap["mabServerName"] = mj.MabServerName 13597 } 13598 if mj.MabServerType != "" { 13599 objectMap["mabServerType"] = mj.MabServerType 13600 } 13601 if mj.WorkloadType != "" { 13602 objectMap["workloadType"] = mj.WorkloadType 13603 } 13604 if mj.ErrorDetails != nil { 13605 objectMap["errorDetails"] = mj.ErrorDetails 13606 } 13607 if mj.ExtendedInfo != nil { 13608 objectMap["extendedInfo"] = mj.ExtendedInfo 13609 } 13610 if mj.EntityFriendlyName != nil { 13611 objectMap["entityFriendlyName"] = mj.EntityFriendlyName 13612 } 13613 if mj.BackupManagementType != "" { 13614 objectMap["backupManagementType"] = mj.BackupManagementType 13615 } 13616 if mj.Operation != nil { 13617 objectMap["operation"] = mj.Operation 13618 } 13619 if mj.Status != nil { 13620 objectMap["status"] = mj.Status 13621 } 13622 if mj.StartTime != nil { 13623 objectMap["startTime"] = mj.StartTime 13624 } 13625 if mj.EndTime != nil { 13626 objectMap["endTime"] = mj.EndTime 13627 } 13628 if mj.ActivityID != nil { 13629 objectMap["activityId"] = mj.ActivityID 13630 } 13631 if mj.JobType != "" { 13632 objectMap["jobType"] = mj.JobType 13633 } 13634 return json.Marshal(objectMap) 13635} 13636 13637// AsAzureIaaSVMJob is the BasicJob implementation for MabJob. 13638func (mj MabJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) { 13639 return nil, false 13640} 13641 13642// AsAzureStorageJob is the BasicJob implementation for MabJob. 13643func (mj MabJob) AsAzureStorageJob() (*AzureStorageJob, bool) { 13644 return nil, false 13645} 13646 13647// AsAzureWorkloadJob is the BasicJob implementation for MabJob. 13648func (mj MabJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) { 13649 return nil, false 13650} 13651 13652// AsDpmJob is the BasicJob implementation for MabJob. 13653func (mj MabJob) AsDpmJob() (*DpmJob, bool) { 13654 return nil, false 13655} 13656 13657// AsMabJob is the BasicJob implementation for MabJob. 13658func (mj MabJob) AsMabJob() (*MabJob, bool) { 13659 return &mj, true 13660} 13661 13662// AsJob is the BasicJob implementation for MabJob. 13663func (mj MabJob) AsJob() (*Job, bool) { 13664 return nil, false 13665} 13666 13667// AsBasicJob is the BasicJob implementation for MabJob. 13668func (mj MabJob) AsBasicJob() (BasicJob, bool) { 13669 return &mj, true 13670} 13671 13672// MabJobExtendedInfo additional information for the MAB workload-specific job. 13673type MabJobExtendedInfo struct { 13674 // TasksList - List of tasks for this job. 13675 TasksList *[]MabJobTaskDetails `json:"tasksList,omitempty"` 13676 // PropertyBag - The job properties. 13677 PropertyBag map[string]*string `json:"propertyBag"` 13678 // DynamicErrorMessage - Non localized error message specific to this job. 13679 DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"` 13680} 13681 13682// MarshalJSON is the custom marshaler for MabJobExtendedInfo. 13683func (mjei MabJobExtendedInfo) MarshalJSON() ([]byte, error) { 13684 objectMap := make(map[string]interface{}) 13685 if mjei.TasksList != nil { 13686 objectMap["tasksList"] = mjei.TasksList 13687 } 13688 if mjei.PropertyBag != nil { 13689 objectMap["propertyBag"] = mjei.PropertyBag 13690 } 13691 if mjei.DynamicErrorMessage != nil { 13692 objectMap["dynamicErrorMessage"] = mjei.DynamicErrorMessage 13693 } 13694 return json.Marshal(objectMap) 13695} 13696 13697// MabJobTaskDetails MAB workload-specific job task details. 13698type MabJobTaskDetails struct { 13699 // TaskID - The task display name. 13700 TaskID *string `json:"taskId,omitempty"` 13701 // StartTime - The start time. 13702 StartTime *date.Time `json:"startTime,omitempty"` 13703 // EndTime - The end time. 13704 EndTime *date.Time `json:"endTime,omitempty"` 13705 // Duration - Time elapsed for task. 13706 Duration *string `json:"duration,omitempty"` 13707 // Status - The status. 13708 Status *string `json:"status,omitempty"` 13709} 13710 13711// MabProtectionPolicy mab container-specific backup policy. 13712type MabProtectionPolicy struct { 13713 // SchedulePolicy - Backup schedule of backup policy. 13714 SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"` 13715 // RetentionPolicy - Retention policy details. 13716 RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"` 13717 // ProtectedItemsCount - Number of items associated with this policy. 13718 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` 13719 // BackupManagementType - Possible values include: 'BackupManagementTypeProtectionPolicy', 'BackupManagementTypeAzureWorkload', 'BackupManagementTypeAzureStorage', 'BackupManagementTypeAzureIaasVM', 'BackupManagementTypeAzureSQL', 'BackupManagementTypeGenericProtectionPolicy', 'BackupManagementTypeMAB' 13720 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"` 13721} 13722 13723// MarshalJSON is the custom marshaler for MabProtectionPolicy. 13724func (mpp MabProtectionPolicy) MarshalJSON() ([]byte, error) { 13725 mpp.BackupManagementType = BackupManagementTypeMAB 13726 objectMap := make(map[string]interface{}) 13727 objectMap["schedulePolicy"] = mpp.SchedulePolicy 13728 objectMap["retentionPolicy"] = mpp.RetentionPolicy 13729 if mpp.ProtectedItemsCount != nil { 13730 objectMap["protectedItemsCount"] = mpp.ProtectedItemsCount 13731 } 13732 if mpp.BackupManagementType != "" { 13733 objectMap["backupManagementType"] = mpp.BackupManagementType 13734 } 13735 return json.Marshal(objectMap) 13736} 13737 13738// AsAzureVMWorkloadProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. 13739func (mpp MabProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) { 13740 return nil, false 13741} 13742 13743// AsAzureFileShareProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. 13744func (mpp MabProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) { 13745 return nil, false 13746} 13747 13748// AsAzureIaaSVMProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. 13749func (mpp MabProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) { 13750 return nil, false 13751} 13752 13753// AsAzureSQLProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. 13754func (mpp MabProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) { 13755 return nil, false 13756} 13757 13758// AsGenericProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. 13759func (mpp MabProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) { 13760 return nil, false 13761} 13762 13763// AsMabProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. 13764func (mpp MabProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) { 13765 return &mpp, true 13766} 13767 13768// AsProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. 13769func (mpp MabProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) { 13770 return nil, false 13771} 13772 13773// AsBasicProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. 13774func (mpp MabProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) { 13775 return &mpp, true 13776} 13777 13778// UnmarshalJSON is the custom unmarshaler for MabProtectionPolicy struct. 13779func (mpp *MabProtectionPolicy) UnmarshalJSON(body []byte) error { 13780 var m map[string]*json.RawMessage 13781 err := json.Unmarshal(body, &m) 13782 if err != nil { 13783 return err 13784 } 13785 for k, v := range m { 13786 switch k { 13787 case "schedulePolicy": 13788 if v != nil { 13789 schedulePolicy, err := unmarshalBasicSchedulePolicy(*v) 13790 if err != nil { 13791 return err 13792 } 13793 mpp.SchedulePolicy = schedulePolicy 13794 } 13795 case "retentionPolicy": 13796 if v != nil { 13797 retentionPolicy, err := unmarshalBasicRetentionPolicy(*v) 13798 if err != nil { 13799 return err 13800 } 13801 mpp.RetentionPolicy = retentionPolicy 13802 } 13803 case "protectedItemsCount": 13804 if v != nil { 13805 var protectedItemsCount int32 13806 err = json.Unmarshal(*v, &protectedItemsCount) 13807 if err != nil { 13808 return err 13809 } 13810 mpp.ProtectedItemsCount = &protectedItemsCount 13811 } 13812 case "backupManagementType": 13813 if v != nil { 13814 var backupManagementType ManagementTypeBasicProtectionPolicy 13815 err = json.Unmarshal(*v, &backupManagementType) 13816 if err != nil { 13817 return err 13818 } 13819 mpp.BackupManagementType = backupManagementType 13820 } 13821 } 13822 } 13823 13824 return nil 13825} 13826 13827// ManagementUsage backup management usages of a vault. 13828type ManagementUsage struct { 13829 // Unit - Unit of the usage. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' 13830 Unit UsagesUnit `json:"unit,omitempty"` 13831 // QuotaPeriod - Quota period of usage. 13832 QuotaPeriod *string `json:"quotaPeriod,omitempty"` 13833 // NextResetTime - Next reset time of usage. 13834 NextResetTime *date.Time `json:"nextResetTime,omitempty"` 13835 // CurrentValue - Current value of usage. 13836 CurrentValue *int64 `json:"currentValue,omitempty"` 13837 // Limit - Limit of usage. 13838 Limit *int64 `json:"limit,omitempty"` 13839 // Name - Name of usage. 13840 Name *NameInfo `json:"name,omitempty"` 13841} 13842 13843// ManagementUsageList backup management usage for vault. 13844type ManagementUsageList struct { 13845 autorest.Response `json:"-"` 13846 // Value - The list of backup management usages for the given vault. 13847 Value *[]ManagementUsage `json:"value,omitempty"` 13848} 13849 13850// MonthlyRetentionSchedule monthly retention schedule. 13851type MonthlyRetentionSchedule struct { 13852 // RetentionScheduleFormatType - Retention schedule format type for monthly retention policy. Possible values include: 'RetentionScheduleFormatInvalid', 'RetentionScheduleFormatDaily', 'RetentionScheduleFormatWeekly' 13853 RetentionScheduleFormatType RetentionScheduleFormat `json:"retentionScheduleFormatType,omitempty"` 13854 // RetentionScheduleDaily - Daily retention format for monthly retention policy. 13855 RetentionScheduleDaily *DailyRetentionFormat `json:"retentionScheduleDaily,omitempty"` 13856 // RetentionScheduleWeekly - Weekly retention format for monthly retention policy. 13857 RetentionScheduleWeekly *WeeklyRetentionFormat `json:"retentionScheduleWeekly,omitempty"` 13858 // RetentionTimes - Retention times of retention policy. 13859 RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"` 13860 // RetentionDuration - Retention duration of retention Policy. 13861 RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` 13862} 13863 13864// NameInfo the name of usage. 13865type NameInfo struct { 13866 // Value - Value of usage. 13867 Value *string `json:"value,omitempty"` 13868 // LocalizedValue - Localized value of usage. 13869 LocalizedValue *string `json:"localizedValue,omitempty"` 13870} 13871 13872// OperationResultInfo operation result info. 13873type OperationResultInfo struct { 13874 // JobList - List of jobs created by this operation. 13875 JobList *[]string `json:"jobList,omitempty"` 13876 // ObjectType - Possible values include: 'ObjectTypeOperationResultInfoBase', 'ObjectTypeExportJobsOperationResultInfo', 'ObjectTypeOperationResultInfo' 13877 ObjectType ObjectType `json:"objectType,omitempty"` 13878} 13879 13880// MarshalJSON is the custom marshaler for OperationResultInfo. 13881func (ori OperationResultInfo) MarshalJSON() ([]byte, error) { 13882 ori.ObjectType = ObjectTypeOperationResultInfo 13883 objectMap := make(map[string]interface{}) 13884 if ori.JobList != nil { 13885 objectMap["jobList"] = ori.JobList 13886 } 13887 if ori.ObjectType != "" { 13888 objectMap["objectType"] = ori.ObjectType 13889 } 13890 return json.Marshal(objectMap) 13891} 13892 13893// AsExportJobsOperationResultInfo is the BasicOperationResultInfoBase implementation for OperationResultInfo. 13894func (ori OperationResultInfo) AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) { 13895 return nil, false 13896} 13897 13898// AsOperationResultInfo is the BasicOperationResultInfoBase implementation for OperationResultInfo. 13899func (ori OperationResultInfo) AsOperationResultInfo() (*OperationResultInfo, bool) { 13900 return &ori, true 13901} 13902 13903// AsOperationResultInfoBase is the BasicOperationResultInfoBase implementation for OperationResultInfo. 13904func (ori OperationResultInfo) AsOperationResultInfoBase() (*OperationResultInfoBase, bool) { 13905 return nil, false 13906} 13907 13908// AsBasicOperationResultInfoBase is the BasicOperationResultInfoBase implementation for OperationResultInfo. 13909func (ori OperationResultInfo) AsBasicOperationResultInfoBase() (BasicOperationResultInfoBase, bool) { 13910 return &ori, true 13911} 13912 13913// BasicOperationResultInfoBase base class for operation result info. 13914type BasicOperationResultInfoBase interface { 13915 AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) 13916 AsOperationResultInfo() (*OperationResultInfo, bool) 13917 AsOperationResultInfoBase() (*OperationResultInfoBase, bool) 13918} 13919 13920// OperationResultInfoBase base class for operation result info. 13921type OperationResultInfoBase struct { 13922 // ObjectType - Possible values include: 'ObjectTypeOperationResultInfoBase', 'ObjectTypeExportJobsOperationResultInfo', 'ObjectTypeOperationResultInfo' 13923 ObjectType ObjectType `json:"objectType,omitempty"` 13924} 13925 13926func unmarshalBasicOperationResultInfoBase(body []byte) (BasicOperationResultInfoBase, error) { 13927 var m map[string]interface{} 13928 err := json.Unmarshal(body, &m) 13929 if err != nil { 13930 return nil, err 13931 } 13932 13933 switch m["objectType"] { 13934 case string(ObjectTypeExportJobsOperationResultInfo): 13935 var ejori ExportJobsOperationResultInfo 13936 err := json.Unmarshal(body, &ejori) 13937 return ejori, err 13938 case string(ObjectTypeOperationResultInfo): 13939 var ori OperationResultInfo 13940 err := json.Unmarshal(body, &ori) 13941 return ori, err 13942 default: 13943 var orib OperationResultInfoBase 13944 err := json.Unmarshal(body, &orib) 13945 return orib, err 13946 } 13947} 13948func unmarshalBasicOperationResultInfoBaseArray(body []byte) ([]BasicOperationResultInfoBase, error) { 13949 var rawMessages []*json.RawMessage 13950 err := json.Unmarshal(body, &rawMessages) 13951 if err != nil { 13952 return nil, err 13953 } 13954 13955 oribArray := make([]BasicOperationResultInfoBase, len(rawMessages)) 13956 13957 for index, rawMessage := range rawMessages { 13958 orib, err := unmarshalBasicOperationResultInfoBase(*rawMessage) 13959 if err != nil { 13960 return nil, err 13961 } 13962 oribArray[index] = orib 13963 } 13964 return oribArray, nil 13965} 13966 13967// MarshalJSON is the custom marshaler for OperationResultInfoBase. 13968func (orib OperationResultInfoBase) MarshalJSON() ([]byte, error) { 13969 orib.ObjectType = ObjectTypeOperationResultInfoBase 13970 objectMap := make(map[string]interface{}) 13971 if orib.ObjectType != "" { 13972 objectMap["objectType"] = orib.ObjectType 13973 } 13974 return json.Marshal(objectMap) 13975} 13976 13977// AsExportJobsOperationResultInfo is the BasicOperationResultInfoBase implementation for OperationResultInfoBase. 13978func (orib OperationResultInfoBase) AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) { 13979 return nil, false 13980} 13981 13982// AsOperationResultInfo is the BasicOperationResultInfoBase implementation for OperationResultInfoBase. 13983func (orib OperationResultInfoBase) AsOperationResultInfo() (*OperationResultInfo, bool) { 13984 return nil, false 13985} 13986 13987// AsOperationResultInfoBase is the BasicOperationResultInfoBase implementation for OperationResultInfoBase. 13988func (orib OperationResultInfoBase) AsOperationResultInfoBase() (*OperationResultInfoBase, bool) { 13989 return &orib, true 13990} 13991 13992// AsBasicOperationResultInfoBase is the BasicOperationResultInfoBase implementation for OperationResultInfoBase. 13993func (orib OperationResultInfoBase) AsBasicOperationResultInfoBase() (BasicOperationResultInfoBase, bool) { 13994 return &orib, true 13995} 13996 13997// OperationResultInfoBaseResource base class for operation result info. 13998type OperationResultInfoBaseResource struct { 13999 autorest.Response `json:"-"` 14000 // Operation - OperationResultInfoBaseResource operation 14001 Operation BasicOperationResultInfoBase `json:"operation,omitempty"` 14002 // StatusCode - HTTP Status Code of the operation. Possible values include: 'Continue', 'SwitchingProtocols', 'OK', 'Created', 'Accepted', 'NonAuthoritativeInformation', 'NoContent', 'ResetContent', 'PartialContent', 'MultipleChoices', 'Ambiguous', 'MovedPermanently', 'Moved', 'Found', 'Redirect', 'SeeOther', 'RedirectMethod', 'NotModified', 'UseProxy', 'Unused', 'TemporaryRedirect', 'RedirectKeepVerb', 'BadRequest', 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', 'MethodNotAllowed', 'NotAcceptable', 'ProxyAuthenticationRequired', 'RequestTimeout', 'Conflict', 'Gone', 'LengthRequired', 'PreconditionFailed', 'RequestEntityTooLarge', 'RequestURITooLong', 'UnsupportedMediaType', 'RequestedRangeNotSatisfiable', 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', 'HTTPVersionNotSupported' 14003 StatusCode HTTPStatusCode `json:"statusCode,omitempty"` 14004 // Headers - HTTP headers associated with this operation. 14005 Headers map[string][]string `json:"headers"` 14006} 14007 14008// MarshalJSON is the custom marshaler for OperationResultInfoBaseResource. 14009func (oribr OperationResultInfoBaseResource) MarshalJSON() ([]byte, error) { 14010 objectMap := make(map[string]interface{}) 14011 objectMap["operation"] = oribr.Operation 14012 if oribr.StatusCode != "" { 14013 objectMap["statusCode"] = oribr.StatusCode 14014 } 14015 if oribr.Headers != nil { 14016 objectMap["headers"] = oribr.Headers 14017 } 14018 return json.Marshal(objectMap) 14019} 14020 14021// UnmarshalJSON is the custom unmarshaler for OperationResultInfoBaseResource struct. 14022func (oribr *OperationResultInfoBaseResource) UnmarshalJSON(body []byte) error { 14023 var m map[string]*json.RawMessage 14024 err := json.Unmarshal(body, &m) 14025 if err != nil { 14026 return err 14027 } 14028 for k, v := range m { 14029 switch k { 14030 case "operation": 14031 if v != nil { 14032 operation, err := unmarshalBasicOperationResultInfoBase(*v) 14033 if err != nil { 14034 return err 14035 } 14036 oribr.Operation = operation 14037 } 14038 case "statusCode": 14039 if v != nil { 14040 var statusCode HTTPStatusCode 14041 err = json.Unmarshal(*v, &statusCode) 14042 if err != nil { 14043 return err 14044 } 14045 oribr.StatusCode = statusCode 14046 } 14047 case "headers": 14048 if v != nil { 14049 var headers map[string][]string 14050 err = json.Unmarshal(*v, &headers) 14051 if err != nil { 14052 return err 14053 } 14054 oribr.Headers = headers 14055 } 14056 } 14057 } 14058 14059 return nil 14060} 14061 14062// OperationStatus operation status. 14063type OperationStatus struct { 14064 autorest.Response `json:"-"` 14065 // ID - ID of the operation. 14066 ID *string `json:"id,omitempty"` 14067 // Name - Name of the operation. 14068 Name *string `json:"name,omitempty"` 14069 // Status - Operation status. Possible values include: 'OperationStatusValuesInvalid', 'OperationStatusValuesInProgress', 'OperationStatusValuesSucceeded', 'OperationStatusValuesFailed', 'OperationStatusValuesCanceled' 14070 Status OperationStatusValues `json:"status,omitempty"` 14071 // StartTime - Operation start time. Format: ISO-8601. 14072 StartTime *date.Time `json:"startTime,omitempty"` 14073 // EndTime - Operation end time. Format: ISO-8601. 14074 EndTime *date.Time `json:"endTime,omitempty"` 14075 // Error - Error information related to this operation. 14076 Error *OperationStatusError `json:"error,omitempty"` 14077 // Properties - Additional information associated with this operation. 14078 Properties BasicOperationStatusExtendedInfo `json:"properties,omitempty"` 14079} 14080 14081// UnmarshalJSON is the custom unmarshaler for OperationStatus struct. 14082func (osVar *OperationStatus) UnmarshalJSON(body []byte) error { 14083 var m map[string]*json.RawMessage 14084 err := json.Unmarshal(body, &m) 14085 if err != nil { 14086 return err 14087 } 14088 for k, v := range m { 14089 switch k { 14090 case "id": 14091 if v != nil { 14092 var ID string 14093 err = json.Unmarshal(*v, &ID) 14094 if err != nil { 14095 return err 14096 } 14097 osVar.ID = &ID 14098 } 14099 case "name": 14100 if v != nil { 14101 var name string 14102 err = json.Unmarshal(*v, &name) 14103 if err != nil { 14104 return err 14105 } 14106 osVar.Name = &name 14107 } 14108 case "status": 14109 if v != nil { 14110 var status OperationStatusValues 14111 err = json.Unmarshal(*v, &status) 14112 if err != nil { 14113 return err 14114 } 14115 osVar.Status = status 14116 } 14117 case "startTime": 14118 if v != nil { 14119 var startTime date.Time 14120 err = json.Unmarshal(*v, &startTime) 14121 if err != nil { 14122 return err 14123 } 14124 osVar.StartTime = &startTime 14125 } 14126 case "endTime": 14127 if v != nil { 14128 var endTime date.Time 14129 err = json.Unmarshal(*v, &endTime) 14130 if err != nil { 14131 return err 14132 } 14133 osVar.EndTime = &endTime 14134 } 14135 case "error": 14136 if v != nil { 14137 var errorVar OperationStatusError 14138 err = json.Unmarshal(*v, &errorVar) 14139 if err != nil { 14140 return err 14141 } 14142 osVar.Error = &errorVar 14143 } 14144 case "properties": 14145 if v != nil { 14146 properties, err := unmarshalBasicOperationStatusExtendedInfo(*v) 14147 if err != nil { 14148 return err 14149 } 14150 osVar.Properties = properties 14151 } 14152 } 14153 } 14154 14155 return nil 14156} 14157 14158// OperationStatusError error information associated with operation status call. 14159type OperationStatusError struct { 14160 // Code - Error code of the operation failure. 14161 Code *string `json:"code,omitempty"` 14162 // Message - Error message displayed if the operation failure. 14163 Message *string `json:"message,omitempty"` 14164} 14165 14166// BasicOperationStatusExtendedInfo base class for additional information of operation status. 14167type BasicOperationStatusExtendedInfo interface { 14168 AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) 14169 AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) 14170 AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) 14171 AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) 14172} 14173 14174// OperationStatusExtendedInfo base class for additional information of operation status. 14175type OperationStatusExtendedInfo struct { 14176 // ObjectType - Possible values include: 'ObjectTypeOperationStatusExtendedInfo', 'ObjectTypeOperationStatusJobExtendedInfo', 'ObjectTypeOperationStatusJobsExtendedInfo', 'ObjectTypeOperationStatusProvisionILRExtendedInfo' 14177 ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"` 14178} 14179 14180func unmarshalBasicOperationStatusExtendedInfo(body []byte) (BasicOperationStatusExtendedInfo, error) { 14181 var m map[string]interface{} 14182 err := json.Unmarshal(body, &m) 14183 if err != nil { 14184 return nil, err 14185 } 14186 14187 switch m["objectType"] { 14188 case string(ObjectTypeOperationStatusJobExtendedInfo): 14189 var osjei OperationStatusJobExtendedInfo 14190 err := json.Unmarshal(body, &osjei) 14191 return osjei, err 14192 case string(ObjectTypeOperationStatusJobsExtendedInfo): 14193 var osjei OperationStatusJobsExtendedInfo 14194 err := json.Unmarshal(body, &osjei) 14195 return osjei, err 14196 case string(ObjectTypeOperationStatusProvisionILRExtendedInfo): 14197 var ospiei OperationStatusProvisionILRExtendedInfo 14198 err := json.Unmarshal(body, &ospiei) 14199 return ospiei, err 14200 default: 14201 var osei OperationStatusExtendedInfo 14202 err := json.Unmarshal(body, &osei) 14203 return osei, err 14204 } 14205} 14206func unmarshalBasicOperationStatusExtendedInfoArray(body []byte) ([]BasicOperationStatusExtendedInfo, error) { 14207 var rawMessages []*json.RawMessage 14208 err := json.Unmarshal(body, &rawMessages) 14209 if err != nil { 14210 return nil, err 14211 } 14212 14213 oseiArray := make([]BasicOperationStatusExtendedInfo, len(rawMessages)) 14214 14215 for index, rawMessage := range rawMessages { 14216 osei, err := unmarshalBasicOperationStatusExtendedInfo(*rawMessage) 14217 if err != nil { 14218 return nil, err 14219 } 14220 oseiArray[index] = osei 14221 } 14222 return oseiArray, nil 14223} 14224 14225// MarshalJSON is the custom marshaler for OperationStatusExtendedInfo. 14226func (osei OperationStatusExtendedInfo) MarshalJSON() ([]byte, error) { 14227 osei.ObjectType = ObjectTypeOperationStatusExtendedInfo 14228 objectMap := make(map[string]interface{}) 14229 if osei.ObjectType != "" { 14230 objectMap["objectType"] = osei.ObjectType 14231 } 14232 return json.Marshal(objectMap) 14233} 14234 14235// AsOperationStatusJobExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusExtendedInfo. 14236func (osei OperationStatusExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) { 14237 return nil, false 14238} 14239 14240// AsOperationStatusJobsExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusExtendedInfo. 14241func (osei OperationStatusExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) { 14242 return nil, false 14243} 14244 14245// AsOperationStatusProvisionILRExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusExtendedInfo. 14246func (osei OperationStatusExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) { 14247 return nil, false 14248} 14249 14250// AsOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusExtendedInfo. 14251func (osei OperationStatusExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) { 14252 return &osei, true 14253} 14254 14255// AsBasicOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusExtendedInfo. 14256func (osei OperationStatusExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) { 14257 return &osei, true 14258} 14259 14260// OperationStatusJobExtendedInfo operation status job extended info. 14261type OperationStatusJobExtendedInfo struct { 14262 // JobID - ID of the job created for this protected item. 14263 JobID *string `json:"jobId,omitempty"` 14264 // ObjectType - Possible values include: 'ObjectTypeOperationStatusExtendedInfo', 'ObjectTypeOperationStatusJobExtendedInfo', 'ObjectTypeOperationStatusJobsExtendedInfo', 'ObjectTypeOperationStatusProvisionILRExtendedInfo' 14265 ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"` 14266} 14267 14268// MarshalJSON is the custom marshaler for OperationStatusJobExtendedInfo. 14269func (osjei OperationStatusJobExtendedInfo) MarshalJSON() ([]byte, error) { 14270 osjei.ObjectType = ObjectTypeOperationStatusJobExtendedInfo 14271 objectMap := make(map[string]interface{}) 14272 if osjei.JobID != nil { 14273 objectMap["jobId"] = osjei.JobID 14274 } 14275 if osjei.ObjectType != "" { 14276 objectMap["objectType"] = osjei.ObjectType 14277 } 14278 return json.Marshal(objectMap) 14279} 14280 14281// AsOperationStatusJobExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo. 14282func (osjei OperationStatusJobExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) { 14283 return &osjei, true 14284} 14285 14286// AsOperationStatusJobsExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo. 14287func (osjei OperationStatusJobExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) { 14288 return nil, false 14289} 14290 14291// AsOperationStatusProvisionILRExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo. 14292func (osjei OperationStatusJobExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) { 14293 return nil, false 14294} 14295 14296// AsOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo. 14297func (osjei OperationStatusJobExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) { 14298 return nil, false 14299} 14300 14301// AsBasicOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo. 14302func (osjei OperationStatusJobExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) { 14303 return &osjei, true 14304} 14305 14306// OperationStatusJobsExtendedInfo operation status extended info for list of jobs. 14307type OperationStatusJobsExtendedInfo struct { 14308 // JobIds - IDs of the jobs created for the protected item. 14309 JobIds *[]string `json:"jobIds,omitempty"` 14310 // FailedJobsError - Stores all the failed jobs along with the corresponding error codes. 14311 FailedJobsError map[string]*string `json:"failedJobsError"` 14312 // ObjectType - Possible values include: 'ObjectTypeOperationStatusExtendedInfo', 'ObjectTypeOperationStatusJobExtendedInfo', 'ObjectTypeOperationStatusJobsExtendedInfo', 'ObjectTypeOperationStatusProvisionILRExtendedInfo' 14313 ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"` 14314} 14315 14316// MarshalJSON is the custom marshaler for OperationStatusJobsExtendedInfo. 14317func (osjei OperationStatusJobsExtendedInfo) MarshalJSON() ([]byte, error) { 14318 osjei.ObjectType = ObjectTypeOperationStatusJobsExtendedInfo 14319 objectMap := make(map[string]interface{}) 14320 if osjei.JobIds != nil { 14321 objectMap["jobIds"] = osjei.JobIds 14322 } 14323 if osjei.FailedJobsError != nil { 14324 objectMap["failedJobsError"] = osjei.FailedJobsError 14325 } 14326 if osjei.ObjectType != "" { 14327 objectMap["objectType"] = osjei.ObjectType 14328 } 14329 return json.Marshal(objectMap) 14330} 14331 14332// AsOperationStatusJobExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo. 14333func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) { 14334 return nil, false 14335} 14336 14337// AsOperationStatusJobsExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo. 14338func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) { 14339 return &osjei, true 14340} 14341 14342// AsOperationStatusProvisionILRExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo. 14343func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) { 14344 return nil, false 14345} 14346 14347// AsOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo. 14348func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) { 14349 return nil, false 14350} 14351 14352// AsBasicOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo. 14353func (osjei OperationStatusJobsExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) { 14354 return &osjei, true 14355} 14356 14357// OperationStatusProvisionILRExtendedInfo operation status extended info for ILR provision action. 14358type OperationStatusProvisionILRExtendedInfo struct { 14359 // RecoveryTarget - Target details for file / folder restore. 14360 RecoveryTarget *InstantItemRecoveryTarget `json:"recoveryTarget,omitempty"` 14361 // ObjectType - Possible values include: 'ObjectTypeOperationStatusExtendedInfo', 'ObjectTypeOperationStatusJobExtendedInfo', 'ObjectTypeOperationStatusJobsExtendedInfo', 'ObjectTypeOperationStatusProvisionILRExtendedInfo' 14362 ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"` 14363} 14364 14365// MarshalJSON is the custom marshaler for OperationStatusProvisionILRExtendedInfo. 14366func (ospiei OperationStatusProvisionILRExtendedInfo) MarshalJSON() ([]byte, error) { 14367 ospiei.ObjectType = ObjectTypeOperationStatusProvisionILRExtendedInfo 14368 objectMap := make(map[string]interface{}) 14369 if ospiei.RecoveryTarget != nil { 14370 objectMap["recoveryTarget"] = ospiei.RecoveryTarget 14371 } 14372 if ospiei.ObjectType != "" { 14373 objectMap["objectType"] = ospiei.ObjectType 14374 } 14375 return json.Marshal(objectMap) 14376} 14377 14378// AsOperationStatusJobExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo. 14379func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) { 14380 return nil, false 14381} 14382 14383// AsOperationStatusJobsExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo. 14384func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) { 14385 return nil, false 14386} 14387 14388// AsOperationStatusProvisionILRExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo. 14389func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) { 14390 return &ospiei, true 14391} 14392 14393// AsOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo. 14394func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) { 14395 return nil, false 14396} 14397 14398// AsBasicOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo. 14399func (ospiei OperationStatusProvisionILRExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) { 14400 return &ospiei, true 14401} 14402 14403// OperationWorkerResponse this is the base class for operation result responses. 14404type OperationWorkerResponse struct { 14405 // StatusCode - HTTP Status Code of the operation. Possible values include: 'Continue', 'SwitchingProtocols', 'OK', 'Created', 'Accepted', 'NonAuthoritativeInformation', 'NoContent', 'ResetContent', 'PartialContent', 'MultipleChoices', 'Ambiguous', 'MovedPermanently', 'Moved', 'Found', 'Redirect', 'SeeOther', 'RedirectMethod', 'NotModified', 'UseProxy', 'Unused', 'TemporaryRedirect', 'RedirectKeepVerb', 'BadRequest', 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', 'MethodNotAllowed', 'NotAcceptable', 'ProxyAuthenticationRequired', 'RequestTimeout', 'Conflict', 'Gone', 'LengthRequired', 'PreconditionFailed', 'RequestEntityTooLarge', 'RequestURITooLong', 'UnsupportedMediaType', 'RequestedRangeNotSatisfiable', 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', 'HTTPVersionNotSupported' 14406 StatusCode HTTPStatusCode `json:"statusCode,omitempty"` 14407 // Headers - HTTP headers associated with this operation. 14408 Headers map[string][]string `json:"headers"` 14409} 14410 14411// MarshalJSON is the custom marshaler for OperationWorkerResponse. 14412func (owr OperationWorkerResponse) MarshalJSON() ([]byte, error) { 14413 objectMap := make(map[string]interface{}) 14414 if owr.StatusCode != "" { 14415 objectMap["statusCode"] = owr.StatusCode 14416 } 14417 if owr.Headers != nil { 14418 objectMap["headers"] = owr.Headers 14419 } 14420 return json.Marshal(objectMap) 14421} 14422 14423// PointInTimeRange provides details for log ranges 14424type PointInTimeRange struct { 14425 // StartTime - Start time of the time range for log recovery. 14426 StartTime *date.Time `json:"startTime,omitempty"` 14427 // EndTime - End time of the time range for log recovery. 14428 EndTime *date.Time `json:"endTime,omitempty"` 14429} 14430 14431// PreBackupValidation pre-backup validation for Azure VM Workload provider. 14432type PreBackupValidation struct { 14433 // Status - Status of protectable item, i.e. InProgress,Succeeded,Failed. Possible values include: 'InquiryStatusInvalid', 'InquiryStatusSuccess', 'InquiryStatusFailed' 14434 Status InquiryStatus `json:"status,omitempty"` 14435 // Code - Error code of protectable item 14436 Code *string `json:"code,omitempty"` 14437 // Message - Message corresponding to the error code for the protectable item 14438 Message *string `json:"message,omitempty"` 14439} 14440 14441// PreValidateEnableBackupRequest contract to validate if backup can be enabled on the given resource in a 14442// given vault and given configuration. 14443// It will validate followings 14444// 1. Vault capacity 14445// 2. VM is already protected 14446// 3. Any VM related configuration passed in properties. 14447type PreValidateEnableBackupRequest struct { 14448 // ResourceType - ProtectedItem Type- VM, SqlDataBase, AzureFileShare etc. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' 14449 ResourceType DataSourceType `json:"resourceType,omitempty"` 14450 // ResourceID - ARM Virtual Machine Id 14451 ResourceID *string `json:"resourceId,omitempty"` 14452 // VaultID - ARM id of the Recovery Services Vault 14453 VaultID *string `json:"vaultId,omitempty"` 14454 // Properties - Configuration of VM if any needs to be validated like OS type etc 14455 Properties *string `json:"properties,omitempty"` 14456} 14457 14458// PreValidateEnableBackupResponse response contract for enable backup validation request 14459type PreValidateEnableBackupResponse struct { 14460 autorest.Response `json:"-"` 14461 // Status - Validation Status. Possible values include: 'ValidationStatusInvalid', 'ValidationStatusSucceeded', 'ValidationStatusFailed' 14462 Status ValidationStatus `json:"status,omitempty"` 14463 // ErrorCode - Response error code 14464 ErrorCode *string `json:"errorCode,omitempty"` 14465 // ErrorMessage - Response error message 14466 ErrorMessage *string `json:"errorMessage,omitempty"` 14467 // Recommendation - Recommended action for user 14468 Recommendation *string `json:"recommendation,omitempty"` 14469 // ContainerName - Specifies the product specific container name. E.g. iaasvmcontainer;iaasvmcontainer;rgname;vmname. This is required 14470 // for portal 14471 ContainerName *string `json:"containerName,omitempty"` 14472 // ProtectedItemName - Specifies the product specific ds name. E.g. vm;iaasvmcontainer;rgname;vmname. This is required for portal 14473 ProtectedItemName *string `json:"protectedItemName,omitempty"` 14474} 14475 14476// BasicProtectableContainer protectable Container Class. 14477type BasicProtectableContainer interface { 14478 AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) 14479 AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) 14480 AsProtectableContainer() (*ProtectableContainer, bool) 14481} 14482 14483// ProtectableContainer protectable Container Class. 14484type ProtectableContainer struct { 14485 // FriendlyName - Friendly name of the container. 14486 FriendlyName *string `json:"friendlyName,omitempty"` 14487 // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 14488 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 14489 // HealthStatus - Status of health of the container. 14490 HealthStatus *string `json:"healthStatus,omitempty"` 14491 // ContainerID - Fabric Id of the container such as ARM Id. 14492 ContainerID *string `json:"containerId,omitempty"` 14493 // ProtectableContainerType - Possible values include: 'ProtectableContainerTypeProtectableContainer', 'ProtectableContainerTypeStorageContainer', 'ProtectableContainerTypeVMAppContainer' 14494 ProtectableContainerType ProtectableContainerType `json:"protectableContainerType,omitempty"` 14495} 14496 14497func unmarshalBasicProtectableContainer(body []byte) (BasicProtectableContainer, error) { 14498 var m map[string]interface{} 14499 err := json.Unmarshal(body, &m) 14500 if err != nil { 14501 return nil, err 14502 } 14503 14504 switch m["protectableContainerType"] { 14505 case string(ProtectableContainerTypeStorageContainer): 14506 var aspc AzureStorageProtectableContainer 14507 err := json.Unmarshal(body, &aspc) 14508 return aspc, err 14509 case string(ProtectableContainerTypeVMAppContainer): 14510 var avacpc AzureVMAppContainerProtectableContainer 14511 err := json.Unmarshal(body, &avacpc) 14512 return avacpc, err 14513 default: 14514 var pc ProtectableContainer 14515 err := json.Unmarshal(body, &pc) 14516 return pc, err 14517 } 14518} 14519func unmarshalBasicProtectableContainerArray(body []byte) ([]BasicProtectableContainer, error) { 14520 var rawMessages []*json.RawMessage 14521 err := json.Unmarshal(body, &rawMessages) 14522 if err != nil { 14523 return nil, err 14524 } 14525 14526 pcArray := make([]BasicProtectableContainer, len(rawMessages)) 14527 14528 for index, rawMessage := range rawMessages { 14529 pc, err := unmarshalBasicProtectableContainer(*rawMessage) 14530 if err != nil { 14531 return nil, err 14532 } 14533 pcArray[index] = pc 14534 } 14535 return pcArray, nil 14536} 14537 14538// MarshalJSON is the custom marshaler for ProtectableContainer. 14539func (pc ProtectableContainer) MarshalJSON() ([]byte, error) { 14540 pc.ProtectableContainerType = ProtectableContainerTypeProtectableContainer 14541 objectMap := make(map[string]interface{}) 14542 if pc.FriendlyName != nil { 14543 objectMap["friendlyName"] = pc.FriendlyName 14544 } 14545 if pc.BackupManagementType != "" { 14546 objectMap["backupManagementType"] = pc.BackupManagementType 14547 } 14548 if pc.HealthStatus != nil { 14549 objectMap["healthStatus"] = pc.HealthStatus 14550 } 14551 if pc.ContainerID != nil { 14552 objectMap["containerId"] = pc.ContainerID 14553 } 14554 if pc.ProtectableContainerType != "" { 14555 objectMap["protectableContainerType"] = pc.ProtectableContainerType 14556 } 14557 return json.Marshal(objectMap) 14558} 14559 14560// AsAzureStorageProtectableContainer is the BasicProtectableContainer implementation for ProtectableContainer. 14561func (pc ProtectableContainer) AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) { 14562 return nil, false 14563} 14564 14565// AsAzureVMAppContainerProtectableContainer is the BasicProtectableContainer implementation for ProtectableContainer. 14566func (pc ProtectableContainer) AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) { 14567 return nil, false 14568} 14569 14570// AsProtectableContainer is the BasicProtectableContainer implementation for ProtectableContainer. 14571func (pc ProtectableContainer) AsProtectableContainer() (*ProtectableContainer, bool) { 14572 return &pc, true 14573} 14574 14575// AsBasicProtectableContainer is the BasicProtectableContainer implementation for ProtectableContainer. 14576func (pc ProtectableContainer) AsBasicProtectableContainer() (BasicProtectableContainer, bool) { 14577 return &pc, true 14578} 14579 14580// ProtectableContainerResource protectable Container Class. 14581type ProtectableContainerResource struct { 14582 // Properties - ProtectableContainerResource properties 14583 Properties BasicProtectableContainer `json:"properties,omitempty"` 14584 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 14585 ID *string `json:"id,omitempty"` 14586 // Name - READ-ONLY; Resource name associated with the resource. 14587 Name *string `json:"name,omitempty"` 14588 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 14589 Type *string `json:"type,omitempty"` 14590 // Location - Resource location. 14591 Location *string `json:"location,omitempty"` 14592 // Tags - Resource tags. 14593 Tags map[string]*string `json:"tags"` 14594 // ETag - Optional ETag. 14595 ETag *string `json:"eTag,omitempty"` 14596} 14597 14598// MarshalJSON is the custom marshaler for ProtectableContainerResource. 14599func (pcr ProtectableContainerResource) MarshalJSON() ([]byte, error) { 14600 objectMap := make(map[string]interface{}) 14601 objectMap["properties"] = pcr.Properties 14602 if pcr.Location != nil { 14603 objectMap["location"] = pcr.Location 14604 } 14605 if pcr.Tags != nil { 14606 objectMap["tags"] = pcr.Tags 14607 } 14608 if pcr.ETag != nil { 14609 objectMap["eTag"] = pcr.ETag 14610 } 14611 return json.Marshal(objectMap) 14612} 14613 14614// UnmarshalJSON is the custom unmarshaler for ProtectableContainerResource struct. 14615func (pcr *ProtectableContainerResource) UnmarshalJSON(body []byte) error { 14616 var m map[string]*json.RawMessage 14617 err := json.Unmarshal(body, &m) 14618 if err != nil { 14619 return err 14620 } 14621 for k, v := range m { 14622 switch k { 14623 case "properties": 14624 if v != nil { 14625 properties, err := unmarshalBasicProtectableContainer(*v) 14626 if err != nil { 14627 return err 14628 } 14629 pcr.Properties = properties 14630 } 14631 case "id": 14632 if v != nil { 14633 var ID string 14634 err = json.Unmarshal(*v, &ID) 14635 if err != nil { 14636 return err 14637 } 14638 pcr.ID = &ID 14639 } 14640 case "name": 14641 if v != nil { 14642 var name string 14643 err = json.Unmarshal(*v, &name) 14644 if err != nil { 14645 return err 14646 } 14647 pcr.Name = &name 14648 } 14649 case "type": 14650 if v != nil { 14651 var typeVar string 14652 err = json.Unmarshal(*v, &typeVar) 14653 if err != nil { 14654 return err 14655 } 14656 pcr.Type = &typeVar 14657 } 14658 case "location": 14659 if v != nil { 14660 var location string 14661 err = json.Unmarshal(*v, &location) 14662 if err != nil { 14663 return err 14664 } 14665 pcr.Location = &location 14666 } 14667 case "tags": 14668 if v != nil { 14669 var tags map[string]*string 14670 err = json.Unmarshal(*v, &tags) 14671 if err != nil { 14672 return err 14673 } 14674 pcr.Tags = tags 14675 } 14676 case "eTag": 14677 if v != nil { 14678 var eTag string 14679 err = json.Unmarshal(*v, &eTag) 14680 if err != nil { 14681 return err 14682 } 14683 pcr.ETag = &eTag 14684 } 14685 } 14686 } 14687 14688 return nil 14689} 14690 14691// ProtectableContainerResourceList list of ProtectableContainer resources 14692type ProtectableContainerResourceList struct { 14693 autorest.Response `json:"-"` 14694 // Value - List of resources. 14695 Value *[]ProtectableContainerResource `json:"value,omitempty"` 14696 // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. 14697 NextLink *string `json:"nextLink,omitempty"` 14698} 14699 14700// ProtectableContainerResourceListIterator provides access to a complete listing of 14701// ProtectableContainerResource values. 14702type ProtectableContainerResourceListIterator struct { 14703 i int 14704 page ProtectableContainerResourceListPage 14705} 14706 14707// NextWithContext advances to the next value. If there was an error making 14708// the request the iterator does not advance and the error is returned. 14709func (iter *ProtectableContainerResourceListIterator) NextWithContext(ctx context.Context) (err error) { 14710 if tracing.IsEnabled() { 14711 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableContainerResourceListIterator.NextWithContext") 14712 defer func() { 14713 sc := -1 14714 if iter.Response().Response.Response != nil { 14715 sc = iter.Response().Response.Response.StatusCode 14716 } 14717 tracing.EndSpan(ctx, sc, err) 14718 }() 14719 } 14720 iter.i++ 14721 if iter.i < len(iter.page.Values()) { 14722 return nil 14723 } 14724 err = iter.page.NextWithContext(ctx) 14725 if err != nil { 14726 iter.i-- 14727 return err 14728 } 14729 iter.i = 0 14730 return nil 14731} 14732 14733// Next advances to the next value. If there was an error making 14734// the request the iterator does not advance and the error is returned. 14735// Deprecated: Use NextWithContext() instead. 14736func (iter *ProtectableContainerResourceListIterator) Next() error { 14737 return iter.NextWithContext(context.Background()) 14738} 14739 14740// NotDone returns true if the enumeration should be started or is not yet complete. 14741func (iter ProtectableContainerResourceListIterator) NotDone() bool { 14742 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 14743} 14744 14745// Response returns the raw server response from the last page request. 14746func (iter ProtectableContainerResourceListIterator) Response() ProtectableContainerResourceList { 14747 return iter.page.Response() 14748} 14749 14750// Value returns the current value or a zero-initialized value if the 14751// iterator has advanced beyond the end of the collection. 14752func (iter ProtectableContainerResourceListIterator) Value() ProtectableContainerResource { 14753 if !iter.page.NotDone() { 14754 return ProtectableContainerResource{} 14755 } 14756 return iter.page.Values()[iter.i] 14757} 14758 14759// Creates a new instance of the ProtectableContainerResourceListIterator type. 14760func NewProtectableContainerResourceListIterator(page ProtectableContainerResourceListPage) ProtectableContainerResourceListIterator { 14761 return ProtectableContainerResourceListIterator{page: page} 14762} 14763 14764// IsEmpty returns true if the ListResult contains no values. 14765func (pcrl ProtectableContainerResourceList) IsEmpty() bool { 14766 return pcrl.Value == nil || len(*pcrl.Value) == 0 14767} 14768 14769// hasNextLink returns true if the NextLink is not empty. 14770func (pcrl ProtectableContainerResourceList) hasNextLink() bool { 14771 return pcrl.NextLink != nil && len(*pcrl.NextLink) != 0 14772} 14773 14774// protectableContainerResourceListPreparer prepares a request to retrieve the next set of results. 14775// It returns nil if no more results exist. 14776func (pcrl ProtectableContainerResourceList) protectableContainerResourceListPreparer(ctx context.Context) (*http.Request, error) { 14777 if !pcrl.hasNextLink() { 14778 return nil, nil 14779 } 14780 return autorest.Prepare((&http.Request{}).WithContext(ctx), 14781 autorest.AsJSON(), 14782 autorest.AsGet(), 14783 autorest.WithBaseURL(to.String(pcrl.NextLink))) 14784} 14785 14786// ProtectableContainerResourceListPage contains a page of ProtectableContainerResource values. 14787type ProtectableContainerResourceListPage struct { 14788 fn func(context.Context, ProtectableContainerResourceList) (ProtectableContainerResourceList, error) 14789 pcrl ProtectableContainerResourceList 14790} 14791 14792// NextWithContext advances to the next page of values. If there was an error making 14793// the request the page does not advance and the error is returned. 14794func (page *ProtectableContainerResourceListPage) NextWithContext(ctx context.Context) (err error) { 14795 if tracing.IsEnabled() { 14796 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableContainerResourceListPage.NextWithContext") 14797 defer func() { 14798 sc := -1 14799 if page.Response().Response.Response != nil { 14800 sc = page.Response().Response.Response.StatusCode 14801 } 14802 tracing.EndSpan(ctx, sc, err) 14803 }() 14804 } 14805 for { 14806 next, err := page.fn(ctx, page.pcrl) 14807 if err != nil { 14808 return err 14809 } 14810 page.pcrl = next 14811 if !next.hasNextLink() || !next.IsEmpty() { 14812 break 14813 } 14814 } 14815 return nil 14816} 14817 14818// Next advances to the next page of values. If there was an error making 14819// the request the page does not advance and the error is returned. 14820// Deprecated: Use NextWithContext() instead. 14821func (page *ProtectableContainerResourceListPage) Next() error { 14822 return page.NextWithContext(context.Background()) 14823} 14824 14825// NotDone returns true if the page enumeration should be started or is not yet complete. 14826func (page ProtectableContainerResourceListPage) NotDone() bool { 14827 return !page.pcrl.IsEmpty() 14828} 14829 14830// Response returns the raw server response from the last page request. 14831func (page ProtectableContainerResourceListPage) Response() ProtectableContainerResourceList { 14832 return page.pcrl 14833} 14834 14835// Values returns the slice of values for the current page or nil if there are no values. 14836func (page ProtectableContainerResourceListPage) Values() []ProtectableContainerResource { 14837 if page.pcrl.IsEmpty() { 14838 return nil 14839 } 14840 return *page.pcrl.Value 14841} 14842 14843// Creates a new instance of the ProtectableContainerResourceListPage type. 14844func NewProtectableContainerResourceListPage(cur ProtectableContainerResourceList, getNextPage func(context.Context, ProtectableContainerResourceList) (ProtectableContainerResourceList, error)) ProtectableContainerResourceListPage { 14845 return ProtectableContainerResourceListPage{ 14846 fn: getNextPage, 14847 pcrl: cur, 14848 } 14849} 14850 14851// BasicProtectedItem base class for backup items. 14852type BasicProtectedItem interface { 14853 AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) 14854 AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) 14855 AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) 14856 AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) 14857 AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) 14858 AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) 14859 AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) 14860 AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) 14861 AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) 14862 AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) 14863 AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) 14864 AsDPMProtectedItem() (*DPMProtectedItem, bool) 14865 AsGenericProtectedItem() (*GenericProtectedItem, bool) 14866 AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) 14867 AsProtectedItem() (*ProtectedItem, bool) 14868} 14869 14870// ProtectedItem base class for backup items. 14871type ProtectedItem struct { 14872 // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 14873 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 14874 // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' 14875 WorkloadType DataSourceType `json:"workloadType,omitempty"` 14876 // ContainerName - Unique name of container 14877 ContainerName *string `json:"containerName,omitempty"` 14878 // SourceResourceID - ARM ID of the resource to be backed up. 14879 SourceResourceID *string `json:"sourceResourceId,omitempty"` 14880 // PolicyID - ID of the backup policy with which this item is backed up. 14881 PolicyID *string `json:"policyId,omitempty"` 14882 // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. 14883 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` 14884 // BackupSetName - Name of the backup set the backup item belongs to 14885 BackupSetName *string `json:"backupSetName,omitempty"` 14886 // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' 14887 CreateMode CreateMode `json:"createMode,omitempty"` 14888 // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC 14889 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` 14890 // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete 14891 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` 14892 // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted 14893 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` 14894 // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon 14895 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` 14896 // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state 14897 IsRehydrate *bool `json:"isRehydrate,omitempty"` 14898 // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' 14899 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` 14900} 14901 14902func unmarshalBasicProtectedItem(body []byte) (BasicProtectedItem, error) { 14903 var m map[string]interface{} 14904 err := json.Unmarshal(body, &m) 14905 if err != nil { 14906 return nil, err 14907 } 14908 14909 switch m["protectedItemType"] { 14910 case string(ProtectedItemTypeAzureFileShareProtectedItem): 14911 var afpi AzureFileshareProtectedItem 14912 err := json.Unmarshal(body, &afpi) 14913 return afpi, err 14914 case string(ProtectedItemTypeMicrosoftClassicComputevirtualMachines): 14915 var aisccvpi AzureIaaSClassicComputeVMProtectedItem 14916 err := json.Unmarshal(body, &aisccvpi) 14917 return aisccvpi, err 14918 case string(ProtectedItemTypeMicrosoftComputevirtualMachines): 14919 var aiscvpi AzureIaaSComputeVMProtectedItem 14920 err := json.Unmarshal(body, &aiscvpi) 14921 return aiscvpi, err 14922 case string(ProtectedItemTypeAzureIaaSVMProtectedItem): 14923 var aispi AzureIaaSVMProtectedItem 14924 err := json.Unmarshal(body, &aispi) 14925 return aispi, err 14926 case string(ProtectedItemTypeMicrosoftSqlserversdatabases): 14927 var aspi AzureSQLProtectedItem 14928 err := json.Unmarshal(body, &aspi) 14929 return aspi, err 14930 case string(ProtectedItemTypeAzureVMWorkloadProtectedItem): 14931 var avwpi AzureVMWorkloadProtectedItem 14932 err := json.Unmarshal(body, &avwpi) 14933 return avwpi, err 14934 case string(ProtectedItemTypeAzureVMWorkloadSAPAseDatabase): 14935 var avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem 14936 err := json.Unmarshal(body, &avwsadpi) 14937 return avwsadpi, err 14938 case string(ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase): 14939 var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem 14940 err := json.Unmarshal(body, &avwshdpi) 14941 return avwshdpi, err 14942 case string(ProtectedItemTypeAzureVMWorkloadSQLDatabase): 14943 var avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem 14944 err := json.Unmarshal(body, &avwsdpi) 14945 return avwsdpi, err 14946 case string(ProtectedItemTypeDPMProtectedItem): 14947 var dpi DPMProtectedItem 14948 err := json.Unmarshal(body, &dpi) 14949 return dpi, err 14950 case string(ProtectedItemTypeGenericProtectedItem): 14951 var gpi GenericProtectedItem 14952 err := json.Unmarshal(body, &gpi) 14953 return gpi, err 14954 case string(ProtectedItemTypeMabFileFolderProtectedItem): 14955 var mffpi MabFileFolderProtectedItem 14956 err := json.Unmarshal(body, &mffpi) 14957 return mffpi, err 14958 default: 14959 var pi ProtectedItem 14960 err := json.Unmarshal(body, &pi) 14961 return pi, err 14962 } 14963} 14964func unmarshalBasicProtectedItemArray(body []byte) ([]BasicProtectedItem, error) { 14965 var rawMessages []*json.RawMessage 14966 err := json.Unmarshal(body, &rawMessages) 14967 if err != nil { 14968 return nil, err 14969 } 14970 14971 piArray := make([]BasicProtectedItem, len(rawMessages)) 14972 14973 for index, rawMessage := range rawMessages { 14974 pi, err := unmarshalBasicProtectedItem(*rawMessage) 14975 if err != nil { 14976 return nil, err 14977 } 14978 piArray[index] = pi 14979 } 14980 return piArray, nil 14981} 14982 14983// MarshalJSON is the custom marshaler for ProtectedItem. 14984func (pi ProtectedItem) MarshalJSON() ([]byte, error) { 14985 pi.ProtectedItemType = ProtectedItemTypeProtectedItem 14986 objectMap := make(map[string]interface{}) 14987 if pi.BackupManagementType != "" { 14988 objectMap["backupManagementType"] = pi.BackupManagementType 14989 } 14990 if pi.WorkloadType != "" { 14991 objectMap["workloadType"] = pi.WorkloadType 14992 } 14993 if pi.ContainerName != nil { 14994 objectMap["containerName"] = pi.ContainerName 14995 } 14996 if pi.SourceResourceID != nil { 14997 objectMap["sourceResourceId"] = pi.SourceResourceID 14998 } 14999 if pi.PolicyID != nil { 15000 objectMap["policyId"] = pi.PolicyID 15001 } 15002 if pi.LastRecoveryPoint != nil { 15003 objectMap["lastRecoveryPoint"] = pi.LastRecoveryPoint 15004 } 15005 if pi.BackupSetName != nil { 15006 objectMap["backupSetName"] = pi.BackupSetName 15007 } 15008 if pi.CreateMode != "" { 15009 objectMap["createMode"] = pi.CreateMode 15010 } 15011 if pi.DeferredDeleteTimeInUTC != nil { 15012 objectMap["deferredDeleteTimeInUTC"] = pi.DeferredDeleteTimeInUTC 15013 } 15014 if pi.IsScheduledForDeferredDelete != nil { 15015 objectMap["isScheduledForDeferredDelete"] = pi.IsScheduledForDeferredDelete 15016 } 15017 if pi.DeferredDeleteTimeRemaining != nil { 15018 objectMap["deferredDeleteTimeRemaining"] = pi.DeferredDeleteTimeRemaining 15019 } 15020 if pi.IsDeferredDeleteScheduleUpcoming != nil { 15021 objectMap["isDeferredDeleteScheduleUpcoming"] = pi.IsDeferredDeleteScheduleUpcoming 15022 } 15023 if pi.IsRehydrate != nil { 15024 objectMap["isRehydrate"] = pi.IsRehydrate 15025 } 15026 if pi.ProtectedItemType != "" { 15027 objectMap["protectedItemType"] = pi.ProtectedItemType 15028 } 15029 return json.Marshal(objectMap) 15030} 15031 15032// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15033func (pi ProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { 15034 return nil, false 15035} 15036 15037// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15038func (pi ProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { 15039 return nil, false 15040} 15041 15042// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15043func (pi ProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { 15044 return nil, false 15045} 15046 15047// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15048func (pi ProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { 15049 return nil, false 15050} 15051 15052// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15053func (pi ProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { 15054 return nil, false 15055} 15056 15057// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15058func (pi ProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { 15059 return nil, false 15060} 15061 15062// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15063func (pi ProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { 15064 return nil, false 15065} 15066 15067// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15068func (pi ProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { 15069 return nil, false 15070} 15071 15072// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15073func (pi ProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { 15074 return nil, false 15075} 15076 15077// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15078func (pi ProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { 15079 return nil, false 15080} 15081 15082// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15083func (pi ProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { 15084 return nil, false 15085} 15086 15087// AsDPMProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15088func (pi ProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { 15089 return nil, false 15090} 15091 15092// AsGenericProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15093func (pi ProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { 15094 return nil, false 15095} 15096 15097// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15098func (pi ProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { 15099 return nil, false 15100} 15101 15102// AsProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15103func (pi ProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { 15104 return &pi, true 15105} 15106 15107// AsBasicProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15108func (pi ProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { 15109 return &pi, true 15110} 15111 15112// ProtectedItemQueryObject filters to list backup items. 15113type ProtectedItemQueryObject struct { 15114 // HealthState - Health State for the backed up item. Possible values include: 'HealthStatePassed', 'HealthStateActionRequired', 'HealthStateActionSuggested', 'HealthStateInvalid' 15115 HealthState HealthState `json:"healthState,omitempty"` 15116 // BackupManagementType - Backup management type for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 15117 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 15118 // ItemType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' 15119 ItemType DataSourceType `json:"itemType,omitempty"` 15120 // PolicyName - Backup policy name associated with the backup item. 15121 PolicyName *string `json:"policyName,omitempty"` 15122 // ContainerName - Name of the container. 15123 ContainerName *string `json:"containerName,omitempty"` 15124 // BackupEngineName - Backup Engine name 15125 BackupEngineName *string `json:"backupEngineName,omitempty"` 15126 // FriendlyName - Friendly name of protected item 15127 FriendlyName *string `json:"friendlyName,omitempty"` 15128 // FabricName - Name of the fabric. 15129 FabricName *string `json:"fabricName,omitempty"` 15130 // BackupSetName - Name of the backup set. 15131 BackupSetName *string `json:"backupSetName,omitempty"` 15132} 15133 15134// ProtectedItemResource base class for backup items. 15135type ProtectedItemResource struct { 15136 autorest.Response `json:"-"` 15137 // Properties - ProtectedItemResource properties 15138 Properties BasicProtectedItem `json:"properties,omitempty"` 15139 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 15140 ID *string `json:"id,omitempty"` 15141 // Name - READ-ONLY; Resource name associated with the resource. 15142 Name *string `json:"name,omitempty"` 15143 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 15144 Type *string `json:"type,omitempty"` 15145 // Location - Resource location. 15146 Location *string `json:"location,omitempty"` 15147 // Tags - Resource tags. 15148 Tags map[string]*string `json:"tags"` 15149 // ETag - Optional ETag. 15150 ETag *string `json:"eTag,omitempty"` 15151} 15152 15153// MarshalJSON is the custom marshaler for ProtectedItemResource. 15154func (pir ProtectedItemResource) MarshalJSON() ([]byte, error) { 15155 objectMap := make(map[string]interface{}) 15156 objectMap["properties"] = pir.Properties 15157 if pir.Location != nil { 15158 objectMap["location"] = pir.Location 15159 } 15160 if pir.Tags != nil { 15161 objectMap["tags"] = pir.Tags 15162 } 15163 if pir.ETag != nil { 15164 objectMap["eTag"] = pir.ETag 15165 } 15166 return json.Marshal(objectMap) 15167} 15168 15169// UnmarshalJSON is the custom unmarshaler for ProtectedItemResource struct. 15170func (pir *ProtectedItemResource) UnmarshalJSON(body []byte) error { 15171 var m map[string]*json.RawMessage 15172 err := json.Unmarshal(body, &m) 15173 if err != nil { 15174 return err 15175 } 15176 for k, v := range m { 15177 switch k { 15178 case "properties": 15179 if v != nil { 15180 properties, err := unmarshalBasicProtectedItem(*v) 15181 if err != nil { 15182 return err 15183 } 15184 pir.Properties = properties 15185 } 15186 case "id": 15187 if v != nil { 15188 var ID string 15189 err = json.Unmarshal(*v, &ID) 15190 if err != nil { 15191 return err 15192 } 15193 pir.ID = &ID 15194 } 15195 case "name": 15196 if v != nil { 15197 var name string 15198 err = json.Unmarshal(*v, &name) 15199 if err != nil { 15200 return err 15201 } 15202 pir.Name = &name 15203 } 15204 case "type": 15205 if v != nil { 15206 var typeVar string 15207 err = json.Unmarshal(*v, &typeVar) 15208 if err != nil { 15209 return err 15210 } 15211 pir.Type = &typeVar 15212 } 15213 case "location": 15214 if v != nil { 15215 var location string 15216 err = json.Unmarshal(*v, &location) 15217 if err != nil { 15218 return err 15219 } 15220 pir.Location = &location 15221 } 15222 case "tags": 15223 if v != nil { 15224 var tags map[string]*string 15225 err = json.Unmarshal(*v, &tags) 15226 if err != nil { 15227 return err 15228 } 15229 pir.Tags = tags 15230 } 15231 case "eTag": 15232 if v != nil { 15233 var eTag string 15234 err = json.Unmarshal(*v, &eTag) 15235 if err != nil { 15236 return err 15237 } 15238 pir.ETag = &eTag 15239 } 15240 } 15241 } 15242 15243 return nil 15244} 15245 15246// ProtectedItemResourceList list of ProtectedItem resources 15247type ProtectedItemResourceList struct { 15248 autorest.Response `json:"-"` 15249 // Value - List of resources. 15250 Value *[]ProtectedItemResource `json:"value,omitempty"` 15251 // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. 15252 NextLink *string `json:"nextLink,omitempty"` 15253} 15254 15255// ProtectedItemResourceListIterator provides access to a complete listing of ProtectedItemResource values. 15256type ProtectedItemResourceListIterator struct { 15257 i int 15258 page ProtectedItemResourceListPage 15259} 15260 15261// NextWithContext advances to the next value. If there was an error making 15262// the request the iterator does not advance and the error is returned. 15263func (iter *ProtectedItemResourceListIterator) NextWithContext(ctx context.Context) (err error) { 15264 if tracing.IsEnabled() { 15265 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectedItemResourceListIterator.NextWithContext") 15266 defer func() { 15267 sc := -1 15268 if iter.Response().Response.Response != nil { 15269 sc = iter.Response().Response.Response.StatusCode 15270 } 15271 tracing.EndSpan(ctx, sc, err) 15272 }() 15273 } 15274 iter.i++ 15275 if iter.i < len(iter.page.Values()) { 15276 return nil 15277 } 15278 err = iter.page.NextWithContext(ctx) 15279 if err != nil { 15280 iter.i-- 15281 return err 15282 } 15283 iter.i = 0 15284 return nil 15285} 15286 15287// Next advances to the next value. If there was an error making 15288// the request the iterator does not advance and the error is returned. 15289// Deprecated: Use NextWithContext() instead. 15290func (iter *ProtectedItemResourceListIterator) Next() error { 15291 return iter.NextWithContext(context.Background()) 15292} 15293 15294// NotDone returns true if the enumeration should be started or is not yet complete. 15295func (iter ProtectedItemResourceListIterator) NotDone() bool { 15296 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 15297} 15298 15299// Response returns the raw server response from the last page request. 15300func (iter ProtectedItemResourceListIterator) Response() ProtectedItemResourceList { 15301 return iter.page.Response() 15302} 15303 15304// Value returns the current value or a zero-initialized value if the 15305// iterator has advanced beyond the end of the collection. 15306func (iter ProtectedItemResourceListIterator) Value() ProtectedItemResource { 15307 if !iter.page.NotDone() { 15308 return ProtectedItemResource{} 15309 } 15310 return iter.page.Values()[iter.i] 15311} 15312 15313// Creates a new instance of the ProtectedItemResourceListIterator type. 15314func NewProtectedItemResourceListIterator(page ProtectedItemResourceListPage) ProtectedItemResourceListIterator { 15315 return ProtectedItemResourceListIterator{page: page} 15316} 15317 15318// IsEmpty returns true if the ListResult contains no values. 15319func (pirl ProtectedItemResourceList) IsEmpty() bool { 15320 return pirl.Value == nil || len(*pirl.Value) == 0 15321} 15322 15323// hasNextLink returns true if the NextLink is not empty. 15324func (pirl ProtectedItemResourceList) hasNextLink() bool { 15325 return pirl.NextLink != nil && len(*pirl.NextLink) != 0 15326} 15327 15328// protectedItemResourceListPreparer prepares a request to retrieve the next set of results. 15329// It returns nil if no more results exist. 15330func (pirl ProtectedItemResourceList) protectedItemResourceListPreparer(ctx context.Context) (*http.Request, error) { 15331 if !pirl.hasNextLink() { 15332 return nil, nil 15333 } 15334 return autorest.Prepare((&http.Request{}).WithContext(ctx), 15335 autorest.AsJSON(), 15336 autorest.AsGet(), 15337 autorest.WithBaseURL(to.String(pirl.NextLink))) 15338} 15339 15340// ProtectedItemResourceListPage contains a page of ProtectedItemResource values. 15341type ProtectedItemResourceListPage struct { 15342 fn func(context.Context, ProtectedItemResourceList) (ProtectedItemResourceList, error) 15343 pirl ProtectedItemResourceList 15344} 15345 15346// NextWithContext advances to the next page of values. If there was an error making 15347// the request the page does not advance and the error is returned. 15348func (page *ProtectedItemResourceListPage) NextWithContext(ctx context.Context) (err error) { 15349 if tracing.IsEnabled() { 15350 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectedItemResourceListPage.NextWithContext") 15351 defer func() { 15352 sc := -1 15353 if page.Response().Response.Response != nil { 15354 sc = page.Response().Response.Response.StatusCode 15355 } 15356 tracing.EndSpan(ctx, sc, err) 15357 }() 15358 } 15359 for { 15360 next, err := page.fn(ctx, page.pirl) 15361 if err != nil { 15362 return err 15363 } 15364 page.pirl = next 15365 if !next.hasNextLink() || !next.IsEmpty() { 15366 break 15367 } 15368 } 15369 return nil 15370} 15371 15372// Next advances to the next page of values. If there was an error making 15373// the request the page does not advance and the error is returned. 15374// Deprecated: Use NextWithContext() instead. 15375func (page *ProtectedItemResourceListPage) Next() error { 15376 return page.NextWithContext(context.Background()) 15377} 15378 15379// NotDone returns true if the page enumeration should be started or is not yet complete. 15380func (page ProtectedItemResourceListPage) NotDone() bool { 15381 return !page.pirl.IsEmpty() 15382} 15383 15384// Response returns the raw server response from the last page request. 15385func (page ProtectedItemResourceListPage) Response() ProtectedItemResourceList { 15386 return page.pirl 15387} 15388 15389// Values returns the slice of values for the current page or nil if there are no values. 15390func (page ProtectedItemResourceListPage) Values() []ProtectedItemResource { 15391 if page.pirl.IsEmpty() { 15392 return nil 15393 } 15394 return *page.pirl.Value 15395} 15396 15397// Creates a new instance of the ProtectedItemResourceListPage type. 15398func NewProtectedItemResourceListPage(cur ProtectedItemResourceList, getNextPage func(context.Context, ProtectedItemResourceList) (ProtectedItemResourceList, error)) ProtectedItemResourceListPage { 15399 return ProtectedItemResourceListPage{ 15400 fn: getNextPage, 15401 pirl: cur, 15402 } 15403} 15404 15405// BasicProtectionContainer base class for container with backup items. Containers with specific workloads are derived 15406// from this class. 15407type BasicProtectionContainer interface { 15408 AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) 15409 AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) 15410 AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) 15411 AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) 15412 AsAzureSQLContainer() (*AzureSQLContainer, bool) 15413 AsAzureStorageContainer() (*AzureStorageContainer, bool) 15414 AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) 15415 AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) 15416 AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) 15417 AsDpmContainer() (*DpmContainer, bool) 15418 AsBasicDpmContainer() (BasicDpmContainer, bool) 15419 AsGenericContainer() (*GenericContainer, bool) 15420 AsIaaSVMContainer() (*IaaSVMContainer, bool) 15421 AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) 15422 AsMabContainer() (*MabContainer, bool) 15423 AsProtectionContainer() (*ProtectionContainer, bool) 15424} 15425 15426// ProtectionContainer base class for container with backup items. Containers with specific workloads are 15427// derived from this class. 15428type ProtectionContainer struct { 15429 // FriendlyName - Friendly name of the container. 15430 FriendlyName *string `json:"friendlyName,omitempty"` 15431 // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 15432 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 15433 // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. 15434 RegistrationStatus *string `json:"registrationStatus,omitempty"` 15435 // HealthStatus - Status of health of the container. 15436 HealthStatus *string `json:"healthStatus,omitempty"` 15437 // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' 15438 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` 15439} 15440 15441func unmarshalBasicProtectionContainer(body []byte) (BasicProtectionContainer, error) { 15442 var m map[string]interface{} 15443 err := json.Unmarshal(body, &m) 15444 if err != nil { 15445 return nil, err 15446 } 15447 15448 switch m["containerType"] { 15449 case string(ContainerTypeAzureBackupServerContainer1): 15450 var absc AzureBackupServerContainer 15451 err := json.Unmarshal(body, &absc) 15452 return absc, err 15453 case string(ContainerTypeMicrosoftClassicComputevirtualMachines): 15454 var aisccvc AzureIaaSClassicComputeVMContainer 15455 err := json.Unmarshal(body, &aisccvc) 15456 return aisccvc, err 15457 case string(ContainerTypeMicrosoftComputevirtualMachines): 15458 var aiscvc AzureIaaSComputeVMContainer 15459 err := json.Unmarshal(body, &aiscvc) 15460 return aiscvc, err 15461 case string(ContainerTypeSQLAGWorkLoadContainer1): 15462 var aswcpc AzureSQLAGWorkloadContainerProtectionContainer 15463 err := json.Unmarshal(body, &aswcpc) 15464 return aswcpc, err 15465 case string(ContainerTypeAzureSQLContainer1): 15466 var asc AzureSQLContainer 15467 err := json.Unmarshal(body, &asc) 15468 return asc, err 15469 case string(ContainerTypeStorageContainer1): 15470 var asc AzureStorageContainer 15471 err := json.Unmarshal(body, &asc) 15472 return asc, err 15473 case string(ContainerTypeVMAppContainer1): 15474 var avacpc AzureVMAppContainerProtectionContainer 15475 err := json.Unmarshal(body, &avacpc) 15476 return avacpc, err 15477 case string(ContainerTypeAzureWorkloadContainer): 15478 var awc AzureWorkloadContainer 15479 err := json.Unmarshal(body, &awc) 15480 return awc, err 15481 case string(ContainerTypeDPMContainer1): 15482 var dc DpmContainer 15483 err := json.Unmarshal(body, &dc) 15484 return dc, err 15485 case string(ContainerTypeGenericContainer1): 15486 var gc GenericContainer 15487 err := json.Unmarshal(body, &gc) 15488 return gc, err 15489 case string(ContainerTypeIaaSVMContainer): 15490 var isc IaaSVMContainer 15491 err := json.Unmarshal(body, &isc) 15492 return isc, err 15493 case string(ContainerTypeWindows1): 15494 var mc MabContainer 15495 err := json.Unmarshal(body, &mc) 15496 return mc, err 15497 default: 15498 var pc ProtectionContainer 15499 err := json.Unmarshal(body, &pc) 15500 return pc, err 15501 } 15502} 15503func unmarshalBasicProtectionContainerArray(body []byte) ([]BasicProtectionContainer, error) { 15504 var rawMessages []*json.RawMessage 15505 err := json.Unmarshal(body, &rawMessages) 15506 if err != nil { 15507 return nil, err 15508 } 15509 15510 pcArray := make([]BasicProtectionContainer, len(rawMessages)) 15511 15512 for index, rawMessage := range rawMessages { 15513 pc, err := unmarshalBasicProtectionContainer(*rawMessage) 15514 if err != nil { 15515 return nil, err 15516 } 15517 pcArray[index] = pc 15518 } 15519 return pcArray, nil 15520} 15521 15522// MarshalJSON is the custom marshaler for ProtectionContainer. 15523func (pc ProtectionContainer) MarshalJSON() ([]byte, error) { 15524 pc.ContainerType = ContainerTypeProtectionContainer 15525 objectMap := make(map[string]interface{}) 15526 if pc.FriendlyName != nil { 15527 objectMap["friendlyName"] = pc.FriendlyName 15528 } 15529 if pc.BackupManagementType != "" { 15530 objectMap["backupManagementType"] = pc.BackupManagementType 15531 } 15532 if pc.RegistrationStatus != nil { 15533 objectMap["registrationStatus"] = pc.RegistrationStatus 15534 } 15535 if pc.HealthStatus != nil { 15536 objectMap["healthStatus"] = pc.HealthStatus 15537 } 15538 if pc.ContainerType != "" { 15539 objectMap["containerType"] = pc.ContainerType 15540 } 15541 return json.Marshal(objectMap) 15542} 15543 15544// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15545func (pc ProtectionContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { 15546 return nil, false 15547} 15548 15549// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15550func (pc ProtectionContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { 15551 return nil, false 15552} 15553 15554// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15555func (pc ProtectionContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { 15556 return nil, false 15557} 15558 15559// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15560func (pc ProtectionContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { 15561 return nil, false 15562} 15563 15564// AsAzureSQLContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15565func (pc ProtectionContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { 15566 return nil, false 15567} 15568 15569// AsAzureStorageContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15570func (pc ProtectionContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { 15571 return nil, false 15572} 15573 15574// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15575func (pc ProtectionContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { 15576 return nil, false 15577} 15578 15579// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15580func (pc ProtectionContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { 15581 return nil, false 15582} 15583 15584// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15585func (pc ProtectionContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { 15586 return nil, false 15587} 15588 15589// AsDpmContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15590func (pc ProtectionContainer) AsDpmContainer() (*DpmContainer, bool) { 15591 return nil, false 15592} 15593 15594// AsBasicDpmContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15595func (pc ProtectionContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { 15596 return nil, false 15597} 15598 15599// AsGenericContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15600func (pc ProtectionContainer) AsGenericContainer() (*GenericContainer, bool) { 15601 return nil, false 15602} 15603 15604// AsIaaSVMContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15605func (pc ProtectionContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { 15606 return nil, false 15607} 15608 15609// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15610func (pc ProtectionContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { 15611 return nil, false 15612} 15613 15614// AsMabContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15615func (pc ProtectionContainer) AsMabContainer() (*MabContainer, bool) { 15616 return nil, false 15617} 15618 15619// AsProtectionContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15620func (pc ProtectionContainer) AsProtectionContainer() (*ProtectionContainer, bool) { 15621 return &pc, true 15622} 15623 15624// AsBasicProtectionContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15625func (pc ProtectionContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { 15626 return &pc, true 15627} 15628 15629// ProtectionContainerResource base class for container with backup items. Containers with specific 15630// workloads are derived from this class. 15631type ProtectionContainerResource struct { 15632 autorest.Response `json:"-"` 15633 // Properties - ProtectionContainerResource properties 15634 Properties BasicProtectionContainer `json:"properties,omitempty"` 15635 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 15636 ID *string `json:"id,omitempty"` 15637 // Name - READ-ONLY; Resource name associated with the resource. 15638 Name *string `json:"name,omitempty"` 15639 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 15640 Type *string `json:"type,omitempty"` 15641 // Location - Resource location. 15642 Location *string `json:"location,omitempty"` 15643 // Tags - Resource tags. 15644 Tags map[string]*string `json:"tags"` 15645 // ETag - Optional ETag. 15646 ETag *string `json:"eTag,omitempty"` 15647} 15648 15649// MarshalJSON is the custom marshaler for ProtectionContainerResource. 15650func (pcr ProtectionContainerResource) MarshalJSON() ([]byte, error) { 15651 objectMap := make(map[string]interface{}) 15652 objectMap["properties"] = pcr.Properties 15653 if pcr.Location != nil { 15654 objectMap["location"] = pcr.Location 15655 } 15656 if pcr.Tags != nil { 15657 objectMap["tags"] = pcr.Tags 15658 } 15659 if pcr.ETag != nil { 15660 objectMap["eTag"] = pcr.ETag 15661 } 15662 return json.Marshal(objectMap) 15663} 15664 15665// UnmarshalJSON is the custom unmarshaler for ProtectionContainerResource struct. 15666func (pcr *ProtectionContainerResource) UnmarshalJSON(body []byte) error { 15667 var m map[string]*json.RawMessage 15668 err := json.Unmarshal(body, &m) 15669 if err != nil { 15670 return err 15671 } 15672 for k, v := range m { 15673 switch k { 15674 case "properties": 15675 if v != nil { 15676 properties, err := unmarshalBasicProtectionContainer(*v) 15677 if err != nil { 15678 return err 15679 } 15680 pcr.Properties = properties 15681 } 15682 case "id": 15683 if v != nil { 15684 var ID string 15685 err = json.Unmarshal(*v, &ID) 15686 if err != nil { 15687 return err 15688 } 15689 pcr.ID = &ID 15690 } 15691 case "name": 15692 if v != nil { 15693 var name string 15694 err = json.Unmarshal(*v, &name) 15695 if err != nil { 15696 return err 15697 } 15698 pcr.Name = &name 15699 } 15700 case "type": 15701 if v != nil { 15702 var typeVar string 15703 err = json.Unmarshal(*v, &typeVar) 15704 if err != nil { 15705 return err 15706 } 15707 pcr.Type = &typeVar 15708 } 15709 case "location": 15710 if v != nil { 15711 var location string 15712 err = json.Unmarshal(*v, &location) 15713 if err != nil { 15714 return err 15715 } 15716 pcr.Location = &location 15717 } 15718 case "tags": 15719 if v != nil { 15720 var tags map[string]*string 15721 err = json.Unmarshal(*v, &tags) 15722 if err != nil { 15723 return err 15724 } 15725 pcr.Tags = tags 15726 } 15727 case "eTag": 15728 if v != nil { 15729 var eTag string 15730 err = json.Unmarshal(*v, &eTag) 15731 if err != nil { 15732 return err 15733 } 15734 pcr.ETag = &eTag 15735 } 15736 } 15737 } 15738 15739 return nil 15740} 15741 15742// ProtectionContainerResourceList list of ProtectionContainer resources 15743type ProtectionContainerResourceList struct { 15744 autorest.Response `json:"-"` 15745 // Value - List of resources. 15746 Value *[]ProtectionContainerResource `json:"value,omitempty"` 15747 // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. 15748 NextLink *string `json:"nextLink,omitempty"` 15749} 15750 15751// ProtectionContainerResourceListIterator provides access to a complete listing of 15752// ProtectionContainerResource values. 15753type ProtectionContainerResourceListIterator struct { 15754 i int 15755 page ProtectionContainerResourceListPage 15756} 15757 15758// NextWithContext advances to the next value. If there was an error making 15759// the request the iterator does not advance and the error is returned. 15760func (iter *ProtectionContainerResourceListIterator) NextWithContext(ctx context.Context) (err error) { 15761 if tracing.IsEnabled() { 15762 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerResourceListIterator.NextWithContext") 15763 defer func() { 15764 sc := -1 15765 if iter.Response().Response.Response != nil { 15766 sc = iter.Response().Response.Response.StatusCode 15767 } 15768 tracing.EndSpan(ctx, sc, err) 15769 }() 15770 } 15771 iter.i++ 15772 if iter.i < len(iter.page.Values()) { 15773 return nil 15774 } 15775 err = iter.page.NextWithContext(ctx) 15776 if err != nil { 15777 iter.i-- 15778 return err 15779 } 15780 iter.i = 0 15781 return nil 15782} 15783 15784// Next advances to the next value. If there was an error making 15785// the request the iterator does not advance and the error is returned. 15786// Deprecated: Use NextWithContext() instead. 15787func (iter *ProtectionContainerResourceListIterator) Next() error { 15788 return iter.NextWithContext(context.Background()) 15789} 15790 15791// NotDone returns true if the enumeration should be started or is not yet complete. 15792func (iter ProtectionContainerResourceListIterator) NotDone() bool { 15793 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 15794} 15795 15796// Response returns the raw server response from the last page request. 15797func (iter ProtectionContainerResourceListIterator) Response() ProtectionContainerResourceList { 15798 return iter.page.Response() 15799} 15800 15801// Value returns the current value or a zero-initialized value if the 15802// iterator has advanced beyond the end of the collection. 15803func (iter ProtectionContainerResourceListIterator) Value() ProtectionContainerResource { 15804 if !iter.page.NotDone() { 15805 return ProtectionContainerResource{} 15806 } 15807 return iter.page.Values()[iter.i] 15808} 15809 15810// Creates a new instance of the ProtectionContainerResourceListIterator type. 15811func NewProtectionContainerResourceListIterator(page ProtectionContainerResourceListPage) ProtectionContainerResourceListIterator { 15812 return ProtectionContainerResourceListIterator{page: page} 15813} 15814 15815// IsEmpty returns true if the ListResult contains no values. 15816func (pcrl ProtectionContainerResourceList) IsEmpty() bool { 15817 return pcrl.Value == nil || len(*pcrl.Value) == 0 15818} 15819 15820// hasNextLink returns true if the NextLink is not empty. 15821func (pcrl ProtectionContainerResourceList) hasNextLink() bool { 15822 return pcrl.NextLink != nil && len(*pcrl.NextLink) != 0 15823} 15824 15825// protectionContainerResourceListPreparer prepares a request to retrieve the next set of results. 15826// It returns nil if no more results exist. 15827func (pcrl ProtectionContainerResourceList) protectionContainerResourceListPreparer(ctx context.Context) (*http.Request, error) { 15828 if !pcrl.hasNextLink() { 15829 return nil, nil 15830 } 15831 return autorest.Prepare((&http.Request{}).WithContext(ctx), 15832 autorest.AsJSON(), 15833 autorest.AsGet(), 15834 autorest.WithBaseURL(to.String(pcrl.NextLink))) 15835} 15836 15837// ProtectionContainerResourceListPage contains a page of ProtectionContainerResource values. 15838type ProtectionContainerResourceListPage struct { 15839 fn func(context.Context, ProtectionContainerResourceList) (ProtectionContainerResourceList, error) 15840 pcrl ProtectionContainerResourceList 15841} 15842 15843// NextWithContext advances to the next page of values. If there was an error making 15844// the request the page does not advance and the error is returned. 15845func (page *ProtectionContainerResourceListPage) NextWithContext(ctx context.Context) (err error) { 15846 if tracing.IsEnabled() { 15847 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerResourceListPage.NextWithContext") 15848 defer func() { 15849 sc := -1 15850 if page.Response().Response.Response != nil { 15851 sc = page.Response().Response.Response.StatusCode 15852 } 15853 tracing.EndSpan(ctx, sc, err) 15854 }() 15855 } 15856 for { 15857 next, err := page.fn(ctx, page.pcrl) 15858 if err != nil { 15859 return err 15860 } 15861 page.pcrl = next 15862 if !next.hasNextLink() || !next.IsEmpty() { 15863 break 15864 } 15865 } 15866 return nil 15867} 15868 15869// Next advances to the next page of values. If there was an error making 15870// the request the page does not advance and the error is returned. 15871// Deprecated: Use NextWithContext() instead. 15872func (page *ProtectionContainerResourceListPage) Next() error { 15873 return page.NextWithContext(context.Background()) 15874} 15875 15876// NotDone returns true if the page enumeration should be started or is not yet complete. 15877func (page ProtectionContainerResourceListPage) NotDone() bool { 15878 return !page.pcrl.IsEmpty() 15879} 15880 15881// Response returns the raw server response from the last page request. 15882func (page ProtectionContainerResourceListPage) Response() ProtectionContainerResourceList { 15883 return page.pcrl 15884} 15885 15886// Values returns the slice of values for the current page or nil if there are no values. 15887func (page ProtectionContainerResourceListPage) Values() []ProtectionContainerResource { 15888 if page.pcrl.IsEmpty() { 15889 return nil 15890 } 15891 return *page.pcrl.Value 15892} 15893 15894// Creates a new instance of the ProtectionContainerResourceListPage type. 15895func NewProtectionContainerResourceListPage(cur ProtectionContainerResourceList, getNextPage func(context.Context, ProtectionContainerResourceList) (ProtectionContainerResourceList, error)) ProtectionContainerResourceListPage { 15896 return ProtectionContainerResourceListPage{ 15897 fn: getNextPage, 15898 pcrl: cur, 15899 } 15900} 15901 15902// BasicProtectionIntent base class for backup ProtectionIntent. 15903type BasicProtectionIntent interface { 15904 AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) 15905 AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) 15906 AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) 15907 AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) 15908 AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) 15909 AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) 15910 AsProtectionIntent() (*ProtectionIntent, bool) 15911} 15912 15913// ProtectionIntent base class for backup ProtectionIntent. 15914type ProtectionIntent struct { 15915 // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 15916 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 15917 // SourceResourceID - ARM ID of the resource to be backed up. 15918 SourceResourceID *string `json:"sourceResourceId,omitempty"` 15919 // ItemID - ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId 15920 ItemID *string `json:"itemId,omitempty"` 15921 // PolicyID - ID of the backup policy with which this item is backed up. 15922 PolicyID *string `json:"policyId,omitempty"` 15923 // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 15924 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 15925 // ProtectionIntentItemType - Possible values include: 'ProtectionIntentItemTypeProtectionIntent', 'ProtectionIntentItemTypeRecoveryServiceVaultItem', 'ProtectionIntentItemTypeAzureResourceItem', 'ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent', 'ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent' 15926 ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"` 15927} 15928 15929func unmarshalBasicProtectionIntent(body []byte) (BasicProtectionIntent, error) { 15930 var m map[string]interface{} 15931 err := json.Unmarshal(body, &m) 15932 if err != nil { 15933 return nil, err 15934 } 15935 15936 switch m["protectionIntentItemType"] { 15937 case string(ProtectionIntentItemTypeRecoveryServiceVaultItem): 15938 var arsvpi AzureRecoveryServiceVaultProtectionIntent 15939 err := json.Unmarshal(body, &arsvpi) 15940 return arsvpi, err 15941 case string(ProtectionIntentItemTypeAzureResourceItem): 15942 var arpi AzureResourceProtectionIntent 15943 err := json.Unmarshal(body, &arpi) 15944 return arpi, err 15945 case string(ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent): 15946 var awapi AzureWorkloadAutoProtectionIntent 15947 err := json.Unmarshal(body, &awapi) 15948 return awapi, err 15949 case string(ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent): 15950 var awsapi AzureWorkloadSQLAutoProtectionIntent 15951 err := json.Unmarshal(body, &awsapi) 15952 return awsapi, err 15953 default: 15954 var pi ProtectionIntent 15955 err := json.Unmarshal(body, &pi) 15956 return pi, err 15957 } 15958} 15959func unmarshalBasicProtectionIntentArray(body []byte) ([]BasicProtectionIntent, error) { 15960 var rawMessages []*json.RawMessage 15961 err := json.Unmarshal(body, &rawMessages) 15962 if err != nil { 15963 return nil, err 15964 } 15965 15966 piArray := make([]BasicProtectionIntent, len(rawMessages)) 15967 15968 for index, rawMessage := range rawMessages { 15969 pi, err := unmarshalBasicProtectionIntent(*rawMessage) 15970 if err != nil { 15971 return nil, err 15972 } 15973 piArray[index] = pi 15974 } 15975 return piArray, nil 15976} 15977 15978// MarshalJSON is the custom marshaler for ProtectionIntent. 15979func (pi ProtectionIntent) MarshalJSON() ([]byte, error) { 15980 pi.ProtectionIntentItemType = ProtectionIntentItemTypeProtectionIntent 15981 objectMap := make(map[string]interface{}) 15982 if pi.BackupManagementType != "" { 15983 objectMap["backupManagementType"] = pi.BackupManagementType 15984 } 15985 if pi.SourceResourceID != nil { 15986 objectMap["sourceResourceId"] = pi.SourceResourceID 15987 } 15988 if pi.ItemID != nil { 15989 objectMap["itemId"] = pi.ItemID 15990 } 15991 if pi.PolicyID != nil { 15992 objectMap["policyId"] = pi.PolicyID 15993 } 15994 if pi.ProtectionState != "" { 15995 objectMap["protectionState"] = pi.ProtectionState 15996 } 15997 if pi.ProtectionIntentItemType != "" { 15998 objectMap["protectionIntentItemType"] = pi.ProtectionIntentItemType 15999 } 16000 return json.Marshal(objectMap) 16001} 16002 16003// AsAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. 16004func (pi ProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) { 16005 return nil, false 16006} 16007 16008// AsBasicAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. 16009func (pi ProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) { 16010 return nil, false 16011} 16012 16013// AsAzureResourceProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. 16014func (pi ProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) { 16015 return nil, false 16016} 16017 16018// AsAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. 16019func (pi ProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) { 16020 return nil, false 16021} 16022 16023// AsBasicAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. 16024func (pi ProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) { 16025 return nil, false 16026} 16027 16028// AsAzureWorkloadSQLAutoProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. 16029func (pi ProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) { 16030 return nil, false 16031} 16032 16033// AsProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. 16034func (pi ProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) { 16035 return &pi, true 16036} 16037 16038// AsBasicProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. 16039func (pi ProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) { 16040 return &pi, true 16041} 16042 16043// ProtectionIntentQueryObject filters to list protection intent. 16044type ProtectionIntentQueryObject struct { 16045 // BackupManagementType - Backup management type for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 16046 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 16047 // ItemType - Type of workload this item represents. Possible values include: 'IntentItemTypeInvalid', 'IntentItemTypeSQLInstance', 'IntentItemTypeSQLAvailabilityGroupContainer' 16048 ItemType IntentItemType `json:"itemType,omitempty"` 16049 // ParentName - Parent name of the intent 16050 ParentName *string `json:"parentName,omitempty"` 16051 // ItemName - Item name of the intent 16052 ItemName *string `json:"itemName,omitempty"` 16053} 16054 16055// ProtectionIntentResource base class for backup ProtectionIntent. 16056type ProtectionIntentResource struct { 16057 autorest.Response `json:"-"` 16058 // Properties - ProtectionIntentResource properties 16059 Properties BasicProtectionIntent `json:"properties,omitempty"` 16060 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 16061 ID *string `json:"id,omitempty"` 16062 // Name - READ-ONLY; Resource name associated with the resource. 16063 Name *string `json:"name,omitempty"` 16064 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 16065 Type *string `json:"type,omitempty"` 16066 // Location - Resource location. 16067 Location *string `json:"location,omitempty"` 16068 // Tags - Resource tags. 16069 Tags map[string]*string `json:"tags"` 16070 // ETag - Optional ETag. 16071 ETag *string `json:"eTag,omitempty"` 16072} 16073 16074// MarshalJSON is the custom marshaler for ProtectionIntentResource. 16075func (pir ProtectionIntentResource) MarshalJSON() ([]byte, error) { 16076 objectMap := make(map[string]interface{}) 16077 objectMap["properties"] = pir.Properties 16078 if pir.Location != nil { 16079 objectMap["location"] = pir.Location 16080 } 16081 if pir.Tags != nil { 16082 objectMap["tags"] = pir.Tags 16083 } 16084 if pir.ETag != nil { 16085 objectMap["eTag"] = pir.ETag 16086 } 16087 return json.Marshal(objectMap) 16088} 16089 16090// UnmarshalJSON is the custom unmarshaler for ProtectionIntentResource struct. 16091func (pir *ProtectionIntentResource) UnmarshalJSON(body []byte) error { 16092 var m map[string]*json.RawMessage 16093 err := json.Unmarshal(body, &m) 16094 if err != nil { 16095 return err 16096 } 16097 for k, v := range m { 16098 switch k { 16099 case "properties": 16100 if v != nil { 16101 properties, err := unmarshalBasicProtectionIntent(*v) 16102 if err != nil { 16103 return err 16104 } 16105 pir.Properties = properties 16106 } 16107 case "id": 16108 if v != nil { 16109 var ID string 16110 err = json.Unmarshal(*v, &ID) 16111 if err != nil { 16112 return err 16113 } 16114 pir.ID = &ID 16115 } 16116 case "name": 16117 if v != nil { 16118 var name string 16119 err = json.Unmarshal(*v, &name) 16120 if err != nil { 16121 return err 16122 } 16123 pir.Name = &name 16124 } 16125 case "type": 16126 if v != nil { 16127 var typeVar string 16128 err = json.Unmarshal(*v, &typeVar) 16129 if err != nil { 16130 return err 16131 } 16132 pir.Type = &typeVar 16133 } 16134 case "location": 16135 if v != nil { 16136 var location string 16137 err = json.Unmarshal(*v, &location) 16138 if err != nil { 16139 return err 16140 } 16141 pir.Location = &location 16142 } 16143 case "tags": 16144 if v != nil { 16145 var tags map[string]*string 16146 err = json.Unmarshal(*v, &tags) 16147 if err != nil { 16148 return err 16149 } 16150 pir.Tags = tags 16151 } 16152 case "eTag": 16153 if v != nil { 16154 var eTag string 16155 err = json.Unmarshal(*v, &eTag) 16156 if err != nil { 16157 return err 16158 } 16159 pir.ETag = &eTag 16160 } 16161 } 16162 } 16163 16164 return nil 16165} 16166 16167// ProtectionIntentResourceList list of ProtectionIntent resources 16168type ProtectionIntentResourceList struct { 16169 autorest.Response `json:"-"` 16170 // Value - List of resources. 16171 Value *[]ProtectionIntentResource `json:"value,omitempty"` 16172 // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. 16173 NextLink *string `json:"nextLink,omitempty"` 16174} 16175 16176// ProtectionIntentResourceListIterator provides access to a complete listing of ProtectionIntentResource 16177// values. 16178type ProtectionIntentResourceListIterator struct { 16179 i int 16180 page ProtectionIntentResourceListPage 16181} 16182 16183// NextWithContext advances to the next value. If there was an error making 16184// the request the iterator does not advance and the error is returned. 16185func (iter *ProtectionIntentResourceListIterator) NextWithContext(ctx context.Context) (err error) { 16186 if tracing.IsEnabled() { 16187 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionIntentResourceListIterator.NextWithContext") 16188 defer func() { 16189 sc := -1 16190 if iter.Response().Response.Response != nil { 16191 sc = iter.Response().Response.Response.StatusCode 16192 } 16193 tracing.EndSpan(ctx, sc, err) 16194 }() 16195 } 16196 iter.i++ 16197 if iter.i < len(iter.page.Values()) { 16198 return nil 16199 } 16200 err = iter.page.NextWithContext(ctx) 16201 if err != nil { 16202 iter.i-- 16203 return err 16204 } 16205 iter.i = 0 16206 return nil 16207} 16208 16209// Next advances to the next value. If there was an error making 16210// the request the iterator does not advance and the error is returned. 16211// Deprecated: Use NextWithContext() instead. 16212func (iter *ProtectionIntentResourceListIterator) Next() error { 16213 return iter.NextWithContext(context.Background()) 16214} 16215 16216// NotDone returns true if the enumeration should be started or is not yet complete. 16217func (iter ProtectionIntentResourceListIterator) NotDone() bool { 16218 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 16219} 16220 16221// Response returns the raw server response from the last page request. 16222func (iter ProtectionIntentResourceListIterator) Response() ProtectionIntentResourceList { 16223 return iter.page.Response() 16224} 16225 16226// Value returns the current value or a zero-initialized value if the 16227// iterator has advanced beyond the end of the collection. 16228func (iter ProtectionIntentResourceListIterator) Value() ProtectionIntentResource { 16229 if !iter.page.NotDone() { 16230 return ProtectionIntentResource{} 16231 } 16232 return iter.page.Values()[iter.i] 16233} 16234 16235// Creates a new instance of the ProtectionIntentResourceListIterator type. 16236func NewProtectionIntentResourceListIterator(page ProtectionIntentResourceListPage) ProtectionIntentResourceListIterator { 16237 return ProtectionIntentResourceListIterator{page: page} 16238} 16239 16240// IsEmpty returns true if the ListResult contains no values. 16241func (pirl ProtectionIntentResourceList) IsEmpty() bool { 16242 return pirl.Value == nil || len(*pirl.Value) == 0 16243} 16244 16245// hasNextLink returns true if the NextLink is not empty. 16246func (pirl ProtectionIntentResourceList) hasNextLink() bool { 16247 return pirl.NextLink != nil && len(*pirl.NextLink) != 0 16248} 16249 16250// protectionIntentResourceListPreparer prepares a request to retrieve the next set of results. 16251// It returns nil if no more results exist. 16252func (pirl ProtectionIntentResourceList) protectionIntentResourceListPreparer(ctx context.Context) (*http.Request, error) { 16253 if !pirl.hasNextLink() { 16254 return nil, nil 16255 } 16256 return autorest.Prepare((&http.Request{}).WithContext(ctx), 16257 autorest.AsJSON(), 16258 autorest.AsGet(), 16259 autorest.WithBaseURL(to.String(pirl.NextLink))) 16260} 16261 16262// ProtectionIntentResourceListPage contains a page of ProtectionIntentResource values. 16263type ProtectionIntentResourceListPage struct { 16264 fn func(context.Context, ProtectionIntentResourceList) (ProtectionIntentResourceList, error) 16265 pirl ProtectionIntentResourceList 16266} 16267 16268// NextWithContext advances to the next page of values. If there was an error making 16269// the request the page does not advance and the error is returned. 16270func (page *ProtectionIntentResourceListPage) NextWithContext(ctx context.Context) (err error) { 16271 if tracing.IsEnabled() { 16272 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionIntentResourceListPage.NextWithContext") 16273 defer func() { 16274 sc := -1 16275 if page.Response().Response.Response != nil { 16276 sc = page.Response().Response.Response.StatusCode 16277 } 16278 tracing.EndSpan(ctx, sc, err) 16279 }() 16280 } 16281 for { 16282 next, err := page.fn(ctx, page.pirl) 16283 if err != nil { 16284 return err 16285 } 16286 page.pirl = next 16287 if !next.hasNextLink() || !next.IsEmpty() { 16288 break 16289 } 16290 } 16291 return nil 16292} 16293 16294// Next advances to the next page of values. If there was an error making 16295// the request the page does not advance and the error is returned. 16296// Deprecated: Use NextWithContext() instead. 16297func (page *ProtectionIntentResourceListPage) Next() error { 16298 return page.NextWithContext(context.Background()) 16299} 16300 16301// NotDone returns true if the page enumeration should be started or is not yet complete. 16302func (page ProtectionIntentResourceListPage) NotDone() bool { 16303 return !page.pirl.IsEmpty() 16304} 16305 16306// Response returns the raw server response from the last page request. 16307func (page ProtectionIntentResourceListPage) Response() ProtectionIntentResourceList { 16308 return page.pirl 16309} 16310 16311// Values returns the slice of values for the current page or nil if there are no values. 16312func (page ProtectionIntentResourceListPage) Values() []ProtectionIntentResource { 16313 if page.pirl.IsEmpty() { 16314 return nil 16315 } 16316 return *page.pirl.Value 16317} 16318 16319// Creates a new instance of the ProtectionIntentResourceListPage type. 16320func NewProtectionIntentResourceListPage(cur ProtectionIntentResourceList, getNextPage func(context.Context, ProtectionIntentResourceList) (ProtectionIntentResourceList, error)) ProtectionIntentResourceListPage { 16321 return ProtectionIntentResourceListPage{ 16322 fn: getNextPage, 16323 pirl: cur, 16324 } 16325} 16326 16327// BasicProtectionPolicy base class for backup policy. Workload-specific backup policies are derived from this class. 16328type BasicProtectionPolicy interface { 16329 AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) 16330 AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) 16331 AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) 16332 AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) 16333 AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) 16334 AsMabProtectionPolicy() (*MabProtectionPolicy, bool) 16335 AsProtectionPolicy() (*ProtectionPolicy, bool) 16336} 16337 16338// ProtectionPolicy base class for backup policy. Workload-specific backup policies are derived from this 16339// class. 16340type ProtectionPolicy struct { 16341 // ProtectedItemsCount - Number of items associated with this policy. 16342 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` 16343 // BackupManagementType - Possible values include: 'BackupManagementTypeProtectionPolicy', 'BackupManagementTypeAzureWorkload', 'BackupManagementTypeAzureStorage', 'BackupManagementTypeAzureIaasVM', 'BackupManagementTypeAzureSQL', 'BackupManagementTypeGenericProtectionPolicy', 'BackupManagementTypeMAB' 16344 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"` 16345} 16346 16347func unmarshalBasicProtectionPolicy(body []byte) (BasicProtectionPolicy, error) { 16348 var m map[string]interface{} 16349 err := json.Unmarshal(body, &m) 16350 if err != nil { 16351 return nil, err 16352 } 16353 16354 switch m["backupManagementType"] { 16355 case string(BackupManagementTypeAzureWorkload): 16356 var avwpp AzureVMWorkloadProtectionPolicy 16357 err := json.Unmarshal(body, &avwpp) 16358 return avwpp, err 16359 case string(BackupManagementTypeAzureStorage): 16360 var afspp AzureFileShareProtectionPolicy 16361 err := json.Unmarshal(body, &afspp) 16362 return afspp, err 16363 case string(BackupManagementTypeAzureIaasVM): 16364 var aispp AzureIaaSVMProtectionPolicy 16365 err := json.Unmarshal(body, &aispp) 16366 return aispp, err 16367 case string(BackupManagementTypeAzureSQL): 16368 var aspp AzureSQLProtectionPolicy 16369 err := json.Unmarshal(body, &aspp) 16370 return aspp, err 16371 case string(BackupManagementTypeGenericProtectionPolicy): 16372 var gpp GenericProtectionPolicy 16373 err := json.Unmarshal(body, &gpp) 16374 return gpp, err 16375 case string(BackupManagementTypeMAB): 16376 var mpp MabProtectionPolicy 16377 err := json.Unmarshal(body, &mpp) 16378 return mpp, err 16379 default: 16380 var pp ProtectionPolicy 16381 err := json.Unmarshal(body, &pp) 16382 return pp, err 16383 } 16384} 16385func unmarshalBasicProtectionPolicyArray(body []byte) ([]BasicProtectionPolicy, error) { 16386 var rawMessages []*json.RawMessage 16387 err := json.Unmarshal(body, &rawMessages) 16388 if err != nil { 16389 return nil, err 16390 } 16391 16392 ppArray := make([]BasicProtectionPolicy, len(rawMessages)) 16393 16394 for index, rawMessage := range rawMessages { 16395 pp, err := unmarshalBasicProtectionPolicy(*rawMessage) 16396 if err != nil { 16397 return nil, err 16398 } 16399 ppArray[index] = pp 16400 } 16401 return ppArray, nil 16402} 16403 16404// MarshalJSON is the custom marshaler for ProtectionPolicy. 16405func (pp ProtectionPolicy) MarshalJSON() ([]byte, error) { 16406 pp.BackupManagementType = BackupManagementTypeProtectionPolicy 16407 objectMap := make(map[string]interface{}) 16408 if pp.ProtectedItemsCount != nil { 16409 objectMap["protectedItemsCount"] = pp.ProtectedItemsCount 16410 } 16411 if pp.BackupManagementType != "" { 16412 objectMap["backupManagementType"] = pp.BackupManagementType 16413 } 16414 return json.Marshal(objectMap) 16415} 16416 16417// AsAzureVMWorkloadProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. 16418func (pp ProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) { 16419 return nil, false 16420} 16421 16422// AsAzureFileShareProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. 16423func (pp ProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) { 16424 return nil, false 16425} 16426 16427// AsAzureIaaSVMProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. 16428func (pp ProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) { 16429 return nil, false 16430} 16431 16432// AsAzureSQLProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. 16433func (pp ProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) { 16434 return nil, false 16435} 16436 16437// AsGenericProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. 16438func (pp ProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) { 16439 return nil, false 16440} 16441 16442// AsMabProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. 16443func (pp ProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) { 16444 return nil, false 16445} 16446 16447// AsProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. 16448func (pp ProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) { 16449 return &pp, true 16450} 16451 16452// AsBasicProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. 16453func (pp ProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) { 16454 return &pp, true 16455} 16456 16457// ProtectionPolicyQueryObject filters the list backup policies API. 16458type ProtectionPolicyQueryObject struct { 16459 // BackupManagementType - Backup management type for the backup policy. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 16460 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 16461 // FabricName - Fabric name for filter 16462 FabricName *string `json:"fabricName,omitempty"` 16463 // WorkloadType - Workload type for the backup policy. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' 16464 WorkloadType WorkloadType `json:"workloadType,omitempty"` 16465} 16466 16467// ProtectionPolicyResource base class for backup policy. Workload-specific backup policies are derived 16468// from this class. 16469type ProtectionPolicyResource struct { 16470 autorest.Response `json:"-"` 16471 // Properties - ProtectionPolicyResource properties 16472 Properties BasicProtectionPolicy `json:"properties,omitempty"` 16473 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 16474 ID *string `json:"id,omitempty"` 16475 // Name - READ-ONLY; Resource name associated with the resource. 16476 Name *string `json:"name,omitempty"` 16477 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 16478 Type *string `json:"type,omitempty"` 16479 // Location - Resource location. 16480 Location *string `json:"location,omitempty"` 16481 // Tags - Resource tags. 16482 Tags map[string]*string `json:"tags"` 16483 // ETag - Optional ETag. 16484 ETag *string `json:"eTag,omitempty"` 16485} 16486 16487// MarshalJSON is the custom marshaler for ProtectionPolicyResource. 16488func (ppr ProtectionPolicyResource) MarshalJSON() ([]byte, error) { 16489 objectMap := make(map[string]interface{}) 16490 objectMap["properties"] = ppr.Properties 16491 if ppr.Location != nil { 16492 objectMap["location"] = ppr.Location 16493 } 16494 if ppr.Tags != nil { 16495 objectMap["tags"] = ppr.Tags 16496 } 16497 if ppr.ETag != nil { 16498 objectMap["eTag"] = ppr.ETag 16499 } 16500 return json.Marshal(objectMap) 16501} 16502 16503// UnmarshalJSON is the custom unmarshaler for ProtectionPolicyResource struct. 16504func (ppr *ProtectionPolicyResource) UnmarshalJSON(body []byte) error { 16505 var m map[string]*json.RawMessage 16506 err := json.Unmarshal(body, &m) 16507 if err != nil { 16508 return err 16509 } 16510 for k, v := range m { 16511 switch k { 16512 case "properties": 16513 if v != nil { 16514 properties, err := unmarshalBasicProtectionPolicy(*v) 16515 if err != nil { 16516 return err 16517 } 16518 ppr.Properties = properties 16519 } 16520 case "id": 16521 if v != nil { 16522 var ID string 16523 err = json.Unmarshal(*v, &ID) 16524 if err != nil { 16525 return err 16526 } 16527 ppr.ID = &ID 16528 } 16529 case "name": 16530 if v != nil { 16531 var name string 16532 err = json.Unmarshal(*v, &name) 16533 if err != nil { 16534 return err 16535 } 16536 ppr.Name = &name 16537 } 16538 case "type": 16539 if v != nil { 16540 var typeVar string 16541 err = json.Unmarshal(*v, &typeVar) 16542 if err != nil { 16543 return err 16544 } 16545 ppr.Type = &typeVar 16546 } 16547 case "location": 16548 if v != nil { 16549 var location string 16550 err = json.Unmarshal(*v, &location) 16551 if err != nil { 16552 return err 16553 } 16554 ppr.Location = &location 16555 } 16556 case "tags": 16557 if v != nil { 16558 var tags map[string]*string 16559 err = json.Unmarshal(*v, &tags) 16560 if err != nil { 16561 return err 16562 } 16563 ppr.Tags = tags 16564 } 16565 case "eTag": 16566 if v != nil { 16567 var eTag string 16568 err = json.Unmarshal(*v, &eTag) 16569 if err != nil { 16570 return err 16571 } 16572 ppr.ETag = &eTag 16573 } 16574 } 16575 } 16576 16577 return nil 16578} 16579 16580// ProtectionPolicyResourceList list of ProtectionPolicy resources 16581type ProtectionPolicyResourceList struct { 16582 autorest.Response `json:"-"` 16583 // Value - List of resources. 16584 Value *[]ProtectionPolicyResource `json:"value,omitempty"` 16585 // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. 16586 NextLink *string `json:"nextLink,omitempty"` 16587} 16588 16589// ProtectionPolicyResourceListIterator provides access to a complete listing of ProtectionPolicyResource 16590// values. 16591type ProtectionPolicyResourceListIterator struct { 16592 i int 16593 page ProtectionPolicyResourceListPage 16594} 16595 16596// NextWithContext advances to the next value. If there was an error making 16597// the request the iterator does not advance and the error is returned. 16598func (iter *ProtectionPolicyResourceListIterator) NextWithContext(ctx context.Context) (err error) { 16599 if tracing.IsEnabled() { 16600 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionPolicyResourceListIterator.NextWithContext") 16601 defer func() { 16602 sc := -1 16603 if iter.Response().Response.Response != nil { 16604 sc = iter.Response().Response.Response.StatusCode 16605 } 16606 tracing.EndSpan(ctx, sc, err) 16607 }() 16608 } 16609 iter.i++ 16610 if iter.i < len(iter.page.Values()) { 16611 return nil 16612 } 16613 err = iter.page.NextWithContext(ctx) 16614 if err != nil { 16615 iter.i-- 16616 return err 16617 } 16618 iter.i = 0 16619 return nil 16620} 16621 16622// Next advances to the next value. If there was an error making 16623// the request the iterator does not advance and the error is returned. 16624// Deprecated: Use NextWithContext() instead. 16625func (iter *ProtectionPolicyResourceListIterator) Next() error { 16626 return iter.NextWithContext(context.Background()) 16627} 16628 16629// NotDone returns true if the enumeration should be started or is not yet complete. 16630func (iter ProtectionPolicyResourceListIterator) NotDone() bool { 16631 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 16632} 16633 16634// Response returns the raw server response from the last page request. 16635func (iter ProtectionPolicyResourceListIterator) Response() ProtectionPolicyResourceList { 16636 return iter.page.Response() 16637} 16638 16639// Value returns the current value or a zero-initialized value if the 16640// iterator has advanced beyond the end of the collection. 16641func (iter ProtectionPolicyResourceListIterator) Value() ProtectionPolicyResource { 16642 if !iter.page.NotDone() { 16643 return ProtectionPolicyResource{} 16644 } 16645 return iter.page.Values()[iter.i] 16646} 16647 16648// Creates a new instance of the ProtectionPolicyResourceListIterator type. 16649func NewProtectionPolicyResourceListIterator(page ProtectionPolicyResourceListPage) ProtectionPolicyResourceListIterator { 16650 return ProtectionPolicyResourceListIterator{page: page} 16651} 16652 16653// IsEmpty returns true if the ListResult contains no values. 16654func (pprl ProtectionPolicyResourceList) IsEmpty() bool { 16655 return pprl.Value == nil || len(*pprl.Value) == 0 16656} 16657 16658// hasNextLink returns true if the NextLink is not empty. 16659func (pprl ProtectionPolicyResourceList) hasNextLink() bool { 16660 return pprl.NextLink != nil && len(*pprl.NextLink) != 0 16661} 16662 16663// protectionPolicyResourceListPreparer prepares a request to retrieve the next set of results. 16664// It returns nil if no more results exist. 16665func (pprl ProtectionPolicyResourceList) protectionPolicyResourceListPreparer(ctx context.Context) (*http.Request, error) { 16666 if !pprl.hasNextLink() { 16667 return nil, nil 16668 } 16669 return autorest.Prepare((&http.Request{}).WithContext(ctx), 16670 autorest.AsJSON(), 16671 autorest.AsGet(), 16672 autorest.WithBaseURL(to.String(pprl.NextLink))) 16673} 16674 16675// ProtectionPolicyResourceListPage contains a page of ProtectionPolicyResource values. 16676type ProtectionPolicyResourceListPage struct { 16677 fn func(context.Context, ProtectionPolicyResourceList) (ProtectionPolicyResourceList, error) 16678 pprl ProtectionPolicyResourceList 16679} 16680 16681// NextWithContext advances to the next page of values. If there was an error making 16682// the request the page does not advance and the error is returned. 16683func (page *ProtectionPolicyResourceListPage) NextWithContext(ctx context.Context) (err error) { 16684 if tracing.IsEnabled() { 16685 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionPolicyResourceListPage.NextWithContext") 16686 defer func() { 16687 sc := -1 16688 if page.Response().Response.Response != nil { 16689 sc = page.Response().Response.Response.StatusCode 16690 } 16691 tracing.EndSpan(ctx, sc, err) 16692 }() 16693 } 16694 for { 16695 next, err := page.fn(ctx, page.pprl) 16696 if err != nil { 16697 return err 16698 } 16699 page.pprl = next 16700 if !next.hasNextLink() || !next.IsEmpty() { 16701 break 16702 } 16703 } 16704 return nil 16705} 16706 16707// Next advances to the next page of values. If there was an error making 16708// the request the page does not advance and the error is returned. 16709// Deprecated: Use NextWithContext() instead. 16710func (page *ProtectionPolicyResourceListPage) Next() error { 16711 return page.NextWithContext(context.Background()) 16712} 16713 16714// NotDone returns true if the page enumeration should be started or is not yet complete. 16715func (page ProtectionPolicyResourceListPage) NotDone() bool { 16716 return !page.pprl.IsEmpty() 16717} 16718 16719// Response returns the raw server response from the last page request. 16720func (page ProtectionPolicyResourceListPage) Response() ProtectionPolicyResourceList { 16721 return page.pprl 16722} 16723 16724// Values returns the slice of values for the current page or nil if there are no values. 16725func (page ProtectionPolicyResourceListPage) Values() []ProtectionPolicyResource { 16726 if page.pprl.IsEmpty() { 16727 return nil 16728 } 16729 return *page.pprl.Value 16730} 16731 16732// Creates a new instance of the ProtectionPolicyResourceListPage type. 16733func NewProtectionPolicyResourceListPage(cur ProtectionPolicyResourceList, getNextPage func(context.Context, ProtectionPolicyResourceList) (ProtectionPolicyResourceList, error)) ProtectionPolicyResourceListPage { 16734 return ProtectionPolicyResourceListPage{ 16735 fn: getNextPage, 16736 pprl: cur, 16737 } 16738} 16739 16740// BasicRecoveryPoint base class for backup copies. Workload-specific backup copies are derived from this class. 16741type BasicRecoveryPoint interface { 16742 AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) 16743 AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) 16744 AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) 16745 AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) 16746 AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) 16747 AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) 16748 AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) 16749 AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) 16750 AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) 16751 AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) 16752 AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) 16753 AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) 16754 AsRecoveryPoint() (*RecoveryPoint, bool) 16755} 16756 16757// RecoveryPoint base class for backup copies. Workload-specific backup copies are derived from this class. 16758type RecoveryPoint struct { 16759 // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' 16760 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` 16761} 16762 16763func unmarshalBasicRecoveryPoint(body []byte) (BasicRecoveryPoint, error) { 16764 var m map[string]interface{} 16765 err := json.Unmarshal(body, &m) 16766 if err != nil { 16767 return nil, err 16768 } 16769 16770 switch m["objectType"] { 16771 case string(ObjectTypeAzureFileShareRecoveryPoint): 16772 var afsrp AzureFileShareRecoveryPoint 16773 err := json.Unmarshal(body, &afsrp) 16774 return afsrp, err 16775 case string(ObjectTypeAzureWorkloadPointInTimeRecoveryPoint): 16776 var awpitrp AzureWorkloadPointInTimeRecoveryPoint 16777 err := json.Unmarshal(body, &awpitrp) 16778 return awpitrp, err 16779 case string(ObjectTypeAzureWorkloadRecoveryPoint): 16780 var awrp AzureWorkloadRecoveryPoint 16781 err := json.Unmarshal(body, &awrp) 16782 return awrp, err 16783 case string(ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint): 16784 var awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint 16785 err := json.Unmarshal(body, &awshpitrp) 16786 return awshpitrp, err 16787 case string(ObjectTypeAzureWorkloadSAPHanaRecoveryPoint): 16788 var awshrp AzureWorkloadSAPHanaRecoveryPoint 16789 err := json.Unmarshal(body, &awshrp) 16790 return awshrp, err 16791 case string(ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint): 16792 var awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint 16793 err := json.Unmarshal(body, &awspitrp) 16794 return awspitrp, err 16795 case string(ObjectTypeAzureWorkloadSQLRecoveryPoint): 16796 var awsrp AzureWorkloadSQLRecoveryPoint 16797 err := json.Unmarshal(body, &awsrp) 16798 return awsrp, err 16799 case string(ObjectTypeGenericRecoveryPoint): 16800 var grp GenericRecoveryPoint 16801 err := json.Unmarshal(body, &grp) 16802 return grp, err 16803 case string(ObjectTypeIaasVMRecoveryPoint): 16804 var ivrp IaasVMRecoveryPoint 16805 err := json.Unmarshal(body, &ivrp) 16806 return ivrp, err 16807 default: 16808 var rp RecoveryPoint 16809 err := json.Unmarshal(body, &rp) 16810 return rp, err 16811 } 16812} 16813func unmarshalBasicRecoveryPointArray(body []byte) ([]BasicRecoveryPoint, error) { 16814 var rawMessages []*json.RawMessage 16815 err := json.Unmarshal(body, &rawMessages) 16816 if err != nil { 16817 return nil, err 16818 } 16819 16820 rpArray := make([]BasicRecoveryPoint, len(rawMessages)) 16821 16822 for index, rawMessage := range rawMessages { 16823 rp, err := unmarshalBasicRecoveryPoint(*rawMessage) 16824 if err != nil { 16825 return nil, err 16826 } 16827 rpArray[index] = rp 16828 } 16829 return rpArray, nil 16830} 16831 16832// MarshalJSON is the custom marshaler for RecoveryPoint. 16833func (rp RecoveryPoint) MarshalJSON() ([]byte, error) { 16834 rp.ObjectType = ObjectTypeRecoveryPoint 16835 objectMap := make(map[string]interface{}) 16836 if rp.ObjectType != "" { 16837 objectMap["objectType"] = rp.ObjectType 16838 } 16839 return json.Marshal(objectMap) 16840} 16841 16842// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. 16843func (rp RecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { 16844 return nil, false 16845} 16846 16847// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. 16848func (rp RecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { 16849 return nil, false 16850} 16851 16852// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. 16853func (rp RecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { 16854 return nil, false 16855} 16856 16857// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. 16858func (rp RecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { 16859 return nil, false 16860} 16861 16862// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. 16863func (rp RecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { 16864 return nil, false 16865} 16866 16867// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. 16868func (rp RecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { 16869 return nil, false 16870} 16871 16872// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. 16873func (rp RecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { 16874 return nil, false 16875} 16876 16877// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. 16878func (rp RecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { 16879 return nil, false 16880} 16881 16882// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. 16883func (rp RecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { 16884 return nil, false 16885} 16886 16887// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. 16888func (rp RecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { 16889 return nil, false 16890} 16891 16892// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. 16893func (rp RecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { 16894 return nil, false 16895} 16896 16897// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. 16898func (rp RecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { 16899 return nil, false 16900} 16901 16902// AsRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. 16903func (rp RecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { 16904 return &rp, true 16905} 16906 16907// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. 16908func (rp RecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { 16909 return &rp, true 16910} 16911 16912// RecoveryPointDiskConfiguration disk configuration 16913type RecoveryPointDiskConfiguration struct { 16914 // NumberOfDisksIncludedInBackup - Number of disks included in backup 16915 NumberOfDisksIncludedInBackup *int32 `json:"numberOfDisksIncludedInBackup,omitempty"` 16916 // NumberOfDisksAttachedToVM - Number of disks attached to the VM 16917 NumberOfDisksAttachedToVM *int32 `json:"numberOfDisksAttachedToVm,omitempty"` 16918 // IncludedDiskList - Information of disks included in backup 16919 IncludedDiskList *[]DiskInformation `json:"includedDiskList,omitempty"` 16920 // ExcludedDiskList - Information of disks excluded from backup 16921 ExcludedDiskList *[]DiskInformation `json:"excludedDiskList,omitempty"` 16922} 16923 16924// RecoveryPointResource base class for backup copies. Workload-specific backup copies are derived from 16925// this class. 16926type RecoveryPointResource struct { 16927 autorest.Response `json:"-"` 16928 // Properties - RecoveryPointResource properties 16929 Properties BasicRecoveryPoint `json:"properties,omitempty"` 16930 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 16931 ID *string `json:"id,omitempty"` 16932 // Name - READ-ONLY; Resource name associated with the resource. 16933 Name *string `json:"name,omitempty"` 16934 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 16935 Type *string `json:"type,omitempty"` 16936 // Location - Resource location. 16937 Location *string `json:"location,omitempty"` 16938 // Tags - Resource tags. 16939 Tags map[string]*string `json:"tags"` 16940 // ETag - Optional ETag. 16941 ETag *string `json:"eTag,omitempty"` 16942} 16943 16944// MarshalJSON is the custom marshaler for RecoveryPointResource. 16945func (rpr RecoveryPointResource) MarshalJSON() ([]byte, error) { 16946 objectMap := make(map[string]interface{}) 16947 objectMap["properties"] = rpr.Properties 16948 if rpr.Location != nil { 16949 objectMap["location"] = rpr.Location 16950 } 16951 if rpr.Tags != nil { 16952 objectMap["tags"] = rpr.Tags 16953 } 16954 if rpr.ETag != nil { 16955 objectMap["eTag"] = rpr.ETag 16956 } 16957 return json.Marshal(objectMap) 16958} 16959 16960// UnmarshalJSON is the custom unmarshaler for RecoveryPointResource struct. 16961func (rpr *RecoveryPointResource) UnmarshalJSON(body []byte) error { 16962 var m map[string]*json.RawMessage 16963 err := json.Unmarshal(body, &m) 16964 if err != nil { 16965 return err 16966 } 16967 for k, v := range m { 16968 switch k { 16969 case "properties": 16970 if v != nil { 16971 properties, err := unmarshalBasicRecoveryPoint(*v) 16972 if err != nil { 16973 return err 16974 } 16975 rpr.Properties = properties 16976 } 16977 case "id": 16978 if v != nil { 16979 var ID string 16980 err = json.Unmarshal(*v, &ID) 16981 if err != nil { 16982 return err 16983 } 16984 rpr.ID = &ID 16985 } 16986 case "name": 16987 if v != nil { 16988 var name string 16989 err = json.Unmarshal(*v, &name) 16990 if err != nil { 16991 return err 16992 } 16993 rpr.Name = &name 16994 } 16995 case "type": 16996 if v != nil { 16997 var typeVar string 16998 err = json.Unmarshal(*v, &typeVar) 16999 if err != nil { 17000 return err 17001 } 17002 rpr.Type = &typeVar 17003 } 17004 case "location": 17005 if v != nil { 17006 var location string 17007 err = json.Unmarshal(*v, &location) 17008 if err != nil { 17009 return err 17010 } 17011 rpr.Location = &location 17012 } 17013 case "tags": 17014 if v != nil { 17015 var tags map[string]*string 17016 err = json.Unmarshal(*v, &tags) 17017 if err != nil { 17018 return err 17019 } 17020 rpr.Tags = tags 17021 } 17022 case "eTag": 17023 if v != nil { 17024 var eTag string 17025 err = json.Unmarshal(*v, &eTag) 17026 if err != nil { 17027 return err 17028 } 17029 rpr.ETag = &eTag 17030 } 17031 } 17032 } 17033 17034 return nil 17035} 17036 17037// RecoveryPointResourceList list of RecoveryPoint resources 17038type RecoveryPointResourceList struct { 17039 autorest.Response `json:"-"` 17040 // Value - List of resources. 17041 Value *[]RecoveryPointResource `json:"value,omitempty"` 17042 // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. 17043 NextLink *string `json:"nextLink,omitempty"` 17044} 17045 17046// RecoveryPointResourceListIterator provides access to a complete listing of RecoveryPointResource values. 17047type RecoveryPointResourceListIterator struct { 17048 i int 17049 page RecoveryPointResourceListPage 17050} 17051 17052// NextWithContext advances to the next value. If there was an error making 17053// the request the iterator does not advance and the error is returned. 17054func (iter *RecoveryPointResourceListIterator) NextWithContext(ctx context.Context) (err error) { 17055 if tracing.IsEnabled() { 17056 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPointResourceListIterator.NextWithContext") 17057 defer func() { 17058 sc := -1 17059 if iter.Response().Response.Response != nil { 17060 sc = iter.Response().Response.Response.StatusCode 17061 } 17062 tracing.EndSpan(ctx, sc, err) 17063 }() 17064 } 17065 iter.i++ 17066 if iter.i < len(iter.page.Values()) { 17067 return nil 17068 } 17069 err = iter.page.NextWithContext(ctx) 17070 if err != nil { 17071 iter.i-- 17072 return err 17073 } 17074 iter.i = 0 17075 return nil 17076} 17077 17078// Next advances to the next value. If there was an error making 17079// the request the iterator does not advance and the error is returned. 17080// Deprecated: Use NextWithContext() instead. 17081func (iter *RecoveryPointResourceListIterator) Next() error { 17082 return iter.NextWithContext(context.Background()) 17083} 17084 17085// NotDone returns true if the enumeration should be started or is not yet complete. 17086func (iter RecoveryPointResourceListIterator) NotDone() bool { 17087 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 17088} 17089 17090// Response returns the raw server response from the last page request. 17091func (iter RecoveryPointResourceListIterator) Response() RecoveryPointResourceList { 17092 return iter.page.Response() 17093} 17094 17095// Value returns the current value or a zero-initialized value if the 17096// iterator has advanced beyond the end of the collection. 17097func (iter RecoveryPointResourceListIterator) Value() RecoveryPointResource { 17098 if !iter.page.NotDone() { 17099 return RecoveryPointResource{} 17100 } 17101 return iter.page.Values()[iter.i] 17102} 17103 17104// Creates a new instance of the RecoveryPointResourceListIterator type. 17105func NewRecoveryPointResourceListIterator(page RecoveryPointResourceListPage) RecoveryPointResourceListIterator { 17106 return RecoveryPointResourceListIterator{page: page} 17107} 17108 17109// IsEmpty returns true if the ListResult contains no values. 17110func (rprl RecoveryPointResourceList) IsEmpty() bool { 17111 return rprl.Value == nil || len(*rprl.Value) == 0 17112} 17113 17114// hasNextLink returns true if the NextLink is not empty. 17115func (rprl RecoveryPointResourceList) hasNextLink() bool { 17116 return rprl.NextLink != nil && len(*rprl.NextLink) != 0 17117} 17118 17119// recoveryPointResourceListPreparer prepares a request to retrieve the next set of results. 17120// It returns nil if no more results exist. 17121func (rprl RecoveryPointResourceList) recoveryPointResourceListPreparer(ctx context.Context) (*http.Request, error) { 17122 if !rprl.hasNextLink() { 17123 return nil, nil 17124 } 17125 return autorest.Prepare((&http.Request{}).WithContext(ctx), 17126 autorest.AsJSON(), 17127 autorest.AsGet(), 17128 autorest.WithBaseURL(to.String(rprl.NextLink))) 17129} 17130 17131// RecoveryPointResourceListPage contains a page of RecoveryPointResource values. 17132type RecoveryPointResourceListPage struct { 17133 fn func(context.Context, RecoveryPointResourceList) (RecoveryPointResourceList, error) 17134 rprl RecoveryPointResourceList 17135} 17136 17137// NextWithContext advances to the next page of values. If there was an error making 17138// the request the page does not advance and the error is returned. 17139func (page *RecoveryPointResourceListPage) NextWithContext(ctx context.Context) (err error) { 17140 if tracing.IsEnabled() { 17141 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPointResourceListPage.NextWithContext") 17142 defer func() { 17143 sc := -1 17144 if page.Response().Response.Response != nil { 17145 sc = page.Response().Response.Response.StatusCode 17146 } 17147 tracing.EndSpan(ctx, sc, err) 17148 }() 17149 } 17150 for { 17151 next, err := page.fn(ctx, page.rprl) 17152 if err != nil { 17153 return err 17154 } 17155 page.rprl = next 17156 if !next.hasNextLink() || !next.IsEmpty() { 17157 break 17158 } 17159 } 17160 return nil 17161} 17162 17163// Next advances to the next page of values. If there was an error making 17164// the request the page does not advance and the error is returned. 17165// Deprecated: Use NextWithContext() instead. 17166func (page *RecoveryPointResourceListPage) Next() error { 17167 return page.NextWithContext(context.Background()) 17168} 17169 17170// NotDone returns true if the page enumeration should be started or is not yet complete. 17171func (page RecoveryPointResourceListPage) NotDone() bool { 17172 return !page.rprl.IsEmpty() 17173} 17174 17175// Response returns the raw server response from the last page request. 17176func (page RecoveryPointResourceListPage) Response() RecoveryPointResourceList { 17177 return page.rprl 17178} 17179 17180// Values returns the slice of values for the current page or nil if there are no values. 17181func (page RecoveryPointResourceListPage) Values() []RecoveryPointResource { 17182 if page.rprl.IsEmpty() { 17183 return nil 17184 } 17185 return *page.rprl.Value 17186} 17187 17188// Creates a new instance of the RecoveryPointResourceListPage type. 17189func NewRecoveryPointResourceListPage(cur RecoveryPointResourceList, getNextPage func(context.Context, RecoveryPointResourceList) (RecoveryPointResourceList, error)) RecoveryPointResourceListPage { 17190 return RecoveryPointResourceListPage{ 17191 fn: getNextPage, 17192 rprl: cur, 17193 } 17194} 17195 17196// RecoveryPointTierInformation recovery point tier information. 17197type RecoveryPointTierInformation struct { 17198 // Type - Recovery point tier type. Possible values include: 'RecoveryPointTierTypeInvalid', 'RecoveryPointTierTypeInstantRP', 'RecoveryPointTierTypeHardenedRP' 17199 Type RecoveryPointTierType `json:"type,omitempty"` 17200 // Status - Recovery point tier status. Possible values include: 'RecoveryPointTierStatusInvalid', 'RecoveryPointTierStatusValid', 'RecoveryPointTierStatusDisabled', 'RecoveryPointTierStatusDeleted' 17201 Status RecoveryPointTierStatus `json:"status,omitempty"` 17202} 17203 17204// BasicRequest base class for backup request. Workload-specific backup requests are derived from this class. 17205type BasicRequest interface { 17206 AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) 17207 AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) 17208 AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) 17209 AsRequest() (*Request, bool) 17210} 17211 17212// Request base class for backup request. Workload-specific backup requests are derived from this class. 17213type Request struct { 17214 // ObjectType - Possible values include: 'ObjectTypeBackupRequest', 'ObjectTypeAzureFileShareBackupRequest', 'ObjectTypeAzureWorkloadBackupRequest', 'ObjectTypeIaasVMBackupRequest' 17215 ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"` 17216} 17217 17218func unmarshalBasicRequest(body []byte) (BasicRequest, error) { 17219 var m map[string]interface{} 17220 err := json.Unmarshal(body, &m) 17221 if err != nil { 17222 return nil, err 17223 } 17224 17225 switch m["objectType"] { 17226 case string(ObjectTypeAzureFileShareBackupRequest): 17227 var afsbr AzureFileShareBackupRequest 17228 err := json.Unmarshal(body, &afsbr) 17229 return afsbr, err 17230 case string(ObjectTypeAzureWorkloadBackupRequest): 17231 var awbr AzureWorkloadBackupRequest 17232 err := json.Unmarshal(body, &awbr) 17233 return awbr, err 17234 case string(ObjectTypeIaasVMBackupRequest): 17235 var ivbr IaasVMBackupRequest 17236 err := json.Unmarshal(body, &ivbr) 17237 return ivbr, err 17238 default: 17239 var r Request 17240 err := json.Unmarshal(body, &r) 17241 return r, err 17242 } 17243} 17244func unmarshalBasicRequestArray(body []byte) ([]BasicRequest, error) { 17245 var rawMessages []*json.RawMessage 17246 err := json.Unmarshal(body, &rawMessages) 17247 if err != nil { 17248 return nil, err 17249 } 17250 17251 rArray := make([]BasicRequest, len(rawMessages)) 17252 17253 for index, rawMessage := range rawMessages { 17254 r, err := unmarshalBasicRequest(*rawMessage) 17255 if err != nil { 17256 return nil, err 17257 } 17258 rArray[index] = r 17259 } 17260 return rArray, nil 17261} 17262 17263// MarshalJSON is the custom marshaler for Request. 17264func (r Request) MarshalJSON() ([]byte, error) { 17265 r.ObjectType = ObjectTypeBackupRequest 17266 objectMap := make(map[string]interface{}) 17267 if r.ObjectType != "" { 17268 objectMap["objectType"] = r.ObjectType 17269 } 17270 return json.Marshal(objectMap) 17271} 17272 17273// AsAzureFileShareBackupRequest is the BasicRequest implementation for Request. 17274func (r Request) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) { 17275 return nil, false 17276} 17277 17278// AsAzureWorkloadBackupRequest is the BasicRequest implementation for Request. 17279func (r Request) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) { 17280 return nil, false 17281} 17282 17283// AsIaasVMBackupRequest is the BasicRequest implementation for Request. 17284func (r Request) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) { 17285 return nil, false 17286} 17287 17288// AsRequest is the BasicRequest implementation for Request. 17289func (r Request) AsRequest() (*Request, bool) { 17290 return &r, true 17291} 17292 17293// AsBasicRequest is the BasicRequest implementation for Request. 17294func (r Request) AsBasicRequest() (BasicRequest, bool) { 17295 return &r, true 17296} 17297 17298// RequestResource base class for backup request. Workload-specific backup requests are derived from this 17299// class. 17300type RequestResource struct { 17301 // Properties - BackupRequestResource properties 17302 Properties BasicRequest `json:"properties,omitempty"` 17303 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 17304 ID *string `json:"id,omitempty"` 17305 // Name - READ-ONLY; Resource name associated with the resource. 17306 Name *string `json:"name,omitempty"` 17307 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 17308 Type *string `json:"type,omitempty"` 17309 // Location - Resource location. 17310 Location *string `json:"location,omitempty"` 17311 // Tags - Resource tags. 17312 Tags map[string]*string `json:"tags"` 17313 // ETag - Optional ETag. 17314 ETag *string `json:"eTag,omitempty"` 17315} 17316 17317// MarshalJSON is the custom marshaler for RequestResource. 17318func (rr RequestResource) MarshalJSON() ([]byte, error) { 17319 objectMap := make(map[string]interface{}) 17320 objectMap["properties"] = rr.Properties 17321 if rr.Location != nil { 17322 objectMap["location"] = rr.Location 17323 } 17324 if rr.Tags != nil { 17325 objectMap["tags"] = rr.Tags 17326 } 17327 if rr.ETag != nil { 17328 objectMap["eTag"] = rr.ETag 17329 } 17330 return json.Marshal(objectMap) 17331} 17332 17333// UnmarshalJSON is the custom unmarshaler for RequestResource struct. 17334func (rr *RequestResource) UnmarshalJSON(body []byte) error { 17335 var m map[string]*json.RawMessage 17336 err := json.Unmarshal(body, &m) 17337 if err != nil { 17338 return err 17339 } 17340 for k, v := range m { 17341 switch k { 17342 case "properties": 17343 if v != nil { 17344 properties, err := unmarshalBasicRequest(*v) 17345 if err != nil { 17346 return err 17347 } 17348 rr.Properties = properties 17349 } 17350 case "id": 17351 if v != nil { 17352 var ID string 17353 err = json.Unmarshal(*v, &ID) 17354 if err != nil { 17355 return err 17356 } 17357 rr.ID = &ID 17358 } 17359 case "name": 17360 if v != nil { 17361 var name string 17362 err = json.Unmarshal(*v, &name) 17363 if err != nil { 17364 return err 17365 } 17366 rr.Name = &name 17367 } 17368 case "type": 17369 if v != nil { 17370 var typeVar string 17371 err = json.Unmarshal(*v, &typeVar) 17372 if err != nil { 17373 return err 17374 } 17375 rr.Type = &typeVar 17376 } 17377 case "location": 17378 if v != nil { 17379 var location string 17380 err = json.Unmarshal(*v, &location) 17381 if err != nil { 17382 return err 17383 } 17384 rr.Location = &location 17385 } 17386 case "tags": 17387 if v != nil { 17388 var tags map[string]*string 17389 err = json.Unmarshal(*v, &tags) 17390 if err != nil { 17391 return err 17392 } 17393 rr.Tags = tags 17394 } 17395 case "eTag": 17396 if v != nil { 17397 var eTag string 17398 err = json.Unmarshal(*v, &eTag) 17399 if err != nil { 17400 return err 17401 } 17402 rr.ETag = &eTag 17403 } 17404 } 17405 } 17406 17407 return nil 17408} 17409 17410// Resource ARM Resource. 17411type Resource struct { 17412 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 17413 ID *string `json:"id,omitempty"` 17414 // Name - READ-ONLY; Resource name associated with the resource. 17415 Name *string `json:"name,omitempty"` 17416 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 17417 Type *string `json:"type,omitempty"` 17418 // Location - Resource location. 17419 Location *string `json:"location,omitempty"` 17420 // Tags - Resource tags. 17421 Tags map[string]*string `json:"tags"` 17422 // ETag - Optional ETag. 17423 ETag *string `json:"eTag,omitempty"` 17424} 17425 17426// MarshalJSON is the custom marshaler for Resource. 17427func (r Resource) MarshalJSON() ([]byte, error) { 17428 objectMap := make(map[string]interface{}) 17429 if r.Location != nil { 17430 objectMap["location"] = r.Location 17431 } 17432 if r.Tags != nil { 17433 objectMap["tags"] = r.Tags 17434 } 17435 if r.ETag != nil { 17436 objectMap["eTag"] = r.ETag 17437 } 17438 return json.Marshal(objectMap) 17439} 17440 17441// ResourceConfig the resource storage details. 17442type ResourceConfig struct { 17443 // StorageModelType - Storage type. Possible values include: 'StorageTypeInvalid', 'StorageTypeGeoRedundant', 'StorageTypeLocallyRedundant' 17444 StorageModelType StorageType `json:"storageModelType,omitempty"` 17445 // StorageType - Storage type. Possible values include: 'StorageTypeInvalid', 'StorageTypeGeoRedundant', 'StorageTypeLocallyRedundant' 17446 StorageType StorageType `json:"storageType,omitempty"` 17447 // StorageTypeState - Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked. Possible values include: 'StorageTypeStateInvalid', 'StorageTypeStateLocked', 'StorageTypeStateUnlocked' 17448 StorageTypeState StorageTypeState `json:"storageTypeState,omitempty"` 17449} 17450 17451// ResourceConfigResource the resource storage details. 17452type ResourceConfigResource struct { 17453 autorest.Response `json:"-"` 17454 // Properties - BackupResourceConfigResource properties 17455 Properties *ResourceConfig `json:"properties,omitempty"` 17456 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 17457 ID *string `json:"id,omitempty"` 17458 // Name - READ-ONLY; Resource name associated with the resource. 17459 Name *string `json:"name,omitempty"` 17460 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 17461 Type *string `json:"type,omitempty"` 17462 // Location - Resource location. 17463 Location *string `json:"location,omitempty"` 17464 // Tags - Resource tags. 17465 Tags map[string]*string `json:"tags"` 17466 // ETag - Optional ETag. 17467 ETag *string `json:"eTag,omitempty"` 17468} 17469 17470// MarshalJSON is the custom marshaler for ResourceConfigResource. 17471func (rcr ResourceConfigResource) MarshalJSON() ([]byte, error) { 17472 objectMap := make(map[string]interface{}) 17473 if rcr.Properties != nil { 17474 objectMap["properties"] = rcr.Properties 17475 } 17476 if rcr.Location != nil { 17477 objectMap["location"] = rcr.Location 17478 } 17479 if rcr.Tags != nil { 17480 objectMap["tags"] = rcr.Tags 17481 } 17482 if rcr.ETag != nil { 17483 objectMap["eTag"] = rcr.ETag 17484 } 17485 return json.Marshal(objectMap) 17486} 17487 17488// ResourceList base for all lists of resources. 17489type ResourceList struct { 17490 // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. 17491 NextLink *string `json:"nextLink,omitempty"` 17492} 17493 17494// ResourceVaultConfig backup resource vault config details. 17495type ResourceVaultConfig struct { 17496 // StorageModelType - Storage type. Possible values include: 'StorageTypeInvalid', 'StorageTypeGeoRedundant', 'StorageTypeLocallyRedundant' 17497 StorageModelType StorageType `json:"storageModelType,omitempty"` 17498 // StorageType - Storage type. Possible values include: 'StorageTypeInvalid', 'StorageTypeGeoRedundant', 'StorageTypeLocallyRedundant' 17499 StorageType StorageType `json:"storageType,omitempty"` 17500 // StorageTypeState - Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked. Possible values include: 'StorageTypeStateInvalid', 'StorageTypeStateLocked', 'StorageTypeStateUnlocked' 17501 StorageTypeState StorageTypeState `json:"storageTypeState,omitempty"` 17502 // EnhancedSecurityState - Enabled or Disabled. Possible values include: 'EnhancedSecurityStateInvalid', 'EnhancedSecurityStateEnabled', 'EnhancedSecurityStateDisabled' 17503 EnhancedSecurityState EnhancedSecurityState `json:"enhancedSecurityState,omitempty"` 17504 // SoftDeleteFeatureState - Soft Delete feature state. Possible values include: 'SoftDeleteFeatureStateInvalid', 'SoftDeleteFeatureStateEnabled', 'SoftDeleteFeatureStateDisabled' 17505 SoftDeleteFeatureState SoftDeleteFeatureState `json:"softDeleteFeatureState,omitempty"` 17506} 17507 17508// ResourceVaultConfigResource backup resource vault config details. 17509type ResourceVaultConfigResource struct { 17510 autorest.Response `json:"-"` 17511 // Properties - BackupResourceVaultConfigResource properties 17512 Properties *ResourceVaultConfig `json:"properties,omitempty"` 17513 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 17514 ID *string `json:"id,omitempty"` 17515 // Name - READ-ONLY; Resource name associated with the resource. 17516 Name *string `json:"name,omitempty"` 17517 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 17518 Type *string `json:"type,omitempty"` 17519 // Location - Resource location. 17520 Location *string `json:"location,omitempty"` 17521 // Tags - Resource tags. 17522 Tags map[string]*string `json:"tags"` 17523 // ETag - Optional ETag. 17524 ETag *string `json:"eTag,omitempty"` 17525} 17526 17527// MarshalJSON is the custom marshaler for ResourceVaultConfigResource. 17528func (rvcr ResourceVaultConfigResource) MarshalJSON() ([]byte, error) { 17529 objectMap := make(map[string]interface{}) 17530 if rvcr.Properties != nil { 17531 objectMap["properties"] = rvcr.Properties 17532 } 17533 if rvcr.Location != nil { 17534 objectMap["location"] = rvcr.Location 17535 } 17536 if rvcr.Tags != nil { 17537 objectMap["tags"] = rvcr.Tags 17538 } 17539 if rvcr.ETag != nil { 17540 objectMap["eTag"] = rvcr.ETag 17541 } 17542 return json.Marshal(objectMap) 17543} 17544 17545// RestoreFileSpecs restore file specs like file path, type and target folder path info. 17546type RestoreFileSpecs struct { 17547 // Path - Source File/Folder path 17548 Path *string `json:"path,omitempty"` 17549 // FileSpecType - Indicates what the Path variable stands for 17550 FileSpecType *string `json:"fileSpecType,omitempty"` 17551 // TargetFolderPath - Destination folder path in target FileShare 17552 TargetFolderPath *string `json:"targetFolderPath,omitempty"` 17553} 17554 17555// BasicRestoreRequest base class for restore request. Workload-specific restore requests are derived from this class. 17556type BasicRestoreRequest interface { 17557 AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) 17558 AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) 17559 AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) 17560 AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) 17561 AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) 17562 AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) 17563 AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) 17564 AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) 17565 AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) 17566 AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) 17567 AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) 17568 AsRestoreRequest() (*RestoreRequest, bool) 17569} 17570 17571// RestoreRequest base class for restore request. Workload-specific restore requests are derived from this 17572// class. 17573type RestoreRequest struct { 17574 // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' 17575 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` 17576} 17577 17578func unmarshalBasicRestoreRequest(body []byte) (BasicRestoreRequest, error) { 17579 var m map[string]interface{} 17580 err := json.Unmarshal(body, &m) 17581 if err != nil { 17582 return nil, err 17583 } 17584 17585 switch m["objectType"] { 17586 case string(ObjectTypeAzureFileShareRestoreRequest): 17587 var afsrr AzureFileShareRestoreRequest 17588 err := json.Unmarshal(body, &afsrr) 17589 return afsrr, err 17590 case string(ObjectTypeAzureWorkloadPointInTimeRestoreRequest): 17591 var awpitrr AzureWorkloadPointInTimeRestoreRequest 17592 err := json.Unmarshal(body, &awpitrr) 17593 return awpitrr, err 17594 case string(ObjectTypeAzureWorkloadRestoreRequest): 17595 var awrr AzureWorkloadRestoreRequest 17596 err := json.Unmarshal(body, &awrr) 17597 return awrr, err 17598 case string(ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest): 17599 var awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest 17600 err := json.Unmarshal(body, &awshpitrr) 17601 return awshpitrr, err 17602 case string(ObjectTypeAzureWorkloadSAPHanaRestoreRequest): 17603 var awshrr AzureWorkloadSAPHanaRestoreRequest 17604 err := json.Unmarshal(body, &awshrr) 17605 return awshrr, err 17606 case string(ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest): 17607 var awspitrr AzureWorkloadSQLPointInTimeRestoreRequest 17608 err := json.Unmarshal(body, &awspitrr) 17609 return awspitrr, err 17610 case string(ObjectTypeAzureWorkloadSQLRestoreRequest): 17611 var awsrr AzureWorkloadSQLRestoreRequest 17612 err := json.Unmarshal(body, &awsrr) 17613 return awsrr, err 17614 case string(ObjectTypeIaasVMRestoreRequest): 17615 var ivrr IaasVMRestoreRequest 17616 err := json.Unmarshal(body, &ivrr) 17617 return ivrr, err 17618 default: 17619 var rr RestoreRequest 17620 err := json.Unmarshal(body, &rr) 17621 return rr, err 17622 } 17623} 17624func unmarshalBasicRestoreRequestArray(body []byte) ([]BasicRestoreRequest, error) { 17625 var rawMessages []*json.RawMessage 17626 err := json.Unmarshal(body, &rawMessages) 17627 if err != nil { 17628 return nil, err 17629 } 17630 17631 rrArray := make([]BasicRestoreRequest, len(rawMessages)) 17632 17633 for index, rawMessage := range rawMessages { 17634 rr, err := unmarshalBasicRestoreRequest(*rawMessage) 17635 if err != nil { 17636 return nil, err 17637 } 17638 rrArray[index] = rr 17639 } 17640 return rrArray, nil 17641} 17642 17643// MarshalJSON is the custom marshaler for RestoreRequest. 17644func (rr RestoreRequest) MarshalJSON() ([]byte, error) { 17645 rr.ObjectType = ObjectTypeRestoreRequest 17646 objectMap := make(map[string]interface{}) 17647 if rr.ObjectType != "" { 17648 objectMap["objectType"] = rr.ObjectType 17649 } 17650 return json.Marshal(objectMap) 17651} 17652 17653// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. 17654func (rr RestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { 17655 return nil, false 17656} 17657 17658// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. 17659func (rr RestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { 17660 return nil, false 17661} 17662 17663// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. 17664func (rr RestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { 17665 return nil, false 17666} 17667 17668// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. 17669func (rr RestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { 17670 return nil, false 17671} 17672 17673// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. 17674func (rr RestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { 17675 return nil, false 17676} 17677 17678// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. 17679func (rr RestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { 17680 return nil, false 17681} 17682 17683// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. 17684func (rr RestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { 17685 return nil, false 17686} 17687 17688// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. 17689func (rr RestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { 17690 return nil, false 17691} 17692 17693// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. 17694func (rr RestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { 17695 return nil, false 17696} 17697 17698// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. 17699func (rr RestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { 17700 return nil, false 17701} 17702 17703// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. 17704func (rr RestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { 17705 return nil, false 17706} 17707 17708// AsRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. 17709func (rr RestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { 17710 return &rr, true 17711} 17712 17713// AsBasicRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. 17714func (rr RestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { 17715 return &rr, true 17716} 17717 17718// RestoreRequestResource base class for restore request. Workload-specific restore requests are derived 17719// from this class. 17720type RestoreRequestResource struct { 17721 // Properties - RestoreRequestResource properties 17722 Properties BasicRestoreRequest `json:"properties,omitempty"` 17723 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 17724 ID *string `json:"id,omitempty"` 17725 // Name - READ-ONLY; Resource name associated with the resource. 17726 Name *string `json:"name,omitempty"` 17727 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 17728 Type *string `json:"type,omitempty"` 17729 // Location - Resource location. 17730 Location *string `json:"location,omitempty"` 17731 // Tags - Resource tags. 17732 Tags map[string]*string `json:"tags"` 17733 // ETag - Optional ETag. 17734 ETag *string `json:"eTag,omitempty"` 17735} 17736 17737// MarshalJSON is the custom marshaler for RestoreRequestResource. 17738func (rrr RestoreRequestResource) MarshalJSON() ([]byte, error) { 17739 objectMap := make(map[string]interface{}) 17740 objectMap["properties"] = rrr.Properties 17741 if rrr.Location != nil { 17742 objectMap["location"] = rrr.Location 17743 } 17744 if rrr.Tags != nil { 17745 objectMap["tags"] = rrr.Tags 17746 } 17747 if rrr.ETag != nil { 17748 objectMap["eTag"] = rrr.ETag 17749 } 17750 return json.Marshal(objectMap) 17751} 17752 17753// UnmarshalJSON is the custom unmarshaler for RestoreRequestResource struct. 17754func (rrr *RestoreRequestResource) UnmarshalJSON(body []byte) error { 17755 var m map[string]*json.RawMessage 17756 err := json.Unmarshal(body, &m) 17757 if err != nil { 17758 return err 17759 } 17760 for k, v := range m { 17761 switch k { 17762 case "properties": 17763 if v != nil { 17764 properties, err := unmarshalBasicRestoreRequest(*v) 17765 if err != nil { 17766 return err 17767 } 17768 rrr.Properties = properties 17769 } 17770 case "id": 17771 if v != nil { 17772 var ID string 17773 err = json.Unmarshal(*v, &ID) 17774 if err != nil { 17775 return err 17776 } 17777 rrr.ID = &ID 17778 } 17779 case "name": 17780 if v != nil { 17781 var name string 17782 err = json.Unmarshal(*v, &name) 17783 if err != nil { 17784 return err 17785 } 17786 rrr.Name = &name 17787 } 17788 case "type": 17789 if v != nil { 17790 var typeVar string 17791 err = json.Unmarshal(*v, &typeVar) 17792 if err != nil { 17793 return err 17794 } 17795 rrr.Type = &typeVar 17796 } 17797 case "location": 17798 if v != nil { 17799 var location string 17800 err = json.Unmarshal(*v, &location) 17801 if err != nil { 17802 return err 17803 } 17804 rrr.Location = &location 17805 } 17806 case "tags": 17807 if v != nil { 17808 var tags map[string]*string 17809 err = json.Unmarshal(*v, &tags) 17810 if err != nil { 17811 return err 17812 } 17813 rrr.Tags = tags 17814 } 17815 case "eTag": 17816 if v != nil { 17817 var eTag string 17818 err = json.Unmarshal(*v, &eTag) 17819 if err != nil { 17820 return err 17821 } 17822 rrr.ETag = &eTag 17823 } 17824 } 17825 } 17826 17827 return nil 17828} 17829 17830// RetentionDuration retention duration. 17831type RetentionDuration struct { 17832 // Count - Count of duration types. Retention duration is obtained by the counting the duration type Count times. 17833 // For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks. 17834 Count *int32 `json:"count,omitempty"` 17835 // DurationType - Retention duration type of retention policy. Possible values include: 'RetentionDurationTypeInvalid', 'RetentionDurationTypeDays', 'RetentionDurationTypeWeeks', 'RetentionDurationTypeMonths', 'RetentionDurationTypeYears' 17836 DurationType RetentionDurationType `json:"durationType,omitempty"` 17837} 17838 17839// BasicRetentionPolicy base class for retention policy. 17840type BasicRetentionPolicy interface { 17841 AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) 17842 AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) 17843 AsRetentionPolicy() (*RetentionPolicy, bool) 17844} 17845 17846// RetentionPolicy base class for retention policy. 17847type RetentionPolicy struct { 17848 // RetentionPolicyType - Possible values include: 'RetentionPolicyTypeRetentionPolicy', 'RetentionPolicyTypeLongTermRetentionPolicy', 'RetentionPolicyTypeSimpleRetentionPolicy' 17849 RetentionPolicyType RetentionPolicyType `json:"retentionPolicyType,omitempty"` 17850} 17851 17852func unmarshalBasicRetentionPolicy(body []byte) (BasicRetentionPolicy, error) { 17853 var m map[string]interface{} 17854 err := json.Unmarshal(body, &m) 17855 if err != nil { 17856 return nil, err 17857 } 17858 17859 switch m["retentionPolicyType"] { 17860 case string(RetentionPolicyTypeLongTermRetentionPolicy): 17861 var ltrp LongTermRetentionPolicy 17862 err := json.Unmarshal(body, <rp) 17863 return ltrp, err 17864 case string(RetentionPolicyTypeSimpleRetentionPolicy): 17865 var srp SimpleRetentionPolicy 17866 err := json.Unmarshal(body, &srp) 17867 return srp, err 17868 default: 17869 var rp RetentionPolicy 17870 err := json.Unmarshal(body, &rp) 17871 return rp, err 17872 } 17873} 17874func unmarshalBasicRetentionPolicyArray(body []byte) ([]BasicRetentionPolicy, error) { 17875 var rawMessages []*json.RawMessage 17876 err := json.Unmarshal(body, &rawMessages) 17877 if err != nil { 17878 return nil, err 17879 } 17880 17881 rpArray := make([]BasicRetentionPolicy, len(rawMessages)) 17882 17883 for index, rawMessage := range rawMessages { 17884 rp, err := unmarshalBasicRetentionPolicy(*rawMessage) 17885 if err != nil { 17886 return nil, err 17887 } 17888 rpArray[index] = rp 17889 } 17890 return rpArray, nil 17891} 17892 17893// MarshalJSON is the custom marshaler for RetentionPolicy. 17894func (rp RetentionPolicy) MarshalJSON() ([]byte, error) { 17895 rp.RetentionPolicyType = RetentionPolicyTypeRetentionPolicy 17896 objectMap := make(map[string]interface{}) 17897 if rp.RetentionPolicyType != "" { 17898 objectMap["retentionPolicyType"] = rp.RetentionPolicyType 17899 } 17900 return json.Marshal(objectMap) 17901} 17902 17903// AsLongTermRetentionPolicy is the BasicRetentionPolicy implementation for RetentionPolicy. 17904func (rp RetentionPolicy) AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) { 17905 return nil, false 17906} 17907 17908// AsSimpleRetentionPolicy is the BasicRetentionPolicy implementation for RetentionPolicy. 17909func (rp RetentionPolicy) AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) { 17910 return nil, false 17911} 17912 17913// AsRetentionPolicy is the BasicRetentionPolicy implementation for RetentionPolicy. 17914func (rp RetentionPolicy) AsRetentionPolicy() (*RetentionPolicy, bool) { 17915 return &rp, true 17916} 17917 17918// AsBasicRetentionPolicy is the BasicRetentionPolicy implementation for RetentionPolicy. 17919func (rp RetentionPolicy) AsBasicRetentionPolicy() (BasicRetentionPolicy, bool) { 17920 return &rp, true 17921} 17922 17923// BasicSchedulePolicy base class for backup schedule. 17924type BasicSchedulePolicy interface { 17925 AsLogSchedulePolicy() (*LogSchedulePolicy, bool) 17926 AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) 17927 AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) 17928 AsSchedulePolicy() (*SchedulePolicy, bool) 17929} 17930 17931// SchedulePolicy base class for backup schedule. 17932type SchedulePolicy struct { 17933 // SchedulePolicyType - Possible values include: 'SchedulePolicyTypeSchedulePolicy', 'SchedulePolicyTypeLogSchedulePolicy', 'SchedulePolicyTypeLongTermSchedulePolicy', 'SchedulePolicyTypeSimpleSchedulePolicy' 17934 SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"` 17935} 17936 17937func unmarshalBasicSchedulePolicy(body []byte) (BasicSchedulePolicy, error) { 17938 var m map[string]interface{} 17939 err := json.Unmarshal(body, &m) 17940 if err != nil { 17941 return nil, err 17942 } 17943 17944 switch m["schedulePolicyType"] { 17945 case string(SchedulePolicyTypeLogSchedulePolicy): 17946 var lsp LogSchedulePolicy 17947 err := json.Unmarshal(body, &lsp) 17948 return lsp, err 17949 case string(SchedulePolicyTypeLongTermSchedulePolicy): 17950 var ltsp LongTermSchedulePolicy 17951 err := json.Unmarshal(body, <sp) 17952 return ltsp, err 17953 case string(SchedulePolicyTypeSimpleSchedulePolicy): 17954 var ssp SimpleSchedulePolicy 17955 err := json.Unmarshal(body, &ssp) 17956 return ssp, err 17957 default: 17958 var sp SchedulePolicy 17959 err := json.Unmarshal(body, &sp) 17960 return sp, err 17961 } 17962} 17963func unmarshalBasicSchedulePolicyArray(body []byte) ([]BasicSchedulePolicy, error) { 17964 var rawMessages []*json.RawMessage 17965 err := json.Unmarshal(body, &rawMessages) 17966 if err != nil { 17967 return nil, err 17968 } 17969 17970 spArray := make([]BasicSchedulePolicy, len(rawMessages)) 17971 17972 for index, rawMessage := range rawMessages { 17973 sp, err := unmarshalBasicSchedulePolicy(*rawMessage) 17974 if err != nil { 17975 return nil, err 17976 } 17977 spArray[index] = sp 17978 } 17979 return spArray, nil 17980} 17981 17982// MarshalJSON is the custom marshaler for SchedulePolicy. 17983func (sp SchedulePolicy) MarshalJSON() ([]byte, error) { 17984 sp.SchedulePolicyType = SchedulePolicyTypeSchedulePolicy 17985 objectMap := make(map[string]interface{}) 17986 if sp.SchedulePolicyType != "" { 17987 objectMap["schedulePolicyType"] = sp.SchedulePolicyType 17988 } 17989 return json.Marshal(objectMap) 17990} 17991 17992// AsLogSchedulePolicy is the BasicSchedulePolicy implementation for SchedulePolicy. 17993func (sp SchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) { 17994 return nil, false 17995} 17996 17997// AsLongTermSchedulePolicy is the BasicSchedulePolicy implementation for SchedulePolicy. 17998func (sp SchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) { 17999 return nil, false 18000} 18001 18002// AsSimpleSchedulePolicy is the BasicSchedulePolicy implementation for SchedulePolicy. 18003func (sp SchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) { 18004 return nil, false 18005} 18006 18007// AsSchedulePolicy is the BasicSchedulePolicy implementation for SchedulePolicy. 18008func (sp SchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) { 18009 return &sp, true 18010} 18011 18012// AsBasicSchedulePolicy is the BasicSchedulePolicy implementation for SchedulePolicy. 18013func (sp SchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) { 18014 return &sp, true 18015} 18016 18017// Settings common settings field for backup management 18018type Settings struct { 18019 // TimeZone - TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". 18020 TimeZone *string `json:"timeZone,omitempty"` 18021 // Issqlcompression - SQL compression flag 18022 Issqlcompression *bool `json:"issqlcompression,omitempty"` 18023 // IsCompression - Workload compression flag. This has been added so that 'isSqlCompression' 18024 // will be deprecated once clients upgrade to consider this flag. 18025 IsCompression *bool `json:"isCompression,omitempty"` 18026} 18027 18028// SimpleRetentionPolicy simple policy retention. 18029type SimpleRetentionPolicy struct { 18030 // RetentionDuration - Retention duration of the protection policy. 18031 RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` 18032 // RetentionPolicyType - Possible values include: 'RetentionPolicyTypeRetentionPolicy', 'RetentionPolicyTypeLongTermRetentionPolicy', 'RetentionPolicyTypeSimpleRetentionPolicy' 18033 RetentionPolicyType RetentionPolicyType `json:"retentionPolicyType,omitempty"` 18034} 18035 18036// MarshalJSON is the custom marshaler for SimpleRetentionPolicy. 18037func (srp SimpleRetentionPolicy) MarshalJSON() ([]byte, error) { 18038 srp.RetentionPolicyType = RetentionPolicyTypeSimpleRetentionPolicy 18039 objectMap := make(map[string]interface{}) 18040 if srp.RetentionDuration != nil { 18041 objectMap["retentionDuration"] = srp.RetentionDuration 18042 } 18043 if srp.RetentionPolicyType != "" { 18044 objectMap["retentionPolicyType"] = srp.RetentionPolicyType 18045 } 18046 return json.Marshal(objectMap) 18047} 18048 18049// AsLongTermRetentionPolicy is the BasicRetentionPolicy implementation for SimpleRetentionPolicy. 18050func (srp SimpleRetentionPolicy) AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) { 18051 return nil, false 18052} 18053 18054// AsSimpleRetentionPolicy is the BasicRetentionPolicy implementation for SimpleRetentionPolicy. 18055func (srp SimpleRetentionPolicy) AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) { 18056 return &srp, true 18057} 18058 18059// AsRetentionPolicy is the BasicRetentionPolicy implementation for SimpleRetentionPolicy. 18060func (srp SimpleRetentionPolicy) AsRetentionPolicy() (*RetentionPolicy, bool) { 18061 return nil, false 18062} 18063 18064// AsBasicRetentionPolicy is the BasicRetentionPolicy implementation for SimpleRetentionPolicy. 18065func (srp SimpleRetentionPolicy) AsBasicRetentionPolicy() (BasicRetentionPolicy, bool) { 18066 return &srp, true 18067} 18068 18069// SimpleSchedulePolicy simple policy schedule. 18070type SimpleSchedulePolicy struct { 18071 // ScheduleRunFrequency - Frequency of the schedule operation of this policy. Possible values include: 'ScheduleRunTypeInvalid', 'ScheduleRunTypeDaily', 'ScheduleRunTypeWeekly' 18072 ScheduleRunFrequency ScheduleRunType `json:"scheduleRunFrequency,omitempty"` 18073 // ScheduleRunDays - List of days of week this schedule has to be run. 18074 ScheduleRunDays *[]DayOfWeek `json:"scheduleRunDays,omitempty"` 18075 // ScheduleRunTimes - List of times of day this schedule has to be run. 18076 ScheduleRunTimes *[]date.Time `json:"scheduleRunTimes,omitempty"` 18077 // ScheduleWeeklyFrequency - At every number weeks this schedule has to be run. 18078 ScheduleWeeklyFrequency *int32 `json:"scheduleWeeklyFrequency,omitempty"` 18079 // SchedulePolicyType - Possible values include: 'SchedulePolicyTypeSchedulePolicy', 'SchedulePolicyTypeLogSchedulePolicy', 'SchedulePolicyTypeLongTermSchedulePolicy', 'SchedulePolicyTypeSimpleSchedulePolicy' 18080 SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"` 18081} 18082 18083// MarshalJSON is the custom marshaler for SimpleSchedulePolicy. 18084func (ssp SimpleSchedulePolicy) MarshalJSON() ([]byte, error) { 18085 ssp.SchedulePolicyType = SchedulePolicyTypeSimpleSchedulePolicy 18086 objectMap := make(map[string]interface{}) 18087 if ssp.ScheduleRunFrequency != "" { 18088 objectMap["scheduleRunFrequency"] = ssp.ScheduleRunFrequency 18089 } 18090 if ssp.ScheduleRunDays != nil { 18091 objectMap["scheduleRunDays"] = ssp.ScheduleRunDays 18092 } 18093 if ssp.ScheduleRunTimes != nil { 18094 objectMap["scheduleRunTimes"] = ssp.ScheduleRunTimes 18095 } 18096 if ssp.ScheduleWeeklyFrequency != nil { 18097 objectMap["scheduleWeeklyFrequency"] = ssp.ScheduleWeeklyFrequency 18098 } 18099 if ssp.SchedulePolicyType != "" { 18100 objectMap["schedulePolicyType"] = ssp.SchedulePolicyType 18101 } 18102 return json.Marshal(objectMap) 18103} 18104 18105// AsLogSchedulePolicy is the BasicSchedulePolicy implementation for SimpleSchedulePolicy. 18106func (ssp SimpleSchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) { 18107 return nil, false 18108} 18109 18110// AsLongTermSchedulePolicy is the BasicSchedulePolicy implementation for SimpleSchedulePolicy. 18111func (ssp SimpleSchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) { 18112 return nil, false 18113} 18114 18115// AsSimpleSchedulePolicy is the BasicSchedulePolicy implementation for SimpleSchedulePolicy. 18116func (ssp SimpleSchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) { 18117 return &ssp, true 18118} 18119 18120// AsSchedulePolicy is the BasicSchedulePolicy implementation for SimpleSchedulePolicy. 18121func (ssp SimpleSchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) { 18122 return nil, false 18123} 18124 18125// AsBasicSchedulePolicy is the BasicSchedulePolicy implementation for SimpleSchedulePolicy. 18126func (ssp SimpleSchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) { 18127 return &ssp, true 18128} 18129 18130// SQLDataDirectory sQLDataDirectory info 18131type SQLDataDirectory struct { 18132 // Type - Type of data directory mapping. Possible values include: 'SQLDataDirectoryTypeInvalid', 'SQLDataDirectoryTypeData', 'SQLDataDirectoryTypeLog' 18133 Type SQLDataDirectoryType `json:"type,omitempty"` 18134 // Path - File path 18135 Path *string `json:"path,omitempty"` 18136 // LogicalName - Logical name of the file 18137 LogicalName *string `json:"logicalName,omitempty"` 18138} 18139 18140// SQLDataDirectoryMapping encapsulates information regarding data directory 18141type SQLDataDirectoryMapping struct { 18142 // MappingType - Type of data directory mapping. Possible values include: 'SQLDataDirectoryTypeInvalid', 'SQLDataDirectoryTypeData', 'SQLDataDirectoryTypeLog' 18143 MappingType SQLDataDirectoryType `json:"mappingType,omitempty"` 18144 // SourceLogicalName - Restore source logical name path 18145 SourceLogicalName *string `json:"sourceLogicalName,omitempty"` 18146 // SourcePath - Restore source path 18147 SourcePath *string `json:"sourcePath,omitempty"` 18148 // TargetPath - Target path 18149 TargetPath *string `json:"targetPath,omitempty"` 18150} 18151 18152// StatusRequest backupStatus request. 18153type StatusRequest struct { 18154 // ResourceType - Container Type - VM, SQLPaaS, DPM, AzureFileShare. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' 18155 ResourceType DataSourceType `json:"resourceType,omitempty"` 18156 // ResourceID - Entire ARM resource id of the resource 18157 ResourceID *string `json:"resourceId,omitempty"` 18158 // PoLogicalName - Protectable Item Logical Name 18159 PoLogicalName *string `json:"poLogicalName,omitempty"` 18160} 18161 18162// StatusResponse backupStatus response. 18163type StatusResponse struct { 18164 autorest.Response `json:"-"` 18165 // ProtectionStatus - Specifies whether the container is registered or not. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 18166 ProtectionStatus ProtectionStatus `json:"protectionStatus,omitempty"` 18167 // VaultID - Specifies the arm resource id of the vault 18168 VaultID *string `json:"vaultId,omitempty"` 18169 // FabricName - Specifies the fabric name - Azure or AD. Possible values include: 'FabricNameInvalid', 'FabricNameAzure' 18170 FabricName FabricName `json:"fabricName,omitempty"` 18171 // ContainerName - Specifies the product specific container name. E.g. iaasvmcontainer;iaasvmcontainer;csname;vmname. 18172 ContainerName *string `json:"containerName,omitempty"` 18173 // ProtectedItemName - Specifies the product specific ds name. E.g. vm;iaasvmcontainer;csname;vmname. 18174 ProtectedItemName *string `json:"protectedItemName,omitempty"` 18175 // ErrorCode - ErrorCode in case of intent failed 18176 ErrorCode *string `json:"errorCode,omitempty"` 18177 // ErrorMessage - ErrorMessage in case of intent failed. 18178 ErrorMessage *string `json:"errorMessage,omitempty"` 18179 // PolicyName - Specifies the policy name which is used for protection 18180 PolicyName *string `json:"policyName,omitempty"` 18181 // RegistrationStatus - Container registration status 18182 RegistrationStatus *string `json:"registrationStatus,omitempty"` 18183} 18184 18185// SubProtectionPolicy sub-protection policy which includes schedule and retention 18186type SubProtectionPolicy struct { 18187 // PolicyType - Type of backup policy type. Possible values include: 'PolicyTypeInvalid', 'PolicyTypeFull', 'PolicyTypeDifferential', 'PolicyTypeLog', 'PolicyTypeCopyOnlyFull' 18188 PolicyType PolicyType `json:"policyType,omitempty"` 18189 // SchedulePolicy - Backup schedule specified as part of backup policy. 18190 SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"` 18191 // RetentionPolicy - Retention policy with the details on backup copy retention ranges. 18192 RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"` 18193} 18194 18195// UnmarshalJSON is the custom unmarshaler for SubProtectionPolicy struct. 18196func (spp *SubProtectionPolicy) UnmarshalJSON(body []byte) error { 18197 var m map[string]*json.RawMessage 18198 err := json.Unmarshal(body, &m) 18199 if err != nil { 18200 return err 18201 } 18202 for k, v := range m { 18203 switch k { 18204 case "policyType": 18205 if v != nil { 18206 var policyType PolicyType 18207 err = json.Unmarshal(*v, &policyType) 18208 if err != nil { 18209 return err 18210 } 18211 spp.PolicyType = policyType 18212 } 18213 case "schedulePolicy": 18214 if v != nil { 18215 schedulePolicy, err := unmarshalBasicSchedulePolicy(*v) 18216 if err != nil { 18217 return err 18218 } 18219 spp.SchedulePolicy = schedulePolicy 18220 } 18221 case "retentionPolicy": 18222 if v != nil { 18223 retentionPolicy, err := unmarshalBasicRetentionPolicy(*v) 18224 if err != nil { 18225 return err 18226 } 18227 spp.RetentionPolicy = retentionPolicy 18228 } 18229 } 18230 } 18231 18232 return nil 18233} 18234 18235// TargetAFSRestoreInfo target Azure File Share Info. 18236type TargetAFSRestoreInfo struct { 18237 // Name - File share name 18238 Name *string `json:"name,omitempty"` 18239 // TargetResourceID - Target file share resource ARM ID 18240 TargetResourceID *string `json:"targetResourceId,omitempty"` 18241} 18242 18243// TargetRestoreInfo details about target workload during restore operation. 18244type TargetRestoreInfo struct { 18245 // OverwriteOption - Can Overwrite if Target DataBase already exists. Possible values include: 'OverwriteOptionsInvalid', 'OverwriteOptionsFailOnConflict', 'OverwriteOptionsOverwrite' 18246 OverwriteOption OverwriteOptions `json:"overwriteOption,omitempty"` 18247 // ContainerID - Resource Id name of the container in which Target DataBase resides 18248 ContainerID *string `json:"containerId,omitempty"` 18249 // DatabaseName - Database name InstanceName/DataBaseName for SQL or System/DbName for SAP Hana 18250 DatabaseName *string `json:"databaseName,omitempty"` 18251} 18252 18253// TokenInformation the token information details. 18254type TokenInformation struct { 18255 autorest.Response `json:"-"` 18256 // Token - Token value. 18257 Token *string `json:"token,omitempty"` 18258 // ExpiryTimeInUtcTicks - Expiry time of token. 18259 ExpiryTimeInUtcTicks *int64 `json:"expiryTimeInUtcTicks,omitempty"` 18260 // SecurityPIN - Security PIN 18261 SecurityPIN *string `json:"securityPIN,omitempty"` 18262} 18263 18264// ValidateIaasVMRestoreOperationRequest azureRestoreValidation request. 18265type ValidateIaasVMRestoreOperationRequest struct { 18266 // RestoreRequest - Sets restore request to be validated 18267 RestoreRequest BasicRestoreRequest `json:"restoreRequest,omitempty"` 18268 // ObjectType - Possible values include: 'ObjectTypeValidateOperationRequest', 'ObjectTypeValidateIaasVMRestoreOperationRequest', 'ObjectTypeValidateRestoreOperationRequest' 18269 ObjectType ObjectTypeBasicValidateOperationRequest `json:"objectType,omitempty"` 18270} 18271 18272// MarshalJSON is the custom marshaler for ValidateIaasVMRestoreOperationRequest. 18273func (vivror ValidateIaasVMRestoreOperationRequest) MarshalJSON() ([]byte, error) { 18274 vivror.ObjectType = ObjectTypeValidateIaasVMRestoreOperationRequest 18275 objectMap := make(map[string]interface{}) 18276 objectMap["restoreRequest"] = vivror.RestoreRequest 18277 if vivror.ObjectType != "" { 18278 objectMap["objectType"] = vivror.ObjectType 18279 } 18280 return json.Marshal(objectMap) 18281} 18282 18283// AsValidateIaasVMRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateIaasVMRestoreOperationRequest. 18284func (vivror ValidateIaasVMRestoreOperationRequest) AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) { 18285 return &vivror, true 18286} 18287 18288// AsValidateRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateIaasVMRestoreOperationRequest. 18289func (vivror ValidateIaasVMRestoreOperationRequest) AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) { 18290 return nil, false 18291} 18292 18293// AsBasicValidateRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateIaasVMRestoreOperationRequest. 18294func (vivror ValidateIaasVMRestoreOperationRequest) AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool) { 18295 return &vivror, true 18296} 18297 18298// AsValidateOperationRequest is the BasicValidateOperationRequest implementation for ValidateIaasVMRestoreOperationRequest. 18299func (vivror ValidateIaasVMRestoreOperationRequest) AsValidateOperationRequest() (*ValidateOperationRequest, bool) { 18300 return nil, false 18301} 18302 18303// AsBasicValidateOperationRequest is the BasicValidateOperationRequest implementation for ValidateIaasVMRestoreOperationRequest. 18304func (vivror ValidateIaasVMRestoreOperationRequest) AsBasicValidateOperationRequest() (BasicValidateOperationRequest, bool) { 18305 return &vivror, true 18306} 18307 18308// UnmarshalJSON is the custom unmarshaler for ValidateIaasVMRestoreOperationRequest struct. 18309func (vivror *ValidateIaasVMRestoreOperationRequest) UnmarshalJSON(body []byte) error { 18310 var m map[string]*json.RawMessage 18311 err := json.Unmarshal(body, &m) 18312 if err != nil { 18313 return err 18314 } 18315 for k, v := range m { 18316 switch k { 18317 case "restoreRequest": 18318 if v != nil { 18319 restoreRequest, err := unmarshalBasicRestoreRequest(*v) 18320 if err != nil { 18321 return err 18322 } 18323 vivror.RestoreRequest = restoreRequest 18324 } 18325 case "objectType": 18326 if v != nil { 18327 var objectType ObjectTypeBasicValidateOperationRequest 18328 err = json.Unmarshal(*v, &objectType) 18329 if err != nil { 18330 return err 18331 } 18332 vivror.ObjectType = objectType 18333 } 18334 } 18335 } 18336 18337 return nil 18338} 18339 18340// BasicValidateOperationRequest base class for validate operation request. 18341type BasicValidateOperationRequest interface { 18342 AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) 18343 AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) 18344 AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool) 18345 AsValidateOperationRequest() (*ValidateOperationRequest, bool) 18346} 18347 18348// ValidateOperationRequest base class for validate operation request. 18349type ValidateOperationRequest struct { 18350 // ObjectType - Possible values include: 'ObjectTypeValidateOperationRequest', 'ObjectTypeValidateIaasVMRestoreOperationRequest', 'ObjectTypeValidateRestoreOperationRequest' 18351 ObjectType ObjectTypeBasicValidateOperationRequest `json:"objectType,omitempty"` 18352} 18353 18354func unmarshalBasicValidateOperationRequest(body []byte) (BasicValidateOperationRequest, error) { 18355 var m map[string]interface{} 18356 err := json.Unmarshal(body, &m) 18357 if err != nil { 18358 return nil, err 18359 } 18360 18361 switch m["objectType"] { 18362 case string(ObjectTypeValidateIaasVMRestoreOperationRequest): 18363 var vivror ValidateIaasVMRestoreOperationRequest 18364 err := json.Unmarshal(body, &vivror) 18365 return vivror, err 18366 case string(ObjectTypeValidateRestoreOperationRequest): 18367 var vror ValidateRestoreOperationRequest 18368 err := json.Unmarshal(body, &vror) 18369 return vror, err 18370 default: 18371 var vor ValidateOperationRequest 18372 err := json.Unmarshal(body, &vor) 18373 return vor, err 18374 } 18375} 18376func unmarshalBasicValidateOperationRequestArray(body []byte) ([]BasicValidateOperationRequest, error) { 18377 var rawMessages []*json.RawMessage 18378 err := json.Unmarshal(body, &rawMessages) 18379 if err != nil { 18380 return nil, err 18381 } 18382 18383 vorArray := make([]BasicValidateOperationRequest, len(rawMessages)) 18384 18385 for index, rawMessage := range rawMessages { 18386 vor, err := unmarshalBasicValidateOperationRequest(*rawMessage) 18387 if err != nil { 18388 return nil, err 18389 } 18390 vorArray[index] = vor 18391 } 18392 return vorArray, nil 18393} 18394 18395// MarshalJSON is the custom marshaler for ValidateOperationRequest. 18396func (vor ValidateOperationRequest) MarshalJSON() ([]byte, error) { 18397 vor.ObjectType = ObjectTypeValidateOperationRequest 18398 objectMap := make(map[string]interface{}) 18399 if vor.ObjectType != "" { 18400 objectMap["objectType"] = vor.ObjectType 18401 } 18402 return json.Marshal(objectMap) 18403} 18404 18405// AsValidateIaasVMRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateOperationRequest. 18406func (vor ValidateOperationRequest) AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) { 18407 return nil, false 18408} 18409 18410// AsValidateRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateOperationRequest. 18411func (vor ValidateOperationRequest) AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) { 18412 return nil, false 18413} 18414 18415// AsBasicValidateRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateOperationRequest. 18416func (vor ValidateOperationRequest) AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool) { 18417 return nil, false 18418} 18419 18420// AsValidateOperationRequest is the BasicValidateOperationRequest implementation for ValidateOperationRequest. 18421func (vor ValidateOperationRequest) AsValidateOperationRequest() (*ValidateOperationRequest, bool) { 18422 return &vor, true 18423} 18424 18425// AsBasicValidateOperationRequest is the BasicValidateOperationRequest implementation for ValidateOperationRequest. 18426func (vor ValidateOperationRequest) AsBasicValidateOperationRequest() (BasicValidateOperationRequest, bool) { 18427 return &vor, true 18428} 18429 18430// ValidateOperationResponse base class for validate operation response. 18431type ValidateOperationResponse struct { 18432 // ValidationResults - Gets the validation result 18433 ValidationResults *[]ErrorDetail `json:"validationResults,omitempty"` 18434} 18435 18436// ValidateOperationsResponse ... 18437type ValidateOperationsResponse struct { 18438 autorest.Response `json:"-"` 18439 ValidateOperationResponse *ValidateOperationResponse `json:"validateOperationResponse,omitempty"` 18440} 18441 18442// BasicValidateRestoreOperationRequest azureRestoreValidation request. 18443type BasicValidateRestoreOperationRequest interface { 18444 AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) 18445 AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) 18446} 18447 18448// ValidateRestoreOperationRequest azureRestoreValidation request. 18449type ValidateRestoreOperationRequest struct { 18450 // RestoreRequest - Sets restore request to be validated 18451 RestoreRequest BasicRestoreRequest `json:"restoreRequest,omitempty"` 18452 // ObjectType - Possible values include: 'ObjectTypeValidateOperationRequest', 'ObjectTypeValidateIaasVMRestoreOperationRequest', 'ObjectTypeValidateRestoreOperationRequest' 18453 ObjectType ObjectTypeBasicValidateOperationRequest `json:"objectType,omitempty"` 18454} 18455 18456func unmarshalBasicValidateRestoreOperationRequest(body []byte) (BasicValidateRestoreOperationRequest, error) { 18457 var m map[string]interface{} 18458 err := json.Unmarshal(body, &m) 18459 if err != nil { 18460 return nil, err 18461 } 18462 18463 switch m["objectType"] { 18464 case string(ObjectTypeValidateIaasVMRestoreOperationRequest): 18465 var vivror ValidateIaasVMRestoreOperationRequest 18466 err := json.Unmarshal(body, &vivror) 18467 return vivror, err 18468 default: 18469 var vror ValidateRestoreOperationRequest 18470 err := json.Unmarshal(body, &vror) 18471 return vror, err 18472 } 18473} 18474func unmarshalBasicValidateRestoreOperationRequestArray(body []byte) ([]BasicValidateRestoreOperationRequest, error) { 18475 var rawMessages []*json.RawMessage 18476 err := json.Unmarshal(body, &rawMessages) 18477 if err != nil { 18478 return nil, err 18479 } 18480 18481 vrorArray := make([]BasicValidateRestoreOperationRequest, len(rawMessages)) 18482 18483 for index, rawMessage := range rawMessages { 18484 vror, err := unmarshalBasicValidateRestoreOperationRequest(*rawMessage) 18485 if err != nil { 18486 return nil, err 18487 } 18488 vrorArray[index] = vror 18489 } 18490 return vrorArray, nil 18491} 18492 18493// MarshalJSON is the custom marshaler for ValidateRestoreOperationRequest. 18494func (vror ValidateRestoreOperationRequest) MarshalJSON() ([]byte, error) { 18495 vror.ObjectType = ObjectTypeValidateRestoreOperationRequest 18496 objectMap := make(map[string]interface{}) 18497 objectMap["restoreRequest"] = vror.RestoreRequest 18498 if vror.ObjectType != "" { 18499 objectMap["objectType"] = vror.ObjectType 18500 } 18501 return json.Marshal(objectMap) 18502} 18503 18504// AsValidateIaasVMRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateRestoreOperationRequest. 18505func (vror ValidateRestoreOperationRequest) AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) { 18506 return nil, false 18507} 18508 18509// AsValidateRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateRestoreOperationRequest. 18510func (vror ValidateRestoreOperationRequest) AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) { 18511 return &vror, true 18512} 18513 18514// AsBasicValidateRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateRestoreOperationRequest. 18515func (vror ValidateRestoreOperationRequest) AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool) { 18516 return &vror, true 18517} 18518 18519// AsValidateOperationRequest is the BasicValidateOperationRequest implementation for ValidateRestoreOperationRequest. 18520func (vror ValidateRestoreOperationRequest) AsValidateOperationRequest() (*ValidateOperationRequest, bool) { 18521 return nil, false 18522} 18523 18524// AsBasicValidateOperationRequest is the BasicValidateOperationRequest implementation for ValidateRestoreOperationRequest. 18525func (vror ValidateRestoreOperationRequest) AsBasicValidateOperationRequest() (BasicValidateOperationRequest, bool) { 18526 return &vror, true 18527} 18528 18529// UnmarshalJSON is the custom unmarshaler for ValidateRestoreOperationRequest struct. 18530func (vror *ValidateRestoreOperationRequest) UnmarshalJSON(body []byte) error { 18531 var m map[string]*json.RawMessage 18532 err := json.Unmarshal(body, &m) 18533 if err != nil { 18534 return err 18535 } 18536 for k, v := range m { 18537 switch k { 18538 case "restoreRequest": 18539 if v != nil { 18540 restoreRequest, err := unmarshalBasicRestoreRequest(*v) 18541 if err != nil { 18542 return err 18543 } 18544 vror.RestoreRequest = restoreRequest 18545 } 18546 case "objectType": 18547 if v != nil { 18548 var objectType ObjectTypeBasicValidateOperationRequest 18549 err = json.Unmarshal(*v, &objectType) 18550 if err != nil { 18551 return err 18552 } 18553 vror.ObjectType = objectType 18554 } 18555 } 18556 } 18557 18558 return nil 18559} 18560 18561// WeeklyRetentionFormat weekly retention format. 18562type WeeklyRetentionFormat struct { 18563 // DaysOfTheWeek - List of days of the week. 18564 DaysOfTheWeek *[]DayOfWeek `json:"daysOfTheWeek,omitempty"` 18565 // WeeksOfTheMonth - List of weeks of month. 18566 WeeksOfTheMonth *[]WeekOfMonth `json:"weeksOfTheMonth,omitempty"` 18567} 18568 18569// WeeklyRetentionSchedule weekly retention schedule. 18570type WeeklyRetentionSchedule struct { 18571 // DaysOfTheWeek - List of days of week for weekly retention policy. 18572 DaysOfTheWeek *[]DayOfWeek `json:"daysOfTheWeek,omitempty"` 18573 // RetentionTimes - Retention times of retention policy. 18574 RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"` 18575 // RetentionDuration - Retention duration of retention Policy. 18576 RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` 18577} 18578 18579// WorkloadInquiryDetails details of an inquired protectable item. 18580type WorkloadInquiryDetails struct { 18581 // Type - Type of the Workload such as SQL, Oracle etc. 18582 Type *string `json:"type,omitempty"` 18583 // ItemCount - Contains the protectable item Count inside this Container. 18584 ItemCount *int64 `json:"itemCount,omitempty"` 18585 // InquiryValidation - Inquiry validation such as permissions and other backup validations. 18586 InquiryValidation *InquiryValidation `json:"inquiryValidation,omitempty"` 18587} 18588 18589// BasicWorkloadItem base class for backup item. Workload-specific backup items are derived from this class. 18590type BasicWorkloadItem interface { 18591 AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) 18592 AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) 18593 AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) 18594 AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) 18595 AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) 18596 AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) 18597 AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) 18598 AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) 18599 AsWorkloadItem() (*WorkloadItem, bool) 18600} 18601 18602// WorkloadItem base class for backup item. Workload-specific backup items are derived from this class. 18603type WorkloadItem struct { 18604 // BackupManagementType - Type of backup management to backup an item. 18605 BackupManagementType *string `json:"backupManagementType,omitempty"` 18606 // WorkloadType - Type of workload for the backup management 18607 WorkloadType *string `json:"workloadType,omitempty"` 18608 // FriendlyName - Friendly name of the backup item. 18609 FriendlyName *string `json:"friendlyName,omitempty"` 18610 // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 18611 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 18612 // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' 18613 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` 18614} 18615 18616func unmarshalBasicWorkloadItem(body []byte) (BasicWorkloadItem, error) { 18617 var m map[string]interface{} 18618 err := json.Unmarshal(body, &m) 18619 if err != nil { 18620 return nil, err 18621 } 18622 18623 switch m["workloadItemType"] { 18624 case string(WorkloadItemTypeAzureVMWorkloadItem): 18625 var avwi AzureVMWorkloadItem 18626 err := json.Unmarshal(body, &avwi) 18627 return avwi, err 18628 case string(WorkloadItemTypeSAPAseDatabase1): 18629 var avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem 18630 err := json.Unmarshal(body, &avwsadwi) 18631 return avwsadwi, err 18632 case string(WorkloadItemTypeSAPAseSystem1): 18633 var avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem 18634 err := json.Unmarshal(body, &avwsaswi) 18635 return avwsaswi, err 18636 case string(WorkloadItemTypeSAPHanaDatabase1): 18637 var avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem 18638 err := json.Unmarshal(body, &avwshdwi) 18639 return avwshdwi, err 18640 case string(WorkloadItemTypeSAPHanaSystem1): 18641 var avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem 18642 err := json.Unmarshal(body, &avwshswi) 18643 return avwshswi, err 18644 case string(WorkloadItemTypeSQLDataBase1): 18645 var avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem 18646 err := json.Unmarshal(body, &avwsdwi) 18647 return avwsdwi, err 18648 case string(WorkloadItemTypeSQLInstance1): 18649 var avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem 18650 err := json.Unmarshal(body, &avwsiwi) 18651 return avwsiwi, err 18652 default: 18653 var wi WorkloadItem 18654 err := json.Unmarshal(body, &wi) 18655 return wi, err 18656 } 18657} 18658func unmarshalBasicWorkloadItemArray(body []byte) ([]BasicWorkloadItem, error) { 18659 var rawMessages []*json.RawMessage 18660 err := json.Unmarshal(body, &rawMessages) 18661 if err != nil { 18662 return nil, err 18663 } 18664 18665 wiArray := make([]BasicWorkloadItem, len(rawMessages)) 18666 18667 for index, rawMessage := range rawMessages { 18668 wi, err := unmarshalBasicWorkloadItem(*rawMessage) 18669 if err != nil { 18670 return nil, err 18671 } 18672 wiArray[index] = wi 18673 } 18674 return wiArray, nil 18675} 18676 18677// MarshalJSON is the custom marshaler for WorkloadItem. 18678func (wi WorkloadItem) MarshalJSON() ([]byte, error) { 18679 wi.WorkloadItemType = WorkloadItemTypeWorkloadItem 18680 objectMap := make(map[string]interface{}) 18681 if wi.BackupManagementType != nil { 18682 objectMap["backupManagementType"] = wi.BackupManagementType 18683 } 18684 if wi.WorkloadType != nil { 18685 objectMap["workloadType"] = wi.WorkloadType 18686 } 18687 if wi.FriendlyName != nil { 18688 objectMap["friendlyName"] = wi.FriendlyName 18689 } 18690 if wi.ProtectionState != "" { 18691 objectMap["protectionState"] = wi.ProtectionState 18692 } 18693 if wi.WorkloadItemType != "" { 18694 objectMap["workloadItemType"] = wi.WorkloadItemType 18695 } 18696 return json.Marshal(objectMap) 18697} 18698 18699// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. 18700func (wi WorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { 18701 return nil, false 18702} 18703 18704// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. 18705func (wi WorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { 18706 return nil, false 18707} 18708 18709// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. 18710func (wi WorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { 18711 return nil, false 18712} 18713 18714// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. 18715func (wi WorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { 18716 return nil, false 18717} 18718 18719// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. 18720func (wi WorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { 18721 return nil, false 18722} 18723 18724// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. 18725func (wi WorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { 18726 return nil, false 18727} 18728 18729// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. 18730func (wi WorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { 18731 return nil, false 18732} 18733 18734// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. 18735func (wi WorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { 18736 return nil, false 18737} 18738 18739// AsWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. 18740func (wi WorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { 18741 return &wi, true 18742} 18743 18744// AsBasicWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. 18745func (wi WorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { 18746 return &wi, true 18747} 18748 18749// WorkloadItemResource base class for backup item. Workload-specific backup items are derived from this 18750// class. 18751type WorkloadItemResource struct { 18752 // Properties - WorkloadItemResource properties 18753 Properties BasicWorkloadItem `json:"properties,omitempty"` 18754 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 18755 ID *string `json:"id,omitempty"` 18756 // Name - READ-ONLY; Resource name associated with the resource. 18757 Name *string `json:"name,omitempty"` 18758 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 18759 Type *string `json:"type,omitempty"` 18760 // Location - Resource location. 18761 Location *string `json:"location,omitempty"` 18762 // Tags - Resource tags. 18763 Tags map[string]*string `json:"tags"` 18764 // ETag - Optional ETag. 18765 ETag *string `json:"eTag,omitempty"` 18766} 18767 18768// MarshalJSON is the custom marshaler for WorkloadItemResource. 18769func (wir WorkloadItemResource) MarshalJSON() ([]byte, error) { 18770 objectMap := make(map[string]interface{}) 18771 objectMap["properties"] = wir.Properties 18772 if wir.Location != nil { 18773 objectMap["location"] = wir.Location 18774 } 18775 if wir.Tags != nil { 18776 objectMap["tags"] = wir.Tags 18777 } 18778 if wir.ETag != nil { 18779 objectMap["eTag"] = wir.ETag 18780 } 18781 return json.Marshal(objectMap) 18782} 18783 18784// UnmarshalJSON is the custom unmarshaler for WorkloadItemResource struct. 18785func (wir *WorkloadItemResource) UnmarshalJSON(body []byte) error { 18786 var m map[string]*json.RawMessage 18787 err := json.Unmarshal(body, &m) 18788 if err != nil { 18789 return err 18790 } 18791 for k, v := range m { 18792 switch k { 18793 case "properties": 18794 if v != nil { 18795 properties, err := unmarshalBasicWorkloadItem(*v) 18796 if err != nil { 18797 return err 18798 } 18799 wir.Properties = properties 18800 } 18801 case "id": 18802 if v != nil { 18803 var ID string 18804 err = json.Unmarshal(*v, &ID) 18805 if err != nil { 18806 return err 18807 } 18808 wir.ID = &ID 18809 } 18810 case "name": 18811 if v != nil { 18812 var name string 18813 err = json.Unmarshal(*v, &name) 18814 if err != nil { 18815 return err 18816 } 18817 wir.Name = &name 18818 } 18819 case "type": 18820 if v != nil { 18821 var typeVar string 18822 err = json.Unmarshal(*v, &typeVar) 18823 if err != nil { 18824 return err 18825 } 18826 wir.Type = &typeVar 18827 } 18828 case "location": 18829 if v != nil { 18830 var location string 18831 err = json.Unmarshal(*v, &location) 18832 if err != nil { 18833 return err 18834 } 18835 wir.Location = &location 18836 } 18837 case "tags": 18838 if v != nil { 18839 var tags map[string]*string 18840 err = json.Unmarshal(*v, &tags) 18841 if err != nil { 18842 return err 18843 } 18844 wir.Tags = tags 18845 } 18846 case "eTag": 18847 if v != nil { 18848 var eTag string 18849 err = json.Unmarshal(*v, &eTag) 18850 if err != nil { 18851 return err 18852 } 18853 wir.ETag = &eTag 18854 } 18855 } 18856 } 18857 18858 return nil 18859} 18860 18861// WorkloadItemResourceList list of WorkloadItem resources 18862type WorkloadItemResourceList struct { 18863 autorest.Response `json:"-"` 18864 // Value - List of resources. 18865 Value *[]WorkloadItemResource `json:"value,omitempty"` 18866 // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. 18867 NextLink *string `json:"nextLink,omitempty"` 18868} 18869 18870// WorkloadItemResourceListIterator provides access to a complete listing of WorkloadItemResource values. 18871type WorkloadItemResourceListIterator struct { 18872 i int 18873 page WorkloadItemResourceListPage 18874} 18875 18876// NextWithContext advances to the next value. If there was an error making 18877// the request the iterator does not advance and the error is returned. 18878func (iter *WorkloadItemResourceListIterator) NextWithContext(ctx context.Context) (err error) { 18879 if tracing.IsEnabled() { 18880 ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadItemResourceListIterator.NextWithContext") 18881 defer func() { 18882 sc := -1 18883 if iter.Response().Response.Response != nil { 18884 sc = iter.Response().Response.Response.StatusCode 18885 } 18886 tracing.EndSpan(ctx, sc, err) 18887 }() 18888 } 18889 iter.i++ 18890 if iter.i < len(iter.page.Values()) { 18891 return nil 18892 } 18893 err = iter.page.NextWithContext(ctx) 18894 if err != nil { 18895 iter.i-- 18896 return err 18897 } 18898 iter.i = 0 18899 return nil 18900} 18901 18902// Next advances to the next value. If there was an error making 18903// the request the iterator does not advance and the error is returned. 18904// Deprecated: Use NextWithContext() instead. 18905func (iter *WorkloadItemResourceListIterator) Next() error { 18906 return iter.NextWithContext(context.Background()) 18907} 18908 18909// NotDone returns true if the enumeration should be started or is not yet complete. 18910func (iter WorkloadItemResourceListIterator) NotDone() bool { 18911 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 18912} 18913 18914// Response returns the raw server response from the last page request. 18915func (iter WorkloadItemResourceListIterator) Response() WorkloadItemResourceList { 18916 return iter.page.Response() 18917} 18918 18919// Value returns the current value or a zero-initialized value if the 18920// iterator has advanced beyond the end of the collection. 18921func (iter WorkloadItemResourceListIterator) Value() WorkloadItemResource { 18922 if !iter.page.NotDone() { 18923 return WorkloadItemResource{} 18924 } 18925 return iter.page.Values()[iter.i] 18926} 18927 18928// Creates a new instance of the WorkloadItemResourceListIterator type. 18929func NewWorkloadItemResourceListIterator(page WorkloadItemResourceListPage) WorkloadItemResourceListIterator { 18930 return WorkloadItemResourceListIterator{page: page} 18931} 18932 18933// IsEmpty returns true if the ListResult contains no values. 18934func (wirl WorkloadItemResourceList) IsEmpty() bool { 18935 return wirl.Value == nil || len(*wirl.Value) == 0 18936} 18937 18938// hasNextLink returns true if the NextLink is not empty. 18939func (wirl WorkloadItemResourceList) hasNextLink() bool { 18940 return wirl.NextLink != nil && len(*wirl.NextLink) != 0 18941} 18942 18943// workloadItemResourceListPreparer prepares a request to retrieve the next set of results. 18944// It returns nil if no more results exist. 18945func (wirl WorkloadItemResourceList) workloadItemResourceListPreparer(ctx context.Context) (*http.Request, error) { 18946 if !wirl.hasNextLink() { 18947 return nil, nil 18948 } 18949 return autorest.Prepare((&http.Request{}).WithContext(ctx), 18950 autorest.AsJSON(), 18951 autorest.AsGet(), 18952 autorest.WithBaseURL(to.String(wirl.NextLink))) 18953} 18954 18955// WorkloadItemResourceListPage contains a page of WorkloadItemResource values. 18956type WorkloadItemResourceListPage struct { 18957 fn func(context.Context, WorkloadItemResourceList) (WorkloadItemResourceList, error) 18958 wirl WorkloadItemResourceList 18959} 18960 18961// NextWithContext advances to the next page of values. If there was an error making 18962// the request the page does not advance and the error is returned. 18963func (page *WorkloadItemResourceListPage) NextWithContext(ctx context.Context) (err error) { 18964 if tracing.IsEnabled() { 18965 ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadItemResourceListPage.NextWithContext") 18966 defer func() { 18967 sc := -1 18968 if page.Response().Response.Response != nil { 18969 sc = page.Response().Response.Response.StatusCode 18970 } 18971 tracing.EndSpan(ctx, sc, err) 18972 }() 18973 } 18974 for { 18975 next, err := page.fn(ctx, page.wirl) 18976 if err != nil { 18977 return err 18978 } 18979 page.wirl = next 18980 if !next.hasNextLink() || !next.IsEmpty() { 18981 break 18982 } 18983 } 18984 return nil 18985} 18986 18987// Next advances to the next page of values. If there was an error making 18988// the request the page does not advance and the error is returned. 18989// Deprecated: Use NextWithContext() instead. 18990func (page *WorkloadItemResourceListPage) Next() error { 18991 return page.NextWithContext(context.Background()) 18992} 18993 18994// NotDone returns true if the page enumeration should be started or is not yet complete. 18995func (page WorkloadItemResourceListPage) NotDone() bool { 18996 return !page.wirl.IsEmpty() 18997} 18998 18999// Response returns the raw server response from the last page request. 19000func (page WorkloadItemResourceListPage) Response() WorkloadItemResourceList { 19001 return page.wirl 19002} 19003 19004// Values returns the slice of values for the current page or nil if there are no values. 19005func (page WorkloadItemResourceListPage) Values() []WorkloadItemResource { 19006 if page.wirl.IsEmpty() { 19007 return nil 19008 } 19009 return *page.wirl.Value 19010} 19011 19012// Creates a new instance of the WorkloadItemResourceListPage type. 19013func NewWorkloadItemResourceListPage(cur WorkloadItemResourceList, getNextPage func(context.Context, WorkloadItemResourceList) (WorkloadItemResourceList, error)) WorkloadItemResourceListPage { 19014 return WorkloadItemResourceListPage{ 19015 fn: getNextPage, 19016 wirl: cur, 19017 } 19018} 19019 19020// BasicWorkloadProtectableItem base class for backup item. Workload-specific backup items are derived from this class. 19021type BasicWorkloadProtectableItem interface { 19022 AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) 19023 AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) 19024 AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) 19025 AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) 19026 AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) 19027 AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) 19028 AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) 19029 AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) 19030 AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) 19031 AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) 19032 AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) 19033 AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) 19034 AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) 19035 AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) 19036} 19037 19038// WorkloadProtectableItem base class for backup item. Workload-specific backup items are derived from this 19039// class. 19040type WorkloadProtectableItem struct { 19041 // BackupManagementType - Type of backup management to backup an item. 19042 BackupManagementType *string `json:"backupManagementType,omitempty"` 19043 // WorkloadType - Type of workload for the backup management 19044 WorkloadType *string `json:"workloadType,omitempty"` 19045 // FriendlyName - Friendly name of the backup item. 19046 FriendlyName *string `json:"friendlyName,omitempty"` 19047 // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 19048 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 19049 // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' 19050 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` 19051} 19052 19053func unmarshalBasicWorkloadProtectableItem(body []byte) (BasicWorkloadProtectableItem, error) { 19054 var m map[string]interface{} 19055 err := json.Unmarshal(body, &m) 19056 if err != nil { 19057 return nil, err 19058 } 19059 19060 switch m["protectableItemType"] { 19061 case string(ProtectableItemTypeAzureFileShare): 19062 var afspi AzureFileShareProtectableItem 19063 err := json.Unmarshal(body, &afspi) 19064 return afspi, err 19065 case string(ProtectableItemTypeMicrosoftClassicComputevirtualMachines): 19066 var aisccvpi AzureIaaSClassicComputeVMProtectableItem 19067 err := json.Unmarshal(body, &aisccvpi) 19068 return aisccvpi, err 19069 case string(ProtectableItemTypeMicrosoftComputevirtualMachines): 19070 var aiscvpi AzureIaaSComputeVMProtectableItem 19071 err := json.Unmarshal(body, &aiscvpi) 19072 return aiscvpi, err 19073 case string(ProtectableItemTypeAzureVMWorkloadProtectableItem): 19074 var avwpi AzureVMWorkloadProtectableItem 19075 err := json.Unmarshal(body, &avwpi) 19076 return avwpi, err 19077 case string(ProtectableItemTypeSAPAseSystem): 19078 var avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem 19079 err := json.Unmarshal(body, &avwsaspi) 19080 return avwsaspi, err 19081 case string(ProtectableItemTypeSAPHanaDatabase): 19082 var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem 19083 err := json.Unmarshal(body, &avwshdpi) 19084 return avwshdpi, err 19085 case string(ProtectableItemTypeSAPHanaSystem): 19086 var avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem 19087 err := json.Unmarshal(body, &avwshspi) 19088 return avwshspi, err 19089 case string(ProtectableItemTypeSQLAvailabilityGroupContainer): 19090 var avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem 19091 err := json.Unmarshal(body, &avwsagpi) 19092 return avwsagpi, err 19093 case string(ProtectableItemTypeSQLDataBase): 19094 var avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem 19095 err := json.Unmarshal(body, &avwsdpi) 19096 return avwsdpi, err 19097 case string(ProtectableItemTypeSQLInstance): 19098 var avwsipi AzureVMWorkloadSQLInstanceProtectableItem 19099 err := json.Unmarshal(body, &avwsipi) 19100 return avwsipi, err 19101 case string(ProtectableItemTypeIaaSVMProtectableItem): 19102 var ispi IaaSVMProtectableItem 19103 err := json.Unmarshal(body, &ispi) 19104 return ispi, err 19105 default: 19106 var wpi WorkloadProtectableItem 19107 err := json.Unmarshal(body, &wpi) 19108 return wpi, err 19109 } 19110} 19111func unmarshalBasicWorkloadProtectableItemArray(body []byte) ([]BasicWorkloadProtectableItem, error) { 19112 var rawMessages []*json.RawMessage 19113 err := json.Unmarshal(body, &rawMessages) 19114 if err != nil { 19115 return nil, err 19116 } 19117 19118 wpiArray := make([]BasicWorkloadProtectableItem, len(rawMessages)) 19119 19120 for index, rawMessage := range rawMessages { 19121 wpi, err := unmarshalBasicWorkloadProtectableItem(*rawMessage) 19122 if err != nil { 19123 return nil, err 19124 } 19125 wpiArray[index] = wpi 19126 } 19127 return wpiArray, nil 19128} 19129 19130// MarshalJSON is the custom marshaler for WorkloadProtectableItem. 19131func (wpi WorkloadProtectableItem) MarshalJSON() ([]byte, error) { 19132 wpi.ProtectableItemType = ProtectableItemTypeWorkloadProtectableItem 19133 objectMap := make(map[string]interface{}) 19134 if wpi.BackupManagementType != nil { 19135 objectMap["backupManagementType"] = wpi.BackupManagementType 19136 } 19137 if wpi.WorkloadType != nil { 19138 objectMap["workloadType"] = wpi.WorkloadType 19139 } 19140 if wpi.FriendlyName != nil { 19141 objectMap["friendlyName"] = wpi.FriendlyName 19142 } 19143 if wpi.ProtectionState != "" { 19144 objectMap["protectionState"] = wpi.ProtectionState 19145 } 19146 if wpi.ProtectableItemType != "" { 19147 objectMap["protectableItemType"] = wpi.ProtectableItemType 19148 } 19149 return json.Marshal(objectMap) 19150} 19151 19152// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. 19153func (wpi WorkloadProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { 19154 return nil, false 19155} 19156 19157// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. 19158func (wpi WorkloadProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { 19159 return nil, false 19160} 19161 19162// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. 19163func (wpi WorkloadProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { 19164 return nil, false 19165} 19166 19167// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. 19168func (wpi WorkloadProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { 19169 return nil, false 19170} 19171 19172// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. 19173func (wpi WorkloadProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { 19174 return nil, false 19175} 19176 19177// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. 19178func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { 19179 return nil, false 19180} 19181 19182// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. 19183func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { 19184 return nil, false 19185} 19186 19187// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. 19188func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { 19189 return nil, false 19190} 19191 19192// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. 19193func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { 19194 return nil, false 19195} 19196 19197// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. 19198func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { 19199 return nil, false 19200} 19201 19202// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. 19203func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { 19204 return nil, false 19205} 19206 19207// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. 19208func (wpi WorkloadProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { 19209 return nil, false 19210} 19211 19212// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. 19213func (wpi WorkloadProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { 19214 return nil, false 19215} 19216 19217// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. 19218func (wpi WorkloadProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { 19219 return &wpi, true 19220} 19221 19222// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. 19223func (wpi WorkloadProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { 19224 return &wpi, true 19225} 19226 19227// WorkloadProtectableItemResource base class for backup item. Workload-specific backup items are derived 19228// from this class. 19229type WorkloadProtectableItemResource struct { 19230 // Properties - WorkloadProtectableItemResource properties 19231 Properties BasicWorkloadProtectableItem `json:"properties,omitempty"` 19232 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 19233 ID *string `json:"id,omitempty"` 19234 // Name - READ-ONLY; Resource name associated with the resource. 19235 Name *string `json:"name,omitempty"` 19236 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 19237 Type *string `json:"type,omitempty"` 19238 // Location - Resource location. 19239 Location *string `json:"location,omitempty"` 19240 // Tags - Resource tags. 19241 Tags map[string]*string `json:"tags"` 19242 // ETag - Optional ETag. 19243 ETag *string `json:"eTag,omitempty"` 19244} 19245 19246// MarshalJSON is the custom marshaler for WorkloadProtectableItemResource. 19247func (wpir WorkloadProtectableItemResource) MarshalJSON() ([]byte, error) { 19248 objectMap := make(map[string]interface{}) 19249 objectMap["properties"] = wpir.Properties 19250 if wpir.Location != nil { 19251 objectMap["location"] = wpir.Location 19252 } 19253 if wpir.Tags != nil { 19254 objectMap["tags"] = wpir.Tags 19255 } 19256 if wpir.ETag != nil { 19257 objectMap["eTag"] = wpir.ETag 19258 } 19259 return json.Marshal(objectMap) 19260} 19261 19262// UnmarshalJSON is the custom unmarshaler for WorkloadProtectableItemResource struct. 19263func (wpir *WorkloadProtectableItemResource) UnmarshalJSON(body []byte) error { 19264 var m map[string]*json.RawMessage 19265 err := json.Unmarshal(body, &m) 19266 if err != nil { 19267 return err 19268 } 19269 for k, v := range m { 19270 switch k { 19271 case "properties": 19272 if v != nil { 19273 properties, err := unmarshalBasicWorkloadProtectableItem(*v) 19274 if err != nil { 19275 return err 19276 } 19277 wpir.Properties = properties 19278 } 19279 case "id": 19280 if v != nil { 19281 var ID string 19282 err = json.Unmarshal(*v, &ID) 19283 if err != nil { 19284 return err 19285 } 19286 wpir.ID = &ID 19287 } 19288 case "name": 19289 if v != nil { 19290 var name string 19291 err = json.Unmarshal(*v, &name) 19292 if err != nil { 19293 return err 19294 } 19295 wpir.Name = &name 19296 } 19297 case "type": 19298 if v != nil { 19299 var typeVar string 19300 err = json.Unmarshal(*v, &typeVar) 19301 if err != nil { 19302 return err 19303 } 19304 wpir.Type = &typeVar 19305 } 19306 case "location": 19307 if v != nil { 19308 var location string 19309 err = json.Unmarshal(*v, &location) 19310 if err != nil { 19311 return err 19312 } 19313 wpir.Location = &location 19314 } 19315 case "tags": 19316 if v != nil { 19317 var tags map[string]*string 19318 err = json.Unmarshal(*v, &tags) 19319 if err != nil { 19320 return err 19321 } 19322 wpir.Tags = tags 19323 } 19324 case "eTag": 19325 if v != nil { 19326 var eTag string 19327 err = json.Unmarshal(*v, &eTag) 19328 if err != nil { 19329 return err 19330 } 19331 wpir.ETag = &eTag 19332 } 19333 } 19334 } 19335 19336 return nil 19337} 19338 19339// WorkloadProtectableItemResourceList list of WorkloadProtectableItem resources 19340type WorkloadProtectableItemResourceList struct { 19341 autorest.Response `json:"-"` 19342 // Value - List of resources. 19343 Value *[]WorkloadProtectableItemResource `json:"value,omitempty"` 19344 // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. 19345 NextLink *string `json:"nextLink,omitempty"` 19346} 19347 19348// WorkloadProtectableItemResourceListIterator provides access to a complete listing of 19349// WorkloadProtectableItemResource values. 19350type WorkloadProtectableItemResourceListIterator struct { 19351 i int 19352 page WorkloadProtectableItemResourceListPage 19353} 19354 19355// NextWithContext advances to the next value. If there was an error making 19356// the request the iterator does not advance and the error is returned. 19357func (iter *WorkloadProtectableItemResourceListIterator) NextWithContext(ctx context.Context) (err error) { 19358 if tracing.IsEnabled() { 19359 ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadProtectableItemResourceListIterator.NextWithContext") 19360 defer func() { 19361 sc := -1 19362 if iter.Response().Response.Response != nil { 19363 sc = iter.Response().Response.Response.StatusCode 19364 } 19365 tracing.EndSpan(ctx, sc, err) 19366 }() 19367 } 19368 iter.i++ 19369 if iter.i < len(iter.page.Values()) { 19370 return nil 19371 } 19372 err = iter.page.NextWithContext(ctx) 19373 if err != nil { 19374 iter.i-- 19375 return err 19376 } 19377 iter.i = 0 19378 return nil 19379} 19380 19381// Next advances to the next value. If there was an error making 19382// the request the iterator does not advance and the error is returned. 19383// Deprecated: Use NextWithContext() instead. 19384func (iter *WorkloadProtectableItemResourceListIterator) Next() error { 19385 return iter.NextWithContext(context.Background()) 19386} 19387 19388// NotDone returns true if the enumeration should be started or is not yet complete. 19389func (iter WorkloadProtectableItemResourceListIterator) NotDone() bool { 19390 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 19391} 19392 19393// Response returns the raw server response from the last page request. 19394func (iter WorkloadProtectableItemResourceListIterator) Response() WorkloadProtectableItemResourceList { 19395 return iter.page.Response() 19396} 19397 19398// Value returns the current value or a zero-initialized value if the 19399// iterator has advanced beyond the end of the collection. 19400func (iter WorkloadProtectableItemResourceListIterator) Value() WorkloadProtectableItemResource { 19401 if !iter.page.NotDone() { 19402 return WorkloadProtectableItemResource{} 19403 } 19404 return iter.page.Values()[iter.i] 19405} 19406 19407// Creates a new instance of the WorkloadProtectableItemResourceListIterator type. 19408func NewWorkloadProtectableItemResourceListIterator(page WorkloadProtectableItemResourceListPage) WorkloadProtectableItemResourceListIterator { 19409 return WorkloadProtectableItemResourceListIterator{page: page} 19410} 19411 19412// IsEmpty returns true if the ListResult contains no values. 19413func (wpirl WorkloadProtectableItemResourceList) IsEmpty() bool { 19414 return wpirl.Value == nil || len(*wpirl.Value) == 0 19415} 19416 19417// hasNextLink returns true if the NextLink is not empty. 19418func (wpirl WorkloadProtectableItemResourceList) hasNextLink() bool { 19419 return wpirl.NextLink != nil && len(*wpirl.NextLink) != 0 19420} 19421 19422// workloadProtectableItemResourceListPreparer prepares a request to retrieve the next set of results. 19423// It returns nil if no more results exist. 19424func (wpirl WorkloadProtectableItemResourceList) workloadProtectableItemResourceListPreparer(ctx context.Context) (*http.Request, error) { 19425 if !wpirl.hasNextLink() { 19426 return nil, nil 19427 } 19428 return autorest.Prepare((&http.Request{}).WithContext(ctx), 19429 autorest.AsJSON(), 19430 autorest.AsGet(), 19431 autorest.WithBaseURL(to.String(wpirl.NextLink))) 19432} 19433 19434// WorkloadProtectableItemResourceListPage contains a page of WorkloadProtectableItemResource values. 19435type WorkloadProtectableItemResourceListPage struct { 19436 fn func(context.Context, WorkloadProtectableItemResourceList) (WorkloadProtectableItemResourceList, error) 19437 wpirl WorkloadProtectableItemResourceList 19438} 19439 19440// NextWithContext advances to the next page of values. If there was an error making 19441// the request the page does not advance and the error is returned. 19442func (page *WorkloadProtectableItemResourceListPage) NextWithContext(ctx context.Context) (err error) { 19443 if tracing.IsEnabled() { 19444 ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadProtectableItemResourceListPage.NextWithContext") 19445 defer func() { 19446 sc := -1 19447 if page.Response().Response.Response != nil { 19448 sc = page.Response().Response.Response.StatusCode 19449 } 19450 tracing.EndSpan(ctx, sc, err) 19451 }() 19452 } 19453 for { 19454 next, err := page.fn(ctx, page.wpirl) 19455 if err != nil { 19456 return err 19457 } 19458 page.wpirl = next 19459 if !next.hasNextLink() || !next.IsEmpty() { 19460 break 19461 } 19462 } 19463 return nil 19464} 19465 19466// Next advances to the next page of values. If there was an error making 19467// the request the page does not advance and the error is returned. 19468// Deprecated: Use NextWithContext() instead. 19469func (page *WorkloadProtectableItemResourceListPage) Next() error { 19470 return page.NextWithContext(context.Background()) 19471} 19472 19473// NotDone returns true if the page enumeration should be started or is not yet complete. 19474func (page WorkloadProtectableItemResourceListPage) NotDone() bool { 19475 return !page.wpirl.IsEmpty() 19476} 19477 19478// Response returns the raw server response from the last page request. 19479func (page WorkloadProtectableItemResourceListPage) Response() WorkloadProtectableItemResourceList { 19480 return page.wpirl 19481} 19482 19483// Values returns the slice of values for the current page or nil if there are no values. 19484func (page WorkloadProtectableItemResourceListPage) Values() []WorkloadProtectableItemResource { 19485 if page.wpirl.IsEmpty() { 19486 return nil 19487 } 19488 return *page.wpirl.Value 19489} 19490 19491// Creates a new instance of the WorkloadProtectableItemResourceListPage type. 19492func NewWorkloadProtectableItemResourceListPage(cur WorkloadProtectableItemResourceList, getNextPage func(context.Context, WorkloadProtectableItemResourceList) (WorkloadProtectableItemResourceList, error)) WorkloadProtectableItemResourceListPage { 19493 return WorkloadProtectableItemResourceListPage{ 19494 fn: getNextPage, 19495 wpirl: cur, 19496 } 19497} 19498 19499// YearlyRetentionSchedule yearly retention schedule. 19500type YearlyRetentionSchedule struct { 19501 // RetentionScheduleFormatType - Retention schedule format for yearly retention policy. Possible values include: 'RetentionScheduleFormatInvalid', 'RetentionScheduleFormatDaily', 'RetentionScheduleFormatWeekly' 19502 RetentionScheduleFormatType RetentionScheduleFormat `json:"retentionScheduleFormatType,omitempty"` 19503 // MonthsOfYear - List of months of year of yearly retention policy. 19504 MonthsOfYear *[]MonthOfYear `json:"monthsOfYear,omitempty"` 19505 // RetentionScheduleDaily - Daily retention format for yearly retention policy. 19506 RetentionScheduleDaily *DailyRetentionFormat `json:"retentionScheduleDaily,omitempty"` 19507 // RetentionScheduleWeekly - Weekly retention format for yearly retention policy. 19508 RetentionScheduleWeekly *WeeklyRetentionFormat `json:"retentionScheduleWeekly,omitempty"` 19509 // RetentionTimes - Retention times of retention policy. 19510 RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"` 19511 // RetentionDuration - Retention duration of retention Policy. 19512 RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` 19513} 19514