1package backup 2 3// Copyright (c) Microsoft and contributors. All rights reserved. 4// 5// Licensed under the Apache License, Version 2.0 (the "License"); 6// you may not use this file except in compliance with the License. 7// You may obtain a copy of the License at 8// http://www.apache.org/licenses/LICENSE-2.0 9// 10// Unless required by applicable law or agreed to in writing, software 11// distributed under the License is distributed on an "AS IS" BASIS, 12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13// 14// See the License for the specific language governing permissions and 15// limitations under the License. 16// 17// Code generated by Microsoft (R) AutoRest Code Generator. 18// Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 20import ( 21 "context" 22 "encoding/json" 23 "github.com/Azure/go-autorest/autorest" 24 "github.com/Azure/go-autorest/autorest/azure" 25 "github.com/Azure/go-autorest/autorest/date" 26 "github.com/Azure/go-autorest/autorest/to" 27 "github.com/Azure/go-autorest/tracing" 28 "net/http" 29) 30 31// The package's fully qualified name. 32const fqdn = "github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2020-02-02/backup" 33 34// AzureBackupGoalFeatureSupportRequest azure backup goal feature specific request. 35type AzureBackupGoalFeatureSupportRequest struct { 36 // FeatureType - Possible values include: 'FeatureTypeFeatureSupportRequest', 'FeatureTypeAzureBackupGoals', 'FeatureTypeAzureVMResourceBackup' 37 FeatureType FeatureType `json:"featureType,omitempty"` 38} 39 40// MarshalJSON is the custom marshaler for AzureBackupGoalFeatureSupportRequest. 41func (abgfsr AzureBackupGoalFeatureSupportRequest) MarshalJSON() ([]byte, error) { 42 abgfsr.FeatureType = FeatureTypeAzureBackupGoals 43 objectMap := make(map[string]interface{}) 44 if abgfsr.FeatureType != "" { 45 objectMap["featureType"] = abgfsr.FeatureType 46 } 47 return json.Marshal(objectMap) 48} 49 50// AsAzureBackupGoalFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureBackupGoalFeatureSupportRequest. 51func (abgfsr AzureBackupGoalFeatureSupportRequest) AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool) { 52 return &abgfsr, true 53} 54 55// AsAzureVMResourceFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureBackupGoalFeatureSupportRequest. 56func (abgfsr AzureBackupGoalFeatureSupportRequest) AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool) { 57 return nil, false 58} 59 60// AsFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureBackupGoalFeatureSupportRequest. 61func (abgfsr AzureBackupGoalFeatureSupportRequest) AsFeatureSupportRequest() (*FeatureSupportRequest, bool) { 62 return nil, false 63} 64 65// AsBasicFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureBackupGoalFeatureSupportRequest. 66func (abgfsr AzureBackupGoalFeatureSupportRequest) AsBasicFeatureSupportRequest() (BasicFeatureSupportRequest, bool) { 67 return &abgfsr, true 68} 69 70// AzureBackupServerContainer azureBackupServer (DPMVenus) workload-specific protection container. 71type AzureBackupServerContainer struct { 72 // CanReRegister - Specifies whether the container is re-registrable. 73 CanReRegister *bool `json:"canReRegister,omitempty"` 74 // ContainerID - ID of container. 75 ContainerID *string `json:"containerId,omitempty"` 76 // ProtectedItemCount - Number of protected items in the BackupEngine 77 ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` 78 // DpmAgentVersion - Backup engine Agent version 79 DpmAgentVersion *string `json:"dpmAgentVersion,omitempty"` 80 // DpmServers - List of BackupEngines protecting the container 81 DpmServers *[]string `json:"dpmServers,omitempty"` 82 // UpgradeAvailable - To check if upgrade available 83 UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` 84 // ProtectionStatus - Protection status of the container. 85 ProtectionStatus *string `json:"protectionStatus,omitempty"` 86 // ExtendedInfo - Extended Info of the container. 87 ExtendedInfo *DPMContainerExtendedInfo `json:"extendedInfo,omitempty"` 88 // FriendlyName - Friendly name of the container. 89 FriendlyName *string `json:"friendlyName,omitempty"` 90 // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 91 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 92 // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. 93 RegistrationStatus *string `json:"registrationStatus,omitempty"` 94 // HealthStatus - Status of health of the container. 95 HealthStatus *string `json:"healthStatus,omitempty"` 96 // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' 97 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` 98} 99 100// MarshalJSON is the custom marshaler for AzureBackupServerContainer. 101func (absc AzureBackupServerContainer) MarshalJSON() ([]byte, error) { 102 absc.ContainerType = ContainerTypeAzureBackupServerContainer1 103 objectMap := make(map[string]interface{}) 104 if absc.CanReRegister != nil { 105 objectMap["canReRegister"] = absc.CanReRegister 106 } 107 if absc.ContainerID != nil { 108 objectMap["containerId"] = absc.ContainerID 109 } 110 if absc.ProtectedItemCount != nil { 111 objectMap["protectedItemCount"] = absc.ProtectedItemCount 112 } 113 if absc.DpmAgentVersion != nil { 114 objectMap["dpmAgentVersion"] = absc.DpmAgentVersion 115 } 116 if absc.DpmServers != nil { 117 objectMap["dpmServers"] = absc.DpmServers 118 } 119 if absc.UpgradeAvailable != nil { 120 objectMap["upgradeAvailable"] = absc.UpgradeAvailable 121 } 122 if absc.ProtectionStatus != nil { 123 objectMap["protectionStatus"] = absc.ProtectionStatus 124 } 125 if absc.ExtendedInfo != nil { 126 objectMap["extendedInfo"] = absc.ExtendedInfo 127 } 128 if absc.FriendlyName != nil { 129 objectMap["friendlyName"] = absc.FriendlyName 130 } 131 if absc.BackupManagementType != "" { 132 objectMap["backupManagementType"] = absc.BackupManagementType 133 } 134 if absc.RegistrationStatus != nil { 135 objectMap["registrationStatus"] = absc.RegistrationStatus 136 } 137 if absc.HealthStatus != nil { 138 objectMap["healthStatus"] = absc.HealthStatus 139 } 140 if absc.ContainerType != "" { 141 objectMap["containerType"] = absc.ContainerType 142 } 143 return json.Marshal(objectMap) 144} 145 146// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. 147func (absc AzureBackupServerContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { 148 return &absc, true 149} 150 151// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. 152func (absc AzureBackupServerContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { 153 return nil, false 154} 155 156// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. 157func (absc AzureBackupServerContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { 158 return nil, false 159} 160 161// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. 162func (absc AzureBackupServerContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { 163 return nil, false 164} 165 166// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. 167func (absc AzureBackupServerContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { 168 return nil, false 169} 170 171// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. 172func (absc AzureBackupServerContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { 173 return nil, false 174} 175 176// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. 177func (absc AzureBackupServerContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { 178 return nil, false 179} 180 181// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. 182func (absc AzureBackupServerContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { 183 return nil, false 184} 185 186// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. 187func (absc AzureBackupServerContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { 188 return nil, false 189} 190 191// AsDpmContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. 192func (absc AzureBackupServerContainer) AsDpmContainer() (*DpmContainer, bool) { 193 return nil, false 194} 195 196// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. 197func (absc AzureBackupServerContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { 198 return &absc, true 199} 200 201// AsGenericContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. 202func (absc AzureBackupServerContainer) AsGenericContainer() (*GenericContainer, bool) { 203 return nil, false 204} 205 206// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. 207func (absc AzureBackupServerContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { 208 return nil, false 209} 210 211// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. 212func (absc AzureBackupServerContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { 213 return nil, false 214} 215 216// AsMabContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. 217func (absc AzureBackupServerContainer) AsMabContainer() (*MabContainer, bool) { 218 return nil, false 219} 220 221// AsProtectionContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. 222func (absc AzureBackupServerContainer) AsProtectionContainer() (*ProtectionContainer, bool) { 223 return nil, false 224} 225 226// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. 227func (absc AzureBackupServerContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { 228 return &absc, true 229} 230 231// AzureBackupServerEngine backup engine type when Azure Backup Server is used to manage the backups. 232type AzureBackupServerEngine struct { 233 // FriendlyName - Friendly name of the backup engine. 234 FriendlyName *string `json:"friendlyName,omitempty"` 235 // BackupManagementType - Type of backup management for the backup engine. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 236 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 237 // RegistrationStatus - Registration status of the backup engine with the Recovery Services Vault. 238 RegistrationStatus *string `json:"registrationStatus,omitempty"` 239 // BackupEngineState - Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed} 240 BackupEngineState *string `json:"backupEngineState,omitempty"` 241 // HealthStatus - Backup status of the backup engine. 242 HealthStatus *string `json:"healthStatus,omitempty"` 243 // CanReRegister - Flag indicating if the backup engine be registered, once already registered. 244 CanReRegister *bool `json:"canReRegister,omitempty"` 245 // BackupEngineID - ID of the backup engine. 246 BackupEngineID *string `json:"backupEngineId,omitempty"` 247 // DpmVersion - Backup engine version 248 DpmVersion *string `json:"dpmVersion,omitempty"` 249 // AzureBackupAgentVersion - Backup agent version 250 AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"` 251 // IsAzureBackupAgentUpgradeAvailable - To check if backup agent upgrade available 252 IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"` 253 // IsDpmUpgradeAvailable - To check if backup engine upgrade available 254 IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"` 255 // ExtendedInfo - Extended info of the backupengine 256 ExtendedInfo *EngineExtendedInfo `json:"extendedInfo,omitempty"` 257 // BackupEngineType - Possible values include: 'BackupEngineTypeBackupEngineBase', 'BackupEngineTypeAzureBackupServerEngine', 'BackupEngineTypeDpmBackupEngine' 258 BackupEngineType EngineType `json:"backupEngineType,omitempty"` 259} 260 261// MarshalJSON is the custom marshaler for AzureBackupServerEngine. 262func (abse AzureBackupServerEngine) MarshalJSON() ([]byte, error) { 263 abse.BackupEngineType = BackupEngineTypeAzureBackupServerEngine 264 objectMap := make(map[string]interface{}) 265 if abse.FriendlyName != nil { 266 objectMap["friendlyName"] = abse.FriendlyName 267 } 268 if abse.BackupManagementType != "" { 269 objectMap["backupManagementType"] = abse.BackupManagementType 270 } 271 if abse.RegistrationStatus != nil { 272 objectMap["registrationStatus"] = abse.RegistrationStatus 273 } 274 if abse.BackupEngineState != nil { 275 objectMap["backupEngineState"] = abse.BackupEngineState 276 } 277 if abse.HealthStatus != nil { 278 objectMap["healthStatus"] = abse.HealthStatus 279 } 280 if abse.CanReRegister != nil { 281 objectMap["canReRegister"] = abse.CanReRegister 282 } 283 if abse.BackupEngineID != nil { 284 objectMap["backupEngineId"] = abse.BackupEngineID 285 } 286 if abse.DpmVersion != nil { 287 objectMap["dpmVersion"] = abse.DpmVersion 288 } 289 if abse.AzureBackupAgentVersion != nil { 290 objectMap["azureBackupAgentVersion"] = abse.AzureBackupAgentVersion 291 } 292 if abse.IsAzureBackupAgentUpgradeAvailable != nil { 293 objectMap["isAzureBackupAgentUpgradeAvailable"] = abse.IsAzureBackupAgentUpgradeAvailable 294 } 295 if abse.IsDpmUpgradeAvailable != nil { 296 objectMap["isDpmUpgradeAvailable"] = abse.IsDpmUpgradeAvailable 297 } 298 if abse.ExtendedInfo != nil { 299 objectMap["extendedInfo"] = abse.ExtendedInfo 300 } 301 if abse.BackupEngineType != "" { 302 objectMap["backupEngineType"] = abse.BackupEngineType 303 } 304 return json.Marshal(objectMap) 305} 306 307// AsAzureBackupServerEngine is the BasicEngineBase implementation for AzureBackupServerEngine. 308func (abse AzureBackupServerEngine) AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) { 309 return &abse, true 310} 311 312// AsDpmBackupEngine is the BasicEngineBase implementation for AzureBackupServerEngine. 313func (abse AzureBackupServerEngine) AsDpmBackupEngine() (*DpmBackupEngine, bool) { 314 return nil, false 315} 316 317// AsEngineBase is the BasicEngineBase implementation for AzureBackupServerEngine. 318func (abse AzureBackupServerEngine) AsEngineBase() (*EngineBase, bool) { 319 return nil, false 320} 321 322// AsBasicEngineBase is the BasicEngineBase implementation for AzureBackupServerEngine. 323func (abse AzureBackupServerEngine) AsBasicEngineBase() (BasicEngineBase, bool) { 324 return &abse, true 325} 326 327// AzureFileShareBackupRequest azureFileShare workload-specific backup request. 328type AzureFileShareBackupRequest struct { 329 // RecoveryPointExpiryTimeInUTC - Backup copy will expire after the time specified (UTC). 330 RecoveryPointExpiryTimeInUTC *date.Time `json:"recoveryPointExpiryTimeInUTC,omitempty"` 331 // ObjectType - Possible values include: 'ObjectTypeBackupRequest', 'ObjectTypeAzureFileShareBackupRequest', 'ObjectTypeAzureWorkloadBackupRequest', 'ObjectTypeIaasVMBackupRequest' 332 ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"` 333} 334 335// MarshalJSON is the custom marshaler for AzureFileShareBackupRequest. 336func (afsbr AzureFileShareBackupRequest) MarshalJSON() ([]byte, error) { 337 afsbr.ObjectType = ObjectTypeAzureFileShareBackupRequest 338 objectMap := make(map[string]interface{}) 339 if afsbr.RecoveryPointExpiryTimeInUTC != nil { 340 objectMap["recoveryPointExpiryTimeInUTC"] = afsbr.RecoveryPointExpiryTimeInUTC 341 } 342 if afsbr.ObjectType != "" { 343 objectMap["objectType"] = afsbr.ObjectType 344 } 345 return json.Marshal(objectMap) 346} 347 348// AsAzureFileShareBackupRequest is the BasicRequest implementation for AzureFileShareBackupRequest. 349func (afsbr AzureFileShareBackupRequest) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) { 350 return &afsbr, true 351} 352 353// AsAzureWorkloadBackupRequest is the BasicRequest implementation for AzureFileShareBackupRequest. 354func (afsbr AzureFileShareBackupRequest) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) { 355 return nil, false 356} 357 358// AsIaasVMBackupRequest is the BasicRequest implementation for AzureFileShareBackupRequest. 359func (afsbr AzureFileShareBackupRequest) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) { 360 return nil, false 361} 362 363// AsRequest is the BasicRequest implementation for AzureFileShareBackupRequest. 364func (afsbr AzureFileShareBackupRequest) AsRequest() (*Request, bool) { 365 return nil, false 366} 367 368// AsBasicRequest is the BasicRequest implementation for AzureFileShareBackupRequest. 369func (afsbr AzureFileShareBackupRequest) AsBasicRequest() (BasicRequest, bool) { 370 return &afsbr, true 371} 372 373// AzureFileShareProtectableItem protectable item for Azure Fileshare workloads. 374type AzureFileShareProtectableItem struct { 375 // ParentContainerFabricID - Full Fabric ID of container to which this protectable item belongs. For example, ARM ID. 376 ParentContainerFabricID *string `json:"parentContainerFabricId,omitempty"` 377 // ParentContainerFriendlyName - Friendly name of container to which this protectable item belongs. 378 ParentContainerFriendlyName *string `json:"parentContainerFriendlyName,omitempty"` 379 // AzureFileShareType - File Share type XSync or XSMB. Possible values include: 'Invalid', 'XSMB', 'XSync' 380 AzureFileShareType AzureFileShareType `json:"azureFileShareType,omitempty"` 381 // BackupManagementType - Type of backup management to backup an item. 382 BackupManagementType *string `json:"backupManagementType,omitempty"` 383 // WorkloadType - Type of workload for the backup management 384 WorkloadType *string `json:"workloadType,omitempty"` 385 // FriendlyName - Friendly name of the backup item. 386 FriendlyName *string `json:"friendlyName,omitempty"` 387 // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 388 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 389 // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' 390 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` 391} 392 393// MarshalJSON is the custom marshaler for AzureFileShareProtectableItem. 394func (afspi AzureFileShareProtectableItem) MarshalJSON() ([]byte, error) { 395 afspi.ProtectableItemType = ProtectableItemTypeAzureFileShare 396 objectMap := make(map[string]interface{}) 397 if afspi.ParentContainerFabricID != nil { 398 objectMap["parentContainerFabricId"] = afspi.ParentContainerFabricID 399 } 400 if afspi.ParentContainerFriendlyName != nil { 401 objectMap["parentContainerFriendlyName"] = afspi.ParentContainerFriendlyName 402 } 403 if afspi.AzureFileShareType != "" { 404 objectMap["azureFileShareType"] = afspi.AzureFileShareType 405 } 406 if afspi.BackupManagementType != nil { 407 objectMap["backupManagementType"] = afspi.BackupManagementType 408 } 409 if afspi.WorkloadType != nil { 410 objectMap["workloadType"] = afspi.WorkloadType 411 } 412 if afspi.FriendlyName != nil { 413 objectMap["friendlyName"] = afspi.FriendlyName 414 } 415 if afspi.ProtectionState != "" { 416 objectMap["protectionState"] = afspi.ProtectionState 417 } 418 if afspi.ProtectableItemType != "" { 419 objectMap["protectableItemType"] = afspi.ProtectableItemType 420 } 421 return json.Marshal(objectMap) 422} 423 424// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. 425func (afspi AzureFileShareProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { 426 return &afspi, true 427} 428 429// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. 430func (afspi AzureFileShareProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { 431 return nil, false 432} 433 434// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. 435func (afspi AzureFileShareProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { 436 return nil, false 437} 438 439// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. 440func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { 441 return nil, false 442} 443 444// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. 445func (afspi AzureFileShareProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { 446 return nil, false 447} 448 449// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. 450func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { 451 return nil, false 452} 453 454// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. 455func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { 456 return nil, false 457} 458 459// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. 460func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { 461 return nil, false 462} 463 464// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. 465func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { 466 return nil, false 467} 468 469// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. 470func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { 471 return nil, false 472} 473 474// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. 475func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { 476 return nil, false 477} 478 479// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. 480func (afspi AzureFileShareProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { 481 return nil, false 482} 483 484// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. 485func (afspi AzureFileShareProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { 486 return nil, false 487} 488 489// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. 490func (afspi AzureFileShareProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { 491 return nil, false 492} 493 494// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. 495func (afspi AzureFileShareProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { 496 return &afspi, true 497} 498 499// AzureFileshareProtectedItem azure File Share workload-specific backup item. 500type AzureFileshareProtectedItem struct { 501 // FriendlyName - Friendly name of the fileshare represented by this backup item. 502 FriendlyName *string `json:"friendlyName,omitempty"` 503 // ProtectionStatus - Backup status of this backup item. 504 ProtectionStatus *string `json:"protectionStatus,omitempty"` 505 // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' 506 ProtectionState ProtectionState `json:"protectionState,omitempty"` 507 // LastBackupStatus - Last backup operation status. Possible values: Healthy, Unhealthy. 508 LastBackupStatus *string `json:"lastBackupStatus,omitempty"` 509 // LastBackupTime - Timestamp of the last backup operation on this backup item. 510 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` 511 // KpisHealths - Health details of different KPIs 512 KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"` 513 // ExtendedInfo - Additional information with this backup item. 514 ExtendedInfo *AzureFileshareProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` 515 // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 516 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 517 // 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' 518 WorkloadType DataSourceType `json:"workloadType,omitempty"` 519 // ContainerName - Unique name of container 520 ContainerName *string `json:"containerName,omitempty"` 521 // SourceResourceID - ARM ID of the resource to be backed up. 522 SourceResourceID *string `json:"sourceResourceId,omitempty"` 523 // PolicyID - ID of the backup policy with which this item is backed up. 524 PolicyID *string `json:"policyId,omitempty"` 525 // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. 526 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` 527 // BackupSetName - Name of the backup set the backup item belongs to 528 BackupSetName *string `json:"backupSetName,omitempty"` 529 // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' 530 CreateMode CreateMode `json:"createMode,omitempty"` 531 // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC 532 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` 533 // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete 534 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` 535 // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted 536 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` 537 // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon 538 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` 539 // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state 540 IsRehydrate *bool `json:"isRehydrate,omitempty"` 541 // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' 542 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` 543} 544 545// MarshalJSON is the custom marshaler for AzureFileshareProtectedItem. 546func (afpi AzureFileshareProtectedItem) MarshalJSON() ([]byte, error) { 547 afpi.ProtectedItemType = ProtectedItemTypeAzureFileShareProtectedItem 548 objectMap := make(map[string]interface{}) 549 if afpi.FriendlyName != nil { 550 objectMap["friendlyName"] = afpi.FriendlyName 551 } 552 if afpi.ProtectionStatus != nil { 553 objectMap["protectionStatus"] = afpi.ProtectionStatus 554 } 555 if afpi.ProtectionState != "" { 556 objectMap["protectionState"] = afpi.ProtectionState 557 } 558 if afpi.LastBackupStatus != nil { 559 objectMap["lastBackupStatus"] = afpi.LastBackupStatus 560 } 561 if afpi.LastBackupTime != nil { 562 objectMap["lastBackupTime"] = afpi.LastBackupTime 563 } 564 if afpi.KpisHealths != nil { 565 objectMap["kpisHealths"] = afpi.KpisHealths 566 } 567 if afpi.ExtendedInfo != nil { 568 objectMap["extendedInfo"] = afpi.ExtendedInfo 569 } 570 if afpi.BackupManagementType != "" { 571 objectMap["backupManagementType"] = afpi.BackupManagementType 572 } 573 if afpi.WorkloadType != "" { 574 objectMap["workloadType"] = afpi.WorkloadType 575 } 576 if afpi.ContainerName != nil { 577 objectMap["containerName"] = afpi.ContainerName 578 } 579 if afpi.SourceResourceID != nil { 580 objectMap["sourceResourceId"] = afpi.SourceResourceID 581 } 582 if afpi.PolicyID != nil { 583 objectMap["policyId"] = afpi.PolicyID 584 } 585 if afpi.LastRecoveryPoint != nil { 586 objectMap["lastRecoveryPoint"] = afpi.LastRecoveryPoint 587 } 588 if afpi.BackupSetName != nil { 589 objectMap["backupSetName"] = afpi.BackupSetName 590 } 591 if afpi.CreateMode != "" { 592 objectMap["createMode"] = afpi.CreateMode 593 } 594 if afpi.DeferredDeleteTimeInUTC != nil { 595 objectMap["deferredDeleteTimeInUTC"] = afpi.DeferredDeleteTimeInUTC 596 } 597 if afpi.IsScheduledForDeferredDelete != nil { 598 objectMap["isScheduledForDeferredDelete"] = afpi.IsScheduledForDeferredDelete 599 } 600 if afpi.DeferredDeleteTimeRemaining != nil { 601 objectMap["deferredDeleteTimeRemaining"] = afpi.DeferredDeleteTimeRemaining 602 } 603 if afpi.IsDeferredDeleteScheduleUpcoming != nil { 604 objectMap["isDeferredDeleteScheduleUpcoming"] = afpi.IsDeferredDeleteScheduleUpcoming 605 } 606 if afpi.IsRehydrate != nil { 607 objectMap["isRehydrate"] = afpi.IsRehydrate 608 } 609 if afpi.ProtectedItemType != "" { 610 objectMap["protectedItemType"] = afpi.ProtectedItemType 611 } 612 return json.Marshal(objectMap) 613} 614 615// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. 616func (afpi AzureFileshareProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { 617 return &afpi, true 618} 619 620// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. 621func (afpi AzureFileshareProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { 622 return nil, false 623} 624 625// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. 626func (afpi AzureFileshareProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { 627 return nil, false 628} 629 630// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. 631func (afpi AzureFileshareProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { 632 return nil, false 633} 634 635// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. 636func (afpi AzureFileshareProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { 637 return nil, false 638} 639 640// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. 641func (afpi AzureFileshareProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { 642 return nil, false 643} 644 645// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. 646func (afpi AzureFileshareProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { 647 return nil, false 648} 649 650// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. 651func (afpi AzureFileshareProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { 652 return nil, false 653} 654 655// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. 656func (afpi AzureFileshareProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { 657 return nil, false 658} 659 660// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. 661func (afpi AzureFileshareProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { 662 return nil, false 663} 664 665// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. 666func (afpi AzureFileshareProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { 667 return nil, false 668} 669 670// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. 671func (afpi AzureFileshareProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { 672 return nil, false 673} 674 675// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. 676func (afpi AzureFileshareProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { 677 return nil, false 678} 679 680// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. 681func (afpi AzureFileshareProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { 682 return nil, false 683} 684 685// AsProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. 686func (afpi AzureFileshareProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { 687 return nil, false 688} 689 690// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. 691func (afpi AzureFileshareProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { 692 return &afpi, true 693} 694 695// AzureFileshareProtectedItemExtendedInfo additional information about Azure File Share backup item. 696type AzureFileshareProtectedItemExtendedInfo struct { 697 // OldestRecoveryPoint - The oldest backup copy available for this item in the service. 698 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"` 699 // RecoveryPointCount - Number of available backup copies associated with this backup item. 700 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"` 701 // PolicyState - Indicates consistency of policy object and policy applied to this backup item. 702 PolicyState *string `json:"policyState,omitempty"` 703 // ResourceState - READ-ONLY; Indicates the state of this resource. Possible values are from enum ResourceState {Invalid, Active, SoftDeleted, Deleted} 704 ResourceState *string `json:"resourceState,omitempty"` 705 // ResourceStateSyncTime - READ-ONLY; The resource state sync time for this backup item. 706 ResourceStateSyncTime *date.Time `json:"resourceStateSyncTime,omitempty"` 707} 708 709// MarshalJSON is the custom marshaler for AzureFileshareProtectedItemExtendedInfo. 710func (afpiei AzureFileshareProtectedItemExtendedInfo) MarshalJSON() ([]byte, error) { 711 objectMap := make(map[string]interface{}) 712 if afpiei.OldestRecoveryPoint != nil { 713 objectMap["oldestRecoveryPoint"] = afpiei.OldestRecoveryPoint 714 } 715 if afpiei.RecoveryPointCount != nil { 716 objectMap["recoveryPointCount"] = afpiei.RecoveryPointCount 717 } 718 if afpiei.PolicyState != nil { 719 objectMap["policyState"] = afpiei.PolicyState 720 } 721 return json.Marshal(objectMap) 722} 723 724// AzureFileShareProtectionPolicy azureStorage backup policy. 725type AzureFileShareProtectionPolicy struct { 726 // 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' 727 WorkLoadType WorkloadType `json:"workLoadType,omitempty"` 728 // SchedulePolicy - Backup schedule specified as part of backup policy. 729 SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"` 730 // RetentionPolicy - Retention policy with the details on backup copy retention ranges. 731 RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"` 732 // TimeZone - TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". 733 TimeZone *string `json:"timeZone,omitempty"` 734 // ProtectedItemsCount - Number of items associated with this policy. 735 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` 736 // BackupManagementType - Possible values include: 'BackupManagementTypeProtectionPolicy', 'BackupManagementTypeAzureWorkload', 'BackupManagementTypeAzureStorage', 'BackupManagementTypeAzureIaasVM', 'BackupManagementTypeAzureSQL', 'BackupManagementTypeGenericProtectionPolicy', 'BackupManagementTypeMAB' 737 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"` 738} 739 740// MarshalJSON is the custom marshaler for AzureFileShareProtectionPolicy. 741func (afspp AzureFileShareProtectionPolicy) MarshalJSON() ([]byte, error) { 742 afspp.BackupManagementType = BackupManagementTypeAzureStorage 743 objectMap := make(map[string]interface{}) 744 if afspp.WorkLoadType != "" { 745 objectMap["workLoadType"] = afspp.WorkLoadType 746 } 747 objectMap["schedulePolicy"] = afspp.SchedulePolicy 748 objectMap["retentionPolicy"] = afspp.RetentionPolicy 749 if afspp.TimeZone != nil { 750 objectMap["timeZone"] = afspp.TimeZone 751 } 752 if afspp.ProtectedItemsCount != nil { 753 objectMap["protectedItemsCount"] = afspp.ProtectedItemsCount 754 } 755 if afspp.BackupManagementType != "" { 756 objectMap["backupManagementType"] = afspp.BackupManagementType 757 } 758 return json.Marshal(objectMap) 759} 760 761// AsAzureVMWorkloadProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy. 762func (afspp AzureFileShareProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) { 763 return nil, false 764} 765 766// AsAzureFileShareProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy. 767func (afspp AzureFileShareProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) { 768 return &afspp, true 769} 770 771// AsAzureIaaSVMProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy. 772func (afspp AzureFileShareProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) { 773 return nil, false 774} 775 776// AsAzureSQLProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy. 777func (afspp AzureFileShareProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) { 778 return nil, false 779} 780 781// AsGenericProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy. 782func (afspp AzureFileShareProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) { 783 return nil, false 784} 785 786// AsMabProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy. 787func (afspp AzureFileShareProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) { 788 return nil, false 789} 790 791// AsProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy. 792func (afspp AzureFileShareProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) { 793 return nil, false 794} 795 796// AsBasicProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy. 797func (afspp AzureFileShareProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) { 798 return &afspp, true 799} 800 801// UnmarshalJSON is the custom unmarshaler for AzureFileShareProtectionPolicy struct. 802func (afspp *AzureFileShareProtectionPolicy) UnmarshalJSON(body []byte) error { 803 var m map[string]*json.RawMessage 804 err := json.Unmarshal(body, &m) 805 if err != nil { 806 return err 807 } 808 for k, v := range m { 809 switch k { 810 case "workLoadType": 811 if v != nil { 812 var workLoadType WorkloadType 813 err = json.Unmarshal(*v, &workLoadType) 814 if err != nil { 815 return err 816 } 817 afspp.WorkLoadType = workLoadType 818 } 819 case "schedulePolicy": 820 if v != nil { 821 schedulePolicy, err := unmarshalBasicSchedulePolicy(*v) 822 if err != nil { 823 return err 824 } 825 afspp.SchedulePolicy = schedulePolicy 826 } 827 case "retentionPolicy": 828 if v != nil { 829 retentionPolicy, err := unmarshalBasicRetentionPolicy(*v) 830 if err != nil { 831 return err 832 } 833 afspp.RetentionPolicy = retentionPolicy 834 } 835 case "timeZone": 836 if v != nil { 837 var timeZone string 838 err = json.Unmarshal(*v, &timeZone) 839 if err != nil { 840 return err 841 } 842 afspp.TimeZone = &timeZone 843 } 844 case "protectedItemsCount": 845 if v != nil { 846 var protectedItemsCount int32 847 err = json.Unmarshal(*v, &protectedItemsCount) 848 if err != nil { 849 return err 850 } 851 afspp.ProtectedItemsCount = &protectedItemsCount 852 } 853 case "backupManagementType": 854 if v != nil { 855 var backupManagementType ManagementTypeBasicProtectionPolicy 856 err = json.Unmarshal(*v, &backupManagementType) 857 if err != nil { 858 return err 859 } 860 afspp.BackupManagementType = backupManagementType 861 } 862 } 863 } 864 865 return nil 866} 867 868// AzureFileShareProvisionILRRequest update snapshot Uri with the correct friendly Name of the source Azure 869// file share. 870type AzureFileShareProvisionILRRequest struct { 871 // RecoveryPointID - Recovery point ID. 872 RecoveryPointID *string `json:"recoveryPointId,omitempty"` 873 // SourceResourceID - Source Storage account ARM Id 874 SourceResourceID *string `json:"sourceResourceId,omitempty"` 875 // ObjectType - Possible values include: 'ObjectTypeILRRequest', 'ObjectTypeAzureFileShareProvisionILRRequest', 'ObjectTypeIaasVMILRRegistrationRequest' 876 ObjectType ObjectTypeBasicILRRequest `json:"objectType,omitempty"` 877} 878 879// MarshalJSON is the custom marshaler for AzureFileShareProvisionILRRequest. 880func (afspir AzureFileShareProvisionILRRequest) MarshalJSON() ([]byte, error) { 881 afspir.ObjectType = ObjectTypeAzureFileShareProvisionILRRequest 882 objectMap := make(map[string]interface{}) 883 if afspir.RecoveryPointID != nil { 884 objectMap["recoveryPointId"] = afspir.RecoveryPointID 885 } 886 if afspir.SourceResourceID != nil { 887 objectMap["sourceResourceId"] = afspir.SourceResourceID 888 } 889 if afspir.ObjectType != "" { 890 objectMap["objectType"] = afspir.ObjectType 891 } 892 return json.Marshal(objectMap) 893} 894 895// AsAzureFileShareProvisionILRRequest is the BasicILRRequest implementation for AzureFileShareProvisionILRRequest. 896func (afspir AzureFileShareProvisionILRRequest) AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) { 897 return &afspir, true 898} 899 900// AsIaasVMILRRegistrationRequest is the BasicILRRequest implementation for AzureFileShareProvisionILRRequest. 901func (afspir AzureFileShareProvisionILRRequest) AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) { 902 return nil, false 903} 904 905// AsILRRequest is the BasicILRRequest implementation for AzureFileShareProvisionILRRequest. 906func (afspir AzureFileShareProvisionILRRequest) AsILRRequest() (*ILRRequest, bool) { 907 return nil, false 908} 909 910// AsBasicILRRequest is the BasicILRRequest implementation for AzureFileShareProvisionILRRequest. 911func (afspir AzureFileShareProvisionILRRequest) AsBasicILRRequest() (BasicILRRequest, bool) { 912 return &afspir, true 913} 914 915// AzureFileShareRecoveryPoint azure File Share workload specific backup copy. 916type AzureFileShareRecoveryPoint struct { 917 // RecoveryPointType - READ-ONLY; Type of the backup copy. Specifies whether it is a crash consistent backup or app consistent. 918 RecoveryPointType *string `json:"recoveryPointType,omitempty"` 919 // RecoveryPointTime - READ-ONLY; Time at which this backup copy was created. 920 RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"` 921 // FileShareSnapshotURI - READ-ONLY; Contains Url to the snapshot of fileshare, if applicable 922 FileShareSnapshotURI *string `json:"fileShareSnapshotUri,omitempty"` 923 // RecoveryPointSizeInGB - READ-ONLY; Contains recovery point size 924 RecoveryPointSizeInGB *int32 `json:"recoveryPointSizeInGB,omitempty"` 925 // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' 926 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` 927} 928 929// MarshalJSON is the custom marshaler for AzureFileShareRecoveryPoint. 930func (afsrp AzureFileShareRecoveryPoint) MarshalJSON() ([]byte, error) { 931 afsrp.ObjectType = ObjectTypeAzureFileShareRecoveryPoint 932 objectMap := make(map[string]interface{}) 933 if afsrp.ObjectType != "" { 934 objectMap["objectType"] = afsrp.ObjectType 935 } 936 return json.Marshal(objectMap) 937} 938 939// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. 940func (afsrp AzureFileShareRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { 941 return &afsrp, true 942} 943 944// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. 945func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { 946 return nil, false 947} 948 949// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. 950func (afsrp AzureFileShareRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { 951 return nil, false 952} 953 954// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. 955func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { 956 return nil, false 957} 958 959// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. 960func (afsrp AzureFileShareRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { 961 return nil, false 962} 963 964// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. 965func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { 966 return nil, false 967} 968 969// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. 970func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { 971 return nil, false 972} 973 974// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. 975func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { 976 return nil, false 977} 978 979// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. 980func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { 981 return nil, false 982} 983 984// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. 985func (afsrp AzureFileShareRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { 986 return nil, false 987} 988 989// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. 990func (afsrp AzureFileShareRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { 991 return nil, false 992} 993 994// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. 995func (afsrp AzureFileShareRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { 996 return nil, false 997} 998 999// AsRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. 1000func (afsrp AzureFileShareRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { 1001 return nil, false 1002} 1003 1004// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. 1005func (afsrp AzureFileShareRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { 1006 return &afsrp, true 1007} 1008 1009// AzureFileShareRestoreRequest azureFileShare Restore Request 1010type AzureFileShareRestoreRequest struct { 1011 // RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline' 1012 RecoveryType RecoveryType `json:"recoveryType,omitempty"` 1013 // SourceResourceID - Source storage account ARM Id 1014 SourceResourceID *string `json:"sourceResourceId,omitempty"` 1015 // CopyOptions - Options to resolve copy conflicts. Possible values include: 'CopyOptionsInvalid', 'CopyOptionsCreateCopy', 'CopyOptionsSkip', 'CopyOptionsOverwrite', 'CopyOptionsFailOnConflict' 1016 CopyOptions CopyOptions `json:"copyOptions,omitempty"` 1017 // RestoreRequestType - Restore Type (FullShareRestore or ItemLevelRestore). Possible values include: 'RestoreRequestTypeInvalid', 'RestoreRequestTypeFullShareRestore', 'RestoreRequestTypeItemLevelRestore' 1018 RestoreRequestType RestoreRequestType `json:"restoreRequestType,omitempty"` 1019 // RestoreFileSpecs - List of Source Files/Folders(which need to recover) and TargetFolderPath details 1020 RestoreFileSpecs *[]RestoreFileSpecs `json:"restoreFileSpecs,omitempty"` 1021 // TargetDetails - Target File Share Details 1022 TargetDetails *TargetAFSRestoreInfo `json:"targetDetails,omitempty"` 1023 // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' 1024 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` 1025} 1026 1027// MarshalJSON is the custom marshaler for AzureFileShareRestoreRequest. 1028func (afsrr AzureFileShareRestoreRequest) MarshalJSON() ([]byte, error) { 1029 afsrr.ObjectType = ObjectTypeAzureFileShareRestoreRequest 1030 objectMap := make(map[string]interface{}) 1031 if afsrr.RecoveryType != "" { 1032 objectMap["recoveryType"] = afsrr.RecoveryType 1033 } 1034 if afsrr.SourceResourceID != nil { 1035 objectMap["sourceResourceId"] = afsrr.SourceResourceID 1036 } 1037 if afsrr.CopyOptions != "" { 1038 objectMap["copyOptions"] = afsrr.CopyOptions 1039 } 1040 if afsrr.RestoreRequestType != "" { 1041 objectMap["restoreRequestType"] = afsrr.RestoreRequestType 1042 } 1043 if afsrr.RestoreFileSpecs != nil { 1044 objectMap["restoreFileSpecs"] = afsrr.RestoreFileSpecs 1045 } 1046 if afsrr.TargetDetails != nil { 1047 objectMap["targetDetails"] = afsrr.TargetDetails 1048 } 1049 if afsrr.ObjectType != "" { 1050 objectMap["objectType"] = afsrr.ObjectType 1051 } 1052 return json.Marshal(objectMap) 1053} 1054 1055// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. 1056func (afsrr AzureFileShareRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { 1057 return &afsrr, true 1058} 1059 1060// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. 1061func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { 1062 return nil, false 1063} 1064 1065// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. 1066func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { 1067 return nil, false 1068} 1069 1070// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. 1071func (afsrr AzureFileShareRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { 1072 return nil, false 1073} 1074 1075// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. 1076func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { 1077 return nil, false 1078} 1079 1080// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. 1081func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { 1082 return nil, false 1083} 1084 1085// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. 1086func (afsrr AzureFileShareRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { 1087 return nil, false 1088} 1089 1090// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. 1091func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { 1092 return nil, false 1093} 1094 1095// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. 1096func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { 1097 return nil, false 1098} 1099 1100// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. 1101func (afsrr AzureFileShareRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { 1102 return nil, false 1103} 1104 1105// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. 1106func (afsrr AzureFileShareRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { 1107 return nil, false 1108} 1109 1110// AsRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. 1111func (afsrr AzureFileShareRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { 1112 return nil, false 1113} 1114 1115// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. 1116func (afsrr AzureFileShareRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { 1117 return &afsrr, true 1118} 1119 1120// AzureIaaSClassicComputeVMContainer iaaS VM workload-specific backup item representing a classic virtual 1121// machine. 1122type AzureIaaSClassicComputeVMContainer struct { 1123 // VirtualMachineID - Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. 1124 VirtualMachineID *string `json:"virtualMachineId,omitempty"` 1125 // VirtualMachineVersion - Specifies whether the container represents a Classic or an Azure Resource Manager VM. 1126 VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` 1127 // ResourceGroup - Resource group name of Recovery Services Vault. 1128 ResourceGroup *string `json:"resourceGroup,omitempty"` 1129 // FriendlyName - Friendly name of the container. 1130 FriendlyName *string `json:"friendlyName,omitempty"` 1131 // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 1132 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 1133 // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. 1134 RegistrationStatus *string `json:"registrationStatus,omitempty"` 1135 // HealthStatus - Status of health of the container. 1136 HealthStatus *string `json:"healthStatus,omitempty"` 1137 // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' 1138 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` 1139} 1140 1141// MarshalJSON is the custom marshaler for AzureIaaSClassicComputeVMContainer. 1142func (aisccvc AzureIaaSClassicComputeVMContainer) MarshalJSON() ([]byte, error) { 1143 aisccvc.ContainerType = ContainerTypeMicrosoftClassicComputevirtualMachines 1144 objectMap := make(map[string]interface{}) 1145 if aisccvc.VirtualMachineID != nil { 1146 objectMap["virtualMachineId"] = aisccvc.VirtualMachineID 1147 } 1148 if aisccvc.VirtualMachineVersion != nil { 1149 objectMap["virtualMachineVersion"] = aisccvc.VirtualMachineVersion 1150 } 1151 if aisccvc.ResourceGroup != nil { 1152 objectMap["resourceGroup"] = aisccvc.ResourceGroup 1153 } 1154 if aisccvc.FriendlyName != nil { 1155 objectMap["friendlyName"] = aisccvc.FriendlyName 1156 } 1157 if aisccvc.BackupManagementType != "" { 1158 objectMap["backupManagementType"] = aisccvc.BackupManagementType 1159 } 1160 if aisccvc.RegistrationStatus != nil { 1161 objectMap["registrationStatus"] = aisccvc.RegistrationStatus 1162 } 1163 if aisccvc.HealthStatus != nil { 1164 objectMap["healthStatus"] = aisccvc.HealthStatus 1165 } 1166 if aisccvc.ContainerType != "" { 1167 objectMap["containerType"] = aisccvc.ContainerType 1168 } 1169 return json.Marshal(objectMap) 1170} 1171 1172// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. 1173func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { 1174 return nil, false 1175} 1176 1177// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. 1178func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { 1179 return &aisccvc, true 1180} 1181 1182// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. 1183func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { 1184 return nil, false 1185} 1186 1187// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. 1188func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { 1189 return nil, false 1190} 1191 1192// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. 1193func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { 1194 return nil, false 1195} 1196 1197// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. 1198func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { 1199 return nil, false 1200} 1201 1202// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. 1203func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { 1204 return nil, false 1205} 1206 1207// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. 1208func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { 1209 return nil, false 1210} 1211 1212// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. 1213func (aisccvc AzureIaaSClassicComputeVMContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { 1214 return nil, false 1215} 1216 1217// AsDpmContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. 1218func (aisccvc AzureIaaSClassicComputeVMContainer) AsDpmContainer() (*DpmContainer, bool) { 1219 return nil, false 1220} 1221 1222// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. 1223func (aisccvc AzureIaaSClassicComputeVMContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { 1224 return nil, false 1225} 1226 1227// AsGenericContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. 1228func (aisccvc AzureIaaSClassicComputeVMContainer) AsGenericContainer() (*GenericContainer, bool) { 1229 return nil, false 1230} 1231 1232// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. 1233func (aisccvc AzureIaaSClassicComputeVMContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { 1234 return nil, false 1235} 1236 1237// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. 1238func (aisccvc AzureIaaSClassicComputeVMContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { 1239 return &aisccvc, true 1240} 1241 1242// AsMabContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. 1243func (aisccvc AzureIaaSClassicComputeVMContainer) AsMabContainer() (*MabContainer, bool) { 1244 return nil, false 1245} 1246 1247// AsProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. 1248func (aisccvc AzureIaaSClassicComputeVMContainer) AsProtectionContainer() (*ProtectionContainer, bool) { 1249 return nil, false 1250} 1251 1252// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. 1253func (aisccvc AzureIaaSClassicComputeVMContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { 1254 return &aisccvc, true 1255} 1256 1257// AzureIaaSClassicComputeVMProtectableItem iaaS VM workload-specific backup item representing the Classic 1258// Compute VM. 1259type AzureIaaSClassicComputeVMProtectableItem struct { 1260 // VirtualMachineID - Fully qualified ARM ID of the virtual machine. 1261 VirtualMachineID *string `json:"virtualMachineId,omitempty"` 1262 // BackupManagementType - Type of backup management to backup an item. 1263 BackupManagementType *string `json:"backupManagementType,omitempty"` 1264 // WorkloadType - Type of workload for the backup management 1265 WorkloadType *string `json:"workloadType,omitempty"` 1266 // FriendlyName - Friendly name of the backup item. 1267 FriendlyName *string `json:"friendlyName,omitempty"` 1268 // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 1269 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 1270 // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' 1271 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` 1272} 1273 1274// MarshalJSON is the custom marshaler for AzureIaaSClassicComputeVMProtectableItem. 1275func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) MarshalJSON() ([]byte, error) { 1276 aisccvpi.ProtectableItemType = ProtectableItemTypeMicrosoftClassicComputevirtualMachines 1277 objectMap := make(map[string]interface{}) 1278 if aisccvpi.VirtualMachineID != nil { 1279 objectMap["virtualMachineId"] = aisccvpi.VirtualMachineID 1280 } 1281 if aisccvpi.BackupManagementType != nil { 1282 objectMap["backupManagementType"] = aisccvpi.BackupManagementType 1283 } 1284 if aisccvpi.WorkloadType != nil { 1285 objectMap["workloadType"] = aisccvpi.WorkloadType 1286 } 1287 if aisccvpi.FriendlyName != nil { 1288 objectMap["friendlyName"] = aisccvpi.FriendlyName 1289 } 1290 if aisccvpi.ProtectionState != "" { 1291 objectMap["protectionState"] = aisccvpi.ProtectionState 1292 } 1293 if aisccvpi.ProtectableItemType != "" { 1294 objectMap["protectableItemType"] = aisccvpi.ProtectableItemType 1295 } 1296 return json.Marshal(objectMap) 1297} 1298 1299// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. 1300func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { 1301 return nil, false 1302} 1303 1304// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. 1305func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { 1306 return &aisccvpi, true 1307} 1308 1309// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. 1310func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { 1311 return nil, false 1312} 1313 1314// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. 1315func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { 1316 return nil, false 1317} 1318 1319// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. 1320func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { 1321 return nil, false 1322} 1323 1324// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. 1325func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { 1326 return nil, false 1327} 1328 1329// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. 1330func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { 1331 return nil, false 1332} 1333 1334// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. 1335func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { 1336 return nil, false 1337} 1338 1339// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. 1340func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { 1341 return nil, false 1342} 1343 1344// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. 1345func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { 1346 return nil, false 1347} 1348 1349// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. 1350func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { 1351 return nil, false 1352} 1353 1354// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. 1355func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { 1356 return nil, false 1357} 1358 1359// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. 1360func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { 1361 return &aisccvpi, true 1362} 1363 1364// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. 1365func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { 1366 return nil, false 1367} 1368 1369// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. 1370func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { 1371 return &aisccvpi, true 1372} 1373 1374// AzureIaaSClassicComputeVMProtectedItem iaaS VM workload-specific backup item representing the Classic 1375// Compute VM. 1376type AzureIaaSClassicComputeVMProtectedItem struct { 1377 // FriendlyName - Friendly name of the VM represented by this backup item. 1378 FriendlyName *string `json:"friendlyName,omitempty"` 1379 // VirtualMachineID - Fully qualified ARM ID of the virtual machine represented by this item. 1380 VirtualMachineID *string `json:"virtualMachineId,omitempty"` 1381 // ProtectionStatus - Backup status of this backup item. 1382 ProtectionStatus *string `json:"protectionStatus,omitempty"` 1383 // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' 1384 ProtectionState ProtectionState `json:"protectionState,omitempty"` 1385 // HealthStatus - Health status of protected item. Possible values include: 'HealthStatusPassed', 'HealthStatusActionRequired', 'HealthStatusActionSuggested', 'HealthStatusInvalid' 1386 HealthStatus HealthStatus `json:"healthStatus,omitempty"` 1387 // HealthDetails - Health details on this backup item. 1388 HealthDetails *[]AzureIaaSVMHealthDetails `json:"healthDetails,omitempty"` 1389 // KpisHealths - Health details of different KPIs 1390 KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"` 1391 // LastBackupStatus - Last backup operation status. 1392 LastBackupStatus *string `json:"lastBackupStatus,omitempty"` 1393 // LastBackupTime - Timestamp of the last backup operation on this backup item. 1394 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` 1395 // ProtectedItemDataID - Data ID of the protected item. 1396 ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"` 1397 // ExtendedInfo - Additional information for this backup item. 1398 ExtendedInfo *AzureIaaSVMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` 1399 ExtendedProperties *ExtendedProperties `json:"extendedProperties,omitempty"` 1400 // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 1401 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 1402 // 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' 1403 WorkloadType DataSourceType `json:"workloadType,omitempty"` 1404 // ContainerName - Unique name of container 1405 ContainerName *string `json:"containerName,omitempty"` 1406 // SourceResourceID - ARM ID of the resource to be backed up. 1407 SourceResourceID *string `json:"sourceResourceId,omitempty"` 1408 // PolicyID - ID of the backup policy with which this item is backed up. 1409 PolicyID *string `json:"policyId,omitempty"` 1410 // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. 1411 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` 1412 // BackupSetName - Name of the backup set the backup item belongs to 1413 BackupSetName *string `json:"backupSetName,omitempty"` 1414 // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' 1415 CreateMode CreateMode `json:"createMode,omitempty"` 1416 // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC 1417 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` 1418 // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete 1419 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` 1420 // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted 1421 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` 1422 // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon 1423 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` 1424 // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state 1425 IsRehydrate *bool `json:"isRehydrate,omitempty"` 1426 // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' 1427 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` 1428} 1429 1430// MarshalJSON is the custom marshaler for AzureIaaSClassicComputeVMProtectedItem. 1431func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) MarshalJSON() ([]byte, error) { 1432 aisccvpi.ProtectedItemType = ProtectedItemTypeMicrosoftClassicComputevirtualMachines 1433 objectMap := make(map[string]interface{}) 1434 if aisccvpi.FriendlyName != nil { 1435 objectMap["friendlyName"] = aisccvpi.FriendlyName 1436 } 1437 if aisccvpi.VirtualMachineID != nil { 1438 objectMap["virtualMachineId"] = aisccvpi.VirtualMachineID 1439 } 1440 if aisccvpi.ProtectionStatus != nil { 1441 objectMap["protectionStatus"] = aisccvpi.ProtectionStatus 1442 } 1443 if aisccvpi.ProtectionState != "" { 1444 objectMap["protectionState"] = aisccvpi.ProtectionState 1445 } 1446 if aisccvpi.HealthStatus != "" { 1447 objectMap["healthStatus"] = aisccvpi.HealthStatus 1448 } 1449 if aisccvpi.HealthDetails != nil { 1450 objectMap["healthDetails"] = aisccvpi.HealthDetails 1451 } 1452 if aisccvpi.KpisHealths != nil { 1453 objectMap["kpisHealths"] = aisccvpi.KpisHealths 1454 } 1455 if aisccvpi.LastBackupStatus != nil { 1456 objectMap["lastBackupStatus"] = aisccvpi.LastBackupStatus 1457 } 1458 if aisccvpi.LastBackupTime != nil { 1459 objectMap["lastBackupTime"] = aisccvpi.LastBackupTime 1460 } 1461 if aisccvpi.ProtectedItemDataID != nil { 1462 objectMap["protectedItemDataId"] = aisccvpi.ProtectedItemDataID 1463 } 1464 if aisccvpi.ExtendedInfo != nil { 1465 objectMap["extendedInfo"] = aisccvpi.ExtendedInfo 1466 } 1467 if aisccvpi.ExtendedProperties != nil { 1468 objectMap["extendedProperties"] = aisccvpi.ExtendedProperties 1469 } 1470 if aisccvpi.BackupManagementType != "" { 1471 objectMap["backupManagementType"] = aisccvpi.BackupManagementType 1472 } 1473 if aisccvpi.WorkloadType != "" { 1474 objectMap["workloadType"] = aisccvpi.WorkloadType 1475 } 1476 if aisccvpi.ContainerName != nil { 1477 objectMap["containerName"] = aisccvpi.ContainerName 1478 } 1479 if aisccvpi.SourceResourceID != nil { 1480 objectMap["sourceResourceId"] = aisccvpi.SourceResourceID 1481 } 1482 if aisccvpi.PolicyID != nil { 1483 objectMap["policyId"] = aisccvpi.PolicyID 1484 } 1485 if aisccvpi.LastRecoveryPoint != nil { 1486 objectMap["lastRecoveryPoint"] = aisccvpi.LastRecoveryPoint 1487 } 1488 if aisccvpi.BackupSetName != nil { 1489 objectMap["backupSetName"] = aisccvpi.BackupSetName 1490 } 1491 if aisccvpi.CreateMode != "" { 1492 objectMap["createMode"] = aisccvpi.CreateMode 1493 } 1494 if aisccvpi.DeferredDeleteTimeInUTC != nil { 1495 objectMap["deferredDeleteTimeInUTC"] = aisccvpi.DeferredDeleteTimeInUTC 1496 } 1497 if aisccvpi.IsScheduledForDeferredDelete != nil { 1498 objectMap["isScheduledForDeferredDelete"] = aisccvpi.IsScheduledForDeferredDelete 1499 } 1500 if aisccvpi.DeferredDeleteTimeRemaining != nil { 1501 objectMap["deferredDeleteTimeRemaining"] = aisccvpi.DeferredDeleteTimeRemaining 1502 } 1503 if aisccvpi.IsDeferredDeleteScheduleUpcoming != nil { 1504 objectMap["isDeferredDeleteScheduleUpcoming"] = aisccvpi.IsDeferredDeleteScheduleUpcoming 1505 } 1506 if aisccvpi.IsRehydrate != nil { 1507 objectMap["isRehydrate"] = aisccvpi.IsRehydrate 1508 } 1509 if aisccvpi.ProtectedItemType != "" { 1510 objectMap["protectedItemType"] = aisccvpi.ProtectedItemType 1511 } 1512 return json.Marshal(objectMap) 1513} 1514 1515// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1516func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { 1517 return nil, false 1518} 1519 1520// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1521func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { 1522 return &aisccvpi, true 1523} 1524 1525// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1526func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { 1527 return nil, false 1528} 1529 1530// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1531func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { 1532 return nil, false 1533} 1534 1535// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1536func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { 1537 return &aisccvpi, true 1538} 1539 1540// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1541func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { 1542 return nil, false 1543} 1544 1545// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1546func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { 1547 return nil, false 1548} 1549 1550// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1551func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { 1552 return nil, false 1553} 1554 1555// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1556func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { 1557 return nil, false 1558} 1559 1560// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1561func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { 1562 return nil, false 1563} 1564 1565// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1566func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { 1567 return nil, false 1568} 1569 1570// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1571func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { 1572 return nil, false 1573} 1574 1575// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1576func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { 1577 return nil, false 1578} 1579 1580// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1581func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { 1582 return nil, false 1583} 1584 1585// AsProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1586func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { 1587 return nil, false 1588} 1589 1590// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. 1591func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { 1592 return &aisccvpi, true 1593} 1594 1595// AzureIaaSComputeVMContainer iaaS VM workload-specific backup item representing an Azure Resource Manager 1596// virtual machine. 1597type AzureIaaSComputeVMContainer struct { 1598 // VirtualMachineID - Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. 1599 VirtualMachineID *string `json:"virtualMachineId,omitempty"` 1600 // VirtualMachineVersion - Specifies whether the container represents a Classic or an Azure Resource Manager VM. 1601 VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` 1602 // ResourceGroup - Resource group name of Recovery Services Vault. 1603 ResourceGroup *string `json:"resourceGroup,omitempty"` 1604 // FriendlyName - Friendly name of the container. 1605 FriendlyName *string `json:"friendlyName,omitempty"` 1606 // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 1607 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 1608 // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. 1609 RegistrationStatus *string `json:"registrationStatus,omitempty"` 1610 // HealthStatus - Status of health of the container. 1611 HealthStatus *string `json:"healthStatus,omitempty"` 1612 // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' 1613 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` 1614} 1615 1616// MarshalJSON is the custom marshaler for AzureIaaSComputeVMContainer. 1617func (aiscvc AzureIaaSComputeVMContainer) MarshalJSON() ([]byte, error) { 1618 aiscvc.ContainerType = ContainerTypeMicrosoftComputevirtualMachines 1619 objectMap := make(map[string]interface{}) 1620 if aiscvc.VirtualMachineID != nil { 1621 objectMap["virtualMachineId"] = aiscvc.VirtualMachineID 1622 } 1623 if aiscvc.VirtualMachineVersion != nil { 1624 objectMap["virtualMachineVersion"] = aiscvc.VirtualMachineVersion 1625 } 1626 if aiscvc.ResourceGroup != nil { 1627 objectMap["resourceGroup"] = aiscvc.ResourceGroup 1628 } 1629 if aiscvc.FriendlyName != nil { 1630 objectMap["friendlyName"] = aiscvc.FriendlyName 1631 } 1632 if aiscvc.BackupManagementType != "" { 1633 objectMap["backupManagementType"] = aiscvc.BackupManagementType 1634 } 1635 if aiscvc.RegistrationStatus != nil { 1636 objectMap["registrationStatus"] = aiscvc.RegistrationStatus 1637 } 1638 if aiscvc.HealthStatus != nil { 1639 objectMap["healthStatus"] = aiscvc.HealthStatus 1640 } 1641 if aiscvc.ContainerType != "" { 1642 objectMap["containerType"] = aiscvc.ContainerType 1643 } 1644 return json.Marshal(objectMap) 1645} 1646 1647// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1648func (aiscvc AzureIaaSComputeVMContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { 1649 return nil, false 1650} 1651 1652// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1653func (aiscvc AzureIaaSComputeVMContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { 1654 return nil, false 1655} 1656 1657// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1658func (aiscvc AzureIaaSComputeVMContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { 1659 return &aiscvc, true 1660} 1661 1662// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1663func (aiscvc AzureIaaSComputeVMContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { 1664 return nil, false 1665} 1666 1667// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1668func (aiscvc AzureIaaSComputeVMContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { 1669 return nil, false 1670} 1671 1672// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1673func (aiscvc AzureIaaSComputeVMContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { 1674 return nil, false 1675} 1676 1677// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1678func (aiscvc AzureIaaSComputeVMContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { 1679 return nil, false 1680} 1681 1682// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1683func (aiscvc AzureIaaSComputeVMContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { 1684 return nil, false 1685} 1686 1687// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1688func (aiscvc AzureIaaSComputeVMContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { 1689 return nil, false 1690} 1691 1692// AsDpmContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1693func (aiscvc AzureIaaSComputeVMContainer) AsDpmContainer() (*DpmContainer, bool) { 1694 return nil, false 1695} 1696 1697// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1698func (aiscvc AzureIaaSComputeVMContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { 1699 return nil, false 1700} 1701 1702// AsGenericContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1703func (aiscvc AzureIaaSComputeVMContainer) AsGenericContainer() (*GenericContainer, bool) { 1704 return nil, false 1705} 1706 1707// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1708func (aiscvc AzureIaaSComputeVMContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { 1709 return nil, false 1710} 1711 1712// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1713func (aiscvc AzureIaaSComputeVMContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { 1714 return &aiscvc, true 1715} 1716 1717// AsMabContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1718func (aiscvc AzureIaaSComputeVMContainer) AsMabContainer() (*MabContainer, bool) { 1719 return nil, false 1720} 1721 1722// AsProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1723func (aiscvc AzureIaaSComputeVMContainer) AsProtectionContainer() (*ProtectionContainer, bool) { 1724 return nil, false 1725} 1726 1727// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. 1728func (aiscvc AzureIaaSComputeVMContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { 1729 return &aiscvc, true 1730} 1731 1732// AzureIaaSComputeVMProtectableItem iaaS VM workload-specific backup item representing the Azure Resource 1733// Manager VM. 1734type AzureIaaSComputeVMProtectableItem struct { 1735 // VirtualMachineID - Fully qualified ARM ID of the virtual machine. 1736 VirtualMachineID *string `json:"virtualMachineId,omitempty"` 1737 // BackupManagementType - Type of backup management to backup an item. 1738 BackupManagementType *string `json:"backupManagementType,omitempty"` 1739 // WorkloadType - Type of workload for the backup management 1740 WorkloadType *string `json:"workloadType,omitempty"` 1741 // FriendlyName - Friendly name of the backup item. 1742 FriendlyName *string `json:"friendlyName,omitempty"` 1743 // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 1744 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 1745 // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' 1746 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` 1747} 1748 1749// MarshalJSON is the custom marshaler for AzureIaaSComputeVMProtectableItem. 1750func (aiscvpi AzureIaaSComputeVMProtectableItem) MarshalJSON() ([]byte, error) { 1751 aiscvpi.ProtectableItemType = ProtectableItemTypeMicrosoftComputevirtualMachines 1752 objectMap := make(map[string]interface{}) 1753 if aiscvpi.VirtualMachineID != nil { 1754 objectMap["virtualMachineId"] = aiscvpi.VirtualMachineID 1755 } 1756 if aiscvpi.BackupManagementType != nil { 1757 objectMap["backupManagementType"] = aiscvpi.BackupManagementType 1758 } 1759 if aiscvpi.WorkloadType != nil { 1760 objectMap["workloadType"] = aiscvpi.WorkloadType 1761 } 1762 if aiscvpi.FriendlyName != nil { 1763 objectMap["friendlyName"] = aiscvpi.FriendlyName 1764 } 1765 if aiscvpi.ProtectionState != "" { 1766 objectMap["protectionState"] = aiscvpi.ProtectionState 1767 } 1768 if aiscvpi.ProtectableItemType != "" { 1769 objectMap["protectableItemType"] = aiscvpi.ProtectableItemType 1770 } 1771 return json.Marshal(objectMap) 1772} 1773 1774// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. 1775func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { 1776 return nil, false 1777} 1778 1779// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. 1780func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { 1781 return nil, false 1782} 1783 1784// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. 1785func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { 1786 return &aiscvpi, true 1787} 1788 1789// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. 1790func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { 1791 return nil, false 1792} 1793 1794// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. 1795func (aiscvpi AzureIaaSComputeVMProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { 1796 return nil, false 1797} 1798 1799// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. 1800func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { 1801 return nil, false 1802} 1803 1804// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. 1805func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { 1806 return nil, false 1807} 1808 1809// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. 1810func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { 1811 return nil, false 1812} 1813 1814// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. 1815func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { 1816 return nil, false 1817} 1818 1819// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. 1820func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { 1821 return nil, false 1822} 1823 1824// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. 1825func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { 1826 return nil, false 1827} 1828 1829// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. 1830func (aiscvpi AzureIaaSComputeVMProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { 1831 return nil, false 1832} 1833 1834// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. 1835func (aiscvpi AzureIaaSComputeVMProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { 1836 return &aiscvpi, true 1837} 1838 1839// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. 1840func (aiscvpi AzureIaaSComputeVMProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { 1841 return nil, false 1842} 1843 1844// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. 1845func (aiscvpi AzureIaaSComputeVMProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { 1846 return &aiscvpi, true 1847} 1848 1849// AzureIaaSComputeVMProtectedItem iaaS VM workload-specific backup item representing the Azure Resource 1850// Manager VM. 1851type AzureIaaSComputeVMProtectedItem struct { 1852 // FriendlyName - Friendly name of the VM represented by this backup item. 1853 FriendlyName *string `json:"friendlyName,omitempty"` 1854 // VirtualMachineID - Fully qualified ARM ID of the virtual machine represented by this item. 1855 VirtualMachineID *string `json:"virtualMachineId,omitempty"` 1856 // ProtectionStatus - Backup status of this backup item. 1857 ProtectionStatus *string `json:"protectionStatus,omitempty"` 1858 // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' 1859 ProtectionState ProtectionState `json:"protectionState,omitempty"` 1860 // HealthStatus - Health status of protected item. Possible values include: 'HealthStatusPassed', 'HealthStatusActionRequired', 'HealthStatusActionSuggested', 'HealthStatusInvalid' 1861 HealthStatus HealthStatus `json:"healthStatus,omitempty"` 1862 // HealthDetails - Health details on this backup item. 1863 HealthDetails *[]AzureIaaSVMHealthDetails `json:"healthDetails,omitempty"` 1864 // KpisHealths - Health details of different KPIs 1865 KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"` 1866 // LastBackupStatus - Last backup operation status. 1867 LastBackupStatus *string `json:"lastBackupStatus,omitempty"` 1868 // LastBackupTime - Timestamp of the last backup operation on this backup item. 1869 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` 1870 // ProtectedItemDataID - Data ID of the protected item. 1871 ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"` 1872 // ExtendedInfo - Additional information for this backup item. 1873 ExtendedInfo *AzureIaaSVMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` 1874 ExtendedProperties *ExtendedProperties `json:"extendedProperties,omitempty"` 1875 // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 1876 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 1877 // 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' 1878 WorkloadType DataSourceType `json:"workloadType,omitempty"` 1879 // ContainerName - Unique name of container 1880 ContainerName *string `json:"containerName,omitempty"` 1881 // SourceResourceID - ARM ID of the resource to be backed up. 1882 SourceResourceID *string `json:"sourceResourceId,omitempty"` 1883 // PolicyID - ID of the backup policy with which this item is backed up. 1884 PolicyID *string `json:"policyId,omitempty"` 1885 // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. 1886 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` 1887 // BackupSetName - Name of the backup set the backup item belongs to 1888 BackupSetName *string `json:"backupSetName,omitempty"` 1889 // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' 1890 CreateMode CreateMode `json:"createMode,omitempty"` 1891 // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC 1892 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` 1893 // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete 1894 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` 1895 // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted 1896 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` 1897 // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon 1898 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` 1899 // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state 1900 IsRehydrate *bool `json:"isRehydrate,omitempty"` 1901 // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' 1902 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` 1903} 1904 1905// MarshalJSON is the custom marshaler for AzureIaaSComputeVMProtectedItem. 1906func (aiscvpi AzureIaaSComputeVMProtectedItem) MarshalJSON() ([]byte, error) { 1907 aiscvpi.ProtectedItemType = ProtectedItemTypeMicrosoftComputevirtualMachines 1908 objectMap := make(map[string]interface{}) 1909 if aiscvpi.FriendlyName != nil { 1910 objectMap["friendlyName"] = aiscvpi.FriendlyName 1911 } 1912 if aiscvpi.VirtualMachineID != nil { 1913 objectMap["virtualMachineId"] = aiscvpi.VirtualMachineID 1914 } 1915 if aiscvpi.ProtectionStatus != nil { 1916 objectMap["protectionStatus"] = aiscvpi.ProtectionStatus 1917 } 1918 if aiscvpi.ProtectionState != "" { 1919 objectMap["protectionState"] = aiscvpi.ProtectionState 1920 } 1921 if aiscvpi.HealthStatus != "" { 1922 objectMap["healthStatus"] = aiscvpi.HealthStatus 1923 } 1924 if aiscvpi.HealthDetails != nil { 1925 objectMap["healthDetails"] = aiscvpi.HealthDetails 1926 } 1927 if aiscvpi.KpisHealths != nil { 1928 objectMap["kpisHealths"] = aiscvpi.KpisHealths 1929 } 1930 if aiscvpi.LastBackupStatus != nil { 1931 objectMap["lastBackupStatus"] = aiscvpi.LastBackupStatus 1932 } 1933 if aiscvpi.LastBackupTime != nil { 1934 objectMap["lastBackupTime"] = aiscvpi.LastBackupTime 1935 } 1936 if aiscvpi.ProtectedItemDataID != nil { 1937 objectMap["protectedItemDataId"] = aiscvpi.ProtectedItemDataID 1938 } 1939 if aiscvpi.ExtendedInfo != nil { 1940 objectMap["extendedInfo"] = aiscvpi.ExtendedInfo 1941 } 1942 if aiscvpi.ExtendedProperties != nil { 1943 objectMap["extendedProperties"] = aiscvpi.ExtendedProperties 1944 } 1945 if aiscvpi.BackupManagementType != "" { 1946 objectMap["backupManagementType"] = aiscvpi.BackupManagementType 1947 } 1948 if aiscvpi.WorkloadType != "" { 1949 objectMap["workloadType"] = aiscvpi.WorkloadType 1950 } 1951 if aiscvpi.ContainerName != nil { 1952 objectMap["containerName"] = aiscvpi.ContainerName 1953 } 1954 if aiscvpi.SourceResourceID != nil { 1955 objectMap["sourceResourceId"] = aiscvpi.SourceResourceID 1956 } 1957 if aiscvpi.PolicyID != nil { 1958 objectMap["policyId"] = aiscvpi.PolicyID 1959 } 1960 if aiscvpi.LastRecoveryPoint != nil { 1961 objectMap["lastRecoveryPoint"] = aiscvpi.LastRecoveryPoint 1962 } 1963 if aiscvpi.BackupSetName != nil { 1964 objectMap["backupSetName"] = aiscvpi.BackupSetName 1965 } 1966 if aiscvpi.CreateMode != "" { 1967 objectMap["createMode"] = aiscvpi.CreateMode 1968 } 1969 if aiscvpi.DeferredDeleteTimeInUTC != nil { 1970 objectMap["deferredDeleteTimeInUTC"] = aiscvpi.DeferredDeleteTimeInUTC 1971 } 1972 if aiscvpi.IsScheduledForDeferredDelete != nil { 1973 objectMap["isScheduledForDeferredDelete"] = aiscvpi.IsScheduledForDeferredDelete 1974 } 1975 if aiscvpi.DeferredDeleteTimeRemaining != nil { 1976 objectMap["deferredDeleteTimeRemaining"] = aiscvpi.DeferredDeleteTimeRemaining 1977 } 1978 if aiscvpi.IsDeferredDeleteScheduleUpcoming != nil { 1979 objectMap["isDeferredDeleteScheduleUpcoming"] = aiscvpi.IsDeferredDeleteScheduleUpcoming 1980 } 1981 if aiscvpi.IsRehydrate != nil { 1982 objectMap["isRehydrate"] = aiscvpi.IsRehydrate 1983 } 1984 if aiscvpi.ProtectedItemType != "" { 1985 objectMap["protectedItemType"] = aiscvpi.ProtectedItemType 1986 } 1987 return json.Marshal(objectMap) 1988} 1989 1990// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 1991func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { 1992 return nil, false 1993} 1994 1995// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 1996func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { 1997 return nil, false 1998} 1999 2000// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 2001func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { 2002 return &aiscvpi, true 2003} 2004 2005// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 2006func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { 2007 return nil, false 2008} 2009 2010// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 2011func (aiscvpi AzureIaaSComputeVMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { 2012 return &aiscvpi, true 2013} 2014 2015// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 2016func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { 2017 return nil, false 2018} 2019 2020// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 2021func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { 2022 return nil, false 2023} 2024 2025// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 2026func (aiscvpi AzureIaaSComputeVMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { 2027 return nil, false 2028} 2029 2030// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 2031func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { 2032 return nil, false 2033} 2034 2035// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 2036func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { 2037 return nil, false 2038} 2039 2040// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 2041func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { 2042 return nil, false 2043} 2044 2045// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 2046func (aiscvpi AzureIaaSComputeVMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { 2047 return nil, false 2048} 2049 2050// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 2051func (aiscvpi AzureIaaSComputeVMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { 2052 return nil, false 2053} 2054 2055// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 2056func (aiscvpi AzureIaaSComputeVMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { 2057 return nil, false 2058} 2059 2060// AsProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 2061func (aiscvpi AzureIaaSComputeVMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { 2062 return nil, false 2063} 2064 2065// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. 2066func (aiscvpi AzureIaaSComputeVMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { 2067 return &aiscvpi, true 2068} 2069 2070// AzureIaaSVMErrorInfo azure IaaS VM workload-specific error information. 2071type AzureIaaSVMErrorInfo struct { 2072 // ErrorCode - READ-ONLY; Error code. 2073 ErrorCode *int32 `json:"errorCode,omitempty"` 2074 // ErrorTitle - READ-ONLY; Title: Typically, the entity that the error pertains to. 2075 ErrorTitle *string `json:"errorTitle,omitempty"` 2076 // ErrorString - READ-ONLY; Localized error string. 2077 ErrorString *string `json:"errorString,omitempty"` 2078 // Recommendations - READ-ONLY; List of localized recommendations for above error code. 2079 Recommendations *[]string `json:"recommendations,omitempty"` 2080} 2081 2082// AzureIaaSVMHealthDetails azure IaaS VM workload-specific Health Details. 2083type AzureIaaSVMHealthDetails struct { 2084 // Code - READ-ONLY; Health Code 2085 Code *int32 `json:"code,omitempty"` 2086 // Title - READ-ONLY; Health Title 2087 Title *string `json:"title,omitempty"` 2088 // Message - READ-ONLY; Health Message 2089 Message *string `json:"message,omitempty"` 2090 // Recommendations - READ-ONLY; Health Recommended Actions 2091 Recommendations *[]string `json:"recommendations,omitempty"` 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// BasicAzureWorkloadSQLRestoreRequest azureWorkload SQL -specific restore. Specifically for full/diff restore 9164type BasicAzureWorkloadSQLRestoreRequest interface { 9165 AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) 9166 AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) 9167} 9168 9169// AzureWorkloadSQLRestoreRequest azureWorkload SQL -specific restore. Specifically for full/diff restore 9170type AzureWorkloadSQLRestoreRequest struct { 9171 // ShouldUseAlternateTargetLocation - Default option set to true. If this is set to false, alternate data directory must be provided 9172 ShouldUseAlternateTargetLocation *bool `json:"shouldUseAlternateTargetLocation,omitempty"` 9173 // IsNonRecoverable - SQL specific property where user can chose to set no-recovery when restore operation is tried 9174 IsNonRecoverable *bool `json:"isNonRecoverable,omitempty"` 9175 // AlternateDirectoryPaths - Data directory details 9176 AlternateDirectoryPaths *[]SQLDataDirectoryMapping `json:"alternateDirectoryPaths,omitempty"` 9177 // RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline' 9178 RecoveryType RecoveryType `json:"recoveryType,omitempty"` 9179 // SourceResourceID - Fully qualified ARM ID of the VM on which workload that was running is being recovered. 9180 SourceResourceID *string `json:"sourceResourceId,omitempty"` 9181 // PropertyBag - Workload specific property bag. 9182 PropertyBag map[string]*string `json:"propertyBag"` 9183 // TargetInfo - Details of target database 9184 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"` 9185 // RecoveryMode - Defines whether the current recovery mode is file restore or database restore. Possible values include: 'RecoveryModeInvalid', 'RecoveryModeFileRecovery', 'RecoveryModeWorkloadRecovery' 9186 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"` 9187 // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' 9188 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` 9189} 9190 9191func unmarshalBasicAzureWorkloadSQLRestoreRequest(body []byte) (BasicAzureWorkloadSQLRestoreRequest, error) { 9192 var m map[string]interface{} 9193 err := json.Unmarshal(body, &m) 9194 if err != nil { 9195 return nil, err 9196 } 9197 9198 switch m["objectType"] { 9199 case string(ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest): 9200 var awspitrr AzureWorkloadSQLPointInTimeRestoreRequest 9201 err := json.Unmarshal(body, &awspitrr) 9202 return awspitrr, err 9203 default: 9204 var awsrr AzureWorkloadSQLRestoreRequest 9205 err := json.Unmarshal(body, &awsrr) 9206 return awsrr, err 9207 } 9208} 9209func unmarshalBasicAzureWorkloadSQLRestoreRequestArray(body []byte) ([]BasicAzureWorkloadSQLRestoreRequest, error) { 9210 var rawMessages []*json.RawMessage 9211 err := json.Unmarshal(body, &rawMessages) 9212 if err != nil { 9213 return nil, err 9214 } 9215 9216 awsrrArray := make([]BasicAzureWorkloadSQLRestoreRequest, len(rawMessages)) 9217 9218 for index, rawMessage := range rawMessages { 9219 awsrr, err := unmarshalBasicAzureWorkloadSQLRestoreRequest(*rawMessage) 9220 if err != nil { 9221 return nil, err 9222 } 9223 awsrrArray[index] = awsrr 9224 } 9225 return awsrrArray, nil 9226} 9227 9228// MarshalJSON is the custom marshaler for AzureWorkloadSQLRestoreRequest. 9229func (awsrr AzureWorkloadSQLRestoreRequest) MarshalJSON() ([]byte, error) { 9230 awsrr.ObjectType = ObjectTypeAzureWorkloadSQLRestoreRequest 9231 objectMap := make(map[string]interface{}) 9232 if awsrr.ShouldUseAlternateTargetLocation != nil { 9233 objectMap["shouldUseAlternateTargetLocation"] = awsrr.ShouldUseAlternateTargetLocation 9234 } 9235 if awsrr.IsNonRecoverable != nil { 9236 objectMap["isNonRecoverable"] = awsrr.IsNonRecoverable 9237 } 9238 if awsrr.AlternateDirectoryPaths != nil { 9239 objectMap["alternateDirectoryPaths"] = awsrr.AlternateDirectoryPaths 9240 } 9241 if awsrr.RecoveryType != "" { 9242 objectMap["recoveryType"] = awsrr.RecoveryType 9243 } 9244 if awsrr.SourceResourceID != nil { 9245 objectMap["sourceResourceId"] = awsrr.SourceResourceID 9246 } 9247 if awsrr.PropertyBag != nil { 9248 objectMap["propertyBag"] = awsrr.PropertyBag 9249 } 9250 if awsrr.TargetInfo != nil { 9251 objectMap["targetInfo"] = awsrr.TargetInfo 9252 } 9253 if awsrr.RecoveryMode != "" { 9254 objectMap["recoveryMode"] = awsrr.RecoveryMode 9255 } 9256 if awsrr.ObjectType != "" { 9257 objectMap["objectType"] = awsrr.ObjectType 9258 } 9259 return json.Marshal(objectMap) 9260} 9261 9262// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. 9263func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { 9264 return nil, false 9265} 9266 9267// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. 9268func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { 9269 return nil, false 9270} 9271 9272// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. 9273func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { 9274 return nil, false 9275} 9276 9277// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. 9278func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { 9279 return &awsrr, true 9280} 9281 9282// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. 9283func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { 9284 return nil, false 9285} 9286 9287// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. 9288func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { 9289 return nil, false 9290} 9291 9292// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. 9293func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { 9294 return nil, false 9295} 9296 9297// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. 9298func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { 9299 return nil, false 9300} 9301 9302// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. 9303func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { 9304 return &awsrr, true 9305} 9306 9307// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. 9308func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { 9309 return &awsrr, true 9310} 9311 9312// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. 9313func (awsrr AzureWorkloadSQLRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { 9314 return nil, false 9315} 9316 9317// AsRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. 9318func (awsrr AzureWorkloadSQLRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { 9319 return nil, false 9320} 9321 9322// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. 9323func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { 9324 return &awsrr, true 9325} 9326 9327// BEKDetails BEK is bitlocker encryption key. 9328type BEKDetails struct { 9329 // SecretURL - Secret is BEK. 9330 SecretURL *string `json:"secretUrl,omitempty"` 9331 // SecretVaultID - ID of the Key Vault where this Secret is stored. 9332 SecretVaultID *string `json:"secretVaultId,omitempty"` 9333 // SecretData - BEK data. 9334 SecretData *string `json:"secretData,omitempty"` 9335} 9336 9337// BMSBackupEngineQueryObject query parameters to fetch list of backup engines. 9338type BMSBackupEngineQueryObject struct { 9339 // Expand - attribute to add extended info 9340 Expand *string `json:"expand,omitempty"` 9341} 9342 9343// BMSBackupEnginesQueryObject query parameters to fetch list of backup engines. 9344type BMSBackupEnginesQueryObject struct { 9345 // BackupManagementType - Backup management type for the backup engine. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 9346 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 9347 // FriendlyName - Friendly name of the backup engine. 9348 FriendlyName *string `json:"friendlyName,omitempty"` 9349 // Expand - Attribute to add extended info. 9350 Expand *string `json:"expand,omitempty"` 9351} 9352 9353// BMSBackupSummariesQueryObject query parameters to fetch backup summaries. 9354type BMSBackupSummariesQueryObject struct { 9355 // Type - Backup management type for this container. Possible values include: 'TypeInvalid', 'TypeBackupProtectedItemCountSummary', 'TypeBackupProtectionContainerCountSummary' 9356 Type Type `json:"type,omitempty"` 9357} 9358 9359// BMSContainerQueryObject the query filters that can be used with the list containers API. 9360type BMSContainerQueryObject struct { 9361 // BackupManagementType - Backup management type for this container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 9362 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 9363 // ContainerType - Type of container for filter. Possible values include: 'ContainerTypeInvalid', 'ContainerTypeUnknown', 'ContainerTypeIaasVMContainer', 'ContainerTypeIaasVMServiceContainer', 'ContainerTypeDPMContainer', 'ContainerTypeAzureBackupServerContainer', 'ContainerTypeMABContainer', 'ContainerTypeCluster', 'ContainerTypeAzureSQLContainer', 'ContainerTypeWindows', 'ContainerTypeVCenter', 'ContainerTypeVMAppContainer', 'ContainerTypeSQLAGWorkLoadContainer', 'ContainerTypeStorageContainer', 'ContainerTypeGenericContainer' 9364 ContainerType ContainerType `json:"containerType,omitempty"` 9365 // BackupEngineName - Backup engine name 9366 BackupEngineName *string `json:"backupEngineName,omitempty"` 9367 // FabricName - Fabric name for filter 9368 FabricName *string `json:"fabricName,omitempty"` 9369 // Status - Status of registration of this container with the Recovery Services Vault. 9370 Status *string `json:"status,omitempty"` 9371 // FriendlyName - Friendly name of this container. 9372 FriendlyName *string `json:"friendlyName,omitempty"` 9373} 9374 9375// BMSContainersInquiryQueryObject the query filters that can be used with the inquire container API. 9376type BMSContainersInquiryQueryObject struct { 9377 // BackupManagementType - Backup management type for this container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 9378 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 9379 // WorkloadType - Workload type for this container. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' 9380 WorkloadType WorkloadType `json:"workloadType,omitempty"` 9381} 9382 9383// BMSPOQueryObject filters to list items that can be backed up. 9384type BMSPOQueryObject struct { 9385 // BackupManagementType - Backup management type. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 9386 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 9387 // WorkloadType - Workload type. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' 9388 WorkloadType WorkloadType `json:"workloadType,omitempty"` 9389 // ContainerName - Full name of the container whose Protectable Objects should be returned. 9390 ContainerName *string `json:"containerName,omitempty"` 9391 // Status - Backup status query parameter. 9392 Status *string `json:"status,omitempty"` 9393 // FriendlyName - Friendly name. 9394 FriendlyName *string `json:"friendlyName,omitempty"` 9395} 9396 9397// BMSRefreshContainersQueryObject the query filters that can be used with the refresh container API. 9398type BMSRefreshContainersQueryObject struct { 9399 // BackupManagementType - Backup management type for this container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 9400 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 9401} 9402 9403// BMSRPQueryObject filters to list backup copies. 9404type BMSRPQueryObject struct { 9405 // StartDate - Backup copies created after this time. 9406 StartDate *date.Time `json:"startDate,omitempty"` 9407 // EndDate - Backup copies created before this time. 9408 EndDate *date.Time `json:"endDate,omitempty"` 9409 // RestorePointQueryType - RestorePoint type. Possible values include: 'RestorePointQueryTypeInvalid', 'RestorePointQueryTypeFull', 'RestorePointQueryTypeLog', 'RestorePointQueryTypeDifferential', 'RestorePointQueryTypeFullAndDifferential', 'RestorePointQueryTypeAll' 9410 RestorePointQueryType RestorePointQueryType `json:"restorePointQueryType,omitempty"` 9411 // ExtendedInfo - In Get Recovery Point, it tells whether extended information about recovery point is asked. 9412 ExtendedInfo *bool `json:"extendedInfo,omitempty"` 9413} 9414 9415// BMSWorkloadItemQueryObject filters to list items that can be backed up. 9416type BMSWorkloadItemQueryObject struct { 9417 // BackupManagementType - Backup management type. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 9418 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 9419 // WorkloadItemType - Workload Item type. Possible values include: 'WorkloadItemTypeInvalid', 'WorkloadItemTypeSQLInstance', 'WorkloadItemTypeSQLDataBase', 'WorkloadItemTypeSAPHanaSystem', 'WorkloadItemTypeSAPHanaDatabase', 'WorkloadItemTypeSAPAseSystem', 'WorkloadItemTypeSAPAseDatabase' 9420 WorkloadItemType WorkloadItemType `json:"workloadItemType,omitempty"` 9421 // WorkloadType - Workload type. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' 9422 WorkloadType WorkloadType `json:"workloadType,omitempty"` 9423 // ProtectionStatus - Backup status query parameter. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 9424 ProtectionStatus ProtectionStatus `json:"protectionStatus,omitempty"` 9425} 9426 9427// ClientDiscoveryDisplay localized display information of an operation. 9428type ClientDiscoveryDisplay struct { 9429 // Provider - Name of the provider for display purposes 9430 Provider *string `json:"provider,omitempty"` 9431 // Resource - ResourceType for which this Operation can be performed. 9432 Resource *string `json:"resource,omitempty"` 9433 // Operation - Operations Name itself. 9434 Operation *string `json:"operation,omitempty"` 9435 // Description - Description of the operation having details of what operation is about. 9436 Description *string `json:"description,omitempty"` 9437} 9438 9439// ClientDiscoveryForLogSpecification class to represent shoebox log specification in json client 9440// discovery. 9441type ClientDiscoveryForLogSpecification struct { 9442 // Name - Name for shoebox log specification. 9443 Name *string `json:"name,omitempty"` 9444 // DisplayName - Localized display name 9445 DisplayName *string `json:"displayName,omitempty"` 9446 // BlobDuration - blob duration of shoebox log specification 9447 BlobDuration *string `json:"blobDuration,omitempty"` 9448} 9449 9450// ClientDiscoveryForProperties class to represent shoebox properties in json client discovery. 9451type ClientDiscoveryForProperties struct { 9452 // ServiceSpecification - Operation properties. 9453 ServiceSpecification *ClientDiscoveryForServiceSpecification `json:"serviceSpecification,omitempty"` 9454} 9455 9456// ClientDiscoveryForServiceSpecification class to represent shoebox service specification in json client 9457// discovery. 9458type ClientDiscoveryForServiceSpecification struct { 9459 // LogSpecifications - List of log specifications of this operation. 9460 LogSpecifications *[]ClientDiscoveryForLogSpecification `json:"logSpecifications,omitempty"` 9461} 9462 9463// ClientDiscoveryResponse operations List response which contains list of available APIs. 9464type ClientDiscoveryResponse struct { 9465 autorest.Response `json:"-"` 9466 // Value - List of available operations. 9467 Value *[]ClientDiscoveryValueForSingleAPI `json:"value,omitempty"` 9468 // NextLink - Link to the next chunk of Response. 9469 NextLink *string `json:"nextLink,omitempty"` 9470} 9471 9472// ClientDiscoveryResponseIterator provides access to a complete listing of 9473// ClientDiscoveryValueForSingleAPI values. 9474type ClientDiscoveryResponseIterator struct { 9475 i int 9476 page ClientDiscoveryResponsePage 9477} 9478 9479// NextWithContext advances to the next value. If there was an error making 9480// the request the iterator does not advance and the error is returned. 9481func (iter *ClientDiscoveryResponseIterator) NextWithContext(ctx context.Context) (err error) { 9482 if tracing.IsEnabled() { 9483 ctx = tracing.StartSpan(ctx, fqdn+"/ClientDiscoveryResponseIterator.NextWithContext") 9484 defer func() { 9485 sc := -1 9486 if iter.Response().Response.Response != nil { 9487 sc = iter.Response().Response.Response.StatusCode 9488 } 9489 tracing.EndSpan(ctx, sc, err) 9490 }() 9491 } 9492 iter.i++ 9493 if iter.i < len(iter.page.Values()) { 9494 return nil 9495 } 9496 err = iter.page.NextWithContext(ctx) 9497 if err != nil { 9498 iter.i-- 9499 return err 9500 } 9501 iter.i = 0 9502 return nil 9503} 9504 9505// Next advances to the next value. If there was an error making 9506// the request the iterator does not advance and the error is returned. 9507// Deprecated: Use NextWithContext() instead. 9508func (iter *ClientDiscoveryResponseIterator) Next() error { 9509 return iter.NextWithContext(context.Background()) 9510} 9511 9512// NotDone returns true if the enumeration should be started or is not yet complete. 9513func (iter ClientDiscoveryResponseIterator) NotDone() bool { 9514 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 9515} 9516 9517// Response returns the raw server response from the last page request. 9518func (iter ClientDiscoveryResponseIterator) Response() ClientDiscoveryResponse { 9519 return iter.page.Response() 9520} 9521 9522// Value returns the current value or a zero-initialized value if the 9523// iterator has advanced beyond the end of the collection. 9524func (iter ClientDiscoveryResponseIterator) Value() ClientDiscoveryValueForSingleAPI { 9525 if !iter.page.NotDone() { 9526 return ClientDiscoveryValueForSingleAPI{} 9527 } 9528 return iter.page.Values()[iter.i] 9529} 9530 9531// Creates a new instance of the ClientDiscoveryResponseIterator type. 9532func NewClientDiscoveryResponseIterator(page ClientDiscoveryResponsePage) ClientDiscoveryResponseIterator { 9533 return ClientDiscoveryResponseIterator{page: page} 9534} 9535 9536// IsEmpty returns true if the ListResult contains no values. 9537func (cdr ClientDiscoveryResponse) IsEmpty() bool { 9538 return cdr.Value == nil || len(*cdr.Value) == 0 9539} 9540 9541// hasNextLink returns true if the NextLink is not empty. 9542func (cdr ClientDiscoveryResponse) hasNextLink() bool { 9543 return cdr.NextLink != nil && len(*cdr.NextLink) != 0 9544} 9545 9546// clientDiscoveryResponsePreparer prepares a request to retrieve the next set of results. 9547// It returns nil if no more results exist. 9548func (cdr ClientDiscoveryResponse) clientDiscoveryResponsePreparer(ctx context.Context) (*http.Request, error) { 9549 if !cdr.hasNextLink() { 9550 return nil, nil 9551 } 9552 return autorest.Prepare((&http.Request{}).WithContext(ctx), 9553 autorest.AsJSON(), 9554 autorest.AsGet(), 9555 autorest.WithBaseURL(to.String(cdr.NextLink))) 9556} 9557 9558// ClientDiscoveryResponsePage contains a page of ClientDiscoveryValueForSingleAPI values. 9559type ClientDiscoveryResponsePage struct { 9560 fn func(context.Context, ClientDiscoveryResponse) (ClientDiscoveryResponse, error) 9561 cdr ClientDiscoveryResponse 9562} 9563 9564// NextWithContext advances to the next page of values. If there was an error making 9565// the request the page does not advance and the error is returned. 9566func (page *ClientDiscoveryResponsePage) NextWithContext(ctx context.Context) (err error) { 9567 if tracing.IsEnabled() { 9568 ctx = tracing.StartSpan(ctx, fqdn+"/ClientDiscoveryResponsePage.NextWithContext") 9569 defer func() { 9570 sc := -1 9571 if page.Response().Response.Response != nil { 9572 sc = page.Response().Response.Response.StatusCode 9573 } 9574 tracing.EndSpan(ctx, sc, err) 9575 }() 9576 } 9577 for { 9578 next, err := page.fn(ctx, page.cdr) 9579 if err != nil { 9580 return err 9581 } 9582 page.cdr = next 9583 if !next.hasNextLink() || !next.IsEmpty() { 9584 break 9585 } 9586 } 9587 return nil 9588} 9589 9590// Next advances to the next page of values. If there was an error making 9591// the request the page does not advance and the error is returned. 9592// Deprecated: Use NextWithContext() instead. 9593func (page *ClientDiscoveryResponsePage) Next() error { 9594 return page.NextWithContext(context.Background()) 9595} 9596 9597// NotDone returns true if the page enumeration should be started or is not yet complete. 9598func (page ClientDiscoveryResponsePage) NotDone() bool { 9599 return !page.cdr.IsEmpty() 9600} 9601 9602// Response returns the raw server response from the last page request. 9603func (page ClientDiscoveryResponsePage) Response() ClientDiscoveryResponse { 9604 return page.cdr 9605} 9606 9607// Values returns the slice of values for the current page or nil if there are no values. 9608func (page ClientDiscoveryResponsePage) Values() []ClientDiscoveryValueForSingleAPI { 9609 if page.cdr.IsEmpty() { 9610 return nil 9611 } 9612 return *page.cdr.Value 9613} 9614 9615// Creates a new instance of the ClientDiscoveryResponsePage type. 9616func NewClientDiscoveryResponsePage(cur ClientDiscoveryResponse, getNextPage func(context.Context, ClientDiscoveryResponse) (ClientDiscoveryResponse, error)) ClientDiscoveryResponsePage { 9617 return ClientDiscoveryResponsePage{ 9618 fn: getNextPage, 9619 cdr: cur, 9620 } 9621} 9622 9623// ClientDiscoveryValueForSingleAPI available operation details. 9624type ClientDiscoveryValueForSingleAPI struct { 9625 // Name - Name of the Operation. 9626 Name *string `json:"name,omitempty"` 9627 // Display - Contains the localized display information for this particular operation 9628 Display *ClientDiscoveryDisplay `json:"display,omitempty"` 9629 // Origin - The intended executor of the operation;governs the display of the operation in the RBAC UX and the audit logs UX 9630 Origin *string `json:"origin,omitempty"` 9631 // Properties - ShoeBox properties for the given operation. 9632 Properties *ClientDiscoveryForProperties `json:"properties,omitempty"` 9633} 9634 9635// ClientScriptForConnect client script details for file / folder restore. 9636type ClientScriptForConnect struct { 9637 // ScriptContent - File content of the client script for file / folder restore. 9638 ScriptContent *string `json:"scriptContent,omitempty"` 9639 // ScriptExtension - File extension of the client script for file / folder restore - .ps1 , .sh , etc. 9640 ScriptExtension *string `json:"scriptExtension,omitempty"` 9641 // OsType - OS type - Windows, Linux etc. for which this file / folder restore client script works. 9642 OsType *string `json:"osType,omitempty"` 9643 // URL - URL of Executable from where to source the content. If this is not null then ScriptContent should not be used 9644 URL *string `json:"url,omitempty"` 9645 // ScriptNameSuffix - Mandatory suffix that should be added to the name of script that is given for download to user. 9646 // If its null or empty then , ignore it. 9647 ScriptNameSuffix *string `json:"scriptNameSuffix,omitempty"` 9648} 9649 9650// ContainerIdentityInfo container identity information 9651type ContainerIdentityInfo struct { 9652 // UniqueName - Unique name of the container 9653 UniqueName *string `json:"uniqueName,omitempty"` 9654 // AadTenantID - Protection container identity - AAD Tenant 9655 AadTenantID *string `json:"aadTenantId,omitempty"` 9656 // ServicePrincipalClientID - Protection container identity - AAD Service Principal 9657 ServicePrincipalClientID *string `json:"servicePrincipalClientId,omitempty"` 9658 // Audience - Protection container identity - Audience 9659 Audience *string `json:"audience,omitempty"` 9660} 9661 9662// DailyRetentionFormat daily retention format. 9663type DailyRetentionFormat struct { 9664 // DaysOfTheMonth - List of days of the month. 9665 DaysOfTheMonth *[]Day `json:"daysOfTheMonth,omitempty"` 9666} 9667 9668// DailyRetentionSchedule daily retention schedule. 9669type DailyRetentionSchedule struct { 9670 // RetentionTimes - Retention times of retention policy. 9671 RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"` 9672 // RetentionDuration - Retention duration of retention Policy. 9673 RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` 9674} 9675 9676// Day day of the week. 9677type Day struct { 9678 // Date - Date of the month 9679 Date *int32 `json:"date,omitempty"` 9680 // IsLast - Whether Date is last date of month 9681 IsLast *bool `json:"isLast,omitempty"` 9682} 9683 9684// DiskExclusionProperties ... 9685type DiskExclusionProperties struct { 9686 // DiskLunList - List of Disks' Logical Unit Numbers (LUN) to be used for VM Protection. 9687 DiskLunList *[]int32 `json:"diskLunList,omitempty"` 9688 // IsInclusionList - Flag to indicate whether DiskLunList is to be included/ excluded from backup. 9689 IsInclusionList *bool `json:"isInclusionList,omitempty"` 9690} 9691 9692// DiskInformation disk information 9693type DiskInformation struct { 9694 Lun *int32 `json:"lun,omitempty"` 9695 Name *string `json:"name,omitempty"` 9696} 9697 9698// DistributedNodesInfo this is used to represent the various nodes of the distributed container. 9699type DistributedNodesInfo struct { 9700 // NodeName - Name of the node under a distributed container. 9701 NodeName *string `json:"nodeName,omitempty"` 9702 // Status - Status of this Node. 9703 // Failed | Succeeded 9704 Status *string `json:"status,omitempty"` 9705 // ErrorDetail - Error Details if the Status is non-success. 9706 ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"` 9707} 9708 9709// DpmBackupEngine data Protection Manager (DPM) specific backup engine. 9710type DpmBackupEngine struct { 9711 // FriendlyName - Friendly name of the backup engine. 9712 FriendlyName *string `json:"friendlyName,omitempty"` 9713 // BackupManagementType - Type of backup management for the backup engine. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 9714 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 9715 // RegistrationStatus - Registration status of the backup engine with the Recovery Services Vault. 9716 RegistrationStatus *string `json:"registrationStatus,omitempty"` 9717 // BackupEngineState - Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed} 9718 BackupEngineState *string `json:"backupEngineState,omitempty"` 9719 // HealthStatus - Backup status of the backup engine. 9720 HealthStatus *string `json:"healthStatus,omitempty"` 9721 // CanReRegister - Flag indicating if the backup engine be registered, once already registered. 9722 CanReRegister *bool `json:"canReRegister,omitempty"` 9723 // BackupEngineID - ID of the backup engine. 9724 BackupEngineID *string `json:"backupEngineId,omitempty"` 9725 // DpmVersion - Backup engine version 9726 DpmVersion *string `json:"dpmVersion,omitempty"` 9727 // AzureBackupAgentVersion - Backup agent version 9728 AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"` 9729 // IsAzureBackupAgentUpgradeAvailable - To check if backup agent upgrade available 9730 IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"` 9731 // IsDpmUpgradeAvailable - To check if backup engine upgrade available 9732 IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"` 9733 // ExtendedInfo - Extended info of the backupengine 9734 ExtendedInfo *EngineExtendedInfo `json:"extendedInfo,omitempty"` 9735 // BackupEngineType - Possible values include: 'BackupEngineTypeBackupEngineBase', 'BackupEngineTypeAzureBackupServerEngine', 'BackupEngineTypeDpmBackupEngine' 9736 BackupEngineType EngineType `json:"backupEngineType,omitempty"` 9737} 9738 9739// MarshalJSON is the custom marshaler for DpmBackupEngine. 9740func (dbe DpmBackupEngine) MarshalJSON() ([]byte, error) { 9741 dbe.BackupEngineType = BackupEngineTypeDpmBackupEngine 9742 objectMap := make(map[string]interface{}) 9743 if dbe.FriendlyName != nil { 9744 objectMap["friendlyName"] = dbe.FriendlyName 9745 } 9746 if dbe.BackupManagementType != "" { 9747 objectMap["backupManagementType"] = dbe.BackupManagementType 9748 } 9749 if dbe.RegistrationStatus != nil { 9750 objectMap["registrationStatus"] = dbe.RegistrationStatus 9751 } 9752 if dbe.BackupEngineState != nil { 9753 objectMap["backupEngineState"] = dbe.BackupEngineState 9754 } 9755 if dbe.HealthStatus != nil { 9756 objectMap["healthStatus"] = dbe.HealthStatus 9757 } 9758 if dbe.CanReRegister != nil { 9759 objectMap["canReRegister"] = dbe.CanReRegister 9760 } 9761 if dbe.BackupEngineID != nil { 9762 objectMap["backupEngineId"] = dbe.BackupEngineID 9763 } 9764 if dbe.DpmVersion != nil { 9765 objectMap["dpmVersion"] = dbe.DpmVersion 9766 } 9767 if dbe.AzureBackupAgentVersion != nil { 9768 objectMap["azureBackupAgentVersion"] = dbe.AzureBackupAgentVersion 9769 } 9770 if dbe.IsAzureBackupAgentUpgradeAvailable != nil { 9771 objectMap["isAzureBackupAgentUpgradeAvailable"] = dbe.IsAzureBackupAgentUpgradeAvailable 9772 } 9773 if dbe.IsDpmUpgradeAvailable != nil { 9774 objectMap["isDpmUpgradeAvailable"] = dbe.IsDpmUpgradeAvailable 9775 } 9776 if dbe.ExtendedInfo != nil { 9777 objectMap["extendedInfo"] = dbe.ExtendedInfo 9778 } 9779 if dbe.BackupEngineType != "" { 9780 objectMap["backupEngineType"] = dbe.BackupEngineType 9781 } 9782 return json.Marshal(objectMap) 9783} 9784 9785// AsAzureBackupServerEngine is the BasicEngineBase implementation for DpmBackupEngine. 9786func (dbe DpmBackupEngine) AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) { 9787 return nil, false 9788} 9789 9790// AsDpmBackupEngine is the BasicEngineBase implementation for DpmBackupEngine. 9791func (dbe DpmBackupEngine) AsDpmBackupEngine() (*DpmBackupEngine, bool) { 9792 return &dbe, true 9793} 9794 9795// AsEngineBase is the BasicEngineBase implementation for DpmBackupEngine. 9796func (dbe DpmBackupEngine) AsEngineBase() (*EngineBase, bool) { 9797 return nil, false 9798} 9799 9800// AsBasicEngineBase is the BasicEngineBase implementation for DpmBackupEngine. 9801func (dbe DpmBackupEngine) AsBasicEngineBase() (BasicEngineBase, bool) { 9802 return &dbe, true 9803} 9804 9805// BasicDpmContainer DPM workload-specific protection container. 9806type BasicDpmContainer interface { 9807 AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) 9808 AsDpmContainer() (*DpmContainer, bool) 9809} 9810 9811// DpmContainer DPM workload-specific protection container. 9812type DpmContainer struct { 9813 // CanReRegister - Specifies whether the container is re-registrable. 9814 CanReRegister *bool `json:"canReRegister,omitempty"` 9815 // ContainerID - ID of container. 9816 ContainerID *string `json:"containerId,omitempty"` 9817 // ProtectedItemCount - Number of protected items in the BackupEngine 9818 ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` 9819 // DpmAgentVersion - Backup engine Agent version 9820 DpmAgentVersion *string `json:"dpmAgentVersion,omitempty"` 9821 // DpmServers - List of BackupEngines protecting the container 9822 DpmServers *[]string `json:"dpmServers,omitempty"` 9823 // UpgradeAvailable - To check if upgrade available 9824 UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` 9825 // ProtectionStatus - Protection status of the container. 9826 ProtectionStatus *string `json:"protectionStatus,omitempty"` 9827 // ExtendedInfo - Extended Info of the container. 9828 ExtendedInfo *DPMContainerExtendedInfo `json:"extendedInfo,omitempty"` 9829 // FriendlyName - Friendly name of the container. 9830 FriendlyName *string `json:"friendlyName,omitempty"` 9831 // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 9832 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 9833 // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. 9834 RegistrationStatus *string `json:"registrationStatus,omitempty"` 9835 // HealthStatus - Status of health of the container. 9836 HealthStatus *string `json:"healthStatus,omitempty"` 9837 // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' 9838 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` 9839} 9840 9841func unmarshalBasicDpmContainer(body []byte) (BasicDpmContainer, error) { 9842 var m map[string]interface{} 9843 err := json.Unmarshal(body, &m) 9844 if err != nil { 9845 return nil, err 9846 } 9847 9848 switch m["containerType"] { 9849 case string(ContainerTypeAzureBackupServerContainer1): 9850 var absc AzureBackupServerContainer 9851 err := json.Unmarshal(body, &absc) 9852 return absc, err 9853 default: 9854 var dc DpmContainer 9855 err := json.Unmarshal(body, &dc) 9856 return dc, err 9857 } 9858} 9859func unmarshalBasicDpmContainerArray(body []byte) ([]BasicDpmContainer, error) { 9860 var rawMessages []*json.RawMessage 9861 err := json.Unmarshal(body, &rawMessages) 9862 if err != nil { 9863 return nil, err 9864 } 9865 9866 dcArray := make([]BasicDpmContainer, len(rawMessages)) 9867 9868 for index, rawMessage := range rawMessages { 9869 dc, err := unmarshalBasicDpmContainer(*rawMessage) 9870 if err != nil { 9871 return nil, err 9872 } 9873 dcArray[index] = dc 9874 } 9875 return dcArray, nil 9876} 9877 9878// MarshalJSON is the custom marshaler for DpmContainer. 9879func (dc DpmContainer) MarshalJSON() ([]byte, error) { 9880 dc.ContainerType = ContainerTypeDPMContainer1 9881 objectMap := make(map[string]interface{}) 9882 if dc.CanReRegister != nil { 9883 objectMap["canReRegister"] = dc.CanReRegister 9884 } 9885 if dc.ContainerID != nil { 9886 objectMap["containerId"] = dc.ContainerID 9887 } 9888 if dc.ProtectedItemCount != nil { 9889 objectMap["protectedItemCount"] = dc.ProtectedItemCount 9890 } 9891 if dc.DpmAgentVersion != nil { 9892 objectMap["dpmAgentVersion"] = dc.DpmAgentVersion 9893 } 9894 if dc.DpmServers != nil { 9895 objectMap["dpmServers"] = dc.DpmServers 9896 } 9897 if dc.UpgradeAvailable != nil { 9898 objectMap["upgradeAvailable"] = dc.UpgradeAvailable 9899 } 9900 if dc.ProtectionStatus != nil { 9901 objectMap["protectionStatus"] = dc.ProtectionStatus 9902 } 9903 if dc.ExtendedInfo != nil { 9904 objectMap["extendedInfo"] = dc.ExtendedInfo 9905 } 9906 if dc.FriendlyName != nil { 9907 objectMap["friendlyName"] = dc.FriendlyName 9908 } 9909 if dc.BackupManagementType != "" { 9910 objectMap["backupManagementType"] = dc.BackupManagementType 9911 } 9912 if dc.RegistrationStatus != nil { 9913 objectMap["registrationStatus"] = dc.RegistrationStatus 9914 } 9915 if dc.HealthStatus != nil { 9916 objectMap["healthStatus"] = dc.HealthStatus 9917 } 9918 if dc.ContainerType != "" { 9919 objectMap["containerType"] = dc.ContainerType 9920 } 9921 return json.Marshal(objectMap) 9922} 9923 9924// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for DpmContainer. 9925func (dc DpmContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { 9926 return nil, false 9927} 9928 9929// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for DpmContainer. 9930func (dc DpmContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { 9931 return nil, false 9932} 9933 9934// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for DpmContainer. 9935func (dc DpmContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { 9936 return nil, false 9937} 9938 9939// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for DpmContainer. 9940func (dc DpmContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { 9941 return nil, false 9942} 9943 9944// AsAzureSQLContainer is the BasicProtectionContainer implementation for DpmContainer. 9945func (dc DpmContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { 9946 return nil, false 9947} 9948 9949// AsAzureStorageContainer is the BasicProtectionContainer implementation for DpmContainer. 9950func (dc DpmContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { 9951 return nil, false 9952} 9953 9954// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for DpmContainer. 9955func (dc DpmContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { 9956 return nil, false 9957} 9958 9959// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for DpmContainer. 9960func (dc DpmContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { 9961 return nil, false 9962} 9963 9964// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for DpmContainer. 9965func (dc DpmContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { 9966 return nil, false 9967} 9968 9969// AsDpmContainer is the BasicProtectionContainer implementation for DpmContainer. 9970func (dc DpmContainer) AsDpmContainer() (*DpmContainer, bool) { 9971 return &dc, true 9972} 9973 9974// AsBasicDpmContainer is the BasicProtectionContainer implementation for DpmContainer. 9975func (dc DpmContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { 9976 return &dc, true 9977} 9978 9979// AsGenericContainer is the BasicProtectionContainer implementation for DpmContainer. 9980func (dc DpmContainer) AsGenericContainer() (*GenericContainer, bool) { 9981 return nil, false 9982} 9983 9984// AsIaaSVMContainer is the BasicProtectionContainer implementation for DpmContainer. 9985func (dc DpmContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { 9986 return nil, false 9987} 9988 9989// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for DpmContainer. 9990func (dc DpmContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { 9991 return nil, false 9992} 9993 9994// AsMabContainer is the BasicProtectionContainer implementation for DpmContainer. 9995func (dc DpmContainer) AsMabContainer() (*MabContainer, bool) { 9996 return nil, false 9997} 9998 9999// AsProtectionContainer is the BasicProtectionContainer implementation for DpmContainer. 10000func (dc DpmContainer) AsProtectionContainer() (*ProtectionContainer, bool) { 10001 return nil, false 10002} 10003 10004// AsBasicProtectionContainer is the BasicProtectionContainer implementation for DpmContainer. 10005func (dc DpmContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { 10006 return &dc, true 10007} 10008 10009// DPMContainerExtendedInfo additional information of the DPMContainer. 10010type DPMContainerExtendedInfo struct { 10011 // LastRefreshedAt - Last refresh time of the DPMContainer. 10012 LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"` 10013} 10014 10015// DpmErrorInfo DPM workload-specific error information. 10016type DpmErrorInfo struct { 10017 // ErrorString - Localized error string. 10018 ErrorString *string `json:"errorString,omitempty"` 10019 // Recommendations - List of localized recommendations for above error code. 10020 Recommendations *[]string `json:"recommendations,omitempty"` 10021} 10022 10023// DpmJob DPM workload-specific job object. 10024type DpmJob struct { 10025 // Duration - Time elapsed for job. 10026 Duration *string `json:"duration,omitempty"` 10027 // DpmServerName - DPM server name managing the backup item or backup job. 10028 DpmServerName *string `json:"dpmServerName,omitempty"` 10029 // ContainerName - Name of cluster/server protecting current backup item, if any. 10030 ContainerName *string `json:"containerName,omitempty"` 10031 // ContainerType - Type of container. 10032 ContainerType *string `json:"containerType,omitempty"` 10033 // WorkloadType - Type of backup item. 10034 WorkloadType *string `json:"workloadType,omitempty"` 10035 // ActionsInfo - The state/actions applicable on this job like cancel/retry. 10036 ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"` 10037 // ErrorDetails - The errors. 10038 ErrorDetails *[]DpmErrorInfo `json:"errorDetails,omitempty"` 10039 // ExtendedInfo - Additional information for this job. 10040 ExtendedInfo *DpmJobExtendedInfo `json:"extendedInfo,omitempty"` 10041 // EntityFriendlyName - Friendly name of the entity on which the current job is executing. 10042 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` 10043 // BackupManagementType - Backup management type to execute the current job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 10044 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 10045 // Operation - The operation name. 10046 Operation *string `json:"operation,omitempty"` 10047 // Status - Job status. 10048 Status *string `json:"status,omitempty"` 10049 // StartTime - The start time. 10050 StartTime *date.Time `json:"startTime,omitempty"` 10051 // EndTime - The end time. 10052 EndTime *date.Time `json:"endTime,omitempty"` 10053 // ActivityID - ActivityId of job. 10054 ActivityID *string `json:"activityId,omitempty"` 10055 // JobType - Possible values include: 'JobTypeJob', 'JobTypeAzureIaaSVMJob', 'JobTypeAzureStorageJob', 'JobTypeAzureWorkloadJob', 'JobTypeDpmJob', 'JobTypeMabJob' 10056 JobType JobType `json:"jobType,omitempty"` 10057} 10058 10059// MarshalJSON is the custom marshaler for DpmJob. 10060func (dj DpmJob) MarshalJSON() ([]byte, error) { 10061 dj.JobType = JobTypeDpmJob 10062 objectMap := make(map[string]interface{}) 10063 if dj.Duration != nil { 10064 objectMap["duration"] = dj.Duration 10065 } 10066 if dj.DpmServerName != nil { 10067 objectMap["dpmServerName"] = dj.DpmServerName 10068 } 10069 if dj.ContainerName != nil { 10070 objectMap["containerName"] = dj.ContainerName 10071 } 10072 if dj.ContainerType != nil { 10073 objectMap["containerType"] = dj.ContainerType 10074 } 10075 if dj.WorkloadType != nil { 10076 objectMap["workloadType"] = dj.WorkloadType 10077 } 10078 if dj.ActionsInfo != nil { 10079 objectMap["actionsInfo"] = dj.ActionsInfo 10080 } 10081 if dj.ErrorDetails != nil { 10082 objectMap["errorDetails"] = dj.ErrorDetails 10083 } 10084 if dj.ExtendedInfo != nil { 10085 objectMap["extendedInfo"] = dj.ExtendedInfo 10086 } 10087 if dj.EntityFriendlyName != nil { 10088 objectMap["entityFriendlyName"] = dj.EntityFriendlyName 10089 } 10090 if dj.BackupManagementType != "" { 10091 objectMap["backupManagementType"] = dj.BackupManagementType 10092 } 10093 if dj.Operation != nil { 10094 objectMap["operation"] = dj.Operation 10095 } 10096 if dj.Status != nil { 10097 objectMap["status"] = dj.Status 10098 } 10099 if dj.StartTime != nil { 10100 objectMap["startTime"] = dj.StartTime 10101 } 10102 if dj.EndTime != nil { 10103 objectMap["endTime"] = dj.EndTime 10104 } 10105 if dj.ActivityID != nil { 10106 objectMap["activityId"] = dj.ActivityID 10107 } 10108 if dj.JobType != "" { 10109 objectMap["jobType"] = dj.JobType 10110 } 10111 return json.Marshal(objectMap) 10112} 10113 10114// AsAzureIaaSVMJob is the BasicJob implementation for DpmJob. 10115func (dj DpmJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) { 10116 return nil, false 10117} 10118 10119// AsAzureStorageJob is the BasicJob implementation for DpmJob. 10120func (dj DpmJob) AsAzureStorageJob() (*AzureStorageJob, bool) { 10121 return nil, false 10122} 10123 10124// AsAzureWorkloadJob is the BasicJob implementation for DpmJob. 10125func (dj DpmJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) { 10126 return nil, false 10127} 10128 10129// AsDpmJob is the BasicJob implementation for DpmJob. 10130func (dj DpmJob) AsDpmJob() (*DpmJob, bool) { 10131 return &dj, true 10132} 10133 10134// AsMabJob is the BasicJob implementation for DpmJob. 10135func (dj DpmJob) AsMabJob() (*MabJob, bool) { 10136 return nil, false 10137} 10138 10139// AsJob is the BasicJob implementation for DpmJob. 10140func (dj DpmJob) AsJob() (*Job, bool) { 10141 return nil, false 10142} 10143 10144// AsBasicJob is the BasicJob implementation for DpmJob. 10145func (dj DpmJob) AsBasicJob() (BasicJob, bool) { 10146 return &dj, true 10147} 10148 10149// DpmJobExtendedInfo additional information on the DPM workload-specific job. 10150type DpmJobExtendedInfo struct { 10151 // TasksList - List of tasks associated with this job. 10152 TasksList *[]DpmJobTaskDetails `json:"tasksList,omitempty"` 10153 // PropertyBag - The job properties. 10154 PropertyBag map[string]*string `json:"propertyBag"` 10155 // DynamicErrorMessage - Non localized error message on job execution. 10156 DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"` 10157} 10158 10159// MarshalJSON is the custom marshaler for DpmJobExtendedInfo. 10160func (djei DpmJobExtendedInfo) MarshalJSON() ([]byte, error) { 10161 objectMap := make(map[string]interface{}) 10162 if djei.TasksList != nil { 10163 objectMap["tasksList"] = djei.TasksList 10164 } 10165 if djei.PropertyBag != nil { 10166 objectMap["propertyBag"] = djei.PropertyBag 10167 } 10168 if djei.DynamicErrorMessage != nil { 10169 objectMap["dynamicErrorMessage"] = djei.DynamicErrorMessage 10170 } 10171 return json.Marshal(objectMap) 10172} 10173 10174// DpmJobTaskDetails DPM workload-specific job task details. 10175type DpmJobTaskDetails struct { 10176 // TaskID - The task display name. 10177 TaskID *string `json:"taskId,omitempty"` 10178 // StartTime - The start time. 10179 StartTime *date.Time `json:"startTime,omitempty"` 10180 // EndTime - The end time. 10181 EndTime *date.Time `json:"endTime,omitempty"` 10182 // Duration - Time elapsed for task. 10183 Duration *string `json:"duration,omitempty"` 10184 // Status - The status. 10185 Status *string `json:"status,omitempty"` 10186} 10187 10188// DPMProtectedItem additional information on Backup engine specific backup item. 10189type DPMProtectedItem struct { 10190 // FriendlyName - Friendly name of the managed item 10191 FriendlyName *string `json:"friendlyName,omitempty"` 10192 // BackupEngineName - Backup Management server protecting this backup item 10193 BackupEngineName *string `json:"backupEngineName,omitempty"` 10194 // ProtectionState - Protection state of the backup engine. Possible values include: 'ProtectedItemStateInvalid', 'ProtectedItemStateIRPending', 'ProtectedItemStateProtected', 'ProtectedItemStateProtectionError', 'ProtectedItemStateProtectionStopped', 'ProtectedItemStateProtectionPaused' 10195 ProtectionState ProtectedItemState `json:"protectionState,omitempty"` 10196 // ExtendedInfo - Extended info of the backup item. 10197 ExtendedInfo *DPMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` 10198 // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 10199 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 10200 // 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' 10201 WorkloadType DataSourceType `json:"workloadType,omitempty"` 10202 // ContainerName - Unique name of container 10203 ContainerName *string `json:"containerName,omitempty"` 10204 // SourceResourceID - ARM ID of the resource to be backed up. 10205 SourceResourceID *string `json:"sourceResourceId,omitempty"` 10206 // PolicyID - ID of the backup policy with which this item is backed up. 10207 PolicyID *string `json:"policyId,omitempty"` 10208 // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. 10209 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` 10210 // BackupSetName - Name of the backup set the backup item belongs to 10211 BackupSetName *string `json:"backupSetName,omitempty"` 10212 // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' 10213 CreateMode CreateMode `json:"createMode,omitempty"` 10214 // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC 10215 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` 10216 // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete 10217 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` 10218 // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted 10219 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` 10220 // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon 10221 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` 10222 // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state 10223 IsRehydrate *bool `json:"isRehydrate,omitempty"` 10224 // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' 10225 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` 10226} 10227 10228// MarshalJSON is the custom marshaler for DPMProtectedItem. 10229func (dpi DPMProtectedItem) MarshalJSON() ([]byte, error) { 10230 dpi.ProtectedItemType = ProtectedItemTypeDPMProtectedItem 10231 objectMap := make(map[string]interface{}) 10232 if dpi.FriendlyName != nil { 10233 objectMap["friendlyName"] = dpi.FriendlyName 10234 } 10235 if dpi.BackupEngineName != nil { 10236 objectMap["backupEngineName"] = dpi.BackupEngineName 10237 } 10238 if dpi.ProtectionState != "" { 10239 objectMap["protectionState"] = dpi.ProtectionState 10240 } 10241 if dpi.ExtendedInfo != nil { 10242 objectMap["extendedInfo"] = dpi.ExtendedInfo 10243 } 10244 if dpi.BackupManagementType != "" { 10245 objectMap["backupManagementType"] = dpi.BackupManagementType 10246 } 10247 if dpi.WorkloadType != "" { 10248 objectMap["workloadType"] = dpi.WorkloadType 10249 } 10250 if dpi.ContainerName != nil { 10251 objectMap["containerName"] = dpi.ContainerName 10252 } 10253 if dpi.SourceResourceID != nil { 10254 objectMap["sourceResourceId"] = dpi.SourceResourceID 10255 } 10256 if dpi.PolicyID != nil { 10257 objectMap["policyId"] = dpi.PolicyID 10258 } 10259 if dpi.LastRecoveryPoint != nil { 10260 objectMap["lastRecoveryPoint"] = dpi.LastRecoveryPoint 10261 } 10262 if dpi.BackupSetName != nil { 10263 objectMap["backupSetName"] = dpi.BackupSetName 10264 } 10265 if dpi.CreateMode != "" { 10266 objectMap["createMode"] = dpi.CreateMode 10267 } 10268 if dpi.DeferredDeleteTimeInUTC != nil { 10269 objectMap["deferredDeleteTimeInUTC"] = dpi.DeferredDeleteTimeInUTC 10270 } 10271 if dpi.IsScheduledForDeferredDelete != nil { 10272 objectMap["isScheduledForDeferredDelete"] = dpi.IsScheduledForDeferredDelete 10273 } 10274 if dpi.DeferredDeleteTimeRemaining != nil { 10275 objectMap["deferredDeleteTimeRemaining"] = dpi.DeferredDeleteTimeRemaining 10276 } 10277 if dpi.IsDeferredDeleteScheduleUpcoming != nil { 10278 objectMap["isDeferredDeleteScheduleUpcoming"] = dpi.IsDeferredDeleteScheduleUpcoming 10279 } 10280 if dpi.IsRehydrate != nil { 10281 objectMap["isRehydrate"] = dpi.IsRehydrate 10282 } 10283 if dpi.ProtectedItemType != "" { 10284 objectMap["protectedItemType"] = dpi.ProtectedItemType 10285 } 10286 return json.Marshal(objectMap) 10287} 10288 10289// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10290func (dpi DPMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { 10291 return nil, false 10292} 10293 10294// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10295func (dpi DPMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { 10296 return nil, false 10297} 10298 10299// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10300func (dpi DPMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { 10301 return nil, false 10302} 10303 10304// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10305func (dpi DPMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { 10306 return nil, false 10307} 10308 10309// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10310func (dpi DPMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { 10311 return nil, false 10312} 10313 10314// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10315func (dpi DPMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { 10316 return nil, false 10317} 10318 10319// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10320func (dpi DPMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { 10321 return nil, false 10322} 10323 10324// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10325func (dpi DPMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { 10326 return nil, false 10327} 10328 10329// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10330func (dpi DPMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { 10331 return nil, false 10332} 10333 10334// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10335func (dpi DPMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { 10336 return nil, false 10337} 10338 10339// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10340func (dpi DPMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { 10341 return nil, false 10342} 10343 10344// AsDPMProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10345func (dpi DPMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { 10346 return &dpi, true 10347} 10348 10349// AsGenericProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10350func (dpi DPMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { 10351 return nil, false 10352} 10353 10354// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10355func (dpi DPMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { 10356 return nil, false 10357} 10358 10359// AsProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10360func (dpi DPMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { 10361 return nil, false 10362} 10363 10364// AsBasicProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. 10365func (dpi DPMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { 10366 return &dpi, true 10367} 10368 10369// DPMProtectedItemExtendedInfo additional information of DPM Protected item. 10370type DPMProtectedItemExtendedInfo struct { 10371 // ProtectableObjectLoadPath - Attribute to provide information on various DBs. 10372 ProtectableObjectLoadPath map[string]*string `json:"protectableObjectLoadPath"` 10373 // Protected - To check if backup item is disk protected. 10374 Protected *bool `json:"protected,omitempty"` 10375 // IsPresentOnCloud - To check if backup item is cloud protected. 10376 IsPresentOnCloud *bool `json:"isPresentOnCloud,omitempty"` 10377 // LastBackupStatus - Last backup status information on backup item. 10378 LastBackupStatus *string `json:"lastBackupStatus,omitempty"` 10379 // LastRefreshedAt - Last refresh time on backup item. 10380 LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"` 10381 // OldestRecoveryPoint - Oldest cloud recovery point time. 10382 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"` 10383 // RecoveryPointCount - cloud recovery point count. 10384 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"` 10385 // OnPremiseOldestRecoveryPoint - Oldest disk recovery point time. 10386 OnPremiseOldestRecoveryPoint *date.Time `json:"onPremiseOldestRecoveryPoint,omitempty"` 10387 // OnPremiseLatestRecoveryPoint - latest disk recovery point time. 10388 OnPremiseLatestRecoveryPoint *date.Time `json:"onPremiseLatestRecoveryPoint,omitempty"` 10389 // OnPremiseRecoveryPointCount - disk recovery point count. 10390 OnPremiseRecoveryPointCount *int32 `json:"onPremiseRecoveryPointCount,omitempty"` 10391 // IsCollocated - To check if backup item is collocated. 10392 IsCollocated *bool `json:"isCollocated,omitempty"` 10393 // ProtectionGroupName - Protection group name of the backup item. 10394 ProtectionGroupName *string `json:"protectionGroupName,omitempty"` 10395 // DiskStorageUsedInBytes - Used Disk storage in bytes. 10396 DiskStorageUsedInBytes *string `json:"diskStorageUsedInBytes,omitempty"` 10397 // TotalDiskStorageSizeInBytes - total Disk storage in bytes. 10398 TotalDiskStorageSizeInBytes *string `json:"totalDiskStorageSizeInBytes,omitempty"` 10399} 10400 10401// MarshalJSON is the custom marshaler for DPMProtectedItemExtendedInfo. 10402func (dpiei DPMProtectedItemExtendedInfo) MarshalJSON() ([]byte, error) { 10403 objectMap := make(map[string]interface{}) 10404 if dpiei.ProtectableObjectLoadPath != nil { 10405 objectMap["protectableObjectLoadPath"] = dpiei.ProtectableObjectLoadPath 10406 } 10407 if dpiei.Protected != nil { 10408 objectMap["protected"] = dpiei.Protected 10409 } 10410 if dpiei.IsPresentOnCloud != nil { 10411 objectMap["isPresentOnCloud"] = dpiei.IsPresentOnCloud 10412 } 10413 if dpiei.LastBackupStatus != nil { 10414 objectMap["lastBackupStatus"] = dpiei.LastBackupStatus 10415 } 10416 if dpiei.LastRefreshedAt != nil { 10417 objectMap["lastRefreshedAt"] = dpiei.LastRefreshedAt 10418 } 10419 if dpiei.OldestRecoveryPoint != nil { 10420 objectMap["oldestRecoveryPoint"] = dpiei.OldestRecoveryPoint 10421 } 10422 if dpiei.RecoveryPointCount != nil { 10423 objectMap["recoveryPointCount"] = dpiei.RecoveryPointCount 10424 } 10425 if dpiei.OnPremiseOldestRecoveryPoint != nil { 10426 objectMap["onPremiseOldestRecoveryPoint"] = dpiei.OnPremiseOldestRecoveryPoint 10427 } 10428 if dpiei.OnPremiseLatestRecoveryPoint != nil { 10429 objectMap["onPremiseLatestRecoveryPoint"] = dpiei.OnPremiseLatestRecoveryPoint 10430 } 10431 if dpiei.OnPremiseRecoveryPointCount != nil { 10432 objectMap["onPremiseRecoveryPointCount"] = dpiei.OnPremiseRecoveryPointCount 10433 } 10434 if dpiei.IsCollocated != nil { 10435 objectMap["isCollocated"] = dpiei.IsCollocated 10436 } 10437 if dpiei.ProtectionGroupName != nil { 10438 objectMap["protectionGroupName"] = dpiei.ProtectionGroupName 10439 } 10440 if dpiei.DiskStorageUsedInBytes != nil { 10441 objectMap["diskStorageUsedInBytes"] = dpiei.DiskStorageUsedInBytes 10442 } 10443 if dpiei.TotalDiskStorageSizeInBytes != nil { 10444 objectMap["totalDiskStorageSizeInBytes"] = dpiei.TotalDiskStorageSizeInBytes 10445 } 10446 return json.Marshal(objectMap) 10447} 10448 10449// EncryptionDetails details needed if the VM was encrypted at the time of backup. 10450type EncryptionDetails struct { 10451 // EncryptionEnabled - Identifies whether this backup copy represents an encrypted VM at the time of backup. 10452 EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"` 10453 // KekURL - Key Url. 10454 KekURL *string `json:"kekUrl,omitempty"` 10455 // SecretKeyURL - Secret Url. 10456 SecretKeyURL *string `json:"secretKeyUrl,omitempty"` 10457 // KekVaultID - ID of Key Vault where KEK is stored. 10458 KekVaultID *string `json:"kekVaultId,omitempty"` 10459 // SecretKeyVaultID - ID of Key Vault where Secret is stored. 10460 SecretKeyVaultID *string `json:"secretKeyVaultId,omitempty"` 10461} 10462 10463// BasicEngineBase the base backup engine class. All workload specific backup engines derive from this class. 10464type BasicEngineBase interface { 10465 AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) 10466 AsDpmBackupEngine() (*DpmBackupEngine, bool) 10467 AsEngineBase() (*EngineBase, bool) 10468} 10469 10470// EngineBase the base backup engine class. All workload specific backup engines derive from this class. 10471type EngineBase struct { 10472 // FriendlyName - Friendly name of the backup engine. 10473 FriendlyName *string `json:"friendlyName,omitempty"` 10474 // BackupManagementType - Type of backup management for the backup engine. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 10475 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 10476 // RegistrationStatus - Registration status of the backup engine with the Recovery Services Vault. 10477 RegistrationStatus *string `json:"registrationStatus,omitempty"` 10478 // BackupEngineState - Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed} 10479 BackupEngineState *string `json:"backupEngineState,omitempty"` 10480 // HealthStatus - Backup status of the backup engine. 10481 HealthStatus *string `json:"healthStatus,omitempty"` 10482 // CanReRegister - Flag indicating if the backup engine be registered, once already registered. 10483 CanReRegister *bool `json:"canReRegister,omitempty"` 10484 // BackupEngineID - ID of the backup engine. 10485 BackupEngineID *string `json:"backupEngineId,omitempty"` 10486 // DpmVersion - Backup engine version 10487 DpmVersion *string `json:"dpmVersion,omitempty"` 10488 // AzureBackupAgentVersion - Backup agent version 10489 AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"` 10490 // IsAzureBackupAgentUpgradeAvailable - To check if backup agent upgrade available 10491 IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"` 10492 // IsDpmUpgradeAvailable - To check if backup engine upgrade available 10493 IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"` 10494 // ExtendedInfo - Extended info of the backupengine 10495 ExtendedInfo *EngineExtendedInfo `json:"extendedInfo,omitempty"` 10496 // BackupEngineType - Possible values include: 'BackupEngineTypeBackupEngineBase', 'BackupEngineTypeAzureBackupServerEngine', 'BackupEngineTypeDpmBackupEngine' 10497 BackupEngineType EngineType `json:"backupEngineType,omitempty"` 10498} 10499 10500func unmarshalBasicEngineBase(body []byte) (BasicEngineBase, error) { 10501 var m map[string]interface{} 10502 err := json.Unmarshal(body, &m) 10503 if err != nil { 10504 return nil, err 10505 } 10506 10507 switch m["backupEngineType"] { 10508 case string(BackupEngineTypeAzureBackupServerEngine): 10509 var abse AzureBackupServerEngine 10510 err := json.Unmarshal(body, &abse) 10511 return abse, err 10512 case string(BackupEngineTypeDpmBackupEngine): 10513 var dbe DpmBackupEngine 10514 err := json.Unmarshal(body, &dbe) 10515 return dbe, err 10516 default: 10517 var eb EngineBase 10518 err := json.Unmarshal(body, &eb) 10519 return eb, err 10520 } 10521} 10522func unmarshalBasicEngineBaseArray(body []byte) ([]BasicEngineBase, error) { 10523 var rawMessages []*json.RawMessage 10524 err := json.Unmarshal(body, &rawMessages) 10525 if err != nil { 10526 return nil, err 10527 } 10528 10529 ebArray := make([]BasicEngineBase, len(rawMessages)) 10530 10531 for index, rawMessage := range rawMessages { 10532 eb, err := unmarshalBasicEngineBase(*rawMessage) 10533 if err != nil { 10534 return nil, err 10535 } 10536 ebArray[index] = eb 10537 } 10538 return ebArray, nil 10539} 10540 10541// MarshalJSON is the custom marshaler for EngineBase. 10542func (eb EngineBase) MarshalJSON() ([]byte, error) { 10543 eb.BackupEngineType = BackupEngineTypeBackupEngineBase 10544 objectMap := make(map[string]interface{}) 10545 if eb.FriendlyName != nil { 10546 objectMap["friendlyName"] = eb.FriendlyName 10547 } 10548 if eb.BackupManagementType != "" { 10549 objectMap["backupManagementType"] = eb.BackupManagementType 10550 } 10551 if eb.RegistrationStatus != nil { 10552 objectMap["registrationStatus"] = eb.RegistrationStatus 10553 } 10554 if eb.BackupEngineState != nil { 10555 objectMap["backupEngineState"] = eb.BackupEngineState 10556 } 10557 if eb.HealthStatus != nil { 10558 objectMap["healthStatus"] = eb.HealthStatus 10559 } 10560 if eb.CanReRegister != nil { 10561 objectMap["canReRegister"] = eb.CanReRegister 10562 } 10563 if eb.BackupEngineID != nil { 10564 objectMap["backupEngineId"] = eb.BackupEngineID 10565 } 10566 if eb.DpmVersion != nil { 10567 objectMap["dpmVersion"] = eb.DpmVersion 10568 } 10569 if eb.AzureBackupAgentVersion != nil { 10570 objectMap["azureBackupAgentVersion"] = eb.AzureBackupAgentVersion 10571 } 10572 if eb.IsAzureBackupAgentUpgradeAvailable != nil { 10573 objectMap["isAzureBackupAgentUpgradeAvailable"] = eb.IsAzureBackupAgentUpgradeAvailable 10574 } 10575 if eb.IsDpmUpgradeAvailable != nil { 10576 objectMap["isDpmUpgradeAvailable"] = eb.IsDpmUpgradeAvailable 10577 } 10578 if eb.ExtendedInfo != nil { 10579 objectMap["extendedInfo"] = eb.ExtendedInfo 10580 } 10581 if eb.BackupEngineType != "" { 10582 objectMap["backupEngineType"] = eb.BackupEngineType 10583 } 10584 return json.Marshal(objectMap) 10585} 10586 10587// AsAzureBackupServerEngine is the BasicEngineBase implementation for EngineBase. 10588func (eb EngineBase) AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) { 10589 return nil, false 10590} 10591 10592// AsDpmBackupEngine is the BasicEngineBase implementation for EngineBase. 10593func (eb EngineBase) AsDpmBackupEngine() (*DpmBackupEngine, bool) { 10594 return nil, false 10595} 10596 10597// AsEngineBase is the BasicEngineBase implementation for EngineBase. 10598func (eb EngineBase) AsEngineBase() (*EngineBase, bool) { 10599 return &eb, true 10600} 10601 10602// AsBasicEngineBase is the BasicEngineBase implementation for EngineBase. 10603func (eb EngineBase) AsBasicEngineBase() (BasicEngineBase, bool) { 10604 return &eb, true 10605} 10606 10607// EngineBaseResource the base backup engine class. All workload specific backup engines derive from this 10608// class. 10609type EngineBaseResource struct { 10610 autorest.Response `json:"-"` 10611 // Properties - BackupEngineBaseResource properties 10612 Properties BasicEngineBase `json:"properties,omitempty"` 10613 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 10614 ID *string `json:"id,omitempty"` 10615 // Name - READ-ONLY; Resource name associated with the resource. 10616 Name *string `json:"name,omitempty"` 10617 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 10618 Type *string `json:"type,omitempty"` 10619 // Location - Resource location. 10620 Location *string `json:"location,omitempty"` 10621 // Tags - Resource tags. 10622 Tags map[string]*string `json:"tags"` 10623 // ETag - Optional ETag. 10624 ETag *string `json:"eTag,omitempty"` 10625} 10626 10627// MarshalJSON is the custom marshaler for EngineBaseResource. 10628func (ebr EngineBaseResource) MarshalJSON() ([]byte, error) { 10629 objectMap := make(map[string]interface{}) 10630 objectMap["properties"] = ebr.Properties 10631 if ebr.Location != nil { 10632 objectMap["location"] = ebr.Location 10633 } 10634 if ebr.Tags != nil { 10635 objectMap["tags"] = ebr.Tags 10636 } 10637 if ebr.ETag != nil { 10638 objectMap["eTag"] = ebr.ETag 10639 } 10640 return json.Marshal(objectMap) 10641} 10642 10643// UnmarshalJSON is the custom unmarshaler for EngineBaseResource struct. 10644func (ebr *EngineBaseResource) UnmarshalJSON(body []byte) error { 10645 var m map[string]*json.RawMessage 10646 err := json.Unmarshal(body, &m) 10647 if err != nil { 10648 return err 10649 } 10650 for k, v := range m { 10651 switch k { 10652 case "properties": 10653 if v != nil { 10654 properties, err := unmarshalBasicEngineBase(*v) 10655 if err != nil { 10656 return err 10657 } 10658 ebr.Properties = properties 10659 } 10660 case "id": 10661 if v != nil { 10662 var ID string 10663 err = json.Unmarshal(*v, &ID) 10664 if err != nil { 10665 return err 10666 } 10667 ebr.ID = &ID 10668 } 10669 case "name": 10670 if v != nil { 10671 var name string 10672 err = json.Unmarshal(*v, &name) 10673 if err != nil { 10674 return err 10675 } 10676 ebr.Name = &name 10677 } 10678 case "type": 10679 if v != nil { 10680 var typeVar string 10681 err = json.Unmarshal(*v, &typeVar) 10682 if err != nil { 10683 return err 10684 } 10685 ebr.Type = &typeVar 10686 } 10687 case "location": 10688 if v != nil { 10689 var location string 10690 err = json.Unmarshal(*v, &location) 10691 if err != nil { 10692 return err 10693 } 10694 ebr.Location = &location 10695 } 10696 case "tags": 10697 if v != nil { 10698 var tags map[string]*string 10699 err = json.Unmarshal(*v, &tags) 10700 if err != nil { 10701 return err 10702 } 10703 ebr.Tags = tags 10704 } 10705 case "eTag": 10706 if v != nil { 10707 var eTag string 10708 err = json.Unmarshal(*v, &eTag) 10709 if err != nil { 10710 return err 10711 } 10712 ebr.ETag = &eTag 10713 } 10714 } 10715 } 10716 10717 return nil 10718} 10719 10720// EngineBaseResourceList list of BackupEngineBase resources 10721type EngineBaseResourceList struct { 10722 autorest.Response `json:"-"` 10723 // Value - List of resources. 10724 Value *[]EngineBaseResource `json:"value,omitempty"` 10725 // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. 10726 NextLink *string `json:"nextLink,omitempty"` 10727} 10728 10729// EngineBaseResourceListIterator provides access to a complete listing of EngineBaseResource values. 10730type EngineBaseResourceListIterator struct { 10731 i int 10732 page EngineBaseResourceListPage 10733} 10734 10735// NextWithContext advances to the next value. If there was an error making 10736// the request the iterator does not advance and the error is returned. 10737func (iter *EngineBaseResourceListIterator) NextWithContext(ctx context.Context) (err error) { 10738 if tracing.IsEnabled() { 10739 ctx = tracing.StartSpan(ctx, fqdn+"/EngineBaseResourceListIterator.NextWithContext") 10740 defer func() { 10741 sc := -1 10742 if iter.Response().Response.Response != nil { 10743 sc = iter.Response().Response.Response.StatusCode 10744 } 10745 tracing.EndSpan(ctx, sc, err) 10746 }() 10747 } 10748 iter.i++ 10749 if iter.i < len(iter.page.Values()) { 10750 return nil 10751 } 10752 err = iter.page.NextWithContext(ctx) 10753 if err != nil { 10754 iter.i-- 10755 return err 10756 } 10757 iter.i = 0 10758 return nil 10759} 10760 10761// Next advances to the next value. If there was an error making 10762// the request the iterator does not advance and the error is returned. 10763// Deprecated: Use NextWithContext() instead. 10764func (iter *EngineBaseResourceListIterator) Next() error { 10765 return iter.NextWithContext(context.Background()) 10766} 10767 10768// NotDone returns true if the enumeration should be started or is not yet complete. 10769func (iter EngineBaseResourceListIterator) NotDone() bool { 10770 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 10771} 10772 10773// Response returns the raw server response from the last page request. 10774func (iter EngineBaseResourceListIterator) Response() EngineBaseResourceList { 10775 return iter.page.Response() 10776} 10777 10778// Value returns the current value or a zero-initialized value if the 10779// iterator has advanced beyond the end of the collection. 10780func (iter EngineBaseResourceListIterator) Value() EngineBaseResource { 10781 if !iter.page.NotDone() { 10782 return EngineBaseResource{} 10783 } 10784 return iter.page.Values()[iter.i] 10785} 10786 10787// Creates a new instance of the EngineBaseResourceListIterator type. 10788func NewEngineBaseResourceListIterator(page EngineBaseResourceListPage) EngineBaseResourceListIterator { 10789 return EngineBaseResourceListIterator{page: page} 10790} 10791 10792// IsEmpty returns true if the ListResult contains no values. 10793func (ebrl EngineBaseResourceList) IsEmpty() bool { 10794 return ebrl.Value == nil || len(*ebrl.Value) == 0 10795} 10796 10797// hasNextLink returns true if the NextLink is not empty. 10798func (ebrl EngineBaseResourceList) hasNextLink() bool { 10799 return ebrl.NextLink != nil && len(*ebrl.NextLink) != 0 10800} 10801 10802// engineBaseResourceListPreparer prepares a request to retrieve the next set of results. 10803// It returns nil if no more results exist. 10804func (ebrl EngineBaseResourceList) engineBaseResourceListPreparer(ctx context.Context) (*http.Request, error) { 10805 if !ebrl.hasNextLink() { 10806 return nil, nil 10807 } 10808 return autorest.Prepare((&http.Request{}).WithContext(ctx), 10809 autorest.AsJSON(), 10810 autorest.AsGet(), 10811 autorest.WithBaseURL(to.String(ebrl.NextLink))) 10812} 10813 10814// EngineBaseResourceListPage contains a page of EngineBaseResource values. 10815type EngineBaseResourceListPage struct { 10816 fn func(context.Context, EngineBaseResourceList) (EngineBaseResourceList, error) 10817 ebrl EngineBaseResourceList 10818} 10819 10820// NextWithContext advances to the next page of values. If there was an error making 10821// the request the page does not advance and the error is returned. 10822func (page *EngineBaseResourceListPage) NextWithContext(ctx context.Context) (err error) { 10823 if tracing.IsEnabled() { 10824 ctx = tracing.StartSpan(ctx, fqdn+"/EngineBaseResourceListPage.NextWithContext") 10825 defer func() { 10826 sc := -1 10827 if page.Response().Response.Response != nil { 10828 sc = page.Response().Response.Response.StatusCode 10829 } 10830 tracing.EndSpan(ctx, sc, err) 10831 }() 10832 } 10833 for { 10834 next, err := page.fn(ctx, page.ebrl) 10835 if err != nil { 10836 return err 10837 } 10838 page.ebrl = next 10839 if !next.hasNextLink() || !next.IsEmpty() { 10840 break 10841 } 10842 } 10843 return nil 10844} 10845 10846// Next advances to the next page of values. If there was an error making 10847// the request the page does not advance and the error is returned. 10848// Deprecated: Use NextWithContext() instead. 10849func (page *EngineBaseResourceListPage) Next() error { 10850 return page.NextWithContext(context.Background()) 10851} 10852 10853// NotDone returns true if the page enumeration should be started or is not yet complete. 10854func (page EngineBaseResourceListPage) NotDone() bool { 10855 return !page.ebrl.IsEmpty() 10856} 10857 10858// Response returns the raw server response from the last page request. 10859func (page EngineBaseResourceListPage) Response() EngineBaseResourceList { 10860 return page.ebrl 10861} 10862 10863// Values returns the slice of values for the current page or nil if there are no values. 10864func (page EngineBaseResourceListPage) Values() []EngineBaseResource { 10865 if page.ebrl.IsEmpty() { 10866 return nil 10867 } 10868 return *page.ebrl.Value 10869} 10870 10871// Creates a new instance of the EngineBaseResourceListPage type. 10872func NewEngineBaseResourceListPage(cur EngineBaseResourceList, getNextPage func(context.Context, EngineBaseResourceList) (EngineBaseResourceList, error)) EngineBaseResourceListPage { 10873 return EngineBaseResourceListPage{ 10874 fn: getNextPage, 10875 ebrl: cur, 10876 } 10877} 10878 10879// EngineExtendedInfo additional information on backup engine. 10880type EngineExtendedInfo struct { 10881 // DatabaseName - Database name of backup engine. 10882 DatabaseName *string `json:"databaseName,omitempty"` 10883 // ProtectedItemsCount - Number of protected items in the backup engine. 10884 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` 10885 // ProtectedServersCount - Number of protected servers in the backup engine. 10886 ProtectedServersCount *int32 `json:"protectedServersCount,omitempty"` 10887 // DiskCount - Number of disks in the backup engine. 10888 DiskCount *int32 `json:"diskCount,omitempty"` 10889 // UsedDiskSpace - Disk space used in the backup engine. 10890 UsedDiskSpace *float64 `json:"usedDiskSpace,omitempty"` 10891 // AvailableDiskSpace - Disk space currently available in the backup engine. 10892 AvailableDiskSpace *float64 `json:"availableDiskSpace,omitempty"` 10893 // RefreshedAt - Last refresh time in the backup engine. 10894 RefreshedAt *date.Time `json:"refreshedAt,omitempty"` 10895 // AzureProtectedInstances - Protected instances in the backup engine. 10896 AzureProtectedInstances *int32 `json:"azureProtectedInstances,omitempty"` 10897} 10898 10899// ErrorAdditionalInfo the resource management error additional info. 10900type ErrorAdditionalInfo struct { 10901 // Type - READ-ONLY; The additional info type. 10902 Type *string `json:"type,omitempty"` 10903 // Info - READ-ONLY; The additional info. 10904 Info interface{} `json:"info,omitempty"` 10905} 10906 10907// ErrorDetail error Detail class which encapsulates Code, Message and Recommendations. 10908type ErrorDetail struct { 10909 // Code - READ-ONLY; Error code. 10910 Code *string `json:"code,omitempty"` 10911 // Message - READ-ONLY; Error Message related to the Code. 10912 Message *string `json:"message,omitempty"` 10913 // Recommendations - READ-ONLY; List of recommendation strings. 10914 Recommendations *[]string `json:"recommendations,omitempty"` 10915} 10916 10917// ErrorResponse common error response for all Azure Resource Manager APIs to return error details for 10918// failed operations. (This also follows the OData error response format.) 10919type ErrorResponse struct { 10920 // Code - READ-ONLY; The error code. 10921 Code *string `json:"code,omitempty"` 10922 // Message - READ-ONLY; The error message. 10923 Message *string `json:"message,omitempty"` 10924 // Target - READ-ONLY; The error target. 10925 Target *string `json:"target,omitempty"` 10926 // Details - READ-ONLY; The error details. 10927 Details *[]ErrorResponse `json:"details,omitempty"` 10928 // AdditionalInfo - READ-ONLY; The error additional info. 10929 AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"` 10930} 10931 10932// ExportJobsOperationResultInfo this class is used to send blob details after exporting jobs. 10933type ExportJobsOperationResultInfo struct { 10934 // BlobURL - URL of the blob into which the serialized string of list of jobs is exported. 10935 BlobURL *string `json:"blobUrl,omitempty"` 10936 // BlobSasKey - SAS key to access the blob. It expires in 15 mins. 10937 BlobSasKey *string `json:"blobSasKey,omitempty"` 10938 // ExcelFileBlobURL - URL of the blob into which the ExcelFile is uploaded. 10939 ExcelFileBlobURL *string `json:"excelFileBlobUrl,omitempty"` 10940 // ExcelFileBlobSasKey - SAS key to access the blob. It expires in 15 mins. 10941 ExcelFileBlobSasKey *string `json:"excelFileBlobSasKey,omitempty"` 10942 // ObjectType - Possible values include: 'ObjectTypeOperationResultInfoBase', 'ObjectTypeExportJobsOperationResultInfo', 'ObjectTypeOperationResultInfo' 10943 ObjectType ObjectTypeBasicOperationResultInfoBase `json:"objectType,omitempty"` 10944} 10945 10946// MarshalJSON is the custom marshaler for ExportJobsOperationResultInfo. 10947func (ejori ExportJobsOperationResultInfo) MarshalJSON() ([]byte, error) { 10948 ejori.ObjectType = ObjectTypeExportJobsOperationResultInfo 10949 objectMap := make(map[string]interface{}) 10950 if ejori.BlobURL != nil { 10951 objectMap["blobUrl"] = ejori.BlobURL 10952 } 10953 if ejori.BlobSasKey != nil { 10954 objectMap["blobSasKey"] = ejori.BlobSasKey 10955 } 10956 if ejori.ExcelFileBlobURL != nil { 10957 objectMap["excelFileBlobUrl"] = ejori.ExcelFileBlobURL 10958 } 10959 if ejori.ExcelFileBlobSasKey != nil { 10960 objectMap["excelFileBlobSasKey"] = ejori.ExcelFileBlobSasKey 10961 } 10962 if ejori.ObjectType != "" { 10963 objectMap["objectType"] = ejori.ObjectType 10964 } 10965 return json.Marshal(objectMap) 10966} 10967 10968// AsExportJobsOperationResultInfo is the BasicOperationResultInfoBase implementation for ExportJobsOperationResultInfo. 10969func (ejori ExportJobsOperationResultInfo) AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) { 10970 return &ejori, true 10971} 10972 10973// AsOperationResultInfo is the BasicOperationResultInfoBase implementation for ExportJobsOperationResultInfo. 10974func (ejori ExportJobsOperationResultInfo) AsOperationResultInfo() (*OperationResultInfo, bool) { 10975 return nil, false 10976} 10977 10978// AsOperationResultInfoBase is the BasicOperationResultInfoBase implementation for ExportJobsOperationResultInfo. 10979func (ejori ExportJobsOperationResultInfo) AsOperationResultInfoBase() (*OperationResultInfoBase, bool) { 10980 return nil, false 10981} 10982 10983// AsBasicOperationResultInfoBase is the BasicOperationResultInfoBase implementation for ExportJobsOperationResultInfo. 10984func (ejori ExportJobsOperationResultInfo) AsBasicOperationResultInfoBase() (BasicOperationResultInfoBase, bool) { 10985 return &ejori, true 10986} 10987 10988// ExtendedProperties extended Properties for Azure IaasVM Backup. 10989type ExtendedProperties struct { 10990 // DiskExclusionProperties - Extended Properties for Disk Exclusion. 10991 DiskExclusionProperties *DiskExclusionProperties `json:"diskExclusionProperties,omitempty"` 10992} 10993 10994// BasicFeatureSupportRequest base class for feature request 10995type BasicFeatureSupportRequest interface { 10996 AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool) 10997 AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool) 10998 AsFeatureSupportRequest() (*FeatureSupportRequest, bool) 10999} 11000 11001// FeatureSupportRequest base class for feature request 11002type FeatureSupportRequest struct { 11003 // FeatureType - Possible values include: 'FeatureTypeFeatureSupportRequest', 'FeatureTypeAzureBackupGoals', 'FeatureTypeAzureVMResourceBackup' 11004 FeatureType FeatureType `json:"featureType,omitempty"` 11005} 11006 11007func unmarshalBasicFeatureSupportRequest(body []byte) (BasicFeatureSupportRequest, error) { 11008 var m map[string]interface{} 11009 err := json.Unmarshal(body, &m) 11010 if err != nil { 11011 return nil, err 11012 } 11013 11014 switch m["featureType"] { 11015 case string(FeatureTypeAzureBackupGoals): 11016 var abgfsr AzureBackupGoalFeatureSupportRequest 11017 err := json.Unmarshal(body, &abgfsr) 11018 return abgfsr, err 11019 case string(FeatureTypeAzureVMResourceBackup): 11020 var avrfsr AzureVMResourceFeatureSupportRequest 11021 err := json.Unmarshal(body, &avrfsr) 11022 return avrfsr, err 11023 default: 11024 var fsr FeatureSupportRequest 11025 err := json.Unmarshal(body, &fsr) 11026 return fsr, err 11027 } 11028} 11029func unmarshalBasicFeatureSupportRequestArray(body []byte) ([]BasicFeatureSupportRequest, error) { 11030 var rawMessages []*json.RawMessage 11031 err := json.Unmarshal(body, &rawMessages) 11032 if err != nil { 11033 return nil, err 11034 } 11035 11036 fsrArray := make([]BasicFeatureSupportRequest, len(rawMessages)) 11037 11038 for index, rawMessage := range rawMessages { 11039 fsr, err := unmarshalBasicFeatureSupportRequest(*rawMessage) 11040 if err != nil { 11041 return nil, err 11042 } 11043 fsrArray[index] = fsr 11044 } 11045 return fsrArray, nil 11046} 11047 11048// MarshalJSON is the custom marshaler for FeatureSupportRequest. 11049func (fsr FeatureSupportRequest) MarshalJSON() ([]byte, error) { 11050 fsr.FeatureType = FeatureTypeFeatureSupportRequest 11051 objectMap := make(map[string]interface{}) 11052 if fsr.FeatureType != "" { 11053 objectMap["featureType"] = fsr.FeatureType 11054 } 11055 return json.Marshal(objectMap) 11056} 11057 11058// AsAzureBackupGoalFeatureSupportRequest is the BasicFeatureSupportRequest implementation for FeatureSupportRequest. 11059func (fsr FeatureSupportRequest) AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool) { 11060 return nil, false 11061} 11062 11063// AsAzureVMResourceFeatureSupportRequest is the BasicFeatureSupportRequest implementation for FeatureSupportRequest. 11064func (fsr FeatureSupportRequest) AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool) { 11065 return nil, false 11066} 11067 11068// AsFeatureSupportRequest is the BasicFeatureSupportRequest implementation for FeatureSupportRequest. 11069func (fsr FeatureSupportRequest) AsFeatureSupportRequest() (*FeatureSupportRequest, bool) { 11070 return &fsr, true 11071} 11072 11073// AsBasicFeatureSupportRequest is the BasicFeatureSupportRequest implementation for FeatureSupportRequest. 11074func (fsr FeatureSupportRequest) AsBasicFeatureSupportRequest() (BasicFeatureSupportRequest, bool) { 11075 return &fsr, true 11076} 11077 11078// GenericContainer base class for generic container of backup items 11079type GenericContainer struct { 11080 // FabricName - Name of the container's fabric 11081 FabricName *string `json:"fabricName,omitempty"` 11082 // ExtendedInformation - Extended information (not returned in List container API calls) 11083 ExtendedInformation *GenericContainerExtendedInfo `json:"extendedInformation,omitempty"` 11084 // FriendlyName - Friendly name of the container. 11085 FriendlyName *string `json:"friendlyName,omitempty"` 11086 // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 11087 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 11088 // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. 11089 RegistrationStatus *string `json:"registrationStatus,omitempty"` 11090 // HealthStatus - Status of health of the container. 11091 HealthStatus *string `json:"healthStatus,omitempty"` 11092 // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' 11093 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` 11094} 11095 11096// MarshalJSON is the custom marshaler for GenericContainer. 11097func (gc GenericContainer) MarshalJSON() ([]byte, error) { 11098 gc.ContainerType = ContainerTypeGenericContainer1 11099 objectMap := make(map[string]interface{}) 11100 if gc.FabricName != nil { 11101 objectMap["fabricName"] = gc.FabricName 11102 } 11103 if gc.ExtendedInformation != nil { 11104 objectMap["extendedInformation"] = gc.ExtendedInformation 11105 } 11106 if gc.FriendlyName != nil { 11107 objectMap["friendlyName"] = gc.FriendlyName 11108 } 11109 if gc.BackupManagementType != "" { 11110 objectMap["backupManagementType"] = gc.BackupManagementType 11111 } 11112 if gc.RegistrationStatus != nil { 11113 objectMap["registrationStatus"] = gc.RegistrationStatus 11114 } 11115 if gc.HealthStatus != nil { 11116 objectMap["healthStatus"] = gc.HealthStatus 11117 } 11118 if gc.ContainerType != "" { 11119 objectMap["containerType"] = gc.ContainerType 11120 } 11121 return json.Marshal(objectMap) 11122} 11123 11124// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for GenericContainer. 11125func (gc GenericContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { 11126 return nil, false 11127} 11128 11129// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for GenericContainer. 11130func (gc GenericContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { 11131 return nil, false 11132} 11133 11134// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for GenericContainer. 11135func (gc GenericContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { 11136 return nil, false 11137} 11138 11139// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for GenericContainer. 11140func (gc GenericContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { 11141 return nil, false 11142} 11143 11144// AsAzureSQLContainer is the BasicProtectionContainer implementation for GenericContainer. 11145func (gc GenericContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { 11146 return nil, false 11147} 11148 11149// AsAzureStorageContainer is the BasicProtectionContainer implementation for GenericContainer. 11150func (gc GenericContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { 11151 return nil, false 11152} 11153 11154// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for GenericContainer. 11155func (gc GenericContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { 11156 return nil, false 11157} 11158 11159// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for GenericContainer. 11160func (gc GenericContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { 11161 return nil, false 11162} 11163 11164// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for GenericContainer. 11165func (gc GenericContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { 11166 return nil, false 11167} 11168 11169// AsDpmContainer is the BasicProtectionContainer implementation for GenericContainer. 11170func (gc GenericContainer) AsDpmContainer() (*DpmContainer, bool) { 11171 return nil, false 11172} 11173 11174// AsBasicDpmContainer is the BasicProtectionContainer implementation for GenericContainer. 11175func (gc GenericContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { 11176 return nil, false 11177} 11178 11179// AsGenericContainer is the BasicProtectionContainer implementation for GenericContainer. 11180func (gc GenericContainer) AsGenericContainer() (*GenericContainer, bool) { 11181 return &gc, true 11182} 11183 11184// AsIaaSVMContainer is the BasicProtectionContainer implementation for GenericContainer. 11185func (gc GenericContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { 11186 return nil, false 11187} 11188 11189// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for GenericContainer. 11190func (gc GenericContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { 11191 return nil, false 11192} 11193 11194// AsMabContainer is the BasicProtectionContainer implementation for GenericContainer. 11195func (gc GenericContainer) AsMabContainer() (*MabContainer, bool) { 11196 return nil, false 11197} 11198 11199// AsProtectionContainer is the BasicProtectionContainer implementation for GenericContainer. 11200func (gc GenericContainer) AsProtectionContainer() (*ProtectionContainer, bool) { 11201 return nil, false 11202} 11203 11204// AsBasicProtectionContainer is the BasicProtectionContainer implementation for GenericContainer. 11205func (gc GenericContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { 11206 return &gc, true 11207} 11208 11209// GenericContainerExtendedInfo container extended information 11210type GenericContainerExtendedInfo struct { 11211 // RawCertData - Public key of container cert 11212 RawCertData *string `json:"rawCertData,omitempty"` 11213 // ContainerIdentityInfo - Container identity information 11214 ContainerIdentityInfo *ContainerIdentityInfo `json:"containerIdentityInfo,omitempty"` 11215 // ServiceEndpoints - Azure Backup Service Endpoints for the container 11216 ServiceEndpoints map[string]*string `json:"serviceEndpoints"` 11217} 11218 11219// MarshalJSON is the custom marshaler for GenericContainerExtendedInfo. 11220func (gcei GenericContainerExtendedInfo) MarshalJSON() ([]byte, error) { 11221 objectMap := make(map[string]interface{}) 11222 if gcei.RawCertData != nil { 11223 objectMap["rawCertData"] = gcei.RawCertData 11224 } 11225 if gcei.ContainerIdentityInfo != nil { 11226 objectMap["containerIdentityInfo"] = gcei.ContainerIdentityInfo 11227 } 11228 if gcei.ServiceEndpoints != nil { 11229 objectMap["serviceEndpoints"] = gcei.ServiceEndpoints 11230 } 11231 return json.Marshal(objectMap) 11232} 11233 11234// GenericProtectedItem base class for backup items. 11235type GenericProtectedItem struct { 11236 // FriendlyName - Friendly name of the container. 11237 FriendlyName *string `json:"friendlyName,omitempty"` 11238 // PolicyState - Indicates consistency of policy object and policy applied to this backup item. 11239 PolicyState *string `json:"policyState,omitempty"` 11240 // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' 11241 ProtectionState ProtectionState `json:"protectionState,omitempty"` 11242 // ProtectedItemID - Data Plane Service ID of the protected item. 11243 ProtectedItemID *int64 `json:"protectedItemId,omitempty"` 11244 // SourceAssociations - Loosely coupled (type, value) associations (example - parent of a protected item) 11245 SourceAssociations map[string]*string `json:"sourceAssociations"` 11246 // FabricName - Name of this backup item's fabric. 11247 FabricName *string `json:"fabricName,omitempty"` 11248 // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 11249 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 11250 // 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' 11251 WorkloadType DataSourceType `json:"workloadType,omitempty"` 11252 // ContainerName - Unique name of container 11253 ContainerName *string `json:"containerName,omitempty"` 11254 // SourceResourceID - ARM ID of the resource to be backed up. 11255 SourceResourceID *string `json:"sourceResourceId,omitempty"` 11256 // PolicyID - ID of the backup policy with which this item is backed up. 11257 PolicyID *string `json:"policyId,omitempty"` 11258 // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. 11259 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` 11260 // BackupSetName - Name of the backup set the backup item belongs to 11261 BackupSetName *string `json:"backupSetName,omitempty"` 11262 // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' 11263 CreateMode CreateMode `json:"createMode,omitempty"` 11264 // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC 11265 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` 11266 // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete 11267 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` 11268 // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted 11269 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` 11270 // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon 11271 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` 11272 // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state 11273 IsRehydrate *bool `json:"isRehydrate,omitempty"` 11274 // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' 11275 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` 11276} 11277 11278// MarshalJSON is the custom marshaler for GenericProtectedItem. 11279func (gpi GenericProtectedItem) MarshalJSON() ([]byte, error) { 11280 gpi.ProtectedItemType = ProtectedItemTypeGenericProtectedItem 11281 objectMap := make(map[string]interface{}) 11282 if gpi.FriendlyName != nil { 11283 objectMap["friendlyName"] = gpi.FriendlyName 11284 } 11285 if gpi.PolicyState != nil { 11286 objectMap["policyState"] = gpi.PolicyState 11287 } 11288 if gpi.ProtectionState != "" { 11289 objectMap["protectionState"] = gpi.ProtectionState 11290 } 11291 if gpi.ProtectedItemID != nil { 11292 objectMap["protectedItemId"] = gpi.ProtectedItemID 11293 } 11294 if gpi.SourceAssociations != nil { 11295 objectMap["sourceAssociations"] = gpi.SourceAssociations 11296 } 11297 if gpi.FabricName != nil { 11298 objectMap["fabricName"] = gpi.FabricName 11299 } 11300 if gpi.BackupManagementType != "" { 11301 objectMap["backupManagementType"] = gpi.BackupManagementType 11302 } 11303 if gpi.WorkloadType != "" { 11304 objectMap["workloadType"] = gpi.WorkloadType 11305 } 11306 if gpi.ContainerName != nil { 11307 objectMap["containerName"] = gpi.ContainerName 11308 } 11309 if gpi.SourceResourceID != nil { 11310 objectMap["sourceResourceId"] = gpi.SourceResourceID 11311 } 11312 if gpi.PolicyID != nil { 11313 objectMap["policyId"] = gpi.PolicyID 11314 } 11315 if gpi.LastRecoveryPoint != nil { 11316 objectMap["lastRecoveryPoint"] = gpi.LastRecoveryPoint 11317 } 11318 if gpi.BackupSetName != nil { 11319 objectMap["backupSetName"] = gpi.BackupSetName 11320 } 11321 if gpi.CreateMode != "" { 11322 objectMap["createMode"] = gpi.CreateMode 11323 } 11324 if gpi.DeferredDeleteTimeInUTC != nil { 11325 objectMap["deferredDeleteTimeInUTC"] = gpi.DeferredDeleteTimeInUTC 11326 } 11327 if gpi.IsScheduledForDeferredDelete != nil { 11328 objectMap["isScheduledForDeferredDelete"] = gpi.IsScheduledForDeferredDelete 11329 } 11330 if gpi.DeferredDeleteTimeRemaining != nil { 11331 objectMap["deferredDeleteTimeRemaining"] = gpi.DeferredDeleteTimeRemaining 11332 } 11333 if gpi.IsDeferredDeleteScheduleUpcoming != nil { 11334 objectMap["isDeferredDeleteScheduleUpcoming"] = gpi.IsDeferredDeleteScheduleUpcoming 11335 } 11336 if gpi.IsRehydrate != nil { 11337 objectMap["isRehydrate"] = gpi.IsRehydrate 11338 } 11339 if gpi.ProtectedItemType != "" { 11340 objectMap["protectedItemType"] = gpi.ProtectedItemType 11341 } 11342 return json.Marshal(objectMap) 11343} 11344 11345// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11346func (gpi GenericProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { 11347 return nil, false 11348} 11349 11350// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11351func (gpi GenericProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { 11352 return nil, false 11353} 11354 11355// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11356func (gpi GenericProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { 11357 return nil, false 11358} 11359 11360// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11361func (gpi GenericProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { 11362 return nil, false 11363} 11364 11365// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11366func (gpi GenericProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { 11367 return nil, false 11368} 11369 11370// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11371func (gpi GenericProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { 11372 return nil, false 11373} 11374 11375// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11376func (gpi GenericProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { 11377 return nil, false 11378} 11379 11380// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11381func (gpi GenericProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { 11382 return nil, false 11383} 11384 11385// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11386func (gpi GenericProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { 11387 return nil, false 11388} 11389 11390// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11391func (gpi GenericProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { 11392 return nil, false 11393} 11394 11395// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11396func (gpi GenericProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { 11397 return nil, false 11398} 11399 11400// AsDPMProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11401func (gpi GenericProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { 11402 return nil, false 11403} 11404 11405// AsGenericProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11406func (gpi GenericProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { 11407 return &gpi, true 11408} 11409 11410// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11411func (gpi GenericProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { 11412 return nil, false 11413} 11414 11415// AsProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11416func (gpi GenericProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { 11417 return nil, false 11418} 11419 11420// AsBasicProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. 11421func (gpi GenericProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { 11422 return &gpi, true 11423} 11424 11425// GenericProtectionPolicy azure VM (Mercury) workload-specific backup policy. 11426type GenericProtectionPolicy struct { 11427 // SubProtectionPolicy - List of sub-protection policies which includes schedule and retention 11428 SubProtectionPolicy *[]SubProtectionPolicy `json:"subProtectionPolicy,omitempty"` 11429 // TimeZone - TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". 11430 TimeZone *string `json:"timeZone,omitempty"` 11431 // FabricName - Name of this policy's fabric. 11432 FabricName *string `json:"fabricName,omitempty"` 11433 // ProtectedItemsCount - Number of items associated with this policy. 11434 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` 11435 // BackupManagementType - Possible values include: 'BackupManagementTypeProtectionPolicy', 'BackupManagementTypeAzureWorkload', 'BackupManagementTypeAzureStorage', 'BackupManagementTypeAzureIaasVM', 'BackupManagementTypeAzureSQL', 'BackupManagementTypeGenericProtectionPolicy', 'BackupManagementTypeMAB' 11436 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"` 11437} 11438 11439// MarshalJSON is the custom marshaler for GenericProtectionPolicy. 11440func (gpp GenericProtectionPolicy) MarshalJSON() ([]byte, error) { 11441 gpp.BackupManagementType = BackupManagementTypeGenericProtectionPolicy 11442 objectMap := make(map[string]interface{}) 11443 if gpp.SubProtectionPolicy != nil { 11444 objectMap["subProtectionPolicy"] = gpp.SubProtectionPolicy 11445 } 11446 if gpp.TimeZone != nil { 11447 objectMap["timeZone"] = gpp.TimeZone 11448 } 11449 if gpp.FabricName != nil { 11450 objectMap["fabricName"] = gpp.FabricName 11451 } 11452 if gpp.ProtectedItemsCount != nil { 11453 objectMap["protectedItemsCount"] = gpp.ProtectedItemsCount 11454 } 11455 if gpp.BackupManagementType != "" { 11456 objectMap["backupManagementType"] = gpp.BackupManagementType 11457 } 11458 return json.Marshal(objectMap) 11459} 11460 11461// AsAzureVMWorkloadProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. 11462func (gpp GenericProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) { 11463 return nil, false 11464} 11465 11466// AsAzureFileShareProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. 11467func (gpp GenericProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) { 11468 return nil, false 11469} 11470 11471// AsAzureIaaSVMProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. 11472func (gpp GenericProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) { 11473 return nil, false 11474} 11475 11476// AsAzureSQLProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. 11477func (gpp GenericProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) { 11478 return nil, false 11479} 11480 11481// AsGenericProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. 11482func (gpp GenericProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) { 11483 return &gpp, true 11484} 11485 11486// AsMabProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. 11487func (gpp GenericProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) { 11488 return nil, false 11489} 11490 11491// AsProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. 11492func (gpp GenericProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) { 11493 return nil, false 11494} 11495 11496// AsBasicProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. 11497func (gpp GenericProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) { 11498 return &gpp, true 11499} 11500 11501// GenericRecoveryPoint generic backup copy. 11502type GenericRecoveryPoint struct { 11503 // FriendlyName - Friendly name of the backup copy. 11504 FriendlyName *string `json:"friendlyName,omitempty"` 11505 // RecoveryPointType - Type of the backup copy. 11506 RecoveryPointType *string `json:"recoveryPointType,omitempty"` 11507 // RecoveryPointTime - Time at which this backup copy was created. 11508 RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"` 11509 // RecoveryPointAdditionalInfo - Additional information associated with this backup copy. 11510 RecoveryPointAdditionalInfo *string `json:"recoveryPointAdditionalInfo,omitempty"` 11511 // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' 11512 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` 11513} 11514 11515// MarshalJSON is the custom marshaler for GenericRecoveryPoint. 11516func (grp GenericRecoveryPoint) MarshalJSON() ([]byte, error) { 11517 grp.ObjectType = ObjectTypeGenericRecoveryPoint 11518 objectMap := make(map[string]interface{}) 11519 if grp.FriendlyName != nil { 11520 objectMap["friendlyName"] = grp.FriendlyName 11521 } 11522 if grp.RecoveryPointType != nil { 11523 objectMap["recoveryPointType"] = grp.RecoveryPointType 11524 } 11525 if grp.RecoveryPointTime != nil { 11526 objectMap["recoveryPointTime"] = grp.RecoveryPointTime 11527 } 11528 if grp.RecoveryPointAdditionalInfo != nil { 11529 objectMap["recoveryPointAdditionalInfo"] = grp.RecoveryPointAdditionalInfo 11530 } 11531 if grp.ObjectType != "" { 11532 objectMap["objectType"] = grp.ObjectType 11533 } 11534 return json.Marshal(objectMap) 11535} 11536 11537// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. 11538func (grp GenericRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { 11539 return nil, false 11540} 11541 11542// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. 11543func (grp GenericRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { 11544 return nil, false 11545} 11546 11547// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. 11548func (grp GenericRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { 11549 return nil, false 11550} 11551 11552// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. 11553func (grp GenericRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { 11554 return nil, false 11555} 11556 11557// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. 11558func (grp GenericRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { 11559 return nil, false 11560} 11561 11562// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. 11563func (grp GenericRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { 11564 return nil, false 11565} 11566 11567// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. 11568func (grp GenericRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { 11569 return nil, false 11570} 11571 11572// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. 11573func (grp GenericRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { 11574 return nil, false 11575} 11576 11577// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. 11578func (grp GenericRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { 11579 return nil, false 11580} 11581 11582// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. 11583func (grp GenericRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { 11584 return nil, false 11585} 11586 11587// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. 11588func (grp GenericRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { 11589 return &grp, true 11590} 11591 11592// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. 11593func (grp GenericRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { 11594 return nil, false 11595} 11596 11597// AsRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. 11598func (grp GenericRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { 11599 return nil, false 11600} 11601 11602// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. 11603func (grp GenericRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { 11604 return &grp, true 11605} 11606 11607// GetProtectedItemQueryObject filters to list backup items. 11608type GetProtectedItemQueryObject struct { 11609 // Expand - Specifies if the additional information should be provided for this item. 11610 Expand *string `json:"expand,omitempty"` 11611} 11612 11613// IaasVMBackupRequest iaaS VM workload-specific backup request. 11614type IaasVMBackupRequest struct { 11615 // RecoveryPointExpiryTimeInUTC - Backup copy will expire after the time specified (UTC). 11616 RecoveryPointExpiryTimeInUTC *date.Time `json:"recoveryPointExpiryTimeInUTC,omitempty"` 11617 // ObjectType - Possible values include: 'ObjectTypeBackupRequest', 'ObjectTypeAzureFileShareBackupRequest', 'ObjectTypeAzureWorkloadBackupRequest', 'ObjectTypeIaasVMBackupRequest' 11618 ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"` 11619} 11620 11621// MarshalJSON is the custom marshaler for IaasVMBackupRequest. 11622func (ivbr IaasVMBackupRequest) MarshalJSON() ([]byte, error) { 11623 ivbr.ObjectType = ObjectTypeIaasVMBackupRequest 11624 objectMap := make(map[string]interface{}) 11625 if ivbr.RecoveryPointExpiryTimeInUTC != nil { 11626 objectMap["recoveryPointExpiryTimeInUTC"] = ivbr.RecoveryPointExpiryTimeInUTC 11627 } 11628 if ivbr.ObjectType != "" { 11629 objectMap["objectType"] = ivbr.ObjectType 11630 } 11631 return json.Marshal(objectMap) 11632} 11633 11634// AsAzureFileShareBackupRequest is the BasicRequest implementation for IaasVMBackupRequest. 11635func (ivbr IaasVMBackupRequest) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) { 11636 return nil, false 11637} 11638 11639// AsAzureWorkloadBackupRequest is the BasicRequest implementation for IaasVMBackupRequest. 11640func (ivbr IaasVMBackupRequest) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) { 11641 return nil, false 11642} 11643 11644// AsIaasVMBackupRequest is the BasicRequest implementation for IaasVMBackupRequest. 11645func (ivbr IaasVMBackupRequest) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) { 11646 return &ivbr, true 11647} 11648 11649// AsRequest is the BasicRequest implementation for IaasVMBackupRequest. 11650func (ivbr IaasVMBackupRequest) AsRequest() (*Request, bool) { 11651 return nil, false 11652} 11653 11654// AsBasicRequest is the BasicRequest implementation for IaasVMBackupRequest. 11655func (ivbr IaasVMBackupRequest) AsBasicRequest() (BasicRequest, bool) { 11656 return &ivbr, true 11657} 11658 11659// BasicIaaSVMContainer iaaS VM workload-specific container. 11660type BasicIaaSVMContainer interface { 11661 AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) 11662 AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) 11663 AsIaaSVMContainer() (*IaaSVMContainer, bool) 11664} 11665 11666// IaaSVMContainer iaaS VM workload-specific container. 11667type IaaSVMContainer struct { 11668 // VirtualMachineID - Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. 11669 VirtualMachineID *string `json:"virtualMachineId,omitempty"` 11670 // VirtualMachineVersion - Specifies whether the container represents a Classic or an Azure Resource Manager VM. 11671 VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` 11672 // ResourceGroup - Resource group name of Recovery Services Vault. 11673 ResourceGroup *string `json:"resourceGroup,omitempty"` 11674 // FriendlyName - Friendly name of the container. 11675 FriendlyName *string `json:"friendlyName,omitempty"` 11676 // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 11677 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 11678 // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. 11679 RegistrationStatus *string `json:"registrationStatus,omitempty"` 11680 // HealthStatus - Status of health of the container. 11681 HealthStatus *string `json:"healthStatus,omitempty"` 11682 // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' 11683 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` 11684} 11685 11686func unmarshalBasicIaaSVMContainer(body []byte) (BasicIaaSVMContainer, error) { 11687 var m map[string]interface{} 11688 err := json.Unmarshal(body, &m) 11689 if err != nil { 11690 return nil, err 11691 } 11692 11693 switch m["containerType"] { 11694 case string(ContainerTypeMicrosoftClassicComputevirtualMachines): 11695 var aisccvc AzureIaaSClassicComputeVMContainer 11696 err := json.Unmarshal(body, &aisccvc) 11697 return aisccvc, err 11698 case string(ContainerTypeMicrosoftComputevirtualMachines): 11699 var aiscvc AzureIaaSComputeVMContainer 11700 err := json.Unmarshal(body, &aiscvc) 11701 return aiscvc, err 11702 default: 11703 var isc IaaSVMContainer 11704 err := json.Unmarshal(body, &isc) 11705 return isc, err 11706 } 11707} 11708func unmarshalBasicIaaSVMContainerArray(body []byte) ([]BasicIaaSVMContainer, error) { 11709 var rawMessages []*json.RawMessage 11710 err := json.Unmarshal(body, &rawMessages) 11711 if err != nil { 11712 return nil, err 11713 } 11714 11715 iscArray := make([]BasicIaaSVMContainer, len(rawMessages)) 11716 11717 for index, rawMessage := range rawMessages { 11718 isc, err := unmarshalBasicIaaSVMContainer(*rawMessage) 11719 if err != nil { 11720 return nil, err 11721 } 11722 iscArray[index] = isc 11723 } 11724 return iscArray, nil 11725} 11726 11727// MarshalJSON is the custom marshaler for IaaSVMContainer. 11728func (isc IaaSVMContainer) MarshalJSON() ([]byte, error) { 11729 isc.ContainerType = ContainerTypeIaaSVMContainer 11730 objectMap := make(map[string]interface{}) 11731 if isc.VirtualMachineID != nil { 11732 objectMap["virtualMachineId"] = isc.VirtualMachineID 11733 } 11734 if isc.VirtualMachineVersion != nil { 11735 objectMap["virtualMachineVersion"] = isc.VirtualMachineVersion 11736 } 11737 if isc.ResourceGroup != nil { 11738 objectMap["resourceGroup"] = isc.ResourceGroup 11739 } 11740 if isc.FriendlyName != nil { 11741 objectMap["friendlyName"] = isc.FriendlyName 11742 } 11743 if isc.BackupManagementType != "" { 11744 objectMap["backupManagementType"] = isc.BackupManagementType 11745 } 11746 if isc.RegistrationStatus != nil { 11747 objectMap["registrationStatus"] = isc.RegistrationStatus 11748 } 11749 if isc.HealthStatus != nil { 11750 objectMap["healthStatus"] = isc.HealthStatus 11751 } 11752 if isc.ContainerType != "" { 11753 objectMap["containerType"] = isc.ContainerType 11754 } 11755 return json.Marshal(objectMap) 11756} 11757 11758// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11759func (isc IaaSVMContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { 11760 return nil, false 11761} 11762 11763// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11764func (isc IaaSVMContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { 11765 return nil, false 11766} 11767 11768// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11769func (isc IaaSVMContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { 11770 return nil, false 11771} 11772 11773// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11774func (isc IaaSVMContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { 11775 return nil, false 11776} 11777 11778// AsAzureSQLContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11779func (isc IaaSVMContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { 11780 return nil, false 11781} 11782 11783// AsAzureStorageContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11784func (isc IaaSVMContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { 11785 return nil, false 11786} 11787 11788// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11789func (isc IaaSVMContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { 11790 return nil, false 11791} 11792 11793// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11794func (isc IaaSVMContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { 11795 return nil, false 11796} 11797 11798// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11799func (isc IaaSVMContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { 11800 return nil, false 11801} 11802 11803// AsDpmContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11804func (isc IaaSVMContainer) AsDpmContainer() (*DpmContainer, bool) { 11805 return nil, false 11806} 11807 11808// AsBasicDpmContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11809func (isc IaaSVMContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { 11810 return nil, false 11811} 11812 11813// AsGenericContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11814func (isc IaaSVMContainer) AsGenericContainer() (*GenericContainer, bool) { 11815 return nil, false 11816} 11817 11818// AsIaaSVMContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11819func (isc IaaSVMContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { 11820 return &isc, true 11821} 11822 11823// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11824func (isc IaaSVMContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { 11825 return &isc, true 11826} 11827 11828// AsMabContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11829func (isc IaaSVMContainer) AsMabContainer() (*MabContainer, bool) { 11830 return nil, false 11831} 11832 11833// AsProtectionContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11834func (isc IaaSVMContainer) AsProtectionContainer() (*ProtectionContainer, bool) { 11835 return nil, false 11836} 11837 11838// AsBasicProtectionContainer is the BasicProtectionContainer implementation for IaaSVMContainer. 11839func (isc IaaSVMContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { 11840 return &isc, true 11841} 11842 11843// IaasVMILRRegistrationRequest restore files/folders from a backup copy of IaaS VM. 11844type IaasVMILRRegistrationRequest struct { 11845 // RecoveryPointID - ID of the IaaS VM backup copy from where the files/folders have to be restored. 11846 RecoveryPointID *string `json:"recoveryPointId,omitempty"` 11847 // VirtualMachineID - Fully qualified ARM ID of the virtual machine whose the files / folders have to be restored. 11848 VirtualMachineID *string `json:"virtualMachineId,omitempty"` 11849 // InitiatorName - iSCSI initiator name. 11850 InitiatorName *string `json:"initiatorName,omitempty"` 11851 // RenewExistingRegistration - Whether to renew existing registration with the iSCSI server. 11852 RenewExistingRegistration *bool `json:"renewExistingRegistration,omitempty"` 11853 // ObjectType - Possible values include: 'ObjectTypeILRRequest', 'ObjectTypeAzureFileShareProvisionILRRequest', 'ObjectTypeIaasVMILRRegistrationRequest' 11854 ObjectType ObjectTypeBasicILRRequest `json:"objectType,omitempty"` 11855} 11856 11857// MarshalJSON is the custom marshaler for IaasVMILRRegistrationRequest. 11858func (ivrr IaasVMILRRegistrationRequest) MarshalJSON() ([]byte, error) { 11859 ivrr.ObjectType = ObjectTypeIaasVMILRRegistrationRequest 11860 objectMap := make(map[string]interface{}) 11861 if ivrr.RecoveryPointID != nil { 11862 objectMap["recoveryPointId"] = ivrr.RecoveryPointID 11863 } 11864 if ivrr.VirtualMachineID != nil { 11865 objectMap["virtualMachineId"] = ivrr.VirtualMachineID 11866 } 11867 if ivrr.InitiatorName != nil { 11868 objectMap["initiatorName"] = ivrr.InitiatorName 11869 } 11870 if ivrr.RenewExistingRegistration != nil { 11871 objectMap["renewExistingRegistration"] = ivrr.RenewExistingRegistration 11872 } 11873 if ivrr.ObjectType != "" { 11874 objectMap["objectType"] = ivrr.ObjectType 11875 } 11876 return json.Marshal(objectMap) 11877} 11878 11879// AsAzureFileShareProvisionILRRequest is the BasicILRRequest implementation for IaasVMILRRegistrationRequest. 11880func (ivrr IaasVMILRRegistrationRequest) AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) { 11881 return nil, false 11882} 11883 11884// AsIaasVMILRRegistrationRequest is the BasicILRRequest implementation for IaasVMILRRegistrationRequest. 11885func (ivrr IaasVMILRRegistrationRequest) AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) { 11886 return &ivrr, true 11887} 11888 11889// AsILRRequest is the BasicILRRequest implementation for IaasVMILRRegistrationRequest. 11890func (ivrr IaasVMILRRegistrationRequest) AsILRRequest() (*ILRRequest, bool) { 11891 return nil, false 11892} 11893 11894// AsBasicILRRequest is the BasicILRRequest implementation for IaasVMILRRegistrationRequest. 11895func (ivrr IaasVMILRRegistrationRequest) AsBasicILRRequest() (BasicILRRequest, bool) { 11896 return &ivrr, true 11897} 11898 11899// BasicIaaSVMProtectableItem iaaS VM workload-specific backup item. 11900type BasicIaaSVMProtectableItem interface { 11901 AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) 11902 AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) 11903 AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) 11904} 11905 11906// IaaSVMProtectableItem iaaS VM workload-specific backup item. 11907type IaaSVMProtectableItem struct { 11908 // VirtualMachineID - Fully qualified ARM ID of the virtual machine. 11909 VirtualMachineID *string `json:"virtualMachineId,omitempty"` 11910 // BackupManagementType - Type of backup management to backup an item. 11911 BackupManagementType *string `json:"backupManagementType,omitempty"` 11912 // WorkloadType - Type of workload for the backup management 11913 WorkloadType *string `json:"workloadType,omitempty"` 11914 // FriendlyName - Friendly name of the backup item. 11915 FriendlyName *string `json:"friendlyName,omitempty"` 11916 // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 11917 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 11918 // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' 11919 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` 11920} 11921 11922func unmarshalBasicIaaSVMProtectableItem(body []byte) (BasicIaaSVMProtectableItem, error) { 11923 var m map[string]interface{} 11924 err := json.Unmarshal(body, &m) 11925 if err != nil { 11926 return nil, err 11927 } 11928 11929 switch m["protectableItemType"] { 11930 case string(ProtectableItemTypeMicrosoftClassicComputevirtualMachines): 11931 var aisccvpi AzureIaaSClassicComputeVMProtectableItem 11932 err := json.Unmarshal(body, &aisccvpi) 11933 return aisccvpi, err 11934 case string(ProtectableItemTypeMicrosoftComputevirtualMachines): 11935 var aiscvpi AzureIaaSComputeVMProtectableItem 11936 err := json.Unmarshal(body, &aiscvpi) 11937 return aiscvpi, err 11938 default: 11939 var ispi IaaSVMProtectableItem 11940 err := json.Unmarshal(body, &ispi) 11941 return ispi, err 11942 } 11943} 11944func unmarshalBasicIaaSVMProtectableItemArray(body []byte) ([]BasicIaaSVMProtectableItem, error) { 11945 var rawMessages []*json.RawMessage 11946 err := json.Unmarshal(body, &rawMessages) 11947 if err != nil { 11948 return nil, err 11949 } 11950 11951 ispiArray := make([]BasicIaaSVMProtectableItem, len(rawMessages)) 11952 11953 for index, rawMessage := range rawMessages { 11954 ispi, err := unmarshalBasicIaaSVMProtectableItem(*rawMessage) 11955 if err != nil { 11956 return nil, err 11957 } 11958 ispiArray[index] = ispi 11959 } 11960 return ispiArray, nil 11961} 11962 11963// MarshalJSON is the custom marshaler for IaaSVMProtectableItem. 11964func (ispi IaaSVMProtectableItem) MarshalJSON() ([]byte, error) { 11965 ispi.ProtectableItemType = ProtectableItemTypeIaaSVMProtectableItem 11966 objectMap := make(map[string]interface{}) 11967 if ispi.VirtualMachineID != nil { 11968 objectMap["virtualMachineId"] = ispi.VirtualMachineID 11969 } 11970 if ispi.BackupManagementType != nil { 11971 objectMap["backupManagementType"] = ispi.BackupManagementType 11972 } 11973 if ispi.WorkloadType != nil { 11974 objectMap["workloadType"] = ispi.WorkloadType 11975 } 11976 if ispi.FriendlyName != nil { 11977 objectMap["friendlyName"] = ispi.FriendlyName 11978 } 11979 if ispi.ProtectionState != "" { 11980 objectMap["protectionState"] = ispi.ProtectionState 11981 } 11982 if ispi.ProtectableItemType != "" { 11983 objectMap["protectableItemType"] = ispi.ProtectableItemType 11984 } 11985 return json.Marshal(objectMap) 11986} 11987 11988// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. 11989func (ispi IaaSVMProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { 11990 return nil, false 11991} 11992 11993// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. 11994func (ispi IaaSVMProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { 11995 return nil, false 11996} 11997 11998// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. 11999func (ispi IaaSVMProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { 12000 return nil, false 12001} 12002 12003// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. 12004func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { 12005 return nil, false 12006} 12007 12008// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. 12009func (ispi IaaSVMProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { 12010 return nil, false 12011} 12012 12013// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. 12014func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { 12015 return nil, false 12016} 12017 12018// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. 12019func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { 12020 return nil, false 12021} 12022 12023// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. 12024func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { 12025 return nil, false 12026} 12027 12028// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. 12029func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { 12030 return nil, false 12031} 12032 12033// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. 12034func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { 12035 return nil, false 12036} 12037 12038// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. 12039func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { 12040 return nil, false 12041} 12042 12043// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. 12044func (ispi IaaSVMProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { 12045 return &ispi, true 12046} 12047 12048// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. 12049func (ispi IaaSVMProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { 12050 return &ispi, true 12051} 12052 12053// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. 12054func (ispi IaaSVMProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { 12055 return nil, false 12056} 12057 12058// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. 12059func (ispi IaaSVMProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { 12060 return &ispi, true 12061} 12062 12063// IaasVMRecoveryPoint iaaS VM workload specific backup copy. 12064type IaasVMRecoveryPoint struct { 12065 // RecoveryPointType - READ-ONLY; Type of the backup copy. 12066 RecoveryPointType *string `json:"recoveryPointType,omitempty"` 12067 // RecoveryPointTime - READ-ONLY; Time at which this backup copy was created. 12068 RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"` 12069 // RecoveryPointAdditionalInfo - READ-ONLY; Additional information associated with this backup copy. 12070 RecoveryPointAdditionalInfo *string `json:"recoveryPointAdditionalInfo,omitempty"` 12071 // SourceVMStorageType - READ-ONLY; Storage type of the VM whose backup copy is created. 12072 SourceVMStorageType *string `json:"sourceVMStorageType,omitempty"` 12073 // IsSourceVMEncrypted - READ-ONLY; Identifies whether the VM was encrypted when the backup copy is created. 12074 IsSourceVMEncrypted *bool `json:"isSourceVMEncrypted,omitempty"` 12075 // KeyAndSecret - Required details for recovering an encrypted VM. Applicable only when IsSourceVMEncrypted is true. 12076 KeyAndSecret *KeyAndSecretDetails `json:"keyAndSecret,omitempty"` 12077 // IsInstantIlrSessionActive - Is the session to recover items from this backup copy still active. 12078 IsInstantIlrSessionActive *bool `json:"isInstantIlrSessionActive,omitempty"` 12079 // RecoveryPointTierDetails - Recovery point tier information. 12080 RecoveryPointTierDetails *[]RecoveryPointTierInformation `json:"recoveryPointTierDetails,omitempty"` 12081 // IsManagedVirtualMachine - Whether VM is with Managed Disks 12082 IsManagedVirtualMachine *bool `json:"isManagedVirtualMachine,omitempty"` 12083 // VirtualMachineSize - Virtual Machine Size 12084 VirtualMachineSize *string `json:"virtualMachineSize,omitempty"` 12085 // OriginalStorageAccountOption - Original Storage Account Option 12086 OriginalStorageAccountOption *bool `json:"originalStorageAccountOption,omitempty"` 12087 // OsType - OS type 12088 OsType *string `json:"osType,omitempty"` 12089 // RecoveryPointDiskConfiguration - Disk configuration 12090 RecoveryPointDiskConfiguration *RecoveryPointDiskConfiguration `json:"recoveryPointDiskConfiguration,omitempty"` 12091 // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' 12092 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` 12093} 12094 12095// MarshalJSON is the custom marshaler for IaasVMRecoveryPoint. 12096func (ivrp IaasVMRecoveryPoint) MarshalJSON() ([]byte, error) { 12097 ivrp.ObjectType = ObjectTypeIaasVMRecoveryPoint 12098 objectMap := make(map[string]interface{}) 12099 if ivrp.KeyAndSecret != nil { 12100 objectMap["keyAndSecret"] = ivrp.KeyAndSecret 12101 } 12102 if ivrp.IsInstantIlrSessionActive != nil { 12103 objectMap["isInstantIlrSessionActive"] = ivrp.IsInstantIlrSessionActive 12104 } 12105 if ivrp.RecoveryPointTierDetails != nil { 12106 objectMap["recoveryPointTierDetails"] = ivrp.RecoveryPointTierDetails 12107 } 12108 if ivrp.IsManagedVirtualMachine != nil { 12109 objectMap["isManagedVirtualMachine"] = ivrp.IsManagedVirtualMachine 12110 } 12111 if ivrp.VirtualMachineSize != nil { 12112 objectMap["virtualMachineSize"] = ivrp.VirtualMachineSize 12113 } 12114 if ivrp.OriginalStorageAccountOption != nil { 12115 objectMap["originalStorageAccountOption"] = ivrp.OriginalStorageAccountOption 12116 } 12117 if ivrp.OsType != nil { 12118 objectMap["osType"] = ivrp.OsType 12119 } 12120 if ivrp.RecoveryPointDiskConfiguration != nil { 12121 objectMap["recoveryPointDiskConfiguration"] = ivrp.RecoveryPointDiskConfiguration 12122 } 12123 if ivrp.ObjectType != "" { 12124 objectMap["objectType"] = ivrp.ObjectType 12125 } 12126 return json.Marshal(objectMap) 12127} 12128 12129// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. 12130func (ivrp IaasVMRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { 12131 return nil, false 12132} 12133 12134// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. 12135func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { 12136 return nil, false 12137} 12138 12139// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. 12140func (ivrp IaasVMRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { 12141 return nil, false 12142} 12143 12144// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. 12145func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { 12146 return nil, false 12147} 12148 12149// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. 12150func (ivrp IaasVMRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { 12151 return nil, false 12152} 12153 12154// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. 12155func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { 12156 return nil, false 12157} 12158 12159// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. 12160func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { 12161 return nil, false 12162} 12163 12164// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. 12165func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { 12166 return nil, false 12167} 12168 12169// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. 12170func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { 12171 return nil, false 12172} 12173 12174// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. 12175func (ivrp IaasVMRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { 12176 return nil, false 12177} 12178 12179// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. 12180func (ivrp IaasVMRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { 12181 return nil, false 12182} 12183 12184// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. 12185func (ivrp IaasVMRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { 12186 return &ivrp, true 12187} 12188 12189// AsRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. 12190func (ivrp IaasVMRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { 12191 return nil, false 12192} 12193 12194// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. 12195func (ivrp IaasVMRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { 12196 return &ivrp, true 12197} 12198 12199// IaasVMRestoreRequest iaaS VM workload-specific restore. 12200type IaasVMRestoreRequest struct { 12201 // RecoveryPointID - ID of the backup copy to be recovered. 12202 RecoveryPointID *string `json:"recoveryPointId,omitempty"` 12203 // RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline' 12204 RecoveryType RecoveryType `json:"recoveryType,omitempty"` 12205 // SourceResourceID - Fully qualified ARM ID of the VM which is being recovered. 12206 SourceResourceID *string `json:"sourceResourceId,omitempty"` 12207 // TargetVirtualMachineID - This is the complete ARM Id of the VM that will be created. 12208 // For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} 12209 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"` 12210 // TargetResourceGroupID - This is the ARM Id of the resource group that you want to create for this Virtual machine and other artifacts. 12211 // For e.g. /subscriptions/{subId}/resourcegroups/{rg} 12212 TargetResourceGroupID *string `json:"targetResourceGroupId,omitempty"` 12213 // StorageAccountID - Fully qualified ARM ID of the storage account to which the VM has to be restored. 12214 StorageAccountID *string `json:"storageAccountId,omitempty"` 12215 // VirtualNetworkID - This is the virtual network Id of the vnet that will be attached to the virtual machine. 12216 // User will be validated for join action permissions in the linked access. 12217 VirtualNetworkID *string `json:"virtualNetworkId,omitempty"` 12218 // SubnetID - Subnet ID, is the subnet ID associated with the to be restored VM. For Classic VMs it would be 12219 // {VnetID}/Subnet/{SubnetName} and, for the Azure Resource Manager VMs it would be ARM resource ID used to represent 12220 // the subnet. 12221 SubnetID *string `json:"subnetId,omitempty"` 12222 // TargetDomainNameID - Fully qualified ARM ID of the domain name to be associated to the VM being restored. This applies only to Classic 12223 // Virtual Machines. 12224 TargetDomainNameID *string `json:"targetDomainNameId,omitempty"` 12225 // Region - Region in which the virtual machine is restored. 12226 Region *string `json:"region,omitempty"` 12227 // AffinityGroup - Affinity group associated to VM to be restored. Used only for Classic Compute Virtual Machines. 12228 AffinityGroup *string `json:"affinityGroup,omitempty"` 12229 // CreateNewCloudService - Should a new cloud service be created while restoring the VM. If this is false, VM will be restored to the same 12230 // cloud service as it was at the time of backup. 12231 CreateNewCloudService *bool `json:"createNewCloudService,omitempty"` 12232 // OriginalStorageAccountOption - Original Storage Account Option 12233 OriginalStorageAccountOption *bool `json:"originalStorageAccountOption,omitempty"` 12234 // EncryptionDetails - Details needed if the VM was encrypted at the time of backup. 12235 EncryptionDetails *EncryptionDetails `json:"encryptionDetails,omitempty"` 12236 // RestoreDiskLunList - List of Disk LUNs for partial restore 12237 RestoreDiskLunList *[]int32 `json:"restoreDiskLunList,omitempty"` 12238 // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' 12239 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` 12240} 12241 12242// MarshalJSON is the custom marshaler for IaasVMRestoreRequest. 12243func (ivrr IaasVMRestoreRequest) MarshalJSON() ([]byte, error) { 12244 ivrr.ObjectType = ObjectTypeIaasVMRestoreRequest 12245 objectMap := make(map[string]interface{}) 12246 if ivrr.RecoveryPointID != nil { 12247 objectMap["recoveryPointId"] = ivrr.RecoveryPointID 12248 } 12249 if ivrr.RecoveryType != "" { 12250 objectMap["recoveryType"] = ivrr.RecoveryType 12251 } 12252 if ivrr.SourceResourceID != nil { 12253 objectMap["sourceResourceId"] = ivrr.SourceResourceID 12254 } 12255 if ivrr.TargetVirtualMachineID != nil { 12256 objectMap["targetVirtualMachineId"] = ivrr.TargetVirtualMachineID 12257 } 12258 if ivrr.TargetResourceGroupID != nil { 12259 objectMap["targetResourceGroupId"] = ivrr.TargetResourceGroupID 12260 } 12261 if ivrr.StorageAccountID != nil { 12262 objectMap["storageAccountId"] = ivrr.StorageAccountID 12263 } 12264 if ivrr.VirtualNetworkID != nil { 12265 objectMap["virtualNetworkId"] = ivrr.VirtualNetworkID 12266 } 12267 if ivrr.SubnetID != nil { 12268 objectMap["subnetId"] = ivrr.SubnetID 12269 } 12270 if ivrr.TargetDomainNameID != nil { 12271 objectMap["targetDomainNameId"] = ivrr.TargetDomainNameID 12272 } 12273 if ivrr.Region != nil { 12274 objectMap["region"] = ivrr.Region 12275 } 12276 if ivrr.AffinityGroup != nil { 12277 objectMap["affinityGroup"] = ivrr.AffinityGroup 12278 } 12279 if ivrr.CreateNewCloudService != nil { 12280 objectMap["createNewCloudService"] = ivrr.CreateNewCloudService 12281 } 12282 if ivrr.OriginalStorageAccountOption != nil { 12283 objectMap["originalStorageAccountOption"] = ivrr.OriginalStorageAccountOption 12284 } 12285 if ivrr.EncryptionDetails != nil { 12286 objectMap["encryptionDetails"] = ivrr.EncryptionDetails 12287 } 12288 if ivrr.RestoreDiskLunList != nil { 12289 objectMap["restoreDiskLunList"] = ivrr.RestoreDiskLunList 12290 } 12291 if ivrr.ObjectType != "" { 12292 objectMap["objectType"] = ivrr.ObjectType 12293 } 12294 return json.Marshal(objectMap) 12295} 12296 12297// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. 12298func (ivrr IaasVMRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { 12299 return nil, false 12300} 12301 12302// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. 12303func (ivrr IaasVMRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { 12304 return nil, false 12305} 12306 12307// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. 12308func (ivrr IaasVMRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { 12309 return nil, false 12310} 12311 12312// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. 12313func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { 12314 return nil, false 12315} 12316 12317// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. 12318func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { 12319 return nil, false 12320} 12321 12322// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. 12323func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { 12324 return nil, false 12325} 12326 12327// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. 12328func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { 12329 return nil, false 12330} 12331 12332// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. 12333func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { 12334 return nil, false 12335} 12336 12337// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. 12338func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { 12339 return nil, false 12340} 12341 12342// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. 12343func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { 12344 return nil, false 12345} 12346 12347// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. 12348func (ivrr IaasVMRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { 12349 return &ivrr, true 12350} 12351 12352// AsRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. 12353func (ivrr IaasVMRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { 12354 return nil, false 12355} 12356 12357// AsBasicRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. 12358func (ivrr IaasVMRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { 12359 return &ivrr, true 12360} 12361 12362// BasicILRRequest parameters to Provision ILR API. 12363type BasicILRRequest interface { 12364 AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) 12365 AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) 12366 AsILRRequest() (*ILRRequest, bool) 12367} 12368 12369// ILRRequest parameters to Provision ILR API. 12370type ILRRequest struct { 12371 // ObjectType - Possible values include: 'ObjectTypeILRRequest', 'ObjectTypeAzureFileShareProvisionILRRequest', 'ObjectTypeIaasVMILRRegistrationRequest' 12372 ObjectType ObjectTypeBasicILRRequest `json:"objectType,omitempty"` 12373} 12374 12375func unmarshalBasicILRRequest(body []byte) (BasicILRRequest, error) { 12376 var m map[string]interface{} 12377 err := json.Unmarshal(body, &m) 12378 if err != nil { 12379 return nil, err 12380 } 12381 12382 switch m["objectType"] { 12383 case string(ObjectTypeAzureFileShareProvisionILRRequest): 12384 var afspir AzureFileShareProvisionILRRequest 12385 err := json.Unmarshal(body, &afspir) 12386 return afspir, err 12387 case string(ObjectTypeIaasVMILRRegistrationRequest): 12388 var ivrr IaasVMILRRegistrationRequest 12389 err := json.Unmarshal(body, &ivrr) 12390 return ivrr, err 12391 default: 12392 var ir ILRRequest 12393 err := json.Unmarshal(body, &ir) 12394 return ir, err 12395 } 12396} 12397func unmarshalBasicILRRequestArray(body []byte) ([]BasicILRRequest, error) { 12398 var rawMessages []*json.RawMessage 12399 err := json.Unmarshal(body, &rawMessages) 12400 if err != nil { 12401 return nil, err 12402 } 12403 12404 irArray := make([]BasicILRRequest, len(rawMessages)) 12405 12406 for index, rawMessage := range rawMessages { 12407 ir, err := unmarshalBasicILRRequest(*rawMessage) 12408 if err != nil { 12409 return nil, err 12410 } 12411 irArray[index] = ir 12412 } 12413 return irArray, nil 12414} 12415 12416// MarshalJSON is the custom marshaler for ILRRequest. 12417func (ir ILRRequest) MarshalJSON() ([]byte, error) { 12418 ir.ObjectType = ObjectTypeILRRequest 12419 objectMap := make(map[string]interface{}) 12420 if ir.ObjectType != "" { 12421 objectMap["objectType"] = ir.ObjectType 12422 } 12423 return json.Marshal(objectMap) 12424} 12425 12426// AsAzureFileShareProvisionILRRequest is the BasicILRRequest implementation for ILRRequest. 12427func (ir ILRRequest) AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) { 12428 return nil, false 12429} 12430 12431// AsIaasVMILRRegistrationRequest is the BasicILRRequest implementation for ILRRequest. 12432func (ir ILRRequest) AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) { 12433 return nil, false 12434} 12435 12436// AsILRRequest is the BasicILRRequest implementation for ILRRequest. 12437func (ir ILRRequest) AsILRRequest() (*ILRRequest, bool) { 12438 return &ir, true 12439} 12440 12441// AsBasicILRRequest is the BasicILRRequest implementation for ILRRequest. 12442func (ir ILRRequest) AsBasicILRRequest() (BasicILRRequest, bool) { 12443 return &ir, true 12444} 12445 12446// ILRRequestResource parameters to Provision ILR API. 12447type ILRRequestResource struct { 12448 // Properties - ILRRequestResource properties 12449 Properties BasicILRRequest `json:"properties,omitempty"` 12450 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 12451 ID *string `json:"id,omitempty"` 12452 // Name - READ-ONLY; Resource name associated with the resource. 12453 Name *string `json:"name,omitempty"` 12454 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 12455 Type *string `json:"type,omitempty"` 12456 // Location - Resource location. 12457 Location *string `json:"location,omitempty"` 12458 // Tags - Resource tags. 12459 Tags map[string]*string `json:"tags"` 12460 // ETag - Optional ETag. 12461 ETag *string `json:"eTag,omitempty"` 12462} 12463 12464// MarshalJSON is the custom marshaler for ILRRequestResource. 12465func (irr ILRRequestResource) MarshalJSON() ([]byte, error) { 12466 objectMap := make(map[string]interface{}) 12467 objectMap["properties"] = irr.Properties 12468 if irr.Location != nil { 12469 objectMap["location"] = irr.Location 12470 } 12471 if irr.Tags != nil { 12472 objectMap["tags"] = irr.Tags 12473 } 12474 if irr.ETag != nil { 12475 objectMap["eTag"] = irr.ETag 12476 } 12477 return json.Marshal(objectMap) 12478} 12479 12480// UnmarshalJSON is the custom unmarshaler for ILRRequestResource struct. 12481func (irr *ILRRequestResource) UnmarshalJSON(body []byte) error { 12482 var m map[string]*json.RawMessage 12483 err := json.Unmarshal(body, &m) 12484 if err != nil { 12485 return err 12486 } 12487 for k, v := range m { 12488 switch k { 12489 case "properties": 12490 if v != nil { 12491 properties, err := unmarshalBasicILRRequest(*v) 12492 if err != nil { 12493 return err 12494 } 12495 irr.Properties = properties 12496 } 12497 case "id": 12498 if v != nil { 12499 var ID string 12500 err = json.Unmarshal(*v, &ID) 12501 if err != nil { 12502 return err 12503 } 12504 irr.ID = &ID 12505 } 12506 case "name": 12507 if v != nil { 12508 var name string 12509 err = json.Unmarshal(*v, &name) 12510 if err != nil { 12511 return err 12512 } 12513 irr.Name = &name 12514 } 12515 case "type": 12516 if v != nil { 12517 var typeVar string 12518 err = json.Unmarshal(*v, &typeVar) 12519 if err != nil { 12520 return err 12521 } 12522 irr.Type = &typeVar 12523 } 12524 case "location": 12525 if v != nil { 12526 var location string 12527 err = json.Unmarshal(*v, &location) 12528 if err != nil { 12529 return err 12530 } 12531 irr.Location = &location 12532 } 12533 case "tags": 12534 if v != nil { 12535 var tags map[string]*string 12536 err = json.Unmarshal(*v, &tags) 12537 if err != nil { 12538 return err 12539 } 12540 irr.Tags = tags 12541 } 12542 case "eTag": 12543 if v != nil { 12544 var eTag string 12545 err = json.Unmarshal(*v, &eTag) 12546 if err != nil { 12547 return err 12548 } 12549 irr.ETag = &eTag 12550 } 12551 } 12552 } 12553 12554 return nil 12555} 12556 12557// InquiryInfo details about inquired protectable items under a given container. 12558type InquiryInfo struct { 12559 // Status - Inquiry Status for this container such as 12560 // InProgress | Failed | Succeeded 12561 Status *string `json:"status,omitempty"` 12562 // ErrorDetail - Error Details if the Status is non-success. 12563 ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"` 12564 // InquiryDetails - Inquiry Details which will have workload specific details. 12565 // For e.g. - For SQL and oracle this will contain different details. 12566 InquiryDetails *[]WorkloadInquiryDetails `json:"inquiryDetails,omitempty"` 12567} 12568 12569// InquiryValidation validation for inquired protectable items under a given container. 12570type InquiryValidation struct { 12571 // Status - Status for the Inquiry Validation. 12572 Status *string `json:"status,omitempty"` 12573 // ErrorDetail - Error Detail in case the status is non-success. 12574 ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"` 12575 // AdditionalDetail - READ-ONLY; Error Additional Detail in case the status is non-success. 12576 AdditionalDetail *string `json:"additionalDetail,omitempty"` 12577} 12578 12579// MarshalJSON is the custom marshaler for InquiryValidation. 12580func (iv InquiryValidation) MarshalJSON() ([]byte, error) { 12581 objectMap := make(map[string]interface{}) 12582 if iv.Status != nil { 12583 objectMap["status"] = iv.Status 12584 } 12585 if iv.ErrorDetail != nil { 12586 objectMap["errorDetail"] = iv.ErrorDetail 12587 } 12588 return json.Marshal(objectMap) 12589} 12590 12591// InstantItemRecoveryTarget target details for file / folder restore. 12592type InstantItemRecoveryTarget struct { 12593 // ClientScripts - List of client scripts. 12594 ClientScripts *[]ClientScriptForConnect `json:"clientScripts,omitempty"` 12595} 12596 12597// InstantRPAdditionalDetails ... 12598type InstantRPAdditionalDetails struct { 12599 AzureBackupRGNamePrefix *string `json:"azureBackupRGNamePrefix,omitempty"` 12600 AzureBackupRGNameSuffix *string `json:"azureBackupRGNameSuffix,omitempty"` 12601} 12602 12603// BasicJob defines workload agnostic properties for a job. 12604type BasicJob interface { 12605 AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) 12606 AsAzureStorageJob() (*AzureStorageJob, bool) 12607 AsAzureWorkloadJob() (*AzureWorkloadJob, bool) 12608 AsDpmJob() (*DpmJob, bool) 12609 AsMabJob() (*MabJob, bool) 12610 AsJob() (*Job, bool) 12611} 12612 12613// Job defines workload agnostic properties for a job. 12614type Job struct { 12615 // EntityFriendlyName - Friendly name of the entity on which the current job is executing. 12616 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` 12617 // BackupManagementType - Backup management type to execute the current job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 12618 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 12619 // Operation - The operation name. 12620 Operation *string `json:"operation,omitempty"` 12621 // Status - Job status. 12622 Status *string `json:"status,omitempty"` 12623 // StartTime - The start time. 12624 StartTime *date.Time `json:"startTime,omitempty"` 12625 // EndTime - The end time. 12626 EndTime *date.Time `json:"endTime,omitempty"` 12627 // ActivityID - ActivityId of job. 12628 ActivityID *string `json:"activityId,omitempty"` 12629 // JobType - Possible values include: 'JobTypeJob', 'JobTypeAzureIaaSVMJob', 'JobTypeAzureStorageJob', 'JobTypeAzureWorkloadJob', 'JobTypeDpmJob', 'JobTypeMabJob' 12630 JobType JobType `json:"jobType,omitempty"` 12631} 12632 12633func unmarshalBasicJob(body []byte) (BasicJob, error) { 12634 var m map[string]interface{} 12635 err := json.Unmarshal(body, &m) 12636 if err != nil { 12637 return nil, err 12638 } 12639 12640 switch m["jobType"] { 12641 case string(JobTypeAzureIaaSVMJob): 12642 var aisj AzureIaaSVMJob 12643 err := json.Unmarshal(body, &aisj) 12644 return aisj, err 12645 case string(JobTypeAzureStorageJob): 12646 var asj AzureStorageJob 12647 err := json.Unmarshal(body, &asj) 12648 return asj, err 12649 case string(JobTypeAzureWorkloadJob): 12650 var awj AzureWorkloadJob 12651 err := json.Unmarshal(body, &awj) 12652 return awj, err 12653 case string(JobTypeDpmJob): 12654 var dj DpmJob 12655 err := json.Unmarshal(body, &dj) 12656 return dj, err 12657 case string(JobTypeMabJob): 12658 var mj MabJob 12659 err := json.Unmarshal(body, &mj) 12660 return mj, err 12661 default: 12662 var j Job 12663 err := json.Unmarshal(body, &j) 12664 return j, err 12665 } 12666} 12667func unmarshalBasicJobArray(body []byte) ([]BasicJob, error) { 12668 var rawMessages []*json.RawMessage 12669 err := json.Unmarshal(body, &rawMessages) 12670 if err != nil { 12671 return nil, err 12672 } 12673 12674 jArray := make([]BasicJob, len(rawMessages)) 12675 12676 for index, rawMessage := range rawMessages { 12677 j, err := unmarshalBasicJob(*rawMessage) 12678 if err != nil { 12679 return nil, err 12680 } 12681 jArray[index] = j 12682 } 12683 return jArray, nil 12684} 12685 12686// MarshalJSON is the custom marshaler for Job. 12687func (j Job) MarshalJSON() ([]byte, error) { 12688 j.JobType = JobTypeJob 12689 objectMap := make(map[string]interface{}) 12690 if j.EntityFriendlyName != nil { 12691 objectMap["entityFriendlyName"] = j.EntityFriendlyName 12692 } 12693 if j.BackupManagementType != "" { 12694 objectMap["backupManagementType"] = j.BackupManagementType 12695 } 12696 if j.Operation != nil { 12697 objectMap["operation"] = j.Operation 12698 } 12699 if j.Status != nil { 12700 objectMap["status"] = j.Status 12701 } 12702 if j.StartTime != nil { 12703 objectMap["startTime"] = j.StartTime 12704 } 12705 if j.EndTime != nil { 12706 objectMap["endTime"] = j.EndTime 12707 } 12708 if j.ActivityID != nil { 12709 objectMap["activityId"] = j.ActivityID 12710 } 12711 if j.JobType != "" { 12712 objectMap["jobType"] = j.JobType 12713 } 12714 return json.Marshal(objectMap) 12715} 12716 12717// AsAzureIaaSVMJob is the BasicJob implementation for Job. 12718func (j Job) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) { 12719 return nil, false 12720} 12721 12722// AsAzureStorageJob is the BasicJob implementation for Job. 12723func (j Job) AsAzureStorageJob() (*AzureStorageJob, bool) { 12724 return nil, false 12725} 12726 12727// AsAzureWorkloadJob is the BasicJob implementation for Job. 12728func (j Job) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) { 12729 return nil, false 12730} 12731 12732// AsDpmJob is the BasicJob implementation for Job. 12733func (j Job) AsDpmJob() (*DpmJob, bool) { 12734 return nil, false 12735} 12736 12737// AsMabJob is the BasicJob implementation for Job. 12738func (j Job) AsMabJob() (*MabJob, bool) { 12739 return nil, false 12740} 12741 12742// AsJob is the BasicJob implementation for Job. 12743func (j Job) AsJob() (*Job, bool) { 12744 return &j, true 12745} 12746 12747// AsBasicJob is the BasicJob implementation for Job. 12748func (j Job) AsBasicJob() (BasicJob, bool) { 12749 return &j, true 12750} 12751 12752// JobQueryObject filters to list the jobs. 12753type JobQueryObject struct { 12754 // Status - Status of the job. Possible values include: 'JobStatusInvalid', 'JobStatusInProgress', 'JobStatusCompleted', 'JobStatusFailed', 'JobStatusCompletedWithWarnings', 'JobStatusCancelled', 'JobStatusCancelling' 12755 Status JobStatus `json:"status,omitempty"` 12756 // BackupManagementType - Type of backup management for the job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 12757 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 12758 // Operation - Type of operation. Possible values include: 'JobOperationTypeInvalid', 'JobOperationTypeRegister', 'JobOperationTypeUnRegister', 'JobOperationTypeConfigureBackup', 'JobOperationTypeBackup', 'JobOperationTypeRestore', 'JobOperationTypeDisableBackup', 'JobOperationTypeDeleteBackupData', 'JobOperationTypeCrossRegionRestore', 'JobOperationTypeUndelete' 12759 Operation JobOperationType `json:"operation,omitempty"` 12760 // JobID - JobID represents the job uniquely. 12761 JobID *string `json:"jobId,omitempty"` 12762 // StartTime - Job has started at this time. Value is in UTC. 12763 StartTime *date.Time `json:"startTime,omitempty"` 12764 // EndTime - Job has ended at this time. Value is in UTC. 12765 EndTime *date.Time `json:"endTime,omitempty"` 12766} 12767 12768// JobResource defines workload agnostic properties for a job. 12769type JobResource struct { 12770 autorest.Response `json:"-"` 12771 // Properties - JobResource properties 12772 Properties BasicJob `json:"properties,omitempty"` 12773 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 12774 ID *string `json:"id,omitempty"` 12775 // Name - READ-ONLY; Resource name associated with the resource. 12776 Name *string `json:"name,omitempty"` 12777 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 12778 Type *string `json:"type,omitempty"` 12779 // Location - Resource location. 12780 Location *string `json:"location,omitempty"` 12781 // Tags - Resource tags. 12782 Tags map[string]*string `json:"tags"` 12783 // ETag - Optional ETag. 12784 ETag *string `json:"eTag,omitempty"` 12785} 12786 12787// MarshalJSON is the custom marshaler for JobResource. 12788func (jr JobResource) MarshalJSON() ([]byte, error) { 12789 objectMap := make(map[string]interface{}) 12790 objectMap["properties"] = jr.Properties 12791 if jr.Location != nil { 12792 objectMap["location"] = jr.Location 12793 } 12794 if jr.Tags != nil { 12795 objectMap["tags"] = jr.Tags 12796 } 12797 if jr.ETag != nil { 12798 objectMap["eTag"] = jr.ETag 12799 } 12800 return json.Marshal(objectMap) 12801} 12802 12803// UnmarshalJSON is the custom unmarshaler for JobResource struct. 12804func (jr *JobResource) UnmarshalJSON(body []byte) error { 12805 var m map[string]*json.RawMessage 12806 err := json.Unmarshal(body, &m) 12807 if err != nil { 12808 return err 12809 } 12810 for k, v := range m { 12811 switch k { 12812 case "properties": 12813 if v != nil { 12814 properties, err := unmarshalBasicJob(*v) 12815 if err != nil { 12816 return err 12817 } 12818 jr.Properties = properties 12819 } 12820 case "id": 12821 if v != nil { 12822 var ID string 12823 err = json.Unmarshal(*v, &ID) 12824 if err != nil { 12825 return err 12826 } 12827 jr.ID = &ID 12828 } 12829 case "name": 12830 if v != nil { 12831 var name string 12832 err = json.Unmarshal(*v, &name) 12833 if err != nil { 12834 return err 12835 } 12836 jr.Name = &name 12837 } 12838 case "type": 12839 if v != nil { 12840 var typeVar string 12841 err = json.Unmarshal(*v, &typeVar) 12842 if err != nil { 12843 return err 12844 } 12845 jr.Type = &typeVar 12846 } 12847 case "location": 12848 if v != nil { 12849 var location string 12850 err = json.Unmarshal(*v, &location) 12851 if err != nil { 12852 return err 12853 } 12854 jr.Location = &location 12855 } 12856 case "tags": 12857 if v != nil { 12858 var tags map[string]*string 12859 err = json.Unmarshal(*v, &tags) 12860 if err != nil { 12861 return err 12862 } 12863 jr.Tags = tags 12864 } 12865 case "eTag": 12866 if v != nil { 12867 var eTag string 12868 err = json.Unmarshal(*v, &eTag) 12869 if err != nil { 12870 return err 12871 } 12872 jr.ETag = &eTag 12873 } 12874 } 12875 } 12876 12877 return nil 12878} 12879 12880// JobResourceList list of Job resources 12881type JobResourceList struct { 12882 autorest.Response `json:"-"` 12883 // Value - List of resources. 12884 Value *[]JobResource `json:"value,omitempty"` 12885 // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. 12886 NextLink *string `json:"nextLink,omitempty"` 12887} 12888 12889// JobResourceListIterator provides access to a complete listing of JobResource values. 12890type JobResourceListIterator struct { 12891 i int 12892 page JobResourceListPage 12893} 12894 12895// NextWithContext advances to the next value. If there was an error making 12896// the request the iterator does not advance and the error is returned. 12897func (iter *JobResourceListIterator) NextWithContext(ctx context.Context) (err error) { 12898 if tracing.IsEnabled() { 12899 ctx = tracing.StartSpan(ctx, fqdn+"/JobResourceListIterator.NextWithContext") 12900 defer func() { 12901 sc := -1 12902 if iter.Response().Response.Response != nil { 12903 sc = iter.Response().Response.Response.StatusCode 12904 } 12905 tracing.EndSpan(ctx, sc, err) 12906 }() 12907 } 12908 iter.i++ 12909 if iter.i < len(iter.page.Values()) { 12910 return nil 12911 } 12912 err = iter.page.NextWithContext(ctx) 12913 if err != nil { 12914 iter.i-- 12915 return err 12916 } 12917 iter.i = 0 12918 return nil 12919} 12920 12921// Next advances to the next value. If there was an error making 12922// the request the iterator does not advance and the error is returned. 12923// Deprecated: Use NextWithContext() instead. 12924func (iter *JobResourceListIterator) Next() error { 12925 return iter.NextWithContext(context.Background()) 12926} 12927 12928// NotDone returns true if the enumeration should be started or is not yet complete. 12929func (iter JobResourceListIterator) NotDone() bool { 12930 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 12931} 12932 12933// Response returns the raw server response from the last page request. 12934func (iter JobResourceListIterator) Response() JobResourceList { 12935 return iter.page.Response() 12936} 12937 12938// Value returns the current value or a zero-initialized value if the 12939// iterator has advanced beyond the end of the collection. 12940func (iter JobResourceListIterator) Value() JobResource { 12941 if !iter.page.NotDone() { 12942 return JobResource{} 12943 } 12944 return iter.page.Values()[iter.i] 12945} 12946 12947// Creates a new instance of the JobResourceListIterator type. 12948func NewJobResourceListIterator(page JobResourceListPage) JobResourceListIterator { 12949 return JobResourceListIterator{page: page} 12950} 12951 12952// IsEmpty returns true if the ListResult contains no values. 12953func (jrl JobResourceList) IsEmpty() bool { 12954 return jrl.Value == nil || len(*jrl.Value) == 0 12955} 12956 12957// hasNextLink returns true if the NextLink is not empty. 12958func (jrl JobResourceList) hasNextLink() bool { 12959 return jrl.NextLink != nil && len(*jrl.NextLink) != 0 12960} 12961 12962// jobResourceListPreparer prepares a request to retrieve the next set of results. 12963// It returns nil if no more results exist. 12964func (jrl JobResourceList) jobResourceListPreparer(ctx context.Context) (*http.Request, error) { 12965 if !jrl.hasNextLink() { 12966 return nil, nil 12967 } 12968 return autorest.Prepare((&http.Request{}).WithContext(ctx), 12969 autorest.AsJSON(), 12970 autorest.AsGet(), 12971 autorest.WithBaseURL(to.String(jrl.NextLink))) 12972} 12973 12974// JobResourceListPage contains a page of JobResource values. 12975type JobResourceListPage struct { 12976 fn func(context.Context, JobResourceList) (JobResourceList, error) 12977 jrl JobResourceList 12978} 12979 12980// NextWithContext advances to the next page of values. If there was an error making 12981// the request the page does not advance and the error is returned. 12982func (page *JobResourceListPage) NextWithContext(ctx context.Context) (err error) { 12983 if tracing.IsEnabled() { 12984 ctx = tracing.StartSpan(ctx, fqdn+"/JobResourceListPage.NextWithContext") 12985 defer func() { 12986 sc := -1 12987 if page.Response().Response.Response != nil { 12988 sc = page.Response().Response.Response.StatusCode 12989 } 12990 tracing.EndSpan(ctx, sc, err) 12991 }() 12992 } 12993 for { 12994 next, err := page.fn(ctx, page.jrl) 12995 if err != nil { 12996 return err 12997 } 12998 page.jrl = next 12999 if !next.hasNextLink() || !next.IsEmpty() { 13000 break 13001 } 13002 } 13003 return nil 13004} 13005 13006// Next advances to the next page of values. If there was an error making 13007// the request the page does not advance and the error is returned. 13008// Deprecated: Use NextWithContext() instead. 13009func (page *JobResourceListPage) Next() error { 13010 return page.NextWithContext(context.Background()) 13011} 13012 13013// NotDone returns true if the page enumeration should be started or is not yet complete. 13014func (page JobResourceListPage) NotDone() bool { 13015 return !page.jrl.IsEmpty() 13016} 13017 13018// Response returns the raw server response from the last page request. 13019func (page JobResourceListPage) Response() JobResourceList { 13020 return page.jrl 13021} 13022 13023// Values returns the slice of values for the current page or nil if there are no values. 13024func (page JobResourceListPage) Values() []JobResource { 13025 if page.jrl.IsEmpty() { 13026 return nil 13027 } 13028 return *page.jrl.Value 13029} 13030 13031// Creates a new instance of the JobResourceListPage type. 13032func NewJobResourceListPage(cur JobResourceList, getNextPage func(context.Context, JobResourceList) (JobResourceList, error)) JobResourceListPage { 13033 return JobResourceListPage{ 13034 fn: getNextPage, 13035 jrl: cur, 13036 } 13037} 13038 13039// KEKDetails KEK is encryption key for BEK. 13040type KEKDetails struct { 13041 // KeyURL - Key is KEK. 13042 KeyURL *string `json:"keyUrl,omitempty"` 13043 // KeyVaultID - Key Vault ID where this Key is stored. 13044 KeyVaultID *string `json:"keyVaultId,omitempty"` 13045 // KeyBackupData - KEK data. 13046 KeyBackupData *string `json:"keyBackupData,omitempty"` 13047} 13048 13049// KeyAndSecretDetails BEK is bitlocker key. 13050// KEK is encryption key for BEK 13051// If the VM was encrypted then we will store following details : 13052// 1. Secret(BEK) - Url + Backup Data + vaultId. 13053// 2. Key(KEK) - Url + Backup Data + vaultId. 13054// 3. EncryptionMechanism 13055// BEK and KEK can potentially have different vault ids. 13056type KeyAndSecretDetails struct { 13057 // KekDetails - KEK is encryption key for BEK. 13058 KekDetails *KEKDetails `json:"kekDetails,omitempty"` 13059 // BekDetails - BEK is bitlocker encryption key. 13060 BekDetails *BEKDetails `json:"bekDetails,omitempty"` 13061 // EncryptionMechanism - Encryption mechanism: None/ SinglePass/ DoublePass 13062 EncryptionMechanism *string `json:"encryptionMechanism,omitempty"` 13063} 13064 13065// KPIResourceHealthDetails KPI Resource Health Details 13066type KPIResourceHealthDetails struct { 13067 // ResourceHealthStatus - Resource Health Status. Possible values include: 'ResourceHealthStatusHealthy', 'ResourceHealthStatusTransientDegraded', 'ResourceHealthStatusPersistentDegraded', 'ResourceHealthStatusTransientUnhealthy', 'ResourceHealthStatusPersistentUnhealthy', 'ResourceHealthStatusInvalid' 13068 ResourceHealthStatus ResourceHealthStatus `json:"resourceHealthStatus,omitempty"` 13069 // ResourceHealthDetails - Resource Health Status 13070 ResourceHealthDetails *[]ResourceHealthDetails `json:"resourceHealthDetails,omitempty"` 13071} 13072 13073// LogSchedulePolicy log policy schedule. 13074type LogSchedulePolicy struct { 13075 // ScheduleFrequencyInMins - Frequency of the log schedule operation of this policy in minutes. 13076 ScheduleFrequencyInMins *int32 `json:"scheduleFrequencyInMins,omitempty"` 13077 // SchedulePolicyType - Possible values include: 'SchedulePolicyTypeSchedulePolicy', 'SchedulePolicyTypeLogSchedulePolicy', 'SchedulePolicyTypeLongTermSchedulePolicy', 'SchedulePolicyTypeSimpleSchedulePolicy' 13078 SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"` 13079} 13080 13081// MarshalJSON is the custom marshaler for LogSchedulePolicy. 13082func (lsp LogSchedulePolicy) MarshalJSON() ([]byte, error) { 13083 lsp.SchedulePolicyType = SchedulePolicyTypeLogSchedulePolicy 13084 objectMap := make(map[string]interface{}) 13085 if lsp.ScheduleFrequencyInMins != nil { 13086 objectMap["scheduleFrequencyInMins"] = lsp.ScheduleFrequencyInMins 13087 } 13088 if lsp.SchedulePolicyType != "" { 13089 objectMap["schedulePolicyType"] = lsp.SchedulePolicyType 13090 } 13091 return json.Marshal(objectMap) 13092} 13093 13094// AsLogSchedulePolicy is the BasicSchedulePolicy implementation for LogSchedulePolicy. 13095func (lsp LogSchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) { 13096 return &lsp, true 13097} 13098 13099// AsLongTermSchedulePolicy is the BasicSchedulePolicy implementation for LogSchedulePolicy. 13100func (lsp LogSchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) { 13101 return nil, false 13102} 13103 13104// AsSimpleSchedulePolicy is the BasicSchedulePolicy implementation for LogSchedulePolicy. 13105func (lsp LogSchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) { 13106 return nil, false 13107} 13108 13109// AsSchedulePolicy is the BasicSchedulePolicy implementation for LogSchedulePolicy. 13110func (lsp LogSchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) { 13111 return nil, false 13112} 13113 13114// AsBasicSchedulePolicy is the BasicSchedulePolicy implementation for LogSchedulePolicy. 13115func (lsp LogSchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) { 13116 return &lsp, true 13117} 13118 13119// LongTermRetentionPolicy long term retention policy. 13120type LongTermRetentionPolicy struct { 13121 // DailySchedule - Daily retention schedule of the protection policy. 13122 DailySchedule *DailyRetentionSchedule `json:"dailySchedule,omitempty"` 13123 // WeeklySchedule - Weekly retention schedule of the protection policy. 13124 WeeklySchedule *WeeklyRetentionSchedule `json:"weeklySchedule,omitempty"` 13125 // MonthlySchedule - Monthly retention schedule of the protection policy. 13126 MonthlySchedule *MonthlyRetentionSchedule `json:"monthlySchedule,omitempty"` 13127 // YearlySchedule - Yearly retention schedule of the protection policy. 13128 YearlySchedule *YearlyRetentionSchedule `json:"yearlySchedule,omitempty"` 13129 // RetentionPolicyType - Possible values include: 'RetentionPolicyTypeRetentionPolicy', 'RetentionPolicyTypeLongTermRetentionPolicy', 'RetentionPolicyTypeSimpleRetentionPolicy' 13130 RetentionPolicyType RetentionPolicyType `json:"retentionPolicyType,omitempty"` 13131} 13132 13133// MarshalJSON is the custom marshaler for LongTermRetentionPolicy. 13134func (ltrp LongTermRetentionPolicy) MarshalJSON() ([]byte, error) { 13135 ltrp.RetentionPolicyType = RetentionPolicyTypeLongTermRetentionPolicy 13136 objectMap := make(map[string]interface{}) 13137 if ltrp.DailySchedule != nil { 13138 objectMap["dailySchedule"] = ltrp.DailySchedule 13139 } 13140 if ltrp.WeeklySchedule != nil { 13141 objectMap["weeklySchedule"] = ltrp.WeeklySchedule 13142 } 13143 if ltrp.MonthlySchedule != nil { 13144 objectMap["monthlySchedule"] = ltrp.MonthlySchedule 13145 } 13146 if ltrp.YearlySchedule != nil { 13147 objectMap["yearlySchedule"] = ltrp.YearlySchedule 13148 } 13149 if ltrp.RetentionPolicyType != "" { 13150 objectMap["retentionPolicyType"] = ltrp.RetentionPolicyType 13151 } 13152 return json.Marshal(objectMap) 13153} 13154 13155// AsLongTermRetentionPolicy is the BasicRetentionPolicy implementation for LongTermRetentionPolicy. 13156func (ltrp LongTermRetentionPolicy) AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) { 13157 return <rp, true 13158} 13159 13160// AsSimpleRetentionPolicy is the BasicRetentionPolicy implementation for LongTermRetentionPolicy. 13161func (ltrp LongTermRetentionPolicy) AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) { 13162 return nil, false 13163} 13164 13165// AsRetentionPolicy is the BasicRetentionPolicy implementation for LongTermRetentionPolicy. 13166func (ltrp LongTermRetentionPolicy) AsRetentionPolicy() (*RetentionPolicy, bool) { 13167 return nil, false 13168} 13169 13170// AsBasicRetentionPolicy is the BasicRetentionPolicy implementation for LongTermRetentionPolicy. 13171func (ltrp LongTermRetentionPolicy) AsBasicRetentionPolicy() (BasicRetentionPolicy, bool) { 13172 return <rp, true 13173} 13174 13175// LongTermSchedulePolicy long term policy schedule. 13176type LongTermSchedulePolicy struct { 13177 // SchedulePolicyType - Possible values include: 'SchedulePolicyTypeSchedulePolicy', 'SchedulePolicyTypeLogSchedulePolicy', 'SchedulePolicyTypeLongTermSchedulePolicy', 'SchedulePolicyTypeSimpleSchedulePolicy' 13178 SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"` 13179} 13180 13181// MarshalJSON is the custom marshaler for LongTermSchedulePolicy. 13182func (ltsp LongTermSchedulePolicy) MarshalJSON() ([]byte, error) { 13183 ltsp.SchedulePolicyType = SchedulePolicyTypeLongTermSchedulePolicy 13184 objectMap := make(map[string]interface{}) 13185 if ltsp.SchedulePolicyType != "" { 13186 objectMap["schedulePolicyType"] = ltsp.SchedulePolicyType 13187 } 13188 return json.Marshal(objectMap) 13189} 13190 13191// AsLogSchedulePolicy is the BasicSchedulePolicy implementation for LongTermSchedulePolicy. 13192func (ltsp LongTermSchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) { 13193 return nil, false 13194} 13195 13196// AsLongTermSchedulePolicy is the BasicSchedulePolicy implementation for LongTermSchedulePolicy. 13197func (ltsp LongTermSchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) { 13198 return <sp, true 13199} 13200 13201// AsSimpleSchedulePolicy is the BasicSchedulePolicy implementation for LongTermSchedulePolicy. 13202func (ltsp LongTermSchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) { 13203 return nil, false 13204} 13205 13206// AsSchedulePolicy is the BasicSchedulePolicy implementation for LongTermSchedulePolicy. 13207func (ltsp LongTermSchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) { 13208 return nil, false 13209} 13210 13211// AsBasicSchedulePolicy is the BasicSchedulePolicy implementation for LongTermSchedulePolicy. 13212func (ltsp LongTermSchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) { 13213 return <sp, true 13214} 13215 13216// MabContainer container with items backed up using MAB backup engine. 13217type MabContainer struct { 13218 // CanReRegister - Can the container be registered one more time. 13219 CanReRegister *bool `json:"canReRegister,omitempty"` 13220 // ContainerID - ContainerID represents the container. 13221 ContainerID *int64 `json:"containerId,omitempty"` 13222 // ProtectedItemCount - Number of items backed up in this container. 13223 ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` 13224 // AgentVersion - Agent version of this container. 13225 AgentVersion *string `json:"agentVersion,omitempty"` 13226 // ExtendedInfo - Additional information for this container 13227 ExtendedInfo *MabContainerExtendedInfo `json:"extendedInfo,omitempty"` 13228 // MabContainerHealthDetails - Health details on this mab container. 13229 MabContainerHealthDetails *[]MABContainerHealthDetails `json:"mabContainerHealthDetails,omitempty"` 13230 // ContainerHealthState - Health state of mab container. 13231 ContainerHealthState *string `json:"containerHealthState,omitempty"` 13232 // FriendlyName - Friendly name of the container. 13233 FriendlyName *string `json:"friendlyName,omitempty"` 13234 // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 13235 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 13236 // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. 13237 RegistrationStatus *string `json:"registrationStatus,omitempty"` 13238 // HealthStatus - Status of health of the container. 13239 HealthStatus *string `json:"healthStatus,omitempty"` 13240 // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' 13241 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` 13242} 13243 13244// MarshalJSON is the custom marshaler for MabContainer. 13245func (mc MabContainer) MarshalJSON() ([]byte, error) { 13246 mc.ContainerType = ContainerTypeWindows1 13247 objectMap := make(map[string]interface{}) 13248 if mc.CanReRegister != nil { 13249 objectMap["canReRegister"] = mc.CanReRegister 13250 } 13251 if mc.ContainerID != nil { 13252 objectMap["containerId"] = mc.ContainerID 13253 } 13254 if mc.ProtectedItemCount != nil { 13255 objectMap["protectedItemCount"] = mc.ProtectedItemCount 13256 } 13257 if mc.AgentVersion != nil { 13258 objectMap["agentVersion"] = mc.AgentVersion 13259 } 13260 if mc.ExtendedInfo != nil { 13261 objectMap["extendedInfo"] = mc.ExtendedInfo 13262 } 13263 if mc.MabContainerHealthDetails != nil { 13264 objectMap["mabContainerHealthDetails"] = mc.MabContainerHealthDetails 13265 } 13266 if mc.ContainerHealthState != nil { 13267 objectMap["containerHealthState"] = mc.ContainerHealthState 13268 } 13269 if mc.FriendlyName != nil { 13270 objectMap["friendlyName"] = mc.FriendlyName 13271 } 13272 if mc.BackupManagementType != "" { 13273 objectMap["backupManagementType"] = mc.BackupManagementType 13274 } 13275 if mc.RegistrationStatus != nil { 13276 objectMap["registrationStatus"] = mc.RegistrationStatus 13277 } 13278 if mc.HealthStatus != nil { 13279 objectMap["healthStatus"] = mc.HealthStatus 13280 } 13281 if mc.ContainerType != "" { 13282 objectMap["containerType"] = mc.ContainerType 13283 } 13284 return json.Marshal(objectMap) 13285} 13286 13287// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for MabContainer. 13288func (mc MabContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { 13289 return nil, false 13290} 13291 13292// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for MabContainer. 13293func (mc MabContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { 13294 return nil, false 13295} 13296 13297// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for MabContainer. 13298func (mc MabContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { 13299 return nil, false 13300} 13301 13302// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for MabContainer. 13303func (mc MabContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { 13304 return nil, false 13305} 13306 13307// AsAzureSQLContainer is the BasicProtectionContainer implementation for MabContainer. 13308func (mc MabContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { 13309 return nil, false 13310} 13311 13312// AsAzureStorageContainer is the BasicProtectionContainer implementation for MabContainer. 13313func (mc MabContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { 13314 return nil, false 13315} 13316 13317// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for MabContainer. 13318func (mc MabContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { 13319 return nil, false 13320} 13321 13322// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for MabContainer. 13323func (mc MabContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { 13324 return nil, false 13325} 13326 13327// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for MabContainer. 13328func (mc MabContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { 13329 return nil, false 13330} 13331 13332// AsDpmContainer is the BasicProtectionContainer implementation for MabContainer. 13333func (mc MabContainer) AsDpmContainer() (*DpmContainer, bool) { 13334 return nil, false 13335} 13336 13337// AsBasicDpmContainer is the BasicProtectionContainer implementation for MabContainer. 13338func (mc MabContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { 13339 return nil, false 13340} 13341 13342// AsGenericContainer is the BasicProtectionContainer implementation for MabContainer. 13343func (mc MabContainer) AsGenericContainer() (*GenericContainer, bool) { 13344 return nil, false 13345} 13346 13347// AsIaaSVMContainer is the BasicProtectionContainer implementation for MabContainer. 13348func (mc MabContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { 13349 return nil, false 13350} 13351 13352// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for MabContainer. 13353func (mc MabContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { 13354 return nil, false 13355} 13356 13357// AsMabContainer is the BasicProtectionContainer implementation for MabContainer. 13358func (mc MabContainer) AsMabContainer() (*MabContainer, bool) { 13359 return &mc, true 13360} 13361 13362// AsProtectionContainer is the BasicProtectionContainer implementation for MabContainer. 13363func (mc MabContainer) AsProtectionContainer() (*ProtectionContainer, bool) { 13364 return nil, false 13365} 13366 13367// AsBasicProtectionContainer is the BasicProtectionContainer implementation for MabContainer. 13368func (mc MabContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { 13369 return &mc, true 13370} 13371 13372// MabContainerExtendedInfo additional information of the container. 13373type MabContainerExtendedInfo struct { 13374 // LastRefreshedAt - Time stamp when this container was refreshed. 13375 LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"` 13376 // 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' 13377 BackupItemType ItemType `json:"backupItemType,omitempty"` 13378 // BackupItems - List of backup items associated with this container. 13379 BackupItems *[]string `json:"backupItems,omitempty"` 13380 // PolicyName - Backup policy associated with this container. 13381 PolicyName *string `json:"policyName,omitempty"` 13382 // LastBackupStatus - Latest backup status of this container. 13383 LastBackupStatus *string `json:"lastBackupStatus,omitempty"` 13384} 13385 13386// MABContainerHealthDetails MAB workload-specific Health Details. 13387type MABContainerHealthDetails struct { 13388 // Code - Health Code 13389 Code *int32 `json:"code,omitempty"` 13390 // Title - Health Title 13391 Title *string `json:"title,omitempty"` 13392 // Message - Health Message 13393 Message *string `json:"message,omitempty"` 13394 // Recommendations - Health Recommended Actions 13395 Recommendations *[]string `json:"recommendations,omitempty"` 13396} 13397 13398// MabErrorInfo MAB workload-specific error information. 13399type MabErrorInfo struct { 13400 // ErrorString - READ-ONLY; Localized error string. 13401 ErrorString *string `json:"errorString,omitempty"` 13402 // Recommendations - READ-ONLY; List of localized recommendations. 13403 Recommendations *[]string `json:"recommendations,omitempty"` 13404} 13405 13406// MabFileFolderProtectedItem MAB workload-specific backup item. 13407type MabFileFolderProtectedItem struct { 13408 // FriendlyName - Friendly name of this backup item. 13409 FriendlyName *string `json:"friendlyName,omitempty"` 13410 // ComputerName - Name of the computer associated with this backup item. 13411 ComputerName *string `json:"computerName,omitempty"` 13412 // LastBackupStatus - Status of last backup operation. 13413 LastBackupStatus *string `json:"lastBackupStatus,omitempty"` 13414 // LastBackupTime - Timestamp of the last backup operation on this backup item. 13415 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` 13416 // ProtectionState - Protected, ProtectionStopped, IRPending or ProtectionError 13417 ProtectionState *string `json:"protectionState,omitempty"` 13418 // DeferredDeleteSyncTimeInUTC - Sync time for deferred deletion in UTC 13419 DeferredDeleteSyncTimeInUTC *int64 `json:"deferredDeleteSyncTimeInUTC,omitempty"` 13420 // ExtendedInfo - Additional information with this backup item. 13421 ExtendedInfo *MabFileFolderProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` 13422 // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 13423 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 13424 // 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' 13425 WorkloadType DataSourceType `json:"workloadType,omitempty"` 13426 // ContainerName - Unique name of container 13427 ContainerName *string `json:"containerName,omitempty"` 13428 // SourceResourceID - ARM ID of the resource to be backed up. 13429 SourceResourceID *string `json:"sourceResourceId,omitempty"` 13430 // PolicyID - ID of the backup policy with which this item is backed up. 13431 PolicyID *string `json:"policyId,omitempty"` 13432 // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. 13433 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` 13434 // BackupSetName - Name of the backup set the backup item belongs to 13435 BackupSetName *string `json:"backupSetName,omitempty"` 13436 // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' 13437 CreateMode CreateMode `json:"createMode,omitempty"` 13438 // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC 13439 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` 13440 // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete 13441 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` 13442 // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted 13443 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` 13444 // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon 13445 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` 13446 // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state 13447 IsRehydrate *bool `json:"isRehydrate,omitempty"` 13448 // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' 13449 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` 13450} 13451 13452// MarshalJSON is the custom marshaler for MabFileFolderProtectedItem. 13453func (mffpi MabFileFolderProtectedItem) MarshalJSON() ([]byte, error) { 13454 mffpi.ProtectedItemType = ProtectedItemTypeMabFileFolderProtectedItem 13455 objectMap := make(map[string]interface{}) 13456 if mffpi.FriendlyName != nil { 13457 objectMap["friendlyName"] = mffpi.FriendlyName 13458 } 13459 if mffpi.ComputerName != nil { 13460 objectMap["computerName"] = mffpi.ComputerName 13461 } 13462 if mffpi.LastBackupStatus != nil { 13463 objectMap["lastBackupStatus"] = mffpi.LastBackupStatus 13464 } 13465 if mffpi.LastBackupTime != nil { 13466 objectMap["lastBackupTime"] = mffpi.LastBackupTime 13467 } 13468 if mffpi.ProtectionState != nil { 13469 objectMap["protectionState"] = mffpi.ProtectionState 13470 } 13471 if mffpi.DeferredDeleteSyncTimeInUTC != nil { 13472 objectMap["deferredDeleteSyncTimeInUTC"] = mffpi.DeferredDeleteSyncTimeInUTC 13473 } 13474 if mffpi.ExtendedInfo != nil { 13475 objectMap["extendedInfo"] = mffpi.ExtendedInfo 13476 } 13477 if mffpi.BackupManagementType != "" { 13478 objectMap["backupManagementType"] = mffpi.BackupManagementType 13479 } 13480 if mffpi.WorkloadType != "" { 13481 objectMap["workloadType"] = mffpi.WorkloadType 13482 } 13483 if mffpi.ContainerName != nil { 13484 objectMap["containerName"] = mffpi.ContainerName 13485 } 13486 if mffpi.SourceResourceID != nil { 13487 objectMap["sourceResourceId"] = mffpi.SourceResourceID 13488 } 13489 if mffpi.PolicyID != nil { 13490 objectMap["policyId"] = mffpi.PolicyID 13491 } 13492 if mffpi.LastRecoveryPoint != nil { 13493 objectMap["lastRecoveryPoint"] = mffpi.LastRecoveryPoint 13494 } 13495 if mffpi.BackupSetName != nil { 13496 objectMap["backupSetName"] = mffpi.BackupSetName 13497 } 13498 if mffpi.CreateMode != "" { 13499 objectMap["createMode"] = mffpi.CreateMode 13500 } 13501 if mffpi.DeferredDeleteTimeInUTC != nil { 13502 objectMap["deferredDeleteTimeInUTC"] = mffpi.DeferredDeleteTimeInUTC 13503 } 13504 if mffpi.IsScheduledForDeferredDelete != nil { 13505 objectMap["isScheduledForDeferredDelete"] = mffpi.IsScheduledForDeferredDelete 13506 } 13507 if mffpi.DeferredDeleteTimeRemaining != nil { 13508 objectMap["deferredDeleteTimeRemaining"] = mffpi.DeferredDeleteTimeRemaining 13509 } 13510 if mffpi.IsDeferredDeleteScheduleUpcoming != nil { 13511 objectMap["isDeferredDeleteScheduleUpcoming"] = mffpi.IsDeferredDeleteScheduleUpcoming 13512 } 13513 if mffpi.IsRehydrate != nil { 13514 objectMap["isRehydrate"] = mffpi.IsRehydrate 13515 } 13516 if mffpi.ProtectedItemType != "" { 13517 objectMap["protectedItemType"] = mffpi.ProtectedItemType 13518 } 13519 return json.Marshal(objectMap) 13520} 13521 13522// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13523func (mffpi MabFileFolderProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { 13524 return nil, false 13525} 13526 13527// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13528func (mffpi MabFileFolderProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { 13529 return nil, false 13530} 13531 13532// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13533func (mffpi MabFileFolderProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { 13534 return nil, false 13535} 13536 13537// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13538func (mffpi MabFileFolderProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { 13539 return nil, false 13540} 13541 13542// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13543func (mffpi MabFileFolderProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { 13544 return nil, false 13545} 13546 13547// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13548func (mffpi MabFileFolderProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { 13549 return nil, false 13550} 13551 13552// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13553func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { 13554 return nil, false 13555} 13556 13557// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13558func (mffpi MabFileFolderProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { 13559 return nil, false 13560} 13561 13562// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13563func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { 13564 return nil, false 13565} 13566 13567// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13568func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { 13569 return nil, false 13570} 13571 13572// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13573func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { 13574 return nil, false 13575} 13576 13577// AsDPMProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13578func (mffpi MabFileFolderProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { 13579 return nil, false 13580} 13581 13582// AsGenericProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13583func (mffpi MabFileFolderProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { 13584 return nil, false 13585} 13586 13587// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13588func (mffpi MabFileFolderProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { 13589 return &mffpi, true 13590} 13591 13592// AsProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13593func (mffpi MabFileFolderProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { 13594 return nil, false 13595} 13596 13597// AsBasicProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. 13598func (mffpi MabFileFolderProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { 13599 return &mffpi, true 13600} 13601 13602// MabFileFolderProtectedItemExtendedInfo additional information on the backed up item. 13603type MabFileFolderProtectedItemExtendedInfo struct { 13604 // LastRefreshedAt - Last time when the agent data synced to service. 13605 LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"` 13606 // OldestRecoveryPoint - The oldest backup copy available. 13607 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"` 13608 // RecoveryPointCount - Number of backup copies associated with the backup item. 13609 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"` 13610} 13611 13612// MabJob MAB workload-specific job. 13613type MabJob struct { 13614 // Duration - Time taken by job to run. 13615 Duration *string `json:"duration,omitempty"` 13616 // ActionsInfo - The state/actions applicable on jobs like cancel/retry. 13617 ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"` 13618 // MabServerName - Name of server protecting the DS. 13619 MabServerName *string `json:"mabServerName,omitempty"` 13620 // MabServerType - Server type of MAB container. Possible values include: 'MabServerTypeInvalid', 'MabServerTypeUnknown', 'MabServerTypeIaasVMContainer', 'MabServerTypeIaasVMServiceContainer', 'MabServerTypeDPMContainer', 'MabServerTypeAzureBackupServerContainer', 'MabServerTypeMABContainer', 'MabServerTypeCluster', 'MabServerTypeAzureSQLContainer', 'MabServerTypeWindows', 'MabServerTypeVCenter', 'MabServerTypeVMAppContainer', 'MabServerTypeSQLAGWorkLoadContainer', 'MabServerTypeStorageContainer', 'MabServerTypeGenericContainer' 13621 MabServerType MabServerType `json:"mabServerType,omitempty"` 13622 // WorkloadType - Workload type of backup item. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' 13623 WorkloadType WorkloadType `json:"workloadType,omitempty"` 13624 // ErrorDetails - The errors. 13625 ErrorDetails *[]MabErrorInfo `json:"errorDetails,omitempty"` 13626 // ExtendedInfo - Additional information on the job. 13627 ExtendedInfo *MabJobExtendedInfo `json:"extendedInfo,omitempty"` 13628 // EntityFriendlyName - Friendly name of the entity on which the current job is executing. 13629 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` 13630 // BackupManagementType - Backup management type to execute the current job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 13631 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 13632 // Operation - The operation name. 13633 Operation *string `json:"operation,omitempty"` 13634 // Status - Job status. 13635 Status *string `json:"status,omitempty"` 13636 // StartTime - The start time. 13637 StartTime *date.Time `json:"startTime,omitempty"` 13638 // EndTime - The end time. 13639 EndTime *date.Time `json:"endTime,omitempty"` 13640 // ActivityID - ActivityId of job. 13641 ActivityID *string `json:"activityId,omitempty"` 13642 // JobType - Possible values include: 'JobTypeJob', 'JobTypeAzureIaaSVMJob', 'JobTypeAzureStorageJob', 'JobTypeAzureWorkloadJob', 'JobTypeDpmJob', 'JobTypeMabJob' 13643 JobType JobType `json:"jobType,omitempty"` 13644} 13645 13646// MarshalJSON is the custom marshaler for MabJob. 13647func (mj MabJob) MarshalJSON() ([]byte, error) { 13648 mj.JobType = JobTypeMabJob 13649 objectMap := make(map[string]interface{}) 13650 if mj.Duration != nil { 13651 objectMap["duration"] = mj.Duration 13652 } 13653 if mj.ActionsInfo != nil { 13654 objectMap["actionsInfo"] = mj.ActionsInfo 13655 } 13656 if mj.MabServerName != nil { 13657 objectMap["mabServerName"] = mj.MabServerName 13658 } 13659 if mj.MabServerType != "" { 13660 objectMap["mabServerType"] = mj.MabServerType 13661 } 13662 if mj.WorkloadType != "" { 13663 objectMap["workloadType"] = mj.WorkloadType 13664 } 13665 if mj.ErrorDetails != nil { 13666 objectMap["errorDetails"] = mj.ErrorDetails 13667 } 13668 if mj.ExtendedInfo != nil { 13669 objectMap["extendedInfo"] = mj.ExtendedInfo 13670 } 13671 if mj.EntityFriendlyName != nil { 13672 objectMap["entityFriendlyName"] = mj.EntityFriendlyName 13673 } 13674 if mj.BackupManagementType != "" { 13675 objectMap["backupManagementType"] = mj.BackupManagementType 13676 } 13677 if mj.Operation != nil { 13678 objectMap["operation"] = mj.Operation 13679 } 13680 if mj.Status != nil { 13681 objectMap["status"] = mj.Status 13682 } 13683 if mj.StartTime != nil { 13684 objectMap["startTime"] = mj.StartTime 13685 } 13686 if mj.EndTime != nil { 13687 objectMap["endTime"] = mj.EndTime 13688 } 13689 if mj.ActivityID != nil { 13690 objectMap["activityId"] = mj.ActivityID 13691 } 13692 if mj.JobType != "" { 13693 objectMap["jobType"] = mj.JobType 13694 } 13695 return json.Marshal(objectMap) 13696} 13697 13698// AsAzureIaaSVMJob is the BasicJob implementation for MabJob. 13699func (mj MabJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) { 13700 return nil, false 13701} 13702 13703// AsAzureStorageJob is the BasicJob implementation for MabJob. 13704func (mj MabJob) AsAzureStorageJob() (*AzureStorageJob, bool) { 13705 return nil, false 13706} 13707 13708// AsAzureWorkloadJob is the BasicJob implementation for MabJob. 13709func (mj MabJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) { 13710 return nil, false 13711} 13712 13713// AsDpmJob is the BasicJob implementation for MabJob. 13714func (mj MabJob) AsDpmJob() (*DpmJob, bool) { 13715 return nil, false 13716} 13717 13718// AsMabJob is the BasicJob implementation for MabJob. 13719func (mj MabJob) AsMabJob() (*MabJob, bool) { 13720 return &mj, true 13721} 13722 13723// AsJob is the BasicJob implementation for MabJob. 13724func (mj MabJob) AsJob() (*Job, bool) { 13725 return nil, false 13726} 13727 13728// AsBasicJob is the BasicJob implementation for MabJob. 13729func (mj MabJob) AsBasicJob() (BasicJob, bool) { 13730 return &mj, true 13731} 13732 13733// MabJobExtendedInfo additional information for the MAB workload-specific job. 13734type MabJobExtendedInfo struct { 13735 // TasksList - List of tasks for this job. 13736 TasksList *[]MabJobTaskDetails `json:"tasksList,omitempty"` 13737 // PropertyBag - The job properties. 13738 PropertyBag map[string]*string `json:"propertyBag"` 13739 // DynamicErrorMessage - Non localized error message specific to this job. 13740 DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"` 13741} 13742 13743// MarshalJSON is the custom marshaler for MabJobExtendedInfo. 13744func (mjei MabJobExtendedInfo) MarshalJSON() ([]byte, error) { 13745 objectMap := make(map[string]interface{}) 13746 if mjei.TasksList != nil { 13747 objectMap["tasksList"] = mjei.TasksList 13748 } 13749 if mjei.PropertyBag != nil { 13750 objectMap["propertyBag"] = mjei.PropertyBag 13751 } 13752 if mjei.DynamicErrorMessage != nil { 13753 objectMap["dynamicErrorMessage"] = mjei.DynamicErrorMessage 13754 } 13755 return json.Marshal(objectMap) 13756} 13757 13758// MabJobTaskDetails MAB workload-specific job task details. 13759type MabJobTaskDetails struct { 13760 // TaskID - The task display name. 13761 TaskID *string `json:"taskId,omitempty"` 13762 // StartTime - The start time. 13763 StartTime *date.Time `json:"startTime,omitempty"` 13764 // EndTime - The end time. 13765 EndTime *date.Time `json:"endTime,omitempty"` 13766 // Duration - Time elapsed for task. 13767 Duration *string `json:"duration,omitempty"` 13768 // Status - The status. 13769 Status *string `json:"status,omitempty"` 13770} 13771 13772// MabProtectionPolicy mab container-specific backup policy. 13773type MabProtectionPolicy struct { 13774 // SchedulePolicy - Backup schedule of backup policy. 13775 SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"` 13776 // RetentionPolicy - Retention policy details. 13777 RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"` 13778 // ProtectedItemsCount - Number of items associated with this policy. 13779 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` 13780 // BackupManagementType - Possible values include: 'BackupManagementTypeProtectionPolicy', 'BackupManagementTypeAzureWorkload', 'BackupManagementTypeAzureStorage', 'BackupManagementTypeAzureIaasVM', 'BackupManagementTypeAzureSQL', 'BackupManagementTypeGenericProtectionPolicy', 'BackupManagementTypeMAB' 13781 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"` 13782} 13783 13784// MarshalJSON is the custom marshaler for MabProtectionPolicy. 13785func (mpp MabProtectionPolicy) MarshalJSON() ([]byte, error) { 13786 mpp.BackupManagementType = BackupManagementTypeMAB 13787 objectMap := make(map[string]interface{}) 13788 objectMap["schedulePolicy"] = mpp.SchedulePolicy 13789 objectMap["retentionPolicy"] = mpp.RetentionPolicy 13790 if mpp.ProtectedItemsCount != nil { 13791 objectMap["protectedItemsCount"] = mpp.ProtectedItemsCount 13792 } 13793 if mpp.BackupManagementType != "" { 13794 objectMap["backupManagementType"] = mpp.BackupManagementType 13795 } 13796 return json.Marshal(objectMap) 13797} 13798 13799// AsAzureVMWorkloadProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. 13800func (mpp MabProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) { 13801 return nil, false 13802} 13803 13804// AsAzureFileShareProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. 13805func (mpp MabProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) { 13806 return nil, false 13807} 13808 13809// AsAzureIaaSVMProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. 13810func (mpp MabProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) { 13811 return nil, false 13812} 13813 13814// AsAzureSQLProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. 13815func (mpp MabProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) { 13816 return nil, false 13817} 13818 13819// AsGenericProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. 13820func (mpp MabProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) { 13821 return nil, false 13822} 13823 13824// AsMabProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. 13825func (mpp MabProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) { 13826 return &mpp, true 13827} 13828 13829// AsProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. 13830func (mpp MabProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) { 13831 return nil, false 13832} 13833 13834// AsBasicProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. 13835func (mpp MabProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) { 13836 return &mpp, true 13837} 13838 13839// UnmarshalJSON is the custom unmarshaler for MabProtectionPolicy struct. 13840func (mpp *MabProtectionPolicy) UnmarshalJSON(body []byte) error { 13841 var m map[string]*json.RawMessage 13842 err := json.Unmarshal(body, &m) 13843 if err != nil { 13844 return err 13845 } 13846 for k, v := range m { 13847 switch k { 13848 case "schedulePolicy": 13849 if v != nil { 13850 schedulePolicy, err := unmarshalBasicSchedulePolicy(*v) 13851 if err != nil { 13852 return err 13853 } 13854 mpp.SchedulePolicy = schedulePolicy 13855 } 13856 case "retentionPolicy": 13857 if v != nil { 13858 retentionPolicy, err := unmarshalBasicRetentionPolicy(*v) 13859 if err != nil { 13860 return err 13861 } 13862 mpp.RetentionPolicy = retentionPolicy 13863 } 13864 case "protectedItemsCount": 13865 if v != nil { 13866 var protectedItemsCount int32 13867 err = json.Unmarshal(*v, &protectedItemsCount) 13868 if err != nil { 13869 return err 13870 } 13871 mpp.ProtectedItemsCount = &protectedItemsCount 13872 } 13873 case "backupManagementType": 13874 if v != nil { 13875 var backupManagementType ManagementTypeBasicProtectionPolicy 13876 err = json.Unmarshal(*v, &backupManagementType) 13877 if err != nil { 13878 return err 13879 } 13880 mpp.BackupManagementType = backupManagementType 13881 } 13882 } 13883 } 13884 13885 return nil 13886} 13887 13888// ManagementUsage backup management usages of a vault. 13889type ManagementUsage struct { 13890 // Unit - Unit of the usage. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' 13891 Unit UsagesUnit `json:"unit,omitempty"` 13892 // QuotaPeriod - Quota period of usage. 13893 QuotaPeriod *string `json:"quotaPeriod,omitempty"` 13894 // NextResetTime - Next reset time of usage. 13895 NextResetTime *date.Time `json:"nextResetTime,omitempty"` 13896 // CurrentValue - Current value of usage. 13897 CurrentValue *int64 `json:"currentValue,omitempty"` 13898 // Limit - Limit of usage. 13899 Limit *int64 `json:"limit,omitempty"` 13900 // Name - Name of usage. 13901 Name *NameInfo `json:"name,omitempty"` 13902} 13903 13904// ManagementUsageList backup management usage for vault. 13905type ManagementUsageList struct { 13906 autorest.Response `json:"-"` 13907 // Value - The list of backup management usages for the given vault. 13908 Value *[]ManagementUsage `json:"value,omitempty"` 13909} 13910 13911// MonthlyRetentionSchedule monthly retention schedule. 13912type MonthlyRetentionSchedule struct { 13913 // RetentionScheduleFormatType - Retention schedule format type for monthly retention policy. Possible values include: 'RetentionScheduleFormatInvalid', 'RetentionScheduleFormatDaily', 'RetentionScheduleFormatWeekly' 13914 RetentionScheduleFormatType RetentionScheduleFormat `json:"retentionScheduleFormatType,omitempty"` 13915 // RetentionScheduleDaily - Daily retention format for monthly retention policy. 13916 RetentionScheduleDaily *DailyRetentionFormat `json:"retentionScheduleDaily,omitempty"` 13917 // RetentionScheduleWeekly - Weekly retention format for monthly retention policy. 13918 RetentionScheduleWeekly *WeeklyRetentionFormat `json:"retentionScheduleWeekly,omitempty"` 13919 // RetentionTimes - Retention times of retention policy. 13920 RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"` 13921 // RetentionDuration - Retention duration of retention Policy. 13922 RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` 13923} 13924 13925// NameInfo the name of usage. 13926type NameInfo struct { 13927 // Value - Value of usage. 13928 Value *string `json:"value,omitempty"` 13929 // LocalizedValue - Localized value of usage. 13930 LocalizedValue *string `json:"localizedValue,omitempty"` 13931} 13932 13933// OperationResultInfo operation result info. 13934type OperationResultInfo struct { 13935 // JobList - List of jobs created by this operation. 13936 JobList *[]string `json:"jobList,omitempty"` 13937 // ObjectType - Possible values include: 'ObjectTypeOperationResultInfoBase', 'ObjectTypeExportJobsOperationResultInfo', 'ObjectTypeOperationResultInfo' 13938 ObjectType ObjectTypeBasicOperationResultInfoBase `json:"objectType,omitempty"` 13939} 13940 13941// MarshalJSON is the custom marshaler for OperationResultInfo. 13942func (ori OperationResultInfo) MarshalJSON() ([]byte, error) { 13943 ori.ObjectType = ObjectTypeOperationResultInfo 13944 objectMap := make(map[string]interface{}) 13945 if ori.JobList != nil { 13946 objectMap["jobList"] = ori.JobList 13947 } 13948 if ori.ObjectType != "" { 13949 objectMap["objectType"] = ori.ObjectType 13950 } 13951 return json.Marshal(objectMap) 13952} 13953 13954// AsExportJobsOperationResultInfo is the BasicOperationResultInfoBase implementation for OperationResultInfo. 13955func (ori OperationResultInfo) AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) { 13956 return nil, false 13957} 13958 13959// AsOperationResultInfo is the BasicOperationResultInfoBase implementation for OperationResultInfo. 13960func (ori OperationResultInfo) AsOperationResultInfo() (*OperationResultInfo, bool) { 13961 return &ori, true 13962} 13963 13964// AsOperationResultInfoBase is the BasicOperationResultInfoBase implementation for OperationResultInfo. 13965func (ori OperationResultInfo) AsOperationResultInfoBase() (*OperationResultInfoBase, bool) { 13966 return nil, false 13967} 13968 13969// AsBasicOperationResultInfoBase is the BasicOperationResultInfoBase implementation for OperationResultInfo. 13970func (ori OperationResultInfo) AsBasicOperationResultInfoBase() (BasicOperationResultInfoBase, bool) { 13971 return &ori, true 13972} 13973 13974// BasicOperationResultInfoBase base class for operation result info. 13975type BasicOperationResultInfoBase interface { 13976 AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) 13977 AsOperationResultInfo() (*OperationResultInfo, bool) 13978 AsOperationResultInfoBase() (*OperationResultInfoBase, bool) 13979} 13980 13981// OperationResultInfoBase base class for operation result info. 13982type OperationResultInfoBase struct { 13983 // ObjectType - Possible values include: 'ObjectTypeOperationResultInfoBase', 'ObjectTypeExportJobsOperationResultInfo', 'ObjectTypeOperationResultInfo' 13984 ObjectType ObjectTypeBasicOperationResultInfoBase `json:"objectType,omitempty"` 13985} 13986 13987func unmarshalBasicOperationResultInfoBase(body []byte) (BasicOperationResultInfoBase, error) { 13988 var m map[string]interface{} 13989 err := json.Unmarshal(body, &m) 13990 if err != nil { 13991 return nil, err 13992 } 13993 13994 switch m["objectType"] { 13995 case string(ObjectTypeExportJobsOperationResultInfo): 13996 var ejori ExportJobsOperationResultInfo 13997 err := json.Unmarshal(body, &ejori) 13998 return ejori, err 13999 case string(ObjectTypeOperationResultInfo): 14000 var ori OperationResultInfo 14001 err := json.Unmarshal(body, &ori) 14002 return ori, err 14003 default: 14004 var orib OperationResultInfoBase 14005 err := json.Unmarshal(body, &orib) 14006 return orib, err 14007 } 14008} 14009func unmarshalBasicOperationResultInfoBaseArray(body []byte) ([]BasicOperationResultInfoBase, error) { 14010 var rawMessages []*json.RawMessage 14011 err := json.Unmarshal(body, &rawMessages) 14012 if err != nil { 14013 return nil, err 14014 } 14015 14016 oribArray := make([]BasicOperationResultInfoBase, len(rawMessages)) 14017 14018 for index, rawMessage := range rawMessages { 14019 orib, err := unmarshalBasicOperationResultInfoBase(*rawMessage) 14020 if err != nil { 14021 return nil, err 14022 } 14023 oribArray[index] = orib 14024 } 14025 return oribArray, nil 14026} 14027 14028// MarshalJSON is the custom marshaler for OperationResultInfoBase. 14029func (orib OperationResultInfoBase) MarshalJSON() ([]byte, error) { 14030 orib.ObjectType = ObjectTypeOperationResultInfoBase 14031 objectMap := make(map[string]interface{}) 14032 if orib.ObjectType != "" { 14033 objectMap["objectType"] = orib.ObjectType 14034 } 14035 return json.Marshal(objectMap) 14036} 14037 14038// AsExportJobsOperationResultInfo is the BasicOperationResultInfoBase implementation for OperationResultInfoBase. 14039func (orib OperationResultInfoBase) AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) { 14040 return nil, false 14041} 14042 14043// AsOperationResultInfo is the BasicOperationResultInfoBase implementation for OperationResultInfoBase. 14044func (orib OperationResultInfoBase) AsOperationResultInfo() (*OperationResultInfo, bool) { 14045 return nil, false 14046} 14047 14048// AsOperationResultInfoBase is the BasicOperationResultInfoBase implementation for OperationResultInfoBase. 14049func (orib OperationResultInfoBase) AsOperationResultInfoBase() (*OperationResultInfoBase, bool) { 14050 return &orib, true 14051} 14052 14053// AsBasicOperationResultInfoBase is the BasicOperationResultInfoBase implementation for OperationResultInfoBase. 14054func (orib OperationResultInfoBase) AsBasicOperationResultInfoBase() (BasicOperationResultInfoBase, bool) { 14055 return &orib, true 14056} 14057 14058// OperationResultInfoBaseResource base class for operation result info. 14059type OperationResultInfoBaseResource struct { 14060 autorest.Response `json:"-"` 14061 // Operation - OperationResultInfoBaseResource operation 14062 Operation BasicOperationResultInfoBase `json:"operation,omitempty"` 14063 // 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' 14064 StatusCode HTTPStatusCode `json:"statusCode,omitempty"` 14065 // Headers - HTTP headers associated with this operation. 14066 Headers map[string][]string `json:"headers"` 14067} 14068 14069// MarshalJSON is the custom marshaler for OperationResultInfoBaseResource. 14070func (oribr OperationResultInfoBaseResource) MarshalJSON() ([]byte, error) { 14071 objectMap := make(map[string]interface{}) 14072 objectMap["operation"] = oribr.Operation 14073 if oribr.StatusCode != "" { 14074 objectMap["statusCode"] = oribr.StatusCode 14075 } 14076 if oribr.Headers != nil { 14077 objectMap["headers"] = oribr.Headers 14078 } 14079 return json.Marshal(objectMap) 14080} 14081 14082// UnmarshalJSON is the custom unmarshaler for OperationResultInfoBaseResource struct. 14083func (oribr *OperationResultInfoBaseResource) UnmarshalJSON(body []byte) error { 14084 var m map[string]*json.RawMessage 14085 err := json.Unmarshal(body, &m) 14086 if err != nil { 14087 return err 14088 } 14089 for k, v := range m { 14090 switch k { 14091 case "operation": 14092 if v != nil { 14093 operation, err := unmarshalBasicOperationResultInfoBase(*v) 14094 if err != nil { 14095 return err 14096 } 14097 oribr.Operation = operation 14098 } 14099 case "statusCode": 14100 if v != nil { 14101 var statusCode HTTPStatusCode 14102 err = json.Unmarshal(*v, &statusCode) 14103 if err != nil { 14104 return err 14105 } 14106 oribr.StatusCode = statusCode 14107 } 14108 case "headers": 14109 if v != nil { 14110 var headers map[string][]string 14111 err = json.Unmarshal(*v, &headers) 14112 if err != nil { 14113 return err 14114 } 14115 oribr.Headers = headers 14116 } 14117 } 14118 } 14119 14120 return nil 14121} 14122 14123// OperationStatus operation status. 14124type OperationStatus struct { 14125 autorest.Response `json:"-"` 14126 // ID - ID of the operation. 14127 ID *string `json:"id,omitempty"` 14128 // Name - Name of the operation. 14129 Name *string `json:"name,omitempty"` 14130 // Status - Operation status. Possible values include: 'OperationStatusValuesInvalid', 'OperationStatusValuesInProgress', 'OperationStatusValuesSucceeded', 'OperationStatusValuesFailed', 'OperationStatusValuesCanceled' 14131 Status OperationStatusValues `json:"status,omitempty"` 14132 // StartTime - Operation start time. Format: ISO-8601. 14133 StartTime *date.Time `json:"startTime,omitempty"` 14134 // EndTime - Operation end time. Format: ISO-8601. 14135 EndTime *date.Time `json:"endTime,omitempty"` 14136 // Error - Error information related to this operation. 14137 Error *OperationStatusError `json:"error,omitempty"` 14138 // Properties - Additional information associated with this operation. 14139 Properties BasicOperationStatusExtendedInfo `json:"properties,omitempty"` 14140} 14141 14142// UnmarshalJSON is the custom unmarshaler for OperationStatus struct. 14143func (osVar *OperationStatus) UnmarshalJSON(body []byte) error { 14144 var m map[string]*json.RawMessage 14145 err := json.Unmarshal(body, &m) 14146 if err != nil { 14147 return err 14148 } 14149 for k, v := range m { 14150 switch k { 14151 case "id": 14152 if v != nil { 14153 var ID string 14154 err = json.Unmarshal(*v, &ID) 14155 if err != nil { 14156 return err 14157 } 14158 osVar.ID = &ID 14159 } 14160 case "name": 14161 if v != nil { 14162 var name string 14163 err = json.Unmarshal(*v, &name) 14164 if err != nil { 14165 return err 14166 } 14167 osVar.Name = &name 14168 } 14169 case "status": 14170 if v != nil { 14171 var status OperationStatusValues 14172 err = json.Unmarshal(*v, &status) 14173 if err != nil { 14174 return err 14175 } 14176 osVar.Status = status 14177 } 14178 case "startTime": 14179 if v != nil { 14180 var startTime date.Time 14181 err = json.Unmarshal(*v, &startTime) 14182 if err != nil { 14183 return err 14184 } 14185 osVar.StartTime = &startTime 14186 } 14187 case "endTime": 14188 if v != nil { 14189 var endTime date.Time 14190 err = json.Unmarshal(*v, &endTime) 14191 if err != nil { 14192 return err 14193 } 14194 osVar.EndTime = &endTime 14195 } 14196 case "error": 14197 if v != nil { 14198 var errorVar OperationStatusError 14199 err = json.Unmarshal(*v, &errorVar) 14200 if err != nil { 14201 return err 14202 } 14203 osVar.Error = &errorVar 14204 } 14205 case "properties": 14206 if v != nil { 14207 properties, err := unmarshalBasicOperationStatusExtendedInfo(*v) 14208 if err != nil { 14209 return err 14210 } 14211 osVar.Properties = properties 14212 } 14213 } 14214 } 14215 14216 return nil 14217} 14218 14219// OperationStatusError error information associated with operation status call. 14220type OperationStatusError struct { 14221 // Code - Error code of the operation failure. 14222 Code *string `json:"code,omitempty"` 14223 // Message - Error message displayed if the operation failure. 14224 Message *string `json:"message,omitempty"` 14225} 14226 14227// BasicOperationStatusExtendedInfo base class for additional information of operation status. 14228type BasicOperationStatusExtendedInfo interface { 14229 AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) 14230 AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) 14231 AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) 14232 AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) 14233} 14234 14235// OperationStatusExtendedInfo base class for additional information of operation status. 14236type OperationStatusExtendedInfo struct { 14237 // ObjectType - Possible values include: 'ObjectTypeOperationStatusExtendedInfo', 'ObjectTypeOperationStatusJobExtendedInfo', 'ObjectTypeOperationStatusJobsExtendedInfo', 'ObjectTypeOperationStatusProvisionILRExtendedInfo' 14238 ObjectType ObjectType `json:"objectType,omitempty"` 14239} 14240 14241func unmarshalBasicOperationStatusExtendedInfo(body []byte) (BasicOperationStatusExtendedInfo, error) { 14242 var m map[string]interface{} 14243 err := json.Unmarshal(body, &m) 14244 if err != nil { 14245 return nil, err 14246 } 14247 14248 switch m["objectType"] { 14249 case string(ObjectTypeOperationStatusJobExtendedInfo): 14250 var osjei OperationStatusJobExtendedInfo 14251 err := json.Unmarshal(body, &osjei) 14252 return osjei, err 14253 case string(ObjectTypeOperationStatusJobsExtendedInfo): 14254 var osjei OperationStatusJobsExtendedInfo 14255 err := json.Unmarshal(body, &osjei) 14256 return osjei, err 14257 case string(ObjectTypeOperationStatusProvisionILRExtendedInfo): 14258 var ospiei OperationStatusProvisionILRExtendedInfo 14259 err := json.Unmarshal(body, &ospiei) 14260 return ospiei, err 14261 default: 14262 var osei OperationStatusExtendedInfo 14263 err := json.Unmarshal(body, &osei) 14264 return osei, err 14265 } 14266} 14267func unmarshalBasicOperationStatusExtendedInfoArray(body []byte) ([]BasicOperationStatusExtendedInfo, error) { 14268 var rawMessages []*json.RawMessage 14269 err := json.Unmarshal(body, &rawMessages) 14270 if err != nil { 14271 return nil, err 14272 } 14273 14274 oseiArray := make([]BasicOperationStatusExtendedInfo, len(rawMessages)) 14275 14276 for index, rawMessage := range rawMessages { 14277 osei, err := unmarshalBasicOperationStatusExtendedInfo(*rawMessage) 14278 if err != nil { 14279 return nil, err 14280 } 14281 oseiArray[index] = osei 14282 } 14283 return oseiArray, nil 14284} 14285 14286// MarshalJSON is the custom marshaler for OperationStatusExtendedInfo. 14287func (osei OperationStatusExtendedInfo) MarshalJSON() ([]byte, error) { 14288 osei.ObjectType = ObjectTypeOperationStatusExtendedInfo 14289 objectMap := make(map[string]interface{}) 14290 if osei.ObjectType != "" { 14291 objectMap["objectType"] = osei.ObjectType 14292 } 14293 return json.Marshal(objectMap) 14294} 14295 14296// AsOperationStatusJobExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusExtendedInfo. 14297func (osei OperationStatusExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) { 14298 return nil, false 14299} 14300 14301// AsOperationStatusJobsExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusExtendedInfo. 14302func (osei OperationStatusExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) { 14303 return nil, false 14304} 14305 14306// AsOperationStatusProvisionILRExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusExtendedInfo. 14307func (osei OperationStatusExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) { 14308 return nil, false 14309} 14310 14311// AsOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusExtendedInfo. 14312func (osei OperationStatusExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) { 14313 return &osei, true 14314} 14315 14316// AsBasicOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusExtendedInfo. 14317func (osei OperationStatusExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) { 14318 return &osei, true 14319} 14320 14321// OperationStatusJobExtendedInfo operation status job extended info. 14322type OperationStatusJobExtendedInfo struct { 14323 // JobID - ID of the job created for this protected item. 14324 JobID *string `json:"jobId,omitempty"` 14325 // ObjectType - Possible values include: 'ObjectTypeOperationStatusExtendedInfo', 'ObjectTypeOperationStatusJobExtendedInfo', 'ObjectTypeOperationStatusJobsExtendedInfo', 'ObjectTypeOperationStatusProvisionILRExtendedInfo' 14326 ObjectType ObjectType `json:"objectType,omitempty"` 14327} 14328 14329// MarshalJSON is the custom marshaler for OperationStatusJobExtendedInfo. 14330func (osjei OperationStatusJobExtendedInfo) MarshalJSON() ([]byte, error) { 14331 osjei.ObjectType = ObjectTypeOperationStatusJobExtendedInfo 14332 objectMap := make(map[string]interface{}) 14333 if osjei.JobID != nil { 14334 objectMap["jobId"] = osjei.JobID 14335 } 14336 if osjei.ObjectType != "" { 14337 objectMap["objectType"] = osjei.ObjectType 14338 } 14339 return json.Marshal(objectMap) 14340} 14341 14342// AsOperationStatusJobExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo. 14343func (osjei OperationStatusJobExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) { 14344 return &osjei, true 14345} 14346 14347// AsOperationStatusJobsExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo. 14348func (osjei OperationStatusJobExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) { 14349 return nil, false 14350} 14351 14352// AsOperationStatusProvisionILRExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo. 14353func (osjei OperationStatusJobExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) { 14354 return nil, false 14355} 14356 14357// AsOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo. 14358func (osjei OperationStatusJobExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) { 14359 return nil, false 14360} 14361 14362// AsBasicOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo. 14363func (osjei OperationStatusJobExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) { 14364 return &osjei, true 14365} 14366 14367// OperationStatusJobsExtendedInfo operation status extended info for list of jobs. 14368type OperationStatusJobsExtendedInfo struct { 14369 // JobIds - IDs of the jobs created for the protected item. 14370 JobIds *[]string `json:"jobIds,omitempty"` 14371 // FailedJobsError - Stores all the failed jobs along with the corresponding error codes. 14372 FailedJobsError map[string]*string `json:"failedJobsError"` 14373 // ObjectType - Possible values include: 'ObjectTypeOperationStatusExtendedInfo', 'ObjectTypeOperationStatusJobExtendedInfo', 'ObjectTypeOperationStatusJobsExtendedInfo', 'ObjectTypeOperationStatusProvisionILRExtendedInfo' 14374 ObjectType ObjectType `json:"objectType,omitempty"` 14375} 14376 14377// MarshalJSON is the custom marshaler for OperationStatusJobsExtendedInfo. 14378func (osjei OperationStatusJobsExtendedInfo) MarshalJSON() ([]byte, error) { 14379 osjei.ObjectType = ObjectTypeOperationStatusJobsExtendedInfo 14380 objectMap := make(map[string]interface{}) 14381 if osjei.JobIds != nil { 14382 objectMap["jobIds"] = osjei.JobIds 14383 } 14384 if osjei.FailedJobsError != nil { 14385 objectMap["failedJobsError"] = osjei.FailedJobsError 14386 } 14387 if osjei.ObjectType != "" { 14388 objectMap["objectType"] = osjei.ObjectType 14389 } 14390 return json.Marshal(objectMap) 14391} 14392 14393// AsOperationStatusJobExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo. 14394func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) { 14395 return nil, false 14396} 14397 14398// AsOperationStatusJobsExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo. 14399func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) { 14400 return &osjei, true 14401} 14402 14403// AsOperationStatusProvisionILRExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo. 14404func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) { 14405 return nil, false 14406} 14407 14408// AsOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo. 14409func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) { 14410 return nil, false 14411} 14412 14413// AsBasicOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo. 14414func (osjei OperationStatusJobsExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) { 14415 return &osjei, true 14416} 14417 14418// OperationStatusProvisionILRExtendedInfo operation status extended info for ILR provision action. 14419type OperationStatusProvisionILRExtendedInfo struct { 14420 // RecoveryTarget - Target details for file / folder restore. 14421 RecoveryTarget *InstantItemRecoveryTarget `json:"recoveryTarget,omitempty"` 14422 // ObjectType - Possible values include: 'ObjectTypeOperationStatusExtendedInfo', 'ObjectTypeOperationStatusJobExtendedInfo', 'ObjectTypeOperationStatusJobsExtendedInfo', 'ObjectTypeOperationStatusProvisionILRExtendedInfo' 14423 ObjectType ObjectType `json:"objectType,omitempty"` 14424} 14425 14426// MarshalJSON is the custom marshaler for OperationStatusProvisionILRExtendedInfo. 14427func (ospiei OperationStatusProvisionILRExtendedInfo) MarshalJSON() ([]byte, error) { 14428 ospiei.ObjectType = ObjectTypeOperationStatusProvisionILRExtendedInfo 14429 objectMap := make(map[string]interface{}) 14430 if ospiei.RecoveryTarget != nil { 14431 objectMap["recoveryTarget"] = ospiei.RecoveryTarget 14432 } 14433 if ospiei.ObjectType != "" { 14434 objectMap["objectType"] = ospiei.ObjectType 14435 } 14436 return json.Marshal(objectMap) 14437} 14438 14439// AsOperationStatusJobExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo. 14440func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) { 14441 return nil, false 14442} 14443 14444// AsOperationStatusJobsExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo. 14445func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) { 14446 return nil, false 14447} 14448 14449// AsOperationStatusProvisionILRExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo. 14450func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) { 14451 return &ospiei, true 14452} 14453 14454// AsOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo. 14455func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) { 14456 return nil, false 14457} 14458 14459// AsBasicOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo. 14460func (ospiei OperationStatusProvisionILRExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) { 14461 return &ospiei, true 14462} 14463 14464// OperationWorkerResponse this is the base class for operation result responses. 14465type OperationWorkerResponse struct { 14466 // 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' 14467 StatusCode HTTPStatusCode `json:"statusCode,omitempty"` 14468 // Headers - HTTP headers associated with this operation. 14469 Headers map[string][]string `json:"headers"` 14470} 14471 14472// MarshalJSON is the custom marshaler for OperationWorkerResponse. 14473func (owr OperationWorkerResponse) MarshalJSON() ([]byte, error) { 14474 objectMap := make(map[string]interface{}) 14475 if owr.StatusCode != "" { 14476 objectMap["statusCode"] = owr.StatusCode 14477 } 14478 if owr.Headers != nil { 14479 objectMap["headers"] = owr.Headers 14480 } 14481 return json.Marshal(objectMap) 14482} 14483 14484// PointInTimeRange provides details for log ranges 14485type PointInTimeRange struct { 14486 // StartTime - Start time of the time range for log recovery. 14487 StartTime *date.Time `json:"startTime,omitempty"` 14488 // EndTime - End time of the time range for log recovery. 14489 EndTime *date.Time `json:"endTime,omitempty"` 14490} 14491 14492// PreBackupValidation pre-backup validation for Azure VM Workload provider. 14493type PreBackupValidation struct { 14494 // Status - Status of protectable item, i.e. InProgress,Succeeded,Failed. Possible values include: 'InquiryStatusInvalid', 'InquiryStatusSuccess', 'InquiryStatusFailed' 14495 Status InquiryStatus `json:"status,omitempty"` 14496 // Code - Error code of protectable item 14497 Code *string `json:"code,omitempty"` 14498 // Message - Message corresponding to the error code for the protectable item 14499 Message *string `json:"message,omitempty"` 14500} 14501 14502// PreValidateEnableBackupRequest contract to validate if backup can be enabled on the given resource in a 14503// given vault and given configuration. 14504// It will validate followings 14505// 1. Vault capacity 14506// 2. VM is already protected 14507// 3. Any VM related configuration passed in properties. 14508type PreValidateEnableBackupRequest struct { 14509 // 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' 14510 ResourceType DataSourceType `json:"resourceType,omitempty"` 14511 // ResourceID - ARM Virtual Machine Id 14512 ResourceID *string `json:"resourceId,omitempty"` 14513 // VaultID - ARM id of the Recovery Services Vault 14514 VaultID *string `json:"vaultId,omitempty"` 14515 // Properties - Configuration of VM if any needs to be validated like OS type etc 14516 Properties *string `json:"properties,omitempty"` 14517} 14518 14519// PreValidateEnableBackupResponse response contract for enable backup validation request 14520type PreValidateEnableBackupResponse struct { 14521 autorest.Response `json:"-"` 14522 // Status - Validation Status. Possible values include: 'ValidationStatusInvalid', 'ValidationStatusSucceeded', 'ValidationStatusFailed' 14523 Status ValidationStatus `json:"status,omitempty"` 14524 // ErrorCode - Response error code 14525 ErrorCode *string `json:"errorCode,omitempty"` 14526 // ErrorMessage - Response error message 14527 ErrorMessage *string `json:"errorMessage,omitempty"` 14528 // Recommendation - Recommended action for user 14529 Recommendation *string `json:"recommendation,omitempty"` 14530 // ContainerName - Specifies the product specific container name. E.g. iaasvmcontainer;iaasvmcontainer;rgname;vmname. This is required 14531 // for portal 14532 ContainerName *string `json:"containerName,omitempty"` 14533 // ProtectedItemName - Specifies the product specific ds name. E.g. vm;iaasvmcontainer;rgname;vmname. This is required for portal 14534 ProtectedItemName *string `json:"protectedItemName,omitempty"` 14535} 14536 14537// PrivateEndpoint the Private Endpoint network resource that is linked to the Private Endpoint connection 14538type PrivateEndpoint struct { 14539 // ID - Gets or sets id 14540 ID *string `json:"id,omitempty"` 14541} 14542 14543// PrivateEndpointConnection private Endpoint Connection Response Properties 14544type PrivateEndpointConnection struct { 14545 // ProvisioningState - Gets or sets provisioning state of the private endpoint connection. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateDeleting', 'ProvisioningStateFailed', 'ProvisioningStatePending' 14546 ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` 14547 // PrivateEndpoint - Gets or sets private endpoint associated with the private endpoint connection 14548 PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` 14549 // PrivateLinkServiceConnectionState - Gets or sets private link service connection state 14550 PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` 14551} 14552 14553// PrivateEndpointConnectionDeleteFuture an abstraction for monitoring and retrieving the results of a 14554// long-running operation. 14555type PrivateEndpointConnectionDeleteFuture struct { 14556 azure.FutureAPI 14557 // Result returns the result of the asynchronous operation. 14558 // If the operation has not completed it will return an error. 14559 Result func(PrivateEndpointConnectionClient) (autorest.Response, error) 14560} 14561 14562// PrivateEndpointConnectionPutFuture an abstraction for monitoring and retrieving the results of a 14563// long-running operation. 14564type PrivateEndpointConnectionPutFuture struct { 14565 azure.FutureAPI 14566 // Result returns the result of the asynchronous operation. 14567 // If the operation has not completed it will return an error. 14568 Result func(PrivateEndpointConnectionClient) (PrivateEndpointConnectionResource, error) 14569} 14570 14571// PrivateEndpointConnectionResource private Endpoint Connection Response Properties 14572type PrivateEndpointConnectionResource struct { 14573 autorest.Response `json:"-"` 14574 // Properties - PrivateEndpointConnectionResource properties 14575 Properties *PrivateEndpointConnection `json:"properties,omitempty"` 14576 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 14577 ID *string `json:"id,omitempty"` 14578 // Name - READ-ONLY; Resource name associated with the resource. 14579 Name *string `json:"name,omitempty"` 14580 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 14581 Type *string `json:"type,omitempty"` 14582 // Location - Resource location. 14583 Location *string `json:"location,omitempty"` 14584 // Tags - Resource tags. 14585 Tags map[string]*string `json:"tags"` 14586 // ETag - Optional ETag. 14587 ETag *string `json:"eTag,omitempty"` 14588} 14589 14590// MarshalJSON is the custom marshaler for PrivateEndpointConnectionResource. 14591func (pecr PrivateEndpointConnectionResource) MarshalJSON() ([]byte, error) { 14592 objectMap := make(map[string]interface{}) 14593 if pecr.Properties != nil { 14594 objectMap["properties"] = pecr.Properties 14595 } 14596 if pecr.Location != nil { 14597 objectMap["location"] = pecr.Location 14598 } 14599 if pecr.Tags != nil { 14600 objectMap["tags"] = pecr.Tags 14601 } 14602 if pecr.ETag != nil { 14603 objectMap["eTag"] = pecr.ETag 14604 } 14605 return json.Marshal(objectMap) 14606} 14607 14608// PrivateLinkServiceConnectionState private Link Service Connection State 14609type PrivateLinkServiceConnectionState struct { 14610 // Status - Gets or sets the status. Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected' 14611 Status PrivateEndpointConnectionStatus `json:"status,omitempty"` 14612 // Description - Gets or sets description 14613 Description *string `json:"description,omitempty"` 14614 // ActionRequired - Gets or sets actions required 14615 ActionRequired *string `json:"actionRequired,omitempty"` 14616} 14617 14618// BasicProtectableContainer protectable Container Class. 14619type BasicProtectableContainer interface { 14620 AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) 14621 AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) 14622 AsProtectableContainer() (*ProtectableContainer, bool) 14623} 14624 14625// ProtectableContainer protectable Container Class. 14626type ProtectableContainer struct { 14627 // FriendlyName - Friendly name of the container. 14628 FriendlyName *string `json:"friendlyName,omitempty"` 14629 // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 14630 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 14631 // HealthStatus - Status of health of the container. 14632 HealthStatus *string `json:"healthStatus,omitempty"` 14633 // ContainerID - Fabric Id of the container such as ARM Id. 14634 ContainerID *string `json:"containerId,omitempty"` 14635 // ProtectableContainerType - Possible values include: 'ProtectableContainerTypeProtectableContainer', 'ProtectableContainerTypeStorageContainer', 'ProtectableContainerTypeVMAppContainer' 14636 ProtectableContainerType ProtectableContainerType `json:"protectableContainerType,omitempty"` 14637} 14638 14639func unmarshalBasicProtectableContainer(body []byte) (BasicProtectableContainer, error) { 14640 var m map[string]interface{} 14641 err := json.Unmarshal(body, &m) 14642 if err != nil { 14643 return nil, err 14644 } 14645 14646 switch m["protectableContainerType"] { 14647 case string(ProtectableContainerTypeStorageContainer): 14648 var aspc AzureStorageProtectableContainer 14649 err := json.Unmarshal(body, &aspc) 14650 return aspc, err 14651 case string(ProtectableContainerTypeVMAppContainer): 14652 var avacpc AzureVMAppContainerProtectableContainer 14653 err := json.Unmarshal(body, &avacpc) 14654 return avacpc, err 14655 default: 14656 var pc ProtectableContainer 14657 err := json.Unmarshal(body, &pc) 14658 return pc, err 14659 } 14660} 14661func unmarshalBasicProtectableContainerArray(body []byte) ([]BasicProtectableContainer, error) { 14662 var rawMessages []*json.RawMessage 14663 err := json.Unmarshal(body, &rawMessages) 14664 if err != nil { 14665 return nil, err 14666 } 14667 14668 pcArray := make([]BasicProtectableContainer, len(rawMessages)) 14669 14670 for index, rawMessage := range rawMessages { 14671 pc, err := unmarshalBasicProtectableContainer(*rawMessage) 14672 if err != nil { 14673 return nil, err 14674 } 14675 pcArray[index] = pc 14676 } 14677 return pcArray, nil 14678} 14679 14680// MarshalJSON is the custom marshaler for ProtectableContainer. 14681func (pc ProtectableContainer) MarshalJSON() ([]byte, error) { 14682 pc.ProtectableContainerType = ProtectableContainerTypeProtectableContainer 14683 objectMap := make(map[string]interface{}) 14684 if pc.FriendlyName != nil { 14685 objectMap["friendlyName"] = pc.FriendlyName 14686 } 14687 if pc.BackupManagementType != "" { 14688 objectMap["backupManagementType"] = pc.BackupManagementType 14689 } 14690 if pc.HealthStatus != nil { 14691 objectMap["healthStatus"] = pc.HealthStatus 14692 } 14693 if pc.ContainerID != nil { 14694 objectMap["containerId"] = pc.ContainerID 14695 } 14696 if pc.ProtectableContainerType != "" { 14697 objectMap["protectableContainerType"] = pc.ProtectableContainerType 14698 } 14699 return json.Marshal(objectMap) 14700} 14701 14702// AsAzureStorageProtectableContainer is the BasicProtectableContainer implementation for ProtectableContainer. 14703func (pc ProtectableContainer) AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) { 14704 return nil, false 14705} 14706 14707// AsAzureVMAppContainerProtectableContainer is the BasicProtectableContainer implementation for ProtectableContainer. 14708func (pc ProtectableContainer) AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) { 14709 return nil, false 14710} 14711 14712// AsProtectableContainer is the BasicProtectableContainer implementation for ProtectableContainer. 14713func (pc ProtectableContainer) AsProtectableContainer() (*ProtectableContainer, bool) { 14714 return &pc, true 14715} 14716 14717// AsBasicProtectableContainer is the BasicProtectableContainer implementation for ProtectableContainer. 14718func (pc ProtectableContainer) AsBasicProtectableContainer() (BasicProtectableContainer, bool) { 14719 return &pc, true 14720} 14721 14722// ProtectableContainerResource protectable Container Class. 14723type ProtectableContainerResource struct { 14724 // Properties - ProtectableContainerResource properties 14725 Properties BasicProtectableContainer `json:"properties,omitempty"` 14726 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 14727 ID *string `json:"id,omitempty"` 14728 // Name - READ-ONLY; Resource name associated with the resource. 14729 Name *string `json:"name,omitempty"` 14730 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 14731 Type *string `json:"type,omitempty"` 14732 // Location - Resource location. 14733 Location *string `json:"location,omitempty"` 14734 // Tags - Resource tags. 14735 Tags map[string]*string `json:"tags"` 14736 // ETag - Optional ETag. 14737 ETag *string `json:"eTag,omitempty"` 14738} 14739 14740// MarshalJSON is the custom marshaler for ProtectableContainerResource. 14741func (pcr ProtectableContainerResource) MarshalJSON() ([]byte, error) { 14742 objectMap := make(map[string]interface{}) 14743 objectMap["properties"] = pcr.Properties 14744 if pcr.Location != nil { 14745 objectMap["location"] = pcr.Location 14746 } 14747 if pcr.Tags != nil { 14748 objectMap["tags"] = pcr.Tags 14749 } 14750 if pcr.ETag != nil { 14751 objectMap["eTag"] = pcr.ETag 14752 } 14753 return json.Marshal(objectMap) 14754} 14755 14756// UnmarshalJSON is the custom unmarshaler for ProtectableContainerResource struct. 14757func (pcr *ProtectableContainerResource) UnmarshalJSON(body []byte) error { 14758 var m map[string]*json.RawMessage 14759 err := json.Unmarshal(body, &m) 14760 if err != nil { 14761 return err 14762 } 14763 for k, v := range m { 14764 switch k { 14765 case "properties": 14766 if v != nil { 14767 properties, err := unmarshalBasicProtectableContainer(*v) 14768 if err != nil { 14769 return err 14770 } 14771 pcr.Properties = properties 14772 } 14773 case "id": 14774 if v != nil { 14775 var ID string 14776 err = json.Unmarshal(*v, &ID) 14777 if err != nil { 14778 return err 14779 } 14780 pcr.ID = &ID 14781 } 14782 case "name": 14783 if v != nil { 14784 var name string 14785 err = json.Unmarshal(*v, &name) 14786 if err != nil { 14787 return err 14788 } 14789 pcr.Name = &name 14790 } 14791 case "type": 14792 if v != nil { 14793 var typeVar string 14794 err = json.Unmarshal(*v, &typeVar) 14795 if err != nil { 14796 return err 14797 } 14798 pcr.Type = &typeVar 14799 } 14800 case "location": 14801 if v != nil { 14802 var location string 14803 err = json.Unmarshal(*v, &location) 14804 if err != nil { 14805 return err 14806 } 14807 pcr.Location = &location 14808 } 14809 case "tags": 14810 if v != nil { 14811 var tags map[string]*string 14812 err = json.Unmarshal(*v, &tags) 14813 if err != nil { 14814 return err 14815 } 14816 pcr.Tags = tags 14817 } 14818 case "eTag": 14819 if v != nil { 14820 var eTag string 14821 err = json.Unmarshal(*v, &eTag) 14822 if err != nil { 14823 return err 14824 } 14825 pcr.ETag = &eTag 14826 } 14827 } 14828 } 14829 14830 return nil 14831} 14832 14833// ProtectableContainerResourceList list of ProtectableContainer resources 14834type ProtectableContainerResourceList struct { 14835 autorest.Response `json:"-"` 14836 // Value - List of resources. 14837 Value *[]ProtectableContainerResource `json:"value,omitempty"` 14838 // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. 14839 NextLink *string `json:"nextLink,omitempty"` 14840} 14841 14842// ProtectableContainerResourceListIterator provides access to a complete listing of 14843// ProtectableContainerResource values. 14844type ProtectableContainerResourceListIterator struct { 14845 i int 14846 page ProtectableContainerResourceListPage 14847} 14848 14849// NextWithContext advances to the next value. If there was an error making 14850// the request the iterator does not advance and the error is returned. 14851func (iter *ProtectableContainerResourceListIterator) NextWithContext(ctx context.Context) (err error) { 14852 if tracing.IsEnabled() { 14853 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableContainerResourceListIterator.NextWithContext") 14854 defer func() { 14855 sc := -1 14856 if iter.Response().Response.Response != nil { 14857 sc = iter.Response().Response.Response.StatusCode 14858 } 14859 tracing.EndSpan(ctx, sc, err) 14860 }() 14861 } 14862 iter.i++ 14863 if iter.i < len(iter.page.Values()) { 14864 return nil 14865 } 14866 err = iter.page.NextWithContext(ctx) 14867 if err != nil { 14868 iter.i-- 14869 return err 14870 } 14871 iter.i = 0 14872 return nil 14873} 14874 14875// Next advances to the next value. If there was an error making 14876// the request the iterator does not advance and the error is returned. 14877// Deprecated: Use NextWithContext() instead. 14878func (iter *ProtectableContainerResourceListIterator) Next() error { 14879 return iter.NextWithContext(context.Background()) 14880} 14881 14882// NotDone returns true if the enumeration should be started or is not yet complete. 14883func (iter ProtectableContainerResourceListIterator) NotDone() bool { 14884 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 14885} 14886 14887// Response returns the raw server response from the last page request. 14888func (iter ProtectableContainerResourceListIterator) Response() ProtectableContainerResourceList { 14889 return iter.page.Response() 14890} 14891 14892// Value returns the current value or a zero-initialized value if the 14893// iterator has advanced beyond the end of the collection. 14894func (iter ProtectableContainerResourceListIterator) Value() ProtectableContainerResource { 14895 if !iter.page.NotDone() { 14896 return ProtectableContainerResource{} 14897 } 14898 return iter.page.Values()[iter.i] 14899} 14900 14901// Creates a new instance of the ProtectableContainerResourceListIterator type. 14902func NewProtectableContainerResourceListIterator(page ProtectableContainerResourceListPage) ProtectableContainerResourceListIterator { 14903 return ProtectableContainerResourceListIterator{page: page} 14904} 14905 14906// IsEmpty returns true if the ListResult contains no values. 14907func (pcrl ProtectableContainerResourceList) IsEmpty() bool { 14908 return pcrl.Value == nil || len(*pcrl.Value) == 0 14909} 14910 14911// hasNextLink returns true if the NextLink is not empty. 14912func (pcrl ProtectableContainerResourceList) hasNextLink() bool { 14913 return pcrl.NextLink != nil && len(*pcrl.NextLink) != 0 14914} 14915 14916// protectableContainerResourceListPreparer prepares a request to retrieve the next set of results. 14917// It returns nil if no more results exist. 14918func (pcrl ProtectableContainerResourceList) protectableContainerResourceListPreparer(ctx context.Context) (*http.Request, error) { 14919 if !pcrl.hasNextLink() { 14920 return nil, nil 14921 } 14922 return autorest.Prepare((&http.Request{}).WithContext(ctx), 14923 autorest.AsJSON(), 14924 autorest.AsGet(), 14925 autorest.WithBaseURL(to.String(pcrl.NextLink))) 14926} 14927 14928// ProtectableContainerResourceListPage contains a page of ProtectableContainerResource values. 14929type ProtectableContainerResourceListPage struct { 14930 fn func(context.Context, ProtectableContainerResourceList) (ProtectableContainerResourceList, error) 14931 pcrl ProtectableContainerResourceList 14932} 14933 14934// NextWithContext advances to the next page of values. If there was an error making 14935// the request the page does not advance and the error is returned. 14936func (page *ProtectableContainerResourceListPage) NextWithContext(ctx context.Context) (err error) { 14937 if tracing.IsEnabled() { 14938 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableContainerResourceListPage.NextWithContext") 14939 defer func() { 14940 sc := -1 14941 if page.Response().Response.Response != nil { 14942 sc = page.Response().Response.Response.StatusCode 14943 } 14944 tracing.EndSpan(ctx, sc, err) 14945 }() 14946 } 14947 for { 14948 next, err := page.fn(ctx, page.pcrl) 14949 if err != nil { 14950 return err 14951 } 14952 page.pcrl = next 14953 if !next.hasNextLink() || !next.IsEmpty() { 14954 break 14955 } 14956 } 14957 return nil 14958} 14959 14960// Next advances to the next page of values. If there was an error making 14961// the request the page does not advance and the error is returned. 14962// Deprecated: Use NextWithContext() instead. 14963func (page *ProtectableContainerResourceListPage) Next() error { 14964 return page.NextWithContext(context.Background()) 14965} 14966 14967// NotDone returns true if the page enumeration should be started or is not yet complete. 14968func (page ProtectableContainerResourceListPage) NotDone() bool { 14969 return !page.pcrl.IsEmpty() 14970} 14971 14972// Response returns the raw server response from the last page request. 14973func (page ProtectableContainerResourceListPage) Response() ProtectableContainerResourceList { 14974 return page.pcrl 14975} 14976 14977// Values returns the slice of values for the current page or nil if there are no values. 14978func (page ProtectableContainerResourceListPage) Values() []ProtectableContainerResource { 14979 if page.pcrl.IsEmpty() { 14980 return nil 14981 } 14982 return *page.pcrl.Value 14983} 14984 14985// Creates a new instance of the ProtectableContainerResourceListPage type. 14986func NewProtectableContainerResourceListPage(cur ProtectableContainerResourceList, getNextPage func(context.Context, ProtectableContainerResourceList) (ProtectableContainerResourceList, error)) ProtectableContainerResourceListPage { 14987 return ProtectableContainerResourceListPage{ 14988 fn: getNextPage, 14989 pcrl: cur, 14990 } 14991} 14992 14993// BasicProtectedItem base class for backup items. 14994type BasicProtectedItem interface { 14995 AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) 14996 AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) 14997 AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) 14998 AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) 14999 AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) 15000 AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) 15001 AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) 15002 AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) 15003 AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) 15004 AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) 15005 AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) 15006 AsDPMProtectedItem() (*DPMProtectedItem, bool) 15007 AsGenericProtectedItem() (*GenericProtectedItem, bool) 15008 AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) 15009 AsProtectedItem() (*ProtectedItem, bool) 15010} 15011 15012// ProtectedItem base class for backup items. 15013type ProtectedItem struct { 15014 // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 15015 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 15016 // 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' 15017 WorkloadType DataSourceType `json:"workloadType,omitempty"` 15018 // ContainerName - Unique name of container 15019 ContainerName *string `json:"containerName,omitempty"` 15020 // SourceResourceID - ARM ID of the resource to be backed up. 15021 SourceResourceID *string `json:"sourceResourceId,omitempty"` 15022 // PolicyID - ID of the backup policy with which this item is backed up. 15023 PolicyID *string `json:"policyId,omitempty"` 15024 // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. 15025 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` 15026 // BackupSetName - Name of the backup set the backup item belongs to 15027 BackupSetName *string `json:"backupSetName,omitempty"` 15028 // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' 15029 CreateMode CreateMode `json:"createMode,omitempty"` 15030 // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC 15031 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` 15032 // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete 15033 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` 15034 // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted 15035 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` 15036 // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon 15037 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` 15038 // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state 15039 IsRehydrate *bool `json:"isRehydrate,omitempty"` 15040 // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' 15041 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` 15042} 15043 15044func unmarshalBasicProtectedItem(body []byte) (BasicProtectedItem, error) { 15045 var m map[string]interface{} 15046 err := json.Unmarshal(body, &m) 15047 if err != nil { 15048 return nil, err 15049 } 15050 15051 switch m["protectedItemType"] { 15052 case string(ProtectedItemTypeAzureFileShareProtectedItem): 15053 var afpi AzureFileshareProtectedItem 15054 err := json.Unmarshal(body, &afpi) 15055 return afpi, err 15056 case string(ProtectedItemTypeMicrosoftClassicComputevirtualMachines): 15057 var aisccvpi AzureIaaSClassicComputeVMProtectedItem 15058 err := json.Unmarshal(body, &aisccvpi) 15059 return aisccvpi, err 15060 case string(ProtectedItemTypeMicrosoftComputevirtualMachines): 15061 var aiscvpi AzureIaaSComputeVMProtectedItem 15062 err := json.Unmarshal(body, &aiscvpi) 15063 return aiscvpi, err 15064 case string(ProtectedItemTypeAzureIaaSVMProtectedItem): 15065 var aispi AzureIaaSVMProtectedItem 15066 err := json.Unmarshal(body, &aispi) 15067 return aispi, err 15068 case string(ProtectedItemTypeMicrosoftSqlserversdatabases): 15069 var aspi AzureSQLProtectedItem 15070 err := json.Unmarshal(body, &aspi) 15071 return aspi, err 15072 case string(ProtectedItemTypeAzureVMWorkloadProtectedItem): 15073 var avwpi AzureVMWorkloadProtectedItem 15074 err := json.Unmarshal(body, &avwpi) 15075 return avwpi, err 15076 case string(ProtectedItemTypeAzureVMWorkloadSAPAseDatabase): 15077 var avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem 15078 err := json.Unmarshal(body, &avwsadpi) 15079 return avwsadpi, err 15080 case string(ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase): 15081 var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem 15082 err := json.Unmarshal(body, &avwshdpi) 15083 return avwshdpi, err 15084 case string(ProtectedItemTypeAzureVMWorkloadSQLDatabase): 15085 var avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem 15086 err := json.Unmarshal(body, &avwsdpi) 15087 return avwsdpi, err 15088 case string(ProtectedItemTypeDPMProtectedItem): 15089 var dpi DPMProtectedItem 15090 err := json.Unmarshal(body, &dpi) 15091 return dpi, err 15092 case string(ProtectedItemTypeGenericProtectedItem): 15093 var gpi GenericProtectedItem 15094 err := json.Unmarshal(body, &gpi) 15095 return gpi, err 15096 case string(ProtectedItemTypeMabFileFolderProtectedItem): 15097 var mffpi MabFileFolderProtectedItem 15098 err := json.Unmarshal(body, &mffpi) 15099 return mffpi, err 15100 default: 15101 var pi ProtectedItem 15102 err := json.Unmarshal(body, &pi) 15103 return pi, err 15104 } 15105} 15106func unmarshalBasicProtectedItemArray(body []byte) ([]BasicProtectedItem, error) { 15107 var rawMessages []*json.RawMessage 15108 err := json.Unmarshal(body, &rawMessages) 15109 if err != nil { 15110 return nil, err 15111 } 15112 15113 piArray := make([]BasicProtectedItem, len(rawMessages)) 15114 15115 for index, rawMessage := range rawMessages { 15116 pi, err := unmarshalBasicProtectedItem(*rawMessage) 15117 if err != nil { 15118 return nil, err 15119 } 15120 piArray[index] = pi 15121 } 15122 return piArray, nil 15123} 15124 15125// MarshalJSON is the custom marshaler for ProtectedItem. 15126func (pi ProtectedItem) MarshalJSON() ([]byte, error) { 15127 pi.ProtectedItemType = ProtectedItemTypeProtectedItem 15128 objectMap := make(map[string]interface{}) 15129 if pi.BackupManagementType != "" { 15130 objectMap["backupManagementType"] = pi.BackupManagementType 15131 } 15132 if pi.WorkloadType != "" { 15133 objectMap["workloadType"] = pi.WorkloadType 15134 } 15135 if pi.ContainerName != nil { 15136 objectMap["containerName"] = pi.ContainerName 15137 } 15138 if pi.SourceResourceID != nil { 15139 objectMap["sourceResourceId"] = pi.SourceResourceID 15140 } 15141 if pi.PolicyID != nil { 15142 objectMap["policyId"] = pi.PolicyID 15143 } 15144 if pi.LastRecoveryPoint != nil { 15145 objectMap["lastRecoveryPoint"] = pi.LastRecoveryPoint 15146 } 15147 if pi.BackupSetName != nil { 15148 objectMap["backupSetName"] = pi.BackupSetName 15149 } 15150 if pi.CreateMode != "" { 15151 objectMap["createMode"] = pi.CreateMode 15152 } 15153 if pi.DeferredDeleteTimeInUTC != nil { 15154 objectMap["deferredDeleteTimeInUTC"] = pi.DeferredDeleteTimeInUTC 15155 } 15156 if pi.IsScheduledForDeferredDelete != nil { 15157 objectMap["isScheduledForDeferredDelete"] = pi.IsScheduledForDeferredDelete 15158 } 15159 if pi.DeferredDeleteTimeRemaining != nil { 15160 objectMap["deferredDeleteTimeRemaining"] = pi.DeferredDeleteTimeRemaining 15161 } 15162 if pi.IsDeferredDeleteScheduleUpcoming != nil { 15163 objectMap["isDeferredDeleteScheduleUpcoming"] = pi.IsDeferredDeleteScheduleUpcoming 15164 } 15165 if pi.IsRehydrate != nil { 15166 objectMap["isRehydrate"] = pi.IsRehydrate 15167 } 15168 if pi.ProtectedItemType != "" { 15169 objectMap["protectedItemType"] = pi.ProtectedItemType 15170 } 15171 return json.Marshal(objectMap) 15172} 15173 15174// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15175func (pi ProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { 15176 return nil, false 15177} 15178 15179// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15180func (pi ProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { 15181 return nil, false 15182} 15183 15184// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15185func (pi ProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { 15186 return nil, false 15187} 15188 15189// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15190func (pi ProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { 15191 return nil, false 15192} 15193 15194// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15195func (pi ProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { 15196 return nil, false 15197} 15198 15199// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15200func (pi ProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { 15201 return nil, false 15202} 15203 15204// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15205func (pi ProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { 15206 return nil, false 15207} 15208 15209// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15210func (pi ProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { 15211 return nil, false 15212} 15213 15214// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15215func (pi ProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { 15216 return nil, false 15217} 15218 15219// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15220func (pi ProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { 15221 return nil, false 15222} 15223 15224// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15225func (pi ProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { 15226 return nil, false 15227} 15228 15229// AsDPMProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15230func (pi ProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { 15231 return nil, false 15232} 15233 15234// AsGenericProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15235func (pi ProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { 15236 return nil, false 15237} 15238 15239// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15240func (pi ProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { 15241 return nil, false 15242} 15243 15244// AsProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15245func (pi ProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { 15246 return &pi, true 15247} 15248 15249// AsBasicProtectedItem is the BasicProtectedItem implementation for ProtectedItem. 15250func (pi ProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { 15251 return &pi, true 15252} 15253 15254// ProtectedItemQueryObject filters to list backup items. 15255type ProtectedItemQueryObject struct { 15256 // HealthState - Health State for the backed up item. Possible values include: 'HealthStatePassed', 'HealthStateActionRequired', 'HealthStateActionSuggested', 'HealthStateInvalid' 15257 HealthState HealthState `json:"healthState,omitempty"` 15258 // BackupManagementType - Backup management type for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 15259 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 15260 // 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' 15261 ItemType DataSourceType `json:"itemType,omitempty"` 15262 // PolicyName - Backup policy name associated with the backup item. 15263 PolicyName *string `json:"policyName,omitempty"` 15264 // ContainerName - Name of the container. 15265 ContainerName *string `json:"containerName,omitempty"` 15266 // BackupEngineName - Backup Engine name 15267 BackupEngineName *string `json:"backupEngineName,omitempty"` 15268 // FriendlyName - Friendly name of protected item 15269 FriendlyName *string `json:"friendlyName,omitempty"` 15270 // FabricName - Name of the fabric. 15271 FabricName *string `json:"fabricName,omitempty"` 15272 // BackupSetName - Name of the backup set. 15273 BackupSetName *string `json:"backupSetName,omitempty"` 15274} 15275 15276// ProtectedItemResource base class for backup items. 15277type ProtectedItemResource struct { 15278 autorest.Response `json:"-"` 15279 // Properties - ProtectedItemResource properties 15280 Properties BasicProtectedItem `json:"properties,omitempty"` 15281 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 15282 ID *string `json:"id,omitempty"` 15283 // Name - READ-ONLY; Resource name associated with the resource. 15284 Name *string `json:"name,omitempty"` 15285 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 15286 Type *string `json:"type,omitempty"` 15287 // Location - Resource location. 15288 Location *string `json:"location,omitempty"` 15289 // Tags - Resource tags. 15290 Tags map[string]*string `json:"tags"` 15291 // ETag - Optional ETag. 15292 ETag *string `json:"eTag,omitempty"` 15293} 15294 15295// MarshalJSON is the custom marshaler for ProtectedItemResource. 15296func (pir ProtectedItemResource) MarshalJSON() ([]byte, error) { 15297 objectMap := make(map[string]interface{}) 15298 objectMap["properties"] = pir.Properties 15299 if pir.Location != nil { 15300 objectMap["location"] = pir.Location 15301 } 15302 if pir.Tags != nil { 15303 objectMap["tags"] = pir.Tags 15304 } 15305 if pir.ETag != nil { 15306 objectMap["eTag"] = pir.ETag 15307 } 15308 return json.Marshal(objectMap) 15309} 15310 15311// UnmarshalJSON is the custom unmarshaler for ProtectedItemResource struct. 15312func (pir *ProtectedItemResource) UnmarshalJSON(body []byte) error { 15313 var m map[string]*json.RawMessage 15314 err := json.Unmarshal(body, &m) 15315 if err != nil { 15316 return err 15317 } 15318 for k, v := range m { 15319 switch k { 15320 case "properties": 15321 if v != nil { 15322 properties, err := unmarshalBasicProtectedItem(*v) 15323 if err != nil { 15324 return err 15325 } 15326 pir.Properties = properties 15327 } 15328 case "id": 15329 if v != nil { 15330 var ID string 15331 err = json.Unmarshal(*v, &ID) 15332 if err != nil { 15333 return err 15334 } 15335 pir.ID = &ID 15336 } 15337 case "name": 15338 if v != nil { 15339 var name string 15340 err = json.Unmarshal(*v, &name) 15341 if err != nil { 15342 return err 15343 } 15344 pir.Name = &name 15345 } 15346 case "type": 15347 if v != nil { 15348 var typeVar string 15349 err = json.Unmarshal(*v, &typeVar) 15350 if err != nil { 15351 return err 15352 } 15353 pir.Type = &typeVar 15354 } 15355 case "location": 15356 if v != nil { 15357 var location string 15358 err = json.Unmarshal(*v, &location) 15359 if err != nil { 15360 return err 15361 } 15362 pir.Location = &location 15363 } 15364 case "tags": 15365 if v != nil { 15366 var tags map[string]*string 15367 err = json.Unmarshal(*v, &tags) 15368 if err != nil { 15369 return err 15370 } 15371 pir.Tags = tags 15372 } 15373 case "eTag": 15374 if v != nil { 15375 var eTag string 15376 err = json.Unmarshal(*v, &eTag) 15377 if err != nil { 15378 return err 15379 } 15380 pir.ETag = &eTag 15381 } 15382 } 15383 } 15384 15385 return nil 15386} 15387 15388// ProtectedItemResourceList list of ProtectedItem resources 15389type ProtectedItemResourceList struct { 15390 autorest.Response `json:"-"` 15391 // Value - List of resources. 15392 Value *[]ProtectedItemResource `json:"value,omitempty"` 15393 // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. 15394 NextLink *string `json:"nextLink,omitempty"` 15395} 15396 15397// ProtectedItemResourceListIterator provides access to a complete listing of ProtectedItemResource values. 15398type ProtectedItemResourceListIterator struct { 15399 i int 15400 page ProtectedItemResourceListPage 15401} 15402 15403// NextWithContext advances to the next value. If there was an error making 15404// the request the iterator does not advance and the error is returned. 15405func (iter *ProtectedItemResourceListIterator) NextWithContext(ctx context.Context) (err error) { 15406 if tracing.IsEnabled() { 15407 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectedItemResourceListIterator.NextWithContext") 15408 defer func() { 15409 sc := -1 15410 if iter.Response().Response.Response != nil { 15411 sc = iter.Response().Response.Response.StatusCode 15412 } 15413 tracing.EndSpan(ctx, sc, err) 15414 }() 15415 } 15416 iter.i++ 15417 if iter.i < len(iter.page.Values()) { 15418 return nil 15419 } 15420 err = iter.page.NextWithContext(ctx) 15421 if err != nil { 15422 iter.i-- 15423 return err 15424 } 15425 iter.i = 0 15426 return nil 15427} 15428 15429// Next advances to the next value. If there was an error making 15430// the request the iterator does not advance and the error is returned. 15431// Deprecated: Use NextWithContext() instead. 15432func (iter *ProtectedItemResourceListIterator) Next() error { 15433 return iter.NextWithContext(context.Background()) 15434} 15435 15436// NotDone returns true if the enumeration should be started or is not yet complete. 15437func (iter ProtectedItemResourceListIterator) NotDone() bool { 15438 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 15439} 15440 15441// Response returns the raw server response from the last page request. 15442func (iter ProtectedItemResourceListIterator) Response() ProtectedItemResourceList { 15443 return iter.page.Response() 15444} 15445 15446// Value returns the current value or a zero-initialized value if the 15447// iterator has advanced beyond the end of the collection. 15448func (iter ProtectedItemResourceListIterator) Value() ProtectedItemResource { 15449 if !iter.page.NotDone() { 15450 return ProtectedItemResource{} 15451 } 15452 return iter.page.Values()[iter.i] 15453} 15454 15455// Creates a new instance of the ProtectedItemResourceListIterator type. 15456func NewProtectedItemResourceListIterator(page ProtectedItemResourceListPage) ProtectedItemResourceListIterator { 15457 return ProtectedItemResourceListIterator{page: page} 15458} 15459 15460// IsEmpty returns true if the ListResult contains no values. 15461func (pirl ProtectedItemResourceList) IsEmpty() bool { 15462 return pirl.Value == nil || len(*pirl.Value) == 0 15463} 15464 15465// hasNextLink returns true if the NextLink is not empty. 15466func (pirl ProtectedItemResourceList) hasNextLink() bool { 15467 return pirl.NextLink != nil && len(*pirl.NextLink) != 0 15468} 15469 15470// protectedItemResourceListPreparer prepares a request to retrieve the next set of results. 15471// It returns nil if no more results exist. 15472func (pirl ProtectedItemResourceList) protectedItemResourceListPreparer(ctx context.Context) (*http.Request, error) { 15473 if !pirl.hasNextLink() { 15474 return nil, nil 15475 } 15476 return autorest.Prepare((&http.Request{}).WithContext(ctx), 15477 autorest.AsJSON(), 15478 autorest.AsGet(), 15479 autorest.WithBaseURL(to.String(pirl.NextLink))) 15480} 15481 15482// ProtectedItemResourceListPage contains a page of ProtectedItemResource values. 15483type ProtectedItemResourceListPage struct { 15484 fn func(context.Context, ProtectedItemResourceList) (ProtectedItemResourceList, error) 15485 pirl ProtectedItemResourceList 15486} 15487 15488// NextWithContext advances to the next page of values. If there was an error making 15489// the request the page does not advance and the error is returned. 15490func (page *ProtectedItemResourceListPage) NextWithContext(ctx context.Context) (err error) { 15491 if tracing.IsEnabled() { 15492 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectedItemResourceListPage.NextWithContext") 15493 defer func() { 15494 sc := -1 15495 if page.Response().Response.Response != nil { 15496 sc = page.Response().Response.Response.StatusCode 15497 } 15498 tracing.EndSpan(ctx, sc, err) 15499 }() 15500 } 15501 for { 15502 next, err := page.fn(ctx, page.pirl) 15503 if err != nil { 15504 return err 15505 } 15506 page.pirl = next 15507 if !next.hasNextLink() || !next.IsEmpty() { 15508 break 15509 } 15510 } 15511 return nil 15512} 15513 15514// Next advances to the next page of values. If there was an error making 15515// the request the page does not advance and the error is returned. 15516// Deprecated: Use NextWithContext() instead. 15517func (page *ProtectedItemResourceListPage) Next() error { 15518 return page.NextWithContext(context.Background()) 15519} 15520 15521// NotDone returns true if the page enumeration should be started or is not yet complete. 15522func (page ProtectedItemResourceListPage) NotDone() bool { 15523 return !page.pirl.IsEmpty() 15524} 15525 15526// Response returns the raw server response from the last page request. 15527func (page ProtectedItemResourceListPage) Response() ProtectedItemResourceList { 15528 return page.pirl 15529} 15530 15531// Values returns the slice of values for the current page or nil if there are no values. 15532func (page ProtectedItemResourceListPage) Values() []ProtectedItemResource { 15533 if page.pirl.IsEmpty() { 15534 return nil 15535 } 15536 return *page.pirl.Value 15537} 15538 15539// Creates a new instance of the ProtectedItemResourceListPage type. 15540func NewProtectedItemResourceListPage(cur ProtectedItemResourceList, getNextPage func(context.Context, ProtectedItemResourceList) (ProtectedItemResourceList, error)) ProtectedItemResourceListPage { 15541 return ProtectedItemResourceListPage{ 15542 fn: getNextPage, 15543 pirl: cur, 15544 } 15545} 15546 15547// BasicProtectionContainer base class for container with backup items. Containers with specific workloads are derived 15548// from this class. 15549type BasicProtectionContainer interface { 15550 AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) 15551 AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) 15552 AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) 15553 AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) 15554 AsAzureSQLContainer() (*AzureSQLContainer, bool) 15555 AsAzureStorageContainer() (*AzureStorageContainer, bool) 15556 AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) 15557 AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) 15558 AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) 15559 AsDpmContainer() (*DpmContainer, bool) 15560 AsBasicDpmContainer() (BasicDpmContainer, bool) 15561 AsGenericContainer() (*GenericContainer, bool) 15562 AsIaaSVMContainer() (*IaaSVMContainer, bool) 15563 AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) 15564 AsMabContainer() (*MabContainer, bool) 15565 AsProtectionContainer() (*ProtectionContainer, bool) 15566} 15567 15568// ProtectionContainer base class for container with backup items. Containers with specific workloads are 15569// derived from this class. 15570type ProtectionContainer struct { 15571 // FriendlyName - Friendly name of the container. 15572 FriendlyName *string `json:"friendlyName,omitempty"` 15573 // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 15574 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 15575 // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. 15576 RegistrationStatus *string `json:"registrationStatus,omitempty"` 15577 // HealthStatus - Status of health of the container. 15578 HealthStatus *string `json:"healthStatus,omitempty"` 15579 // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' 15580 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` 15581} 15582 15583func unmarshalBasicProtectionContainer(body []byte) (BasicProtectionContainer, error) { 15584 var m map[string]interface{} 15585 err := json.Unmarshal(body, &m) 15586 if err != nil { 15587 return nil, err 15588 } 15589 15590 switch m["containerType"] { 15591 case string(ContainerTypeAzureBackupServerContainer1): 15592 var absc AzureBackupServerContainer 15593 err := json.Unmarshal(body, &absc) 15594 return absc, err 15595 case string(ContainerTypeMicrosoftClassicComputevirtualMachines): 15596 var aisccvc AzureIaaSClassicComputeVMContainer 15597 err := json.Unmarshal(body, &aisccvc) 15598 return aisccvc, err 15599 case string(ContainerTypeMicrosoftComputevirtualMachines): 15600 var aiscvc AzureIaaSComputeVMContainer 15601 err := json.Unmarshal(body, &aiscvc) 15602 return aiscvc, err 15603 case string(ContainerTypeSQLAGWorkLoadContainer1): 15604 var aswcpc AzureSQLAGWorkloadContainerProtectionContainer 15605 err := json.Unmarshal(body, &aswcpc) 15606 return aswcpc, err 15607 case string(ContainerTypeAzureSQLContainer1): 15608 var asc AzureSQLContainer 15609 err := json.Unmarshal(body, &asc) 15610 return asc, err 15611 case string(ContainerTypeStorageContainer1): 15612 var asc AzureStorageContainer 15613 err := json.Unmarshal(body, &asc) 15614 return asc, err 15615 case string(ContainerTypeVMAppContainer1): 15616 var avacpc AzureVMAppContainerProtectionContainer 15617 err := json.Unmarshal(body, &avacpc) 15618 return avacpc, err 15619 case string(ContainerTypeAzureWorkloadContainer): 15620 var awc AzureWorkloadContainer 15621 err := json.Unmarshal(body, &awc) 15622 return awc, err 15623 case string(ContainerTypeDPMContainer1): 15624 var dc DpmContainer 15625 err := json.Unmarshal(body, &dc) 15626 return dc, err 15627 case string(ContainerTypeGenericContainer1): 15628 var gc GenericContainer 15629 err := json.Unmarshal(body, &gc) 15630 return gc, err 15631 case string(ContainerTypeIaaSVMContainer): 15632 var isc IaaSVMContainer 15633 err := json.Unmarshal(body, &isc) 15634 return isc, err 15635 case string(ContainerTypeWindows1): 15636 var mc MabContainer 15637 err := json.Unmarshal(body, &mc) 15638 return mc, err 15639 default: 15640 var pc ProtectionContainer 15641 err := json.Unmarshal(body, &pc) 15642 return pc, err 15643 } 15644} 15645func unmarshalBasicProtectionContainerArray(body []byte) ([]BasicProtectionContainer, error) { 15646 var rawMessages []*json.RawMessage 15647 err := json.Unmarshal(body, &rawMessages) 15648 if err != nil { 15649 return nil, err 15650 } 15651 15652 pcArray := make([]BasicProtectionContainer, len(rawMessages)) 15653 15654 for index, rawMessage := range rawMessages { 15655 pc, err := unmarshalBasicProtectionContainer(*rawMessage) 15656 if err != nil { 15657 return nil, err 15658 } 15659 pcArray[index] = pc 15660 } 15661 return pcArray, nil 15662} 15663 15664// MarshalJSON is the custom marshaler for ProtectionContainer. 15665func (pc ProtectionContainer) MarshalJSON() ([]byte, error) { 15666 pc.ContainerType = ContainerTypeProtectionContainer 15667 objectMap := make(map[string]interface{}) 15668 if pc.FriendlyName != nil { 15669 objectMap["friendlyName"] = pc.FriendlyName 15670 } 15671 if pc.BackupManagementType != "" { 15672 objectMap["backupManagementType"] = pc.BackupManagementType 15673 } 15674 if pc.RegistrationStatus != nil { 15675 objectMap["registrationStatus"] = pc.RegistrationStatus 15676 } 15677 if pc.HealthStatus != nil { 15678 objectMap["healthStatus"] = pc.HealthStatus 15679 } 15680 if pc.ContainerType != "" { 15681 objectMap["containerType"] = pc.ContainerType 15682 } 15683 return json.Marshal(objectMap) 15684} 15685 15686// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15687func (pc ProtectionContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { 15688 return nil, false 15689} 15690 15691// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15692func (pc ProtectionContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { 15693 return nil, false 15694} 15695 15696// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15697func (pc ProtectionContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { 15698 return nil, false 15699} 15700 15701// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15702func (pc ProtectionContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { 15703 return nil, false 15704} 15705 15706// AsAzureSQLContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15707func (pc ProtectionContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { 15708 return nil, false 15709} 15710 15711// AsAzureStorageContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15712func (pc ProtectionContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { 15713 return nil, false 15714} 15715 15716// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15717func (pc ProtectionContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { 15718 return nil, false 15719} 15720 15721// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15722func (pc ProtectionContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { 15723 return nil, false 15724} 15725 15726// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15727func (pc ProtectionContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { 15728 return nil, false 15729} 15730 15731// AsDpmContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15732func (pc ProtectionContainer) AsDpmContainer() (*DpmContainer, bool) { 15733 return nil, false 15734} 15735 15736// AsBasicDpmContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15737func (pc ProtectionContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { 15738 return nil, false 15739} 15740 15741// AsGenericContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15742func (pc ProtectionContainer) AsGenericContainer() (*GenericContainer, bool) { 15743 return nil, false 15744} 15745 15746// AsIaaSVMContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15747func (pc ProtectionContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { 15748 return nil, false 15749} 15750 15751// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15752func (pc ProtectionContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { 15753 return nil, false 15754} 15755 15756// AsMabContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15757func (pc ProtectionContainer) AsMabContainer() (*MabContainer, bool) { 15758 return nil, false 15759} 15760 15761// AsProtectionContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15762func (pc ProtectionContainer) AsProtectionContainer() (*ProtectionContainer, bool) { 15763 return &pc, true 15764} 15765 15766// AsBasicProtectionContainer is the BasicProtectionContainer implementation for ProtectionContainer. 15767func (pc ProtectionContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { 15768 return &pc, true 15769} 15770 15771// ProtectionContainerResource base class for container with backup items. Containers with specific 15772// workloads are derived from this class. 15773type ProtectionContainerResource struct { 15774 autorest.Response `json:"-"` 15775 // Properties - ProtectionContainerResource properties 15776 Properties BasicProtectionContainer `json:"properties,omitempty"` 15777 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 15778 ID *string `json:"id,omitempty"` 15779 // Name - READ-ONLY; Resource name associated with the resource. 15780 Name *string `json:"name,omitempty"` 15781 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 15782 Type *string `json:"type,omitempty"` 15783 // Location - Resource location. 15784 Location *string `json:"location,omitempty"` 15785 // Tags - Resource tags. 15786 Tags map[string]*string `json:"tags"` 15787 // ETag - Optional ETag. 15788 ETag *string `json:"eTag,omitempty"` 15789} 15790 15791// MarshalJSON is the custom marshaler for ProtectionContainerResource. 15792func (pcr ProtectionContainerResource) MarshalJSON() ([]byte, error) { 15793 objectMap := make(map[string]interface{}) 15794 objectMap["properties"] = pcr.Properties 15795 if pcr.Location != nil { 15796 objectMap["location"] = pcr.Location 15797 } 15798 if pcr.Tags != nil { 15799 objectMap["tags"] = pcr.Tags 15800 } 15801 if pcr.ETag != nil { 15802 objectMap["eTag"] = pcr.ETag 15803 } 15804 return json.Marshal(objectMap) 15805} 15806 15807// UnmarshalJSON is the custom unmarshaler for ProtectionContainerResource struct. 15808func (pcr *ProtectionContainerResource) UnmarshalJSON(body []byte) error { 15809 var m map[string]*json.RawMessage 15810 err := json.Unmarshal(body, &m) 15811 if err != nil { 15812 return err 15813 } 15814 for k, v := range m { 15815 switch k { 15816 case "properties": 15817 if v != nil { 15818 properties, err := unmarshalBasicProtectionContainer(*v) 15819 if err != nil { 15820 return err 15821 } 15822 pcr.Properties = properties 15823 } 15824 case "id": 15825 if v != nil { 15826 var ID string 15827 err = json.Unmarshal(*v, &ID) 15828 if err != nil { 15829 return err 15830 } 15831 pcr.ID = &ID 15832 } 15833 case "name": 15834 if v != nil { 15835 var name string 15836 err = json.Unmarshal(*v, &name) 15837 if err != nil { 15838 return err 15839 } 15840 pcr.Name = &name 15841 } 15842 case "type": 15843 if v != nil { 15844 var typeVar string 15845 err = json.Unmarshal(*v, &typeVar) 15846 if err != nil { 15847 return err 15848 } 15849 pcr.Type = &typeVar 15850 } 15851 case "location": 15852 if v != nil { 15853 var location string 15854 err = json.Unmarshal(*v, &location) 15855 if err != nil { 15856 return err 15857 } 15858 pcr.Location = &location 15859 } 15860 case "tags": 15861 if v != nil { 15862 var tags map[string]*string 15863 err = json.Unmarshal(*v, &tags) 15864 if err != nil { 15865 return err 15866 } 15867 pcr.Tags = tags 15868 } 15869 case "eTag": 15870 if v != nil { 15871 var eTag string 15872 err = json.Unmarshal(*v, &eTag) 15873 if err != nil { 15874 return err 15875 } 15876 pcr.ETag = &eTag 15877 } 15878 } 15879 } 15880 15881 return nil 15882} 15883 15884// ProtectionContainerResourceList list of ProtectionContainer resources 15885type ProtectionContainerResourceList struct { 15886 autorest.Response `json:"-"` 15887 // Value - List of resources. 15888 Value *[]ProtectionContainerResource `json:"value,omitempty"` 15889 // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. 15890 NextLink *string `json:"nextLink,omitempty"` 15891} 15892 15893// ProtectionContainerResourceListIterator provides access to a complete listing of 15894// ProtectionContainerResource values. 15895type ProtectionContainerResourceListIterator struct { 15896 i int 15897 page ProtectionContainerResourceListPage 15898} 15899 15900// NextWithContext advances to the next value. If there was an error making 15901// the request the iterator does not advance and the error is returned. 15902func (iter *ProtectionContainerResourceListIterator) NextWithContext(ctx context.Context) (err error) { 15903 if tracing.IsEnabled() { 15904 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerResourceListIterator.NextWithContext") 15905 defer func() { 15906 sc := -1 15907 if iter.Response().Response.Response != nil { 15908 sc = iter.Response().Response.Response.StatusCode 15909 } 15910 tracing.EndSpan(ctx, sc, err) 15911 }() 15912 } 15913 iter.i++ 15914 if iter.i < len(iter.page.Values()) { 15915 return nil 15916 } 15917 err = iter.page.NextWithContext(ctx) 15918 if err != nil { 15919 iter.i-- 15920 return err 15921 } 15922 iter.i = 0 15923 return nil 15924} 15925 15926// Next advances to the next value. If there was an error making 15927// the request the iterator does not advance and the error is returned. 15928// Deprecated: Use NextWithContext() instead. 15929func (iter *ProtectionContainerResourceListIterator) Next() error { 15930 return iter.NextWithContext(context.Background()) 15931} 15932 15933// NotDone returns true if the enumeration should be started or is not yet complete. 15934func (iter ProtectionContainerResourceListIterator) NotDone() bool { 15935 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 15936} 15937 15938// Response returns the raw server response from the last page request. 15939func (iter ProtectionContainerResourceListIterator) Response() ProtectionContainerResourceList { 15940 return iter.page.Response() 15941} 15942 15943// Value returns the current value or a zero-initialized value if the 15944// iterator has advanced beyond the end of the collection. 15945func (iter ProtectionContainerResourceListIterator) Value() ProtectionContainerResource { 15946 if !iter.page.NotDone() { 15947 return ProtectionContainerResource{} 15948 } 15949 return iter.page.Values()[iter.i] 15950} 15951 15952// Creates a new instance of the ProtectionContainerResourceListIterator type. 15953func NewProtectionContainerResourceListIterator(page ProtectionContainerResourceListPage) ProtectionContainerResourceListIterator { 15954 return ProtectionContainerResourceListIterator{page: page} 15955} 15956 15957// IsEmpty returns true if the ListResult contains no values. 15958func (pcrl ProtectionContainerResourceList) IsEmpty() bool { 15959 return pcrl.Value == nil || len(*pcrl.Value) == 0 15960} 15961 15962// hasNextLink returns true if the NextLink is not empty. 15963func (pcrl ProtectionContainerResourceList) hasNextLink() bool { 15964 return pcrl.NextLink != nil && len(*pcrl.NextLink) != 0 15965} 15966 15967// protectionContainerResourceListPreparer prepares a request to retrieve the next set of results. 15968// It returns nil if no more results exist. 15969func (pcrl ProtectionContainerResourceList) protectionContainerResourceListPreparer(ctx context.Context) (*http.Request, error) { 15970 if !pcrl.hasNextLink() { 15971 return nil, nil 15972 } 15973 return autorest.Prepare((&http.Request{}).WithContext(ctx), 15974 autorest.AsJSON(), 15975 autorest.AsGet(), 15976 autorest.WithBaseURL(to.String(pcrl.NextLink))) 15977} 15978 15979// ProtectionContainerResourceListPage contains a page of ProtectionContainerResource values. 15980type ProtectionContainerResourceListPage struct { 15981 fn func(context.Context, ProtectionContainerResourceList) (ProtectionContainerResourceList, error) 15982 pcrl ProtectionContainerResourceList 15983} 15984 15985// NextWithContext advances to the next page of values. If there was an error making 15986// the request the page does not advance and the error is returned. 15987func (page *ProtectionContainerResourceListPage) NextWithContext(ctx context.Context) (err error) { 15988 if tracing.IsEnabled() { 15989 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerResourceListPage.NextWithContext") 15990 defer func() { 15991 sc := -1 15992 if page.Response().Response.Response != nil { 15993 sc = page.Response().Response.Response.StatusCode 15994 } 15995 tracing.EndSpan(ctx, sc, err) 15996 }() 15997 } 15998 for { 15999 next, err := page.fn(ctx, page.pcrl) 16000 if err != nil { 16001 return err 16002 } 16003 page.pcrl = next 16004 if !next.hasNextLink() || !next.IsEmpty() { 16005 break 16006 } 16007 } 16008 return nil 16009} 16010 16011// Next advances to the next page of values. If there was an error making 16012// the request the page does not advance and the error is returned. 16013// Deprecated: Use NextWithContext() instead. 16014func (page *ProtectionContainerResourceListPage) Next() error { 16015 return page.NextWithContext(context.Background()) 16016} 16017 16018// NotDone returns true if the page enumeration should be started or is not yet complete. 16019func (page ProtectionContainerResourceListPage) NotDone() bool { 16020 return !page.pcrl.IsEmpty() 16021} 16022 16023// Response returns the raw server response from the last page request. 16024func (page ProtectionContainerResourceListPage) Response() ProtectionContainerResourceList { 16025 return page.pcrl 16026} 16027 16028// Values returns the slice of values for the current page or nil if there are no values. 16029func (page ProtectionContainerResourceListPage) Values() []ProtectionContainerResource { 16030 if page.pcrl.IsEmpty() { 16031 return nil 16032 } 16033 return *page.pcrl.Value 16034} 16035 16036// Creates a new instance of the ProtectionContainerResourceListPage type. 16037func NewProtectionContainerResourceListPage(cur ProtectionContainerResourceList, getNextPage func(context.Context, ProtectionContainerResourceList) (ProtectionContainerResourceList, error)) ProtectionContainerResourceListPage { 16038 return ProtectionContainerResourceListPage{ 16039 fn: getNextPage, 16040 pcrl: cur, 16041 } 16042} 16043 16044// BasicProtectionIntent base class for backup ProtectionIntent. 16045type BasicProtectionIntent interface { 16046 AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) 16047 AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) 16048 AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) 16049 AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) 16050 AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) 16051 AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) 16052 AsProtectionIntent() (*ProtectionIntent, bool) 16053} 16054 16055// ProtectionIntent base class for backup ProtectionIntent. 16056type ProtectionIntent struct { 16057 // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 16058 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 16059 // SourceResourceID - ARM ID of the resource to be backed up. 16060 SourceResourceID *string `json:"sourceResourceId,omitempty"` 16061 // ItemID - ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId 16062 ItemID *string `json:"itemId,omitempty"` 16063 // PolicyID - ID of the backup policy with which this item is backed up. 16064 PolicyID *string `json:"policyId,omitempty"` 16065 // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 16066 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 16067 // ProtectionIntentItemType - Possible values include: 'ProtectionIntentItemTypeProtectionIntent', 'ProtectionIntentItemTypeRecoveryServiceVaultItem', 'ProtectionIntentItemTypeAzureResourceItem', 'ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent', 'ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent' 16068 ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"` 16069} 16070 16071func unmarshalBasicProtectionIntent(body []byte) (BasicProtectionIntent, error) { 16072 var m map[string]interface{} 16073 err := json.Unmarshal(body, &m) 16074 if err != nil { 16075 return nil, err 16076 } 16077 16078 switch m["protectionIntentItemType"] { 16079 case string(ProtectionIntentItemTypeRecoveryServiceVaultItem): 16080 var arsvpi AzureRecoveryServiceVaultProtectionIntent 16081 err := json.Unmarshal(body, &arsvpi) 16082 return arsvpi, err 16083 case string(ProtectionIntentItemTypeAzureResourceItem): 16084 var arpi AzureResourceProtectionIntent 16085 err := json.Unmarshal(body, &arpi) 16086 return arpi, err 16087 case string(ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent): 16088 var awapi AzureWorkloadAutoProtectionIntent 16089 err := json.Unmarshal(body, &awapi) 16090 return awapi, err 16091 case string(ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent): 16092 var awsapi AzureWorkloadSQLAutoProtectionIntent 16093 err := json.Unmarshal(body, &awsapi) 16094 return awsapi, err 16095 default: 16096 var pi ProtectionIntent 16097 err := json.Unmarshal(body, &pi) 16098 return pi, err 16099 } 16100} 16101func unmarshalBasicProtectionIntentArray(body []byte) ([]BasicProtectionIntent, error) { 16102 var rawMessages []*json.RawMessage 16103 err := json.Unmarshal(body, &rawMessages) 16104 if err != nil { 16105 return nil, err 16106 } 16107 16108 piArray := make([]BasicProtectionIntent, len(rawMessages)) 16109 16110 for index, rawMessage := range rawMessages { 16111 pi, err := unmarshalBasicProtectionIntent(*rawMessage) 16112 if err != nil { 16113 return nil, err 16114 } 16115 piArray[index] = pi 16116 } 16117 return piArray, nil 16118} 16119 16120// MarshalJSON is the custom marshaler for ProtectionIntent. 16121func (pi ProtectionIntent) MarshalJSON() ([]byte, error) { 16122 pi.ProtectionIntentItemType = ProtectionIntentItemTypeProtectionIntent 16123 objectMap := make(map[string]interface{}) 16124 if pi.BackupManagementType != "" { 16125 objectMap["backupManagementType"] = pi.BackupManagementType 16126 } 16127 if pi.SourceResourceID != nil { 16128 objectMap["sourceResourceId"] = pi.SourceResourceID 16129 } 16130 if pi.ItemID != nil { 16131 objectMap["itemId"] = pi.ItemID 16132 } 16133 if pi.PolicyID != nil { 16134 objectMap["policyId"] = pi.PolicyID 16135 } 16136 if pi.ProtectionState != "" { 16137 objectMap["protectionState"] = pi.ProtectionState 16138 } 16139 if pi.ProtectionIntentItemType != "" { 16140 objectMap["protectionIntentItemType"] = pi.ProtectionIntentItemType 16141 } 16142 return json.Marshal(objectMap) 16143} 16144 16145// AsAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. 16146func (pi ProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) { 16147 return nil, false 16148} 16149 16150// AsBasicAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. 16151func (pi ProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) { 16152 return nil, false 16153} 16154 16155// AsAzureResourceProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. 16156func (pi ProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) { 16157 return nil, false 16158} 16159 16160// AsAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. 16161func (pi ProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) { 16162 return nil, false 16163} 16164 16165// AsBasicAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. 16166func (pi ProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) { 16167 return nil, false 16168} 16169 16170// AsAzureWorkloadSQLAutoProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. 16171func (pi ProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) { 16172 return nil, false 16173} 16174 16175// AsProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. 16176func (pi ProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) { 16177 return &pi, true 16178} 16179 16180// AsBasicProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. 16181func (pi ProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) { 16182 return &pi, true 16183} 16184 16185// ProtectionIntentQueryObject filters to list protection intent. 16186type ProtectionIntentQueryObject struct { 16187 // BackupManagementType - Backup management type for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 16188 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 16189 // ItemType - Type of workload this item represents. Possible values include: 'IntentItemTypeInvalid', 'IntentItemTypeSQLInstance', 'IntentItemTypeSQLAvailabilityGroupContainer' 16190 ItemType IntentItemType `json:"itemType,omitempty"` 16191 // ParentName - Parent name of the intent 16192 ParentName *string `json:"parentName,omitempty"` 16193 // ItemName - Item name of the intent 16194 ItemName *string `json:"itemName,omitempty"` 16195} 16196 16197// ProtectionIntentResource base class for backup ProtectionIntent. 16198type ProtectionIntentResource struct { 16199 autorest.Response `json:"-"` 16200 // Properties - ProtectionIntentResource properties 16201 Properties BasicProtectionIntent `json:"properties,omitempty"` 16202 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 16203 ID *string `json:"id,omitempty"` 16204 // Name - READ-ONLY; Resource name associated with the resource. 16205 Name *string `json:"name,omitempty"` 16206 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 16207 Type *string `json:"type,omitempty"` 16208 // Location - Resource location. 16209 Location *string `json:"location,omitempty"` 16210 // Tags - Resource tags. 16211 Tags map[string]*string `json:"tags"` 16212 // ETag - Optional ETag. 16213 ETag *string `json:"eTag,omitempty"` 16214} 16215 16216// MarshalJSON is the custom marshaler for ProtectionIntentResource. 16217func (pir ProtectionIntentResource) MarshalJSON() ([]byte, error) { 16218 objectMap := make(map[string]interface{}) 16219 objectMap["properties"] = pir.Properties 16220 if pir.Location != nil { 16221 objectMap["location"] = pir.Location 16222 } 16223 if pir.Tags != nil { 16224 objectMap["tags"] = pir.Tags 16225 } 16226 if pir.ETag != nil { 16227 objectMap["eTag"] = pir.ETag 16228 } 16229 return json.Marshal(objectMap) 16230} 16231 16232// UnmarshalJSON is the custom unmarshaler for ProtectionIntentResource struct. 16233func (pir *ProtectionIntentResource) UnmarshalJSON(body []byte) error { 16234 var m map[string]*json.RawMessage 16235 err := json.Unmarshal(body, &m) 16236 if err != nil { 16237 return err 16238 } 16239 for k, v := range m { 16240 switch k { 16241 case "properties": 16242 if v != nil { 16243 properties, err := unmarshalBasicProtectionIntent(*v) 16244 if err != nil { 16245 return err 16246 } 16247 pir.Properties = properties 16248 } 16249 case "id": 16250 if v != nil { 16251 var ID string 16252 err = json.Unmarshal(*v, &ID) 16253 if err != nil { 16254 return err 16255 } 16256 pir.ID = &ID 16257 } 16258 case "name": 16259 if v != nil { 16260 var name string 16261 err = json.Unmarshal(*v, &name) 16262 if err != nil { 16263 return err 16264 } 16265 pir.Name = &name 16266 } 16267 case "type": 16268 if v != nil { 16269 var typeVar string 16270 err = json.Unmarshal(*v, &typeVar) 16271 if err != nil { 16272 return err 16273 } 16274 pir.Type = &typeVar 16275 } 16276 case "location": 16277 if v != nil { 16278 var location string 16279 err = json.Unmarshal(*v, &location) 16280 if err != nil { 16281 return err 16282 } 16283 pir.Location = &location 16284 } 16285 case "tags": 16286 if v != nil { 16287 var tags map[string]*string 16288 err = json.Unmarshal(*v, &tags) 16289 if err != nil { 16290 return err 16291 } 16292 pir.Tags = tags 16293 } 16294 case "eTag": 16295 if v != nil { 16296 var eTag string 16297 err = json.Unmarshal(*v, &eTag) 16298 if err != nil { 16299 return err 16300 } 16301 pir.ETag = &eTag 16302 } 16303 } 16304 } 16305 16306 return nil 16307} 16308 16309// ProtectionIntentResourceList list of ProtectionIntent resources 16310type ProtectionIntentResourceList struct { 16311 autorest.Response `json:"-"` 16312 // Value - List of resources. 16313 Value *[]ProtectionIntentResource `json:"value,omitempty"` 16314 // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. 16315 NextLink *string `json:"nextLink,omitempty"` 16316} 16317 16318// ProtectionIntentResourceListIterator provides access to a complete listing of ProtectionIntentResource 16319// values. 16320type ProtectionIntentResourceListIterator struct { 16321 i int 16322 page ProtectionIntentResourceListPage 16323} 16324 16325// NextWithContext advances to the next value. If there was an error making 16326// the request the iterator does not advance and the error is returned. 16327func (iter *ProtectionIntentResourceListIterator) NextWithContext(ctx context.Context) (err error) { 16328 if tracing.IsEnabled() { 16329 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionIntentResourceListIterator.NextWithContext") 16330 defer func() { 16331 sc := -1 16332 if iter.Response().Response.Response != nil { 16333 sc = iter.Response().Response.Response.StatusCode 16334 } 16335 tracing.EndSpan(ctx, sc, err) 16336 }() 16337 } 16338 iter.i++ 16339 if iter.i < len(iter.page.Values()) { 16340 return nil 16341 } 16342 err = iter.page.NextWithContext(ctx) 16343 if err != nil { 16344 iter.i-- 16345 return err 16346 } 16347 iter.i = 0 16348 return nil 16349} 16350 16351// Next advances to the next value. If there was an error making 16352// the request the iterator does not advance and the error is returned. 16353// Deprecated: Use NextWithContext() instead. 16354func (iter *ProtectionIntentResourceListIterator) Next() error { 16355 return iter.NextWithContext(context.Background()) 16356} 16357 16358// NotDone returns true if the enumeration should be started or is not yet complete. 16359func (iter ProtectionIntentResourceListIterator) NotDone() bool { 16360 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 16361} 16362 16363// Response returns the raw server response from the last page request. 16364func (iter ProtectionIntentResourceListIterator) Response() ProtectionIntentResourceList { 16365 return iter.page.Response() 16366} 16367 16368// Value returns the current value or a zero-initialized value if the 16369// iterator has advanced beyond the end of the collection. 16370func (iter ProtectionIntentResourceListIterator) Value() ProtectionIntentResource { 16371 if !iter.page.NotDone() { 16372 return ProtectionIntentResource{} 16373 } 16374 return iter.page.Values()[iter.i] 16375} 16376 16377// Creates a new instance of the ProtectionIntentResourceListIterator type. 16378func NewProtectionIntentResourceListIterator(page ProtectionIntentResourceListPage) ProtectionIntentResourceListIterator { 16379 return ProtectionIntentResourceListIterator{page: page} 16380} 16381 16382// IsEmpty returns true if the ListResult contains no values. 16383func (pirl ProtectionIntentResourceList) IsEmpty() bool { 16384 return pirl.Value == nil || len(*pirl.Value) == 0 16385} 16386 16387// hasNextLink returns true if the NextLink is not empty. 16388func (pirl ProtectionIntentResourceList) hasNextLink() bool { 16389 return pirl.NextLink != nil && len(*pirl.NextLink) != 0 16390} 16391 16392// protectionIntentResourceListPreparer prepares a request to retrieve the next set of results. 16393// It returns nil if no more results exist. 16394func (pirl ProtectionIntentResourceList) protectionIntentResourceListPreparer(ctx context.Context) (*http.Request, error) { 16395 if !pirl.hasNextLink() { 16396 return nil, nil 16397 } 16398 return autorest.Prepare((&http.Request{}).WithContext(ctx), 16399 autorest.AsJSON(), 16400 autorest.AsGet(), 16401 autorest.WithBaseURL(to.String(pirl.NextLink))) 16402} 16403 16404// ProtectionIntentResourceListPage contains a page of ProtectionIntentResource values. 16405type ProtectionIntentResourceListPage struct { 16406 fn func(context.Context, ProtectionIntentResourceList) (ProtectionIntentResourceList, error) 16407 pirl ProtectionIntentResourceList 16408} 16409 16410// NextWithContext advances to the next page of values. If there was an error making 16411// the request the page does not advance and the error is returned. 16412func (page *ProtectionIntentResourceListPage) NextWithContext(ctx context.Context) (err error) { 16413 if tracing.IsEnabled() { 16414 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionIntentResourceListPage.NextWithContext") 16415 defer func() { 16416 sc := -1 16417 if page.Response().Response.Response != nil { 16418 sc = page.Response().Response.Response.StatusCode 16419 } 16420 tracing.EndSpan(ctx, sc, err) 16421 }() 16422 } 16423 for { 16424 next, err := page.fn(ctx, page.pirl) 16425 if err != nil { 16426 return err 16427 } 16428 page.pirl = next 16429 if !next.hasNextLink() || !next.IsEmpty() { 16430 break 16431 } 16432 } 16433 return nil 16434} 16435 16436// Next advances to the next page of values. If there was an error making 16437// the request the page does not advance and the error is returned. 16438// Deprecated: Use NextWithContext() instead. 16439func (page *ProtectionIntentResourceListPage) Next() error { 16440 return page.NextWithContext(context.Background()) 16441} 16442 16443// NotDone returns true if the page enumeration should be started or is not yet complete. 16444func (page ProtectionIntentResourceListPage) NotDone() bool { 16445 return !page.pirl.IsEmpty() 16446} 16447 16448// Response returns the raw server response from the last page request. 16449func (page ProtectionIntentResourceListPage) Response() ProtectionIntentResourceList { 16450 return page.pirl 16451} 16452 16453// Values returns the slice of values for the current page or nil if there are no values. 16454func (page ProtectionIntentResourceListPage) Values() []ProtectionIntentResource { 16455 if page.pirl.IsEmpty() { 16456 return nil 16457 } 16458 return *page.pirl.Value 16459} 16460 16461// Creates a new instance of the ProtectionIntentResourceListPage type. 16462func NewProtectionIntentResourceListPage(cur ProtectionIntentResourceList, getNextPage func(context.Context, ProtectionIntentResourceList) (ProtectionIntentResourceList, error)) ProtectionIntentResourceListPage { 16463 return ProtectionIntentResourceListPage{ 16464 fn: getNextPage, 16465 pirl: cur, 16466 } 16467} 16468 16469// BasicProtectionPolicy base class for backup policy. Workload-specific backup policies are derived from this class. 16470type BasicProtectionPolicy interface { 16471 AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) 16472 AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) 16473 AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) 16474 AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) 16475 AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) 16476 AsMabProtectionPolicy() (*MabProtectionPolicy, bool) 16477 AsProtectionPolicy() (*ProtectionPolicy, bool) 16478} 16479 16480// ProtectionPolicy base class for backup policy. Workload-specific backup policies are derived from this 16481// class. 16482type ProtectionPolicy struct { 16483 // ProtectedItemsCount - Number of items associated with this policy. 16484 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` 16485 // BackupManagementType - Possible values include: 'BackupManagementTypeProtectionPolicy', 'BackupManagementTypeAzureWorkload', 'BackupManagementTypeAzureStorage', 'BackupManagementTypeAzureIaasVM', 'BackupManagementTypeAzureSQL', 'BackupManagementTypeGenericProtectionPolicy', 'BackupManagementTypeMAB' 16486 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"` 16487} 16488 16489func unmarshalBasicProtectionPolicy(body []byte) (BasicProtectionPolicy, error) { 16490 var m map[string]interface{} 16491 err := json.Unmarshal(body, &m) 16492 if err != nil { 16493 return nil, err 16494 } 16495 16496 switch m["backupManagementType"] { 16497 case string(BackupManagementTypeAzureWorkload): 16498 var avwpp AzureVMWorkloadProtectionPolicy 16499 err := json.Unmarshal(body, &avwpp) 16500 return avwpp, err 16501 case string(BackupManagementTypeAzureStorage): 16502 var afspp AzureFileShareProtectionPolicy 16503 err := json.Unmarshal(body, &afspp) 16504 return afspp, err 16505 case string(BackupManagementTypeAzureIaasVM): 16506 var aispp AzureIaaSVMProtectionPolicy 16507 err := json.Unmarshal(body, &aispp) 16508 return aispp, err 16509 case string(BackupManagementTypeAzureSQL): 16510 var aspp AzureSQLProtectionPolicy 16511 err := json.Unmarshal(body, &aspp) 16512 return aspp, err 16513 case string(BackupManagementTypeGenericProtectionPolicy): 16514 var gpp GenericProtectionPolicy 16515 err := json.Unmarshal(body, &gpp) 16516 return gpp, err 16517 case string(BackupManagementTypeMAB): 16518 var mpp MabProtectionPolicy 16519 err := json.Unmarshal(body, &mpp) 16520 return mpp, err 16521 default: 16522 var pp ProtectionPolicy 16523 err := json.Unmarshal(body, &pp) 16524 return pp, err 16525 } 16526} 16527func unmarshalBasicProtectionPolicyArray(body []byte) ([]BasicProtectionPolicy, error) { 16528 var rawMessages []*json.RawMessage 16529 err := json.Unmarshal(body, &rawMessages) 16530 if err != nil { 16531 return nil, err 16532 } 16533 16534 ppArray := make([]BasicProtectionPolicy, len(rawMessages)) 16535 16536 for index, rawMessage := range rawMessages { 16537 pp, err := unmarshalBasicProtectionPolicy(*rawMessage) 16538 if err != nil { 16539 return nil, err 16540 } 16541 ppArray[index] = pp 16542 } 16543 return ppArray, nil 16544} 16545 16546// MarshalJSON is the custom marshaler for ProtectionPolicy. 16547func (pp ProtectionPolicy) MarshalJSON() ([]byte, error) { 16548 pp.BackupManagementType = BackupManagementTypeProtectionPolicy 16549 objectMap := make(map[string]interface{}) 16550 if pp.ProtectedItemsCount != nil { 16551 objectMap["protectedItemsCount"] = pp.ProtectedItemsCount 16552 } 16553 if pp.BackupManagementType != "" { 16554 objectMap["backupManagementType"] = pp.BackupManagementType 16555 } 16556 return json.Marshal(objectMap) 16557} 16558 16559// AsAzureVMWorkloadProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. 16560func (pp ProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) { 16561 return nil, false 16562} 16563 16564// AsAzureFileShareProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. 16565func (pp ProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) { 16566 return nil, false 16567} 16568 16569// AsAzureIaaSVMProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. 16570func (pp ProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) { 16571 return nil, false 16572} 16573 16574// AsAzureSQLProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. 16575func (pp ProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) { 16576 return nil, false 16577} 16578 16579// AsGenericProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. 16580func (pp ProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) { 16581 return nil, false 16582} 16583 16584// AsMabProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. 16585func (pp ProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) { 16586 return nil, false 16587} 16588 16589// AsProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. 16590func (pp ProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) { 16591 return &pp, true 16592} 16593 16594// AsBasicProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. 16595func (pp ProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) { 16596 return &pp, true 16597} 16598 16599// ProtectionPolicyQueryObject filters the list backup policies API. 16600type ProtectionPolicyQueryObject struct { 16601 // BackupManagementType - Backup management type for the backup policy. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' 16602 BackupManagementType ManagementType `json:"backupManagementType,omitempty"` 16603 // FabricName - Fabric name for filter 16604 FabricName *string `json:"fabricName,omitempty"` 16605 // 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' 16606 WorkloadType WorkloadType `json:"workloadType,omitempty"` 16607} 16608 16609// ProtectionPolicyResource base class for backup policy. Workload-specific backup policies are derived 16610// from this class. 16611type ProtectionPolicyResource struct { 16612 autorest.Response `json:"-"` 16613 // Properties - ProtectionPolicyResource properties 16614 Properties BasicProtectionPolicy `json:"properties,omitempty"` 16615 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 16616 ID *string `json:"id,omitempty"` 16617 // Name - READ-ONLY; Resource name associated with the resource. 16618 Name *string `json:"name,omitempty"` 16619 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 16620 Type *string `json:"type,omitempty"` 16621 // Location - Resource location. 16622 Location *string `json:"location,omitempty"` 16623 // Tags - Resource tags. 16624 Tags map[string]*string `json:"tags"` 16625 // ETag - Optional ETag. 16626 ETag *string `json:"eTag,omitempty"` 16627} 16628 16629// MarshalJSON is the custom marshaler for ProtectionPolicyResource. 16630func (ppr ProtectionPolicyResource) MarshalJSON() ([]byte, error) { 16631 objectMap := make(map[string]interface{}) 16632 objectMap["properties"] = ppr.Properties 16633 if ppr.Location != nil { 16634 objectMap["location"] = ppr.Location 16635 } 16636 if ppr.Tags != nil { 16637 objectMap["tags"] = ppr.Tags 16638 } 16639 if ppr.ETag != nil { 16640 objectMap["eTag"] = ppr.ETag 16641 } 16642 return json.Marshal(objectMap) 16643} 16644 16645// UnmarshalJSON is the custom unmarshaler for ProtectionPolicyResource struct. 16646func (ppr *ProtectionPolicyResource) UnmarshalJSON(body []byte) error { 16647 var m map[string]*json.RawMessage 16648 err := json.Unmarshal(body, &m) 16649 if err != nil { 16650 return err 16651 } 16652 for k, v := range m { 16653 switch k { 16654 case "properties": 16655 if v != nil { 16656 properties, err := unmarshalBasicProtectionPolicy(*v) 16657 if err != nil { 16658 return err 16659 } 16660 ppr.Properties = properties 16661 } 16662 case "id": 16663 if v != nil { 16664 var ID string 16665 err = json.Unmarshal(*v, &ID) 16666 if err != nil { 16667 return err 16668 } 16669 ppr.ID = &ID 16670 } 16671 case "name": 16672 if v != nil { 16673 var name string 16674 err = json.Unmarshal(*v, &name) 16675 if err != nil { 16676 return err 16677 } 16678 ppr.Name = &name 16679 } 16680 case "type": 16681 if v != nil { 16682 var typeVar string 16683 err = json.Unmarshal(*v, &typeVar) 16684 if err != nil { 16685 return err 16686 } 16687 ppr.Type = &typeVar 16688 } 16689 case "location": 16690 if v != nil { 16691 var location string 16692 err = json.Unmarshal(*v, &location) 16693 if err != nil { 16694 return err 16695 } 16696 ppr.Location = &location 16697 } 16698 case "tags": 16699 if v != nil { 16700 var tags map[string]*string 16701 err = json.Unmarshal(*v, &tags) 16702 if err != nil { 16703 return err 16704 } 16705 ppr.Tags = tags 16706 } 16707 case "eTag": 16708 if v != nil { 16709 var eTag string 16710 err = json.Unmarshal(*v, &eTag) 16711 if err != nil { 16712 return err 16713 } 16714 ppr.ETag = &eTag 16715 } 16716 } 16717 } 16718 16719 return nil 16720} 16721 16722// ProtectionPolicyResourceList list of ProtectionPolicy resources 16723type ProtectionPolicyResourceList struct { 16724 autorest.Response `json:"-"` 16725 // Value - List of resources. 16726 Value *[]ProtectionPolicyResource `json:"value,omitempty"` 16727 // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. 16728 NextLink *string `json:"nextLink,omitempty"` 16729} 16730 16731// ProtectionPolicyResourceListIterator provides access to a complete listing of ProtectionPolicyResource 16732// values. 16733type ProtectionPolicyResourceListIterator struct { 16734 i int 16735 page ProtectionPolicyResourceListPage 16736} 16737 16738// NextWithContext advances to the next value. If there was an error making 16739// the request the iterator does not advance and the error is returned. 16740func (iter *ProtectionPolicyResourceListIterator) NextWithContext(ctx context.Context) (err error) { 16741 if tracing.IsEnabled() { 16742 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionPolicyResourceListIterator.NextWithContext") 16743 defer func() { 16744 sc := -1 16745 if iter.Response().Response.Response != nil { 16746 sc = iter.Response().Response.Response.StatusCode 16747 } 16748 tracing.EndSpan(ctx, sc, err) 16749 }() 16750 } 16751 iter.i++ 16752 if iter.i < len(iter.page.Values()) { 16753 return nil 16754 } 16755 err = iter.page.NextWithContext(ctx) 16756 if err != nil { 16757 iter.i-- 16758 return err 16759 } 16760 iter.i = 0 16761 return nil 16762} 16763 16764// Next advances to the next value. If there was an error making 16765// the request the iterator does not advance and the error is returned. 16766// Deprecated: Use NextWithContext() instead. 16767func (iter *ProtectionPolicyResourceListIterator) Next() error { 16768 return iter.NextWithContext(context.Background()) 16769} 16770 16771// NotDone returns true if the enumeration should be started or is not yet complete. 16772func (iter ProtectionPolicyResourceListIterator) NotDone() bool { 16773 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 16774} 16775 16776// Response returns the raw server response from the last page request. 16777func (iter ProtectionPolicyResourceListIterator) Response() ProtectionPolicyResourceList { 16778 return iter.page.Response() 16779} 16780 16781// Value returns the current value or a zero-initialized value if the 16782// iterator has advanced beyond the end of the collection. 16783func (iter ProtectionPolicyResourceListIterator) Value() ProtectionPolicyResource { 16784 if !iter.page.NotDone() { 16785 return ProtectionPolicyResource{} 16786 } 16787 return iter.page.Values()[iter.i] 16788} 16789 16790// Creates a new instance of the ProtectionPolicyResourceListIterator type. 16791func NewProtectionPolicyResourceListIterator(page ProtectionPolicyResourceListPage) ProtectionPolicyResourceListIterator { 16792 return ProtectionPolicyResourceListIterator{page: page} 16793} 16794 16795// IsEmpty returns true if the ListResult contains no values. 16796func (pprl ProtectionPolicyResourceList) IsEmpty() bool { 16797 return pprl.Value == nil || len(*pprl.Value) == 0 16798} 16799 16800// hasNextLink returns true if the NextLink is not empty. 16801func (pprl ProtectionPolicyResourceList) hasNextLink() bool { 16802 return pprl.NextLink != nil && len(*pprl.NextLink) != 0 16803} 16804 16805// protectionPolicyResourceListPreparer prepares a request to retrieve the next set of results. 16806// It returns nil if no more results exist. 16807func (pprl ProtectionPolicyResourceList) protectionPolicyResourceListPreparer(ctx context.Context) (*http.Request, error) { 16808 if !pprl.hasNextLink() { 16809 return nil, nil 16810 } 16811 return autorest.Prepare((&http.Request{}).WithContext(ctx), 16812 autorest.AsJSON(), 16813 autorest.AsGet(), 16814 autorest.WithBaseURL(to.String(pprl.NextLink))) 16815} 16816 16817// ProtectionPolicyResourceListPage contains a page of ProtectionPolicyResource values. 16818type ProtectionPolicyResourceListPage struct { 16819 fn func(context.Context, ProtectionPolicyResourceList) (ProtectionPolicyResourceList, error) 16820 pprl ProtectionPolicyResourceList 16821} 16822 16823// NextWithContext advances to the next page of values. If there was an error making 16824// the request the page does not advance and the error is returned. 16825func (page *ProtectionPolicyResourceListPage) NextWithContext(ctx context.Context) (err error) { 16826 if tracing.IsEnabled() { 16827 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionPolicyResourceListPage.NextWithContext") 16828 defer func() { 16829 sc := -1 16830 if page.Response().Response.Response != nil { 16831 sc = page.Response().Response.Response.StatusCode 16832 } 16833 tracing.EndSpan(ctx, sc, err) 16834 }() 16835 } 16836 for { 16837 next, err := page.fn(ctx, page.pprl) 16838 if err != nil { 16839 return err 16840 } 16841 page.pprl = next 16842 if !next.hasNextLink() || !next.IsEmpty() { 16843 break 16844 } 16845 } 16846 return nil 16847} 16848 16849// Next advances to the next page of values. If there was an error making 16850// the request the page does not advance and the error is returned. 16851// Deprecated: Use NextWithContext() instead. 16852func (page *ProtectionPolicyResourceListPage) Next() error { 16853 return page.NextWithContext(context.Background()) 16854} 16855 16856// NotDone returns true if the page enumeration should be started or is not yet complete. 16857func (page ProtectionPolicyResourceListPage) NotDone() bool { 16858 return !page.pprl.IsEmpty() 16859} 16860 16861// Response returns the raw server response from the last page request. 16862func (page ProtectionPolicyResourceListPage) Response() ProtectionPolicyResourceList { 16863 return page.pprl 16864} 16865 16866// Values returns the slice of values for the current page or nil if there are no values. 16867func (page ProtectionPolicyResourceListPage) Values() []ProtectionPolicyResource { 16868 if page.pprl.IsEmpty() { 16869 return nil 16870 } 16871 return *page.pprl.Value 16872} 16873 16874// Creates a new instance of the ProtectionPolicyResourceListPage type. 16875func NewProtectionPolicyResourceListPage(cur ProtectionPolicyResourceList, getNextPage func(context.Context, ProtectionPolicyResourceList) (ProtectionPolicyResourceList, error)) ProtectionPolicyResourceListPage { 16876 return ProtectionPolicyResourceListPage{ 16877 fn: getNextPage, 16878 pprl: cur, 16879 } 16880} 16881 16882// BasicRecoveryPoint base class for backup copies. Workload-specific backup copies are derived from this class. 16883type BasicRecoveryPoint interface { 16884 AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) 16885 AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) 16886 AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) 16887 AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) 16888 AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) 16889 AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) 16890 AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) 16891 AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) 16892 AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) 16893 AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) 16894 AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) 16895 AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) 16896 AsRecoveryPoint() (*RecoveryPoint, bool) 16897} 16898 16899// RecoveryPoint base class for backup copies. Workload-specific backup copies are derived from this class. 16900type RecoveryPoint struct { 16901 // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' 16902 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` 16903} 16904 16905func unmarshalBasicRecoveryPoint(body []byte) (BasicRecoveryPoint, error) { 16906 var m map[string]interface{} 16907 err := json.Unmarshal(body, &m) 16908 if err != nil { 16909 return nil, err 16910 } 16911 16912 switch m["objectType"] { 16913 case string(ObjectTypeAzureFileShareRecoveryPoint): 16914 var afsrp AzureFileShareRecoveryPoint 16915 err := json.Unmarshal(body, &afsrp) 16916 return afsrp, err 16917 case string(ObjectTypeAzureWorkloadPointInTimeRecoveryPoint): 16918 var awpitrp AzureWorkloadPointInTimeRecoveryPoint 16919 err := json.Unmarshal(body, &awpitrp) 16920 return awpitrp, err 16921 case string(ObjectTypeAzureWorkloadRecoveryPoint): 16922 var awrp AzureWorkloadRecoveryPoint 16923 err := json.Unmarshal(body, &awrp) 16924 return awrp, err 16925 case string(ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint): 16926 var awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint 16927 err := json.Unmarshal(body, &awshpitrp) 16928 return awshpitrp, err 16929 case string(ObjectTypeAzureWorkloadSAPHanaRecoveryPoint): 16930 var awshrp AzureWorkloadSAPHanaRecoveryPoint 16931 err := json.Unmarshal(body, &awshrp) 16932 return awshrp, err 16933 case string(ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint): 16934 var awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint 16935 err := json.Unmarshal(body, &awspitrp) 16936 return awspitrp, err 16937 case string(ObjectTypeAzureWorkloadSQLRecoveryPoint): 16938 var awsrp AzureWorkloadSQLRecoveryPoint 16939 err := json.Unmarshal(body, &awsrp) 16940 return awsrp, err 16941 case string(ObjectTypeGenericRecoveryPoint): 16942 var grp GenericRecoveryPoint 16943 err := json.Unmarshal(body, &grp) 16944 return grp, err 16945 case string(ObjectTypeIaasVMRecoveryPoint): 16946 var ivrp IaasVMRecoveryPoint 16947 err := json.Unmarshal(body, &ivrp) 16948 return ivrp, err 16949 default: 16950 var rp RecoveryPoint 16951 err := json.Unmarshal(body, &rp) 16952 return rp, err 16953 } 16954} 16955func unmarshalBasicRecoveryPointArray(body []byte) ([]BasicRecoveryPoint, error) { 16956 var rawMessages []*json.RawMessage 16957 err := json.Unmarshal(body, &rawMessages) 16958 if err != nil { 16959 return nil, err 16960 } 16961 16962 rpArray := make([]BasicRecoveryPoint, len(rawMessages)) 16963 16964 for index, rawMessage := range rawMessages { 16965 rp, err := unmarshalBasicRecoveryPoint(*rawMessage) 16966 if err != nil { 16967 return nil, err 16968 } 16969 rpArray[index] = rp 16970 } 16971 return rpArray, nil 16972} 16973 16974// MarshalJSON is the custom marshaler for RecoveryPoint. 16975func (rp RecoveryPoint) MarshalJSON() ([]byte, error) { 16976 rp.ObjectType = ObjectTypeRecoveryPoint 16977 objectMap := make(map[string]interface{}) 16978 if rp.ObjectType != "" { 16979 objectMap["objectType"] = rp.ObjectType 16980 } 16981 return json.Marshal(objectMap) 16982} 16983 16984// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. 16985func (rp RecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { 16986 return nil, false 16987} 16988 16989// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. 16990func (rp RecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { 16991 return nil, false 16992} 16993 16994// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. 16995func (rp RecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { 16996 return nil, false 16997} 16998 16999// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. 17000func (rp RecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { 17001 return nil, false 17002} 17003 17004// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. 17005func (rp RecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { 17006 return nil, false 17007} 17008 17009// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. 17010func (rp RecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { 17011 return nil, false 17012} 17013 17014// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. 17015func (rp RecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { 17016 return nil, false 17017} 17018 17019// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. 17020func (rp RecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { 17021 return nil, false 17022} 17023 17024// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. 17025func (rp RecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { 17026 return nil, false 17027} 17028 17029// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. 17030func (rp RecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { 17031 return nil, false 17032} 17033 17034// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. 17035func (rp RecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { 17036 return nil, false 17037} 17038 17039// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. 17040func (rp RecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { 17041 return nil, false 17042} 17043 17044// AsRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. 17045func (rp RecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { 17046 return &rp, true 17047} 17048 17049// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. 17050func (rp RecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { 17051 return &rp, true 17052} 17053 17054// RecoveryPointDiskConfiguration disk configuration 17055type RecoveryPointDiskConfiguration struct { 17056 // NumberOfDisksIncludedInBackup - Number of disks included in backup 17057 NumberOfDisksIncludedInBackup *int32 `json:"numberOfDisksIncludedInBackup,omitempty"` 17058 // NumberOfDisksAttachedToVM - Number of disks attached to the VM 17059 NumberOfDisksAttachedToVM *int32 `json:"numberOfDisksAttachedToVm,omitempty"` 17060 // IncludedDiskList - Information of disks included in backup 17061 IncludedDiskList *[]DiskInformation `json:"includedDiskList,omitempty"` 17062 // ExcludedDiskList - Information of disks excluded from backup 17063 ExcludedDiskList *[]DiskInformation `json:"excludedDiskList,omitempty"` 17064} 17065 17066// RecoveryPointResource base class for backup copies. Workload-specific backup copies are derived from 17067// this class. 17068type RecoveryPointResource struct { 17069 autorest.Response `json:"-"` 17070 // Properties - RecoveryPointResource properties 17071 Properties BasicRecoveryPoint `json:"properties,omitempty"` 17072 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 17073 ID *string `json:"id,omitempty"` 17074 // Name - READ-ONLY; Resource name associated with the resource. 17075 Name *string `json:"name,omitempty"` 17076 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 17077 Type *string `json:"type,omitempty"` 17078 // Location - Resource location. 17079 Location *string `json:"location,omitempty"` 17080 // Tags - Resource tags. 17081 Tags map[string]*string `json:"tags"` 17082 // ETag - Optional ETag. 17083 ETag *string `json:"eTag,omitempty"` 17084} 17085 17086// MarshalJSON is the custom marshaler for RecoveryPointResource. 17087func (rpr RecoveryPointResource) MarshalJSON() ([]byte, error) { 17088 objectMap := make(map[string]interface{}) 17089 objectMap["properties"] = rpr.Properties 17090 if rpr.Location != nil { 17091 objectMap["location"] = rpr.Location 17092 } 17093 if rpr.Tags != nil { 17094 objectMap["tags"] = rpr.Tags 17095 } 17096 if rpr.ETag != nil { 17097 objectMap["eTag"] = rpr.ETag 17098 } 17099 return json.Marshal(objectMap) 17100} 17101 17102// UnmarshalJSON is the custom unmarshaler for RecoveryPointResource struct. 17103func (rpr *RecoveryPointResource) UnmarshalJSON(body []byte) error { 17104 var m map[string]*json.RawMessage 17105 err := json.Unmarshal(body, &m) 17106 if err != nil { 17107 return err 17108 } 17109 for k, v := range m { 17110 switch k { 17111 case "properties": 17112 if v != nil { 17113 properties, err := unmarshalBasicRecoveryPoint(*v) 17114 if err != nil { 17115 return err 17116 } 17117 rpr.Properties = properties 17118 } 17119 case "id": 17120 if v != nil { 17121 var ID string 17122 err = json.Unmarshal(*v, &ID) 17123 if err != nil { 17124 return err 17125 } 17126 rpr.ID = &ID 17127 } 17128 case "name": 17129 if v != nil { 17130 var name string 17131 err = json.Unmarshal(*v, &name) 17132 if err != nil { 17133 return err 17134 } 17135 rpr.Name = &name 17136 } 17137 case "type": 17138 if v != nil { 17139 var typeVar string 17140 err = json.Unmarshal(*v, &typeVar) 17141 if err != nil { 17142 return err 17143 } 17144 rpr.Type = &typeVar 17145 } 17146 case "location": 17147 if v != nil { 17148 var location string 17149 err = json.Unmarshal(*v, &location) 17150 if err != nil { 17151 return err 17152 } 17153 rpr.Location = &location 17154 } 17155 case "tags": 17156 if v != nil { 17157 var tags map[string]*string 17158 err = json.Unmarshal(*v, &tags) 17159 if err != nil { 17160 return err 17161 } 17162 rpr.Tags = tags 17163 } 17164 case "eTag": 17165 if v != nil { 17166 var eTag string 17167 err = json.Unmarshal(*v, &eTag) 17168 if err != nil { 17169 return err 17170 } 17171 rpr.ETag = &eTag 17172 } 17173 } 17174 } 17175 17176 return nil 17177} 17178 17179// RecoveryPointResourceList list of RecoveryPoint resources 17180type RecoveryPointResourceList struct { 17181 autorest.Response `json:"-"` 17182 // Value - List of resources. 17183 Value *[]RecoveryPointResource `json:"value,omitempty"` 17184 // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. 17185 NextLink *string `json:"nextLink,omitempty"` 17186} 17187 17188// RecoveryPointResourceListIterator provides access to a complete listing of RecoveryPointResource values. 17189type RecoveryPointResourceListIterator struct { 17190 i int 17191 page RecoveryPointResourceListPage 17192} 17193 17194// NextWithContext advances to the next value. If there was an error making 17195// the request the iterator does not advance and the error is returned. 17196func (iter *RecoveryPointResourceListIterator) NextWithContext(ctx context.Context) (err error) { 17197 if tracing.IsEnabled() { 17198 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPointResourceListIterator.NextWithContext") 17199 defer func() { 17200 sc := -1 17201 if iter.Response().Response.Response != nil { 17202 sc = iter.Response().Response.Response.StatusCode 17203 } 17204 tracing.EndSpan(ctx, sc, err) 17205 }() 17206 } 17207 iter.i++ 17208 if iter.i < len(iter.page.Values()) { 17209 return nil 17210 } 17211 err = iter.page.NextWithContext(ctx) 17212 if err != nil { 17213 iter.i-- 17214 return err 17215 } 17216 iter.i = 0 17217 return nil 17218} 17219 17220// Next advances to the next value. If there was an error making 17221// the request the iterator does not advance and the error is returned. 17222// Deprecated: Use NextWithContext() instead. 17223func (iter *RecoveryPointResourceListIterator) Next() error { 17224 return iter.NextWithContext(context.Background()) 17225} 17226 17227// NotDone returns true if the enumeration should be started or is not yet complete. 17228func (iter RecoveryPointResourceListIterator) NotDone() bool { 17229 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 17230} 17231 17232// Response returns the raw server response from the last page request. 17233func (iter RecoveryPointResourceListIterator) Response() RecoveryPointResourceList { 17234 return iter.page.Response() 17235} 17236 17237// Value returns the current value or a zero-initialized value if the 17238// iterator has advanced beyond the end of the collection. 17239func (iter RecoveryPointResourceListIterator) Value() RecoveryPointResource { 17240 if !iter.page.NotDone() { 17241 return RecoveryPointResource{} 17242 } 17243 return iter.page.Values()[iter.i] 17244} 17245 17246// Creates a new instance of the RecoveryPointResourceListIterator type. 17247func NewRecoveryPointResourceListIterator(page RecoveryPointResourceListPage) RecoveryPointResourceListIterator { 17248 return RecoveryPointResourceListIterator{page: page} 17249} 17250 17251// IsEmpty returns true if the ListResult contains no values. 17252func (rprl RecoveryPointResourceList) IsEmpty() bool { 17253 return rprl.Value == nil || len(*rprl.Value) == 0 17254} 17255 17256// hasNextLink returns true if the NextLink is not empty. 17257func (rprl RecoveryPointResourceList) hasNextLink() bool { 17258 return rprl.NextLink != nil && len(*rprl.NextLink) != 0 17259} 17260 17261// recoveryPointResourceListPreparer prepares a request to retrieve the next set of results. 17262// It returns nil if no more results exist. 17263func (rprl RecoveryPointResourceList) recoveryPointResourceListPreparer(ctx context.Context) (*http.Request, error) { 17264 if !rprl.hasNextLink() { 17265 return nil, nil 17266 } 17267 return autorest.Prepare((&http.Request{}).WithContext(ctx), 17268 autorest.AsJSON(), 17269 autorest.AsGet(), 17270 autorest.WithBaseURL(to.String(rprl.NextLink))) 17271} 17272 17273// RecoveryPointResourceListPage contains a page of RecoveryPointResource values. 17274type RecoveryPointResourceListPage struct { 17275 fn func(context.Context, RecoveryPointResourceList) (RecoveryPointResourceList, error) 17276 rprl RecoveryPointResourceList 17277} 17278 17279// NextWithContext advances to the next page of values. If there was an error making 17280// the request the page does not advance and the error is returned. 17281func (page *RecoveryPointResourceListPage) NextWithContext(ctx context.Context) (err error) { 17282 if tracing.IsEnabled() { 17283 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPointResourceListPage.NextWithContext") 17284 defer func() { 17285 sc := -1 17286 if page.Response().Response.Response != nil { 17287 sc = page.Response().Response.Response.StatusCode 17288 } 17289 tracing.EndSpan(ctx, sc, err) 17290 }() 17291 } 17292 for { 17293 next, err := page.fn(ctx, page.rprl) 17294 if err != nil { 17295 return err 17296 } 17297 page.rprl = next 17298 if !next.hasNextLink() || !next.IsEmpty() { 17299 break 17300 } 17301 } 17302 return nil 17303} 17304 17305// Next advances to the next page of values. If there was an error making 17306// the request the page does not advance and the error is returned. 17307// Deprecated: Use NextWithContext() instead. 17308func (page *RecoveryPointResourceListPage) Next() error { 17309 return page.NextWithContext(context.Background()) 17310} 17311 17312// NotDone returns true if the page enumeration should be started or is not yet complete. 17313func (page RecoveryPointResourceListPage) NotDone() bool { 17314 return !page.rprl.IsEmpty() 17315} 17316 17317// Response returns the raw server response from the last page request. 17318func (page RecoveryPointResourceListPage) Response() RecoveryPointResourceList { 17319 return page.rprl 17320} 17321 17322// Values returns the slice of values for the current page or nil if there are no values. 17323func (page RecoveryPointResourceListPage) Values() []RecoveryPointResource { 17324 if page.rprl.IsEmpty() { 17325 return nil 17326 } 17327 return *page.rprl.Value 17328} 17329 17330// Creates a new instance of the RecoveryPointResourceListPage type. 17331func NewRecoveryPointResourceListPage(cur RecoveryPointResourceList, getNextPage func(context.Context, RecoveryPointResourceList) (RecoveryPointResourceList, error)) RecoveryPointResourceListPage { 17332 return RecoveryPointResourceListPage{ 17333 fn: getNextPage, 17334 rprl: cur, 17335 } 17336} 17337 17338// RecoveryPointTierInformation recovery point tier information. 17339type RecoveryPointTierInformation struct { 17340 // Type - Recovery point tier type. Possible values include: 'RecoveryPointTierTypeInvalid', 'RecoveryPointTierTypeInstantRP', 'RecoveryPointTierTypeHardenedRP' 17341 Type RecoveryPointTierType `json:"type,omitempty"` 17342 // Status - Recovery point tier status. Possible values include: 'RecoveryPointTierStatusInvalid', 'RecoveryPointTierStatusValid', 'RecoveryPointTierStatusDisabled', 'RecoveryPointTierStatusDeleted' 17343 Status RecoveryPointTierStatus `json:"status,omitempty"` 17344} 17345 17346// BasicRequest base class for backup request. Workload-specific backup requests are derived from this class. 17347type BasicRequest interface { 17348 AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) 17349 AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) 17350 AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) 17351 AsRequest() (*Request, bool) 17352} 17353 17354// Request base class for backup request. Workload-specific backup requests are derived from this class. 17355type Request struct { 17356 // ObjectType - Possible values include: 'ObjectTypeBackupRequest', 'ObjectTypeAzureFileShareBackupRequest', 'ObjectTypeAzureWorkloadBackupRequest', 'ObjectTypeIaasVMBackupRequest' 17357 ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"` 17358} 17359 17360func unmarshalBasicRequest(body []byte) (BasicRequest, error) { 17361 var m map[string]interface{} 17362 err := json.Unmarshal(body, &m) 17363 if err != nil { 17364 return nil, err 17365 } 17366 17367 switch m["objectType"] { 17368 case string(ObjectTypeAzureFileShareBackupRequest): 17369 var afsbr AzureFileShareBackupRequest 17370 err := json.Unmarshal(body, &afsbr) 17371 return afsbr, err 17372 case string(ObjectTypeAzureWorkloadBackupRequest): 17373 var awbr AzureWorkloadBackupRequest 17374 err := json.Unmarshal(body, &awbr) 17375 return awbr, err 17376 case string(ObjectTypeIaasVMBackupRequest): 17377 var ivbr IaasVMBackupRequest 17378 err := json.Unmarshal(body, &ivbr) 17379 return ivbr, err 17380 default: 17381 var r Request 17382 err := json.Unmarshal(body, &r) 17383 return r, err 17384 } 17385} 17386func unmarshalBasicRequestArray(body []byte) ([]BasicRequest, error) { 17387 var rawMessages []*json.RawMessage 17388 err := json.Unmarshal(body, &rawMessages) 17389 if err != nil { 17390 return nil, err 17391 } 17392 17393 rArray := make([]BasicRequest, len(rawMessages)) 17394 17395 for index, rawMessage := range rawMessages { 17396 r, err := unmarshalBasicRequest(*rawMessage) 17397 if err != nil { 17398 return nil, err 17399 } 17400 rArray[index] = r 17401 } 17402 return rArray, nil 17403} 17404 17405// MarshalJSON is the custom marshaler for Request. 17406func (r Request) MarshalJSON() ([]byte, error) { 17407 r.ObjectType = ObjectTypeBackupRequest 17408 objectMap := make(map[string]interface{}) 17409 if r.ObjectType != "" { 17410 objectMap["objectType"] = r.ObjectType 17411 } 17412 return json.Marshal(objectMap) 17413} 17414 17415// AsAzureFileShareBackupRequest is the BasicRequest implementation for Request. 17416func (r Request) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) { 17417 return nil, false 17418} 17419 17420// AsAzureWorkloadBackupRequest is the BasicRequest implementation for Request. 17421func (r Request) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) { 17422 return nil, false 17423} 17424 17425// AsIaasVMBackupRequest is the BasicRequest implementation for Request. 17426func (r Request) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) { 17427 return nil, false 17428} 17429 17430// AsRequest is the BasicRequest implementation for Request. 17431func (r Request) AsRequest() (*Request, bool) { 17432 return &r, true 17433} 17434 17435// AsBasicRequest is the BasicRequest implementation for Request. 17436func (r Request) AsBasicRequest() (BasicRequest, bool) { 17437 return &r, true 17438} 17439 17440// RequestResource base class for backup request. Workload-specific backup requests are derived from this 17441// class. 17442type RequestResource struct { 17443 // Properties - BackupRequestResource properties 17444 Properties BasicRequest `json:"properties,omitempty"` 17445 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 17446 ID *string `json:"id,omitempty"` 17447 // Name - READ-ONLY; Resource name associated with the resource. 17448 Name *string `json:"name,omitempty"` 17449 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 17450 Type *string `json:"type,omitempty"` 17451 // Location - Resource location. 17452 Location *string `json:"location,omitempty"` 17453 // Tags - Resource tags. 17454 Tags map[string]*string `json:"tags"` 17455 // ETag - Optional ETag. 17456 ETag *string `json:"eTag,omitempty"` 17457} 17458 17459// MarshalJSON is the custom marshaler for RequestResource. 17460func (rr RequestResource) MarshalJSON() ([]byte, error) { 17461 objectMap := make(map[string]interface{}) 17462 objectMap["properties"] = rr.Properties 17463 if rr.Location != nil { 17464 objectMap["location"] = rr.Location 17465 } 17466 if rr.Tags != nil { 17467 objectMap["tags"] = rr.Tags 17468 } 17469 if rr.ETag != nil { 17470 objectMap["eTag"] = rr.ETag 17471 } 17472 return json.Marshal(objectMap) 17473} 17474 17475// UnmarshalJSON is the custom unmarshaler for RequestResource struct. 17476func (rr *RequestResource) UnmarshalJSON(body []byte) error { 17477 var m map[string]*json.RawMessage 17478 err := json.Unmarshal(body, &m) 17479 if err != nil { 17480 return err 17481 } 17482 for k, v := range m { 17483 switch k { 17484 case "properties": 17485 if v != nil { 17486 properties, err := unmarshalBasicRequest(*v) 17487 if err != nil { 17488 return err 17489 } 17490 rr.Properties = properties 17491 } 17492 case "id": 17493 if v != nil { 17494 var ID string 17495 err = json.Unmarshal(*v, &ID) 17496 if err != nil { 17497 return err 17498 } 17499 rr.ID = &ID 17500 } 17501 case "name": 17502 if v != nil { 17503 var name string 17504 err = json.Unmarshal(*v, &name) 17505 if err != nil { 17506 return err 17507 } 17508 rr.Name = &name 17509 } 17510 case "type": 17511 if v != nil { 17512 var typeVar string 17513 err = json.Unmarshal(*v, &typeVar) 17514 if err != nil { 17515 return err 17516 } 17517 rr.Type = &typeVar 17518 } 17519 case "location": 17520 if v != nil { 17521 var location string 17522 err = json.Unmarshal(*v, &location) 17523 if err != nil { 17524 return err 17525 } 17526 rr.Location = &location 17527 } 17528 case "tags": 17529 if v != nil { 17530 var tags map[string]*string 17531 err = json.Unmarshal(*v, &tags) 17532 if err != nil { 17533 return err 17534 } 17535 rr.Tags = tags 17536 } 17537 case "eTag": 17538 if v != nil { 17539 var eTag string 17540 err = json.Unmarshal(*v, &eTag) 17541 if err != nil { 17542 return err 17543 } 17544 rr.ETag = &eTag 17545 } 17546 } 17547 } 17548 17549 return nil 17550} 17551 17552// Resource ARM Resource. 17553type Resource struct { 17554 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 17555 ID *string `json:"id,omitempty"` 17556 // Name - READ-ONLY; Resource name associated with the resource. 17557 Name *string `json:"name,omitempty"` 17558 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 17559 Type *string `json:"type,omitempty"` 17560 // Location - Resource location. 17561 Location *string `json:"location,omitempty"` 17562 // Tags - Resource tags. 17563 Tags map[string]*string `json:"tags"` 17564 // ETag - Optional ETag. 17565 ETag *string `json:"eTag,omitempty"` 17566} 17567 17568// MarshalJSON is the custom marshaler for Resource. 17569func (r Resource) MarshalJSON() ([]byte, error) { 17570 objectMap := make(map[string]interface{}) 17571 if r.Location != nil { 17572 objectMap["location"] = r.Location 17573 } 17574 if r.Tags != nil { 17575 objectMap["tags"] = r.Tags 17576 } 17577 if r.ETag != nil { 17578 objectMap["eTag"] = r.ETag 17579 } 17580 return json.Marshal(objectMap) 17581} 17582 17583// ResourceConfig the resource storage details. 17584type ResourceConfig struct { 17585 // StorageModelType - Storage type. Possible values include: 'StorageTypeInvalid', 'StorageTypeGeoRedundant', 'StorageTypeLocallyRedundant' 17586 StorageModelType StorageType `json:"storageModelType,omitempty"` 17587 // StorageType - Storage type. Possible values include: 'StorageTypeInvalid', 'StorageTypeGeoRedundant', 'StorageTypeLocallyRedundant' 17588 StorageType StorageType `json:"storageType,omitempty"` 17589 // StorageTypeState - Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked. Possible values include: 'StorageTypeStateInvalid', 'StorageTypeStateLocked', 'StorageTypeStateUnlocked' 17590 StorageTypeState StorageTypeState `json:"storageTypeState,omitempty"` 17591} 17592 17593// ResourceConfigResource the resource storage details. 17594type ResourceConfigResource struct { 17595 autorest.Response `json:"-"` 17596 // Properties - BackupResourceConfigResource properties 17597 Properties *ResourceConfig `json:"properties,omitempty"` 17598 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 17599 ID *string `json:"id,omitempty"` 17600 // Name - READ-ONLY; Resource name associated with the resource. 17601 Name *string `json:"name,omitempty"` 17602 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 17603 Type *string `json:"type,omitempty"` 17604 // Location - Resource location. 17605 Location *string `json:"location,omitempty"` 17606 // Tags - Resource tags. 17607 Tags map[string]*string `json:"tags"` 17608 // ETag - Optional ETag. 17609 ETag *string `json:"eTag,omitempty"` 17610} 17611 17612// MarshalJSON is the custom marshaler for ResourceConfigResource. 17613func (rcr ResourceConfigResource) MarshalJSON() ([]byte, error) { 17614 objectMap := make(map[string]interface{}) 17615 if rcr.Properties != nil { 17616 objectMap["properties"] = rcr.Properties 17617 } 17618 if rcr.Location != nil { 17619 objectMap["location"] = rcr.Location 17620 } 17621 if rcr.Tags != nil { 17622 objectMap["tags"] = rcr.Tags 17623 } 17624 if rcr.ETag != nil { 17625 objectMap["eTag"] = rcr.ETag 17626 } 17627 return json.Marshal(objectMap) 17628} 17629 17630// ResourceHealthDetails health Details for backup items. 17631type ResourceHealthDetails struct { 17632 // Code - READ-ONLY; Health Code 17633 Code *int32 `json:"code,omitempty"` 17634 // Title - READ-ONLY; Health Title 17635 Title *string `json:"title,omitempty"` 17636 // Message - READ-ONLY; Health Message 17637 Message *string `json:"message,omitempty"` 17638 // Recommendations - READ-ONLY; Health Recommended Actions 17639 Recommendations *[]string `json:"recommendations,omitempty"` 17640} 17641 17642// ResourceList base for all lists of resources. 17643type ResourceList struct { 17644 // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. 17645 NextLink *string `json:"nextLink,omitempty"` 17646} 17647 17648// ResourceVaultConfig backup resource vault config details. 17649type ResourceVaultConfig struct { 17650 // StorageModelType - Storage type. Possible values include: 'StorageTypeInvalid', 'StorageTypeGeoRedundant', 'StorageTypeLocallyRedundant' 17651 StorageModelType StorageType `json:"storageModelType,omitempty"` 17652 // StorageType - Storage type. Possible values include: 'StorageTypeInvalid', 'StorageTypeGeoRedundant', 'StorageTypeLocallyRedundant' 17653 StorageType StorageType `json:"storageType,omitempty"` 17654 // StorageTypeState - Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked. Possible values include: 'StorageTypeStateInvalid', 'StorageTypeStateLocked', 'StorageTypeStateUnlocked' 17655 StorageTypeState StorageTypeState `json:"storageTypeState,omitempty"` 17656 // EnhancedSecurityState - Enabled or Disabled. Possible values include: 'EnhancedSecurityStateInvalid', 'EnhancedSecurityStateEnabled', 'EnhancedSecurityStateDisabled' 17657 EnhancedSecurityState EnhancedSecurityState `json:"enhancedSecurityState,omitempty"` 17658 // SoftDeleteFeatureState - Soft Delete feature state. Possible values include: 'SoftDeleteFeatureStateInvalid', 'SoftDeleteFeatureStateEnabled', 'SoftDeleteFeatureStateDisabled' 17659 SoftDeleteFeatureState SoftDeleteFeatureState `json:"softDeleteFeatureState,omitempty"` 17660} 17661 17662// ResourceVaultConfigResource backup resource vault config details. 17663type ResourceVaultConfigResource struct { 17664 autorest.Response `json:"-"` 17665 // Properties - BackupResourceVaultConfigResource properties 17666 Properties *ResourceVaultConfig `json:"properties,omitempty"` 17667 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 17668 ID *string `json:"id,omitempty"` 17669 // Name - READ-ONLY; Resource name associated with the resource. 17670 Name *string `json:"name,omitempty"` 17671 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 17672 Type *string `json:"type,omitempty"` 17673 // Location - Resource location. 17674 Location *string `json:"location,omitempty"` 17675 // Tags - Resource tags. 17676 Tags map[string]*string `json:"tags"` 17677 // ETag - Optional ETag. 17678 ETag *string `json:"eTag,omitempty"` 17679} 17680 17681// MarshalJSON is the custom marshaler for ResourceVaultConfigResource. 17682func (rvcr ResourceVaultConfigResource) MarshalJSON() ([]byte, error) { 17683 objectMap := make(map[string]interface{}) 17684 if rvcr.Properties != nil { 17685 objectMap["properties"] = rvcr.Properties 17686 } 17687 if rvcr.Location != nil { 17688 objectMap["location"] = rvcr.Location 17689 } 17690 if rvcr.Tags != nil { 17691 objectMap["tags"] = rvcr.Tags 17692 } 17693 if rvcr.ETag != nil { 17694 objectMap["eTag"] = rvcr.ETag 17695 } 17696 return json.Marshal(objectMap) 17697} 17698 17699// RestoreFileSpecs restore file specs like file path, type and target folder path info. 17700type RestoreFileSpecs struct { 17701 // Path - Source File/Folder path 17702 Path *string `json:"path,omitempty"` 17703 // FileSpecType - Indicates what the Path variable stands for 17704 FileSpecType *string `json:"fileSpecType,omitempty"` 17705 // TargetFolderPath - Destination folder path in target FileShare 17706 TargetFolderPath *string `json:"targetFolderPath,omitempty"` 17707} 17708 17709// BasicRestoreRequest base class for restore request. Workload-specific restore requests are derived from this class. 17710type BasicRestoreRequest interface { 17711 AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) 17712 AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) 17713 AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) 17714 AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) 17715 AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) 17716 AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) 17717 AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) 17718 AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) 17719 AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) 17720 AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) 17721 AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) 17722 AsRestoreRequest() (*RestoreRequest, bool) 17723} 17724 17725// RestoreRequest base class for restore request. Workload-specific restore requests are derived from this 17726// class. 17727type RestoreRequest struct { 17728 // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' 17729 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` 17730} 17731 17732func unmarshalBasicRestoreRequest(body []byte) (BasicRestoreRequest, error) { 17733 var m map[string]interface{} 17734 err := json.Unmarshal(body, &m) 17735 if err != nil { 17736 return nil, err 17737 } 17738 17739 switch m["objectType"] { 17740 case string(ObjectTypeAzureFileShareRestoreRequest): 17741 var afsrr AzureFileShareRestoreRequest 17742 err := json.Unmarshal(body, &afsrr) 17743 return afsrr, err 17744 case string(ObjectTypeAzureWorkloadPointInTimeRestoreRequest): 17745 var awpitrr AzureWorkloadPointInTimeRestoreRequest 17746 err := json.Unmarshal(body, &awpitrr) 17747 return awpitrr, err 17748 case string(ObjectTypeAzureWorkloadRestoreRequest): 17749 var awrr AzureWorkloadRestoreRequest 17750 err := json.Unmarshal(body, &awrr) 17751 return awrr, err 17752 case string(ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest): 17753 var awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest 17754 err := json.Unmarshal(body, &awshpitrr) 17755 return awshpitrr, err 17756 case string(ObjectTypeAzureWorkloadSAPHanaRestoreRequest): 17757 var awshrr AzureWorkloadSAPHanaRestoreRequest 17758 err := json.Unmarshal(body, &awshrr) 17759 return awshrr, err 17760 case string(ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest): 17761 var awspitrr AzureWorkloadSQLPointInTimeRestoreRequest 17762 err := json.Unmarshal(body, &awspitrr) 17763 return awspitrr, err 17764 case string(ObjectTypeAzureWorkloadSQLRestoreRequest): 17765 var awsrr AzureWorkloadSQLRestoreRequest 17766 err := json.Unmarshal(body, &awsrr) 17767 return awsrr, err 17768 case string(ObjectTypeIaasVMRestoreRequest): 17769 var ivrr IaasVMRestoreRequest 17770 err := json.Unmarshal(body, &ivrr) 17771 return ivrr, err 17772 default: 17773 var rr RestoreRequest 17774 err := json.Unmarshal(body, &rr) 17775 return rr, err 17776 } 17777} 17778func unmarshalBasicRestoreRequestArray(body []byte) ([]BasicRestoreRequest, error) { 17779 var rawMessages []*json.RawMessage 17780 err := json.Unmarshal(body, &rawMessages) 17781 if err != nil { 17782 return nil, err 17783 } 17784 17785 rrArray := make([]BasicRestoreRequest, len(rawMessages)) 17786 17787 for index, rawMessage := range rawMessages { 17788 rr, err := unmarshalBasicRestoreRequest(*rawMessage) 17789 if err != nil { 17790 return nil, err 17791 } 17792 rrArray[index] = rr 17793 } 17794 return rrArray, nil 17795} 17796 17797// MarshalJSON is the custom marshaler for RestoreRequest. 17798func (rr RestoreRequest) MarshalJSON() ([]byte, error) { 17799 rr.ObjectType = ObjectTypeRestoreRequest 17800 objectMap := make(map[string]interface{}) 17801 if rr.ObjectType != "" { 17802 objectMap["objectType"] = rr.ObjectType 17803 } 17804 return json.Marshal(objectMap) 17805} 17806 17807// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. 17808func (rr RestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { 17809 return nil, false 17810} 17811 17812// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. 17813func (rr RestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { 17814 return nil, false 17815} 17816 17817// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. 17818func (rr RestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { 17819 return nil, false 17820} 17821 17822// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. 17823func (rr RestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { 17824 return nil, false 17825} 17826 17827// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. 17828func (rr RestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { 17829 return nil, false 17830} 17831 17832// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. 17833func (rr RestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { 17834 return nil, false 17835} 17836 17837// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. 17838func (rr RestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { 17839 return nil, false 17840} 17841 17842// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. 17843func (rr RestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { 17844 return nil, false 17845} 17846 17847// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. 17848func (rr RestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { 17849 return nil, false 17850} 17851 17852// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. 17853func (rr RestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { 17854 return nil, false 17855} 17856 17857// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. 17858func (rr RestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { 17859 return nil, false 17860} 17861 17862// AsRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. 17863func (rr RestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { 17864 return &rr, true 17865} 17866 17867// AsBasicRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. 17868func (rr RestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { 17869 return &rr, true 17870} 17871 17872// RestoreRequestResource base class for restore request. Workload-specific restore requests are derived 17873// from this class. 17874type RestoreRequestResource struct { 17875 // Properties - RestoreRequestResource properties 17876 Properties BasicRestoreRequest `json:"properties,omitempty"` 17877 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 17878 ID *string `json:"id,omitempty"` 17879 // Name - READ-ONLY; Resource name associated with the resource. 17880 Name *string `json:"name,omitempty"` 17881 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 17882 Type *string `json:"type,omitempty"` 17883 // Location - Resource location. 17884 Location *string `json:"location,omitempty"` 17885 // Tags - Resource tags. 17886 Tags map[string]*string `json:"tags"` 17887 // ETag - Optional ETag. 17888 ETag *string `json:"eTag,omitempty"` 17889} 17890 17891// MarshalJSON is the custom marshaler for RestoreRequestResource. 17892func (rrr RestoreRequestResource) MarshalJSON() ([]byte, error) { 17893 objectMap := make(map[string]interface{}) 17894 objectMap["properties"] = rrr.Properties 17895 if rrr.Location != nil { 17896 objectMap["location"] = rrr.Location 17897 } 17898 if rrr.Tags != nil { 17899 objectMap["tags"] = rrr.Tags 17900 } 17901 if rrr.ETag != nil { 17902 objectMap["eTag"] = rrr.ETag 17903 } 17904 return json.Marshal(objectMap) 17905} 17906 17907// UnmarshalJSON is the custom unmarshaler for RestoreRequestResource struct. 17908func (rrr *RestoreRequestResource) UnmarshalJSON(body []byte) error { 17909 var m map[string]*json.RawMessage 17910 err := json.Unmarshal(body, &m) 17911 if err != nil { 17912 return err 17913 } 17914 for k, v := range m { 17915 switch k { 17916 case "properties": 17917 if v != nil { 17918 properties, err := unmarshalBasicRestoreRequest(*v) 17919 if err != nil { 17920 return err 17921 } 17922 rrr.Properties = properties 17923 } 17924 case "id": 17925 if v != nil { 17926 var ID string 17927 err = json.Unmarshal(*v, &ID) 17928 if err != nil { 17929 return err 17930 } 17931 rrr.ID = &ID 17932 } 17933 case "name": 17934 if v != nil { 17935 var name string 17936 err = json.Unmarshal(*v, &name) 17937 if err != nil { 17938 return err 17939 } 17940 rrr.Name = &name 17941 } 17942 case "type": 17943 if v != nil { 17944 var typeVar string 17945 err = json.Unmarshal(*v, &typeVar) 17946 if err != nil { 17947 return err 17948 } 17949 rrr.Type = &typeVar 17950 } 17951 case "location": 17952 if v != nil { 17953 var location string 17954 err = json.Unmarshal(*v, &location) 17955 if err != nil { 17956 return err 17957 } 17958 rrr.Location = &location 17959 } 17960 case "tags": 17961 if v != nil { 17962 var tags map[string]*string 17963 err = json.Unmarshal(*v, &tags) 17964 if err != nil { 17965 return err 17966 } 17967 rrr.Tags = tags 17968 } 17969 case "eTag": 17970 if v != nil { 17971 var eTag string 17972 err = json.Unmarshal(*v, &eTag) 17973 if err != nil { 17974 return err 17975 } 17976 rrr.ETag = &eTag 17977 } 17978 } 17979 } 17980 17981 return nil 17982} 17983 17984// RetentionDuration retention duration. 17985type RetentionDuration struct { 17986 // Count - Count of duration types. Retention duration is obtained by the counting the duration type Count times. 17987 // For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks. 17988 Count *int32 `json:"count,omitempty"` 17989 // DurationType - Retention duration type of retention policy. Possible values include: 'RetentionDurationTypeInvalid', 'RetentionDurationTypeDays', 'RetentionDurationTypeWeeks', 'RetentionDurationTypeMonths', 'RetentionDurationTypeYears' 17990 DurationType RetentionDurationType `json:"durationType,omitempty"` 17991} 17992 17993// BasicRetentionPolicy base class for retention policy. 17994type BasicRetentionPolicy interface { 17995 AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) 17996 AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) 17997 AsRetentionPolicy() (*RetentionPolicy, bool) 17998} 17999 18000// RetentionPolicy base class for retention policy. 18001type RetentionPolicy struct { 18002 // RetentionPolicyType - Possible values include: 'RetentionPolicyTypeRetentionPolicy', 'RetentionPolicyTypeLongTermRetentionPolicy', 'RetentionPolicyTypeSimpleRetentionPolicy' 18003 RetentionPolicyType RetentionPolicyType `json:"retentionPolicyType,omitempty"` 18004} 18005 18006func unmarshalBasicRetentionPolicy(body []byte) (BasicRetentionPolicy, error) { 18007 var m map[string]interface{} 18008 err := json.Unmarshal(body, &m) 18009 if err != nil { 18010 return nil, err 18011 } 18012 18013 switch m["retentionPolicyType"] { 18014 case string(RetentionPolicyTypeLongTermRetentionPolicy): 18015 var ltrp LongTermRetentionPolicy 18016 err := json.Unmarshal(body, <rp) 18017 return ltrp, err 18018 case string(RetentionPolicyTypeSimpleRetentionPolicy): 18019 var srp SimpleRetentionPolicy 18020 err := json.Unmarshal(body, &srp) 18021 return srp, err 18022 default: 18023 var rp RetentionPolicy 18024 err := json.Unmarshal(body, &rp) 18025 return rp, err 18026 } 18027} 18028func unmarshalBasicRetentionPolicyArray(body []byte) ([]BasicRetentionPolicy, error) { 18029 var rawMessages []*json.RawMessage 18030 err := json.Unmarshal(body, &rawMessages) 18031 if err != nil { 18032 return nil, err 18033 } 18034 18035 rpArray := make([]BasicRetentionPolicy, len(rawMessages)) 18036 18037 for index, rawMessage := range rawMessages { 18038 rp, err := unmarshalBasicRetentionPolicy(*rawMessage) 18039 if err != nil { 18040 return nil, err 18041 } 18042 rpArray[index] = rp 18043 } 18044 return rpArray, nil 18045} 18046 18047// MarshalJSON is the custom marshaler for RetentionPolicy. 18048func (rp RetentionPolicy) MarshalJSON() ([]byte, error) { 18049 rp.RetentionPolicyType = RetentionPolicyTypeRetentionPolicy 18050 objectMap := make(map[string]interface{}) 18051 if rp.RetentionPolicyType != "" { 18052 objectMap["retentionPolicyType"] = rp.RetentionPolicyType 18053 } 18054 return json.Marshal(objectMap) 18055} 18056 18057// AsLongTermRetentionPolicy is the BasicRetentionPolicy implementation for RetentionPolicy. 18058func (rp RetentionPolicy) AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) { 18059 return nil, false 18060} 18061 18062// AsSimpleRetentionPolicy is the BasicRetentionPolicy implementation for RetentionPolicy. 18063func (rp RetentionPolicy) AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) { 18064 return nil, false 18065} 18066 18067// AsRetentionPolicy is the BasicRetentionPolicy implementation for RetentionPolicy. 18068func (rp RetentionPolicy) AsRetentionPolicy() (*RetentionPolicy, bool) { 18069 return &rp, true 18070} 18071 18072// AsBasicRetentionPolicy is the BasicRetentionPolicy implementation for RetentionPolicy. 18073func (rp RetentionPolicy) AsBasicRetentionPolicy() (BasicRetentionPolicy, bool) { 18074 return &rp, true 18075} 18076 18077// BasicSchedulePolicy base class for backup schedule. 18078type BasicSchedulePolicy interface { 18079 AsLogSchedulePolicy() (*LogSchedulePolicy, bool) 18080 AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) 18081 AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) 18082 AsSchedulePolicy() (*SchedulePolicy, bool) 18083} 18084 18085// SchedulePolicy base class for backup schedule. 18086type SchedulePolicy struct { 18087 // SchedulePolicyType - Possible values include: 'SchedulePolicyTypeSchedulePolicy', 'SchedulePolicyTypeLogSchedulePolicy', 'SchedulePolicyTypeLongTermSchedulePolicy', 'SchedulePolicyTypeSimpleSchedulePolicy' 18088 SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"` 18089} 18090 18091func unmarshalBasicSchedulePolicy(body []byte) (BasicSchedulePolicy, error) { 18092 var m map[string]interface{} 18093 err := json.Unmarshal(body, &m) 18094 if err != nil { 18095 return nil, err 18096 } 18097 18098 switch m["schedulePolicyType"] { 18099 case string(SchedulePolicyTypeLogSchedulePolicy): 18100 var lsp LogSchedulePolicy 18101 err := json.Unmarshal(body, &lsp) 18102 return lsp, err 18103 case string(SchedulePolicyTypeLongTermSchedulePolicy): 18104 var ltsp LongTermSchedulePolicy 18105 err := json.Unmarshal(body, <sp) 18106 return ltsp, err 18107 case string(SchedulePolicyTypeSimpleSchedulePolicy): 18108 var ssp SimpleSchedulePolicy 18109 err := json.Unmarshal(body, &ssp) 18110 return ssp, err 18111 default: 18112 var sp SchedulePolicy 18113 err := json.Unmarshal(body, &sp) 18114 return sp, err 18115 } 18116} 18117func unmarshalBasicSchedulePolicyArray(body []byte) ([]BasicSchedulePolicy, error) { 18118 var rawMessages []*json.RawMessage 18119 err := json.Unmarshal(body, &rawMessages) 18120 if err != nil { 18121 return nil, err 18122 } 18123 18124 spArray := make([]BasicSchedulePolicy, len(rawMessages)) 18125 18126 for index, rawMessage := range rawMessages { 18127 sp, err := unmarshalBasicSchedulePolicy(*rawMessage) 18128 if err != nil { 18129 return nil, err 18130 } 18131 spArray[index] = sp 18132 } 18133 return spArray, nil 18134} 18135 18136// MarshalJSON is the custom marshaler for SchedulePolicy. 18137func (sp SchedulePolicy) MarshalJSON() ([]byte, error) { 18138 sp.SchedulePolicyType = SchedulePolicyTypeSchedulePolicy 18139 objectMap := make(map[string]interface{}) 18140 if sp.SchedulePolicyType != "" { 18141 objectMap["schedulePolicyType"] = sp.SchedulePolicyType 18142 } 18143 return json.Marshal(objectMap) 18144} 18145 18146// AsLogSchedulePolicy is the BasicSchedulePolicy implementation for SchedulePolicy. 18147func (sp SchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) { 18148 return nil, false 18149} 18150 18151// AsLongTermSchedulePolicy is the BasicSchedulePolicy implementation for SchedulePolicy. 18152func (sp SchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) { 18153 return nil, false 18154} 18155 18156// AsSimpleSchedulePolicy is the BasicSchedulePolicy implementation for SchedulePolicy. 18157func (sp SchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) { 18158 return nil, false 18159} 18160 18161// AsSchedulePolicy is the BasicSchedulePolicy implementation for SchedulePolicy. 18162func (sp SchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) { 18163 return &sp, true 18164} 18165 18166// AsBasicSchedulePolicy is the BasicSchedulePolicy implementation for SchedulePolicy. 18167func (sp SchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) { 18168 return &sp, true 18169} 18170 18171// Settings common settings field for backup management 18172type Settings struct { 18173 // TimeZone - TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". 18174 TimeZone *string `json:"timeZone,omitempty"` 18175 // Issqlcompression - SQL compression flag 18176 Issqlcompression *bool `json:"issqlcompression,omitempty"` 18177 // IsCompression - Workload compression flag. This has been added so that 'isSqlCompression' 18178 // will be deprecated once clients upgrade to consider this flag. 18179 IsCompression *bool `json:"isCompression,omitempty"` 18180} 18181 18182// SimpleRetentionPolicy simple policy retention. 18183type SimpleRetentionPolicy struct { 18184 // RetentionDuration - Retention duration of the protection policy. 18185 RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` 18186 // RetentionPolicyType - Possible values include: 'RetentionPolicyTypeRetentionPolicy', 'RetentionPolicyTypeLongTermRetentionPolicy', 'RetentionPolicyTypeSimpleRetentionPolicy' 18187 RetentionPolicyType RetentionPolicyType `json:"retentionPolicyType,omitempty"` 18188} 18189 18190// MarshalJSON is the custom marshaler for SimpleRetentionPolicy. 18191func (srp SimpleRetentionPolicy) MarshalJSON() ([]byte, error) { 18192 srp.RetentionPolicyType = RetentionPolicyTypeSimpleRetentionPolicy 18193 objectMap := make(map[string]interface{}) 18194 if srp.RetentionDuration != nil { 18195 objectMap["retentionDuration"] = srp.RetentionDuration 18196 } 18197 if srp.RetentionPolicyType != "" { 18198 objectMap["retentionPolicyType"] = srp.RetentionPolicyType 18199 } 18200 return json.Marshal(objectMap) 18201} 18202 18203// AsLongTermRetentionPolicy is the BasicRetentionPolicy implementation for SimpleRetentionPolicy. 18204func (srp SimpleRetentionPolicy) AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) { 18205 return nil, false 18206} 18207 18208// AsSimpleRetentionPolicy is the BasicRetentionPolicy implementation for SimpleRetentionPolicy. 18209func (srp SimpleRetentionPolicy) AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) { 18210 return &srp, true 18211} 18212 18213// AsRetentionPolicy is the BasicRetentionPolicy implementation for SimpleRetentionPolicy. 18214func (srp SimpleRetentionPolicy) AsRetentionPolicy() (*RetentionPolicy, bool) { 18215 return nil, false 18216} 18217 18218// AsBasicRetentionPolicy is the BasicRetentionPolicy implementation for SimpleRetentionPolicy. 18219func (srp SimpleRetentionPolicy) AsBasicRetentionPolicy() (BasicRetentionPolicy, bool) { 18220 return &srp, true 18221} 18222 18223// SimpleSchedulePolicy simple policy schedule. 18224type SimpleSchedulePolicy struct { 18225 // ScheduleRunFrequency - Frequency of the schedule operation of this policy. Possible values include: 'ScheduleRunTypeInvalid', 'ScheduleRunTypeDaily', 'ScheduleRunTypeWeekly' 18226 ScheduleRunFrequency ScheduleRunType `json:"scheduleRunFrequency,omitempty"` 18227 // ScheduleRunDays - List of days of week this schedule has to be run. 18228 ScheduleRunDays *[]DayOfWeek `json:"scheduleRunDays,omitempty"` 18229 // ScheduleRunTimes - List of times of day this schedule has to be run. 18230 ScheduleRunTimes *[]date.Time `json:"scheduleRunTimes,omitempty"` 18231 // ScheduleWeeklyFrequency - At every number weeks this schedule has to be run. 18232 ScheduleWeeklyFrequency *int32 `json:"scheduleWeeklyFrequency,omitempty"` 18233 // SchedulePolicyType - Possible values include: 'SchedulePolicyTypeSchedulePolicy', 'SchedulePolicyTypeLogSchedulePolicy', 'SchedulePolicyTypeLongTermSchedulePolicy', 'SchedulePolicyTypeSimpleSchedulePolicy' 18234 SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"` 18235} 18236 18237// MarshalJSON is the custom marshaler for SimpleSchedulePolicy. 18238func (ssp SimpleSchedulePolicy) MarshalJSON() ([]byte, error) { 18239 ssp.SchedulePolicyType = SchedulePolicyTypeSimpleSchedulePolicy 18240 objectMap := make(map[string]interface{}) 18241 if ssp.ScheduleRunFrequency != "" { 18242 objectMap["scheduleRunFrequency"] = ssp.ScheduleRunFrequency 18243 } 18244 if ssp.ScheduleRunDays != nil { 18245 objectMap["scheduleRunDays"] = ssp.ScheduleRunDays 18246 } 18247 if ssp.ScheduleRunTimes != nil { 18248 objectMap["scheduleRunTimes"] = ssp.ScheduleRunTimes 18249 } 18250 if ssp.ScheduleWeeklyFrequency != nil { 18251 objectMap["scheduleWeeklyFrequency"] = ssp.ScheduleWeeklyFrequency 18252 } 18253 if ssp.SchedulePolicyType != "" { 18254 objectMap["schedulePolicyType"] = ssp.SchedulePolicyType 18255 } 18256 return json.Marshal(objectMap) 18257} 18258 18259// AsLogSchedulePolicy is the BasicSchedulePolicy implementation for SimpleSchedulePolicy. 18260func (ssp SimpleSchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) { 18261 return nil, false 18262} 18263 18264// AsLongTermSchedulePolicy is the BasicSchedulePolicy implementation for SimpleSchedulePolicy. 18265func (ssp SimpleSchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) { 18266 return nil, false 18267} 18268 18269// AsSimpleSchedulePolicy is the BasicSchedulePolicy implementation for SimpleSchedulePolicy. 18270func (ssp SimpleSchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) { 18271 return &ssp, true 18272} 18273 18274// AsSchedulePolicy is the BasicSchedulePolicy implementation for SimpleSchedulePolicy. 18275func (ssp SimpleSchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) { 18276 return nil, false 18277} 18278 18279// AsBasicSchedulePolicy is the BasicSchedulePolicy implementation for SimpleSchedulePolicy. 18280func (ssp SimpleSchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) { 18281 return &ssp, true 18282} 18283 18284// SQLDataDirectory sQLDataDirectory info 18285type SQLDataDirectory struct { 18286 // Type - Type of data directory mapping. Possible values include: 'SQLDataDirectoryTypeInvalid', 'SQLDataDirectoryTypeData', 'SQLDataDirectoryTypeLog' 18287 Type SQLDataDirectoryType `json:"type,omitempty"` 18288 // Path - File path 18289 Path *string `json:"path,omitempty"` 18290 // LogicalName - Logical name of the file 18291 LogicalName *string `json:"logicalName,omitempty"` 18292} 18293 18294// SQLDataDirectoryMapping encapsulates information regarding data directory 18295type SQLDataDirectoryMapping struct { 18296 // MappingType - Type of data directory mapping. Possible values include: 'SQLDataDirectoryTypeInvalid', 'SQLDataDirectoryTypeData', 'SQLDataDirectoryTypeLog' 18297 MappingType SQLDataDirectoryType `json:"mappingType,omitempty"` 18298 // SourceLogicalName - Restore source logical name path 18299 SourceLogicalName *string `json:"sourceLogicalName,omitempty"` 18300 // SourcePath - Restore source path 18301 SourcePath *string `json:"sourcePath,omitempty"` 18302 // TargetPath - Target path 18303 TargetPath *string `json:"targetPath,omitempty"` 18304} 18305 18306// StatusRequest backupStatus request. 18307type StatusRequest struct { 18308 // 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' 18309 ResourceType DataSourceType `json:"resourceType,omitempty"` 18310 // ResourceID - Entire ARM resource id of the resource 18311 ResourceID *string `json:"resourceId,omitempty"` 18312 // PoLogicalName - Protectable Item Logical Name 18313 PoLogicalName *string `json:"poLogicalName,omitempty"` 18314} 18315 18316// StatusResponse backupStatus response. 18317type StatusResponse struct { 18318 autorest.Response `json:"-"` 18319 // ProtectionStatus - Specifies whether the container is registered or not. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 18320 ProtectionStatus ProtectionStatus `json:"protectionStatus,omitempty"` 18321 // VaultID - Specifies the arm resource id of the vault 18322 VaultID *string `json:"vaultId,omitempty"` 18323 // FabricName - Specifies the fabric name - Azure or AD. Possible values include: 'FabricNameInvalid', 'FabricNameAzure' 18324 FabricName FabricName `json:"fabricName,omitempty"` 18325 // ContainerName - Specifies the product specific container name. E.g. iaasvmcontainer;iaasvmcontainer;csname;vmname. 18326 ContainerName *string `json:"containerName,omitempty"` 18327 // ProtectedItemName - Specifies the product specific ds name. E.g. vm;iaasvmcontainer;csname;vmname. 18328 ProtectedItemName *string `json:"protectedItemName,omitempty"` 18329 // ErrorCode - ErrorCode in case of intent failed 18330 ErrorCode *string `json:"errorCode,omitempty"` 18331 // ErrorMessage - ErrorMessage in case of intent failed. 18332 ErrorMessage *string `json:"errorMessage,omitempty"` 18333 // PolicyName - Specifies the policy name which is used for protection 18334 PolicyName *string `json:"policyName,omitempty"` 18335 // RegistrationStatus - Container registration status 18336 RegistrationStatus *string `json:"registrationStatus,omitempty"` 18337} 18338 18339// SubProtectionPolicy sub-protection policy which includes schedule and retention 18340type SubProtectionPolicy struct { 18341 // PolicyType - Type of backup policy type. Possible values include: 'PolicyTypeInvalid', 'PolicyTypeFull', 'PolicyTypeDifferential', 'PolicyTypeLog', 'PolicyTypeCopyOnlyFull' 18342 PolicyType PolicyType `json:"policyType,omitempty"` 18343 // SchedulePolicy - Backup schedule specified as part of backup policy. 18344 SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"` 18345 // RetentionPolicy - Retention policy with the details on backup copy retention ranges. 18346 RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"` 18347} 18348 18349// UnmarshalJSON is the custom unmarshaler for SubProtectionPolicy struct. 18350func (spp *SubProtectionPolicy) UnmarshalJSON(body []byte) error { 18351 var m map[string]*json.RawMessage 18352 err := json.Unmarshal(body, &m) 18353 if err != nil { 18354 return err 18355 } 18356 for k, v := range m { 18357 switch k { 18358 case "policyType": 18359 if v != nil { 18360 var policyType PolicyType 18361 err = json.Unmarshal(*v, &policyType) 18362 if err != nil { 18363 return err 18364 } 18365 spp.PolicyType = policyType 18366 } 18367 case "schedulePolicy": 18368 if v != nil { 18369 schedulePolicy, err := unmarshalBasicSchedulePolicy(*v) 18370 if err != nil { 18371 return err 18372 } 18373 spp.SchedulePolicy = schedulePolicy 18374 } 18375 case "retentionPolicy": 18376 if v != nil { 18377 retentionPolicy, err := unmarshalBasicRetentionPolicy(*v) 18378 if err != nil { 18379 return err 18380 } 18381 spp.RetentionPolicy = retentionPolicy 18382 } 18383 } 18384 } 18385 18386 return nil 18387} 18388 18389// TargetAFSRestoreInfo target Azure File Share Info. 18390type TargetAFSRestoreInfo struct { 18391 // Name - File share name 18392 Name *string `json:"name,omitempty"` 18393 // TargetResourceID - Target file share resource ARM ID 18394 TargetResourceID *string `json:"targetResourceId,omitempty"` 18395} 18396 18397// TargetRestoreInfo details about target workload during restore operation. 18398type TargetRestoreInfo struct { 18399 // OverwriteOption - Can Overwrite if Target DataBase already exists. Possible values include: 'OverwriteOptionsInvalid', 'OverwriteOptionsFailOnConflict', 'OverwriteOptionsOverwrite' 18400 OverwriteOption OverwriteOptions `json:"overwriteOption,omitempty"` 18401 // ContainerID - Resource Id name of the container in which Target DataBase resides 18402 ContainerID *string `json:"containerId,omitempty"` 18403 // DatabaseName - Database name InstanceName/DataBaseName for SQL or System/DbName for SAP Hana 18404 DatabaseName *string `json:"databaseName,omitempty"` 18405 // TargetDirectoryForFileRestore - Target directory location for restore as files. 18406 TargetDirectoryForFileRestore *string `json:"targetDirectoryForFileRestore,omitempty"` 18407} 18408 18409// TokenInformation the token information details. 18410type TokenInformation struct { 18411 autorest.Response `json:"-"` 18412 // Token - Token value. 18413 Token *string `json:"token,omitempty"` 18414 // ExpiryTimeInUtcTicks - Expiry time of token. 18415 ExpiryTimeInUtcTicks *int64 `json:"expiryTimeInUtcTicks,omitempty"` 18416 // SecurityPIN - Security PIN 18417 SecurityPIN *string `json:"securityPIN,omitempty"` 18418} 18419 18420// ValidateIaasVMRestoreOperationRequest azureRestoreValidation request. 18421type ValidateIaasVMRestoreOperationRequest struct { 18422 // RestoreRequest - Sets restore request to be validated 18423 RestoreRequest BasicRestoreRequest `json:"restoreRequest,omitempty"` 18424 // ObjectType - Possible values include: 'ObjectTypeValidateOperationRequest', 'ObjectTypeValidateIaasVMRestoreOperationRequest', 'ObjectTypeValidateRestoreOperationRequest' 18425 ObjectType ObjectTypeBasicValidateOperationRequest `json:"objectType,omitempty"` 18426} 18427 18428// MarshalJSON is the custom marshaler for ValidateIaasVMRestoreOperationRequest. 18429func (vivror ValidateIaasVMRestoreOperationRequest) MarshalJSON() ([]byte, error) { 18430 vivror.ObjectType = ObjectTypeValidateIaasVMRestoreOperationRequest 18431 objectMap := make(map[string]interface{}) 18432 objectMap["restoreRequest"] = vivror.RestoreRequest 18433 if vivror.ObjectType != "" { 18434 objectMap["objectType"] = vivror.ObjectType 18435 } 18436 return json.Marshal(objectMap) 18437} 18438 18439// AsValidateIaasVMRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateIaasVMRestoreOperationRequest. 18440func (vivror ValidateIaasVMRestoreOperationRequest) AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) { 18441 return &vivror, true 18442} 18443 18444// AsValidateRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateIaasVMRestoreOperationRequest. 18445func (vivror ValidateIaasVMRestoreOperationRequest) AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) { 18446 return nil, false 18447} 18448 18449// AsBasicValidateRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateIaasVMRestoreOperationRequest. 18450func (vivror ValidateIaasVMRestoreOperationRequest) AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool) { 18451 return &vivror, true 18452} 18453 18454// AsValidateOperationRequest is the BasicValidateOperationRequest implementation for ValidateIaasVMRestoreOperationRequest. 18455func (vivror ValidateIaasVMRestoreOperationRequest) AsValidateOperationRequest() (*ValidateOperationRequest, bool) { 18456 return nil, false 18457} 18458 18459// AsBasicValidateOperationRequest is the BasicValidateOperationRequest implementation for ValidateIaasVMRestoreOperationRequest. 18460func (vivror ValidateIaasVMRestoreOperationRequest) AsBasicValidateOperationRequest() (BasicValidateOperationRequest, bool) { 18461 return &vivror, true 18462} 18463 18464// UnmarshalJSON is the custom unmarshaler for ValidateIaasVMRestoreOperationRequest struct. 18465func (vivror *ValidateIaasVMRestoreOperationRequest) UnmarshalJSON(body []byte) error { 18466 var m map[string]*json.RawMessage 18467 err := json.Unmarshal(body, &m) 18468 if err != nil { 18469 return err 18470 } 18471 for k, v := range m { 18472 switch k { 18473 case "restoreRequest": 18474 if v != nil { 18475 restoreRequest, err := unmarshalBasicRestoreRequest(*v) 18476 if err != nil { 18477 return err 18478 } 18479 vivror.RestoreRequest = restoreRequest 18480 } 18481 case "objectType": 18482 if v != nil { 18483 var objectType ObjectTypeBasicValidateOperationRequest 18484 err = json.Unmarshal(*v, &objectType) 18485 if err != nil { 18486 return err 18487 } 18488 vivror.ObjectType = objectType 18489 } 18490 } 18491 } 18492 18493 return nil 18494} 18495 18496// BasicValidateOperationRequest base class for validate operation request. 18497type BasicValidateOperationRequest interface { 18498 AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) 18499 AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) 18500 AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool) 18501 AsValidateOperationRequest() (*ValidateOperationRequest, bool) 18502} 18503 18504// ValidateOperationRequest base class for validate operation request. 18505type ValidateOperationRequest struct { 18506 // ObjectType - Possible values include: 'ObjectTypeValidateOperationRequest', 'ObjectTypeValidateIaasVMRestoreOperationRequest', 'ObjectTypeValidateRestoreOperationRequest' 18507 ObjectType ObjectTypeBasicValidateOperationRequest `json:"objectType,omitempty"` 18508} 18509 18510func unmarshalBasicValidateOperationRequest(body []byte) (BasicValidateOperationRequest, error) { 18511 var m map[string]interface{} 18512 err := json.Unmarshal(body, &m) 18513 if err != nil { 18514 return nil, err 18515 } 18516 18517 switch m["objectType"] { 18518 case string(ObjectTypeValidateIaasVMRestoreOperationRequest): 18519 var vivror ValidateIaasVMRestoreOperationRequest 18520 err := json.Unmarshal(body, &vivror) 18521 return vivror, err 18522 case string(ObjectTypeValidateRestoreOperationRequest): 18523 var vror ValidateRestoreOperationRequest 18524 err := json.Unmarshal(body, &vror) 18525 return vror, err 18526 default: 18527 var vor ValidateOperationRequest 18528 err := json.Unmarshal(body, &vor) 18529 return vor, err 18530 } 18531} 18532func unmarshalBasicValidateOperationRequestArray(body []byte) ([]BasicValidateOperationRequest, error) { 18533 var rawMessages []*json.RawMessage 18534 err := json.Unmarshal(body, &rawMessages) 18535 if err != nil { 18536 return nil, err 18537 } 18538 18539 vorArray := make([]BasicValidateOperationRequest, len(rawMessages)) 18540 18541 for index, rawMessage := range rawMessages { 18542 vor, err := unmarshalBasicValidateOperationRequest(*rawMessage) 18543 if err != nil { 18544 return nil, err 18545 } 18546 vorArray[index] = vor 18547 } 18548 return vorArray, nil 18549} 18550 18551// MarshalJSON is the custom marshaler for ValidateOperationRequest. 18552func (vor ValidateOperationRequest) MarshalJSON() ([]byte, error) { 18553 vor.ObjectType = ObjectTypeValidateOperationRequest 18554 objectMap := make(map[string]interface{}) 18555 if vor.ObjectType != "" { 18556 objectMap["objectType"] = vor.ObjectType 18557 } 18558 return json.Marshal(objectMap) 18559} 18560 18561// AsValidateIaasVMRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateOperationRequest. 18562func (vor ValidateOperationRequest) AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) { 18563 return nil, false 18564} 18565 18566// AsValidateRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateOperationRequest. 18567func (vor ValidateOperationRequest) AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) { 18568 return nil, false 18569} 18570 18571// AsBasicValidateRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateOperationRequest. 18572func (vor ValidateOperationRequest) AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool) { 18573 return nil, false 18574} 18575 18576// AsValidateOperationRequest is the BasicValidateOperationRequest implementation for ValidateOperationRequest. 18577func (vor ValidateOperationRequest) AsValidateOperationRequest() (*ValidateOperationRequest, bool) { 18578 return &vor, true 18579} 18580 18581// AsBasicValidateOperationRequest is the BasicValidateOperationRequest implementation for ValidateOperationRequest. 18582func (vor ValidateOperationRequest) AsBasicValidateOperationRequest() (BasicValidateOperationRequest, bool) { 18583 return &vor, true 18584} 18585 18586// ValidateOperationResponse base class for validate operation response. 18587type ValidateOperationResponse struct { 18588 // ValidationResults - Gets the validation result 18589 ValidationResults *[]ErrorDetail `json:"validationResults,omitempty"` 18590} 18591 18592// ValidateOperationsResponse ... 18593type ValidateOperationsResponse struct { 18594 autorest.Response `json:"-"` 18595 ValidateOperationResponse *ValidateOperationResponse `json:"validateOperationResponse,omitempty"` 18596} 18597 18598// BasicValidateRestoreOperationRequest azureRestoreValidation request. 18599type BasicValidateRestoreOperationRequest interface { 18600 AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) 18601 AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) 18602} 18603 18604// ValidateRestoreOperationRequest azureRestoreValidation request. 18605type ValidateRestoreOperationRequest struct { 18606 // RestoreRequest - Sets restore request to be validated 18607 RestoreRequest BasicRestoreRequest `json:"restoreRequest,omitempty"` 18608 // ObjectType - Possible values include: 'ObjectTypeValidateOperationRequest', 'ObjectTypeValidateIaasVMRestoreOperationRequest', 'ObjectTypeValidateRestoreOperationRequest' 18609 ObjectType ObjectTypeBasicValidateOperationRequest `json:"objectType,omitempty"` 18610} 18611 18612func unmarshalBasicValidateRestoreOperationRequest(body []byte) (BasicValidateRestoreOperationRequest, error) { 18613 var m map[string]interface{} 18614 err := json.Unmarshal(body, &m) 18615 if err != nil { 18616 return nil, err 18617 } 18618 18619 switch m["objectType"] { 18620 case string(ObjectTypeValidateIaasVMRestoreOperationRequest): 18621 var vivror ValidateIaasVMRestoreOperationRequest 18622 err := json.Unmarshal(body, &vivror) 18623 return vivror, err 18624 default: 18625 var vror ValidateRestoreOperationRequest 18626 err := json.Unmarshal(body, &vror) 18627 return vror, err 18628 } 18629} 18630func unmarshalBasicValidateRestoreOperationRequestArray(body []byte) ([]BasicValidateRestoreOperationRequest, error) { 18631 var rawMessages []*json.RawMessage 18632 err := json.Unmarshal(body, &rawMessages) 18633 if err != nil { 18634 return nil, err 18635 } 18636 18637 vrorArray := make([]BasicValidateRestoreOperationRequest, len(rawMessages)) 18638 18639 for index, rawMessage := range rawMessages { 18640 vror, err := unmarshalBasicValidateRestoreOperationRequest(*rawMessage) 18641 if err != nil { 18642 return nil, err 18643 } 18644 vrorArray[index] = vror 18645 } 18646 return vrorArray, nil 18647} 18648 18649// MarshalJSON is the custom marshaler for ValidateRestoreOperationRequest. 18650func (vror ValidateRestoreOperationRequest) MarshalJSON() ([]byte, error) { 18651 vror.ObjectType = ObjectTypeValidateRestoreOperationRequest 18652 objectMap := make(map[string]interface{}) 18653 objectMap["restoreRequest"] = vror.RestoreRequest 18654 if vror.ObjectType != "" { 18655 objectMap["objectType"] = vror.ObjectType 18656 } 18657 return json.Marshal(objectMap) 18658} 18659 18660// AsValidateIaasVMRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateRestoreOperationRequest. 18661func (vror ValidateRestoreOperationRequest) AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) { 18662 return nil, false 18663} 18664 18665// AsValidateRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateRestoreOperationRequest. 18666func (vror ValidateRestoreOperationRequest) AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) { 18667 return &vror, true 18668} 18669 18670// AsBasicValidateRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateRestoreOperationRequest. 18671func (vror ValidateRestoreOperationRequest) AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool) { 18672 return &vror, true 18673} 18674 18675// AsValidateOperationRequest is the BasicValidateOperationRequest implementation for ValidateRestoreOperationRequest. 18676func (vror ValidateRestoreOperationRequest) AsValidateOperationRequest() (*ValidateOperationRequest, bool) { 18677 return nil, false 18678} 18679 18680// AsBasicValidateOperationRequest is the BasicValidateOperationRequest implementation for ValidateRestoreOperationRequest. 18681func (vror ValidateRestoreOperationRequest) AsBasicValidateOperationRequest() (BasicValidateOperationRequest, bool) { 18682 return &vror, true 18683} 18684 18685// UnmarshalJSON is the custom unmarshaler for ValidateRestoreOperationRequest struct. 18686func (vror *ValidateRestoreOperationRequest) UnmarshalJSON(body []byte) error { 18687 var m map[string]*json.RawMessage 18688 err := json.Unmarshal(body, &m) 18689 if err != nil { 18690 return err 18691 } 18692 for k, v := range m { 18693 switch k { 18694 case "restoreRequest": 18695 if v != nil { 18696 restoreRequest, err := unmarshalBasicRestoreRequest(*v) 18697 if err != nil { 18698 return err 18699 } 18700 vror.RestoreRequest = restoreRequest 18701 } 18702 case "objectType": 18703 if v != nil { 18704 var objectType ObjectTypeBasicValidateOperationRequest 18705 err = json.Unmarshal(*v, &objectType) 18706 if err != nil { 18707 return err 18708 } 18709 vror.ObjectType = objectType 18710 } 18711 } 18712 } 18713 18714 return nil 18715} 18716 18717// WeeklyRetentionFormat weekly retention format. 18718type WeeklyRetentionFormat struct { 18719 // DaysOfTheWeek - List of days of the week. 18720 DaysOfTheWeek *[]DayOfWeek `json:"daysOfTheWeek,omitempty"` 18721 // WeeksOfTheMonth - List of weeks of month. 18722 WeeksOfTheMonth *[]WeekOfMonth `json:"weeksOfTheMonth,omitempty"` 18723} 18724 18725// WeeklyRetentionSchedule weekly retention schedule. 18726type WeeklyRetentionSchedule struct { 18727 // DaysOfTheWeek - List of days of week for weekly retention policy. 18728 DaysOfTheWeek *[]DayOfWeek `json:"daysOfTheWeek,omitempty"` 18729 // RetentionTimes - Retention times of retention policy. 18730 RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"` 18731 // RetentionDuration - Retention duration of retention Policy. 18732 RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` 18733} 18734 18735// WorkloadInquiryDetails details of an inquired protectable item. 18736type WorkloadInquiryDetails struct { 18737 // Type - Type of the Workload such as SQL, Oracle etc. 18738 Type *string `json:"type,omitempty"` 18739 // ItemCount - Contains the protectable item Count inside this Container. 18740 ItemCount *int64 `json:"itemCount,omitempty"` 18741 // InquiryValidation - Inquiry validation such as permissions and other backup validations. 18742 InquiryValidation *InquiryValidation `json:"inquiryValidation,omitempty"` 18743} 18744 18745// BasicWorkloadItem base class for backup item. Workload-specific backup items are derived from this class. 18746type BasicWorkloadItem interface { 18747 AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) 18748 AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) 18749 AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) 18750 AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) 18751 AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) 18752 AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) 18753 AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) 18754 AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) 18755 AsWorkloadItem() (*WorkloadItem, bool) 18756} 18757 18758// WorkloadItem base class for backup item. Workload-specific backup items are derived from this class. 18759type WorkloadItem struct { 18760 // BackupManagementType - Type of backup management to backup an item. 18761 BackupManagementType *string `json:"backupManagementType,omitempty"` 18762 // WorkloadType - Type of workload for the backup management 18763 WorkloadType *string `json:"workloadType,omitempty"` 18764 // FriendlyName - Friendly name of the backup item. 18765 FriendlyName *string `json:"friendlyName,omitempty"` 18766 // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 18767 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 18768 // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' 18769 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` 18770} 18771 18772func unmarshalBasicWorkloadItem(body []byte) (BasicWorkloadItem, error) { 18773 var m map[string]interface{} 18774 err := json.Unmarshal(body, &m) 18775 if err != nil { 18776 return nil, err 18777 } 18778 18779 switch m["workloadItemType"] { 18780 case string(WorkloadItemTypeAzureVMWorkloadItem): 18781 var avwi AzureVMWorkloadItem 18782 err := json.Unmarshal(body, &avwi) 18783 return avwi, err 18784 case string(WorkloadItemTypeSAPAseDatabase1): 18785 var avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem 18786 err := json.Unmarshal(body, &avwsadwi) 18787 return avwsadwi, err 18788 case string(WorkloadItemTypeSAPAseSystem1): 18789 var avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem 18790 err := json.Unmarshal(body, &avwsaswi) 18791 return avwsaswi, err 18792 case string(WorkloadItemTypeSAPHanaDatabase1): 18793 var avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem 18794 err := json.Unmarshal(body, &avwshdwi) 18795 return avwshdwi, err 18796 case string(WorkloadItemTypeSAPHanaSystem1): 18797 var avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem 18798 err := json.Unmarshal(body, &avwshswi) 18799 return avwshswi, err 18800 case string(WorkloadItemTypeSQLDataBase1): 18801 var avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem 18802 err := json.Unmarshal(body, &avwsdwi) 18803 return avwsdwi, err 18804 case string(WorkloadItemTypeSQLInstance1): 18805 var avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem 18806 err := json.Unmarshal(body, &avwsiwi) 18807 return avwsiwi, err 18808 default: 18809 var wi WorkloadItem 18810 err := json.Unmarshal(body, &wi) 18811 return wi, err 18812 } 18813} 18814func unmarshalBasicWorkloadItemArray(body []byte) ([]BasicWorkloadItem, error) { 18815 var rawMessages []*json.RawMessage 18816 err := json.Unmarshal(body, &rawMessages) 18817 if err != nil { 18818 return nil, err 18819 } 18820 18821 wiArray := make([]BasicWorkloadItem, len(rawMessages)) 18822 18823 for index, rawMessage := range rawMessages { 18824 wi, err := unmarshalBasicWorkloadItem(*rawMessage) 18825 if err != nil { 18826 return nil, err 18827 } 18828 wiArray[index] = wi 18829 } 18830 return wiArray, nil 18831} 18832 18833// MarshalJSON is the custom marshaler for WorkloadItem. 18834func (wi WorkloadItem) MarshalJSON() ([]byte, error) { 18835 wi.WorkloadItemType = WorkloadItemTypeWorkloadItem 18836 objectMap := make(map[string]interface{}) 18837 if wi.BackupManagementType != nil { 18838 objectMap["backupManagementType"] = wi.BackupManagementType 18839 } 18840 if wi.WorkloadType != nil { 18841 objectMap["workloadType"] = wi.WorkloadType 18842 } 18843 if wi.FriendlyName != nil { 18844 objectMap["friendlyName"] = wi.FriendlyName 18845 } 18846 if wi.ProtectionState != "" { 18847 objectMap["protectionState"] = wi.ProtectionState 18848 } 18849 if wi.WorkloadItemType != "" { 18850 objectMap["workloadItemType"] = wi.WorkloadItemType 18851 } 18852 return json.Marshal(objectMap) 18853} 18854 18855// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. 18856func (wi WorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { 18857 return nil, false 18858} 18859 18860// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. 18861func (wi WorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { 18862 return nil, false 18863} 18864 18865// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. 18866func (wi WorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { 18867 return nil, false 18868} 18869 18870// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. 18871func (wi WorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { 18872 return nil, false 18873} 18874 18875// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. 18876func (wi WorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { 18877 return nil, false 18878} 18879 18880// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. 18881func (wi WorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { 18882 return nil, false 18883} 18884 18885// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. 18886func (wi WorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { 18887 return nil, false 18888} 18889 18890// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. 18891func (wi WorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { 18892 return nil, false 18893} 18894 18895// AsWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. 18896func (wi WorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { 18897 return &wi, true 18898} 18899 18900// AsBasicWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. 18901func (wi WorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { 18902 return &wi, true 18903} 18904 18905// WorkloadItemResource base class for backup item. Workload-specific backup items are derived from this 18906// class. 18907type WorkloadItemResource struct { 18908 // Properties - WorkloadItemResource properties 18909 Properties BasicWorkloadItem `json:"properties,omitempty"` 18910 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 18911 ID *string `json:"id,omitempty"` 18912 // Name - READ-ONLY; Resource name associated with the resource. 18913 Name *string `json:"name,omitempty"` 18914 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 18915 Type *string `json:"type,omitempty"` 18916 // Location - Resource location. 18917 Location *string `json:"location,omitempty"` 18918 // Tags - Resource tags. 18919 Tags map[string]*string `json:"tags"` 18920 // ETag - Optional ETag. 18921 ETag *string `json:"eTag,omitempty"` 18922} 18923 18924// MarshalJSON is the custom marshaler for WorkloadItemResource. 18925func (wir WorkloadItemResource) MarshalJSON() ([]byte, error) { 18926 objectMap := make(map[string]interface{}) 18927 objectMap["properties"] = wir.Properties 18928 if wir.Location != nil { 18929 objectMap["location"] = wir.Location 18930 } 18931 if wir.Tags != nil { 18932 objectMap["tags"] = wir.Tags 18933 } 18934 if wir.ETag != nil { 18935 objectMap["eTag"] = wir.ETag 18936 } 18937 return json.Marshal(objectMap) 18938} 18939 18940// UnmarshalJSON is the custom unmarshaler for WorkloadItemResource struct. 18941func (wir *WorkloadItemResource) UnmarshalJSON(body []byte) error { 18942 var m map[string]*json.RawMessage 18943 err := json.Unmarshal(body, &m) 18944 if err != nil { 18945 return err 18946 } 18947 for k, v := range m { 18948 switch k { 18949 case "properties": 18950 if v != nil { 18951 properties, err := unmarshalBasicWorkloadItem(*v) 18952 if err != nil { 18953 return err 18954 } 18955 wir.Properties = properties 18956 } 18957 case "id": 18958 if v != nil { 18959 var ID string 18960 err = json.Unmarshal(*v, &ID) 18961 if err != nil { 18962 return err 18963 } 18964 wir.ID = &ID 18965 } 18966 case "name": 18967 if v != nil { 18968 var name string 18969 err = json.Unmarshal(*v, &name) 18970 if err != nil { 18971 return err 18972 } 18973 wir.Name = &name 18974 } 18975 case "type": 18976 if v != nil { 18977 var typeVar string 18978 err = json.Unmarshal(*v, &typeVar) 18979 if err != nil { 18980 return err 18981 } 18982 wir.Type = &typeVar 18983 } 18984 case "location": 18985 if v != nil { 18986 var location string 18987 err = json.Unmarshal(*v, &location) 18988 if err != nil { 18989 return err 18990 } 18991 wir.Location = &location 18992 } 18993 case "tags": 18994 if v != nil { 18995 var tags map[string]*string 18996 err = json.Unmarshal(*v, &tags) 18997 if err != nil { 18998 return err 18999 } 19000 wir.Tags = tags 19001 } 19002 case "eTag": 19003 if v != nil { 19004 var eTag string 19005 err = json.Unmarshal(*v, &eTag) 19006 if err != nil { 19007 return err 19008 } 19009 wir.ETag = &eTag 19010 } 19011 } 19012 } 19013 19014 return nil 19015} 19016 19017// WorkloadItemResourceList list of WorkloadItem resources 19018type WorkloadItemResourceList struct { 19019 autorest.Response `json:"-"` 19020 // Value - List of resources. 19021 Value *[]WorkloadItemResource `json:"value,omitempty"` 19022 // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. 19023 NextLink *string `json:"nextLink,omitempty"` 19024} 19025 19026// WorkloadItemResourceListIterator provides access to a complete listing of WorkloadItemResource values. 19027type WorkloadItemResourceListIterator struct { 19028 i int 19029 page WorkloadItemResourceListPage 19030} 19031 19032// NextWithContext advances to the next value. If there was an error making 19033// the request the iterator does not advance and the error is returned. 19034func (iter *WorkloadItemResourceListIterator) NextWithContext(ctx context.Context) (err error) { 19035 if tracing.IsEnabled() { 19036 ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadItemResourceListIterator.NextWithContext") 19037 defer func() { 19038 sc := -1 19039 if iter.Response().Response.Response != nil { 19040 sc = iter.Response().Response.Response.StatusCode 19041 } 19042 tracing.EndSpan(ctx, sc, err) 19043 }() 19044 } 19045 iter.i++ 19046 if iter.i < len(iter.page.Values()) { 19047 return nil 19048 } 19049 err = iter.page.NextWithContext(ctx) 19050 if err != nil { 19051 iter.i-- 19052 return err 19053 } 19054 iter.i = 0 19055 return nil 19056} 19057 19058// Next advances to the next value. If there was an error making 19059// the request the iterator does not advance and the error is returned. 19060// Deprecated: Use NextWithContext() instead. 19061func (iter *WorkloadItemResourceListIterator) Next() error { 19062 return iter.NextWithContext(context.Background()) 19063} 19064 19065// NotDone returns true if the enumeration should be started or is not yet complete. 19066func (iter WorkloadItemResourceListIterator) NotDone() bool { 19067 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 19068} 19069 19070// Response returns the raw server response from the last page request. 19071func (iter WorkloadItemResourceListIterator) Response() WorkloadItemResourceList { 19072 return iter.page.Response() 19073} 19074 19075// Value returns the current value or a zero-initialized value if the 19076// iterator has advanced beyond the end of the collection. 19077func (iter WorkloadItemResourceListIterator) Value() WorkloadItemResource { 19078 if !iter.page.NotDone() { 19079 return WorkloadItemResource{} 19080 } 19081 return iter.page.Values()[iter.i] 19082} 19083 19084// Creates a new instance of the WorkloadItemResourceListIterator type. 19085func NewWorkloadItemResourceListIterator(page WorkloadItemResourceListPage) WorkloadItemResourceListIterator { 19086 return WorkloadItemResourceListIterator{page: page} 19087} 19088 19089// IsEmpty returns true if the ListResult contains no values. 19090func (wirl WorkloadItemResourceList) IsEmpty() bool { 19091 return wirl.Value == nil || len(*wirl.Value) == 0 19092} 19093 19094// hasNextLink returns true if the NextLink is not empty. 19095func (wirl WorkloadItemResourceList) hasNextLink() bool { 19096 return wirl.NextLink != nil && len(*wirl.NextLink) != 0 19097} 19098 19099// workloadItemResourceListPreparer prepares a request to retrieve the next set of results. 19100// It returns nil if no more results exist. 19101func (wirl WorkloadItemResourceList) workloadItemResourceListPreparer(ctx context.Context) (*http.Request, error) { 19102 if !wirl.hasNextLink() { 19103 return nil, nil 19104 } 19105 return autorest.Prepare((&http.Request{}).WithContext(ctx), 19106 autorest.AsJSON(), 19107 autorest.AsGet(), 19108 autorest.WithBaseURL(to.String(wirl.NextLink))) 19109} 19110 19111// WorkloadItemResourceListPage contains a page of WorkloadItemResource values. 19112type WorkloadItemResourceListPage struct { 19113 fn func(context.Context, WorkloadItemResourceList) (WorkloadItemResourceList, error) 19114 wirl WorkloadItemResourceList 19115} 19116 19117// NextWithContext advances to the next page of values. If there was an error making 19118// the request the page does not advance and the error is returned. 19119func (page *WorkloadItemResourceListPage) NextWithContext(ctx context.Context) (err error) { 19120 if tracing.IsEnabled() { 19121 ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadItemResourceListPage.NextWithContext") 19122 defer func() { 19123 sc := -1 19124 if page.Response().Response.Response != nil { 19125 sc = page.Response().Response.Response.StatusCode 19126 } 19127 tracing.EndSpan(ctx, sc, err) 19128 }() 19129 } 19130 for { 19131 next, err := page.fn(ctx, page.wirl) 19132 if err != nil { 19133 return err 19134 } 19135 page.wirl = next 19136 if !next.hasNextLink() || !next.IsEmpty() { 19137 break 19138 } 19139 } 19140 return nil 19141} 19142 19143// Next advances to the next page of values. If there was an error making 19144// the request the page does not advance and the error is returned. 19145// Deprecated: Use NextWithContext() instead. 19146func (page *WorkloadItemResourceListPage) Next() error { 19147 return page.NextWithContext(context.Background()) 19148} 19149 19150// NotDone returns true if the page enumeration should be started or is not yet complete. 19151func (page WorkloadItemResourceListPage) NotDone() bool { 19152 return !page.wirl.IsEmpty() 19153} 19154 19155// Response returns the raw server response from the last page request. 19156func (page WorkloadItemResourceListPage) Response() WorkloadItemResourceList { 19157 return page.wirl 19158} 19159 19160// Values returns the slice of values for the current page or nil if there are no values. 19161func (page WorkloadItemResourceListPage) Values() []WorkloadItemResource { 19162 if page.wirl.IsEmpty() { 19163 return nil 19164 } 19165 return *page.wirl.Value 19166} 19167 19168// Creates a new instance of the WorkloadItemResourceListPage type. 19169func NewWorkloadItemResourceListPage(cur WorkloadItemResourceList, getNextPage func(context.Context, WorkloadItemResourceList) (WorkloadItemResourceList, error)) WorkloadItemResourceListPage { 19170 return WorkloadItemResourceListPage{ 19171 fn: getNextPage, 19172 wirl: cur, 19173 } 19174} 19175 19176// BasicWorkloadProtectableItem base class for backup item. Workload-specific backup items are derived from this class. 19177type BasicWorkloadProtectableItem interface { 19178 AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) 19179 AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) 19180 AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) 19181 AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) 19182 AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) 19183 AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) 19184 AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) 19185 AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) 19186 AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) 19187 AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) 19188 AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) 19189 AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) 19190 AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) 19191 AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) 19192} 19193 19194// WorkloadProtectableItem base class for backup item. Workload-specific backup items are derived from this 19195// class. 19196type WorkloadProtectableItem struct { 19197 // BackupManagementType - Type of backup management to backup an item. 19198 BackupManagementType *string `json:"backupManagementType,omitempty"` 19199 // WorkloadType - Type of workload for the backup management 19200 WorkloadType *string `json:"workloadType,omitempty"` 19201 // FriendlyName - Friendly name of the backup item. 19202 FriendlyName *string `json:"friendlyName,omitempty"` 19203 // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' 19204 ProtectionState ProtectionStatus `json:"protectionState,omitempty"` 19205 // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' 19206 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` 19207} 19208 19209func unmarshalBasicWorkloadProtectableItem(body []byte) (BasicWorkloadProtectableItem, error) { 19210 var m map[string]interface{} 19211 err := json.Unmarshal(body, &m) 19212 if err != nil { 19213 return nil, err 19214 } 19215 19216 switch m["protectableItemType"] { 19217 case string(ProtectableItemTypeAzureFileShare): 19218 var afspi AzureFileShareProtectableItem 19219 err := json.Unmarshal(body, &afspi) 19220 return afspi, err 19221 case string(ProtectableItemTypeMicrosoftClassicComputevirtualMachines): 19222 var aisccvpi AzureIaaSClassicComputeVMProtectableItem 19223 err := json.Unmarshal(body, &aisccvpi) 19224 return aisccvpi, err 19225 case string(ProtectableItemTypeMicrosoftComputevirtualMachines): 19226 var aiscvpi AzureIaaSComputeVMProtectableItem 19227 err := json.Unmarshal(body, &aiscvpi) 19228 return aiscvpi, err 19229 case string(ProtectableItemTypeAzureVMWorkloadProtectableItem): 19230 var avwpi AzureVMWorkloadProtectableItem 19231 err := json.Unmarshal(body, &avwpi) 19232 return avwpi, err 19233 case string(ProtectableItemTypeSAPAseSystem): 19234 var avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem 19235 err := json.Unmarshal(body, &avwsaspi) 19236 return avwsaspi, err 19237 case string(ProtectableItemTypeSAPHanaDatabase): 19238 var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem 19239 err := json.Unmarshal(body, &avwshdpi) 19240 return avwshdpi, err 19241 case string(ProtectableItemTypeSAPHanaSystem): 19242 var avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem 19243 err := json.Unmarshal(body, &avwshspi) 19244 return avwshspi, err 19245 case string(ProtectableItemTypeSQLAvailabilityGroupContainer): 19246 var avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem 19247 err := json.Unmarshal(body, &avwsagpi) 19248 return avwsagpi, err 19249 case string(ProtectableItemTypeSQLDataBase): 19250 var avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem 19251 err := json.Unmarshal(body, &avwsdpi) 19252 return avwsdpi, err 19253 case string(ProtectableItemTypeSQLInstance): 19254 var avwsipi AzureVMWorkloadSQLInstanceProtectableItem 19255 err := json.Unmarshal(body, &avwsipi) 19256 return avwsipi, err 19257 case string(ProtectableItemTypeIaaSVMProtectableItem): 19258 var ispi IaaSVMProtectableItem 19259 err := json.Unmarshal(body, &ispi) 19260 return ispi, err 19261 default: 19262 var wpi WorkloadProtectableItem 19263 err := json.Unmarshal(body, &wpi) 19264 return wpi, err 19265 } 19266} 19267func unmarshalBasicWorkloadProtectableItemArray(body []byte) ([]BasicWorkloadProtectableItem, error) { 19268 var rawMessages []*json.RawMessage 19269 err := json.Unmarshal(body, &rawMessages) 19270 if err != nil { 19271 return nil, err 19272 } 19273 19274 wpiArray := make([]BasicWorkloadProtectableItem, len(rawMessages)) 19275 19276 for index, rawMessage := range rawMessages { 19277 wpi, err := unmarshalBasicWorkloadProtectableItem(*rawMessage) 19278 if err != nil { 19279 return nil, err 19280 } 19281 wpiArray[index] = wpi 19282 } 19283 return wpiArray, nil 19284} 19285 19286// MarshalJSON is the custom marshaler for WorkloadProtectableItem. 19287func (wpi WorkloadProtectableItem) MarshalJSON() ([]byte, error) { 19288 wpi.ProtectableItemType = ProtectableItemTypeWorkloadProtectableItem 19289 objectMap := make(map[string]interface{}) 19290 if wpi.BackupManagementType != nil { 19291 objectMap["backupManagementType"] = wpi.BackupManagementType 19292 } 19293 if wpi.WorkloadType != nil { 19294 objectMap["workloadType"] = wpi.WorkloadType 19295 } 19296 if wpi.FriendlyName != nil { 19297 objectMap["friendlyName"] = wpi.FriendlyName 19298 } 19299 if wpi.ProtectionState != "" { 19300 objectMap["protectionState"] = wpi.ProtectionState 19301 } 19302 if wpi.ProtectableItemType != "" { 19303 objectMap["protectableItemType"] = wpi.ProtectableItemType 19304 } 19305 return json.Marshal(objectMap) 19306} 19307 19308// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. 19309func (wpi WorkloadProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { 19310 return nil, false 19311} 19312 19313// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. 19314func (wpi WorkloadProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { 19315 return nil, false 19316} 19317 19318// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. 19319func (wpi WorkloadProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { 19320 return nil, false 19321} 19322 19323// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. 19324func (wpi WorkloadProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { 19325 return nil, false 19326} 19327 19328// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. 19329func (wpi WorkloadProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { 19330 return nil, false 19331} 19332 19333// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. 19334func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { 19335 return nil, false 19336} 19337 19338// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. 19339func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { 19340 return nil, false 19341} 19342 19343// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. 19344func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { 19345 return nil, false 19346} 19347 19348// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. 19349func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { 19350 return nil, false 19351} 19352 19353// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. 19354func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { 19355 return nil, false 19356} 19357 19358// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. 19359func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { 19360 return nil, false 19361} 19362 19363// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. 19364func (wpi WorkloadProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { 19365 return nil, false 19366} 19367 19368// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. 19369func (wpi WorkloadProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { 19370 return nil, false 19371} 19372 19373// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. 19374func (wpi WorkloadProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { 19375 return &wpi, true 19376} 19377 19378// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. 19379func (wpi WorkloadProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { 19380 return &wpi, true 19381} 19382 19383// WorkloadProtectableItemResource base class for backup item. Workload-specific backup items are derived 19384// from this class. 19385type WorkloadProtectableItemResource struct { 19386 // Properties - WorkloadProtectableItemResource properties 19387 Properties BasicWorkloadProtectableItem `json:"properties,omitempty"` 19388 // ID - READ-ONLY; Resource Id represents the complete path to the resource. 19389 ID *string `json:"id,omitempty"` 19390 // Name - READ-ONLY; Resource name associated with the resource. 19391 Name *string `json:"name,omitempty"` 19392 // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... 19393 Type *string `json:"type,omitempty"` 19394 // Location - Resource location. 19395 Location *string `json:"location,omitempty"` 19396 // Tags - Resource tags. 19397 Tags map[string]*string `json:"tags"` 19398 // ETag - Optional ETag. 19399 ETag *string `json:"eTag,omitempty"` 19400} 19401 19402// MarshalJSON is the custom marshaler for WorkloadProtectableItemResource. 19403func (wpir WorkloadProtectableItemResource) MarshalJSON() ([]byte, error) { 19404 objectMap := make(map[string]interface{}) 19405 objectMap["properties"] = wpir.Properties 19406 if wpir.Location != nil { 19407 objectMap["location"] = wpir.Location 19408 } 19409 if wpir.Tags != nil { 19410 objectMap["tags"] = wpir.Tags 19411 } 19412 if wpir.ETag != nil { 19413 objectMap["eTag"] = wpir.ETag 19414 } 19415 return json.Marshal(objectMap) 19416} 19417 19418// UnmarshalJSON is the custom unmarshaler for WorkloadProtectableItemResource struct. 19419func (wpir *WorkloadProtectableItemResource) UnmarshalJSON(body []byte) error { 19420 var m map[string]*json.RawMessage 19421 err := json.Unmarshal(body, &m) 19422 if err != nil { 19423 return err 19424 } 19425 for k, v := range m { 19426 switch k { 19427 case "properties": 19428 if v != nil { 19429 properties, err := unmarshalBasicWorkloadProtectableItem(*v) 19430 if err != nil { 19431 return err 19432 } 19433 wpir.Properties = properties 19434 } 19435 case "id": 19436 if v != nil { 19437 var ID string 19438 err = json.Unmarshal(*v, &ID) 19439 if err != nil { 19440 return err 19441 } 19442 wpir.ID = &ID 19443 } 19444 case "name": 19445 if v != nil { 19446 var name string 19447 err = json.Unmarshal(*v, &name) 19448 if err != nil { 19449 return err 19450 } 19451 wpir.Name = &name 19452 } 19453 case "type": 19454 if v != nil { 19455 var typeVar string 19456 err = json.Unmarshal(*v, &typeVar) 19457 if err != nil { 19458 return err 19459 } 19460 wpir.Type = &typeVar 19461 } 19462 case "location": 19463 if v != nil { 19464 var location string 19465 err = json.Unmarshal(*v, &location) 19466 if err != nil { 19467 return err 19468 } 19469 wpir.Location = &location 19470 } 19471 case "tags": 19472 if v != nil { 19473 var tags map[string]*string 19474 err = json.Unmarshal(*v, &tags) 19475 if err != nil { 19476 return err 19477 } 19478 wpir.Tags = tags 19479 } 19480 case "eTag": 19481 if v != nil { 19482 var eTag string 19483 err = json.Unmarshal(*v, &eTag) 19484 if err != nil { 19485 return err 19486 } 19487 wpir.ETag = &eTag 19488 } 19489 } 19490 } 19491 19492 return nil 19493} 19494 19495// WorkloadProtectableItemResourceList list of WorkloadProtectableItem resources 19496type WorkloadProtectableItemResourceList struct { 19497 autorest.Response `json:"-"` 19498 // Value - List of resources. 19499 Value *[]WorkloadProtectableItemResource `json:"value,omitempty"` 19500 // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. 19501 NextLink *string `json:"nextLink,omitempty"` 19502} 19503 19504// WorkloadProtectableItemResourceListIterator provides access to a complete listing of 19505// WorkloadProtectableItemResource values. 19506type WorkloadProtectableItemResourceListIterator struct { 19507 i int 19508 page WorkloadProtectableItemResourceListPage 19509} 19510 19511// NextWithContext advances to the next value. If there was an error making 19512// the request the iterator does not advance and the error is returned. 19513func (iter *WorkloadProtectableItemResourceListIterator) NextWithContext(ctx context.Context) (err error) { 19514 if tracing.IsEnabled() { 19515 ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadProtectableItemResourceListIterator.NextWithContext") 19516 defer func() { 19517 sc := -1 19518 if iter.Response().Response.Response != nil { 19519 sc = iter.Response().Response.Response.StatusCode 19520 } 19521 tracing.EndSpan(ctx, sc, err) 19522 }() 19523 } 19524 iter.i++ 19525 if iter.i < len(iter.page.Values()) { 19526 return nil 19527 } 19528 err = iter.page.NextWithContext(ctx) 19529 if err != nil { 19530 iter.i-- 19531 return err 19532 } 19533 iter.i = 0 19534 return nil 19535} 19536 19537// Next advances to the next value. If there was an error making 19538// the request the iterator does not advance and the error is returned. 19539// Deprecated: Use NextWithContext() instead. 19540func (iter *WorkloadProtectableItemResourceListIterator) Next() error { 19541 return iter.NextWithContext(context.Background()) 19542} 19543 19544// NotDone returns true if the enumeration should be started or is not yet complete. 19545func (iter WorkloadProtectableItemResourceListIterator) NotDone() bool { 19546 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 19547} 19548 19549// Response returns the raw server response from the last page request. 19550func (iter WorkloadProtectableItemResourceListIterator) Response() WorkloadProtectableItemResourceList { 19551 return iter.page.Response() 19552} 19553 19554// Value returns the current value or a zero-initialized value if the 19555// iterator has advanced beyond the end of the collection. 19556func (iter WorkloadProtectableItemResourceListIterator) Value() WorkloadProtectableItemResource { 19557 if !iter.page.NotDone() { 19558 return WorkloadProtectableItemResource{} 19559 } 19560 return iter.page.Values()[iter.i] 19561} 19562 19563// Creates a new instance of the WorkloadProtectableItemResourceListIterator type. 19564func NewWorkloadProtectableItemResourceListIterator(page WorkloadProtectableItemResourceListPage) WorkloadProtectableItemResourceListIterator { 19565 return WorkloadProtectableItemResourceListIterator{page: page} 19566} 19567 19568// IsEmpty returns true if the ListResult contains no values. 19569func (wpirl WorkloadProtectableItemResourceList) IsEmpty() bool { 19570 return wpirl.Value == nil || len(*wpirl.Value) == 0 19571} 19572 19573// hasNextLink returns true if the NextLink is not empty. 19574func (wpirl WorkloadProtectableItemResourceList) hasNextLink() bool { 19575 return wpirl.NextLink != nil && len(*wpirl.NextLink) != 0 19576} 19577 19578// workloadProtectableItemResourceListPreparer prepares a request to retrieve the next set of results. 19579// It returns nil if no more results exist. 19580func (wpirl WorkloadProtectableItemResourceList) workloadProtectableItemResourceListPreparer(ctx context.Context) (*http.Request, error) { 19581 if !wpirl.hasNextLink() { 19582 return nil, nil 19583 } 19584 return autorest.Prepare((&http.Request{}).WithContext(ctx), 19585 autorest.AsJSON(), 19586 autorest.AsGet(), 19587 autorest.WithBaseURL(to.String(wpirl.NextLink))) 19588} 19589 19590// WorkloadProtectableItemResourceListPage contains a page of WorkloadProtectableItemResource values. 19591type WorkloadProtectableItemResourceListPage struct { 19592 fn func(context.Context, WorkloadProtectableItemResourceList) (WorkloadProtectableItemResourceList, error) 19593 wpirl WorkloadProtectableItemResourceList 19594} 19595 19596// NextWithContext advances to the next page of values. If there was an error making 19597// the request the page does not advance and the error is returned. 19598func (page *WorkloadProtectableItemResourceListPage) NextWithContext(ctx context.Context) (err error) { 19599 if tracing.IsEnabled() { 19600 ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadProtectableItemResourceListPage.NextWithContext") 19601 defer func() { 19602 sc := -1 19603 if page.Response().Response.Response != nil { 19604 sc = page.Response().Response.Response.StatusCode 19605 } 19606 tracing.EndSpan(ctx, sc, err) 19607 }() 19608 } 19609 for { 19610 next, err := page.fn(ctx, page.wpirl) 19611 if err != nil { 19612 return err 19613 } 19614 page.wpirl = next 19615 if !next.hasNextLink() || !next.IsEmpty() { 19616 break 19617 } 19618 } 19619 return nil 19620} 19621 19622// Next advances to the next page of values. If there was an error making 19623// the request the page does not advance and the error is returned. 19624// Deprecated: Use NextWithContext() instead. 19625func (page *WorkloadProtectableItemResourceListPage) Next() error { 19626 return page.NextWithContext(context.Background()) 19627} 19628 19629// NotDone returns true if the page enumeration should be started or is not yet complete. 19630func (page WorkloadProtectableItemResourceListPage) NotDone() bool { 19631 return !page.wpirl.IsEmpty() 19632} 19633 19634// Response returns the raw server response from the last page request. 19635func (page WorkloadProtectableItemResourceListPage) Response() WorkloadProtectableItemResourceList { 19636 return page.wpirl 19637} 19638 19639// Values returns the slice of values for the current page or nil if there are no values. 19640func (page WorkloadProtectableItemResourceListPage) Values() []WorkloadProtectableItemResource { 19641 if page.wpirl.IsEmpty() { 19642 return nil 19643 } 19644 return *page.wpirl.Value 19645} 19646 19647// Creates a new instance of the WorkloadProtectableItemResourceListPage type. 19648func NewWorkloadProtectableItemResourceListPage(cur WorkloadProtectableItemResourceList, getNextPage func(context.Context, WorkloadProtectableItemResourceList) (WorkloadProtectableItemResourceList, error)) WorkloadProtectableItemResourceListPage { 19649 return WorkloadProtectableItemResourceListPage{ 19650 fn: getNextPage, 19651 wpirl: cur, 19652 } 19653} 19654 19655// YearlyRetentionSchedule yearly retention schedule. 19656type YearlyRetentionSchedule struct { 19657 // RetentionScheduleFormatType - Retention schedule format for yearly retention policy. Possible values include: 'RetentionScheduleFormatInvalid', 'RetentionScheduleFormatDaily', 'RetentionScheduleFormatWeekly' 19658 RetentionScheduleFormatType RetentionScheduleFormat `json:"retentionScheduleFormatType,omitempty"` 19659 // MonthsOfYear - List of months of year of yearly retention policy. 19660 MonthsOfYear *[]MonthOfYear `json:"monthsOfYear,omitempty"` 19661 // RetentionScheduleDaily - Daily retention format for yearly retention policy. 19662 RetentionScheduleDaily *DailyRetentionFormat `json:"retentionScheduleDaily,omitempty"` 19663 // RetentionScheduleWeekly - Weekly retention format for yearly retention policy. 19664 RetentionScheduleWeekly *WeeklyRetentionFormat `json:"retentionScheduleWeekly,omitempty"` 19665 // RetentionTimes - Retention times of retention policy. 19666 RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"` 19667 // RetentionDuration - Retention duration of retention Policy. 19668 RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` 19669} 19670