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-06-15/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 // LastBackupStatus - Last backup operation status. Possible values: Healthy, Unhealthy. 496 LastBackupStatus *string `json:"lastBackupStatus,omitempty"` 497 // LastBackupTime - Timestamp of the last backup operation on this backup item. 498 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` 499 // KpisHealths - Health details of different KPIs 500 KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"` 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.LastBackupStatus != nil { 547 objectMap["lastBackupStatus"] = afpi.LastBackupStatus 548 } 549 if afpi.LastBackupTime != nil { 550 objectMap["lastBackupTime"] = afpi.LastBackupTime 551 } 552 if afpi.KpisHealths != nil { 553 objectMap["kpisHealths"] = afpi.KpisHealths 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 // KpisHealths - Health details of different KPIs 1378 KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"` 1379 // LastBackupStatus - Last backup operation status. 1380 LastBackupStatus *string `json:"lastBackupStatus,omitempty"` 1381 // LastBackupTime - Timestamp of the last backup operation on this backup item. 1382 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` 1383 // ProtectedItemDataID - Data ID of the protected item. 1384 ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"` 1385 // ExtendedInfo - Additional information for this backup item. 1386 ExtendedInfo *AzureIaaSVMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` 1387 ExtendedProperties *ExtendedProperties `json:"extendedProperties,omitempty"` 1388 // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 1389 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 1390 // 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' 1391 WorkloadType DataSourceType `json:"workloadType,omitempty"` 1392 // ContainerName - Unique name of container 1393 ContainerName *string `json:"containerName,omitempty"` 1394 // SourceResourceID - ARM ID of the resource to be backed up. 1395 SourceResourceID *string `json:"sourceResourceId,omitempty"` 1396 // PolicyID - ID of the backup policy with which this item is backed up. 1397 PolicyID *string `json:"policyId,omitempty"` 1398 // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. 1399 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` 1400 // BackupSetName - Name of the backup set the backup item belongs to 1401 BackupSetName *string `json:"backupSetName,omitempty"` 1402 // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' 1403 CreateMode CreateMode `json:"createMode,omitempty"` 1404 // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC 1405 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` 1406 // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete 1407 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` 1408 // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted 1409 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` 1410 // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon 1411 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` 1412 // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state 1413 IsRehydrate *bool `json:"isRehydrate,omitempty"` 1414 // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' 1415 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` 1416} 1417 1418// MarshalJSON is the custom marshaler for AzureIaaSClassicComputeVMProtectedItem. 1419func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) MarshalJSON() ([]byte, error) { 1420 aisccvpi.ProtectedItemType = ProtectedItemTypeMicrosoftClassicComputevirtualMachines 1421 objectMap := make(map[string]interface{}) 1422 if aisccvpi.FriendlyName != nil { 1423 objectMap["friendlyName"] = aisccvpi.FriendlyName 1424 } 1425 if aisccvpi.VirtualMachineID != nil { 1426 objectMap["virtualMachineId"] = aisccvpi.VirtualMachineID 1427 } 1428 if aisccvpi.ProtectionStatus != nil { 1429 objectMap["protectionStatus"] = aisccvpi.ProtectionStatus 1430 } 1431 if aisccvpi.ProtectionState != "" { 1432 objectMap["protectionState"] = aisccvpi.ProtectionState 1433 } 1434 if aisccvpi.HealthStatus != "" { 1435 objectMap["healthStatus"] = aisccvpi.HealthStatus 1436 } 1437 if aisccvpi.HealthDetails != nil { 1438 objectMap["healthDetails"] = aisccvpi.HealthDetails 1439 } 1440 if aisccvpi.KpisHealths != nil { 1441 objectMap["kpisHealths"] = aisccvpi.KpisHealths 1442 } 1443 if aisccvpi.LastBackupStatus != nil { 1444 objectMap["lastBackupStatus"] = aisccvpi.LastBackupStatus 1445 } 1446 if aisccvpi.LastBackupTime != nil { 1447 objectMap["lastBackupTime"] = aisccvpi.LastBackupTime 1448 } 1449 if aisccvpi.ProtectedItemDataID != nil { 1450 objectMap["protectedItemDataId"] = aisccvpi.ProtectedItemDataID 1451 } 1452 if aisccvpi.ExtendedInfo != nil { 1453 objectMap["extendedInfo"] = aisccvpi.ExtendedInfo 1454 } 1455 if aisccvpi.ExtendedProperties != nil { 1456 objectMap["extendedProperties"] = aisccvpi.ExtendedProperties 1457 } 1458 if aisccvpi.BackupManagementType != "" { 1459 objectMap["backupManagementType"] = aisccvpi.BackupManagementType 1460 } 1461 if aisccvpi.WorkloadType != "" { 1462 objectMap["workloadType"] = aisccvpi.WorkloadType 1463 } 1464 if aisccvpi.ContainerName != nil { 1465 objectMap["containerName"] = aisccvpi.ContainerName 1466 } 1467 if aisccvpi.SourceResourceID != nil { 1468 objectMap["sourceResourceId"] = aisccvpi.SourceResourceID 1469 } 1470 if aisccvpi.PolicyID != nil { 1471 objectMap["policyId"] = aisccvpi.PolicyID 1472 } 1473 if aisccvpi.LastRecoveryPoint != nil { 1474 objectMap["lastRecoveryPoint"] = aisccvpi.LastRecoveryPoint 1475 } 1476 if aisccvpi.BackupSetName != nil { 1477 objectMap["backupSetName"] = aisccvpi.BackupSetName 1478 } 1479 if aisccvpi.CreateMode != "" { 1480 objectMap["createMode"] = aisccvpi.CreateMode 1481 } 1482 if aisccvpi.DeferredDeleteTimeInUTC != nil { 1483 objectMap["deferredDeleteTimeInUTC"] = aisccvpi.DeferredDeleteTimeInUTC 1484 } 1485 if aisccvpi.IsScheduledForDeferredDelete != nil { 1486 objectMap["isScheduledForDeferredDelete"] = aisccvpi.IsScheduledForDeferredDelete 1487 } 1488 if aisccvpi.DeferredDeleteTimeRemaining != nil { 1489 objectMap["deferredDeleteTimeRemaining"] = aisccvpi.DeferredDeleteTimeRemaining 1490 } 1491 if aisccvpi.IsDeferredDeleteScheduleUpcoming != nil { 1492 objectMap["isDeferredDeleteScheduleUpcoming"] = aisccvpi.IsDeferredDeleteScheduleUpcoming 1493 } 1494 if aisccvpi.IsRehydrate != nil { 1495 objectMap["isRehydrate"] = aisccvpi.IsRehydrate 1496 } 1497 if aisccvpi.ProtectedItemType != "" { 1498 objectMap["protectedItemType"] = aisccvpi.ProtectedItemType 1499 } 1500 return json.Marshal(objectMap) 1501} 1502 1503// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1504func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { 1505 return nil, false 1506} 1507 1508// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1509func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { 1510 return &aisccvpi, true 1511} 1512 1513// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1514func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { 1515 return nil, false 1516} 1517 1518// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1519func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { 1520 return nil, false 1521} 1522 1523// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1524func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { 1525 return &aisccvpi, true 1526} 1527 1528// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1529func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { 1530 return nil, false 1531} 1532 1533// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1534func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { 1535 return nil, false 1536} 1537 1538// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1539func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { 1540 return nil, false 1541} 1542 1543// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1544func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { 1545 return nil, false 1546} 1547 1548// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1549func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { 1550 return nil, false 1551} 1552 1553// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1554func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { 1555 return nil, false 1556} 1557 1558// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1559func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { 1560 return nil, false 1561} 1562 1563// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1564func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { 1565 return nil, false 1566} 1567 1568// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1569func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { 1570 return nil, false 1571} 1572 1573// AsProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1574func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { 1575 return nil, false 1576} 1577 1578// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1579func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { 1580 return &aisccvpi, true 1581} 1582 1583// AzureIaaSComputeVMContainer iaaS VM workload-specific backup item representing an Azure Resource Manager 1584// virtual machine. 1585type AzureIaaSComputeVMContainer struct { 1586 // VirtualMachineID - Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. 1587 VirtualMachineID *string `json:"virtualMachineId,omitempty"` 1588 // VirtualMachineVersion - Specifies whether the container represents a Classic or an Azure Resource Manager VM. 1589 VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` 1590 // ResourceGroup - Resource group name of Recovery Services Vault. 1591 ResourceGroup *string `json:"resourceGroup,omitempty"` 1592 // FriendlyName - Friendly name of the container. 1593 FriendlyName *string `json:"friendlyName,omitempty"` 1594 // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 1595 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 1596 // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. 1597 RegistrationStatus *string `json:"registrationStatus,omitempty"` 1598 // HealthStatus - Status of health of the container. 1599 HealthStatus *string `json:"healthStatus,omitempty"` 1600 // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' 1601 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` 1602} 1603 1604// MarshalJSON is the custom marshaler for AzureIaaSComputeVMContainer. 1605func (aiscvc AzureIaaSComputeVMContainer) MarshalJSON() ([]byte, error) { 1606 aiscvc.ContainerType = ContainerTypeMicrosoftComputevirtualMachines 1607 objectMap := make(map[string]interface{}) 1608 if aiscvc.VirtualMachineID != nil { 1609 objectMap["virtualMachineId"] = aiscvc.VirtualMachineID 1610 } 1611 if aiscvc.VirtualMachineVersion != nil { 1612 objectMap["virtualMachineVersion"] = aiscvc.VirtualMachineVersion 1613 } 1614 if aiscvc.ResourceGroup != nil { 1615 objectMap["resourceGroup"] = aiscvc.ResourceGroup 1616 } 1617 if aiscvc.FriendlyName != nil { 1618 objectMap["friendlyName"] = aiscvc.FriendlyName 1619 } 1620 if aiscvc.BackupManagementType != "" { 1621 objectMap["backupManagementType"] = aiscvc.BackupManagementType 1622 } 1623 if aiscvc.RegistrationStatus != nil { 1624 objectMap["registrationStatus"] = aiscvc.RegistrationStatus 1625 } 1626 if aiscvc.HealthStatus != nil { 1627 objectMap["healthStatus"] = aiscvc.HealthStatus 1628 } 1629 if aiscvc.ContainerType != "" { 1630 objectMap["containerType"] = aiscvc.ContainerType 1631 } 1632 return json.Marshal(objectMap) 1633} 1634 1635// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1636func (aiscvc AzureIaaSComputeVMContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { 1637 return nil, false 1638} 1639 1640// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1641func (aiscvc AzureIaaSComputeVMContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { 1642 return nil, false 1643} 1644 1645// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1646func (aiscvc AzureIaaSComputeVMContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { 1647 return &aiscvc, true 1648} 1649 1650// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1651func (aiscvc AzureIaaSComputeVMContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { 1652 return nil, false 1653} 1654 1655// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1656func (aiscvc AzureIaaSComputeVMContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { 1657 return nil, false 1658} 1659 1660// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1661func (aiscvc AzureIaaSComputeVMContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { 1662 return nil, false 1663} 1664 1665// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1666func (aiscvc AzureIaaSComputeVMContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { 1667 return nil, false 1668} 1669 1670// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1671func (aiscvc AzureIaaSComputeVMContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { 1672 return nil, false 1673} 1674 1675// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1676func (aiscvc AzureIaaSComputeVMContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { 1677 return nil, false 1678} 1679 1680// AsDpmContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1681func (aiscvc AzureIaaSComputeVMContainer) AsDpmContainer() (*DpmContainer, bool) { 1682 return nil, false 1683} 1684 1685// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1686func (aiscvc AzureIaaSComputeVMContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { 1687 return nil, false 1688} 1689 1690// AsGenericContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1691func (aiscvc AzureIaaSComputeVMContainer) AsGenericContainer() (*GenericContainer, bool) { 1692 return nil, false 1693} 1694 1695// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1696func (aiscvc AzureIaaSComputeVMContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { 1697 return nil, false 1698} 1699 1700// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1701func (aiscvc AzureIaaSComputeVMContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { 1702 return &aiscvc, true 1703} 1704 1705// AsMabContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1706func (aiscvc AzureIaaSComputeVMContainer) AsMabContainer() (*MabContainer, bool) { 1707 return nil, false 1708} 1709 1710// AsProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1711func (aiscvc AzureIaaSComputeVMContainer) AsProtectionContainer() (*ProtectionContainer, bool) { 1712 return nil, false 1713} 1714 1715// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1716func (aiscvc AzureIaaSComputeVMContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { 1717 return &aiscvc, true 1718} 1719 1720// AzureIaaSComputeVMProtectableItem iaaS VM workload-specific backup item representing the Azure Resource 1721// Manager VM. 1722type AzureIaaSComputeVMProtectableItem struct { 1723 // VirtualMachineID - Fully qualified ARM ID of the virtual machine. 1724 VirtualMachineID *string `json:"virtualMachineId,omitempty"` 1725 // BackupManagementType - Type of backup management to backup an item. 1726 BackupManagementType *string `json:"backupManagementType,omitempty"` 1727 // WorkloadType - Type of workload for the backup management 1728 WorkloadType *string `json:"workloadType,omitempty"` 1729 // FriendlyName - Friendly name of the backup item. 1730 FriendlyName *string `json:"friendlyName,omitempty"` 1731 // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 1732 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 1733 // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' 1734 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` 1735} 1736 1737// MarshalJSON is the custom marshaler for AzureIaaSComputeVMProtectableItem. 1738func (aiscvpi AzureIaaSComputeVMProtectableItem) MarshalJSON() ([]byte, error) { 1739 aiscvpi.ProtectableItemType = ProtectableItemTypeMicrosoftComputevirtualMachines 1740 objectMap := make(map[string]interface{}) 1741 if aiscvpi.VirtualMachineID != nil { 1742 objectMap["virtualMachineId"] = aiscvpi.VirtualMachineID 1743 } 1744 if aiscvpi.BackupManagementType != nil { 1745 objectMap["backupManagementType"] = aiscvpi.BackupManagementType 1746 } 1747 if aiscvpi.WorkloadType != nil { 1748 objectMap["workloadType"] = aiscvpi.WorkloadType 1749 } 1750 if aiscvpi.FriendlyName != nil { 1751 objectMap["friendlyName"] = aiscvpi.FriendlyName 1752 } 1753 if aiscvpi.ProtectionState != "" { 1754 objectMap["protectionState"] = aiscvpi.ProtectionState 1755 } 1756 if aiscvpi.ProtectableItemType != "" { 1757 objectMap["protectableItemType"] = aiscvpi.ProtectableItemType 1758 } 1759 return json.Marshal(objectMap) 1760} 1761 1762// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. 1763func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { 1764 return nil, false 1765} 1766 1767// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. 1768func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { 1769 return nil, false 1770} 1771 1772// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. 1773func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { 1774 return &aiscvpi, true 1775} 1776 1777// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. 1778func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { 1779 return nil, false 1780} 1781 1782// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. 1783func (aiscvpi AzureIaaSComputeVMProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { 1784 return nil, false 1785} 1786 1787// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. 1788func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { 1789 return nil, false 1790} 1791 1792// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. 1793func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { 1794 return nil, false 1795} 1796 1797// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. 1798func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { 1799 return nil, false 1800} 1801 1802// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. 1803func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { 1804 return nil, false 1805} 1806 1807// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. 1808func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { 1809 return nil, false 1810} 1811 1812// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. 1813func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { 1814 return nil, false 1815} 1816 1817// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. 1818func (aiscvpi AzureIaaSComputeVMProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { 1819 return nil, false 1820} 1821 1822// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. 1823func (aiscvpi AzureIaaSComputeVMProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { 1824 return &aiscvpi, true 1825} 1826 1827// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. 1828func (aiscvpi AzureIaaSComputeVMProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { 1829 return nil, false 1830} 1831 1832// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. 1833func (aiscvpi AzureIaaSComputeVMProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { 1834 return &aiscvpi, true 1835} 1836 1837// AzureIaaSComputeVMProtectedItem iaaS VM workload-specific backup item representing the Azure Resource 1838// Manager VM. 1839type AzureIaaSComputeVMProtectedItem struct { 1840 // FriendlyName - Friendly name of the VM represented by this backup item. 1841 FriendlyName *string `json:"friendlyName,omitempty"` 1842 // VirtualMachineID - Fully qualified ARM ID of the virtual machine represented by this item. 1843 VirtualMachineID *string `json:"virtualMachineId,omitempty"` 1844 // ProtectionStatus - Backup status of this backup item. 1845 ProtectionStatus *string `json:"protectionStatus,omitempty"` 1846 // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' 1847 ProtectionState ProtectionState `json:"protectionState,omitempty"` 1848 // HealthStatus - Health status of protected item. Possible values include: 'HealthStatusPassed', 'HealthStatusActionRequired', 'HealthStatusActionSuggested', 'HealthStatusInvalid' 1849 HealthStatus HealthStatus `json:"healthStatus,omitempty"` 1850 // HealthDetails - Health details on this backup item. 1851 HealthDetails *[]AzureIaaSVMHealthDetails `json:"healthDetails,omitempty"` 1852 // KpisHealths - Health details of different KPIs 1853 KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"` 1854 // LastBackupStatus - Last backup operation status. 1855 LastBackupStatus *string `json:"lastBackupStatus,omitempty"` 1856 // LastBackupTime - Timestamp of the last backup operation on this backup item. 1857 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` 1858 // ProtectedItemDataID - Data ID of the protected item. 1859 ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"` 1860 // ExtendedInfo - Additional information for this backup item. 1861 ExtendedInfo *AzureIaaSVMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` 1862 ExtendedProperties *ExtendedProperties `json:"extendedProperties,omitempty"` 1863 // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 1864 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 1865 // 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' 1866 WorkloadType DataSourceType `json:"workloadType,omitempty"` 1867 // ContainerName - Unique name of container 1868 ContainerName *string `json:"containerName,omitempty"` 1869 // SourceResourceID - ARM ID of the resource to be backed up. 1870 SourceResourceID *string `json:"sourceResourceId,omitempty"` 1871 // PolicyID - ID of the backup policy with which this item is backed up. 1872 PolicyID *string `json:"policyId,omitempty"` 1873 // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. 1874 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` 1875 // BackupSetName - Name of the backup set the backup item belongs to 1876 BackupSetName *string `json:"backupSetName,omitempty"` 1877 // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' 1878 CreateMode CreateMode `json:"createMode,omitempty"` 1879 // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC 1880 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` 1881 // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete 1882 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` 1883 // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted 1884 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` 1885 // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon 1886 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` 1887 // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state 1888 IsRehydrate *bool `json:"isRehydrate,omitempty"` 1889 // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' 1890 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` 1891} 1892 1893// MarshalJSON is the custom marshaler for AzureIaaSComputeVMProtectedItem. 1894func (aiscvpi AzureIaaSComputeVMProtectedItem) MarshalJSON() ([]byte, error) { 1895 aiscvpi.ProtectedItemType = ProtectedItemTypeMicrosoftComputevirtualMachines 1896 objectMap := make(map[string]interface{}) 1897 if aiscvpi.FriendlyName != nil { 1898 objectMap["friendlyName"] = aiscvpi.FriendlyName 1899 } 1900 if aiscvpi.VirtualMachineID != nil { 1901 objectMap["virtualMachineId"] = aiscvpi.VirtualMachineID 1902 } 1903 if aiscvpi.ProtectionStatus != nil { 1904 objectMap["protectionStatus"] = aiscvpi.ProtectionStatus 1905 } 1906 if aiscvpi.ProtectionState != "" { 1907 objectMap["protectionState"] = aiscvpi.ProtectionState 1908 } 1909 if aiscvpi.HealthStatus != "" { 1910 objectMap["healthStatus"] = aiscvpi.HealthStatus 1911 } 1912 if aiscvpi.HealthDetails != nil { 1913 objectMap["healthDetails"] = aiscvpi.HealthDetails 1914 } 1915 if aiscvpi.KpisHealths != nil { 1916 objectMap["kpisHealths"] = aiscvpi.KpisHealths 1917 } 1918 if aiscvpi.LastBackupStatus != nil { 1919 objectMap["lastBackupStatus"] = aiscvpi.LastBackupStatus 1920 } 1921 if aiscvpi.LastBackupTime != nil { 1922 objectMap["lastBackupTime"] = aiscvpi.LastBackupTime 1923 } 1924 if aiscvpi.ProtectedItemDataID != nil { 1925 objectMap["protectedItemDataId"] = aiscvpi.ProtectedItemDataID 1926 } 1927 if aiscvpi.ExtendedInfo != nil { 1928 objectMap["extendedInfo"] = aiscvpi.ExtendedInfo 1929 } 1930 if aiscvpi.ExtendedProperties != nil { 1931 objectMap["extendedProperties"] = aiscvpi.ExtendedProperties 1932 } 1933 if aiscvpi.BackupManagementType != "" { 1934 objectMap["backupManagementType"] = aiscvpi.BackupManagementType 1935 } 1936 if aiscvpi.WorkloadType != "" { 1937 objectMap["workloadType"] = aiscvpi.WorkloadType 1938 } 1939 if aiscvpi.ContainerName != nil { 1940 objectMap["containerName"] = aiscvpi.ContainerName 1941 } 1942 if aiscvpi.SourceResourceID != nil { 1943 objectMap["sourceResourceId"] = aiscvpi.SourceResourceID 1944 } 1945 if aiscvpi.PolicyID != nil { 1946 objectMap["policyId"] = aiscvpi.PolicyID 1947 } 1948 if aiscvpi.LastRecoveryPoint != nil { 1949 objectMap["lastRecoveryPoint"] = aiscvpi.LastRecoveryPoint 1950 } 1951 if aiscvpi.BackupSetName != nil { 1952 objectMap["backupSetName"] = aiscvpi.BackupSetName 1953 } 1954 if aiscvpi.CreateMode != "" { 1955 objectMap["createMode"] = aiscvpi.CreateMode 1956 } 1957 if aiscvpi.DeferredDeleteTimeInUTC != nil { 1958 objectMap["deferredDeleteTimeInUTC"] = aiscvpi.DeferredDeleteTimeInUTC 1959 } 1960 if aiscvpi.IsScheduledForDeferredDelete != nil { 1961 objectMap["isScheduledForDeferredDelete"] = aiscvpi.IsScheduledForDeferredDelete 1962 } 1963 if aiscvpi.DeferredDeleteTimeRemaining != nil { 1964 objectMap["deferredDeleteTimeRemaining"] = aiscvpi.DeferredDeleteTimeRemaining 1965 } 1966 if aiscvpi.IsDeferredDeleteScheduleUpcoming != nil { 1967 objectMap["isDeferredDeleteScheduleUpcoming"] = aiscvpi.IsDeferredDeleteScheduleUpcoming 1968 } 1969 if aiscvpi.IsRehydrate != nil { 1970 objectMap["isRehydrate"] = aiscvpi.IsRehydrate 1971 } 1972 if aiscvpi.ProtectedItemType != "" { 1973 objectMap["protectedItemType"] = aiscvpi.ProtectedItemType 1974 } 1975 return json.Marshal(objectMap) 1976} 1977 1978// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 1979func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { 1980 return nil, false 1981} 1982 1983// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 1984func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { 1985 return nil, false 1986} 1987 1988// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 1989func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { 1990 return &aiscvpi, true 1991} 1992 1993// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 1994func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { 1995 return nil, false 1996} 1997 1998// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 1999func (aiscvpi AzureIaaSComputeVMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { 2000 return &aiscvpi, true 2001} 2002 2003// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 2004func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { 2005 return nil, false 2006} 2007 2008// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 2009func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { 2010 return nil, false 2011} 2012 2013// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 2014func (aiscvpi AzureIaaSComputeVMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { 2015 return nil, false 2016} 2017 2018// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 2019func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { 2020 return nil, false 2021} 2022 2023// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 2024func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { 2025 return nil, false 2026} 2027 2028// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 2029func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { 2030 return nil, false 2031} 2032 2033// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 2034func (aiscvpi AzureIaaSComputeVMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { 2035 return nil, false 2036} 2037 2038// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 2039func (aiscvpi AzureIaaSComputeVMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { 2040 return nil, false 2041} 2042 2043// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 2044func (aiscvpi AzureIaaSComputeVMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { 2045 return nil, false 2046} 2047 2048// AsProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 2049func (aiscvpi AzureIaaSComputeVMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { 2050 return nil, false 2051} 2052 2053// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 2054func (aiscvpi AzureIaaSComputeVMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { 2055 return &aiscvpi, true 2056} 2057 2058// AzureIaaSVMErrorInfo azure IaaS VM workload-specific error information. 2059type AzureIaaSVMErrorInfo struct { 2060 // ErrorCode - READ-ONLY; Error code. 2061 ErrorCode *int32 `json:"errorCode,omitempty"` 2062 // ErrorTitle - READ-ONLY; Title: Typically, the entity that the error pertains to. 2063 ErrorTitle *string `json:"errorTitle,omitempty"` 2064 // ErrorString - READ-ONLY; Localized error string. 2065 ErrorString *string `json:"errorString,omitempty"` 2066 // Recommendations - READ-ONLY; List of localized recommendations for above error code. 2067 Recommendations *[]string `json:"recommendations,omitempty"` 2068} 2069 2070// MarshalJSON is the custom marshaler for AzureIaaSVMErrorInfo. 2071func (aisei AzureIaaSVMErrorInfo) MarshalJSON() ([]byte, error) { 2072 objectMap := make(map[string]interface{}) 2073 return json.Marshal(objectMap) 2074} 2075 2076// AzureIaaSVMHealthDetails azure IaaS VM workload-specific Health Details. 2077type AzureIaaSVMHealthDetails struct { 2078 // Code - READ-ONLY; Health Code 2079 Code *int32 `json:"code,omitempty"` 2080 // Title - READ-ONLY; Health Title 2081 Title *string `json:"title,omitempty"` 2082 // Message - READ-ONLY; Health Message 2083 Message *string `json:"message,omitempty"` 2084 // Recommendations - READ-ONLY; Health Recommended Actions 2085 Recommendations *[]string `json:"recommendations,omitempty"` 2086} 2087 2088// MarshalJSON is the custom marshaler for AzureIaaSVMHealthDetails. 2089func (aishd AzureIaaSVMHealthDetails) MarshalJSON() ([]byte, error) { 2090 objectMap := make(map[string]interface{}) 2091 return json.Marshal(objectMap) 2092} 2093 2094// AzureIaaSVMJob azure IaaS VM workload-specific job object. 2095type AzureIaaSVMJob struct { 2096 // Duration - Time elapsed during the execution of this job. 2097 Duration *string `json:"duration,omitempty"` 2098 // ActionsInfo - Gets or sets the state/actions applicable on this job like cancel/retry. 2099 ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"` 2100 // ErrorDetails - Error details on execution of this job. 2101 ErrorDetails *[]AzureIaaSVMErrorInfo `json:"errorDetails,omitempty"` 2102 // VirtualMachineVersion - Specifies whether the backup item is a Classic or an Azure Resource Manager VM. 2103 VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` 2104 // ExtendedInfo - Additional information for this job. 2105 ExtendedInfo *AzureIaaSVMJobExtendedInfo `json:"extendedInfo,omitempty"` 2106 // EntityFriendlyName - Friendly name of the entity on which the current job is executing. 2107 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` 2108 // BackupManagementType - Backup management type to execute the current job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 2109 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 2110 // Operation - The operation name. 2111 Operation *string `json:"operation,omitempty"` 2112 // Status - Job status. 2113 Status *string `json:"status,omitempty"` 2114 // StartTime - The start time. 2115 StartTime *date.Time `json:"startTime,omitempty"` 2116 // EndTime - The end time. 2117 EndTime *date.Time `json:"endTime,omitempty"` 2118 // ActivityID - ActivityId of job. 2119 ActivityID *string `json:"activityId,omitempty"` 2120 // JobType - Possible values include: 'JobTypeJob', 'JobTypeAzureIaaSVMJob', 'JobTypeAzureStorageJob', 'JobTypeAzureWorkloadJob', 'JobTypeDpmJob', 'JobTypeMabJob' 2121 JobType JobType `json:"jobType,omitempty"` 2122} 2123 2124// MarshalJSON is the custom marshaler for AzureIaaSVMJob. 2125func (aisj AzureIaaSVMJob) MarshalJSON() ([]byte, error) { 2126 aisj.JobType = JobTypeAzureIaaSVMJob 2127 objectMap := make(map[string]interface{}) 2128 if aisj.Duration != nil { 2129 objectMap["duration"] = aisj.Duration 2130 } 2131 if aisj.ActionsInfo != nil { 2132 objectMap["actionsInfo"] = aisj.ActionsInfo 2133 } 2134 if aisj.ErrorDetails != nil { 2135 objectMap["errorDetails"] = aisj.ErrorDetails 2136 } 2137 if aisj.VirtualMachineVersion != nil { 2138 objectMap["virtualMachineVersion"] = aisj.VirtualMachineVersion 2139 } 2140 if aisj.ExtendedInfo != nil { 2141 objectMap["extendedInfo"] = aisj.ExtendedInfo 2142 } 2143 if aisj.EntityFriendlyName != nil { 2144 objectMap["entityFriendlyName"] = aisj.EntityFriendlyName 2145 } 2146 if aisj.BackupManagementType != "" { 2147 objectMap["backupManagementType"] = aisj.BackupManagementType 2148 } 2149 if aisj.Operation != nil { 2150 objectMap["operation"] = aisj.Operation 2151 } 2152 if aisj.Status != nil { 2153 objectMap["status"] = aisj.Status 2154 } 2155 if aisj.StartTime != nil { 2156 objectMap["startTime"] = aisj.StartTime 2157 } 2158 if aisj.EndTime != nil { 2159 objectMap["endTime"] = aisj.EndTime 2160 } 2161 if aisj.ActivityID != nil { 2162 objectMap["activityId"] = aisj.ActivityID 2163 } 2164 if aisj.JobType != "" { 2165 objectMap["jobType"] = aisj.JobType 2166 } 2167 return json.Marshal(objectMap) 2168} 2169 2170// AsAzureIaaSVMJob is the BasicJob implementation for AzureIaaSVMJob. 2171func (aisj AzureIaaSVMJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) { 2172 return &aisj, true 2173} 2174 2175// AsAzureStorageJob is the BasicJob implementation for AzureIaaSVMJob. 2176func (aisj AzureIaaSVMJob) AsAzureStorageJob() (*AzureStorageJob, bool) { 2177 return nil, false 2178} 2179 2180// AsAzureWorkloadJob is the BasicJob implementation for AzureIaaSVMJob. 2181func (aisj AzureIaaSVMJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) { 2182 return nil, false 2183} 2184 2185// AsDpmJob is the BasicJob implementation for AzureIaaSVMJob. 2186func (aisj AzureIaaSVMJob) AsDpmJob() (*DpmJob, bool) { 2187 return nil, false 2188} 2189 2190// AsMabJob is the BasicJob implementation for AzureIaaSVMJob. 2191func (aisj AzureIaaSVMJob) AsMabJob() (*MabJob, bool) { 2192 return nil, false 2193} 2194 2195// AsJob is the BasicJob implementation for AzureIaaSVMJob. 2196func (aisj AzureIaaSVMJob) AsJob() (*Job, bool) { 2197 return nil, false 2198} 2199 2200// AsBasicJob is the BasicJob implementation for AzureIaaSVMJob. 2201func (aisj AzureIaaSVMJob) AsBasicJob() (BasicJob, bool) { 2202 return &aisj, true 2203} 2204 2205// AzureIaaSVMJobExtendedInfo azure IaaS VM workload-specific additional information for job. 2206type AzureIaaSVMJobExtendedInfo struct { 2207 // TasksList - List of tasks associated with this job. 2208 TasksList *[]AzureIaaSVMJobTaskDetails `json:"tasksList,omitempty"` 2209 // PropertyBag - Job properties. 2210 PropertyBag map[string]*string `json:"propertyBag"` 2211 // InternalPropertyBag - Job internal properties. 2212 InternalPropertyBag map[string]*string `json:"internalPropertyBag"` 2213 // ProgressPercentage - Indicates progress of the job. Null if it has not started or completed. 2214 ProgressPercentage *float64 `json:"progressPercentage,omitempty"` 2215 // EstimatedRemainingDuration - Time remaining for execution of this job. 2216 EstimatedRemainingDuration *string `json:"estimatedRemainingDuration,omitempty"` 2217 // DynamicErrorMessage - Non localized error message on job execution. 2218 DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"` 2219} 2220 2221// MarshalJSON is the custom marshaler for AzureIaaSVMJobExtendedInfo. 2222func (aisjei AzureIaaSVMJobExtendedInfo) MarshalJSON() ([]byte, error) { 2223 objectMap := make(map[string]interface{}) 2224 if aisjei.TasksList != nil { 2225 objectMap["tasksList"] = aisjei.TasksList 2226 } 2227 if aisjei.PropertyBag != nil { 2228 objectMap["propertyBag"] = aisjei.PropertyBag 2229 } 2230 if aisjei.InternalPropertyBag != nil { 2231 objectMap["internalPropertyBag"] = aisjei.InternalPropertyBag 2232 } 2233 if aisjei.ProgressPercentage != nil { 2234 objectMap["progressPercentage"] = aisjei.ProgressPercentage 2235 } 2236 if aisjei.EstimatedRemainingDuration != nil { 2237 objectMap["estimatedRemainingDuration"] = aisjei.EstimatedRemainingDuration 2238 } 2239 if aisjei.DynamicErrorMessage != nil { 2240 objectMap["dynamicErrorMessage"] = aisjei.DynamicErrorMessage 2241 } 2242 return json.Marshal(objectMap) 2243} 2244 2245// AzureIaaSVMJobTaskDetails azure IaaS VM workload-specific job task details. 2246type AzureIaaSVMJobTaskDetails struct { 2247 // TaskID - The task display name. 2248 TaskID *string `json:"taskId,omitempty"` 2249 // StartTime - The start time. 2250 StartTime *date.Time `json:"startTime,omitempty"` 2251 // EndTime - The end time. 2252 EndTime *date.Time `json:"endTime,omitempty"` 2253 // InstanceID - The instanceId. 2254 InstanceID *string `json:"instanceId,omitempty"` 2255 // Duration - Time elapsed for task. 2256 Duration *string `json:"duration,omitempty"` 2257 // Status - The status. 2258 Status *string `json:"status,omitempty"` 2259 // ProgressPercentage - Progress of the task. 2260 ProgressPercentage *float64 `json:"progressPercentage,omitempty"` 2261 // TaskExecutionDetails - Details about execution of the task. 2262 // eg: number of bytes transferred etc 2263 TaskExecutionDetails *string `json:"taskExecutionDetails,omitempty"` 2264} 2265 2266// BasicAzureIaaSVMProtectedItem iaaS VM workload-specific backup item. 2267type BasicAzureIaaSVMProtectedItem interface { 2268 AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) 2269 AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) 2270 AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) 2271} 2272 2273// AzureIaaSVMProtectedItem iaaS VM workload-specific backup item. 2274type AzureIaaSVMProtectedItem struct { 2275 // FriendlyName - Friendly name of the VM represented by this backup item. 2276 FriendlyName *string `json:"friendlyName,omitempty"` 2277 // VirtualMachineID - Fully qualified ARM ID of the virtual machine represented by this item. 2278 VirtualMachineID *string `json:"virtualMachineId,omitempty"` 2279 // ProtectionStatus - Backup status of this backup item. 2280 ProtectionStatus *string `json:"protectionStatus,omitempty"` 2281 // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' 2282 ProtectionState ProtectionState `json:"protectionState,omitempty"` 2283 // HealthStatus - Health status of protected item. Possible values include: 'HealthStatusPassed', 'HealthStatusActionRequired', 'HealthStatusActionSuggested', 'HealthStatusInvalid' 2284 HealthStatus HealthStatus `json:"healthStatus,omitempty"` 2285 // HealthDetails - Health details on this backup item. 2286 HealthDetails *[]AzureIaaSVMHealthDetails `json:"healthDetails,omitempty"` 2287 // KpisHealths - Health details of different KPIs 2288 KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"` 2289 // LastBackupStatus - Last backup operation status. 2290 LastBackupStatus *string `json:"lastBackupStatus,omitempty"` 2291 // LastBackupTime - Timestamp of the last backup operation on this backup item. 2292 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` 2293 // ProtectedItemDataID - Data ID of the protected item. 2294 ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"` 2295 // ExtendedInfo - Additional information for this backup item. 2296 ExtendedInfo *AzureIaaSVMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` 2297 ExtendedProperties *ExtendedProperties `json:"extendedProperties,omitempty"` 2298 // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 2299 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 2300 // 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' 2301 WorkloadType DataSourceType `json:"workloadType,omitempty"` 2302 // ContainerName - Unique name of container 2303 ContainerName *string `json:"containerName,omitempty"` 2304 // SourceResourceID - ARM ID of the resource to be backed up. 2305 SourceResourceID *string `json:"sourceResourceId,omitempty"` 2306 // PolicyID - ID of the backup policy with which this item is backed up. 2307 PolicyID *string `json:"policyId,omitempty"` 2308 // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. 2309 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` 2310 // BackupSetName - Name of the backup set the backup item belongs to 2311 BackupSetName *string `json:"backupSetName,omitempty"` 2312 // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' 2313 CreateMode CreateMode `json:"createMode,omitempty"` 2314 // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC 2315 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` 2316 // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete 2317 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` 2318 // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted 2319 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` 2320 // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon 2321 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` 2322 // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state 2323 IsRehydrate *bool `json:"isRehydrate,omitempty"` 2324 // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' 2325 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` 2326} 2327 2328func unmarshalBasicAzureIaaSVMProtectedItem(body []byte) (BasicAzureIaaSVMProtectedItem, error) { 2329 var m map[string]interface{} 2330 err := json.Unmarshal(body, &m) 2331 if err != nil { 2332 return nil, err 2333 } 2334 2335 switch m["protectedItemType"] { 2336 case string(ProtectedItemTypeMicrosoftClassicComputevirtualMachines): 2337 var aisccvpi AzureIaaSClassicComputeVMProtectedItem 2338 err := json.Unmarshal(body, &aisccvpi) 2339 return aisccvpi, err 2340 case string(ProtectedItemTypeMicrosoftComputevirtualMachines): 2341 var aiscvpi AzureIaaSComputeVMProtectedItem 2342 err := json.Unmarshal(body, &aiscvpi) 2343 return aiscvpi, err 2344 default: 2345 var aispi AzureIaaSVMProtectedItem 2346 err := json.Unmarshal(body, &aispi) 2347 return aispi, err 2348 } 2349} 2350func unmarshalBasicAzureIaaSVMProtectedItemArray(body []byte) ([]BasicAzureIaaSVMProtectedItem, error) { 2351 var rawMessages []*json.RawMessage 2352 err := json.Unmarshal(body, &rawMessages) 2353 if err != nil { 2354 return nil, err 2355 } 2356 2357 aispiArray := make([]BasicAzureIaaSVMProtectedItem, len(rawMessages)) 2358 2359 for index, rawMessage := range rawMessages { 2360 aispi, err := unmarshalBasicAzureIaaSVMProtectedItem(*rawMessage) 2361 if err != nil { 2362 return nil, err 2363 } 2364 aispiArray[index] = aispi 2365 } 2366 return aispiArray, nil 2367} 2368 2369// MarshalJSON is the custom marshaler for AzureIaaSVMProtectedItem. 2370func (aispi AzureIaaSVMProtectedItem) MarshalJSON() ([]byte, error) { 2371 aispi.ProtectedItemType = ProtectedItemTypeAzureIaaSVMProtectedItem 2372 objectMap := make(map[string]interface{}) 2373 if aispi.FriendlyName != nil { 2374 objectMap["friendlyName"] = aispi.FriendlyName 2375 } 2376 if aispi.VirtualMachineID != nil { 2377 objectMap["virtualMachineId"] = aispi.VirtualMachineID 2378 } 2379 if aispi.ProtectionStatus != nil { 2380 objectMap["protectionStatus"] = aispi.ProtectionStatus 2381 } 2382 if aispi.ProtectionState != "" { 2383 objectMap["protectionState"] = aispi.ProtectionState 2384 } 2385 if aispi.HealthStatus != "" { 2386 objectMap["healthStatus"] = aispi.HealthStatus 2387 } 2388 if aispi.HealthDetails != nil { 2389 objectMap["healthDetails"] = aispi.HealthDetails 2390 } 2391 if aispi.KpisHealths != nil { 2392 objectMap["kpisHealths"] = aispi.KpisHealths 2393 } 2394 if aispi.LastBackupStatus != nil { 2395 objectMap["lastBackupStatus"] = aispi.LastBackupStatus 2396 } 2397 if aispi.LastBackupTime != nil { 2398 objectMap["lastBackupTime"] = aispi.LastBackupTime 2399 } 2400 if aispi.ProtectedItemDataID != nil { 2401 objectMap["protectedItemDataId"] = aispi.ProtectedItemDataID 2402 } 2403 if aispi.ExtendedInfo != nil { 2404 objectMap["extendedInfo"] = aispi.ExtendedInfo 2405 } 2406 if aispi.ExtendedProperties != nil { 2407 objectMap["extendedProperties"] = aispi.ExtendedProperties 2408 } 2409 if aispi.BackupManagementType != "" { 2410 objectMap["backupManagementType"] = aispi.BackupManagementType 2411 } 2412 if aispi.WorkloadType != "" { 2413 objectMap["workloadType"] = aispi.WorkloadType 2414 } 2415 if aispi.ContainerName != nil { 2416 objectMap["containerName"] = aispi.ContainerName 2417 } 2418 if aispi.SourceResourceID != nil { 2419 objectMap["sourceResourceId"] = aispi.SourceResourceID 2420 } 2421 if aispi.PolicyID != nil { 2422 objectMap["policyId"] = aispi.PolicyID 2423 } 2424 if aispi.LastRecoveryPoint != nil { 2425 objectMap["lastRecoveryPoint"] = aispi.LastRecoveryPoint 2426 } 2427 if aispi.BackupSetName != nil { 2428 objectMap["backupSetName"] = aispi.BackupSetName 2429 } 2430 if aispi.CreateMode != "" { 2431 objectMap["createMode"] = aispi.CreateMode 2432 } 2433 if aispi.DeferredDeleteTimeInUTC != nil { 2434 objectMap["deferredDeleteTimeInUTC"] = aispi.DeferredDeleteTimeInUTC 2435 } 2436 if aispi.IsScheduledForDeferredDelete != nil { 2437 objectMap["isScheduledForDeferredDelete"] = aispi.IsScheduledForDeferredDelete 2438 } 2439 if aispi.DeferredDeleteTimeRemaining != nil { 2440 objectMap["deferredDeleteTimeRemaining"] = aispi.DeferredDeleteTimeRemaining 2441 } 2442 if aispi.IsDeferredDeleteScheduleUpcoming != nil { 2443 objectMap["isDeferredDeleteScheduleUpcoming"] = aispi.IsDeferredDeleteScheduleUpcoming 2444 } 2445 if aispi.IsRehydrate != nil { 2446 objectMap["isRehydrate"] = aispi.IsRehydrate 2447 } 2448 if aispi.ProtectedItemType != "" { 2449 objectMap["protectedItemType"] = aispi.ProtectedItemType 2450 } 2451 return json.Marshal(objectMap) 2452} 2453 2454// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. 2455func (aispi AzureIaaSVMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { 2456 return nil, false 2457} 2458 2459// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. 2460func (aispi AzureIaaSVMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { 2461 return nil, false 2462} 2463 2464// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. 2465func (aispi AzureIaaSVMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { 2466 return nil, false 2467} 2468 2469// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. 2470func (aispi AzureIaaSVMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { 2471 return &aispi, true 2472} 2473 2474// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. 2475func (aispi AzureIaaSVMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { 2476 return &aispi, true 2477} 2478 2479// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. 2480func (aispi AzureIaaSVMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { 2481 return nil, false 2482} 2483 2484// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. 2485func (aispi AzureIaaSVMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { 2486 return nil, false 2487} 2488 2489// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. 2490func (aispi AzureIaaSVMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { 2491 return nil, false 2492} 2493 2494// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. 2495func (aispi AzureIaaSVMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { 2496 return nil, false 2497} 2498 2499// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. 2500func (aispi AzureIaaSVMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { 2501 return nil, false 2502} 2503 2504// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. 2505func (aispi AzureIaaSVMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { 2506 return nil, false 2507} 2508 2509// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. 2510func (aispi AzureIaaSVMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { 2511 return nil, false 2512} 2513 2514// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. 2515func (aispi AzureIaaSVMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { 2516 return nil, false 2517} 2518 2519// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. 2520func (aispi AzureIaaSVMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { 2521 return nil, false 2522} 2523 2524// AsProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. 2525func (aispi AzureIaaSVMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { 2526 return nil, false 2527} 2528 2529// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. 2530func (aispi AzureIaaSVMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { 2531 return &aispi, true 2532} 2533 2534// AzureIaaSVMProtectedItemExtendedInfo additional information on Azure IaaS VM specific backup item. 2535type AzureIaaSVMProtectedItemExtendedInfo struct { 2536 // OldestRecoveryPoint - The oldest backup copy available for this backup item. 2537 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"` 2538 // RecoveryPointCount - Number of backup copies available for this backup item. 2539 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"` 2540 // PolicyInconsistent - Specifies if backup policy associated with the backup item is inconsistent. 2541 PolicyInconsistent *bool `json:"policyInconsistent,omitempty"` 2542} 2543 2544// AzureIaaSVMProtectionPolicy iaaS VM workload-specific backup policy. 2545type AzureIaaSVMProtectionPolicy struct { 2546 InstantRPDetails *InstantRPAdditionalDetails `json:"instantRPDetails,omitempty"` 2547 // SchedulePolicy - Backup schedule specified as part of backup policy. 2548 SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"` 2549 // RetentionPolicy - Retention policy with the details on backup copy retention ranges. 2550 RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"` 2551 // InstantRpRetentionRangeInDays - Instant RP retention policy range in days 2552 InstantRpRetentionRangeInDays *int32 `json:"instantRpRetentionRangeInDays,omitempty"` 2553 // TimeZone - TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". 2554 TimeZone *string `json:"timeZone,omitempty"` 2555 // ProtectedItemsCount - Number of items associated with this policy. 2556 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` 2557 // BackupManagementType - Possible values include: 'BackupManagementTypeProtectionPolicy', 'BackupManagementTypeAzureWorkload', 'BackupManagementTypeAzureStorage', 'BackupManagementTypeAzureIaasVM', 'BackupManagementTypeAzureSQL', 'BackupManagementTypeGenericProtectionPolicy', 'BackupManagementTypeMAB' 2558 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"` 2559} 2560 2561// MarshalJSON is the custom marshaler for AzureIaaSVMProtectionPolicy. 2562func (aispp AzureIaaSVMProtectionPolicy) MarshalJSON() ([]byte, error) { 2563 aispp.BackupManagementType = BackupManagementTypeAzureIaasVM 2564 objectMap := make(map[string]interface{}) 2565 if aispp.InstantRPDetails != nil { 2566 objectMap["instantRPDetails"] = aispp.InstantRPDetails 2567 } 2568 objectMap["schedulePolicy"] = aispp.SchedulePolicy 2569 objectMap["retentionPolicy"] = aispp.RetentionPolicy 2570 if aispp.InstantRpRetentionRangeInDays != nil { 2571 objectMap["instantRpRetentionRangeInDays"] = aispp.InstantRpRetentionRangeInDays 2572 } 2573 if aispp.TimeZone != nil { 2574 objectMap["timeZone"] = aispp.TimeZone 2575 } 2576 if aispp.ProtectedItemsCount != nil { 2577 objectMap["protectedItemsCount"] = aispp.ProtectedItemsCount 2578 } 2579 if aispp.BackupManagementType != "" { 2580 objectMap["backupManagementType"] = aispp.BackupManagementType 2581 } 2582 return json.Marshal(objectMap) 2583} 2584 2585// AsAzureVMWorkloadProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy. 2586func (aispp AzureIaaSVMProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) { 2587 return nil, false 2588} 2589 2590// AsAzureFileShareProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy. 2591func (aispp AzureIaaSVMProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) { 2592 return nil, false 2593} 2594 2595// AsAzureIaaSVMProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy. 2596func (aispp AzureIaaSVMProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) { 2597 return &aispp, true 2598} 2599 2600// AsAzureSQLProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy. 2601func (aispp AzureIaaSVMProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) { 2602 return nil, false 2603} 2604 2605// AsGenericProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy. 2606func (aispp AzureIaaSVMProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) { 2607 return nil, false 2608} 2609 2610// AsMabProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy. 2611func (aispp AzureIaaSVMProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) { 2612 return nil, false 2613} 2614 2615// AsProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy. 2616func (aispp AzureIaaSVMProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) { 2617 return nil, false 2618} 2619 2620// AsBasicProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy. 2621func (aispp AzureIaaSVMProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) { 2622 return &aispp, true 2623} 2624 2625// UnmarshalJSON is the custom unmarshaler for AzureIaaSVMProtectionPolicy struct. 2626func (aispp *AzureIaaSVMProtectionPolicy) UnmarshalJSON(body []byte) error { 2627 var m map[string]*json.RawMessage 2628 err := json.Unmarshal(body, &m) 2629 if err != nil { 2630 return err 2631 } 2632 for k, v := range m { 2633 switch k { 2634 case "instantRPDetails": 2635 if v != nil { 2636 var instantRPDetails InstantRPAdditionalDetails 2637 err = json.Unmarshal(*v, &instantRPDetails) 2638 if err != nil { 2639 return err 2640 } 2641 aispp.InstantRPDetails = &instantRPDetails 2642 } 2643 case "schedulePolicy": 2644 if v != nil { 2645 schedulePolicy, err := unmarshalBasicSchedulePolicy(*v) 2646 if err != nil { 2647 return err 2648 } 2649 aispp.SchedulePolicy = schedulePolicy 2650 } 2651 case "retentionPolicy": 2652 if v != nil { 2653 retentionPolicy, err := unmarshalBasicRetentionPolicy(*v) 2654 if err != nil { 2655 return err 2656 } 2657 aispp.RetentionPolicy = retentionPolicy 2658 } 2659 case "instantRpRetentionRangeInDays": 2660 if v != nil { 2661 var instantRpRetentionRangeInDays int32 2662 err = json.Unmarshal(*v, &instantRpRetentionRangeInDays) 2663 if err != nil { 2664 return err 2665 } 2666 aispp.InstantRpRetentionRangeInDays = &instantRpRetentionRangeInDays 2667 } 2668 case "timeZone": 2669 if v != nil { 2670 var timeZone string 2671 err = json.Unmarshal(*v, &timeZone) 2672 if err != nil { 2673 return err 2674 } 2675 aispp.TimeZone = &timeZone 2676 } 2677 case "protectedItemsCount": 2678 if v != nil { 2679 var protectedItemsCount int32 2680 err = json.Unmarshal(*v, &protectedItemsCount) 2681 if err != nil { 2682 return err 2683 } 2684 aispp.ProtectedItemsCount = &protectedItemsCount 2685 } 2686 case "backupManagementType": 2687 if v != nil { 2688 var backupManagementType ManagementTypeBasicProtectionPolicy 2689 err = json.Unmarshal(*v, &backupManagementType) 2690 if err != nil { 2691 return err 2692 } 2693 aispp.BackupManagementType = backupManagementType 2694 } 2695 } 2696 } 2697 2698 return nil 2699} 2700 2701// BasicAzureRecoveryServiceVaultProtectionIntent azure Recovery Services Vault specific protection intent item. 2702type BasicAzureRecoveryServiceVaultProtectionIntent interface { 2703 AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) 2704 AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) 2705 AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) 2706 AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) 2707} 2708 2709// AzureRecoveryServiceVaultProtectionIntent azure Recovery Services Vault specific protection intent item. 2710type AzureRecoveryServiceVaultProtectionIntent struct { 2711 // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 2712 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 2713 // SourceResourceID - ARM ID of the resource to be backed up. 2714 SourceResourceID *string `json:"sourceResourceId,omitempty"` 2715 // ItemID - ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId 2716 ItemID *string `json:"itemId,omitempty"` 2717 // PolicyID - ID of the backup policy with which this item is backed up. 2718 PolicyID *string `json:"policyId,omitempty"` 2719 // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 2720 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 2721 // ProtectionIntentItemType - Possible values include: 'ProtectionIntentItemTypeProtectionIntent', 'ProtectionIntentItemTypeRecoveryServiceVaultItem', 'ProtectionIntentItemTypeAzureResourceItem', 'ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent', 'ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent' 2722 ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"` 2723} 2724 2725func unmarshalBasicAzureRecoveryServiceVaultProtectionIntent(body []byte) (BasicAzureRecoveryServiceVaultProtectionIntent, error) { 2726 var m map[string]interface{} 2727 err := json.Unmarshal(body, &m) 2728 if err != nil { 2729 return nil, err 2730 } 2731 2732 switch m["protectionIntentItemType"] { 2733 case string(ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent): 2734 var awapi AzureWorkloadAutoProtectionIntent 2735 err := json.Unmarshal(body, &awapi) 2736 return awapi, err 2737 case string(ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent): 2738 var awsapi AzureWorkloadSQLAutoProtectionIntent 2739 err := json.Unmarshal(body, &awsapi) 2740 return awsapi, err 2741 default: 2742 var arsvpi AzureRecoveryServiceVaultProtectionIntent 2743 err := json.Unmarshal(body, &arsvpi) 2744 return arsvpi, err 2745 } 2746} 2747func unmarshalBasicAzureRecoveryServiceVaultProtectionIntentArray(body []byte) ([]BasicAzureRecoveryServiceVaultProtectionIntent, error) { 2748 var rawMessages []*json.RawMessage 2749 err := json.Unmarshal(body, &rawMessages) 2750 if err != nil { 2751 return nil, err 2752 } 2753 2754 arsvpiArray := make([]BasicAzureRecoveryServiceVaultProtectionIntent, len(rawMessages)) 2755 2756 for index, rawMessage := range rawMessages { 2757 arsvpi, err := unmarshalBasicAzureRecoveryServiceVaultProtectionIntent(*rawMessage) 2758 if err != nil { 2759 return nil, err 2760 } 2761 arsvpiArray[index] = arsvpi 2762 } 2763 return arsvpiArray, nil 2764} 2765 2766// MarshalJSON is the custom marshaler for AzureRecoveryServiceVaultProtectionIntent. 2767func (arsvpi AzureRecoveryServiceVaultProtectionIntent) MarshalJSON() ([]byte, error) { 2768 arsvpi.ProtectionIntentItemType = ProtectionIntentItemTypeRecoveryServiceVaultItem 2769 objectMap := make(map[string]interface{}) 2770 if arsvpi.BackupManagementType != "" { 2771 objectMap["backupManagementType"] = arsvpi.BackupManagementType 2772 } 2773 if arsvpi.SourceResourceID != nil { 2774 objectMap["sourceResourceId"] = arsvpi.SourceResourceID 2775 } 2776 if arsvpi.ItemID != nil { 2777 objectMap["itemId"] = arsvpi.ItemID 2778 } 2779 if arsvpi.PolicyID != nil { 2780 objectMap["policyId"] = arsvpi.PolicyID 2781 } 2782 if arsvpi.ProtectionState != "" { 2783 objectMap["protectionState"] = arsvpi.ProtectionState 2784 } 2785 if arsvpi.ProtectionIntentItemType != "" { 2786 objectMap["protectionIntentItemType"] = arsvpi.ProtectionIntentItemType 2787 } 2788 return json.Marshal(objectMap) 2789} 2790 2791// AsAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. 2792func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) { 2793 return &arsvpi, true 2794} 2795 2796// AsBasicAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. 2797func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) { 2798 return &arsvpi, true 2799} 2800 2801// AsAzureResourceProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. 2802func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) { 2803 return nil, false 2804} 2805 2806// AsAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. 2807func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) { 2808 return nil, false 2809} 2810 2811// AsBasicAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. 2812func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) { 2813 return nil, false 2814} 2815 2816// AsAzureWorkloadSQLAutoProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. 2817func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) { 2818 return nil, false 2819} 2820 2821// AsProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. 2822func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) { 2823 return nil, false 2824} 2825 2826// AsBasicProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. 2827func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) { 2828 return &arsvpi, true 2829} 2830 2831// AzureResourceProtectionIntent iaaS VM specific backup protection intent item. 2832type AzureResourceProtectionIntent struct { 2833 // FriendlyName - Friendly name of the VM represented by this backup item. 2834 FriendlyName *string `json:"friendlyName,omitempty"` 2835 // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 2836 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 2837 // SourceResourceID - ARM ID of the resource to be backed up. 2838 SourceResourceID *string `json:"sourceResourceId,omitempty"` 2839 // ItemID - ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId 2840 ItemID *string `json:"itemId,omitempty"` 2841 // PolicyID - ID of the backup policy with which this item is backed up. 2842 PolicyID *string `json:"policyId,omitempty"` 2843 // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 2844 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 2845 // ProtectionIntentItemType - Possible values include: 'ProtectionIntentItemTypeProtectionIntent', 'ProtectionIntentItemTypeRecoveryServiceVaultItem', 'ProtectionIntentItemTypeAzureResourceItem', 'ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent', 'ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent' 2846 ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"` 2847} 2848 2849// MarshalJSON is the custom marshaler for AzureResourceProtectionIntent. 2850func (arpi AzureResourceProtectionIntent) MarshalJSON() ([]byte, error) { 2851 arpi.ProtectionIntentItemType = ProtectionIntentItemTypeAzureResourceItem 2852 objectMap := make(map[string]interface{}) 2853 if arpi.FriendlyName != nil { 2854 objectMap["friendlyName"] = arpi.FriendlyName 2855 } 2856 if arpi.BackupManagementType != "" { 2857 objectMap["backupManagementType"] = arpi.BackupManagementType 2858 } 2859 if arpi.SourceResourceID != nil { 2860 objectMap["sourceResourceId"] = arpi.SourceResourceID 2861 } 2862 if arpi.ItemID != nil { 2863 objectMap["itemId"] = arpi.ItemID 2864 } 2865 if arpi.PolicyID != nil { 2866 objectMap["policyId"] = arpi.PolicyID 2867 } 2868 if arpi.ProtectionState != "" { 2869 objectMap["protectionState"] = arpi.ProtectionState 2870 } 2871 if arpi.ProtectionIntentItemType != "" { 2872 objectMap["protectionIntentItemType"] = arpi.ProtectionIntentItemType 2873 } 2874 return json.Marshal(objectMap) 2875} 2876 2877// AsAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. 2878func (arpi AzureResourceProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) { 2879 return nil, false 2880} 2881 2882// AsBasicAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. 2883func (arpi AzureResourceProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) { 2884 return nil, false 2885} 2886 2887// AsAzureResourceProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. 2888func (arpi AzureResourceProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) { 2889 return &arpi, true 2890} 2891 2892// AsAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. 2893func (arpi AzureResourceProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) { 2894 return nil, false 2895} 2896 2897// AsBasicAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. 2898func (arpi AzureResourceProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) { 2899 return nil, false 2900} 2901 2902// AsAzureWorkloadSQLAutoProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. 2903func (arpi AzureResourceProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) { 2904 return nil, false 2905} 2906 2907// AsProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. 2908func (arpi AzureResourceProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) { 2909 return nil, false 2910} 2911 2912// AsBasicProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. 2913func (arpi AzureResourceProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) { 2914 return &arpi, true 2915} 2916 2917// AzureSQLAGWorkloadContainerProtectionContainer container for SQL workloads under SQL Availability Group. 2918type AzureSQLAGWorkloadContainerProtectionContainer struct { 2919 // SourceResourceID - ARM ID of the virtual machine represented by this Azure Workload Container 2920 SourceResourceID *string `json:"sourceResourceId,omitempty"` 2921 // LastUpdatedTime - Time stamp when this container was updated. 2922 LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"` 2923 // ExtendedInfo - Additional details of a workload container. 2924 ExtendedInfo *AzureWorkloadContainerExtendedInfo `json:"extendedInfo,omitempty"` 2925 // 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' 2926 WorkloadType WorkloadType `json:"workloadType,omitempty"` 2927 // OperationType - Re-Do Operation. Possible values include: 'OperationTypeInvalid', 'OperationTypeRegister', 'OperationTypeReregister' 2928 OperationType OperationType `json:"operationType,omitempty"` 2929 // FriendlyName - Friendly name of the container. 2930 FriendlyName *string `json:"friendlyName,omitempty"` 2931 // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 2932 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 2933 // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. 2934 RegistrationStatus *string `json:"registrationStatus,omitempty"` 2935 // HealthStatus - Status of health of the container. 2936 HealthStatus *string `json:"healthStatus,omitempty"` 2937 // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' 2938 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` 2939} 2940 2941// MarshalJSON is the custom marshaler for AzureSQLAGWorkloadContainerProtectionContainer. 2942func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) MarshalJSON() ([]byte, error) { 2943 aswcpc.ContainerType = ContainerTypeSQLAGWorkLoadContainer1 2944 objectMap := make(map[string]interface{}) 2945 if aswcpc.SourceResourceID != nil { 2946 objectMap["sourceResourceId"] = aswcpc.SourceResourceID 2947 } 2948 if aswcpc.LastUpdatedTime != nil { 2949 objectMap["lastUpdatedTime"] = aswcpc.LastUpdatedTime 2950 } 2951 if aswcpc.ExtendedInfo != nil { 2952 objectMap["extendedInfo"] = aswcpc.ExtendedInfo 2953 } 2954 if aswcpc.WorkloadType != "" { 2955 objectMap["workloadType"] = aswcpc.WorkloadType 2956 } 2957 if aswcpc.OperationType != "" { 2958 objectMap["operationType"] = aswcpc.OperationType 2959 } 2960 if aswcpc.FriendlyName != nil { 2961 objectMap["friendlyName"] = aswcpc.FriendlyName 2962 } 2963 if aswcpc.BackupManagementType != "" { 2964 objectMap["backupManagementType"] = aswcpc.BackupManagementType 2965 } 2966 if aswcpc.RegistrationStatus != nil { 2967 objectMap["registrationStatus"] = aswcpc.RegistrationStatus 2968 } 2969 if aswcpc.HealthStatus != nil { 2970 objectMap["healthStatus"] = aswcpc.HealthStatus 2971 } 2972 if aswcpc.ContainerType != "" { 2973 objectMap["containerType"] = aswcpc.ContainerType 2974 } 2975 return json.Marshal(objectMap) 2976} 2977 2978// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. 2979func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { 2980 return nil, false 2981} 2982 2983// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. 2984func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { 2985 return nil, false 2986} 2987 2988// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. 2989func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { 2990 return nil, false 2991} 2992 2993// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. 2994func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { 2995 return &aswcpc, true 2996} 2997 2998// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. 2999func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { 3000 return nil, false 3001} 3002 3003// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. 3004func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { 3005 return nil, false 3006} 3007 3008// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. 3009func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { 3010 return nil, false 3011} 3012 3013// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. 3014func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { 3015 return nil, false 3016} 3017 3018// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. 3019func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { 3020 return &aswcpc, true 3021} 3022 3023// AsDpmContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. 3024func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsDpmContainer() (*DpmContainer, bool) { 3025 return nil, false 3026} 3027 3028// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. 3029func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { 3030 return nil, false 3031} 3032 3033// AsGenericContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. 3034func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsGenericContainer() (*GenericContainer, bool) { 3035 return nil, false 3036} 3037 3038// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. 3039func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { 3040 return nil, false 3041} 3042 3043// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. 3044func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { 3045 return nil, false 3046} 3047 3048// AsMabContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. 3049func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsMabContainer() (*MabContainer, bool) { 3050 return nil, false 3051} 3052 3053// AsProtectionContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. 3054func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsProtectionContainer() (*ProtectionContainer, bool) { 3055 return nil, false 3056} 3057 3058// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. 3059func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { 3060 return &aswcpc, true 3061} 3062 3063// AzureSQLContainer azure Sql workload-specific container. 3064type AzureSQLContainer struct { 3065 // FriendlyName - Friendly name of the container. 3066 FriendlyName *string `json:"friendlyName,omitempty"` 3067 // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 3068 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 3069 // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. 3070 RegistrationStatus *string `json:"registrationStatus,omitempty"` 3071 // HealthStatus - Status of health of the container. 3072 HealthStatus *string `json:"healthStatus,omitempty"` 3073 // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' 3074 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` 3075} 3076 3077// MarshalJSON is the custom marshaler for AzureSQLContainer. 3078func (asc AzureSQLContainer) MarshalJSON() ([]byte, error) { 3079 asc.ContainerType = ContainerTypeAzureSQLContainer1 3080 objectMap := make(map[string]interface{}) 3081 if asc.FriendlyName != nil { 3082 objectMap["friendlyName"] = asc.FriendlyName 3083 } 3084 if asc.BackupManagementType != "" { 3085 objectMap["backupManagementType"] = asc.BackupManagementType 3086 } 3087 if asc.RegistrationStatus != nil { 3088 objectMap["registrationStatus"] = asc.RegistrationStatus 3089 } 3090 if asc.HealthStatus != nil { 3091 objectMap["healthStatus"] = asc.HealthStatus 3092 } 3093 if asc.ContainerType != "" { 3094 objectMap["containerType"] = asc.ContainerType 3095 } 3096 return json.Marshal(objectMap) 3097} 3098 3099// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureSQLContainer. 3100func (asc AzureSQLContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { 3101 return nil, false 3102} 3103 3104// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureSQLContainer. 3105func (asc AzureSQLContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { 3106 return nil, false 3107} 3108 3109// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureSQLContainer. 3110func (asc AzureSQLContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { 3111 return nil, false 3112} 3113 3114// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureSQLContainer. 3115func (asc AzureSQLContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { 3116 return nil, false 3117} 3118 3119// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureSQLContainer. 3120func (asc AzureSQLContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { 3121 return &asc, true 3122} 3123 3124// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureSQLContainer. 3125func (asc AzureSQLContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { 3126 return nil, false 3127} 3128 3129// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureSQLContainer. 3130func (asc AzureSQLContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { 3131 return nil, false 3132} 3133 3134// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureSQLContainer. 3135func (asc AzureSQLContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { 3136 return nil, false 3137} 3138 3139// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureSQLContainer. 3140func (asc AzureSQLContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { 3141 return nil, false 3142} 3143 3144// AsDpmContainer is the BasicProtectionContainer implementation for AzureSQLContainer. 3145func (asc AzureSQLContainer) AsDpmContainer() (*DpmContainer, bool) { 3146 return nil, false 3147} 3148 3149// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureSQLContainer. 3150func (asc AzureSQLContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { 3151 return nil, false 3152} 3153 3154// AsGenericContainer is the BasicProtectionContainer implementation for AzureSQLContainer. 3155func (asc AzureSQLContainer) AsGenericContainer() (*GenericContainer, bool) { 3156 return nil, false 3157} 3158 3159// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureSQLContainer. 3160func (asc AzureSQLContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { 3161 return nil, false 3162} 3163 3164// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureSQLContainer. 3165func (asc AzureSQLContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { 3166 return nil, false 3167} 3168 3169// AsMabContainer is the BasicProtectionContainer implementation for AzureSQLContainer. 3170func (asc AzureSQLContainer) AsMabContainer() (*MabContainer, bool) { 3171 return nil, false 3172} 3173 3174// AsProtectionContainer is the BasicProtectionContainer implementation for AzureSQLContainer. 3175func (asc AzureSQLContainer) AsProtectionContainer() (*ProtectionContainer, bool) { 3176 return nil, false 3177} 3178 3179// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureSQLContainer. 3180func (asc AzureSQLContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { 3181 return &asc, true 3182} 3183 3184// AzureSQLProtectedItem azure SQL workload-specific backup item. 3185type AzureSQLProtectedItem struct { 3186 // ProtectedItemDataID - Internal ID of a backup item. Used by Azure SQL Backup engine to contact Recovery Services. 3187 ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"` 3188 // ProtectionState - Backup state of the backed up item. Possible values include: 'ProtectedItemStateInvalid', 'ProtectedItemStateIRPending', 'ProtectedItemStateProtected', 'ProtectedItemStateProtectionError', 'ProtectedItemStateProtectionStopped', 'ProtectedItemStateProtectionPaused' 3189 ProtectionState ProtectedItemState `json:"protectionState,omitempty"` 3190 // ExtendedInfo - Additional information for this backup item. 3191 ExtendedInfo *AzureSQLProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` 3192 // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 3193 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 3194 // 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' 3195 WorkloadType DataSourceType `json:"workloadType,omitempty"` 3196 // ContainerName - Unique name of container 3197 ContainerName *string `json:"containerName,omitempty"` 3198 // SourceResourceID - ARM ID of the resource to be backed up. 3199 SourceResourceID *string `json:"sourceResourceId,omitempty"` 3200 // PolicyID - ID of the backup policy with which this item is backed up. 3201 PolicyID *string `json:"policyId,omitempty"` 3202 // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. 3203 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` 3204 // BackupSetName - Name of the backup set the backup item belongs to 3205 BackupSetName *string `json:"backupSetName,omitempty"` 3206 // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' 3207 CreateMode CreateMode `json:"createMode,omitempty"` 3208 // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC 3209 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` 3210 // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete 3211 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` 3212 // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted 3213 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` 3214 // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon 3215 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` 3216 // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state 3217 IsRehydrate *bool `json:"isRehydrate,omitempty"` 3218 // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' 3219 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` 3220} 3221 3222// MarshalJSON is the custom marshaler for AzureSQLProtectedItem. 3223func (aspi AzureSQLProtectedItem) MarshalJSON() ([]byte, error) { 3224 aspi.ProtectedItemType = ProtectedItemTypeMicrosoftSqlserversdatabases 3225 objectMap := make(map[string]interface{}) 3226 if aspi.ProtectedItemDataID != nil { 3227 objectMap["protectedItemDataId"] = aspi.ProtectedItemDataID 3228 } 3229 if aspi.ProtectionState != "" { 3230 objectMap["protectionState"] = aspi.ProtectionState 3231 } 3232 if aspi.ExtendedInfo != nil { 3233 objectMap["extendedInfo"] = aspi.ExtendedInfo 3234 } 3235 if aspi.BackupManagementType != "" { 3236 objectMap["backupManagementType"] = aspi.BackupManagementType 3237 } 3238 if aspi.WorkloadType != "" { 3239 objectMap["workloadType"] = aspi.WorkloadType 3240 } 3241 if aspi.ContainerName != nil { 3242 objectMap["containerName"] = aspi.ContainerName 3243 } 3244 if aspi.SourceResourceID != nil { 3245 objectMap["sourceResourceId"] = aspi.SourceResourceID 3246 } 3247 if aspi.PolicyID != nil { 3248 objectMap["policyId"] = aspi.PolicyID 3249 } 3250 if aspi.LastRecoveryPoint != nil { 3251 objectMap["lastRecoveryPoint"] = aspi.LastRecoveryPoint 3252 } 3253 if aspi.BackupSetName != nil { 3254 objectMap["backupSetName"] = aspi.BackupSetName 3255 } 3256 if aspi.CreateMode != "" { 3257 objectMap["createMode"] = aspi.CreateMode 3258 } 3259 if aspi.DeferredDeleteTimeInUTC != nil { 3260 objectMap["deferredDeleteTimeInUTC"] = aspi.DeferredDeleteTimeInUTC 3261 } 3262 if aspi.IsScheduledForDeferredDelete != nil { 3263 objectMap["isScheduledForDeferredDelete"] = aspi.IsScheduledForDeferredDelete 3264 } 3265 if aspi.DeferredDeleteTimeRemaining != nil { 3266 objectMap["deferredDeleteTimeRemaining"] = aspi.DeferredDeleteTimeRemaining 3267 } 3268 if aspi.IsDeferredDeleteScheduleUpcoming != nil { 3269 objectMap["isDeferredDeleteScheduleUpcoming"] = aspi.IsDeferredDeleteScheduleUpcoming 3270 } 3271 if aspi.IsRehydrate != nil { 3272 objectMap["isRehydrate"] = aspi.IsRehydrate 3273 } 3274 if aspi.ProtectedItemType != "" { 3275 objectMap["protectedItemType"] = aspi.ProtectedItemType 3276 } 3277 return json.Marshal(objectMap) 3278} 3279 3280// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. 3281func (aspi AzureSQLProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { 3282 return nil, false 3283} 3284 3285// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. 3286func (aspi AzureSQLProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { 3287 return nil, false 3288} 3289 3290// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. 3291func (aspi AzureSQLProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { 3292 return nil, false 3293} 3294 3295// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. 3296func (aspi AzureSQLProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { 3297 return nil, false 3298} 3299 3300// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. 3301func (aspi AzureSQLProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { 3302 return nil, false 3303} 3304 3305// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. 3306func (aspi AzureSQLProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { 3307 return &aspi, true 3308} 3309 3310// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. 3311func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { 3312 return nil, false 3313} 3314 3315// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. 3316func (aspi AzureSQLProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { 3317 return nil, false 3318} 3319 3320// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. 3321func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { 3322 return nil, false 3323} 3324 3325// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. 3326func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { 3327 return nil, false 3328} 3329 3330// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. 3331func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { 3332 return nil, false 3333} 3334 3335// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. 3336func (aspi AzureSQLProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { 3337 return nil, false 3338} 3339 3340// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. 3341func (aspi AzureSQLProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { 3342 return nil, false 3343} 3344 3345// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. 3346func (aspi AzureSQLProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { 3347 return nil, false 3348} 3349 3350// AsProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. 3351func (aspi AzureSQLProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { 3352 return nil, false 3353} 3354 3355// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. 3356func (aspi AzureSQLProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { 3357 return &aspi, true 3358} 3359 3360// AzureSQLProtectedItemExtendedInfo additional information on Azure Sql specific protected item. 3361type AzureSQLProtectedItemExtendedInfo struct { 3362 // OldestRecoveryPoint - The oldest backup copy available for this item in the service. 3363 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"` 3364 // RecoveryPointCount - Number of available backup copies associated with this backup item. 3365 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"` 3366 // PolicyState - State of the backup policy associated with this backup item. 3367 PolicyState *string `json:"policyState,omitempty"` 3368} 3369 3370// AzureSQLProtectionPolicy azure SQL workload-specific backup policy. 3371type AzureSQLProtectionPolicy struct { 3372 // RetentionPolicy - Retention policy details. 3373 RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"` 3374 // ProtectedItemsCount - Number of items associated with this policy. 3375 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` 3376 // BackupManagementType - Possible values include: 'BackupManagementTypeProtectionPolicy', 'BackupManagementTypeAzureWorkload', 'BackupManagementTypeAzureStorage', 'BackupManagementTypeAzureIaasVM', 'BackupManagementTypeAzureSQL', 'BackupManagementTypeGenericProtectionPolicy', 'BackupManagementTypeMAB' 3377 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"` 3378} 3379 3380// MarshalJSON is the custom marshaler for AzureSQLProtectionPolicy. 3381func (aspp AzureSQLProtectionPolicy) MarshalJSON() ([]byte, error) { 3382 aspp.BackupManagementType = BackupManagementTypeAzureSQL 3383 objectMap := make(map[string]interface{}) 3384 objectMap["retentionPolicy"] = aspp.RetentionPolicy 3385 if aspp.ProtectedItemsCount != nil { 3386 objectMap["protectedItemsCount"] = aspp.ProtectedItemsCount 3387 } 3388 if aspp.BackupManagementType != "" { 3389 objectMap["backupManagementType"] = aspp.BackupManagementType 3390 } 3391 return json.Marshal(objectMap) 3392} 3393 3394// AsAzureVMWorkloadProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy. 3395func (aspp AzureSQLProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) { 3396 return nil, false 3397} 3398 3399// AsAzureFileShareProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy. 3400func (aspp AzureSQLProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) { 3401 return nil, false 3402} 3403 3404// AsAzureIaaSVMProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy. 3405func (aspp AzureSQLProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) { 3406 return nil, false 3407} 3408 3409// AsAzureSQLProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy. 3410func (aspp AzureSQLProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) { 3411 return &aspp, true 3412} 3413 3414// AsGenericProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy. 3415func (aspp AzureSQLProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) { 3416 return nil, false 3417} 3418 3419// AsMabProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy. 3420func (aspp AzureSQLProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) { 3421 return nil, false 3422} 3423 3424// AsProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy. 3425func (aspp AzureSQLProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) { 3426 return nil, false 3427} 3428 3429// AsBasicProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy. 3430func (aspp AzureSQLProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) { 3431 return &aspp, true 3432} 3433 3434// UnmarshalJSON is the custom unmarshaler for AzureSQLProtectionPolicy struct. 3435func (aspp *AzureSQLProtectionPolicy) UnmarshalJSON(body []byte) error { 3436 var m map[string]*json.RawMessage 3437 err := json.Unmarshal(body, &m) 3438 if err != nil { 3439 return err 3440 } 3441 for k, v := range m { 3442 switch k { 3443 case "retentionPolicy": 3444 if v != nil { 3445 retentionPolicy, err := unmarshalBasicRetentionPolicy(*v) 3446 if err != nil { 3447 return err 3448 } 3449 aspp.RetentionPolicy = retentionPolicy 3450 } 3451 case "protectedItemsCount": 3452 if v != nil { 3453 var protectedItemsCount int32 3454 err = json.Unmarshal(*v, &protectedItemsCount) 3455 if err != nil { 3456 return err 3457 } 3458 aspp.ProtectedItemsCount = &protectedItemsCount 3459 } 3460 case "backupManagementType": 3461 if v != nil { 3462 var backupManagementType ManagementTypeBasicProtectionPolicy 3463 err = json.Unmarshal(*v, &backupManagementType) 3464 if err != nil { 3465 return err 3466 } 3467 aspp.BackupManagementType = backupManagementType 3468 } 3469 } 3470 } 3471 3472 return nil 3473} 3474 3475// AzureStorageContainer azure Storage Account workload-specific container. 3476type AzureStorageContainer struct { 3477 // SourceResourceID - Fully qualified ARM url. 3478 SourceResourceID *string `json:"sourceResourceId,omitempty"` 3479 // StorageAccountVersion - Storage account version. 3480 StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` 3481 // ResourceGroup - Resource group name of Recovery Services Vault. 3482 ResourceGroup *string `json:"resourceGroup,omitempty"` 3483 // ProtectedItemCount - Number of items backed up in this container. 3484 ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` 3485 // FriendlyName - Friendly name of the container. 3486 FriendlyName *string `json:"friendlyName,omitempty"` 3487 // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 3488 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 3489 // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. 3490 RegistrationStatus *string `json:"registrationStatus,omitempty"` 3491 // HealthStatus - Status of health of the container. 3492 HealthStatus *string `json:"healthStatus,omitempty"` 3493 // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' 3494 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` 3495} 3496 3497// MarshalJSON is the custom marshaler for AzureStorageContainer. 3498func (asc AzureStorageContainer) MarshalJSON() ([]byte, error) { 3499 asc.ContainerType = ContainerTypeStorageContainer1 3500 objectMap := make(map[string]interface{}) 3501 if asc.SourceResourceID != nil { 3502 objectMap["sourceResourceId"] = asc.SourceResourceID 3503 } 3504 if asc.StorageAccountVersion != nil { 3505 objectMap["storageAccountVersion"] = asc.StorageAccountVersion 3506 } 3507 if asc.ResourceGroup != nil { 3508 objectMap["resourceGroup"] = asc.ResourceGroup 3509 } 3510 if asc.ProtectedItemCount != nil { 3511 objectMap["protectedItemCount"] = asc.ProtectedItemCount 3512 } 3513 if asc.FriendlyName != nil { 3514 objectMap["friendlyName"] = asc.FriendlyName 3515 } 3516 if asc.BackupManagementType != "" { 3517 objectMap["backupManagementType"] = asc.BackupManagementType 3518 } 3519 if asc.RegistrationStatus != nil { 3520 objectMap["registrationStatus"] = asc.RegistrationStatus 3521 } 3522 if asc.HealthStatus != nil { 3523 objectMap["healthStatus"] = asc.HealthStatus 3524 } 3525 if asc.ContainerType != "" { 3526 objectMap["containerType"] = asc.ContainerType 3527 } 3528 return json.Marshal(objectMap) 3529} 3530 3531// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureStorageContainer. 3532func (asc AzureStorageContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { 3533 return nil, false 3534} 3535 3536// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureStorageContainer. 3537func (asc AzureStorageContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { 3538 return nil, false 3539} 3540 3541// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureStorageContainer. 3542func (asc AzureStorageContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { 3543 return nil, false 3544} 3545 3546// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureStorageContainer. 3547func (asc AzureStorageContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { 3548 return nil, false 3549} 3550 3551// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureStorageContainer. 3552func (asc AzureStorageContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { 3553 return nil, false 3554} 3555 3556// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureStorageContainer. 3557func (asc AzureStorageContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { 3558 return &asc, true 3559} 3560 3561// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureStorageContainer. 3562func (asc AzureStorageContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { 3563 return nil, false 3564} 3565 3566// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureStorageContainer. 3567func (asc AzureStorageContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { 3568 return nil, false 3569} 3570 3571// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureStorageContainer. 3572func (asc AzureStorageContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { 3573 return nil, false 3574} 3575 3576// AsDpmContainer is the BasicProtectionContainer implementation for AzureStorageContainer. 3577func (asc AzureStorageContainer) AsDpmContainer() (*DpmContainer, bool) { 3578 return nil, false 3579} 3580 3581// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureStorageContainer. 3582func (asc AzureStorageContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { 3583 return nil, false 3584} 3585 3586// AsGenericContainer is the BasicProtectionContainer implementation for AzureStorageContainer. 3587func (asc AzureStorageContainer) AsGenericContainer() (*GenericContainer, bool) { 3588 return nil, false 3589} 3590 3591// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureStorageContainer. 3592func (asc AzureStorageContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { 3593 return nil, false 3594} 3595 3596// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureStorageContainer. 3597func (asc AzureStorageContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { 3598 return nil, false 3599} 3600 3601// AsMabContainer is the BasicProtectionContainer implementation for AzureStorageContainer. 3602func (asc AzureStorageContainer) AsMabContainer() (*MabContainer, bool) { 3603 return nil, false 3604} 3605 3606// AsProtectionContainer is the BasicProtectionContainer implementation for AzureStorageContainer. 3607func (asc AzureStorageContainer) AsProtectionContainer() (*ProtectionContainer, bool) { 3608 return nil, false 3609} 3610 3611// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureStorageContainer. 3612func (asc AzureStorageContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { 3613 return &asc, true 3614} 3615 3616// AzureStorageErrorInfo azure storage specific error information 3617type AzureStorageErrorInfo struct { 3618 // ErrorCode - Error code. 3619 ErrorCode *int32 `json:"errorCode,omitempty"` 3620 // ErrorString - Localized error string. 3621 ErrorString *string `json:"errorString,omitempty"` 3622 // Recommendations - List of localized recommendations for above error code. 3623 Recommendations *[]string `json:"recommendations,omitempty"` 3624} 3625 3626// AzureStorageJob azure storage specific job. 3627type AzureStorageJob struct { 3628 // Duration - Time elapsed during the execution of this job. 3629 Duration *string `json:"duration,omitempty"` 3630 // ActionsInfo - Gets or sets the state/actions applicable on this job like cancel/retry. 3631 ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"` 3632 // ErrorDetails - Error details on execution of this job. 3633 ErrorDetails *[]AzureStorageErrorInfo `json:"errorDetails,omitempty"` 3634 // StorageAccountName - Specifies friendly name of the storage account. 3635 StorageAccountName *string `json:"storageAccountName,omitempty"` 3636 // StorageAccountVersion - Specifies whether the Storage account is a Classic or an Azure Resource Manager Storage account. 3637 StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` 3638 // ExtendedInfo - Additional information about the job. 3639 ExtendedInfo *AzureStorageJobExtendedInfo `json:"extendedInfo,omitempty"` 3640 // EntityFriendlyName - Friendly name of the entity on which the current job is executing. 3641 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` 3642 // BackupManagementType - Backup management type to execute the current job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 3643 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 3644 // Operation - The operation name. 3645 Operation *string `json:"operation,omitempty"` 3646 // Status - Job status. 3647 Status *string `json:"status,omitempty"` 3648 // StartTime - The start time. 3649 StartTime *date.Time `json:"startTime,omitempty"` 3650 // EndTime - The end time. 3651 EndTime *date.Time `json:"endTime,omitempty"` 3652 // ActivityID - ActivityId of job. 3653 ActivityID *string `json:"activityId,omitempty"` 3654 // JobType - Possible values include: 'JobTypeJob', 'JobTypeAzureIaaSVMJob', 'JobTypeAzureStorageJob', 'JobTypeAzureWorkloadJob', 'JobTypeDpmJob', 'JobTypeMabJob' 3655 JobType JobType `json:"jobType,omitempty"` 3656} 3657 3658// MarshalJSON is the custom marshaler for AzureStorageJob. 3659func (asj AzureStorageJob) MarshalJSON() ([]byte, error) { 3660 asj.JobType = JobTypeAzureStorageJob 3661 objectMap := make(map[string]interface{}) 3662 if asj.Duration != nil { 3663 objectMap["duration"] = asj.Duration 3664 } 3665 if asj.ActionsInfo != nil { 3666 objectMap["actionsInfo"] = asj.ActionsInfo 3667 } 3668 if asj.ErrorDetails != nil { 3669 objectMap["errorDetails"] = asj.ErrorDetails 3670 } 3671 if asj.StorageAccountName != nil { 3672 objectMap["storageAccountName"] = asj.StorageAccountName 3673 } 3674 if asj.StorageAccountVersion != nil { 3675 objectMap["storageAccountVersion"] = asj.StorageAccountVersion 3676 } 3677 if asj.ExtendedInfo != nil { 3678 objectMap["extendedInfo"] = asj.ExtendedInfo 3679 } 3680 if asj.EntityFriendlyName != nil { 3681 objectMap["entityFriendlyName"] = asj.EntityFriendlyName 3682 } 3683 if asj.BackupManagementType != "" { 3684 objectMap["backupManagementType"] = asj.BackupManagementType 3685 } 3686 if asj.Operation != nil { 3687 objectMap["operation"] = asj.Operation 3688 } 3689 if asj.Status != nil { 3690 objectMap["status"] = asj.Status 3691 } 3692 if asj.StartTime != nil { 3693 objectMap["startTime"] = asj.StartTime 3694 } 3695 if asj.EndTime != nil { 3696 objectMap["endTime"] = asj.EndTime 3697 } 3698 if asj.ActivityID != nil { 3699 objectMap["activityId"] = asj.ActivityID 3700 } 3701 if asj.JobType != "" { 3702 objectMap["jobType"] = asj.JobType 3703 } 3704 return json.Marshal(objectMap) 3705} 3706 3707// AsAzureIaaSVMJob is the BasicJob implementation for AzureStorageJob. 3708func (asj AzureStorageJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) { 3709 return nil, false 3710} 3711 3712// AsAzureStorageJob is the BasicJob implementation for AzureStorageJob. 3713func (asj AzureStorageJob) AsAzureStorageJob() (*AzureStorageJob, bool) { 3714 return &asj, true 3715} 3716 3717// AsAzureWorkloadJob is the BasicJob implementation for AzureStorageJob. 3718func (asj AzureStorageJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) { 3719 return nil, false 3720} 3721 3722// AsDpmJob is the BasicJob implementation for AzureStorageJob. 3723func (asj AzureStorageJob) AsDpmJob() (*DpmJob, bool) { 3724 return nil, false 3725} 3726 3727// AsMabJob is the BasicJob implementation for AzureStorageJob. 3728func (asj AzureStorageJob) AsMabJob() (*MabJob, bool) { 3729 return nil, false 3730} 3731 3732// AsJob is the BasicJob implementation for AzureStorageJob. 3733func (asj AzureStorageJob) AsJob() (*Job, bool) { 3734 return nil, false 3735} 3736 3737// AsBasicJob is the BasicJob implementation for AzureStorageJob. 3738func (asj AzureStorageJob) AsBasicJob() (BasicJob, bool) { 3739 return &asj, true 3740} 3741 3742// AzureStorageJobExtendedInfo azure Storage workload-specific additional information for job. 3743type AzureStorageJobExtendedInfo struct { 3744 // TasksList - List of tasks for this job 3745 TasksList *[]AzureStorageJobTaskDetails `json:"tasksList,omitempty"` 3746 // PropertyBag - Job properties. 3747 PropertyBag map[string]*string `json:"propertyBag"` 3748 // DynamicErrorMessage - Non localized error message on job execution. 3749 DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"` 3750} 3751 3752// MarshalJSON is the custom marshaler for AzureStorageJobExtendedInfo. 3753func (asjei AzureStorageJobExtendedInfo) MarshalJSON() ([]byte, error) { 3754 objectMap := make(map[string]interface{}) 3755 if asjei.TasksList != nil { 3756 objectMap["tasksList"] = asjei.TasksList 3757 } 3758 if asjei.PropertyBag != nil { 3759 objectMap["propertyBag"] = asjei.PropertyBag 3760 } 3761 if asjei.DynamicErrorMessage != nil { 3762 objectMap["dynamicErrorMessage"] = asjei.DynamicErrorMessage 3763 } 3764 return json.Marshal(objectMap) 3765} 3766 3767// AzureStorageJobTaskDetails azure storage workload specific job task details. 3768type AzureStorageJobTaskDetails struct { 3769 // TaskID - The task display name. 3770 TaskID *string `json:"taskId,omitempty"` 3771 // Status - The status. 3772 Status *string `json:"status,omitempty"` 3773} 3774 3775// AzureStorageProtectableContainer azure Storage-specific protectable containers 3776type AzureStorageProtectableContainer struct { 3777 // FriendlyName - Friendly name of the container. 3778 FriendlyName *string `json:"friendlyName,omitempty"` 3779 // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 3780 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 3781 // HealthStatus - Status of health of the container. 3782 HealthStatus *string `json:"healthStatus,omitempty"` 3783 // ContainerID - Fabric Id of the container such as ARM Id. 3784 ContainerID *string `json:"containerId,omitempty"` 3785 // ProtectableContainerType - Possible values include: 'ProtectableContainerTypeProtectableContainer', 'ProtectableContainerTypeStorageContainer', 'ProtectableContainerTypeVMAppContainer' 3786 ProtectableContainerType ProtectableContainerType `json:"protectableContainerType,omitempty"` 3787} 3788 3789// MarshalJSON is the custom marshaler for AzureStorageProtectableContainer. 3790func (aspc AzureStorageProtectableContainer) MarshalJSON() ([]byte, error) { 3791 aspc.ProtectableContainerType = ProtectableContainerTypeStorageContainer 3792 objectMap := make(map[string]interface{}) 3793 if aspc.FriendlyName != nil { 3794 objectMap["friendlyName"] = aspc.FriendlyName 3795 } 3796 if aspc.BackupManagementType != "" { 3797 objectMap["backupManagementType"] = aspc.BackupManagementType 3798 } 3799 if aspc.HealthStatus != nil { 3800 objectMap["healthStatus"] = aspc.HealthStatus 3801 } 3802 if aspc.ContainerID != nil { 3803 objectMap["containerId"] = aspc.ContainerID 3804 } 3805 if aspc.ProtectableContainerType != "" { 3806 objectMap["protectableContainerType"] = aspc.ProtectableContainerType 3807 } 3808 return json.Marshal(objectMap) 3809} 3810 3811// AsAzureStorageProtectableContainer is the BasicProtectableContainer implementation for AzureStorageProtectableContainer. 3812func (aspc AzureStorageProtectableContainer) AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) { 3813 return &aspc, true 3814} 3815 3816// AsAzureVMAppContainerProtectableContainer is the BasicProtectableContainer implementation for AzureStorageProtectableContainer. 3817func (aspc AzureStorageProtectableContainer) AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) { 3818 return nil, false 3819} 3820 3821// AsProtectableContainer is the BasicProtectableContainer implementation for AzureStorageProtectableContainer. 3822func (aspc AzureStorageProtectableContainer) AsProtectableContainer() (*ProtectableContainer, bool) { 3823 return nil, false 3824} 3825 3826// AsBasicProtectableContainer is the BasicProtectableContainer implementation for AzureStorageProtectableContainer. 3827func (aspc AzureStorageProtectableContainer) AsBasicProtectableContainer() (BasicProtectableContainer, bool) { 3828 return &aspc, true 3829} 3830 3831// AzureVMAppContainerProtectableContainer azure workload-specific container 3832type AzureVMAppContainerProtectableContainer struct { 3833 // FriendlyName - Friendly name of the container. 3834 FriendlyName *string `json:"friendlyName,omitempty"` 3835 // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 3836 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 3837 // HealthStatus - Status of health of the container. 3838 HealthStatus *string `json:"healthStatus,omitempty"` 3839 // ContainerID - Fabric Id of the container such as ARM Id. 3840 ContainerID *string `json:"containerId,omitempty"` 3841 // ProtectableContainerType - Possible values include: 'ProtectableContainerTypeProtectableContainer', 'ProtectableContainerTypeStorageContainer', 'ProtectableContainerTypeVMAppContainer' 3842 ProtectableContainerType ProtectableContainerType `json:"protectableContainerType,omitempty"` 3843} 3844 3845// MarshalJSON is the custom marshaler for AzureVMAppContainerProtectableContainer. 3846func (avacpc AzureVMAppContainerProtectableContainer) MarshalJSON() ([]byte, error) { 3847 avacpc.ProtectableContainerType = ProtectableContainerTypeVMAppContainer 3848 objectMap := make(map[string]interface{}) 3849 if avacpc.FriendlyName != nil { 3850 objectMap["friendlyName"] = avacpc.FriendlyName 3851 } 3852 if avacpc.BackupManagementType != "" { 3853 objectMap["backupManagementType"] = avacpc.BackupManagementType 3854 } 3855 if avacpc.HealthStatus != nil { 3856 objectMap["healthStatus"] = avacpc.HealthStatus 3857 } 3858 if avacpc.ContainerID != nil { 3859 objectMap["containerId"] = avacpc.ContainerID 3860 } 3861 if avacpc.ProtectableContainerType != "" { 3862 objectMap["protectableContainerType"] = avacpc.ProtectableContainerType 3863 } 3864 return json.Marshal(objectMap) 3865} 3866 3867// AsAzureStorageProtectableContainer is the BasicProtectableContainer implementation for AzureVMAppContainerProtectableContainer. 3868func (avacpc AzureVMAppContainerProtectableContainer) AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) { 3869 return nil, false 3870} 3871 3872// AsAzureVMAppContainerProtectableContainer is the BasicProtectableContainer implementation for AzureVMAppContainerProtectableContainer. 3873func (avacpc AzureVMAppContainerProtectableContainer) AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) { 3874 return &avacpc, true 3875} 3876 3877// AsProtectableContainer is the BasicProtectableContainer implementation for AzureVMAppContainerProtectableContainer. 3878func (avacpc AzureVMAppContainerProtectableContainer) AsProtectableContainer() (*ProtectableContainer, bool) { 3879 return nil, false 3880} 3881 3882// AsBasicProtectableContainer is the BasicProtectableContainer implementation for AzureVMAppContainerProtectableContainer. 3883func (avacpc AzureVMAppContainerProtectableContainer) AsBasicProtectableContainer() (BasicProtectableContainer, bool) { 3884 return &avacpc, true 3885} 3886 3887// AzureVMAppContainerProtectionContainer container for SQL workloads under Azure Virtual Machines. 3888type AzureVMAppContainerProtectionContainer struct { 3889 // SourceResourceID - ARM ID of the virtual machine represented by this Azure Workload Container 3890 SourceResourceID *string `json:"sourceResourceId,omitempty"` 3891 // LastUpdatedTime - Time stamp when this container was updated. 3892 LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"` 3893 // ExtendedInfo - Additional details of a workload container. 3894 ExtendedInfo *AzureWorkloadContainerExtendedInfo `json:"extendedInfo,omitempty"` 3895 // 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' 3896 WorkloadType WorkloadType `json:"workloadType,omitempty"` 3897 // OperationType - Re-Do Operation. Possible values include: 'OperationTypeInvalid', 'OperationTypeRegister', 'OperationTypeReregister' 3898 OperationType OperationType `json:"operationType,omitempty"` 3899 // FriendlyName - Friendly name of the container. 3900 FriendlyName *string `json:"friendlyName,omitempty"` 3901 // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 3902 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 3903 // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. 3904 RegistrationStatus *string `json:"registrationStatus,omitempty"` 3905 // HealthStatus - Status of health of the container. 3906 HealthStatus *string `json:"healthStatus,omitempty"` 3907 // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' 3908 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` 3909} 3910 3911// MarshalJSON is the custom marshaler for AzureVMAppContainerProtectionContainer. 3912func (avacpc AzureVMAppContainerProtectionContainer) MarshalJSON() ([]byte, error) { 3913 avacpc.ContainerType = ContainerTypeVMAppContainer1 3914 objectMap := make(map[string]interface{}) 3915 if avacpc.SourceResourceID != nil { 3916 objectMap["sourceResourceId"] = avacpc.SourceResourceID 3917 } 3918 if avacpc.LastUpdatedTime != nil { 3919 objectMap["lastUpdatedTime"] = avacpc.LastUpdatedTime 3920 } 3921 if avacpc.ExtendedInfo != nil { 3922 objectMap["extendedInfo"] = avacpc.ExtendedInfo 3923 } 3924 if avacpc.WorkloadType != "" { 3925 objectMap["workloadType"] = avacpc.WorkloadType 3926 } 3927 if avacpc.OperationType != "" { 3928 objectMap["operationType"] = avacpc.OperationType 3929 } 3930 if avacpc.FriendlyName != nil { 3931 objectMap["friendlyName"] = avacpc.FriendlyName 3932 } 3933 if avacpc.BackupManagementType != "" { 3934 objectMap["backupManagementType"] = avacpc.BackupManagementType 3935 } 3936 if avacpc.RegistrationStatus != nil { 3937 objectMap["registrationStatus"] = avacpc.RegistrationStatus 3938 } 3939 if avacpc.HealthStatus != nil { 3940 objectMap["healthStatus"] = avacpc.HealthStatus 3941 } 3942 if avacpc.ContainerType != "" { 3943 objectMap["containerType"] = avacpc.ContainerType 3944 } 3945 return json.Marshal(objectMap) 3946} 3947 3948// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. 3949func (avacpc AzureVMAppContainerProtectionContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { 3950 return nil, false 3951} 3952 3953// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. 3954func (avacpc AzureVMAppContainerProtectionContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { 3955 return nil, false 3956} 3957 3958// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. 3959func (avacpc AzureVMAppContainerProtectionContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { 3960 return nil, false 3961} 3962 3963// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. 3964func (avacpc AzureVMAppContainerProtectionContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { 3965 return nil, false 3966} 3967 3968// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. 3969func (avacpc AzureVMAppContainerProtectionContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { 3970 return nil, false 3971} 3972 3973// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. 3974func (avacpc AzureVMAppContainerProtectionContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { 3975 return nil, false 3976} 3977 3978// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. 3979func (avacpc AzureVMAppContainerProtectionContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { 3980 return &avacpc, true 3981} 3982 3983// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. 3984func (avacpc AzureVMAppContainerProtectionContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { 3985 return nil, false 3986} 3987 3988// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. 3989func (avacpc AzureVMAppContainerProtectionContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { 3990 return &avacpc, true 3991} 3992 3993// AsDpmContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. 3994func (avacpc AzureVMAppContainerProtectionContainer) AsDpmContainer() (*DpmContainer, bool) { 3995 return nil, false 3996} 3997 3998// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. 3999func (avacpc AzureVMAppContainerProtectionContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { 4000 return nil, false 4001} 4002 4003// AsGenericContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. 4004func (avacpc AzureVMAppContainerProtectionContainer) AsGenericContainer() (*GenericContainer, bool) { 4005 return nil, false 4006} 4007 4008// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. 4009func (avacpc AzureVMAppContainerProtectionContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { 4010 return nil, false 4011} 4012 4013// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. 4014func (avacpc AzureVMAppContainerProtectionContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { 4015 return nil, false 4016} 4017 4018// AsMabContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. 4019func (avacpc AzureVMAppContainerProtectionContainer) AsMabContainer() (*MabContainer, bool) { 4020 return nil, false 4021} 4022 4023// AsProtectionContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. 4024func (avacpc AzureVMAppContainerProtectionContainer) AsProtectionContainer() (*ProtectionContainer, bool) { 4025 return nil, false 4026} 4027 4028// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. 4029func (avacpc AzureVMAppContainerProtectionContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { 4030 return &avacpc, true 4031} 4032 4033// AzureVMResourceFeatureSupportRequest azureResource(IaaS VM) Specific feature support request 4034type AzureVMResourceFeatureSupportRequest struct { 4035 // VMSize - Size of the resource: VM size(A/D series etc) in case of IaasVM 4036 VMSize *string `json:"vmSize,omitempty"` 4037 // VMSku - SKUs (Premium/Managed etc) in case of IaasVM 4038 VMSku *string `json:"vmSku,omitempty"` 4039 // FeatureType - Possible values include: 'FeatureTypeFeatureSupportRequest', 'FeatureTypeAzureBackupGoals', 'FeatureTypeAzureVMResourceBackup' 4040 FeatureType FeatureType `json:"featureType,omitempty"` 4041} 4042 4043// MarshalJSON is the custom marshaler for AzureVMResourceFeatureSupportRequest. 4044func (avrfsr AzureVMResourceFeatureSupportRequest) MarshalJSON() ([]byte, error) { 4045 avrfsr.FeatureType = FeatureTypeAzureVMResourceBackup 4046 objectMap := make(map[string]interface{}) 4047 if avrfsr.VMSize != nil { 4048 objectMap["vmSize"] = avrfsr.VMSize 4049 } 4050 if avrfsr.VMSku != nil { 4051 objectMap["vmSku"] = avrfsr.VMSku 4052 } 4053 if avrfsr.FeatureType != "" { 4054 objectMap["featureType"] = avrfsr.FeatureType 4055 } 4056 return json.Marshal(objectMap) 4057} 4058 4059// AsAzureBackupGoalFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureVMResourceFeatureSupportRequest. 4060func (avrfsr AzureVMResourceFeatureSupportRequest) AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool) { 4061 return nil, false 4062} 4063 4064// AsAzureVMResourceFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureVMResourceFeatureSupportRequest. 4065func (avrfsr AzureVMResourceFeatureSupportRequest) AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool) { 4066 return &avrfsr, true 4067} 4068 4069// AsFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureVMResourceFeatureSupportRequest. 4070func (avrfsr AzureVMResourceFeatureSupportRequest) AsFeatureSupportRequest() (*FeatureSupportRequest, bool) { 4071 return nil, false 4072} 4073 4074// AsBasicFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureVMResourceFeatureSupportRequest. 4075func (avrfsr AzureVMResourceFeatureSupportRequest) AsBasicFeatureSupportRequest() (BasicFeatureSupportRequest, bool) { 4076 return &avrfsr, true 4077} 4078 4079// AzureVMResourceFeatureSupportResponse response for feature support requests for Azure IaasVm 4080type AzureVMResourceFeatureSupportResponse struct { 4081 autorest.Response `json:"-"` 4082 // SupportStatus - Support status of feature. Possible values include: 'SupportStatusInvalid', 'SupportStatusSupported', 'SupportStatusDefaultOFF', 'SupportStatusDefaultON', 'SupportStatusNotSupported' 4083 SupportStatus SupportStatus `json:"supportStatus,omitempty"` 4084} 4085 4086// BasicAzureVMWorkloadItem azure VM workload-specific workload item. 4087type BasicAzureVMWorkloadItem interface { 4088 AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) 4089 AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) 4090 AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) 4091 AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) 4092 AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) 4093 AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) 4094 AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) 4095} 4096 4097// AzureVMWorkloadItem azure VM workload-specific workload item. 4098type AzureVMWorkloadItem struct { 4099 // ParentName - Name for instance or AG 4100 ParentName *string `json:"parentName,omitempty"` 4101 // ServerName - Host/Cluster Name for instance or AG 4102 ServerName *string `json:"serverName,omitempty"` 4103 // IsAutoProtectable - Indicates if workload item is auto-protectable 4104 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` 4105 // Subinquireditemcount - For instance or AG, indicates number of DB's present 4106 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` 4107 // SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected 4108 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` 4109 // BackupManagementType - Type of backup management to backup an item. 4110 BackupManagementType *string `json:"backupManagementType,omitempty"` 4111 // WorkloadType - Type of workload for the backup management 4112 WorkloadType *string `json:"workloadType,omitempty"` 4113 // FriendlyName - Friendly name of the backup item. 4114 FriendlyName *string `json:"friendlyName,omitempty"` 4115 // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 4116 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 4117 // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' 4118 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` 4119} 4120 4121func unmarshalBasicAzureVMWorkloadItem(body []byte) (BasicAzureVMWorkloadItem, error) { 4122 var m map[string]interface{} 4123 err := json.Unmarshal(body, &m) 4124 if err != nil { 4125 return nil, err 4126 } 4127 4128 switch m["workloadItemType"] { 4129 case string(WorkloadItemTypeSAPAseDatabase1): 4130 var avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem 4131 err := json.Unmarshal(body, &avwsadwi) 4132 return avwsadwi, err 4133 case string(WorkloadItemTypeSAPAseSystem1): 4134 var avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem 4135 err := json.Unmarshal(body, &avwsaswi) 4136 return avwsaswi, err 4137 case string(WorkloadItemTypeSAPHanaDatabase1): 4138 var avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem 4139 err := json.Unmarshal(body, &avwshdwi) 4140 return avwshdwi, err 4141 case string(WorkloadItemTypeSAPHanaSystem1): 4142 var avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem 4143 err := json.Unmarshal(body, &avwshswi) 4144 return avwshswi, err 4145 case string(WorkloadItemTypeSQLDataBase1): 4146 var avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem 4147 err := json.Unmarshal(body, &avwsdwi) 4148 return avwsdwi, err 4149 case string(WorkloadItemTypeSQLInstance1): 4150 var avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem 4151 err := json.Unmarshal(body, &avwsiwi) 4152 return avwsiwi, err 4153 default: 4154 var avwi AzureVMWorkloadItem 4155 err := json.Unmarshal(body, &avwi) 4156 return avwi, err 4157 } 4158} 4159func unmarshalBasicAzureVMWorkloadItemArray(body []byte) ([]BasicAzureVMWorkloadItem, error) { 4160 var rawMessages []*json.RawMessage 4161 err := json.Unmarshal(body, &rawMessages) 4162 if err != nil { 4163 return nil, err 4164 } 4165 4166 avwiArray := make([]BasicAzureVMWorkloadItem, len(rawMessages)) 4167 4168 for index, rawMessage := range rawMessages { 4169 avwi, err := unmarshalBasicAzureVMWorkloadItem(*rawMessage) 4170 if err != nil { 4171 return nil, err 4172 } 4173 avwiArray[index] = avwi 4174 } 4175 return avwiArray, nil 4176} 4177 4178// MarshalJSON is the custom marshaler for AzureVMWorkloadItem. 4179func (avwi AzureVMWorkloadItem) MarshalJSON() ([]byte, error) { 4180 avwi.WorkloadItemType = WorkloadItemTypeAzureVMWorkloadItem 4181 objectMap := make(map[string]interface{}) 4182 if avwi.ParentName != nil { 4183 objectMap["parentName"] = avwi.ParentName 4184 } 4185 if avwi.ServerName != nil { 4186 objectMap["serverName"] = avwi.ServerName 4187 } 4188 if avwi.IsAutoProtectable != nil { 4189 objectMap["isAutoProtectable"] = avwi.IsAutoProtectable 4190 } 4191 if avwi.Subinquireditemcount != nil { 4192 objectMap["subinquireditemcount"] = avwi.Subinquireditemcount 4193 } 4194 if avwi.SubWorkloadItemCount != nil { 4195 objectMap["subWorkloadItemCount"] = avwi.SubWorkloadItemCount 4196 } 4197 if avwi.BackupManagementType != nil { 4198 objectMap["backupManagementType"] = avwi.BackupManagementType 4199 } 4200 if avwi.WorkloadType != nil { 4201 objectMap["workloadType"] = avwi.WorkloadType 4202 } 4203 if avwi.FriendlyName != nil { 4204 objectMap["friendlyName"] = avwi.FriendlyName 4205 } 4206 if avwi.ProtectionState != "" { 4207 objectMap["protectionState"] = avwi.ProtectionState 4208 } 4209 if avwi.WorkloadItemType != "" { 4210 objectMap["workloadItemType"] = avwi.WorkloadItemType 4211 } 4212 return json.Marshal(objectMap) 4213} 4214 4215// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. 4216func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { 4217 return &avwi, true 4218} 4219 4220// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. 4221func (avwi AzureVMWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { 4222 return &avwi, true 4223} 4224 4225// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. 4226func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { 4227 return nil, false 4228} 4229 4230// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. 4231func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { 4232 return nil, false 4233} 4234 4235// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. 4236func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { 4237 return nil, false 4238} 4239 4240// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. 4241func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { 4242 return nil, false 4243} 4244 4245// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. 4246func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { 4247 return nil, false 4248} 4249 4250// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. 4251func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { 4252 return nil, false 4253} 4254 4255// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. 4256func (avwi AzureVMWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { 4257 return nil, false 4258} 4259 4260// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. 4261func (avwi AzureVMWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { 4262 return &avwi, true 4263} 4264 4265// BasicAzureVMWorkloadProtectableItem azure VM workload-specific protectable item. 4266type BasicAzureVMWorkloadProtectableItem interface { 4267 AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) 4268 AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) 4269 AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) 4270 AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) 4271 AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) 4272 AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) 4273 AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) 4274} 4275 4276// AzureVMWorkloadProtectableItem azure VM workload-specific protectable item. 4277type AzureVMWorkloadProtectableItem struct { 4278 // ParentName - Name for instance or AG 4279 ParentName *string `json:"parentName,omitempty"` 4280 // ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent 4281 // Only Applicable for data bases where the parent would be either Instance or a SQL AG. 4282 ParentUniqueName *string `json:"parentUniqueName,omitempty"` 4283 // ServerName - Host/Cluster Name for instance or AG 4284 ServerName *string `json:"serverName,omitempty"` 4285 // IsAutoProtectable - Indicates if protectable item is auto-protectable 4286 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` 4287 // IsAutoProtected - Indicates if protectable item is auto-protected 4288 IsAutoProtected *bool `json:"isAutoProtected,omitempty"` 4289 // Subinquireditemcount - For instance or AG, indicates number of DB's present 4290 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` 4291 // Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected 4292 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` 4293 // Prebackupvalidation - Pre-backup validation for protectable objects 4294 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` 4295 // BackupManagementType - Type of backup management to backup an item. 4296 BackupManagementType *string `json:"backupManagementType,omitempty"` 4297 // WorkloadType - Type of workload for the backup management 4298 WorkloadType *string `json:"workloadType,omitempty"` 4299 // FriendlyName - Friendly name of the backup item. 4300 FriendlyName *string `json:"friendlyName,omitempty"` 4301 // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 4302 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 4303 // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' 4304 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` 4305} 4306 4307func unmarshalBasicAzureVMWorkloadProtectableItem(body []byte) (BasicAzureVMWorkloadProtectableItem, error) { 4308 var m map[string]interface{} 4309 err := json.Unmarshal(body, &m) 4310 if err != nil { 4311 return nil, err 4312 } 4313 4314 switch m["protectableItemType"] { 4315 case string(ProtectableItemTypeSAPAseSystem): 4316 var avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem 4317 err := json.Unmarshal(body, &avwsaspi) 4318 return avwsaspi, err 4319 case string(ProtectableItemTypeSAPHanaDatabase): 4320 var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem 4321 err := json.Unmarshal(body, &avwshdpi) 4322 return avwshdpi, err 4323 case string(ProtectableItemTypeSAPHanaSystem): 4324 var avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem 4325 err := json.Unmarshal(body, &avwshspi) 4326 return avwshspi, err 4327 case string(ProtectableItemTypeSQLAvailabilityGroupContainer): 4328 var avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem 4329 err := json.Unmarshal(body, &avwsagpi) 4330 return avwsagpi, err 4331 case string(ProtectableItemTypeSQLDataBase): 4332 var avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem 4333 err := json.Unmarshal(body, &avwsdpi) 4334 return avwsdpi, err 4335 case string(ProtectableItemTypeSQLInstance): 4336 var avwsipi AzureVMWorkloadSQLInstanceProtectableItem 4337 err := json.Unmarshal(body, &avwsipi) 4338 return avwsipi, err 4339 default: 4340 var avwpi AzureVMWorkloadProtectableItem 4341 err := json.Unmarshal(body, &avwpi) 4342 return avwpi, err 4343 } 4344} 4345func unmarshalBasicAzureVMWorkloadProtectableItemArray(body []byte) ([]BasicAzureVMWorkloadProtectableItem, error) { 4346 var rawMessages []*json.RawMessage 4347 err := json.Unmarshal(body, &rawMessages) 4348 if err != nil { 4349 return nil, err 4350 } 4351 4352 avwpiArray := make([]BasicAzureVMWorkloadProtectableItem, len(rawMessages)) 4353 4354 for index, rawMessage := range rawMessages { 4355 avwpi, err := unmarshalBasicAzureVMWorkloadProtectableItem(*rawMessage) 4356 if err != nil { 4357 return nil, err 4358 } 4359 avwpiArray[index] = avwpi 4360 } 4361 return avwpiArray, nil 4362} 4363 4364// MarshalJSON is the custom marshaler for AzureVMWorkloadProtectableItem. 4365func (avwpi AzureVMWorkloadProtectableItem) MarshalJSON() ([]byte, error) { 4366 avwpi.ProtectableItemType = ProtectableItemTypeAzureVMWorkloadProtectableItem 4367 objectMap := make(map[string]interface{}) 4368 if avwpi.ParentName != nil { 4369 objectMap["parentName"] = avwpi.ParentName 4370 } 4371 if avwpi.ParentUniqueName != nil { 4372 objectMap["parentUniqueName"] = avwpi.ParentUniqueName 4373 } 4374 if avwpi.ServerName != nil { 4375 objectMap["serverName"] = avwpi.ServerName 4376 } 4377 if avwpi.IsAutoProtectable != nil { 4378 objectMap["isAutoProtectable"] = avwpi.IsAutoProtectable 4379 } 4380 if avwpi.IsAutoProtected != nil { 4381 objectMap["isAutoProtected"] = avwpi.IsAutoProtected 4382 } 4383 if avwpi.Subinquireditemcount != nil { 4384 objectMap["subinquireditemcount"] = avwpi.Subinquireditemcount 4385 } 4386 if avwpi.Subprotectableitemcount != nil { 4387 objectMap["subprotectableitemcount"] = avwpi.Subprotectableitemcount 4388 } 4389 if avwpi.Prebackupvalidation != nil { 4390 objectMap["prebackupvalidation"] = avwpi.Prebackupvalidation 4391 } 4392 if avwpi.BackupManagementType != nil { 4393 objectMap["backupManagementType"] = avwpi.BackupManagementType 4394 } 4395 if avwpi.WorkloadType != nil { 4396 objectMap["workloadType"] = avwpi.WorkloadType 4397 } 4398 if avwpi.FriendlyName != nil { 4399 objectMap["friendlyName"] = avwpi.FriendlyName 4400 } 4401 if avwpi.ProtectionState != "" { 4402 objectMap["protectionState"] = avwpi.ProtectionState 4403 } 4404 if avwpi.ProtectableItemType != "" { 4405 objectMap["protectableItemType"] = avwpi.ProtectableItemType 4406 } 4407 return json.Marshal(objectMap) 4408} 4409 4410// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. 4411func (avwpi AzureVMWorkloadProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { 4412 return nil, false 4413} 4414 4415// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. 4416func (avwpi AzureVMWorkloadProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { 4417 return nil, false 4418} 4419 4420// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. 4421func (avwpi AzureVMWorkloadProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { 4422 return nil, false 4423} 4424 4425// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. 4426func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { 4427 return &avwpi, true 4428} 4429 4430// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. 4431func (avwpi AzureVMWorkloadProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { 4432 return &avwpi, true 4433} 4434 4435// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. 4436func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { 4437 return nil, false 4438} 4439 4440// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. 4441func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { 4442 return nil, false 4443} 4444 4445// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. 4446func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { 4447 return nil, false 4448} 4449 4450// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. 4451func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { 4452 return nil, false 4453} 4454 4455// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. 4456func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { 4457 return nil, false 4458} 4459 4460// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. 4461func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { 4462 return nil, false 4463} 4464 4465// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. 4466func (avwpi AzureVMWorkloadProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { 4467 return nil, false 4468} 4469 4470// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. 4471func (avwpi AzureVMWorkloadProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { 4472 return nil, false 4473} 4474 4475// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. 4476func (avwpi AzureVMWorkloadProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { 4477 return nil, false 4478} 4479 4480// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. 4481func (avwpi AzureVMWorkloadProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { 4482 return &avwpi, true 4483} 4484 4485// BasicAzureVMWorkloadProtectedItem azure VM workload-specific protected item. 4486type BasicAzureVMWorkloadProtectedItem interface { 4487 AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) 4488 AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) 4489 AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) 4490 AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) 4491} 4492 4493// AzureVMWorkloadProtectedItem azure VM workload-specific protected item. 4494type AzureVMWorkloadProtectedItem struct { 4495 // FriendlyName - Friendly name of the DB represented by this backup item. 4496 FriendlyName *string `json:"friendlyName,omitempty"` 4497 // ServerName - Host/Cluster Name for instance or AG 4498 ServerName *string `json:"serverName,omitempty"` 4499 // ParentName - Parent name of the DB such as Instance or Availability Group. 4500 ParentName *string `json:"parentName,omitempty"` 4501 // ParentType - Parent type of protected item, example: for a DB, standalone server or distributed 4502 ParentType *string `json:"parentType,omitempty"` 4503 // ProtectionStatus - Backup status of this backup item. 4504 ProtectionStatus *string `json:"protectionStatus,omitempty"` 4505 // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' 4506 ProtectionState ProtectionState `json:"protectionState,omitempty"` 4507 // LastBackupStatus - Last backup operation status. Possible values: Healthy, Unhealthy. Possible values include: 'LastBackupStatusInvalid', 'LastBackupStatusHealthy', 'LastBackupStatusUnhealthy', 'LastBackupStatusIRPending' 4508 LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"` 4509 // LastBackupTime - Timestamp of the last backup operation on this backup item. 4510 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` 4511 // LastBackupErrorDetail - Error details in last backup 4512 LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"` 4513 // ProtectedItemDataSourceID - Data ID of the protected item. 4514 ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"` 4515 // ProtectedItemHealthStatus - Health status of the backup item, evaluated based on last heartbeat received. Possible values include: 'ProtectedItemHealthStatusInvalid', 'ProtectedItemHealthStatusHealthy', 'ProtectedItemHealthStatusUnhealthy', 'ProtectedItemHealthStatusNotReachable', 'ProtectedItemHealthStatusIRPending' 4516 ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"` 4517 // ExtendedInfo - Additional information for this backup item. 4518 ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` 4519 // KpisHealths - Health details of different KPIs 4520 KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"` 4521 // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 4522 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 4523 // 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' 4524 WorkloadType DataSourceType `json:"workloadType,omitempty"` 4525 // ContainerName - Unique name of container 4526 ContainerName *string `json:"containerName,omitempty"` 4527 // SourceResourceID - ARM ID of the resource to be backed up. 4528 SourceResourceID *string `json:"sourceResourceId,omitempty"` 4529 // PolicyID - ID of the backup policy with which this item is backed up. 4530 PolicyID *string `json:"policyId,omitempty"` 4531 // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. 4532 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` 4533 // BackupSetName - Name of the backup set the backup item belongs to 4534 BackupSetName *string `json:"backupSetName,omitempty"` 4535 // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' 4536 CreateMode CreateMode `json:"createMode,omitempty"` 4537 // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC 4538 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` 4539 // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete 4540 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` 4541 // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted 4542 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` 4543 // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon 4544 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` 4545 // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state 4546 IsRehydrate *bool `json:"isRehydrate,omitempty"` 4547 // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' 4548 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` 4549} 4550 4551func unmarshalBasicAzureVMWorkloadProtectedItem(body []byte) (BasicAzureVMWorkloadProtectedItem, error) { 4552 var m map[string]interface{} 4553 err := json.Unmarshal(body, &m) 4554 if err != nil { 4555 return nil, err 4556 } 4557 4558 switch m["protectedItemType"] { 4559 case string(ProtectedItemTypeAzureVMWorkloadSAPAseDatabase): 4560 var avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem 4561 err := json.Unmarshal(body, &avwsadpi) 4562 return avwsadpi, err 4563 case string(ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase): 4564 var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem 4565 err := json.Unmarshal(body, &avwshdpi) 4566 return avwshdpi, err 4567 case string(ProtectedItemTypeAzureVMWorkloadSQLDatabase): 4568 var avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem 4569 err := json.Unmarshal(body, &avwsdpi) 4570 return avwsdpi, err 4571 default: 4572 var avwpi AzureVMWorkloadProtectedItem 4573 err := json.Unmarshal(body, &avwpi) 4574 return avwpi, err 4575 } 4576} 4577func unmarshalBasicAzureVMWorkloadProtectedItemArray(body []byte) ([]BasicAzureVMWorkloadProtectedItem, error) { 4578 var rawMessages []*json.RawMessage 4579 err := json.Unmarshal(body, &rawMessages) 4580 if err != nil { 4581 return nil, err 4582 } 4583 4584 avwpiArray := make([]BasicAzureVMWorkloadProtectedItem, len(rawMessages)) 4585 4586 for index, rawMessage := range rawMessages { 4587 avwpi, err := unmarshalBasicAzureVMWorkloadProtectedItem(*rawMessage) 4588 if err != nil { 4589 return nil, err 4590 } 4591 avwpiArray[index] = avwpi 4592 } 4593 return avwpiArray, nil 4594} 4595 4596// MarshalJSON is the custom marshaler for AzureVMWorkloadProtectedItem. 4597func (avwpi AzureVMWorkloadProtectedItem) MarshalJSON() ([]byte, error) { 4598 avwpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadProtectedItem 4599 objectMap := make(map[string]interface{}) 4600 if avwpi.FriendlyName != nil { 4601 objectMap["friendlyName"] = avwpi.FriendlyName 4602 } 4603 if avwpi.ServerName != nil { 4604 objectMap["serverName"] = avwpi.ServerName 4605 } 4606 if avwpi.ParentName != nil { 4607 objectMap["parentName"] = avwpi.ParentName 4608 } 4609 if avwpi.ParentType != nil { 4610 objectMap["parentType"] = avwpi.ParentType 4611 } 4612 if avwpi.ProtectionStatus != nil { 4613 objectMap["protectionStatus"] = avwpi.ProtectionStatus 4614 } 4615 if avwpi.ProtectionState != "" { 4616 objectMap["protectionState"] = avwpi.ProtectionState 4617 } 4618 if avwpi.LastBackupStatus != "" { 4619 objectMap["lastBackupStatus"] = avwpi.LastBackupStatus 4620 } 4621 if avwpi.LastBackupTime != nil { 4622 objectMap["lastBackupTime"] = avwpi.LastBackupTime 4623 } 4624 if avwpi.LastBackupErrorDetail != nil { 4625 objectMap["lastBackupErrorDetail"] = avwpi.LastBackupErrorDetail 4626 } 4627 if avwpi.ProtectedItemDataSourceID != nil { 4628 objectMap["protectedItemDataSourceId"] = avwpi.ProtectedItemDataSourceID 4629 } 4630 if avwpi.ProtectedItemHealthStatus != "" { 4631 objectMap["protectedItemHealthStatus"] = avwpi.ProtectedItemHealthStatus 4632 } 4633 if avwpi.ExtendedInfo != nil { 4634 objectMap["extendedInfo"] = avwpi.ExtendedInfo 4635 } 4636 if avwpi.KpisHealths != nil { 4637 objectMap["kpisHealths"] = avwpi.KpisHealths 4638 } 4639 if avwpi.BackupManagementType != "" { 4640 objectMap["backupManagementType"] = avwpi.BackupManagementType 4641 } 4642 if avwpi.WorkloadType != "" { 4643 objectMap["workloadType"] = avwpi.WorkloadType 4644 } 4645 if avwpi.ContainerName != nil { 4646 objectMap["containerName"] = avwpi.ContainerName 4647 } 4648 if avwpi.SourceResourceID != nil { 4649 objectMap["sourceResourceId"] = avwpi.SourceResourceID 4650 } 4651 if avwpi.PolicyID != nil { 4652 objectMap["policyId"] = avwpi.PolicyID 4653 } 4654 if avwpi.LastRecoveryPoint != nil { 4655 objectMap["lastRecoveryPoint"] = avwpi.LastRecoveryPoint 4656 } 4657 if avwpi.BackupSetName != nil { 4658 objectMap["backupSetName"] = avwpi.BackupSetName 4659 } 4660 if avwpi.CreateMode != "" { 4661 objectMap["createMode"] = avwpi.CreateMode 4662 } 4663 if avwpi.DeferredDeleteTimeInUTC != nil { 4664 objectMap["deferredDeleteTimeInUTC"] = avwpi.DeferredDeleteTimeInUTC 4665 } 4666 if avwpi.IsScheduledForDeferredDelete != nil { 4667 objectMap["isScheduledForDeferredDelete"] = avwpi.IsScheduledForDeferredDelete 4668 } 4669 if avwpi.DeferredDeleteTimeRemaining != nil { 4670 objectMap["deferredDeleteTimeRemaining"] = avwpi.DeferredDeleteTimeRemaining 4671 } 4672 if avwpi.IsDeferredDeleteScheduleUpcoming != nil { 4673 objectMap["isDeferredDeleteScheduleUpcoming"] = avwpi.IsDeferredDeleteScheduleUpcoming 4674 } 4675 if avwpi.IsRehydrate != nil { 4676 objectMap["isRehydrate"] = avwpi.IsRehydrate 4677 } 4678 if avwpi.ProtectedItemType != "" { 4679 objectMap["protectedItemType"] = avwpi.ProtectedItemType 4680 } 4681 return json.Marshal(objectMap) 4682} 4683 4684// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. 4685func (avwpi AzureVMWorkloadProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { 4686 return nil, false 4687} 4688 4689// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. 4690func (avwpi AzureVMWorkloadProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { 4691 return nil, false 4692} 4693 4694// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. 4695func (avwpi AzureVMWorkloadProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { 4696 return nil, false 4697} 4698 4699// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. 4700func (avwpi AzureVMWorkloadProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { 4701 return nil, false 4702} 4703 4704// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. 4705func (avwpi AzureVMWorkloadProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { 4706 return nil, false 4707} 4708 4709// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. 4710func (avwpi AzureVMWorkloadProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { 4711 return nil, false 4712} 4713 4714// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. 4715func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { 4716 return &avwpi, true 4717} 4718 4719// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. 4720func (avwpi AzureVMWorkloadProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { 4721 return &avwpi, true 4722} 4723 4724// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. 4725func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { 4726 return nil, false 4727} 4728 4729// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. 4730func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { 4731 return nil, false 4732} 4733 4734// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. 4735func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { 4736 return nil, false 4737} 4738 4739// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. 4740func (avwpi AzureVMWorkloadProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { 4741 return nil, false 4742} 4743 4744// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. 4745func (avwpi AzureVMWorkloadProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { 4746 return nil, false 4747} 4748 4749// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. 4750func (avwpi AzureVMWorkloadProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { 4751 return nil, false 4752} 4753 4754// AsProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. 4755func (avwpi AzureVMWorkloadProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { 4756 return nil, false 4757} 4758 4759// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. 4760func (avwpi AzureVMWorkloadProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { 4761 return &avwpi, true 4762} 4763 4764// AzureVMWorkloadProtectedItemExtendedInfo additional information on Azure Workload for SQL specific 4765// backup item. 4766type AzureVMWorkloadProtectedItemExtendedInfo struct { 4767 // OldestRecoveryPoint - The oldest backup copy available for this backup item. 4768 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"` 4769 // RecoveryPointCount - Number of backup copies available for this backup item. 4770 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"` 4771 // PolicyState - Indicates consistency of policy object and policy applied to this backup item. 4772 PolicyState *string `json:"policyState,omitempty"` 4773} 4774 4775// AzureVMWorkloadProtectionPolicy azure VM (Mercury) workload-specific backup policy. 4776type AzureVMWorkloadProtectionPolicy struct { 4777 // 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' 4778 WorkLoadType WorkloadType `json:"workLoadType,omitempty"` 4779 // Settings - Common settings for the backup management 4780 Settings *Settings `json:"settings,omitempty"` 4781 // SubProtectionPolicy - List of sub-protection policies which includes schedule and retention 4782 SubProtectionPolicy *[]SubProtectionPolicy `json:"subProtectionPolicy,omitempty"` 4783 // MakePolicyConsistent - Fix the policy inconsistency 4784 MakePolicyConsistent *bool `json:"makePolicyConsistent,omitempty"` 4785 // ProtectedItemsCount - Number of items associated with this policy. 4786 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` 4787 // BackupManagementType - Possible values include: 'BackupManagementTypeProtectionPolicy', 'BackupManagementTypeAzureWorkload', 'BackupManagementTypeAzureStorage', 'BackupManagementTypeAzureIaasVM', 'BackupManagementTypeAzureSQL', 'BackupManagementTypeGenericProtectionPolicy', 'BackupManagementTypeMAB' 4788 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"` 4789} 4790 4791// MarshalJSON is the custom marshaler for AzureVMWorkloadProtectionPolicy. 4792func (avwpp AzureVMWorkloadProtectionPolicy) MarshalJSON() ([]byte, error) { 4793 avwpp.BackupManagementType = BackupManagementTypeAzureWorkload 4794 objectMap := make(map[string]interface{}) 4795 if avwpp.WorkLoadType != "" { 4796 objectMap["workLoadType"] = avwpp.WorkLoadType 4797 } 4798 if avwpp.Settings != nil { 4799 objectMap["settings"] = avwpp.Settings 4800 } 4801 if avwpp.SubProtectionPolicy != nil { 4802 objectMap["subProtectionPolicy"] = avwpp.SubProtectionPolicy 4803 } 4804 if avwpp.MakePolicyConsistent != nil { 4805 objectMap["makePolicyConsistent"] = avwpp.MakePolicyConsistent 4806 } 4807 if avwpp.ProtectedItemsCount != nil { 4808 objectMap["protectedItemsCount"] = avwpp.ProtectedItemsCount 4809 } 4810 if avwpp.BackupManagementType != "" { 4811 objectMap["backupManagementType"] = avwpp.BackupManagementType 4812 } 4813 return json.Marshal(objectMap) 4814} 4815 4816// AsAzureVMWorkloadProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy. 4817func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) { 4818 return &avwpp, true 4819} 4820 4821// AsAzureFileShareProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy. 4822func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) { 4823 return nil, false 4824} 4825 4826// AsAzureIaaSVMProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy. 4827func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) { 4828 return nil, false 4829} 4830 4831// AsAzureSQLProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy. 4832func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) { 4833 return nil, false 4834} 4835 4836// AsGenericProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy. 4837func (avwpp AzureVMWorkloadProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) { 4838 return nil, false 4839} 4840 4841// AsMabProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy. 4842func (avwpp AzureVMWorkloadProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) { 4843 return nil, false 4844} 4845 4846// AsProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy. 4847func (avwpp AzureVMWorkloadProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) { 4848 return nil, false 4849} 4850 4851// AsBasicProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy. 4852func (avwpp AzureVMWorkloadProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) { 4853 return &avwpp, true 4854} 4855 4856// AzureVMWorkloadSAPAseDatabaseProtectedItem azure VM workload-specific protected item representing SAP 4857// ASE Database. 4858type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { 4859 // FriendlyName - Friendly name of the DB represented by this backup item. 4860 FriendlyName *string `json:"friendlyName,omitempty"` 4861 // ServerName - Host/Cluster Name for instance or AG 4862 ServerName *string `json:"serverName,omitempty"` 4863 // ParentName - Parent name of the DB such as Instance or Availability Group. 4864 ParentName *string `json:"parentName,omitempty"` 4865 // ParentType - Parent type of protected item, example: for a DB, standalone server or distributed 4866 ParentType *string `json:"parentType,omitempty"` 4867 // ProtectionStatus - Backup status of this backup item. 4868 ProtectionStatus *string `json:"protectionStatus,omitempty"` 4869 // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' 4870 ProtectionState ProtectionState `json:"protectionState,omitempty"` 4871 // LastBackupStatus - Last backup operation status. Possible values: Healthy, Unhealthy. Possible values include: 'LastBackupStatusInvalid', 'LastBackupStatusHealthy', 'LastBackupStatusUnhealthy', 'LastBackupStatusIRPending' 4872 LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"` 4873 // LastBackupTime - Timestamp of the last backup operation on this backup item. 4874 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` 4875 // LastBackupErrorDetail - Error details in last backup 4876 LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"` 4877 // ProtectedItemDataSourceID - Data ID of the protected item. 4878 ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"` 4879 // ProtectedItemHealthStatus - Health status of the backup item, evaluated based on last heartbeat received. Possible values include: 'ProtectedItemHealthStatusInvalid', 'ProtectedItemHealthStatusHealthy', 'ProtectedItemHealthStatusUnhealthy', 'ProtectedItemHealthStatusNotReachable', 'ProtectedItemHealthStatusIRPending' 4880 ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"` 4881 // ExtendedInfo - Additional information for this backup item. 4882 ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` 4883 // KpisHealths - Health details of different KPIs 4884 KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"` 4885 // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 4886 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 4887 // 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' 4888 WorkloadType DataSourceType `json:"workloadType,omitempty"` 4889 // ContainerName - Unique name of container 4890 ContainerName *string `json:"containerName,omitempty"` 4891 // SourceResourceID - ARM ID of the resource to be backed up. 4892 SourceResourceID *string `json:"sourceResourceId,omitempty"` 4893 // PolicyID - ID of the backup policy with which this item is backed up. 4894 PolicyID *string `json:"policyId,omitempty"` 4895 // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. 4896 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` 4897 // BackupSetName - Name of the backup set the backup item belongs to 4898 BackupSetName *string `json:"backupSetName,omitempty"` 4899 // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' 4900 CreateMode CreateMode `json:"createMode,omitempty"` 4901 // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC 4902 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` 4903 // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete 4904 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` 4905 // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted 4906 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` 4907 // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon 4908 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` 4909 // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state 4910 IsRehydrate *bool `json:"isRehydrate,omitempty"` 4911 // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' 4912 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` 4913} 4914 4915// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPAseDatabaseProtectedItem. 4916func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) MarshalJSON() ([]byte, error) { 4917 avwsadpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadSAPAseDatabase 4918 objectMap := make(map[string]interface{}) 4919 if avwsadpi.FriendlyName != nil { 4920 objectMap["friendlyName"] = avwsadpi.FriendlyName 4921 } 4922 if avwsadpi.ServerName != nil { 4923 objectMap["serverName"] = avwsadpi.ServerName 4924 } 4925 if avwsadpi.ParentName != nil { 4926 objectMap["parentName"] = avwsadpi.ParentName 4927 } 4928 if avwsadpi.ParentType != nil { 4929 objectMap["parentType"] = avwsadpi.ParentType 4930 } 4931 if avwsadpi.ProtectionStatus != nil { 4932 objectMap["protectionStatus"] = avwsadpi.ProtectionStatus 4933 } 4934 if avwsadpi.ProtectionState != "" { 4935 objectMap["protectionState"] = avwsadpi.ProtectionState 4936 } 4937 if avwsadpi.LastBackupStatus != "" { 4938 objectMap["lastBackupStatus"] = avwsadpi.LastBackupStatus 4939 } 4940 if avwsadpi.LastBackupTime != nil { 4941 objectMap["lastBackupTime"] = avwsadpi.LastBackupTime 4942 } 4943 if avwsadpi.LastBackupErrorDetail != nil { 4944 objectMap["lastBackupErrorDetail"] = avwsadpi.LastBackupErrorDetail 4945 } 4946 if avwsadpi.ProtectedItemDataSourceID != nil { 4947 objectMap["protectedItemDataSourceId"] = avwsadpi.ProtectedItemDataSourceID 4948 } 4949 if avwsadpi.ProtectedItemHealthStatus != "" { 4950 objectMap["protectedItemHealthStatus"] = avwsadpi.ProtectedItemHealthStatus 4951 } 4952 if avwsadpi.ExtendedInfo != nil { 4953 objectMap["extendedInfo"] = avwsadpi.ExtendedInfo 4954 } 4955 if avwsadpi.KpisHealths != nil { 4956 objectMap["kpisHealths"] = avwsadpi.KpisHealths 4957 } 4958 if avwsadpi.BackupManagementType != "" { 4959 objectMap["backupManagementType"] = avwsadpi.BackupManagementType 4960 } 4961 if avwsadpi.WorkloadType != "" { 4962 objectMap["workloadType"] = avwsadpi.WorkloadType 4963 } 4964 if avwsadpi.ContainerName != nil { 4965 objectMap["containerName"] = avwsadpi.ContainerName 4966 } 4967 if avwsadpi.SourceResourceID != nil { 4968 objectMap["sourceResourceId"] = avwsadpi.SourceResourceID 4969 } 4970 if avwsadpi.PolicyID != nil { 4971 objectMap["policyId"] = avwsadpi.PolicyID 4972 } 4973 if avwsadpi.LastRecoveryPoint != nil { 4974 objectMap["lastRecoveryPoint"] = avwsadpi.LastRecoveryPoint 4975 } 4976 if avwsadpi.BackupSetName != nil { 4977 objectMap["backupSetName"] = avwsadpi.BackupSetName 4978 } 4979 if avwsadpi.CreateMode != "" { 4980 objectMap["createMode"] = avwsadpi.CreateMode 4981 } 4982 if avwsadpi.DeferredDeleteTimeInUTC != nil { 4983 objectMap["deferredDeleteTimeInUTC"] = avwsadpi.DeferredDeleteTimeInUTC 4984 } 4985 if avwsadpi.IsScheduledForDeferredDelete != nil { 4986 objectMap["isScheduledForDeferredDelete"] = avwsadpi.IsScheduledForDeferredDelete 4987 } 4988 if avwsadpi.DeferredDeleteTimeRemaining != nil { 4989 objectMap["deferredDeleteTimeRemaining"] = avwsadpi.DeferredDeleteTimeRemaining 4990 } 4991 if avwsadpi.IsDeferredDeleteScheduleUpcoming != nil { 4992 objectMap["isDeferredDeleteScheduleUpcoming"] = avwsadpi.IsDeferredDeleteScheduleUpcoming 4993 } 4994 if avwsadpi.IsRehydrate != nil { 4995 objectMap["isRehydrate"] = avwsadpi.IsRehydrate 4996 } 4997 if avwsadpi.ProtectedItemType != "" { 4998 objectMap["protectedItemType"] = avwsadpi.ProtectedItemType 4999 } 5000 return json.Marshal(objectMap) 5001} 5002 5003// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. 5004func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { 5005 return nil, false 5006} 5007 5008// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. 5009func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { 5010 return nil, false 5011} 5012 5013// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. 5014func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { 5015 return nil, false 5016} 5017 5018// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. 5019func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { 5020 return nil, false 5021} 5022 5023// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. 5024func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { 5025 return nil, false 5026} 5027 5028// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. 5029func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { 5030 return nil, false 5031} 5032 5033// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. 5034func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { 5035 return nil, false 5036} 5037 5038// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. 5039func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { 5040 return &avwsadpi, true 5041} 5042 5043// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. 5044func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { 5045 return &avwsadpi, true 5046} 5047 5048// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. 5049func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { 5050 return nil, false 5051} 5052 5053// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. 5054func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { 5055 return nil, false 5056} 5057 5058// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. 5059func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { 5060 return nil, false 5061} 5062 5063// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. 5064func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { 5065 return nil, false 5066} 5067 5068// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. 5069func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { 5070 return nil, false 5071} 5072 5073// AsProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. 5074func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { 5075 return nil, false 5076} 5077 5078// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. 5079func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { 5080 return &avwsadpi, true 5081} 5082 5083// AzureVMWorkloadSAPAseDatabaseWorkloadItem azure VM workload-specific workload item representing SAP ASE 5084// Database. 5085type AzureVMWorkloadSAPAseDatabaseWorkloadItem struct { 5086 // ParentName - Name for instance or AG 5087 ParentName *string `json:"parentName,omitempty"` 5088 // ServerName - Host/Cluster Name for instance or AG 5089 ServerName *string `json:"serverName,omitempty"` 5090 // IsAutoProtectable - Indicates if workload item is auto-protectable 5091 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` 5092 // Subinquireditemcount - For instance or AG, indicates number of DB's present 5093 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` 5094 // SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected 5095 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` 5096 // BackupManagementType - Type of backup management to backup an item. 5097 BackupManagementType *string `json:"backupManagementType,omitempty"` 5098 // WorkloadType - Type of workload for the backup management 5099 WorkloadType *string `json:"workloadType,omitempty"` 5100 // FriendlyName - Friendly name of the backup item. 5101 FriendlyName *string `json:"friendlyName,omitempty"` 5102 // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 5103 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 5104 // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' 5105 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` 5106} 5107 5108// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPAseDatabaseWorkloadItem. 5109func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { 5110 avwsadwi.WorkloadItemType = WorkloadItemTypeSAPAseDatabase1 5111 objectMap := make(map[string]interface{}) 5112 if avwsadwi.ParentName != nil { 5113 objectMap["parentName"] = avwsadwi.ParentName 5114 } 5115 if avwsadwi.ServerName != nil { 5116 objectMap["serverName"] = avwsadwi.ServerName 5117 } 5118 if avwsadwi.IsAutoProtectable != nil { 5119 objectMap["isAutoProtectable"] = avwsadwi.IsAutoProtectable 5120 } 5121 if avwsadwi.Subinquireditemcount != nil { 5122 objectMap["subinquireditemcount"] = avwsadwi.Subinquireditemcount 5123 } 5124 if avwsadwi.SubWorkloadItemCount != nil { 5125 objectMap["subWorkloadItemCount"] = avwsadwi.SubWorkloadItemCount 5126 } 5127 if avwsadwi.BackupManagementType != nil { 5128 objectMap["backupManagementType"] = avwsadwi.BackupManagementType 5129 } 5130 if avwsadwi.WorkloadType != nil { 5131 objectMap["workloadType"] = avwsadwi.WorkloadType 5132 } 5133 if avwsadwi.FriendlyName != nil { 5134 objectMap["friendlyName"] = avwsadwi.FriendlyName 5135 } 5136 if avwsadwi.ProtectionState != "" { 5137 objectMap["protectionState"] = avwsadwi.ProtectionState 5138 } 5139 if avwsadwi.WorkloadItemType != "" { 5140 objectMap["workloadItemType"] = avwsadwi.WorkloadItemType 5141 } 5142 return json.Marshal(objectMap) 5143} 5144 5145// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. 5146func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { 5147 return nil, false 5148} 5149 5150// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. 5151func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { 5152 return &avwsadwi, true 5153} 5154 5155// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. 5156func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { 5157 return &avwsadwi, true 5158} 5159 5160// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. 5161func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { 5162 return nil, false 5163} 5164 5165// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. 5166func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { 5167 return nil, false 5168} 5169 5170// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. 5171func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { 5172 return nil, false 5173} 5174 5175// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. 5176func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { 5177 return nil, false 5178} 5179 5180// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. 5181func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { 5182 return nil, false 5183} 5184 5185// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. 5186func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { 5187 return nil, false 5188} 5189 5190// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. 5191func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { 5192 return &avwsadwi, true 5193} 5194 5195// AzureVMWorkloadSAPAseSystemProtectableItem azure VM workload-specific protectable item representing SAP 5196// ASE System. 5197type AzureVMWorkloadSAPAseSystemProtectableItem struct { 5198 // ParentName - Name for instance or AG 5199 ParentName *string `json:"parentName,omitempty"` 5200 // ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent 5201 // Only Applicable for data bases where the parent would be either Instance or a SQL AG. 5202 ParentUniqueName *string `json:"parentUniqueName,omitempty"` 5203 // ServerName - Host/Cluster Name for instance or AG 5204 ServerName *string `json:"serverName,omitempty"` 5205 // IsAutoProtectable - Indicates if protectable item is auto-protectable 5206 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` 5207 // IsAutoProtected - Indicates if protectable item is auto-protected 5208 IsAutoProtected *bool `json:"isAutoProtected,omitempty"` 5209 // Subinquireditemcount - For instance or AG, indicates number of DB's present 5210 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` 5211 // Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected 5212 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` 5213 // Prebackupvalidation - Pre-backup validation for protectable objects 5214 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` 5215 // BackupManagementType - Type of backup management to backup an item. 5216 BackupManagementType *string `json:"backupManagementType,omitempty"` 5217 // WorkloadType - Type of workload for the backup management 5218 WorkloadType *string `json:"workloadType,omitempty"` 5219 // FriendlyName - Friendly name of the backup item. 5220 FriendlyName *string `json:"friendlyName,omitempty"` 5221 // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 5222 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 5223 // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' 5224 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` 5225} 5226 5227// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPAseSystemProtectableItem. 5228func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) MarshalJSON() ([]byte, error) { 5229 avwsaspi.ProtectableItemType = ProtectableItemTypeSAPAseSystem 5230 objectMap := make(map[string]interface{}) 5231 if avwsaspi.ParentName != nil { 5232 objectMap["parentName"] = avwsaspi.ParentName 5233 } 5234 if avwsaspi.ParentUniqueName != nil { 5235 objectMap["parentUniqueName"] = avwsaspi.ParentUniqueName 5236 } 5237 if avwsaspi.ServerName != nil { 5238 objectMap["serverName"] = avwsaspi.ServerName 5239 } 5240 if avwsaspi.IsAutoProtectable != nil { 5241 objectMap["isAutoProtectable"] = avwsaspi.IsAutoProtectable 5242 } 5243 if avwsaspi.IsAutoProtected != nil { 5244 objectMap["isAutoProtected"] = avwsaspi.IsAutoProtected 5245 } 5246 if avwsaspi.Subinquireditemcount != nil { 5247 objectMap["subinquireditemcount"] = avwsaspi.Subinquireditemcount 5248 } 5249 if avwsaspi.Subprotectableitemcount != nil { 5250 objectMap["subprotectableitemcount"] = avwsaspi.Subprotectableitemcount 5251 } 5252 if avwsaspi.Prebackupvalidation != nil { 5253 objectMap["prebackupvalidation"] = avwsaspi.Prebackupvalidation 5254 } 5255 if avwsaspi.BackupManagementType != nil { 5256 objectMap["backupManagementType"] = avwsaspi.BackupManagementType 5257 } 5258 if avwsaspi.WorkloadType != nil { 5259 objectMap["workloadType"] = avwsaspi.WorkloadType 5260 } 5261 if avwsaspi.FriendlyName != nil { 5262 objectMap["friendlyName"] = avwsaspi.FriendlyName 5263 } 5264 if avwsaspi.ProtectionState != "" { 5265 objectMap["protectionState"] = avwsaspi.ProtectionState 5266 } 5267 if avwsaspi.ProtectableItemType != "" { 5268 objectMap["protectableItemType"] = avwsaspi.ProtectableItemType 5269 } 5270 return json.Marshal(objectMap) 5271} 5272 5273// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. 5274func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { 5275 return nil, false 5276} 5277 5278// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. 5279func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { 5280 return nil, false 5281} 5282 5283// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. 5284func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { 5285 return nil, false 5286} 5287 5288// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. 5289func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { 5290 return nil, false 5291} 5292 5293// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. 5294func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { 5295 return &avwsaspi, true 5296} 5297 5298// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. 5299func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { 5300 return &avwsaspi, true 5301} 5302 5303// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. 5304func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { 5305 return nil, false 5306} 5307 5308// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. 5309func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { 5310 return nil, false 5311} 5312 5313// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. 5314func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { 5315 return nil, false 5316} 5317 5318// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. 5319func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { 5320 return nil, false 5321} 5322 5323// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. 5324func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { 5325 return nil, false 5326} 5327 5328// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. 5329func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { 5330 return nil, false 5331} 5332 5333// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. 5334func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { 5335 return nil, false 5336} 5337 5338// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. 5339func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { 5340 return nil, false 5341} 5342 5343// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. 5344func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { 5345 return &avwsaspi, true 5346} 5347 5348// AzureVMWorkloadSAPAseSystemWorkloadItem azure VM workload-specific workload item representing SAP ASE 5349// System. 5350type AzureVMWorkloadSAPAseSystemWorkloadItem struct { 5351 // ParentName - Name for instance or AG 5352 ParentName *string `json:"parentName,omitempty"` 5353 // ServerName - Host/Cluster Name for instance or AG 5354 ServerName *string `json:"serverName,omitempty"` 5355 // IsAutoProtectable - Indicates if workload item is auto-protectable 5356 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` 5357 // Subinquireditemcount - For instance or AG, indicates number of DB's present 5358 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` 5359 // SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected 5360 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` 5361 // BackupManagementType - Type of backup management to backup an item. 5362 BackupManagementType *string `json:"backupManagementType,omitempty"` 5363 // WorkloadType - Type of workload for the backup management 5364 WorkloadType *string `json:"workloadType,omitempty"` 5365 // FriendlyName - Friendly name of the backup item. 5366 FriendlyName *string `json:"friendlyName,omitempty"` 5367 // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 5368 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 5369 // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' 5370 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` 5371} 5372 5373// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPAseSystemWorkloadItem. 5374func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) MarshalJSON() ([]byte, error) { 5375 avwsaswi.WorkloadItemType = WorkloadItemTypeSAPAseSystem1 5376 objectMap := make(map[string]interface{}) 5377 if avwsaswi.ParentName != nil { 5378 objectMap["parentName"] = avwsaswi.ParentName 5379 } 5380 if avwsaswi.ServerName != nil { 5381 objectMap["serverName"] = avwsaswi.ServerName 5382 } 5383 if avwsaswi.IsAutoProtectable != nil { 5384 objectMap["isAutoProtectable"] = avwsaswi.IsAutoProtectable 5385 } 5386 if avwsaswi.Subinquireditemcount != nil { 5387 objectMap["subinquireditemcount"] = avwsaswi.Subinquireditemcount 5388 } 5389 if avwsaswi.SubWorkloadItemCount != nil { 5390 objectMap["subWorkloadItemCount"] = avwsaswi.SubWorkloadItemCount 5391 } 5392 if avwsaswi.BackupManagementType != nil { 5393 objectMap["backupManagementType"] = avwsaswi.BackupManagementType 5394 } 5395 if avwsaswi.WorkloadType != nil { 5396 objectMap["workloadType"] = avwsaswi.WorkloadType 5397 } 5398 if avwsaswi.FriendlyName != nil { 5399 objectMap["friendlyName"] = avwsaswi.FriendlyName 5400 } 5401 if avwsaswi.ProtectionState != "" { 5402 objectMap["protectionState"] = avwsaswi.ProtectionState 5403 } 5404 if avwsaswi.WorkloadItemType != "" { 5405 objectMap["workloadItemType"] = avwsaswi.WorkloadItemType 5406 } 5407 return json.Marshal(objectMap) 5408} 5409 5410// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. 5411func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { 5412 return nil, false 5413} 5414 5415// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. 5416func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { 5417 return &avwsaswi, true 5418} 5419 5420// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. 5421func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { 5422 return nil, false 5423} 5424 5425// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. 5426func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { 5427 return &avwsaswi, true 5428} 5429 5430// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. 5431func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { 5432 return nil, false 5433} 5434 5435// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. 5436func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { 5437 return nil, false 5438} 5439 5440// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. 5441func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { 5442 return nil, false 5443} 5444 5445// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. 5446func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { 5447 return nil, false 5448} 5449 5450// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. 5451func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { 5452 return nil, false 5453} 5454 5455// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. 5456func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { 5457 return &avwsaswi, true 5458} 5459 5460// AzureVMWorkloadSAPHanaDatabaseProtectableItem azure VM workload-specific protectable item representing 5461// SAP HANA Database. 5462type AzureVMWorkloadSAPHanaDatabaseProtectableItem struct { 5463 // ParentName - Name for instance or AG 5464 ParentName *string `json:"parentName,omitempty"` 5465 // ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent 5466 // Only Applicable for data bases where the parent would be either Instance or a SQL AG. 5467 ParentUniqueName *string `json:"parentUniqueName,omitempty"` 5468 // ServerName - Host/Cluster Name for instance or AG 5469 ServerName *string `json:"serverName,omitempty"` 5470 // IsAutoProtectable - Indicates if protectable item is auto-protectable 5471 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` 5472 // IsAutoProtected - Indicates if protectable item is auto-protected 5473 IsAutoProtected *bool `json:"isAutoProtected,omitempty"` 5474 // Subinquireditemcount - For instance or AG, indicates number of DB's present 5475 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` 5476 // Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected 5477 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` 5478 // Prebackupvalidation - Pre-backup validation for protectable objects 5479 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` 5480 // BackupManagementType - Type of backup management to backup an item. 5481 BackupManagementType *string `json:"backupManagementType,omitempty"` 5482 // WorkloadType - Type of workload for the backup management 5483 WorkloadType *string `json:"workloadType,omitempty"` 5484 // FriendlyName - Friendly name of the backup item. 5485 FriendlyName *string `json:"friendlyName,omitempty"` 5486 // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 5487 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 5488 // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' 5489 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` 5490} 5491 5492// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPHanaDatabaseProtectableItem. 5493func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) MarshalJSON() ([]byte, error) { 5494 avwshdpi.ProtectableItemType = ProtectableItemTypeSAPHanaDatabase 5495 objectMap := make(map[string]interface{}) 5496 if avwshdpi.ParentName != nil { 5497 objectMap["parentName"] = avwshdpi.ParentName 5498 } 5499 if avwshdpi.ParentUniqueName != nil { 5500 objectMap["parentUniqueName"] = avwshdpi.ParentUniqueName 5501 } 5502 if avwshdpi.ServerName != nil { 5503 objectMap["serverName"] = avwshdpi.ServerName 5504 } 5505 if avwshdpi.IsAutoProtectable != nil { 5506 objectMap["isAutoProtectable"] = avwshdpi.IsAutoProtectable 5507 } 5508 if avwshdpi.IsAutoProtected != nil { 5509 objectMap["isAutoProtected"] = avwshdpi.IsAutoProtected 5510 } 5511 if avwshdpi.Subinquireditemcount != nil { 5512 objectMap["subinquireditemcount"] = avwshdpi.Subinquireditemcount 5513 } 5514 if avwshdpi.Subprotectableitemcount != nil { 5515 objectMap["subprotectableitemcount"] = avwshdpi.Subprotectableitemcount 5516 } 5517 if avwshdpi.Prebackupvalidation != nil { 5518 objectMap["prebackupvalidation"] = avwshdpi.Prebackupvalidation 5519 } 5520 if avwshdpi.BackupManagementType != nil { 5521 objectMap["backupManagementType"] = avwshdpi.BackupManagementType 5522 } 5523 if avwshdpi.WorkloadType != nil { 5524 objectMap["workloadType"] = avwshdpi.WorkloadType 5525 } 5526 if avwshdpi.FriendlyName != nil { 5527 objectMap["friendlyName"] = avwshdpi.FriendlyName 5528 } 5529 if avwshdpi.ProtectionState != "" { 5530 objectMap["protectionState"] = avwshdpi.ProtectionState 5531 } 5532 if avwshdpi.ProtectableItemType != "" { 5533 objectMap["protectableItemType"] = avwshdpi.ProtectableItemType 5534 } 5535 return json.Marshal(objectMap) 5536} 5537 5538// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. 5539func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { 5540 return nil, false 5541} 5542 5543// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. 5544func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { 5545 return nil, false 5546} 5547 5548// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. 5549func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { 5550 return nil, false 5551} 5552 5553// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. 5554func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { 5555 return nil, false 5556} 5557 5558// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. 5559func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { 5560 return &avwshdpi, true 5561} 5562 5563// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. 5564func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { 5565 return nil, false 5566} 5567 5568// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. 5569func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { 5570 return &avwshdpi, true 5571} 5572 5573// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. 5574func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { 5575 return nil, false 5576} 5577 5578// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. 5579func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { 5580 return nil, false 5581} 5582 5583// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. 5584func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { 5585 return nil, false 5586} 5587 5588// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. 5589func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { 5590 return nil, false 5591} 5592 5593// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. 5594func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { 5595 return nil, false 5596} 5597 5598// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. 5599func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { 5600 return nil, false 5601} 5602 5603// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. 5604func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { 5605 return nil, false 5606} 5607 5608// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. 5609func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { 5610 return &avwshdpi, true 5611} 5612 5613// AzureVMWorkloadSAPHanaDatabaseProtectedItem azure VM workload-specific protected item representing SAP 5614// HANA Database. 5615type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { 5616 // FriendlyName - Friendly name of the DB represented by this backup item. 5617 FriendlyName *string `json:"friendlyName,omitempty"` 5618 // ServerName - Host/Cluster Name for instance or AG 5619 ServerName *string `json:"serverName,omitempty"` 5620 // ParentName - Parent name of the DB such as Instance or Availability Group. 5621 ParentName *string `json:"parentName,omitempty"` 5622 // ParentType - Parent type of protected item, example: for a DB, standalone server or distributed 5623 ParentType *string `json:"parentType,omitempty"` 5624 // ProtectionStatus - Backup status of this backup item. 5625 ProtectionStatus *string `json:"protectionStatus,omitempty"` 5626 // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' 5627 ProtectionState ProtectionState `json:"protectionState,omitempty"` 5628 // LastBackupStatus - Last backup operation status. Possible values: Healthy, Unhealthy. Possible values include: 'LastBackupStatusInvalid', 'LastBackupStatusHealthy', 'LastBackupStatusUnhealthy', 'LastBackupStatusIRPending' 5629 LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"` 5630 // LastBackupTime - Timestamp of the last backup operation on this backup item. 5631 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` 5632 // LastBackupErrorDetail - Error details in last backup 5633 LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"` 5634 // ProtectedItemDataSourceID - Data ID of the protected item. 5635 ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"` 5636 // ProtectedItemHealthStatus - Health status of the backup item, evaluated based on last heartbeat received. Possible values include: 'ProtectedItemHealthStatusInvalid', 'ProtectedItemHealthStatusHealthy', 'ProtectedItemHealthStatusUnhealthy', 'ProtectedItemHealthStatusNotReachable', 'ProtectedItemHealthStatusIRPending' 5637 ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"` 5638 // ExtendedInfo - Additional information for this backup item. 5639 ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` 5640 // KpisHealths - Health details of different KPIs 5641 KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"` 5642 // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 5643 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 5644 // 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' 5645 WorkloadType DataSourceType `json:"workloadType,omitempty"` 5646 // ContainerName - Unique name of container 5647 ContainerName *string `json:"containerName,omitempty"` 5648 // SourceResourceID - ARM ID of the resource to be backed up. 5649 SourceResourceID *string `json:"sourceResourceId,omitempty"` 5650 // PolicyID - ID of the backup policy with which this item is backed up. 5651 PolicyID *string `json:"policyId,omitempty"` 5652 // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. 5653 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` 5654 // BackupSetName - Name of the backup set the backup item belongs to 5655 BackupSetName *string `json:"backupSetName,omitempty"` 5656 // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' 5657 CreateMode CreateMode `json:"createMode,omitempty"` 5658 // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC 5659 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` 5660 // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete 5661 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` 5662 // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted 5663 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` 5664 // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon 5665 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` 5666 // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state 5667 IsRehydrate *bool `json:"isRehydrate,omitempty"` 5668 // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' 5669 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` 5670} 5671 5672// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPHanaDatabaseProtectedItem. 5673func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) MarshalJSON() ([]byte, error) { 5674 avwshdpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase 5675 objectMap := make(map[string]interface{}) 5676 if avwshdpi.FriendlyName != nil { 5677 objectMap["friendlyName"] = avwshdpi.FriendlyName 5678 } 5679 if avwshdpi.ServerName != nil { 5680 objectMap["serverName"] = avwshdpi.ServerName 5681 } 5682 if avwshdpi.ParentName != nil { 5683 objectMap["parentName"] = avwshdpi.ParentName 5684 } 5685 if avwshdpi.ParentType != nil { 5686 objectMap["parentType"] = avwshdpi.ParentType 5687 } 5688 if avwshdpi.ProtectionStatus != nil { 5689 objectMap["protectionStatus"] = avwshdpi.ProtectionStatus 5690 } 5691 if avwshdpi.ProtectionState != "" { 5692 objectMap["protectionState"] = avwshdpi.ProtectionState 5693 } 5694 if avwshdpi.LastBackupStatus != "" { 5695 objectMap["lastBackupStatus"] = avwshdpi.LastBackupStatus 5696 } 5697 if avwshdpi.LastBackupTime != nil { 5698 objectMap["lastBackupTime"] = avwshdpi.LastBackupTime 5699 } 5700 if avwshdpi.LastBackupErrorDetail != nil { 5701 objectMap["lastBackupErrorDetail"] = avwshdpi.LastBackupErrorDetail 5702 } 5703 if avwshdpi.ProtectedItemDataSourceID != nil { 5704 objectMap["protectedItemDataSourceId"] = avwshdpi.ProtectedItemDataSourceID 5705 } 5706 if avwshdpi.ProtectedItemHealthStatus != "" { 5707 objectMap["protectedItemHealthStatus"] = avwshdpi.ProtectedItemHealthStatus 5708 } 5709 if avwshdpi.ExtendedInfo != nil { 5710 objectMap["extendedInfo"] = avwshdpi.ExtendedInfo 5711 } 5712 if avwshdpi.KpisHealths != nil { 5713 objectMap["kpisHealths"] = avwshdpi.KpisHealths 5714 } 5715 if avwshdpi.BackupManagementType != "" { 5716 objectMap["backupManagementType"] = avwshdpi.BackupManagementType 5717 } 5718 if avwshdpi.WorkloadType != "" { 5719 objectMap["workloadType"] = avwshdpi.WorkloadType 5720 } 5721 if avwshdpi.ContainerName != nil { 5722 objectMap["containerName"] = avwshdpi.ContainerName 5723 } 5724 if avwshdpi.SourceResourceID != nil { 5725 objectMap["sourceResourceId"] = avwshdpi.SourceResourceID 5726 } 5727 if avwshdpi.PolicyID != nil { 5728 objectMap["policyId"] = avwshdpi.PolicyID 5729 } 5730 if avwshdpi.LastRecoveryPoint != nil { 5731 objectMap["lastRecoveryPoint"] = avwshdpi.LastRecoveryPoint 5732 } 5733 if avwshdpi.BackupSetName != nil { 5734 objectMap["backupSetName"] = avwshdpi.BackupSetName 5735 } 5736 if avwshdpi.CreateMode != "" { 5737 objectMap["createMode"] = avwshdpi.CreateMode 5738 } 5739 if avwshdpi.DeferredDeleteTimeInUTC != nil { 5740 objectMap["deferredDeleteTimeInUTC"] = avwshdpi.DeferredDeleteTimeInUTC 5741 } 5742 if avwshdpi.IsScheduledForDeferredDelete != nil { 5743 objectMap["isScheduledForDeferredDelete"] = avwshdpi.IsScheduledForDeferredDelete 5744 } 5745 if avwshdpi.DeferredDeleteTimeRemaining != nil { 5746 objectMap["deferredDeleteTimeRemaining"] = avwshdpi.DeferredDeleteTimeRemaining 5747 } 5748 if avwshdpi.IsDeferredDeleteScheduleUpcoming != nil { 5749 objectMap["isDeferredDeleteScheduleUpcoming"] = avwshdpi.IsDeferredDeleteScheduleUpcoming 5750 } 5751 if avwshdpi.IsRehydrate != nil { 5752 objectMap["isRehydrate"] = avwshdpi.IsRehydrate 5753 } 5754 if avwshdpi.ProtectedItemType != "" { 5755 objectMap["protectedItemType"] = avwshdpi.ProtectedItemType 5756 } 5757 return json.Marshal(objectMap) 5758} 5759 5760// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. 5761func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { 5762 return nil, false 5763} 5764 5765// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. 5766func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { 5767 return nil, false 5768} 5769 5770// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. 5771func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { 5772 return nil, false 5773} 5774 5775// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. 5776func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { 5777 return nil, false 5778} 5779 5780// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. 5781func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { 5782 return nil, false 5783} 5784 5785// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. 5786func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { 5787 return nil, false 5788} 5789 5790// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. 5791func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { 5792 return nil, false 5793} 5794 5795// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. 5796func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { 5797 return &avwshdpi, true 5798} 5799 5800// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. 5801func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { 5802 return nil, false 5803} 5804 5805// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. 5806func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { 5807 return &avwshdpi, true 5808} 5809 5810// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. 5811func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { 5812 return nil, false 5813} 5814 5815// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. 5816func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { 5817 return nil, false 5818} 5819 5820// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. 5821func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { 5822 return nil, false 5823} 5824 5825// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. 5826func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { 5827 return nil, false 5828} 5829 5830// AsProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. 5831func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { 5832 return nil, false 5833} 5834 5835// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. 5836func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { 5837 return &avwshdpi, true 5838} 5839 5840// AzureVMWorkloadSAPHanaDatabaseWorkloadItem azure VM workload-specific workload item representing SAP 5841// HANA Database. 5842type AzureVMWorkloadSAPHanaDatabaseWorkloadItem struct { 5843 // ParentName - Name for instance or AG 5844 ParentName *string `json:"parentName,omitempty"` 5845 // ServerName - Host/Cluster Name for instance or AG 5846 ServerName *string `json:"serverName,omitempty"` 5847 // IsAutoProtectable - Indicates if workload item is auto-protectable 5848 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` 5849 // Subinquireditemcount - For instance or AG, indicates number of DB's present 5850 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` 5851 // SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected 5852 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` 5853 // BackupManagementType - Type of backup management to backup an item. 5854 BackupManagementType *string `json:"backupManagementType,omitempty"` 5855 // WorkloadType - Type of workload for the backup management 5856 WorkloadType *string `json:"workloadType,omitempty"` 5857 // FriendlyName - Friendly name of the backup item. 5858 FriendlyName *string `json:"friendlyName,omitempty"` 5859 // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 5860 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 5861 // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' 5862 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` 5863} 5864 5865// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. 5866func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { 5867 avwshdwi.WorkloadItemType = WorkloadItemTypeSAPHanaDatabase1 5868 objectMap := make(map[string]interface{}) 5869 if avwshdwi.ParentName != nil { 5870 objectMap["parentName"] = avwshdwi.ParentName 5871 } 5872 if avwshdwi.ServerName != nil { 5873 objectMap["serverName"] = avwshdwi.ServerName 5874 } 5875 if avwshdwi.IsAutoProtectable != nil { 5876 objectMap["isAutoProtectable"] = avwshdwi.IsAutoProtectable 5877 } 5878 if avwshdwi.Subinquireditemcount != nil { 5879 objectMap["subinquireditemcount"] = avwshdwi.Subinquireditemcount 5880 } 5881 if avwshdwi.SubWorkloadItemCount != nil { 5882 objectMap["subWorkloadItemCount"] = avwshdwi.SubWorkloadItemCount 5883 } 5884 if avwshdwi.BackupManagementType != nil { 5885 objectMap["backupManagementType"] = avwshdwi.BackupManagementType 5886 } 5887 if avwshdwi.WorkloadType != nil { 5888 objectMap["workloadType"] = avwshdwi.WorkloadType 5889 } 5890 if avwshdwi.FriendlyName != nil { 5891 objectMap["friendlyName"] = avwshdwi.FriendlyName 5892 } 5893 if avwshdwi.ProtectionState != "" { 5894 objectMap["protectionState"] = avwshdwi.ProtectionState 5895 } 5896 if avwshdwi.WorkloadItemType != "" { 5897 objectMap["workloadItemType"] = avwshdwi.WorkloadItemType 5898 } 5899 return json.Marshal(objectMap) 5900} 5901 5902// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. 5903func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { 5904 return nil, false 5905} 5906 5907// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. 5908func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { 5909 return &avwshdwi, true 5910} 5911 5912// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. 5913func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { 5914 return nil, false 5915} 5916 5917// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. 5918func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { 5919 return nil, false 5920} 5921 5922// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. 5923func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { 5924 return &avwshdwi, true 5925} 5926 5927// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. 5928func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { 5929 return nil, false 5930} 5931 5932// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. 5933func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { 5934 return nil, false 5935} 5936 5937// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. 5938func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { 5939 return nil, false 5940} 5941 5942// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. 5943func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { 5944 return nil, false 5945} 5946 5947// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. 5948func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { 5949 return &avwshdwi, true 5950} 5951 5952// AzureVMWorkloadSAPHanaSystemProtectableItem azure VM workload-specific protectable item representing SAP 5953// HANA System. 5954type AzureVMWorkloadSAPHanaSystemProtectableItem struct { 5955 // ParentName - Name for instance or AG 5956 ParentName *string `json:"parentName,omitempty"` 5957 // ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent 5958 // Only Applicable for data bases where the parent would be either Instance or a SQL AG. 5959 ParentUniqueName *string `json:"parentUniqueName,omitempty"` 5960 // ServerName - Host/Cluster Name for instance or AG 5961 ServerName *string `json:"serverName,omitempty"` 5962 // IsAutoProtectable - Indicates if protectable item is auto-protectable 5963 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` 5964 // IsAutoProtected - Indicates if protectable item is auto-protected 5965 IsAutoProtected *bool `json:"isAutoProtected,omitempty"` 5966 // Subinquireditemcount - For instance or AG, indicates number of DB's present 5967 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` 5968 // Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected 5969 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` 5970 // Prebackupvalidation - Pre-backup validation for protectable objects 5971 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` 5972 // BackupManagementType - Type of backup management to backup an item. 5973 BackupManagementType *string `json:"backupManagementType,omitempty"` 5974 // WorkloadType - Type of workload for the backup management 5975 WorkloadType *string `json:"workloadType,omitempty"` 5976 // FriendlyName - Friendly name of the backup item. 5977 FriendlyName *string `json:"friendlyName,omitempty"` 5978 // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 5979 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 5980 // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' 5981 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` 5982} 5983 5984// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPHanaSystemProtectableItem. 5985func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) MarshalJSON() ([]byte, error) { 5986 avwshspi.ProtectableItemType = ProtectableItemTypeSAPHanaSystem 5987 objectMap := make(map[string]interface{}) 5988 if avwshspi.ParentName != nil { 5989 objectMap["parentName"] = avwshspi.ParentName 5990 } 5991 if avwshspi.ParentUniqueName != nil { 5992 objectMap["parentUniqueName"] = avwshspi.ParentUniqueName 5993 } 5994 if avwshspi.ServerName != nil { 5995 objectMap["serverName"] = avwshspi.ServerName 5996 } 5997 if avwshspi.IsAutoProtectable != nil { 5998 objectMap["isAutoProtectable"] = avwshspi.IsAutoProtectable 5999 } 6000 if avwshspi.IsAutoProtected != nil { 6001 objectMap["isAutoProtected"] = avwshspi.IsAutoProtected 6002 } 6003 if avwshspi.Subinquireditemcount != nil { 6004 objectMap["subinquireditemcount"] = avwshspi.Subinquireditemcount 6005 } 6006 if avwshspi.Subprotectableitemcount != nil { 6007 objectMap["subprotectableitemcount"] = avwshspi.Subprotectableitemcount 6008 } 6009 if avwshspi.Prebackupvalidation != nil { 6010 objectMap["prebackupvalidation"] = avwshspi.Prebackupvalidation 6011 } 6012 if avwshspi.BackupManagementType != nil { 6013 objectMap["backupManagementType"] = avwshspi.BackupManagementType 6014 } 6015 if avwshspi.WorkloadType != nil { 6016 objectMap["workloadType"] = avwshspi.WorkloadType 6017 } 6018 if avwshspi.FriendlyName != nil { 6019 objectMap["friendlyName"] = avwshspi.FriendlyName 6020 } 6021 if avwshspi.ProtectionState != "" { 6022 objectMap["protectionState"] = avwshspi.ProtectionState 6023 } 6024 if avwshspi.ProtectableItemType != "" { 6025 objectMap["protectableItemType"] = avwshspi.ProtectableItemType 6026 } 6027 return json.Marshal(objectMap) 6028} 6029 6030// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. 6031func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { 6032 return nil, false 6033} 6034 6035// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. 6036func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { 6037 return nil, false 6038} 6039 6040// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. 6041func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { 6042 return nil, false 6043} 6044 6045// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. 6046func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { 6047 return nil, false 6048} 6049 6050// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. 6051func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { 6052 return &avwshspi, true 6053} 6054 6055// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. 6056func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { 6057 return nil, false 6058} 6059 6060// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. 6061func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { 6062 return nil, false 6063} 6064 6065// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. 6066func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { 6067 return &avwshspi, true 6068} 6069 6070// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. 6071func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { 6072 return nil, false 6073} 6074 6075// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. 6076func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { 6077 return nil, false 6078} 6079 6080// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. 6081func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { 6082 return nil, false 6083} 6084 6085// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. 6086func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { 6087 return nil, false 6088} 6089 6090// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. 6091func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { 6092 return nil, false 6093} 6094 6095// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. 6096func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { 6097 return nil, false 6098} 6099 6100// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. 6101func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { 6102 return &avwshspi, true 6103} 6104 6105// AzureVMWorkloadSAPHanaSystemWorkloadItem azure VM workload-specific workload item representing SAP HANA 6106// System. 6107type AzureVMWorkloadSAPHanaSystemWorkloadItem struct { 6108 // ParentName - Name for instance or AG 6109 ParentName *string `json:"parentName,omitempty"` 6110 // ServerName - Host/Cluster Name for instance or AG 6111 ServerName *string `json:"serverName,omitempty"` 6112 // IsAutoProtectable - Indicates if workload item is auto-protectable 6113 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` 6114 // Subinquireditemcount - For instance or AG, indicates number of DB's present 6115 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` 6116 // SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected 6117 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` 6118 // BackupManagementType - Type of backup management to backup an item. 6119 BackupManagementType *string `json:"backupManagementType,omitempty"` 6120 // WorkloadType - Type of workload for the backup management 6121 WorkloadType *string `json:"workloadType,omitempty"` 6122 // FriendlyName - Friendly name of the backup item. 6123 FriendlyName *string `json:"friendlyName,omitempty"` 6124 // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 6125 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 6126 // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' 6127 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` 6128} 6129 6130// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPHanaSystemWorkloadItem. 6131func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) MarshalJSON() ([]byte, error) { 6132 avwshswi.WorkloadItemType = WorkloadItemTypeSAPHanaSystem1 6133 objectMap := make(map[string]interface{}) 6134 if avwshswi.ParentName != nil { 6135 objectMap["parentName"] = avwshswi.ParentName 6136 } 6137 if avwshswi.ServerName != nil { 6138 objectMap["serverName"] = avwshswi.ServerName 6139 } 6140 if avwshswi.IsAutoProtectable != nil { 6141 objectMap["isAutoProtectable"] = avwshswi.IsAutoProtectable 6142 } 6143 if avwshswi.Subinquireditemcount != nil { 6144 objectMap["subinquireditemcount"] = avwshswi.Subinquireditemcount 6145 } 6146 if avwshswi.SubWorkloadItemCount != nil { 6147 objectMap["subWorkloadItemCount"] = avwshswi.SubWorkloadItemCount 6148 } 6149 if avwshswi.BackupManagementType != nil { 6150 objectMap["backupManagementType"] = avwshswi.BackupManagementType 6151 } 6152 if avwshswi.WorkloadType != nil { 6153 objectMap["workloadType"] = avwshswi.WorkloadType 6154 } 6155 if avwshswi.FriendlyName != nil { 6156 objectMap["friendlyName"] = avwshswi.FriendlyName 6157 } 6158 if avwshswi.ProtectionState != "" { 6159 objectMap["protectionState"] = avwshswi.ProtectionState 6160 } 6161 if avwshswi.WorkloadItemType != "" { 6162 objectMap["workloadItemType"] = avwshswi.WorkloadItemType 6163 } 6164 return json.Marshal(objectMap) 6165} 6166 6167// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. 6168func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { 6169 return nil, false 6170} 6171 6172// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. 6173func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { 6174 return &avwshswi, true 6175} 6176 6177// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. 6178func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { 6179 return nil, false 6180} 6181 6182// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. 6183func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { 6184 return nil, false 6185} 6186 6187// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. 6188func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { 6189 return nil, false 6190} 6191 6192// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. 6193func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { 6194 return &avwshswi, true 6195} 6196 6197// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. 6198func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { 6199 return nil, false 6200} 6201 6202// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. 6203func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { 6204 return nil, false 6205} 6206 6207// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. 6208func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { 6209 return nil, false 6210} 6211 6212// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. 6213func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { 6214 return &avwshswi, true 6215} 6216 6217// AzureVMWorkloadSQLAvailabilityGroupProtectableItem azure VM workload-specific protectable item 6218// representing SQL Availability Group. 6219type AzureVMWorkloadSQLAvailabilityGroupProtectableItem struct { 6220 // ParentName - Name for instance or AG 6221 ParentName *string `json:"parentName,omitempty"` 6222 // ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent 6223 // Only Applicable for data bases where the parent would be either Instance or a SQL AG. 6224 ParentUniqueName *string `json:"parentUniqueName,omitempty"` 6225 // ServerName - Host/Cluster Name for instance or AG 6226 ServerName *string `json:"serverName,omitempty"` 6227 // IsAutoProtectable - Indicates if protectable item is auto-protectable 6228 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` 6229 // IsAutoProtected - Indicates if protectable item is auto-protected 6230 IsAutoProtected *bool `json:"isAutoProtected,omitempty"` 6231 // Subinquireditemcount - For instance or AG, indicates number of DB's present 6232 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` 6233 // Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected 6234 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` 6235 // Prebackupvalidation - Pre-backup validation for protectable objects 6236 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` 6237 // BackupManagementType - Type of backup management to backup an item. 6238 BackupManagementType *string `json:"backupManagementType,omitempty"` 6239 // WorkloadType - Type of workload for the backup management 6240 WorkloadType *string `json:"workloadType,omitempty"` 6241 // FriendlyName - Friendly name of the backup item. 6242 FriendlyName *string `json:"friendlyName,omitempty"` 6243 // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 6244 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 6245 // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' 6246 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` 6247} 6248 6249// MarshalJSON is the custom marshaler for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. 6250func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) MarshalJSON() ([]byte, error) { 6251 avwsagpi.ProtectableItemType = ProtectableItemTypeSQLAvailabilityGroupContainer 6252 objectMap := make(map[string]interface{}) 6253 if avwsagpi.ParentName != nil { 6254 objectMap["parentName"] = avwsagpi.ParentName 6255 } 6256 if avwsagpi.ParentUniqueName != nil { 6257 objectMap["parentUniqueName"] = avwsagpi.ParentUniqueName 6258 } 6259 if avwsagpi.ServerName != nil { 6260 objectMap["serverName"] = avwsagpi.ServerName 6261 } 6262 if avwsagpi.IsAutoProtectable != nil { 6263 objectMap["isAutoProtectable"] = avwsagpi.IsAutoProtectable 6264 } 6265 if avwsagpi.IsAutoProtected != nil { 6266 objectMap["isAutoProtected"] = avwsagpi.IsAutoProtected 6267 } 6268 if avwsagpi.Subinquireditemcount != nil { 6269 objectMap["subinquireditemcount"] = avwsagpi.Subinquireditemcount 6270 } 6271 if avwsagpi.Subprotectableitemcount != nil { 6272 objectMap["subprotectableitemcount"] = avwsagpi.Subprotectableitemcount 6273 } 6274 if avwsagpi.Prebackupvalidation != nil { 6275 objectMap["prebackupvalidation"] = avwsagpi.Prebackupvalidation 6276 } 6277 if avwsagpi.BackupManagementType != nil { 6278 objectMap["backupManagementType"] = avwsagpi.BackupManagementType 6279 } 6280 if avwsagpi.WorkloadType != nil { 6281 objectMap["workloadType"] = avwsagpi.WorkloadType 6282 } 6283 if avwsagpi.FriendlyName != nil { 6284 objectMap["friendlyName"] = avwsagpi.FriendlyName 6285 } 6286 if avwsagpi.ProtectionState != "" { 6287 objectMap["protectionState"] = avwsagpi.ProtectionState 6288 } 6289 if avwsagpi.ProtectableItemType != "" { 6290 objectMap["protectableItemType"] = avwsagpi.ProtectableItemType 6291 } 6292 return json.Marshal(objectMap) 6293} 6294 6295// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. 6296func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { 6297 return nil, false 6298} 6299 6300// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. 6301func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { 6302 return nil, false 6303} 6304 6305// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. 6306func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { 6307 return nil, false 6308} 6309 6310// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. 6311func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { 6312 return nil, false 6313} 6314 6315// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. 6316func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { 6317 return &avwsagpi, true 6318} 6319 6320// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. 6321func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { 6322 return nil, false 6323} 6324 6325// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. 6326func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { 6327 return nil, false 6328} 6329 6330// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. 6331func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { 6332 return nil, false 6333} 6334 6335// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. 6336func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { 6337 return &avwsagpi, true 6338} 6339 6340// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. 6341func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { 6342 return nil, false 6343} 6344 6345// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. 6346func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { 6347 return nil, false 6348} 6349 6350// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. 6351func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { 6352 return nil, false 6353} 6354 6355// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. 6356func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { 6357 return nil, false 6358} 6359 6360// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. 6361func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { 6362 return nil, false 6363} 6364 6365// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. 6366func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { 6367 return &avwsagpi, true 6368} 6369 6370// AzureVMWorkloadSQLDatabaseProtectableItem azure VM workload-specific protectable item representing SQL 6371// Database. 6372type AzureVMWorkloadSQLDatabaseProtectableItem struct { 6373 // ParentName - Name for instance or AG 6374 ParentName *string `json:"parentName,omitempty"` 6375 // ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent 6376 // Only Applicable for data bases where the parent would be either Instance or a SQL AG. 6377 ParentUniqueName *string `json:"parentUniqueName,omitempty"` 6378 // ServerName - Host/Cluster Name for instance or AG 6379 ServerName *string `json:"serverName,omitempty"` 6380 // IsAutoProtectable - Indicates if protectable item is auto-protectable 6381 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` 6382 // IsAutoProtected - Indicates if protectable item is auto-protected 6383 IsAutoProtected *bool `json:"isAutoProtected,omitempty"` 6384 // Subinquireditemcount - For instance or AG, indicates number of DB's present 6385 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` 6386 // Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected 6387 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` 6388 // Prebackupvalidation - Pre-backup validation for protectable objects 6389 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` 6390 // BackupManagementType - Type of backup management to backup an item. 6391 BackupManagementType *string `json:"backupManagementType,omitempty"` 6392 // WorkloadType - Type of workload for the backup management 6393 WorkloadType *string `json:"workloadType,omitempty"` 6394 // FriendlyName - Friendly name of the backup item. 6395 FriendlyName *string `json:"friendlyName,omitempty"` 6396 // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 6397 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 6398 // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' 6399 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` 6400} 6401 6402// MarshalJSON is the custom marshaler for AzureVMWorkloadSQLDatabaseProtectableItem. 6403func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) MarshalJSON() ([]byte, error) { 6404 avwsdpi.ProtectableItemType = ProtectableItemTypeSQLDataBase 6405 objectMap := make(map[string]interface{}) 6406 if avwsdpi.ParentName != nil { 6407 objectMap["parentName"] = avwsdpi.ParentName 6408 } 6409 if avwsdpi.ParentUniqueName != nil { 6410 objectMap["parentUniqueName"] = avwsdpi.ParentUniqueName 6411 } 6412 if avwsdpi.ServerName != nil { 6413 objectMap["serverName"] = avwsdpi.ServerName 6414 } 6415 if avwsdpi.IsAutoProtectable != nil { 6416 objectMap["isAutoProtectable"] = avwsdpi.IsAutoProtectable 6417 } 6418 if avwsdpi.IsAutoProtected != nil { 6419 objectMap["isAutoProtected"] = avwsdpi.IsAutoProtected 6420 } 6421 if avwsdpi.Subinquireditemcount != nil { 6422 objectMap["subinquireditemcount"] = avwsdpi.Subinquireditemcount 6423 } 6424 if avwsdpi.Subprotectableitemcount != nil { 6425 objectMap["subprotectableitemcount"] = avwsdpi.Subprotectableitemcount 6426 } 6427 if avwsdpi.Prebackupvalidation != nil { 6428 objectMap["prebackupvalidation"] = avwsdpi.Prebackupvalidation 6429 } 6430 if avwsdpi.BackupManagementType != nil { 6431 objectMap["backupManagementType"] = avwsdpi.BackupManagementType 6432 } 6433 if avwsdpi.WorkloadType != nil { 6434 objectMap["workloadType"] = avwsdpi.WorkloadType 6435 } 6436 if avwsdpi.FriendlyName != nil { 6437 objectMap["friendlyName"] = avwsdpi.FriendlyName 6438 } 6439 if avwsdpi.ProtectionState != "" { 6440 objectMap["protectionState"] = avwsdpi.ProtectionState 6441 } 6442 if avwsdpi.ProtectableItemType != "" { 6443 objectMap["protectableItemType"] = avwsdpi.ProtectableItemType 6444 } 6445 return json.Marshal(objectMap) 6446} 6447 6448// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. 6449func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { 6450 return nil, false 6451} 6452 6453// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. 6454func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { 6455 return nil, false 6456} 6457 6458// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. 6459func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { 6460 return nil, false 6461} 6462 6463// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. 6464func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { 6465 return nil, false 6466} 6467 6468// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. 6469func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { 6470 return &avwsdpi, true 6471} 6472 6473// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. 6474func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { 6475 return nil, false 6476} 6477 6478// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. 6479func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { 6480 return nil, false 6481} 6482 6483// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. 6484func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { 6485 return nil, false 6486} 6487 6488// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. 6489func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { 6490 return nil, false 6491} 6492 6493// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. 6494func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { 6495 return &avwsdpi, true 6496} 6497 6498// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. 6499func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { 6500 return nil, false 6501} 6502 6503// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. 6504func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { 6505 return nil, false 6506} 6507 6508// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. 6509func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { 6510 return nil, false 6511} 6512 6513// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. 6514func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { 6515 return nil, false 6516} 6517 6518// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. 6519func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { 6520 return &avwsdpi, true 6521} 6522 6523// AzureVMWorkloadSQLDatabaseProtectedItem azure VM workload-specific protected item representing SQL 6524// Database. 6525type AzureVMWorkloadSQLDatabaseProtectedItem struct { 6526 // FriendlyName - Friendly name of the DB represented by this backup item. 6527 FriendlyName *string `json:"friendlyName,omitempty"` 6528 // ServerName - Host/Cluster Name for instance or AG 6529 ServerName *string `json:"serverName,omitempty"` 6530 // ParentName - Parent name of the DB such as Instance or Availability Group. 6531 ParentName *string `json:"parentName,omitempty"` 6532 // ParentType - Parent type of protected item, example: for a DB, standalone server or distributed 6533 ParentType *string `json:"parentType,omitempty"` 6534 // ProtectionStatus - Backup status of this backup item. 6535 ProtectionStatus *string `json:"protectionStatus,omitempty"` 6536 // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' 6537 ProtectionState ProtectionState `json:"protectionState,omitempty"` 6538 // LastBackupStatus - Last backup operation status. Possible values: Healthy, Unhealthy. Possible values include: 'LastBackupStatusInvalid', 'LastBackupStatusHealthy', 'LastBackupStatusUnhealthy', 'LastBackupStatusIRPending' 6539 LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"` 6540 // LastBackupTime - Timestamp of the last backup operation on this backup item. 6541 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` 6542 // LastBackupErrorDetail - Error details in last backup 6543 LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"` 6544 // ProtectedItemDataSourceID - Data ID of the protected item. 6545 ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"` 6546 // ProtectedItemHealthStatus - Health status of the backup item, evaluated based on last heartbeat received. Possible values include: 'ProtectedItemHealthStatusInvalid', 'ProtectedItemHealthStatusHealthy', 'ProtectedItemHealthStatusUnhealthy', 'ProtectedItemHealthStatusNotReachable', 'ProtectedItemHealthStatusIRPending' 6547 ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"` 6548 // ExtendedInfo - Additional information for this backup item. 6549 ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` 6550 // KpisHealths - Health details of different KPIs 6551 KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"` 6552 // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 6553 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 6554 // 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' 6555 WorkloadType DataSourceType `json:"workloadType,omitempty"` 6556 // ContainerName - Unique name of container 6557 ContainerName *string `json:"containerName,omitempty"` 6558 // SourceResourceID - ARM ID of the resource to be backed up. 6559 SourceResourceID *string `json:"sourceResourceId,omitempty"` 6560 // PolicyID - ID of the backup policy with which this item is backed up. 6561 PolicyID *string `json:"policyId,omitempty"` 6562 // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. 6563 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` 6564 // BackupSetName - Name of the backup set the backup item belongs to 6565 BackupSetName *string `json:"backupSetName,omitempty"` 6566 // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' 6567 CreateMode CreateMode `json:"createMode,omitempty"` 6568 // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC 6569 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` 6570 // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete 6571 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` 6572 // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted 6573 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` 6574 // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon 6575 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` 6576 // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state 6577 IsRehydrate *bool `json:"isRehydrate,omitempty"` 6578 // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' 6579 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` 6580} 6581 6582// MarshalJSON is the custom marshaler for AzureVMWorkloadSQLDatabaseProtectedItem. 6583func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) MarshalJSON() ([]byte, error) { 6584 avwsdpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadSQLDatabase 6585 objectMap := make(map[string]interface{}) 6586 if avwsdpi.FriendlyName != nil { 6587 objectMap["friendlyName"] = avwsdpi.FriendlyName 6588 } 6589 if avwsdpi.ServerName != nil { 6590 objectMap["serverName"] = avwsdpi.ServerName 6591 } 6592 if avwsdpi.ParentName != nil { 6593 objectMap["parentName"] = avwsdpi.ParentName 6594 } 6595 if avwsdpi.ParentType != nil { 6596 objectMap["parentType"] = avwsdpi.ParentType 6597 } 6598 if avwsdpi.ProtectionStatus != nil { 6599 objectMap["protectionStatus"] = avwsdpi.ProtectionStatus 6600 } 6601 if avwsdpi.ProtectionState != "" { 6602 objectMap["protectionState"] = avwsdpi.ProtectionState 6603 } 6604 if avwsdpi.LastBackupStatus != "" { 6605 objectMap["lastBackupStatus"] = avwsdpi.LastBackupStatus 6606 } 6607 if avwsdpi.LastBackupTime != nil { 6608 objectMap["lastBackupTime"] = avwsdpi.LastBackupTime 6609 } 6610 if avwsdpi.LastBackupErrorDetail != nil { 6611 objectMap["lastBackupErrorDetail"] = avwsdpi.LastBackupErrorDetail 6612 } 6613 if avwsdpi.ProtectedItemDataSourceID != nil { 6614 objectMap["protectedItemDataSourceId"] = avwsdpi.ProtectedItemDataSourceID 6615 } 6616 if avwsdpi.ProtectedItemHealthStatus != "" { 6617 objectMap["protectedItemHealthStatus"] = avwsdpi.ProtectedItemHealthStatus 6618 } 6619 if avwsdpi.ExtendedInfo != nil { 6620 objectMap["extendedInfo"] = avwsdpi.ExtendedInfo 6621 } 6622 if avwsdpi.KpisHealths != nil { 6623 objectMap["kpisHealths"] = avwsdpi.KpisHealths 6624 } 6625 if avwsdpi.BackupManagementType != "" { 6626 objectMap["backupManagementType"] = avwsdpi.BackupManagementType 6627 } 6628 if avwsdpi.WorkloadType != "" { 6629 objectMap["workloadType"] = avwsdpi.WorkloadType 6630 } 6631 if avwsdpi.ContainerName != nil { 6632 objectMap["containerName"] = avwsdpi.ContainerName 6633 } 6634 if avwsdpi.SourceResourceID != nil { 6635 objectMap["sourceResourceId"] = avwsdpi.SourceResourceID 6636 } 6637 if avwsdpi.PolicyID != nil { 6638 objectMap["policyId"] = avwsdpi.PolicyID 6639 } 6640 if avwsdpi.LastRecoveryPoint != nil { 6641 objectMap["lastRecoveryPoint"] = avwsdpi.LastRecoveryPoint 6642 } 6643 if avwsdpi.BackupSetName != nil { 6644 objectMap["backupSetName"] = avwsdpi.BackupSetName 6645 } 6646 if avwsdpi.CreateMode != "" { 6647 objectMap["createMode"] = avwsdpi.CreateMode 6648 } 6649 if avwsdpi.DeferredDeleteTimeInUTC != nil { 6650 objectMap["deferredDeleteTimeInUTC"] = avwsdpi.DeferredDeleteTimeInUTC 6651 } 6652 if avwsdpi.IsScheduledForDeferredDelete != nil { 6653 objectMap["isScheduledForDeferredDelete"] = avwsdpi.IsScheduledForDeferredDelete 6654 } 6655 if avwsdpi.DeferredDeleteTimeRemaining != nil { 6656 objectMap["deferredDeleteTimeRemaining"] = avwsdpi.DeferredDeleteTimeRemaining 6657 } 6658 if avwsdpi.IsDeferredDeleteScheduleUpcoming != nil { 6659 objectMap["isDeferredDeleteScheduleUpcoming"] = avwsdpi.IsDeferredDeleteScheduleUpcoming 6660 } 6661 if avwsdpi.IsRehydrate != nil { 6662 objectMap["isRehydrate"] = avwsdpi.IsRehydrate 6663 } 6664 if avwsdpi.ProtectedItemType != "" { 6665 objectMap["protectedItemType"] = avwsdpi.ProtectedItemType 6666 } 6667 return json.Marshal(objectMap) 6668} 6669 6670// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. 6671func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { 6672 return nil, false 6673} 6674 6675// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. 6676func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { 6677 return nil, false 6678} 6679 6680// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. 6681func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { 6682 return nil, false 6683} 6684 6685// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. 6686func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { 6687 return nil, false 6688} 6689 6690// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. 6691func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { 6692 return nil, false 6693} 6694 6695// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. 6696func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { 6697 return nil, false 6698} 6699 6700// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. 6701func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { 6702 return nil, false 6703} 6704 6705// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. 6706func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { 6707 return &avwsdpi, true 6708} 6709 6710// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. 6711func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { 6712 return nil, false 6713} 6714 6715// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. 6716func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { 6717 return nil, false 6718} 6719 6720// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. 6721func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { 6722 return &avwsdpi, true 6723} 6724 6725// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. 6726func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { 6727 return nil, false 6728} 6729 6730// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. 6731func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { 6732 return nil, false 6733} 6734 6735// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. 6736func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { 6737 return nil, false 6738} 6739 6740// AsProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. 6741func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { 6742 return nil, false 6743} 6744 6745// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. 6746func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { 6747 return &avwsdpi, true 6748} 6749 6750// AzureVMWorkloadSQLDatabaseWorkloadItem azure VM workload-specific workload item representing SQL 6751// Database. 6752type AzureVMWorkloadSQLDatabaseWorkloadItem struct { 6753 // ParentName - Name for instance or AG 6754 ParentName *string `json:"parentName,omitempty"` 6755 // ServerName - Host/Cluster Name for instance or AG 6756 ServerName *string `json:"serverName,omitempty"` 6757 // IsAutoProtectable - Indicates if workload item is auto-protectable 6758 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` 6759 // Subinquireditemcount - For instance or AG, indicates number of DB's present 6760 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` 6761 // SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected 6762 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` 6763 // BackupManagementType - Type of backup management to backup an item. 6764 BackupManagementType *string `json:"backupManagementType,omitempty"` 6765 // WorkloadType - Type of workload for the backup management 6766 WorkloadType *string `json:"workloadType,omitempty"` 6767 // FriendlyName - Friendly name of the backup item. 6768 FriendlyName *string `json:"friendlyName,omitempty"` 6769 // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 6770 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 6771 // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' 6772 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` 6773} 6774 6775// MarshalJSON is the custom marshaler for AzureVMWorkloadSQLDatabaseWorkloadItem. 6776func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { 6777 avwsdwi.WorkloadItemType = WorkloadItemTypeSQLDataBase1 6778 objectMap := make(map[string]interface{}) 6779 if avwsdwi.ParentName != nil { 6780 objectMap["parentName"] = avwsdwi.ParentName 6781 } 6782 if avwsdwi.ServerName != nil { 6783 objectMap["serverName"] = avwsdwi.ServerName 6784 } 6785 if avwsdwi.IsAutoProtectable != nil { 6786 objectMap["isAutoProtectable"] = avwsdwi.IsAutoProtectable 6787 } 6788 if avwsdwi.Subinquireditemcount != nil { 6789 objectMap["subinquireditemcount"] = avwsdwi.Subinquireditemcount 6790 } 6791 if avwsdwi.SubWorkloadItemCount != nil { 6792 objectMap["subWorkloadItemCount"] = avwsdwi.SubWorkloadItemCount 6793 } 6794 if avwsdwi.BackupManagementType != nil { 6795 objectMap["backupManagementType"] = avwsdwi.BackupManagementType 6796 } 6797 if avwsdwi.WorkloadType != nil { 6798 objectMap["workloadType"] = avwsdwi.WorkloadType 6799 } 6800 if avwsdwi.FriendlyName != nil { 6801 objectMap["friendlyName"] = avwsdwi.FriendlyName 6802 } 6803 if avwsdwi.ProtectionState != "" { 6804 objectMap["protectionState"] = avwsdwi.ProtectionState 6805 } 6806 if avwsdwi.WorkloadItemType != "" { 6807 objectMap["workloadItemType"] = avwsdwi.WorkloadItemType 6808 } 6809 return json.Marshal(objectMap) 6810} 6811 6812// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. 6813func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { 6814 return nil, false 6815} 6816 6817// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. 6818func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { 6819 return &avwsdwi, true 6820} 6821 6822// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. 6823func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { 6824 return nil, false 6825} 6826 6827// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. 6828func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { 6829 return nil, false 6830} 6831 6832// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. 6833func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { 6834 return nil, false 6835} 6836 6837// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. 6838func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { 6839 return nil, false 6840} 6841 6842// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. 6843func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { 6844 return &avwsdwi, true 6845} 6846 6847// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. 6848func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { 6849 return nil, false 6850} 6851 6852// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. 6853func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { 6854 return nil, false 6855} 6856 6857// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. 6858func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { 6859 return &avwsdwi, true 6860} 6861 6862// AzureVMWorkloadSQLInstanceProtectableItem azure VM workload-specific protectable item representing SQL 6863// Instance. 6864type AzureVMWorkloadSQLInstanceProtectableItem struct { 6865 // ParentName - Name for instance or AG 6866 ParentName *string `json:"parentName,omitempty"` 6867 // ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent 6868 // Only Applicable for data bases where the parent would be either Instance or a SQL AG. 6869 ParentUniqueName *string `json:"parentUniqueName,omitempty"` 6870 // ServerName - Host/Cluster Name for instance or AG 6871 ServerName *string `json:"serverName,omitempty"` 6872 // IsAutoProtectable - Indicates if protectable item is auto-protectable 6873 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` 6874 // IsAutoProtected - Indicates if protectable item is auto-protected 6875 IsAutoProtected *bool `json:"isAutoProtected,omitempty"` 6876 // Subinquireditemcount - For instance or AG, indicates number of DB's present 6877 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` 6878 // Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected 6879 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` 6880 // Prebackupvalidation - Pre-backup validation for protectable objects 6881 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` 6882 // BackupManagementType - Type of backup management to backup an item. 6883 BackupManagementType *string `json:"backupManagementType,omitempty"` 6884 // WorkloadType - Type of workload for the backup management 6885 WorkloadType *string `json:"workloadType,omitempty"` 6886 // FriendlyName - Friendly name of the backup item. 6887 FriendlyName *string `json:"friendlyName,omitempty"` 6888 // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 6889 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 6890 // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' 6891 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` 6892} 6893 6894// MarshalJSON is the custom marshaler for AzureVMWorkloadSQLInstanceProtectableItem. 6895func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) MarshalJSON() ([]byte, error) { 6896 avwsipi.ProtectableItemType = ProtectableItemTypeSQLInstance 6897 objectMap := make(map[string]interface{}) 6898 if avwsipi.ParentName != nil { 6899 objectMap["parentName"] = avwsipi.ParentName 6900 } 6901 if avwsipi.ParentUniqueName != nil { 6902 objectMap["parentUniqueName"] = avwsipi.ParentUniqueName 6903 } 6904 if avwsipi.ServerName != nil { 6905 objectMap["serverName"] = avwsipi.ServerName 6906 } 6907 if avwsipi.IsAutoProtectable != nil { 6908 objectMap["isAutoProtectable"] = avwsipi.IsAutoProtectable 6909 } 6910 if avwsipi.IsAutoProtected != nil { 6911 objectMap["isAutoProtected"] = avwsipi.IsAutoProtected 6912 } 6913 if avwsipi.Subinquireditemcount != nil { 6914 objectMap["subinquireditemcount"] = avwsipi.Subinquireditemcount 6915 } 6916 if avwsipi.Subprotectableitemcount != nil { 6917 objectMap["subprotectableitemcount"] = avwsipi.Subprotectableitemcount 6918 } 6919 if avwsipi.Prebackupvalidation != nil { 6920 objectMap["prebackupvalidation"] = avwsipi.Prebackupvalidation 6921 } 6922 if avwsipi.BackupManagementType != nil { 6923 objectMap["backupManagementType"] = avwsipi.BackupManagementType 6924 } 6925 if avwsipi.WorkloadType != nil { 6926 objectMap["workloadType"] = avwsipi.WorkloadType 6927 } 6928 if avwsipi.FriendlyName != nil { 6929 objectMap["friendlyName"] = avwsipi.FriendlyName 6930 } 6931 if avwsipi.ProtectionState != "" { 6932 objectMap["protectionState"] = avwsipi.ProtectionState 6933 } 6934 if avwsipi.ProtectableItemType != "" { 6935 objectMap["protectableItemType"] = avwsipi.ProtectableItemType 6936 } 6937 return json.Marshal(objectMap) 6938} 6939 6940// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. 6941func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { 6942 return nil, false 6943} 6944 6945// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. 6946func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { 6947 return nil, false 6948} 6949 6950// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. 6951func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { 6952 return nil, false 6953} 6954 6955// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. 6956func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { 6957 return nil, false 6958} 6959 6960// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. 6961func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { 6962 return &avwsipi, true 6963} 6964 6965// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. 6966func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { 6967 return nil, false 6968} 6969 6970// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. 6971func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { 6972 return nil, false 6973} 6974 6975// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. 6976func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { 6977 return nil, false 6978} 6979 6980// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. 6981func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { 6982 return nil, false 6983} 6984 6985// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. 6986func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { 6987 return nil, false 6988} 6989 6990// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. 6991func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { 6992 return &avwsipi, true 6993} 6994 6995// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. 6996func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { 6997 return nil, false 6998} 6999 7000// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. 7001func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { 7002 return nil, false 7003} 7004 7005// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. 7006func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { 7007 return nil, false 7008} 7009 7010// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. 7011func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { 7012 return &avwsipi, true 7013} 7014 7015// AzureVMWorkloadSQLInstanceWorkloadItem azure VM workload-specific workload item representing SQL 7016// Instance. 7017type AzureVMWorkloadSQLInstanceWorkloadItem struct { 7018 // DataDirectoryPaths - Data Directory Paths for default directories 7019 DataDirectoryPaths *[]SQLDataDirectory `json:"dataDirectoryPaths,omitempty"` 7020 // ParentName - Name for instance or AG 7021 ParentName *string `json:"parentName,omitempty"` 7022 // ServerName - Host/Cluster Name for instance or AG 7023 ServerName *string `json:"serverName,omitempty"` 7024 // IsAutoProtectable - Indicates if workload item is auto-protectable 7025 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` 7026 // Subinquireditemcount - For instance or AG, indicates number of DB's present 7027 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` 7028 // SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected 7029 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` 7030 // BackupManagementType - Type of backup management to backup an item. 7031 BackupManagementType *string `json:"backupManagementType,omitempty"` 7032 // WorkloadType - Type of workload for the backup management 7033 WorkloadType *string `json:"workloadType,omitempty"` 7034 // FriendlyName - Friendly name of the backup item. 7035 FriendlyName *string `json:"friendlyName,omitempty"` 7036 // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 7037 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 7038 // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' 7039 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` 7040} 7041 7042// MarshalJSON is the custom marshaler for AzureVMWorkloadSQLInstanceWorkloadItem. 7043func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) MarshalJSON() ([]byte, error) { 7044 avwsiwi.WorkloadItemType = WorkloadItemTypeSQLInstance1 7045 objectMap := make(map[string]interface{}) 7046 if avwsiwi.DataDirectoryPaths != nil { 7047 objectMap["dataDirectoryPaths"] = avwsiwi.DataDirectoryPaths 7048 } 7049 if avwsiwi.ParentName != nil { 7050 objectMap["parentName"] = avwsiwi.ParentName 7051 } 7052 if avwsiwi.ServerName != nil { 7053 objectMap["serverName"] = avwsiwi.ServerName 7054 } 7055 if avwsiwi.IsAutoProtectable != nil { 7056 objectMap["isAutoProtectable"] = avwsiwi.IsAutoProtectable 7057 } 7058 if avwsiwi.Subinquireditemcount != nil { 7059 objectMap["subinquireditemcount"] = avwsiwi.Subinquireditemcount 7060 } 7061 if avwsiwi.SubWorkloadItemCount != nil { 7062 objectMap["subWorkloadItemCount"] = avwsiwi.SubWorkloadItemCount 7063 } 7064 if avwsiwi.BackupManagementType != nil { 7065 objectMap["backupManagementType"] = avwsiwi.BackupManagementType 7066 } 7067 if avwsiwi.WorkloadType != nil { 7068 objectMap["workloadType"] = avwsiwi.WorkloadType 7069 } 7070 if avwsiwi.FriendlyName != nil { 7071 objectMap["friendlyName"] = avwsiwi.FriendlyName 7072 } 7073 if avwsiwi.ProtectionState != "" { 7074 objectMap["protectionState"] = avwsiwi.ProtectionState 7075 } 7076 if avwsiwi.WorkloadItemType != "" { 7077 objectMap["workloadItemType"] = avwsiwi.WorkloadItemType 7078 } 7079 return json.Marshal(objectMap) 7080} 7081 7082// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. 7083func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { 7084 return nil, false 7085} 7086 7087// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. 7088func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { 7089 return &avwsiwi, true 7090} 7091 7092// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. 7093func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { 7094 return nil, false 7095} 7096 7097// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. 7098func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { 7099 return nil, false 7100} 7101 7102// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. 7103func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { 7104 return nil, false 7105} 7106 7107// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. 7108func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { 7109 return nil, false 7110} 7111 7112// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. 7113func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { 7114 return nil, false 7115} 7116 7117// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. 7118func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { 7119 return &avwsiwi, true 7120} 7121 7122// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. 7123func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { 7124 return nil, false 7125} 7126 7127// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. 7128func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { 7129 return &avwsiwi, true 7130} 7131 7132// BasicAzureWorkloadAutoProtectionIntent azure Recovery Services Vault specific protection intent item. 7133type BasicAzureWorkloadAutoProtectionIntent interface { 7134 AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) 7135 AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) 7136} 7137 7138// AzureWorkloadAutoProtectionIntent azure Recovery Services Vault specific protection intent item. 7139type AzureWorkloadAutoProtectionIntent struct { 7140 // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 7141 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 7142 // SourceResourceID - ARM ID of the resource to be backed up. 7143 SourceResourceID *string `json:"sourceResourceId,omitempty"` 7144 // ItemID - ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId 7145 ItemID *string `json:"itemId,omitempty"` 7146 // PolicyID - ID of the backup policy with which this item is backed up. 7147 PolicyID *string `json:"policyId,omitempty"` 7148 // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 7149 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 7150 // ProtectionIntentItemType - Possible values include: 'ProtectionIntentItemTypeProtectionIntent', 'ProtectionIntentItemTypeRecoveryServiceVaultItem', 'ProtectionIntentItemTypeAzureResourceItem', 'ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent', 'ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent' 7151 ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"` 7152} 7153 7154func unmarshalBasicAzureWorkloadAutoProtectionIntent(body []byte) (BasicAzureWorkloadAutoProtectionIntent, error) { 7155 var m map[string]interface{} 7156 err := json.Unmarshal(body, &m) 7157 if err != nil { 7158 return nil, err 7159 } 7160 7161 switch m["protectionIntentItemType"] { 7162 case string(ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent): 7163 var awsapi AzureWorkloadSQLAutoProtectionIntent 7164 err := json.Unmarshal(body, &awsapi) 7165 return awsapi, err 7166 default: 7167 var awapi AzureWorkloadAutoProtectionIntent 7168 err := json.Unmarshal(body, &awapi) 7169 return awapi, err 7170 } 7171} 7172func unmarshalBasicAzureWorkloadAutoProtectionIntentArray(body []byte) ([]BasicAzureWorkloadAutoProtectionIntent, error) { 7173 var rawMessages []*json.RawMessage 7174 err := json.Unmarshal(body, &rawMessages) 7175 if err != nil { 7176 return nil, err 7177 } 7178 7179 awapiArray := make([]BasicAzureWorkloadAutoProtectionIntent, len(rawMessages)) 7180 7181 for index, rawMessage := range rawMessages { 7182 awapi, err := unmarshalBasicAzureWorkloadAutoProtectionIntent(*rawMessage) 7183 if err != nil { 7184 return nil, err 7185 } 7186 awapiArray[index] = awapi 7187 } 7188 return awapiArray, nil 7189} 7190 7191// MarshalJSON is the custom marshaler for AzureWorkloadAutoProtectionIntent. 7192func (awapi AzureWorkloadAutoProtectionIntent) MarshalJSON() ([]byte, error) { 7193 awapi.ProtectionIntentItemType = ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent 7194 objectMap := make(map[string]interface{}) 7195 if awapi.BackupManagementType != "" { 7196 objectMap["backupManagementType"] = awapi.BackupManagementType 7197 } 7198 if awapi.SourceResourceID != nil { 7199 objectMap["sourceResourceId"] = awapi.SourceResourceID 7200 } 7201 if awapi.ItemID != nil { 7202 objectMap["itemId"] = awapi.ItemID 7203 } 7204 if awapi.PolicyID != nil { 7205 objectMap["policyId"] = awapi.PolicyID 7206 } 7207 if awapi.ProtectionState != "" { 7208 objectMap["protectionState"] = awapi.ProtectionState 7209 } 7210 if awapi.ProtectionIntentItemType != "" { 7211 objectMap["protectionIntentItemType"] = awapi.ProtectionIntentItemType 7212 } 7213 return json.Marshal(objectMap) 7214} 7215 7216// AsAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. 7217func (awapi AzureWorkloadAutoProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) { 7218 return nil, false 7219} 7220 7221// AsBasicAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. 7222func (awapi AzureWorkloadAutoProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) { 7223 return &awapi, true 7224} 7225 7226// AsAzureResourceProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. 7227func (awapi AzureWorkloadAutoProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) { 7228 return nil, false 7229} 7230 7231// AsAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. 7232func (awapi AzureWorkloadAutoProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) { 7233 return &awapi, true 7234} 7235 7236// AsBasicAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. 7237func (awapi AzureWorkloadAutoProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) { 7238 return &awapi, true 7239} 7240 7241// AsAzureWorkloadSQLAutoProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. 7242func (awapi AzureWorkloadAutoProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) { 7243 return nil, false 7244} 7245 7246// AsProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. 7247func (awapi AzureWorkloadAutoProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) { 7248 return nil, false 7249} 7250 7251// AsBasicProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. 7252func (awapi AzureWorkloadAutoProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) { 7253 return &awapi, true 7254} 7255 7256// AzureWorkloadBackupRequest azureWorkload workload-specific backup request. 7257type AzureWorkloadBackupRequest struct { 7258 // BackupType - Type of backup, viz. Full, Differential, Log or CopyOnlyFull. Possible values include: 'TypeEnumInvalid', 'TypeEnumFull', 'TypeEnumDifferential', 'TypeEnumLog', 'TypeEnumCopyOnlyFull' 7259 BackupType TypeEnum `json:"backupType,omitempty"` 7260 // EnableCompression - Bool for Compression setting 7261 EnableCompression *bool `json:"enableCompression,omitempty"` 7262 // RecoveryPointExpiryTimeInUTC - Backup copy will expire after the time specified (UTC). 7263 RecoveryPointExpiryTimeInUTC *date.Time `json:"recoveryPointExpiryTimeInUTC,omitempty"` 7264 // ObjectType - Possible values include: 'ObjectTypeBackupRequest', 'ObjectTypeAzureFileShareBackupRequest', 'ObjectTypeAzureWorkloadBackupRequest', 'ObjectTypeIaasVMBackupRequest' 7265 ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"` 7266} 7267 7268// MarshalJSON is the custom marshaler for AzureWorkloadBackupRequest. 7269func (awbr AzureWorkloadBackupRequest) MarshalJSON() ([]byte, error) { 7270 awbr.ObjectType = ObjectTypeAzureWorkloadBackupRequest 7271 objectMap := make(map[string]interface{}) 7272 if awbr.BackupType != "" { 7273 objectMap["backupType"] = awbr.BackupType 7274 } 7275 if awbr.EnableCompression != nil { 7276 objectMap["enableCompression"] = awbr.EnableCompression 7277 } 7278 if awbr.RecoveryPointExpiryTimeInUTC != nil { 7279 objectMap["recoveryPointExpiryTimeInUTC"] = awbr.RecoveryPointExpiryTimeInUTC 7280 } 7281 if awbr.ObjectType != "" { 7282 objectMap["objectType"] = awbr.ObjectType 7283 } 7284 return json.Marshal(objectMap) 7285} 7286 7287// AsAzureFileShareBackupRequest is the BasicRequest implementation for AzureWorkloadBackupRequest. 7288func (awbr AzureWorkloadBackupRequest) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) { 7289 return nil, false 7290} 7291 7292// AsAzureWorkloadBackupRequest is the BasicRequest implementation for AzureWorkloadBackupRequest. 7293func (awbr AzureWorkloadBackupRequest) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) { 7294 return &awbr, true 7295} 7296 7297// AsIaasVMBackupRequest is the BasicRequest implementation for AzureWorkloadBackupRequest. 7298func (awbr AzureWorkloadBackupRequest) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) { 7299 return nil, false 7300} 7301 7302// AsRequest is the BasicRequest implementation for AzureWorkloadBackupRequest. 7303func (awbr AzureWorkloadBackupRequest) AsRequest() (*Request, bool) { 7304 return nil, false 7305} 7306 7307// AsBasicRequest is the BasicRequest implementation for AzureWorkloadBackupRequest. 7308func (awbr AzureWorkloadBackupRequest) AsBasicRequest() (BasicRequest, bool) { 7309 return &awbr, true 7310} 7311 7312// BasicAzureWorkloadContainer container for the workloads running inside Azure Compute or Classic Compute. 7313type BasicAzureWorkloadContainer interface { 7314 AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) 7315 AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) 7316 AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) 7317} 7318 7319// AzureWorkloadContainer container for the workloads running inside Azure Compute or Classic Compute. 7320type AzureWorkloadContainer struct { 7321 // SourceResourceID - ARM ID of the virtual machine represented by this Azure Workload Container 7322 SourceResourceID *string `json:"sourceResourceId,omitempty"` 7323 // LastUpdatedTime - Time stamp when this container was updated. 7324 LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"` 7325 // ExtendedInfo - Additional details of a workload container. 7326 ExtendedInfo *AzureWorkloadContainerExtendedInfo `json:"extendedInfo,omitempty"` 7327 // 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' 7328 WorkloadType WorkloadType `json:"workloadType,omitempty"` 7329 // OperationType - Re-Do Operation. Possible values include: 'OperationTypeInvalid', 'OperationTypeRegister', 'OperationTypeReregister' 7330 OperationType OperationType `json:"operationType,omitempty"` 7331 // FriendlyName - Friendly name of the container. 7332 FriendlyName *string `json:"friendlyName,omitempty"` 7333 // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 7334 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 7335 // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. 7336 RegistrationStatus *string `json:"registrationStatus,omitempty"` 7337 // HealthStatus - Status of health of the container. 7338 HealthStatus *string `json:"healthStatus,omitempty"` 7339 // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' 7340 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` 7341} 7342 7343func unmarshalBasicAzureWorkloadContainer(body []byte) (BasicAzureWorkloadContainer, error) { 7344 var m map[string]interface{} 7345 err := json.Unmarshal(body, &m) 7346 if err != nil { 7347 return nil, err 7348 } 7349 7350 switch m["containerType"] { 7351 case string(ContainerTypeSQLAGWorkLoadContainer1): 7352 var aswcpc AzureSQLAGWorkloadContainerProtectionContainer 7353 err := json.Unmarshal(body, &aswcpc) 7354 return aswcpc, err 7355 case string(ContainerTypeVMAppContainer1): 7356 var avacpc AzureVMAppContainerProtectionContainer 7357 err := json.Unmarshal(body, &avacpc) 7358 return avacpc, err 7359 default: 7360 var awc AzureWorkloadContainer 7361 err := json.Unmarshal(body, &awc) 7362 return awc, err 7363 } 7364} 7365func unmarshalBasicAzureWorkloadContainerArray(body []byte) ([]BasicAzureWorkloadContainer, error) { 7366 var rawMessages []*json.RawMessage 7367 err := json.Unmarshal(body, &rawMessages) 7368 if err != nil { 7369 return nil, err 7370 } 7371 7372 awcArray := make([]BasicAzureWorkloadContainer, len(rawMessages)) 7373 7374 for index, rawMessage := range rawMessages { 7375 awc, err := unmarshalBasicAzureWorkloadContainer(*rawMessage) 7376 if err != nil { 7377 return nil, err 7378 } 7379 awcArray[index] = awc 7380 } 7381 return awcArray, nil 7382} 7383 7384// MarshalJSON is the custom marshaler for AzureWorkloadContainer. 7385func (awc AzureWorkloadContainer) MarshalJSON() ([]byte, error) { 7386 awc.ContainerType = ContainerTypeAzureWorkloadContainer 7387 objectMap := make(map[string]interface{}) 7388 if awc.SourceResourceID != nil { 7389 objectMap["sourceResourceId"] = awc.SourceResourceID 7390 } 7391 if awc.LastUpdatedTime != nil { 7392 objectMap["lastUpdatedTime"] = awc.LastUpdatedTime 7393 } 7394 if awc.ExtendedInfo != nil { 7395 objectMap["extendedInfo"] = awc.ExtendedInfo 7396 } 7397 if awc.WorkloadType != "" { 7398 objectMap["workloadType"] = awc.WorkloadType 7399 } 7400 if awc.OperationType != "" { 7401 objectMap["operationType"] = awc.OperationType 7402 } 7403 if awc.FriendlyName != nil { 7404 objectMap["friendlyName"] = awc.FriendlyName 7405 } 7406 if awc.BackupManagementType != "" { 7407 objectMap["backupManagementType"] = awc.BackupManagementType 7408 } 7409 if awc.RegistrationStatus != nil { 7410 objectMap["registrationStatus"] = awc.RegistrationStatus 7411 } 7412 if awc.HealthStatus != nil { 7413 objectMap["healthStatus"] = awc.HealthStatus 7414 } 7415 if awc.ContainerType != "" { 7416 objectMap["containerType"] = awc.ContainerType 7417 } 7418 return json.Marshal(objectMap) 7419} 7420 7421// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. 7422func (awc AzureWorkloadContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { 7423 return nil, false 7424} 7425 7426// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. 7427func (awc AzureWorkloadContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { 7428 return nil, false 7429} 7430 7431// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. 7432func (awc AzureWorkloadContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { 7433 return nil, false 7434} 7435 7436// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. 7437func (awc AzureWorkloadContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { 7438 return nil, false 7439} 7440 7441// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. 7442func (awc AzureWorkloadContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { 7443 return nil, false 7444} 7445 7446// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. 7447func (awc AzureWorkloadContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { 7448 return nil, false 7449} 7450 7451// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. 7452func (awc AzureWorkloadContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { 7453 return nil, false 7454} 7455 7456// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. 7457func (awc AzureWorkloadContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { 7458 return &awc, true 7459} 7460 7461// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. 7462func (awc AzureWorkloadContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { 7463 return &awc, true 7464} 7465 7466// AsDpmContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. 7467func (awc AzureWorkloadContainer) AsDpmContainer() (*DpmContainer, bool) { 7468 return nil, false 7469} 7470 7471// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. 7472func (awc AzureWorkloadContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { 7473 return nil, false 7474} 7475 7476// AsGenericContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. 7477func (awc AzureWorkloadContainer) AsGenericContainer() (*GenericContainer, bool) { 7478 return nil, false 7479} 7480 7481// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. 7482func (awc AzureWorkloadContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { 7483 return nil, false 7484} 7485 7486// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. 7487func (awc AzureWorkloadContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { 7488 return nil, false 7489} 7490 7491// AsMabContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. 7492func (awc AzureWorkloadContainer) AsMabContainer() (*MabContainer, bool) { 7493 return nil, false 7494} 7495 7496// AsProtectionContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. 7497func (awc AzureWorkloadContainer) AsProtectionContainer() (*ProtectionContainer, bool) { 7498 return nil, false 7499} 7500 7501// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. 7502func (awc AzureWorkloadContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { 7503 return &awc, true 7504} 7505 7506// AzureWorkloadContainerExtendedInfo extended information of the container. 7507type AzureWorkloadContainerExtendedInfo struct { 7508 // HostServerName - Host Os Name in case of Stand Alone and Cluster Name in case of distributed container. 7509 HostServerName *string `json:"hostServerName,omitempty"` 7510 // InquiryInfo - Inquiry Status for the container. 7511 InquiryInfo *InquiryInfo `json:"inquiryInfo,omitempty"` 7512 // NodesList - List of the nodes in case of distributed container. 7513 NodesList *[]DistributedNodesInfo `json:"nodesList,omitempty"` 7514} 7515 7516// AzureWorkloadErrorInfo azure storage specific error information 7517type AzureWorkloadErrorInfo struct { 7518 // ErrorCode - Error code. 7519 ErrorCode *int32 `json:"errorCode,omitempty"` 7520 // ErrorString - Localized error string. 7521 ErrorString *string `json:"errorString,omitempty"` 7522 // ErrorTitle - Title: Typically, the entity that the error pertains to. 7523 ErrorTitle *string `json:"errorTitle,omitempty"` 7524 // Recommendations - List of localized recommendations for above error code. 7525 Recommendations *[]string `json:"recommendations,omitempty"` 7526 // AdditionalDetails - Additional details for above error code. 7527 AdditionalDetails *string `json:"additionalDetails,omitempty"` 7528} 7529 7530// AzureWorkloadJob azure storage specific job. 7531type AzureWorkloadJob struct { 7532 // WorkloadType - Workload type of the job 7533 WorkloadType *string `json:"workloadType,omitempty"` 7534 // Duration - Time elapsed during the execution of this job. 7535 Duration *string `json:"duration,omitempty"` 7536 // ActionsInfo - Gets or sets the state/actions applicable on this job like cancel/retry. 7537 ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"` 7538 // ErrorDetails - Error details on execution of this job. 7539 ErrorDetails *[]AzureWorkloadErrorInfo `json:"errorDetails,omitempty"` 7540 // ExtendedInfo - Additional information about the job. 7541 ExtendedInfo *AzureWorkloadJobExtendedInfo `json:"extendedInfo,omitempty"` 7542 // EntityFriendlyName - Friendly name of the entity on which the current job is executing. 7543 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` 7544 // BackupManagementType - Backup management type to execute the current job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 7545 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 7546 // Operation - The operation name. 7547 Operation *string `json:"operation,omitempty"` 7548 // Status - Job status. 7549 Status *string `json:"status,omitempty"` 7550 // StartTime - The start time. 7551 StartTime *date.Time `json:"startTime,omitempty"` 7552 // EndTime - The end time. 7553 EndTime *date.Time `json:"endTime,omitempty"` 7554 // ActivityID - ActivityId of job. 7555 ActivityID *string `json:"activityId,omitempty"` 7556 // JobType - Possible values include: 'JobTypeJob', 'JobTypeAzureIaaSVMJob', 'JobTypeAzureStorageJob', 'JobTypeAzureWorkloadJob', 'JobTypeDpmJob', 'JobTypeMabJob' 7557 JobType JobType `json:"jobType,omitempty"` 7558} 7559 7560// MarshalJSON is the custom marshaler for AzureWorkloadJob. 7561func (awj AzureWorkloadJob) MarshalJSON() ([]byte, error) { 7562 awj.JobType = JobTypeAzureWorkloadJob 7563 objectMap := make(map[string]interface{}) 7564 if awj.WorkloadType != nil { 7565 objectMap["workloadType"] = awj.WorkloadType 7566 } 7567 if awj.Duration != nil { 7568 objectMap["duration"] = awj.Duration 7569 } 7570 if awj.ActionsInfo != nil { 7571 objectMap["actionsInfo"] = awj.ActionsInfo 7572 } 7573 if awj.ErrorDetails != nil { 7574 objectMap["errorDetails"] = awj.ErrorDetails 7575 } 7576 if awj.ExtendedInfo != nil { 7577 objectMap["extendedInfo"] = awj.ExtendedInfo 7578 } 7579 if awj.EntityFriendlyName != nil { 7580 objectMap["entityFriendlyName"] = awj.EntityFriendlyName 7581 } 7582 if awj.BackupManagementType != "" { 7583 objectMap["backupManagementType"] = awj.BackupManagementType 7584 } 7585 if awj.Operation != nil { 7586 objectMap["operation"] = awj.Operation 7587 } 7588 if awj.Status != nil { 7589 objectMap["status"] = awj.Status 7590 } 7591 if awj.StartTime != nil { 7592 objectMap["startTime"] = awj.StartTime 7593 } 7594 if awj.EndTime != nil { 7595 objectMap["endTime"] = awj.EndTime 7596 } 7597 if awj.ActivityID != nil { 7598 objectMap["activityId"] = awj.ActivityID 7599 } 7600 if awj.JobType != "" { 7601 objectMap["jobType"] = awj.JobType 7602 } 7603 return json.Marshal(objectMap) 7604} 7605 7606// AsAzureIaaSVMJob is the BasicJob implementation for AzureWorkloadJob. 7607func (awj AzureWorkloadJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) { 7608 return nil, false 7609} 7610 7611// AsAzureStorageJob is the BasicJob implementation for AzureWorkloadJob. 7612func (awj AzureWorkloadJob) AsAzureStorageJob() (*AzureStorageJob, bool) { 7613 return nil, false 7614} 7615 7616// AsAzureWorkloadJob is the BasicJob implementation for AzureWorkloadJob. 7617func (awj AzureWorkloadJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) { 7618 return &awj, true 7619} 7620 7621// AsDpmJob is the BasicJob implementation for AzureWorkloadJob. 7622func (awj AzureWorkloadJob) AsDpmJob() (*DpmJob, bool) { 7623 return nil, false 7624} 7625 7626// AsMabJob is the BasicJob implementation for AzureWorkloadJob. 7627func (awj AzureWorkloadJob) AsMabJob() (*MabJob, bool) { 7628 return nil, false 7629} 7630 7631// AsJob is the BasicJob implementation for AzureWorkloadJob. 7632func (awj AzureWorkloadJob) AsJob() (*Job, bool) { 7633 return nil, false 7634} 7635 7636// AsBasicJob is the BasicJob implementation for AzureWorkloadJob. 7637func (awj AzureWorkloadJob) AsBasicJob() (BasicJob, bool) { 7638 return &awj, true 7639} 7640 7641// AzureWorkloadJobExtendedInfo azure VM workload-specific additional information for job. 7642type AzureWorkloadJobExtendedInfo struct { 7643 // TasksList - List of tasks for this job 7644 TasksList *[]AzureWorkloadJobTaskDetails `json:"tasksList,omitempty"` 7645 // PropertyBag - Job properties. 7646 PropertyBag map[string]*string `json:"propertyBag"` 7647 // DynamicErrorMessage - Non localized error message on job execution. 7648 DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"` 7649} 7650 7651// MarshalJSON is the custom marshaler for AzureWorkloadJobExtendedInfo. 7652func (awjei AzureWorkloadJobExtendedInfo) MarshalJSON() ([]byte, error) { 7653 objectMap := make(map[string]interface{}) 7654 if awjei.TasksList != nil { 7655 objectMap["tasksList"] = awjei.TasksList 7656 } 7657 if awjei.PropertyBag != nil { 7658 objectMap["propertyBag"] = awjei.PropertyBag 7659 } 7660 if awjei.DynamicErrorMessage != nil { 7661 objectMap["dynamicErrorMessage"] = awjei.DynamicErrorMessage 7662 } 7663 return json.Marshal(objectMap) 7664} 7665 7666// AzureWorkloadJobTaskDetails azure VM workload specific job task details. 7667type AzureWorkloadJobTaskDetails struct { 7668 // TaskID - The task display name. 7669 TaskID *string `json:"taskId,omitempty"` 7670 // Status - The status. 7671 Status *string `json:"status,omitempty"` 7672} 7673 7674// BasicAzureWorkloadPointInTimeRecoveryPoint recovery point specific to PointInTime 7675type BasicAzureWorkloadPointInTimeRecoveryPoint interface { 7676 AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) 7677 AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) 7678} 7679 7680// AzureWorkloadPointInTimeRecoveryPoint recovery point specific to PointInTime 7681type AzureWorkloadPointInTimeRecoveryPoint struct { 7682 // TimeRanges - List of log ranges 7683 TimeRanges *[]PointInTimeRange `json:"timeRanges,omitempty"` 7684 // RecoveryPointTimeInUTC - READ-ONLY; UTC time at which recovery point was created 7685 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"` 7686 // Type - READ-ONLY; Type of restore point. Possible values include: 'RestorePointTypeInvalid', 'RestorePointTypeFull', 'RestorePointTypeLog', 'RestorePointTypeDifferential' 7687 Type RestorePointType `json:"type,omitempty"` 7688 // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' 7689 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` 7690} 7691 7692func unmarshalBasicAzureWorkloadPointInTimeRecoveryPoint(body []byte) (BasicAzureWorkloadPointInTimeRecoveryPoint, error) { 7693 var m map[string]interface{} 7694 err := json.Unmarshal(body, &m) 7695 if err != nil { 7696 return nil, err 7697 } 7698 7699 switch m["objectType"] { 7700 case string(ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint): 7701 var awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint 7702 err := json.Unmarshal(body, &awshpitrp) 7703 return awshpitrp, err 7704 default: 7705 var awpitrp AzureWorkloadPointInTimeRecoveryPoint 7706 err := json.Unmarshal(body, &awpitrp) 7707 return awpitrp, err 7708 } 7709} 7710func unmarshalBasicAzureWorkloadPointInTimeRecoveryPointArray(body []byte) ([]BasicAzureWorkloadPointInTimeRecoveryPoint, error) { 7711 var rawMessages []*json.RawMessage 7712 err := json.Unmarshal(body, &rawMessages) 7713 if err != nil { 7714 return nil, err 7715 } 7716 7717 awpitrpArray := make([]BasicAzureWorkloadPointInTimeRecoveryPoint, len(rawMessages)) 7718 7719 for index, rawMessage := range rawMessages { 7720 awpitrp, err := unmarshalBasicAzureWorkloadPointInTimeRecoveryPoint(*rawMessage) 7721 if err != nil { 7722 return nil, err 7723 } 7724 awpitrpArray[index] = awpitrp 7725 } 7726 return awpitrpArray, nil 7727} 7728 7729// MarshalJSON is the custom marshaler for AzureWorkloadPointInTimeRecoveryPoint. 7730func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) { 7731 awpitrp.ObjectType = ObjectTypeAzureWorkloadPointInTimeRecoveryPoint 7732 objectMap := make(map[string]interface{}) 7733 if awpitrp.TimeRanges != nil { 7734 objectMap["timeRanges"] = awpitrp.TimeRanges 7735 } 7736 if awpitrp.ObjectType != "" { 7737 objectMap["objectType"] = awpitrp.ObjectType 7738 } 7739 return json.Marshal(objectMap) 7740} 7741 7742// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. 7743func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { 7744 return nil, false 7745} 7746 7747// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. 7748func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { 7749 return &awpitrp, true 7750} 7751 7752// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. 7753func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { 7754 return &awpitrp, true 7755} 7756 7757// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. 7758func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { 7759 return nil, false 7760} 7761 7762// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. 7763func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { 7764 return &awpitrp, true 7765} 7766 7767// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. 7768func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { 7769 return nil, false 7770} 7771 7772// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. 7773func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { 7774 return nil, false 7775} 7776 7777// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. 7778func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { 7779 return nil, false 7780} 7781 7782// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. 7783func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { 7784 return nil, false 7785} 7786 7787// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. 7788func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { 7789 return nil, false 7790} 7791 7792// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. 7793func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { 7794 return nil, false 7795} 7796 7797// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. 7798func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { 7799 return nil, false 7800} 7801 7802// AsRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. 7803func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { 7804 return nil, false 7805} 7806 7807// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. 7808func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { 7809 return &awpitrp, true 7810} 7811 7812// AzureWorkloadPointInTimeRestoreRequest azureWorkload SAP Hana -specific restore. Specifically for 7813// PointInTime/Log restore 7814type AzureWorkloadPointInTimeRestoreRequest struct { 7815 // PointInTime - PointInTime value 7816 PointInTime *date.Time `json:"pointInTime,omitempty"` 7817 // RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline' 7818 RecoveryType RecoveryType `json:"recoveryType,omitempty"` 7819 // SourceResourceID - Fully qualified ARM ID of the VM on which workload that was running is being recovered. 7820 SourceResourceID *string `json:"sourceResourceId,omitempty"` 7821 // PropertyBag - Workload specific property bag. 7822 PropertyBag map[string]*string `json:"propertyBag"` 7823 // TargetInfo - Details of target database 7824 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"` 7825 // RecoveryMode - Defines whether the current recovery mode is file restore or database restore. Possible values include: 'RecoveryModeInvalid', 'RecoveryModeFileRecovery', 'RecoveryModeWorkloadRecovery' 7826 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"` 7827 // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' 7828 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` 7829} 7830 7831// MarshalJSON is the custom marshaler for AzureWorkloadPointInTimeRestoreRequest. 7832func (awpitrr AzureWorkloadPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { 7833 awpitrr.ObjectType = ObjectTypeAzureWorkloadPointInTimeRestoreRequest 7834 objectMap := make(map[string]interface{}) 7835 if awpitrr.PointInTime != nil { 7836 objectMap["pointInTime"] = awpitrr.PointInTime 7837 } 7838 if awpitrr.RecoveryType != "" { 7839 objectMap["recoveryType"] = awpitrr.RecoveryType 7840 } 7841 if awpitrr.SourceResourceID != nil { 7842 objectMap["sourceResourceId"] = awpitrr.SourceResourceID 7843 } 7844 if awpitrr.PropertyBag != nil { 7845 objectMap["propertyBag"] = awpitrr.PropertyBag 7846 } 7847 if awpitrr.TargetInfo != nil { 7848 objectMap["targetInfo"] = awpitrr.TargetInfo 7849 } 7850 if awpitrr.RecoveryMode != "" { 7851 objectMap["recoveryMode"] = awpitrr.RecoveryMode 7852 } 7853 if awpitrr.ObjectType != "" { 7854 objectMap["objectType"] = awpitrr.ObjectType 7855 } 7856 return json.Marshal(objectMap) 7857} 7858 7859// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. 7860func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { 7861 return nil, false 7862} 7863 7864// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. 7865func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { 7866 return &awpitrr, true 7867} 7868 7869// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. 7870func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { 7871 return nil, false 7872} 7873 7874// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. 7875func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { 7876 return &awpitrr, true 7877} 7878 7879// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. 7880func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { 7881 return nil, false 7882} 7883 7884// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. 7885func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { 7886 return nil, false 7887} 7888 7889// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. 7890func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { 7891 return nil, false 7892} 7893 7894// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. 7895func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { 7896 return nil, false 7897} 7898 7899// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. 7900func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { 7901 return nil, false 7902} 7903 7904// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. 7905func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { 7906 return nil, false 7907} 7908 7909// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. 7910func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { 7911 return nil, false 7912} 7913 7914// AsRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. 7915func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { 7916 return nil, false 7917} 7918 7919// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. 7920func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { 7921 return &awpitrr, true 7922} 7923 7924// BasicAzureWorkloadRecoveryPoint workload specific recovery point, specifically encapsulates full/diff recovery point 7925type BasicAzureWorkloadRecoveryPoint interface { 7926 AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) 7927 AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) 7928 AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) 7929 AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) 7930 AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) 7931 AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) 7932 AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) 7933 AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) 7934} 7935 7936// AzureWorkloadRecoveryPoint workload specific recovery point, specifically encapsulates full/diff recovery 7937// point 7938type AzureWorkloadRecoveryPoint struct { 7939 // RecoveryPointTimeInUTC - READ-ONLY; UTC time at which recovery point was created 7940 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"` 7941 // Type - READ-ONLY; Type of restore point. Possible values include: 'RestorePointTypeInvalid', 'RestorePointTypeFull', 'RestorePointTypeLog', 'RestorePointTypeDifferential' 7942 Type RestorePointType `json:"type,omitempty"` 7943 // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' 7944 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` 7945} 7946 7947func unmarshalBasicAzureWorkloadRecoveryPoint(body []byte) (BasicAzureWorkloadRecoveryPoint, error) { 7948 var m map[string]interface{} 7949 err := json.Unmarshal(body, &m) 7950 if err != nil { 7951 return nil, err 7952 } 7953 7954 switch m["objectType"] { 7955 case string(ObjectTypeAzureWorkloadPointInTimeRecoveryPoint): 7956 var awpitrp AzureWorkloadPointInTimeRecoveryPoint 7957 err := json.Unmarshal(body, &awpitrp) 7958 return awpitrp, err 7959 case string(ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint): 7960 var awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint 7961 err := json.Unmarshal(body, &awshpitrp) 7962 return awshpitrp, err 7963 case string(ObjectTypeAzureWorkloadSAPHanaRecoveryPoint): 7964 var awshrp AzureWorkloadSAPHanaRecoveryPoint 7965 err := json.Unmarshal(body, &awshrp) 7966 return awshrp, err 7967 case string(ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint): 7968 var awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint 7969 err := json.Unmarshal(body, &awspitrp) 7970 return awspitrp, err 7971 case string(ObjectTypeAzureWorkloadSQLRecoveryPoint): 7972 var awsrp AzureWorkloadSQLRecoveryPoint 7973 err := json.Unmarshal(body, &awsrp) 7974 return awsrp, err 7975 default: 7976 var awrp AzureWorkloadRecoveryPoint 7977 err := json.Unmarshal(body, &awrp) 7978 return awrp, err 7979 } 7980} 7981func unmarshalBasicAzureWorkloadRecoveryPointArray(body []byte) ([]BasicAzureWorkloadRecoveryPoint, error) { 7982 var rawMessages []*json.RawMessage 7983 err := json.Unmarshal(body, &rawMessages) 7984 if err != nil { 7985 return nil, err 7986 } 7987 7988 awrpArray := make([]BasicAzureWorkloadRecoveryPoint, len(rawMessages)) 7989 7990 for index, rawMessage := range rawMessages { 7991 awrp, err := unmarshalBasicAzureWorkloadRecoveryPoint(*rawMessage) 7992 if err != nil { 7993 return nil, err 7994 } 7995 awrpArray[index] = awrp 7996 } 7997 return awrpArray, nil 7998} 7999 8000// MarshalJSON is the custom marshaler for AzureWorkloadRecoveryPoint. 8001func (awrp AzureWorkloadRecoveryPoint) MarshalJSON() ([]byte, error) { 8002 awrp.ObjectType = ObjectTypeAzureWorkloadRecoveryPoint 8003 objectMap := make(map[string]interface{}) 8004 if awrp.ObjectType != "" { 8005 objectMap["objectType"] = awrp.ObjectType 8006 } 8007 return json.Marshal(objectMap) 8008} 8009 8010// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. 8011func (awrp AzureWorkloadRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { 8012 return nil, false 8013} 8014 8015// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. 8016func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { 8017 return nil, false 8018} 8019 8020// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. 8021func (awrp AzureWorkloadRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { 8022 return nil, false 8023} 8024 8025// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. 8026func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { 8027 return &awrp, true 8028} 8029 8030// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. 8031func (awrp AzureWorkloadRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { 8032 return &awrp, true 8033} 8034 8035// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. 8036func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { 8037 return nil, false 8038} 8039 8040// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. 8041func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { 8042 return nil, false 8043} 8044 8045// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. 8046func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { 8047 return nil, false 8048} 8049 8050// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. 8051func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { 8052 return nil, false 8053} 8054 8055// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. 8056func (awrp AzureWorkloadRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { 8057 return nil, false 8058} 8059 8060// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. 8061func (awrp AzureWorkloadRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { 8062 return nil, false 8063} 8064 8065// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. 8066func (awrp AzureWorkloadRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { 8067 return nil, false 8068} 8069 8070// AsRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. 8071func (awrp AzureWorkloadRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { 8072 return nil, false 8073} 8074 8075// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. 8076func (awrp AzureWorkloadRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { 8077 return &awrp, true 8078} 8079 8080// BasicAzureWorkloadRestoreRequest azureWorkload-specific restore. 8081type BasicAzureWorkloadRestoreRequest interface { 8082 AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) 8083 AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) 8084 AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) 8085 AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) 8086 AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) 8087 AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) 8088 AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) 8089 AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) 8090} 8091 8092// AzureWorkloadRestoreRequest azureWorkload-specific restore. 8093type AzureWorkloadRestoreRequest struct { 8094 // RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline' 8095 RecoveryType RecoveryType `json:"recoveryType,omitempty"` 8096 // SourceResourceID - Fully qualified ARM ID of the VM on which workload that was running is being recovered. 8097 SourceResourceID *string `json:"sourceResourceId,omitempty"` 8098 // PropertyBag - Workload specific property bag. 8099 PropertyBag map[string]*string `json:"propertyBag"` 8100 // TargetInfo - Details of target database 8101 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"` 8102 // RecoveryMode - Defines whether the current recovery mode is file restore or database restore. Possible values include: 'RecoveryModeInvalid', 'RecoveryModeFileRecovery', 'RecoveryModeWorkloadRecovery' 8103 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"` 8104 // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' 8105 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` 8106} 8107 8108func unmarshalBasicAzureWorkloadRestoreRequest(body []byte) (BasicAzureWorkloadRestoreRequest, error) { 8109 var m map[string]interface{} 8110 err := json.Unmarshal(body, &m) 8111 if err != nil { 8112 return nil, err 8113 } 8114 8115 switch m["objectType"] { 8116 case string(ObjectTypeAzureWorkloadPointInTimeRestoreRequest): 8117 var awpitrr AzureWorkloadPointInTimeRestoreRequest 8118 err := json.Unmarshal(body, &awpitrr) 8119 return awpitrr, err 8120 case string(ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest): 8121 var awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest 8122 err := json.Unmarshal(body, &awshpitrr) 8123 return awshpitrr, err 8124 case string(ObjectTypeAzureWorkloadSAPHanaRestoreRequest): 8125 var awshrr AzureWorkloadSAPHanaRestoreRequest 8126 err := json.Unmarshal(body, &awshrr) 8127 return awshrr, err 8128 case string(ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest): 8129 var awspitrr AzureWorkloadSQLPointInTimeRestoreRequest 8130 err := json.Unmarshal(body, &awspitrr) 8131 return awspitrr, err 8132 case string(ObjectTypeAzureWorkloadSQLRestoreRequest): 8133 var awsrr AzureWorkloadSQLRestoreRequest 8134 err := json.Unmarshal(body, &awsrr) 8135 return awsrr, err 8136 default: 8137 var awrr AzureWorkloadRestoreRequest 8138 err := json.Unmarshal(body, &awrr) 8139 return awrr, err 8140 } 8141} 8142func unmarshalBasicAzureWorkloadRestoreRequestArray(body []byte) ([]BasicAzureWorkloadRestoreRequest, error) { 8143 var rawMessages []*json.RawMessage 8144 err := json.Unmarshal(body, &rawMessages) 8145 if err != nil { 8146 return nil, err 8147 } 8148 8149 awrrArray := make([]BasicAzureWorkloadRestoreRequest, len(rawMessages)) 8150 8151 for index, rawMessage := range rawMessages { 8152 awrr, err := unmarshalBasicAzureWorkloadRestoreRequest(*rawMessage) 8153 if err != nil { 8154 return nil, err 8155 } 8156 awrrArray[index] = awrr 8157 } 8158 return awrrArray, nil 8159} 8160 8161// MarshalJSON is the custom marshaler for AzureWorkloadRestoreRequest. 8162func (awrr AzureWorkloadRestoreRequest) MarshalJSON() ([]byte, error) { 8163 awrr.ObjectType = ObjectTypeAzureWorkloadRestoreRequest 8164 objectMap := make(map[string]interface{}) 8165 if awrr.RecoveryType != "" { 8166 objectMap["recoveryType"] = awrr.RecoveryType 8167 } 8168 if awrr.SourceResourceID != nil { 8169 objectMap["sourceResourceId"] = awrr.SourceResourceID 8170 } 8171 if awrr.PropertyBag != nil { 8172 objectMap["propertyBag"] = awrr.PropertyBag 8173 } 8174 if awrr.TargetInfo != nil { 8175 objectMap["targetInfo"] = awrr.TargetInfo 8176 } 8177 if awrr.RecoveryMode != "" { 8178 objectMap["recoveryMode"] = awrr.RecoveryMode 8179 } 8180 if awrr.ObjectType != "" { 8181 objectMap["objectType"] = awrr.ObjectType 8182 } 8183 return json.Marshal(objectMap) 8184} 8185 8186// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. 8187func (awrr AzureWorkloadRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { 8188 return nil, false 8189} 8190 8191// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. 8192func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { 8193 return nil, false 8194} 8195 8196// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. 8197func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { 8198 return &awrr, true 8199} 8200 8201// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. 8202func (awrr AzureWorkloadRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { 8203 return &awrr, true 8204} 8205 8206// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. 8207func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { 8208 return nil, false 8209} 8210 8211// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. 8212func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { 8213 return nil, false 8214} 8215 8216// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. 8217func (awrr AzureWorkloadRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { 8218 return nil, false 8219} 8220 8221// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. 8222func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { 8223 return nil, false 8224} 8225 8226// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. 8227func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { 8228 return nil, false 8229} 8230 8231// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. 8232func (awrr AzureWorkloadRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { 8233 return nil, false 8234} 8235 8236// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. 8237func (awrr AzureWorkloadRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { 8238 return nil, false 8239} 8240 8241// AsRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. 8242func (awrr AzureWorkloadRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { 8243 return nil, false 8244} 8245 8246// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. 8247func (awrr AzureWorkloadRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { 8248 return &awrr, true 8249} 8250 8251// AzureWorkloadSAPHanaPointInTimeRecoveryPoint recovery point specific to PointInTime in SAPHana 8252type AzureWorkloadSAPHanaPointInTimeRecoveryPoint struct { 8253 // TimeRanges - List of log ranges 8254 TimeRanges *[]PointInTimeRange `json:"timeRanges,omitempty"` 8255 // RecoveryPointTimeInUTC - READ-ONLY; UTC time at which recovery point was created 8256 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"` 8257 // Type - READ-ONLY; Type of restore point. Possible values include: 'RestorePointTypeInvalid', 'RestorePointTypeFull', 'RestorePointTypeLog', 'RestorePointTypeDifferential' 8258 Type RestorePointType `json:"type,omitempty"` 8259 // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' 8260 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` 8261} 8262 8263// MarshalJSON is the custom marshaler for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. 8264func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) { 8265 awshpitrp.ObjectType = ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint 8266 objectMap := make(map[string]interface{}) 8267 if awshpitrp.TimeRanges != nil { 8268 objectMap["timeRanges"] = awshpitrp.TimeRanges 8269 } 8270 if awshpitrp.ObjectType != "" { 8271 objectMap["objectType"] = awshpitrp.ObjectType 8272 } 8273 return json.Marshal(objectMap) 8274} 8275 8276// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. 8277func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { 8278 return nil, false 8279} 8280 8281// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. 8282func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { 8283 return nil, false 8284} 8285 8286// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. 8287func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { 8288 return &awshpitrp, true 8289} 8290 8291// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. 8292func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { 8293 return nil, false 8294} 8295 8296// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. 8297func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { 8298 return &awshpitrp, true 8299} 8300 8301// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. 8302func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { 8303 return &awshpitrp, true 8304} 8305 8306// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. 8307func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { 8308 return nil, false 8309} 8310 8311// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. 8312func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { 8313 return nil, false 8314} 8315 8316// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. 8317func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { 8318 return nil, false 8319} 8320 8321// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. 8322func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { 8323 return nil, false 8324} 8325 8326// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. 8327func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { 8328 return nil, false 8329} 8330 8331// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. 8332func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { 8333 return nil, false 8334} 8335 8336// AsRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. 8337func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { 8338 return nil, false 8339} 8340 8341// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. 8342func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { 8343 return &awshpitrp, true 8344} 8345 8346// AzureWorkloadSAPHanaPointInTimeRestoreRequest azureWorkload SAP Hana -specific restore. Specifically for 8347// PointInTime/Log restore 8348type AzureWorkloadSAPHanaPointInTimeRestoreRequest struct { 8349 // PointInTime - PointInTime value 8350 PointInTime *date.Time `json:"pointInTime,omitempty"` 8351 // RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline' 8352 RecoveryType RecoveryType `json:"recoveryType,omitempty"` 8353 // SourceResourceID - Fully qualified ARM ID of the VM on which workload that was running is being recovered. 8354 SourceResourceID *string `json:"sourceResourceId,omitempty"` 8355 // PropertyBag - Workload specific property bag. 8356 PropertyBag map[string]*string `json:"propertyBag"` 8357 // TargetInfo - Details of target database 8358 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"` 8359 // RecoveryMode - Defines whether the current recovery mode is file restore or database restore. Possible values include: 'RecoveryModeInvalid', 'RecoveryModeFileRecovery', 'RecoveryModeWorkloadRecovery' 8360 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"` 8361 // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' 8362 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` 8363} 8364 8365// MarshalJSON is the custom marshaler for AzureWorkloadSAPHanaPointInTimeRestoreRequest. 8366func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { 8367 awshpitrr.ObjectType = ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest 8368 objectMap := make(map[string]interface{}) 8369 if awshpitrr.PointInTime != nil { 8370 objectMap["pointInTime"] = awshpitrr.PointInTime 8371 } 8372 if awshpitrr.RecoveryType != "" { 8373 objectMap["recoveryType"] = awshpitrr.RecoveryType 8374 } 8375 if awshpitrr.SourceResourceID != nil { 8376 objectMap["sourceResourceId"] = awshpitrr.SourceResourceID 8377 } 8378 if awshpitrr.PropertyBag != nil { 8379 objectMap["propertyBag"] = awshpitrr.PropertyBag 8380 } 8381 if awshpitrr.TargetInfo != nil { 8382 objectMap["targetInfo"] = awshpitrr.TargetInfo 8383 } 8384 if awshpitrr.RecoveryMode != "" { 8385 objectMap["recoveryMode"] = awshpitrr.RecoveryMode 8386 } 8387 if awshpitrr.ObjectType != "" { 8388 objectMap["objectType"] = awshpitrr.ObjectType 8389 } 8390 return json.Marshal(objectMap) 8391} 8392 8393// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. 8394func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { 8395 return nil, false 8396} 8397 8398// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. 8399func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { 8400 return nil, false 8401} 8402 8403// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. 8404func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { 8405 return nil, false 8406} 8407 8408// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. 8409func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { 8410 return &awshpitrr, true 8411} 8412 8413// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. 8414func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { 8415 return &awshpitrr, true 8416} 8417 8418// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. 8419func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { 8420 return nil, false 8421} 8422 8423// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. 8424func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { 8425 return &awshpitrr, true 8426} 8427 8428// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. 8429func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { 8430 return nil, false 8431} 8432 8433// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. 8434func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { 8435 return nil, false 8436} 8437 8438// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. 8439func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { 8440 return nil, false 8441} 8442 8443// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. 8444func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { 8445 return nil, false 8446} 8447 8448// AsRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. 8449func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { 8450 return nil, false 8451} 8452 8453// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. 8454func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { 8455 return &awshpitrr, true 8456} 8457 8458// AzureWorkloadSAPHanaRecoveryPoint sAPHana specific recoverypoint, specifically encapsulates full/diff 8459// recoverypoints 8460type AzureWorkloadSAPHanaRecoveryPoint struct { 8461 // RecoveryPointTimeInUTC - READ-ONLY; UTC time at which recovery point was created 8462 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"` 8463 // Type - READ-ONLY; Type of restore point. Possible values include: 'RestorePointTypeInvalid', 'RestorePointTypeFull', 'RestorePointTypeLog', 'RestorePointTypeDifferential' 8464 Type RestorePointType `json:"type,omitempty"` 8465 // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' 8466 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` 8467} 8468 8469// MarshalJSON is the custom marshaler for AzureWorkloadSAPHanaRecoveryPoint. 8470func (awshrp AzureWorkloadSAPHanaRecoveryPoint) MarshalJSON() ([]byte, error) { 8471 awshrp.ObjectType = ObjectTypeAzureWorkloadSAPHanaRecoveryPoint 8472 objectMap := make(map[string]interface{}) 8473 if awshrp.ObjectType != "" { 8474 objectMap["objectType"] = awshrp.ObjectType 8475 } 8476 return json.Marshal(objectMap) 8477} 8478 8479// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. 8480func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { 8481 return nil, false 8482} 8483 8484// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. 8485func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { 8486 return nil, false 8487} 8488 8489// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. 8490func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { 8491 return nil, false 8492} 8493 8494// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. 8495func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { 8496 return nil, false 8497} 8498 8499// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. 8500func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { 8501 return &awshrp, true 8502} 8503 8504// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. 8505func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { 8506 return nil, false 8507} 8508 8509// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. 8510func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { 8511 return &awshrp, true 8512} 8513 8514// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. 8515func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { 8516 return nil, false 8517} 8518 8519// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. 8520func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { 8521 return nil, false 8522} 8523 8524// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. 8525func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { 8526 return nil, false 8527} 8528 8529// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. 8530func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { 8531 return nil, false 8532} 8533 8534// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. 8535func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { 8536 return nil, false 8537} 8538 8539// AsRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. 8540func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { 8541 return nil, false 8542} 8543 8544// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. 8545func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { 8546 return &awshrp, true 8547} 8548 8549// BasicAzureWorkloadSAPHanaRestoreRequest azureWorkload SAP Hana-specific restore. 8550type BasicAzureWorkloadSAPHanaRestoreRequest interface { 8551 AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) 8552 AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) 8553} 8554 8555// AzureWorkloadSAPHanaRestoreRequest azureWorkload SAP Hana-specific restore. 8556type AzureWorkloadSAPHanaRestoreRequest struct { 8557 // RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline' 8558 RecoveryType RecoveryType `json:"recoveryType,omitempty"` 8559 // SourceResourceID - Fully qualified ARM ID of the VM on which workload that was running is being recovered. 8560 SourceResourceID *string `json:"sourceResourceId,omitempty"` 8561 // PropertyBag - Workload specific property bag. 8562 PropertyBag map[string]*string `json:"propertyBag"` 8563 // TargetInfo - Details of target database 8564 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"` 8565 // RecoveryMode - Defines whether the current recovery mode is file restore or database restore. Possible values include: 'RecoveryModeInvalid', 'RecoveryModeFileRecovery', 'RecoveryModeWorkloadRecovery' 8566 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"` 8567 // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' 8568 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` 8569} 8570 8571func unmarshalBasicAzureWorkloadSAPHanaRestoreRequest(body []byte) (BasicAzureWorkloadSAPHanaRestoreRequest, error) { 8572 var m map[string]interface{} 8573 err := json.Unmarshal(body, &m) 8574 if err != nil { 8575 return nil, err 8576 } 8577 8578 switch m["objectType"] { 8579 case string(ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest): 8580 var awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest 8581 err := json.Unmarshal(body, &awshpitrr) 8582 return awshpitrr, err 8583 default: 8584 var awshrr AzureWorkloadSAPHanaRestoreRequest 8585 err := json.Unmarshal(body, &awshrr) 8586 return awshrr, err 8587 } 8588} 8589func unmarshalBasicAzureWorkloadSAPHanaRestoreRequestArray(body []byte) ([]BasicAzureWorkloadSAPHanaRestoreRequest, error) { 8590 var rawMessages []*json.RawMessage 8591 err := json.Unmarshal(body, &rawMessages) 8592 if err != nil { 8593 return nil, err 8594 } 8595 8596 awshrrArray := make([]BasicAzureWorkloadSAPHanaRestoreRequest, len(rawMessages)) 8597 8598 for index, rawMessage := range rawMessages { 8599 awshrr, err := unmarshalBasicAzureWorkloadSAPHanaRestoreRequest(*rawMessage) 8600 if err != nil { 8601 return nil, err 8602 } 8603 awshrrArray[index] = awshrr 8604 } 8605 return awshrrArray, nil 8606} 8607 8608// MarshalJSON is the custom marshaler for AzureWorkloadSAPHanaRestoreRequest. 8609func (awshrr AzureWorkloadSAPHanaRestoreRequest) MarshalJSON() ([]byte, error) { 8610 awshrr.ObjectType = ObjectTypeAzureWorkloadSAPHanaRestoreRequest 8611 objectMap := make(map[string]interface{}) 8612 if awshrr.RecoveryType != "" { 8613 objectMap["recoveryType"] = awshrr.RecoveryType 8614 } 8615 if awshrr.SourceResourceID != nil { 8616 objectMap["sourceResourceId"] = awshrr.SourceResourceID 8617 } 8618 if awshrr.PropertyBag != nil { 8619 objectMap["propertyBag"] = awshrr.PropertyBag 8620 } 8621 if awshrr.TargetInfo != nil { 8622 objectMap["targetInfo"] = awshrr.TargetInfo 8623 } 8624 if awshrr.RecoveryMode != "" { 8625 objectMap["recoveryMode"] = awshrr.RecoveryMode 8626 } 8627 if awshrr.ObjectType != "" { 8628 objectMap["objectType"] = awshrr.ObjectType 8629 } 8630 return json.Marshal(objectMap) 8631} 8632 8633// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. 8634func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { 8635 return nil, false 8636} 8637 8638// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. 8639func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { 8640 return nil, false 8641} 8642 8643// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. 8644func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { 8645 return nil, false 8646} 8647 8648// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. 8649func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { 8650 return &awshrr, true 8651} 8652 8653// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. 8654func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { 8655 return nil, false 8656} 8657 8658// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. 8659func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { 8660 return &awshrr, true 8661} 8662 8663// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. 8664func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { 8665 return &awshrr, true 8666} 8667 8668// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. 8669func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { 8670 return nil, false 8671} 8672 8673// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. 8674func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { 8675 return nil, false 8676} 8677 8678// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. 8679func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { 8680 return nil, false 8681} 8682 8683// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. 8684func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { 8685 return nil, false 8686} 8687 8688// AsRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. 8689func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { 8690 return nil, false 8691} 8692 8693// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. 8694func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { 8695 return &awshrr, true 8696} 8697 8698// AzureWorkloadSQLAutoProtectionIntent azure Workload SQL Auto Protection intent item. 8699type AzureWorkloadSQLAutoProtectionIntent struct { 8700 // WorkloadItemType - Workload item type of the item for which intent is to be set. Possible values include: 'WorkloadItemTypeInvalid', 'WorkloadItemTypeSQLInstance', 'WorkloadItemTypeSQLDataBase', 'WorkloadItemTypeSAPHanaSystem', 'WorkloadItemTypeSAPHanaDatabase', 'WorkloadItemTypeSAPAseSystem', 'WorkloadItemTypeSAPAseDatabase' 8701 WorkloadItemType WorkloadItemType `json:"workloadItemType,omitempty"` 8702 // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 8703 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 8704 // SourceResourceID - ARM ID of the resource to be backed up. 8705 SourceResourceID *string `json:"sourceResourceId,omitempty"` 8706 // ItemID - ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId 8707 ItemID *string `json:"itemId,omitempty"` 8708 // PolicyID - ID of the backup policy with which this item is backed up. 8709 PolicyID *string `json:"policyId,omitempty"` 8710 // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 8711 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 8712 // ProtectionIntentItemType - Possible values include: 'ProtectionIntentItemTypeProtectionIntent', 'ProtectionIntentItemTypeRecoveryServiceVaultItem', 'ProtectionIntentItemTypeAzureResourceItem', 'ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent', 'ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent' 8713 ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"` 8714} 8715 8716// MarshalJSON is the custom marshaler for AzureWorkloadSQLAutoProtectionIntent. 8717func (awsapi AzureWorkloadSQLAutoProtectionIntent) MarshalJSON() ([]byte, error) { 8718 awsapi.ProtectionIntentItemType = ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent 8719 objectMap := make(map[string]interface{}) 8720 if awsapi.WorkloadItemType != "" { 8721 objectMap["workloadItemType"] = awsapi.WorkloadItemType 8722 } 8723 if awsapi.BackupManagementType != "" { 8724 objectMap["backupManagementType"] = awsapi.BackupManagementType 8725 } 8726 if awsapi.SourceResourceID != nil { 8727 objectMap["sourceResourceId"] = awsapi.SourceResourceID 8728 } 8729 if awsapi.ItemID != nil { 8730 objectMap["itemId"] = awsapi.ItemID 8731 } 8732 if awsapi.PolicyID != nil { 8733 objectMap["policyId"] = awsapi.PolicyID 8734 } 8735 if awsapi.ProtectionState != "" { 8736 objectMap["protectionState"] = awsapi.ProtectionState 8737 } 8738 if awsapi.ProtectionIntentItemType != "" { 8739 objectMap["protectionIntentItemType"] = awsapi.ProtectionIntentItemType 8740 } 8741 return json.Marshal(objectMap) 8742} 8743 8744// AsAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. 8745func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) { 8746 return nil, false 8747} 8748 8749// AsBasicAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. 8750func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) { 8751 return &awsapi, true 8752} 8753 8754// AsAzureResourceProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. 8755func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) { 8756 return nil, false 8757} 8758 8759// AsAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. 8760func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) { 8761 return nil, false 8762} 8763 8764// AsBasicAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. 8765func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) { 8766 return &awsapi, true 8767} 8768 8769// AsAzureWorkloadSQLAutoProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. 8770func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) { 8771 return &awsapi, true 8772} 8773 8774// AsProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. 8775func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) { 8776 return nil, false 8777} 8778 8779// AsBasicProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. 8780func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) { 8781 return &awsapi, true 8782} 8783 8784// AzureWorkloadSQLPointInTimeRecoveryPoint recovery point specific to PointInTime 8785type AzureWorkloadSQLPointInTimeRecoveryPoint struct { 8786 // TimeRanges - List of log ranges 8787 TimeRanges *[]PointInTimeRange `json:"timeRanges,omitempty"` 8788 // ExtendedInfo - Extended Info that provides data directory details. Will be populated in two cases: 8789 // When a specific recovery point is accessed using GetRecoveryPoint 8790 // Or when ListRecoveryPoints is called for Log RP only with ExtendedInfo query filter 8791 ExtendedInfo *AzureWorkloadSQLRecoveryPointExtendedInfo `json:"extendedInfo,omitempty"` 8792 // RecoveryPointTimeInUTC - READ-ONLY; UTC time at which recovery point was created 8793 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"` 8794 // Type - READ-ONLY; Type of restore point. Possible values include: 'RestorePointTypeInvalid', 'RestorePointTypeFull', 'RestorePointTypeLog', 'RestorePointTypeDifferential' 8795 Type RestorePointType `json:"type,omitempty"` 8796 // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' 8797 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` 8798} 8799 8800// MarshalJSON is the custom marshaler for AzureWorkloadSQLPointInTimeRecoveryPoint. 8801func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) { 8802 awspitrp.ObjectType = ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint 8803 objectMap := make(map[string]interface{}) 8804 if awspitrp.TimeRanges != nil { 8805 objectMap["timeRanges"] = awspitrp.TimeRanges 8806 } 8807 if awspitrp.ExtendedInfo != nil { 8808 objectMap["extendedInfo"] = awspitrp.ExtendedInfo 8809 } 8810 if awspitrp.ObjectType != "" { 8811 objectMap["objectType"] = awspitrp.ObjectType 8812 } 8813 return json.Marshal(objectMap) 8814} 8815 8816// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. 8817func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { 8818 return nil, false 8819} 8820 8821// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. 8822func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { 8823 return nil, false 8824} 8825 8826// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. 8827func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { 8828 return nil, false 8829} 8830 8831// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. 8832func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { 8833 return nil, false 8834} 8835 8836// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. 8837func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { 8838 return &awspitrp, true 8839} 8840 8841// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. 8842func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { 8843 return nil, false 8844} 8845 8846// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. 8847func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { 8848 return nil, false 8849} 8850 8851// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. 8852func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { 8853 return &awspitrp, true 8854} 8855 8856// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. 8857func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { 8858 return nil, false 8859} 8860 8861// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. 8862func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { 8863 return &awspitrp, true 8864} 8865 8866// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. 8867func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { 8868 return nil, false 8869} 8870 8871// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. 8872func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { 8873 return nil, false 8874} 8875 8876// AsRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. 8877func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { 8878 return nil, false 8879} 8880 8881// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. 8882func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { 8883 return &awspitrp, true 8884} 8885 8886// AzureWorkloadSQLPointInTimeRestoreRequest azureWorkload SQL -specific restore. Specifically for 8887// PointInTime/Log restore 8888type AzureWorkloadSQLPointInTimeRestoreRequest struct { 8889 // PointInTime - PointInTime value 8890 PointInTime *date.Time `json:"pointInTime,omitempty"` 8891 // ShouldUseAlternateTargetLocation - Default option set to true. If this is set to false, alternate data directory must be provided 8892 ShouldUseAlternateTargetLocation *bool `json:"shouldUseAlternateTargetLocation,omitempty"` 8893 // IsNonRecoverable - SQL specific property where user can chose to set no-recovery when restore operation is tried 8894 IsNonRecoverable *bool `json:"isNonRecoverable,omitempty"` 8895 // AlternateDirectoryPaths - Data directory details 8896 AlternateDirectoryPaths *[]SQLDataDirectoryMapping `json:"alternateDirectoryPaths,omitempty"` 8897 // RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline' 8898 RecoveryType RecoveryType `json:"recoveryType,omitempty"` 8899 // SourceResourceID - Fully qualified ARM ID of the VM on which workload that was running is being recovered. 8900 SourceResourceID *string `json:"sourceResourceId,omitempty"` 8901 // PropertyBag - Workload specific property bag. 8902 PropertyBag map[string]*string `json:"propertyBag"` 8903 // TargetInfo - Details of target database 8904 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"` 8905 // RecoveryMode - Defines whether the current recovery mode is file restore or database restore. Possible values include: 'RecoveryModeInvalid', 'RecoveryModeFileRecovery', 'RecoveryModeWorkloadRecovery' 8906 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"` 8907 // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' 8908 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` 8909} 8910 8911// MarshalJSON is the custom marshaler for AzureWorkloadSQLPointInTimeRestoreRequest. 8912func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { 8913 awspitrr.ObjectType = ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest 8914 objectMap := make(map[string]interface{}) 8915 if awspitrr.PointInTime != nil { 8916 objectMap["pointInTime"] = awspitrr.PointInTime 8917 } 8918 if awspitrr.ShouldUseAlternateTargetLocation != nil { 8919 objectMap["shouldUseAlternateTargetLocation"] = awspitrr.ShouldUseAlternateTargetLocation 8920 } 8921 if awspitrr.IsNonRecoverable != nil { 8922 objectMap["isNonRecoverable"] = awspitrr.IsNonRecoverable 8923 } 8924 if awspitrr.AlternateDirectoryPaths != nil { 8925 objectMap["alternateDirectoryPaths"] = awspitrr.AlternateDirectoryPaths 8926 } 8927 if awspitrr.RecoveryType != "" { 8928 objectMap["recoveryType"] = awspitrr.RecoveryType 8929 } 8930 if awspitrr.SourceResourceID != nil { 8931 objectMap["sourceResourceId"] = awspitrr.SourceResourceID 8932 } 8933 if awspitrr.PropertyBag != nil { 8934 objectMap["propertyBag"] = awspitrr.PropertyBag 8935 } 8936 if awspitrr.TargetInfo != nil { 8937 objectMap["targetInfo"] = awspitrr.TargetInfo 8938 } 8939 if awspitrr.RecoveryMode != "" { 8940 objectMap["recoveryMode"] = awspitrr.RecoveryMode 8941 } 8942 if awspitrr.ObjectType != "" { 8943 objectMap["objectType"] = awspitrr.ObjectType 8944 } 8945 return json.Marshal(objectMap) 8946} 8947 8948// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. 8949func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { 8950 return nil, false 8951} 8952 8953// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. 8954func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { 8955 return nil, false 8956} 8957 8958// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. 8959func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { 8960 return nil, false 8961} 8962 8963// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. 8964func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { 8965 return &awspitrr, true 8966} 8967 8968// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. 8969func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { 8970 return nil, false 8971} 8972 8973// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. 8974func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { 8975 return nil, false 8976} 8977 8978// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. 8979func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { 8980 return nil, false 8981} 8982 8983// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. 8984func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { 8985 return &awspitrr, true 8986} 8987 8988// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. 8989func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { 8990 return nil, false 8991} 8992 8993// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. 8994func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { 8995 return &awspitrr, true 8996} 8997 8998// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. 8999func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { 9000 return nil, false 9001} 9002 9003// AsRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. 9004func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { 9005 return nil, false 9006} 9007 9008// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. 9009func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { 9010 return &awspitrr, true 9011} 9012 9013// BasicAzureWorkloadSQLRecoveryPoint SQL specific recoverypoint, specifically encapsulates full/diff recoverypoint 9014// along with extended info 9015type BasicAzureWorkloadSQLRecoveryPoint interface { 9016 AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) 9017 AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) 9018} 9019 9020// AzureWorkloadSQLRecoveryPoint SQL specific recoverypoint, specifically encapsulates full/diff recoverypoint 9021// along with extended info 9022type AzureWorkloadSQLRecoveryPoint struct { 9023 // ExtendedInfo - Extended Info that provides data directory details. Will be populated in two cases: 9024 // When a specific recovery point is accessed using GetRecoveryPoint 9025 // Or when ListRecoveryPoints is called for Log RP only with ExtendedInfo query filter 9026 ExtendedInfo *AzureWorkloadSQLRecoveryPointExtendedInfo `json:"extendedInfo,omitempty"` 9027 // RecoveryPointTimeInUTC - READ-ONLY; UTC time at which recovery point was created 9028 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"` 9029 // Type - READ-ONLY; Type of restore point. Possible values include: 'RestorePointTypeInvalid', 'RestorePointTypeFull', 'RestorePointTypeLog', 'RestorePointTypeDifferential' 9030 Type RestorePointType `json:"type,omitempty"` 9031 // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' 9032 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` 9033} 9034 9035func unmarshalBasicAzureWorkloadSQLRecoveryPoint(body []byte) (BasicAzureWorkloadSQLRecoveryPoint, error) { 9036 var m map[string]interface{} 9037 err := json.Unmarshal(body, &m) 9038 if err != nil { 9039 return nil, err 9040 } 9041 9042 switch m["objectType"] { 9043 case string(ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint): 9044 var awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint 9045 err := json.Unmarshal(body, &awspitrp) 9046 return awspitrp, err 9047 default: 9048 var awsrp AzureWorkloadSQLRecoveryPoint 9049 err := json.Unmarshal(body, &awsrp) 9050 return awsrp, err 9051 } 9052} 9053func unmarshalBasicAzureWorkloadSQLRecoveryPointArray(body []byte) ([]BasicAzureWorkloadSQLRecoveryPoint, error) { 9054 var rawMessages []*json.RawMessage 9055 err := json.Unmarshal(body, &rawMessages) 9056 if err != nil { 9057 return nil, err 9058 } 9059 9060 awsrpArray := make([]BasicAzureWorkloadSQLRecoveryPoint, len(rawMessages)) 9061 9062 for index, rawMessage := range rawMessages { 9063 awsrp, err := unmarshalBasicAzureWorkloadSQLRecoveryPoint(*rawMessage) 9064 if err != nil { 9065 return nil, err 9066 } 9067 awsrpArray[index] = awsrp 9068 } 9069 return awsrpArray, nil 9070} 9071 9072// MarshalJSON is the custom marshaler for AzureWorkloadSQLRecoveryPoint. 9073func (awsrp AzureWorkloadSQLRecoveryPoint) MarshalJSON() ([]byte, error) { 9074 awsrp.ObjectType = ObjectTypeAzureWorkloadSQLRecoveryPoint 9075 objectMap := make(map[string]interface{}) 9076 if awsrp.ExtendedInfo != nil { 9077 objectMap["extendedInfo"] = awsrp.ExtendedInfo 9078 } 9079 if awsrp.ObjectType != "" { 9080 objectMap["objectType"] = awsrp.ObjectType 9081 } 9082 return json.Marshal(objectMap) 9083} 9084 9085// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. 9086func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { 9087 return nil, false 9088} 9089 9090// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. 9091func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { 9092 return nil, false 9093} 9094 9095// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. 9096func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { 9097 return nil, false 9098} 9099 9100// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. 9101func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { 9102 return nil, false 9103} 9104 9105// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. 9106func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { 9107 return &awsrp, true 9108} 9109 9110// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. 9111func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { 9112 return nil, false 9113} 9114 9115// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. 9116func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { 9117 return nil, false 9118} 9119 9120// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. 9121func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { 9122 return nil, false 9123} 9124 9125// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. 9126func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { 9127 return &awsrp, true 9128} 9129 9130// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. 9131func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { 9132 return &awsrp, true 9133} 9134 9135// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. 9136func (awsrp AzureWorkloadSQLRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { 9137 return nil, false 9138} 9139 9140// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. 9141func (awsrp AzureWorkloadSQLRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { 9142 return nil, false 9143} 9144 9145// AsRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. 9146func (awsrp AzureWorkloadSQLRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { 9147 return nil, false 9148} 9149 9150// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. 9151func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { 9152 return &awsrp, true 9153} 9154 9155// AzureWorkloadSQLRecoveryPointExtendedInfo extended info class details 9156type AzureWorkloadSQLRecoveryPointExtendedInfo struct { 9157 // DataDirectoryTimeInUTC - READ-ONLY; UTC time at which data directory info was captured 9158 DataDirectoryTimeInUTC *date.Time `json:"dataDirectoryTimeInUTC,omitempty"` 9159 // DataDirectoryPaths - READ-ONLY; List of data directory paths during restore operation. 9160 DataDirectoryPaths *[]SQLDataDirectory `json:"dataDirectoryPaths,omitempty"` 9161} 9162 9163// MarshalJSON is the custom marshaler for AzureWorkloadSQLRecoveryPointExtendedInfo. 9164func (awsrpei AzureWorkloadSQLRecoveryPointExtendedInfo) MarshalJSON() ([]byte, error) { 9165 objectMap := make(map[string]interface{}) 9166 return json.Marshal(objectMap) 9167} 9168 9169// BasicAzureWorkloadSQLRestoreRequest azureWorkload SQL -specific restore. Specifically for full/diff restore 9170type BasicAzureWorkloadSQLRestoreRequest interface { 9171 AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) 9172 AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) 9173} 9174 9175// AzureWorkloadSQLRestoreRequest azureWorkload SQL -specific restore. Specifically for full/diff restore 9176type AzureWorkloadSQLRestoreRequest struct { 9177 // ShouldUseAlternateTargetLocation - Default option set to true. If this is set to false, alternate data directory must be provided 9178 ShouldUseAlternateTargetLocation *bool `json:"shouldUseAlternateTargetLocation,omitempty"` 9179 // IsNonRecoverable - SQL specific property where user can chose to set no-recovery when restore operation is tried 9180 IsNonRecoverable *bool `json:"isNonRecoverable,omitempty"` 9181 // AlternateDirectoryPaths - Data directory details 9182 AlternateDirectoryPaths *[]SQLDataDirectoryMapping `json:"alternateDirectoryPaths,omitempty"` 9183 // RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline' 9184 RecoveryType RecoveryType `json:"recoveryType,omitempty"` 9185 // SourceResourceID - Fully qualified ARM ID of the VM on which workload that was running is being recovered. 9186 SourceResourceID *string `json:"sourceResourceId,omitempty"` 9187 // PropertyBag - Workload specific property bag. 9188 PropertyBag map[string]*string `json:"propertyBag"` 9189 // TargetInfo - Details of target database 9190 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"` 9191 // RecoveryMode - Defines whether the current recovery mode is file restore or database restore. Possible values include: 'RecoveryModeInvalid', 'RecoveryModeFileRecovery', 'RecoveryModeWorkloadRecovery' 9192 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"` 9193 // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' 9194 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` 9195} 9196 9197func unmarshalBasicAzureWorkloadSQLRestoreRequest(body []byte) (BasicAzureWorkloadSQLRestoreRequest, error) { 9198 var m map[string]interface{} 9199 err := json.Unmarshal(body, &m) 9200 if err != nil { 9201 return nil, err 9202 } 9203 9204 switch m["objectType"] { 9205 case string(ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest): 9206 var awspitrr AzureWorkloadSQLPointInTimeRestoreRequest 9207 err := json.Unmarshal(body, &awspitrr) 9208 return awspitrr, err 9209 default: 9210 var awsrr AzureWorkloadSQLRestoreRequest 9211 err := json.Unmarshal(body, &awsrr) 9212 return awsrr, err 9213 } 9214} 9215func unmarshalBasicAzureWorkloadSQLRestoreRequestArray(body []byte) ([]BasicAzureWorkloadSQLRestoreRequest, error) { 9216 var rawMessages []*json.RawMessage 9217 err := json.Unmarshal(body, &rawMessages) 9218 if err != nil { 9219 return nil, err 9220 } 9221 9222 awsrrArray := make([]BasicAzureWorkloadSQLRestoreRequest, len(rawMessages)) 9223 9224 for index, rawMessage := range rawMessages { 9225 awsrr, err := unmarshalBasicAzureWorkloadSQLRestoreRequest(*rawMessage) 9226 if err != nil { 9227 return nil, err 9228 } 9229 awsrrArray[index] = awsrr 9230 } 9231 return awsrrArray, nil 9232} 9233 9234// MarshalJSON is the custom marshaler for AzureWorkloadSQLRestoreRequest. 9235func (awsrr AzureWorkloadSQLRestoreRequest) MarshalJSON() ([]byte, error) { 9236 awsrr.ObjectType = ObjectTypeAzureWorkloadSQLRestoreRequest 9237 objectMap := make(map[string]interface{}) 9238 if awsrr.ShouldUseAlternateTargetLocation != nil { 9239 objectMap["shouldUseAlternateTargetLocation"] = awsrr.ShouldUseAlternateTargetLocation 9240 } 9241 if awsrr.IsNonRecoverable != nil { 9242 objectMap["isNonRecoverable"] = awsrr.IsNonRecoverable 9243 } 9244 if awsrr.AlternateDirectoryPaths != nil { 9245 objectMap["alternateDirectoryPaths"] = awsrr.AlternateDirectoryPaths 9246 } 9247 if awsrr.RecoveryType != "" { 9248 objectMap["recoveryType"] = awsrr.RecoveryType 9249 } 9250 if awsrr.SourceResourceID != nil { 9251 objectMap["sourceResourceId"] = awsrr.SourceResourceID 9252 } 9253 if awsrr.PropertyBag != nil { 9254 objectMap["propertyBag"] = awsrr.PropertyBag 9255 } 9256 if awsrr.TargetInfo != nil { 9257 objectMap["targetInfo"] = awsrr.TargetInfo 9258 } 9259 if awsrr.RecoveryMode != "" { 9260 objectMap["recoveryMode"] = awsrr.RecoveryMode 9261 } 9262 if awsrr.ObjectType != "" { 9263 objectMap["objectType"] = awsrr.ObjectType 9264 } 9265 return json.Marshal(objectMap) 9266} 9267 9268// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. 9269func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { 9270 return nil, false 9271} 9272 9273// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. 9274func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { 9275 return nil, false 9276} 9277 9278// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. 9279func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { 9280 return nil, false 9281} 9282 9283// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. 9284func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { 9285 return &awsrr, true 9286} 9287 9288// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. 9289func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { 9290 return nil, false 9291} 9292 9293// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. 9294func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { 9295 return nil, false 9296} 9297 9298// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. 9299func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { 9300 return nil, false 9301} 9302 9303// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. 9304func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { 9305 return nil, false 9306} 9307 9308// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. 9309func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { 9310 return &awsrr, true 9311} 9312 9313// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. 9314func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { 9315 return &awsrr, true 9316} 9317 9318// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. 9319func (awsrr AzureWorkloadSQLRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { 9320 return nil, false 9321} 9322 9323// AsRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. 9324func (awsrr AzureWorkloadSQLRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { 9325 return nil, false 9326} 9327 9328// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. 9329func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { 9330 return &awsrr, true 9331} 9332 9333// BEKDetails BEK is bitlocker encryption key. 9334type BEKDetails struct { 9335 // SecretURL - Secret is BEK. 9336 SecretURL *string `json:"secretUrl,omitempty"` 9337 // SecretVaultID - ID of the Key Vault where this Secret is stored. 9338 SecretVaultID *string `json:"secretVaultId,omitempty"` 9339 // SecretData - BEK data. 9340 SecretData *string `json:"secretData,omitempty"` 9341} 9342 9343// BMSBackupEngineQueryObject query parameters to fetch list of backup engines. 9344type BMSBackupEngineQueryObject struct { 9345 // Expand - attribute to add extended info 9346 Expand *string `json:"expand,omitempty"` 9347} 9348 9349// BMSBackupEnginesQueryObject query parameters to fetch list of backup engines. 9350type BMSBackupEnginesQueryObject struct { 9351 // BackupManagementType - Backup management type for the backup engine. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 9352 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 9353 // FriendlyName - Friendly name of the backup engine. 9354 FriendlyName *string `json:"friendlyName,omitempty"` 9355 // Expand - Attribute to add extended info. 9356 Expand *string `json:"expand,omitempty"` 9357} 9358 9359// BMSBackupSummariesQueryObject query parameters to fetch backup summaries. 9360type BMSBackupSummariesQueryObject struct { 9361 // Type - Backup management type for this container. Possible values include: 'TypeInvalid', 'TypeBackupProtectedItemCountSummary', 'TypeBackupProtectionContainerCountSummary' 9362 Type Type `json:"type,omitempty"` 9363} 9364 9365// BMSContainerQueryObject the query filters that can be used with the list containers API. 9366type BMSContainerQueryObject struct { 9367 // BackupManagementType - Backup management type for this container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 9368 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 9369 // ContainerType - Type of container for filter. Possible values include: 'ContainerTypeInvalid', 'ContainerTypeUnknown', 'ContainerTypeIaasVMContainer', 'ContainerTypeIaasVMServiceContainer', 'ContainerTypeDPMContainer', 'ContainerTypeAzureBackupServerContainer', 'ContainerTypeMABContainer', 'ContainerTypeCluster', 'ContainerTypeAzureSQLContainer', 'ContainerTypeWindows', 'ContainerTypeVCenter', 'ContainerTypeVMAppContainer', 'ContainerTypeSQLAGWorkLoadContainer', 'ContainerTypeStorageContainer', 'ContainerTypeGenericContainer' 9370 ContainerType ContainerType `json:"containerType,omitempty"` 9371 // BackupEngineName - Backup engine name 9372 BackupEngineName *string `json:"backupEngineName,omitempty"` 9373 // FabricName - Fabric name for filter 9374 FabricName *string `json:"fabricName,omitempty"` 9375 // Status - Status of registration of this container with the Recovery Services Vault. 9376 Status *string `json:"status,omitempty"` 9377 // FriendlyName - Friendly name of this container. 9378 FriendlyName *string `json:"friendlyName,omitempty"` 9379} 9380 9381// BMSContainersInquiryQueryObject the query filters that can be used with the inquire container API. 9382type BMSContainersInquiryQueryObject struct { 9383 // BackupManagementType - Backup management type for this container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 9384 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 9385 // WorkloadType - Workload type for this container. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' 9386 WorkloadType WorkloadType `json:"workloadType,omitempty"` 9387} 9388 9389// BMSPOQueryObject filters to list items that can be backed up. 9390type BMSPOQueryObject struct { 9391 // BackupManagementType - Backup management type. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 9392 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 9393 // WorkloadType - Workload type. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' 9394 WorkloadType WorkloadType `json:"workloadType,omitempty"` 9395 // ContainerName - Full name of the container whose Protectable Objects should be returned. 9396 ContainerName *string `json:"containerName,omitempty"` 9397 // Status - Backup status query parameter. 9398 Status *string `json:"status,omitempty"` 9399 // FriendlyName - Friendly name. 9400 FriendlyName *string `json:"friendlyName,omitempty"` 9401} 9402 9403// BMSRefreshContainersQueryObject the query filters that can be used with the refresh container API. 9404type BMSRefreshContainersQueryObject struct { 9405 // BackupManagementType - Backup management type for this container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 9406 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 9407} 9408 9409// BMSRPQueryObject filters to list backup copies. 9410type BMSRPQueryObject struct { 9411 // StartDate - Backup copies created after this time. 9412 StartDate *date.Time `json:"startDate,omitempty"` 9413 // EndDate - Backup copies created before this time. 9414 EndDate *date.Time `json:"endDate,omitempty"` 9415 // RestorePointQueryType - RestorePoint type. Possible values include: 'RestorePointQueryTypeInvalid', 'RestorePointQueryTypeFull', 'RestorePointQueryTypeLog', 'RestorePointQueryTypeDifferential', 'RestorePointQueryTypeFullAndDifferential', 'RestorePointQueryTypeAll' 9416 RestorePointQueryType RestorePointQueryType `json:"restorePointQueryType,omitempty"` 9417 // ExtendedInfo - In Get Recovery Point, it tells whether extended information about recovery point is asked. 9418 ExtendedInfo *bool `json:"extendedInfo,omitempty"` 9419} 9420 9421// BMSWorkloadItemQueryObject filters to list items that can be backed up. 9422type BMSWorkloadItemQueryObject struct { 9423 // BackupManagementType - Backup management type. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 9424 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 9425 // WorkloadItemType - Workload Item type. Possible values include: 'WorkloadItemTypeInvalid', 'WorkloadItemTypeSQLInstance', 'WorkloadItemTypeSQLDataBase', 'WorkloadItemTypeSAPHanaSystem', 'WorkloadItemTypeSAPHanaDatabase', 'WorkloadItemTypeSAPAseSystem', 'WorkloadItemTypeSAPAseDatabase' 9426 WorkloadItemType WorkloadItemType `json:"workloadItemType,omitempty"` 9427 // WorkloadType - Workload type. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' 9428 WorkloadType WorkloadType `json:"workloadType,omitempty"` 9429 // ProtectionStatus - Backup status query parameter. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 9430 ProtectionStatus ProtectionStatus `json:"protectionStatus,omitempty"` 9431} 9432 9433// ClientDiscoveryDisplay localized display information of an operation. 9434type ClientDiscoveryDisplay struct { 9435 // Provider - Name of the provider for display purposes 9436 Provider *string `json:"provider,omitempty"` 9437 // Resource - ResourceType for which this Operation can be performed. 9438 Resource *string `json:"resource,omitempty"` 9439 // Operation - Operations Name itself. 9440 Operation *string `json:"operation,omitempty"` 9441 // Description - Description of the operation having details of what operation is about. 9442 Description *string `json:"description,omitempty"` 9443} 9444 9445// ClientDiscoveryForLogSpecification class to represent shoebox log specification in json client 9446// discovery. 9447type ClientDiscoveryForLogSpecification struct { 9448 // Name - Name for shoebox log specification. 9449 Name *string `json:"name,omitempty"` 9450 // DisplayName - Localized display name 9451 DisplayName *string `json:"displayName,omitempty"` 9452 // BlobDuration - blob duration of shoebox log specification 9453 BlobDuration *string `json:"blobDuration,omitempty"` 9454} 9455 9456// ClientDiscoveryForProperties class to represent shoebox properties in json client discovery. 9457type ClientDiscoveryForProperties struct { 9458 // ServiceSpecification - Operation properties. 9459 ServiceSpecification *ClientDiscoveryForServiceSpecification `json:"serviceSpecification,omitempty"` 9460} 9461 9462// ClientDiscoveryForServiceSpecification class to represent shoebox service specification in json client 9463// discovery. 9464type ClientDiscoveryForServiceSpecification struct { 9465 // LogSpecifications - List of log specifications of this operation. 9466 LogSpecifications *[]ClientDiscoveryForLogSpecification `json:"logSpecifications,omitempty"` 9467} 9468 9469// ClientDiscoveryResponse operations List response which contains list of available APIs. 9470type ClientDiscoveryResponse struct { 9471 autorest.Response `json:"-"` 9472 // Value - List of available operations. 9473 Value *[]ClientDiscoveryValueForSingleAPI `json:"value,omitempty"` 9474 // NextLink - Link to the next chunk of Response. 9475 NextLink *string `json:"nextLink,omitempty"` 9476} 9477 9478// ClientDiscoveryResponseIterator provides access to a complete listing of 9479// ClientDiscoveryValueForSingleAPI values. 9480type ClientDiscoveryResponseIterator struct { 9481 i int 9482 page ClientDiscoveryResponsePage 9483} 9484 9485// NextWithContext advances to the next value. If there was an error making 9486// the request the iterator does not advance and the error is returned. 9487func (iter *ClientDiscoveryResponseIterator) NextWithContext(ctx context.Context) (err error) { 9488 if tracing.IsEnabled() { 9489 ctx = tracing.StartSpan(ctx, fqdn+"/ClientDiscoveryResponseIterator.NextWithContext") 9490 defer func() { 9491 sc := -1 9492 if iter.Response().Response.Response != nil { 9493 sc = iter.Response().Response.Response.StatusCode 9494 } 9495 tracing.EndSpan(ctx, sc, err) 9496 }() 9497 } 9498 iter.i++ 9499 if iter.i < len(iter.page.Values()) { 9500 return nil 9501 } 9502 err = iter.page.NextWithContext(ctx) 9503 if err != nil { 9504 iter.i-- 9505 return err 9506 } 9507 iter.i = 0 9508 return nil 9509} 9510 9511// Next advances to the next value. If there was an error making 9512// the request the iterator does not advance and the error is returned. 9513// Deprecated: Use NextWithContext() instead. 9514func (iter *ClientDiscoveryResponseIterator) Next() error { 9515 return iter.NextWithContext(context.Background()) 9516} 9517 9518// NotDone returns true if the enumeration should be started or is not yet complete. 9519func (iter ClientDiscoveryResponseIterator) NotDone() bool { 9520 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 9521} 9522 9523// Response returns the raw server response from the last page request. 9524func (iter ClientDiscoveryResponseIterator) Response() ClientDiscoveryResponse { 9525 return iter.page.Response() 9526} 9527 9528// Value returns the current value or a zero-initialized value if the 9529// iterator has advanced beyond the end of the collection. 9530func (iter ClientDiscoveryResponseIterator) Value() ClientDiscoveryValueForSingleAPI { 9531 if !iter.page.NotDone() { 9532 return ClientDiscoveryValueForSingleAPI{} 9533 } 9534 return iter.page.Values()[iter.i] 9535} 9536 9537// Creates a new instance of the ClientDiscoveryResponseIterator type. 9538func NewClientDiscoveryResponseIterator(page ClientDiscoveryResponsePage) ClientDiscoveryResponseIterator { 9539 return ClientDiscoveryResponseIterator{page: page} 9540} 9541 9542// IsEmpty returns true if the ListResult contains no values. 9543func (cdr ClientDiscoveryResponse) IsEmpty() bool { 9544 return cdr.Value == nil || len(*cdr.Value) == 0 9545} 9546 9547// hasNextLink returns true if the NextLink is not empty. 9548func (cdr ClientDiscoveryResponse) hasNextLink() bool { 9549 return cdr.NextLink != nil && len(*cdr.NextLink) != 0 9550} 9551 9552// clientDiscoveryResponsePreparer prepares a request to retrieve the next set of results. 9553// It returns nil if no more results exist. 9554func (cdr ClientDiscoveryResponse) clientDiscoveryResponsePreparer(ctx context.Context) (*http.Request, error) { 9555 if !cdr.hasNextLink() { 9556 return nil, nil 9557 } 9558 return autorest.Prepare((&http.Request{}).WithContext(ctx), 9559 autorest.AsJSON(), 9560 autorest.AsGet(), 9561 autorest.WithBaseURL(to.String(cdr.NextLink))) 9562} 9563 9564// ClientDiscoveryResponsePage contains a page of ClientDiscoveryValueForSingleAPI values. 9565type ClientDiscoveryResponsePage struct { 9566 fn func(context.Context, ClientDiscoveryResponse) (ClientDiscoveryResponse, error) 9567 cdr ClientDiscoveryResponse 9568} 9569 9570// NextWithContext advances to the next page of values. If there was an error making 9571// the request the page does not advance and the error is returned. 9572func (page *ClientDiscoveryResponsePage) NextWithContext(ctx context.Context) (err error) { 9573 if tracing.IsEnabled() { 9574 ctx = tracing.StartSpan(ctx, fqdn+"/ClientDiscoveryResponsePage.NextWithContext") 9575 defer func() { 9576 sc := -1 9577 if page.Response().Response.Response != nil { 9578 sc = page.Response().Response.Response.StatusCode 9579 } 9580 tracing.EndSpan(ctx, sc, err) 9581 }() 9582 } 9583 for { 9584 next, err := page.fn(ctx, page.cdr) 9585 if err != nil { 9586 return err 9587 } 9588 page.cdr = next 9589 if !next.hasNextLink() || !next.IsEmpty() { 9590 break 9591 } 9592 } 9593 return nil 9594} 9595 9596// Next advances to the next page of values. If there was an error making 9597// the request the page does not advance and the error is returned. 9598// Deprecated: Use NextWithContext() instead. 9599func (page *ClientDiscoveryResponsePage) Next() error { 9600 return page.NextWithContext(context.Background()) 9601} 9602 9603// NotDone returns true if the page enumeration should be started or is not yet complete. 9604func (page ClientDiscoveryResponsePage) NotDone() bool { 9605 return !page.cdr.IsEmpty() 9606} 9607 9608// Response returns the raw server response from the last page request. 9609func (page ClientDiscoveryResponsePage) Response() ClientDiscoveryResponse { 9610 return page.cdr 9611} 9612 9613// Values returns the slice of values for the current page or nil if there are no values. 9614func (page ClientDiscoveryResponsePage) Values() []ClientDiscoveryValueForSingleAPI { 9615 if page.cdr.IsEmpty() { 9616 return nil 9617 } 9618 return *page.cdr.Value 9619} 9620 9621// Creates a new instance of the ClientDiscoveryResponsePage type. 9622func NewClientDiscoveryResponsePage(cur ClientDiscoveryResponse, getNextPage func(context.Context, ClientDiscoveryResponse) (ClientDiscoveryResponse, error)) ClientDiscoveryResponsePage { 9623 return ClientDiscoveryResponsePage{ 9624 fn: getNextPage, 9625 cdr: cur, 9626 } 9627} 9628 9629// ClientDiscoveryValueForSingleAPI available operation details. 9630type ClientDiscoveryValueForSingleAPI struct { 9631 // Name - Name of the Operation. 9632 Name *string `json:"name,omitempty"` 9633 // Display - Contains the localized display information for this particular operation 9634 Display *ClientDiscoveryDisplay `json:"display,omitempty"` 9635 // Origin - The intended executor of the operation;governs the display of the operation in the RBAC UX and the audit logs UX 9636 Origin *string `json:"origin,omitempty"` 9637 // Properties - ShoeBox properties for the given operation. 9638 Properties *ClientDiscoveryForProperties `json:"properties,omitempty"` 9639} 9640 9641// ClientScriptForConnect client script details for file / folder restore. 9642type ClientScriptForConnect struct { 9643 // ScriptContent - File content of the client script for file / folder restore. 9644 ScriptContent *string `json:"scriptContent,omitempty"` 9645 // ScriptExtension - File extension of the client script for file / folder restore - .ps1 , .sh , etc. 9646 ScriptExtension *string `json:"scriptExtension,omitempty"` 9647 // OsType - OS type - Windows, Linux etc. for which this file / folder restore client script works. 9648 OsType *string `json:"osType,omitempty"` 9649 // URL - URL of Executable from where to source the content. If this is not null then ScriptContent should not be used 9650 URL *string `json:"url,omitempty"` 9651 // ScriptNameSuffix - Mandatory suffix that should be added to the name of script that is given for download to user. 9652 // If its null or empty then , ignore it. 9653 ScriptNameSuffix *string `json:"scriptNameSuffix,omitempty"` 9654} 9655 9656// ContainerIdentityInfo container identity information 9657type ContainerIdentityInfo struct { 9658 // UniqueName - Unique name of the container 9659 UniqueName *string `json:"uniqueName,omitempty"` 9660 // AadTenantID - Protection container identity - AAD Tenant 9661 AadTenantID *string `json:"aadTenantId,omitempty"` 9662 // ServicePrincipalClientID - Protection container identity - AAD Service Principal 9663 ServicePrincipalClientID *string `json:"servicePrincipalClientId,omitempty"` 9664 // Audience - Protection container identity - Audience 9665 Audience *string `json:"audience,omitempty"` 9666} 9667 9668// DailyRetentionFormat daily retention format. 9669type DailyRetentionFormat struct { 9670 // DaysOfTheMonth - List of days of the month. 9671 DaysOfTheMonth *[]Day `json:"daysOfTheMonth,omitempty"` 9672} 9673 9674// DailyRetentionSchedule daily retention schedule. 9675type DailyRetentionSchedule struct { 9676 // RetentionTimes - Retention times of retention policy. 9677 RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"` 9678 // RetentionDuration - Retention duration of retention Policy. 9679 RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` 9680} 9681 9682// Day day of the week. 9683type Day struct { 9684 // Date - Date of the month 9685 Date *int32 `json:"date,omitempty"` 9686 // IsLast - Whether Date is last date of month 9687 IsLast *bool `json:"isLast,omitempty"` 9688} 9689 9690// DiskExclusionProperties ... 9691type DiskExclusionProperties struct { 9692 // DiskLunList - List of Disks' Logical Unit Numbers (LUN) to be used for VM Protection. 9693 DiskLunList *[]int32 `json:"diskLunList,omitempty"` 9694 // IsInclusionList - Flag to indicate whether DiskLunList is to be included/ excluded from backup. 9695 IsInclusionList *bool `json:"isInclusionList,omitempty"` 9696} 9697 9698// DiskInformation disk information 9699type DiskInformation struct { 9700 Lun *int32 `json:"lun,omitempty"` 9701 Name *string `json:"name,omitempty"` 9702} 9703 9704// DistributedNodesInfo this is used to represent the various nodes of the distributed container. 9705type DistributedNodesInfo struct { 9706 // NodeName - Name of the node under a distributed container. 9707 NodeName *string `json:"nodeName,omitempty"` 9708 // Status - Status of this Node. 9709 // Failed | Succeeded 9710 Status *string `json:"status,omitempty"` 9711 // ErrorDetail - Error Details if the Status is non-success. 9712 ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"` 9713} 9714 9715// DpmBackupEngine data Protection Manager (DPM) specific backup engine. 9716type DpmBackupEngine struct { 9717 // FriendlyName - Friendly name of the backup engine. 9718 FriendlyName *string `json:"friendlyName,omitempty"` 9719 // BackupManagementType - Type of backup management for the backup engine. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 9720 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 9721 // RegistrationStatus - Registration status of the backup engine with the Recovery Services Vault. 9722 RegistrationStatus *string `json:"registrationStatus,omitempty"` 9723 // BackupEngineState - Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed} 9724 BackupEngineState *string `json:"backupEngineState,omitempty"` 9725 // HealthStatus - Backup status of the backup engine. 9726 HealthStatus *string `json:"healthStatus,omitempty"` 9727 // CanReRegister - Flag indicating if the backup engine be registered, once already registered. 9728 CanReRegister *bool `json:"canReRegister,omitempty"` 9729 // BackupEngineID - ID of the backup engine. 9730 BackupEngineID *string `json:"backupEngineId,omitempty"` 9731 // DpmVersion - Backup engine version 9732 DpmVersion *string `json:"dpmVersion,omitempty"` 9733 // AzureBackupAgentVersion - Backup agent version 9734 AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"` 9735 // IsAzureBackupAgentUpgradeAvailable - To check if backup agent upgrade available 9736 IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"` 9737 // IsDpmUpgradeAvailable - To check if backup engine upgrade available 9738 IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"` 9739 // ExtendedInfo - Extended info of the backupengine 9740 ExtendedInfo *EngineExtendedInfo `json:"extendedInfo,omitempty"` 9741 // BackupEngineType - Possible values include: 'BackupEngineTypeBackupEngineBase', 'BackupEngineTypeAzureBackupServerEngine', 'BackupEngineTypeDpmBackupEngine' 9742 BackupEngineType EngineType `json:"backupEngineType,omitempty"` 9743} 9744 9745// MarshalJSON is the custom marshaler for DpmBackupEngine. 9746func (dbe DpmBackupEngine) MarshalJSON() ([]byte, error) { 9747 dbe.BackupEngineType = BackupEngineTypeDpmBackupEngine 9748 objectMap := make(map[string]interface{}) 9749 if dbe.FriendlyName != nil { 9750 objectMap["friendlyName"] = dbe.FriendlyName 9751 } 9752 if dbe.BackupManagementType != "" { 9753 objectMap["backupManagementType"] = dbe.BackupManagementType 9754 } 9755 if dbe.RegistrationStatus != nil { 9756 objectMap["registrationStatus"] = dbe.RegistrationStatus 9757 } 9758 if dbe.BackupEngineState != nil { 9759 objectMap["backupEngineState"] = dbe.BackupEngineState 9760 } 9761 if dbe.HealthStatus != nil { 9762 objectMap["healthStatus"] = dbe.HealthStatus 9763 } 9764 if dbe.CanReRegister != nil { 9765 objectMap["canReRegister"] = dbe.CanReRegister 9766 } 9767 if dbe.BackupEngineID != nil { 9768 objectMap["backupEngineId"] = dbe.BackupEngineID 9769 } 9770 if dbe.DpmVersion != nil { 9771 objectMap["dpmVersion"] = dbe.DpmVersion 9772 } 9773 if dbe.AzureBackupAgentVersion != nil { 9774 objectMap["azureBackupAgentVersion"] = dbe.AzureBackupAgentVersion 9775 } 9776 if dbe.IsAzureBackupAgentUpgradeAvailable != nil { 9777 objectMap["isAzureBackupAgentUpgradeAvailable"] = dbe.IsAzureBackupAgentUpgradeAvailable 9778 } 9779 if dbe.IsDpmUpgradeAvailable != nil { 9780 objectMap["isDpmUpgradeAvailable"] = dbe.IsDpmUpgradeAvailable 9781 } 9782 if dbe.ExtendedInfo != nil { 9783 objectMap["extendedInfo"] = dbe.ExtendedInfo 9784 } 9785 if dbe.BackupEngineType != "" { 9786 objectMap["backupEngineType"] = dbe.BackupEngineType 9787 } 9788 return json.Marshal(objectMap) 9789} 9790 9791// AsAzureBackupServerEngine is the BasicEngineBase implementation for DpmBackupEngine. 9792func (dbe DpmBackupEngine) AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) { 9793 return nil, false 9794} 9795 9796// AsDpmBackupEngine is the BasicEngineBase implementation for DpmBackupEngine. 9797func (dbe DpmBackupEngine) AsDpmBackupEngine() (*DpmBackupEngine, bool) { 9798 return &dbe, true 9799} 9800 9801// AsEngineBase is the BasicEngineBase implementation for DpmBackupEngine. 9802func (dbe DpmBackupEngine) AsEngineBase() (*EngineBase, bool) { 9803 return nil, false 9804} 9805 9806// AsBasicEngineBase is the BasicEngineBase implementation for DpmBackupEngine. 9807func (dbe DpmBackupEngine) AsBasicEngineBase() (BasicEngineBase, bool) { 9808 return &dbe, true 9809} 9810 9811// BasicDpmContainer DPM workload-specific protection container. 9812type BasicDpmContainer interface { 9813 AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) 9814 AsDpmContainer() (*DpmContainer, bool) 9815} 9816 9817// DpmContainer DPM workload-specific protection container. 9818type DpmContainer struct { 9819 // CanReRegister - Specifies whether the container is re-registrable. 9820 CanReRegister *bool `json:"canReRegister,omitempty"` 9821 // ContainerID - ID of container. 9822 ContainerID *string `json:"containerId,omitempty"` 9823 // ProtectedItemCount - Number of protected items in the BackupEngine 9824 ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` 9825 // DpmAgentVersion - Backup engine Agent version 9826 DpmAgentVersion *string `json:"dpmAgentVersion,omitempty"` 9827 // DpmServers - List of BackupEngines protecting the container 9828 DpmServers *[]string `json:"dpmServers,omitempty"` 9829 // UpgradeAvailable - To check if upgrade available 9830 UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` 9831 // ProtectionStatus - Protection status of the container. 9832 ProtectionStatus *string `json:"protectionStatus,omitempty"` 9833 // ExtendedInfo - Extended Info of the container. 9834 ExtendedInfo *DPMContainerExtendedInfo `json:"extendedInfo,omitempty"` 9835 // FriendlyName - Friendly name of the container. 9836 FriendlyName *string `json:"friendlyName,omitempty"` 9837 // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 9838 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 9839 // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. 9840 RegistrationStatus *string `json:"registrationStatus,omitempty"` 9841 // HealthStatus - Status of health of the container. 9842 HealthStatus *string `json:"healthStatus,omitempty"` 9843 // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' 9844 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` 9845} 9846 9847func unmarshalBasicDpmContainer(body []byte) (BasicDpmContainer, error) { 9848 var m map[string]interface{} 9849 err := json.Unmarshal(body, &m) 9850 if err != nil { 9851 return nil, err 9852 } 9853 9854 switch m["containerType"] { 9855 case string(ContainerTypeAzureBackupServerContainer1): 9856 var absc AzureBackupServerContainer 9857 err := json.Unmarshal(body, &absc) 9858 return absc, err 9859 default: 9860 var dc DpmContainer 9861 err := json.Unmarshal(body, &dc) 9862 return dc, err 9863 } 9864} 9865func unmarshalBasicDpmContainerArray(body []byte) ([]BasicDpmContainer, error) { 9866 var rawMessages []*json.RawMessage 9867 err := json.Unmarshal(body, &rawMessages) 9868 if err != nil { 9869 return nil, err 9870 } 9871 9872 dcArray := make([]BasicDpmContainer, len(rawMessages)) 9873 9874 for index, rawMessage := range rawMessages { 9875 dc, err := unmarshalBasicDpmContainer(*rawMessage) 9876 if err != nil { 9877 return nil, err 9878 } 9879 dcArray[index] = dc 9880 } 9881 return dcArray, nil 9882} 9883 9884// MarshalJSON is the custom marshaler for DpmContainer. 9885func (dc DpmContainer) MarshalJSON() ([]byte, error) { 9886 dc.ContainerType = ContainerTypeDPMContainer1 9887 objectMap := make(map[string]interface{}) 9888 if dc.CanReRegister != nil { 9889 objectMap["canReRegister"] = dc.CanReRegister 9890 } 9891 if dc.ContainerID != nil { 9892 objectMap["containerId"] = dc.ContainerID 9893 } 9894 if dc.ProtectedItemCount != nil { 9895 objectMap["protectedItemCount"] = dc.ProtectedItemCount 9896 } 9897 if dc.DpmAgentVersion != nil { 9898 objectMap["dpmAgentVersion"] = dc.DpmAgentVersion 9899 } 9900 if dc.DpmServers != nil { 9901 objectMap["dpmServers"] = dc.DpmServers 9902 } 9903 if dc.UpgradeAvailable != nil { 9904 objectMap["upgradeAvailable"] = dc.UpgradeAvailable 9905 } 9906 if dc.ProtectionStatus != nil { 9907 objectMap["protectionStatus"] = dc.ProtectionStatus 9908 } 9909 if dc.ExtendedInfo != nil { 9910 objectMap["extendedInfo"] = dc.ExtendedInfo 9911 } 9912 if dc.FriendlyName != nil { 9913 objectMap["friendlyName"] = dc.FriendlyName 9914 } 9915 if dc.BackupManagementType != "" { 9916 objectMap["backupManagementType"] = dc.BackupManagementType 9917 } 9918 if dc.RegistrationStatus != nil { 9919 objectMap["registrationStatus"] = dc.RegistrationStatus 9920 } 9921 if dc.HealthStatus != nil { 9922 objectMap["healthStatus"] = dc.HealthStatus 9923 } 9924 if dc.ContainerType != "" { 9925 objectMap["containerType"] = dc.ContainerType 9926 } 9927 return json.Marshal(objectMap) 9928} 9929 9930// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for DpmContainer. 9931func (dc DpmContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { 9932 return nil, false 9933} 9934 9935// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for DpmContainer. 9936func (dc DpmContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { 9937 return nil, false 9938} 9939 9940// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for DpmContainer. 9941func (dc DpmContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { 9942 return nil, false 9943} 9944 9945// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for DpmContainer. 9946func (dc DpmContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { 9947 return nil, false 9948} 9949 9950// AsAzureSQLContainer is the BasicProtectionContainer implementation for DpmContainer. 9951func (dc DpmContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { 9952 return nil, false 9953} 9954 9955// AsAzureStorageContainer is the BasicProtectionContainer implementation for DpmContainer. 9956func (dc DpmContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { 9957 return nil, false 9958} 9959 9960// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for DpmContainer. 9961func (dc DpmContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { 9962 return nil, false 9963} 9964 9965// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for DpmContainer. 9966func (dc DpmContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { 9967 return nil, false 9968} 9969 9970// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for DpmContainer. 9971func (dc DpmContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { 9972 return nil, false 9973} 9974 9975// AsDpmContainer is the BasicProtectionContainer implementation for DpmContainer. 9976func (dc DpmContainer) AsDpmContainer() (*DpmContainer, bool) { 9977 return &dc, true 9978} 9979 9980// AsBasicDpmContainer is the BasicProtectionContainer implementation for DpmContainer. 9981func (dc DpmContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { 9982 return &dc, true 9983} 9984 9985// AsGenericContainer is the BasicProtectionContainer implementation for DpmContainer. 9986func (dc DpmContainer) AsGenericContainer() (*GenericContainer, bool) { 9987 return nil, false 9988} 9989 9990// AsIaaSVMContainer is the BasicProtectionContainer implementation for DpmContainer. 9991func (dc DpmContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { 9992 return nil, false 9993} 9994 9995// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for DpmContainer. 9996func (dc DpmContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { 9997 return nil, false 9998} 9999 10000// AsMabContainer is the BasicProtectionContainer implementation for DpmContainer. 10001func (dc DpmContainer) AsMabContainer() (*MabContainer, bool) { 10002 return nil, false 10003} 10004 10005// AsProtectionContainer is the BasicProtectionContainer implementation for DpmContainer. 10006func (dc DpmContainer) AsProtectionContainer() (*ProtectionContainer, bool) { 10007 return nil, false 10008} 10009 10010// AsBasicProtectionContainer is the BasicProtectionContainer implementation for DpmContainer. 10011func (dc DpmContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { 10012 return &dc, true 10013} 10014 10015// DPMContainerExtendedInfo additional information of the DPMContainer. 10016type DPMContainerExtendedInfo struct { 10017 // LastRefreshedAt - Last refresh time of the DPMContainer. 10018 LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"` 10019} 10020 10021// DpmErrorInfo DPM workload-specific error information. 10022type DpmErrorInfo struct { 10023 // ErrorString - Localized error string. 10024 ErrorString *string `json:"errorString,omitempty"` 10025 // Recommendations - List of localized recommendations for above error code. 10026 Recommendations *[]string `json:"recommendations,omitempty"` 10027} 10028 10029// DpmJob DPM workload-specific job object. 10030type DpmJob struct { 10031 // Duration - Time elapsed for job. 10032 Duration *string `json:"duration,omitempty"` 10033 // DpmServerName - DPM server name managing the backup item or backup job. 10034 DpmServerName *string `json:"dpmServerName,omitempty"` 10035 // ContainerName - Name of cluster/server protecting current backup item, if any. 10036 ContainerName *string `json:"containerName,omitempty"` 10037 // ContainerType - Type of container. 10038 ContainerType *string `json:"containerType,omitempty"` 10039 // WorkloadType - Type of backup item. 10040 WorkloadType *string `json:"workloadType,omitempty"` 10041 // ActionsInfo - The state/actions applicable on this job like cancel/retry. 10042 ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"` 10043 // ErrorDetails - The errors. 10044 ErrorDetails *[]DpmErrorInfo `json:"errorDetails,omitempty"` 10045 // ExtendedInfo - Additional information for this job. 10046 ExtendedInfo *DpmJobExtendedInfo `json:"extendedInfo,omitempty"` 10047 // EntityFriendlyName - Friendly name of the entity on which the current job is executing. 10048 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` 10049 // BackupManagementType - Backup management type to execute the current job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 10050 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 10051 // Operation - The operation name. 10052 Operation *string `json:"operation,omitempty"` 10053 // Status - Job status. 10054 Status *string `json:"status,omitempty"` 10055 // StartTime - The start time. 10056 StartTime *date.Time `json:"startTime,omitempty"` 10057 // EndTime - The end time. 10058 EndTime *date.Time `json:"endTime,omitempty"` 10059 // ActivityID - ActivityId of job. 10060 ActivityID *string `json:"activityId,omitempty"` 10061 // JobType - Possible values include: 'JobTypeJob', 'JobTypeAzureIaaSVMJob', 'JobTypeAzureStorageJob', 'JobTypeAzureWorkloadJob', 'JobTypeDpmJob', 'JobTypeMabJob' 10062 JobType JobType `json:"jobType,omitempty"` 10063} 10064 10065// MarshalJSON is the custom marshaler for DpmJob. 10066func (dj DpmJob) MarshalJSON() ([]byte, error) { 10067 dj.JobType = JobTypeDpmJob 10068 objectMap := make(map[string]interface{}) 10069 if dj.Duration != nil { 10070 objectMap["duration"] = dj.Duration 10071 } 10072 if dj.DpmServerName != nil { 10073 objectMap["dpmServerName"] = dj.DpmServerName 10074 } 10075 if dj.ContainerName != nil { 10076 objectMap["containerName"] = dj.ContainerName 10077 } 10078 if dj.ContainerType != nil { 10079 objectMap["containerType"] = dj.ContainerType 10080 } 10081 if dj.WorkloadType != nil { 10082 objectMap["workloadType"] = dj.WorkloadType 10083 } 10084 if dj.ActionsInfo != nil { 10085 objectMap["actionsInfo"] = dj.ActionsInfo 10086 } 10087 if dj.ErrorDetails != nil { 10088 objectMap["errorDetails"] = dj.ErrorDetails 10089 } 10090 if dj.ExtendedInfo != nil { 10091 objectMap["extendedInfo"] = dj.ExtendedInfo 10092 } 10093 if dj.EntityFriendlyName != nil { 10094 objectMap["entityFriendlyName"] = dj.EntityFriendlyName 10095 } 10096 if dj.BackupManagementType != "" { 10097 objectMap["backupManagementType"] = dj.BackupManagementType 10098 } 10099 if dj.Operation != nil { 10100 objectMap["operation"] = dj.Operation 10101 } 10102 if dj.Status != nil { 10103 objectMap["status"] = dj.Status 10104 } 10105 if dj.StartTime != nil { 10106 objectMap["startTime"] = dj.StartTime 10107 } 10108 if dj.EndTime != nil { 10109 objectMap["endTime"] = dj.EndTime 10110 } 10111 if dj.ActivityID != nil { 10112 objectMap["activityId"] = dj.ActivityID 10113 } 10114 if dj.JobType != "" { 10115 objectMap["jobType"] = dj.JobType 10116 } 10117 return json.Marshal(objectMap) 10118} 10119 10120// AsAzureIaaSVMJob is the BasicJob implementation for DpmJob. 10121func (dj DpmJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) { 10122 return nil, false 10123} 10124 10125// AsAzureStorageJob is the BasicJob implementation for DpmJob. 10126func (dj DpmJob) AsAzureStorageJob() (*AzureStorageJob, bool) { 10127 return nil, false 10128} 10129 10130// AsAzureWorkloadJob is the BasicJob implementation for DpmJob. 10131func (dj DpmJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) { 10132 return nil, false 10133} 10134 10135// AsDpmJob is the BasicJob implementation for DpmJob. 10136func (dj DpmJob) AsDpmJob() (*DpmJob, bool) { 10137 return &dj, true 10138} 10139 10140// AsMabJob is the BasicJob implementation for DpmJob. 10141func (dj DpmJob) AsMabJob() (*MabJob, bool) { 10142 return nil, false 10143} 10144 10145// AsJob is the BasicJob implementation for DpmJob. 10146func (dj DpmJob) AsJob() (*Job, bool) { 10147 return nil, false 10148} 10149 10150// AsBasicJob is the BasicJob implementation for DpmJob. 10151func (dj DpmJob) AsBasicJob() (BasicJob, bool) { 10152 return &dj, true 10153} 10154 10155// DpmJobExtendedInfo additional information on the DPM workload-specific job. 10156type DpmJobExtendedInfo struct { 10157 // TasksList - List of tasks associated with this job. 10158 TasksList *[]DpmJobTaskDetails `json:"tasksList,omitempty"` 10159 // PropertyBag - The job properties. 10160 PropertyBag map[string]*string `json:"propertyBag"` 10161 // DynamicErrorMessage - Non localized error message on job execution. 10162 DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"` 10163} 10164 10165// MarshalJSON is the custom marshaler for DpmJobExtendedInfo. 10166func (djei DpmJobExtendedInfo) MarshalJSON() ([]byte, error) { 10167 objectMap := make(map[string]interface{}) 10168 if djei.TasksList != nil { 10169 objectMap["tasksList"] = djei.TasksList 10170 } 10171 if djei.PropertyBag != nil { 10172 objectMap["propertyBag"] = djei.PropertyBag 10173 } 10174 if djei.DynamicErrorMessage != nil { 10175 objectMap["dynamicErrorMessage"] = djei.DynamicErrorMessage 10176 } 10177 return json.Marshal(objectMap) 10178} 10179 10180// DpmJobTaskDetails DPM workload-specific job task details. 10181type DpmJobTaskDetails struct { 10182 // TaskID - The task display name. 10183 TaskID *string `json:"taskId,omitempty"` 10184 // StartTime - The start time. 10185 StartTime *date.Time `json:"startTime,omitempty"` 10186 // EndTime - The end time. 10187 EndTime *date.Time `json:"endTime,omitempty"` 10188 // Duration - Time elapsed for task. 10189 Duration *string `json:"duration,omitempty"` 10190 // Status - The status. 10191 Status *string `json:"status,omitempty"` 10192} 10193 10194// DPMProtectedItem additional information on Backup engine specific backup item. 10195type DPMProtectedItem struct { 10196 // FriendlyName - Friendly name of the managed item 10197 FriendlyName *string `json:"friendlyName,omitempty"` 10198 // BackupEngineName - Backup Management server protecting this backup item 10199 BackupEngineName *string `json:"backupEngineName,omitempty"` 10200 // ProtectionState - Protection state of the backup engine. Possible values include: 'ProtectedItemStateInvalid', 'ProtectedItemStateIRPending', 'ProtectedItemStateProtected', 'ProtectedItemStateProtectionError', 'ProtectedItemStateProtectionStopped', 'ProtectedItemStateProtectionPaused' 10201 ProtectionState ProtectedItemState `json:"protectionState,omitempty"` 10202 // ExtendedInfo - Extended info of the backup item. 10203 ExtendedInfo *DPMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` 10204 // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 10205 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 10206 // 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' 10207 WorkloadType DataSourceType `json:"workloadType,omitempty"` 10208 // ContainerName - Unique name of container 10209 ContainerName *string `json:"containerName,omitempty"` 10210 // SourceResourceID - ARM ID of the resource to be backed up. 10211 SourceResourceID *string `json:"sourceResourceId,omitempty"` 10212 // PolicyID - ID of the backup policy with which this item is backed up. 10213 PolicyID *string `json:"policyId,omitempty"` 10214 // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. 10215 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` 10216 // BackupSetName - Name of the backup set the backup item belongs to 10217 BackupSetName *string `json:"backupSetName,omitempty"` 10218 // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' 10219 CreateMode CreateMode `json:"createMode,omitempty"` 10220 // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC 10221 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` 10222 // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete 10223 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` 10224 // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted 10225 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` 10226 // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon 10227 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` 10228 // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state 10229 IsRehydrate *bool `json:"isRehydrate,omitempty"` 10230 // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' 10231 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` 10232} 10233 10234// MarshalJSON is the custom marshaler for DPMProtectedItem. 10235func (dpi DPMProtectedItem) MarshalJSON() ([]byte, error) { 10236 dpi.ProtectedItemType = ProtectedItemTypeDPMProtectedItem 10237 objectMap := make(map[string]interface{}) 10238 if dpi.FriendlyName != nil { 10239 objectMap["friendlyName"] = dpi.FriendlyName 10240 } 10241 if dpi.BackupEngineName != nil { 10242 objectMap["backupEngineName"] = dpi.BackupEngineName 10243 } 10244 if dpi.ProtectionState != "" { 10245 objectMap["protectionState"] = dpi.ProtectionState 10246 } 10247 if dpi.ExtendedInfo != nil { 10248 objectMap["extendedInfo"] = dpi.ExtendedInfo 10249 } 10250 if dpi.BackupManagementType != "" { 10251 objectMap["backupManagementType"] = dpi.BackupManagementType 10252 } 10253 if dpi.WorkloadType != "" { 10254 objectMap["workloadType"] = dpi.WorkloadType 10255 } 10256 if dpi.ContainerName != nil { 10257 objectMap["containerName"] = dpi.ContainerName 10258 } 10259 if dpi.SourceResourceID != nil { 10260 objectMap["sourceResourceId"] = dpi.SourceResourceID 10261 } 10262 if dpi.PolicyID != nil { 10263 objectMap["policyId"] = dpi.PolicyID 10264 } 10265 if dpi.LastRecoveryPoint != nil { 10266 objectMap["lastRecoveryPoint"] = dpi.LastRecoveryPoint 10267 } 10268 if dpi.BackupSetName != nil { 10269 objectMap["backupSetName"] = dpi.BackupSetName 10270 } 10271 if dpi.CreateMode != "" { 10272 objectMap["createMode"] = dpi.CreateMode 10273 } 10274 if dpi.DeferredDeleteTimeInUTC != nil { 10275 objectMap["deferredDeleteTimeInUTC"] = dpi.DeferredDeleteTimeInUTC 10276 } 10277 if dpi.IsScheduledForDeferredDelete != nil { 10278 objectMap["isScheduledForDeferredDelete"] = dpi.IsScheduledForDeferredDelete 10279 } 10280 if dpi.DeferredDeleteTimeRemaining != nil { 10281 objectMap["deferredDeleteTimeRemaining"] = dpi.DeferredDeleteTimeRemaining 10282 } 10283 if dpi.IsDeferredDeleteScheduleUpcoming != nil { 10284 objectMap["isDeferredDeleteScheduleUpcoming"] = dpi.IsDeferredDeleteScheduleUpcoming 10285 } 10286 if dpi.IsRehydrate != nil { 10287 objectMap["isRehydrate"] = dpi.IsRehydrate 10288 } 10289 if dpi.ProtectedItemType != "" { 10290 objectMap["protectedItemType"] = dpi.ProtectedItemType 10291 } 10292 return json.Marshal(objectMap) 10293} 10294 10295// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10296func (dpi DPMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { 10297 return nil, false 10298} 10299 10300// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10301func (dpi DPMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { 10302 return nil, false 10303} 10304 10305// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10306func (dpi DPMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { 10307 return nil, false 10308} 10309 10310// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10311func (dpi DPMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { 10312 return nil, false 10313} 10314 10315// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10316func (dpi DPMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { 10317 return nil, false 10318} 10319 10320// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10321func (dpi DPMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { 10322 return nil, false 10323} 10324 10325// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10326func (dpi DPMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { 10327 return nil, false 10328} 10329 10330// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10331func (dpi DPMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { 10332 return nil, false 10333} 10334 10335// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10336func (dpi DPMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { 10337 return nil, false 10338} 10339 10340// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10341func (dpi DPMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { 10342 return nil, false 10343} 10344 10345// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10346func (dpi DPMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { 10347 return nil, false 10348} 10349 10350// AsDPMProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10351func (dpi DPMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { 10352 return &dpi, true 10353} 10354 10355// AsGenericProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10356func (dpi DPMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { 10357 return nil, false 10358} 10359 10360// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10361func (dpi DPMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { 10362 return nil, false 10363} 10364 10365// AsProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10366func (dpi DPMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { 10367 return nil, false 10368} 10369 10370// AsBasicProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10371func (dpi DPMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { 10372 return &dpi, true 10373} 10374 10375// DPMProtectedItemExtendedInfo additional information of DPM Protected item. 10376type DPMProtectedItemExtendedInfo struct { 10377 // ProtectableObjectLoadPath - Attribute to provide information on various DBs. 10378 ProtectableObjectLoadPath map[string]*string `json:"protectableObjectLoadPath"` 10379 // Protected - To check if backup item is disk protected. 10380 Protected *bool `json:"protected,omitempty"` 10381 // IsPresentOnCloud - To check if backup item is cloud protected. 10382 IsPresentOnCloud *bool `json:"isPresentOnCloud,omitempty"` 10383 // LastBackupStatus - Last backup status information on backup item. 10384 LastBackupStatus *string `json:"lastBackupStatus,omitempty"` 10385 // LastRefreshedAt - Last refresh time on backup item. 10386 LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"` 10387 // OldestRecoveryPoint - Oldest cloud recovery point time. 10388 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"` 10389 // RecoveryPointCount - cloud recovery point count. 10390 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"` 10391 // OnPremiseOldestRecoveryPoint - Oldest disk recovery point time. 10392 OnPremiseOldestRecoveryPoint *date.Time `json:"onPremiseOldestRecoveryPoint,omitempty"` 10393 // OnPremiseLatestRecoveryPoint - latest disk recovery point time. 10394 OnPremiseLatestRecoveryPoint *date.Time `json:"onPremiseLatestRecoveryPoint,omitempty"` 10395 // OnPremiseRecoveryPointCount - disk recovery point count. 10396 OnPremiseRecoveryPointCount *int32 `json:"onPremiseRecoveryPointCount,omitempty"` 10397 // IsCollocated - To check if backup item is collocated. 10398 IsCollocated *bool `json:"isCollocated,omitempty"` 10399 // ProtectionGroupName - Protection group name of the backup item. 10400 ProtectionGroupName *string `json:"protectionGroupName,omitempty"` 10401 // DiskStorageUsedInBytes - Used Disk storage in bytes. 10402 DiskStorageUsedInBytes *string `json:"diskStorageUsedInBytes,omitempty"` 10403 // TotalDiskStorageSizeInBytes - total Disk storage in bytes. 10404 TotalDiskStorageSizeInBytes *string `json:"totalDiskStorageSizeInBytes,omitempty"` 10405} 10406 10407// MarshalJSON is the custom marshaler for DPMProtectedItemExtendedInfo. 10408func (dpiei DPMProtectedItemExtendedInfo) MarshalJSON() ([]byte, error) { 10409 objectMap := make(map[string]interface{}) 10410 if dpiei.ProtectableObjectLoadPath != nil { 10411 objectMap["protectableObjectLoadPath"] = dpiei.ProtectableObjectLoadPath 10412 } 10413 if dpiei.Protected != nil { 10414 objectMap["protected"] = dpiei.Protected 10415 } 10416 if dpiei.IsPresentOnCloud != nil { 10417 objectMap["isPresentOnCloud"] = dpiei.IsPresentOnCloud 10418 } 10419 if dpiei.LastBackupStatus != nil { 10420 objectMap["lastBackupStatus"] = dpiei.LastBackupStatus 10421 } 10422 if dpiei.LastRefreshedAt != nil { 10423 objectMap["lastRefreshedAt"] = dpiei.LastRefreshedAt 10424 } 10425 if dpiei.OldestRecoveryPoint != nil { 10426 objectMap["oldestRecoveryPoint"] = dpiei.OldestRecoveryPoint 10427 } 10428 if dpiei.RecoveryPointCount != nil { 10429 objectMap["recoveryPointCount"] = dpiei.RecoveryPointCount 10430 } 10431 if dpiei.OnPremiseOldestRecoveryPoint != nil { 10432 objectMap["onPremiseOldestRecoveryPoint"] = dpiei.OnPremiseOldestRecoveryPoint 10433 } 10434 if dpiei.OnPremiseLatestRecoveryPoint != nil { 10435 objectMap["onPremiseLatestRecoveryPoint"] = dpiei.OnPremiseLatestRecoveryPoint 10436 } 10437 if dpiei.OnPremiseRecoveryPointCount != nil { 10438 objectMap["onPremiseRecoveryPointCount"] = dpiei.OnPremiseRecoveryPointCount 10439 } 10440 if dpiei.IsCollocated != nil { 10441 objectMap["isCollocated"] = dpiei.IsCollocated 10442 } 10443 if dpiei.ProtectionGroupName != nil { 10444 objectMap["protectionGroupName"] = dpiei.ProtectionGroupName 10445 } 10446 if dpiei.DiskStorageUsedInBytes != nil { 10447 objectMap["diskStorageUsedInBytes"] = dpiei.DiskStorageUsedInBytes 10448 } 10449 if dpiei.TotalDiskStorageSizeInBytes != nil { 10450 objectMap["totalDiskStorageSizeInBytes"] = dpiei.TotalDiskStorageSizeInBytes 10451 } 10452 return json.Marshal(objectMap) 10453} 10454 10455// EncryptionDetails details needed if the VM was encrypted at the time of backup. 10456type EncryptionDetails struct { 10457 // EncryptionEnabled - Identifies whether this backup copy represents an encrypted VM at the time of backup. 10458 EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"` 10459 // KekURL - Key Url. 10460 KekURL *string `json:"kekUrl,omitempty"` 10461 // SecretKeyURL - Secret Url. 10462 SecretKeyURL *string `json:"secretKeyUrl,omitempty"` 10463 // KekVaultID - ID of Key Vault where KEK is stored. 10464 KekVaultID *string `json:"kekVaultId,omitempty"` 10465 // SecretKeyVaultID - ID of Key Vault where Secret is stored. 10466 SecretKeyVaultID *string `json:"secretKeyVaultId,omitempty"` 10467} 10468 10469// BasicEngineBase the base backup engine class. All workload specific backup engines derive from this class. 10470type BasicEngineBase interface { 10471 AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) 10472 AsDpmBackupEngine() (*DpmBackupEngine, bool) 10473 AsEngineBase() (*EngineBase, bool) 10474} 10475 10476// EngineBase the base backup engine class. All workload specific backup engines derive from this class. 10477type EngineBase struct { 10478 // FriendlyName - Friendly name of the backup engine. 10479 FriendlyName *string `json:"friendlyName,omitempty"` 10480 // BackupManagementType - Type of backup management for the backup engine. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 10481 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 10482 // RegistrationStatus - Registration status of the backup engine with the Recovery Services Vault. 10483 RegistrationStatus *string `json:"registrationStatus,omitempty"` 10484 // BackupEngineState - Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed} 10485 BackupEngineState *string `json:"backupEngineState,omitempty"` 10486 // HealthStatus - Backup status of the backup engine. 10487 HealthStatus *string `json:"healthStatus,omitempty"` 10488 // CanReRegister - Flag indicating if the backup engine be registered, once already registered. 10489 CanReRegister *bool `json:"canReRegister,omitempty"` 10490 // BackupEngineID - ID of the backup engine. 10491 BackupEngineID *string `json:"backupEngineId,omitempty"` 10492 // DpmVersion - Backup engine version 10493 DpmVersion *string `json:"dpmVersion,omitempty"` 10494 // AzureBackupAgentVersion - Backup agent version 10495 AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"` 10496 // IsAzureBackupAgentUpgradeAvailable - To check if backup agent upgrade available 10497 IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"` 10498 // IsDpmUpgradeAvailable - To check if backup engine upgrade available 10499 IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"` 10500 // ExtendedInfo - Extended info of the backupengine 10501 ExtendedInfo *EngineExtendedInfo `json:"extendedInfo,omitempty"` 10502 // BackupEngineType - Possible values include: 'BackupEngineTypeBackupEngineBase', 'BackupEngineTypeAzureBackupServerEngine', 'BackupEngineTypeDpmBackupEngine' 10503 BackupEngineType EngineType `json:"backupEngineType,omitempty"` 10504} 10505 10506func unmarshalBasicEngineBase(body []byte) (BasicEngineBase, error) { 10507 var m map[string]interface{} 10508 err := json.Unmarshal(body, &m) 10509 if err != nil { 10510 return nil, err 10511 } 10512 10513 switch m["backupEngineType"] { 10514 case string(BackupEngineTypeAzureBackupServerEngine): 10515 var abse AzureBackupServerEngine 10516 err := json.Unmarshal(body, &abse) 10517 return abse, err 10518 case string(BackupEngineTypeDpmBackupEngine): 10519 var dbe DpmBackupEngine 10520 err := json.Unmarshal(body, &dbe) 10521 return dbe, err 10522 default: 10523 var eb EngineBase 10524 err := json.Unmarshal(body, &eb) 10525 return eb, err 10526 } 10527} 10528func unmarshalBasicEngineBaseArray(body []byte) ([]BasicEngineBase, error) { 10529 var rawMessages []*json.RawMessage 10530 err := json.Unmarshal(body, &rawMessages) 10531 if err != nil { 10532 return nil, err 10533 } 10534 10535 ebArray := make([]BasicEngineBase, len(rawMessages)) 10536 10537 for index, rawMessage := range rawMessages { 10538 eb, err := unmarshalBasicEngineBase(*rawMessage) 10539 if err != nil { 10540 return nil, err 10541 } 10542 ebArray[index] = eb 10543 } 10544 return ebArray, nil 10545} 10546 10547// MarshalJSON is the custom marshaler for EngineBase. 10548func (eb EngineBase) MarshalJSON() ([]byte, error) { 10549 eb.BackupEngineType = BackupEngineTypeBackupEngineBase 10550 objectMap := make(map[string]interface{}) 10551 if eb.FriendlyName != nil { 10552 objectMap["friendlyName"] = eb.FriendlyName 10553 } 10554 if eb.BackupManagementType != "" { 10555 objectMap["backupManagementType"] = eb.BackupManagementType 10556 } 10557 if eb.RegistrationStatus != nil { 10558 objectMap["registrationStatus"] = eb.RegistrationStatus 10559 } 10560 if eb.BackupEngineState != nil { 10561 objectMap["backupEngineState"] = eb.BackupEngineState 10562 } 10563 if eb.HealthStatus != nil { 10564 objectMap["healthStatus"] = eb.HealthStatus 10565 } 10566 if eb.CanReRegister != nil { 10567 objectMap["canReRegister"] = eb.CanReRegister 10568 } 10569 if eb.BackupEngineID != nil { 10570 objectMap["backupEngineId"] = eb.BackupEngineID 10571 } 10572 if eb.DpmVersion != nil { 10573 objectMap["dpmVersion"] = eb.DpmVersion 10574 } 10575 if eb.AzureBackupAgentVersion != nil { 10576 objectMap["azureBackupAgentVersion"] = eb.AzureBackupAgentVersion 10577 } 10578 if eb.IsAzureBackupAgentUpgradeAvailable != nil { 10579 objectMap["isAzureBackupAgentUpgradeAvailable"] = eb.IsAzureBackupAgentUpgradeAvailable 10580 } 10581 if eb.IsDpmUpgradeAvailable != nil { 10582 objectMap["isDpmUpgradeAvailable"] = eb.IsDpmUpgradeAvailable 10583 } 10584 if eb.ExtendedInfo != nil { 10585 objectMap["extendedInfo"] = eb.ExtendedInfo 10586 } 10587 if eb.BackupEngineType != "" { 10588 objectMap["backupEngineType"] = eb.BackupEngineType 10589 } 10590 return json.Marshal(objectMap) 10591} 10592 10593// AsAzureBackupServerEngine is the BasicEngineBase implementation for EngineBase. 10594func (eb EngineBase) AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) { 10595 return nil, false 10596} 10597 10598// AsDpmBackupEngine is the BasicEngineBase implementation for EngineBase. 10599func (eb EngineBase) AsDpmBackupEngine() (*DpmBackupEngine, bool) { 10600 return nil, false 10601} 10602 10603// AsEngineBase is the BasicEngineBase implementation for EngineBase. 10604func (eb EngineBase) AsEngineBase() (*EngineBase, bool) { 10605 return &eb, true 10606} 10607 10608// AsBasicEngineBase is the BasicEngineBase implementation for EngineBase. 10609func (eb EngineBase) AsBasicEngineBase() (BasicEngineBase, bool) { 10610 return &eb, true 10611} 10612 10613// EngineBaseResource the base backup engine class. All workload specific backup engines derive from this 10614// class. 10615type EngineBaseResource struct { 10616 autorest.Response `json:"-"` 10617 // Properties - BackupEngineBaseResource properties 10618 Properties BasicEngineBase `json:"properties,omitempty"` 10619 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 10620 ID *string `json:"id,omitempty"` 10621 // Name - READ-ONLY; Resource name associated with the resource. 10622 Name *string `json:"name,omitempty"` 10623 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 10624 Type *string `json:"type,omitempty"` 10625 // Location - Resource location. 10626 Location *string `json:"location,omitempty"` 10627 // Tags - Resource tags. 10628 Tags map[string]*string `json:"tags"` 10629 // ETag - Optional ETag. 10630 ETag *string `json:"eTag,omitempty"` 10631} 10632 10633// MarshalJSON is the custom marshaler for EngineBaseResource. 10634func (ebr EngineBaseResource) MarshalJSON() ([]byte, error) { 10635 objectMap := make(map[string]interface{}) 10636 objectMap["properties"] = ebr.Properties 10637 if ebr.Location != nil { 10638 objectMap["location"] = ebr.Location 10639 } 10640 if ebr.Tags != nil { 10641 objectMap["tags"] = ebr.Tags 10642 } 10643 if ebr.ETag != nil { 10644 objectMap["eTag"] = ebr.ETag 10645 } 10646 return json.Marshal(objectMap) 10647} 10648 10649// UnmarshalJSON is the custom unmarshaler for EngineBaseResource struct. 10650func (ebr *EngineBaseResource) UnmarshalJSON(body []byte) error { 10651 var m map[string]*json.RawMessage 10652 err := json.Unmarshal(body, &m) 10653 if err != nil { 10654 return err 10655 } 10656 for k, v := range m { 10657 switch k { 10658 case "properties": 10659 if v != nil { 10660 properties, err := unmarshalBasicEngineBase(*v) 10661 if err != nil { 10662 return err 10663 } 10664 ebr.Properties = properties 10665 } 10666 case "id": 10667 if v != nil { 10668 var ID string 10669 err = json.Unmarshal(*v, &ID) 10670 if err != nil { 10671 return err 10672 } 10673 ebr.ID = &ID 10674 } 10675 case "name": 10676 if v != nil { 10677 var name string 10678 err = json.Unmarshal(*v, &name) 10679 if err != nil { 10680 return err 10681 } 10682 ebr.Name = &name 10683 } 10684 case "type": 10685 if v != nil { 10686 var typeVar string 10687 err = json.Unmarshal(*v, &typeVar) 10688 if err != nil { 10689 return err 10690 } 10691 ebr.Type = &typeVar 10692 } 10693 case "location": 10694 if v != nil { 10695 var location string 10696 err = json.Unmarshal(*v, &location) 10697 if err != nil { 10698 return err 10699 } 10700 ebr.Location = &location 10701 } 10702 case "tags": 10703 if v != nil { 10704 var tags map[string]*string 10705 err = json.Unmarshal(*v, &tags) 10706 if err != nil { 10707 return err 10708 } 10709 ebr.Tags = tags 10710 } 10711 case "eTag": 10712 if v != nil { 10713 var eTag string 10714 err = json.Unmarshal(*v, &eTag) 10715 if err != nil { 10716 return err 10717 } 10718 ebr.ETag = &eTag 10719 } 10720 } 10721 } 10722 10723 return nil 10724} 10725 10726// EngineBaseResourceList list of BackupEngineBase resources 10727type EngineBaseResourceList struct { 10728 autorest.Response `json:"-"` 10729 // Value - List of resources. 10730 Value *[]EngineBaseResource `json:"value,omitempty"` 10731 // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. 10732 NextLink *string `json:"nextLink,omitempty"` 10733} 10734 10735// EngineBaseResourceListIterator provides access to a complete listing of EngineBaseResource values. 10736type EngineBaseResourceListIterator struct { 10737 i int 10738 page EngineBaseResourceListPage 10739} 10740 10741// NextWithContext advances to the next value. If there was an error making 10742// the request the iterator does not advance and the error is returned. 10743func (iter *EngineBaseResourceListIterator) NextWithContext(ctx context.Context) (err error) { 10744 if tracing.IsEnabled() { 10745 ctx = tracing.StartSpan(ctx, fqdn+"/EngineBaseResourceListIterator.NextWithContext") 10746 defer func() { 10747 sc := -1 10748 if iter.Response().Response.Response != nil { 10749 sc = iter.Response().Response.Response.StatusCode 10750 } 10751 tracing.EndSpan(ctx, sc, err) 10752 }() 10753 } 10754 iter.i++ 10755 if iter.i < len(iter.page.Values()) { 10756 return nil 10757 } 10758 err = iter.page.NextWithContext(ctx) 10759 if err != nil { 10760 iter.i-- 10761 return err 10762 } 10763 iter.i = 0 10764 return nil 10765} 10766 10767// Next advances to the next value. If there was an error making 10768// the request the iterator does not advance and the error is returned. 10769// Deprecated: Use NextWithContext() instead. 10770func (iter *EngineBaseResourceListIterator) Next() error { 10771 return iter.NextWithContext(context.Background()) 10772} 10773 10774// NotDone returns true if the enumeration should be started or is not yet complete. 10775func (iter EngineBaseResourceListIterator) NotDone() bool { 10776 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 10777} 10778 10779// Response returns the raw server response from the last page request. 10780func (iter EngineBaseResourceListIterator) Response() EngineBaseResourceList { 10781 return iter.page.Response() 10782} 10783 10784// Value returns the current value or a zero-initialized value if the 10785// iterator has advanced beyond the end of the collection. 10786func (iter EngineBaseResourceListIterator) Value() EngineBaseResource { 10787 if !iter.page.NotDone() { 10788 return EngineBaseResource{} 10789 } 10790 return iter.page.Values()[iter.i] 10791} 10792 10793// Creates a new instance of the EngineBaseResourceListIterator type. 10794func NewEngineBaseResourceListIterator(page EngineBaseResourceListPage) EngineBaseResourceListIterator { 10795 return EngineBaseResourceListIterator{page: page} 10796} 10797 10798// IsEmpty returns true if the ListResult contains no values. 10799func (ebrl EngineBaseResourceList) IsEmpty() bool { 10800 return ebrl.Value == nil || len(*ebrl.Value) == 0 10801} 10802 10803// hasNextLink returns true if the NextLink is not empty. 10804func (ebrl EngineBaseResourceList) hasNextLink() bool { 10805 return ebrl.NextLink != nil && len(*ebrl.NextLink) != 0 10806} 10807 10808// engineBaseResourceListPreparer prepares a request to retrieve the next set of results. 10809// It returns nil if no more results exist. 10810func (ebrl EngineBaseResourceList) engineBaseResourceListPreparer(ctx context.Context) (*http.Request, error) { 10811 if !ebrl.hasNextLink() { 10812 return nil, nil 10813 } 10814 return autorest.Prepare((&http.Request{}).WithContext(ctx), 10815 autorest.AsJSON(), 10816 autorest.AsGet(), 10817 autorest.WithBaseURL(to.String(ebrl.NextLink))) 10818} 10819 10820// EngineBaseResourceListPage contains a page of EngineBaseResource values. 10821type EngineBaseResourceListPage struct { 10822 fn func(context.Context, EngineBaseResourceList) (EngineBaseResourceList, error) 10823 ebrl EngineBaseResourceList 10824} 10825 10826// NextWithContext advances to the next page of values. If there was an error making 10827// the request the page does not advance and the error is returned. 10828func (page *EngineBaseResourceListPage) NextWithContext(ctx context.Context) (err error) { 10829 if tracing.IsEnabled() { 10830 ctx = tracing.StartSpan(ctx, fqdn+"/EngineBaseResourceListPage.NextWithContext") 10831 defer func() { 10832 sc := -1 10833 if page.Response().Response.Response != nil { 10834 sc = page.Response().Response.Response.StatusCode 10835 } 10836 tracing.EndSpan(ctx, sc, err) 10837 }() 10838 } 10839 for { 10840 next, err := page.fn(ctx, page.ebrl) 10841 if err != nil { 10842 return err 10843 } 10844 page.ebrl = next 10845 if !next.hasNextLink() || !next.IsEmpty() { 10846 break 10847 } 10848 } 10849 return nil 10850} 10851 10852// Next advances to the next page of values. If there was an error making 10853// the request the page does not advance and the error is returned. 10854// Deprecated: Use NextWithContext() instead. 10855func (page *EngineBaseResourceListPage) Next() error { 10856 return page.NextWithContext(context.Background()) 10857} 10858 10859// NotDone returns true if the page enumeration should be started or is not yet complete. 10860func (page EngineBaseResourceListPage) NotDone() bool { 10861 return !page.ebrl.IsEmpty() 10862} 10863 10864// Response returns the raw server response from the last page request. 10865func (page EngineBaseResourceListPage) Response() EngineBaseResourceList { 10866 return page.ebrl 10867} 10868 10869// Values returns the slice of values for the current page or nil if there are no values. 10870func (page EngineBaseResourceListPage) Values() []EngineBaseResource { 10871 if page.ebrl.IsEmpty() { 10872 return nil 10873 } 10874 return *page.ebrl.Value 10875} 10876 10877// Creates a new instance of the EngineBaseResourceListPage type. 10878func NewEngineBaseResourceListPage(cur EngineBaseResourceList, getNextPage func(context.Context, EngineBaseResourceList) (EngineBaseResourceList, error)) EngineBaseResourceListPage { 10879 return EngineBaseResourceListPage{ 10880 fn: getNextPage, 10881 ebrl: cur, 10882 } 10883} 10884 10885// EngineExtendedInfo additional information on backup engine. 10886type EngineExtendedInfo struct { 10887 // DatabaseName - Database name of backup engine. 10888 DatabaseName *string `json:"databaseName,omitempty"` 10889 // ProtectedItemsCount - Number of protected items in the backup engine. 10890 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` 10891 // ProtectedServersCount - Number of protected servers in the backup engine. 10892 ProtectedServersCount *int32 `json:"protectedServersCount,omitempty"` 10893 // DiskCount - Number of disks in the backup engine. 10894 DiskCount *int32 `json:"diskCount,omitempty"` 10895 // UsedDiskSpace - Disk space used in the backup engine. 10896 UsedDiskSpace *float64 `json:"usedDiskSpace,omitempty"` 10897 // AvailableDiskSpace - Disk space currently available in the backup engine. 10898 AvailableDiskSpace *float64 `json:"availableDiskSpace,omitempty"` 10899 // RefreshedAt - Last refresh time in the backup engine. 10900 RefreshedAt *date.Time `json:"refreshedAt,omitempty"` 10901 // AzureProtectedInstances - Protected instances in the backup engine. 10902 AzureProtectedInstances *int32 `json:"azureProtectedInstances,omitempty"` 10903} 10904 10905// ErrorAdditionalInfo the resource management error additional info. 10906type ErrorAdditionalInfo struct { 10907 // Type - READ-ONLY; The additional info type. 10908 Type *string `json:"type,omitempty"` 10909 // Info - READ-ONLY; The additional info. 10910 Info interface{} `json:"info,omitempty"` 10911} 10912 10913// MarshalJSON is the custom marshaler for ErrorAdditionalInfo. 10914func (eai ErrorAdditionalInfo) MarshalJSON() ([]byte, error) { 10915 objectMap := make(map[string]interface{}) 10916 return json.Marshal(objectMap) 10917} 10918 10919// ErrorDetail error Detail class which encapsulates Code, Message and Recommendations. 10920type ErrorDetail struct { 10921 // Code - READ-ONLY; Error code. 10922 Code *string `json:"code,omitempty"` 10923 // Message - READ-ONLY; Error Message related to the Code. 10924 Message *string `json:"message,omitempty"` 10925 // Recommendations - READ-ONLY; List of recommendation strings. 10926 Recommendations *[]string `json:"recommendations,omitempty"` 10927} 10928 10929// MarshalJSON is the custom marshaler for ErrorDetail. 10930func (ed ErrorDetail) MarshalJSON() ([]byte, error) { 10931 objectMap := make(map[string]interface{}) 10932 return json.Marshal(objectMap) 10933} 10934 10935// ErrorResponse common error response for all Azure Resource Manager APIs to return error details for 10936// failed operations. (This also follows the OData error response format.) 10937type ErrorResponse struct { 10938 // Code - READ-ONLY; The error code. 10939 Code *string `json:"code,omitempty"` 10940 // Message - READ-ONLY; The error message. 10941 Message *string `json:"message,omitempty"` 10942 // Target - READ-ONLY; The error target. 10943 Target *string `json:"target,omitempty"` 10944 // Details - READ-ONLY; The error details. 10945 Details *[]ErrorResponse `json:"details,omitempty"` 10946 // AdditionalInfo - READ-ONLY; The error additional info. 10947 AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"` 10948} 10949 10950// MarshalJSON is the custom marshaler for ErrorResponse. 10951func (er ErrorResponse) MarshalJSON() ([]byte, error) { 10952 objectMap := make(map[string]interface{}) 10953 return json.Marshal(objectMap) 10954} 10955 10956// ExportJobsOperationResultInfo this class is used to send blob details after exporting jobs. 10957type ExportJobsOperationResultInfo struct { 10958 // BlobURL - URL of the blob into which the serialized string of list of jobs is exported. 10959 BlobURL *string `json:"blobUrl,omitempty"` 10960 // BlobSasKey - SAS key to access the blob. It expires in 15 mins. 10961 BlobSasKey *string `json:"blobSasKey,omitempty"` 10962 // ExcelFileBlobURL - URL of the blob into which the ExcelFile is uploaded. 10963 ExcelFileBlobURL *string `json:"excelFileBlobUrl,omitempty"` 10964 // ExcelFileBlobSasKey - SAS key to access the blob. It expires in 15 mins. 10965 ExcelFileBlobSasKey *string `json:"excelFileBlobSasKey,omitempty"` 10966 // ObjectType - Possible values include: 'ObjectTypeOperationResultInfoBase', 'ObjectTypeExportJobsOperationResultInfo', 'ObjectTypeOperationResultInfo' 10967 ObjectType ObjectType `json:"objectType,omitempty"` 10968} 10969 10970// MarshalJSON is the custom marshaler for ExportJobsOperationResultInfo. 10971func (ejori ExportJobsOperationResultInfo) MarshalJSON() ([]byte, error) { 10972 ejori.ObjectType = ObjectTypeExportJobsOperationResultInfo 10973 objectMap := make(map[string]interface{}) 10974 if ejori.BlobURL != nil { 10975 objectMap["blobUrl"] = ejori.BlobURL 10976 } 10977 if ejori.BlobSasKey != nil { 10978 objectMap["blobSasKey"] = ejori.BlobSasKey 10979 } 10980 if ejori.ExcelFileBlobURL != nil { 10981 objectMap["excelFileBlobUrl"] = ejori.ExcelFileBlobURL 10982 } 10983 if ejori.ExcelFileBlobSasKey != nil { 10984 objectMap["excelFileBlobSasKey"] = ejori.ExcelFileBlobSasKey 10985 } 10986 if ejori.ObjectType != "" { 10987 objectMap["objectType"] = ejori.ObjectType 10988 } 10989 return json.Marshal(objectMap) 10990} 10991 10992// AsExportJobsOperationResultInfo is the BasicOperationResultInfoBase implementation for ExportJobsOperationResultInfo. 10993func (ejori ExportJobsOperationResultInfo) AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) { 10994 return &ejori, true 10995} 10996 10997// AsOperationResultInfo is the BasicOperationResultInfoBase implementation for ExportJobsOperationResultInfo. 10998func (ejori ExportJobsOperationResultInfo) AsOperationResultInfo() (*OperationResultInfo, bool) { 10999 return nil, false 11000} 11001 11002// AsOperationResultInfoBase is the BasicOperationResultInfoBase implementation for ExportJobsOperationResultInfo. 11003func (ejori ExportJobsOperationResultInfo) AsOperationResultInfoBase() (*OperationResultInfoBase, bool) { 11004 return nil, false 11005} 11006 11007// AsBasicOperationResultInfoBase is the BasicOperationResultInfoBase implementation for ExportJobsOperationResultInfo. 11008func (ejori ExportJobsOperationResultInfo) AsBasicOperationResultInfoBase() (BasicOperationResultInfoBase, bool) { 11009 return &ejori, true 11010} 11011 11012// ExtendedProperties extended Properties for Azure IaasVM Backup. 11013type ExtendedProperties struct { 11014 // DiskExclusionProperties - Extended Properties for Disk Exclusion. 11015 DiskExclusionProperties *DiskExclusionProperties `json:"diskExclusionProperties,omitempty"` 11016} 11017 11018// BasicFeatureSupportRequest base class for feature request 11019type BasicFeatureSupportRequest interface { 11020 AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool) 11021 AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool) 11022 AsFeatureSupportRequest() (*FeatureSupportRequest, bool) 11023} 11024 11025// FeatureSupportRequest base class for feature request 11026type FeatureSupportRequest struct { 11027 // FeatureType - Possible values include: 'FeatureTypeFeatureSupportRequest', 'FeatureTypeAzureBackupGoals', 'FeatureTypeAzureVMResourceBackup' 11028 FeatureType FeatureType `json:"featureType,omitempty"` 11029} 11030 11031func unmarshalBasicFeatureSupportRequest(body []byte) (BasicFeatureSupportRequest, error) { 11032 var m map[string]interface{} 11033 err := json.Unmarshal(body, &m) 11034 if err != nil { 11035 return nil, err 11036 } 11037 11038 switch m["featureType"] { 11039 case string(FeatureTypeAzureBackupGoals): 11040 var abgfsr AzureBackupGoalFeatureSupportRequest 11041 err := json.Unmarshal(body, &abgfsr) 11042 return abgfsr, err 11043 case string(FeatureTypeAzureVMResourceBackup): 11044 var avrfsr AzureVMResourceFeatureSupportRequest 11045 err := json.Unmarshal(body, &avrfsr) 11046 return avrfsr, err 11047 default: 11048 var fsr FeatureSupportRequest 11049 err := json.Unmarshal(body, &fsr) 11050 return fsr, err 11051 } 11052} 11053func unmarshalBasicFeatureSupportRequestArray(body []byte) ([]BasicFeatureSupportRequest, error) { 11054 var rawMessages []*json.RawMessage 11055 err := json.Unmarshal(body, &rawMessages) 11056 if err != nil { 11057 return nil, err 11058 } 11059 11060 fsrArray := make([]BasicFeatureSupportRequest, len(rawMessages)) 11061 11062 for index, rawMessage := range rawMessages { 11063 fsr, err := unmarshalBasicFeatureSupportRequest(*rawMessage) 11064 if err != nil { 11065 return nil, err 11066 } 11067 fsrArray[index] = fsr 11068 } 11069 return fsrArray, nil 11070} 11071 11072// MarshalJSON is the custom marshaler for FeatureSupportRequest. 11073func (fsr FeatureSupportRequest) MarshalJSON() ([]byte, error) { 11074 fsr.FeatureType = FeatureTypeFeatureSupportRequest 11075 objectMap := make(map[string]interface{}) 11076 if fsr.FeatureType != "" { 11077 objectMap["featureType"] = fsr.FeatureType 11078 } 11079 return json.Marshal(objectMap) 11080} 11081 11082// AsAzureBackupGoalFeatureSupportRequest is the BasicFeatureSupportRequest implementation for FeatureSupportRequest. 11083func (fsr FeatureSupportRequest) AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool) { 11084 return nil, false 11085} 11086 11087// AsAzureVMResourceFeatureSupportRequest is the BasicFeatureSupportRequest implementation for FeatureSupportRequest. 11088func (fsr FeatureSupportRequest) AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool) { 11089 return nil, false 11090} 11091 11092// AsFeatureSupportRequest is the BasicFeatureSupportRequest implementation for FeatureSupportRequest. 11093func (fsr FeatureSupportRequest) AsFeatureSupportRequest() (*FeatureSupportRequest, bool) { 11094 return &fsr, true 11095} 11096 11097// AsBasicFeatureSupportRequest is the BasicFeatureSupportRequest implementation for FeatureSupportRequest. 11098func (fsr FeatureSupportRequest) AsBasicFeatureSupportRequest() (BasicFeatureSupportRequest, bool) { 11099 return &fsr, true 11100} 11101 11102// GenericContainer base class for generic container of backup items 11103type GenericContainer struct { 11104 // FabricName - Name of the container's fabric 11105 FabricName *string `json:"fabricName,omitempty"` 11106 // ExtendedInformation - Extended information (not returned in List container API calls) 11107 ExtendedInformation *GenericContainerExtendedInfo `json:"extendedInformation,omitempty"` 11108 // FriendlyName - Friendly name of the container. 11109 FriendlyName *string `json:"friendlyName,omitempty"` 11110 // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 11111 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 11112 // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. 11113 RegistrationStatus *string `json:"registrationStatus,omitempty"` 11114 // HealthStatus - Status of health of the container. 11115 HealthStatus *string `json:"healthStatus,omitempty"` 11116 // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' 11117 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` 11118} 11119 11120// MarshalJSON is the custom marshaler for GenericContainer. 11121func (gc GenericContainer) MarshalJSON() ([]byte, error) { 11122 gc.ContainerType = ContainerTypeGenericContainer1 11123 objectMap := make(map[string]interface{}) 11124 if gc.FabricName != nil { 11125 objectMap["fabricName"] = gc.FabricName 11126 } 11127 if gc.ExtendedInformation != nil { 11128 objectMap["extendedInformation"] = gc.ExtendedInformation 11129 } 11130 if gc.FriendlyName != nil { 11131 objectMap["friendlyName"] = gc.FriendlyName 11132 } 11133 if gc.BackupManagementType != "" { 11134 objectMap["backupManagementType"] = gc.BackupManagementType 11135 } 11136 if gc.RegistrationStatus != nil { 11137 objectMap["registrationStatus"] = gc.RegistrationStatus 11138 } 11139 if gc.HealthStatus != nil { 11140 objectMap["healthStatus"] = gc.HealthStatus 11141 } 11142 if gc.ContainerType != "" { 11143 objectMap["containerType"] = gc.ContainerType 11144 } 11145 return json.Marshal(objectMap) 11146} 11147 11148// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for GenericContainer. 11149func (gc GenericContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { 11150 return nil, false 11151} 11152 11153// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for GenericContainer. 11154func (gc GenericContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { 11155 return nil, false 11156} 11157 11158// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for GenericContainer. 11159func (gc GenericContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { 11160 return nil, false 11161} 11162 11163// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for GenericContainer. 11164func (gc GenericContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { 11165 return nil, false 11166} 11167 11168// AsAzureSQLContainer is the BasicProtectionContainer implementation for GenericContainer. 11169func (gc GenericContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { 11170 return nil, false 11171} 11172 11173// AsAzureStorageContainer is the BasicProtectionContainer implementation for GenericContainer. 11174func (gc GenericContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { 11175 return nil, false 11176} 11177 11178// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for GenericContainer. 11179func (gc GenericContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { 11180 return nil, false 11181} 11182 11183// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for GenericContainer. 11184func (gc GenericContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { 11185 return nil, false 11186} 11187 11188// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for GenericContainer. 11189func (gc GenericContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { 11190 return nil, false 11191} 11192 11193// AsDpmContainer is the BasicProtectionContainer implementation for GenericContainer. 11194func (gc GenericContainer) AsDpmContainer() (*DpmContainer, bool) { 11195 return nil, false 11196} 11197 11198// AsBasicDpmContainer is the BasicProtectionContainer implementation for GenericContainer. 11199func (gc GenericContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { 11200 return nil, false 11201} 11202 11203// AsGenericContainer is the BasicProtectionContainer implementation for GenericContainer. 11204func (gc GenericContainer) AsGenericContainer() (*GenericContainer, bool) { 11205 return &gc, true 11206} 11207 11208// AsIaaSVMContainer is the BasicProtectionContainer implementation for GenericContainer. 11209func (gc GenericContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { 11210 return nil, false 11211} 11212 11213// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for GenericContainer. 11214func (gc GenericContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { 11215 return nil, false 11216} 11217 11218// AsMabContainer is the BasicProtectionContainer implementation for GenericContainer. 11219func (gc GenericContainer) AsMabContainer() (*MabContainer, bool) { 11220 return nil, false 11221} 11222 11223// AsProtectionContainer is the BasicProtectionContainer implementation for GenericContainer. 11224func (gc GenericContainer) AsProtectionContainer() (*ProtectionContainer, bool) { 11225 return nil, false 11226} 11227 11228// AsBasicProtectionContainer is the BasicProtectionContainer implementation for GenericContainer. 11229func (gc GenericContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { 11230 return &gc, true 11231} 11232 11233// GenericContainerExtendedInfo container extended information 11234type GenericContainerExtendedInfo struct { 11235 // RawCertData - Public key of container cert 11236 RawCertData *string `json:"rawCertData,omitempty"` 11237 // ContainerIdentityInfo - Container identity information 11238 ContainerIdentityInfo *ContainerIdentityInfo `json:"containerIdentityInfo,omitempty"` 11239 // ServiceEndpoints - Azure Backup Service Endpoints for the container 11240 ServiceEndpoints map[string]*string `json:"serviceEndpoints"` 11241} 11242 11243// MarshalJSON is the custom marshaler for GenericContainerExtendedInfo. 11244func (gcei GenericContainerExtendedInfo) MarshalJSON() ([]byte, error) { 11245 objectMap := make(map[string]interface{}) 11246 if gcei.RawCertData != nil { 11247 objectMap["rawCertData"] = gcei.RawCertData 11248 } 11249 if gcei.ContainerIdentityInfo != nil { 11250 objectMap["containerIdentityInfo"] = gcei.ContainerIdentityInfo 11251 } 11252 if gcei.ServiceEndpoints != nil { 11253 objectMap["serviceEndpoints"] = gcei.ServiceEndpoints 11254 } 11255 return json.Marshal(objectMap) 11256} 11257 11258// GenericProtectedItem base class for backup items. 11259type GenericProtectedItem struct { 11260 // FriendlyName - Friendly name of the container. 11261 FriendlyName *string `json:"friendlyName,omitempty"` 11262 // PolicyState - Indicates consistency of policy object and policy applied to this backup item. 11263 PolicyState *string `json:"policyState,omitempty"` 11264 // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' 11265 ProtectionState ProtectionState `json:"protectionState,omitempty"` 11266 // ProtectedItemID - Data Plane Service ID of the protected item. 11267 ProtectedItemID *int64 `json:"protectedItemId,omitempty"` 11268 // SourceAssociations - Loosely coupled (type, value) associations (example - parent of a protected item) 11269 SourceAssociations map[string]*string `json:"sourceAssociations"` 11270 // FabricName - Name of this backup item's fabric. 11271 FabricName *string `json:"fabricName,omitempty"` 11272 // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 11273 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 11274 // 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' 11275 WorkloadType DataSourceType `json:"workloadType,omitempty"` 11276 // ContainerName - Unique name of container 11277 ContainerName *string `json:"containerName,omitempty"` 11278 // SourceResourceID - ARM ID of the resource to be backed up. 11279 SourceResourceID *string `json:"sourceResourceId,omitempty"` 11280 // PolicyID - ID of the backup policy with which this item is backed up. 11281 PolicyID *string `json:"policyId,omitempty"` 11282 // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. 11283 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` 11284 // BackupSetName - Name of the backup set the backup item belongs to 11285 BackupSetName *string `json:"backupSetName,omitempty"` 11286 // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' 11287 CreateMode CreateMode `json:"createMode,omitempty"` 11288 // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC 11289 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` 11290 // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete 11291 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` 11292 // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted 11293 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` 11294 // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon 11295 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` 11296 // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state 11297 IsRehydrate *bool `json:"isRehydrate,omitempty"` 11298 // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' 11299 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` 11300} 11301 11302// MarshalJSON is the custom marshaler for GenericProtectedItem. 11303func (gpi GenericProtectedItem) MarshalJSON() ([]byte, error) { 11304 gpi.ProtectedItemType = ProtectedItemTypeGenericProtectedItem 11305 objectMap := make(map[string]interface{}) 11306 if gpi.FriendlyName != nil { 11307 objectMap["friendlyName"] = gpi.FriendlyName 11308 } 11309 if gpi.PolicyState != nil { 11310 objectMap["policyState"] = gpi.PolicyState 11311 } 11312 if gpi.ProtectionState != "" { 11313 objectMap["protectionState"] = gpi.ProtectionState 11314 } 11315 if gpi.ProtectedItemID != nil { 11316 objectMap["protectedItemId"] = gpi.ProtectedItemID 11317 } 11318 if gpi.SourceAssociations != nil { 11319 objectMap["sourceAssociations"] = gpi.SourceAssociations 11320 } 11321 if gpi.FabricName != nil { 11322 objectMap["fabricName"] = gpi.FabricName 11323 } 11324 if gpi.BackupManagementType != "" { 11325 objectMap["backupManagementType"] = gpi.BackupManagementType 11326 } 11327 if gpi.WorkloadType != "" { 11328 objectMap["workloadType"] = gpi.WorkloadType 11329 } 11330 if gpi.ContainerName != nil { 11331 objectMap["containerName"] = gpi.ContainerName 11332 } 11333 if gpi.SourceResourceID != nil { 11334 objectMap["sourceResourceId"] = gpi.SourceResourceID 11335 } 11336 if gpi.PolicyID != nil { 11337 objectMap["policyId"] = gpi.PolicyID 11338 } 11339 if gpi.LastRecoveryPoint != nil { 11340 objectMap["lastRecoveryPoint"] = gpi.LastRecoveryPoint 11341 } 11342 if gpi.BackupSetName != nil { 11343 objectMap["backupSetName"] = gpi.BackupSetName 11344 } 11345 if gpi.CreateMode != "" { 11346 objectMap["createMode"] = gpi.CreateMode 11347 } 11348 if gpi.DeferredDeleteTimeInUTC != nil { 11349 objectMap["deferredDeleteTimeInUTC"] = gpi.DeferredDeleteTimeInUTC 11350 } 11351 if gpi.IsScheduledForDeferredDelete != nil { 11352 objectMap["isScheduledForDeferredDelete"] = gpi.IsScheduledForDeferredDelete 11353 } 11354 if gpi.DeferredDeleteTimeRemaining != nil { 11355 objectMap["deferredDeleteTimeRemaining"] = gpi.DeferredDeleteTimeRemaining 11356 } 11357 if gpi.IsDeferredDeleteScheduleUpcoming != nil { 11358 objectMap["isDeferredDeleteScheduleUpcoming"] = gpi.IsDeferredDeleteScheduleUpcoming 11359 } 11360 if gpi.IsRehydrate != nil { 11361 objectMap["isRehydrate"] = gpi.IsRehydrate 11362 } 11363 if gpi.ProtectedItemType != "" { 11364 objectMap["protectedItemType"] = gpi.ProtectedItemType 11365 } 11366 return json.Marshal(objectMap) 11367} 11368 11369// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11370func (gpi GenericProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { 11371 return nil, false 11372} 11373 11374// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11375func (gpi GenericProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { 11376 return nil, false 11377} 11378 11379// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11380func (gpi GenericProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { 11381 return nil, false 11382} 11383 11384// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11385func (gpi GenericProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { 11386 return nil, false 11387} 11388 11389// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11390func (gpi GenericProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { 11391 return nil, false 11392} 11393 11394// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11395func (gpi GenericProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { 11396 return nil, false 11397} 11398 11399// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11400func (gpi GenericProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { 11401 return nil, false 11402} 11403 11404// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11405func (gpi GenericProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { 11406 return nil, false 11407} 11408 11409// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11410func (gpi GenericProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { 11411 return nil, false 11412} 11413 11414// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11415func (gpi GenericProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { 11416 return nil, false 11417} 11418 11419// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11420func (gpi GenericProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { 11421 return nil, false 11422} 11423 11424// AsDPMProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11425func (gpi GenericProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { 11426 return nil, false 11427} 11428 11429// AsGenericProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11430func (gpi GenericProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { 11431 return &gpi, true 11432} 11433 11434// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11435func (gpi GenericProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { 11436 return nil, false 11437} 11438 11439// AsProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11440func (gpi GenericProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { 11441 return nil, false 11442} 11443 11444// AsBasicProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11445func (gpi GenericProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { 11446 return &gpi, true 11447} 11448 11449// GenericProtectionPolicy azure VM (Mercury) workload-specific backup policy. 11450type GenericProtectionPolicy struct { 11451 // SubProtectionPolicy - List of sub-protection policies which includes schedule and retention 11452 SubProtectionPolicy *[]SubProtectionPolicy `json:"subProtectionPolicy,omitempty"` 11453 // TimeZone - TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". 11454 TimeZone *string `json:"timeZone,omitempty"` 11455 // FabricName - Name of this policy's fabric. 11456 FabricName *string `json:"fabricName,omitempty"` 11457 // ProtectedItemsCount - Number of items associated with this policy. 11458 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` 11459 // BackupManagementType - Possible values include: 'BackupManagementTypeProtectionPolicy', 'BackupManagementTypeAzureWorkload', 'BackupManagementTypeAzureStorage', 'BackupManagementTypeAzureIaasVM', 'BackupManagementTypeAzureSQL', 'BackupManagementTypeGenericProtectionPolicy', 'BackupManagementTypeMAB' 11460 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"` 11461} 11462 11463// MarshalJSON is the custom marshaler for GenericProtectionPolicy. 11464func (gpp GenericProtectionPolicy) MarshalJSON() ([]byte, error) { 11465 gpp.BackupManagementType = BackupManagementTypeGenericProtectionPolicy 11466 objectMap := make(map[string]interface{}) 11467 if gpp.SubProtectionPolicy != nil { 11468 objectMap["subProtectionPolicy"] = gpp.SubProtectionPolicy 11469 } 11470 if gpp.TimeZone != nil { 11471 objectMap["timeZone"] = gpp.TimeZone 11472 } 11473 if gpp.FabricName != nil { 11474 objectMap["fabricName"] = gpp.FabricName 11475 } 11476 if gpp.ProtectedItemsCount != nil { 11477 objectMap["protectedItemsCount"] = gpp.ProtectedItemsCount 11478 } 11479 if gpp.BackupManagementType != "" { 11480 objectMap["backupManagementType"] = gpp.BackupManagementType 11481 } 11482 return json.Marshal(objectMap) 11483} 11484 11485// AsAzureVMWorkloadProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. 11486func (gpp GenericProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) { 11487 return nil, false 11488} 11489 11490// AsAzureFileShareProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. 11491func (gpp GenericProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) { 11492 return nil, false 11493} 11494 11495// AsAzureIaaSVMProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. 11496func (gpp GenericProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) { 11497 return nil, false 11498} 11499 11500// AsAzureSQLProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. 11501func (gpp GenericProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) { 11502 return nil, false 11503} 11504 11505// AsGenericProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. 11506func (gpp GenericProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) { 11507 return &gpp, true 11508} 11509 11510// AsMabProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. 11511func (gpp GenericProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) { 11512 return nil, false 11513} 11514 11515// AsProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. 11516func (gpp GenericProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) { 11517 return nil, false 11518} 11519 11520// AsBasicProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. 11521func (gpp GenericProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) { 11522 return &gpp, true 11523} 11524 11525// GenericRecoveryPoint generic backup copy. 11526type GenericRecoveryPoint struct { 11527 // FriendlyName - Friendly name of the backup copy. 11528 FriendlyName *string `json:"friendlyName,omitempty"` 11529 // RecoveryPointType - Type of the backup copy. 11530 RecoveryPointType *string `json:"recoveryPointType,omitempty"` 11531 // RecoveryPointTime - Time at which this backup copy was created. 11532 RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"` 11533 // RecoveryPointAdditionalInfo - Additional information associated with this backup copy. 11534 RecoveryPointAdditionalInfo *string `json:"recoveryPointAdditionalInfo,omitempty"` 11535 // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' 11536 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` 11537} 11538 11539// MarshalJSON is the custom marshaler for GenericRecoveryPoint. 11540func (grp GenericRecoveryPoint) MarshalJSON() ([]byte, error) { 11541 grp.ObjectType = ObjectTypeGenericRecoveryPoint 11542 objectMap := make(map[string]interface{}) 11543 if grp.FriendlyName != nil { 11544 objectMap["friendlyName"] = grp.FriendlyName 11545 } 11546 if grp.RecoveryPointType != nil { 11547 objectMap["recoveryPointType"] = grp.RecoveryPointType 11548 } 11549 if grp.RecoveryPointTime != nil { 11550 objectMap["recoveryPointTime"] = grp.RecoveryPointTime 11551 } 11552 if grp.RecoveryPointAdditionalInfo != nil { 11553 objectMap["recoveryPointAdditionalInfo"] = grp.RecoveryPointAdditionalInfo 11554 } 11555 if grp.ObjectType != "" { 11556 objectMap["objectType"] = grp.ObjectType 11557 } 11558 return json.Marshal(objectMap) 11559} 11560 11561// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. 11562func (grp GenericRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { 11563 return nil, false 11564} 11565 11566// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. 11567func (grp GenericRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { 11568 return nil, false 11569} 11570 11571// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. 11572func (grp GenericRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { 11573 return nil, false 11574} 11575 11576// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. 11577func (grp GenericRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { 11578 return nil, false 11579} 11580 11581// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. 11582func (grp GenericRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { 11583 return nil, false 11584} 11585 11586// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. 11587func (grp GenericRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { 11588 return nil, false 11589} 11590 11591// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. 11592func (grp GenericRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { 11593 return nil, false 11594} 11595 11596// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. 11597func (grp GenericRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { 11598 return nil, false 11599} 11600 11601// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. 11602func (grp GenericRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { 11603 return nil, false 11604} 11605 11606// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. 11607func (grp GenericRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { 11608 return nil, false 11609} 11610 11611// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. 11612func (grp GenericRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { 11613 return &grp, true 11614} 11615 11616// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. 11617func (grp GenericRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { 11618 return nil, false 11619} 11620 11621// AsRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. 11622func (grp GenericRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { 11623 return nil, false 11624} 11625 11626// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. 11627func (grp GenericRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { 11628 return &grp, true 11629} 11630 11631// GetProtectedItemQueryObject filters to list backup items. 11632type GetProtectedItemQueryObject struct { 11633 // Expand - Specifies if the additional information should be provided for this item. 11634 Expand *string `json:"expand,omitempty"` 11635} 11636 11637// IaasVMBackupRequest iaaS VM workload-specific backup request. 11638type IaasVMBackupRequest struct { 11639 // RecoveryPointExpiryTimeInUTC - Backup copy will expire after the time specified (UTC). 11640 RecoveryPointExpiryTimeInUTC *date.Time `json:"recoveryPointExpiryTimeInUTC,omitempty"` 11641 // ObjectType - Possible values include: 'ObjectTypeBackupRequest', 'ObjectTypeAzureFileShareBackupRequest', 'ObjectTypeAzureWorkloadBackupRequest', 'ObjectTypeIaasVMBackupRequest' 11642 ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"` 11643} 11644 11645// MarshalJSON is the custom marshaler for IaasVMBackupRequest. 11646func (ivbr IaasVMBackupRequest) MarshalJSON() ([]byte, error) { 11647 ivbr.ObjectType = ObjectTypeIaasVMBackupRequest 11648 objectMap := make(map[string]interface{}) 11649 if ivbr.RecoveryPointExpiryTimeInUTC != nil { 11650 objectMap["recoveryPointExpiryTimeInUTC"] = ivbr.RecoveryPointExpiryTimeInUTC 11651 } 11652 if ivbr.ObjectType != "" { 11653 objectMap["objectType"] = ivbr.ObjectType 11654 } 11655 return json.Marshal(objectMap) 11656} 11657 11658// AsAzureFileShareBackupRequest is the BasicRequest implementation for IaasVMBackupRequest. 11659func (ivbr IaasVMBackupRequest) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) { 11660 return nil, false 11661} 11662 11663// AsAzureWorkloadBackupRequest is the BasicRequest implementation for IaasVMBackupRequest. 11664func (ivbr IaasVMBackupRequest) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) { 11665 return nil, false 11666} 11667 11668// AsIaasVMBackupRequest is the BasicRequest implementation for IaasVMBackupRequest. 11669func (ivbr IaasVMBackupRequest) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) { 11670 return &ivbr, true 11671} 11672 11673// AsRequest is the BasicRequest implementation for IaasVMBackupRequest. 11674func (ivbr IaasVMBackupRequest) AsRequest() (*Request, bool) { 11675 return nil, false 11676} 11677 11678// AsBasicRequest is the BasicRequest implementation for IaasVMBackupRequest. 11679func (ivbr IaasVMBackupRequest) AsBasicRequest() (BasicRequest, bool) { 11680 return &ivbr, true 11681} 11682 11683// BasicIaaSVMContainer iaaS VM workload-specific container. 11684type BasicIaaSVMContainer interface { 11685 AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) 11686 AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) 11687 AsIaaSVMContainer() (*IaaSVMContainer, bool) 11688} 11689 11690// IaaSVMContainer iaaS VM workload-specific container. 11691type IaaSVMContainer struct { 11692 // VirtualMachineID - Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. 11693 VirtualMachineID *string `json:"virtualMachineId,omitempty"` 11694 // VirtualMachineVersion - Specifies whether the container represents a Classic or an Azure Resource Manager VM. 11695 VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` 11696 // ResourceGroup - Resource group name of Recovery Services Vault. 11697 ResourceGroup *string `json:"resourceGroup,omitempty"` 11698 // FriendlyName - Friendly name of the container. 11699 FriendlyName *string `json:"friendlyName,omitempty"` 11700 // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 11701 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 11702 // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. 11703 RegistrationStatus *string `json:"registrationStatus,omitempty"` 11704 // HealthStatus - Status of health of the container. 11705 HealthStatus *string `json:"healthStatus,omitempty"` 11706 // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' 11707 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` 11708} 11709 11710func unmarshalBasicIaaSVMContainer(body []byte) (BasicIaaSVMContainer, error) { 11711 var m map[string]interface{} 11712 err := json.Unmarshal(body, &m) 11713 if err != nil { 11714 return nil, err 11715 } 11716 11717 switch m["containerType"] { 11718 case string(ContainerTypeMicrosoftClassicComputevirtualMachines): 11719 var aisccvc AzureIaaSClassicComputeVMContainer 11720 err := json.Unmarshal(body, &aisccvc) 11721 return aisccvc, err 11722 case string(ContainerTypeMicrosoftComputevirtualMachines): 11723 var aiscvc AzureIaaSComputeVMContainer 11724 err := json.Unmarshal(body, &aiscvc) 11725 return aiscvc, err 11726 default: 11727 var isc IaaSVMContainer 11728 err := json.Unmarshal(body, &isc) 11729 return isc, err 11730 } 11731} 11732func unmarshalBasicIaaSVMContainerArray(body []byte) ([]BasicIaaSVMContainer, error) { 11733 var rawMessages []*json.RawMessage 11734 err := json.Unmarshal(body, &rawMessages) 11735 if err != nil { 11736 return nil, err 11737 } 11738 11739 iscArray := make([]BasicIaaSVMContainer, len(rawMessages)) 11740 11741 for index, rawMessage := range rawMessages { 11742 isc, err := unmarshalBasicIaaSVMContainer(*rawMessage) 11743 if err != nil { 11744 return nil, err 11745 } 11746 iscArray[index] = isc 11747 } 11748 return iscArray, nil 11749} 11750 11751// MarshalJSON is the custom marshaler for IaaSVMContainer. 11752func (isc IaaSVMContainer) MarshalJSON() ([]byte, error) { 11753 isc.ContainerType = ContainerTypeIaaSVMContainer 11754 objectMap := make(map[string]interface{}) 11755 if isc.VirtualMachineID != nil { 11756 objectMap["virtualMachineId"] = isc.VirtualMachineID 11757 } 11758 if isc.VirtualMachineVersion != nil { 11759 objectMap["virtualMachineVersion"] = isc.VirtualMachineVersion 11760 } 11761 if isc.ResourceGroup != nil { 11762 objectMap["resourceGroup"] = isc.ResourceGroup 11763 } 11764 if isc.FriendlyName != nil { 11765 objectMap["friendlyName"] = isc.FriendlyName 11766 } 11767 if isc.BackupManagementType != "" { 11768 objectMap["backupManagementType"] = isc.BackupManagementType 11769 } 11770 if isc.RegistrationStatus != nil { 11771 objectMap["registrationStatus"] = isc.RegistrationStatus 11772 } 11773 if isc.HealthStatus != nil { 11774 objectMap["healthStatus"] = isc.HealthStatus 11775 } 11776 if isc.ContainerType != "" { 11777 objectMap["containerType"] = isc.ContainerType 11778 } 11779 return json.Marshal(objectMap) 11780} 11781 11782// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11783func (isc IaaSVMContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { 11784 return nil, false 11785} 11786 11787// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11788func (isc IaaSVMContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { 11789 return nil, false 11790} 11791 11792// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11793func (isc IaaSVMContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { 11794 return nil, false 11795} 11796 11797// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11798func (isc IaaSVMContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { 11799 return nil, false 11800} 11801 11802// AsAzureSQLContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11803func (isc IaaSVMContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { 11804 return nil, false 11805} 11806 11807// AsAzureStorageContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11808func (isc IaaSVMContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { 11809 return nil, false 11810} 11811 11812// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11813func (isc IaaSVMContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { 11814 return nil, false 11815} 11816 11817// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11818func (isc IaaSVMContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { 11819 return nil, false 11820} 11821 11822// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11823func (isc IaaSVMContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { 11824 return nil, false 11825} 11826 11827// AsDpmContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11828func (isc IaaSVMContainer) AsDpmContainer() (*DpmContainer, bool) { 11829 return nil, false 11830} 11831 11832// AsBasicDpmContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11833func (isc IaaSVMContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { 11834 return nil, false 11835} 11836 11837// AsGenericContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11838func (isc IaaSVMContainer) AsGenericContainer() (*GenericContainer, bool) { 11839 return nil, false 11840} 11841 11842// AsIaaSVMContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11843func (isc IaaSVMContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { 11844 return &isc, true 11845} 11846 11847// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11848func (isc IaaSVMContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { 11849 return &isc, true 11850} 11851 11852// AsMabContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11853func (isc IaaSVMContainer) AsMabContainer() (*MabContainer, bool) { 11854 return nil, false 11855} 11856 11857// AsProtectionContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11858func (isc IaaSVMContainer) AsProtectionContainer() (*ProtectionContainer, bool) { 11859 return nil, false 11860} 11861 11862// AsBasicProtectionContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11863func (isc IaaSVMContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { 11864 return &isc, true 11865} 11866 11867// IaasVMILRRegistrationRequest restore files/folders from a backup copy of IaaS VM. 11868type IaasVMILRRegistrationRequest struct { 11869 // RecoveryPointID - ID of the IaaS VM backup copy from where the files/folders have to be restored. 11870 RecoveryPointID *string `json:"recoveryPointId,omitempty"` 11871 // VirtualMachineID - Fully qualified ARM ID of the virtual machine whose the files / folders have to be restored. 11872 VirtualMachineID *string `json:"virtualMachineId,omitempty"` 11873 // InitiatorName - iSCSI initiator name. 11874 InitiatorName *string `json:"initiatorName,omitempty"` 11875 // RenewExistingRegistration - Whether to renew existing registration with the iSCSI server. 11876 RenewExistingRegistration *bool `json:"renewExistingRegistration,omitempty"` 11877 // ObjectType - Possible values include: 'ObjectTypeILRRequest', 'ObjectTypeAzureFileShareProvisionILRRequest', 'ObjectTypeIaasVMILRRegistrationRequest' 11878 ObjectType ObjectTypeBasicILRRequest `json:"objectType,omitempty"` 11879} 11880 11881// MarshalJSON is the custom marshaler for IaasVMILRRegistrationRequest. 11882func (ivrr IaasVMILRRegistrationRequest) MarshalJSON() ([]byte, error) { 11883 ivrr.ObjectType = ObjectTypeIaasVMILRRegistrationRequest 11884 objectMap := make(map[string]interface{}) 11885 if ivrr.RecoveryPointID != nil { 11886 objectMap["recoveryPointId"] = ivrr.RecoveryPointID 11887 } 11888 if ivrr.VirtualMachineID != nil { 11889 objectMap["virtualMachineId"] = ivrr.VirtualMachineID 11890 } 11891 if ivrr.InitiatorName != nil { 11892 objectMap["initiatorName"] = ivrr.InitiatorName 11893 } 11894 if ivrr.RenewExistingRegistration != nil { 11895 objectMap["renewExistingRegistration"] = ivrr.RenewExistingRegistration 11896 } 11897 if ivrr.ObjectType != "" { 11898 objectMap["objectType"] = ivrr.ObjectType 11899 } 11900 return json.Marshal(objectMap) 11901} 11902 11903// AsAzureFileShareProvisionILRRequest is the BasicILRRequest implementation for IaasVMILRRegistrationRequest. 11904func (ivrr IaasVMILRRegistrationRequest) AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) { 11905 return nil, false 11906} 11907 11908// AsIaasVMILRRegistrationRequest is the BasicILRRequest implementation for IaasVMILRRegistrationRequest. 11909func (ivrr IaasVMILRRegistrationRequest) AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) { 11910 return &ivrr, true 11911} 11912 11913// AsILRRequest is the BasicILRRequest implementation for IaasVMILRRegistrationRequest. 11914func (ivrr IaasVMILRRegistrationRequest) AsILRRequest() (*ILRRequest, bool) { 11915 return nil, false 11916} 11917 11918// AsBasicILRRequest is the BasicILRRequest implementation for IaasVMILRRegistrationRequest. 11919func (ivrr IaasVMILRRegistrationRequest) AsBasicILRRequest() (BasicILRRequest, bool) { 11920 return &ivrr, true 11921} 11922 11923// BasicIaaSVMProtectableItem iaaS VM workload-specific backup item. 11924type BasicIaaSVMProtectableItem interface { 11925 AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) 11926 AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) 11927 AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) 11928} 11929 11930// IaaSVMProtectableItem iaaS VM workload-specific backup item. 11931type IaaSVMProtectableItem struct { 11932 // VirtualMachineID - Fully qualified ARM ID of the virtual machine. 11933 VirtualMachineID *string `json:"virtualMachineId,omitempty"` 11934 // BackupManagementType - Type of backup management to backup an item. 11935 BackupManagementType *string `json:"backupManagementType,omitempty"` 11936 // WorkloadType - Type of workload for the backup management 11937 WorkloadType *string `json:"workloadType,omitempty"` 11938 // FriendlyName - Friendly name of the backup item. 11939 FriendlyName *string `json:"friendlyName,omitempty"` 11940 // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 11941 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 11942 // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' 11943 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` 11944} 11945 11946func unmarshalBasicIaaSVMProtectableItem(body []byte) (BasicIaaSVMProtectableItem, error) { 11947 var m map[string]interface{} 11948 err := json.Unmarshal(body, &m) 11949 if err != nil { 11950 return nil, err 11951 } 11952 11953 switch m["protectableItemType"] { 11954 case string(ProtectableItemTypeMicrosoftClassicComputevirtualMachines): 11955 var aisccvpi AzureIaaSClassicComputeVMProtectableItem 11956 err := json.Unmarshal(body, &aisccvpi) 11957 return aisccvpi, err 11958 case string(ProtectableItemTypeMicrosoftComputevirtualMachines): 11959 var aiscvpi AzureIaaSComputeVMProtectableItem 11960 err := json.Unmarshal(body, &aiscvpi) 11961 return aiscvpi, err 11962 default: 11963 var ispi IaaSVMProtectableItem 11964 err := json.Unmarshal(body, &ispi) 11965 return ispi, err 11966 } 11967} 11968func unmarshalBasicIaaSVMProtectableItemArray(body []byte) ([]BasicIaaSVMProtectableItem, error) { 11969 var rawMessages []*json.RawMessage 11970 err := json.Unmarshal(body, &rawMessages) 11971 if err != nil { 11972 return nil, err 11973 } 11974 11975 ispiArray := make([]BasicIaaSVMProtectableItem, len(rawMessages)) 11976 11977 for index, rawMessage := range rawMessages { 11978 ispi, err := unmarshalBasicIaaSVMProtectableItem(*rawMessage) 11979 if err != nil { 11980 return nil, err 11981 } 11982 ispiArray[index] = ispi 11983 } 11984 return ispiArray, nil 11985} 11986 11987// MarshalJSON is the custom marshaler for IaaSVMProtectableItem. 11988func (ispi IaaSVMProtectableItem) MarshalJSON() ([]byte, error) { 11989 ispi.ProtectableItemType = ProtectableItemTypeIaaSVMProtectableItem 11990 objectMap := make(map[string]interface{}) 11991 if ispi.VirtualMachineID != nil { 11992 objectMap["virtualMachineId"] = ispi.VirtualMachineID 11993 } 11994 if ispi.BackupManagementType != nil { 11995 objectMap["backupManagementType"] = ispi.BackupManagementType 11996 } 11997 if ispi.WorkloadType != nil { 11998 objectMap["workloadType"] = ispi.WorkloadType 11999 } 12000 if ispi.FriendlyName != nil { 12001 objectMap["friendlyName"] = ispi.FriendlyName 12002 } 12003 if ispi.ProtectionState != "" { 12004 objectMap["protectionState"] = ispi.ProtectionState 12005 } 12006 if ispi.ProtectableItemType != "" { 12007 objectMap["protectableItemType"] = ispi.ProtectableItemType 12008 } 12009 return json.Marshal(objectMap) 12010} 12011 12012// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. 12013func (ispi IaaSVMProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { 12014 return nil, false 12015} 12016 12017// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. 12018func (ispi IaaSVMProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { 12019 return nil, false 12020} 12021 12022// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. 12023func (ispi IaaSVMProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { 12024 return nil, false 12025} 12026 12027// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. 12028func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { 12029 return nil, false 12030} 12031 12032// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. 12033func (ispi IaaSVMProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { 12034 return nil, false 12035} 12036 12037// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. 12038func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { 12039 return nil, false 12040} 12041 12042// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. 12043func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { 12044 return nil, false 12045} 12046 12047// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. 12048func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { 12049 return nil, false 12050} 12051 12052// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. 12053func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { 12054 return nil, false 12055} 12056 12057// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. 12058func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { 12059 return nil, false 12060} 12061 12062// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. 12063func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { 12064 return nil, false 12065} 12066 12067// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. 12068func (ispi IaaSVMProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { 12069 return &ispi, true 12070} 12071 12072// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. 12073func (ispi IaaSVMProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { 12074 return &ispi, true 12075} 12076 12077// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. 12078func (ispi IaaSVMProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { 12079 return nil, false 12080} 12081 12082// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. 12083func (ispi IaaSVMProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { 12084 return &ispi, true 12085} 12086 12087// IaasVMRecoveryPoint iaaS VM workload specific backup copy. 12088type IaasVMRecoveryPoint struct { 12089 // RecoveryPointType - READ-ONLY; Type of the backup copy. 12090 RecoveryPointType *string `json:"recoveryPointType,omitempty"` 12091 // RecoveryPointTime - READ-ONLY; Time at which this backup copy was created. 12092 RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"` 12093 // RecoveryPointAdditionalInfo - READ-ONLY; Additional information associated with this backup copy. 12094 RecoveryPointAdditionalInfo *string `json:"recoveryPointAdditionalInfo,omitempty"` 12095 // SourceVMStorageType - READ-ONLY; Storage type of the VM whose backup copy is created. 12096 SourceVMStorageType *string `json:"sourceVMStorageType,omitempty"` 12097 // IsSourceVMEncrypted - READ-ONLY; Identifies whether the VM was encrypted when the backup copy is created. 12098 IsSourceVMEncrypted *bool `json:"isSourceVMEncrypted,omitempty"` 12099 // KeyAndSecret - Required details for recovering an encrypted VM. Applicable only when IsSourceVMEncrypted is true. 12100 KeyAndSecret *KeyAndSecretDetails `json:"keyAndSecret,omitempty"` 12101 // IsInstantIlrSessionActive - Is the session to recover items from this backup copy still active. 12102 IsInstantIlrSessionActive *bool `json:"isInstantIlrSessionActive,omitempty"` 12103 // RecoveryPointTierDetails - Recovery point tier information. 12104 RecoveryPointTierDetails *[]RecoveryPointTierInformation `json:"recoveryPointTierDetails,omitempty"` 12105 // IsManagedVirtualMachine - Whether VM is with Managed Disks 12106 IsManagedVirtualMachine *bool `json:"isManagedVirtualMachine,omitempty"` 12107 // VirtualMachineSize - Virtual Machine Size 12108 VirtualMachineSize *string `json:"virtualMachineSize,omitempty"` 12109 // OriginalStorageAccountOption - Original Storage Account Option 12110 OriginalStorageAccountOption *bool `json:"originalStorageAccountOption,omitempty"` 12111 // OsType - OS type 12112 OsType *string `json:"osType,omitempty"` 12113 // RecoveryPointDiskConfiguration - Disk configuration 12114 RecoveryPointDiskConfiguration *RecoveryPointDiskConfiguration `json:"recoveryPointDiskConfiguration,omitempty"` 12115 // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' 12116 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` 12117} 12118 12119// MarshalJSON is the custom marshaler for IaasVMRecoveryPoint. 12120func (ivrp IaasVMRecoveryPoint) MarshalJSON() ([]byte, error) { 12121 ivrp.ObjectType = ObjectTypeIaasVMRecoveryPoint 12122 objectMap := make(map[string]interface{}) 12123 if ivrp.KeyAndSecret != nil { 12124 objectMap["keyAndSecret"] = ivrp.KeyAndSecret 12125 } 12126 if ivrp.IsInstantIlrSessionActive != nil { 12127 objectMap["isInstantIlrSessionActive"] = ivrp.IsInstantIlrSessionActive 12128 } 12129 if ivrp.RecoveryPointTierDetails != nil { 12130 objectMap["recoveryPointTierDetails"] = ivrp.RecoveryPointTierDetails 12131 } 12132 if ivrp.IsManagedVirtualMachine != nil { 12133 objectMap["isManagedVirtualMachine"] = ivrp.IsManagedVirtualMachine 12134 } 12135 if ivrp.VirtualMachineSize != nil { 12136 objectMap["virtualMachineSize"] = ivrp.VirtualMachineSize 12137 } 12138 if ivrp.OriginalStorageAccountOption != nil { 12139 objectMap["originalStorageAccountOption"] = ivrp.OriginalStorageAccountOption 12140 } 12141 if ivrp.OsType != nil { 12142 objectMap["osType"] = ivrp.OsType 12143 } 12144 if ivrp.RecoveryPointDiskConfiguration != nil { 12145 objectMap["recoveryPointDiskConfiguration"] = ivrp.RecoveryPointDiskConfiguration 12146 } 12147 if ivrp.ObjectType != "" { 12148 objectMap["objectType"] = ivrp.ObjectType 12149 } 12150 return json.Marshal(objectMap) 12151} 12152 12153// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. 12154func (ivrp IaasVMRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { 12155 return nil, false 12156} 12157 12158// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. 12159func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { 12160 return nil, false 12161} 12162 12163// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. 12164func (ivrp IaasVMRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { 12165 return nil, false 12166} 12167 12168// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. 12169func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { 12170 return nil, false 12171} 12172 12173// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. 12174func (ivrp IaasVMRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { 12175 return nil, false 12176} 12177 12178// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. 12179func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { 12180 return nil, false 12181} 12182 12183// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. 12184func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { 12185 return nil, false 12186} 12187 12188// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. 12189func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { 12190 return nil, false 12191} 12192 12193// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. 12194func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { 12195 return nil, false 12196} 12197 12198// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. 12199func (ivrp IaasVMRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { 12200 return nil, false 12201} 12202 12203// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. 12204func (ivrp IaasVMRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { 12205 return nil, false 12206} 12207 12208// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. 12209func (ivrp IaasVMRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { 12210 return &ivrp, true 12211} 12212 12213// AsRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. 12214func (ivrp IaasVMRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { 12215 return nil, false 12216} 12217 12218// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. 12219func (ivrp IaasVMRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { 12220 return &ivrp, true 12221} 12222 12223// IaasVMRestoreRequest iaaS VM workload-specific restore. 12224type IaasVMRestoreRequest struct { 12225 // RecoveryPointID - ID of the backup copy to be recovered. 12226 RecoveryPointID *string `json:"recoveryPointId,omitempty"` 12227 // RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline' 12228 RecoveryType RecoveryType `json:"recoveryType,omitempty"` 12229 // SourceResourceID - Fully qualified ARM ID of the VM which is being recovered. 12230 SourceResourceID *string `json:"sourceResourceId,omitempty"` 12231 // TargetVirtualMachineID - This is the complete ARM Id of the VM that will be created. 12232 // For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} 12233 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"` 12234 // TargetResourceGroupID - This is the ARM Id of the resource group that you want to create for this Virtual machine and other artifacts. 12235 // For e.g. /subscriptions/{subId}/resourcegroups/{rg} 12236 TargetResourceGroupID *string `json:"targetResourceGroupId,omitempty"` 12237 // StorageAccountID - Fully qualified ARM ID of the storage account to which the VM has to be restored. 12238 StorageAccountID *string `json:"storageAccountId,omitempty"` 12239 // VirtualNetworkID - This is the virtual network Id of the vnet that will be attached to the virtual machine. 12240 // User will be validated for join action permissions in the linked access. 12241 VirtualNetworkID *string `json:"virtualNetworkId,omitempty"` 12242 // SubnetID - Subnet ID, is the subnet ID associated with the to be restored VM. For Classic VMs it would be 12243 // {VnetID}/Subnet/{SubnetName} and, for the Azure Resource Manager VMs it would be ARM resource ID used to represent 12244 // the subnet. 12245 SubnetID *string `json:"subnetId,omitempty"` 12246 // TargetDomainNameID - Fully qualified ARM ID of the domain name to be associated to the VM being restored. This applies only to Classic 12247 // Virtual Machines. 12248 TargetDomainNameID *string `json:"targetDomainNameId,omitempty"` 12249 // Region - Region in which the virtual machine is restored. 12250 Region *string `json:"region,omitempty"` 12251 // AffinityGroup - Affinity group associated to VM to be restored. Used only for Classic Compute Virtual Machines. 12252 AffinityGroup *string `json:"affinityGroup,omitempty"` 12253 // CreateNewCloudService - Should a new cloud service be created while restoring the VM. If this is false, VM will be restored to the same 12254 // cloud service as it was at the time of backup. 12255 CreateNewCloudService *bool `json:"createNewCloudService,omitempty"` 12256 // OriginalStorageAccountOption - Original Storage Account Option 12257 OriginalStorageAccountOption *bool `json:"originalStorageAccountOption,omitempty"` 12258 // EncryptionDetails - Details needed if the VM was encrypted at the time of backup. 12259 EncryptionDetails *EncryptionDetails `json:"encryptionDetails,omitempty"` 12260 // RestoreDiskLunList - List of Disk LUNs for partial restore 12261 RestoreDiskLunList *[]int32 `json:"restoreDiskLunList,omitempty"` 12262 // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' 12263 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` 12264} 12265 12266// MarshalJSON is the custom marshaler for IaasVMRestoreRequest. 12267func (ivrr IaasVMRestoreRequest) MarshalJSON() ([]byte, error) { 12268 ivrr.ObjectType = ObjectTypeIaasVMRestoreRequest 12269 objectMap := make(map[string]interface{}) 12270 if ivrr.RecoveryPointID != nil { 12271 objectMap["recoveryPointId"] = ivrr.RecoveryPointID 12272 } 12273 if ivrr.RecoveryType != "" { 12274 objectMap["recoveryType"] = ivrr.RecoveryType 12275 } 12276 if ivrr.SourceResourceID != nil { 12277 objectMap["sourceResourceId"] = ivrr.SourceResourceID 12278 } 12279 if ivrr.TargetVirtualMachineID != nil { 12280 objectMap["targetVirtualMachineId"] = ivrr.TargetVirtualMachineID 12281 } 12282 if ivrr.TargetResourceGroupID != nil { 12283 objectMap["targetResourceGroupId"] = ivrr.TargetResourceGroupID 12284 } 12285 if ivrr.StorageAccountID != nil { 12286 objectMap["storageAccountId"] = ivrr.StorageAccountID 12287 } 12288 if ivrr.VirtualNetworkID != nil { 12289 objectMap["virtualNetworkId"] = ivrr.VirtualNetworkID 12290 } 12291 if ivrr.SubnetID != nil { 12292 objectMap["subnetId"] = ivrr.SubnetID 12293 } 12294 if ivrr.TargetDomainNameID != nil { 12295 objectMap["targetDomainNameId"] = ivrr.TargetDomainNameID 12296 } 12297 if ivrr.Region != nil { 12298 objectMap["region"] = ivrr.Region 12299 } 12300 if ivrr.AffinityGroup != nil { 12301 objectMap["affinityGroup"] = ivrr.AffinityGroup 12302 } 12303 if ivrr.CreateNewCloudService != nil { 12304 objectMap["createNewCloudService"] = ivrr.CreateNewCloudService 12305 } 12306 if ivrr.OriginalStorageAccountOption != nil { 12307 objectMap["originalStorageAccountOption"] = ivrr.OriginalStorageAccountOption 12308 } 12309 if ivrr.EncryptionDetails != nil { 12310 objectMap["encryptionDetails"] = ivrr.EncryptionDetails 12311 } 12312 if ivrr.RestoreDiskLunList != nil { 12313 objectMap["restoreDiskLunList"] = ivrr.RestoreDiskLunList 12314 } 12315 if ivrr.ObjectType != "" { 12316 objectMap["objectType"] = ivrr.ObjectType 12317 } 12318 return json.Marshal(objectMap) 12319} 12320 12321// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. 12322func (ivrr IaasVMRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { 12323 return nil, false 12324} 12325 12326// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. 12327func (ivrr IaasVMRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { 12328 return nil, false 12329} 12330 12331// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. 12332func (ivrr IaasVMRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { 12333 return nil, false 12334} 12335 12336// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. 12337func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { 12338 return nil, false 12339} 12340 12341// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. 12342func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { 12343 return nil, false 12344} 12345 12346// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. 12347func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { 12348 return nil, false 12349} 12350 12351// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. 12352func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { 12353 return nil, false 12354} 12355 12356// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. 12357func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { 12358 return nil, false 12359} 12360 12361// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. 12362func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { 12363 return nil, false 12364} 12365 12366// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. 12367func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { 12368 return nil, false 12369} 12370 12371// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. 12372func (ivrr IaasVMRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { 12373 return &ivrr, true 12374} 12375 12376// AsRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. 12377func (ivrr IaasVMRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { 12378 return nil, false 12379} 12380 12381// AsBasicRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. 12382func (ivrr IaasVMRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { 12383 return &ivrr, true 12384} 12385 12386// BasicILRRequest parameters to Provision ILR API. 12387type BasicILRRequest interface { 12388 AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) 12389 AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) 12390 AsILRRequest() (*ILRRequest, bool) 12391} 12392 12393// ILRRequest parameters to Provision ILR API. 12394type ILRRequest struct { 12395 // ObjectType - Possible values include: 'ObjectTypeILRRequest', 'ObjectTypeAzureFileShareProvisionILRRequest', 'ObjectTypeIaasVMILRRegistrationRequest' 12396 ObjectType ObjectTypeBasicILRRequest `json:"objectType,omitempty"` 12397} 12398 12399func unmarshalBasicILRRequest(body []byte) (BasicILRRequest, error) { 12400 var m map[string]interface{} 12401 err := json.Unmarshal(body, &m) 12402 if err != nil { 12403 return nil, err 12404 } 12405 12406 switch m["objectType"] { 12407 case string(ObjectTypeAzureFileShareProvisionILRRequest): 12408 var afspir AzureFileShareProvisionILRRequest 12409 err := json.Unmarshal(body, &afspir) 12410 return afspir, err 12411 case string(ObjectTypeIaasVMILRRegistrationRequest): 12412 var ivrr IaasVMILRRegistrationRequest 12413 err := json.Unmarshal(body, &ivrr) 12414 return ivrr, err 12415 default: 12416 var ir ILRRequest 12417 err := json.Unmarshal(body, &ir) 12418 return ir, err 12419 } 12420} 12421func unmarshalBasicILRRequestArray(body []byte) ([]BasicILRRequest, error) { 12422 var rawMessages []*json.RawMessage 12423 err := json.Unmarshal(body, &rawMessages) 12424 if err != nil { 12425 return nil, err 12426 } 12427 12428 irArray := make([]BasicILRRequest, len(rawMessages)) 12429 12430 for index, rawMessage := range rawMessages { 12431 ir, err := unmarshalBasicILRRequest(*rawMessage) 12432 if err != nil { 12433 return nil, err 12434 } 12435 irArray[index] = ir 12436 } 12437 return irArray, nil 12438} 12439 12440// MarshalJSON is the custom marshaler for ILRRequest. 12441func (ir ILRRequest) MarshalJSON() ([]byte, error) { 12442 ir.ObjectType = ObjectTypeILRRequest 12443 objectMap := make(map[string]interface{}) 12444 if ir.ObjectType != "" { 12445 objectMap["objectType"] = ir.ObjectType 12446 } 12447 return json.Marshal(objectMap) 12448} 12449 12450// AsAzureFileShareProvisionILRRequest is the BasicILRRequest implementation for ILRRequest. 12451func (ir ILRRequest) AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) { 12452 return nil, false 12453} 12454 12455// AsIaasVMILRRegistrationRequest is the BasicILRRequest implementation for ILRRequest. 12456func (ir ILRRequest) AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) { 12457 return nil, false 12458} 12459 12460// AsILRRequest is the BasicILRRequest implementation for ILRRequest. 12461func (ir ILRRequest) AsILRRequest() (*ILRRequest, bool) { 12462 return &ir, true 12463} 12464 12465// AsBasicILRRequest is the BasicILRRequest implementation for ILRRequest. 12466func (ir ILRRequest) AsBasicILRRequest() (BasicILRRequest, bool) { 12467 return &ir, true 12468} 12469 12470// ILRRequestResource parameters to Provision ILR API. 12471type ILRRequestResource struct { 12472 // Properties - ILRRequestResource properties 12473 Properties BasicILRRequest `json:"properties,omitempty"` 12474 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 12475 ID *string `json:"id,omitempty"` 12476 // Name - READ-ONLY; Resource name associated with the resource. 12477 Name *string `json:"name,omitempty"` 12478 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 12479 Type *string `json:"type,omitempty"` 12480 // Location - Resource location. 12481 Location *string `json:"location,omitempty"` 12482 // Tags - Resource tags. 12483 Tags map[string]*string `json:"tags"` 12484 // ETag - Optional ETag. 12485 ETag *string `json:"eTag,omitempty"` 12486} 12487 12488// MarshalJSON is the custom marshaler for ILRRequestResource. 12489func (irr ILRRequestResource) MarshalJSON() ([]byte, error) { 12490 objectMap := make(map[string]interface{}) 12491 objectMap["properties"] = irr.Properties 12492 if irr.Location != nil { 12493 objectMap["location"] = irr.Location 12494 } 12495 if irr.Tags != nil { 12496 objectMap["tags"] = irr.Tags 12497 } 12498 if irr.ETag != nil { 12499 objectMap["eTag"] = irr.ETag 12500 } 12501 return json.Marshal(objectMap) 12502} 12503 12504// UnmarshalJSON is the custom unmarshaler for ILRRequestResource struct. 12505func (irr *ILRRequestResource) UnmarshalJSON(body []byte) error { 12506 var m map[string]*json.RawMessage 12507 err := json.Unmarshal(body, &m) 12508 if err != nil { 12509 return err 12510 } 12511 for k, v := range m { 12512 switch k { 12513 case "properties": 12514 if v != nil { 12515 properties, err := unmarshalBasicILRRequest(*v) 12516 if err != nil { 12517 return err 12518 } 12519 irr.Properties = properties 12520 } 12521 case "id": 12522 if v != nil { 12523 var ID string 12524 err = json.Unmarshal(*v, &ID) 12525 if err != nil { 12526 return err 12527 } 12528 irr.ID = &ID 12529 } 12530 case "name": 12531 if v != nil { 12532 var name string 12533 err = json.Unmarshal(*v, &name) 12534 if err != nil { 12535 return err 12536 } 12537 irr.Name = &name 12538 } 12539 case "type": 12540 if v != nil { 12541 var typeVar string 12542 err = json.Unmarshal(*v, &typeVar) 12543 if err != nil { 12544 return err 12545 } 12546 irr.Type = &typeVar 12547 } 12548 case "location": 12549 if v != nil { 12550 var location string 12551 err = json.Unmarshal(*v, &location) 12552 if err != nil { 12553 return err 12554 } 12555 irr.Location = &location 12556 } 12557 case "tags": 12558 if v != nil { 12559 var tags map[string]*string 12560 err = json.Unmarshal(*v, &tags) 12561 if err != nil { 12562 return err 12563 } 12564 irr.Tags = tags 12565 } 12566 case "eTag": 12567 if v != nil { 12568 var eTag string 12569 err = json.Unmarshal(*v, &eTag) 12570 if err != nil { 12571 return err 12572 } 12573 irr.ETag = &eTag 12574 } 12575 } 12576 } 12577 12578 return nil 12579} 12580 12581// InquiryInfo details about inquired protectable items under a given container. 12582type InquiryInfo struct { 12583 // Status - Inquiry Status for this container such as 12584 // InProgress | Failed | Succeeded 12585 Status *string `json:"status,omitempty"` 12586 // ErrorDetail - Error Details if the Status is non-success. 12587 ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"` 12588 // InquiryDetails - Inquiry Details which will have workload specific details. 12589 // For e.g. - For SQL and oracle this will contain different details. 12590 InquiryDetails *[]WorkloadInquiryDetails `json:"inquiryDetails,omitempty"` 12591} 12592 12593// InquiryValidation validation for inquired protectable items under a given container. 12594type InquiryValidation struct { 12595 // Status - Status for the Inquiry Validation. 12596 Status *string `json:"status,omitempty"` 12597 // ErrorDetail - Error Detail in case the status is non-success. 12598 ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"` 12599 // AdditionalDetail - READ-ONLY; Error Additional Detail in case the status is non-success. 12600 AdditionalDetail *string `json:"additionalDetail,omitempty"` 12601} 12602 12603// MarshalJSON is the custom marshaler for InquiryValidation. 12604func (iv InquiryValidation) MarshalJSON() ([]byte, error) { 12605 objectMap := make(map[string]interface{}) 12606 if iv.Status != nil { 12607 objectMap["status"] = iv.Status 12608 } 12609 if iv.ErrorDetail != nil { 12610 objectMap["errorDetail"] = iv.ErrorDetail 12611 } 12612 return json.Marshal(objectMap) 12613} 12614 12615// InstantItemRecoveryTarget target details for file / folder restore. 12616type InstantItemRecoveryTarget struct { 12617 // ClientScripts - List of client scripts. 12618 ClientScripts *[]ClientScriptForConnect `json:"clientScripts,omitempty"` 12619} 12620 12621// InstantRPAdditionalDetails ... 12622type InstantRPAdditionalDetails struct { 12623 AzureBackupRGNamePrefix *string `json:"azureBackupRGNamePrefix,omitempty"` 12624 AzureBackupRGNameSuffix *string `json:"azureBackupRGNameSuffix,omitempty"` 12625} 12626 12627// BasicJob defines workload agnostic properties for a job. 12628type BasicJob interface { 12629 AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) 12630 AsAzureStorageJob() (*AzureStorageJob, bool) 12631 AsAzureWorkloadJob() (*AzureWorkloadJob, bool) 12632 AsDpmJob() (*DpmJob, bool) 12633 AsMabJob() (*MabJob, bool) 12634 AsJob() (*Job, bool) 12635} 12636 12637// Job defines workload agnostic properties for a job. 12638type Job struct { 12639 // EntityFriendlyName - Friendly name of the entity on which the current job is executing. 12640 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` 12641 // BackupManagementType - Backup management type to execute the current job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 12642 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 12643 // Operation - The operation name. 12644 Operation *string `json:"operation,omitempty"` 12645 // Status - Job status. 12646 Status *string `json:"status,omitempty"` 12647 // StartTime - The start time. 12648 StartTime *date.Time `json:"startTime,omitempty"` 12649 // EndTime - The end time. 12650 EndTime *date.Time `json:"endTime,omitempty"` 12651 // ActivityID - ActivityId of job. 12652 ActivityID *string `json:"activityId,omitempty"` 12653 // JobType - Possible values include: 'JobTypeJob', 'JobTypeAzureIaaSVMJob', 'JobTypeAzureStorageJob', 'JobTypeAzureWorkloadJob', 'JobTypeDpmJob', 'JobTypeMabJob' 12654 JobType JobType `json:"jobType,omitempty"` 12655} 12656 12657func unmarshalBasicJob(body []byte) (BasicJob, error) { 12658 var m map[string]interface{} 12659 err := json.Unmarshal(body, &m) 12660 if err != nil { 12661 return nil, err 12662 } 12663 12664 switch m["jobType"] { 12665 case string(JobTypeAzureIaaSVMJob): 12666 var aisj AzureIaaSVMJob 12667 err := json.Unmarshal(body, &aisj) 12668 return aisj, err 12669 case string(JobTypeAzureStorageJob): 12670 var asj AzureStorageJob 12671 err := json.Unmarshal(body, &asj) 12672 return asj, err 12673 case string(JobTypeAzureWorkloadJob): 12674 var awj AzureWorkloadJob 12675 err := json.Unmarshal(body, &awj) 12676 return awj, err 12677 case string(JobTypeDpmJob): 12678 var dj DpmJob 12679 err := json.Unmarshal(body, &dj) 12680 return dj, err 12681 case string(JobTypeMabJob): 12682 var mj MabJob 12683 err := json.Unmarshal(body, &mj) 12684 return mj, err 12685 default: 12686 var j Job 12687 err := json.Unmarshal(body, &j) 12688 return j, err 12689 } 12690} 12691func unmarshalBasicJobArray(body []byte) ([]BasicJob, error) { 12692 var rawMessages []*json.RawMessage 12693 err := json.Unmarshal(body, &rawMessages) 12694 if err != nil { 12695 return nil, err 12696 } 12697 12698 jArray := make([]BasicJob, len(rawMessages)) 12699 12700 for index, rawMessage := range rawMessages { 12701 j, err := unmarshalBasicJob(*rawMessage) 12702 if err != nil { 12703 return nil, err 12704 } 12705 jArray[index] = j 12706 } 12707 return jArray, nil 12708} 12709 12710// MarshalJSON is the custom marshaler for Job. 12711func (j Job) MarshalJSON() ([]byte, error) { 12712 j.JobType = JobTypeJob 12713 objectMap := make(map[string]interface{}) 12714 if j.EntityFriendlyName != nil { 12715 objectMap["entityFriendlyName"] = j.EntityFriendlyName 12716 } 12717 if j.BackupManagementType != "" { 12718 objectMap["backupManagementType"] = j.BackupManagementType 12719 } 12720 if j.Operation != nil { 12721 objectMap["operation"] = j.Operation 12722 } 12723 if j.Status != nil { 12724 objectMap["status"] = j.Status 12725 } 12726 if j.StartTime != nil { 12727 objectMap["startTime"] = j.StartTime 12728 } 12729 if j.EndTime != nil { 12730 objectMap["endTime"] = j.EndTime 12731 } 12732 if j.ActivityID != nil { 12733 objectMap["activityId"] = j.ActivityID 12734 } 12735 if j.JobType != "" { 12736 objectMap["jobType"] = j.JobType 12737 } 12738 return json.Marshal(objectMap) 12739} 12740 12741// AsAzureIaaSVMJob is the BasicJob implementation for Job. 12742func (j Job) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) { 12743 return nil, false 12744} 12745 12746// AsAzureStorageJob is the BasicJob implementation for Job. 12747func (j Job) AsAzureStorageJob() (*AzureStorageJob, bool) { 12748 return nil, false 12749} 12750 12751// AsAzureWorkloadJob is the BasicJob implementation for Job. 12752func (j Job) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) { 12753 return nil, false 12754} 12755 12756// AsDpmJob is the BasicJob implementation for Job. 12757func (j Job) AsDpmJob() (*DpmJob, bool) { 12758 return nil, false 12759} 12760 12761// AsMabJob is the BasicJob implementation for Job. 12762func (j Job) AsMabJob() (*MabJob, bool) { 12763 return nil, false 12764} 12765 12766// AsJob is the BasicJob implementation for Job. 12767func (j Job) AsJob() (*Job, bool) { 12768 return &j, true 12769} 12770 12771// AsBasicJob is the BasicJob implementation for Job. 12772func (j Job) AsBasicJob() (BasicJob, bool) { 12773 return &j, true 12774} 12775 12776// JobQueryObject filters to list the jobs. 12777type JobQueryObject struct { 12778 // Status - Status of the job. Possible values include: 'JobStatusInvalid', 'JobStatusInProgress', 'JobStatusCompleted', 'JobStatusFailed', 'JobStatusCompletedWithWarnings', 'JobStatusCancelled', 'JobStatusCancelling' 12779 Status JobStatus `json:"status,omitempty"` 12780 // BackupManagementType - Type of backup management for the job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 12781 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 12782 // Operation - Type of operation. Possible values include: 'JobOperationTypeInvalid', 'JobOperationTypeRegister', 'JobOperationTypeUnRegister', 'JobOperationTypeConfigureBackup', 'JobOperationTypeBackup', 'JobOperationTypeRestore', 'JobOperationTypeDisableBackup', 'JobOperationTypeDeleteBackupData', 'JobOperationTypeCrossRegionRestore', 'JobOperationTypeUndelete' 12783 Operation JobOperationType `json:"operation,omitempty"` 12784 // JobID - JobID represents the job uniquely. 12785 JobID *string `json:"jobId,omitempty"` 12786 // StartTime - Job has started at this time. Value is in UTC. 12787 StartTime *date.Time `json:"startTime,omitempty"` 12788 // EndTime - Job has ended at this time. Value is in UTC. 12789 EndTime *date.Time `json:"endTime,omitempty"` 12790} 12791 12792// JobResource defines workload agnostic properties for a job. 12793type JobResource struct { 12794 autorest.Response `json:"-"` 12795 // Properties - JobResource properties 12796 Properties BasicJob `json:"properties,omitempty"` 12797 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 12798 ID *string `json:"id,omitempty"` 12799 // Name - READ-ONLY; Resource name associated with the resource. 12800 Name *string `json:"name,omitempty"` 12801 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 12802 Type *string `json:"type,omitempty"` 12803 // Location - Resource location. 12804 Location *string `json:"location,omitempty"` 12805 // Tags - Resource tags. 12806 Tags map[string]*string `json:"tags"` 12807 // ETag - Optional ETag. 12808 ETag *string `json:"eTag,omitempty"` 12809} 12810 12811// MarshalJSON is the custom marshaler for JobResource. 12812func (jr JobResource) MarshalJSON() ([]byte, error) { 12813 objectMap := make(map[string]interface{}) 12814 objectMap["properties"] = jr.Properties 12815 if jr.Location != nil { 12816 objectMap["location"] = jr.Location 12817 } 12818 if jr.Tags != nil { 12819 objectMap["tags"] = jr.Tags 12820 } 12821 if jr.ETag != nil { 12822 objectMap["eTag"] = jr.ETag 12823 } 12824 return json.Marshal(objectMap) 12825} 12826 12827// UnmarshalJSON is the custom unmarshaler for JobResource struct. 12828func (jr *JobResource) UnmarshalJSON(body []byte) error { 12829 var m map[string]*json.RawMessage 12830 err := json.Unmarshal(body, &m) 12831 if err != nil { 12832 return err 12833 } 12834 for k, v := range m { 12835 switch k { 12836 case "properties": 12837 if v != nil { 12838 properties, err := unmarshalBasicJob(*v) 12839 if err != nil { 12840 return err 12841 } 12842 jr.Properties = properties 12843 } 12844 case "id": 12845 if v != nil { 12846 var ID string 12847 err = json.Unmarshal(*v, &ID) 12848 if err != nil { 12849 return err 12850 } 12851 jr.ID = &ID 12852 } 12853 case "name": 12854 if v != nil { 12855 var name string 12856 err = json.Unmarshal(*v, &name) 12857 if err != nil { 12858 return err 12859 } 12860 jr.Name = &name 12861 } 12862 case "type": 12863 if v != nil { 12864 var typeVar string 12865 err = json.Unmarshal(*v, &typeVar) 12866 if err != nil { 12867 return err 12868 } 12869 jr.Type = &typeVar 12870 } 12871 case "location": 12872 if v != nil { 12873 var location string 12874 err = json.Unmarshal(*v, &location) 12875 if err != nil { 12876 return err 12877 } 12878 jr.Location = &location 12879 } 12880 case "tags": 12881 if v != nil { 12882 var tags map[string]*string 12883 err = json.Unmarshal(*v, &tags) 12884 if err != nil { 12885 return err 12886 } 12887 jr.Tags = tags 12888 } 12889 case "eTag": 12890 if v != nil { 12891 var eTag string 12892 err = json.Unmarshal(*v, &eTag) 12893 if err != nil { 12894 return err 12895 } 12896 jr.ETag = &eTag 12897 } 12898 } 12899 } 12900 12901 return nil 12902} 12903 12904// JobResourceList list of Job resources 12905type JobResourceList struct { 12906 autorest.Response `json:"-"` 12907 // Value - List of resources. 12908 Value *[]JobResource `json:"value,omitempty"` 12909 // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. 12910 NextLink *string `json:"nextLink,omitempty"` 12911} 12912 12913// JobResourceListIterator provides access to a complete listing of JobResource values. 12914type JobResourceListIterator struct { 12915 i int 12916 page JobResourceListPage 12917} 12918 12919// NextWithContext advances to the next value. If there was an error making 12920// the request the iterator does not advance and the error is returned. 12921func (iter *JobResourceListIterator) NextWithContext(ctx context.Context) (err error) { 12922 if tracing.IsEnabled() { 12923 ctx = tracing.StartSpan(ctx, fqdn+"/JobResourceListIterator.NextWithContext") 12924 defer func() { 12925 sc := -1 12926 if iter.Response().Response.Response != nil { 12927 sc = iter.Response().Response.Response.StatusCode 12928 } 12929 tracing.EndSpan(ctx, sc, err) 12930 }() 12931 } 12932 iter.i++ 12933 if iter.i < len(iter.page.Values()) { 12934 return nil 12935 } 12936 err = iter.page.NextWithContext(ctx) 12937 if err != nil { 12938 iter.i-- 12939 return err 12940 } 12941 iter.i = 0 12942 return nil 12943} 12944 12945// Next advances to the next value. If there was an error making 12946// the request the iterator does not advance and the error is returned. 12947// Deprecated: Use NextWithContext() instead. 12948func (iter *JobResourceListIterator) Next() error { 12949 return iter.NextWithContext(context.Background()) 12950} 12951 12952// NotDone returns true if the enumeration should be started or is not yet complete. 12953func (iter JobResourceListIterator) NotDone() bool { 12954 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 12955} 12956 12957// Response returns the raw server response from the last page request. 12958func (iter JobResourceListIterator) Response() JobResourceList { 12959 return iter.page.Response() 12960} 12961 12962// Value returns the current value or a zero-initialized value if the 12963// iterator has advanced beyond the end of the collection. 12964func (iter JobResourceListIterator) Value() JobResource { 12965 if !iter.page.NotDone() { 12966 return JobResource{} 12967 } 12968 return iter.page.Values()[iter.i] 12969} 12970 12971// Creates a new instance of the JobResourceListIterator type. 12972func NewJobResourceListIterator(page JobResourceListPage) JobResourceListIterator { 12973 return JobResourceListIterator{page: page} 12974} 12975 12976// IsEmpty returns true if the ListResult contains no values. 12977func (jrl JobResourceList) IsEmpty() bool { 12978 return jrl.Value == nil || len(*jrl.Value) == 0 12979} 12980 12981// hasNextLink returns true if the NextLink is not empty. 12982func (jrl JobResourceList) hasNextLink() bool { 12983 return jrl.NextLink != nil && len(*jrl.NextLink) != 0 12984} 12985 12986// jobResourceListPreparer prepares a request to retrieve the next set of results. 12987// It returns nil if no more results exist. 12988func (jrl JobResourceList) jobResourceListPreparer(ctx context.Context) (*http.Request, error) { 12989 if !jrl.hasNextLink() { 12990 return nil, nil 12991 } 12992 return autorest.Prepare((&http.Request{}).WithContext(ctx), 12993 autorest.AsJSON(), 12994 autorest.AsGet(), 12995 autorest.WithBaseURL(to.String(jrl.NextLink))) 12996} 12997 12998// JobResourceListPage contains a page of JobResource values. 12999type JobResourceListPage struct { 13000 fn func(context.Context, JobResourceList) (JobResourceList, error) 13001 jrl JobResourceList 13002} 13003 13004// NextWithContext advances to the next page of values. If there was an error making 13005// the request the page does not advance and the error is returned. 13006func (page *JobResourceListPage) NextWithContext(ctx context.Context) (err error) { 13007 if tracing.IsEnabled() { 13008 ctx = tracing.StartSpan(ctx, fqdn+"/JobResourceListPage.NextWithContext") 13009 defer func() { 13010 sc := -1 13011 if page.Response().Response.Response != nil { 13012 sc = page.Response().Response.Response.StatusCode 13013 } 13014 tracing.EndSpan(ctx, sc, err) 13015 }() 13016 } 13017 for { 13018 next, err := page.fn(ctx, page.jrl) 13019 if err != nil { 13020 return err 13021 } 13022 page.jrl = next 13023 if !next.hasNextLink() || !next.IsEmpty() { 13024 break 13025 } 13026 } 13027 return nil 13028} 13029 13030// Next advances to the next page of values. If there was an error making 13031// the request the page does not advance and the error is returned. 13032// Deprecated: Use NextWithContext() instead. 13033func (page *JobResourceListPage) Next() error { 13034 return page.NextWithContext(context.Background()) 13035} 13036 13037// NotDone returns true if the page enumeration should be started or is not yet complete. 13038func (page JobResourceListPage) NotDone() bool { 13039 return !page.jrl.IsEmpty() 13040} 13041 13042// Response returns the raw server response from the last page request. 13043func (page JobResourceListPage) Response() JobResourceList { 13044 return page.jrl 13045} 13046 13047// Values returns the slice of values for the current page or nil if there are no values. 13048func (page JobResourceListPage) Values() []JobResource { 13049 if page.jrl.IsEmpty() { 13050 return nil 13051 } 13052 return *page.jrl.Value 13053} 13054 13055// Creates a new instance of the JobResourceListPage type. 13056func NewJobResourceListPage(cur JobResourceList, getNextPage func(context.Context, JobResourceList) (JobResourceList, error)) JobResourceListPage { 13057 return JobResourceListPage{ 13058 fn: getNextPage, 13059 jrl: cur, 13060 } 13061} 13062 13063// KEKDetails KEK is encryption key for BEK. 13064type KEKDetails struct { 13065 // KeyURL - Key is KEK. 13066 KeyURL *string `json:"keyUrl,omitempty"` 13067 // KeyVaultID - Key Vault ID where this Key is stored. 13068 KeyVaultID *string `json:"keyVaultId,omitempty"` 13069 // KeyBackupData - KEK data. 13070 KeyBackupData *string `json:"keyBackupData,omitempty"` 13071} 13072 13073// KeyAndSecretDetails BEK is bitlocker key. 13074// KEK is encryption key for BEK 13075// If the VM was encrypted then we will store following details : 13076// 1. Secret(BEK) - Url + Backup Data + vaultId. 13077// 2. Key(KEK) - Url + Backup Data + vaultId. 13078// 3. EncryptionMechanism 13079// BEK and KEK can potentially have different vault ids. 13080type KeyAndSecretDetails struct { 13081 // KekDetails - KEK is encryption key for BEK. 13082 KekDetails *KEKDetails `json:"kekDetails,omitempty"` 13083 // BekDetails - BEK is bitlocker encryption key. 13084 BekDetails *BEKDetails `json:"bekDetails,omitempty"` 13085 // EncryptionMechanism - Encryption mechanism: None/ SinglePass/ DoublePass 13086 EncryptionMechanism *string `json:"encryptionMechanism,omitempty"` 13087} 13088 13089// KPIResourceHealthDetails KPI Resource Health Details 13090type KPIResourceHealthDetails struct { 13091 // ResourceHealthStatus - Resource Health Status. Possible values include: 'ResourceHealthStatusHealthy', 'ResourceHealthStatusTransientDegraded', 'ResourceHealthStatusPersistentDegraded', 'ResourceHealthStatusTransientUnhealthy', 'ResourceHealthStatusPersistentUnhealthy', 'ResourceHealthStatusInvalid' 13092 ResourceHealthStatus ResourceHealthStatus `json:"resourceHealthStatus,omitempty"` 13093 // ResourceHealthDetails - Resource Health Status 13094 ResourceHealthDetails *[]ResourceHealthDetails `json:"resourceHealthDetails,omitempty"` 13095} 13096 13097// LogSchedulePolicy log policy schedule. 13098type LogSchedulePolicy struct { 13099 // ScheduleFrequencyInMins - Frequency of the log schedule operation of this policy in minutes. 13100 ScheduleFrequencyInMins *int32 `json:"scheduleFrequencyInMins,omitempty"` 13101 // SchedulePolicyType - Possible values include: 'SchedulePolicyTypeSchedulePolicy', 'SchedulePolicyTypeLogSchedulePolicy', 'SchedulePolicyTypeLongTermSchedulePolicy', 'SchedulePolicyTypeSimpleSchedulePolicy' 13102 SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"` 13103} 13104 13105// MarshalJSON is the custom marshaler for LogSchedulePolicy. 13106func (lsp LogSchedulePolicy) MarshalJSON() ([]byte, error) { 13107 lsp.SchedulePolicyType = SchedulePolicyTypeLogSchedulePolicy 13108 objectMap := make(map[string]interface{}) 13109 if lsp.ScheduleFrequencyInMins != nil { 13110 objectMap["scheduleFrequencyInMins"] = lsp.ScheduleFrequencyInMins 13111 } 13112 if lsp.SchedulePolicyType != "" { 13113 objectMap["schedulePolicyType"] = lsp.SchedulePolicyType 13114 } 13115 return json.Marshal(objectMap) 13116} 13117 13118// AsLogSchedulePolicy is the BasicSchedulePolicy implementation for LogSchedulePolicy. 13119func (lsp LogSchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) { 13120 return &lsp, true 13121} 13122 13123// AsLongTermSchedulePolicy is the BasicSchedulePolicy implementation for LogSchedulePolicy. 13124func (lsp LogSchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) { 13125 return nil, false 13126} 13127 13128// AsSimpleSchedulePolicy is the BasicSchedulePolicy implementation for LogSchedulePolicy. 13129func (lsp LogSchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) { 13130 return nil, false 13131} 13132 13133// AsSchedulePolicy is the BasicSchedulePolicy implementation for LogSchedulePolicy. 13134func (lsp LogSchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) { 13135 return nil, false 13136} 13137 13138// AsBasicSchedulePolicy is the BasicSchedulePolicy implementation for LogSchedulePolicy. 13139func (lsp LogSchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) { 13140 return &lsp, true 13141} 13142 13143// LongTermRetentionPolicy long term retention policy. 13144type LongTermRetentionPolicy struct { 13145 // DailySchedule - Daily retention schedule of the protection policy. 13146 DailySchedule *DailyRetentionSchedule `json:"dailySchedule,omitempty"` 13147 // WeeklySchedule - Weekly retention schedule of the protection policy. 13148 WeeklySchedule *WeeklyRetentionSchedule `json:"weeklySchedule,omitempty"` 13149 // MonthlySchedule - Monthly retention schedule of the protection policy. 13150 MonthlySchedule *MonthlyRetentionSchedule `json:"monthlySchedule,omitempty"` 13151 // YearlySchedule - Yearly retention schedule of the protection policy. 13152 YearlySchedule *YearlyRetentionSchedule `json:"yearlySchedule,omitempty"` 13153 // RetentionPolicyType - Possible values include: 'RetentionPolicyTypeRetentionPolicy', 'RetentionPolicyTypeLongTermRetentionPolicy', 'RetentionPolicyTypeSimpleRetentionPolicy' 13154 RetentionPolicyType RetentionPolicyType `json:"retentionPolicyType,omitempty"` 13155} 13156 13157// MarshalJSON is the custom marshaler for LongTermRetentionPolicy. 13158func (ltrp LongTermRetentionPolicy) MarshalJSON() ([]byte, error) { 13159 ltrp.RetentionPolicyType = RetentionPolicyTypeLongTermRetentionPolicy 13160 objectMap := make(map[string]interface{}) 13161 if ltrp.DailySchedule != nil { 13162 objectMap["dailySchedule"] = ltrp.DailySchedule 13163 } 13164 if ltrp.WeeklySchedule != nil { 13165 objectMap["weeklySchedule"] = ltrp.WeeklySchedule 13166 } 13167 if ltrp.MonthlySchedule != nil { 13168 objectMap["monthlySchedule"] = ltrp.MonthlySchedule 13169 } 13170 if ltrp.YearlySchedule != nil { 13171 objectMap["yearlySchedule"] = ltrp.YearlySchedule 13172 } 13173 if ltrp.RetentionPolicyType != "" { 13174 objectMap["retentionPolicyType"] = ltrp.RetentionPolicyType 13175 } 13176 return json.Marshal(objectMap) 13177} 13178 13179// AsLongTermRetentionPolicy is the BasicRetentionPolicy implementation for LongTermRetentionPolicy. 13180func (ltrp LongTermRetentionPolicy) AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) { 13181 return <rp, true 13182} 13183 13184// AsSimpleRetentionPolicy is the BasicRetentionPolicy implementation for LongTermRetentionPolicy. 13185func (ltrp LongTermRetentionPolicy) AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) { 13186 return nil, false 13187} 13188 13189// AsRetentionPolicy is the BasicRetentionPolicy implementation for LongTermRetentionPolicy. 13190func (ltrp LongTermRetentionPolicy) AsRetentionPolicy() (*RetentionPolicy, bool) { 13191 return nil, false 13192} 13193 13194// AsBasicRetentionPolicy is the BasicRetentionPolicy implementation for LongTermRetentionPolicy. 13195func (ltrp LongTermRetentionPolicy) AsBasicRetentionPolicy() (BasicRetentionPolicy, bool) { 13196 return <rp, true 13197} 13198 13199// LongTermSchedulePolicy long term policy schedule. 13200type LongTermSchedulePolicy struct { 13201 // SchedulePolicyType - Possible values include: 'SchedulePolicyTypeSchedulePolicy', 'SchedulePolicyTypeLogSchedulePolicy', 'SchedulePolicyTypeLongTermSchedulePolicy', 'SchedulePolicyTypeSimpleSchedulePolicy' 13202 SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"` 13203} 13204 13205// MarshalJSON is the custom marshaler for LongTermSchedulePolicy. 13206func (ltsp LongTermSchedulePolicy) MarshalJSON() ([]byte, error) { 13207 ltsp.SchedulePolicyType = SchedulePolicyTypeLongTermSchedulePolicy 13208 objectMap := make(map[string]interface{}) 13209 if ltsp.SchedulePolicyType != "" { 13210 objectMap["schedulePolicyType"] = ltsp.SchedulePolicyType 13211 } 13212 return json.Marshal(objectMap) 13213} 13214 13215// AsLogSchedulePolicy is the BasicSchedulePolicy implementation for LongTermSchedulePolicy. 13216func (ltsp LongTermSchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) { 13217 return nil, false 13218} 13219 13220// AsLongTermSchedulePolicy is the BasicSchedulePolicy implementation for LongTermSchedulePolicy. 13221func (ltsp LongTermSchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) { 13222 return <sp, true 13223} 13224 13225// AsSimpleSchedulePolicy is the BasicSchedulePolicy implementation for LongTermSchedulePolicy. 13226func (ltsp LongTermSchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) { 13227 return nil, false 13228} 13229 13230// AsSchedulePolicy is the BasicSchedulePolicy implementation for LongTermSchedulePolicy. 13231func (ltsp LongTermSchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) { 13232 return nil, false 13233} 13234 13235// AsBasicSchedulePolicy is the BasicSchedulePolicy implementation for LongTermSchedulePolicy. 13236func (ltsp LongTermSchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) { 13237 return <sp, true 13238} 13239 13240// MabContainer container with items backed up using MAB backup engine. 13241type MabContainer struct { 13242 // CanReRegister - Can the container be registered one more time. 13243 CanReRegister *bool `json:"canReRegister,omitempty"` 13244 // ContainerID - ContainerID represents the container. 13245 ContainerID *int64 `json:"containerId,omitempty"` 13246 // ProtectedItemCount - Number of items backed up in this container. 13247 ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` 13248 // AgentVersion - Agent version of this container. 13249 AgentVersion *string `json:"agentVersion,omitempty"` 13250 // ExtendedInfo - Additional information for this container 13251 ExtendedInfo *MabContainerExtendedInfo `json:"extendedInfo,omitempty"` 13252 // MabContainerHealthDetails - Health details on this mab container. 13253 MabContainerHealthDetails *[]MABContainerHealthDetails `json:"mabContainerHealthDetails,omitempty"` 13254 // ContainerHealthState - Health state of mab container. 13255 ContainerHealthState *string `json:"containerHealthState,omitempty"` 13256 // FriendlyName - Friendly name of the container. 13257 FriendlyName *string `json:"friendlyName,omitempty"` 13258 // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 13259 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 13260 // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. 13261 RegistrationStatus *string `json:"registrationStatus,omitempty"` 13262 // HealthStatus - Status of health of the container. 13263 HealthStatus *string `json:"healthStatus,omitempty"` 13264 // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' 13265 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` 13266} 13267 13268// MarshalJSON is the custom marshaler for MabContainer. 13269func (mc MabContainer) MarshalJSON() ([]byte, error) { 13270 mc.ContainerType = ContainerTypeWindows1 13271 objectMap := make(map[string]interface{}) 13272 if mc.CanReRegister != nil { 13273 objectMap["canReRegister"] = mc.CanReRegister 13274 } 13275 if mc.ContainerID != nil { 13276 objectMap["containerId"] = mc.ContainerID 13277 } 13278 if mc.ProtectedItemCount != nil { 13279 objectMap["protectedItemCount"] = mc.ProtectedItemCount 13280 } 13281 if mc.AgentVersion != nil { 13282 objectMap["agentVersion"] = mc.AgentVersion 13283 } 13284 if mc.ExtendedInfo != nil { 13285 objectMap["extendedInfo"] = mc.ExtendedInfo 13286 } 13287 if mc.MabContainerHealthDetails != nil { 13288 objectMap["mabContainerHealthDetails"] = mc.MabContainerHealthDetails 13289 } 13290 if mc.ContainerHealthState != nil { 13291 objectMap["containerHealthState"] = mc.ContainerHealthState 13292 } 13293 if mc.FriendlyName != nil { 13294 objectMap["friendlyName"] = mc.FriendlyName 13295 } 13296 if mc.BackupManagementType != "" { 13297 objectMap["backupManagementType"] = mc.BackupManagementType 13298 } 13299 if mc.RegistrationStatus != nil { 13300 objectMap["registrationStatus"] = mc.RegistrationStatus 13301 } 13302 if mc.HealthStatus != nil { 13303 objectMap["healthStatus"] = mc.HealthStatus 13304 } 13305 if mc.ContainerType != "" { 13306 objectMap["containerType"] = mc.ContainerType 13307 } 13308 return json.Marshal(objectMap) 13309} 13310 13311// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for MabContainer. 13312func (mc MabContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { 13313 return nil, false 13314} 13315 13316// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for MabContainer. 13317func (mc MabContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { 13318 return nil, false 13319} 13320 13321// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for MabContainer. 13322func (mc MabContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { 13323 return nil, false 13324} 13325 13326// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for MabContainer. 13327func (mc MabContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { 13328 return nil, false 13329} 13330 13331// AsAzureSQLContainer is the BasicProtectionContainer implementation for MabContainer. 13332func (mc MabContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { 13333 return nil, false 13334} 13335 13336// AsAzureStorageContainer is the BasicProtectionContainer implementation for MabContainer. 13337func (mc MabContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { 13338 return nil, false 13339} 13340 13341// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for MabContainer. 13342func (mc MabContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { 13343 return nil, false 13344} 13345 13346// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for MabContainer. 13347func (mc MabContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { 13348 return nil, false 13349} 13350 13351// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for MabContainer. 13352func (mc MabContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { 13353 return nil, false 13354} 13355 13356// AsDpmContainer is the BasicProtectionContainer implementation for MabContainer. 13357func (mc MabContainer) AsDpmContainer() (*DpmContainer, bool) { 13358 return nil, false 13359} 13360 13361// AsBasicDpmContainer is the BasicProtectionContainer implementation for MabContainer. 13362func (mc MabContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { 13363 return nil, false 13364} 13365 13366// AsGenericContainer is the BasicProtectionContainer implementation for MabContainer. 13367func (mc MabContainer) AsGenericContainer() (*GenericContainer, bool) { 13368 return nil, false 13369} 13370 13371// AsIaaSVMContainer is the BasicProtectionContainer implementation for MabContainer. 13372func (mc MabContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { 13373 return nil, false 13374} 13375 13376// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for MabContainer. 13377func (mc MabContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { 13378 return nil, false 13379} 13380 13381// AsMabContainer is the BasicProtectionContainer implementation for MabContainer. 13382func (mc MabContainer) AsMabContainer() (*MabContainer, bool) { 13383 return &mc, true 13384} 13385 13386// AsProtectionContainer is the BasicProtectionContainer implementation for MabContainer. 13387func (mc MabContainer) AsProtectionContainer() (*ProtectionContainer, bool) { 13388 return nil, false 13389} 13390 13391// AsBasicProtectionContainer is the BasicProtectionContainer implementation for MabContainer. 13392func (mc MabContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { 13393 return &mc, true 13394} 13395 13396// MabContainerExtendedInfo additional information of the container. 13397type MabContainerExtendedInfo struct { 13398 // LastRefreshedAt - Time stamp when this container was refreshed. 13399 LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"` 13400 // 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' 13401 BackupItemType ItemType `json:"backupItemType,omitempty"` 13402 // BackupItems - List of backup items associated with this container. 13403 BackupItems *[]string `json:"backupItems,omitempty"` 13404 // PolicyName - Backup policy associated with this container. 13405 PolicyName *string `json:"policyName,omitempty"` 13406 // LastBackupStatus - Latest backup status of this container. 13407 LastBackupStatus *string `json:"lastBackupStatus,omitempty"` 13408} 13409 13410// MABContainerHealthDetails MAB workload-specific Health Details. 13411type MABContainerHealthDetails struct { 13412 // Code - Health Code 13413 Code *int32 `json:"code,omitempty"` 13414 // Title - Health Title 13415 Title *string `json:"title,omitempty"` 13416 // Message - Health Message 13417 Message *string `json:"message,omitempty"` 13418 // Recommendations - Health Recommended Actions 13419 Recommendations *[]string `json:"recommendations,omitempty"` 13420} 13421 13422// MabErrorInfo MAB workload-specific error information. 13423type MabErrorInfo struct { 13424 // ErrorString - READ-ONLY; Localized error string. 13425 ErrorString *string `json:"errorString,omitempty"` 13426 // Recommendations - READ-ONLY; List of localized recommendations. 13427 Recommendations *[]string `json:"recommendations,omitempty"` 13428} 13429 13430// MarshalJSON is the custom marshaler for MabErrorInfo. 13431func (mei MabErrorInfo) MarshalJSON() ([]byte, error) { 13432 objectMap := make(map[string]interface{}) 13433 return json.Marshal(objectMap) 13434} 13435 13436// MabFileFolderProtectedItem MAB workload-specific backup item. 13437type MabFileFolderProtectedItem struct { 13438 // FriendlyName - Friendly name of this backup item. 13439 FriendlyName *string `json:"friendlyName,omitempty"` 13440 // ComputerName - Name of the computer associated with this backup item. 13441 ComputerName *string `json:"computerName,omitempty"` 13442 // LastBackupStatus - Status of last backup operation. 13443 LastBackupStatus *string `json:"lastBackupStatus,omitempty"` 13444 // LastBackupTime - Timestamp of the last backup operation on this backup item. 13445 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` 13446 // ProtectionState - Protected, ProtectionStopped, IRPending or ProtectionError 13447 ProtectionState *string `json:"protectionState,omitempty"` 13448 // DeferredDeleteSyncTimeInUTC - Sync time for deferred deletion in UTC 13449 DeferredDeleteSyncTimeInUTC *int64 `json:"deferredDeleteSyncTimeInUTC,omitempty"` 13450 // ExtendedInfo - Additional information with this backup item. 13451 ExtendedInfo *MabFileFolderProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` 13452 // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 13453 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 13454 // 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' 13455 WorkloadType DataSourceType `json:"workloadType,omitempty"` 13456 // ContainerName - Unique name of container 13457 ContainerName *string `json:"containerName,omitempty"` 13458 // SourceResourceID - ARM ID of the resource to be backed up. 13459 SourceResourceID *string `json:"sourceResourceId,omitempty"` 13460 // PolicyID - ID of the backup policy with which this item is backed up. 13461 PolicyID *string `json:"policyId,omitempty"` 13462 // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. 13463 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` 13464 // BackupSetName - Name of the backup set the backup item belongs to 13465 BackupSetName *string `json:"backupSetName,omitempty"` 13466 // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' 13467 CreateMode CreateMode `json:"createMode,omitempty"` 13468 // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC 13469 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` 13470 // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete 13471 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` 13472 // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted 13473 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` 13474 // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon 13475 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` 13476 // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state 13477 IsRehydrate *bool `json:"isRehydrate,omitempty"` 13478 // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' 13479 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` 13480} 13481 13482// MarshalJSON is the custom marshaler for MabFileFolderProtectedItem. 13483func (mffpi MabFileFolderProtectedItem) MarshalJSON() ([]byte, error) { 13484 mffpi.ProtectedItemType = ProtectedItemTypeMabFileFolderProtectedItem 13485 objectMap := make(map[string]interface{}) 13486 if mffpi.FriendlyName != nil { 13487 objectMap["friendlyName"] = mffpi.FriendlyName 13488 } 13489 if mffpi.ComputerName != nil { 13490 objectMap["computerName"] = mffpi.ComputerName 13491 } 13492 if mffpi.LastBackupStatus != nil { 13493 objectMap["lastBackupStatus"] = mffpi.LastBackupStatus 13494 } 13495 if mffpi.LastBackupTime != nil { 13496 objectMap["lastBackupTime"] = mffpi.LastBackupTime 13497 } 13498 if mffpi.ProtectionState != nil { 13499 objectMap["protectionState"] = mffpi.ProtectionState 13500 } 13501 if mffpi.DeferredDeleteSyncTimeInUTC != nil { 13502 objectMap["deferredDeleteSyncTimeInUTC"] = mffpi.DeferredDeleteSyncTimeInUTC 13503 } 13504 if mffpi.ExtendedInfo != nil { 13505 objectMap["extendedInfo"] = mffpi.ExtendedInfo 13506 } 13507 if mffpi.BackupManagementType != "" { 13508 objectMap["backupManagementType"] = mffpi.BackupManagementType 13509 } 13510 if mffpi.WorkloadType != "" { 13511 objectMap["workloadType"] = mffpi.WorkloadType 13512 } 13513 if mffpi.ContainerName != nil { 13514 objectMap["containerName"] = mffpi.ContainerName 13515 } 13516 if mffpi.SourceResourceID != nil { 13517 objectMap["sourceResourceId"] = mffpi.SourceResourceID 13518 } 13519 if mffpi.PolicyID != nil { 13520 objectMap["policyId"] = mffpi.PolicyID 13521 } 13522 if mffpi.LastRecoveryPoint != nil { 13523 objectMap["lastRecoveryPoint"] = mffpi.LastRecoveryPoint 13524 } 13525 if mffpi.BackupSetName != nil { 13526 objectMap["backupSetName"] = mffpi.BackupSetName 13527 } 13528 if mffpi.CreateMode != "" { 13529 objectMap["createMode"] = mffpi.CreateMode 13530 } 13531 if mffpi.DeferredDeleteTimeInUTC != nil { 13532 objectMap["deferredDeleteTimeInUTC"] = mffpi.DeferredDeleteTimeInUTC 13533 } 13534 if mffpi.IsScheduledForDeferredDelete != nil { 13535 objectMap["isScheduledForDeferredDelete"] = mffpi.IsScheduledForDeferredDelete 13536 } 13537 if mffpi.DeferredDeleteTimeRemaining != nil { 13538 objectMap["deferredDeleteTimeRemaining"] = mffpi.DeferredDeleteTimeRemaining 13539 } 13540 if mffpi.IsDeferredDeleteScheduleUpcoming != nil { 13541 objectMap["isDeferredDeleteScheduleUpcoming"] = mffpi.IsDeferredDeleteScheduleUpcoming 13542 } 13543 if mffpi.IsRehydrate != nil { 13544 objectMap["isRehydrate"] = mffpi.IsRehydrate 13545 } 13546 if mffpi.ProtectedItemType != "" { 13547 objectMap["protectedItemType"] = mffpi.ProtectedItemType 13548 } 13549 return json.Marshal(objectMap) 13550} 13551 13552// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13553func (mffpi MabFileFolderProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { 13554 return nil, false 13555} 13556 13557// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13558func (mffpi MabFileFolderProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { 13559 return nil, false 13560} 13561 13562// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13563func (mffpi MabFileFolderProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { 13564 return nil, false 13565} 13566 13567// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13568func (mffpi MabFileFolderProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { 13569 return nil, false 13570} 13571 13572// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13573func (mffpi MabFileFolderProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { 13574 return nil, false 13575} 13576 13577// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13578func (mffpi MabFileFolderProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { 13579 return nil, false 13580} 13581 13582// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13583func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { 13584 return nil, false 13585} 13586 13587// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13588func (mffpi MabFileFolderProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { 13589 return nil, false 13590} 13591 13592// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13593func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { 13594 return nil, false 13595} 13596 13597// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13598func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { 13599 return nil, false 13600} 13601 13602// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13603func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { 13604 return nil, false 13605} 13606 13607// AsDPMProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13608func (mffpi MabFileFolderProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { 13609 return nil, false 13610} 13611 13612// AsGenericProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13613func (mffpi MabFileFolderProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { 13614 return nil, false 13615} 13616 13617// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13618func (mffpi MabFileFolderProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { 13619 return &mffpi, true 13620} 13621 13622// AsProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13623func (mffpi MabFileFolderProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { 13624 return nil, false 13625} 13626 13627// AsBasicProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13628func (mffpi MabFileFolderProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { 13629 return &mffpi, true 13630} 13631 13632// MabFileFolderProtectedItemExtendedInfo additional information on the backed up item. 13633type MabFileFolderProtectedItemExtendedInfo struct { 13634 // LastRefreshedAt - Last time when the agent data synced to service. 13635 LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"` 13636 // OldestRecoveryPoint - The oldest backup copy available. 13637 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"` 13638 // RecoveryPointCount - Number of backup copies associated with the backup item. 13639 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"` 13640} 13641 13642// MabJob MAB workload-specific job. 13643type MabJob struct { 13644 // Duration - Time taken by job to run. 13645 Duration *string `json:"duration,omitempty"` 13646 // ActionsInfo - The state/actions applicable on jobs like cancel/retry. 13647 ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"` 13648 // MabServerName - Name of server protecting the DS. 13649 MabServerName *string `json:"mabServerName,omitempty"` 13650 // MabServerType - Server type of MAB container. Possible values include: 'MabServerTypeInvalid', 'MabServerTypeUnknown', 'MabServerTypeIaasVMContainer', 'MabServerTypeIaasVMServiceContainer', 'MabServerTypeDPMContainer', 'MabServerTypeAzureBackupServerContainer', 'MabServerTypeMABContainer', 'MabServerTypeCluster', 'MabServerTypeAzureSQLContainer', 'MabServerTypeWindows', 'MabServerTypeVCenter', 'MabServerTypeVMAppContainer', 'MabServerTypeSQLAGWorkLoadContainer', 'MabServerTypeStorageContainer', 'MabServerTypeGenericContainer' 13651 MabServerType MabServerType `json:"mabServerType,omitempty"` 13652 // WorkloadType - Workload type of backup item. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' 13653 WorkloadType WorkloadType `json:"workloadType,omitempty"` 13654 // ErrorDetails - The errors. 13655 ErrorDetails *[]MabErrorInfo `json:"errorDetails,omitempty"` 13656 // ExtendedInfo - Additional information on the job. 13657 ExtendedInfo *MabJobExtendedInfo `json:"extendedInfo,omitempty"` 13658 // EntityFriendlyName - Friendly name of the entity on which the current job is executing. 13659 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` 13660 // BackupManagementType - Backup management type to execute the current job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 13661 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 13662 // Operation - The operation name. 13663 Operation *string `json:"operation,omitempty"` 13664 // Status - Job status. 13665 Status *string `json:"status,omitempty"` 13666 // StartTime - The start time. 13667 StartTime *date.Time `json:"startTime,omitempty"` 13668 // EndTime - The end time. 13669 EndTime *date.Time `json:"endTime,omitempty"` 13670 // ActivityID - ActivityId of job. 13671 ActivityID *string `json:"activityId,omitempty"` 13672 // JobType - Possible values include: 'JobTypeJob', 'JobTypeAzureIaaSVMJob', 'JobTypeAzureStorageJob', 'JobTypeAzureWorkloadJob', 'JobTypeDpmJob', 'JobTypeMabJob' 13673 JobType JobType `json:"jobType,omitempty"` 13674} 13675 13676// MarshalJSON is the custom marshaler for MabJob. 13677func (mj MabJob) MarshalJSON() ([]byte, error) { 13678 mj.JobType = JobTypeMabJob 13679 objectMap := make(map[string]interface{}) 13680 if mj.Duration != nil { 13681 objectMap["duration"] = mj.Duration 13682 } 13683 if mj.ActionsInfo != nil { 13684 objectMap["actionsInfo"] = mj.ActionsInfo 13685 } 13686 if mj.MabServerName != nil { 13687 objectMap["mabServerName"] = mj.MabServerName 13688 } 13689 if mj.MabServerType != "" { 13690 objectMap["mabServerType"] = mj.MabServerType 13691 } 13692 if mj.WorkloadType != "" { 13693 objectMap["workloadType"] = mj.WorkloadType 13694 } 13695 if mj.ErrorDetails != nil { 13696 objectMap["errorDetails"] = mj.ErrorDetails 13697 } 13698 if mj.ExtendedInfo != nil { 13699 objectMap["extendedInfo"] = mj.ExtendedInfo 13700 } 13701 if mj.EntityFriendlyName != nil { 13702 objectMap["entityFriendlyName"] = mj.EntityFriendlyName 13703 } 13704 if mj.BackupManagementType != "" { 13705 objectMap["backupManagementType"] = mj.BackupManagementType 13706 } 13707 if mj.Operation != nil { 13708 objectMap["operation"] = mj.Operation 13709 } 13710 if mj.Status != nil { 13711 objectMap["status"] = mj.Status 13712 } 13713 if mj.StartTime != nil { 13714 objectMap["startTime"] = mj.StartTime 13715 } 13716 if mj.EndTime != nil { 13717 objectMap["endTime"] = mj.EndTime 13718 } 13719 if mj.ActivityID != nil { 13720 objectMap["activityId"] = mj.ActivityID 13721 } 13722 if mj.JobType != "" { 13723 objectMap["jobType"] = mj.JobType 13724 } 13725 return json.Marshal(objectMap) 13726} 13727 13728// AsAzureIaaSVMJob is the BasicJob implementation for MabJob. 13729func (mj MabJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) { 13730 return nil, false 13731} 13732 13733// AsAzureStorageJob is the BasicJob implementation for MabJob. 13734func (mj MabJob) AsAzureStorageJob() (*AzureStorageJob, bool) { 13735 return nil, false 13736} 13737 13738// AsAzureWorkloadJob is the BasicJob implementation for MabJob. 13739func (mj MabJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) { 13740 return nil, false 13741} 13742 13743// AsDpmJob is the BasicJob implementation for MabJob. 13744func (mj MabJob) AsDpmJob() (*DpmJob, bool) { 13745 return nil, false 13746} 13747 13748// AsMabJob is the BasicJob implementation for MabJob. 13749func (mj MabJob) AsMabJob() (*MabJob, bool) { 13750 return &mj, true 13751} 13752 13753// AsJob is the BasicJob implementation for MabJob. 13754func (mj MabJob) AsJob() (*Job, bool) { 13755 return nil, false 13756} 13757 13758// AsBasicJob is the BasicJob implementation for MabJob. 13759func (mj MabJob) AsBasicJob() (BasicJob, bool) { 13760 return &mj, true 13761} 13762 13763// MabJobExtendedInfo additional information for the MAB workload-specific job. 13764type MabJobExtendedInfo struct { 13765 // TasksList - List of tasks for this job. 13766 TasksList *[]MabJobTaskDetails `json:"tasksList,omitempty"` 13767 // PropertyBag - The job properties. 13768 PropertyBag map[string]*string `json:"propertyBag"` 13769 // DynamicErrorMessage - Non localized error message specific to this job. 13770 DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"` 13771} 13772 13773// MarshalJSON is the custom marshaler for MabJobExtendedInfo. 13774func (mjei MabJobExtendedInfo) MarshalJSON() ([]byte, error) { 13775 objectMap := make(map[string]interface{}) 13776 if mjei.TasksList != nil { 13777 objectMap["tasksList"] = mjei.TasksList 13778 } 13779 if mjei.PropertyBag != nil { 13780 objectMap["propertyBag"] = mjei.PropertyBag 13781 } 13782 if mjei.DynamicErrorMessage != nil { 13783 objectMap["dynamicErrorMessage"] = mjei.DynamicErrorMessage 13784 } 13785 return json.Marshal(objectMap) 13786} 13787 13788// MabJobTaskDetails MAB workload-specific job task details. 13789type MabJobTaskDetails struct { 13790 // TaskID - The task display name. 13791 TaskID *string `json:"taskId,omitempty"` 13792 // StartTime - The start time. 13793 StartTime *date.Time `json:"startTime,omitempty"` 13794 // EndTime - The end time. 13795 EndTime *date.Time `json:"endTime,omitempty"` 13796 // Duration - Time elapsed for task. 13797 Duration *string `json:"duration,omitempty"` 13798 // Status - The status. 13799 Status *string `json:"status,omitempty"` 13800} 13801 13802// MabProtectionPolicy mab container-specific backup policy. 13803type MabProtectionPolicy struct { 13804 // SchedulePolicy - Backup schedule of backup policy. 13805 SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"` 13806 // RetentionPolicy - Retention policy details. 13807 RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"` 13808 // ProtectedItemsCount - Number of items associated with this policy. 13809 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` 13810 // BackupManagementType - Possible values include: 'BackupManagementTypeProtectionPolicy', 'BackupManagementTypeAzureWorkload', 'BackupManagementTypeAzureStorage', 'BackupManagementTypeAzureIaasVM', 'BackupManagementTypeAzureSQL', 'BackupManagementTypeGenericProtectionPolicy', 'BackupManagementTypeMAB' 13811 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"` 13812} 13813 13814// MarshalJSON is the custom marshaler for MabProtectionPolicy. 13815func (mpp MabProtectionPolicy) MarshalJSON() ([]byte, error) { 13816 mpp.BackupManagementType = BackupManagementTypeMAB 13817 objectMap := make(map[string]interface{}) 13818 objectMap["schedulePolicy"] = mpp.SchedulePolicy 13819 objectMap["retentionPolicy"] = mpp.RetentionPolicy 13820 if mpp.ProtectedItemsCount != nil { 13821 objectMap["protectedItemsCount"] = mpp.ProtectedItemsCount 13822 } 13823 if mpp.BackupManagementType != "" { 13824 objectMap["backupManagementType"] = mpp.BackupManagementType 13825 } 13826 return json.Marshal(objectMap) 13827} 13828 13829// AsAzureVMWorkloadProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. 13830func (mpp MabProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) { 13831 return nil, false 13832} 13833 13834// AsAzureFileShareProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. 13835func (mpp MabProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) { 13836 return nil, false 13837} 13838 13839// AsAzureIaaSVMProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. 13840func (mpp MabProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) { 13841 return nil, false 13842} 13843 13844// AsAzureSQLProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. 13845func (mpp MabProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) { 13846 return nil, false 13847} 13848 13849// AsGenericProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. 13850func (mpp MabProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) { 13851 return nil, false 13852} 13853 13854// AsMabProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. 13855func (mpp MabProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) { 13856 return &mpp, true 13857} 13858 13859// AsProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. 13860func (mpp MabProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) { 13861 return nil, false 13862} 13863 13864// AsBasicProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. 13865func (mpp MabProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) { 13866 return &mpp, true 13867} 13868 13869// UnmarshalJSON is the custom unmarshaler for MabProtectionPolicy struct. 13870func (mpp *MabProtectionPolicy) UnmarshalJSON(body []byte) error { 13871 var m map[string]*json.RawMessage 13872 err := json.Unmarshal(body, &m) 13873 if err != nil { 13874 return err 13875 } 13876 for k, v := range m { 13877 switch k { 13878 case "schedulePolicy": 13879 if v != nil { 13880 schedulePolicy, err := unmarshalBasicSchedulePolicy(*v) 13881 if err != nil { 13882 return err 13883 } 13884 mpp.SchedulePolicy = schedulePolicy 13885 } 13886 case "retentionPolicy": 13887 if v != nil { 13888 retentionPolicy, err := unmarshalBasicRetentionPolicy(*v) 13889 if err != nil { 13890 return err 13891 } 13892 mpp.RetentionPolicy = retentionPolicy 13893 } 13894 case "protectedItemsCount": 13895 if v != nil { 13896 var protectedItemsCount int32 13897 err = json.Unmarshal(*v, &protectedItemsCount) 13898 if err != nil { 13899 return err 13900 } 13901 mpp.ProtectedItemsCount = &protectedItemsCount 13902 } 13903 case "backupManagementType": 13904 if v != nil { 13905 var backupManagementType ManagementTypeBasicProtectionPolicy 13906 err = json.Unmarshal(*v, &backupManagementType) 13907 if err != nil { 13908 return err 13909 } 13910 mpp.BackupManagementType = backupManagementType 13911 } 13912 } 13913 } 13914 13915 return nil 13916} 13917 13918// ManagementUsage backup management usages of a vault. 13919type ManagementUsage struct { 13920 // Unit - Unit of the usage. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' 13921 Unit UsagesUnit `json:"unit,omitempty"` 13922 // QuotaPeriod - Quota period of usage. 13923 QuotaPeriod *string `json:"quotaPeriod,omitempty"` 13924 // NextResetTime - Next reset time of usage. 13925 NextResetTime *date.Time `json:"nextResetTime,omitempty"` 13926 // CurrentValue - Current value of usage. 13927 CurrentValue *int64 `json:"currentValue,omitempty"` 13928 // Limit - Limit of usage. 13929 Limit *int64 `json:"limit,omitempty"` 13930 // Name - Name of usage. 13931 Name *NameInfo `json:"name,omitempty"` 13932} 13933 13934// ManagementUsageList backup management usage for vault. 13935type ManagementUsageList struct { 13936 autorest.Response `json:"-"` 13937 // Value - The list of backup management usages for the given vault. 13938 Value *[]ManagementUsage `json:"value,omitempty"` 13939} 13940 13941// MonthlyRetentionSchedule monthly retention schedule. 13942type MonthlyRetentionSchedule struct { 13943 // RetentionScheduleFormatType - Retention schedule format type for monthly retention policy. Possible values include: 'RetentionScheduleFormatInvalid', 'RetentionScheduleFormatDaily', 'RetentionScheduleFormatWeekly' 13944 RetentionScheduleFormatType RetentionScheduleFormat `json:"retentionScheduleFormatType,omitempty"` 13945 // RetentionScheduleDaily - Daily retention format for monthly retention policy. 13946 RetentionScheduleDaily *DailyRetentionFormat `json:"retentionScheduleDaily,omitempty"` 13947 // RetentionScheduleWeekly - Weekly retention format for monthly retention policy. 13948 RetentionScheduleWeekly *WeeklyRetentionFormat `json:"retentionScheduleWeekly,omitempty"` 13949 // RetentionTimes - Retention times of retention policy. 13950 RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"` 13951 // RetentionDuration - Retention duration of retention Policy. 13952 RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` 13953} 13954 13955// NameInfo the name of usage. 13956type NameInfo struct { 13957 // Value - Value of usage. 13958 Value *string `json:"value,omitempty"` 13959 // LocalizedValue - Localized value of usage. 13960 LocalizedValue *string `json:"localizedValue,omitempty"` 13961} 13962 13963// OperationResultInfo operation result info. 13964type OperationResultInfo struct { 13965 // JobList - List of jobs created by this operation. 13966 JobList *[]string `json:"jobList,omitempty"` 13967 // ObjectType - Possible values include: 'ObjectTypeOperationResultInfoBase', 'ObjectTypeExportJobsOperationResultInfo', 'ObjectTypeOperationResultInfo' 13968 ObjectType ObjectType `json:"objectType,omitempty"` 13969} 13970 13971// MarshalJSON is the custom marshaler for OperationResultInfo. 13972func (ori OperationResultInfo) MarshalJSON() ([]byte, error) { 13973 ori.ObjectType = ObjectTypeOperationResultInfo 13974 objectMap := make(map[string]interface{}) 13975 if ori.JobList != nil { 13976 objectMap["jobList"] = ori.JobList 13977 } 13978 if ori.ObjectType != "" { 13979 objectMap["objectType"] = ori.ObjectType 13980 } 13981 return json.Marshal(objectMap) 13982} 13983 13984// AsExportJobsOperationResultInfo is the BasicOperationResultInfoBase implementation for OperationResultInfo. 13985func (ori OperationResultInfo) AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) { 13986 return nil, false 13987} 13988 13989// AsOperationResultInfo is the BasicOperationResultInfoBase implementation for OperationResultInfo. 13990func (ori OperationResultInfo) AsOperationResultInfo() (*OperationResultInfo, bool) { 13991 return &ori, true 13992} 13993 13994// AsOperationResultInfoBase is the BasicOperationResultInfoBase implementation for OperationResultInfo. 13995func (ori OperationResultInfo) AsOperationResultInfoBase() (*OperationResultInfoBase, bool) { 13996 return nil, false 13997} 13998 13999// AsBasicOperationResultInfoBase is the BasicOperationResultInfoBase implementation for OperationResultInfo. 14000func (ori OperationResultInfo) AsBasicOperationResultInfoBase() (BasicOperationResultInfoBase, bool) { 14001 return &ori, true 14002} 14003 14004// BasicOperationResultInfoBase base class for operation result info. 14005type BasicOperationResultInfoBase interface { 14006 AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) 14007 AsOperationResultInfo() (*OperationResultInfo, bool) 14008 AsOperationResultInfoBase() (*OperationResultInfoBase, bool) 14009} 14010 14011// OperationResultInfoBase base class for operation result info. 14012type OperationResultInfoBase struct { 14013 // ObjectType - Possible values include: 'ObjectTypeOperationResultInfoBase', 'ObjectTypeExportJobsOperationResultInfo', 'ObjectTypeOperationResultInfo' 14014 ObjectType ObjectType `json:"objectType,omitempty"` 14015} 14016 14017func unmarshalBasicOperationResultInfoBase(body []byte) (BasicOperationResultInfoBase, error) { 14018 var m map[string]interface{} 14019 err := json.Unmarshal(body, &m) 14020 if err != nil { 14021 return nil, err 14022 } 14023 14024 switch m["objectType"] { 14025 case string(ObjectTypeExportJobsOperationResultInfo): 14026 var ejori ExportJobsOperationResultInfo 14027 err := json.Unmarshal(body, &ejori) 14028 return ejori, err 14029 case string(ObjectTypeOperationResultInfo): 14030 var ori OperationResultInfo 14031 err := json.Unmarshal(body, &ori) 14032 return ori, err 14033 default: 14034 var orib OperationResultInfoBase 14035 err := json.Unmarshal(body, &orib) 14036 return orib, err 14037 } 14038} 14039func unmarshalBasicOperationResultInfoBaseArray(body []byte) ([]BasicOperationResultInfoBase, error) { 14040 var rawMessages []*json.RawMessage 14041 err := json.Unmarshal(body, &rawMessages) 14042 if err != nil { 14043 return nil, err 14044 } 14045 14046 oribArray := make([]BasicOperationResultInfoBase, len(rawMessages)) 14047 14048 for index, rawMessage := range rawMessages { 14049 orib, err := unmarshalBasicOperationResultInfoBase(*rawMessage) 14050 if err != nil { 14051 return nil, err 14052 } 14053 oribArray[index] = orib 14054 } 14055 return oribArray, nil 14056} 14057 14058// MarshalJSON is the custom marshaler for OperationResultInfoBase. 14059func (orib OperationResultInfoBase) MarshalJSON() ([]byte, error) { 14060 orib.ObjectType = ObjectTypeOperationResultInfoBase 14061 objectMap := make(map[string]interface{}) 14062 if orib.ObjectType != "" { 14063 objectMap["objectType"] = orib.ObjectType 14064 } 14065 return json.Marshal(objectMap) 14066} 14067 14068// AsExportJobsOperationResultInfo is the BasicOperationResultInfoBase implementation for OperationResultInfoBase. 14069func (orib OperationResultInfoBase) AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) { 14070 return nil, false 14071} 14072 14073// AsOperationResultInfo is the BasicOperationResultInfoBase implementation for OperationResultInfoBase. 14074func (orib OperationResultInfoBase) AsOperationResultInfo() (*OperationResultInfo, bool) { 14075 return nil, false 14076} 14077 14078// AsOperationResultInfoBase is the BasicOperationResultInfoBase implementation for OperationResultInfoBase. 14079func (orib OperationResultInfoBase) AsOperationResultInfoBase() (*OperationResultInfoBase, bool) { 14080 return &orib, true 14081} 14082 14083// AsBasicOperationResultInfoBase is the BasicOperationResultInfoBase implementation for OperationResultInfoBase. 14084func (orib OperationResultInfoBase) AsBasicOperationResultInfoBase() (BasicOperationResultInfoBase, bool) { 14085 return &orib, true 14086} 14087 14088// OperationResultInfoBaseResource base class for operation result info. 14089type OperationResultInfoBaseResource struct { 14090 autorest.Response `json:"-"` 14091 // Operation - OperationResultInfoBaseResource operation 14092 Operation BasicOperationResultInfoBase `json:"operation,omitempty"` 14093 // 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' 14094 StatusCode HTTPStatusCode `json:"statusCode,omitempty"` 14095 // Headers - HTTP headers associated with this operation. 14096 Headers map[string][]string `json:"headers"` 14097} 14098 14099// MarshalJSON is the custom marshaler for OperationResultInfoBaseResource. 14100func (oribr OperationResultInfoBaseResource) MarshalJSON() ([]byte, error) { 14101 objectMap := make(map[string]interface{}) 14102 objectMap["operation"] = oribr.Operation 14103 if oribr.StatusCode != "" { 14104 objectMap["statusCode"] = oribr.StatusCode 14105 } 14106 if oribr.Headers != nil { 14107 objectMap["headers"] = oribr.Headers 14108 } 14109 return json.Marshal(objectMap) 14110} 14111 14112// UnmarshalJSON is the custom unmarshaler for OperationResultInfoBaseResource struct. 14113func (oribr *OperationResultInfoBaseResource) UnmarshalJSON(body []byte) error { 14114 var m map[string]*json.RawMessage 14115 err := json.Unmarshal(body, &m) 14116 if err != nil { 14117 return err 14118 } 14119 for k, v := range m { 14120 switch k { 14121 case "operation": 14122 if v != nil { 14123 operation, err := unmarshalBasicOperationResultInfoBase(*v) 14124 if err != nil { 14125 return err 14126 } 14127 oribr.Operation = operation 14128 } 14129 case "statusCode": 14130 if v != nil { 14131 var statusCode HTTPStatusCode 14132 err = json.Unmarshal(*v, &statusCode) 14133 if err != nil { 14134 return err 14135 } 14136 oribr.StatusCode = statusCode 14137 } 14138 case "headers": 14139 if v != nil { 14140 var headers map[string][]string 14141 err = json.Unmarshal(*v, &headers) 14142 if err != nil { 14143 return err 14144 } 14145 oribr.Headers = headers 14146 } 14147 } 14148 } 14149 14150 return nil 14151} 14152 14153// OperationStatus operation status. 14154type OperationStatus struct { 14155 autorest.Response `json:"-"` 14156 // ID - ID of the operation. 14157 ID *string `json:"id,omitempty"` 14158 // Name - Name of the operation. 14159 Name *string `json:"name,omitempty"` 14160 // Status - Operation status. Possible values include: 'OperationStatusValuesInvalid', 'OperationStatusValuesInProgress', 'OperationStatusValuesSucceeded', 'OperationStatusValuesFailed', 'OperationStatusValuesCanceled' 14161 Status OperationStatusValues `json:"status,omitempty"` 14162 // StartTime - Operation start time. Format: ISO-8601. 14163 StartTime *date.Time `json:"startTime,omitempty"` 14164 // EndTime - Operation end time. Format: ISO-8601. 14165 EndTime *date.Time `json:"endTime,omitempty"` 14166 // Error - Error information related to this operation. 14167 Error *OperationStatusError `json:"error,omitempty"` 14168 // Properties - Additional information associated with this operation. 14169 Properties BasicOperationStatusExtendedInfo `json:"properties,omitempty"` 14170} 14171 14172// UnmarshalJSON is the custom unmarshaler for OperationStatus struct. 14173func (osVar *OperationStatus) UnmarshalJSON(body []byte) error { 14174 var m map[string]*json.RawMessage 14175 err := json.Unmarshal(body, &m) 14176 if err != nil { 14177 return err 14178 } 14179 for k, v := range m { 14180 switch k { 14181 case "id": 14182 if v != nil { 14183 var ID string 14184 err = json.Unmarshal(*v, &ID) 14185 if err != nil { 14186 return err 14187 } 14188 osVar.ID = &ID 14189 } 14190 case "name": 14191 if v != nil { 14192 var name string 14193 err = json.Unmarshal(*v, &name) 14194 if err != nil { 14195 return err 14196 } 14197 osVar.Name = &name 14198 } 14199 case "status": 14200 if v != nil { 14201 var status OperationStatusValues 14202 err = json.Unmarshal(*v, &status) 14203 if err != nil { 14204 return err 14205 } 14206 osVar.Status = status 14207 } 14208 case "startTime": 14209 if v != nil { 14210 var startTime date.Time 14211 err = json.Unmarshal(*v, &startTime) 14212 if err != nil { 14213 return err 14214 } 14215 osVar.StartTime = &startTime 14216 } 14217 case "endTime": 14218 if v != nil { 14219 var endTime date.Time 14220 err = json.Unmarshal(*v, &endTime) 14221 if err != nil { 14222 return err 14223 } 14224 osVar.EndTime = &endTime 14225 } 14226 case "error": 14227 if v != nil { 14228 var errorVar OperationStatusError 14229 err = json.Unmarshal(*v, &errorVar) 14230 if err != nil { 14231 return err 14232 } 14233 osVar.Error = &errorVar 14234 } 14235 case "properties": 14236 if v != nil { 14237 properties, err := unmarshalBasicOperationStatusExtendedInfo(*v) 14238 if err != nil { 14239 return err 14240 } 14241 osVar.Properties = properties 14242 } 14243 } 14244 } 14245 14246 return nil 14247} 14248 14249// OperationStatusError error information associated with operation status call. 14250type OperationStatusError struct { 14251 // Code - Error code of the operation failure. 14252 Code *string `json:"code,omitempty"` 14253 // Message - Error message displayed if the operation failure. 14254 Message *string `json:"message,omitempty"` 14255} 14256 14257// BasicOperationStatusExtendedInfo base class for additional information of operation status. 14258type BasicOperationStatusExtendedInfo interface { 14259 AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) 14260 AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) 14261 AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) 14262 AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) 14263} 14264 14265// OperationStatusExtendedInfo base class for additional information of operation status. 14266type OperationStatusExtendedInfo struct { 14267 // ObjectType - Possible values include: 'ObjectTypeOperationStatusExtendedInfo', 'ObjectTypeOperationStatusJobExtendedInfo', 'ObjectTypeOperationStatusJobsExtendedInfo', 'ObjectTypeOperationStatusProvisionILRExtendedInfo' 14268 ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"` 14269} 14270 14271func unmarshalBasicOperationStatusExtendedInfo(body []byte) (BasicOperationStatusExtendedInfo, error) { 14272 var m map[string]interface{} 14273 err := json.Unmarshal(body, &m) 14274 if err != nil { 14275 return nil, err 14276 } 14277 14278 switch m["objectType"] { 14279 case string(ObjectTypeOperationStatusJobExtendedInfo): 14280 var osjei OperationStatusJobExtendedInfo 14281 err := json.Unmarshal(body, &osjei) 14282 return osjei, err 14283 case string(ObjectTypeOperationStatusJobsExtendedInfo): 14284 var osjei OperationStatusJobsExtendedInfo 14285 err := json.Unmarshal(body, &osjei) 14286 return osjei, err 14287 case string(ObjectTypeOperationStatusProvisionILRExtendedInfo): 14288 var ospiei OperationStatusProvisionILRExtendedInfo 14289 err := json.Unmarshal(body, &ospiei) 14290 return ospiei, err 14291 default: 14292 var osei OperationStatusExtendedInfo 14293 err := json.Unmarshal(body, &osei) 14294 return osei, err 14295 } 14296} 14297func unmarshalBasicOperationStatusExtendedInfoArray(body []byte) ([]BasicOperationStatusExtendedInfo, error) { 14298 var rawMessages []*json.RawMessage 14299 err := json.Unmarshal(body, &rawMessages) 14300 if err != nil { 14301 return nil, err 14302 } 14303 14304 oseiArray := make([]BasicOperationStatusExtendedInfo, len(rawMessages)) 14305 14306 for index, rawMessage := range rawMessages { 14307 osei, err := unmarshalBasicOperationStatusExtendedInfo(*rawMessage) 14308 if err != nil { 14309 return nil, err 14310 } 14311 oseiArray[index] = osei 14312 } 14313 return oseiArray, nil 14314} 14315 14316// MarshalJSON is the custom marshaler for OperationStatusExtendedInfo. 14317func (osei OperationStatusExtendedInfo) MarshalJSON() ([]byte, error) { 14318 osei.ObjectType = ObjectTypeOperationStatusExtendedInfo 14319 objectMap := make(map[string]interface{}) 14320 if osei.ObjectType != "" { 14321 objectMap["objectType"] = osei.ObjectType 14322 } 14323 return json.Marshal(objectMap) 14324} 14325 14326// AsOperationStatusJobExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusExtendedInfo. 14327func (osei OperationStatusExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) { 14328 return nil, false 14329} 14330 14331// AsOperationStatusJobsExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusExtendedInfo. 14332func (osei OperationStatusExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) { 14333 return nil, false 14334} 14335 14336// AsOperationStatusProvisionILRExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusExtendedInfo. 14337func (osei OperationStatusExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) { 14338 return nil, false 14339} 14340 14341// AsOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusExtendedInfo. 14342func (osei OperationStatusExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) { 14343 return &osei, true 14344} 14345 14346// AsBasicOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusExtendedInfo. 14347func (osei OperationStatusExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) { 14348 return &osei, true 14349} 14350 14351// OperationStatusJobExtendedInfo operation status job extended info. 14352type OperationStatusJobExtendedInfo struct { 14353 // JobID - ID of the job created for this protected item. 14354 JobID *string `json:"jobId,omitempty"` 14355 // ObjectType - Possible values include: 'ObjectTypeOperationStatusExtendedInfo', 'ObjectTypeOperationStatusJobExtendedInfo', 'ObjectTypeOperationStatusJobsExtendedInfo', 'ObjectTypeOperationStatusProvisionILRExtendedInfo' 14356 ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"` 14357} 14358 14359// MarshalJSON is the custom marshaler for OperationStatusJobExtendedInfo. 14360func (osjei OperationStatusJobExtendedInfo) MarshalJSON() ([]byte, error) { 14361 osjei.ObjectType = ObjectTypeOperationStatusJobExtendedInfo 14362 objectMap := make(map[string]interface{}) 14363 if osjei.JobID != nil { 14364 objectMap["jobId"] = osjei.JobID 14365 } 14366 if osjei.ObjectType != "" { 14367 objectMap["objectType"] = osjei.ObjectType 14368 } 14369 return json.Marshal(objectMap) 14370} 14371 14372// AsOperationStatusJobExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo. 14373func (osjei OperationStatusJobExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) { 14374 return &osjei, true 14375} 14376 14377// AsOperationStatusJobsExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo. 14378func (osjei OperationStatusJobExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) { 14379 return nil, false 14380} 14381 14382// AsOperationStatusProvisionILRExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo. 14383func (osjei OperationStatusJobExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) { 14384 return nil, false 14385} 14386 14387// AsOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo. 14388func (osjei OperationStatusJobExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) { 14389 return nil, false 14390} 14391 14392// AsBasicOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo. 14393func (osjei OperationStatusJobExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) { 14394 return &osjei, true 14395} 14396 14397// OperationStatusJobsExtendedInfo operation status extended info for list of jobs. 14398type OperationStatusJobsExtendedInfo struct { 14399 // JobIds - IDs of the jobs created for the protected item. 14400 JobIds *[]string `json:"jobIds,omitempty"` 14401 // FailedJobsError - Stores all the failed jobs along with the corresponding error codes. 14402 FailedJobsError map[string]*string `json:"failedJobsError"` 14403 // ObjectType - Possible values include: 'ObjectTypeOperationStatusExtendedInfo', 'ObjectTypeOperationStatusJobExtendedInfo', 'ObjectTypeOperationStatusJobsExtendedInfo', 'ObjectTypeOperationStatusProvisionILRExtendedInfo' 14404 ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"` 14405} 14406 14407// MarshalJSON is the custom marshaler for OperationStatusJobsExtendedInfo. 14408func (osjei OperationStatusJobsExtendedInfo) MarshalJSON() ([]byte, error) { 14409 osjei.ObjectType = ObjectTypeOperationStatusJobsExtendedInfo 14410 objectMap := make(map[string]interface{}) 14411 if osjei.JobIds != nil { 14412 objectMap["jobIds"] = osjei.JobIds 14413 } 14414 if osjei.FailedJobsError != nil { 14415 objectMap["failedJobsError"] = osjei.FailedJobsError 14416 } 14417 if osjei.ObjectType != "" { 14418 objectMap["objectType"] = osjei.ObjectType 14419 } 14420 return json.Marshal(objectMap) 14421} 14422 14423// AsOperationStatusJobExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo. 14424func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) { 14425 return nil, false 14426} 14427 14428// AsOperationStatusJobsExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo. 14429func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) { 14430 return &osjei, true 14431} 14432 14433// AsOperationStatusProvisionILRExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo. 14434func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) { 14435 return nil, false 14436} 14437 14438// AsOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo. 14439func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) { 14440 return nil, false 14441} 14442 14443// AsBasicOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo. 14444func (osjei OperationStatusJobsExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) { 14445 return &osjei, true 14446} 14447 14448// OperationStatusProvisionILRExtendedInfo operation status extended info for ILR provision action. 14449type OperationStatusProvisionILRExtendedInfo struct { 14450 // RecoveryTarget - Target details for file / folder restore. 14451 RecoveryTarget *InstantItemRecoveryTarget `json:"recoveryTarget,omitempty"` 14452 // ObjectType - Possible values include: 'ObjectTypeOperationStatusExtendedInfo', 'ObjectTypeOperationStatusJobExtendedInfo', 'ObjectTypeOperationStatusJobsExtendedInfo', 'ObjectTypeOperationStatusProvisionILRExtendedInfo' 14453 ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"` 14454} 14455 14456// MarshalJSON is the custom marshaler for OperationStatusProvisionILRExtendedInfo. 14457func (ospiei OperationStatusProvisionILRExtendedInfo) MarshalJSON() ([]byte, error) { 14458 ospiei.ObjectType = ObjectTypeOperationStatusProvisionILRExtendedInfo 14459 objectMap := make(map[string]interface{}) 14460 if ospiei.RecoveryTarget != nil { 14461 objectMap["recoveryTarget"] = ospiei.RecoveryTarget 14462 } 14463 if ospiei.ObjectType != "" { 14464 objectMap["objectType"] = ospiei.ObjectType 14465 } 14466 return json.Marshal(objectMap) 14467} 14468 14469// AsOperationStatusJobExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo. 14470func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) { 14471 return nil, false 14472} 14473 14474// AsOperationStatusJobsExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo. 14475func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) { 14476 return nil, false 14477} 14478 14479// AsOperationStatusProvisionILRExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo. 14480func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) { 14481 return &ospiei, true 14482} 14483 14484// AsOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo. 14485func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) { 14486 return nil, false 14487} 14488 14489// AsBasicOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo. 14490func (ospiei OperationStatusProvisionILRExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) { 14491 return &ospiei, true 14492} 14493 14494// OperationWorkerResponse this is the base class for operation result responses. 14495type OperationWorkerResponse struct { 14496 // 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' 14497 StatusCode HTTPStatusCode `json:"statusCode,omitempty"` 14498 // Headers - HTTP headers associated with this operation. 14499 Headers map[string][]string `json:"headers"` 14500} 14501 14502// MarshalJSON is the custom marshaler for OperationWorkerResponse. 14503func (owr OperationWorkerResponse) MarshalJSON() ([]byte, error) { 14504 objectMap := make(map[string]interface{}) 14505 if owr.StatusCode != "" { 14506 objectMap["statusCode"] = owr.StatusCode 14507 } 14508 if owr.Headers != nil { 14509 objectMap["headers"] = owr.Headers 14510 } 14511 return json.Marshal(objectMap) 14512} 14513 14514// PointInTimeRange provides details for log ranges 14515type PointInTimeRange struct { 14516 // StartTime - Start time of the time range for log recovery. 14517 StartTime *date.Time `json:"startTime,omitempty"` 14518 // EndTime - End time of the time range for log recovery. 14519 EndTime *date.Time `json:"endTime,omitempty"` 14520} 14521 14522// PreBackupValidation pre-backup validation for Azure VM Workload provider. 14523type PreBackupValidation struct { 14524 // Status - Status of protectable item, i.e. InProgress,Succeeded,Failed. Possible values include: 'InquiryStatusInvalid', 'InquiryStatusSuccess', 'InquiryStatusFailed' 14525 Status InquiryStatus `json:"status,omitempty"` 14526 // Code - Error code of protectable item 14527 Code *string `json:"code,omitempty"` 14528 // Message - Message corresponding to the error code for the protectable item 14529 Message *string `json:"message,omitempty"` 14530} 14531 14532// PreValidateEnableBackupRequest contract to validate if backup can be enabled on the given resource in a 14533// given vault and given configuration. 14534// It will validate followings 14535// 1. Vault capacity 14536// 2. VM is already protected 14537// 3. Any VM related configuration passed in properties. 14538type PreValidateEnableBackupRequest struct { 14539 // 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' 14540 ResourceType DataSourceType `json:"resourceType,omitempty"` 14541 // ResourceID - ARM Virtual Machine Id 14542 ResourceID *string `json:"resourceId,omitempty"` 14543 // VaultID - ARM id of the Recovery Services Vault 14544 VaultID *string `json:"vaultId,omitempty"` 14545 // Properties - Configuration of VM if any needs to be validated like OS type etc 14546 Properties *string `json:"properties,omitempty"` 14547} 14548 14549// PreValidateEnableBackupResponse response contract for enable backup validation request 14550type PreValidateEnableBackupResponse struct { 14551 autorest.Response `json:"-"` 14552 // Status - Validation Status. Possible values include: 'ValidationStatusInvalid', 'ValidationStatusSucceeded', 'ValidationStatusFailed' 14553 Status ValidationStatus `json:"status,omitempty"` 14554 // ErrorCode - Response error code 14555 ErrorCode *string `json:"errorCode,omitempty"` 14556 // ErrorMessage - Response error message 14557 ErrorMessage *string `json:"errorMessage,omitempty"` 14558 // Recommendation - Recommended action for user 14559 Recommendation *string `json:"recommendation,omitempty"` 14560 // ContainerName - Specifies the product specific container name. E.g. iaasvmcontainer;iaasvmcontainer;rgname;vmname. This is required 14561 // for portal 14562 ContainerName *string `json:"containerName,omitempty"` 14563 // ProtectedItemName - Specifies the product specific ds name. E.g. vm;iaasvmcontainer;rgname;vmname. This is required for portal 14564 ProtectedItemName *string `json:"protectedItemName,omitempty"` 14565} 14566 14567// BasicProtectableContainer protectable Container Class. 14568type BasicProtectableContainer interface { 14569 AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) 14570 AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) 14571 AsProtectableContainer() (*ProtectableContainer, bool) 14572} 14573 14574// ProtectableContainer protectable Container Class. 14575type ProtectableContainer struct { 14576 // FriendlyName - Friendly name of the container. 14577 FriendlyName *string `json:"friendlyName,omitempty"` 14578 // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 14579 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 14580 // HealthStatus - Status of health of the container. 14581 HealthStatus *string `json:"healthStatus,omitempty"` 14582 // ContainerID - Fabric Id of the container such as ARM Id. 14583 ContainerID *string `json:"containerId,omitempty"` 14584 // ProtectableContainerType - Possible values include: 'ProtectableContainerTypeProtectableContainer', 'ProtectableContainerTypeStorageContainer', 'ProtectableContainerTypeVMAppContainer' 14585 ProtectableContainerType ProtectableContainerType `json:"protectableContainerType,omitempty"` 14586} 14587 14588func unmarshalBasicProtectableContainer(body []byte) (BasicProtectableContainer, error) { 14589 var m map[string]interface{} 14590 err := json.Unmarshal(body, &m) 14591 if err != nil { 14592 return nil, err 14593 } 14594 14595 switch m["protectableContainerType"] { 14596 case string(ProtectableContainerTypeStorageContainer): 14597 var aspc AzureStorageProtectableContainer 14598 err := json.Unmarshal(body, &aspc) 14599 return aspc, err 14600 case string(ProtectableContainerTypeVMAppContainer): 14601 var avacpc AzureVMAppContainerProtectableContainer 14602 err := json.Unmarshal(body, &avacpc) 14603 return avacpc, err 14604 default: 14605 var pc ProtectableContainer 14606 err := json.Unmarshal(body, &pc) 14607 return pc, err 14608 } 14609} 14610func unmarshalBasicProtectableContainerArray(body []byte) ([]BasicProtectableContainer, error) { 14611 var rawMessages []*json.RawMessage 14612 err := json.Unmarshal(body, &rawMessages) 14613 if err != nil { 14614 return nil, err 14615 } 14616 14617 pcArray := make([]BasicProtectableContainer, len(rawMessages)) 14618 14619 for index, rawMessage := range rawMessages { 14620 pc, err := unmarshalBasicProtectableContainer(*rawMessage) 14621 if err != nil { 14622 return nil, err 14623 } 14624 pcArray[index] = pc 14625 } 14626 return pcArray, nil 14627} 14628 14629// MarshalJSON is the custom marshaler for ProtectableContainer. 14630func (pc ProtectableContainer) MarshalJSON() ([]byte, error) { 14631 pc.ProtectableContainerType = ProtectableContainerTypeProtectableContainer 14632 objectMap := make(map[string]interface{}) 14633 if pc.FriendlyName != nil { 14634 objectMap["friendlyName"] = pc.FriendlyName 14635 } 14636 if pc.BackupManagementType != "" { 14637 objectMap["backupManagementType"] = pc.BackupManagementType 14638 } 14639 if pc.HealthStatus != nil { 14640 objectMap["healthStatus"] = pc.HealthStatus 14641 } 14642 if pc.ContainerID != nil { 14643 objectMap["containerId"] = pc.ContainerID 14644 } 14645 if pc.ProtectableContainerType != "" { 14646 objectMap["protectableContainerType"] = pc.ProtectableContainerType 14647 } 14648 return json.Marshal(objectMap) 14649} 14650 14651// AsAzureStorageProtectableContainer is the BasicProtectableContainer implementation for ProtectableContainer. 14652func (pc ProtectableContainer) AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) { 14653 return nil, false 14654} 14655 14656// AsAzureVMAppContainerProtectableContainer is the BasicProtectableContainer implementation for ProtectableContainer. 14657func (pc ProtectableContainer) AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) { 14658 return nil, false 14659} 14660 14661// AsProtectableContainer is the BasicProtectableContainer implementation for ProtectableContainer. 14662func (pc ProtectableContainer) AsProtectableContainer() (*ProtectableContainer, bool) { 14663 return &pc, true 14664} 14665 14666// AsBasicProtectableContainer is the BasicProtectableContainer implementation for ProtectableContainer. 14667func (pc ProtectableContainer) AsBasicProtectableContainer() (BasicProtectableContainer, bool) { 14668 return &pc, true 14669} 14670 14671// ProtectableContainerResource protectable Container Class. 14672type ProtectableContainerResource struct { 14673 // Properties - ProtectableContainerResource properties 14674 Properties BasicProtectableContainer `json:"properties,omitempty"` 14675 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 14676 ID *string `json:"id,omitempty"` 14677 // Name - READ-ONLY; Resource name associated with the resource. 14678 Name *string `json:"name,omitempty"` 14679 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 14680 Type *string `json:"type,omitempty"` 14681 // Location - Resource location. 14682 Location *string `json:"location,omitempty"` 14683 // Tags - Resource tags. 14684 Tags map[string]*string `json:"tags"` 14685 // ETag - Optional ETag. 14686 ETag *string `json:"eTag,omitempty"` 14687} 14688 14689// MarshalJSON is the custom marshaler for ProtectableContainerResource. 14690func (pcr ProtectableContainerResource) MarshalJSON() ([]byte, error) { 14691 objectMap := make(map[string]interface{}) 14692 objectMap["properties"] = pcr.Properties 14693 if pcr.Location != nil { 14694 objectMap["location"] = pcr.Location 14695 } 14696 if pcr.Tags != nil { 14697 objectMap["tags"] = pcr.Tags 14698 } 14699 if pcr.ETag != nil { 14700 objectMap["eTag"] = pcr.ETag 14701 } 14702 return json.Marshal(objectMap) 14703} 14704 14705// UnmarshalJSON is the custom unmarshaler for ProtectableContainerResource struct. 14706func (pcr *ProtectableContainerResource) UnmarshalJSON(body []byte) error { 14707 var m map[string]*json.RawMessage 14708 err := json.Unmarshal(body, &m) 14709 if err != nil { 14710 return err 14711 } 14712 for k, v := range m { 14713 switch k { 14714 case "properties": 14715 if v != nil { 14716 properties, err := unmarshalBasicProtectableContainer(*v) 14717 if err != nil { 14718 return err 14719 } 14720 pcr.Properties = properties 14721 } 14722 case "id": 14723 if v != nil { 14724 var ID string 14725 err = json.Unmarshal(*v, &ID) 14726 if err != nil { 14727 return err 14728 } 14729 pcr.ID = &ID 14730 } 14731 case "name": 14732 if v != nil { 14733 var name string 14734 err = json.Unmarshal(*v, &name) 14735 if err != nil { 14736 return err 14737 } 14738 pcr.Name = &name 14739 } 14740 case "type": 14741 if v != nil { 14742 var typeVar string 14743 err = json.Unmarshal(*v, &typeVar) 14744 if err != nil { 14745 return err 14746 } 14747 pcr.Type = &typeVar 14748 } 14749 case "location": 14750 if v != nil { 14751 var location string 14752 err = json.Unmarshal(*v, &location) 14753 if err != nil { 14754 return err 14755 } 14756 pcr.Location = &location 14757 } 14758 case "tags": 14759 if v != nil { 14760 var tags map[string]*string 14761 err = json.Unmarshal(*v, &tags) 14762 if err != nil { 14763 return err 14764 } 14765 pcr.Tags = tags 14766 } 14767 case "eTag": 14768 if v != nil { 14769 var eTag string 14770 err = json.Unmarshal(*v, &eTag) 14771 if err != nil { 14772 return err 14773 } 14774 pcr.ETag = &eTag 14775 } 14776 } 14777 } 14778 14779 return nil 14780} 14781 14782// ProtectableContainerResourceList list of ProtectableContainer resources 14783type ProtectableContainerResourceList struct { 14784 autorest.Response `json:"-"` 14785 // Value - List of resources. 14786 Value *[]ProtectableContainerResource `json:"value,omitempty"` 14787 // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. 14788 NextLink *string `json:"nextLink,omitempty"` 14789} 14790 14791// ProtectableContainerResourceListIterator provides access to a complete listing of 14792// ProtectableContainerResource values. 14793type ProtectableContainerResourceListIterator struct { 14794 i int 14795 page ProtectableContainerResourceListPage 14796} 14797 14798// NextWithContext advances to the next value. If there was an error making 14799// the request the iterator does not advance and the error is returned. 14800func (iter *ProtectableContainerResourceListIterator) NextWithContext(ctx context.Context) (err error) { 14801 if tracing.IsEnabled() { 14802 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableContainerResourceListIterator.NextWithContext") 14803 defer func() { 14804 sc := -1 14805 if iter.Response().Response.Response != nil { 14806 sc = iter.Response().Response.Response.StatusCode 14807 } 14808 tracing.EndSpan(ctx, sc, err) 14809 }() 14810 } 14811 iter.i++ 14812 if iter.i < len(iter.page.Values()) { 14813 return nil 14814 } 14815 err = iter.page.NextWithContext(ctx) 14816 if err != nil { 14817 iter.i-- 14818 return err 14819 } 14820 iter.i = 0 14821 return nil 14822} 14823 14824// Next advances to the next value. If there was an error making 14825// the request the iterator does not advance and the error is returned. 14826// Deprecated: Use NextWithContext() instead. 14827func (iter *ProtectableContainerResourceListIterator) Next() error { 14828 return iter.NextWithContext(context.Background()) 14829} 14830 14831// NotDone returns true if the enumeration should be started or is not yet complete. 14832func (iter ProtectableContainerResourceListIterator) NotDone() bool { 14833 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 14834} 14835 14836// Response returns the raw server response from the last page request. 14837func (iter ProtectableContainerResourceListIterator) Response() ProtectableContainerResourceList { 14838 return iter.page.Response() 14839} 14840 14841// Value returns the current value or a zero-initialized value if the 14842// iterator has advanced beyond the end of the collection. 14843func (iter ProtectableContainerResourceListIterator) Value() ProtectableContainerResource { 14844 if !iter.page.NotDone() { 14845 return ProtectableContainerResource{} 14846 } 14847 return iter.page.Values()[iter.i] 14848} 14849 14850// Creates a new instance of the ProtectableContainerResourceListIterator type. 14851func NewProtectableContainerResourceListIterator(page ProtectableContainerResourceListPage) ProtectableContainerResourceListIterator { 14852 return ProtectableContainerResourceListIterator{page: page} 14853} 14854 14855// IsEmpty returns true if the ListResult contains no values. 14856func (pcrl ProtectableContainerResourceList) IsEmpty() bool { 14857 return pcrl.Value == nil || len(*pcrl.Value) == 0 14858} 14859 14860// hasNextLink returns true if the NextLink is not empty. 14861func (pcrl ProtectableContainerResourceList) hasNextLink() bool { 14862 return pcrl.NextLink != nil && len(*pcrl.NextLink) != 0 14863} 14864 14865// protectableContainerResourceListPreparer prepares a request to retrieve the next set of results. 14866// It returns nil if no more results exist. 14867func (pcrl ProtectableContainerResourceList) protectableContainerResourceListPreparer(ctx context.Context) (*http.Request, error) { 14868 if !pcrl.hasNextLink() { 14869 return nil, nil 14870 } 14871 return autorest.Prepare((&http.Request{}).WithContext(ctx), 14872 autorest.AsJSON(), 14873 autorest.AsGet(), 14874 autorest.WithBaseURL(to.String(pcrl.NextLink))) 14875} 14876 14877// ProtectableContainerResourceListPage contains a page of ProtectableContainerResource values. 14878type ProtectableContainerResourceListPage struct { 14879 fn func(context.Context, ProtectableContainerResourceList) (ProtectableContainerResourceList, error) 14880 pcrl ProtectableContainerResourceList 14881} 14882 14883// NextWithContext advances to the next page of values. If there was an error making 14884// the request the page does not advance and the error is returned. 14885func (page *ProtectableContainerResourceListPage) NextWithContext(ctx context.Context) (err error) { 14886 if tracing.IsEnabled() { 14887 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableContainerResourceListPage.NextWithContext") 14888 defer func() { 14889 sc := -1 14890 if page.Response().Response.Response != nil { 14891 sc = page.Response().Response.Response.StatusCode 14892 } 14893 tracing.EndSpan(ctx, sc, err) 14894 }() 14895 } 14896 for { 14897 next, err := page.fn(ctx, page.pcrl) 14898 if err != nil { 14899 return err 14900 } 14901 page.pcrl = next 14902 if !next.hasNextLink() || !next.IsEmpty() { 14903 break 14904 } 14905 } 14906 return nil 14907} 14908 14909// Next advances to the next page of values. If there was an error making 14910// the request the page does not advance and the error is returned. 14911// Deprecated: Use NextWithContext() instead. 14912func (page *ProtectableContainerResourceListPage) Next() error { 14913 return page.NextWithContext(context.Background()) 14914} 14915 14916// NotDone returns true if the page enumeration should be started or is not yet complete. 14917func (page ProtectableContainerResourceListPage) NotDone() bool { 14918 return !page.pcrl.IsEmpty() 14919} 14920 14921// Response returns the raw server response from the last page request. 14922func (page ProtectableContainerResourceListPage) Response() ProtectableContainerResourceList { 14923 return page.pcrl 14924} 14925 14926// Values returns the slice of values for the current page or nil if there are no values. 14927func (page ProtectableContainerResourceListPage) Values() []ProtectableContainerResource { 14928 if page.pcrl.IsEmpty() { 14929 return nil 14930 } 14931 return *page.pcrl.Value 14932} 14933 14934// Creates a new instance of the ProtectableContainerResourceListPage type. 14935func NewProtectableContainerResourceListPage(cur ProtectableContainerResourceList, getNextPage func(context.Context, ProtectableContainerResourceList) (ProtectableContainerResourceList, error)) ProtectableContainerResourceListPage { 14936 return ProtectableContainerResourceListPage{ 14937 fn: getNextPage, 14938 pcrl: cur, 14939 } 14940} 14941 14942// BasicProtectedItem base class for backup items. 14943type BasicProtectedItem interface { 14944 AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) 14945 AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) 14946 AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) 14947 AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) 14948 AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) 14949 AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) 14950 AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) 14951 AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) 14952 AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) 14953 AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) 14954 AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) 14955 AsDPMProtectedItem() (*DPMProtectedItem, bool) 14956 AsGenericProtectedItem() (*GenericProtectedItem, bool) 14957 AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) 14958 AsProtectedItem() (*ProtectedItem, bool) 14959} 14960 14961// ProtectedItem base class for backup items. 14962type ProtectedItem struct { 14963 // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 14964 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 14965 // 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' 14966 WorkloadType DataSourceType `json:"workloadType,omitempty"` 14967 // ContainerName - Unique name of container 14968 ContainerName *string `json:"containerName,omitempty"` 14969 // SourceResourceID - ARM ID of the resource to be backed up. 14970 SourceResourceID *string `json:"sourceResourceId,omitempty"` 14971 // PolicyID - ID of the backup policy with which this item is backed up. 14972 PolicyID *string `json:"policyId,omitempty"` 14973 // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. 14974 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` 14975 // BackupSetName - Name of the backup set the backup item belongs to 14976 BackupSetName *string `json:"backupSetName,omitempty"` 14977 // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' 14978 CreateMode CreateMode `json:"createMode,omitempty"` 14979 // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC 14980 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` 14981 // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete 14982 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` 14983 // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted 14984 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` 14985 // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon 14986 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` 14987 // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state 14988 IsRehydrate *bool `json:"isRehydrate,omitempty"` 14989 // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' 14990 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` 14991} 14992 14993func unmarshalBasicProtectedItem(body []byte) (BasicProtectedItem, error) { 14994 var m map[string]interface{} 14995 err := json.Unmarshal(body, &m) 14996 if err != nil { 14997 return nil, err 14998 } 14999 15000 switch m["protectedItemType"] { 15001 case string(ProtectedItemTypeAzureFileShareProtectedItem): 15002 var afpi AzureFileshareProtectedItem 15003 err := json.Unmarshal(body, &afpi) 15004 return afpi, err 15005 case string(ProtectedItemTypeMicrosoftClassicComputevirtualMachines): 15006 var aisccvpi AzureIaaSClassicComputeVMProtectedItem 15007 err := json.Unmarshal(body, &aisccvpi) 15008 return aisccvpi, err 15009 case string(ProtectedItemTypeMicrosoftComputevirtualMachines): 15010 var aiscvpi AzureIaaSComputeVMProtectedItem 15011 err := json.Unmarshal(body, &aiscvpi) 15012 return aiscvpi, err 15013 case string(ProtectedItemTypeAzureIaaSVMProtectedItem): 15014 var aispi AzureIaaSVMProtectedItem 15015 err := json.Unmarshal(body, &aispi) 15016 return aispi, err 15017 case string(ProtectedItemTypeMicrosoftSqlserversdatabases): 15018 var aspi AzureSQLProtectedItem 15019 err := json.Unmarshal(body, &aspi) 15020 return aspi, err 15021 case string(ProtectedItemTypeAzureVMWorkloadProtectedItem): 15022 var avwpi AzureVMWorkloadProtectedItem 15023 err := json.Unmarshal(body, &avwpi) 15024 return avwpi, err 15025 case string(ProtectedItemTypeAzureVMWorkloadSAPAseDatabase): 15026 var avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem 15027 err := json.Unmarshal(body, &avwsadpi) 15028 return avwsadpi, err 15029 case string(ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase): 15030 var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem 15031 err := json.Unmarshal(body, &avwshdpi) 15032 return avwshdpi, err 15033 case string(ProtectedItemTypeAzureVMWorkloadSQLDatabase): 15034 var avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem 15035 err := json.Unmarshal(body, &avwsdpi) 15036 return avwsdpi, err 15037 case string(ProtectedItemTypeDPMProtectedItem): 15038 var dpi DPMProtectedItem 15039 err := json.Unmarshal(body, &dpi) 15040 return dpi, err 15041 case string(ProtectedItemTypeGenericProtectedItem): 15042 var gpi GenericProtectedItem 15043 err := json.Unmarshal(body, &gpi) 15044 return gpi, err 15045 case string(ProtectedItemTypeMabFileFolderProtectedItem): 15046 var mffpi MabFileFolderProtectedItem 15047 err := json.Unmarshal(body, &mffpi) 15048 return mffpi, err 15049 default: 15050 var pi ProtectedItem 15051 err := json.Unmarshal(body, &pi) 15052 return pi, err 15053 } 15054} 15055func unmarshalBasicProtectedItemArray(body []byte) ([]BasicProtectedItem, error) { 15056 var rawMessages []*json.RawMessage 15057 err := json.Unmarshal(body, &rawMessages) 15058 if err != nil { 15059 return nil, err 15060 } 15061 15062 piArray := make([]BasicProtectedItem, len(rawMessages)) 15063 15064 for index, rawMessage := range rawMessages { 15065 pi, err := unmarshalBasicProtectedItem(*rawMessage) 15066 if err != nil { 15067 return nil, err 15068 } 15069 piArray[index] = pi 15070 } 15071 return piArray, nil 15072} 15073 15074// MarshalJSON is the custom marshaler for ProtectedItem. 15075func (pi ProtectedItem) MarshalJSON() ([]byte, error) { 15076 pi.ProtectedItemType = ProtectedItemTypeProtectedItem 15077 objectMap := make(map[string]interface{}) 15078 if pi.BackupManagementType != "" { 15079 objectMap["backupManagementType"] = pi.BackupManagementType 15080 } 15081 if pi.WorkloadType != "" { 15082 objectMap["workloadType"] = pi.WorkloadType 15083 } 15084 if pi.ContainerName != nil { 15085 objectMap["containerName"] = pi.ContainerName 15086 } 15087 if pi.SourceResourceID != nil { 15088 objectMap["sourceResourceId"] = pi.SourceResourceID 15089 } 15090 if pi.PolicyID != nil { 15091 objectMap["policyId"] = pi.PolicyID 15092 } 15093 if pi.LastRecoveryPoint != nil { 15094 objectMap["lastRecoveryPoint"] = pi.LastRecoveryPoint 15095 } 15096 if pi.BackupSetName != nil { 15097 objectMap["backupSetName"] = pi.BackupSetName 15098 } 15099 if pi.CreateMode != "" { 15100 objectMap["createMode"] = pi.CreateMode 15101 } 15102 if pi.DeferredDeleteTimeInUTC != nil { 15103 objectMap["deferredDeleteTimeInUTC"] = pi.DeferredDeleteTimeInUTC 15104 } 15105 if pi.IsScheduledForDeferredDelete != nil { 15106 objectMap["isScheduledForDeferredDelete"] = pi.IsScheduledForDeferredDelete 15107 } 15108 if pi.DeferredDeleteTimeRemaining != nil { 15109 objectMap["deferredDeleteTimeRemaining"] = pi.DeferredDeleteTimeRemaining 15110 } 15111 if pi.IsDeferredDeleteScheduleUpcoming != nil { 15112 objectMap["isDeferredDeleteScheduleUpcoming"] = pi.IsDeferredDeleteScheduleUpcoming 15113 } 15114 if pi.IsRehydrate != nil { 15115 objectMap["isRehydrate"] = pi.IsRehydrate 15116 } 15117 if pi.ProtectedItemType != "" { 15118 objectMap["protectedItemType"] = pi.ProtectedItemType 15119 } 15120 return json.Marshal(objectMap) 15121} 15122 15123// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15124func (pi ProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { 15125 return nil, false 15126} 15127 15128// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15129func (pi ProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { 15130 return nil, false 15131} 15132 15133// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15134func (pi ProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { 15135 return nil, false 15136} 15137 15138// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15139func (pi ProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { 15140 return nil, false 15141} 15142 15143// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15144func (pi ProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { 15145 return nil, false 15146} 15147 15148// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15149func (pi ProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { 15150 return nil, false 15151} 15152 15153// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15154func (pi ProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { 15155 return nil, false 15156} 15157 15158// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15159func (pi ProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { 15160 return nil, false 15161} 15162 15163// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15164func (pi ProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { 15165 return nil, false 15166} 15167 15168// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15169func (pi ProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { 15170 return nil, false 15171} 15172 15173// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15174func (pi ProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { 15175 return nil, false 15176} 15177 15178// AsDPMProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15179func (pi ProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { 15180 return nil, false 15181} 15182 15183// AsGenericProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15184func (pi ProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { 15185 return nil, false 15186} 15187 15188// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15189func (pi ProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { 15190 return nil, false 15191} 15192 15193// AsProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15194func (pi ProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { 15195 return &pi, true 15196} 15197 15198// AsBasicProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15199func (pi ProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { 15200 return &pi, true 15201} 15202 15203// ProtectedItemQueryObject filters to list backup items. 15204type ProtectedItemQueryObject struct { 15205 // HealthState - Health State for the backed up item. Possible values include: 'HealthStatePassed', 'HealthStateActionRequired', 'HealthStateActionSuggested', 'HealthStateInvalid' 15206 HealthState HealthState `json:"healthState,omitempty"` 15207 // BackupManagementType - Backup management type for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 15208 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 15209 // 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' 15210 ItemType DataSourceType `json:"itemType,omitempty"` 15211 // PolicyName - Backup policy name associated with the backup item. 15212 PolicyName *string `json:"policyName,omitempty"` 15213 // ContainerName - Name of the container. 15214 ContainerName *string `json:"containerName,omitempty"` 15215 // BackupEngineName - Backup Engine name 15216 BackupEngineName *string `json:"backupEngineName,omitempty"` 15217 // FriendlyName - Friendly name of protected item 15218 FriendlyName *string `json:"friendlyName,omitempty"` 15219 // FabricName - Name of the fabric. 15220 FabricName *string `json:"fabricName,omitempty"` 15221 // BackupSetName - Name of the backup set. 15222 BackupSetName *string `json:"backupSetName,omitempty"` 15223} 15224 15225// ProtectedItemResource base class for backup items. 15226type ProtectedItemResource struct { 15227 autorest.Response `json:"-"` 15228 // Properties - ProtectedItemResource properties 15229 Properties BasicProtectedItem `json:"properties,omitempty"` 15230 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 15231 ID *string `json:"id,omitempty"` 15232 // Name - READ-ONLY; Resource name associated with the resource. 15233 Name *string `json:"name,omitempty"` 15234 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 15235 Type *string `json:"type,omitempty"` 15236 // Location - Resource location. 15237 Location *string `json:"location,omitempty"` 15238 // Tags - Resource tags. 15239 Tags map[string]*string `json:"tags"` 15240 // ETag - Optional ETag. 15241 ETag *string `json:"eTag,omitempty"` 15242} 15243 15244// MarshalJSON is the custom marshaler for ProtectedItemResource. 15245func (pir ProtectedItemResource) MarshalJSON() ([]byte, error) { 15246 objectMap := make(map[string]interface{}) 15247 objectMap["properties"] = pir.Properties 15248 if pir.Location != nil { 15249 objectMap["location"] = pir.Location 15250 } 15251 if pir.Tags != nil { 15252 objectMap["tags"] = pir.Tags 15253 } 15254 if pir.ETag != nil { 15255 objectMap["eTag"] = pir.ETag 15256 } 15257 return json.Marshal(objectMap) 15258} 15259 15260// UnmarshalJSON is the custom unmarshaler for ProtectedItemResource struct. 15261func (pir *ProtectedItemResource) UnmarshalJSON(body []byte) error { 15262 var m map[string]*json.RawMessage 15263 err := json.Unmarshal(body, &m) 15264 if err != nil { 15265 return err 15266 } 15267 for k, v := range m { 15268 switch k { 15269 case "properties": 15270 if v != nil { 15271 properties, err := unmarshalBasicProtectedItem(*v) 15272 if err != nil { 15273 return err 15274 } 15275 pir.Properties = properties 15276 } 15277 case "id": 15278 if v != nil { 15279 var ID string 15280 err = json.Unmarshal(*v, &ID) 15281 if err != nil { 15282 return err 15283 } 15284 pir.ID = &ID 15285 } 15286 case "name": 15287 if v != nil { 15288 var name string 15289 err = json.Unmarshal(*v, &name) 15290 if err != nil { 15291 return err 15292 } 15293 pir.Name = &name 15294 } 15295 case "type": 15296 if v != nil { 15297 var typeVar string 15298 err = json.Unmarshal(*v, &typeVar) 15299 if err != nil { 15300 return err 15301 } 15302 pir.Type = &typeVar 15303 } 15304 case "location": 15305 if v != nil { 15306 var location string 15307 err = json.Unmarshal(*v, &location) 15308 if err != nil { 15309 return err 15310 } 15311 pir.Location = &location 15312 } 15313 case "tags": 15314 if v != nil { 15315 var tags map[string]*string 15316 err = json.Unmarshal(*v, &tags) 15317 if err != nil { 15318 return err 15319 } 15320 pir.Tags = tags 15321 } 15322 case "eTag": 15323 if v != nil { 15324 var eTag string 15325 err = json.Unmarshal(*v, &eTag) 15326 if err != nil { 15327 return err 15328 } 15329 pir.ETag = &eTag 15330 } 15331 } 15332 } 15333 15334 return nil 15335} 15336 15337// ProtectedItemResourceList list of ProtectedItem resources 15338type ProtectedItemResourceList struct { 15339 autorest.Response `json:"-"` 15340 // Value - List of resources. 15341 Value *[]ProtectedItemResource `json:"value,omitempty"` 15342 // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. 15343 NextLink *string `json:"nextLink,omitempty"` 15344} 15345 15346// ProtectedItemResourceListIterator provides access to a complete listing of ProtectedItemResource values. 15347type ProtectedItemResourceListIterator struct { 15348 i int 15349 page ProtectedItemResourceListPage 15350} 15351 15352// NextWithContext advances to the next value. If there was an error making 15353// the request the iterator does not advance and the error is returned. 15354func (iter *ProtectedItemResourceListIterator) NextWithContext(ctx context.Context) (err error) { 15355 if tracing.IsEnabled() { 15356 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectedItemResourceListIterator.NextWithContext") 15357 defer func() { 15358 sc := -1 15359 if iter.Response().Response.Response != nil { 15360 sc = iter.Response().Response.Response.StatusCode 15361 } 15362 tracing.EndSpan(ctx, sc, err) 15363 }() 15364 } 15365 iter.i++ 15366 if iter.i < len(iter.page.Values()) { 15367 return nil 15368 } 15369 err = iter.page.NextWithContext(ctx) 15370 if err != nil { 15371 iter.i-- 15372 return err 15373 } 15374 iter.i = 0 15375 return nil 15376} 15377 15378// Next advances to the next value. If there was an error making 15379// the request the iterator does not advance and the error is returned. 15380// Deprecated: Use NextWithContext() instead. 15381func (iter *ProtectedItemResourceListIterator) Next() error { 15382 return iter.NextWithContext(context.Background()) 15383} 15384 15385// NotDone returns true if the enumeration should be started or is not yet complete. 15386func (iter ProtectedItemResourceListIterator) NotDone() bool { 15387 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 15388} 15389 15390// Response returns the raw server response from the last page request. 15391func (iter ProtectedItemResourceListIterator) Response() ProtectedItemResourceList { 15392 return iter.page.Response() 15393} 15394 15395// Value returns the current value or a zero-initialized value if the 15396// iterator has advanced beyond the end of the collection. 15397func (iter ProtectedItemResourceListIterator) Value() ProtectedItemResource { 15398 if !iter.page.NotDone() { 15399 return ProtectedItemResource{} 15400 } 15401 return iter.page.Values()[iter.i] 15402} 15403 15404// Creates a new instance of the ProtectedItemResourceListIterator type. 15405func NewProtectedItemResourceListIterator(page ProtectedItemResourceListPage) ProtectedItemResourceListIterator { 15406 return ProtectedItemResourceListIterator{page: page} 15407} 15408 15409// IsEmpty returns true if the ListResult contains no values. 15410func (pirl ProtectedItemResourceList) IsEmpty() bool { 15411 return pirl.Value == nil || len(*pirl.Value) == 0 15412} 15413 15414// hasNextLink returns true if the NextLink is not empty. 15415func (pirl ProtectedItemResourceList) hasNextLink() bool { 15416 return pirl.NextLink != nil && len(*pirl.NextLink) != 0 15417} 15418 15419// protectedItemResourceListPreparer prepares a request to retrieve the next set of results. 15420// It returns nil if no more results exist. 15421func (pirl ProtectedItemResourceList) protectedItemResourceListPreparer(ctx context.Context) (*http.Request, error) { 15422 if !pirl.hasNextLink() { 15423 return nil, nil 15424 } 15425 return autorest.Prepare((&http.Request{}).WithContext(ctx), 15426 autorest.AsJSON(), 15427 autorest.AsGet(), 15428 autorest.WithBaseURL(to.String(pirl.NextLink))) 15429} 15430 15431// ProtectedItemResourceListPage contains a page of ProtectedItemResource values. 15432type ProtectedItemResourceListPage struct { 15433 fn func(context.Context, ProtectedItemResourceList) (ProtectedItemResourceList, error) 15434 pirl ProtectedItemResourceList 15435} 15436 15437// NextWithContext advances to the next page of values. If there was an error making 15438// the request the page does not advance and the error is returned. 15439func (page *ProtectedItemResourceListPage) NextWithContext(ctx context.Context) (err error) { 15440 if tracing.IsEnabled() { 15441 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectedItemResourceListPage.NextWithContext") 15442 defer func() { 15443 sc := -1 15444 if page.Response().Response.Response != nil { 15445 sc = page.Response().Response.Response.StatusCode 15446 } 15447 tracing.EndSpan(ctx, sc, err) 15448 }() 15449 } 15450 for { 15451 next, err := page.fn(ctx, page.pirl) 15452 if err != nil { 15453 return err 15454 } 15455 page.pirl = next 15456 if !next.hasNextLink() || !next.IsEmpty() { 15457 break 15458 } 15459 } 15460 return nil 15461} 15462 15463// Next advances to the next page of values. If there was an error making 15464// the request the page does not advance and the error is returned. 15465// Deprecated: Use NextWithContext() instead. 15466func (page *ProtectedItemResourceListPage) Next() error { 15467 return page.NextWithContext(context.Background()) 15468} 15469 15470// NotDone returns true if the page enumeration should be started or is not yet complete. 15471func (page ProtectedItemResourceListPage) NotDone() bool { 15472 return !page.pirl.IsEmpty() 15473} 15474 15475// Response returns the raw server response from the last page request. 15476func (page ProtectedItemResourceListPage) Response() ProtectedItemResourceList { 15477 return page.pirl 15478} 15479 15480// Values returns the slice of values for the current page or nil if there are no values. 15481func (page ProtectedItemResourceListPage) Values() []ProtectedItemResource { 15482 if page.pirl.IsEmpty() { 15483 return nil 15484 } 15485 return *page.pirl.Value 15486} 15487 15488// Creates a new instance of the ProtectedItemResourceListPage type. 15489func NewProtectedItemResourceListPage(cur ProtectedItemResourceList, getNextPage func(context.Context, ProtectedItemResourceList) (ProtectedItemResourceList, error)) ProtectedItemResourceListPage { 15490 return ProtectedItemResourceListPage{ 15491 fn: getNextPage, 15492 pirl: cur, 15493 } 15494} 15495 15496// BasicProtectionContainer base class for container with backup items. Containers with specific workloads are derived 15497// from this class. 15498type BasicProtectionContainer interface { 15499 AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) 15500 AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) 15501 AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) 15502 AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) 15503 AsAzureSQLContainer() (*AzureSQLContainer, bool) 15504 AsAzureStorageContainer() (*AzureStorageContainer, bool) 15505 AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) 15506 AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) 15507 AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) 15508 AsDpmContainer() (*DpmContainer, bool) 15509 AsBasicDpmContainer() (BasicDpmContainer, bool) 15510 AsGenericContainer() (*GenericContainer, bool) 15511 AsIaaSVMContainer() (*IaaSVMContainer, bool) 15512 AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) 15513 AsMabContainer() (*MabContainer, bool) 15514 AsProtectionContainer() (*ProtectionContainer, bool) 15515} 15516 15517// ProtectionContainer base class for container with backup items. Containers with specific workloads are 15518// derived from this class. 15519type ProtectionContainer struct { 15520 // FriendlyName - Friendly name of the container. 15521 FriendlyName *string `json:"friendlyName,omitempty"` 15522 // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 15523 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 15524 // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. 15525 RegistrationStatus *string `json:"registrationStatus,omitempty"` 15526 // HealthStatus - Status of health of the container. 15527 HealthStatus *string `json:"healthStatus,omitempty"` 15528 // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' 15529 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` 15530} 15531 15532func unmarshalBasicProtectionContainer(body []byte) (BasicProtectionContainer, error) { 15533 var m map[string]interface{} 15534 err := json.Unmarshal(body, &m) 15535 if err != nil { 15536 return nil, err 15537 } 15538 15539 switch m["containerType"] { 15540 case string(ContainerTypeAzureBackupServerContainer1): 15541 var absc AzureBackupServerContainer 15542 err := json.Unmarshal(body, &absc) 15543 return absc, err 15544 case string(ContainerTypeMicrosoftClassicComputevirtualMachines): 15545 var aisccvc AzureIaaSClassicComputeVMContainer 15546 err := json.Unmarshal(body, &aisccvc) 15547 return aisccvc, err 15548 case string(ContainerTypeMicrosoftComputevirtualMachines): 15549 var aiscvc AzureIaaSComputeVMContainer 15550 err := json.Unmarshal(body, &aiscvc) 15551 return aiscvc, err 15552 case string(ContainerTypeSQLAGWorkLoadContainer1): 15553 var aswcpc AzureSQLAGWorkloadContainerProtectionContainer 15554 err := json.Unmarshal(body, &aswcpc) 15555 return aswcpc, err 15556 case string(ContainerTypeAzureSQLContainer1): 15557 var asc AzureSQLContainer 15558 err := json.Unmarshal(body, &asc) 15559 return asc, err 15560 case string(ContainerTypeStorageContainer1): 15561 var asc AzureStorageContainer 15562 err := json.Unmarshal(body, &asc) 15563 return asc, err 15564 case string(ContainerTypeVMAppContainer1): 15565 var avacpc AzureVMAppContainerProtectionContainer 15566 err := json.Unmarshal(body, &avacpc) 15567 return avacpc, err 15568 case string(ContainerTypeAzureWorkloadContainer): 15569 var awc AzureWorkloadContainer 15570 err := json.Unmarshal(body, &awc) 15571 return awc, err 15572 case string(ContainerTypeDPMContainer1): 15573 var dc DpmContainer 15574 err := json.Unmarshal(body, &dc) 15575 return dc, err 15576 case string(ContainerTypeGenericContainer1): 15577 var gc GenericContainer 15578 err := json.Unmarshal(body, &gc) 15579 return gc, err 15580 case string(ContainerTypeIaaSVMContainer): 15581 var isc IaaSVMContainer 15582 err := json.Unmarshal(body, &isc) 15583 return isc, err 15584 case string(ContainerTypeWindows1): 15585 var mc MabContainer 15586 err := json.Unmarshal(body, &mc) 15587 return mc, err 15588 default: 15589 var pc ProtectionContainer 15590 err := json.Unmarshal(body, &pc) 15591 return pc, err 15592 } 15593} 15594func unmarshalBasicProtectionContainerArray(body []byte) ([]BasicProtectionContainer, error) { 15595 var rawMessages []*json.RawMessage 15596 err := json.Unmarshal(body, &rawMessages) 15597 if err != nil { 15598 return nil, err 15599 } 15600 15601 pcArray := make([]BasicProtectionContainer, len(rawMessages)) 15602 15603 for index, rawMessage := range rawMessages { 15604 pc, err := unmarshalBasicProtectionContainer(*rawMessage) 15605 if err != nil { 15606 return nil, err 15607 } 15608 pcArray[index] = pc 15609 } 15610 return pcArray, nil 15611} 15612 15613// MarshalJSON is the custom marshaler for ProtectionContainer. 15614func (pc ProtectionContainer) MarshalJSON() ([]byte, error) { 15615 pc.ContainerType = ContainerTypeProtectionContainer 15616 objectMap := make(map[string]interface{}) 15617 if pc.FriendlyName != nil { 15618 objectMap["friendlyName"] = pc.FriendlyName 15619 } 15620 if pc.BackupManagementType != "" { 15621 objectMap["backupManagementType"] = pc.BackupManagementType 15622 } 15623 if pc.RegistrationStatus != nil { 15624 objectMap["registrationStatus"] = pc.RegistrationStatus 15625 } 15626 if pc.HealthStatus != nil { 15627 objectMap["healthStatus"] = pc.HealthStatus 15628 } 15629 if pc.ContainerType != "" { 15630 objectMap["containerType"] = pc.ContainerType 15631 } 15632 return json.Marshal(objectMap) 15633} 15634 15635// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15636func (pc ProtectionContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { 15637 return nil, false 15638} 15639 15640// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15641func (pc ProtectionContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { 15642 return nil, false 15643} 15644 15645// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15646func (pc ProtectionContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { 15647 return nil, false 15648} 15649 15650// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15651func (pc ProtectionContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { 15652 return nil, false 15653} 15654 15655// AsAzureSQLContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15656func (pc ProtectionContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { 15657 return nil, false 15658} 15659 15660// AsAzureStorageContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15661func (pc ProtectionContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { 15662 return nil, false 15663} 15664 15665// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15666func (pc ProtectionContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { 15667 return nil, false 15668} 15669 15670// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15671func (pc ProtectionContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { 15672 return nil, false 15673} 15674 15675// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15676func (pc ProtectionContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { 15677 return nil, false 15678} 15679 15680// AsDpmContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15681func (pc ProtectionContainer) AsDpmContainer() (*DpmContainer, bool) { 15682 return nil, false 15683} 15684 15685// AsBasicDpmContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15686func (pc ProtectionContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { 15687 return nil, false 15688} 15689 15690// AsGenericContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15691func (pc ProtectionContainer) AsGenericContainer() (*GenericContainer, bool) { 15692 return nil, false 15693} 15694 15695// AsIaaSVMContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15696func (pc ProtectionContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { 15697 return nil, false 15698} 15699 15700// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15701func (pc ProtectionContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { 15702 return nil, false 15703} 15704 15705// AsMabContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15706func (pc ProtectionContainer) AsMabContainer() (*MabContainer, bool) { 15707 return nil, false 15708} 15709 15710// AsProtectionContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15711func (pc ProtectionContainer) AsProtectionContainer() (*ProtectionContainer, bool) { 15712 return &pc, true 15713} 15714 15715// AsBasicProtectionContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15716func (pc ProtectionContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { 15717 return &pc, true 15718} 15719 15720// ProtectionContainerResource base class for container with backup items. Containers with specific 15721// workloads are derived from this class. 15722type ProtectionContainerResource struct { 15723 autorest.Response `json:"-"` 15724 // Properties - ProtectionContainerResource properties 15725 Properties BasicProtectionContainer `json:"properties,omitempty"` 15726 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 15727 ID *string `json:"id,omitempty"` 15728 // Name - READ-ONLY; Resource name associated with the resource. 15729 Name *string `json:"name,omitempty"` 15730 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 15731 Type *string `json:"type,omitempty"` 15732 // Location - Resource location. 15733 Location *string `json:"location,omitempty"` 15734 // Tags - Resource tags. 15735 Tags map[string]*string `json:"tags"` 15736 // ETag - Optional ETag. 15737 ETag *string `json:"eTag,omitempty"` 15738} 15739 15740// MarshalJSON is the custom marshaler for ProtectionContainerResource. 15741func (pcr ProtectionContainerResource) MarshalJSON() ([]byte, error) { 15742 objectMap := make(map[string]interface{}) 15743 objectMap["properties"] = pcr.Properties 15744 if pcr.Location != nil { 15745 objectMap["location"] = pcr.Location 15746 } 15747 if pcr.Tags != nil { 15748 objectMap["tags"] = pcr.Tags 15749 } 15750 if pcr.ETag != nil { 15751 objectMap["eTag"] = pcr.ETag 15752 } 15753 return json.Marshal(objectMap) 15754} 15755 15756// UnmarshalJSON is the custom unmarshaler for ProtectionContainerResource struct. 15757func (pcr *ProtectionContainerResource) UnmarshalJSON(body []byte) error { 15758 var m map[string]*json.RawMessage 15759 err := json.Unmarshal(body, &m) 15760 if err != nil { 15761 return err 15762 } 15763 for k, v := range m { 15764 switch k { 15765 case "properties": 15766 if v != nil { 15767 properties, err := unmarshalBasicProtectionContainer(*v) 15768 if err != nil { 15769 return err 15770 } 15771 pcr.Properties = properties 15772 } 15773 case "id": 15774 if v != nil { 15775 var ID string 15776 err = json.Unmarshal(*v, &ID) 15777 if err != nil { 15778 return err 15779 } 15780 pcr.ID = &ID 15781 } 15782 case "name": 15783 if v != nil { 15784 var name string 15785 err = json.Unmarshal(*v, &name) 15786 if err != nil { 15787 return err 15788 } 15789 pcr.Name = &name 15790 } 15791 case "type": 15792 if v != nil { 15793 var typeVar string 15794 err = json.Unmarshal(*v, &typeVar) 15795 if err != nil { 15796 return err 15797 } 15798 pcr.Type = &typeVar 15799 } 15800 case "location": 15801 if v != nil { 15802 var location string 15803 err = json.Unmarshal(*v, &location) 15804 if err != nil { 15805 return err 15806 } 15807 pcr.Location = &location 15808 } 15809 case "tags": 15810 if v != nil { 15811 var tags map[string]*string 15812 err = json.Unmarshal(*v, &tags) 15813 if err != nil { 15814 return err 15815 } 15816 pcr.Tags = tags 15817 } 15818 case "eTag": 15819 if v != nil { 15820 var eTag string 15821 err = json.Unmarshal(*v, &eTag) 15822 if err != nil { 15823 return err 15824 } 15825 pcr.ETag = &eTag 15826 } 15827 } 15828 } 15829 15830 return nil 15831} 15832 15833// ProtectionContainerResourceList list of ProtectionContainer resources 15834type ProtectionContainerResourceList struct { 15835 autorest.Response `json:"-"` 15836 // Value - List of resources. 15837 Value *[]ProtectionContainerResource `json:"value,omitempty"` 15838 // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. 15839 NextLink *string `json:"nextLink,omitempty"` 15840} 15841 15842// ProtectionContainerResourceListIterator provides access to a complete listing of 15843// ProtectionContainerResource values. 15844type ProtectionContainerResourceListIterator struct { 15845 i int 15846 page ProtectionContainerResourceListPage 15847} 15848 15849// NextWithContext advances to the next value. If there was an error making 15850// the request the iterator does not advance and the error is returned. 15851func (iter *ProtectionContainerResourceListIterator) NextWithContext(ctx context.Context) (err error) { 15852 if tracing.IsEnabled() { 15853 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerResourceListIterator.NextWithContext") 15854 defer func() { 15855 sc := -1 15856 if iter.Response().Response.Response != nil { 15857 sc = iter.Response().Response.Response.StatusCode 15858 } 15859 tracing.EndSpan(ctx, sc, err) 15860 }() 15861 } 15862 iter.i++ 15863 if iter.i < len(iter.page.Values()) { 15864 return nil 15865 } 15866 err = iter.page.NextWithContext(ctx) 15867 if err != nil { 15868 iter.i-- 15869 return err 15870 } 15871 iter.i = 0 15872 return nil 15873} 15874 15875// Next advances to the next value. If there was an error making 15876// the request the iterator does not advance and the error is returned. 15877// Deprecated: Use NextWithContext() instead. 15878func (iter *ProtectionContainerResourceListIterator) Next() error { 15879 return iter.NextWithContext(context.Background()) 15880} 15881 15882// NotDone returns true if the enumeration should be started or is not yet complete. 15883func (iter ProtectionContainerResourceListIterator) NotDone() bool { 15884 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 15885} 15886 15887// Response returns the raw server response from the last page request. 15888func (iter ProtectionContainerResourceListIterator) Response() ProtectionContainerResourceList { 15889 return iter.page.Response() 15890} 15891 15892// Value returns the current value or a zero-initialized value if the 15893// iterator has advanced beyond the end of the collection. 15894func (iter ProtectionContainerResourceListIterator) Value() ProtectionContainerResource { 15895 if !iter.page.NotDone() { 15896 return ProtectionContainerResource{} 15897 } 15898 return iter.page.Values()[iter.i] 15899} 15900 15901// Creates a new instance of the ProtectionContainerResourceListIterator type. 15902func NewProtectionContainerResourceListIterator(page ProtectionContainerResourceListPage) ProtectionContainerResourceListIterator { 15903 return ProtectionContainerResourceListIterator{page: page} 15904} 15905 15906// IsEmpty returns true if the ListResult contains no values. 15907func (pcrl ProtectionContainerResourceList) IsEmpty() bool { 15908 return pcrl.Value == nil || len(*pcrl.Value) == 0 15909} 15910 15911// hasNextLink returns true if the NextLink is not empty. 15912func (pcrl ProtectionContainerResourceList) hasNextLink() bool { 15913 return pcrl.NextLink != nil && len(*pcrl.NextLink) != 0 15914} 15915 15916// protectionContainerResourceListPreparer prepares a request to retrieve the next set of results. 15917// It returns nil if no more results exist. 15918func (pcrl ProtectionContainerResourceList) protectionContainerResourceListPreparer(ctx context.Context) (*http.Request, error) { 15919 if !pcrl.hasNextLink() { 15920 return nil, nil 15921 } 15922 return autorest.Prepare((&http.Request{}).WithContext(ctx), 15923 autorest.AsJSON(), 15924 autorest.AsGet(), 15925 autorest.WithBaseURL(to.String(pcrl.NextLink))) 15926} 15927 15928// ProtectionContainerResourceListPage contains a page of ProtectionContainerResource values. 15929type ProtectionContainerResourceListPage struct { 15930 fn func(context.Context, ProtectionContainerResourceList) (ProtectionContainerResourceList, error) 15931 pcrl ProtectionContainerResourceList 15932} 15933 15934// NextWithContext advances to the next page of values. If there was an error making 15935// the request the page does not advance and the error is returned. 15936func (page *ProtectionContainerResourceListPage) NextWithContext(ctx context.Context) (err error) { 15937 if tracing.IsEnabled() { 15938 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerResourceListPage.NextWithContext") 15939 defer func() { 15940 sc := -1 15941 if page.Response().Response.Response != nil { 15942 sc = page.Response().Response.Response.StatusCode 15943 } 15944 tracing.EndSpan(ctx, sc, err) 15945 }() 15946 } 15947 for { 15948 next, err := page.fn(ctx, page.pcrl) 15949 if err != nil { 15950 return err 15951 } 15952 page.pcrl = next 15953 if !next.hasNextLink() || !next.IsEmpty() { 15954 break 15955 } 15956 } 15957 return nil 15958} 15959 15960// Next advances to the next page of values. If there was an error making 15961// the request the page does not advance and the error is returned. 15962// Deprecated: Use NextWithContext() instead. 15963func (page *ProtectionContainerResourceListPage) Next() error { 15964 return page.NextWithContext(context.Background()) 15965} 15966 15967// NotDone returns true if the page enumeration should be started or is not yet complete. 15968func (page ProtectionContainerResourceListPage) NotDone() bool { 15969 return !page.pcrl.IsEmpty() 15970} 15971 15972// Response returns the raw server response from the last page request. 15973func (page ProtectionContainerResourceListPage) Response() ProtectionContainerResourceList { 15974 return page.pcrl 15975} 15976 15977// Values returns the slice of values for the current page or nil if there are no values. 15978func (page ProtectionContainerResourceListPage) Values() []ProtectionContainerResource { 15979 if page.pcrl.IsEmpty() { 15980 return nil 15981 } 15982 return *page.pcrl.Value 15983} 15984 15985// Creates a new instance of the ProtectionContainerResourceListPage type. 15986func NewProtectionContainerResourceListPage(cur ProtectionContainerResourceList, getNextPage func(context.Context, ProtectionContainerResourceList) (ProtectionContainerResourceList, error)) ProtectionContainerResourceListPage { 15987 return ProtectionContainerResourceListPage{ 15988 fn: getNextPage, 15989 pcrl: cur, 15990 } 15991} 15992 15993// BasicProtectionIntent base class for backup ProtectionIntent. 15994type BasicProtectionIntent interface { 15995 AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) 15996 AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) 15997 AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) 15998 AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) 15999 AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) 16000 AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) 16001 AsProtectionIntent() (*ProtectionIntent, bool) 16002} 16003 16004// ProtectionIntent base class for backup ProtectionIntent. 16005type ProtectionIntent struct { 16006 // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 16007 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 16008 // SourceResourceID - ARM ID of the resource to be backed up. 16009 SourceResourceID *string `json:"sourceResourceId,omitempty"` 16010 // ItemID - ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId 16011 ItemID *string `json:"itemId,omitempty"` 16012 // PolicyID - ID of the backup policy with which this item is backed up. 16013 PolicyID *string `json:"policyId,omitempty"` 16014 // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 16015 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 16016 // ProtectionIntentItemType - Possible values include: 'ProtectionIntentItemTypeProtectionIntent', 'ProtectionIntentItemTypeRecoveryServiceVaultItem', 'ProtectionIntentItemTypeAzureResourceItem', 'ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent', 'ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent' 16017 ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"` 16018} 16019 16020func unmarshalBasicProtectionIntent(body []byte) (BasicProtectionIntent, error) { 16021 var m map[string]interface{} 16022 err := json.Unmarshal(body, &m) 16023 if err != nil { 16024 return nil, err 16025 } 16026 16027 switch m["protectionIntentItemType"] { 16028 case string(ProtectionIntentItemTypeRecoveryServiceVaultItem): 16029 var arsvpi AzureRecoveryServiceVaultProtectionIntent 16030 err := json.Unmarshal(body, &arsvpi) 16031 return arsvpi, err 16032 case string(ProtectionIntentItemTypeAzureResourceItem): 16033 var arpi AzureResourceProtectionIntent 16034 err := json.Unmarshal(body, &arpi) 16035 return arpi, err 16036 case string(ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent): 16037 var awapi AzureWorkloadAutoProtectionIntent 16038 err := json.Unmarshal(body, &awapi) 16039 return awapi, err 16040 case string(ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent): 16041 var awsapi AzureWorkloadSQLAutoProtectionIntent 16042 err := json.Unmarshal(body, &awsapi) 16043 return awsapi, err 16044 default: 16045 var pi ProtectionIntent 16046 err := json.Unmarshal(body, &pi) 16047 return pi, err 16048 } 16049} 16050func unmarshalBasicProtectionIntentArray(body []byte) ([]BasicProtectionIntent, error) { 16051 var rawMessages []*json.RawMessage 16052 err := json.Unmarshal(body, &rawMessages) 16053 if err != nil { 16054 return nil, err 16055 } 16056 16057 piArray := make([]BasicProtectionIntent, len(rawMessages)) 16058 16059 for index, rawMessage := range rawMessages { 16060 pi, err := unmarshalBasicProtectionIntent(*rawMessage) 16061 if err != nil { 16062 return nil, err 16063 } 16064 piArray[index] = pi 16065 } 16066 return piArray, nil 16067} 16068 16069// MarshalJSON is the custom marshaler for ProtectionIntent. 16070func (pi ProtectionIntent) MarshalJSON() ([]byte, error) { 16071 pi.ProtectionIntentItemType = ProtectionIntentItemTypeProtectionIntent 16072 objectMap := make(map[string]interface{}) 16073 if pi.BackupManagementType != "" { 16074 objectMap["backupManagementType"] = pi.BackupManagementType 16075 } 16076 if pi.SourceResourceID != nil { 16077 objectMap["sourceResourceId"] = pi.SourceResourceID 16078 } 16079 if pi.ItemID != nil { 16080 objectMap["itemId"] = pi.ItemID 16081 } 16082 if pi.PolicyID != nil { 16083 objectMap["policyId"] = pi.PolicyID 16084 } 16085 if pi.ProtectionState != "" { 16086 objectMap["protectionState"] = pi.ProtectionState 16087 } 16088 if pi.ProtectionIntentItemType != "" { 16089 objectMap["protectionIntentItemType"] = pi.ProtectionIntentItemType 16090 } 16091 return json.Marshal(objectMap) 16092} 16093 16094// AsAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. 16095func (pi ProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) { 16096 return nil, false 16097} 16098 16099// AsBasicAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. 16100func (pi ProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) { 16101 return nil, false 16102} 16103 16104// AsAzureResourceProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. 16105func (pi ProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) { 16106 return nil, false 16107} 16108 16109// AsAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. 16110func (pi ProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) { 16111 return nil, false 16112} 16113 16114// AsBasicAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. 16115func (pi ProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) { 16116 return nil, false 16117} 16118 16119// AsAzureWorkloadSQLAutoProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. 16120func (pi ProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) { 16121 return nil, false 16122} 16123 16124// AsProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. 16125func (pi ProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) { 16126 return &pi, true 16127} 16128 16129// AsBasicProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. 16130func (pi ProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) { 16131 return &pi, true 16132} 16133 16134// ProtectionIntentQueryObject filters to list protection intent. 16135type ProtectionIntentQueryObject struct { 16136 // BackupManagementType - Backup management type for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 16137 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 16138 // ItemType - Type of workload this item represents. Possible values include: 'IntentItemTypeInvalid', 'IntentItemTypeSQLInstance', 'IntentItemTypeSQLAvailabilityGroupContainer' 16139 ItemType IntentItemType `json:"itemType,omitempty"` 16140 // ParentName - Parent name of the intent 16141 ParentName *string `json:"parentName,omitempty"` 16142 // ItemName - Item name of the intent 16143 ItemName *string `json:"itemName,omitempty"` 16144} 16145 16146// ProtectionIntentResource base class for backup ProtectionIntent. 16147type ProtectionIntentResource struct { 16148 autorest.Response `json:"-"` 16149 // Properties - ProtectionIntentResource properties 16150 Properties BasicProtectionIntent `json:"properties,omitempty"` 16151 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 16152 ID *string `json:"id,omitempty"` 16153 // Name - READ-ONLY; Resource name associated with the resource. 16154 Name *string `json:"name,omitempty"` 16155 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 16156 Type *string `json:"type,omitempty"` 16157 // Location - Resource location. 16158 Location *string `json:"location,omitempty"` 16159 // Tags - Resource tags. 16160 Tags map[string]*string `json:"tags"` 16161 // ETag - Optional ETag. 16162 ETag *string `json:"eTag,omitempty"` 16163} 16164 16165// MarshalJSON is the custom marshaler for ProtectionIntentResource. 16166func (pir ProtectionIntentResource) MarshalJSON() ([]byte, error) { 16167 objectMap := make(map[string]interface{}) 16168 objectMap["properties"] = pir.Properties 16169 if pir.Location != nil { 16170 objectMap["location"] = pir.Location 16171 } 16172 if pir.Tags != nil { 16173 objectMap["tags"] = pir.Tags 16174 } 16175 if pir.ETag != nil { 16176 objectMap["eTag"] = pir.ETag 16177 } 16178 return json.Marshal(objectMap) 16179} 16180 16181// UnmarshalJSON is the custom unmarshaler for ProtectionIntentResource struct. 16182func (pir *ProtectionIntentResource) UnmarshalJSON(body []byte) error { 16183 var m map[string]*json.RawMessage 16184 err := json.Unmarshal(body, &m) 16185 if err != nil { 16186 return err 16187 } 16188 for k, v := range m { 16189 switch k { 16190 case "properties": 16191 if v != nil { 16192 properties, err := unmarshalBasicProtectionIntent(*v) 16193 if err != nil { 16194 return err 16195 } 16196 pir.Properties = properties 16197 } 16198 case "id": 16199 if v != nil { 16200 var ID string 16201 err = json.Unmarshal(*v, &ID) 16202 if err != nil { 16203 return err 16204 } 16205 pir.ID = &ID 16206 } 16207 case "name": 16208 if v != nil { 16209 var name string 16210 err = json.Unmarshal(*v, &name) 16211 if err != nil { 16212 return err 16213 } 16214 pir.Name = &name 16215 } 16216 case "type": 16217 if v != nil { 16218 var typeVar string 16219 err = json.Unmarshal(*v, &typeVar) 16220 if err != nil { 16221 return err 16222 } 16223 pir.Type = &typeVar 16224 } 16225 case "location": 16226 if v != nil { 16227 var location string 16228 err = json.Unmarshal(*v, &location) 16229 if err != nil { 16230 return err 16231 } 16232 pir.Location = &location 16233 } 16234 case "tags": 16235 if v != nil { 16236 var tags map[string]*string 16237 err = json.Unmarshal(*v, &tags) 16238 if err != nil { 16239 return err 16240 } 16241 pir.Tags = tags 16242 } 16243 case "eTag": 16244 if v != nil { 16245 var eTag string 16246 err = json.Unmarshal(*v, &eTag) 16247 if err != nil { 16248 return err 16249 } 16250 pir.ETag = &eTag 16251 } 16252 } 16253 } 16254 16255 return nil 16256} 16257 16258// ProtectionIntentResourceList list of ProtectionIntent resources 16259type ProtectionIntentResourceList struct { 16260 autorest.Response `json:"-"` 16261 // Value - List of resources. 16262 Value *[]ProtectionIntentResource `json:"value,omitempty"` 16263 // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. 16264 NextLink *string `json:"nextLink,omitempty"` 16265} 16266 16267// ProtectionIntentResourceListIterator provides access to a complete listing of ProtectionIntentResource 16268// values. 16269type ProtectionIntentResourceListIterator struct { 16270 i int 16271 page ProtectionIntentResourceListPage 16272} 16273 16274// NextWithContext advances to the next value. If there was an error making 16275// the request the iterator does not advance and the error is returned. 16276func (iter *ProtectionIntentResourceListIterator) NextWithContext(ctx context.Context) (err error) { 16277 if tracing.IsEnabled() { 16278 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionIntentResourceListIterator.NextWithContext") 16279 defer func() { 16280 sc := -1 16281 if iter.Response().Response.Response != nil { 16282 sc = iter.Response().Response.Response.StatusCode 16283 } 16284 tracing.EndSpan(ctx, sc, err) 16285 }() 16286 } 16287 iter.i++ 16288 if iter.i < len(iter.page.Values()) { 16289 return nil 16290 } 16291 err = iter.page.NextWithContext(ctx) 16292 if err != nil { 16293 iter.i-- 16294 return err 16295 } 16296 iter.i = 0 16297 return nil 16298} 16299 16300// Next advances to the next value. If there was an error making 16301// the request the iterator does not advance and the error is returned. 16302// Deprecated: Use NextWithContext() instead. 16303func (iter *ProtectionIntentResourceListIterator) Next() error { 16304 return iter.NextWithContext(context.Background()) 16305} 16306 16307// NotDone returns true if the enumeration should be started or is not yet complete. 16308func (iter ProtectionIntentResourceListIterator) NotDone() bool { 16309 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 16310} 16311 16312// Response returns the raw server response from the last page request. 16313func (iter ProtectionIntentResourceListIterator) Response() ProtectionIntentResourceList { 16314 return iter.page.Response() 16315} 16316 16317// Value returns the current value or a zero-initialized value if the 16318// iterator has advanced beyond the end of the collection. 16319func (iter ProtectionIntentResourceListIterator) Value() ProtectionIntentResource { 16320 if !iter.page.NotDone() { 16321 return ProtectionIntentResource{} 16322 } 16323 return iter.page.Values()[iter.i] 16324} 16325 16326// Creates a new instance of the ProtectionIntentResourceListIterator type. 16327func NewProtectionIntentResourceListIterator(page ProtectionIntentResourceListPage) ProtectionIntentResourceListIterator { 16328 return ProtectionIntentResourceListIterator{page: page} 16329} 16330 16331// IsEmpty returns true if the ListResult contains no values. 16332func (pirl ProtectionIntentResourceList) IsEmpty() bool { 16333 return pirl.Value == nil || len(*pirl.Value) == 0 16334} 16335 16336// hasNextLink returns true if the NextLink is not empty. 16337func (pirl ProtectionIntentResourceList) hasNextLink() bool { 16338 return pirl.NextLink != nil && len(*pirl.NextLink) != 0 16339} 16340 16341// protectionIntentResourceListPreparer prepares a request to retrieve the next set of results. 16342// It returns nil if no more results exist. 16343func (pirl ProtectionIntentResourceList) protectionIntentResourceListPreparer(ctx context.Context) (*http.Request, error) { 16344 if !pirl.hasNextLink() { 16345 return nil, nil 16346 } 16347 return autorest.Prepare((&http.Request{}).WithContext(ctx), 16348 autorest.AsJSON(), 16349 autorest.AsGet(), 16350 autorest.WithBaseURL(to.String(pirl.NextLink))) 16351} 16352 16353// ProtectionIntentResourceListPage contains a page of ProtectionIntentResource values. 16354type ProtectionIntentResourceListPage struct { 16355 fn func(context.Context, ProtectionIntentResourceList) (ProtectionIntentResourceList, error) 16356 pirl ProtectionIntentResourceList 16357} 16358 16359// NextWithContext advances to the next page of values. If there was an error making 16360// the request the page does not advance and the error is returned. 16361func (page *ProtectionIntentResourceListPage) NextWithContext(ctx context.Context) (err error) { 16362 if tracing.IsEnabled() { 16363 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionIntentResourceListPage.NextWithContext") 16364 defer func() { 16365 sc := -1 16366 if page.Response().Response.Response != nil { 16367 sc = page.Response().Response.Response.StatusCode 16368 } 16369 tracing.EndSpan(ctx, sc, err) 16370 }() 16371 } 16372 for { 16373 next, err := page.fn(ctx, page.pirl) 16374 if err != nil { 16375 return err 16376 } 16377 page.pirl = next 16378 if !next.hasNextLink() || !next.IsEmpty() { 16379 break 16380 } 16381 } 16382 return nil 16383} 16384 16385// Next advances to the next page of values. If there was an error making 16386// the request the page does not advance and the error is returned. 16387// Deprecated: Use NextWithContext() instead. 16388func (page *ProtectionIntentResourceListPage) Next() error { 16389 return page.NextWithContext(context.Background()) 16390} 16391 16392// NotDone returns true if the page enumeration should be started or is not yet complete. 16393func (page ProtectionIntentResourceListPage) NotDone() bool { 16394 return !page.pirl.IsEmpty() 16395} 16396 16397// Response returns the raw server response from the last page request. 16398func (page ProtectionIntentResourceListPage) Response() ProtectionIntentResourceList { 16399 return page.pirl 16400} 16401 16402// Values returns the slice of values for the current page or nil if there are no values. 16403func (page ProtectionIntentResourceListPage) Values() []ProtectionIntentResource { 16404 if page.pirl.IsEmpty() { 16405 return nil 16406 } 16407 return *page.pirl.Value 16408} 16409 16410// Creates a new instance of the ProtectionIntentResourceListPage type. 16411func NewProtectionIntentResourceListPage(cur ProtectionIntentResourceList, getNextPage func(context.Context, ProtectionIntentResourceList) (ProtectionIntentResourceList, error)) ProtectionIntentResourceListPage { 16412 return ProtectionIntentResourceListPage{ 16413 fn: getNextPage, 16414 pirl: cur, 16415 } 16416} 16417 16418// BasicProtectionPolicy base class for backup policy. Workload-specific backup policies are derived from this class. 16419type BasicProtectionPolicy interface { 16420 AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) 16421 AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) 16422 AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) 16423 AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) 16424 AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) 16425 AsMabProtectionPolicy() (*MabProtectionPolicy, bool) 16426 AsProtectionPolicy() (*ProtectionPolicy, bool) 16427} 16428 16429// ProtectionPolicy base class for backup policy. Workload-specific backup policies are derived from this 16430// class. 16431type ProtectionPolicy struct { 16432 // ProtectedItemsCount - Number of items associated with this policy. 16433 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` 16434 // BackupManagementType - Possible values include: 'BackupManagementTypeProtectionPolicy', 'BackupManagementTypeAzureWorkload', 'BackupManagementTypeAzureStorage', 'BackupManagementTypeAzureIaasVM', 'BackupManagementTypeAzureSQL', 'BackupManagementTypeGenericProtectionPolicy', 'BackupManagementTypeMAB' 16435 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"` 16436} 16437 16438func unmarshalBasicProtectionPolicy(body []byte) (BasicProtectionPolicy, error) { 16439 var m map[string]interface{} 16440 err := json.Unmarshal(body, &m) 16441 if err != nil { 16442 return nil, err 16443 } 16444 16445 switch m["backupManagementType"] { 16446 case string(BackupManagementTypeAzureWorkload): 16447 var avwpp AzureVMWorkloadProtectionPolicy 16448 err := json.Unmarshal(body, &avwpp) 16449 return avwpp, err 16450 case string(BackupManagementTypeAzureStorage): 16451 var afspp AzureFileShareProtectionPolicy 16452 err := json.Unmarshal(body, &afspp) 16453 return afspp, err 16454 case string(BackupManagementTypeAzureIaasVM): 16455 var aispp AzureIaaSVMProtectionPolicy 16456 err := json.Unmarshal(body, &aispp) 16457 return aispp, err 16458 case string(BackupManagementTypeAzureSQL): 16459 var aspp AzureSQLProtectionPolicy 16460 err := json.Unmarshal(body, &aspp) 16461 return aspp, err 16462 case string(BackupManagementTypeGenericProtectionPolicy): 16463 var gpp GenericProtectionPolicy 16464 err := json.Unmarshal(body, &gpp) 16465 return gpp, err 16466 case string(BackupManagementTypeMAB): 16467 var mpp MabProtectionPolicy 16468 err := json.Unmarshal(body, &mpp) 16469 return mpp, err 16470 default: 16471 var pp ProtectionPolicy 16472 err := json.Unmarshal(body, &pp) 16473 return pp, err 16474 } 16475} 16476func unmarshalBasicProtectionPolicyArray(body []byte) ([]BasicProtectionPolicy, error) { 16477 var rawMessages []*json.RawMessage 16478 err := json.Unmarshal(body, &rawMessages) 16479 if err != nil { 16480 return nil, err 16481 } 16482 16483 ppArray := make([]BasicProtectionPolicy, len(rawMessages)) 16484 16485 for index, rawMessage := range rawMessages { 16486 pp, err := unmarshalBasicProtectionPolicy(*rawMessage) 16487 if err != nil { 16488 return nil, err 16489 } 16490 ppArray[index] = pp 16491 } 16492 return ppArray, nil 16493} 16494 16495// MarshalJSON is the custom marshaler for ProtectionPolicy. 16496func (pp ProtectionPolicy) MarshalJSON() ([]byte, error) { 16497 pp.BackupManagementType = BackupManagementTypeProtectionPolicy 16498 objectMap := make(map[string]interface{}) 16499 if pp.ProtectedItemsCount != nil { 16500 objectMap["protectedItemsCount"] = pp.ProtectedItemsCount 16501 } 16502 if pp.BackupManagementType != "" { 16503 objectMap["backupManagementType"] = pp.BackupManagementType 16504 } 16505 return json.Marshal(objectMap) 16506} 16507 16508// AsAzureVMWorkloadProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. 16509func (pp ProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) { 16510 return nil, false 16511} 16512 16513// AsAzureFileShareProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. 16514func (pp ProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) { 16515 return nil, false 16516} 16517 16518// AsAzureIaaSVMProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. 16519func (pp ProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) { 16520 return nil, false 16521} 16522 16523// AsAzureSQLProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. 16524func (pp ProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) { 16525 return nil, false 16526} 16527 16528// AsGenericProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. 16529func (pp ProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) { 16530 return nil, false 16531} 16532 16533// AsMabProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. 16534func (pp ProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) { 16535 return nil, false 16536} 16537 16538// AsProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. 16539func (pp ProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) { 16540 return &pp, true 16541} 16542 16543// AsBasicProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. 16544func (pp ProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) { 16545 return &pp, true 16546} 16547 16548// ProtectionPolicyQueryObject filters the list backup policies API. 16549type ProtectionPolicyQueryObject struct { 16550 // BackupManagementType - Backup management type for the backup policy. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 16551 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 16552 // FabricName - Fabric name for filter 16553 FabricName *string `json:"fabricName,omitempty"` 16554 // 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' 16555 WorkloadType WorkloadType `json:"workloadType,omitempty"` 16556} 16557 16558// ProtectionPolicyResource base class for backup policy. Workload-specific backup policies are derived 16559// from this class. 16560type ProtectionPolicyResource struct { 16561 autorest.Response `json:"-"` 16562 // Properties - ProtectionPolicyResource properties 16563 Properties BasicProtectionPolicy `json:"properties,omitempty"` 16564 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 16565 ID *string `json:"id,omitempty"` 16566 // Name - READ-ONLY; Resource name associated with the resource. 16567 Name *string `json:"name,omitempty"` 16568 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 16569 Type *string `json:"type,omitempty"` 16570 // Location - Resource location. 16571 Location *string `json:"location,omitempty"` 16572 // Tags - Resource tags. 16573 Tags map[string]*string `json:"tags"` 16574 // ETag - Optional ETag. 16575 ETag *string `json:"eTag,omitempty"` 16576} 16577 16578// MarshalJSON is the custom marshaler for ProtectionPolicyResource. 16579func (ppr ProtectionPolicyResource) MarshalJSON() ([]byte, error) { 16580 objectMap := make(map[string]interface{}) 16581 objectMap["properties"] = ppr.Properties 16582 if ppr.Location != nil { 16583 objectMap["location"] = ppr.Location 16584 } 16585 if ppr.Tags != nil { 16586 objectMap["tags"] = ppr.Tags 16587 } 16588 if ppr.ETag != nil { 16589 objectMap["eTag"] = ppr.ETag 16590 } 16591 return json.Marshal(objectMap) 16592} 16593 16594// UnmarshalJSON is the custom unmarshaler for ProtectionPolicyResource struct. 16595func (ppr *ProtectionPolicyResource) UnmarshalJSON(body []byte) error { 16596 var m map[string]*json.RawMessage 16597 err := json.Unmarshal(body, &m) 16598 if err != nil { 16599 return err 16600 } 16601 for k, v := range m { 16602 switch k { 16603 case "properties": 16604 if v != nil { 16605 properties, err := unmarshalBasicProtectionPolicy(*v) 16606 if err != nil { 16607 return err 16608 } 16609 ppr.Properties = properties 16610 } 16611 case "id": 16612 if v != nil { 16613 var ID string 16614 err = json.Unmarshal(*v, &ID) 16615 if err != nil { 16616 return err 16617 } 16618 ppr.ID = &ID 16619 } 16620 case "name": 16621 if v != nil { 16622 var name string 16623 err = json.Unmarshal(*v, &name) 16624 if err != nil { 16625 return err 16626 } 16627 ppr.Name = &name 16628 } 16629 case "type": 16630 if v != nil { 16631 var typeVar string 16632 err = json.Unmarshal(*v, &typeVar) 16633 if err != nil { 16634 return err 16635 } 16636 ppr.Type = &typeVar 16637 } 16638 case "location": 16639 if v != nil { 16640 var location string 16641 err = json.Unmarshal(*v, &location) 16642 if err != nil { 16643 return err 16644 } 16645 ppr.Location = &location 16646 } 16647 case "tags": 16648 if v != nil { 16649 var tags map[string]*string 16650 err = json.Unmarshal(*v, &tags) 16651 if err != nil { 16652 return err 16653 } 16654 ppr.Tags = tags 16655 } 16656 case "eTag": 16657 if v != nil { 16658 var eTag string 16659 err = json.Unmarshal(*v, &eTag) 16660 if err != nil { 16661 return err 16662 } 16663 ppr.ETag = &eTag 16664 } 16665 } 16666 } 16667 16668 return nil 16669} 16670 16671// ProtectionPolicyResourceList list of ProtectionPolicy resources 16672type ProtectionPolicyResourceList struct { 16673 autorest.Response `json:"-"` 16674 // Value - List of resources. 16675 Value *[]ProtectionPolicyResource `json:"value,omitempty"` 16676 // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. 16677 NextLink *string `json:"nextLink,omitempty"` 16678} 16679 16680// ProtectionPolicyResourceListIterator provides access to a complete listing of ProtectionPolicyResource 16681// values. 16682type ProtectionPolicyResourceListIterator struct { 16683 i int 16684 page ProtectionPolicyResourceListPage 16685} 16686 16687// NextWithContext advances to the next value. If there was an error making 16688// the request the iterator does not advance and the error is returned. 16689func (iter *ProtectionPolicyResourceListIterator) NextWithContext(ctx context.Context) (err error) { 16690 if tracing.IsEnabled() { 16691 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionPolicyResourceListIterator.NextWithContext") 16692 defer func() { 16693 sc := -1 16694 if iter.Response().Response.Response != nil { 16695 sc = iter.Response().Response.Response.StatusCode 16696 } 16697 tracing.EndSpan(ctx, sc, err) 16698 }() 16699 } 16700 iter.i++ 16701 if iter.i < len(iter.page.Values()) { 16702 return nil 16703 } 16704 err = iter.page.NextWithContext(ctx) 16705 if err != nil { 16706 iter.i-- 16707 return err 16708 } 16709 iter.i = 0 16710 return nil 16711} 16712 16713// Next advances to the next value. If there was an error making 16714// the request the iterator does not advance and the error is returned. 16715// Deprecated: Use NextWithContext() instead. 16716func (iter *ProtectionPolicyResourceListIterator) Next() error { 16717 return iter.NextWithContext(context.Background()) 16718} 16719 16720// NotDone returns true if the enumeration should be started or is not yet complete. 16721func (iter ProtectionPolicyResourceListIterator) NotDone() bool { 16722 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 16723} 16724 16725// Response returns the raw server response from the last page request. 16726func (iter ProtectionPolicyResourceListIterator) Response() ProtectionPolicyResourceList { 16727 return iter.page.Response() 16728} 16729 16730// Value returns the current value or a zero-initialized value if the 16731// iterator has advanced beyond the end of the collection. 16732func (iter ProtectionPolicyResourceListIterator) Value() ProtectionPolicyResource { 16733 if !iter.page.NotDone() { 16734 return ProtectionPolicyResource{} 16735 } 16736 return iter.page.Values()[iter.i] 16737} 16738 16739// Creates a new instance of the ProtectionPolicyResourceListIterator type. 16740func NewProtectionPolicyResourceListIterator(page ProtectionPolicyResourceListPage) ProtectionPolicyResourceListIterator { 16741 return ProtectionPolicyResourceListIterator{page: page} 16742} 16743 16744// IsEmpty returns true if the ListResult contains no values. 16745func (pprl ProtectionPolicyResourceList) IsEmpty() bool { 16746 return pprl.Value == nil || len(*pprl.Value) == 0 16747} 16748 16749// hasNextLink returns true if the NextLink is not empty. 16750func (pprl ProtectionPolicyResourceList) hasNextLink() bool { 16751 return pprl.NextLink != nil && len(*pprl.NextLink) != 0 16752} 16753 16754// protectionPolicyResourceListPreparer prepares a request to retrieve the next set of results. 16755// It returns nil if no more results exist. 16756func (pprl ProtectionPolicyResourceList) protectionPolicyResourceListPreparer(ctx context.Context) (*http.Request, error) { 16757 if !pprl.hasNextLink() { 16758 return nil, nil 16759 } 16760 return autorest.Prepare((&http.Request{}).WithContext(ctx), 16761 autorest.AsJSON(), 16762 autorest.AsGet(), 16763 autorest.WithBaseURL(to.String(pprl.NextLink))) 16764} 16765 16766// ProtectionPolicyResourceListPage contains a page of ProtectionPolicyResource values. 16767type ProtectionPolicyResourceListPage struct { 16768 fn func(context.Context, ProtectionPolicyResourceList) (ProtectionPolicyResourceList, error) 16769 pprl ProtectionPolicyResourceList 16770} 16771 16772// NextWithContext advances to the next page of values. If there was an error making 16773// the request the page does not advance and the error is returned. 16774func (page *ProtectionPolicyResourceListPage) NextWithContext(ctx context.Context) (err error) { 16775 if tracing.IsEnabled() { 16776 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionPolicyResourceListPage.NextWithContext") 16777 defer func() { 16778 sc := -1 16779 if page.Response().Response.Response != nil { 16780 sc = page.Response().Response.Response.StatusCode 16781 } 16782 tracing.EndSpan(ctx, sc, err) 16783 }() 16784 } 16785 for { 16786 next, err := page.fn(ctx, page.pprl) 16787 if err != nil { 16788 return err 16789 } 16790 page.pprl = next 16791 if !next.hasNextLink() || !next.IsEmpty() { 16792 break 16793 } 16794 } 16795 return nil 16796} 16797 16798// Next advances to the next page of values. If there was an error making 16799// the request the page does not advance and the error is returned. 16800// Deprecated: Use NextWithContext() instead. 16801func (page *ProtectionPolicyResourceListPage) Next() error { 16802 return page.NextWithContext(context.Background()) 16803} 16804 16805// NotDone returns true if the page enumeration should be started or is not yet complete. 16806func (page ProtectionPolicyResourceListPage) NotDone() bool { 16807 return !page.pprl.IsEmpty() 16808} 16809 16810// Response returns the raw server response from the last page request. 16811func (page ProtectionPolicyResourceListPage) Response() ProtectionPolicyResourceList { 16812 return page.pprl 16813} 16814 16815// Values returns the slice of values for the current page or nil if there are no values. 16816func (page ProtectionPolicyResourceListPage) Values() []ProtectionPolicyResource { 16817 if page.pprl.IsEmpty() { 16818 return nil 16819 } 16820 return *page.pprl.Value 16821} 16822 16823// Creates a new instance of the ProtectionPolicyResourceListPage type. 16824func NewProtectionPolicyResourceListPage(cur ProtectionPolicyResourceList, getNextPage func(context.Context, ProtectionPolicyResourceList) (ProtectionPolicyResourceList, error)) ProtectionPolicyResourceListPage { 16825 return ProtectionPolicyResourceListPage{ 16826 fn: getNextPage, 16827 pprl: cur, 16828 } 16829} 16830 16831// BasicRecoveryPoint base class for backup copies. Workload-specific backup copies are derived from this class. 16832type BasicRecoveryPoint interface { 16833 AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) 16834 AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) 16835 AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) 16836 AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) 16837 AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) 16838 AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) 16839 AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) 16840 AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) 16841 AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) 16842 AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) 16843 AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) 16844 AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) 16845 AsRecoveryPoint() (*RecoveryPoint, bool) 16846} 16847 16848// RecoveryPoint base class for backup copies. Workload-specific backup copies are derived from this class. 16849type RecoveryPoint struct { 16850 // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' 16851 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` 16852} 16853 16854func unmarshalBasicRecoveryPoint(body []byte) (BasicRecoveryPoint, error) { 16855 var m map[string]interface{} 16856 err := json.Unmarshal(body, &m) 16857 if err != nil { 16858 return nil, err 16859 } 16860 16861 switch m["objectType"] { 16862 case string(ObjectTypeAzureFileShareRecoveryPoint): 16863 var afsrp AzureFileShareRecoveryPoint 16864 err := json.Unmarshal(body, &afsrp) 16865 return afsrp, err 16866 case string(ObjectTypeAzureWorkloadPointInTimeRecoveryPoint): 16867 var awpitrp AzureWorkloadPointInTimeRecoveryPoint 16868 err := json.Unmarshal(body, &awpitrp) 16869 return awpitrp, err 16870 case string(ObjectTypeAzureWorkloadRecoveryPoint): 16871 var awrp AzureWorkloadRecoveryPoint 16872 err := json.Unmarshal(body, &awrp) 16873 return awrp, err 16874 case string(ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint): 16875 var awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint 16876 err := json.Unmarshal(body, &awshpitrp) 16877 return awshpitrp, err 16878 case string(ObjectTypeAzureWorkloadSAPHanaRecoveryPoint): 16879 var awshrp AzureWorkloadSAPHanaRecoveryPoint 16880 err := json.Unmarshal(body, &awshrp) 16881 return awshrp, err 16882 case string(ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint): 16883 var awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint 16884 err := json.Unmarshal(body, &awspitrp) 16885 return awspitrp, err 16886 case string(ObjectTypeAzureWorkloadSQLRecoveryPoint): 16887 var awsrp AzureWorkloadSQLRecoveryPoint 16888 err := json.Unmarshal(body, &awsrp) 16889 return awsrp, err 16890 case string(ObjectTypeGenericRecoveryPoint): 16891 var grp GenericRecoveryPoint 16892 err := json.Unmarshal(body, &grp) 16893 return grp, err 16894 case string(ObjectTypeIaasVMRecoveryPoint): 16895 var ivrp IaasVMRecoveryPoint 16896 err := json.Unmarshal(body, &ivrp) 16897 return ivrp, err 16898 default: 16899 var rp RecoveryPoint 16900 err := json.Unmarshal(body, &rp) 16901 return rp, err 16902 } 16903} 16904func unmarshalBasicRecoveryPointArray(body []byte) ([]BasicRecoveryPoint, error) { 16905 var rawMessages []*json.RawMessage 16906 err := json.Unmarshal(body, &rawMessages) 16907 if err != nil { 16908 return nil, err 16909 } 16910 16911 rpArray := make([]BasicRecoveryPoint, len(rawMessages)) 16912 16913 for index, rawMessage := range rawMessages { 16914 rp, err := unmarshalBasicRecoveryPoint(*rawMessage) 16915 if err != nil { 16916 return nil, err 16917 } 16918 rpArray[index] = rp 16919 } 16920 return rpArray, nil 16921} 16922 16923// MarshalJSON is the custom marshaler for RecoveryPoint. 16924func (rp RecoveryPoint) MarshalJSON() ([]byte, error) { 16925 rp.ObjectType = ObjectTypeRecoveryPoint 16926 objectMap := make(map[string]interface{}) 16927 if rp.ObjectType != "" { 16928 objectMap["objectType"] = rp.ObjectType 16929 } 16930 return json.Marshal(objectMap) 16931} 16932 16933// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. 16934func (rp RecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { 16935 return nil, false 16936} 16937 16938// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. 16939func (rp RecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { 16940 return nil, false 16941} 16942 16943// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. 16944func (rp RecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { 16945 return nil, false 16946} 16947 16948// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. 16949func (rp RecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { 16950 return nil, false 16951} 16952 16953// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. 16954func (rp RecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { 16955 return nil, false 16956} 16957 16958// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. 16959func (rp RecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { 16960 return nil, false 16961} 16962 16963// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. 16964func (rp RecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { 16965 return nil, false 16966} 16967 16968// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. 16969func (rp RecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { 16970 return nil, false 16971} 16972 16973// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. 16974func (rp RecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { 16975 return nil, false 16976} 16977 16978// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. 16979func (rp RecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { 16980 return nil, false 16981} 16982 16983// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. 16984func (rp RecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { 16985 return nil, false 16986} 16987 16988// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. 16989func (rp RecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { 16990 return nil, false 16991} 16992 16993// AsRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. 16994func (rp RecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { 16995 return &rp, true 16996} 16997 16998// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. 16999func (rp RecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { 17000 return &rp, true 17001} 17002 17003// RecoveryPointDiskConfiguration disk configuration 17004type RecoveryPointDiskConfiguration struct { 17005 // NumberOfDisksIncludedInBackup - Number of disks included in backup 17006 NumberOfDisksIncludedInBackup *int32 `json:"numberOfDisksIncludedInBackup,omitempty"` 17007 // NumberOfDisksAttachedToVM - Number of disks attached to the VM 17008 NumberOfDisksAttachedToVM *int32 `json:"numberOfDisksAttachedToVm,omitempty"` 17009 // IncludedDiskList - Information of disks included in backup 17010 IncludedDiskList *[]DiskInformation `json:"includedDiskList,omitempty"` 17011 // ExcludedDiskList - Information of disks excluded from backup 17012 ExcludedDiskList *[]DiskInformation `json:"excludedDiskList,omitempty"` 17013} 17014 17015// RecoveryPointResource base class for backup copies. Workload-specific backup copies are derived from 17016// this class. 17017type RecoveryPointResource struct { 17018 autorest.Response `json:"-"` 17019 // Properties - RecoveryPointResource properties 17020 Properties BasicRecoveryPoint `json:"properties,omitempty"` 17021 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 17022 ID *string `json:"id,omitempty"` 17023 // Name - READ-ONLY; Resource name associated with the resource. 17024 Name *string `json:"name,omitempty"` 17025 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 17026 Type *string `json:"type,omitempty"` 17027 // Location - Resource location. 17028 Location *string `json:"location,omitempty"` 17029 // Tags - Resource tags. 17030 Tags map[string]*string `json:"tags"` 17031 // ETag - Optional ETag. 17032 ETag *string `json:"eTag,omitempty"` 17033} 17034 17035// MarshalJSON is the custom marshaler for RecoveryPointResource. 17036func (rpr RecoveryPointResource) MarshalJSON() ([]byte, error) { 17037 objectMap := make(map[string]interface{}) 17038 objectMap["properties"] = rpr.Properties 17039 if rpr.Location != nil { 17040 objectMap["location"] = rpr.Location 17041 } 17042 if rpr.Tags != nil { 17043 objectMap["tags"] = rpr.Tags 17044 } 17045 if rpr.ETag != nil { 17046 objectMap["eTag"] = rpr.ETag 17047 } 17048 return json.Marshal(objectMap) 17049} 17050 17051// UnmarshalJSON is the custom unmarshaler for RecoveryPointResource struct. 17052func (rpr *RecoveryPointResource) UnmarshalJSON(body []byte) error { 17053 var m map[string]*json.RawMessage 17054 err := json.Unmarshal(body, &m) 17055 if err != nil { 17056 return err 17057 } 17058 for k, v := range m { 17059 switch k { 17060 case "properties": 17061 if v != nil { 17062 properties, err := unmarshalBasicRecoveryPoint(*v) 17063 if err != nil { 17064 return err 17065 } 17066 rpr.Properties = properties 17067 } 17068 case "id": 17069 if v != nil { 17070 var ID string 17071 err = json.Unmarshal(*v, &ID) 17072 if err != nil { 17073 return err 17074 } 17075 rpr.ID = &ID 17076 } 17077 case "name": 17078 if v != nil { 17079 var name string 17080 err = json.Unmarshal(*v, &name) 17081 if err != nil { 17082 return err 17083 } 17084 rpr.Name = &name 17085 } 17086 case "type": 17087 if v != nil { 17088 var typeVar string 17089 err = json.Unmarshal(*v, &typeVar) 17090 if err != nil { 17091 return err 17092 } 17093 rpr.Type = &typeVar 17094 } 17095 case "location": 17096 if v != nil { 17097 var location string 17098 err = json.Unmarshal(*v, &location) 17099 if err != nil { 17100 return err 17101 } 17102 rpr.Location = &location 17103 } 17104 case "tags": 17105 if v != nil { 17106 var tags map[string]*string 17107 err = json.Unmarshal(*v, &tags) 17108 if err != nil { 17109 return err 17110 } 17111 rpr.Tags = tags 17112 } 17113 case "eTag": 17114 if v != nil { 17115 var eTag string 17116 err = json.Unmarshal(*v, &eTag) 17117 if err != nil { 17118 return err 17119 } 17120 rpr.ETag = &eTag 17121 } 17122 } 17123 } 17124 17125 return nil 17126} 17127 17128// RecoveryPointResourceList list of RecoveryPoint resources 17129type RecoveryPointResourceList struct { 17130 autorest.Response `json:"-"` 17131 // Value - List of resources. 17132 Value *[]RecoveryPointResource `json:"value,omitempty"` 17133 // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. 17134 NextLink *string `json:"nextLink,omitempty"` 17135} 17136 17137// RecoveryPointResourceListIterator provides access to a complete listing of RecoveryPointResource values. 17138type RecoveryPointResourceListIterator struct { 17139 i int 17140 page RecoveryPointResourceListPage 17141} 17142 17143// NextWithContext advances to the next value. If there was an error making 17144// the request the iterator does not advance and the error is returned. 17145func (iter *RecoveryPointResourceListIterator) NextWithContext(ctx context.Context) (err error) { 17146 if tracing.IsEnabled() { 17147 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPointResourceListIterator.NextWithContext") 17148 defer func() { 17149 sc := -1 17150 if iter.Response().Response.Response != nil { 17151 sc = iter.Response().Response.Response.StatusCode 17152 } 17153 tracing.EndSpan(ctx, sc, err) 17154 }() 17155 } 17156 iter.i++ 17157 if iter.i < len(iter.page.Values()) { 17158 return nil 17159 } 17160 err = iter.page.NextWithContext(ctx) 17161 if err != nil { 17162 iter.i-- 17163 return err 17164 } 17165 iter.i = 0 17166 return nil 17167} 17168 17169// Next advances to the next value. If there was an error making 17170// the request the iterator does not advance and the error is returned. 17171// Deprecated: Use NextWithContext() instead. 17172func (iter *RecoveryPointResourceListIterator) Next() error { 17173 return iter.NextWithContext(context.Background()) 17174} 17175 17176// NotDone returns true if the enumeration should be started or is not yet complete. 17177func (iter RecoveryPointResourceListIterator) NotDone() bool { 17178 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 17179} 17180 17181// Response returns the raw server response from the last page request. 17182func (iter RecoveryPointResourceListIterator) Response() RecoveryPointResourceList { 17183 return iter.page.Response() 17184} 17185 17186// Value returns the current value or a zero-initialized value if the 17187// iterator has advanced beyond the end of the collection. 17188func (iter RecoveryPointResourceListIterator) Value() RecoveryPointResource { 17189 if !iter.page.NotDone() { 17190 return RecoveryPointResource{} 17191 } 17192 return iter.page.Values()[iter.i] 17193} 17194 17195// Creates a new instance of the RecoveryPointResourceListIterator type. 17196func NewRecoveryPointResourceListIterator(page RecoveryPointResourceListPage) RecoveryPointResourceListIterator { 17197 return RecoveryPointResourceListIterator{page: page} 17198} 17199 17200// IsEmpty returns true if the ListResult contains no values. 17201func (rprl RecoveryPointResourceList) IsEmpty() bool { 17202 return rprl.Value == nil || len(*rprl.Value) == 0 17203} 17204 17205// hasNextLink returns true if the NextLink is not empty. 17206func (rprl RecoveryPointResourceList) hasNextLink() bool { 17207 return rprl.NextLink != nil && len(*rprl.NextLink) != 0 17208} 17209 17210// recoveryPointResourceListPreparer prepares a request to retrieve the next set of results. 17211// It returns nil if no more results exist. 17212func (rprl RecoveryPointResourceList) recoveryPointResourceListPreparer(ctx context.Context) (*http.Request, error) { 17213 if !rprl.hasNextLink() { 17214 return nil, nil 17215 } 17216 return autorest.Prepare((&http.Request{}).WithContext(ctx), 17217 autorest.AsJSON(), 17218 autorest.AsGet(), 17219 autorest.WithBaseURL(to.String(rprl.NextLink))) 17220} 17221 17222// RecoveryPointResourceListPage contains a page of RecoveryPointResource values. 17223type RecoveryPointResourceListPage struct { 17224 fn func(context.Context, RecoveryPointResourceList) (RecoveryPointResourceList, error) 17225 rprl RecoveryPointResourceList 17226} 17227 17228// NextWithContext advances to the next page of values. If there was an error making 17229// the request the page does not advance and the error is returned. 17230func (page *RecoveryPointResourceListPage) NextWithContext(ctx context.Context) (err error) { 17231 if tracing.IsEnabled() { 17232 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPointResourceListPage.NextWithContext") 17233 defer func() { 17234 sc := -1 17235 if page.Response().Response.Response != nil { 17236 sc = page.Response().Response.Response.StatusCode 17237 } 17238 tracing.EndSpan(ctx, sc, err) 17239 }() 17240 } 17241 for { 17242 next, err := page.fn(ctx, page.rprl) 17243 if err != nil { 17244 return err 17245 } 17246 page.rprl = next 17247 if !next.hasNextLink() || !next.IsEmpty() { 17248 break 17249 } 17250 } 17251 return nil 17252} 17253 17254// Next advances to the next page of values. If there was an error making 17255// the request the page does not advance and the error is returned. 17256// Deprecated: Use NextWithContext() instead. 17257func (page *RecoveryPointResourceListPage) Next() error { 17258 return page.NextWithContext(context.Background()) 17259} 17260 17261// NotDone returns true if the page enumeration should be started or is not yet complete. 17262func (page RecoveryPointResourceListPage) NotDone() bool { 17263 return !page.rprl.IsEmpty() 17264} 17265 17266// Response returns the raw server response from the last page request. 17267func (page RecoveryPointResourceListPage) Response() RecoveryPointResourceList { 17268 return page.rprl 17269} 17270 17271// Values returns the slice of values for the current page or nil if there are no values. 17272func (page RecoveryPointResourceListPage) Values() []RecoveryPointResource { 17273 if page.rprl.IsEmpty() { 17274 return nil 17275 } 17276 return *page.rprl.Value 17277} 17278 17279// Creates a new instance of the RecoveryPointResourceListPage type. 17280func NewRecoveryPointResourceListPage(cur RecoveryPointResourceList, getNextPage func(context.Context, RecoveryPointResourceList) (RecoveryPointResourceList, error)) RecoveryPointResourceListPage { 17281 return RecoveryPointResourceListPage{ 17282 fn: getNextPage, 17283 rprl: cur, 17284 } 17285} 17286 17287// RecoveryPointTierInformation recovery point tier information. 17288type RecoveryPointTierInformation struct { 17289 // Type - Recovery point tier type. Possible values include: 'RecoveryPointTierTypeInvalid', 'RecoveryPointTierTypeInstantRP', 'RecoveryPointTierTypeHardenedRP' 17290 Type RecoveryPointTierType `json:"type,omitempty"` 17291 // Status - Recovery point tier status. Possible values include: 'RecoveryPointTierStatusInvalid', 'RecoveryPointTierStatusValid', 'RecoveryPointTierStatusDisabled', 'RecoveryPointTierStatusDeleted' 17292 Status RecoveryPointTierStatus `json:"status,omitempty"` 17293} 17294 17295// BasicRequest base class for backup request. Workload-specific backup requests are derived from this class. 17296type BasicRequest interface { 17297 AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) 17298 AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) 17299 AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) 17300 AsRequest() (*Request, bool) 17301} 17302 17303// Request base class for backup request. Workload-specific backup requests are derived from this class. 17304type Request struct { 17305 // ObjectType - Possible values include: 'ObjectTypeBackupRequest', 'ObjectTypeAzureFileShareBackupRequest', 'ObjectTypeAzureWorkloadBackupRequest', 'ObjectTypeIaasVMBackupRequest' 17306 ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"` 17307} 17308 17309func unmarshalBasicRequest(body []byte) (BasicRequest, error) { 17310 var m map[string]interface{} 17311 err := json.Unmarshal(body, &m) 17312 if err != nil { 17313 return nil, err 17314 } 17315 17316 switch m["objectType"] { 17317 case string(ObjectTypeAzureFileShareBackupRequest): 17318 var afsbr AzureFileShareBackupRequest 17319 err := json.Unmarshal(body, &afsbr) 17320 return afsbr, err 17321 case string(ObjectTypeAzureWorkloadBackupRequest): 17322 var awbr AzureWorkloadBackupRequest 17323 err := json.Unmarshal(body, &awbr) 17324 return awbr, err 17325 case string(ObjectTypeIaasVMBackupRequest): 17326 var ivbr IaasVMBackupRequest 17327 err := json.Unmarshal(body, &ivbr) 17328 return ivbr, err 17329 default: 17330 var r Request 17331 err := json.Unmarshal(body, &r) 17332 return r, err 17333 } 17334} 17335func unmarshalBasicRequestArray(body []byte) ([]BasicRequest, error) { 17336 var rawMessages []*json.RawMessage 17337 err := json.Unmarshal(body, &rawMessages) 17338 if err != nil { 17339 return nil, err 17340 } 17341 17342 rArray := make([]BasicRequest, len(rawMessages)) 17343 17344 for index, rawMessage := range rawMessages { 17345 r, err := unmarshalBasicRequest(*rawMessage) 17346 if err != nil { 17347 return nil, err 17348 } 17349 rArray[index] = r 17350 } 17351 return rArray, nil 17352} 17353 17354// MarshalJSON is the custom marshaler for Request. 17355func (r Request) MarshalJSON() ([]byte, error) { 17356 r.ObjectType = ObjectTypeBackupRequest 17357 objectMap := make(map[string]interface{}) 17358 if r.ObjectType != "" { 17359 objectMap["objectType"] = r.ObjectType 17360 } 17361 return json.Marshal(objectMap) 17362} 17363 17364// AsAzureFileShareBackupRequest is the BasicRequest implementation for Request. 17365func (r Request) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) { 17366 return nil, false 17367} 17368 17369// AsAzureWorkloadBackupRequest is the BasicRequest implementation for Request. 17370func (r Request) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) { 17371 return nil, false 17372} 17373 17374// AsIaasVMBackupRequest is the BasicRequest implementation for Request. 17375func (r Request) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) { 17376 return nil, false 17377} 17378 17379// AsRequest is the BasicRequest implementation for Request. 17380func (r Request) AsRequest() (*Request, bool) { 17381 return &r, true 17382} 17383 17384// AsBasicRequest is the BasicRequest implementation for Request. 17385func (r Request) AsBasicRequest() (BasicRequest, bool) { 17386 return &r, true 17387} 17388 17389// RequestResource base class for backup request. Workload-specific backup requests are derived from this 17390// class. 17391type RequestResource struct { 17392 // Properties - BackupRequestResource properties 17393 Properties BasicRequest `json:"properties,omitempty"` 17394 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 17395 ID *string `json:"id,omitempty"` 17396 // Name - READ-ONLY; Resource name associated with the resource. 17397 Name *string `json:"name,omitempty"` 17398 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 17399 Type *string `json:"type,omitempty"` 17400 // Location - Resource location. 17401 Location *string `json:"location,omitempty"` 17402 // Tags - Resource tags. 17403 Tags map[string]*string `json:"tags"` 17404 // ETag - Optional ETag. 17405 ETag *string `json:"eTag,omitempty"` 17406} 17407 17408// MarshalJSON is the custom marshaler for RequestResource. 17409func (rr RequestResource) MarshalJSON() ([]byte, error) { 17410 objectMap := make(map[string]interface{}) 17411 objectMap["properties"] = rr.Properties 17412 if rr.Location != nil { 17413 objectMap["location"] = rr.Location 17414 } 17415 if rr.Tags != nil { 17416 objectMap["tags"] = rr.Tags 17417 } 17418 if rr.ETag != nil { 17419 objectMap["eTag"] = rr.ETag 17420 } 17421 return json.Marshal(objectMap) 17422} 17423 17424// UnmarshalJSON is the custom unmarshaler for RequestResource struct. 17425func (rr *RequestResource) UnmarshalJSON(body []byte) error { 17426 var m map[string]*json.RawMessage 17427 err := json.Unmarshal(body, &m) 17428 if err != nil { 17429 return err 17430 } 17431 for k, v := range m { 17432 switch k { 17433 case "properties": 17434 if v != nil { 17435 properties, err := unmarshalBasicRequest(*v) 17436 if err != nil { 17437 return err 17438 } 17439 rr.Properties = properties 17440 } 17441 case "id": 17442 if v != nil { 17443 var ID string 17444 err = json.Unmarshal(*v, &ID) 17445 if err != nil { 17446 return err 17447 } 17448 rr.ID = &ID 17449 } 17450 case "name": 17451 if v != nil { 17452 var name string 17453 err = json.Unmarshal(*v, &name) 17454 if err != nil { 17455 return err 17456 } 17457 rr.Name = &name 17458 } 17459 case "type": 17460 if v != nil { 17461 var typeVar string 17462 err = json.Unmarshal(*v, &typeVar) 17463 if err != nil { 17464 return err 17465 } 17466 rr.Type = &typeVar 17467 } 17468 case "location": 17469 if v != nil { 17470 var location string 17471 err = json.Unmarshal(*v, &location) 17472 if err != nil { 17473 return err 17474 } 17475 rr.Location = &location 17476 } 17477 case "tags": 17478 if v != nil { 17479 var tags map[string]*string 17480 err = json.Unmarshal(*v, &tags) 17481 if err != nil { 17482 return err 17483 } 17484 rr.Tags = tags 17485 } 17486 case "eTag": 17487 if v != nil { 17488 var eTag string 17489 err = json.Unmarshal(*v, &eTag) 17490 if err != nil { 17491 return err 17492 } 17493 rr.ETag = &eTag 17494 } 17495 } 17496 } 17497 17498 return nil 17499} 17500 17501// Resource ARM Resource. 17502type Resource struct { 17503 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 17504 ID *string `json:"id,omitempty"` 17505 // Name - READ-ONLY; Resource name associated with the resource. 17506 Name *string `json:"name,omitempty"` 17507 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 17508 Type *string `json:"type,omitempty"` 17509 // Location - Resource location. 17510 Location *string `json:"location,omitempty"` 17511 // Tags - Resource tags. 17512 Tags map[string]*string `json:"tags"` 17513 // ETag - Optional ETag. 17514 ETag *string `json:"eTag,omitempty"` 17515} 17516 17517// MarshalJSON is the custom marshaler for Resource. 17518func (r Resource) MarshalJSON() ([]byte, error) { 17519 objectMap := make(map[string]interface{}) 17520 if r.Location != nil { 17521 objectMap["location"] = r.Location 17522 } 17523 if r.Tags != nil { 17524 objectMap["tags"] = r.Tags 17525 } 17526 if r.ETag != nil { 17527 objectMap["eTag"] = r.ETag 17528 } 17529 return json.Marshal(objectMap) 17530} 17531 17532// ResourceConfig the resource storage details. 17533type ResourceConfig struct { 17534 // StorageModelType - Storage type. Possible values include: 'StorageTypeInvalid', 'StorageTypeGeoRedundant', 'StorageTypeLocallyRedundant' 17535 StorageModelType StorageType `json:"storageModelType,omitempty"` 17536 // StorageType - Storage type. Possible values include: 'StorageTypeInvalid', 'StorageTypeGeoRedundant', 'StorageTypeLocallyRedundant' 17537 StorageType StorageType `json:"storageType,omitempty"` 17538 // StorageTypeState - Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked. Possible values include: 'StorageTypeStateInvalid', 'StorageTypeStateLocked', 'StorageTypeStateUnlocked' 17539 StorageTypeState StorageTypeState `json:"storageTypeState,omitempty"` 17540} 17541 17542// ResourceConfigResource the resource storage details. 17543type ResourceConfigResource struct { 17544 autorest.Response `json:"-"` 17545 // Properties - BackupResourceConfigResource properties 17546 Properties *ResourceConfig `json:"properties,omitempty"` 17547 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 17548 ID *string `json:"id,omitempty"` 17549 // Name - READ-ONLY; Resource name associated with the resource. 17550 Name *string `json:"name,omitempty"` 17551 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 17552 Type *string `json:"type,omitempty"` 17553 // Location - Resource location. 17554 Location *string `json:"location,omitempty"` 17555 // Tags - Resource tags. 17556 Tags map[string]*string `json:"tags"` 17557 // ETag - Optional ETag. 17558 ETag *string `json:"eTag,omitempty"` 17559} 17560 17561// MarshalJSON is the custom marshaler for ResourceConfigResource. 17562func (rcr ResourceConfigResource) MarshalJSON() ([]byte, error) { 17563 objectMap := make(map[string]interface{}) 17564 if rcr.Properties != nil { 17565 objectMap["properties"] = rcr.Properties 17566 } 17567 if rcr.Location != nil { 17568 objectMap["location"] = rcr.Location 17569 } 17570 if rcr.Tags != nil { 17571 objectMap["tags"] = rcr.Tags 17572 } 17573 if rcr.ETag != nil { 17574 objectMap["eTag"] = rcr.ETag 17575 } 17576 return json.Marshal(objectMap) 17577} 17578 17579// ResourceHealthDetails health Details for backup items. 17580type ResourceHealthDetails struct { 17581 // Code - READ-ONLY; Health Code 17582 Code *int32 `json:"code,omitempty"` 17583 // Title - READ-ONLY; Health Title 17584 Title *string `json:"title,omitempty"` 17585 // Message - READ-ONLY; Health Message 17586 Message *string `json:"message,omitempty"` 17587 // Recommendations - READ-ONLY; Health Recommended Actions 17588 Recommendations *[]string `json:"recommendations,omitempty"` 17589} 17590 17591// MarshalJSON is the custom marshaler for ResourceHealthDetails. 17592func (rhd ResourceHealthDetails) MarshalJSON() ([]byte, error) { 17593 objectMap := make(map[string]interface{}) 17594 return json.Marshal(objectMap) 17595} 17596 17597// ResourceList base for all lists of resources. 17598type ResourceList struct { 17599 // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. 17600 NextLink *string `json:"nextLink,omitempty"` 17601} 17602 17603// ResourceVaultConfig backup resource vault config details. 17604type ResourceVaultConfig struct { 17605 // StorageModelType - Storage type. Possible values include: 'StorageTypeInvalid', 'StorageTypeGeoRedundant', 'StorageTypeLocallyRedundant' 17606 StorageModelType StorageType `json:"storageModelType,omitempty"` 17607 // StorageType - Storage type. Possible values include: 'StorageTypeInvalid', 'StorageTypeGeoRedundant', 'StorageTypeLocallyRedundant' 17608 StorageType StorageType `json:"storageType,omitempty"` 17609 // StorageTypeState - Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked. Possible values include: 'StorageTypeStateInvalid', 'StorageTypeStateLocked', 'StorageTypeStateUnlocked' 17610 StorageTypeState StorageTypeState `json:"storageTypeState,omitempty"` 17611 // EnhancedSecurityState - Enabled or Disabled. Possible values include: 'EnhancedSecurityStateInvalid', 'EnhancedSecurityStateEnabled', 'EnhancedSecurityStateDisabled' 17612 EnhancedSecurityState EnhancedSecurityState `json:"enhancedSecurityState,omitempty"` 17613 // SoftDeleteFeatureState - Soft Delete feature state. Possible values include: 'SoftDeleteFeatureStateInvalid', 'SoftDeleteFeatureStateEnabled', 'SoftDeleteFeatureStateDisabled' 17614 SoftDeleteFeatureState SoftDeleteFeatureState `json:"softDeleteFeatureState,omitempty"` 17615} 17616 17617// ResourceVaultConfigResource backup resource vault config details. 17618type ResourceVaultConfigResource struct { 17619 autorest.Response `json:"-"` 17620 // Properties - BackupResourceVaultConfigResource properties 17621 Properties *ResourceVaultConfig `json:"properties,omitempty"` 17622 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 17623 ID *string `json:"id,omitempty"` 17624 // Name - READ-ONLY; Resource name associated with the resource. 17625 Name *string `json:"name,omitempty"` 17626 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 17627 Type *string `json:"type,omitempty"` 17628 // Location - Resource location. 17629 Location *string `json:"location,omitempty"` 17630 // Tags - Resource tags. 17631 Tags map[string]*string `json:"tags"` 17632 // ETag - Optional ETag. 17633 ETag *string `json:"eTag,omitempty"` 17634} 17635 17636// MarshalJSON is the custom marshaler for ResourceVaultConfigResource. 17637func (rvcr ResourceVaultConfigResource) MarshalJSON() ([]byte, error) { 17638 objectMap := make(map[string]interface{}) 17639 if rvcr.Properties != nil { 17640 objectMap["properties"] = rvcr.Properties 17641 } 17642 if rvcr.Location != nil { 17643 objectMap["location"] = rvcr.Location 17644 } 17645 if rvcr.Tags != nil { 17646 objectMap["tags"] = rvcr.Tags 17647 } 17648 if rvcr.ETag != nil { 17649 objectMap["eTag"] = rvcr.ETag 17650 } 17651 return json.Marshal(objectMap) 17652} 17653 17654// RestoreFileSpecs restore file specs like file path, type and target folder path info. 17655type RestoreFileSpecs struct { 17656 // Path - Source File/Folder path 17657 Path *string `json:"path,omitempty"` 17658 // FileSpecType - Indicates what the Path variable stands for 17659 FileSpecType *string `json:"fileSpecType,omitempty"` 17660 // TargetFolderPath - Destination folder path in target FileShare 17661 TargetFolderPath *string `json:"targetFolderPath,omitempty"` 17662} 17663 17664// BasicRestoreRequest base class for restore request. Workload-specific restore requests are derived from this class. 17665type BasicRestoreRequest interface { 17666 AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) 17667 AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) 17668 AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) 17669 AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) 17670 AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) 17671 AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) 17672 AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) 17673 AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) 17674 AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) 17675 AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) 17676 AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) 17677 AsRestoreRequest() (*RestoreRequest, bool) 17678} 17679 17680// RestoreRequest base class for restore request. Workload-specific restore requests are derived from this 17681// class. 17682type RestoreRequest struct { 17683 // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' 17684 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` 17685} 17686 17687func unmarshalBasicRestoreRequest(body []byte) (BasicRestoreRequest, error) { 17688 var m map[string]interface{} 17689 err := json.Unmarshal(body, &m) 17690 if err != nil { 17691 return nil, err 17692 } 17693 17694 switch m["objectType"] { 17695 case string(ObjectTypeAzureFileShareRestoreRequest): 17696 var afsrr AzureFileShareRestoreRequest 17697 err := json.Unmarshal(body, &afsrr) 17698 return afsrr, err 17699 case string(ObjectTypeAzureWorkloadPointInTimeRestoreRequest): 17700 var awpitrr AzureWorkloadPointInTimeRestoreRequest 17701 err := json.Unmarshal(body, &awpitrr) 17702 return awpitrr, err 17703 case string(ObjectTypeAzureWorkloadRestoreRequest): 17704 var awrr AzureWorkloadRestoreRequest 17705 err := json.Unmarshal(body, &awrr) 17706 return awrr, err 17707 case string(ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest): 17708 var awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest 17709 err := json.Unmarshal(body, &awshpitrr) 17710 return awshpitrr, err 17711 case string(ObjectTypeAzureWorkloadSAPHanaRestoreRequest): 17712 var awshrr AzureWorkloadSAPHanaRestoreRequest 17713 err := json.Unmarshal(body, &awshrr) 17714 return awshrr, err 17715 case string(ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest): 17716 var awspitrr AzureWorkloadSQLPointInTimeRestoreRequest 17717 err := json.Unmarshal(body, &awspitrr) 17718 return awspitrr, err 17719 case string(ObjectTypeAzureWorkloadSQLRestoreRequest): 17720 var awsrr AzureWorkloadSQLRestoreRequest 17721 err := json.Unmarshal(body, &awsrr) 17722 return awsrr, err 17723 case string(ObjectTypeIaasVMRestoreRequest): 17724 var ivrr IaasVMRestoreRequest 17725 err := json.Unmarshal(body, &ivrr) 17726 return ivrr, err 17727 default: 17728 var rr RestoreRequest 17729 err := json.Unmarshal(body, &rr) 17730 return rr, err 17731 } 17732} 17733func unmarshalBasicRestoreRequestArray(body []byte) ([]BasicRestoreRequest, error) { 17734 var rawMessages []*json.RawMessage 17735 err := json.Unmarshal(body, &rawMessages) 17736 if err != nil { 17737 return nil, err 17738 } 17739 17740 rrArray := make([]BasicRestoreRequest, len(rawMessages)) 17741 17742 for index, rawMessage := range rawMessages { 17743 rr, err := unmarshalBasicRestoreRequest(*rawMessage) 17744 if err != nil { 17745 return nil, err 17746 } 17747 rrArray[index] = rr 17748 } 17749 return rrArray, nil 17750} 17751 17752// MarshalJSON is the custom marshaler for RestoreRequest. 17753func (rr RestoreRequest) MarshalJSON() ([]byte, error) { 17754 rr.ObjectType = ObjectTypeRestoreRequest 17755 objectMap := make(map[string]interface{}) 17756 if rr.ObjectType != "" { 17757 objectMap["objectType"] = rr.ObjectType 17758 } 17759 return json.Marshal(objectMap) 17760} 17761 17762// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. 17763func (rr RestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { 17764 return nil, false 17765} 17766 17767// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. 17768func (rr RestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { 17769 return nil, false 17770} 17771 17772// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. 17773func (rr RestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { 17774 return nil, false 17775} 17776 17777// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. 17778func (rr RestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { 17779 return nil, false 17780} 17781 17782// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. 17783func (rr RestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { 17784 return nil, false 17785} 17786 17787// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. 17788func (rr RestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { 17789 return nil, false 17790} 17791 17792// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. 17793func (rr RestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { 17794 return nil, false 17795} 17796 17797// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. 17798func (rr RestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { 17799 return nil, false 17800} 17801 17802// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. 17803func (rr RestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { 17804 return nil, false 17805} 17806 17807// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. 17808func (rr RestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { 17809 return nil, false 17810} 17811 17812// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. 17813func (rr RestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { 17814 return nil, false 17815} 17816 17817// AsRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. 17818func (rr RestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { 17819 return &rr, true 17820} 17821 17822// AsBasicRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. 17823func (rr RestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { 17824 return &rr, true 17825} 17826 17827// RestoreRequestResource base class for restore request. Workload-specific restore requests are derived 17828// from this class. 17829type RestoreRequestResource struct { 17830 // Properties - RestoreRequestResource properties 17831 Properties BasicRestoreRequest `json:"properties,omitempty"` 17832 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 17833 ID *string `json:"id,omitempty"` 17834 // Name - READ-ONLY; Resource name associated with the resource. 17835 Name *string `json:"name,omitempty"` 17836 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 17837 Type *string `json:"type,omitempty"` 17838 // Location - Resource location. 17839 Location *string `json:"location,omitempty"` 17840 // Tags - Resource tags. 17841 Tags map[string]*string `json:"tags"` 17842 // ETag - Optional ETag. 17843 ETag *string `json:"eTag,omitempty"` 17844} 17845 17846// MarshalJSON is the custom marshaler for RestoreRequestResource. 17847func (rrr RestoreRequestResource) MarshalJSON() ([]byte, error) { 17848 objectMap := make(map[string]interface{}) 17849 objectMap["properties"] = rrr.Properties 17850 if rrr.Location != nil { 17851 objectMap["location"] = rrr.Location 17852 } 17853 if rrr.Tags != nil { 17854 objectMap["tags"] = rrr.Tags 17855 } 17856 if rrr.ETag != nil { 17857 objectMap["eTag"] = rrr.ETag 17858 } 17859 return json.Marshal(objectMap) 17860} 17861 17862// UnmarshalJSON is the custom unmarshaler for RestoreRequestResource struct. 17863func (rrr *RestoreRequestResource) UnmarshalJSON(body []byte) error { 17864 var m map[string]*json.RawMessage 17865 err := json.Unmarshal(body, &m) 17866 if err != nil { 17867 return err 17868 } 17869 for k, v := range m { 17870 switch k { 17871 case "properties": 17872 if v != nil { 17873 properties, err := unmarshalBasicRestoreRequest(*v) 17874 if err != nil { 17875 return err 17876 } 17877 rrr.Properties = properties 17878 } 17879 case "id": 17880 if v != nil { 17881 var ID string 17882 err = json.Unmarshal(*v, &ID) 17883 if err != nil { 17884 return err 17885 } 17886 rrr.ID = &ID 17887 } 17888 case "name": 17889 if v != nil { 17890 var name string 17891 err = json.Unmarshal(*v, &name) 17892 if err != nil { 17893 return err 17894 } 17895 rrr.Name = &name 17896 } 17897 case "type": 17898 if v != nil { 17899 var typeVar string 17900 err = json.Unmarshal(*v, &typeVar) 17901 if err != nil { 17902 return err 17903 } 17904 rrr.Type = &typeVar 17905 } 17906 case "location": 17907 if v != nil { 17908 var location string 17909 err = json.Unmarshal(*v, &location) 17910 if err != nil { 17911 return err 17912 } 17913 rrr.Location = &location 17914 } 17915 case "tags": 17916 if v != nil { 17917 var tags map[string]*string 17918 err = json.Unmarshal(*v, &tags) 17919 if err != nil { 17920 return err 17921 } 17922 rrr.Tags = tags 17923 } 17924 case "eTag": 17925 if v != nil { 17926 var eTag string 17927 err = json.Unmarshal(*v, &eTag) 17928 if err != nil { 17929 return err 17930 } 17931 rrr.ETag = &eTag 17932 } 17933 } 17934 } 17935 17936 return nil 17937} 17938 17939// RetentionDuration retention duration. 17940type RetentionDuration struct { 17941 // Count - Count of duration types. Retention duration is obtained by the counting the duration type Count times. 17942 // For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks. 17943 Count *int32 `json:"count,omitempty"` 17944 // DurationType - Retention duration type of retention policy. Possible values include: 'RetentionDurationTypeInvalid', 'RetentionDurationTypeDays', 'RetentionDurationTypeWeeks', 'RetentionDurationTypeMonths', 'RetentionDurationTypeYears' 17945 DurationType RetentionDurationType `json:"durationType,omitempty"` 17946} 17947 17948// BasicRetentionPolicy base class for retention policy. 17949type BasicRetentionPolicy interface { 17950 AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) 17951 AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) 17952 AsRetentionPolicy() (*RetentionPolicy, bool) 17953} 17954 17955// RetentionPolicy base class for retention policy. 17956type RetentionPolicy struct { 17957 // RetentionPolicyType - Possible values include: 'RetentionPolicyTypeRetentionPolicy', 'RetentionPolicyTypeLongTermRetentionPolicy', 'RetentionPolicyTypeSimpleRetentionPolicy' 17958 RetentionPolicyType RetentionPolicyType `json:"retentionPolicyType,omitempty"` 17959} 17960 17961func unmarshalBasicRetentionPolicy(body []byte) (BasicRetentionPolicy, error) { 17962 var m map[string]interface{} 17963 err := json.Unmarshal(body, &m) 17964 if err != nil { 17965 return nil, err 17966 } 17967 17968 switch m["retentionPolicyType"] { 17969 case string(RetentionPolicyTypeLongTermRetentionPolicy): 17970 var ltrp LongTermRetentionPolicy 17971 err := json.Unmarshal(body, <rp) 17972 return ltrp, err 17973 case string(RetentionPolicyTypeSimpleRetentionPolicy): 17974 var srp SimpleRetentionPolicy 17975 err := json.Unmarshal(body, &srp) 17976 return srp, err 17977 default: 17978 var rp RetentionPolicy 17979 err := json.Unmarshal(body, &rp) 17980 return rp, err 17981 } 17982} 17983func unmarshalBasicRetentionPolicyArray(body []byte) ([]BasicRetentionPolicy, error) { 17984 var rawMessages []*json.RawMessage 17985 err := json.Unmarshal(body, &rawMessages) 17986 if err != nil { 17987 return nil, err 17988 } 17989 17990 rpArray := make([]BasicRetentionPolicy, len(rawMessages)) 17991 17992 for index, rawMessage := range rawMessages { 17993 rp, err := unmarshalBasicRetentionPolicy(*rawMessage) 17994 if err != nil { 17995 return nil, err 17996 } 17997 rpArray[index] = rp 17998 } 17999 return rpArray, nil 18000} 18001 18002// MarshalJSON is the custom marshaler for RetentionPolicy. 18003func (rp RetentionPolicy) MarshalJSON() ([]byte, error) { 18004 rp.RetentionPolicyType = RetentionPolicyTypeRetentionPolicy 18005 objectMap := make(map[string]interface{}) 18006 if rp.RetentionPolicyType != "" { 18007 objectMap["retentionPolicyType"] = rp.RetentionPolicyType 18008 } 18009 return json.Marshal(objectMap) 18010} 18011 18012// AsLongTermRetentionPolicy is the BasicRetentionPolicy implementation for RetentionPolicy. 18013func (rp RetentionPolicy) AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) { 18014 return nil, false 18015} 18016 18017// AsSimpleRetentionPolicy is the BasicRetentionPolicy implementation for RetentionPolicy. 18018func (rp RetentionPolicy) AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) { 18019 return nil, false 18020} 18021 18022// AsRetentionPolicy is the BasicRetentionPolicy implementation for RetentionPolicy. 18023func (rp RetentionPolicy) AsRetentionPolicy() (*RetentionPolicy, bool) { 18024 return &rp, true 18025} 18026 18027// AsBasicRetentionPolicy is the BasicRetentionPolicy implementation for RetentionPolicy. 18028func (rp RetentionPolicy) AsBasicRetentionPolicy() (BasicRetentionPolicy, bool) { 18029 return &rp, true 18030} 18031 18032// BasicSchedulePolicy base class for backup schedule. 18033type BasicSchedulePolicy interface { 18034 AsLogSchedulePolicy() (*LogSchedulePolicy, bool) 18035 AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) 18036 AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) 18037 AsSchedulePolicy() (*SchedulePolicy, bool) 18038} 18039 18040// SchedulePolicy base class for backup schedule. 18041type SchedulePolicy struct { 18042 // SchedulePolicyType - Possible values include: 'SchedulePolicyTypeSchedulePolicy', 'SchedulePolicyTypeLogSchedulePolicy', 'SchedulePolicyTypeLongTermSchedulePolicy', 'SchedulePolicyTypeSimpleSchedulePolicy' 18043 SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"` 18044} 18045 18046func unmarshalBasicSchedulePolicy(body []byte) (BasicSchedulePolicy, error) { 18047 var m map[string]interface{} 18048 err := json.Unmarshal(body, &m) 18049 if err != nil { 18050 return nil, err 18051 } 18052 18053 switch m["schedulePolicyType"] { 18054 case string(SchedulePolicyTypeLogSchedulePolicy): 18055 var lsp LogSchedulePolicy 18056 err := json.Unmarshal(body, &lsp) 18057 return lsp, err 18058 case string(SchedulePolicyTypeLongTermSchedulePolicy): 18059 var ltsp LongTermSchedulePolicy 18060 err := json.Unmarshal(body, <sp) 18061 return ltsp, err 18062 case string(SchedulePolicyTypeSimpleSchedulePolicy): 18063 var ssp SimpleSchedulePolicy 18064 err := json.Unmarshal(body, &ssp) 18065 return ssp, err 18066 default: 18067 var sp SchedulePolicy 18068 err := json.Unmarshal(body, &sp) 18069 return sp, err 18070 } 18071} 18072func unmarshalBasicSchedulePolicyArray(body []byte) ([]BasicSchedulePolicy, error) { 18073 var rawMessages []*json.RawMessage 18074 err := json.Unmarshal(body, &rawMessages) 18075 if err != nil { 18076 return nil, err 18077 } 18078 18079 spArray := make([]BasicSchedulePolicy, len(rawMessages)) 18080 18081 for index, rawMessage := range rawMessages { 18082 sp, err := unmarshalBasicSchedulePolicy(*rawMessage) 18083 if err != nil { 18084 return nil, err 18085 } 18086 spArray[index] = sp 18087 } 18088 return spArray, nil 18089} 18090 18091// MarshalJSON is the custom marshaler for SchedulePolicy. 18092func (sp SchedulePolicy) MarshalJSON() ([]byte, error) { 18093 sp.SchedulePolicyType = SchedulePolicyTypeSchedulePolicy 18094 objectMap := make(map[string]interface{}) 18095 if sp.SchedulePolicyType != "" { 18096 objectMap["schedulePolicyType"] = sp.SchedulePolicyType 18097 } 18098 return json.Marshal(objectMap) 18099} 18100 18101// AsLogSchedulePolicy is the BasicSchedulePolicy implementation for SchedulePolicy. 18102func (sp SchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) { 18103 return nil, false 18104} 18105 18106// AsLongTermSchedulePolicy is the BasicSchedulePolicy implementation for SchedulePolicy. 18107func (sp SchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) { 18108 return nil, false 18109} 18110 18111// AsSimpleSchedulePolicy is the BasicSchedulePolicy implementation for SchedulePolicy. 18112func (sp SchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) { 18113 return nil, false 18114} 18115 18116// AsSchedulePolicy is the BasicSchedulePolicy implementation for SchedulePolicy. 18117func (sp SchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) { 18118 return &sp, true 18119} 18120 18121// AsBasicSchedulePolicy is the BasicSchedulePolicy implementation for SchedulePolicy. 18122func (sp SchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) { 18123 return &sp, true 18124} 18125 18126// Settings common settings field for backup management 18127type Settings struct { 18128 // TimeZone - TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". 18129 TimeZone *string `json:"timeZone,omitempty"` 18130 // Issqlcompression - SQL compression flag 18131 Issqlcompression *bool `json:"issqlcompression,omitempty"` 18132 // IsCompression - Workload compression flag. This has been added so that 'isSqlCompression' 18133 // will be deprecated once clients upgrade to consider this flag. 18134 IsCompression *bool `json:"isCompression,omitempty"` 18135} 18136 18137// SimpleRetentionPolicy simple policy retention. 18138type SimpleRetentionPolicy struct { 18139 // RetentionDuration - Retention duration of the protection policy. 18140 RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` 18141 // RetentionPolicyType - Possible values include: 'RetentionPolicyTypeRetentionPolicy', 'RetentionPolicyTypeLongTermRetentionPolicy', 'RetentionPolicyTypeSimpleRetentionPolicy' 18142 RetentionPolicyType RetentionPolicyType `json:"retentionPolicyType,omitempty"` 18143} 18144 18145// MarshalJSON is the custom marshaler for SimpleRetentionPolicy. 18146func (srp SimpleRetentionPolicy) MarshalJSON() ([]byte, error) { 18147 srp.RetentionPolicyType = RetentionPolicyTypeSimpleRetentionPolicy 18148 objectMap := make(map[string]interface{}) 18149 if srp.RetentionDuration != nil { 18150 objectMap["retentionDuration"] = srp.RetentionDuration 18151 } 18152 if srp.RetentionPolicyType != "" { 18153 objectMap["retentionPolicyType"] = srp.RetentionPolicyType 18154 } 18155 return json.Marshal(objectMap) 18156} 18157 18158// AsLongTermRetentionPolicy is the BasicRetentionPolicy implementation for SimpleRetentionPolicy. 18159func (srp SimpleRetentionPolicy) AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) { 18160 return nil, false 18161} 18162 18163// AsSimpleRetentionPolicy is the BasicRetentionPolicy implementation for SimpleRetentionPolicy. 18164func (srp SimpleRetentionPolicy) AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) { 18165 return &srp, true 18166} 18167 18168// AsRetentionPolicy is the BasicRetentionPolicy implementation for SimpleRetentionPolicy. 18169func (srp SimpleRetentionPolicy) AsRetentionPolicy() (*RetentionPolicy, bool) { 18170 return nil, false 18171} 18172 18173// AsBasicRetentionPolicy is the BasicRetentionPolicy implementation for SimpleRetentionPolicy. 18174func (srp SimpleRetentionPolicy) AsBasicRetentionPolicy() (BasicRetentionPolicy, bool) { 18175 return &srp, true 18176} 18177 18178// SimpleSchedulePolicy simple policy schedule. 18179type SimpleSchedulePolicy struct { 18180 // ScheduleRunFrequency - Frequency of the schedule operation of this policy. Possible values include: 'ScheduleRunTypeInvalid', 'ScheduleRunTypeDaily', 'ScheduleRunTypeWeekly' 18181 ScheduleRunFrequency ScheduleRunType `json:"scheduleRunFrequency,omitempty"` 18182 // ScheduleRunDays - List of days of week this schedule has to be run. 18183 ScheduleRunDays *[]DayOfWeek `json:"scheduleRunDays,omitempty"` 18184 // ScheduleRunTimes - List of times of day this schedule has to be run. 18185 ScheduleRunTimes *[]date.Time `json:"scheduleRunTimes,omitempty"` 18186 // ScheduleWeeklyFrequency - At every number weeks this schedule has to be run. 18187 ScheduleWeeklyFrequency *int32 `json:"scheduleWeeklyFrequency,omitempty"` 18188 // SchedulePolicyType - Possible values include: 'SchedulePolicyTypeSchedulePolicy', 'SchedulePolicyTypeLogSchedulePolicy', 'SchedulePolicyTypeLongTermSchedulePolicy', 'SchedulePolicyTypeSimpleSchedulePolicy' 18189 SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"` 18190} 18191 18192// MarshalJSON is the custom marshaler for SimpleSchedulePolicy. 18193func (ssp SimpleSchedulePolicy) MarshalJSON() ([]byte, error) { 18194 ssp.SchedulePolicyType = SchedulePolicyTypeSimpleSchedulePolicy 18195 objectMap := make(map[string]interface{}) 18196 if ssp.ScheduleRunFrequency != "" { 18197 objectMap["scheduleRunFrequency"] = ssp.ScheduleRunFrequency 18198 } 18199 if ssp.ScheduleRunDays != nil { 18200 objectMap["scheduleRunDays"] = ssp.ScheduleRunDays 18201 } 18202 if ssp.ScheduleRunTimes != nil { 18203 objectMap["scheduleRunTimes"] = ssp.ScheduleRunTimes 18204 } 18205 if ssp.ScheduleWeeklyFrequency != nil { 18206 objectMap["scheduleWeeklyFrequency"] = ssp.ScheduleWeeklyFrequency 18207 } 18208 if ssp.SchedulePolicyType != "" { 18209 objectMap["schedulePolicyType"] = ssp.SchedulePolicyType 18210 } 18211 return json.Marshal(objectMap) 18212} 18213 18214// AsLogSchedulePolicy is the BasicSchedulePolicy implementation for SimpleSchedulePolicy. 18215func (ssp SimpleSchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) { 18216 return nil, false 18217} 18218 18219// AsLongTermSchedulePolicy is the BasicSchedulePolicy implementation for SimpleSchedulePolicy. 18220func (ssp SimpleSchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) { 18221 return nil, false 18222} 18223 18224// AsSimpleSchedulePolicy is the BasicSchedulePolicy implementation for SimpleSchedulePolicy. 18225func (ssp SimpleSchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) { 18226 return &ssp, true 18227} 18228 18229// AsSchedulePolicy is the BasicSchedulePolicy implementation for SimpleSchedulePolicy. 18230func (ssp SimpleSchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) { 18231 return nil, false 18232} 18233 18234// AsBasicSchedulePolicy is the BasicSchedulePolicy implementation for SimpleSchedulePolicy. 18235func (ssp SimpleSchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) { 18236 return &ssp, true 18237} 18238 18239// SQLDataDirectory sQLDataDirectory info 18240type SQLDataDirectory struct { 18241 // Type - Type of data directory mapping. Possible values include: 'SQLDataDirectoryTypeInvalid', 'SQLDataDirectoryTypeData', 'SQLDataDirectoryTypeLog' 18242 Type SQLDataDirectoryType `json:"type,omitempty"` 18243 // Path - File path 18244 Path *string `json:"path,omitempty"` 18245 // LogicalName - Logical name of the file 18246 LogicalName *string `json:"logicalName,omitempty"` 18247} 18248 18249// SQLDataDirectoryMapping encapsulates information regarding data directory 18250type SQLDataDirectoryMapping struct { 18251 // MappingType - Type of data directory mapping. Possible values include: 'SQLDataDirectoryTypeInvalid', 'SQLDataDirectoryTypeData', 'SQLDataDirectoryTypeLog' 18252 MappingType SQLDataDirectoryType `json:"mappingType,omitempty"` 18253 // SourceLogicalName - Restore source logical name path 18254 SourceLogicalName *string `json:"sourceLogicalName,omitempty"` 18255 // SourcePath - Restore source path 18256 SourcePath *string `json:"sourcePath,omitempty"` 18257 // TargetPath - Target path 18258 TargetPath *string `json:"targetPath,omitempty"` 18259} 18260 18261// StatusRequest backupStatus request. 18262type StatusRequest struct { 18263 // 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' 18264 ResourceType DataSourceType `json:"resourceType,omitempty"` 18265 // ResourceID - Entire ARM resource id of the resource 18266 ResourceID *string `json:"resourceId,omitempty"` 18267 // PoLogicalName - Protectable Item Logical Name 18268 PoLogicalName *string `json:"poLogicalName,omitempty"` 18269} 18270 18271// StatusResponse backupStatus response. 18272type StatusResponse struct { 18273 autorest.Response `json:"-"` 18274 // ProtectionStatus - Specifies whether the container is registered or not. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 18275 ProtectionStatus ProtectionStatus `json:"protectionStatus,omitempty"` 18276 // VaultID - Specifies the arm resource id of the vault 18277 VaultID *string `json:"vaultId,omitempty"` 18278 // FabricName - Specifies the fabric name - Azure or AD. Possible values include: 'FabricNameInvalid', 'FabricNameAzure' 18279 FabricName FabricName `json:"fabricName,omitempty"` 18280 // ContainerName - Specifies the product specific container name. E.g. iaasvmcontainer;iaasvmcontainer;csname;vmname. 18281 ContainerName *string `json:"containerName,omitempty"` 18282 // ProtectedItemName - Specifies the product specific ds name. E.g. vm;iaasvmcontainer;csname;vmname. 18283 ProtectedItemName *string `json:"protectedItemName,omitempty"` 18284 // ErrorCode - ErrorCode in case of intent failed 18285 ErrorCode *string `json:"errorCode,omitempty"` 18286 // ErrorMessage - ErrorMessage in case of intent failed. 18287 ErrorMessage *string `json:"errorMessage,omitempty"` 18288 // PolicyName - Specifies the policy name which is used for protection 18289 PolicyName *string `json:"policyName,omitempty"` 18290 // RegistrationStatus - Container registration status 18291 RegistrationStatus *string `json:"registrationStatus,omitempty"` 18292} 18293 18294// SubProtectionPolicy sub-protection policy which includes schedule and retention 18295type SubProtectionPolicy struct { 18296 // PolicyType - Type of backup policy type. Possible values include: 'PolicyTypeInvalid', 'PolicyTypeFull', 'PolicyTypeDifferential', 'PolicyTypeLog', 'PolicyTypeCopyOnlyFull' 18297 PolicyType PolicyType `json:"policyType,omitempty"` 18298 // SchedulePolicy - Backup schedule specified as part of backup policy. 18299 SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"` 18300 // RetentionPolicy - Retention policy with the details on backup copy retention ranges. 18301 RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"` 18302} 18303 18304// UnmarshalJSON is the custom unmarshaler for SubProtectionPolicy struct. 18305func (spp *SubProtectionPolicy) UnmarshalJSON(body []byte) error { 18306 var m map[string]*json.RawMessage 18307 err := json.Unmarshal(body, &m) 18308 if err != nil { 18309 return err 18310 } 18311 for k, v := range m { 18312 switch k { 18313 case "policyType": 18314 if v != nil { 18315 var policyType PolicyType 18316 err = json.Unmarshal(*v, &policyType) 18317 if err != nil { 18318 return err 18319 } 18320 spp.PolicyType = policyType 18321 } 18322 case "schedulePolicy": 18323 if v != nil { 18324 schedulePolicy, err := unmarshalBasicSchedulePolicy(*v) 18325 if err != nil { 18326 return err 18327 } 18328 spp.SchedulePolicy = schedulePolicy 18329 } 18330 case "retentionPolicy": 18331 if v != nil { 18332 retentionPolicy, err := unmarshalBasicRetentionPolicy(*v) 18333 if err != nil { 18334 return err 18335 } 18336 spp.RetentionPolicy = retentionPolicy 18337 } 18338 } 18339 } 18340 18341 return nil 18342} 18343 18344// TargetAFSRestoreInfo target Azure File Share Info. 18345type TargetAFSRestoreInfo struct { 18346 // Name - File share name 18347 Name *string `json:"name,omitempty"` 18348 // TargetResourceID - Target file share resource ARM ID 18349 TargetResourceID *string `json:"targetResourceId,omitempty"` 18350} 18351 18352// TargetRestoreInfo details about target workload during restore operation. 18353type TargetRestoreInfo struct { 18354 // OverwriteOption - Can Overwrite if Target DataBase already exists. Possible values include: 'OverwriteOptionsInvalid', 'OverwriteOptionsFailOnConflict', 'OverwriteOptionsOverwrite' 18355 OverwriteOption OverwriteOptions `json:"overwriteOption,omitempty"` 18356 // ContainerID - Resource Id name of the container in which Target DataBase resides 18357 ContainerID *string `json:"containerId,omitempty"` 18358 // DatabaseName - Database name InstanceName/DataBaseName for SQL or System/DbName for SAP Hana 18359 DatabaseName *string `json:"databaseName,omitempty"` 18360 // TargetDirectoryForFileRestore - Target directory location for restore as files. 18361 TargetDirectoryForFileRestore *string `json:"targetDirectoryForFileRestore,omitempty"` 18362} 18363 18364// TokenInformation the token information details. 18365type TokenInformation struct { 18366 autorest.Response `json:"-"` 18367 // Token - Token value. 18368 Token *string `json:"token,omitempty"` 18369 // ExpiryTimeInUtcTicks - Expiry time of token. 18370 ExpiryTimeInUtcTicks *int64 `json:"expiryTimeInUtcTicks,omitempty"` 18371 // SecurityPIN - Security PIN 18372 SecurityPIN *string `json:"securityPIN,omitempty"` 18373} 18374 18375// ValidateIaasVMRestoreOperationRequest azureRestoreValidation request. 18376type ValidateIaasVMRestoreOperationRequest struct { 18377 // RestoreRequest - Sets restore request to be validated 18378 RestoreRequest BasicRestoreRequest `json:"restoreRequest,omitempty"` 18379 // ObjectType - Possible values include: 'ObjectTypeValidateOperationRequest', 'ObjectTypeValidateIaasVMRestoreOperationRequest', 'ObjectTypeValidateRestoreOperationRequest' 18380 ObjectType ObjectTypeBasicValidateOperationRequest `json:"objectType,omitempty"` 18381} 18382 18383// MarshalJSON is the custom marshaler for ValidateIaasVMRestoreOperationRequest. 18384func (vivror ValidateIaasVMRestoreOperationRequest) MarshalJSON() ([]byte, error) { 18385 vivror.ObjectType = ObjectTypeValidateIaasVMRestoreOperationRequest 18386 objectMap := make(map[string]interface{}) 18387 objectMap["restoreRequest"] = vivror.RestoreRequest 18388 if vivror.ObjectType != "" { 18389 objectMap["objectType"] = vivror.ObjectType 18390 } 18391 return json.Marshal(objectMap) 18392} 18393 18394// AsValidateIaasVMRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateIaasVMRestoreOperationRequest. 18395func (vivror ValidateIaasVMRestoreOperationRequest) AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) { 18396 return &vivror, true 18397} 18398 18399// AsValidateRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateIaasVMRestoreOperationRequest. 18400func (vivror ValidateIaasVMRestoreOperationRequest) AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) { 18401 return nil, false 18402} 18403 18404// AsBasicValidateRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateIaasVMRestoreOperationRequest. 18405func (vivror ValidateIaasVMRestoreOperationRequest) AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool) { 18406 return &vivror, true 18407} 18408 18409// AsValidateOperationRequest is the BasicValidateOperationRequest implementation for ValidateIaasVMRestoreOperationRequest. 18410func (vivror ValidateIaasVMRestoreOperationRequest) AsValidateOperationRequest() (*ValidateOperationRequest, bool) { 18411 return nil, false 18412} 18413 18414// AsBasicValidateOperationRequest is the BasicValidateOperationRequest implementation for ValidateIaasVMRestoreOperationRequest. 18415func (vivror ValidateIaasVMRestoreOperationRequest) AsBasicValidateOperationRequest() (BasicValidateOperationRequest, bool) { 18416 return &vivror, true 18417} 18418 18419// UnmarshalJSON is the custom unmarshaler for ValidateIaasVMRestoreOperationRequest struct. 18420func (vivror *ValidateIaasVMRestoreOperationRequest) UnmarshalJSON(body []byte) error { 18421 var m map[string]*json.RawMessage 18422 err := json.Unmarshal(body, &m) 18423 if err != nil { 18424 return err 18425 } 18426 for k, v := range m { 18427 switch k { 18428 case "restoreRequest": 18429 if v != nil { 18430 restoreRequest, err := unmarshalBasicRestoreRequest(*v) 18431 if err != nil { 18432 return err 18433 } 18434 vivror.RestoreRequest = restoreRequest 18435 } 18436 case "objectType": 18437 if v != nil { 18438 var objectType ObjectTypeBasicValidateOperationRequest 18439 err = json.Unmarshal(*v, &objectType) 18440 if err != nil { 18441 return err 18442 } 18443 vivror.ObjectType = objectType 18444 } 18445 } 18446 } 18447 18448 return nil 18449} 18450 18451// BasicValidateOperationRequest base class for validate operation request. 18452type BasicValidateOperationRequest interface { 18453 AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) 18454 AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) 18455 AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool) 18456 AsValidateOperationRequest() (*ValidateOperationRequest, bool) 18457} 18458 18459// ValidateOperationRequest base class for validate operation request. 18460type ValidateOperationRequest struct { 18461 // ObjectType - Possible values include: 'ObjectTypeValidateOperationRequest', 'ObjectTypeValidateIaasVMRestoreOperationRequest', 'ObjectTypeValidateRestoreOperationRequest' 18462 ObjectType ObjectTypeBasicValidateOperationRequest `json:"objectType,omitempty"` 18463} 18464 18465func unmarshalBasicValidateOperationRequest(body []byte) (BasicValidateOperationRequest, error) { 18466 var m map[string]interface{} 18467 err := json.Unmarshal(body, &m) 18468 if err != nil { 18469 return nil, err 18470 } 18471 18472 switch m["objectType"] { 18473 case string(ObjectTypeValidateIaasVMRestoreOperationRequest): 18474 var vivror ValidateIaasVMRestoreOperationRequest 18475 err := json.Unmarshal(body, &vivror) 18476 return vivror, err 18477 case string(ObjectTypeValidateRestoreOperationRequest): 18478 var vror ValidateRestoreOperationRequest 18479 err := json.Unmarshal(body, &vror) 18480 return vror, err 18481 default: 18482 var vor ValidateOperationRequest 18483 err := json.Unmarshal(body, &vor) 18484 return vor, err 18485 } 18486} 18487func unmarshalBasicValidateOperationRequestArray(body []byte) ([]BasicValidateOperationRequest, error) { 18488 var rawMessages []*json.RawMessage 18489 err := json.Unmarshal(body, &rawMessages) 18490 if err != nil { 18491 return nil, err 18492 } 18493 18494 vorArray := make([]BasicValidateOperationRequest, len(rawMessages)) 18495 18496 for index, rawMessage := range rawMessages { 18497 vor, err := unmarshalBasicValidateOperationRequest(*rawMessage) 18498 if err != nil { 18499 return nil, err 18500 } 18501 vorArray[index] = vor 18502 } 18503 return vorArray, nil 18504} 18505 18506// MarshalJSON is the custom marshaler for ValidateOperationRequest. 18507func (vor ValidateOperationRequest) MarshalJSON() ([]byte, error) { 18508 vor.ObjectType = ObjectTypeValidateOperationRequest 18509 objectMap := make(map[string]interface{}) 18510 if vor.ObjectType != "" { 18511 objectMap["objectType"] = vor.ObjectType 18512 } 18513 return json.Marshal(objectMap) 18514} 18515 18516// AsValidateIaasVMRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateOperationRequest. 18517func (vor ValidateOperationRequest) AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) { 18518 return nil, false 18519} 18520 18521// AsValidateRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateOperationRequest. 18522func (vor ValidateOperationRequest) AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) { 18523 return nil, false 18524} 18525 18526// AsBasicValidateRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateOperationRequest. 18527func (vor ValidateOperationRequest) AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool) { 18528 return nil, false 18529} 18530 18531// AsValidateOperationRequest is the BasicValidateOperationRequest implementation for ValidateOperationRequest. 18532func (vor ValidateOperationRequest) AsValidateOperationRequest() (*ValidateOperationRequest, bool) { 18533 return &vor, true 18534} 18535 18536// AsBasicValidateOperationRequest is the BasicValidateOperationRequest implementation for ValidateOperationRequest. 18537func (vor ValidateOperationRequest) AsBasicValidateOperationRequest() (BasicValidateOperationRequest, bool) { 18538 return &vor, true 18539} 18540 18541// ValidateOperationResponse base class for validate operation response. 18542type ValidateOperationResponse struct { 18543 // ValidationResults - Gets the validation result 18544 ValidationResults *[]ErrorDetail `json:"validationResults,omitempty"` 18545} 18546 18547// ValidateOperationsResponse ... 18548type ValidateOperationsResponse struct { 18549 autorest.Response `json:"-"` 18550 ValidateOperationResponse *ValidateOperationResponse `json:"validateOperationResponse,omitempty"` 18551} 18552 18553// BasicValidateRestoreOperationRequest azureRestoreValidation request. 18554type BasicValidateRestoreOperationRequest interface { 18555 AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) 18556 AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) 18557} 18558 18559// ValidateRestoreOperationRequest azureRestoreValidation request. 18560type ValidateRestoreOperationRequest struct { 18561 // RestoreRequest - Sets restore request to be validated 18562 RestoreRequest BasicRestoreRequest `json:"restoreRequest,omitempty"` 18563 // ObjectType - Possible values include: 'ObjectTypeValidateOperationRequest', 'ObjectTypeValidateIaasVMRestoreOperationRequest', 'ObjectTypeValidateRestoreOperationRequest' 18564 ObjectType ObjectTypeBasicValidateOperationRequest `json:"objectType,omitempty"` 18565} 18566 18567func unmarshalBasicValidateRestoreOperationRequest(body []byte) (BasicValidateRestoreOperationRequest, error) { 18568 var m map[string]interface{} 18569 err := json.Unmarshal(body, &m) 18570 if err != nil { 18571 return nil, err 18572 } 18573 18574 switch m["objectType"] { 18575 case string(ObjectTypeValidateIaasVMRestoreOperationRequest): 18576 var vivror ValidateIaasVMRestoreOperationRequest 18577 err := json.Unmarshal(body, &vivror) 18578 return vivror, err 18579 default: 18580 var vror ValidateRestoreOperationRequest 18581 err := json.Unmarshal(body, &vror) 18582 return vror, err 18583 } 18584} 18585func unmarshalBasicValidateRestoreOperationRequestArray(body []byte) ([]BasicValidateRestoreOperationRequest, error) { 18586 var rawMessages []*json.RawMessage 18587 err := json.Unmarshal(body, &rawMessages) 18588 if err != nil { 18589 return nil, err 18590 } 18591 18592 vrorArray := make([]BasicValidateRestoreOperationRequest, len(rawMessages)) 18593 18594 for index, rawMessage := range rawMessages { 18595 vror, err := unmarshalBasicValidateRestoreOperationRequest(*rawMessage) 18596 if err != nil { 18597 return nil, err 18598 } 18599 vrorArray[index] = vror 18600 } 18601 return vrorArray, nil 18602} 18603 18604// MarshalJSON is the custom marshaler for ValidateRestoreOperationRequest. 18605func (vror ValidateRestoreOperationRequest) MarshalJSON() ([]byte, error) { 18606 vror.ObjectType = ObjectTypeValidateRestoreOperationRequest 18607 objectMap := make(map[string]interface{}) 18608 objectMap["restoreRequest"] = vror.RestoreRequest 18609 if vror.ObjectType != "" { 18610 objectMap["objectType"] = vror.ObjectType 18611 } 18612 return json.Marshal(objectMap) 18613} 18614 18615// AsValidateIaasVMRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateRestoreOperationRequest. 18616func (vror ValidateRestoreOperationRequest) AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) { 18617 return nil, false 18618} 18619 18620// AsValidateRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateRestoreOperationRequest. 18621func (vror ValidateRestoreOperationRequest) AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) { 18622 return &vror, true 18623} 18624 18625// AsBasicValidateRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateRestoreOperationRequest. 18626func (vror ValidateRestoreOperationRequest) AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool) { 18627 return &vror, true 18628} 18629 18630// AsValidateOperationRequest is the BasicValidateOperationRequest implementation for ValidateRestoreOperationRequest. 18631func (vror ValidateRestoreOperationRequest) AsValidateOperationRequest() (*ValidateOperationRequest, bool) { 18632 return nil, false 18633} 18634 18635// AsBasicValidateOperationRequest is the BasicValidateOperationRequest implementation for ValidateRestoreOperationRequest. 18636func (vror ValidateRestoreOperationRequest) AsBasicValidateOperationRequest() (BasicValidateOperationRequest, bool) { 18637 return &vror, true 18638} 18639 18640// UnmarshalJSON is the custom unmarshaler for ValidateRestoreOperationRequest struct. 18641func (vror *ValidateRestoreOperationRequest) UnmarshalJSON(body []byte) error { 18642 var m map[string]*json.RawMessage 18643 err := json.Unmarshal(body, &m) 18644 if err != nil { 18645 return err 18646 } 18647 for k, v := range m { 18648 switch k { 18649 case "restoreRequest": 18650 if v != nil { 18651 restoreRequest, err := unmarshalBasicRestoreRequest(*v) 18652 if err != nil { 18653 return err 18654 } 18655 vror.RestoreRequest = restoreRequest 18656 } 18657 case "objectType": 18658 if v != nil { 18659 var objectType ObjectTypeBasicValidateOperationRequest 18660 err = json.Unmarshal(*v, &objectType) 18661 if err != nil { 18662 return err 18663 } 18664 vror.ObjectType = objectType 18665 } 18666 } 18667 } 18668 18669 return nil 18670} 18671 18672// WeeklyRetentionFormat weekly retention format. 18673type WeeklyRetentionFormat struct { 18674 // DaysOfTheWeek - List of days of the week. 18675 DaysOfTheWeek *[]DayOfWeek `json:"daysOfTheWeek,omitempty"` 18676 // WeeksOfTheMonth - List of weeks of month. 18677 WeeksOfTheMonth *[]WeekOfMonth `json:"weeksOfTheMonth,omitempty"` 18678} 18679 18680// WeeklyRetentionSchedule weekly retention schedule. 18681type WeeklyRetentionSchedule struct { 18682 // DaysOfTheWeek - List of days of week for weekly retention policy. 18683 DaysOfTheWeek *[]DayOfWeek `json:"daysOfTheWeek,omitempty"` 18684 // RetentionTimes - Retention times of retention policy. 18685 RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"` 18686 // RetentionDuration - Retention duration of retention Policy. 18687 RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` 18688} 18689 18690// WorkloadInquiryDetails details of an inquired protectable item. 18691type WorkloadInquiryDetails struct { 18692 // Type - Type of the Workload such as SQL, Oracle etc. 18693 Type *string `json:"type,omitempty"` 18694 // ItemCount - Contains the protectable item Count inside this Container. 18695 ItemCount *int64 `json:"itemCount,omitempty"` 18696 // InquiryValidation - Inquiry validation such as permissions and other backup validations. 18697 InquiryValidation *InquiryValidation `json:"inquiryValidation,omitempty"` 18698} 18699 18700// BasicWorkloadItem base class for backup item. Workload-specific backup items are derived from this class. 18701type BasicWorkloadItem interface { 18702 AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) 18703 AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) 18704 AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) 18705 AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) 18706 AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) 18707 AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) 18708 AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) 18709 AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) 18710 AsWorkloadItem() (*WorkloadItem, bool) 18711} 18712 18713// WorkloadItem base class for backup item. Workload-specific backup items are derived from this class. 18714type WorkloadItem struct { 18715 // BackupManagementType - Type of backup management to backup an item. 18716 BackupManagementType *string `json:"backupManagementType,omitempty"` 18717 // WorkloadType - Type of workload for the backup management 18718 WorkloadType *string `json:"workloadType,omitempty"` 18719 // FriendlyName - Friendly name of the backup item. 18720 FriendlyName *string `json:"friendlyName,omitempty"` 18721 // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 18722 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 18723 // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' 18724 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` 18725} 18726 18727func unmarshalBasicWorkloadItem(body []byte) (BasicWorkloadItem, error) { 18728 var m map[string]interface{} 18729 err := json.Unmarshal(body, &m) 18730 if err != nil { 18731 return nil, err 18732 } 18733 18734 switch m["workloadItemType"] { 18735 case string(WorkloadItemTypeAzureVMWorkloadItem): 18736 var avwi AzureVMWorkloadItem 18737 err := json.Unmarshal(body, &avwi) 18738 return avwi, err 18739 case string(WorkloadItemTypeSAPAseDatabase1): 18740 var avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem 18741 err := json.Unmarshal(body, &avwsadwi) 18742 return avwsadwi, err 18743 case string(WorkloadItemTypeSAPAseSystem1): 18744 var avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem 18745 err := json.Unmarshal(body, &avwsaswi) 18746 return avwsaswi, err 18747 case string(WorkloadItemTypeSAPHanaDatabase1): 18748 var avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem 18749 err := json.Unmarshal(body, &avwshdwi) 18750 return avwshdwi, err 18751 case string(WorkloadItemTypeSAPHanaSystem1): 18752 var avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem 18753 err := json.Unmarshal(body, &avwshswi) 18754 return avwshswi, err 18755 case string(WorkloadItemTypeSQLDataBase1): 18756 var avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem 18757 err := json.Unmarshal(body, &avwsdwi) 18758 return avwsdwi, err 18759 case string(WorkloadItemTypeSQLInstance1): 18760 var avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem 18761 err := json.Unmarshal(body, &avwsiwi) 18762 return avwsiwi, err 18763 default: 18764 var wi WorkloadItem 18765 err := json.Unmarshal(body, &wi) 18766 return wi, err 18767 } 18768} 18769func unmarshalBasicWorkloadItemArray(body []byte) ([]BasicWorkloadItem, error) { 18770 var rawMessages []*json.RawMessage 18771 err := json.Unmarshal(body, &rawMessages) 18772 if err != nil { 18773 return nil, err 18774 } 18775 18776 wiArray := make([]BasicWorkloadItem, len(rawMessages)) 18777 18778 for index, rawMessage := range rawMessages { 18779 wi, err := unmarshalBasicWorkloadItem(*rawMessage) 18780 if err != nil { 18781 return nil, err 18782 } 18783 wiArray[index] = wi 18784 } 18785 return wiArray, nil 18786} 18787 18788// MarshalJSON is the custom marshaler for WorkloadItem. 18789func (wi WorkloadItem) MarshalJSON() ([]byte, error) { 18790 wi.WorkloadItemType = WorkloadItemTypeWorkloadItem 18791 objectMap := make(map[string]interface{}) 18792 if wi.BackupManagementType != nil { 18793 objectMap["backupManagementType"] = wi.BackupManagementType 18794 } 18795 if wi.WorkloadType != nil { 18796 objectMap["workloadType"] = wi.WorkloadType 18797 } 18798 if wi.FriendlyName != nil { 18799 objectMap["friendlyName"] = wi.FriendlyName 18800 } 18801 if wi.ProtectionState != "" { 18802 objectMap["protectionState"] = wi.ProtectionState 18803 } 18804 if wi.WorkloadItemType != "" { 18805 objectMap["workloadItemType"] = wi.WorkloadItemType 18806 } 18807 return json.Marshal(objectMap) 18808} 18809 18810// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. 18811func (wi WorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { 18812 return nil, false 18813} 18814 18815// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. 18816func (wi WorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { 18817 return nil, false 18818} 18819 18820// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. 18821func (wi WorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { 18822 return nil, false 18823} 18824 18825// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. 18826func (wi WorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { 18827 return nil, false 18828} 18829 18830// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. 18831func (wi WorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { 18832 return nil, false 18833} 18834 18835// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. 18836func (wi WorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { 18837 return nil, false 18838} 18839 18840// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. 18841func (wi WorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { 18842 return nil, false 18843} 18844 18845// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. 18846func (wi WorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { 18847 return nil, false 18848} 18849 18850// AsWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. 18851func (wi WorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { 18852 return &wi, true 18853} 18854 18855// AsBasicWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. 18856func (wi WorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { 18857 return &wi, true 18858} 18859 18860// WorkloadItemResource base class for backup item. Workload-specific backup items are derived from this 18861// class. 18862type WorkloadItemResource struct { 18863 // Properties - WorkloadItemResource properties 18864 Properties BasicWorkloadItem `json:"properties,omitempty"` 18865 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 18866 ID *string `json:"id,omitempty"` 18867 // Name - READ-ONLY; Resource name associated with the resource. 18868 Name *string `json:"name,omitempty"` 18869 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 18870 Type *string `json:"type,omitempty"` 18871 // Location - Resource location. 18872 Location *string `json:"location,omitempty"` 18873 // Tags - Resource tags. 18874 Tags map[string]*string `json:"tags"` 18875 // ETag - Optional ETag. 18876 ETag *string `json:"eTag,omitempty"` 18877} 18878 18879// MarshalJSON is the custom marshaler for WorkloadItemResource. 18880func (wir WorkloadItemResource) MarshalJSON() ([]byte, error) { 18881 objectMap := make(map[string]interface{}) 18882 objectMap["properties"] = wir.Properties 18883 if wir.Location != nil { 18884 objectMap["location"] = wir.Location 18885 } 18886 if wir.Tags != nil { 18887 objectMap["tags"] = wir.Tags 18888 } 18889 if wir.ETag != nil { 18890 objectMap["eTag"] = wir.ETag 18891 } 18892 return json.Marshal(objectMap) 18893} 18894 18895// UnmarshalJSON is the custom unmarshaler for WorkloadItemResource struct. 18896func (wir *WorkloadItemResource) UnmarshalJSON(body []byte) error { 18897 var m map[string]*json.RawMessage 18898 err := json.Unmarshal(body, &m) 18899 if err != nil { 18900 return err 18901 } 18902 for k, v := range m { 18903 switch k { 18904 case "properties": 18905 if v != nil { 18906 properties, err := unmarshalBasicWorkloadItem(*v) 18907 if err != nil { 18908 return err 18909 } 18910 wir.Properties = properties 18911 } 18912 case "id": 18913 if v != nil { 18914 var ID string 18915 err = json.Unmarshal(*v, &ID) 18916 if err != nil { 18917 return err 18918 } 18919 wir.ID = &ID 18920 } 18921 case "name": 18922 if v != nil { 18923 var name string 18924 err = json.Unmarshal(*v, &name) 18925 if err != nil { 18926 return err 18927 } 18928 wir.Name = &name 18929 } 18930 case "type": 18931 if v != nil { 18932 var typeVar string 18933 err = json.Unmarshal(*v, &typeVar) 18934 if err != nil { 18935 return err 18936 } 18937 wir.Type = &typeVar 18938 } 18939 case "location": 18940 if v != nil { 18941 var location string 18942 err = json.Unmarshal(*v, &location) 18943 if err != nil { 18944 return err 18945 } 18946 wir.Location = &location 18947 } 18948 case "tags": 18949 if v != nil { 18950 var tags map[string]*string 18951 err = json.Unmarshal(*v, &tags) 18952 if err != nil { 18953 return err 18954 } 18955 wir.Tags = tags 18956 } 18957 case "eTag": 18958 if v != nil { 18959 var eTag string 18960 err = json.Unmarshal(*v, &eTag) 18961 if err != nil { 18962 return err 18963 } 18964 wir.ETag = &eTag 18965 } 18966 } 18967 } 18968 18969 return nil 18970} 18971 18972// WorkloadItemResourceList list of WorkloadItem resources 18973type WorkloadItemResourceList struct { 18974 autorest.Response `json:"-"` 18975 // Value - List of resources. 18976 Value *[]WorkloadItemResource `json:"value,omitempty"` 18977 // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. 18978 NextLink *string `json:"nextLink,omitempty"` 18979} 18980 18981// WorkloadItemResourceListIterator provides access to a complete listing of WorkloadItemResource values. 18982type WorkloadItemResourceListIterator struct { 18983 i int 18984 page WorkloadItemResourceListPage 18985} 18986 18987// NextWithContext advances to the next value. If there was an error making 18988// the request the iterator does not advance and the error is returned. 18989func (iter *WorkloadItemResourceListIterator) NextWithContext(ctx context.Context) (err error) { 18990 if tracing.IsEnabled() { 18991 ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadItemResourceListIterator.NextWithContext") 18992 defer func() { 18993 sc := -1 18994 if iter.Response().Response.Response != nil { 18995 sc = iter.Response().Response.Response.StatusCode 18996 } 18997 tracing.EndSpan(ctx, sc, err) 18998 }() 18999 } 19000 iter.i++ 19001 if iter.i < len(iter.page.Values()) { 19002 return nil 19003 } 19004 err = iter.page.NextWithContext(ctx) 19005 if err != nil { 19006 iter.i-- 19007 return err 19008 } 19009 iter.i = 0 19010 return nil 19011} 19012 19013// Next advances to the next value. If there was an error making 19014// the request the iterator does not advance and the error is returned. 19015// Deprecated: Use NextWithContext() instead. 19016func (iter *WorkloadItemResourceListIterator) Next() error { 19017 return iter.NextWithContext(context.Background()) 19018} 19019 19020// NotDone returns true if the enumeration should be started or is not yet complete. 19021func (iter WorkloadItemResourceListIterator) NotDone() bool { 19022 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 19023} 19024 19025// Response returns the raw server response from the last page request. 19026func (iter WorkloadItemResourceListIterator) Response() WorkloadItemResourceList { 19027 return iter.page.Response() 19028} 19029 19030// Value returns the current value or a zero-initialized value if the 19031// iterator has advanced beyond the end of the collection. 19032func (iter WorkloadItemResourceListIterator) Value() WorkloadItemResource { 19033 if !iter.page.NotDone() { 19034 return WorkloadItemResource{} 19035 } 19036 return iter.page.Values()[iter.i] 19037} 19038 19039// Creates a new instance of the WorkloadItemResourceListIterator type. 19040func NewWorkloadItemResourceListIterator(page WorkloadItemResourceListPage) WorkloadItemResourceListIterator { 19041 return WorkloadItemResourceListIterator{page: page} 19042} 19043 19044// IsEmpty returns true if the ListResult contains no values. 19045func (wirl WorkloadItemResourceList) IsEmpty() bool { 19046 return wirl.Value == nil || len(*wirl.Value) == 0 19047} 19048 19049// hasNextLink returns true if the NextLink is not empty. 19050func (wirl WorkloadItemResourceList) hasNextLink() bool { 19051 return wirl.NextLink != nil && len(*wirl.NextLink) != 0 19052} 19053 19054// workloadItemResourceListPreparer prepares a request to retrieve the next set of results. 19055// It returns nil if no more results exist. 19056func (wirl WorkloadItemResourceList) workloadItemResourceListPreparer(ctx context.Context) (*http.Request, error) { 19057 if !wirl.hasNextLink() { 19058 return nil, nil 19059 } 19060 return autorest.Prepare((&http.Request{}).WithContext(ctx), 19061 autorest.AsJSON(), 19062 autorest.AsGet(), 19063 autorest.WithBaseURL(to.String(wirl.NextLink))) 19064} 19065 19066// WorkloadItemResourceListPage contains a page of WorkloadItemResource values. 19067type WorkloadItemResourceListPage struct { 19068 fn func(context.Context, WorkloadItemResourceList) (WorkloadItemResourceList, error) 19069 wirl WorkloadItemResourceList 19070} 19071 19072// NextWithContext advances to the next page of values. If there was an error making 19073// the request the page does not advance and the error is returned. 19074func (page *WorkloadItemResourceListPage) NextWithContext(ctx context.Context) (err error) { 19075 if tracing.IsEnabled() { 19076 ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadItemResourceListPage.NextWithContext") 19077 defer func() { 19078 sc := -1 19079 if page.Response().Response.Response != nil { 19080 sc = page.Response().Response.Response.StatusCode 19081 } 19082 tracing.EndSpan(ctx, sc, err) 19083 }() 19084 } 19085 for { 19086 next, err := page.fn(ctx, page.wirl) 19087 if err != nil { 19088 return err 19089 } 19090 page.wirl = next 19091 if !next.hasNextLink() || !next.IsEmpty() { 19092 break 19093 } 19094 } 19095 return nil 19096} 19097 19098// Next advances to the next page of values. If there was an error making 19099// the request the page does not advance and the error is returned. 19100// Deprecated: Use NextWithContext() instead. 19101func (page *WorkloadItemResourceListPage) Next() error { 19102 return page.NextWithContext(context.Background()) 19103} 19104 19105// NotDone returns true if the page enumeration should be started or is not yet complete. 19106func (page WorkloadItemResourceListPage) NotDone() bool { 19107 return !page.wirl.IsEmpty() 19108} 19109 19110// Response returns the raw server response from the last page request. 19111func (page WorkloadItemResourceListPage) Response() WorkloadItemResourceList { 19112 return page.wirl 19113} 19114 19115// Values returns the slice of values for the current page or nil if there are no values. 19116func (page WorkloadItemResourceListPage) Values() []WorkloadItemResource { 19117 if page.wirl.IsEmpty() { 19118 return nil 19119 } 19120 return *page.wirl.Value 19121} 19122 19123// Creates a new instance of the WorkloadItemResourceListPage type. 19124func NewWorkloadItemResourceListPage(cur WorkloadItemResourceList, getNextPage func(context.Context, WorkloadItemResourceList) (WorkloadItemResourceList, error)) WorkloadItemResourceListPage { 19125 return WorkloadItemResourceListPage{ 19126 fn: getNextPage, 19127 wirl: cur, 19128 } 19129} 19130 19131// BasicWorkloadProtectableItem base class for backup item. Workload-specific backup items are derived from this class. 19132type BasicWorkloadProtectableItem interface { 19133 AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) 19134 AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) 19135 AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) 19136 AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) 19137 AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) 19138 AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) 19139 AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) 19140 AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) 19141 AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) 19142 AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) 19143 AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) 19144 AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) 19145 AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) 19146 AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) 19147} 19148 19149// WorkloadProtectableItem base class for backup item. Workload-specific backup items are derived from this 19150// class. 19151type WorkloadProtectableItem struct { 19152 // BackupManagementType - Type of backup management to backup an item. 19153 BackupManagementType *string `json:"backupManagementType,omitempty"` 19154 // WorkloadType - Type of workload for the backup management 19155 WorkloadType *string `json:"workloadType,omitempty"` 19156 // FriendlyName - Friendly name of the backup item. 19157 FriendlyName *string `json:"friendlyName,omitempty"` 19158 // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 19159 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 19160 // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' 19161 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` 19162} 19163 19164func unmarshalBasicWorkloadProtectableItem(body []byte) (BasicWorkloadProtectableItem, error) { 19165 var m map[string]interface{} 19166 err := json.Unmarshal(body, &m) 19167 if err != nil { 19168 return nil, err 19169 } 19170 19171 switch m["protectableItemType"] { 19172 case string(ProtectableItemTypeAzureFileShare): 19173 var afspi AzureFileShareProtectableItem 19174 err := json.Unmarshal(body, &afspi) 19175 return afspi, err 19176 case string(ProtectableItemTypeMicrosoftClassicComputevirtualMachines): 19177 var aisccvpi AzureIaaSClassicComputeVMProtectableItem 19178 err := json.Unmarshal(body, &aisccvpi) 19179 return aisccvpi, err 19180 case string(ProtectableItemTypeMicrosoftComputevirtualMachines): 19181 var aiscvpi AzureIaaSComputeVMProtectableItem 19182 err := json.Unmarshal(body, &aiscvpi) 19183 return aiscvpi, err 19184 case string(ProtectableItemTypeAzureVMWorkloadProtectableItem): 19185 var avwpi AzureVMWorkloadProtectableItem 19186 err := json.Unmarshal(body, &avwpi) 19187 return avwpi, err 19188 case string(ProtectableItemTypeSAPAseSystem): 19189 var avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem 19190 err := json.Unmarshal(body, &avwsaspi) 19191 return avwsaspi, err 19192 case string(ProtectableItemTypeSAPHanaDatabase): 19193 var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem 19194 err := json.Unmarshal(body, &avwshdpi) 19195 return avwshdpi, err 19196 case string(ProtectableItemTypeSAPHanaSystem): 19197 var avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem 19198 err := json.Unmarshal(body, &avwshspi) 19199 return avwshspi, err 19200 case string(ProtectableItemTypeSQLAvailabilityGroupContainer): 19201 var avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem 19202 err := json.Unmarshal(body, &avwsagpi) 19203 return avwsagpi, err 19204 case string(ProtectableItemTypeSQLDataBase): 19205 var avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem 19206 err := json.Unmarshal(body, &avwsdpi) 19207 return avwsdpi, err 19208 case string(ProtectableItemTypeSQLInstance): 19209 var avwsipi AzureVMWorkloadSQLInstanceProtectableItem 19210 err := json.Unmarshal(body, &avwsipi) 19211 return avwsipi, err 19212 case string(ProtectableItemTypeIaaSVMProtectableItem): 19213 var ispi IaaSVMProtectableItem 19214 err := json.Unmarshal(body, &ispi) 19215 return ispi, err 19216 default: 19217 var wpi WorkloadProtectableItem 19218 err := json.Unmarshal(body, &wpi) 19219 return wpi, err 19220 } 19221} 19222func unmarshalBasicWorkloadProtectableItemArray(body []byte) ([]BasicWorkloadProtectableItem, error) { 19223 var rawMessages []*json.RawMessage 19224 err := json.Unmarshal(body, &rawMessages) 19225 if err != nil { 19226 return nil, err 19227 } 19228 19229 wpiArray := make([]BasicWorkloadProtectableItem, len(rawMessages)) 19230 19231 for index, rawMessage := range rawMessages { 19232 wpi, err := unmarshalBasicWorkloadProtectableItem(*rawMessage) 19233 if err != nil { 19234 return nil, err 19235 } 19236 wpiArray[index] = wpi 19237 } 19238 return wpiArray, nil 19239} 19240 19241// MarshalJSON is the custom marshaler for WorkloadProtectableItem. 19242func (wpi WorkloadProtectableItem) MarshalJSON() ([]byte, error) { 19243 wpi.ProtectableItemType = ProtectableItemTypeWorkloadProtectableItem 19244 objectMap := make(map[string]interface{}) 19245 if wpi.BackupManagementType != nil { 19246 objectMap["backupManagementType"] = wpi.BackupManagementType 19247 } 19248 if wpi.WorkloadType != nil { 19249 objectMap["workloadType"] = wpi.WorkloadType 19250 } 19251 if wpi.FriendlyName != nil { 19252 objectMap["friendlyName"] = wpi.FriendlyName 19253 } 19254 if wpi.ProtectionState != "" { 19255 objectMap["protectionState"] = wpi.ProtectionState 19256 } 19257 if wpi.ProtectableItemType != "" { 19258 objectMap["protectableItemType"] = wpi.ProtectableItemType 19259 } 19260 return json.Marshal(objectMap) 19261} 19262 19263// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. 19264func (wpi WorkloadProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { 19265 return nil, false 19266} 19267 19268// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. 19269func (wpi WorkloadProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { 19270 return nil, false 19271} 19272 19273// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. 19274func (wpi WorkloadProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { 19275 return nil, false 19276} 19277 19278// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. 19279func (wpi WorkloadProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { 19280 return nil, false 19281} 19282 19283// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. 19284func (wpi WorkloadProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { 19285 return nil, false 19286} 19287 19288// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. 19289func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { 19290 return nil, false 19291} 19292 19293// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. 19294func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { 19295 return nil, false 19296} 19297 19298// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. 19299func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { 19300 return nil, false 19301} 19302 19303// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. 19304func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { 19305 return nil, false 19306} 19307 19308// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. 19309func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { 19310 return nil, false 19311} 19312 19313// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. 19314func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { 19315 return nil, false 19316} 19317 19318// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. 19319func (wpi WorkloadProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { 19320 return nil, false 19321} 19322 19323// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. 19324func (wpi WorkloadProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { 19325 return nil, false 19326} 19327 19328// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. 19329func (wpi WorkloadProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { 19330 return &wpi, true 19331} 19332 19333// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. 19334func (wpi WorkloadProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { 19335 return &wpi, true 19336} 19337 19338// WorkloadProtectableItemResource base class for backup item. Workload-specific backup items are derived 19339// from this class. 19340type WorkloadProtectableItemResource struct { 19341 // Properties - WorkloadProtectableItemResource properties 19342 Properties BasicWorkloadProtectableItem `json:"properties,omitempty"` 19343 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 19344 ID *string `json:"id,omitempty"` 19345 // Name - READ-ONLY; Resource name associated with the resource. 19346 Name *string `json:"name,omitempty"` 19347 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 19348 Type *string `json:"type,omitempty"` 19349 // Location - Resource location. 19350 Location *string `json:"location,omitempty"` 19351 // Tags - Resource tags. 19352 Tags map[string]*string `json:"tags"` 19353 // ETag - Optional ETag. 19354 ETag *string `json:"eTag,omitempty"` 19355} 19356 19357// MarshalJSON is the custom marshaler for WorkloadProtectableItemResource. 19358func (wpir WorkloadProtectableItemResource) MarshalJSON() ([]byte, error) { 19359 objectMap := make(map[string]interface{}) 19360 objectMap["properties"] = wpir.Properties 19361 if wpir.Location != nil { 19362 objectMap["location"] = wpir.Location 19363 } 19364 if wpir.Tags != nil { 19365 objectMap["tags"] = wpir.Tags 19366 } 19367 if wpir.ETag != nil { 19368 objectMap["eTag"] = wpir.ETag 19369 } 19370 return json.Marshal(objectMap) 19371} 19372 19373// UnmarshalJSON is the custom unmarshaler for WorkloadProtectableItemResource struct. 19374func (wpir *WorkloadProtectableItemResource) UnmarshalJSON(body []byte) error { 19375 var m map[string]*json.RawMessage 19376 err := json.Unmarshal(body, &m) 19377 if err != nil { 19378 return err 19379 } 19380 for k, v := range m { 19381 switch k { 19382 case "properties": 19383 if v != nil { 19384 properties, err := unmarshalBasicWorkloadProtectableItem(*v) 19385 if err != nil { 19386 return err 19387 } 19388 wpir.Properties = properties 19389 } 19390 case "id": 19391 if v != nil { 19392 var ID string 19393 err = json.Unmarshal(*v, &ID) 19394 if err != nil { 19395 return err 19396 } 19397 wpir.ID = &ID 19398 } 19399 case "name": 19400 if v != nil { 19401 var name string 19402 err = json.Unmarshal(*v, &name) 19403 if err != nil { 19404 return err 19405 } 19406 wpir.Name = &name 19407 } 19408 case "type": 19409 if v != nil { 19410 var typeVar string 19411 err = json.Unmarshal(*v, &typeVar) 19412 if err != nil { 19413 return err 19414 } 19415 wpir.Type = &typeVar 19416 } 19417 case "location": 19418 if v != nil { 19419 var location string 19420 err = json.Unmarshal(*v, &location) 19421 if err != nil { 19422 return err 19423 } 19424 wpir.Location = &location 19425 } 19426 case "tags": 19427 if v != nil { 19428 var tags map[string]*string 19429 err = json.Unmarshal(*v, &tags) 19430 if err != nil { 19431 return err 19432 } 19433 wpir.Tags = tags 19434 } 19435 case "eTag": 19436 if v != nil { 19437 var eTag string 19438 err = json.Unmarshal(*v, &eTag) 19439 if err != nil { 19440 return err 19441 } 19442 wpir.ETag = &eTag 19443 } 19444 } 19445 } 19446 19447 return nil 19448} 19449 19450// WorkloadProtectableItemResourceList list of WorkloadProtectableItem resources 19451type WorkloadProtectableItemResourceList struct { 19452 autorest.Response `json:"-"` 19453 // Value - List of resources. 19454 Value *[]WorkloadProtectableItemResource `json:"value,omitempty"` 19455 // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. 19456 NextLink *string `json:"nextLink,omitempty"` 19457} 19458 19459// WorkloadProtectableItemResourceListIterator provides access to a complete listing of 19460// WorkloadProtectableItemResource values. 19461type WorkloadProtectableItemResourceListIterator struct { 19462 i int 19463 page WorkloadProtectableItemResourceListPage 19464} 19465 19466// NextWithContext advances to the next value. If there was an error making 19467// the request the iterator does not advance and the error is returned. 19468func (iter *WorkloadProtectableItemResourceListIterator) NextWithContext(ctx context.Context) (err error) { 19469 if tracing.IsEnabled() { 19470 ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadProtectableItemResourceListIterator.NextWithContext") 19471 defer func() { 19472 sc := -1 19473 if iter.Response().Response.Response != nil { 19474 sc = iter.Response().Response.Response.StatusCode 19475 } 19476 tracing.EndSpan(ctx, sc, err) 19477 }() 19478 } 19479 iter.i++ 19480 if iter.i < len(iter.page.Values()) { 19481 return nil 19482 } 19483 err = iter.page.NextWithContext(ctx) 19484 if err != nil { 19485 iter.i-- 19486 return err 19487 } 19488 iter.i = 0 19489 return nil 19490} 19491 19492// Next advances to the next value. If there was an error making 19493// the request the iterator does not advance and the error is returned. 19494// Deprecated: Use NextWithContext() instead. 19495func (iter *WorkloadProtectableItemResourceListIterator) Next() error { 19496 return iter.NextWithContext(context.Background()) 19497} 19498 19499// NotDone returns true if the enumeration should be started or is not yet complete. 19500func (iter WorkloadProtectableItemResourceListIterator) NotDone() bool { 19501 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 19502} 19503 19504// Response returns the raw server response from the last page request. 19505func (iter WorkloadProtectableItemResourceListIterator) Response() WorkloadProtectableItemResourceList { 19506 return iter.page.Response() 19507} 19508 19509// Value returns the current value or a zero-initialized value if the 19510// iterator has advanced beyond the end of the collection. 19511func (iter WorkloadProtectableItemResourceListIterator) Value() WorkloadProtectableItemResource { 19512 if !iter.page.NotDone() { 19513 return WorkloadProtectableItemResource{} 19514 } 19515 return iter.page.Values()[iter.i] 19516} 19517 19518// Creates a new instance of the WorkloadProtectableItemResourceListIterator type. 19519func NewWorkloadProtectableItemResourceListIterator(page WorkloadProtectableItemResourceListPage) WorkloadProtectableItemResourceListIterator { 19520 return WorkloadProtectableItemResourceListIterator{page: page} 19521} 19522 19523// IsEmpty returns true if the ListResult contains no values. 19524func (wpirl WorkloadProtectableItemResourceList) IsEmpty() bool { 19525 return wpirl.Value == nil || len(*wpirl.Value) == 0 19526} 19527 19528// hasNextLink returns true if the NextLink is not empty. 19529func (wpirl WorkloadProtectableItemResourceList) hasNextLink() bool { 19530 return wpirl.NextLink != nil && len(*wpirl.NextLink) != 0 19531} 19532 19533// workloadProtectableItemResourceListPreparer prepares a request to retrieve the next set of results. 19534// It returns nil if no more results exist. 19535func (wpirl WorkloadProtectableItemResourceList) workloadProtectableItemResourceListPreparer(ctx context.Context) (*http.Request, error) { 19536 if !wpirl.hasNextLink() { 19537 return nil, nil 19538 } 19539 return autorest.Prepare((&http.Request{}).WithContext(ctx), 19540 autorest.AsJSON(), 19541 autorest.AsGet(), 19542 autorest.WithBaseURL(to.String(wpirl.NextLink))) 19543} 19544 19545// WorkloadProtectableItemResourceListPage contains a page of WorkloadProtectableItemResource values. 19546type WorkloadProtectableItemResourceListPage struct { 19547 fn func(context.Context, WorkloadProtectableItemResourceList) (WorkloadProtectableItemResourceList, error) 19548 wpirl WorkloadProtectableItemResourceList 19549} 19550 19551// NextWithContext advances to the next page of values. If there was an error making 19552// the request the page does not advance and the error is returned. 19553func (page *WorkloadProtectableItemResourceListPage) NextWithContext(ctx context.Context) (err error) { 19554 if tracing.IsEnabled() { 19555 ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadProtectableItemResourceListPage.NextWithContext") 19556 defer func() { 19557 sc := -1 19558 if page.Response().Response.Response != nil { 19559 sc = page.Response().Response.Response.StatusCode 19560 } 19561 tracing.EndSpan(ctx, sc, err) 19562 }() 19563 } 19564 for { 19565 next, err := page.fn(ctx, page.wpirl) 19566 if err != nil { 19567 return err 19568 } 19569 page.wpirl = next 19570 if !next.hasNextLink() || !next.IsEmpty() { 19571 break 19572 } 19573 } 19574 return nil 19575} 19576 19577// Next advances to the next page of values. If there was an error making 19578// the request the page does not advance and the error is returned. 19579// Deprecated: Use NextWithContext() instead. 19580func (page *WorkloadProtectableItemResourceListPage) Next() error { 19581 return page.NextWithContext(context.Background()) 19582} 19583 19584// NotDone returns true if the page enumeration should be started or is not yet complete. 19585func (page WorkloadProtectableItemResourceListPage) NotDone() bool { 19586 return !page.wpirl.IsEmpty() 19587} 19588 19589// Response returns the raw server response from the last page request. 19590func (page WorkloadProtectableItemResourceListPage) Response() WorkloadProtectableItemResourceList { 19591 return page.wpirl 19592} 19593 19594// Values returns the slice of values for the current page or nil if there are no values. 19595func (page WorkloadProtectableItemResourceListPage) Values() []WorkloadProtectableItemResource { 19596 if page.wpirl.IsEmpty() { 19597 return nil 19598 } 19599 return *page.wpirl.Value 19600} 19601 19602// Creates a new instance of the WorkloadProtectableItemResourceListPage type. 19603func NewWorkloadProtectableItemResourceListPage(cur WorkloadProtectableItemResourceList, getNextPage func(context.Context, WorkloadProtectableItemResourceList) (WorkloadProtectableItemResourceList, error)) WorkloadProtectableItemResourceListPage { 19604 return WorkloadProtectableItemResourceListPage{ 19605 fn: getNextPage, 19606 wpirl: cur, 19607 } 19608} 19609 19610// YearlyRetentionSchedule yearly retention schedule. 19611type YearlyRetentionSchedule struct { 19612 // RetentionScheduleFormatType - Retention schedule format for yearly retention policy. Possible values include: 'RetentionScheduleFormatInvalid', 'RetentionScheduleFormatDaily', 'RetentionScheduleFormatWeekly' 19613 RetentionScheduleFormatType RetentionScheduleFormat `json:"retentionScheduleFormatType,omitempty"` 19614 // MonthsOfYear - List of months of year of yearly retention policy. 19615 MonthsOfYear *[]MonthOfYear `json:"monthsOfYear,omitempty"` 19616 // RetentionScheduleDaily - Daily retention format for yearly retention policy. 19617 RetentionScheduleDaily *DailyRetentionFormat `json:"retentionScheduleDaily,omitempty"` 19618 // RetentionScheduleWeekly - Weekly retention format for yearly retention policy. 19619 RetentionScheduleWeekly *WeeklyRetentionFormat `json:"retentionScheduleWeekly,omitempty"` 19620 // RetentionTimes - Retention times of retention policy. 19621 RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"` 19622 // RetentionDuration - Retention duration of retention Policy. 19623 RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` 19624} 19625