...

Source file src/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-12-01/backup/models.go

Documentation: github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-12-01/backup

     1  package backup
     2  
     3  // Copyright (c) Microsoft Corporation. All rights reserved.
     4  // Licensed under the MIT License. See License.txt in the project root for license information.
     5  //
     6  // Code generated by Microsoft (R) AutoRest Code Generator.
     7  // Changes may cause incorrect behavior and will be lost if the code is regenerated.
     8  
     9  import (
    10  	"context"
    11  	"encoding/json"
    12  	"github.com/Azure/go-autorest/autorest"
    13  	"github.com/Azure/go-autorest/autorest/date"
    14  	"github.com/Azure/go-autorest/autorest/to"
    15  	"github.com/Azure/go-autorest/tracing"
    16  	"net/http"
    17  )
    18  
    19  // The package's fully qualified name.
    20  const fqdn = "github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-12-01/backup"
    21  
    22  // AzureBackupServerContainer azureBackupServer (DPMVenus) workload-specific protection container.
    23  type AzureBackupServerContainer struct {
    24  	// CanReRegister - Specifies whether the container is re-registrable.
    25  	CanReRegister *bool `json:"canReRegister,omitempty"`
    26  	// ContainerID - ID of container.
    27  	ContainerID *string `json:"containerId,omitempty"`
    28  	// ProtectedItemCount - Number of protected items in the BackupEngine
    29  	ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"`
    30  	// DpmAgentVersion - Backup engine Agent version
    31  	DpmAgentVersion *string `json:"dpmAgentVersion,omitempty"`
    32  	// DpmServers - List of BackupEngines protecting the container
    33  	DpmServers *[]string `json:"dpmServers,omitempty"`
    34  	// UpgradeAvailable - To check if upgrade available
    35  	UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"`
    36  	// ProtectionStatus - Protection status of the container.
    37  	ProtectionStatus *string `json:"protectionStatus,omitempty"`
    38  	// ExtendedInfo - Extended Info of the container.
    39  	ExtendedInfo *DPMContainerExtendedInfo `json:"extendedInfo,omitempty"`
    40  	// FriendlyName - Friendly name of the container.
    41  	FriendlyName *string `json:"friendlyName,omitempty"`
    42  	// BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
    43  	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
    44  	// RegistrationStatus - Status of registration of the container with the Recovery Services Vault.
    45  	RegistrationStatus *string `json:"registrationStatus,omitempty"`
    46  	// HealthStatus - Status of health of the container.
    47  	HealthStatus *string `json:"healthStatus,omitempty"`
    48  	// ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1'
    49  	ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
    50  }
    51  
    52  // MarshalJSON is the custom marshaler for AzureBackupServerContainer.
    53  func (absc AzureBackupServerContainer) MarshalJSON() ([]byte, error) {
    54  	absc.ContainerType = ContainerTypeAzureBackupServerContainer1
    55  	objectMap := make(map[string]interface{})
    56  	if absc.CanReRegister != nil {
    57  		objectMap["canReRegister"] = absc.CanReRegister
    58  	}
    59  	if absc.ContainerID != nil {
    60  		objectMap["containerId"] = absc.ContainerID
    61  	}
    62  	if absc.ProtectedItemCount != nil {
    63  		objectMap["protectedItemCount"] = absc.ProtectedItemCount
    64  	}
    65  	if absc.DpmAgentVersion != nil {
    66  		objectMap["dpmAgentVersion"] = absc.DpmAgentVersion
    67  	}
    68  	if absc.DpmServers != nil {
    69  		objectMap["dpmServers"] = absc.DpmServers
    70  	}
    71  	if absc.UpgradeAvailable != nil {
    72  		objectMap["upgradeAvailable"] = absc.UpgradeAvailable
    73  	}
    74  	if absc.ProtectionStatus != nil {
    75  		objectMap["protectionStatus"] = absc.ProtectionStatus
    76  	}
    77  	if absc.ExtendedInfo != nil {
    78  		objectMap["extendedInfo"] = absc.ExtendedInfo
    79  	}
    80  	if absc.FriendlyName != nil {
    81  		objectMap["friendlyName"] = absc.FriendlyName
    82  	}
    83  	if absc.BackupManagementType != "" {
    84  		objectMap["backupManagementType"] = absc.BackupManagementType
    85  	}
    86  	if absc.RegistrationStatus != nil {
    87  		objectMap["registrationStatus"] = absc.RegistrationStatus
    88  	}
    89  	if absc.HealthStatus != nil {
    90  		objectMap["healthStatus"] = absc.HealthStatus
    91  	}
    92  	if absc.ContainerType != "" {
    93  		objectMap["containerType"] = absc.ContainerType
    94  	}
    95  	return json.Marshal(objectMap)
    96  }
    97  
    98  // AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer.
    99  func (absc AzureBackupServerContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
   100  	return &absc, true
   101  }
   102  
   103  // AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer.
   104  func (absc AzureBackupServerContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
   105  	return nil, false
   106  }
   107  
   108  // AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer.
   109  func (absc AzureBackupServerContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
   110  	return nil, false
   111  }
   112  
   113  // AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer.
   114  func (absc AzureBackupServerContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
   115  	return nil, false
   116  }
   117  
   118  // AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer.
   119  func (absc AzureBackupServerContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
   120  	return nil, false
   121  }
   122  
   123  // AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer.
   124  func (absc AzureBackupServerContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
   125  	return nil, false
   126  }
   127  
   128  // AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer.
   129  func (absc AzureBackupServerContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
   130  	return nil, false
   131  }
   132  
   133  // AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer.
   134  func (absc AzureBackupServerContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
   135  	return nil, false
   136  }
   137  
   138  // AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer.
   139  func (absc AzureBackupServerContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
   140  	return nil, false
   141  }
   142  
   143  // AsDpmContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer.
   144  func (absc AzureBackupServerContainer) AsDpmContainer() (*DpmContainer, bool) {
   145  	return nil, false
   146  }
   147  
   148  // AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer.
   149  func (absc AzureBackupServerContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
   150  	return &absc, true
   151  }
   152  
   153  // AsGenericContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer.
   154  func (absc AzureBackupServerContainer) AsGenericContainer() (*GenericContainer, bool) {
   155  	return nil, false
   156  }
   157  
   158  // AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer.
   159  func (absc AzureBackupServerContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
   160  	return nil, false
   161  }
   162  
   163  // AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer.
   164  func (absc AzureBackupServerContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
   165  	return nil, false
   166  }
   167  
   168  // AsMabContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer.
   169  func (absc AzureBackupServerContainer) AsMabContainer() (*MabContainer, bool) {
   170  	return nil, false
   171  }
   172  
   173  // AsProtectionContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer.
   174  func (absc AzureBackupServerContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
   175  	return nil, false
   176  }
   177  
   178  // AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer.
   179  func (absc AzureBackupServerContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
   180  	return &absc, true
   181  }
   182  
   183  // AzureBackupServerEngine backup engine type when Azure Backup Server is used to manage the backups.
   184  type AzureBackupServerEngine struct {
   185  	// FriendlyName - Friendly name of the backup engine.
   186  	FriendlyName *string `json:"friendlyName,omitempty"`
   187  	// BackupManagementType - Type of backup management for the backup engine. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
   188  	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
   189  	// RegistrationStatus - Registration status of the backup engine with the Recovery Services Vault.
   190  	RegistrationStatus *string `json:"registrationStatus,omitempty"`
   191  	// BackupEngineState - Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed}
   192  	BackupEngineState *string `json:"backupEngineState,omitempty"`
   193  	// HealthStatus - Backup status of the backup engine.
   194  	HealthStatus *string `json:"healthStatus,omitempty"`
   195  	// CanReRegister - Flag indicating if the backup engine be registered, once already registered.
   196  	CanReRegister *bool `json:"canReRegister,omitempty"`
   197  	// BackupEngineID - ID of the backup engine.
   198  	BackupEngineID *string `json:"backupEngineId,omitempty"`
   199  	// DpmVersion - Backup engine version
   200  	DpmVersion *string `json:"dpmVersion,omitempty"`
   201  	// AzureBackupAgentVersion - Backup agent version
   202  	AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"`
   203  	// IsAzureBackupAgentUpgradeAvailable - To check if backup agent upgrade available
   204  	IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"`
   205  	// IsDpmUpgradeAvailable - To check if backup engine upgrade available
   206  	IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"`
   207  	// ExtendedInfo - Extended info of the backupengine
   208  	ExtendedInfo *EngineExtendedInfo `json:"extendedInfo,omitempty"`
   209  	// BackupEngineType - Possible values include: 'BackupEngineTypeBackupEngineBase', 'BackupEngineTypeAzureBackupServerEngine', 'BackupEngineTypeDpmBackupEngine'
   210  	BackupEngineType EngineType `json:"backupEngineType,omitempty"`
   211  }
   212  
   213  // MarshalJSON is the custom marshaler for AzureBackupServerEngine.
   214  func (abse AzureBackupServerEngine) MarshalJSON() ([]byte, error) {
   215  	abse.BackupEngineType = BackupEngineTypeAzureBackupServerEngine
   216  	objectMap := make(map[string]interface{})
   217  	if abse.FriendlyName != nil {
   218  		objectMap["friendlyName"] = abse.FriendlyName
   219  	}
   220  	if abse.BackupManagementType != "" {
   221  		objectMap["backupManagementType"] = abse.BackupManagementType
   222  	}
   223  	if abse.RegistrationStatus != nil {
   224  		objectMap["registrationStatus"] = abse.RegistrationStatus
   225  	}
   226  	if abse.BackupEngineState != nil {
   227  		objectMap["backupEngineState"] = abse.BackupEngineState
   228  	}
   229  	if abse.HealthStatus != nil {
   230  		objectMap["healthStatus"] = abse.HealthStatus
   231  	}
   232  	if abse.CanReRegister != nil {
   233  		objectMap["canReRegister"] = abse.CanReRegister
   234  	}
   235  	if abse.BackupEngineID != nil {
   236  		objectMap["backupEngineId"] = abse.BackupEngineID
   237  	}
   238  	if abse.DpmVersion != nil {
   239  		objectMap["dpmVersion"] = abse.DpmVersion
   240  	}
   241  	if abse.AzureBackupAgentVersion != nil {
   242  		objectMap["azureBackupAgentVersion"] = abse.AzureBackupAgentVersion
   243  	}
   244  	if abse.IsAzureBackupAgentUpgradeAvailable != nil {
   245  		objectMap["isAzureBackupAgentUpgradeAvailable"] = abse.IsAzureBackupAgentUpgradeAvailable
   246  	}
   247  	if abse.IsDpmUpgradeAvailable != nil {
   248  		objectMap["isDpmUpgradeAvailable"] = abse.IsDpmUpgradeAvailable
   249  	}
   250  	if abse.ExtendedInfo != nil {
   251  		objectMap["extendedInfo"] = abse.ExtendedInfo
   252  	}
   253  	if abse.BackupEngineType != "" {
   254  		objectMap["backupEngineType"] = abse.BackupEngineType
   255  	}
   256  	return json.Marshal(objectMap)
   257  }
   258  
   259  // AsAzureBackupServerEngine is the BasicEngineBase implementation for AzureBackupServerEngine.
   260  func (abse AzureBackupServerEngine) AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) {
   261  	return &abse, true
   262  }
   263  
   264  // AsDpmBackupEngine is the BasicEngineBase implementation for AzureBackupServerEngine.
   265  func (abse AzureBackupServerEngine) AsDpmBackupEngine() (*DpmBackupEngine, bool) {
   266  	return nil, false
   267  }
   268  
   269  // AsEngineBase is the BasicEngineBase implementation for AzureBackupServerEngine.
   270  func (abse AzureBackupServerEngine) AsEngineBase() (*EngineBase, bool) {
   271  	return nil, false
   272  }
   273  
   274  // AsBasicEngineBase is the BasicEngineBase implementation for AzureBackupServerEngine.
   275  func (abse AzureBackupServerEngine) AsBasicEngineBase() (BasicEngineBase, bool) {
   276  	return &abse, true
   277  }
   278  
   279  // AzureFileShareBackupRequest azureFileShare workload-specific backup request.
   280  type AzureFileShareBackupRequest struct {
   281  	// RecoveryPointExpiryTimeInUTC - Backup copy will expire after the time specified (UTC).
   282  	RecoveryPointExpiryTimeInUTC *date.Time `json:"recoveryPointExpiryTimeInUTC,omitempty"`
   283  	// ObjectType - Possible values include: 'ObjectTypeBackupRequest', 'ObjectTypeAzureFileShareBackupRequest', 'ObjectTypeAzureWorkloadBackupRequest', 'ObjectTypeIaasVMBackupRequest'
   284  	ObjectType ObjectType `json:"objectType,omitempty"`
   285  }
   286  
   287  // MarshalJSON is the custom marshaler for AzureFileShareBackupRequest.
   288  func (afsbr AzureFileShareBackupRequest) MarshalJSON() ([]byte, error) {
   289  	afsbr.ObjectType = ObjectTypeAzureFileShareBackupRequest
   290  	objectMap := make(map[string]interface{})
   291  	if afsbr.RecoveryPointExpiryTimeInUTC != nil {
   292  		objectMap["recoveryPointExpiryTimeInUTC"] = afsbr.RecoveryPointExpiryTimeInUTC
   293  	}
   294  	if afsbr.ObjectType != "" {
   295  		objectMap["objectType"] = afsbr.ObjectType
   296  	}
   297  	return json.Marshal(objectMap)
   298  }
   299  
   300  // AsAzureFileShareBackupRequest is the BasicRequest implementation for AzureFileShareBackupRequest.
   301  func (afsbr AzureFileShareBackupRequest) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) {
   302  	return &afsbr, true
   303  }
   304  
   305  // AsAzureWorkloadBackupRequest is the BasicRequest implementation for AzureFileShareBackupRequest.
   306  func (afsbr AzureFileShareBackupRequest) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) {
   307  	return nil, false
   308  }
   309  
   310  // AsIaasVMBackupRequest is the BasicRequest implementation for AzureFileShareBackupRequest.
   311  func (afsbr AzureFileShareBackupRequest) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) {
   312  	return nil, false
   313  }
   314  
   315  // AsRequest is the BasicRequest implementation for AzureFileShareBackupRequest.
   316  func (afsbr AzureFileShareBackupRequest) AsRequest() (*Request, bool) {
   317  	return nil, false
   318  }
   319  
   320  // AsBasicRequest is the BasicRequest implementation for AzureFileShareBackupRequest.
   321  func (afsbr AzureFileShareBackupRequest) AsBasicRequest() (BasicRequest, bool) {
   322  	return &afsbr, true
   323  }
   324  
   325  // AzureFileShareProtectableItem protectable item for Azure Fileshare workloads.
   326  type AzureFileShareProtectableItem struct {
   327  	// ParentContainerFabricID - Full Fabric ID of container to which this protectable item belongs. For example, ARM ID.
   328  	ParentContainerFabricID *string `json:"parentContainerFabricId,omitempty"`
   329  	// ParentContainerFriendlyName - Friendly name of container to which this protectable item belongs.
   330  	ParentContainerFriendlyName *string `json:"parentContainerFriendlyName,omitempty"`
   331  	// AzureFileShareType - File Share type XSync or XSMB. Possible values include: 'Invalid', 'XSMB', 'XSync'
   332  	AzureFileShareType AzureFileShareType `json:"azureFileShareType,omitempty"`
   333  	// BackupManagementType - Type of backup management to backup an item.
   334  	BackupManagementType *string `json:"backupManagementType,omitempty"`
   335  	// WorkloadType - Type of workload for the backup management
   336  	WorkloadType *string `json:"workloadType,omitempty"`
   337  	// FriendlyName - Friendly name of the backup item.
   338  	FriendlyName *string `json:"friendlyName,omitempty"`
   339  	// ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
   340  	ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
   341  	// ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem'
   342  	ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
   343  }
   344  
   345  // MarshalJSON is the custom marshaler for AzureFileShareProtectableItem.
   346  func (afspi AzureFileShareProtectableItem) MarshalJSON() ([]byte, error) {
   347  	afspi.ProtectableItemType = ProtectableItemTypeAzureFileShare
   348  	objectMap := make(map[string]interface{})
   349  	if afspi.ParentContainerFabricID != nil {
   350  		objectMap["parentContainerFabricId"] = afspi.ParentContainerFabricID
   351  	}
   352  	if afspi.ParentContainerFriendlyName != nil {
   353  		objectMap["parentContainerFriendlyName"] = afspi.ParentContainerFriendlyName
   354  	}
   355  	if afspi.AzureFileShareType != "" {
   356  		objectMap["azureFileShareType"] = afspi.AzureFileShareType
   357  	}
   358  	if afspi.BackupManagementType != nil {
   359  		objectMap["backupManagementType"] = afspi.BackupManagementType
   360  	}
   361  	if afspi.WorkloadType != nil {
   362  		objectMap["workloadType"] = afspi.WorkloadType
   363  	}
   364  	if afspi.FriendlyName != nil {
   365  		objectMap["friendlyName"] = afspi.FriendlyName
   366  	}
   367  	if afspi.ProtectionState != "" {
   368  		objectMap["protectionState"] = afspi.ProtectionState
   369  	}
   370  	if afspi.ProtectableItemType != "" {
   371  		objectMap["protectableItemType"] = afspi.ProtectableItemType
   372  	}
   373  	return json.Marshal(objectMap)
   374  }
   375  
   376  // AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem.
   377  func (afspi AzureFileShareProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
   378  	return &afspi, true
   379  }
   380  
   381  // AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem.
   382  func (afspi AzureFileShareProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
   383  	return nil, false
   384  }
   385  
   386  // AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem.
   387  func (afspi AzureFileShareProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
   388  	return nil, false
   389  }
   390  
   391  // AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem.
   392  func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
   393  	return nil, false
   394  }
   395  
   396  // AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem.
   397  func (afspi AzureFileShareProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
   398  	return nil, false
   399  }
   400  
   401  // AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem.
   402  func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
   403  	return nil, false
   404  }
   405  
   406  // AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem.
   407  func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
   408  	return nil, false
   409  }
   410  
   411  // AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem.
   412  func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
   413  	return nil, false
   414  }
   415  
   416  // AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem.
   417  func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
   418  	return nil, false
   419  }
   420  
   421  // AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem.
   422  func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
   423  	return nil, false
   424  }
   425  
   426  // AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem.
   427  func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
   428  	return nil, false
   429  }
   430  
   431  // AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem.
   432  func (afspi AzureFileShareProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
   433  	return nil, false
   434  }
   435  
   436  // AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem.
   437  func (afspi AzureFileShareProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
   438  	return nil, false
   439  }
   440  
   441  // AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem.
   442  func (afspi AzureFileShareProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
   443  	return nil, false
   444  }
   445  
   446  // AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem.
   447  func (afspi AzureFileShareProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
   448  	return &afspi, true
   449  }
   450  
   451  // AzureFileShareProvisionILRRequest update snapshot Uri with the correct friendly Name of the source Azure
   452  // file share.
   453  type AzureFileShareProvisionILRRequest struct {
   454  	// RecoveryPointID - Recovery point ID.
   455  	RecoveryPointID *string `json:"recoveryPointId,omitempty"`
   456  	// SourceResourceID - Source Storage account ARM Id
   457  	SourceResourceID *string `json:"sourceResourceId,omitempty"`
   458  	// ObjectType - Possible values include: 'ObjectTypeILRRequest', 'ObjectTypeAzureFileShareProvisionILRRequest', 'ObjectTypeIaasVMILRRegistrationRequest'
   459  	ObjectType ObjectTypeBasicILRRequest `json:"objectType,omitempty"`
   460  }
   461  
   462  // MarshalJSON is the custom marshaler for AzureFileShareProvisionILRRequest.
   463  func (afspir AzureFileShareProvisionILRRequest) MarshalJSON() ([]byte, error) {
   464  	afspir.ObjectType = ObjectTypeAzureFileShareProvisionILRRequest
   465  	objectMap := make(map[string]interface{})
   466  	if afspir.RecoveryPointID != nil {
   467  		objectMap["recoveryPointId"] = afspir.RecoveryPointID
   468  	}
   469  	if afspir.SourceResourceID != nil {
   470  		objectMap["sourceResourceId"] = afspir.SourceResourceID
   471  	}
   472  	if afspir.ObjectType != "" {
   473  		objectMap["objectType"] = afspir.ObjectType
   474  	}
   475  	return json.Marshal(objectMap)
   476  }
   477  
   478  // AsAzureFileShareProvisionILRRequest is the BasicILRRequest implementation for AzureFileShareProvisionILRRequest.
   479  func (afspir AzureFileShareProvisionILRRequest) AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) {
   480  	return &afspir, true
   481  }
   482  
   483  // AsIaasVMILRRegistrationRequest is the BasicILRRequest implementation for AzureFileShareProvisionILRRequest.
   484  func (afspir AzureFileShareProvisionILRRequest) AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) {
   485  	return nil, false
   486  }
   487  
   488  // AsILRRequest is the BasicILRRequest implementation for AzureFileShareProvisionILRRequest.
   489  func (afspir AzureFileShareProvisionILRRequest) AsILRRequest() (*ILRRequest, bool) {
   490  	return nil, false
   491  }
   492  
   493  // AsBasicILRRequest is the BasicILRRequest implementation for AzureFileShareProvisionILRRequest.
   494  func (afspir AzureFileShareProvisionILRRequest) AsBasicILRRequest() (BasicILRRequest, bool) {
   495  	return &afspir, true
   496  }
   497  
   498  // AzureIaaSClassicComputeVMContainer iaaS VM workload-specific backup item representing a classic virtual
   499  // machine.
   500  type AzureIaaSClassicComputeVMContainer struct {
   501  	// VirtualMachineID - Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container.
   502  	VirtualMachineID *string `json:"virtualMachineId,omitempty"`
   503  	// VirtualMachineVersion - Specifies whether the container represents a Classic or an Azure Resource Manager VM.
   504  	VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"`
   505  	// ResourceGroup - Resource group name of Recovery Services Vault.
   506  	ResourceGroup *string `json:"resourceGroup,omitempty"`
   507  	// FriendlyName - Friendly name of the container.
   508  	FriendlyName *string `json:"friendlyName,omitempty"`
   509  	// BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
   510  	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
   511  	// RegistrationStatus - Status of registration of the container with the Recovery Services Vault.
   512  	RegistrationStatus *string `json:"registrationStatus,omitempty"`
   513  	// HealthStatus - Status of health of the container.
   514  	HealthStatus *string `json:"healthStatus,omitempty"`
   515  	// ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1'
   516  	ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
   517  }
   518  
   519  // MarshalJSON is the custom marshaler for AzureIaaSClassicComputeVMContainer.
   520  func (aisccvc AzureIaaSClassicComputeVMContainer) MarshalJSON() ([]byte, error) {
   521  	aisccvc.ContainerType = ContainerTypeMicrosoftClassicComputevirtualMachines
   522  	objectMap := make(map[string]interface{})
   523  	if aisccvc.VirtualMachineID != nil {
   524  		objectMap["virtualMachineId"] = aisccvc.VirtualMachineID
   525  	}
   526  	if aisccvc.VirtualMachineVersion != nil {
   527  		objectMap["virtualMachineVersion"] = aisccvc.VirtualMachineVersion
   528  	}
   529  	if aisccvc.ResourceGroup != nil {
   530  		objectMap["resourceGroup"] = aisccvc.ResourceGroup
   531  	}
   532  	if aisccvc.FriendlyName != nil {
   533  		objectMap["friendlyName"] = aisccvc.FriendlyName
   534  	}
   535  	if aisccvc.BackupManagementType != "" {
   536  		objectMap["backupManagementType"] = aisccvc.BackupManagementType
   537  	}
   538  	if aisccvc.RegistrationStatus != nil {
   539  		objectMap["registrationStatus"] = aisccvc.RegistrationStatus
   540  	}
   541  	if aisccvc.HealthStatus != nil {
   542  		objectMap["healthStatus"] = aisccvc.HealthStatus
   543  	}
   544  	if aisccvc.ContainerType != "" {
   545  		objectMap["containerType"] = aisccvc.ContainerType
   546  	}
   547  	return json.Marshal(objectMap)
   548  }
   549  
   550  // AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer.
   551  func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
   552  	return nil, false
   553  }
   554  
   555  // AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer.
   556  func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
   557  	return &aisccvc, true
   558  }
   559  
   560  // AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer.
   561  func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
   562  	return nil, false
   563  }
   564  
   565  // AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer.
   566  func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
   567  	return nil, false
   568  }
   569  
   570  // AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer.
   571  func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
   572  	return nil, false
   573  }
   574  
   575  // AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer.
   576  func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
   577  	return nil, false
   578  }
   579  
   580  // AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer.
   581  func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
   582  	return nil, false
   583  }
   584  
   585  // AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer.
   586  func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
   587  	return nil, false
   588  }
   589  
   590  // AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer.
   591  func (aisccvc AzureIaaSClassicComputeVMContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
   592  	return nil, false
   593  }
   594  
   595  // AsDpmContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer.
   596  func (aisccvc AzureIaaSClassicComputeVMContainer) AsDpmContainer() (*DpmContainer, bool) {
   597  	return nil, false
   598  }
   599  
   600  // AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer.
   601  func (aisccvc AzureIaaSClassicComputeVMContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
   602  	return nil, false
   603  }
   604  
   605  // AsGenericContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer.
   606  func (aisccvc AzureIaaSClassicComputeVMContainer) AsGenericContainer() (*GenericContainer, bool) {
   607  	return nil, false
   608  }
   609  
   610  // AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer.
   611  func (aisccvc AzureIaaSClassicComputeVMContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
   612  	return nil, false
   613  }
   614  
   615  // AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer.
   616  func (aisccvc AzureIaaSClassicComputeVMContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
   617  	return &aisccvc, true
   618  }
   619  
   620  // AsMabContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer.
   621  func (aisccvc AzureIaaSClassicComputeVMContainer) AsMabContainer() (*MabContainer, bool) {
   622  	return nil, false
   623  }
   624  
   625  // AsProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer.
   626  func (aisccvc AzureIaaSClassicComputeVMContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
   627  	return nil, false
   628  }
   629  
   630  // AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer.
   631  func (aisccvc AzureIaaSClassicComputeVMContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
   632  	return &aisccvc, true
   633  }
   634  
   635  // AzureIaaSClassicComputeVMProtectableItem iaaS VM workload-specific backup item representing the Classic
   636  // Compute VM.
   637  type AzureIaaSClassicComputeVMProtectableItem struct {
   638  	// VirtualMachineID - Fully qualified ARM ID of the virtual machine.
   639  	VirtualMachineID *string `json:"virtualMachineId,omitempty"`
   640  	// BackupManagementType - Type of backup management to backup an item.
   641  	BackupManagementType *string `json:"backupManagementType,omitempty"`
   642  	// WorkloadType - Type of workload for the backup management
   643  	WorkloadType *string `json:"workloadType,omitempty"`
   644  	// FriendlyName - Friendly name of the backup item.
   645  	FriendlyName *string `json:"friendlyName,omitempty"`
   646  	// ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
   647  	ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
   648  	// ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem'
   649  	ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
   650  }
   651  
   652  // MarshalJSON is the custom marshaler for AzureIaaSClassicComputeVMProtectableItem.
   653  func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) MarshalJSON() ([]byte, error) {
   654  	aisccvpi.ProtectableItemType = ProtectableItemTypeMicrosoftClassicComputevirtualMachines
   655  	objectMap := make(map[string]interface{})
   656  	if aisccvpi.VirtualMachineID != nil {
   657  		objectMap["virtualMachineId"] = aisccvpi.VirtualMachineID
   658  	}
   659  	if aisccvpi.BackupManagementType != nil {
   660  		objectMap["backupManagementType"] = aisccvpi.BackupManagementType
   661  	}
   662  	if aisccvpi.WorkloadType != nil {
   663  		objectMap["workloadType"] = aisccvpi.WorkloadType
   664  	}
   665  	if aisccvpi.FriendlyName != nil {
   666  		objectMap["friendlyName"] = aisccvpi.FriendlyName
   667  	}
   668  	if aisccvpi.ProtectionState != "" {
   669  		objectMap["protectionState"] = aisccvpi.ProtectionState
   670  	}
   671  	if aisccvpi.ProtectableItemType != "" {
   672  		objectMap["protectableItemType"] = aisccvpi.ProtectableItemType
   673  	}
   674  	return json.Marshal(objectMap)
   675  }
   676  
   677  // AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem.
   678  func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
   679  	return nil, false
   680  }
   681  
   682  // AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem.
   683  func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
   684  	return &aisccvpi, true
   685  }
   686  
   687  // AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem.
   688  func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
   689  	return nil, false
   690  }
   691  
   692  // AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem.
   693  func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
   694  	return nil, false
   695  }
   696  
   697  // AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem.
   698  func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
   699  	return nil, false
   700  }
   701  
   702  // AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem.
   703  func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
   704  	return nil, false
   705  }
   706  
   707  // AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem.
   708  func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
   709  	return nil, false
   710  }
   711  
   712  // AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem.
   713  func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
   714  	return nil, false
   715  }
   716  
   717  // AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem.
   718  func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
   719  	return nil, false
   720  }
   721  
   722  // AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem.
   723  func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
   724  	return nil, false
   725  }
   726  
   727  // AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem.
   728  func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
   729  	return nil, false
   730  }
   731  
   732  // AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem.
   733  func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
   734  	return nil, false
   735  }
   736  
   737  // AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem.
   738  func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
   739  	return &aisccvpi, true
   740  }
   741  
   742  // AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem.
   743  func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
   744  	return nil, false
   745  }
   746  
   747  // AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem.
   748  func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
   749  	return &aisccvpi, true
   750  }
   751  
   752  // AzureIaaSComputeVMContainer iaaS VM workload-specific backup item representing an Azure Resource Manager
   753  // virtual machine.
   754  type AzureIaaSComputeVMContainer struct {
   755  	// VirtualMachineID - Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container.
   756  	VirtualMachineID *string `json:"virtualMachineId,omitempty"`
   757  	// VirtualMachineVersion - Specifies whether the container represents a Classic or an Azure Resource Manager VM.
   758  	VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"`
   759  	// ResourceGroup - Resource group name of Recovery Services Vault.
   760  	ResourceGroup *string `json:"resourceGroup,omitempty"`
   761  	// FriendlyName - Friendly name of the container.
   762  	FriendlyName *string `json:"friendlyName,omitempty"`
   763  	// BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
   764  	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
   765  	// RegistrationStatus - Status of registration of the container with the Recovery Services Vault.
   766  	RegistrationStatus *string `json:"registrationStatus,omitempty"`
   767  	// HealthStatus - Status of health of the container.
   768  	HealthStatus *string `json:"healthStatus,omitempty"`
   769  	// ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1'
   770  	ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
   771  }
   772  
   773  // MarshalJSON is the custom marshaler for AzureIaaSComputeVMContainer.
   774  func (aiscvc AzureIaaSComputeVMContainer) MarshalJSON() ([]byte, error) {
   775  	aiscvc.ContainerType = ContainerTypeMicrosoftComputevirtualMachines
   776  	objectMap := make(map[string]interface{})
   777  	if aiscvc.VirtualMachineID != nil {
   778  		objectMap["virtualMachineId"] = aiscvc.VirtualMachineID
   779  	}
   780  	if aiscvc.VirtualMachineVersion != nil {
   781  		objectMap["virtualMachineVersion"] = aiscvc.VirtualMachineVersion
   782  	}
   783  	if aiscvc.ResourceGroup != nil {
   784  		objectMap["resourceGroup"] = aiscvc.ResourceGroup
   785  	}
   786  	if aiscvc.FriendlyName != nil {
   787  		objectMap["friendlyName"] = aiscvc.FriendlyName
   788  	}
   789  	if aiscvc.BackupManagementType != "" {
   790  		objectMap["backupManagementType"] = aiscvc.BackupManagementType
   791  	}
   792  	if aiscvc.RegistrationStatus != nil {
   793  		objectMap["registrationStatus"] = aiscvc.RegistrationStatus
   794  	}
   795  	if aiscvc.HealthStatus != nil {
   796  		objectMap["healthStatus"] = aiscvc.HealthStatus
   797  	}
   798  	if aiscvc.ContainerType != "" {
   799  		objectMap["containerType"] = aiscvc.ContainerType
   800  	}
   801  	return json.Marshal(objectMap)
   802  }
   803  
   804  // AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer.
   805  func (aiscvc AzureIaaSComputeVMContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
   806  	return nil, false
   807  }
   808  
   809  // AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer.
   810  func (aiscvc AzureIaaSComputeVMContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
   811  	return nil, false
   812  }
   813  
   814  // AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer.
   815  func (aiscvc AzureIaaSComputeVMContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
   816  	return &aiscvc, true
   817  }
   818  
   819  // AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer.
   820  func (aiscvc AzureIaaSComputeVMContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
   821  	return nil, false
   822  }
   823  
   824  // AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer.
   825  func (aiscvc AzureIaaSComputeVMContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
   826  	return nil, false
   827  }
   828  
   829  // AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer.
   830  func (aiscvc AzureIaaSComputeVMContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
   831  	return nil, false
   832  }
   833  
   834  // AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer.
   835  func (aiscvc AzureIaaSComputeVMContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
   836  	return nil, false
   837  }
   838  
   839  // AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer.
   840  func (aiscvc AzureIaaSComputeVMContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
   841  	return nil, false
   842  }
   843  
   844  // AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer.
   845  func (aiscvc AzureIaaSComputeVMContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
   846  	return nil, false
   847  }
   848  
   849  // AsDpmContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer.
   850  func (aiscvc AzureIaaSComputeVMContainer) AsDpmContainer() (*DpmContainer, bool) {
   851  	return nil, false
   852  }
   853  
   854  // AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer.
   855  func (aiscvc AzureIaaSComputeVMContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
   856  	return nil, false
   857  }
   858  
   859  // AsGenericContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer.
   860  func (aiscvc AzureIaaSComputeVMContainer) AsGenericContainer() (*GenericContainer, bool) {
   861  	return nil, false
   862  }
   863  
   864  // AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer.
   865  func (aiscvc AzureIaaSComputeVMContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
   866  	return nil, false
   867  }
   868  
   869  // AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer.
   870  func (aiscvc AzureIaaSComputeVMContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
   871  	return &aiscvc, true
   872  }
   873  
   874  // AsMabContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer.
   875  func (aiscvc AzureIaaSComputeVMContainer) AsMabContainer() (*MabContainer, bool) {
   876  	return nil, false
   877  }
   878  
   879  // AsProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer.
   880  func (aiscvc AzureIaaSComputeVMContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
   881  	return nil, false
   882  }
   883  
   884  // AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer.
   885  func (aiscvc AzureIaaSComputeVMContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
   886  	return &aiscvc, true
   887  }
   888  
   889  // AzureIaaSComputeVMProtectableItem iaaS VM workload-specific backup item representing the Azure Resource
   890  // Manager VM.
   891  type AzureIaaSComputeVMProtectableItem struct {
   892  	// VirtualMachineID - Fully qualified ARM ID of the virtual machine.
   893  	VirtualMachineID *string `json:"virtualMachineId,omitempty"`
   894  	// BackupManagementType - Type of backup management to backup an item.
   895  	BackupManagementType *string `json:"backupManagementType,omitempty"`
   896  	// WorkloadType - Type of workload for the backup management
   897  	WorkloadType *string `json:"workloadType,omitempty"`
   898  	// FriendlyName - Friendly name of the backup item.
   899  	FriendlyName *string `json:"friendlyName,omitempty"`
   900  	// ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
   901  	ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
   902  	// ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem'
   903  	ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
   904  }
   905  
   906  // MarshalJSON is the custom marshaler for AzureIaaSComputeVMProtectableItem.
   907  func (aiscvpi AzureIaaSComputeVMProtectableItem) MarshalJSON() ([]byte, error) {
   908  	aiscvpi.ProtectableItemType = ProtectableItemTypeMicrosoftComputevirtualMachines
   909  	objectMap := make(map[string]interface{})
   910  	if aiscvpi.VirtualMachineID != nil {
   911  		objectMap["virtualMachineId"] = aiscvpi.VirtualMachineID
   912  	}
   913  	if aiscvpi.BackupManagementType != nil {
   914  		objectMap["backupManagementType"] = aiscvpi.BackupManagementType
   915  	}
   916  	if aiscvpi.WorkloadType != nil {
   917  		objectMap["workloadType"] = aiscvpi.WorkloadType
   918  	}
   919  	if aiscvpi.FriendlyName != nil {
   920  		objectMap["friendlyName"] = aiscvpi.FriendlyName
   921  	}
   922  	if aiscvpi.ProtectionState != "" {
   923  		objectMap["protectionState"] = aiscvpi.ProtectionState
   924  	}
   925  	if aiscvpi.ProtectableItemType != "" {
   926  		objectMap["protectableItemType"] = aiscvpi.ProtectableItemType
   927  	}
   928  	return json.Marshal(objectMap)
   929  }
   930  
   931  // AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem.
   932  func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
   933  	return nil, false
   934  }
   935  
   936  // AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem.
   937  func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
   938  	return nil, false
   939  }
   940  
   941  // AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem.
   942  func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
   943  	return &aiscvpi, true
   944  }
   945  
   946  // AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem.
   947  func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
   948  	return nil, false
   949  }
   950  
   951  // AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem.
   952  func (aiscvpi AzureIaaSComputeVMProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
   953  	return nil, false
   954  }
   955  
   956  // AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem.
   957  func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
   958  	return nil, false
   959  }
   960  
   961  // AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem.
   962  func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
   963  	return nil, false
   964  }
   965  
   966  // AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem.
   967  func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
   968  	return nil, false
   969  }
   970  
   971  // AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem.
   972  func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
   973  	return nil, false
   974  }
   975  
   976  // AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem.
   977  func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
   978  	return nil, false
   979  }
   980  
   981  // AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem.
   982  func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
   983  	return nil, false
   984  }
   985  
   986  // AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem.
   987  func (aiscvpi AzureIaaSComputeVMProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
   988  	return nil, false
   989  }
   990  
   991  // AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem.
   992  func (aiscvpi AzureIaaSComputeVMProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
   993  	return &aiscvpi, true
   994  }
   995  
   996  // AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem.
   997  func (aiscvpi AzureIaaSComputeVMProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
   998  	return nil, false
   999  }
  1000  
  1001  // AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem.
  1002  func (aiscvpi AzureIaaSComputeVMProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
  1003  	return &aiscvpi, true
  1004  }
  1005  
  1006  // AzureSQLAGWorkloadContainerProtectionContainer container for SQL workloads under SQL Availability Group.
  1007  type AzureSQLAGWorkloadContainerProtectionContainer struct {
  1008  	// SourceResourceID - ARM ID of the virtual machine represented by this Azure Workload Container
  1009  	SourceResourceID *string `json:"sourceResourceId,omitempty"`
  1010  	// LastUpdatedTime - Time stamp when this container was updated.
  1011  	LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"`
  1012  	// ExtendedInfo - Additional details of a workload container.
  1013  	ExtendedInfo *AzureWorkloadContainerExtendedInfo `json:"extendedInfo,omitempty"`
  1014  	// 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'
  1015  	WorkloadType WorkloadType `json:"workloadType,omitempty"`
  1016  	// OperationType - Re-Do Operation. Possible values include: 'OperationTypeInvalid', 'OperationTypeRegister', 'OperationTypeReregister'
  1017  	OperationType OperationType `json:"operationType,omitempty"`
  1018  	// FriendlyName - Friendly name of the container.
  1019  	FriendlyName *string `json:"friendlyName,omitempty"`
  1020  	// BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
  1021  	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
  1022  	// RegistrationStatus - Status of registration of the container with the Recovery Services Vault.
  1023  	RegistrationStatus *string `json:"registrationStatus,omitempty"`
  1024  	// HealthStatus - Status of health of the container.
  1025  	HealthStatus *string `json:"healthStatus,omitempty"`
  1026  	// ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1'
  1027  	ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
  1028  }
  1029  
  1030  // MarshalJSON is the custom marshaler for AzureSQLAGWorkloadContainerProtectionContainer.
  1031  func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) MarshalJSON() ([]byte, error) {
  1032  	aswcpc.ContainerType = ContainerTypeSQLAGWorkLoadContainer1
  1033  	objectMap := make(map[string]interface{})
  1034  	if aswcpc.SourceResourceID != nil {
  1035  		objectMap["sourceResourceId"] = aswcpc.SourceResourceID
  1036  	}
  1037  	if aswcpc.LastUpdatedTime != nil {
  1038  		objectMap["lastUpdatedTime"] = aswcpc.LastUpdatedTime
  1039  	}
  1040  	if aswcpc.ExtendedInfo != nil {
  1041  		objectMap["extendedInfo"] = aswcpc.ExtendedInfo
  1042  	}
  1043  	if aswcpc.WorkloadType != "" {
  1044  		objectMap["workloadType"] = aswcpc.WorkloadType
  1045  	}
  1046  	if aswcpc.OperationType != "" {
  1047  		objectMap["operationType"] = aswcpc.OperationType
  1048  	}
  1049  	if aswcpc.FriendlyName != nil {
  1050  		objectMap["friendlyName"] = aswcpc.FriendlyName
  1051  	}
  1052  	if aswcpc.BackupManagementType != "" {
  1053  		objectMap["backupManagementType"] = aswcpc.BackupManagementType
  1054  	}
  1055  	if aswcpc.RegistrationStatus != nil {
  1056  		objectMap["registrationStatus"] = aswcpc.RegistrationStatus
  1057  	}
  1058  	if aswcpc.HealthStatus != nil {
  1059  		objectMap["healthStatus"] = aswcpc.HealthStatus
  1060  	}
  1061  	if aswcpc.ContainerType != "" {
  1062  		objectMap["containerType"] = aswcpc.ContainerType
  1063  	}
  1064  	return json.Marshal(objectMap)
  1065  }
  1066  
  1067  // AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer.
  1068  func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
  1069  	return nil, false
  1070  }
  1071  
  1072  // AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer.
  1073  func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
  1074  	return nil, false
  1075  }
  1076  
  1077  // AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer.
  1078  func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
  1079  	return nil, false
  1080  }
  1081  
  1082  // AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer.
  1083  func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
  1084  	return &aswcpc, true
  1085  }
  1086  
  1087  // AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer.
  1088  func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
  1089  	return nil, false
  1090  }
  1091  
  1092  // AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer.
  1093  func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
  1094  	return nil, false
  1095  }
  1096  
  1097  // AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer.
  1098  func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
  1099  	return nil, false
  1100  }
  1101  
  1102  // AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer.
  1103  func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
  1104  	return nil, false
  1105  }
  1106  
  1107  // AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer.
  1108  func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
  1109  	return &aswcpc, true
  1110  }
  1111  
  1112  // AsDpmContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer.
  1113  func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsDpmContainer() (*DpmContainer, bool) {
  1114  	return nil, false
  1115  }
  1116  
  1117  // AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer.
  1118  func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
  1119  	return nil, false
  1120  }
  1121  
  1122  // AsGenericContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer.
  1123  func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsGenericContainer() (*GenericContainer, bool) {
  1124  	return nil, false
  1125  }
  1126  
  1127  // AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer.
  1128  func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
  1129  	return nil, false
  1130  }
  1131  
  1132  // AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer.
  1133  func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
  1134  	return nil, false
  1135  }
  1136  
  1137  // AsMabContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer.
  1138  func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsMabContainer() (*MabContainer, bool) {
  1139  	return nil, false
  1140  }
  1141  
  1142  // AsProtectionContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer.
  1143  func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
  1144  	return nil, false
  1145  }
  1146  
  1147  // AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer.
  1148  func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
  1149  	return &aswcpc, true
  1150  }
  1151  
  1152  // AzureSQLContainer azure Sql workload-specific container.
  1153  type AzureSQLContainer struct {
  1154  	// FriendlyName - Friendly name of the container.
  1155  	FriendlyName *string `json:"friendlyName,omitempty"`
  1156  	// BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
  1157  	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
  1158  	// RegistrationStatus - Status of registration of the container with the Recovery Services Vault.
  1159  	RegistrationStatus *string `json:"registrationStatus,omitempty"`
  1160  	// HealthStatus - Status of health of the container.
  1161  	HealthStatus *string `json:"healthStatus,omitempty"`
  1162  	// ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1'
  1163  	ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
  1164  }
  1165  
  1166  // MarshalJSON is the custom marshaler for AzureSQLContainer.
  1167  func (asc AzureSQLContainer) MarshalJSON() ([]byte, error) {
  1168  	asc.ContainerType = ContainerTypeAzureSQLContainer1
  1169  	objectMap := make(map[string]interface{})
  1170  	if asc.FriendlyName != nil {
  1171  		objectMap["friendlyName"] = asc.FriendlyName
  1172  	}
  1173  	if asc.BackupManagementType != "" {
  1174  		objectMap["backupManagementType"] = asc.BackupManagementType
  1175  	}
  1176  	if asc.RegistrationStatus != nil {
  1177  		objectMap["registrationStatus"] = asc.RegistrationStatus
  1178  	}
  1179  	if asc.HealthStatus != nil {
  1180  		objectMap["healthStatus"] = asc.HealthStatus
  1181  	}
  1182  	if asc.ContainerType != "" {
  1183  		objectMap["containerType"] = asc.ContainerType
  1184  	}
  1185  	return json.Marshal(objectMap)
  1186  }
  1187  
  1188  // AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureSQLContainer.
  1189  func (asc AzureSQLContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
  1190  	return nil, false
  1191  }
  1192  
  1193  // AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureSQLContainer.
  1194  func (asc AzureSQLContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
  1195  	return nil, false
  1196  }
  1197  
  1198  // AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureSQLContainer.
  1199  func (asc AzureSQLContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
  1200  	return nil, false
  1201  }
  1202  
  1203  // AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureSQLContainer.
  1204  func (asc AzureSQLContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
  1205  	return nil, false
  1206  }
  1207  
  1208  // AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureSQLContainer.
  1209  func (asc AzureSQLContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
  1210  	return &asc, true
  1211  }
  1212  
  1213  // AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureSQLContainer.
  1214  func (asc AzureSQLContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
  1215  	return nil, false
  1216  }
  1217  
  1218  // AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureSQLContainer.
  1219  func (asc AzureSQLContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
  1220  	return nil, false
  1221  }
  1222  
  1223  // AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureSQLContainer.
  1224  func (asc AzureSQLContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
  1225  	return nil, false
  1226  }
  1227  
  1228  // AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureSQLContainer.
  1229  func (asc AzureSQLContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
  1230  	return nil, false
  1231  }
  1232  
  1233  // AsDpmContainer is the BasicProtectionContainer implementation for AzureSQLContainer.
  1234  func (asc AzureSQLContainer) AsDpmContainer() (*DpmContainer, bool) {
  1235  	return nil, false
  1236  }
  1237  
  1238  // AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureSQLContainer.
  1239  func (asc AzureSQLContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
  1240  	return nil, false
  1241  }
  1242  
  1243  // AsGenericContainer is the BasicProtectionContainer implementation for AzureSQLContainer.
  1244  func (asc AzureSQLContainer) AsGenericContainer() (*GenericContainer, bool) {
  1245  	return nil, false
  1246  }
  1247  
  1248  // AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureSQLContainer.
  1249  func (asc AzureSQLContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
  1250  	return nil, false
  1251  }
  1252  
  1253  // AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureSQLContainer.
  1254  func (asc AzureSQLContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
  1255  	return nil, false
  1256  }
  1257  
  1258  // AsMabContainer is the BasicProtectionContainer implementation for AzureSQLContainer.
  1259  func (asc AzureSQLContainer) AsMabContainer() (*MabContainer, bool) {
  1260  	return nil, false
  1261  }
  1262  
  1263  // AsProtectionContainer is the BasicProtectionContainer implementation for AzureSQLContainer.
  1264  func (asc AzureSQLContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
  1265  	return nil, false
  1266  }
  1267  
  1268  // AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureSQLContainer.
  1269  func (asc AzureSQLContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
  1270  	return &asc, true
  1271  }
  1272  
  1273  // AzureStorageContainer azure Storage Account workload-specific container.
  1274  type AzureStorageContainer struct {
  1275  	// SourceResourceID - Fully qualified ARM url.
  1276  	SourceResourceID *string `json:"sourceResourceId,omitempty"`
  1277  	// StorageAccountVersion - Storage account version.
  1278  	StorageAccountVersion *string `json:"storageAccountVersion,omitempty"`
  1279  	// ResourceGroup - Resource group name of Recovery Services Vault.
  1280  	ResourceGroup *string `json:"resourceGroup,omitempty"`
  1281  	// ProtectedItemCount - Number of items backed up in this container.
  1282  	ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"`
  1283  	// FriendlyName - Friendly name of the container.
  1284  	FriendlyName *string `json:"friendlyName,omitempty"`
  1285  	// BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
  1286  	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
  1287  	// RegistrationStatus - Status of registration of the container with the Recovery Services Vault.
  1288  	RegistrationStatus *string `json:"registrationStatus,omitempty"`
  1289  	// HealthStatus - Status of health of the container.
  1290  	HealthStatus *string `json:"healthStatus,omitempty"`
  1291  	// ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1'
  1292  	ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
  1293  }
  1294  
  1295  // MarshalJSON is the custom marshaler for AzureStorageContainer.
  1296  func (asc AzureStorageContainer) MarshalJSON() ([]byte, error) {
  1297  	asc.ContainerType = ContainerTypeStorageContainer1
  1298  	objectMap := make(map[string]interface{})
  1299  	if asc.SourceResourceID != nil {
  1300  		objectMap["sourceResourceId"] = asc.SourceResourceID
  1301  	}
  1302  	if asc.StorageAccountVersion != nil {
  1303  		objectMap["storageAccountVersion"] = asc.StorageAccountVersion
  1304  	}
  1305  	if asc.ResourceGroup != nil {
  1306  		objectMap["resourceGroup"] = asc.ResourceGroup
  1307  	}
  1308  	if asc.ProtectedItemCount != nil {
  1309  		objectMap["protectedItemCount"] = asc.ProtectedItemCount
  1310  	}
  1311  	if asc.FriendlyName != nil {
  1312  		objectMap["friendlyName"] = asc.FriendlyName
  1313  	}
  1314  	if asc.BackupManagementType != "" {
  1315  		objectMap["backupManagementType"] = asc.BackupManagementType
  1316  	}
  1317  	if asc.RegistrationStatus != nil {
  1318  		objectMap["registrationStatus"] = asc.RegistrationStatus
  1319  	}
  1320  	if asc.HealthStatus != nil {
  1321  		objectMap["healthStatus"] = asc.HealthStatus
  1322  	}
  1323  	if asc.ContainerType != "" {
  1324  		objectMap["containerType"] = asc.ContainerType
  1325  	}
  1326  	return json.Marshal(objectMap)
  1327  }
  1328  
  1329  // AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureStorageContainer.
  1330  func (asc AzureStorageContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
  1331  	return nil, false
  1332  }
  1333  
  1334  // AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureStorageContainer.
  1335  func (asc AzureStorageContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
  1336  	return nil, false
  1337  }
  1338  
  1339  // AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureStorageContainer.
  1340  func (asc AzureStorageContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
  1341  	return nil, false
  1342  }
  1343  
  1344  // AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureStorageContainer.
  1345  func (asc AzureStorageContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
  1346  	return nil, false
  1347  }
  1348  
  1349  // AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureStorageContainer.
  1350  func (asc AzureStorageContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
  1351  	return nil, false
  1352  }
  1353  
  1354  // AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureStorageContainer.
  1355  func (asc AzureStorageContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
  1356  	return &asc, true
  1357  }
  1358  
  1359  // AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureStorageContainer.
  1360  func (asc AzureStorageContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
  1361  	return nil, false
  1362  }
  1363  
  1364  // AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureStorageContainer.
  1365  func (asc AzureStorageContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
  1366  	return nil, false
  1367  }
  1368  
  1369  // AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureStorageContainer.
  1370  func (asc AzureStorageContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
  1371  	return nil, false
  1372  }
  1373  
  1374  // AsDpmContainer is the BasicProtectionContainer implementation for AzureStorageContainer.
  1375  func (asc AzureStorageContainer) AsDpmContainer() (*DpmContainer, bool) {
  1376  	return nil, false
  1377  }
  1378  
  1379  // AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureStorageContainer.
  1380  func (asc AzureStorageContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
  1381  	return nil, false
  1382  }
  1383  
  1384  // AsGenericContainer is the BasicProtectionContainer implementation for AzureStorageContainer.
  1385  func (asc AzureStorageContainer) AsGenericContainer() (*GenericContainer, bool) {
  1386  	return nil, false
  1387  }
  1388  
  1389  // AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureStorageContainer.
  1390  func (asc AzureStorageContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
  1391  	return nil, false
  1392  }
  1393  
  1394  // AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureStorageContainer.
  1395  func (asc AzureStorageContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
  1396  	return nil, false
  1397  }
  1398  
  1399  // AsMabContainer is the BasicProtectionContainer implementation for AzureStorageContainer.
  1400  func (asc AzureStorageContainer) AsMabContainer() (*MabContainer, bool) {
  1401  	return nil, false
  1402  }
  1403  
  1404  // AsProtectionContainer is the BasicProtectionContainer implementation for AzureStorageContainer.
  1405  func (asc AzureStorageContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
  1406  	return nil, false
  1407  }
  1408  
  1409  // AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureStorageContainer.
  1410  func (asc AzureStorageContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
  1411  	return &asc, true
  1412  }
  1413  
  1414  // AzureStorageProtectableContainer azure Storage-specific protectable containers
  1415  type AzureStorageProtectableContainer struct {
  1416  	// FriendlyName - Friendly name of the container.
  1417  	FriendlyName *string `json:"friendlyName,omitempty"`
  1418  	// BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
  1419  	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
  1420  	// HealthStatus - Status of health of the container.
  1421  	HealthStatus *string `json:"healthStatus,omitempty"`
  1422  	// ContainerID - Fabric Id of the container such as ARM Id.
  1423  	ContainerID *string `json:"containerId,omitempty"`
  1424  	// ProtectableContainerType - Possible values include: 'ProtectableContainerTypeProtectableContainer', 'ProtectableContainerTypeStorageContainer', 'ProtectableContainerTypeVMAppContainer'
  1425  	ProtectableContainerType ProtectableContainerType `json:"protectableContainerType,omitempty"`
  1426  }
  1427  
  1428  // MarshalJSON is the custom marshaler for AzureStorageProtectableContainer.
  1429  func (aspc AzureStorageProtectableContainer) MarshalJSON() ([]byte, error) {
  1430  	aspc.ProtectableContainerType = ProtectableContainerTypeStorageContainer
  1431  	objectMap := make(map[string]interface{})
  1432  	if aspc.FriendlyName != nil {
  1433  		objectMap["friendlyName"] = aspc.FriendlyName
  1434  	}
  1435  	if aspc.BackupManagementType != "" {
  1436  		objectMap["backupManagementType"] = aspc.BackupManagementType
  1437  	}
  1438  	if aspc.HealthStatus != nil {
  1439  		objectMap["healthStatus"] = aspc.HealthStatus
  1440  	}
  1441  	if aspc.ContainerID != nil {
  1442  		objectMap["containerId"] = aspc.ContainerID
  1443  	}
  1444  	if aspc.ProtectableContainerType != "" {
  1445  		objectMap["protectableContainerType"] = aspc.ProtectableContainerType
  1446  	}
  1447  	return json.Marshal(objectMap)
  1448  }
  1449  
  1450  // AsAzureStorageProtectableContainer is the BasicProtectableContainer implementation for AzureStorageProtectableContainer.
  1451  func (aspc AzureStorageProtectableContainer) AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) {
  1452  	return &aspc, true
  1453  }
  1454  
  1455  // AsAzureVMAppContainerProtectableContainer is the BasicProtectableContainer implementation for AzureStorageProtectableContainer.
  1456  func (aspc AzureStorageProtectableContainer) AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) {
  1457  	return nil, false
  1458  }
  1459  
  1460  // AsProtectableContainer is the BasicProtectableContainer implementation for AzureStorageProtectableContainer.
  1461  func (aspc AzureStorageProtectableContainer) AsProtectableContainer() (*ProtectableContainer, bool) {
  1462  	return nil, false
  1463  }
  1464  
  1465  // AsBasicProtectableContainer is the BasicProtectableContainer implementation for AzureStorageProtectableContainer.
  1466  func (aspc AzureStorageProtectableContainer) AsBasicProtectableContainer() (BasicProtectableContainer, bool) {
  1467  	return &aspc, true
  1468  }
  1469  
  1470  // AzureVMAppContainerProtectableContainer azure workload-specific container
  1471  type AzureVMAppContainerProtectableContainer struct {
  1472  	// FriendlyName - Friendly name of the container.
  1473  	FriendlyName *string `json:"friendlyName,omitempty"`
  1474  	// BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
  1475  	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
  1476  	// HealthStatus - Status of health of the container.
  1477  	HealthStatus *string `json:"healthStatus,omitempty"`
  1478  	// ContainerID - Fabric Id of the container such as ARM Id.
  1479  	ContainerID *string `json:"containerId,omitempty"`
  1480  	// ProtectableContainerType - Possible values include: 'ProtectableContainerTypeProtectableContainer', 'ProtectableContainerTypeStorageContainer', 'ProtectableContainerTypeVMAppContainer'
  1481  	ProtectableContainerType ProtectableContainerType `json:"protectableContainerType,omitempty"`
  1482  }
  1483  
  1484  // MarshalJSON is the custom marshaler for AzureVMAppContainerProtectableContainer.
  1485  func (avacpc AzureVMAppContainerProtectableContainer) MarshalJSON() ([]byte, error) {
  1486  	avacpc.ProtectableContainerType = ProtectableContainerTypeVMAppContainer
  1487  	objectMap := make(map[string]interface{})
  1488  	if avacpc.FriendlyName != nil {
  1489  		objectMap["friendlyName"] = avacpc.FriendlyName
  1490  	}
  1491  	if avacpc.BackupManagementType != "" {
  1492  		objectMap["backupManagementType"] = avacpc.BackupManagementType
  1493  	}
  1494  	if avacpc.HealthStatus != nil {
  1495  		objectMap["healthStatus"] = avacpc.HealthStatus
  1496  	}
  1497  	if avacpc.ContainerID != nil {
  1498  		objectMap["containerId"] = avacpc.ContainerID
  1499  	}
  1500  	if avacpc.ProtectableContainerType != "" {
  1501  		objectMap["protectableContainerType"] = avacpc.ProtectableContainerType
  1502  	}
  1503  	return json.Marshal(objectMap)
  1504  }
  1505  
  1506  // AsAzureStorageProtectableContainer is the BasicProtectableContainer implementation for AzureVMAppContainerProtectableContainer.
  1507  func (avacpc AzureVMAppContainerProtectableContainer) AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) {
  1508  	return nil, false
  1509  }
  1510  
  1511  // AsAzureVMAppContainerProtectableContainer is the BasicProtectableContainer implementation for AzureVMAppContainerProtectableContainer.
  1512  func (avacpc AzureVMAppContainerProtectableContainer) AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) {
  1513  	return &avacpc, true
  1514  }
  1515  
  1516  // AsProtectableContainer is the BasicProtectableContainer implementation for AzureVMAppContainerProtectableContainer.
  1517  func (avacpc AzureVMAppContainerProtectableContainer) AsProtectableContainer() (*ProtectableContainer, bool) {
  1518  	return nil, false
  1519  }
  1520  
  1521  // AsBasicProtectableContainer is the BasicProtectableContainer implementation for AzureVMAppContainerProtectableContainer.
  1522  func (avacpc AzureVMAppContainerProtectableContainer) AsBasicProtectableContainer() (BasicProtectableContainer, bool) {
  1523  	return &avacpc, true
  1524  }
  1525  
  1526  // AzureVMAppContainerProtectionContainer container for SQL workloads under Azure Virtual Machines.
  1527  type AzureVMAppContainerProtectionContainer struct {
  1528  	// SourceResourceID - ARM ID of the virtual machine represented by this Azure Workload Container
  1529  	SourceResourceID *string `json:"sourceResourceId,omitempty"`
  1530  	// LastUpdatedTime - Time stamp when this container was updated.
  1531  	LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"`
  1532  	// ExtendedInfo - Additional details of a workload container.
  1533  	ExtendedInfo *AzureWorkloadContainerExtendedInfo `json:"extendedInfo,omitempty"`
  1534  	// 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'
  1535  	WorkloadType WorkloadType `json:"workloadType,omitempty"`
  1536  	// OperationType - Re-Do Operation. Possible values include: 'OperationTypeInvalid', 'OperationTypeRegister', 'OperationTypeReregister'
  1537  	OperationType OperationType `json:"operationType,omitempty"`
  1538  	// FriendlyName - Friendly name of the container.
  1539  	FriendlyName *string `json:"friendlyName,omitempty"`
  1540  	// BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
  1541  	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
  1542  	// RegistrationStatus - Status of registration of the container with the Recovery Services Vault.
  1543  	RegistrationStatus *string `json:"registrationStatus,omitempty"`
  1544  	// HealthStatus - Status of health of the container.
  1545  	HealthStatus *string `json:"healthStatus,omitempty"`
  1546  	// ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1'
  1547  	ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
  1548  }
  1549  
  1550  // MarshalJSON is the custom marshaler for AzureVMAppContainerProtectionContainer.
  1551  func (avacpc AzureVMAppContainerProtectionContainer) MarshalJSON() ([]byte, error) {
  1552  	avacpc.ContainerType = ContainerTypeVMAppContainer1
  1553  	objectMap := make(map[string]interface{})
  1554  	if avacpc.SourceResourceID != nil {
  1555  		objectMap["sourceResourceId"] = avacpc.SourceResourceID
  1556  	}
  1557  	if avacpc.LastUpdatedTime != nil {
  1558  		objectMap["lastUpdatedTime"] = avacpc.LastUpdatedTime
  1559  	}
  1560  	if avacpc.ExtendedInfo != nil {
  1561  		objectMap["extendedInfo"] = avacpc.ExtendedInfo
  1562  	}
  1563  	if avacpc.WorkloadType != "" {
  1564  		objectMap["workloadType"] = avacpc.WorkloadType
  1565  	}
  1566  	if avacpc.OperationType != "" {
  1567  		objectMap["operationType"] = avacpc.OperationType
  1568  	}
  1569  	if avacpc.FriendlyName != nil {
  1570  		objectMap["friendlyName"] = avacpc.FriendlyName
  1571  	}
  1572  	if avacpc.BackupManagementType != "" {
  1573  		objectMap["backupManagementType"] = avacpc.BackupManagementType
  1574  	}
  1575  	if avacpc.RegistrationStatus != nil {
  1576  		objectMap["registrationStatus"] = avacpc.RegistrationStatus
  1577  	}
  1578  	if avacpc.HealthStatus != nil {
  1579  		objectMap["healthStatus"] = avacpc.HealthStatus
  1580  	}
  1581  	if avacpc.ContainerType != "" {
  1582  		objectMap["containerType"] = avacpc.ContainerType
  1583  	}
  1584  	return json.Marshal(objectMap)
  1585  }
  1586  
  1587  // AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer.
  1588  func (avacpc AzureVMAppContainerProtectionContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
  1589  	return nil, false
  1590  }
  1591  
  1592  // AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer.
  1593  func (avacpc AzureVMAppContainerProtectionContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
  1594  	return nil, false
  1595  }
  1596  
  1597  // AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer.
  1598  func (avacpc AzureVMAppContainerProtectionContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
  1599  	return nil, false
  1600  }
  1601  
  1602  // AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer.
  1603  func (avacpc AzureVMAppContainerProtectionContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
  1604  	return nil, false
  1605  }
  1606  
  1607  // AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer.
  1608  func (avacpc AzureVMAppContainerProtectionContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
  1609  	return nil, false
  1610  }
  1611  
  1612  // AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer.
  1613  func (avacpc AzureVMAppContainerProtectionContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
  1614  	return nil, false
  1615  }
  1616  
  1617  // AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer.
  1618  func (avacpc AzureVMAppContainerProtectionContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
  1619  	return &avacpc, true
  1620  }
  1621  
  1622  // AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer.
  1623  func (avacpc AzureVMAppContainerProtectionContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
  1624  	return nil, false
  1625  }
  1626  
  1627  // AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer.
  1628  func (avacpc AzureVMAppContainerProtectionContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
  1629  	return &avacpc, true
  1630  }
  1631  
  1632  // AsDpmContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer.
  1633  func (avacpc AzureVMAppContainerProtectionContainer) AsDpmContainer() (*DpmContainer, bool) {
  1634  	return nil, false
  1635  }
  1636  
  1637  // AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer.
  1638  func (avacpc AzureVMAppContainerProtectionContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
  1639  	return nil, false
  1640  }
  1641  
  1642  // AsGenericContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer.
  1643  func (avacpc AzureVMAppContainerProtectionContainer) AsGenericContainer() (*GenericContainer, bool) {
  1644  	return nil, false
  1645  }
  1646  
  1647  // AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer.
  1648  func (avacpc AzureVMAppContainerProtectionContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
  1649  	return nil, false
  1650  }
  1651  
  1652  // AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer.
  1653  func (avacpc AzureVMAppContainerProtectionContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
  1654  	return nil, false
  1655  }
  1656  
  1657  // AsMabContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer.
  1658  func (avacpc AzureVMAppContainerProtectionContainer) AsMabContainer() (*MabContainer, bool) {
  1659  	return nil, false
  1660  }
  1661  
  1662  // AsProtectionContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer.
  1663  func (avacpc AzureVMAppContainerProtectionContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
  1664  	return nil, false
  1665  }
  1666  
  1667  // AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer.
  1668  func (avacpc AzureVMAppContainerProtectionContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
  1669  	return &avacpc, true
  1670  }
  1671  
  1672  // BasicAzureVMWorkloadItem azure VM workload-specific workload item.
  1673  type BasicAzureVMWorkloadItem interface {
  1674  	AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool)
  1675  	AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool)
  1676  	AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool)
  1677  	AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool)
  1678  	AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool)
  1679  	AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool)
  1680  	AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool)
  1681  }
  1682  
  1683  // AzureVMWorkloadItem azure VM workload-specific workload item.
  1684  type AzureVMWorkloadItem struct {
  1685  	// ParentName - Name for instance or AG
  1686  	ParentName *string `json:"parentName,omitempty"`
  1687  	// ServerName - Host/Cluster Name for instance or AG
  1688  	ServerName *string `json:"serverName,omitempty"`
  1689  	// IsAutoProtectable - Indicates if workload item is auto-protectable
  1690  	IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
  1691  	// Subinquireditemcount - For instance or AG, indicates number of DB's present
  1692  	Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
  1693  	// SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected
  1694  	SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
  1695  	// BackupManagementType - Type of backup management to backup an item.
  1696  	BackupManagementType *string `json:"backupManagementType,omitempty"`
  1697  	// WorkloadType - Type of workload for the backup management
  1698  	WorkloadType *string `json:"workloadType,omitempty"`
  1699  	// FriendlyName - Friendly name of the backup item.
  1700  	FriendlyName *string `json:"friendlyName,omitempty"`
  1701  	// ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
  1702  	ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
  1703  	// WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1'
  1704  	WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
  1705  }
  1706  
  1707  func unmarshalBasicAzureVMWorkloadItem(body []byte) (BasicAzureVMWorkloadItem, error) {
  1708  	var m map[string]interface{}
  1709  	err := json.Unmarshal(body, &m)
  1710  	if err != nil {
  1711  		return nil, err
  1712  	}
  1713  
  1714  	switch m["workloadItemType"] {
  1715  	case string(WorkloadItemTypeSAPAseDatabase1):
  1716  		var avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem
  1717  		err := json.Unmarshal(body, &avwsadwi)
  1718  		return avwsadwi, err
  1719  	case string(WorkloadItemTypeSAPAseSystem1):
  1720  		var avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem
  1721  		err := json.Unmarshal(body, &avwsaswi)
  1722  		return avwsaswi, err
  1723  	case string(WorkloadItemTypeSAPHanaDatabase1):
  1724  		var avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem
  1725  		err := json.Unmarshal(body, &avwshdwi)
  1726  		return avwshdwi, err
  1727  	case string(WorkloadItemTypeSAPHanaSystem1):
  1728  		var avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem
  1729  		err := json.Unmarshal(body, &avwshswi)
  1730  		return avwshswi, err
  1731  	case string(WorkloadItemTypeSQLDataBase1):
  1732  		var avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem
  1733  		err := json.Unmarshal(body, &avwsdwi)
  1734  		return avwsdwi, err
  1735  	case string(WorkloadItemTypeSQLInstance1):
  1736  		var avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem
  1737  		err := json.Unmarshal(body, &avwsiwi)
  1738  		return avwsiwi, err
  1739  	default:
  1740  		var avwi AzureVMWorkloadItem
  1741  		err := json.Unmarshal(body, &avwi)
  1742  		return avwi, err
  1743  	}
  1744  }
  1745  func unmarshalBasicAzureVMWorkloadItemArray(body []byte) ([]BasicAzureVMWorkloadItem, error) {
  1746  	var rawMessages []*json.RawMessage
  1747  	err := json.Unmarshal(body, &rawMessages)
  1748  	if err != nil {
  1749  		return nil, err
  1750  	}
  1751  
  1752  	avwiArray := make([]BasicAzureVMWorkloadItem, len(rawMessages))
  1753  
  1754  	for index, rawMessage := range rawMessages {
  1755  		avwi, err := unmarshalBasicAzureVMWorkloadItem(*rawMessage)
  1756  		if err != nil {
  1757  			return nil, err
  1758  		}
  1759  		avwiArray[index] = avwi
  1760  	}
  1761  	return avwiArray, nil
  1762  }
  1763  
  1764  // MarshalJSON is the custom marshaler for AzureVMWorkloadItem.
  1765  func (avwi AzureVMWorkloadItem) MarshalJSON() ([]byte, error) {
  1766  	avwi.WorkloadItemType = WorkloadItemTypeAzureVMWorkloadItem
  1767  	objectMap := make(map[string]interface{})
  1768  	if avwi.ParentName != nil {
  1769  		objectMap["parentName"] = avwi.ParentName
  1770  	}
  1771  	if avwi.ServerName != nil {
  1772  		objectMap["serverName"] = avwi.ServerName
  1773  	}
  1774  	if avwi.IsAutoProtectable != nil {
  1775  		objectMap["isAutoProtectable"] = avwi.IsAutoProtectable
  1776  	}
  1777  	if avwi.Subinquireditemcount != nil {
  1778  		objectMap["subinquireditemcount"] = avwi.Subinquireditemcount
  1779  	}
  1780  	if avwi.SubWorkloadItemCount != nil {
  1781  		objectMap["subWorkloadItemCount"] = avwi.SubWorkloadItemCount
  1782  	}
  1783  	if avwi.BackupManagementType != nil {
  1784  		objectMap["backupManagementType"] = avwi.BackupManagementType
  1785  	}
  1786  	if avwi.WorkloadType != nil {
  1787  		objectMap["workloadType"] = avwi.WorkloadType
  1788  	}
  1789  	if avwi.FriendlyName != nil {
  1790  		objectMap["friendlyName"] = avwi.FriendlyName
  1791  	}
  1792  	if avwi.ProtectionState != "" {
  1793  		objectMap["protectionState"] = avwi.ProtectionState
  1794  	}
  1795  	if avwi.WorkloadItemType != "" {
  1796  		objectMap["workloadItemType"] = avwi.WorkloadItemType
  1797  	}
  1798  	return json.Marshal(objectMap)
  1799  }
  1800  
  1801  // AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem.
  1802  func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
  1803  	return &avwi, true
  1804  }
  1805  
  1806  // AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem.
  1807  func (avwi AzureVMWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
  1808  	return &avwi, true
  1809  }
  1810  
  1811  // AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem.
  1812  func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
  1813  	return nil, false
  1814  }
  1815  
  1816  // AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem.
  1817  func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
  1818  	return nil, false
  1819  }
  1820  
  1821  // AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem.
  1822  func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
  1823  	return nil, false
  1824  }
  1825  
  1826  // AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem.
  1827  func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
  1828  	return nil, false
  1829  }
  1830  
  1831  // AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem.
  1832  func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
  1833  	return nil, false
  1834  }
  1835  
  1836  // AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem.
  1837  func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
  1838  	return nil, false
  1839  }
  1840  
  1841  // AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem.
  1842  func (avwi AzureVMWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
  1843  	return nil, false
  1844  }
  1845  
  1846  // AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem.
  1847  func (avwi AzureVMWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
  1848  	return &avwi, true
  1849  }
  1850  
  1851  // BasicAzureVMWorkloadProtectableItem azure VM workload-specific protectable item.
  1852  type BasicAzureVMWorkloadProtectableItem interface {
  1853  	AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool)
  1854  	AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool)
  1855  	AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool)
  1856  	AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool)
  1857  	AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool)
  1858  	AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool)
  1859  	AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool)
  1860  }
  1861  
  1862  // AzureVMWorkloadProtectableItem azure VM workload-specific protectable item.
  1863  type AzureVMWorkloadProtectableItem struct {
  1864  	// ParentName - Name for instance or AG
  1865  	ParentName *string `json:"parentName,omitempty"`
  1866  	// ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent
  1867  	// Only Applicable for data bases where the parent would be either Instance or a SQL AG.
  1868  	ParentUniqueName *string `json:"parentUniqueName,omitempty"`
  1869  	// ServerName - Host/Cluster Name for instance or AG
  1870  	ServerName *string `json:"serverName,omitempty"`
  1871  	// IsAutoProtectable - Indicates if protectable item is auto-protectable
  1872  	IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
  1873  	// IsAutoProtected - Indicates if protectable item is auto-protected
  1874  	IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
  1875  	// Subinquireditemcount - For instance or AG, indicates number of DB's present
  1876  	Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
  1877  	// Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected
  1878  	Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
  1879  	// Prebackupvalidation - Pre-backup validation for protectable objects
  1880  	Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
  1881  	// BackupManagementType - Type of backup management to backup an item.
  1882  	BackupManagementType *string `json:"backupManagementType,omitempty"`
  1883  	// WorkloadType - Type of workload for the backup management
  1884  	WorkloadType *string `json:"workloadType,omitempty"`
  1885  	// FriendlyName - Friendly name of the backup item.
  1886  	FriendlyName *string `json:"friendlyName,omitempty"`
  1887  	// ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
  1888  	ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
  1889  	// ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem'
  1890  	ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
  1891  }
  1892  
  1893  func unmarshalBasicAzureVMWorkloadProtectableItem(body []byte) (BasicAzureVMWorkloadProtectableItem, error) {
  1894  	var m map[string]interface{}
  1895  	err := json.Unmarshal(body, &m)
  1896  	if err != nil {
  1897  		return nil, err
  1898  	}
  1899  
  1900  	switch m["protectableItemType"] {
  1901  	case string(ProtectableItemTypeSAPAseSystem):
  1902  		var avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem
  1903  		err := json.Unmarshal(body, &avwsaspi)
  1904  		return avwsaspi, err
  1905  	case string(ProtectableItemTypeSAPHanaDatabase):
  1906  		var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem
  1907  		err := json.Unmarshal(body, &avwshdpi)
  1908  		return avwshdpi, err
  1909  	case string(ProtectableItemTypeSAPHanaSystem):
  1910  		var avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem
  1911  		err := json.Unmarshal(body, &avwshspi)
  1912  		return avwshspi, err
  1913  	case string(ProtectableItemTypeSQLAvailabilityGroupContainer):
  1914  		var avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem
  1915  		err := json.Unmarshal(body, &avwsagpi)
  1916  		return avwsagpi, err
  1917  	case string(ProtectableItemTypeSQLDataBase):
  1918  		var avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem
  1919  		err := json.Unmarshal(body, &avwsdpi)
  1920  		return avwsdpi, err
  1921  	case string(ProtectableItemTypeSQLInstance):
  1922  		var avwsipi AzureVMWorkloadSQLInstanceProtectableItem
  1923  		err := json.Unmarshal(body, &avwsipi)
  1924  		return avwsipi, err
  1925  	default:
  1926  		var avwpi AzureVMWorkloadProtectableItem
  1927  		err := json.Unmarshal(body, &avwpi)
  1928  		return avwpi, err
  1929  	}
  1930  }
  1931  func unmarshalBasicAzureVMWorkloadProtectableItemArray(body []byte) ([]BasicAzureVMWorkloadProtectableItem, error) {
  1932  	var rawMessages []*json.RawMessage
  1933  	err := json.Unmarshal(body, &rawMessages)
  1934  	if err != nil {
  1935  		return nil, err
  1936  	}
  1937  
  1938  	avwpiArray := make([]BasicAzureVMWorkloadProtectableItem, len(rawMessages))
  1939  
  1940  	for index, rawMessage := range rawMessages {
  1941  		avwpi, err := unmarshalBasicAzureVMWorkloadProtectableItem(*rawMessage)
  1942  		if err != nil {
  1943  			return nil, err
  1944  		}
  1945  		avwpiArray[index] = avwpi
  1946  	}
  1947  	return avwpiArray, nil
  1948  }
  1949  
  1950  // MarshalJSON is the custom marshaler for AzureVMWorkloadProtectableItem.
  1951  func (avwpi AzureVMWorkloadProtectableItem) MarshalJSON() ([]byte, error) {
  1952  	avwpi.ProtectableItemType = ProtectableItemTypeAzureVMWorkloadProtectableItem
  1953  	objectMap := make(map[string]interface{})
  1954  	if avwpi.ParentName != nil {
  1955  		objectMap["parentName"] = avwpi.ParentName
  1956  	}
  1957  	if avwpi.ParentUniqueName != nil {
  1958  		objectMap["parentUniqueName"] = avwpi.ParentUniqueName
  1959  	}
  1960  	if avwpi.ServerName != nil {
  1961  		objectMap["serverName"] = avwpi.ServerName
  1962  	}
  1963  	if avwpi.IsAutoProtectable != nil {
  1964  		objectMap["isAutoProtectable"] = avwpi.IsAutoProtectable
  1965  	}
  1966  	if avwpi.IsAutoProtected != nil {
  1967  		objectMap["isAutoProtected"] = avwpi.IsAutoProtected
  1968  	}
  1969  	if avwpi.Subinquireditemcount != nil {
  1970  		objectMap["subinquireditemcount"] = avwpi.Subinquireditemcount
  1971  	}
  1972  	if avwpi.Subprotectableitemcount != nil {
  1973  		objectMap["subprotectableitemcount"] = avwpi.Subprotectableitemcount
  1974  	}
  1975  	if avwpi.Prebackupvalidation != nil {
  1976  		objectMap["prebackupvalidation"] = avwpi.Prebackupvalidation
  1977  	}
  1978  	if avwpi.BackupManagementType != nil {
  1979  		objectMap["backupManagementType"] = avwpi.BackupManagementType
  1980  	}
  1981  	if avwpi.WorkloadType != nil {
  1982  		objectMap["workloadType"] = avwpi.WorkloadType
  1983  	}
  1984  	if avwpi.FriendlyName != nil {
  1985  		objectMap["friendlyName"] = avwpi.FriendlyName
  1986  	}
  1987  	if avwpi.ProtectionState != "" {
  1988  		objectMap["protectionState"] = avwpi.ProtectionState
  1989  	}
  1990  	if avwpi.ProtectableItemType != "" {
  1991  		objectMap["protectableItemType"] = avwpi.ProtectableItemType
  1992  	}
  1993  	return json.Marshal(objectMap)
  1994  }
  1995  
  1996  // AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem.
  1997  func (avwpi AzureVMWorkloadProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
  1998  	return nil, false
  1999  }
  2000  
  2001  // AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem.
  2002  func (avwpi AzureVMWorkloadProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
  2003  	return nil, false
  2004  }
  2005  
  2006  // AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem.
  2007  func (avwpi AzureVMWorkloadProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
  2008  	return nil, false
  2009  }
  2010  
  2011  // AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem.
  2012  func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
  2013  	return &avwpi, true
  2014  }
  2015  
  2016  // AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem.
  2017  func (avwpi AzureVMWorkloadProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
  2018  	return &avwpi, true
  2019  }
  2020  
  2021  // AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem.
  2022  func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
  2023  	return nil, false
  2024  }
  2025  
  2026  // AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem.
  2027  func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
  2028  	return nil, false
  2029  }
  2030  
  2031  // AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem.
  2032  func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
  2033  	return nil, false
  2034  }
  2035  
  2036  // AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem.
  2037  func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
  2038  	return nil, false
  2039  }
  2040  
  2041  // AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem.
  2042  func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
  2043  	return nil, false
  2044  }
  2045  
  2046  // AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem.
  2047  func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
  2048  	return nil, false
  2049  }
  2050  
  2051  // AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem.
  2052  func (avwpi AzureVMWorkloadProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
  2053  	return nil, false
  2054  }
  2055  
  2056  // AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem.
  2057  func (avwpi AzureVMWorkloadProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
  2058  	return nil, false
  2059  }
  2060  
  2061  // AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem.
  2062  func (avwpi AzureVMWorkloadProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
  2063  	return nil, false
  2064  }
  2065  
  2066  // AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem.
  2067  func (avwpi AzureVMWorkloadProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
  2068  	return &avwpi, true
  2069  }
  2070  
  2071  // AzureVMWorkloadSAPAseDatabaseWorkloadItem azure VM workload-specific workload item representing SAP ASE
  2072  // Database.
  2073  type AzureVMWorkloadSAPAseDatabaseWorkloadItem struct {
  2074  	// ParentName - Name for instance or AG
  2075  	ParentName *string `json:"parentName,omitempty"`
  2076  	// ServerName - Host/Cluster Name for instance or AG
  2077  	ServerName *string `json:"serverName,omitempty"`
  2078  	// IsAutoProtectable - Indicates if workload item is auto-protectable
  2079  	IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
  2080  	// Subinquireditemcount - For instance or AG, indicates number of DB's present
  2081  	Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
  2082  	// SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected
  2083  	SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
  2084  	// BackupManagementType - Type of backup management to backup an item.
  2085  	BackupManagementType *string `json:"backupManagementType,omitempty"`
  2086  	// WorkloadType - Type of workload for the backup management
  2087  	WorkloadType *string `json:"workloadType,omitempty"`
  2088  	// FriendlyName - Friendly name of the backup item.
  2089  	FriendlyName *string `json:"friendlyName,omitempty"`
  2090  	// ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
  2091  	ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
  2092  	// WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1'
  2093  	WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
  2094  }
  2095  
  2096  // MarshalJSON is the custom marshaler for AzureVMWorkloadSAPAseDatabaseWorkloadItem.
  2097  func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) MarshalJSON() ([]byte, error) {
  2098  	avwsadwi.WorkloadItemType = WorkloadItemTypeSAPAseDatabase1
  2099  	objectMap := make(map[string]interface{})
  2100  	if avwsadwi.ParentName != nil {
  2101  		objectMap["parentName"] = avwsadwi.ParentName
  2102  	}
  2103  	if avwsadwi.ServerName != nil {
  2104  		objectMap["serverName"] = avwsadwi.ServerName
  2105  	}
  2106  	if avwsadwi.IsAutoProtectable != nil {
  2107  		objectMap["isAutoProtectable"] = avwsadwi.IsAutoProtectable
  2108  	}
  2109  	if avwsadwi.Subinquireditemcount != nil {
  2110  		objectMap["subinquireditemcount"] = avwsadwi.Subinquireditemcount
  2111  	}
  2112  	if avwsadwi.SubWorkloadItemCount != nil {
  2113  		objectMap["subWorkloadItemCount"] = avwsadwi.SubWorkloadItemCount
  2114  	}
  2115  	if avwsadwi.BackupManagementType != nil {
  2116  		objectMap["backupManagementType"] = avwsadwi.BackupManagementType
  2117  	}
  2118  	if avwsadwi.WorkloadType != nil {
  2119  		objectMap["workloadType"] = avwsadwi.WorkloadType
  2120  	}
  2121  	if avwsadwi.FriendlyName != nil {
  2122  		objectMap["friendlyName"] = avwsadwi.FriendlyName
  2123  	}
  2124  	if avwsadwi.ProtectionState != "" {
  2125  		objectMap["protectionState"] = avwsadwi.ProtectionState
  2126  	}
  2127  	if avwsadwi.WorkloadItemType != "" {
  2128  		objectMap["workloadItemType"] = avwsadwi.WorkloadItemType
  2129  	}
  2130  	return json.Marshal(objectMap)
  2131  }
  2132  
  2133  // AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem.
  2134  func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
  2135  	return nil, false
  2136  }
  2137  
  2138  // AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem.
  2139  func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
  2140  	return &avwsadwi, true
  2141  }
  2142  
  2143  // AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem.
  2144  func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
  2145  	return &avwsadwi, true
  2146  }
  2147  
  2148  // AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem.
  2149  func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
  2150  	return nil, false
  2151  }
  2152  
  2153  // AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem.
  2154  func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
  2155  	return nil, false
  2156  }
  2157  
  2158  // AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem.
  2159  func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
  2160  	return nil, false
  2161  }
  2162  
  2163  // AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem.
  2164  func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
  2165  	return nil, false
  2166  }
  2167  
  2168  // AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem.
  2169  func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
  2170  	return nil, false
  2171  }
  2172  
  2173  // AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem.
  2174  func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
  2175  	return nil, false
  2176  }
  2177  
  2178  // AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem.
  2179  func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
  2180  	return &avwsadwi, true
  2181  }
  2182  
  2183  // AzureVMWorkloadSAPAseSystemProtectableItem azure VM workload-specific protectable item representing SAP
  2184  // ASE System.
  2185  type AzureVMWorkloadSAPAseSystemProtectableItem struct {
  2186  	// ParentName - Name for instance or AG
  2187  	ParentName *string `json:"parentName,omitempty"`
  2188  	// ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent
  2189  	// Only Applicable for data bases where the parent would be either Instance or a SQL AG.
  2190  	ParentUniqueName *string `json:"parentUniqueName,omitempty"`
  2191  	// ServerName - Host/Cluster Name for instance or AG
  2192  	ServerName *string `json:"serverName,omitempty"`
  2193  	// IsAutoProtectable - Indicates if protectable item is auto-protectable
  2194  	IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
  2195  	// IsAutoProtected - Indicates if protectable item is auto-protected
  2196  	IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
  2197  	// Subinquireditemcount - For instance or AG, indicates number of DB's present
  2198  	Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
  2199  	// Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected
  2200  	Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
  2201  	// Prebackupvalidation - Pre-backup validation for protectable objects
  2202  	Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
  2203  	// BackupManagementType - Type of backup management to backup an item.
  2204  	BackupManagementType *string `json:"backupManagementType,omitempty"`
  2205  	// WorkloadType - Type of workload for the backup management
  2206  	WorkloadType *string `json:"workloadType,omitempty"`
  2207  	// FriendlyName - Friendly name of the backup item.
  2208  	FriendlyName *string `json:"friendlyName,omitempty"`
  2209  	// ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
  2210  	ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
  2211  	// ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem'
  2212  	ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
  2213  }
  2214  
  2215  // MarshalJSON is the custom marshaler for AzureVMWorkloadSAPAseSystemProtectableItem.
  2216  func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) MarshalJSON() ([]byte, error) {
  2217  	avwsaspi.ProtectableItemType = ProtectableItemTypeSAPAseSystem
  2218  	objectMap := make(map[string]interface{})
  2219  	if avwsaspi.ParentName != nil {
  2220  		objectMap["parentName"] = avwsaspi.ParentName
  2221  	}
  2222  	if avwsaspi.ParentUniqueName != nil {
  2223  		objectMap["parentUniqueName"] = avwsaspi.ParentUniqueName
  2224  	}
  2225  	if avwsaspi.ServerName != nil {
  2226  		objectMap["serverName"] = avwsaspi.ServerName
  2227  	}
  2228  	if avwsaspi.IsAutoProtectable != nil {
  2229  		objectMap["isAutoProtectable"] = avwsaspi.IsAutoProtectable
  2230  	}
  2231  	if avwsaspi.IsAutoProtected != nil {
  2232  		objectMap["isAutoProtected"] = avwsaspi.IsAutoProtected
  2233  	}
  2234  	if avwsaspi.Subinquireditemcount != nil {
  2235  		objectMap["subinquireditemcount"] = avwsaspi.Subinquireditemcount
  2236  	}
  2237  	if avwsaspi.Subprotectableitemcount != nil {
  2238  		objectMap["subprotectableitemcount"] = avwsaspi.Subprotectableitemcount
  2239  	}
  2240  	if avwsaspi.Prebackupvalidation != nil {
  2241  		objectMap["prebackupvalidation"] = avwsaspi.Prebackupvalidation
  2242  	}
  2243  	if avwsaspi.BackupManagementType != nil {
  2244  		objectMap["backupManagementType"] = avwsaspi.BackupManagementType
  2245  	}
  2246  	if avwsaspi.WorkloadType != nil {
  2247  		objectMap["workloadType"] = avwsaspi.WorkloadType
  2248  	}
  2249  	if avwsaspi.FriendlyName != nil {
  2250  		objectMap["friendlyName"] = avwsaspi.FriendlyName
  2251  	}
  2252  	if avwsaspi.ProtectionState != "" {
  2253  		objectMap["protectionState"] = avwsaspi.ProtectionState
  2254  	}
  2255  	if avwsaspi.ProtectableItemType != "" {
  2256  		objectMap["protectableItemType"] = avwsaspi.ProtectableItemType
  2257  	}
  2258  	return json.Marshal(objectMap)
  2259  }
  2260  
  2261  // AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem.
  2262  func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
  2263  	return nil, false
  2264  }
  2265  
  2266  // AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem.
  2267  func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
  2268  	return nil, false
  2269  }
  2270  
  2271  // AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem.
  2272  func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
  2273  	return nil, false
  2274  }
  2275  
  2276  // AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem.
  2277  func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
  2278  	return nil, false
  2279  }
  2280  
  2281  // AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem.
  2282  func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
  2283  	return &avwsaspi, true
  2284  }
  2285  
  2286  // AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem.
  2287  func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
  2288  	return &avwsaspi, true
  2289  }
  2290  
  2291  // AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem.
  2292  func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
  2293  	return nil, false
  2294  }
  2295  
  2296  // AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem.
  2297  func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
  2298  	return nil, false
  2299  }
  2300  
  2301  // AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem.
  2302  func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
  2303  	return nil, false
  2304  }
  2305  
  2306  // AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem.
  2307  func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
  2308  	return nil, false
  2309  }
  2310  
  2311  // AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem.
  2312  func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
  2313  	return nil, false
  2314  }
  2315  
  2316  // AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem.
  2317  func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
  2318  	return nil, false
  2319  }
  2320  
  2321  // AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem.
  2322  func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
  2323  	return nil, false
  2324  }
  2325  
  2326  // AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem.
  2327  func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
  2328  	return nil, false
  2329  }
  2330  
  2331  // AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem.
  2332  func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
  2333  	return &avwsaspi, true
  2334  }
  2335  
  2336  // AzureVMWorkloadSAPAseSystemWorkloadItem azure VM workload-specific workload item representing SAP ASE
  2337  // System.
  2338  type AzureVMWorkloadSAPAseSystemWorkloadItem struct {
  2339  	// ParentName - Name for instance or AG
  2340  	ParentName *string `json:"parentName,omitempty"`
  2341  	// ServerName - Host/Cluster Name for instance or AG
  2342  	ServerName *string `json:"serverName,omitempty"`
  2343  	// IsAutoProtectable - Indicates if workload item is auto-protectable
  2344  	IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
  2345  	// Subinquireditemcount - For instance or AG, indicates number of DB's present
  2346  	Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
  2347  	// SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected
  2348  	SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
  2349  	// BackupManagementType - Type of backup management to backup an item.
  2350  	BackupManagementType *string `json:"backupManagementType,omitempty"`
  2351  	// WorkloadType - Type of workload for the backup management
  2352  	WorkloadType *string `json:"workloadType,omitempty"`
  2353  	// FriendlyName - Friendly name of the backup item.
  2354  	FriendlyName *string `json:"friendlyName,omitempty"`
  2355  	// ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
  2356  	ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
  2357  	// WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1'
  2358  	WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
  2359  }
  2360  
  2361  // MarshalJSON is the custom marshaler for AzureVMWorkloadSAPAseSystemWorkloadItem.
  2362  func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) MarshalJSON() ([]byte, error) {
  2363  	avwsaswi.WorkloadItemType = WorkloadItemTypeSAPAseSystem1
  2364  	objectMap := make(map[string]interface{})
  2365  	if avwsaswi.ParentName != nil {
  2366  		objectMap["parentName"] = avwsaswi.ParentName
  2367  	}
  2368  	if avwsaswi.ServerName != nil {
  2369  		objectMap["serverName"] = avwsaswi.ServerName
  2370  	}
  2371  	if avwsaswi.IsAutoProtectable != nil {
  2372  		objectMap["isAutoProtectable"] = avwsaswi.IsAutoProtectable
  2373  	}
  2374  	if avwsaswi.Subinquireditemcount != nil {
  2375  		objectMap["subinquireditemcount"] = avwsaswi.Subinquireditemcount
  2376  	}
  2377  	if avwsaswi.SubWorkloadItemCount != nil {
  2378  		objectMap["subWorkloadItemCount"] = avwsaswi.SubWorkloadItemCount
  2379  	}
  2380  	if avwsaswi.BackupManagementType != nil {
  2381  		objectMap["backupManagementType"] = avwsaswi.BackupManagementType
  2382  	}
  2383  	if avwsaswi.WorkloadType != nil {
  2384  		objectMap["workloadType"] = avwsaswi.WorkloadType
  2385  	}
  2386  	if avwsaswi.FriendlyName != nil {
  2387  		objectMap["friendlyName"] = avwsaswi.FriendlyName
  2388  	}
  2389  	if avwsaswi.ProtectionState != "" {
  2390  		objectMap["protectionState"] = avwsaswi.ProtectionState
  2391  	}
  2392  	if avwsaswi.WorkloadItemType != "" {
  2393  		objectMap["workloadItemType"] = avwsaswi.WorkloadItemType
  2394  	}
  2395  	return json.Marshal(objectMap)
  2396  }
  2397  
  2398  // AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem.
  2399  func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
  2400  	return nil, false
  2401  }
  2402  
  2403  // AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem.
  2404  func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
  2405  	return &avwsaswi, true
  2406  }
  2407  
  2408  // AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem.
  2409  func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
  2410  	return nil, false
  2411  }
  2412  
  2413  // AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem.
  2414  func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
  2415  	return &avwsaswi, true
  2416  }
  2417  
  2418  // AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem.
  2419  func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
  2420  	return nil, false
  2421  }
  2422  
  2423  // AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem.
  2424  func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
  2425  	return nil, false
  2426  }
  2427  
  2428  // AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem.
  2429  func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
  2430  	return nil, false
  2431  }
  2432  
  2433  // AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem.
  2434  func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
  2435  	return nil, false
  2436  }
  2437  
  2438  // AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem.
  2439  func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
  2440  	return nil, false
  2441  }
  2442  
  2443  // AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem.
  2444  func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
  2445  	return &avwsaswi, true
  2446  }
  2447  
  2448  // AzureVMWorkloadSAPHanaDatabaseProtectableItem azure VM workload-specific protectable item representing
  2449  // SAP HANA Database.
  2450  type AzureVMWorkloadSAPHanaDatabaseProtectableItem struct {
  2451  	// ParentName - Name for instance or AG
  2452  	ParentName *string `json:"parentName,omitempty"`
  2453  	// ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent
  2454  	// Only Applicable for data bases where the parent would be either Instance or a SQL AG.
  2455  	ParentUniqueName *string `json:"parentUniqueName,omitempty"`
  2456  	// ServerName - Host/Cluster Name for instance or AG
  2457  	ServerName *string `json:"serverName,omitempty"`
  2458  	// IsAutoProtectable - Indicates if protectable item is auto-protectable
  2459  	IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
  2460  	// IsAutoProtected - Indicates if protectable item is auto-protected
  2461  	IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
  2462  	// Subinquireditemcount - For instance or AG, indicates number of DB's present
  2463  	Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
  2464  	// Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected
  2465  	Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
  2466  	// Prebackupvalidation - Pre-backup validation for protectable objects
  2467  	Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
  2468  	// BackupManagementType - Type of backup management to backup an item.
  2469  	BackupManagementType *string `json:"backupManagementType,omitempty"`
  2470  	// WorkloadType - Type of workload for the backup management
  2471  	WorkloadType *string `json:"workloadType,omitempty"`
  2472  	// FriendlyName - Friendly name of the backup item.
  2473  	FriendlyName *string `json:"friendlyName,omitempty"`
  2474  	// ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
  2475  	ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
  2476  	// ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem'
  2477  	ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
  2478  }
  2479  
  2480  // MarshalJSON is the custom marshaler for AzureVMWorkloadSAPHanaDatabaseProtectableItem.
  2481  func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) MarshalJSON() ([]byte, error) {
  2482  	avwshdpi.ProtectableItemType = ProtectableItemTypeSAPHanaDatabase
  2483  	objectMap := make(map[string]interface{})
  2484  	if avwshdpi.ParentName != nil {
  2485  		objectMap["parentName"] = avwshdpi.ParentName
  2486  	}
  2487  	if avwshdpi.ParentUniqueName != nil {
  2488  		objectMap["parentUniqueName"] = avwshdpi.ParentUniqueName
  2489  	}
  2490  	if avwshdpi.ServerName != nil {
  2491  		objectMap["serverName"] = avwshdpi.ServerName
  2492  	}
  2493  	if avwshdpi.IsAutoProtectable != nil {
  2494  		objectMap["isAutoProtectable"] = avwshdpi.IsAutoProtectable
  2495  	}
  2496  	if avwshdpi.IsAutoProtected != nil {
  2497  		objectMap["isAutoProtected"] = avwshdpi.IsAutoProtected
  2498  	}
  2499  	if avwshdpi.Subinquireditemcount != nil {
  2500  		objectMap["subinquireditemcount"] = avwshdpi.Subinquireditemcount
  2501  	}
  2502  	if avwshdpi.Subprotectableitemcount != nil {
  2503  		objectMap["subprotectableitemcount"] = avwshdpi.Subprotectableitemcount
  2504  	}
  2505  	if avwshdpi.Prebackupvalidation != nil {
  2506  		objectMap["prebackupvalidation"] = avwshdpi.Prebackupvalidation
  2507  	}
  2508  	if avwshdpi.BackupManagementType != nil {
  2509  		objectMap["backupManagementType"] = avwshdpi.BackupManagementType
  2510  	}
  2511  	if avwshdpi.WorkloadType != nil {
  2512  		objectMap["workloadType"] = avwshdpi.WorkloadType
  2513  	}
  2514  	if avwshdpi.FriendlyName != nil {
  2515  		objectMap["friendlyName"] = avwshdpi.FriendlyName
  2516  	}
  2517  	if avwshdpi.ProtectionState != "" {
  2518  		objectMap["protectionState"] = avwshdpi.ProtectionState
  2519  	}
  2520  	if avwshdpi.ProtectableItemType != "" {
  2521  		objectMap["protectableItemType"] = avwshdpi.ProtectableItemType
  2522  	}
  2523  	return json.Marshal(objectMap)
  2524  }
  2525  
  2526  // AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem.
  2527  func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
  2528  	return nil, false
  2529  }
  2530  
  2531  // AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem.
  2532  func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
  2533  	return nil, false
  2534  }
  2535  
  2536  // AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem.
  2537  func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
  2538  	return nil, false
  2539  }
  2540  
  2541  // AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem.
  2542  func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
  2543  	return nil, false
  2544  }
  2545  
  2546  // AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem.
  2547  func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
  2548  	return &avwshdpi, true
  2549  }
  2550  
  2551  // AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem.
  2552  func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
  2553  	return nil, false
  2554  }
  2555  
  2556  // AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem.
  2557  func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
  2558  	return &avwshdpi, true
  2559  }
  2560  
  2561  // AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem.
  2562  func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
  2563  	return nil, false
  2564  }
  2565  
  2566  // AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem.
  2567  func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
  2568  	return nil, false
  2569  }
  2570  
  2571  // AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem.
  2572  func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
  2573  	return nil, false
  2574  }
  2575  
  2576  // AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem.
  2577  func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
  2578  	return nil, false
  2579  }
  2580  
  2581  // AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem.
  2582  func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
  2583  	return nil, false
  2584  }
  2585  
  2586  // AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem.
  2587  func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
  2588  	return nil, false
  2589  }
  2590  
  2591  // AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem.
  2592  func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
  2593  	return nil, false
  2594  }
  2595  
  2596  // AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem.
  2597  func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
  2598  	return &avwshdpi, true
  2599  }
  2600  
  2601  // AzureVMWorkloadSAPHanaDatabaseWorkloadItem azure VM workload-specific workload item representing SAP
  2602  // HANA Database.
  2603  type AzureVMWorkloadSAPHanaDatabaseWorkloadItem struct {
  2604  	// ParentName - Name for instance or AG
  2605  	ParentName *string `json:"parentName,omitempty"`
  2606  	// ServerName - Host/Cluster Name for instance or AG
  2607  	ServerName *string `json:"serverName,omitempty"`
  2608  	// IsAutoProtectable - Indicates if workload item is auto-protectable
  2609  	IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
  2610  	// Subinquireditemcount - For instance or AG, indicates number of DB's present
  2611  	Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
  2612  	// SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected
  2613  	SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
  2614  	// BackupManagementType - Type of backup management to backup an item.
  2615  	BackupManagementType *string `json:"backupManagementType,omitempty"`
  2616  	// WorkloadType - Type of workload for the backup management
  2617  	WorkloadType *string `json:"workloadType,omitempty"`
  2618  	// FriendlyName - Friendly name of the backup item.
  2619  	FriendlyName *string `json:"friendlyName,omitempty"`
  2620  	// ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
  2621  	ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
  2622  	// WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1'
  2623  	WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
  2624  }
  2625  
  2626  // MarshalJSON is the custom marshaler for AzureVMWorkloadSAPHanaDatabaseWorkloadItem.
  2627  func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) MarshalJSON() ([]byte, error) {
  2628  	avwshdwi.WorkloadItemType = WorkloadItemTypeSAPHanaDatabase1
  2629  	objectMap := make(map[string]interface{})
  2630  	if avwshdwi.ParentName != nil {
  2631  		objectMap["parentName"] = avwshdwi.ParentName
  2632  	}
  2633  	if avwshdwi.ServerName != nil {
  2634  		objectMap["serverName"] = avwshdwi.ServerName
  2635  	}
  2636  	if avwshdwi.IsAutoProtectable != nil {
  2637  		objectMap["isAutoProtectable"] = avwshdwi.IsAutoProtectable
  2638  	}
  2639  	if avwshdwi.Subinquireditemcount != nil {
  2640  		objectMap["subinquireditemcount"] = avwshdwi.Subinquireditemcount
  2641  	}
  2642  	if avwshdwi.SubWorkloadItemCount != nil {
  2643  		objectMap["subWorkloadItemCount"] = avwshdwi.SubWorkloadItemCount
  2644  	}
  2645  	if avwshdwi.BackupManagementType != nil {
  2646  		objectMap["backupManagementType"] = avwshdwi.BackupManagementType
  2647  	}
  2648  	if avwshdwi.WorkloadType != nil {
  2649  		objectMap["workloadType"] = avwshdwi.WorkloadType
  2650  	}
  2651  	if avwshdwi.FriendlyName != nil {
  2652  		objectMap["friendlyName"] = avwshdwi.FriendlyName
  2653  	}
  2654  	if avwshdwi.ProtectionState != "" {
  2655  		objectMap["protectionState"] = avwshdwi.ProtectionState
  2656  	}
  2657  	if avwshdwi.WorkloadItemType != "" {
  2658  		objectMap["workloadItemType"] = avwshdwi.WorkloadItemType
  2659  	}
  2660  	return json.Marshal(objectMap)
  2661  }
  2662  
  2663  // AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem.
  2664  func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
  2665  	return nil, false
  2666  }
  2667  
  2668  // AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem.
  2669  func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
  2670  	return &avwshdwi, true
  2671  }
  2672  
  2673  // AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem.
  2674  func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
  2675  	return nil, false
  2676  }
  2677  
  2678  // AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem.
  2679  func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
  2680  	return nil, false
  2681  }
  2682  
  2683  // AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem.
  2684  func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
  2685  	return &avwshdwi, true
  2686  }
  2687  
  2688  // AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem.
  2689  func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
  2690  	return nil, false
  2691  }
  2692  
  2693  // AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem.
  2694  func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
  2695  	return nil, false
  2696  }
  2697  
  2698  // AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem.
  2699  func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
  2700  	return nil, false
  2701  }
  2702  
  2703  // AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem.
  2704  func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
  2705  	return nil, false
  2706  }
  2707  
  2708  // AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem.
  2709  func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
  2710  	return &avwshdwi, true
  2711  }
  2712  
  2713  // AzureVMWorkloadSAPHanaSystemProtectableItem azure VM workload-specific protectable item representing SAP
  2714  // HANA System.
  2715  type AzureVMWorkloadSAPHanaSystemProtectableItem struct {
  2716  	// ParentName - Name for instance or AG
  2717  	ParentName *string `json:"parentName,omitempty"`
  2718  	// ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent
  2719  	// Only Applicable for data bases where the parent would be either Instance or a SQL AG.
  2720  	ParentUniqueName *string `json:"parentUniqueName,omitempty"`
  2721  	// ServerName - Host/Cluster Name for instance or AG
  2722  	ServerName *string `json:"serverName,omitempty"`
  2723  	// IsAutoProtectable - Indicates if protectable item is auto-protectable
  2724  	IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
  2725  	// IsAutoProtected - Indicates if protectable item is auto-protected
  2726  	IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
  2727  	// Subinquireditemcount - For instance or AG, indicates number of DB's present
  2728  	Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
  2729  	// Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected
  2730  	Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
  2731  	// Prebackupvalidation - Pre-backup validation for protectable objects
  2732  	Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
  2733  	// BackupManagementType - Type of backup management to backup an item.
  2734  	BackupManagementType *string `json:"backupManagementType,omitempty"`
  2735  	// WorkloadType - Type of workload for the backup management
  2736  	WorkloadType *string `json:"workloadType,omitempty"`
  2737  	// FriendlyName - Friendly name of the backup item.
  2738  	FriendlyName *string `json:"friendlyName,omitempty"`
  2739  	// ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
  2740  	ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
  2741  	// ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem'
  2742  	ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
  2743  }
  2744  
  2745  // MarshalJSON is the custom marshaler for AzureVMWorkloadSAPHanaSystemProtectableItem.
  2746  func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) MarshalJSON() ([]byte, error) {
  2747  	avwshspi.ProtectableItemType = ProtectableItemTypeSAPHanaSystem
  2748  	objectMap := make(map[string]interface{})
  2749  	if avwshspi.ParentName != nil {
  2750  		objectMap["parentName"] = avwshspi.ParentName
  2751  	}
  2752  	if avwshspi.ParentUniqueName != nil {
  2753  		objectMap["parentUniqueName"] = avwshspi.ParentUniqueName
  2754  	}
  2755  	if avwshspi.ServerName != nil {
  2756  		objectMap["serverName"] = avwshspi.ServerName
  2757  	}
  2758  	if avwshspi.IsAutoProtectable != nil {
  2759  		objectMap["isAutoProtectable"] = avwshspi.IsAutoProtectable
  2760  	}
  2761  	if avwshspi.IsAutoProtected != nil {
  2762  		objectMap["isAutoProtected"] = avwshspi.IsAutoProtected
  2763  	}
  2764  	if avwshspi.Subinquireditemcount != nil {
  2765  		objectMap["subinquireditemcount"] = avwshspi.Subinquireditemcount
  2766  	}
  2767  	if avwshspi.Subprotectableitemcount != nil {
  2768  		objectMap["subprotectableitemcount"] = avwshspi.Subprotectableitemcount
  2769  	}
  2770  	if avwshspi.Prebackupvalidation != nil {
  2771  		objectMap["prebackupvalidation"] = avwshspi.Prebackupvalidation
  2772  	}
  2773  	if avwshspi.BackupManagementType != nil {
  2774  		objectMap["backupManagementType"] = avwshspi.BackupManagementType
  2775  	}
  2776  	if avwshspi.WorkloadType != nil {
  2777  		objectMap["workloadType"] = avwshspi.WorkloadType
  2778  	}
  2779  	if avwshspi.FriendlyName != nil {
  2780  		objectMap["friendlyName"] = avwshspi.FriendlyName
  2781  	}
  2782  	if avwshspi.ProtectionState != "" {
  2783  		objectMap["protectionState"] = avwshspi.ProtectionState
  2784  	}
  2785  	if avwshspi.ProtectableItemType != "" {
  2786  		objectMap["protectableItemType"] = avwshspi.ProtectableItemType
  2787  	}
  2788  	return json.Marshal(objectMap)
  2789  }
  2790  
  2791  // AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem.
  2792  func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
  2793  	return nil, false
  2794  }
  2795  
  2796  // AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem.
  2797  func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
  2798  	return nil, false
  2799  }
  2800  
  2801  // AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem.
  2802  func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
  2803  	return nil, false
  2804  }
  2805  
  2806  // AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem.
  2807  func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
  2808  	return nil, false
  2809  }
  2810  
  2811  // AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem.
  2812  func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
  2813  	return &avwshspi, true
  2814  }
  2815  
  2816  // AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem.
  2817  func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
  2818  	return nil, false
  2819  }
  2820  
  2821  // AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem.
  2822  func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
  2823  	return nil, false
  2824  }
  2825  
  2826  // AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem.
  2827  func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
  2828  	return &avwshspi, true
  2829  }
  2830  
  2831  // AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem.
  2832  func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
  2833  	return nil, false
  2834  }
  2835  
  2836  // AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem.
  2837  func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
  2838  	return nil, false
  2839  }
  2840  
  2841  // AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem.
  2842  func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
  2843  	return nil, false
  2844  }
  2845  
  2846  // AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem.
  2847  func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
  2848  	return nil, false
  2849  }
  2850  
  2851  // AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem.
  2852  func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
  2853  	return nil, false
  2854  }
  2855  
  2856  // AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem.
  2857  func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
  2858  	return nil, false
  2859  }
  2860  
  2861  // AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem.
  2862  func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
  2863  	return &avwshspi, true
  2864  }
  2865  
  2866  // AzureVMWorkloadSAPHanaSystemWorkloadItem azure VM workload-specific workload item representing SAP HANA
  2867  // System.
  2868  type AzureVMWorkloadSAPHanaSystemWorkloadItem struct {
  2869  	// ParentName - Name for instance or AG
  2870  	ParentName *string `json:"parentName,omitempty"`
  2871  	// ServerName - Host/Cluster Name for instance or AG
  2872  	ServerName *string `json:"serverName,omitempty"`
  2873  	// IsAutoProtectable - Indicates if workload item is auto-protectable
  2874  	IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
  2875  	// Subinquireditemcount - For instance or AG, indicates number of DB's present
  2876  	Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
  2877  	// SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected
  2878  	SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
  2879  	// BackupManagementType - Type of backup management to backup an item.
  2880  	BackupManagementType *string `json:"backupManagementType,omitempty"`
  2881  	// WorkloadType - Type of workload for the backup management
  2882  	WorkloadType *string `json:"workloadType,omitempty"`
  2883  	// FriendlyName - Friendly name of the backup item.
  2884  	FriendlyName *string `json:"friendlyName,omitempty"`
  2885  	// ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
  2886  	ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
  2887  	// WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1'
  2888  	WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
  2889  }
  2890  
  2891  // MarshalJSON is the custom marshaler for AzureVMWorkloadSAPHanaSystemWorkloadItem.
  2892  func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) MarshalJSON() ([]byte, error) {
  2893  	avwshswi.WorkloadItemType = WorkloadItemTypeSAPHanaSystem1
  2894  	objectMap := make(map[string]interface{})
  2895  	if avwshswi.ParentName != nil {
  2896  		objectMap["parentName"] = avwshswi.ParentName
  2897  	}
  2898  	if avwshswi.ServerName != nil {
  2899  		objectMap["serverName"] = avwshswi.ServerName
  2900  	}
  2901  	if avwshswi.IsAutoProtectable != nil {
  2902  		objectMap["isAutoProtectable"] = avwshswi.IsAutoProtectable
  2903  	}
  2904  	if avwshswi.Subinquireditemcount != nil {
  2905  		objectMap["subinquireditemcount"] = avwshswi.Subinquireditemcount
  2906  	}
  2907  	if avwshswi.SubWorkloadItemCount != nil {
  2908  		objectMap["subWorkloadItemCount"] = avwshswi.SubWorkloadItemCount
  2909  	}
  2910  	if avwshswi.BackupManagementType != nil {
  2911  		objectMap["backupManagementType"] = avwshswi.BackupManagementType
  2912  	}
  2913  	if avwshswi.WorkloadType != nil {
  2914  		objectMap["workloadType"] = avwshswi.WorkloadType
  2915  	}
  2916  	if avwshswi.FriendlyName != nil {
  2917  		objectMap["friendlyName"] = avwshswi.FriendlyName
  2918  	}
  2919  	if avwshswi.ProtectionState != "" {
  2920  		objectMap["protectionState"] = avwshswi.ProtectionState
  2921  	}
  2922  	if avwshswi.WorkloadItemType != "" {
  2923  		objectMap["workloadItemType"] = avwshswi.WorkloadItemType
  2924  	}
  2925  	return json.Marshal(objectMap)
  2926  }
  2927  
  2928  // AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem.
  2929  func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
  2930  	return nil, false
  2931  }
  2932  
  2933  // AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem.
  2934  func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
  2935  	return &avwshswi, true
  2936  }
  2937  
  2938  // AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem.
  2939  func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
  2940  	return nil, false
  2941  }
  2942  
  2943  // AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem.
  2944  func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
  2945  	return nil, false
  2946  }
  2947  
  2948  // AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem.
  2949  func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
  2950  	return nil, false
  2951  }
  2952  
  2953  // AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem.
  2954  func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
  2955  	return &avwshswi, true
  2956  }
  2957  
  2958  // AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem.
  2959  func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
  2960  	return nil, false
  2961  }
  2962  
  2963  // AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem.
  2964  func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
  2965  	return nil, false
  2966  }
  2967  
  2968  // AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem.
  2969  func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
  2970  	return nil, false
  2971  }
  2972  
  2973  // AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem.
  2974  func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
  2975  	return &avwshswi, true
  2976  }
  2977  
  2978  // AzureVMWorkloadSQLAvailabilityGroupProtectableItem azure VM workload-specific protectable item
  2979  // representing SQL Availability Group.
  2980  type AzureVMWorkloadSQLAvailabilityGroupProtectableItem struct {
  2981  	// ParentName - Name for instance or AG
  2982  	ParentName *string `json:"parentName,omitempty"`
  2983  	// ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent
  2984  	// Only Applicable for data bases where the parent would be either Instance or a SQL AG.
  2985  	ParentUniqueName *string `json:"parentUniqueName,omitempty"`
  2986  	// ServerName - Host/Cluster Name for instance or AG
  2987  	ServerName *string `json:"serverName,omitempty"`
  2988  	// IsAutoProtectable - Indicates if protectable item is auto-protectable
  2989  	IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
  2990  	// IsAutoProtected - Indicates if protectable item is auto-protected
  2991  	IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
  2992  	// Subinquireditemcount - For instance or AG, indicates number of DB's present
  2993  	Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
  2994  	// Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected
  2995  	Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
  2996  	// Prebackupvalidation - Pre-backup validation for protectable objects
  2997  	Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
  2998  	// BackupManagementType - Type of backup management to backup an item.
  2999  	BackupManagementType *string `json:"backupManagementType,omitempty"`
  3000  	// WorkloadType - Type of workload for the backup management
  3001  	WorkloadType *string `json:"workloadType,omitempty"`
  3002  	// FriendlyName - Friendly name of the backup item.
  3003  	FriendlyName *string `json:"friendlyName,omitempty"`
  3004  	// ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
  3005  	ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
  3006  	// ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem'
  3007  	ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
  3008  }
  3009  
  3010  // MarshalJSON is the custom marshaler for AzureVMWorkloadSQLAvailabilityGroupProtectableItem.
  3011  func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) MarshalJSON() ([]byte, error) {
  3012  	avwsagpi.ProtectableItemType = ProtectableItemTypeSQLAvailabilityGroupContainer
  3013  	objectMap := make(map[string]interface{})
  3014  	if avwsagpi.ParentName != nil {
  3015  		objectMap["parentName"] = avwsagpi.ParentName
  3016  	}
  3017  	if avwsagpi.ParentUniqueName != nil {
  3018  		objectMap["parentUniqueName"] = avwsagpi.ParentUniqueName
  3019  	}
  3020  	if avwsagpi.ServerName != nil {
  3021  		objectMap["serverName"] = avwsagpi.ServerName
  3022  	}
  3023  	if avwsagpi.IsAutoProtectable != nil {
  3024  		objectMap["isAutoProtectable"] = avwsagpi.IsAutoProtectable
  3025  	}
  3026  	if avwsagpi.IsAutoProtected != nil {
  3027  		objectMap["isAutoProtected"] = avwsagpi.IsAutoProtected
  3028  	}
  3029  	if avwsagpi.Subinquireditemcount != nil {
  3030  		objectMap["subinquireditemcount"] = avwsagpi.Subinquireditemcount
  3031  	}
  3032  	if avwsagpi.Subprotectableitemcount != nil {
  3033  		objectMap["subprotectableitemcount"] = avwsagpi.Subprotectableitemcount
  3034  	}
  3035  	if avwsagpi.Prebackupvalidation != nil {
  3036  		objectMap["prebackupvalidation"] = avwsagpi.Prebackupvalidation
  3037  	}
  3038  	if avwsagpi.BackupManagementType != nil {
  3039  		objectMap["backupManagementType"] = avwsagpi.BackupManagementType
  3040  	}
  3041  	if avwsagpi.WorkloadType != nil {
  3042  		objectMap["workloadType"] = avwsagpi.WorkloadType
  3043  	}
  3044  	if avwsagpi.FriendlyName != nil {
  3045  		objectMap["friendlyName"] = avwsagpi.FriendlyName
  3046  	}
  3047  	if avwsagpi.ProtectionState != "" {
  3048  		objectMap["protectionState"] = avwsagpi.ProtectionState
  3049  	}
  3050  	if avwsagpi.ProtectableItemType != "" {
  3051  		objectMap["protectableItemType"] = avwsagpi.ProtectableItemType
  3052  	}
  3053  	return json.Marshal(objectMap)
  3054  }
  3055  
  3056  // AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem.
  3057  func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
  3058  	return nil, false
  3059  }
  3060  
  3061  // AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem.
  3062  func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
  3063  	return nil, false
  3064  }
  3065  
  3066  // AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem.
  3067  func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
  3068  	return nil, false
  3069  }
  3070  
  3071  // AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem.
  3072  func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
  3073  	return nil, false
  3074  }
  3075  
  3076  // AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem.
  3077  func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
  3078  	return &avwsagpi, true
  3079  }
  3080  
  3081  // AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem.
  3082  func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
  3083  	return nil, false
  3084  }
  3085  
  3086  // AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem.
  3087  func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
  3088  	return nil, false
  3089  }
  3090  
  3091  // AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem.
  3092  func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
  3093  	return nil, false
  3094  }
  3095  
  3096  // AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem.
  3097  func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
  3098  	return &avwsagpi, true
  3099  }
  3100  
  3101  // AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem.
  3102  func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
  3103  	return nil, false
  3104  }
  3105  
  3106  // AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem.
  3107  func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
  3108  	return nil, false
  3109  }
  3110  
  3111  // AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem.
  3112  func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
  3113  	return nil, false
  3114  }
  3115  
  3116  // AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem.
  3117  func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
  3118  	return nil, false
  3119  }
  3120  
  3121  // AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem.
  3122  func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
  3123  	return nil, false
  3124  }
  3125  
  3126  // AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem.
  3127  func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
  3128  	return &avwsagpi, true
  3129  }
  3130  
  3131  // AzureVMWorkloadSQLDatabaseProtectableItem azure VM workload-specific protectable item representing SQL
  3132  // Database.
  3133  type AzureVMWorkloadSQLDatabaseProtectableItem struct {
  3134  	// ParentName - Name for instance or AG
  3135  	ParentName *string `json:"parentName,omitempty"`
  3136  	// ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent
  3137  	// Only Applicable for data bases where the parent would be either Instance or a SQL AG.
  3138  	ParentUniqueName *string `json:"parentUniqueName,omitempty"`
  3139  	// ServerName - Host/Cluster Name for instance or AG
  3140  	ServerName *string `json:"serverName,omitempty"`
  3141  	// IsAutoProtectable - Indicates if protectable item is auto-protectable
  3142  	IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
  3143  	// IsAutoProtected - Indicates if protectable item is auto-protected
  3144  	IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
  3145  	// Subinquireditemcount - For instance or AG, indicates number of DB's present
  3146  	Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
  3147  	// Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected
  3148  	Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
  3149  	// Prebackupvalidation - Pre-backup validation for protectable objects
  3150  	Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
  3151  	// BackupManagementType - Type of backup management to backup an item.
  3152  	BackupManagementType *string `json:"backupManagementType,omitempty"`
  3153  	// WorkloadType - Type of workload for the backup management
  3154  	WorkloadType *string `json:"workloadType,omitempty"`
  3155  	// FriendlyName - Friendly name of the backup item.
  3156  	FriendlyName *string `json:"friendlyName,omitempty"`
  3157  	// ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
  3158  	ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
  3159  	// ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem'
  3160  	ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
  3161  }
  3162  
  3163  // MarshalJSON is the custom marshaler for AzureVMWorkloadSQLDatabaseProtectableItem.
  3164  func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) MarshalJSON() ([]byte, error) {
  3165  	avwsdpi.ProtectableItemType = ProtectableItemTypeSQLDataBase
  3166  	objectMap := make(map[string]interface{})
  3167  	if avwsdpi.ParentName != nil {
  3168  		objectMap["parentName"] = avwsdpi.ParentName
  3169  	}
  3170  	if avwsdpi.ParentUniqueName != nil {
  3171  		objectMap["parentUniqueName"] = avwsdpi.ParentUniqueName
  3172  	}
  3173  	if avwsdpi.ServerName != nil {
  3174  		objectMap["serverName"] = avwsdpi.ServerName
  3175  	}
  3176  	if avwsdpi.IsAutoProtectable != nil {
  3177  		objectMap["isAutoProtectable"] = avwsdpi.IsAutoProtectable
  3178  	}
  3179  	if avwsdpi.IsAutoProtected != nil {
  3180  		objectMap["isAutoProtected"] = avwsdpi.IsAutoProtected
  3181  	}
  3182  	if avwsdpi.Subinquireditemcount != nil {
  3183  		objectMap["subinquireditemcount"] = avwsdpi.Subinquireditemcount
  3184  	}
  3185  	if avwsdpi.Subprotectableitemcount != nil {
  3186  		objectMap["subprotectableitemcount"] = avwsdpi.Subprotectableitemcount
  3187  	}
  3188  	if avwsdpi.Prebackupvalidation != nil {
  3189  		objectMap["prebackupvalidation"] = avwsdpi.Prebackupvalidation
  3190  	}
  3191  	if avwsdpi.BackupManagementType != nil {
  3192  		objectMap["backupManagementType"] = avwsdpi.BackupManagementType
  3193  	}
  3194  	if avwsdpi.WorkloadType != nil {
  3195  		objectMap["workloadType"] = avwsdpi.WorkloadType
  3196  	}
  3197  	if avwsdpi.FriendlyName != nil {
  3198  		objectMap["friendlyName"] = avwsdpi.FriendlyName
  3199  	}
  3200  	if avwsdpi.ProtectionState != "" {
  3201  		objectMap["protectionState"] = avwsdpi.ProtectionState
  3202  	}
  3203  	if avwsdpi.ProtectableItemType != "" {
  3204  		objectMap["protectableItemType"] = avwsdpi.ProtectableItemType
  3205  	}
  3206  	return json.Marshal(objectMap)
  3207  }
  3208  
  3209  // AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem.
  3210  func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
  3211  	return nil, false
  3212  }
  3213  
  3214  // AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem.
  3215  func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
  3216  	return nil, false
  3217  }
  3218  
  3219  // AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem.
  3220  func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
  3221  	return nil, false
  3222  }
  3223  
  3224  // AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem.
  3225  func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
  3226  	return nil, false
  3227  }
  3228  
  3229  // AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem.
  3230  func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
  3231  	return &avwsdpi, true
  3232  }
  3233  
  3234  // AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem.
  3235  func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
  3236  	return nil, false
  3237  }
  3238  
  3239  // AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem.
  3240  func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
  3241  	return nil, false
  3242  }
  3243  
  3244  // AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem.
  3245  func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
  3246  	return nil, false
  3247  }
  3248  
  3249  // AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem.
  3250  func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
  3251  	return nil, false
  3252  }
  3253  
  3254  // AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem.
  3255  func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
  3256  	return &avwsdpi, true
  3257  }
  3258  
  3259  // AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem.
  3260  func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
  3261  	return nil, false
  3262  }
  3263  
  3264  // AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem.
  3265  func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
  3266  	return nil, false
  3267  }
  3268  
  3269  // AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem.
  3270  func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
  3271  	return nil, false
  3272  }
  3273  
  3274  // AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem.
  3275  func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
  3276  	return nil, false
  3277  }
  3278  
  3279  // AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem.
  3280  func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
  3281  	return &avwsdpi, true
  3282  }
  3283  
  3284  // AzureVMWorkloadSQLDatabaseWorkloadItem azure VM workload-specific workload item representing SQL
  3285  // Database.
  3286  type AzureVMWorkloadSQLDatabaseWorkloadItem struct {
  3287  	// ParentName - Name for instance or AG
  3288  	ParentName *string `json:"parentName,omitempty"`
  3289  	// ServerName - Host/Cluster Name for instance or AG
  3290  	ServerName *string `json:"serverName,omitempty"`
  3291  	// IsAutoProtectable - Indicates if workload item is auto-protectable
  3292  	IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
  3293  	// Subinquireditemcount - For instance or AG, indicates number of DB's present
  3294  	Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
  3295  	// SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected
  3296  	SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
  3297  	// BackupManagementType - Type of backup management to backup an item.
  3298  	BackupManagementType *string `json:"backupManagementType,omitempty"`
  3299  	// WorkloadType - Type of workload for the backup management
  3300  	WorkloadType *string `json:"workloadType,omitempty"`
  3301  	// FriendlyName - Friendly name of the backup item.
  3302  	FriendlyName *string `json:"friendlyName,omitempty"`
  3303  	// ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
  3304  	ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
  3305  	// WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1'
  3306  	WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
  3307  }
  3308  
  3309  // MarshalJSON is the custom marshaler for AzureVMWorkloadSQLDatabaseWorkloadItem.
  3310  func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) MarshalJSON() ([]byte, error) {
  3311  	avwsdwi.WorkloadItemType = WorkloadItemTypeSQLDataBase1
  3312  	objectMap := make(map[string]interface{})
  3313  	if avwsdwi.ParentName != nil {
  3314  		objectMap["parentName"] = avwsdwi.ParentName
  3315  	}
  3316  	if avwsdwi.ServerName != nil {
  3317  		objectMap["serverName"] = avwsdwi.ServerName
  3318  	}
  3319  	if avwsdwi.IsAutoProtectable != nil {
  3320  		objectMap["isAutoProtectable"] = avwsdwi.IsAutoProtectable
  3321  	}
  3322  	if avwsdwi.Subinquireditemcount != nil {
  3323  		objectMap["subinquireditemcount"] = avwsdwi.Subinquireditemcount
  3324  	}
  3325  	if avwsdwi.SubWorkloadItemCount != nil {
  3326  		objectMap["subWorkloadItemCount"] = avwsdwi.SubWorkloadItemCount
  3327  	}
  3328  	if avwsdwi.BackupManagementType != nil {
  3329  		objectMap["backupManagementType"] = avwsdwi.BackupManagementType
  3330  	}
  3331  	if avwsdwi.WorkloadType != nil {
  3332  		objectMap["workloadType"] = avwsdwi.WorkloadType
  3333  	}
  3334  	if avwsdwi.FriendlyName != nil {
  3335  		objectMap["friendlyName"] = avwsdwi.FriendlyName
  3336  	}
  3337  	if avwsdwi.ProtectionState != "" {
  3338  		objectMap["protectionState"] = avwsdwi.ProtectionState
  3339  	}
  3340  	if avwsdwi.WorkloadItemType != "" {
  3341  		objectMap["workloadItemType"] = avwsdwi.WorkloadItemType
  3342  	}
  3343  	return json.Marshal(objectMap)
  3344  }
  3345  
  3346  // AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem.
  3347  func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
  3348  	return nil, false
  3349  }
  3350  
  3351  // AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem.
  3352  func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
  3353  	return &avwsdwi, true
  3354  }
  3355  
  3356  // AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem.
  3357  func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
  3358  	return nil, false
  3359  }
  3360  
  3361  // AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem.
  3362  func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
  3363  	return nil, false
  3364  }
  3365  
  3366  // AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem.
  3367  func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
  3368  	return nil, false
  3369  }
  3370  
  3371  // AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem.
  3372  func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
  3373  	return nil, false
  3374  }
  3375  
  3376  // AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem.
  3377  func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
  3378  	return &avwsdwi, true
  3379  }
  3380  
  3381  // AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem.
  3382  func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
  3383  	return nil, false
  3384  }
  3385  
  3386  // AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem.
  3387  func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
  3388  	return nil, false
  3389  }
  3390  
  3391  // AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem.
  3392  func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
  3393  	return &avwsdwi, true
  3394  }
  3395  
  3396  // AzureVMWorkloadSQLInstanceProtectableItem azure VM workload-specific protectable item representing SQL
  3397  // Instance.
  3398  type AzureVMWorkloadSQLInstanceProtectableItem struct {
  3399  	// ParentName - Name for instance or AG
  3400  	ParentName *string `json:"parentName,omitempty"`
  3401  	// ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent
  3402  	// Only Applicable for data bases where the parent would be either Instance or a SQL AG.
  3403  	ParentUniqueName *string `json:"parentUniqueName,omitempty"`
  3404  	// ServerName - Host/Cluster Name for instance or AG
  3405  	ServerName *string `json:"serverName,omitempty"`
  3406  	// IsAutoProtectable - Indicates if protectable item is auto-protectable
  3407  	IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
  3408  	// IsAutoProtected - Indicates if protectable item is auto-protected
  3409  	IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
  3410  	// Subinquireditemcount - For instance or AG, indicates number of DB's present
  3411  	Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
  3412  	// Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected
  3413  	Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
  3414  	// Prebackupvalidation - Pre-backup validation for protectable objects
  3415  	Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
  3416  	// BackupManagementType - Type of backup management to backup an item.
  3417  	BackupManagementType *string `json:"backupManagementType,omitempty"`
  3418  	// WorkloadType - Type of workload for the backup management
  3419  	WorkloadType *string `json:"workloadType,omitempty"`
  3420  	// FriendlyName - Friendly name of the backup item.
  3421  	FriendlyName *string `json:"friendlyName,omitempty"`
  3422  	// ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
  3423  	ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
  3424  	// ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem'
  3425  	ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
  3426  }
  3427  
  3428  // MarshalJSON is the custom marshaler for AzureVMWorkloadSQLInstanceProtectableItem.
  3429  func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) MarshalJSON() ([]byte, error) {
  3430  	avwsipi.ProtectableItemType = ProtectableItemTypeSQLInstance
  3431  	objectMap := make(map[string]interface{})
  3432  	if avwsipi.ParentName != nil {
  3433  		objectMap["parentName"] = avwsipi.ParentName
  3434  	}
  3435  	if avwsipi.ParentUniqueName != nil {
  3436  		objectMap["parentUniqueName"] = avwsipi.ParentUniqueName
  3437  	}
  3438  	if avwsipi.ServerName != nil {
  3439  		objectMap["serverName"] = avwsipi.ServerName
  3440  	}
  3441  	if avwsipi.IsAutoProtectable != nil {
  3442  		objectMap["isAutoProtectable"] = avwsipi.IsAutoProtectable
  3443  	}
  3444  	if avwsipi.IsAutoProtected != nil {
  3445  		objectMap["isAutoProtected"] = avwsipi.IsAutoProtected
  3446  	}
  3447  	if avwsipi.Subinquireditemcount != nil {
  3448  		objectMap["subinquireditemcount"] = avwsipi.Subinquireditemcount
  3449  	}
  3450  	if avwsipi.Subprotectableitemcount != nil {
  3451  		objectMap["subprotectableitemcount"] = avwsipi.Subprotectableitemcount
  3452  	}
  3453  	if avwsipi.Prebackupvalidation != nil {
  3454  		objectMap["prebackupvalidation"] = avwsipi.Prebackupvalidation
  3455  	}
  3456  	if avwsipi.BackupManagementType != nil {
  3457  		objectMap["backupManagementType"] = avwsipi.BackupManagementType
  3458  	}
  3459  	if avwsipi.WorkloadType != nil {
  3460  		objectMap["workloadType"] = avwsipi.WorkloadType
  3461  	}
  3462  	if avwsipi.FriendlyName != nil {
  3463  		objectMap["friendlyName"] = avwsipi.FriendlyName
  3464  	}
  3465  	if avwsipi.ProtectionState != "" {
  3466  		objectMap["protectionState"] = avwsipi.ProtectionState
  3467  	}
  3468  	if avwsipi.ProtectableItemType != "" {
  3469  		objectMap["protectableItemType"] = avwsipi.ProtectableItemType
  3470  	}
  3471  	return json.Marshal(objectMap)
  3472  }
  3473  
  3474  // AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem.
  3475  func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
  3476  	return nil, false
  3477  }
  3478  
  3479  // AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem.
  3480  func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
  3481  	return nil, false
  3482  }
  3483  
  3484  // AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem.
  3485  func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
  3486  	return nil, false
  3487  }
  3488  
  3489  // AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem.
  3490  func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
  3491  	return nil, false
  3492  }
  3493  
  3494  // AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem.
  3495  func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
  3496  	return &avwsipi, true
  3497  }
  3498  
  3499  // AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem.
  3500  func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
  3501  	return nil, false
  3502  }
  3503  
  3504  // AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem.
  3505  func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
  3506  	return nil, false
  3507  }
  3508  
  3509  // AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem.
  3510  func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
  3511  	return nil, false
  3512  }
  3513  
  3514  // AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem.
  3515  func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
  3516  	return nil, false
  3517  }
  3518  
  3519  // AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem.
  3520  func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
  3521  	return nil, false
  3522  }
  3523  
  3524  // AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem.
  3525  func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
  3526  	return &avwsipi, true
  3527  }
  3528  
  3529  // AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem.
  3530  func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
  3531  	return nil, false
  3532  }
  3533  
  3534  // AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem.
  3535  func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
  3536  	return nil, false
  3537  }
  3538  
  3539  // AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem.
  3540  func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
  3541  	return nil, false
  3542  }
  3543  
  3544  // AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem.
  3545  func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
  3546  	return &avwsipi, true
  3547  }
  3548  
  3549  // AzureVMWorkloadSQLInstanceWorkloadItem azure VM workload-specific workload item representing SQL
  3550  // Instance.
  3551  type AzureVMWorkloadSQLInstanceWorkloadItem struct {
  3552  	// DataDirectoryPaths - Data Directory Paths for default directories
  3553  	DataDirectoryPaths *[]SQLDataDirectory `json:"dataDirectoryPaths,omitempty"`
  3554  	// ParentName - Name for instance or AG
  3555  	ParentName *string `json:"parentName,omitempty"`
  3556  	// ServerName - Host/Cluster Name for instance or AG
  3557  	ServerName *string `json:"serverName,omitempty"`
  3558  	// IsAutoProtectable - Indicates if workload item is auto-protectable
  3559  	IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
  3560  	// Subinquireditemcount - For instance or AG, indicates number of DB's present
  3561  	Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
  3562  	// SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected
  3563  	SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
  3564  	// BackupManagementType - Type of backup management to backup an item.
  3565  	BackupManagementType *string `json:"backupManagementType,omitempty"`
  3566  	// WorkloadType - Type of workload for the backup management
  3567  	WorkloadType *string `json:"workloadType,omitempty"`
  3568  	// FriendlyName - Friendly name of the backup item.
  3569  	FriendlyName *string `json:"friendlyName,omitempty"`
  3570  	// ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
  3571  	ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
  3572  	// WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1'
  3573  	WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
  3574  }
  3575  
  3576  // MarshalJSON is the custom marshaler for AzureVMWorkloadSQLInstanceWorkloadItem.
  3577  func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) MarshalJSON() ([]byte, error) {
  3578  	avwsiwi.WorkloadItemType = WorkloadItemTypeSQLInstance1
  3579  	objectMap := make(map[string]interface{})
  3580  	if avwsiwi.DataDirectoryPaths != nil {
  3581  		objectMap["dataDirectoryPaths"] = avwsiwi.DataDirectoryPaths
  3582  	}
  3583  	if avwsiwi.ParentName != nil {
  3584  		objectMap["parentName"] = avwsiwi.ParentName
  3585  	}
  3586  	if avwsiwi.ServerName != nil {
  3587  		objectMap["serverName"] = avwsiwi.ServerName
  3588  	}
  3589  	if avwsiwi.IsAutoProtectable != nil {
  3590  		objectMap["isAutoProtectable"] = avwsiwi.IsAutoProtectable
  3591  	}
  3592  	if avwsiwi.Subinquireditemcount != nil {
  3593  		objectMap["subinquireditemcount"] = avwsiwi.Subinquireditemcount
  3594  	}
  3595  	if avwsiwi.SubWorkloadItemCount != nil {
  3596  		objectMap["subWorkloadItemCount"] = avwsiwi.SubWorkloadItemCount
  3597  	}
  3598  	if avwsiwi.BackupManagementType != nil {
  3599  		objectMap["backupManagementType"] = avwsiwi.BackupManagementType
  3600  	}
  3601  	if avwsiwi.WorkloadType != nil {
  3602  		objectMap["workloadType"] = avwsiwi.WorkloadType
  3603  	}
  3604  	if avwsiwi.FriendlyName != nil {
  3605  		objectMap["friendlyName"] = avwsiwi.FriendlyName
  3606  	}
  3607  	if avwsiwi.ProtectionState != "" {
  3608  		objectMap["protectionState"] = avwsiwi.ProtectionState
  3609  	}
  3610  	if avwsiwi.WorkloadItemType != "" {
  3611  		objectMap["workloadItemType"] = avwsiwi.WorkloadItemType
  3612  	}
  3613  	return json.Marshal(objectMap)
  3614  }
  3615  
  3616  // AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem.
  3617  func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
  3618  	return nil, false
  3619  }
  3620  
  3621  // AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem.
  3622  func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
  3623  	return &avwsiwi, true
  3624  }
  3625  
  3626  // AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem.
  3627  func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
  3628  	return nil, false
  3629  }
  3630  
  3631  // AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem.
  3632  func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
  3633  	return nil, false
  3634  }
  3635  
  3636  // AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem.
  3637  func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
  3638  	return nil, false
  3639  }
  3640  
  3641  // AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem.
  3642  func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
  3643  	return nil, false
  3644  }
  3645  
  3646  // AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem.
  3647  func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
  3648  	return nil, false
  3649  }
  3650  
  3651  // AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem.
  3652  func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
  3653  	return &avwsiwi, true
  3654  }
  3655  
  3656  // AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem.
  3657  func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
  3658  	return nil, false
  3659  }
  3660  
  3661  // AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem.
  3662  func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
  3663  	return &avwsiwi, true
  3664  }
  3665  
  3666  // AzureWorkloadBackupRequest azureWorkload workload-specific backup request.
  3667  type AzureWorkloadBackupRequest struct {
  3668  	// BackupType - Type of backup, viz. Full, Differential, Log or CopyOnlyFull. Possible values include: 'TypeInvalid', 'TypeFull', 'TypeDifferential', 'TypeLog', 'TypeCopyOnlyFull'
  3669  	BackupType Type `json:"backupType,omitempty"`
  3670  	// EnableCompression - Bool for Compression setting
  3671  	EnableCompression *bool `json:"enableCompression,omitempty"`
  3672  	// RecoveryPointExpiryTimeInUTC - Backup copy will expire after the time specified (UTC).
  3673  	RecoveryPointExpiryTimeInUTC *date.Time `json:"recoveryPointExpiryTimeInUTC,omitempty"`
  3674  	// ObjectType - Possible values include: 'ObjectTypeBackupRequest', 'ObjectTypeAzureFileShareBackupRequest', 'ObjectTypeAzureWorkloadBackupRequest', 'ObjectTypeIaasVMBackupRequest'
  3675  	ObjectType ObjectType `json:"objectType,omitempty"`
  3676  }
  3677  
  3678  // MarshalJSON is the custom marshaler for AzureWorkloadBackupRequest.
  3679  func (awbr AzureWorkloadBackupRequest) MarshalJSON() ([]byte, error) {
  3680  	awbr.ObjectType = ObjectTypeAzureWorkloadBackupRequest
  3681  	objectMap := make(map[string]interface{})
  3682  	if awbr.BackupType != "" {
  3683  		objectMap["backupType"] = awbr.BackupType
  3684  	}
  3685  	if awbr.EnableCompression != nil {
  3686  		objectMap["enableCompression"] = awbr.EnableCompression
  3687  	}
  3688  	if awbr.RecoveryPointExpiryTimeInUTC != nil {
  3689  		objectMap["recoveryPointExpiryTimeInUTC"] = awbr.RecoveryPointExpiryTimeInUTC
  3690  	}
  3691  	if awbr.ObjectType != "" {
  3692  		objectMap["objectType"] = awbr.ObjectType
  3693  	}
  3694  	return json.Marshal(objectMap)
  3695  }
  3696  
  3697  // AsAzureFileShareBackupRequest is the BasicRequest implementation for AzureWorkloadBackupRequest.
  3698  func (awbr AzureWorkloadBackupRequest) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) {
  3699  	return nil, false
  3700  }
  3701  
  3702  // AsAzureWorkloadBackupRequest is the BasicRequest implementation for AzureWorkloadBackupRequest.
  3703  func (awbr AzureWorkloadBackupRequest) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) {
  3704  	return &awbr, true
  3705  }
  3706  
  3707  // AsIaasVMBackupRequest is the BasicRequest implementation for AzureWorkloadBackupRequest.
  3708  func (awbr AzureWorkloadBackupRequest) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) {
  3709  	return nil, false
  3710  }
  3711  
  3712  // AsRequest is the BasicRequest implementation for AzureWorkloadBackupRequest.
  3713  func (awbr AzureWorkloadBackupRequest) AsRequest() (*Request, bool) {
  3714  	return nil, false
  3715  }
  3716  
  3717  // AsBasicRequest is the BasicRequest implementation for AzureWorkloadBackupRequest.
  3718  func (awbr AzureWorkloadBackupRequest) AsBasicRequest() (BasicRequest, bool) {
  3719  	return &awbr, true
  3720  }
  3721  
  3722  // BasicAzureWorkloadContainer container for the workloads running inside Azure Compute or Classic Compute.
  3723  type BasicAzureWorkloadContainer interface {
  3724  	AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool)
  3725  	AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool)
  3726  	AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool)
  3727  }
  3728  
  3729  // AzureWorkloadContainer container for the workloads running inside Azure Compute or Classic Compute.
  3730  type AzureWorkloadContainer struct {
  3731  	// SourceResourceID - ARM ID of the virtual machine represented by this Azure Workload Container
  3732  	SourceResourceID *string `json:"sourceResourceId,omitempty"`
  3733  	// LastUpdatedTime - Time stamp when this container was updated.
  3734  	LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"`
  3735  	// ExtendedInfo - Additional details of a workload container.
  3736  	ExtendedInfo *AzureWorkloadContainerExtendedInfo `json:"extendedInfo,omitempty"`
  3737  	// 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'
  3738  	WorkloadType WorkloadType `json:"workloadType,omitempty"`
  3739  	// OperationType - Re-Do Operation. Possible values include: 'OperationTypeInvalid', 'OperationTypeRegister', 'OperationTypeReregister'
  3740  	OperationType OperationType `json:"operationType,omitempty"`
  3741  	// FriendlyName - Friendly name of the container.
  3742  	FriendlyName *string `json:"friendlyName,omitempty"`
  3743  	// BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
  3744  	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
  3745  	// RegistrationStatus - Status of registration of the container with the Recovery Services Vault.
  3746  	RegistrationStatus *string `json:"registrationStatus,omitempty"`
  3747  	// HealthStatus - Status of health of the container.
  3748  	HealthStatus *string `json:"healthStatus,omitempty"`
  3749  	// ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1'
  3750  	ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
  3751  }
  3752  
  3753  func unmarshalBasicAzureWorkloadContainer(body []byte) (BasicAzureWorkloadContainer, error) {
  3754  	var m map[string]interface{}
  3755  	err := json.Unmarshal(body, &m)
  3756  	if err != nil {
  3757  		return nil, err
  3758  	}
  3759  
  3760  	switch m["containerType"] {
  3761  	case string(ContainerTypeSQLAGWorkLoadContainer1):
  3762  		var aswcpc AzureSQLAGWorkloadContainerProtectionContainer
  3763  		err := json.Unmarshal(body, &aswcpc)
  3764  		return aswcpc, err
  3765  	case string(ContainerTypeVMAppContainer1):
  3766  		var avacpc AzureVMAppContainerProtectionContainer
  3767  		err := json.Unmarshal(body, &avacpc)
  3768  		return avacpc, err
  3769  	default:
  3770  		var awc AzureWorkloadContainer
  3771  		err := json.Unmarshal(body, &awc)
  3772  		return awc, err
  3773  	}
  3774  }
  3775  func unmarshalBasicAzureWorkloadContainerArray(body []byte) ([]BasicAzureWorkloadContainer, error) {
  3776  	var rawMessages []*json.RawMessage
  3777  	err := json.Unmarshal(body, &rawMessages)
  3778  	if err != nil {
  3779  		return nil, err
  3780  	}
  3781  
  3782  	awcArray := make([]BasicAzureWorkloadContainer, len(rawMessages))
  3783  
  3784  	for index, rawMessage := range rawMessages {
  3785  		awc, err := unmarshalBasicAzureWorkloadContainer(*rawMessage)
  3786  		if err != nil {
  3787  			return nil, err
  3788  		}
  3789  		awcArray[index] = awc
  3790  	}
  3791  	return awcArray, nil
  3792  }
  3793  
  3794  // MarshalJSON is the custom marshaler for AzureWorkloadContainer.
  3795  func (awc AzureWorkloadContainer) MarshalJSON() ([]byte, error) {
  3796  	awc.ContainerType = ContainerTypeAzureWorkloadContainer
  3797  	objectMap := make(map[string]interface{})
  3798  	if awc.SourceResourceID != nil {
  3799  		objectMap["sourceResourceId"] = awc.SourceResourceID
  3800  	}
  3801  	if awc.LastUpdatedTime != nil {
  3802  		objectMap["lastUpdatedTime"] = awc.LastUpdatedTime
  3803  	}
  3804  	if awc.ExtendedInfo != nil {
  3805  		objectMap["extendedInfo"] = awc.ExtendedInfo
  3806  	}
  3807  	if awc.WorkloadType != "" {
  3808  		objectMap["workloadType"] = awc.WorkloadType
  3809  	}
  3810  	if awc.OperationType != "" {
  3811  		objectMap["operationType"] = awc.OperationType
  3812  	}
  3813  	if awc.FriendlyName != nil {
  3814  		objectMap["friendlyName"] = awc.FriendlyName
  3815  	}
  3816  	if awc.BackupManagementType != "" {
  3817  		objectMap["backupManagementType"] = awc.BackupManagementType
  3818  	}
  3819  	if awc.RegistrationStatus != nil {
  3820  		objectMap["registrationStatus"] = awc.RegistrationStatus
  3821  	}
  3822  	if awc.HealthStatus != nil {
  3823  		objectMap["healthStatus"] = awc.HealthStatus
  3824  	}
  3825  	if awc.ContainerType != "" {
  3826  		objectMap["containerType"] = awc.ContainerType
  3827  	}
  3828  	return json.Marshal(objectMap)
  3829  }
  3830  
  3831  // AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer.
  3832  func (awc AzureWorkloadContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
  3833  	return nil, false
  3834  }
  3835  
  3836  // AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer.
  3837  func (awc AzureWorkloadContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
  3838  	return nil, false
  3839  }
  3840  
  3841  // AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer.
  3842  func (awc AzureWorkloadContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
  3843  	return nil, false
  3844  }
  3845  
  3846  // AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer.
  3847  func (awc AzureWorkloadContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
  3848  	return nil, false
  3849  }
  3850  
  3851  // AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer.
  3852  func (awc AzureWorkloadContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
  3853  	return nil, false
  3854  }
  3855  
  3856  // AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer.
  3857  func (awc AzureWorkloadContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
  3858  	return nil, false
  3859  }
  3860  
  3861  // AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer.
  3862  func (awc AzureWorkloadContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
  3863  	return nil, false
  3864  }
  3865  
  3866  // AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer.
  3867  func (awc AzureWorkloadContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
  3868  	return &awc, true
  3869  }
  3870  
  3871  // AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer.
  3872  func (awc AzureWorkloadContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
  3873  	return &awc, true
  3874  }
  3875  
  3876  // AsDpmContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer.
  3877  func (awc AzureWorkloadContainer) AsDpmContainer() (*DpmContainer, bool) {
  3878  	return nil, false
  3879  }
  3880  
  3881  // AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer.
  3882  func (awc AzureWorkloadContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
  3883  	return nil, false
  3884  }
  3885  
  3886  // AsGenericContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer.
  3887  func (awc AzureWorkloadContainer) AsGenericContainer() (*GenericContainer, bool) {
  3888  	return nil, false
  3889  }
  3890  
  3891  // AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer.
  3892  func (awc AzureWorkloadContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
  3893  	return nil, false
  3894  }
  3895  
  3896  // AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer.
  3897  func (awc AzureWorkloadContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
  3898  	return nil, false
  3899  }
  3900  
  3901  // AsMabContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer.
  3902  func (awc AzureWorkloadContainer) AsMabContainer() (*MabContainer, bool) {
  3903  	return nil, false
  3904  }
  3905  
  3906  // AsProtectionContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer.
  3907  func (awc AzureWorkloadContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
  3908  	return nil, false
  3909  }
  3910  
  3911  // AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer.
  3912  func (awc AzureWorkloadContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
  3913  	return &awc, true
  3914  }
  3915  
  3916  // AzureWorkloadContainerExtendedInfo extended information of the container.
  3917  type AzureWorkloadContainerExtendedInfo struct {
  3918  	// HostServerName - Host Os Name in case of Stand Alone and Cluster Name in case of distributed container.
  3919  	HostServerName *string `json:"hostServerName,omitempty"`
  3920  	// InquiryInfo - Inquiry Status for the container.
  3921  	InquiryInfo *InquiryInfo `json:"inquiryInfo,omitempty"`
  3922  	// NodesList - List of the nodes in case of distributed container.
  3923  	NodesList *[]DistributedNodesInfo `json:"nodesList,omitempty"`
  3924  }
  3925  
  3926  // BMSBackupEngineQueryObject query parameters to fetch list of backup engines.
  3927  type BMSBackupEngineQueryObject struct {
  3928  	// Expand - attribute to add extended info
  3929  	Expand *string `json:"expand,omitempty"`
  3930  }
  3931  
  3932  // BMSBackupEnginesQueryObject query parameters to fetch list of backup engines.
  3933  type BMSBackupEnginesQueryObject struct {
  3934  	// BackupManagementType - Backup management type for the backup engine. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
  3935  	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
  3936  	// FriendlyName - Friendly name of the backup engine.
  3937  	FriendlyName *string `json:"friendlyName,omitempty"`
  3938  	// Expand - Attribute to add extended info.
  3939  	Expand *string `json:"expand,omitempty"`
  3940  }
  3941  
  3942  // BMSContainerQueryObject the query filters that can be used with the list containers API.
  3943  type BMSContainerQueryObject struct {
  3944  	// BackupManagementType - Backup management type for this container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
  3945  	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
  3946  	// ContainerType - Type of container for filter. Possible values include: 'ContainerTypeInvalid', 'ContainerTypeUnknown', 'ContainerTypeIaasVMContainer', 'ContainerTypeIaasVMServiceContainer', 'ContainerTypeDPMContainer', 'ContainerTypeAzureBackupServerContainer', 'ContainerTypeMABContainer', 'ContainerTypeCluster', 'ContainerTypeAzureSQLContainer', 'ContainerTypeWindows', 'ContainerTypeVCenter', 'ContainerTypeVMAppContainer', 'ContainerTypeSQLAGWorkLoadContainer', 'ContainerTypeStorageContainer', 'ContainerTypeGenericContainer'
  3947  	ContainerType ContainerType `json:"containerType,omitempty"`
  3948  	// BackupEngineName - Backup engine name
  3949  	BackupEngineName *string `json:"backupEngineName,omitempty"`
  3950  	// FabricName - Fabric name for filter
  3951  	FabricName *string `json:"fabricName,omitempty"`
  3952  	// Status - Status of registration of this container with the Recovery Services Vault.
  3953  	Status *string `json:"status,omitempty"`
  3954  	// FriendlyName - Friendly name of this container.
  3955  	FriendlyName *string `json:"friendlyName,omitempty"`
  3956  }
  3957  
  3958  // BMSContainersInquiryQueryObject the query filters that can be used with the inquire container API.
  3959  type BMSContainersInquiryQueryObject struct {
  3960  	// BackupManagementType - Backup management type for this container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
  3961  	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
  3962  	// WorkloadType - Workload type for this container. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase'
  3963  	WorkloadType WorkloadType `json:"workloadType,omitempty"`
  3964  }
  3965  
  3966  // BMSPOQueryObject filters to list items that can be backed up.
  3967  type BMSPOQueryObject struct {
  3968  	// BackupManagementType - Backup management type. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
  3969  	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
  3970  	// WorkloadType - Workload type. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase'
  3971  	WorkloadType WorkloadType `json:"workloadType,omitempty"`
  3972  	// ContainerName - Full name of the container whose Protectable Objects should be returned.
  3973  	ContainerName *string `json:"containerName,omitempty"`
  3974  	// Status - Backup status query parameter.
  3975  	Status *string `json:"status,omitempty"`
  3976  	// FriendlyName - Friendly name.
  3977  	FriendlyName *string `json:"friendlyName,omitempty"`
  3978  }
  3979  
  3980  // BMSRefreshContainersQueryObject the query filters that can be used with the refresh container API.
  3981  type BMSRefreshContainersQueryObject struct {
  3982  	// BackupManagementType - Backup management type for this container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
  3983  	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
  3984  }
  3985  
  3986  // BMSWorkloadItemQueryObject filters to list items that can be backed up.
  3987  type BMSWorkloadItemQueryObject struct {
  3988  	// BackupManagementType - Backup management type. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
  3989  	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
  3990  	// WorkloadItemType - Workload Item type. Possible values include: 'WorkloadItemTypeInvalid', 'WorkloadItemTypeSQLInstance', 'WorkloadItemTypeSQLDataBase', 'WorkloadItemTypeSAPHanaSystem', 'WorkloadItemTypeSAPHanaDatabase', 'WorkloadItemTypeSAPAseSystem', 'WorkloadItemTypeSAPAseDatabase'
  3991  	WorkloadItemType WorkloadItemType `json:"workloadItemType,omitempty"`
  3992  	// WorkloadType - Workload type. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase'
  3993  	WorkloadType WorkloadType `json:"workloadType,omitempty"`
  3994  	// ProtectionStatus - Backup status query parameter. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
  3995  	ProtectionStatus ProtectionStatus `json:"protectionStatus,omitempty"`
  3996  }
  3997  
  3998  // ClientScriptForConnect client script details for file / folder restore.
  3999  type ClientScriptForConnect struct {
  4000  	// ScriptContent - File content of the client script for file / folder restore.
  4001  	ScriptContent *string `json:"scriptContent,omitempty"`
  4002  	// ScriptExtension - File extension of the client script for file / folder restore - .ps1 , .sh , etc.
  4003  	ScriptExtension *string `json:"scriptExtension,omitempty"`
  4004  	// OsType - OS type - Windows, Linux etc. for which this file / folder restore client script works.
  4005  	OsType *string `json:"osType,omitempty"`
  4006  	// URL - URL of Executable from where to source the content. If this is not null then ScriptContent should not be used
  4007  	URL *string `json:"url,omitempty"`
  4008  	// ScriptNameSuffix - Mandatory suffix that should be added to the name of script that is given for download to user.
  4009  	// If its null or empty then , ignore it.
  4010  	ScriptNameSuffix *string `json:"scriptNameSuffix,omitempty"`
  4011  }
  4012  
  4013  // ContainerIdentityInfo container identity information
  4014  type ContainerIdentityInfo struct {
  4015  	// UniqueName - Unique name of the container
  4016  	UniqueName *string `json:"uniqueName,omitempty"`
  4017  	// AadTenantID - Protection container identity - AAD Tenant
  4018  	AadTenantID *string `json:"aadTenantId,omitempty"`
  4019  	// ServicePrincipalClientID - Protection container identity - AAD Service Principal
  4020  	ServicePrincipalClientID *string `json:"servicePrincipalClientId,omitempty"`
  4021  	// Audience - Protection container identity - Audience
  4022  	Audience *string `json:"audience,omitempty"`
  4023  }
  4024  
  4025  // DistributedNodesInfo this is used to represent the various nodes of the distributed container.
  4026  type DistributedNodesInfo struct {
  4027  	// NodeName - Name of the node under a distributed container.
  4028  	NodeName *string `json:"nodeName,omitempty"`
  4029  	// Status - Status of this Node.
  4030  	// Failed | Succeeded
  4031  	Status *string `json:"status,omitempty"`
  4032  	// ErrorDetail - Error Details if the Status is non-success.
  4033  	ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"`
  4034  }
  4035  
  4036  // DpmBackupEngine data Protection Manager (DPM) specific backup engine.
  4037  type DpmBackupEngine struct {
  4038  	// FriendlyName - Friendly name of the backup engine.
  4039  	FriendlyName *string `json:"friendlyName,omitempty"`
  4040  	// BackupManagementType - Type of backup management for the backup engine. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
  4041  	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
  4042  	// RegistrationStatus - Registration status of the backup engine with the Recovery Services Vault.
  4043  	RegistrationStatus *string `json:"registrationStatus,omitempty"`
  4044  	// BackupEngineState - Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed}
  4045  	BackupEngineState *string `json:"backupEngineState,omitempty"`
  4046  	// HealthStatus - Backup status of the backup engine.
  4047  	HealthStatus *string `json:"healthStatus,omitempty"`
  4048  	// CanReRegister - Flag indicating if the backup engine be registered, once already registered.
  4049  	CanReRegister *bool `json:"canReRegister,omitempty"`
  4050  	// BackupEngineID - ID of the backup engine.
  4051  	BackupEngineID *string `json:"backupEngineId,omitempty"`
  4052  	// DpmVersion - Backup engine version
  4053  	DpmVersion *string `json:"dpmVersion,omitempty"`
  4054  	// AzureBackupAgentVersion - Backup agent version
  4055  	AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"`
  4056  	// IsAzureBackupAgentUpgradeAvailable - To check if backup agent upgrade available
  4057  	IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"`
  4058  	// IsDpmUpgradeAvailable - To check if backup engine upgrade available
  4059  	IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"`
  4060  	// ExtendedInfo - Extended info of the backupengine
  4061  	ExtendedInfo *EngineExtendedInfo `json:"extendedInfo,omitempty"`
  4062  	// BackupEngineType - Possible values include: 'BackupEngineTypeBackupEngineBase', 'BackupEngineTypeAzureBackupServerEngine', 'BackupEngineTypeDpmBackupEngine'
  4063  	BackupEngineType EngineType `json:"backupEngineType,omitempty"`
  4064  }
  4065  
  4066  // MarshalJSON is the custom marshaler for DpmBackupEngine.
  4067  func (dbe DpmBackupEngine) MarshalJSON() ([]byte, error) {
  4068  	dbe.BackupEngineType = BackupEngineTypeDpmBackupEngine
  4069  	objectMap := make(map[string]interface{})
  4070  	if dbe.FriendlyName != nil {
  4071  		objectMap["friendlyName"] = dbe.FriendlyName
  4072  	}
  4073  	if dbe.BackupManagementType != "" {
  4074  		objectMap["backupManagementType"] = dbe.BackupManagementType
  4075  	}
  4076  	if dbe.RegistrationStatus != nil {
  4077  		objectMap["registrationStatus"] = dbe.RegistrationStatus
  4078  	}
  4079  	if dbe.BackupEngineState != nil {
  4080  		objectMap["backupEngineState"] = dbe.BackupEngineState
  4081  	}
  4082  	if dbe.HealthStatus != nil {
  4083  		objectMap["healthStatus"] = dbe.HealthStatus
  4084  	}
  4085  	if dbe.CanReRegister != nil {
  4086  		objectMap["canReRegister"] = dbe.CanReRegister
  4087  	}
  4088  	if dbe.BackupEngineID != nil {
  4089  		objectMap["backupEngineId"] = dbe.BackupEngineID
  4090  	}
  4091  	if dbe.DpmVersion != nil {
  4092  		objectMap["dpmVersion"] = dbe.DpmVersion
  4093  	}
  4094  	if dbe.AzureBackupAgentVersion != nil {
  4095  		objectMap["azureBackupAgentVersion"] = dbe.AzureBackupAgentVersion
  4096  	}
  4097  	if dbe.IsAzureBackupAgentUpgradeAvailable != nil {
  4098  		objectMap["isAzureBackupAgentUpgradeAvailable"] = dbe.IsAzureBackupAgentUpgradeAvailable
  4099  	}
  4100  	if dbe.IsDpmUpgradeAvailable != nil {
  4101  		objectMap["isDpmUpgradeAvailable"] = dbe.IsDpmUpgradeAvailable
  4102  	}
  4103  	if dbe.ExtendedInfo != nil {
  4104  		objectMap["extendedInfo"] = dbe.ExtendedInfo
  4105  	}
  4106  	if dbe.BackupEngineType != "" {
  4107  		objectMap["backupEngineType"] = dbe.BackupEngineType
  4108  	}
  4109  	return json.Marshal(objectMap)
  4110  }
  4111  
  4112  // AsAzureBackupServerEngine is the BasicEngineBase implementation for DpmBackupEngine.
  4113  func (dbe DpmBackupEngine) AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) {
  4114  	return nil, false
  4115  }
  4116  
  4117  // AsDpmBackupEngine is the BasicEngineBase implementation for DpmBackupEngine.
  4118  func (dbe DpmBackupEngine) AsDpmBackupEngine() (*DpmBackupEngine, bool) {
  4119  	return &dbe, true
  4120  }
  4121  
  4122  // AsEngineBase is the BasicEngineBase implementation for DpmBackupEngine.
  4123  func (dbe DpmBackupEngine) AsEngineBase() (*EngineBase, bool) {
  4124  	return nil, false
  4125  }
  4126  
  4127  // AsBasicEngineBase is the BasicEngineBase implementation for DpmBackupEngine.
  4128  func (dbe DpmBackupEngine) AsBasicEngineBase() (BasicEngineBase, bool) {
  4129  	return &dbe, true
  4130  }
  4131  
  4132  // BasicDpmContainer DPM workload-specific protection container.
  4133  type BasicDpmContainer interface {
  4134  	AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool)
  4135  	AsDpmContainer() (*DpmContainer, bool)
  4136  }
  4137  
  4138  // DpmContainer DPM workload-specific protection container.
  4139  type DpmContainer struct {
  4140  	// CanReRegister - Specifies whether the container is re-registrable.
  4141  	CanReRegister *bool `json:"canReRegister,omitempty"`
  4142  	// ContainerID - ID of container.
  4143  	ContainerID *string `json:"containerId,omitempty"`
  4144  	// ProtectedItemCount - Number of protected items in the BackupEngine
  4145  	ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"`
  4146  	// DpmAgentVersion - Backup engine Agent version
  4147  	DpmAgentVersion *string `json:"dpmAgentVersion,omitempty"`
  4148  	// DpmServers - List of BackupEngines protecting the container
  4149  	DpmServers *[]string `json:"dpmServers,omitempty"`
  4150  	// UpgradeAvailable - To check if upgrade available
  4151  	UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"`
  4152  	// ProtectionStatus - Protection status of the container.
  4153  	ProtectionStatus *string `json:"protectionStatus,omitempty"`
  4154  	// ExtendedInfo - Extended Info of the container.
  4155  	ExtendedInfo *DPMContainerExtendedInfo `json:"extendedInfo,omitempty"`
  4156  	// FriendlyName - Friendly name of the container.
  4157  	FriendlyName *string `json:"friendlyName,omitempty"`
  4158  	// BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
  4159  	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
  4160  	// RegistrationStatus - Status of registration of the container with the Recovery Services Vault.
  4161  	RegistrationStatus *string `json:"registrationStatus,omitempty"`
  4162  	// HealthStatus - Status of health of the container.
  4163  	HealthStatus *string `json:"healthStatus,omitempty"`
  4164  	// ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1'
  4165  	ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
  4166  }
  4167  
  4168  func unmarshalBasicDpmContainer(body []byte) (BasicDpmContainer, error) {
  4169  	var m map[string]interface{}
  4170  	err := json.Unmarshal(body, &m)
  4171  	if err != nil {
  4172  		return nil, err
  4173  	}
  4174  
  4175  	switch m["containerType"] {
  4176  	case string(ContainerTypeAzureBackupServerContainer1):
  4177  		var absc AzureBackupServerContainer
  4178  		err := json.Unmarshal(body, &absc)
  4179  		return absc, err
  4180  	default:
  4181  		var dc DpmContainer
  4182  		err := json.Unmarshal(body, &dc)
  4183  		return dc, err
  4184  	}
  4185  }
  4186  func unmarshalBasicDpmContainerArray(body []byte) ([]BasicDpmContainer, error) {
  4187  	var rawMessages []*json.RawMessage
  4188  	err := json.Unmarshal(body, &rawMessages)
  4189  	if err != nil {
  4190  		return nil, err
  4191  	}
  4192  
  4193  	dcArray := make([]BasicDpmContainer, len(rawMessages))
  4194  
  4195  	for index, rawMessage := range rawMessages {
  4196  		dc, err := unmarshalBasicDpmContainer(*rawMessage)
  4197  		if err != nil {
  4198  			return nil, err
  4199  		}
  4200  		dcArray[index] = dc
  4201  	}
  4202  	return dcArray, nil
  4203  }
  4204  
  4205  // MarshalJSON is the custom marshaler for DpmContainer.
  4206  func (dc DpmContainer) MarshalJSON() ([]byte, error) {
  4207  	dc.ContainerType = ContainerTypeDPMContainer1
  4208  	objectMap := make(map[string]interface{})
  4209  	if dc.CanReRegister != nil {
  4210  		objectMap["canReRegister"] = dc.CanReRegister
  4211  	}
  4212  	if dc.ContainerID != nil {
  4213  		objectMap["containerId"] = dc.ContainerID
  4214  	}
  4215  	if dc.ProtectedItemCount != nil {
  4216  		objectMap["protectedItemCount"] = dc.ProtectedItemCount
  4217  	}
  4218  	if dc.DpmAgentVersion != nil {
  4219  		objectMap["dpmAgentVersion"] = dc.DpmAgentVersion
  4220  	}
  4221  	if dc.DpmServers != nil {
  4222  		objectMap["dpmServers"] = dc.DpmServers
  4223  	}
  4224  	if dc.UpgradeAvailable != nil {
  4225  		objectMap["upgradeAvailable"] = dc.UpgradeAvailable
  4226  	}
  4227  	if dc.ProtectionStatus != nil {
  4228  		objectMap["protectionStatus"] = dc.ProtectionStatus
  4229  	}
  4230  	if dc.ExtendedInfo != nil {
  4231  		objectMap["extendedInfo"] = dc.ExtendedInfo
  4232  	}
  4233  	if dc.FriendlyName != nil {
  4234  		objectMap["friendlyName"] = dc.FriendlyName
  4235  	}
  4236  	if dc.BackupManagementType != "" {
  4237  		objectMap["backupManagementType"] = dc.BackupManagementType
  4238  	}
  4239  	if dc.RegistrationStatus != nil {
  4240  		objectMap["registrationStatus"] = dc.RegistrationStatus
  4241  	}
  4242  	if dc.HealthStatus != nil {
  4243  		objectMap["healthStatus"] = dc.HealthStatus
  4244  	}
  4245  	if dc.ContainerType != "" {
  4246  		objectMap["containerType"] = dc.ContainerType
  4247  	}
  4248  	return json.Marshal(objectMap)
  4249  }
  4250  
  4251  // AsAzureBackupServerContainer is the BasicProtectionContainer implementation for DpmContainer.
  4252  func (dc DpmContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
  4253  	return nil, false
  4254  }
  4255  
  4256  // AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for DpmContainer.
  4257  func (dc DpmContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
  4258  	return nil, false
  4259  }
  4260  
  4261  // AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for DpmContainer.
  4262  func (dc DpmContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
  4263  	return nil, false
  4264  }
  4265  
  4266  // AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for DpmContainer.
  4267  func (dc DpmContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
  4268  	return nil, false
  4269  }
  4270  
  4271  // AsAzureSQLContainer is the BasicProtectionContainer implementation for DpmContainer.
  4272  func (dc DpmContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
  4273  	return nil, false
  4274  }
  4275  
  4276  // AsAzureStorageContainer is the BasicProtectionContainer implementation for DpmContainer.
  4277  func (dc DpmContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
  4278  	return nil, false
  4279  }
  4280  
  4281  // AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for DpmContainer.
  4282  func (dc DpmContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
  4283  	return nil, false
  4284  }
  4285  
  4286  // AsAzureWorkloadContainer is the BasicProtectionContainer implementation for DpmContainer.
  4287  func (dc DpmContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
  4288  	return nil, false
  4289  }
  4290  
  4291  // AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for DpmContainer.
  4292  func (dc DpmContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
  4293  	return nil, false
  4294  }
  4295  
  4296  // AsDpmContainer is the BasicProtectionContainer implementation for DpmContainer.
  4297  func (dc DpmContainer) AsDpmContainer() (*DpmContainer, bool) {
  4298  	return &dc, true
  4299  }
  4300  
  4301  // AsBasicDpmContainer is the BasicProtectionContainer implementation for DpmContainer.
  4302  func (dc DpmContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
  4303  	return &dc, true
  4304  }
  4305  
  4306  // AsGenericContainer is the BasicProtectionContainer implementation for DpmContainer.
  4307  func (dc DpmContainer) AsGenericContainer() (*GenericContainer, bool) {
  4308  	return nil, false
  4309  }
  4310  
  4311  // AsIaaSVMContainer is the BasicProtectionContainer implementation for DpmContainer.
  4312  func (dc DpmContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
  4313  	return nil, false
  4314  }
  4315  
  4316  // AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for DpmContainer.
  4317  func (dc DpmContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
  4318  	return nil, false
  4319  }
  4320  
  4321  // AsMabContainer is the BasicProtectionContainer implementation for DpmContainer.
  4322  func (dc DpmContainer) AsMabContainer() (*MabContainer, bool) {
  4323  	return nil, false
  4324  }
  4325  
  4326  // AsProtectionContainer is the BasicProtectionContainer implementation for DpmContainer.
  4327  func (dc DpmContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
  4328  	return nil, false
  4329  }
  4330  
  4331  // AsBasicProtectionContainer is the BasicProtectionContainer implementation for DpmContainer.
  4332  func (dc DpmContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
  4333  	return &dc, true
  4334  }
  4335  
  4336  // DPMContainerExtendedInfo additional information of the DPMContainer.
  4337  type DPMContainerExtendedInfo struct {
  4338  	// LastRefreshedAt - Last refresh time of the DPMContainer.
  4339  	LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"`
  4340  }
  4341  
  4342  // BasicEngineBase the base backup engine class. All workload specific backup engines derive from this class.
  4343  type BasicEngineBase interface {
  4344  	AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool)
  4345  	AsDpmBackupEngine() (*DpmBackupEngine, bool)
  4346  	AsEngineBase() (*EngineBase, bool)
  4347  }
  4348  
  4349  // EngineBase the base backup engine class. All workload specific backup engines derive from this class.
  4350  type EngineBase struct {
  4351  	// FriendlyName - Friendly name of the backup engine.
  4352  	FriendlyName *string `json:"friendlyName,omitempty"`
  4353  	// BackupManagementType - Type of backup management for the backup engine. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
  4354  	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
  4355  	// RegistrationStatus - Registration status of the backup engine with the Recovery Services Vault.
  4356  	RegistrationStatus *string `json:"registrationStatus,omitempty"`
  4357  	// BackupEngineState - Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed}
  4358  	BackupEngineState *string `json:"backupEngineState,omitempty"`
  4359  	// HealthStatus - Backup status of the backup engine.
  4360  	HealthStatus *string `json:"healthStatus,omitempty"`
  4361  	// CanReRegister - Flag indicating if the backup engine be registered, once already registered.
  4362  	CanReRegister *bool `json:"canReRegister,omitempty"`
  4363  	// BackupEngineID - ID of the backup engine.
  4364  	BackupEngineID *string `json:"backupEngineId,omitempty"`
  4365  	// DpmVersion - Backup engine version
  4366  	DpmVersion *string `json:"dpmVersion,omitempty"`
  4367  	// AzureBackupAgentVersion - Backup agent version
  4368  	AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"`
  4369  	// IsAzureBackupAgentUpgradeAvailable - To check if backup agent upgrade available
  4370  	IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"`
  4371  	// IsDpmUpgradeAvailable - To check if backup engine upgrade available
  4372  	IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"`
  4373  	// ExtendedInfo - Extended info of the backupengine
  4374  	ExtendedInfo *EngineExtendedInfo `json:"extendedInfo,omitempty"`
  4375  	// BackupEngineType - Possible values include: 'BackupEngineTypeBackupEngineBase', 'BackupEngineTypeAzureBackupServerEngine', 'BackupEngineTypeDpmBackupEngine'
  4376  	BackupEngineType EngineType `json:"backupEngineType,omitempty"`
  4377  }
  4378  
  4379  func unmarshalBasicEngineBase(body []byte) (BasicEngineBase, error) {
  4380  	var m map[string]interface{}
  4381  	err := json.Unmarshal(body, &m)
  4382  	if err != nil {
  4383  		return nil, err
  4384  	}
  4385  
  4386  	switch m["backupEngineType"] {
  4387  	case string(BackupEngineTypeAzureBackupServerEngine):
  4388  		var abse AzureBackupServerEngine
  4389  		err := json.Unmarshal(body, &abse)
  4390  		return abse, err
  4391  	case string(BackupEngineTypeDpmBackupEngine):
  4392  		var dbe DpmBackupEngine
  4393  		err := json.Unmarshal(body, &dbe)
  4394  		return dbe, err
  4395  	default:
  4396  		var eb EngineBase
  4397  		err := json.Unmarshal(body, &eb)
  4398  		return eb, err
  4399  	}
  4400  }
  4401  func unmarshalBasicEngineBaseArray(body []byte) ([]BasicEngineBase, error) {
  4402  	var rawMessages []*json.RawMessage
  4403  	err := json.Unmarshal(body, &rawMessages)
  4404  	if err != nil {
  4405  		return nil, err
  4406  	}
  4407  
  4408  	ebArray := make([]BasicEngineBase, len(rawMessages))
  4409  
  4410  	for index, rawMessage := range rawMessages {
  4411  		eb, err := unmarshalBasicEngineBase(*rawMessage)
  4412  		if err != nil {
  4413  			return nil, err
  4414  		}
  4415  		ebArray[index] = eb
  4416  	}
  4417  	return ebArray, nil
  4418  }
  4419  
  4420  // MarshalJSON is the custom marshaler for EngineBase.
  4421  func (eb EngineBase) MarshalJSON() ([]byte, error) {
  4422  	eb.BackupEngineType = BackupEngineTypeBackupEngineBase
  4423  	objectMap := make(map[string]interface{})
  4424  	if eb.FriendlyName != nil {
  4425  		objectMap["friendlyName"] = eb.FriendlyName
  4426  	}
  4427  	if eb.BackupManagementType != "" {
  4428  		objectMap["backupManagementType"] = eb.BackupManagementType
  4429  	}
  4430  	if eb.RegistrationStatus != nil {
  4431  		objectMap["registrationStatus"] = eb.RegistrationStatus
  4432  	}
  4433  	if eb.BackupEngineState != nil {
  4434  		objectMap["backupEngineState"] = eb.BackupEngineState
  4435  	}
  4436  	if eb.HealthStatus != nil {
  4437  		objectMap["healthStatus"] = eb.HealthStatus
  4438  	}
  4439  	if eb.CanReRegister != nil {
  4440  		objectMap["canReRegister"] = eb.CanReRegister
  4441  	}
  4442  	if eb.BackupEngineID != nil {
  4443  		objectMap["backupEngineId"] = eb.BackupEngineID
  4444  	}
  4445  	if eb.DpmVersion != nil {
  4446  		objectMap["dpmVersion"] = eb.DpmVersion
  4447  	}
  4448  	if eb.AzureBackupAgentVersion != nil {
  4449  		objectMap["azureBackupAgentVersion"] = eb.AzureBackupAgentVersion
  4450  	}
  4451  	if eb.IsAzureBackupAgentUpgradeAvailable != nil {
  4452  		objectMap["isAzureBackupAgentUpgradeAvailable"] = eb.IsAzureBackupAgentUpgradeAvailable
  4453  	}
  4454  	if eb.IsDpmUpgradeAvailable != nil {
  4455  		objectMap["isDpmUpgradeAvailable"] = eb.IsDpmUpgradeAvailable
  4456  	}
  4457  	if eb.ExtendedInfo != nil {
  4458  		objectMap["extendedInfo"] = eb.ExtendedInfo
  4459  	}
  4460  	if eb.BackupEngineType != "" {
  4461  		objectMap["backupEngineType"] = eb.BackupEngineType
  4462  	}
  4463  	return json.Marshal(objectMap)
  4464  }
  4465  
  4466  // AsAzureBackupServerEngine is the BasicEngineBase implementation for EngineBase.
  4467  func (eb EngineBase) AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) {
  4468  	return nil, false
  4469  }
  4470  
  4471  // AsDpmBackupEngine is the BasicEngineBase implementation for EngineBase.
  4472  func (eb EngineBase) AsDpmBackupEngine() (*DpmBackupEngine, bool) {
  4473  	return nil, false
  4474  }
  4475  
  4476  // AsEngineBase is the BasicEngineBase implementation for EngineBase.
  4477  func (eb EngineBase) AsEngineBase() (*EngineBase, bool) {
  4478  	return &eb, true
  4479  }
  4480  
  4481  // AsBasicEngineBase is the BasicEngineBase implementation for EngineBase.
  4482  func (eb EngineBase) AsBasicEngineBase() (BasicEngineBase, bool) {
  4483  	return &eb, true
  4484  }
  4485  
  4486  // EngineBaseResource the base backup engine class. All workload specific backup engines derive from this
  4487  // class.
  4488  type EngineBaseResource struct {
  4489  	autorest.Response `json:"-"`
  4490  	// Properties - BackupEngineBaseResource properties
  4491  	Properties BasicEngineBase `json:"properties,omitempty"`
  4492  	// ID - READ-ONLY; Resource Id represents the complete path to the resource.
  4493  	ID *string `json:"id,omitempty"`
  4494  	// Name - READ-ONLY; Resource name associated with the resource.
  4495  	Name *string `json:"name,omitempty"`
  4496  	// Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/...
  4497  	Type *string `json:"type,omitempty"`
  4498  	// Location - Resource location.
  4499  	Location *string `json:"location,omitempty"`
  4500  	// Tags - Resource tags.
  4501  	Tags map[string]*string `json:"tags"`
  4502  	// ETag - Optional ETag.
  4503  	ETag *string `json:"eTag,omitempty"`
  4504  }
  4505  
  4506  // MarshalJSON is the custom marshaler for EngineBaseResource.
  4507  func (ebr EngineBaseResource) MarshalJSON() ([]byte, error) {
  4508  	objectMap := make(map[string]interface{})
  4509  	objectMap["properties"] = ebr.Properties
  4510  	if ebr.Location != nil {
  4511  		objectMap["location"] = ebr.Location
  4512  	}
  4513  	if ebr.Tags != nil {
  4514  		objectMap["tags"] = ebr.Tags
  4515  	}
  4516  	if ebr.ETag != nil {
  4517  		objectMap["eTag"] = ebr.ETag
  4518  	}
  4519  	return json.Marshal(objectMap)
  4520  }
  4521  
  4522  // UnmarshalJSON is the custom unmarshaler for EngineBaseResource struct.
  4523  func (ebr *EngineBaseResource) UnmarshalJSON(body []byte) error {
  4524  	var m map[string]*json.RawMessage
  4525  	err := json.Unmarshal(body, &m)
  4526  	if err != nil {
  4527  		return err
  4528  	}
  4529  	for k, v := range m {
  4530  		switch k {
  4531  		case "properties":
  4532  			if v != nil {
  4533  				properties, err := unmarshalBasicEngineBase(*v)
  4534  				if err != nil {
  4535  					return err
  4536  				}
  4537  				ebr.Properties = properties
  4538  			}
  4539  		case "id":
  4540  			if v != nil {
  4541  				var ID string
  4542  				err = json.Unmarshal(*v, &ID)
  4543  				if err != nil {
  4544  					return err
  4545  				}
  4546  				ebr.ID = &ID
  4547  			}
  4548  		case "name":
  4549  			if v != nil {
  4550  				var name string
  4551  				err = json.Unmarshal(*v, &name)
  4552  				if err != nil {
  4553  					return err
  4554  				}
  4555  				ebr.Name = &name
  4556  			}
  4557  		case "type":
  4558  			if v != nil {
  4559  				var typeVar string
  4560  				err = json.Unmarshal(*v, &typeVar)
  4561  				if err != nil {
  4562  					return err
  4563  				}
  4564  				ebr.Type = &typeVar
  4565  			}
  4566  		case "location":
  4567  			if v != nil {
  4568  				var location string
  4569  				err = json.Unmarshal(*v, &location)
  4570  				if err != nil {
  4571  					return err
  4572  				}
  4573  				ebr.Location = &location
  4574  			}
  4575  		case "tags":
  4576  			if v != nil {
  4577  				var tags map[string]*string
  4578  				err = json.Unmarshal(*v, &tags)
  4579  				if err != nil {
  4580  					return err
  4581  				}
  4582  				ebr.Tags = tags
  4583  			}
  4584  		case "eTag":
  4585  			if v != nil {
  4586  				var eTag string
  4587  				err = json.Unmarshal(*v, &eTag)
  4588  				if err != nil {
  4589  					return err
  4590  				}
  4591  				ebr.ETag = &eTag
  4592  			}
  4593  		}
  4594  	}
  4595  
  4596  	return nil
  4597  }
  4598  
  4599  // EngineBaseResourceList list of BackupEngineBase resources
  4600  type EngineBaseResourceList struct {
  4601  	autorest.Response `json:"-"`
  4602  	// Value - List of resources.
  4603  	Value *[]EngineBaseResource `json:"value,omitempty"`
  4604  	// NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources.
  4605  	NextLink *string `json:"nextLink,omitempty"`
  4606  }
  4607  
  4608  // EngineBaseResourceListIterator provides access to a complete listing of EngineBaseResource values.
  4609  type EngineBaseResourceListIterator struct {
  4610  	i    int
  4611  	page EngineBaseResourceListPage
  4612  }
  4613  
  4614  // NextWithContext advances to the next value.  If there was an error making
  4615  // the request the iterator does not advance and the error is returned.
  4616  func (iter *EngineBaseResourceListIterator) NextWithContext(ctx context.Context) (err error) {
  4617  	if tracing.IsEnabled() {
  4618  		ctx = tracing.StartSpan(ctx, fqdn+"/EngineBaseResourceListIterator.NextWithContext")
  4619  		defer func() {
  4620  			sc := -1
  4621  			if iter.Response().Response.Response != nil {
  4622  				sc = iter.Response().Response.Response.StatusCode
  4623  			}
  4624  			tracing.EndSpan(ctx, sc, err)
  4625  		}()
  4626  	}
  4627  	iter.i++
  4628  	if iter.i < len(iter.page.Values()) {
  4629  		return nil
  4630  	}
  4631  	err = iter.page.NextWithContext(ctx)
  4632  	if err != nil {
  4633  		iter.i--
  4634  		return err
  4635  	}
  4636  	iter.i = 0
  4637  	return nil
  4638  }
  4639  
  4640  // Next advances to the next value.  If there was an error making
  4641  // the request the iterator does not advance and the error is returned.
  4642  // Deprecated: Use NextWithContext() instead.
  4643  func (iter *EngineBaseResourceListIterator) Next() error {
  4644  	return iter.NextWithContext(context.Background())
  4645  }
  4646  
  4647  // NotDone returns true if the enumeration should be started or is not yet complete.
  4648  func (iter EngineBaseResourceListIterator) NotDone() bool {
  4649  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  4650  }
  4651  
  4652  // Response returns the raw server response from the last page request.
  4653  func (iter EngineBaseResourceListIterator) Response() EngineBaseResourceList {
  4654  	return iter.page.Response()
  4655  }
  4656  
  4657  // Value returns the current value or a zero-initialized value if the
  4658  // iterator has advanced beyond the end of the collection.
  4659  func (iter EngineBaseResourceListIterator) Value() EngineBaseResource {
  4660  	if !iter.page.NotDone() {
  4661  		return EngineBaseResource{}
  4662  	}
  4663  	return iter.page.Values()[iter.i]
  4664  }
  4665  
  4666  // Creates a new instance of the EngineBaseResourceListIterator type.
  4667  func NewEngineBaseResourceListIterator(page EngineBaseResourceListPage) EngineBaseResourceListIterator {
  4668  	return EngineBaseResourceListIterator{page: page}
  4669  }
  4670  
  4671  // IsEmpty returns true if the ListResult contains no values.
  4672  func (ebrl EngineBaseResourceList) IsEmpty() bool {
  4673  	return ebrl.Value == nil || len(*ebrl.Value) == 0
  4674  }
  4675  
  4676  // hasNextLink returns true if the NextLink is not empty.
  4677  func (ebrl EngineBaseResourceList) hasNextLink() bool {
  4678  	return ebrl.NextLink != nil && len(*ebrl.NextLink) != 0
  4679  }
  4680  
  4681  // engineBaseResourceListPreparer prepares a request to retrieve the next set of results.
  4682  // It returns nil if no more results exist.
  4683  func (ebrl EngineBaseResourceList) engineBaseResourceListPreparer(ctx context.Context) (*http.Request, error) {
  4684  	if !ebrl.hasNextLink() {
  4685  		return nil, nil
  4686  	}
  4687  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  4688  		autorest.AsJSON(),
  4689  		autorest.AsGet(),
  4690  		autorest.WithBaseURL(to.String(ebrl.NextLink)))
  4691  }
  4692  
  4693  // EngineBaseResourceListPage contains a page of EngineBaseResource values.
  4694  type EngineBaseResourceListPage struct {
  4695  	fn   func(context.Context, EngineBaseResourceList) (EngineBaseResourceList, error)
  4696  	ebrl EngineBaseResourceList
  4697  }
  4698  
  4699  // NextWithContext advances to the next page of values.  If there was an error making
  4700  // the request the page does not advance and the error is returned.
  4701  func (page *EngineBaseResourceListPage) NextWithContext(ctx context.Context) (err error) {
  4702  	if tracing.IsEnabled() {
  4703  		ctx = tracing.StartSpan(ctx, fqdn+"/EngineBaseResourceListPage.NextWithContext")
  4704  		defer func() {
  4705  			sc := -1
  4706  			if page.Response().Response.Response != nil {
  4707  				sc = page.Response().Response.Response.StatusCode
  4708  			}
  4709  			tracing.EndSpan(ctx, sc, err)
  4710  		}()
  4711  	}
  4712  	for {
  4713  		next, err := page.fn(ctx, page.ebrl)
  4714  		if err != nil {
  4715  			return err
  4716  		}
  4717  		page.ebrl = next
  4718  		if !next.hasNextLink() || !next.IsEmpty() {
  4719  			break
  4720  		}
  4721  	}
  4722  	return nil
  4723  }
  4724  
  4725  // Next advances to the next page of values.  If there was an error making
  4726  // the request the page does not advance and the error is returned.
  4727  // Deprecated: Use NextWithContext() instead.
  4728  func (page *EngineBaseResourceListPage) Next() error {
  4729  	return page.NextWithContext(context.Background())
  4730  }
  4731  
  4732  // NotDone returns true if the page enumeration should be started or is not yet complete.
  4733  func (page EngineBaseResourceListPage) NotDone() bool {
  4734  	return !page.ebrl.IsEmpty()
  4735  }
  4736  
  4737  // Response returns the raw server response from the last page request.
  4738  func (page EngineBaseResourceListPage) Response() EngineBaseResourceList {
  4739  	return page.ebrl
  4740  }
  4741  
  4742  // Values returns the slice of values for the current page or nil if there are no values.
  4743  func (page EngineBaseResourceListPage) Values() []EngineBaseResource {
  4744  	if page.ebrl.IsEmpty() {
  4745  		return nil
  4746  	}
  4747  	return *page.ebrl.Value
  4748  }
  4749  
  4750  // Creates a new instance of the EngineBaseResourceListPage type.
  4751  func NewEngineBaseResourceListPage(cur EngineBaseResourceList, getNextPage func(context.Context, EngineBaseResourceList) (EngineBaseResourceList, error)) EngineBaseResourceListPage {
  4752  	return EngineBaseResourceListPage{
  4753  		fn:   getNextPage,
  4754  		ebrl: cur,
  4755  	}
  4756  }
  4757  
  4758  // EngineExtendedInfo additional information on backup engine.
  4759  type EngineExtendedInfo struct {
  4760  	// DatabaseName - Database name of backup engine.
  4761  	DatabaseName *string `json:"databaseName,omitempty"`
  4762  	// ProtectedItemsCount - Number of protected items in the backup engine.
  4763  	ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
  4764  	// ProtectedServersCount - Number of protected servers in the backup engine.
  4765  	ProtectedServersCount *int32 `json:"protectedServersCount,omitempty"`
  4766  	// DiskCount - Number of disks in the backup engine.
  4767  	DiskCount *int32 `json:"diskCount,omitempty"`
  4768  	// UsedDiskSpace - Disk space used in the backup engine.
  4769  	UsedDiskSpace *float64 `json:"usedDiskSpace,omitempty"`
  4770  	// AvailableDiskSpace - Disk space currently available in the backup engine.
  4771  	AvailableDiskSpace *float64 `json:"availableDiskSpace,omitempty"`
  4772  	// RefreshedAt - Last refresh time in the backup engine.
  4773  	RefreshedAt *date.Time `json:"refreshedAt,omitempty"`
  4774  	// AzureProtectedInstances - Protected instances in the backup engine.
  4775  	AzureProtectedInstances *int32 `json:"azureProtectedInstances,omitempty"`
  4776  }
  4777  
  4778  // ErrorDetail error Detail class which encapsulates Code, Message and Recommendations.
  4779  type ErrorDetail struct {
  4780  	// Code - READ-ONLY; Error code.
  4781  	Code *string `json:"code,omitempty"`
  4782  	// Message - READ-ONLY; Error Message related to the Code.
  4783  	Message *string `json:"message,omitempty"`
  4784  	// Recommendations - READ-ONLY; List of recommendation strings.
  4785  	Recommendations *[]string `json:"recommendations,omitempty"`
  4786  }
  4787  
  4788  // MarshalJSON is the custom marshaler for ErrorDetail.
  4789  func (ed ErrorDetail) MarshalJSON() ([]byte, error) {
  4790  	objectMap := make(map[string]interface{})
  4791  	return json.Marshal(objectMap)
  4792  }
  4793  
  4794  // GenericContainer base class for generic container of backup items
  4795  type GenericContainer struct {
  4796  	// FabricName - Name of the container's fabric
  4797  	FabricName *string `json:"fabricName,omitempty"`
  4798  	// ExtendedInformation - Extended information (not returned in List container API calls)
  4799  	ExtendedInformation *GenericContainerExtendedInfo `json:"extendedInformation,omitempty"`
  4800  	// FriendlyName - Friendly name of the container.
  4801  	FriendlyName *string `json:"friendlyName,omitempty"`
  4802  	// BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
  4803  	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
  4804  	// RegistrationStatus - Status of registration of the container with the Recovery Services Vault.
  4805  	RegistrationStatus *string `json:"registrationStatus,omitempty"`
  4806  	// HealthStatus - Status of health of the container.
  4807  	HealthStatus *string `json:"healthStatus,omitempty"`
  4808  	// ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1'
  4809  	ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
  4810  }
  4811  
  4812  // MarshalJSON is the custom marshaler for GenericContainer.
  4813  func (gc GenericContainer) MarshalJSON() ([]byte, error) {
  4814  	gc.ContainerType = ContainerTypeGenericContainer1
  4815  	objectMap := make(map[string]interface{})
  4816  	if gc.FabricName != nil {
  4817  		objectMap["fabricName"] = gc.FabricName
  4818  	}
  4819  	if gc.ExtendedInformation != nil {
  4820  		objectMap["extendedInformation"] = gc.ExtendedInformation
  4821  	}
  4822  	if gc.FriendlyName != nil {
  4823  		objectMap["friendlyName"] = gc.FriendlyName
  4824  	}
  4825  	if gc.BackupManagementType != "" {
  4826  		objectMap["backupManagementType"] = gc.BackupManagementType
  4827  	}
  4828  	if gc.RegistrationStatus != nil {
  4829  		objectMap["registrationStatus"] = gc.RegistrationStatus
  4830  	}
  4831  	if gc.HealthStatus != nil {
  4832  		objectMap["healthStatus"] = gc.HealthStatus
  4833  	}
  4834  	if gc.ContainerType != "" {
  4835  		objectMap["containerType"] = gc.ContainerType
  4836  	}
  4837  	return json.Marshal(objectMap)
  4838  }
  4839  
  4840  // AsAzureBackupServerContainer is the BasicProtectionContainer implementation for GenericContainer.
  4841  func (gc GenericContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
  4842  	return nil, false
  4843  }
  4844  
  4845  // AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for GenericContainer.
  4846  func (gc GenericContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
  4847  	return nil, false
  4848  }
  4849  
  4850  // AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for GenericContainer.
  4851  func (gc GenericContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
  4852  	return nil, false
  4853  }
  4854  
  4855  // AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for GenericContainer.
  4856  func (gc GenericContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
  4857  	return nil, false
  4858  }
  4859  
  4860  // AsAzureSQLContainer is the BasicProtectionContainer implementation for GenericContainer.
  4861  func (gc GenericContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
  4862  	return nil, false
  4863  }
  4864  
  4865  // AsAzureStorageContainer is the BasicProtectionContainer implementation for GenericContainer.
  4866  func (gc GenericContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
  4867  	return nil, false
  4868  }
  4869  
  4870  // AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for GenericContainer.
  4871  func (gc GenericContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
  4872  	return nil, false
  4873  }
  4874  
  4875  // AsAzureWorkloadContainer is the BasicProtectionContainer implementation for GenericContainer.
  4876  func (gc GenericContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
  4877  	return nil, false
  4878  }
  4879  
  4880  // AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for GenericContainer.
  4881  func (gc GenericContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
  4882  	return nil, false
  4883  }
  4884  
  4885  // AsDpmContainer is the BasicProtectionContainer implementation for GenericContainer.
  4886  func (gc GenericContainer) AsDpmContainer() (*DpmContainer, bool) {
  4887  	return nil, false
  4888  }
  4889  
  4890  // AsBasicDpmContainer is the BasicProtectionContainer implementation for GenericContainer.
  4891  func (gc GenericContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
  4892  	return nil, false
  4893  }
  4894  
  4895  // AsGenericContainer is the BasicProtectionContainer implementation for GenericContainer.
  4896  func (gc GenericContainer) AsGenericContainer() (*GenericContainer, bool) {
  4897  	return &gc, true
  4898  }
  4899  
  4900  // AsIaaSVMContainer is the BasicProtectionContainer implementation for GenericContainer.
  4901  func (gc GenericContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
  4902  	return nil, false
  4903  }
  4904  
  4905  // AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for GenericContainer.
  4906  func (gc GenericContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
  4907  	return nil, false
  4908  }
  4909  
  4910  // AsMabContainer is the BasicProtectionContainer implementation for GenericContainer.
  4911  func (gc GenericContainer) AsMabContainer() (*MabContainer, bool) {
  4912  	return nil, false
  4913  }
  4914  
  4915  // AsProtectionContainer is the BasicProtectionContainer implementation for GenericContainer.
  4916  func (gc GenericContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
  4917  	return nil, false
  4918  }
  4919  
  4920  // AsBasicProtectionContainer is the BasicProtectionContainer implementation for GenericContainer.
  4921  func (gc GenericContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
  4922  	return &gc, true
  4923  }
  4924  
  4925  // GenericContainerExtendedInfo container extended information
  4926  type GenericContainerExtendedInfo struct {
  4927  	// RawCertData - Public key of container cert
  4928  	RawCertData *string `json:"rawCertData,omitempty"`
  4929  	// ContainerIdentityInfo - Container identity information
  4930  	ContainerIdentityInfo *ContainerIdentityInfo `json:"containerIdentityInfo,omitempty"`
  4931  	// ServiceEndpoints - Azure Backup Service Endpoints for the container
  4932  	ServiceEndpoints map[string]*string `json:"serviceEndpoints"`
  4933  }
  4934  
  4935  // MarshalJSON is the custom marshaler for GenericContainerExtendedInfo.
  4936  func (gcei GenericContainerExtendedInfo) MarshalJSON() ([]byte, error) {
  4937  	objectMap := make(map[string]interface{})
  4938  	if gcei.RawCertData != nil {
  4939  		objectMap["rawCertData"] = gcei.RawCertData
  4940  	}
  4941  	if gcei.ContainerIdentityInfo != nil {
  4942  		objectMap["containerIdentityInfo"] = gcei.ContainerIdentityInfo
  4943  	}
  4944  	if gcei.ServiceEndpoints != nil {
  4945  		objectMap["serviceEndpoints"] = gcei.ServiceEndpoints
  4946  	}
  4947  	return json.Marshal(objectMap)
  4948  }
  4949  
  4950  // IaasVMBackupRequest iaaS VM workload-specific backup request.
  4951  type IaasVMBackupRequest struct {
  4952  	// RecoveryPointExpiryTimeInUTC - Backup copy will expire after the time specified (UTC).
  4953  	RecoveryPointExpiryTimeInUTC *date.Time `json:"recoveryPointExpiryTimeInUTC,omitempty"`
  4954  	// ObjectType - Possible values include: 'ObjectTypeBackupRequest', 'ObjectTypeAzureFileShareBackupRequest', 'ObjectTypeAzureWorkloadBackupRequest', 'ObjectTypeIaasVMBackupRequest'
  4955  	ObjectType ObjectType `json:"objectType,omitempty"`
  4956  }
  4957  
  4958  // MarshalJSON is the custom marshaler for IaasVMBackupRequest.
  4959  func (ivbr IaasVMBackupRequest) MarshalJSON() ([]byte, error) {
  4960  	ivbr.ObjectType = ObjectTypeIaasVMBackupRequest
  4961  	objectMap := make(map[string]interface{})
  4962  	if ivbr.RecoveryPointExpiryTimeInUTC != nil {
  4963  		objectMap["recoveryPointExpiryTimeInUTC"] = ivbr.RecoveryPointExpiryTimeInUTC
  4964  	}
  4965  	if ivbr.ObjectType != "" {
  4966  		objectMap["objectType"] = ivbr.ObjectType
  4967  	}
  4968  	return json.Marshal(objectMap)
  4969  }
  4970  
  4971  // AsAzureFileShareBackupRequest is the BasicRequest implementation for IaasVMBackupRequest.
  4972  func (ivbr IaasVMBackupRequest) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) {
  4973  	return nil, false
  4974  }
  4975  
  4976  // AsAzureWorkloadBackupRequest is the BasicRequest implementation for IaasVMBackupRequest.
  4977  func (ivbr IaasVMBackupRequest) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) {
  4978  	return nil, false
  4979  }
  4980  
  4981  // AsIaasVMBackupRequest is the BasicRequest implementation for IaasVMBackupRequest.
  4982  func (ivbr IaasVMBackupRequest) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) {
  4983  	return &ivbr, true
  4984  }
  4985  
  4986  // AsRequest is the BasicRequest implementation for IaasVMBackupRequest.
  4987  func (ivbr IaasVMBackupRequest) AsRequest() (*Request, bool) {
  4988  	return nil, false
  4989  }
  4990  
  4991  // AsBasicRequest is the BasicRequest implementation for IaasVMBackupRequest.
  4992  func (ivbr IaasVMBackupRequest) AsBasicRequest() (BasicRequest, bool) {
  4993  	return &ivbr, true
  4994  }
  4995  
  4996  // BasicIaaSVMContainer iaaS VM workload-specific container.
  4997  type BasicIaaSVMContainer interface {
  4998  	AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool)
  4999  	AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool)
  5000  	AsIaaSVMContainer() (*IaaSVMContainer, bool)
  5001  }
  5002  
  5003  // IaaSVMContainer iaaS VM workload-specific container.
  5004  type IaaSVMContainer struct {
  5005  	// VirtualMachineID - Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container.
  5006  	VirtualMachineID *string `json:"virtualMachineId,omitempty"`
  5007  	// VirtualMachineVersion - Specifies whether the container represents a Classic or an Azure Resource Manager VM.
  5008  	VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"`
  5009  	// ResourceGroup - Resource group name of Recovery Services Vault.
  5010  	ResourceGroup *string `json:"resourceGroup,omitempty"`
  5011  	// FriendlyName - Friendly name of the container.
  5012  	FriendlyName *string `json:"friendlyName,omitempty"`
  5013  	// BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
  5014  	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
  5015  	// RegistrationStatus - Status of registration of the container with the Recovery Services Vault.
  5016  	RegistrationStatus *string `json:"registrationStatus,omitempty"`
  5017  	// HealthStatus - Status of health of the container.
  5018  	HealthStatus *string `json:"healthStatus,omitempty"`
  5019  	// ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1'
  5020  	ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
  5021  }
  5022  
  5023  func unmarshalBasicIaaSVMContainer(body []byte) (BasicIaaSVMContainer, error) {
  5024  	var m map[string]interface{}
  5025  	err := json.Unmarshal(body, &m)
  5026  	if err != nil {
  5027  		return nil, err
  5028  	}
  5029  
  5030  	switch m["containerType"] {
  5031  	case string(ContainerTypeMicrosoftClassicComputevirtualMachines):
  5032  		var aisccvc AzureIaaSClassicComputeVMContainer
  5033  		err := json.Unmarshal(body, &aisccvc)
  5034  		return aisccvc, err
  5035  	case string(ContainerTypeMicrosoftComputevirtualMachines):
  5036  		var aiscvc AzureIaaSComputeVMContainer
  5037  		err := json.Unmarshal(body, &aiscvc)
  5038  		return aiscvc, err
  5039  	default:
  5040  		var isc IaaSVMContainer
  5041  		err := json.Unmarshal(body, &isc)
  5042  		return isc, err
  5043  	}
  5044  }
  5045  func unmarshalBasicIaaSVMContainerArray(body []byte) ([]BasicIaaSVMContainer, error) {
  5046  	var rawMessages []*json.RawMessage
  5047  	err := json.Unmarshal(body, &rawMessages)
  5048  	if err != nil {
  5049  		return nil, err
  5050  	}
  5051  
  5052  	iscArray := make([]BasicIaaSVMContainer, len(rawMessages))
  5053  
  5054  	for index, rawMessage := range rawMessages {
  5055  		isc, err := unmarshalBasicIaaSVMContainer(*rawMessage)
  5056  		if err != nil {
  5057  			return nil, err
  5058  		}
  5059  		iscArray[index] = isc
  5060  	}
  5061  	return iscArray, nil
  5062  }
  5063  
  5064  // MarshalJSON is the custom marshaler for IaaSVMContainer.
  5065  func (isc IaaSVMContainer) MarshalJSON() ([]byte, error) {
  5066  	isc.ContainerType = ContainerTypeIaaSVMContainer
  5067  	objectMap := make(map[string]interface{})
  5068  	if isc.VirtualMachineID != nil {
  5069  		objectMap["virtualMachineId"] = isc.VirtualMachineID
  5070  	}
  5071  	if isc.VirtualMachineVersion != nil {
  5072  		objectMap["virtualMachineVersion"] = isc.VirtualMachineVersion
  5073  	}
  5074  	if isc.ResourceGroup != nil {
  5075  		objectMap["resourceGroup"] = isc.ResourceGroup
  5076  	}
  5077  	if isc.FriendlyName != nil {
  5078  		objectMap["friendlyName"] = isc.FriendlyName
  5079  	}
  5080  	if isc.BackupManagementType != "" {
  5081  		objectMap["backupManagementType"] = isc.BackupManagementType
  5082  	}
  5083  	if isc.RegistrationStatus != nil {
  5084  		objectMap["registrationStatus"] = isc.RegistrationStatus
  5085  	}
  5086  	if isc.HealthStatus != nil {
  5087  		objectMap["healthStatus"] = isc.HealthStatus
  5088  	}
  5089  	if isc.ContainerType != "" {
  5090  		objectMap["containerType"] = isc.ContainerType
  5091  	}
  5092  	return json.Marshal(objectMap)
  5093  }
  5094  
  5095  // AsAzureBackupServerContainer is the BasicProtectionContainer implementation for IaaSVMContainer.
  5096  func (isc IaaSVMContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
  5097  	return nil, false
  5098  }
  5099  
  5100  // AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for IaaSVMContainer.
  5101  func (isc IaaSVMContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
  5102  	return nil, false
  5103  }
  5104  
  5105  // AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for IaaSVMContainer.
  5106  func (isc IaaSVMContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
  5107  	return nil, false
  5108  }
  5109  
  5110  // AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for IaaSVMContainer.
  5111  func (isc IaaSVMContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
  5112  	return nil, false
  5113  }
  5114  
  5115  // AsAzureSQLContainer is the BasicProtectionContainer implementation for IaaSVMContainer.
  5116  func (isc IaaSVMContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
  5117  	return nil, false
  5118  }
  5119  
  5120  // AsAzureStorageContainer is the BasicProtectionContainer implementation for IaaSVMContainer.
  5121  func (isc IaaSVMContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
  5122  	return nil, false
  5123  }
  5124  
  5125  // AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for IaaSVMContainer.
  5126  func (isc IaaSVMContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
  5127  	return nil, false
  5128  }
  5129  
  5130  // AsAzureWorkloadContainer is the BasicProtectionContainer implementation for IaaSVMContainer.
  5131  func (isc IaaSVMContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
  5132  	return nil, false
  5133  }
  5134  
  5135  // AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for IaaSVMContainer.
  5136  func (isc IaaSVMContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
  5137  	return nil, false
  5138  }
  5139  
  5140  // AsDpmContainer is the BasicProtectionContainer implementation for IaaSVMContainer.
  5141  func (isc IaaSVMContainer) AsDpmContainer() (*DpmContainer, bool) {
  5142  	return nil, false
  5143  }
  5144  
  5145  // AsBasicDpmContainer is the BasicProtectionContainer implementation for IaaSVMContainer.
  5146  func (isc IaaSVMContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
  5147  	return nil, false
  5148  }
  5149  
  5150  // AsGenericContainer is the BasicProtectionContainer implementation for IaaSVMContainer.
  5151  func (isc IaaSVMContainer) AsGenericContainer() (*GenericContainer, bool) {
  5152  	return nil, false
  5153  }
  5154  
  5155  // AsIaaSVMContainer is the BasicProtectionContainer implementation for IaaSVMContainer.
  5156  func (isc IaaSVMContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
  5157  	return &isc, true
  5158  }
  5159  
  5160  // AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for IaaSVMContainer.
  5161  func (isc IaaSVMContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
  5162  	return &isc, true
  5163  }
  5164  
  5165  // AsMabContainer is the BasicProtectionContainer implementation for IaaSVMContainer.
  5166  func (isc IaaSVMContainer) AsMabContainer() (*MabContainer, bool) {
  5167  	return nil, false
  5168  }
  5169  
  5170  // AsProtectionContainer is the BasicProtectionContainer implementation for IaaSVMContainer.
  5171  func (isc IaaSVMContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
  5172  	return nil, false
  5173  }
  5174  
  5175  // AsBasicProtectionContainer is the BasicProtectionContainer implementation for IaaSVMContainer.
  5176  func (isc IaaSVMContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
  5177  	return &isc, true
  5178  }
  5179  
  5180  // IaasVMILRRegistrationRequest restore files/folders from a backup copy of IaaS VM.
  5181  type IaasVMILRRegistrationRequest struct {
  5182  	// RecoveryPointID - ID of the IaaS VM backup copy from where the files/folders have to be restored.
  5183  	RecoveryPointID *string `json:"recoveryPointId,omitempty"`
  5184  	// VirtualMachineID - Fully qualified ARM ID of the virtual machine whose the files / folders have to be restored.
  5185  	VirtualMachineID *string `json:"virtualMachineId,omitempty"`
  5186  	// InitiatorName - iSCSI initiator name.
  5187  	InitiatorName *string `json:"initiatorName,omitempty"`
  5188  	// RenewExistingRegistration - Whether to renew existing registration with the iSCSI server.
  5189  	RenewExistingRegistration *bool `json:"renewExistingRegistration,omitempty"`
  5190  	// ObjectType - Possible values include: 'ObjectTypeILRRequest', 'ObjectTypeAzureFileShareProvisionILRRequest', 'ObjectTypeIaasVMILRRegistrationRequest'
  5191  	ObjectType ObjectTypeBasicILRRequest `json:"objectType,omitempty"`
  5192  }
  5193  
  5194  // MarshalJSON is the custom marshaler for IaasVMILRRegistrationRequest.
  5195  func (ivrr IaasVMILRRegistrationRequest) MarshalJSON() ([]byte, error) {
  5196  	ivrr.ObjectType = ObjectTypeIaasVMILRRegistrationRequest
  5197  	objectMap := make(map[string]interface{})
  5198  	if ivrr.RecoveryPointID != nil {
  5199  		objectMap["recoveryPointId"] = ivrr.RecoveryPointID
  5200  	}
  5201  	if ivrr.VirtualMachineID != nil {
  5202  		objectMap["virtualMachineId"] = ivrr.VirtualMachineID
  5203  	}
  5204  	if ivrr.InitiatorName != nil {
  5205  		objectMap["initiatorName"] = ivrr.InitiatorName
  5206  	}
  5207  	if ivrr.RenewExistingRegistration != nil {
  5208  		objectMap["renewExistingRegistration"] = ivrr.RenewExistingRegistration
  5209  	}
  5210  	if ivrr.ObjectType != "" {
  5211  		objectMap["objectType"] = ivrr.ObjectType
  5212  	}
  5213  	return json.Marshal(objectMap)
  5214  }
  5215  
  5216  // AsAzureFileShareProvisionILRRequest is the BasicILRRequest implementation for IaasVMILRRegistrationRequest.
  5217  func (ivrr IaasVMILRRegistrationRequest) AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) {
  5218  	return nil, false
  5219  }
  5220  
  5221  // AsIaasVMILRRegistrationRequest is the BasicILRRequest implementation for IaasVMILRRegistrationRequest.
  5222  func (ivrr IaasVMILRRegistrationRequest) AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) {
  5223  	return &ivrr, true
  5224  }
  5225  
  5226  // AsILRRequest is the BasicILRRequest implementation for IaasVMILRRegistrationRequest.
  5227  func (ivrr IaasVMILRRegistrationRequest) AsILRRequest() (*ILRRequest, bool) {
  5228  	return nil, false
  5229  }
  5230  
  5231  // AsBasicILRRequest is the BasicILRRequest implementation for IaasVMILRRegistrationRequest.
  5232  func (ivrr IaasVMILRRegistrationRequest) AsBasicILRRequest() (BasicILRRequest, bool) {
  5233  	return &ivrr, true
  5234  }
  5235  
  5236  // BasicIaaSVMProtectableItem iaaS VM workload-specific backup item.
  5237  type BasicIaaSVMProtectableItem interface {
  5238  	AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool)
  5239  	AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool)
  5240  	AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool)
  5241  }
  5242  
  5243  // IaaSVMProtectableItem iaaS VM workload-specific backup item.
  5244  type IaaSVMProtectableItem struct {
  5245  	// VirtualMachineID - Fully qualified ARM ID of the virtual machine.
  5246  	VirtualMachineID *string `json:"virtualMachineId,omitempty"`
  5247  	// BackupManagementType - Type of backup management to backup an item.
  5248  	BackupManagementType *string `json:"backupManagementType,omitempty"`
  5249  	// WorkloadType - Type of workload for the backup management
  5250  	WorkloadType *string `json:"workloadType,omitempty"`
  5251  	// FriendlyName - Friendly name of the backup item.
  5252  	FriendlyName *string `json:"friendlyName,omitempty"`
  5253  	// ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
  5254  	ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
  5255  	// ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem'
  5256  	ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
  5257  }
  5258  
  5259  func unmarshalBasicIaaSVMProtectableItem(body []byte) (BasicIaaSVMProtectableItem, error) {
  5260  	var m map[string]interface{}
  5261  	err := json.Unmarshal(body, &m)
  5262  	if err != nil {
  5263  		return nil, err
  5264  	}
  5265  
  5266  	switch m["protectableItemType"] {
  5267  	case string(ProtectableItemTypeMicrosoftClassicComputevirtualMachines):
  5268  		var aisccvpi AzureIaaSClassicComputeVMProtectableItem
  5269  		err := json.Unmarshal(body, &aisccvpi)
  5270  		return aisccvpi, err
  5271  	case string(ProtectableItemTypeMicrosoftComputevirtualMachines):
  5272  		var aiscvpi AzureIaaSComputeVMProtectableItem
  5273  		err := json.Unmarshal(body, &aiscvpi)
  5274  		return aiscvpi, err
  5275  	default:
  5276  		var ispi IaaSVMProtectableItem
  5277  		err := json.Unmarshal(body, &ispi)
  5278  		return ispi, err
  5279  	}
  5280  }
  5281  func unmarshalBasicIaaSVMProtectableItemArray(body []byte) ([]BasicIaaSVMProtectableItem, error) {
  5282  	var rawMessages []*json.RawMessage
  5283  	err := json.Unmarshal(body, &rawMessages)
  5284  	if err != nil {
  5285  		return nil, err
  5286  	}
  5287  
  5288  	ispiArray := make([]BasicIaaSVMProtectableItem, len(rawMessages))
  5289  
  5290  	for index, rawMessage := range rawMessages {
  5291  		ispi, err := unmarshalBasicIaaSVMProtectableItem(*rawMessage)
  5292  		if err != nil {
  5293  			return nil, err
  5294  		}
  5295  		ispiArray[index] = ispi
  5296  	}
  5297  	return ispiArray, nil
  5298  }
  5299  
  5300  // MarshalJSON is the custom marshaler for IaaSVMProtectableItem.
  5301  func (ispi IaaSVMProtectableItem) MarshalJSON() ([]byte, error) {
  5302  	ispi.ProtectableItemType = ProtectableItemTypeIaaSVMProtectableItem
  5303  	objectMap := make(map[string]interface{})
  5304  	if ispi.VirtualMachineID != nil {
  5305  		objectMap["virtualMachineId"] = ispi.VirtualMachineID
  5306  	}
  5307  	if ispi.BackupManagementType != nil {
  5308  		objectMap["backupManagementType"] = ispi.BackupManagementType
  5309  	}
  5310  	if ispi.WorkloadType != nil {
  5311  		objectMap["workloadType"] = ispi.WorkloadType
  5312  	}
  5313  	if ispi.FriendlyName != nil {
  5314  		objectMap["friendlyName"] = ispi.FriendlyName
  5315  	}
  5316  	if ispi.ProtectionState != "" {
  5317  		objectMap["protectionState"] = ispi.ProtectionState
  5318  	}
  5319  	if ispi.ProtectableItemType != "" {
  5320  		objectMap["protectableItemType"] = ispi.ProtectableItemType
  5321  	}
  5322  	return json.Marshal(objectMap)
  5323  }
  5324  
  5325  // AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem.
  5326  func (ispi IaaSVMProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
  5327  	return nil, false
  5328  }
  5329  
  5330  // AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem.
  5331  func (ispi IaaSVMProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
  5332  	return nil, false
  5333  }
  5334  
  5335  // AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem.
  5336  func (ispi IaaSVMProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
  5337  	return nil, false
  5338  }
  5339  
  5340  // AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem.
  5341  func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
  5342  	return nil, false
  5343  }
  5344  
  5345  // AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem.
  5346  func (ispi IaaSVMProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
  5347  	return nil, false
  5348  }
  5349  
  5350  // AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem.
  5351  func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
  5352  	return nil, false
  5353  }
  5354  
  5355  // AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem.
  5356  func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
  5357  	return nil, false
  5358  }
  5359  
  5360  // AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem.
  5361  func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
  5362  	return nil, false
  5363  }
  5364  
  5365  // AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem.
  5366  func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
  5367  	return nil, false
  5368  }
  5369  
  5370  // AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem.
  5371  func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
  5372  	return nil, false
  5373  }
  5374  
  5375  // AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem.
  5376  func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
  5377  	return nil, false
  5378  }
  5379  
  5380  // AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem.
  5381  func (ispi IaaSVMProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
  5382  	return &ispi, true
  5383  }
  5384  
  5385  // AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem.
  5386  func (ispi IaaSVMProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
  5387  	return &ispi, true
  5388  }
  5389  
  5390  // AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem.
  5391  func (ispi IaaSVMProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
  5392  	return nil, false
  5393  }
  5394  
  5395  // AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem.
  5396  func (ispi IaaSVMProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
  5397  	return &ispi, true
  5398  }
  5399  
  5400  // BasicILRRequest parameters to Provision ILR API.
  5401  type BasicILRRequest interface {
  5402  	AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool)
  5403  	AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool)
  5404  	AsILRRequest() (*ILRRequest, bool)
  5405  }
  5406  
  5407  // ILRRequest parameters to Provision ILR API.
  5408  type ILRRequest struct {
  5409  	// ObjectType - Possible values include: 'ObjectTypeILRRequest', 'ObjectTypeAzureFileShareProvisionILRRequest', 'ObjectTypeIaasVMILRRegistrationRequest'
  5410  	ObjectType ObjectTypeBasicILRRequest `json:"objectType,omitempty"`
  5411  }
  5412  
  5413  func unmarshalBasicILRRequest(body []byte) (BasicILRRequest, error) {
  5414  	var m map[string]interface{}
  5415  	err := json.Unmarshal(body, &m)
  5416  	if err != nil {
  5417  		return nil, err
  5418  	}
  5419  
  5420  	switch m["objectType"] {
  5421  	case string(ObjectTypeAzureFileShareProvisionILRRequest):
  5422  		var afspir AzureFileShareProvisionILRRequest
  5423  		err := json.Unmarshal(body, &afspir)
  5424  		return afspir, err
  5425  	case string(ObjectTypeIaasVMILRRegistrationRequest):
  5426  		var ivrr IaasVMILRRegistrationRequest
  5427  		err := json.Unmarshal(body, &ivrr)
  5428  		return ivrr, err
  5429  	default:
  5430  		var ir ILRRequest
  5431  		err := json.Unmarshal(body, &ir)
  5432  		return ir, err
  5433  	}
  5434  }
  5435  func unmarshalBasicILRRequestArray(body []byte) ([]BasicILRRequest, error) {
  5436  	var rawMessages []*json.RawMessage
  5437  	err := json.Unmarshal(body, &rawMessages)
  5438  	if err != nil {
  5439  		return nil, err
  5440  	}
  5441  
  5442  	irArray := make([]BasicILRRequest, len(rawMessages))
  5443  
  5444  	for index, rawMessage := range rawMessages {
  5445  		ir, err := unmarshalBasicILRRequest(*rawMessage)
  5446  		if err != nil {
  5447  			return nil, err
  5448  		}
  5449  		irArray[index] = ir
  5450  	}
  5451  	return irArray, nil
  5452  }
  5453  
  5454  // MarshalJSON is the custom marshaler for ILRRequest.
  5455  func (ir ILRRequest) MarshalJSON() ([]byte, error) {
  5456  	ir.ObjectType = ObjectTypeILRRequest
  5457  	objectMap := make(map[string]interface{})
  5458  	if ir.ObjectType != "" {
  5459  		objectMap["objectType"] = ir.ObjectType
  5460  	}
  5461  	return json.Marshal(objectMap)
  5462  }
  5463  
  5464  // AsAzureFileShareProvisionILRRequest is the BasicILRRequest implementation for ILRRequest.
  5465  func (ir ILRRequest) AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) {
  5466  	return nil, false
  5467  }
  5468  
  5469  // AsIaasVMILRRegistrationRequest is the BasicILRRequest implementation for ILRRequest.
  5470  func (ir ILRRequest) AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) {
  5471  	return nil, false
  5472  }
  5473  
  5474  // AsILRRequest is the BasicILRRequest implementation for ILRRequest.
  5475  func (ir ILRRequest) AsILRRequest() (*ILRRequest, bool) {
  5476  	return &ir, true
  5477  }
  5478  
  5479  // AsBasicILRRequest is the BasicILRRequest implementation for ILRRequest.
  5480  func (ir ILRRequest) AsBasicILRRequest() (BasicILRRequest, bool) {
  5481  	return &ir, true
  5482  }
  5483  
  5484  // ILRRequestResource parameters to Provision ILR API.
  5485  type ILRRequestResource struct {
  5486  	// Properties - ILRRequestResource properties
  5487  	Properties BasicILRRequest `json:"properties,omitempty"`
  5488  	// ID - READ-ONLY; Resource Id represents the complete path to the resource.
  5489  	ID *string `json:"id,omitempty"`
  5490  	// Name - READ-ONLY; Resource name associated with the resource.
  5491  	Name *string `json:"name,omitempty"`
  5492  	// Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/...
  5493  	Type *string `json:"type,omitempty"`
  5494  	// Location - Resource location.
  5495  	Location *string `json:"location,omitempty"`
  5496  	// Tags - Resource tags.
  5497  	Tags map[string]*string `json:"tags"`
  5498  	// ETag - Optional ETag.
  5499  	ETag *string `json:"eTag,omitempty"`
  5500  }
  5501  
  5502  // MarshalJSON is the custom marshaler for ILRRequestResource.
  5503  func (irr ILRRequestResource) MarshalJSON() ([]byte, error) {
  5504  	objectMap := make(map[string]interface{})
  5505  	objectMap["properties"] = irr.Properties
  5506  	if irr.Location != nil {
  5507  		objectMap["location"] = irr.Location
  5508  	}
  5509  	if irr.Tags != nil {
  5510  		objectMap["tags"] = irr.Tags
  5511  	}
  5512  	if irr.ETag != nil {
  5513  		objectMap["eTag"] = irr.ETag
  5514  	}
  5515  	return json.Marshal(objectMap)
  5516  }
  5517  
  5518  // UnmarshalJSON is the custom unmarshaler for ILRRequestResource struct.
  5519  func (irr *ILRRequestResource) UnmarshalJSON(body []byte) error {
  5520  	var m map[string]*json.RawMessage
  5521  	err := json.Unmarshal(body, &m)
  5522  	if err != nil {
  5523  		return err
  5524  	}
  5525  	for k, v := range m {
  5526  		switch k {
  5527  		case "properties":
  5528  			if v != nil {
  5529  				properties, err := unmarshalBasicILRRequest(*v)
  5530  				if err != nil {
  5531  					return err
  5532  				}
  5533  				irr.Properties = properties
  5534  			}
  5535  		case "id":
  5536  			if v != nil {
  5537  				var ID string
  5538  				err = json.Unmarshal(*v, &ID)
  5539  				if err != nil {
  5540  					return err
  5541  				}
  5542  				irr.ID = &ID
  5543  			}
  5544  		case "name":
  5545  			if v != nil {
  5546  				var name string
  5547  				err = json.Unmarshal(*v, &name)
  5548  				if err != nil {
  5549  					return err
  5550  				}
  5551  				irr.Name = &name
  5552  			}
  5553  		case "type":
  5554  			if v != nil {
  5555  				var typeVar string
  5556  				err = json.Unmarshal(*v, &typeVar)
  5557  				if err != nil {
  5558  					return err
  5559  				}
  5560  				irr.Type = &typeVar
  5561  			}
  5562  		case "location":
  5563  			if v != nil {
  5564  				var location string
  5565  				err = json.Unmarshal(*v, &location)
  5566  				if err != nil {
  5567  					return err
  5568  				}
  5569  				irr.Location = &location
  5570  			}
  5571  		case "tags":
  5572  			if v != nil {
  5573  				var tags map[string]*string
  5574  				err = json.Unmarshal(*v, &tags)
  5575  				if err != nil {
  5576  					return err
  5577  				}
  5578  				irr.Tags = tags
  5579  			}
  5580  		case "eTag":
  5581  			if v != nil {
  5582  				var eTag string
  5583  				err = json.Unmarshal(*v, &eTag)
  5584  				if err != nil {
  5585  					return err
  5586  				}
  5587  				irr.ETag = &eTag
  5588  			}
  5589  		}
  5590  	}
  5591  
  5592  	return nil
  5593  }
  5594  
  5595  // InquiryInfo details about inquired protectable items under a given container.
  5596  type InquiryInfo struct {
  5597  	// Status - Inquiry Status for this container such as
  5598  	// InProgress | Failed | Succeeded
  5599  	Status *string `json:"status,omitempty"`
  5600  	// ErrorDetail - Error Details if the Status is non-success.
  5601  	ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"`
  5602  	// InquiryDetails - Inquiry Details which will have workload specific details.
  5603  	// For e.g. - For SQL and oracle this will contain different details.
  5604  	InquiryDetails *[]WorkloadInquiryDetails `json:"inquiryDetails,omitempty"`
  5605  }
  5606  
  5607  // InquiryValidation validation for inquired protectable items under a given container.
  5608  type InquiryValidation struct {
  5609  	// Status - Status for the Inquiry Validation.
  5610  	Status *string `json:"status,omitempty"`
  5611  	// ErrorDetail - Error Detail in case the status is non-success.
  5612  	ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"`
  5613  	// AdditionalDetail - READ-ONLY; Error Additional Detail in case the status is non-success.
  5614  	AdditionalDetail *string `json:"additionalDetail,omitempty"`
  5615  }
  5616  
  5617  // MarshalJSON is the custom marshaler for InquiryValidation.
  5618  func (iv InquiryValidation) MarshalJSON() ([]byte, error) {
  5619  	objectMap := make(map[string]interface{})
  5620  	if iv.Status != nil {
  5621  		objectMap["status"] = iv.Status
  5622  	}
  5623  	if iv.ErrorDetail != nil {
  5624  		objectMap["errorDetail"] = iv.ErrorDetail
  5625  	}
  5626  	return json.Marshal(objectMap)
  5627  }
  5628  
  5629  // InstantItemRecoveryTarget target details for file / folder restore.
  5630  type InstantItemRecoveryTarget struct {
  5631  	// ClientScripts - List of client scripts.
  5632  	ClientScripts *[]ClientScriptForConnect `json:"clientScripts,omitempty"`
  5633  }
  5634  
  5635  // MabContainer container with items backed up using MAB backup engine.
  5636  type MabContainer struct {
  5637  	// CanReRegister - Can the container be registered one more time.
  5638  	CanReRegister *bool `json:"canReRegister,omitempty"`
  5639  	// ContainerID - ContainerID represents the container.
  5640  	ContainerID *int64 `json:"containerId,omitempty"`
  5641  	// ProtectedItemCount - Number of items backed up in this container.
  5642  	ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"`
  5643  	// AgentVersion - Agent version of this container.
  5644  	AgentVersion *string `json:"agentVersion,omitempty"`
  5645  	// ExtendedInfo - Additional information for this container
  5646  	ExtendedInfo *MabContainerExtendedInfo `json:"extendedInfo,omitempty"`
  5647  	// MabContainerHealthDetails - Health details on this mab container.
  5648  	MabContainerHealthDetails *[]MABContainerHealthDetails `json:"mabContainerHealthDetails,omitempty"`
  5649  	// ContainerHealthState - Health state of mab container.
  5650  	ContainerHealthState *string `json:"containerHealthState,omitempty"`
  5651  	// FriendlyName - Friendly name of the container.
  5652  	FriendlyName *string `json:"friendlyName,omitempty"`
  5653  	// BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
  5654  	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
  5655  	// RegistrationStatus - Status of registration of the container with the Recovery Services Vault.
  5656  	RegistrationStatus *string `json:"registrationStatus,omitempty"`
  5657  	// HealthStatus - Status of health of the container.
  5658  	HealthStatus *string `json:"healthStatus,omitempty"`
  5659  	// ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1'
  5660  	ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
  5661  }
  5662  
  5663  // MarshalJSON is the custom marshaler for MabContainer.
  5664  func (mc MabContainer) MarshalJSON() ([]byte, error) {
  5665  	mc.ContainerType = ContainerTypeWindows1
  5666  	objectMap := make(map[string]interface{})
  5667  	if mc.CanReRegister != nil {
  5668  		objectMap["canReRegister"] = mc.CanReRegister
  5669  	}
  5670  	if mc.ContainerID != nil {
  5671  		objectMap["containerId"] = mc.ContainerID
  5672  	}
  5673  	if mc.ProtectedItemCount != nil {
  5674  		objectMap["protectedItemCount"] = mc.ProtectedItemCount
  5675  	}
  5676  	if mc.AgentVersion != nil {
  5677  		objectMap["agentVersion"] = mc.AgentVersion
  5678  	}
  5679  	if mc.ExtendedInfo != nil {
  5680  		objectMap["extendedInfo"] = mc.ExtendedInfo
  5681  	}
  5682  	if mc.MabContainerHealthDetails != nil {
  5683  		objectMap["mabContainerHealthDetails"] = mc.MabContainerHealthDetails
  5684  	}
  5685  	if mc.ContainerHealthState != nil {
  5686  		objectMap["containerHealthState"] = mc.ContainerHealthState
  5687  	}
  5688  	if mc.FriendlyName != nil {
  5689  		objectMap["friendlyName"] = mc.FriendlyName
  5690  	}
  5691  	if mc.BackupManagementType != "" {
  5692  		objectMap["backupManagementType"] = mc.BackupManagementType
  5693  	}
  5694  	if mc.RegistrationStatus != nil {
  5695  		objectMap["registrationStatus"] = mc.RegistrationStatus
  5696  	}
  5697  	if mc.HealthStatus != nil {
  5698  		objectMap["healthStatus"] = mc.HealthStatus
  5699  	}
  5700  	if mc.ContainerType != "" {
  5701  		objectMap["containerType"] = mc.ContainerType
  5702  	}
  5703  	return json.Marshal(objectMap)
  5704  }
  5705  
  5706  // AsAzureBackupServerContainer is the BasicProtectionContainer implementation for MabContainer.
  5707  func (mc MabContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
  5708  	return nil, false
  5709  }
  5710  
  5711  // AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for MabContainer.
  5712  func (mc MabContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
  5713  	return nil, false
  5714  }
  5715  
  5716  // AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for MabContainer.
  5717  func (mc MabContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
  5718  	return nil, false
  5719  }
  5720  
  5721  // AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for MabContainer.
  5722  func (mc MabContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
  5723  	return nil, false
  5724  }
  5725  
  5726  // AsAzureSQLContainer is the BasicProtectionContainer implementation for MabContainer.
  5727  func (mc MabContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
  5728  	return nil, false
  5729  }
  5730  
  5731  // AsAzureStorageContainer is the BasicProtectionContainer implementation for MabContainer.
  5732  func (mc MabContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
  5733  	return nil, false
  5734  }
  5735  
  5736  // AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for MabContainer.
  5737  func (mc MabContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
  5738  	return nil, false
  5739  }
  5740  
  5741  // AsAzureWorkloadContainer is the BasicProtectionContainer implementation for MabContainer.
  5742  func (mc MabContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
  5743  	return nil, false
  5744  }
  5745  
  5746  // AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for MabContainer.
  5747  func (mc MabContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
  5748  	return nil, false
  5749  }
  5750  
  5751  // AsDpmContainer is the BasicProtectionContainer implementation for MabContainer.
  5752  func (mc MabContainer) AsDpmContainer() (*DpmContainer, bool) {
  5753  	return nil, false
  5754  }
  5755  
  5756  // AsBasicDpmContainer is the BasicProtectionContainer implementation for MabContainer.
  5757  func (mc MabContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
  5758  	return nil, false
  5759  }
  5760  
  5761  // AsGenericContainer is the BasicProtectionContainer implementation for MabContainer.
  5762  func (mc MabContainer) AsGenericContainer() (*GenericContainer, bool) {
  5763  	return nil, false
  5764  }
  5765  
  5766  // AsIaaSVMContainer is the BasicProtectionContainer implementation for MabContainer.
  5767  func (mc MabContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
  5768  	return nil, false
  5769  }
  5770  
  5771  // AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for MabContainer.
  5772  func (mc MabContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
  5773  	return nil, false
  5774  }
  5775  
  5776  // AsMabContainer is the BasicProtectionContainer implementation for MabContainer.
  5777  func (mc MabContainer) AsMabContainer() (*MabContainer, bool) {
  5778  	return &mc, true
  5779  }
  5780  
  5781  // AsProtectionContainer is the BasicProtectionContainer implementation for MabContainer.
  5782  func (mc MabContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
  5783  	return nil, false
  5784  }
  5785  
  5786  // AsBasicProtectionContainer is the BasicProtectionContainer implementation for MabContainer.
  5787  func (mc MabContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
  5788  	return &mc, true
  5789  }
  5790  
  5791  // MabContainerExtendedInfo additional information of the container.
  5792  type MabContainerExtendedInfo struct {
  5793  	// LastRefreshedAt - Time stamp when this container was refreshed.
  5794  	LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"`
  5795  	// 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'
  5796  	BackupItemType ItemType `json:"backupItemType,omitempty"`
  5797  	// BackupItems - List of backup items associated with this container.
  5798  	BackupItems *[]string `json:"backupItems,omitempty"`
  5799  	// PolicyName - Backup policy associated with this container.
  5800  	PolicyName *string `json:"policyName,omitempty"`
  5801  	// LastBackupStatus - Latest backup status of this container.
  5802  	LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
  5803  }
  5804  
  5805  // MABContainerHealthDetails MAB workload-specific Health Details.
  5806  type MABContainerHealthDetails struct {
  5807  	// Code - Health Code
  5808  	Code *int32 `json:"code,omitempty"`
  5809  	// Title - Health Title
  5810  	Title *string `json:"title,omitempty"`
  5811  	// Message - Health Message
  5812  	Message *string `json:"message,omitempty"`
  5813  	// Recommendations - Health Recommended Actions
  5814  	Recommendations *[]string `json:"recommendations,omitempty"`
  5815  }
  5816  
  5817  // OperationStatus operation status.
  5818  type OperationStatus struct {
  5819  	autorest.Response `json:"-"`
  5820  	// ID - ID of the operation.
  5821  	ID *string `json:"id,omitempty"`
  5822  	// Name - Name of the operation.
  5823  	Name *string `json:"name,omitempty"`
  5824  	// Status - Operation status. Possible values include: 'OperationStatusValuesInvalid', 'OperationStatusValuesInProgress', 'OperationStatusValuesSucceeded', 'OperationStatusValuesFailed', 'OperationStatusValuesCanceled'
  5825  	Status OperationStatusValues `json:"status,omitempty"`
  5826  	// StartTime - Operation start time. Format: ISO-8601.
  5827  	StartTime *date.Time `json:"startTime,omitempty"`
  5828  	// EndTime - Operation end time. Format: ISO-8601.
  5829  	EndTime *date.Time `json:"endTime,omitempty"`
  5830  	// Error - Error information related to this operation.
  5831  	Error *OperationStatusError `json:"error,omitempty"`
  5832  	// Properties - Additional information associated with this operation.
  5833  	Properties BasicOperationStatusExtendedInfo `json:"properties,omitempty"`
  5834  }
  5835  
  5836  // UnmarshalJSON is the custom unmarshaler for OperationStatus struct.
  5837  func (osVar *OperationStatus) UnmarshalJSON(body []byte) error {
  5838  	var m map[string]*json.RawMessage
  5839  	err := json.Unmarshal(body, &m)
  5840  	if err != nil {
  5841  		return err
  5842  	}
  5843  	for k, v := range m {
  5844  		switch k {
  5845  		case "id":
  5846  			if v != nil {
  5847  				var ID string
  5848  				err = json.Unmarshal(*v, &ID)
  5849  				if err != nil {
  5850  					return err
  5851  				}
  5852  				osVar.ID = &ID
  5853  			}
  5854  		case "name":
  5855  			if v != nil {
  5856  				var name string
  5857  				err = json.Unmarshal(*v, &name)
  5858  				if err != nil {
  5859  					return err
  5860  				}
  5861  				osVar.Name = &name
  5862  			}
  5863  		case "status":
  5864  			if v != nil {
  5865  				var status OperationStatusValues
  5866  				err = json.Unmarshal(*v, &status)
  5867  				if err != nil {
  5868  					return err
  5869  				}
  5870  				osVar.Status = status
  5871  			}
  5872  		case "startTime":
  5873  			if v != nil {
  5874  				var startTime date.Time
  5875  				err = json.Unmarshal(*v, &startTime)
  5876  				if err != nil {
  5877  					return err
  5878  				}
  5879  				osVar.StartTime = &startTime
  5880  			}
  5881  		case "endTime":
  5882  			if v != nil {
  5883  				var endTime date.Time
  5884  				err = json.Unmarshal(*v, &endTime)
  5885  				if err != nil {
  5886  					return err
  5887  				}
  5888  				osVar.EndTime = &endTime
  5889  			}
  5890  		case "error":
  5891  			if v != nil {
  5892  				var errorVar OperationStatusError
  5893  				err = json.Unmarshal(*v, &errorVar)
  5894  				if err != nil {
  5895  					return err
  5896  				}
  5897  				osVar.Error = &errorVar
  5898  			}
  5899  		case "properties":
  5900  			if v != nil {
  5901  				properties, err := unmarshalBasicOperationStatusExtendedInfo(*v)
  5902  				if err != nil {
  5903  					return err
  5904  				}
  5905  				osVar.Properties = properties
  5906  			}
  5907  		}
  5908  	}
  5909  
  5910  	return nil
  5911  }
  5912  
  5913  // OperationStatusError error information associated with operation status call.
  5914  type OperationStatusError struct {
  5915  	// Code - Error code of the operation failure.
  5916  	Code *string `json:"code,omitempty"`
  5917  	// Message - Error message displayed if the operation failure.
  5918  	Message *string `json:"message,omitempty"`
  5919  }
  5920  
  5921  // BasicOperationStatusExtendedInfo base class for additional information of operation status.
  5922  type BasicOperationStatusExtendedInfo interface {
  5923  	AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool)
  5924  	AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool)
  5925  	AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool)
  5926  	AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool)
  5927  }
  5928  
  5929  // OperationStatusExtendedInfo base class for additional information of operation status.
  5930  type OperationStatusExtendedInfo struct {
  5931  	// ObjectType - Possible values include: 'ObjectTypeOperationStatusExtendedInfo', 'ObjectTypeOperationStatusJobExtendedInfo', 'ObjectTypeOperationStatusJobsExtendedInfo', 'ObjectTypeOperationStatusProvisionILRExtendedInfo'
  5932  	ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"`
  5933  }
  5934  
  5935  func unmarshalBasicOperationStatusExtendedInfo(body []byte) (BasicOperationStatusExtendedInfo, error) {
  5936  	var m map[string]interface{}
  5937  	err := json.Unmarshal(body, &m)
  5938  	if err != nil {
  5939  		return nil, err
  5940  	}
  5941  
  5942  	switch m["objectType"] {
  5943  	case string(ObjectTypeOperationStatusJobExtendedInfo):
  5944  		var osjei OperationStatusJobExtendedInfo
  5945  		err := json.Unmarshal(body, &osjei)
  5946  		return osjei, err
  5947  	case string(ObjectTypeOperationStatusJobsExtendedInfo):
  5948  		var osjei OperationStatusJobsExtendedInfo
  5949  		err := json.Unmarshal(body, &osjei)
  5950  		return osjei, err
  5951  	case string(ObjectTypeOperationStatusProvisionILRExtendedInfo):
  5952  		var ospiei OperationStatusProvisionILRExtendedInfo
  5953  		err := json.Unmarshal(body, &ospiei)
  5954  		return ospiei, err
  5955  	default:
  5956  		var osei OperationStatusExtendedInfo
  5957  		err := json.Unmarshal(body, &osei)
  5958  		return osei, err
  5959  	}
  5960  }
  5961  func unmarshalBasicOperationStatusExtendedInfoArray(body []byte) ([]BasicOperationStatusExtendedInfo, error) {
  5962  	var rawMessages []*json.RawMessage
  5963  	err := json.Unmarshal(body, &rawMessages)
  5964  	if err != nil {
  5965  		return nil, err
  5966  	}
  5967  
  5968  	oseiArray := make([]BasicOperationStatusExtendedInfo, len(rawMessages))
  5969  
  5970  	for index, rawMessage := range rawMessages {
  5971  		osei, err := unmarshalBasicOperationStatusExtendedInfo(*rawMessage)
  5972  		if err != nil {
  5973  			return nil, err
  5974  		}
  5975  		oseiArray[index] = osei
  5976  	}
  5977  	return oseiArray, nil
  5978  }
  5979  
  5980  // MarshalJSON is the custom marshaler for OperationStatusExtendedInfo.
  5981  func (osei OperationStatusExtendedInfo) MarshalJSON() ([]byte, error) {
  5982  	osei.ObjectType = ObjectTypeOperationStatusExtendedInfo
  5983  	objectMap := make(map[string]interface{})
  5984  	if osei.ObjectType != "" {
  5985  		objectMap["objectType"] = osei.ObjectType
  5986  	}
  5987  	return json.Marshal(objectMap)
  5988  }
  5989  
  5990  // AsOperationStatusJobExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusExtendedInfo.
  5991  func (osei OperationStatusExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) {
  5992  	return nil, false
  5993  }
  5994  
  5995  // AsOperationStatusJobsExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusExtendedInfo.
  5996  func (osei OperationStatusExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) {
  5997  	return nil, false
  5998  }
  5999  
  6000  // AsOperationStatusProvisionILRExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusExtendedInfo.
  6001  func (osei OperationStatusExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) {
  6002  	return nil, false
  6003  }
  6004  
  6005  // AsOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusExtendedInfo.
  6006  func (osei OperationStatusExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) {
  6007  	return &osei, true
  6008  }
  6009  
  6010  // AsBasicOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusExtendedInfo.
  6011  func (osei OperationStatusExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) {
  6012  	return &osei, true
  6013  }
  6014  
  6015  // OperationStatusJobExtendedInfo operation status job extended info.
  6016  type OperationStatusJobExtendedInfo struct {
  6017  	// JobID - ID of the job created for this protected item.
  6018  	JobID *string `json:"jobId,omitempty"`
  6019  	// ObjectType - Possible values include: 'ObjectTypeOperationStatusExtendedInfo', 'ObjectTypeOperationStatusJobExtendedInfo', 'ObjectTypeOperationStatusJobsExtendedInfo', 'ObjectTypeOperationStatusProvisionILRExtendedInfo'
  6020  	ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"`
  6021  }
  6022  
  6023  // MarshalJSON is the custom marshaler for OperationStatusJobExtendedInfo.
  6024  func (osjei OperationStatusJobExtendedInfo) MarshalJSON() ([]byte, error) {
  6025  	osjei.ObjectType = ObjectTypeOperationStatusJobExtendedInfo
  6026  	objectMap := make(map[string]interface{})
  6027  	if osjei.JobID != nil {
  6028  		objectMap["jobId"] = osjei.JobID
  6029  	}
  6030  	if osjei.ObjectType != "" {
  6031  		objectMap["objectType"] = osjei.ObjectType
  6032  	}
  6033  	return json.Marshal(objectMap)
  6034  }
  6035  
  6036  // AsOperationStatusJobExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo.
  6037  func (osjei OperationStatusJobExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) {
  6038  	return &osjei, true
  6039  }
  6040  
  6041  // AsOperationStatusJobsExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo.
  6042  func (osjei OperationStatusJobExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) {
  6043  	return nil, false
  6044  }
  6045  
  6046  // AsOperationStatusProvisionILRExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo.
  6047  func (osjei OperationStatusJobExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) {
  6048  	return nil, false
  6049  }
  6050  
  6051  // AsOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo.
  6052  func (osjei OperationStatusJobExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) {
  6053  	return nil, false
  6054  }
  6055  
  6056  // AsBasicOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo.
  6057  func (osjei OperationStatusJobExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) {
  6058  	return &osjei, true
  6059  }
  6060  
  6061  // OperationStatusJobsExtendedInfo operation status extended info for list of jobs.
  6062  type OperationStatusJobsExtendedInfo struct {
  6063  	// JobIds - IDs of the jobs created for the protected item.
  6064  	JobIds *[]string `json:"jobIds,omitempty"`
  6065  	// FailedJobsError - Stores all the failed jobs along with the corresponding error codes.
  6066  	FailedJobsError map[string]*string `json:"failedJobsError"`
  6067  	// ObjectType - Possible values include: 'ObjectTypeOperationStatusExtendedInfo', 'ObjectTypeOperationStatusJobExtendedInfo', 'ObjectTypeOperationStatusJobsExtendedInfo', 'ObjectTypeOperationStatusProvisionILRExtendedInfo'
  6068  	ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"`
  6069  }
  6070  
  6071  // MarshalJSON is the custom marshaler for OperationStatusJobsExtendedInfo.
  6072  func (osjei OperationStatusJobsExtendedInfo) MarshalJSON() ([]byte, error) {
  6073  	osjei.ObjectType = ObjectTypeOperationStatusJobsExtendedInfo
  6074  	objectMap := make(map[string]interface{})
  6075  	if osjei.JobIds != nil {
  6076  		objectMap["jobIds"] = osjei.JobIds
  6077  	}
  6078  	if osjei.FailedJobsError != nil {
  6079  		objectMap["failedJobsError"] = osjei.FailedJobsError
  6080  	}
  6081  	if osjei.ObjectType != "" {
  6082  		objectMap["objectType"] = osjei.ObjectType
  6083  	}
  6084  	return json.Marshal(objectMap)
  6085  }
  6086  
  6087  // AsOperationStatusJobExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo.
  6088  func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) {
  6089  	return nil, false
  6090  }
  6091  
  6092  // AsOperationStatusJobsExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo.
  6093  func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) {
  6094  	return &osjei, true
  6095  }
  6096  
  6097  // AsOperationStatusProvisionILRExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo.
  6098  func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) {
  6099  	return nil, false
  6100  }
  6101  
  6102  // AsOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo.
  6103  func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) {
  6104  	return nil, false
  6105  }
  6106  
  6107  // AsBasicOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo.
  6108  func (osjei OperationStatusJobsExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) {
  6109  	return &osjei, true
  6110  }
  6111  
  6112  // OperationStatusProvisionILRExtendedInfo operation status extended info for ILR provision action.
  6113  type OperationStatusProvisionILRExtendedInfo struct {
  6114  	// RecoveryTarget - Target details for file / folder restore.
  6115  	RecoveryTarget *InstantItemRecoveryTarget `json:"recoveryTarget,omitempty"`
  6116  	// ObjectType - Possible values include: 'ObjectTypeOperationStatusExtendedInfo', 'ObjectTypeOperationStatusJobExtendedInfo', 'ObjectTypeOperationStatusJobsExtendedInfo', 'ObjectTypeOperationStatusProvisionILRExtendedInfo'
  6117  	ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"`
  6118  }
  6119  
  6120  // MarshalJSON is the custom marshaler for OperationStatusProvisionILRExtendedInfo.
  6121  func (ospiei OperationStatusProvisionILRExtendedInfo) MarshalJSON() ([]byte, error) {
  6122  	ospiei.ObjectType = ObjectTypeOperationStatusProvisionILRExtendedInfo
  6123  	objectMap := make(map[string]interface{})
  6124  	if ospiei.RecoveryTarget != nil {
  6125  		objectMap["recoveryTarget"] = ospiei.RecoveryTarget
  6126  	}
  6127  	if ospiei.ObjectType != "" {
  6128  		objectMap["objectType"] = ospiei.ObjectType
  6129  	}
  6130  	return json.Marshal(objectMap)
  6131  }
  6132  
  6133  // AsOperationStatusJobExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo.
  6134  func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) {
  6135  	return nil, false
  6136  }
  6137  
  6138  // AsOperationStatusJobsExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo.
  6139  func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) {
  6140  	return nil, false
  6141  }
  6142  
  6143  // AsOperationStatusProvisionILRExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo.
  6144  func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) {
  6145  	return &ospiei, true
  6146  }
  6147  
  6148  // AsOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo.
  6149  func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) {
  6150  	return nil, false
  6151  }
  6152  
  6153  // AsBasicOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo.
  6154  func (ospiei OperationStatusProvisionILRExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) {
  6155  	return &ospiei, true
  6156  }
  6157  
  6158  // PreBackupValidation pre-backup validation for Azure VM Workload provider.
  6159  type PreBackupValidation struct {
  6160  	// Status - Status of protectable item, i.e. InProgress,Succeeded,Failed. Possible values include: 'InquiryStatusInvalid', 'InquiryStatusSuccess', 'InquiryStatusFailed'
  6161  	Status InquiryStatus `json:"status,omitempty"`
  6162  	// Code - Error code of protectable item
  6163  	Code *string `json:"code,omitempty"`
  6164  	// Message - Message corresponding to the error code for the protectable item
  6165  	Message *string `json:"message,omitempty"`
  6166  }
  6167  
  6168  // BasicProtectableContainer protectable Container Class.
  6169  type BasicProtectableContainer interface {
  6170  	AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool)
  6171  	AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool)
  6172  	AsProtectableContainer() (*ProtectableContainer, bool)
  6173  }
  6174  
  6175  // ProtectableContainer protectable Container Class.
  6176  type ProtectableContainer struct {
  6177  	// FriendlyName - Friendly name of the container.
  6178  	FriendlyName *string `json:"friendlyName,omitempty"`
  6179  	// BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
  6180  	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
  6181  	// HealthStatus - Status of health of the container.
  6182  	HealthStatus *string `json:"healthStatus,omitempty"`
  6183  	// ContainerID - Fabric Id of the container such as ARM Id.
  6184  	ContainerID *string `json:"containerId,omitempty"`
  6185  	// ProtectableContainerType - Possible values include: 'ProtectableContainerTypeProtectableContainer', 'ProtectableContainerTypeStorageContainer', 'ProtectableContainerTypeVMAppContainer'
  6186  	ProtectableContainerType ProtectableContainerType `json:"protectableContainerType,omitempty"`
  6187  }
  6188  
  6189  func unmarshalBasicProtectableContainer(body []byte) (BasicProtectableContainer, error) {
  6190  	var m map[string]interface{}
  6191  	err := json.Unmarshal(body, &m)
  6192  	if err != nil {
  6193  		return nil, err
  6194  	}
  6195  
  6196  	switch m["protectableContainerType"] {
  6197  	case string(ProtectableContainerTypeStorageContainer):
  6198  		var aspc AzureStorageProtectableContainer
  6199  		err := json.Unmarshal(body, &aspc)
  6200  		return aspc, err
  6201  	case string(ProtectableContainerTypeVMAppContainer):
  6202  		var avacpc AzureVMAppContainerProtectableContainer
  6203  		err := json.Unmarshal(body, &avacpc)
  6204  		return avacpc, err
  6205  	default:
  6206  		var pc ProtectableContainer
  6207  		err := json.Unmarshal(body, &pc)
  6208  		return pc, err
  6209  	}
  6210  }
  6211  func unmarshalBasicProtectableContainerArray(body []byte) ([]BasicProtectableContainer, error) {
  6212  	var rawMessages []*json.RawMessage
  6213  	err := json.Unmarshal(body, &rawMessages)
  6214  	if err != nil {
  6215  		return nil, err
  6216  	}
  6217  
  6218  	pcArray := make([]BasicProtectableContainer, len(rawMessages))
  6219  
  6220  	for index, rawMessage := range rawMessages {
  6221  		pc, err := unmarshalBasicProtectableContainer(*rawMessage)
  6222  		if err != nil {
  6223  			return nil, err
  6224  		}
  6225  		pcArray[index] = pc
  6226  	}
  6227  	return pcArray, nil
  6228  }
  6229  
  6230  // MarshalJSON is the custom marshaler for ProtectableContainer.
  6231  func (pc ProtectableContainer) MarshalJSON() ([]byte, error) {
  6232  	pc.ProtectableContainerType = ProtectableContainerTypeProtectableContainer
  6233  	objectMap := make(map[string]interface{})
  6234  	if pc.FriendlyName != nil {
  6235  		objectMap["friendlyName"] = pc.FriendlyName
  6236  	}
  6237  	if pc.BackupManagementType != "" {
  6238  		objectMap["backupManagementType"] = pc.BackupManagementType
  6239  	}
  6240  	if pc.HealthStatus != nil {
  6241  		objectMap["healthStatus"] = pc.HealthStatus
  6242  	}
  6243  	if pc.ContainerID != nil {
  6244  		objectMap["containerId"] = pc.ContainerID
  6245  	}
  6246  	if pc.ProtectableContainerType != "" {
  6247  		objectMap["protectableContainerType"] = pc.ProtectableContainerType
  6248  	}
  6249  	return json.Marshal(objectMap)
  6250  }
  6251  
  6252  // AsAzureStorageProtectableContainer is the BasicProtectableContainer implementation for ProtectableContainer.
  6253  func (pc ProtectableContainer) AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) {
  6254  	return nil, false
  6255  }
  6256  
  6257  // AsAzureVMAppContainerProtectableContainer is the BasicProtectableContainer implementation for ProtectableContainer.
  6258  func (pc ProtectableContainer) AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) {
  6259  	return nil, false
  6260  }
  6261  
  6262  // AsProtectableContainer is the BasicProtectableContainer implementation for ProtectableContainer.
  6263  func (pc ProtectableContainer) AsProtectableContainer() (*ProtectableContainer, bool) {
  6264  	return &pc, true
  6265  }
  6266  
  6267  // AsBasicProtectableContainer is the BasicProtectableContainer implementation for ProtectableContainer.
  6268  func (pc ProtectableContainer) AsBasicProtectableContainer() (BasicProtectableContainer, bool) {
  6269  	return &pc, true
  6270  }
  6271  
  6272  // ProtectableContainerResource protectable Container Class.
  6273  type ProtectableContainerResource struct {
  6274  	// Properties - ProtectableContainerResource properties
  6275  	Properties BasicProtectableContainer `json:"properties,omitempty"`
  6276  	// ID - READ-ONLY; Resource Id represents the complete path to the resource.
  6277  	ID *string `json:"id,omitempty"`
  6278  	// Name - READ-ONLY; Resource name associated with the resource.
  6279  	Name *string `json:"name,omitempty"`
  6280  	// Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/...
  6281  	Type *string `json:"type,omitempty"`
  6282  	// Location - Resource location.
  6283  	Location *string `json:"location,omitempty"`
  6284  	// Tags - Resource tags.
  6285  	Tags map[string]*string `json:"tags"`
  6286  	// ETag - Optional ETag.
  6287  	ETag *string `json:"eTag,omitempty"`
  6288  }
  6289  
  6290  // MarshalJSON is the custom marshaler for ProtectableContainerResource.
  6291  func (pcr ProtectableContainerResource) MarshalJSON() ([]byte, error) {
  6292  	objectMap := make(map[string]interface{})
  6293  	objectMap["properties"] = pcr.Properties
  6294  	if pcr.Location != nil {
  6295  		objectMap["location"] = pcr.Location
  6296  	}
  6297  	if pcr.Tags != nil {
  6298  		objectMap["tags"] = pcr.Tags
  6299  	}
  6300  	if pcr.ETag != nil {
  6301  		objectMap["eTag"] = pcr.ETag
  6302  	}
  6303  	return json.Marshal(objectMap)
  6304  }
  6305  
  6306  // UnmarshalJSON is the custom unmarshaler for ProtectableContainerResource struct.
  6307  func (pcr *ProtectableContainerResource) UnmarshalJSON(body []byte) error {
  6308  	var m map[string]*json.RawMessage
  6309  	err := json.Unmarshal(body, &m)
  6310  	if err != nil {
  6311  		return err
  6312  	}
  6313  	for k, v := range m {
  6314  		switch k {
  6315  		case "properties":
  6316  			if v != nil {
  6317  				properties, err := unmarshalBasicProtectableContainer(*v)
  6318  				if err != nil {
  6319  					return err
  6320  				}
  6321  				pcr.Properties = properties
  6322  			}
  6323  		case "id":
  6324  			if v != nil {
  6325  				var ID string
  6326  				err = json.Unmarshal(*v, &ID)
  6327  				if err != nil {
  6328  					return err
  6329  				}
  6330  				pcr.ID = &ID
  6331  			}
  6332  		case "name":
  6333  			if v != nil {
  6334  				var name string
  6335  				err = json.Unmarshal(*v, &name)
  6336  				if err != nil {
  6337  					return err
  6338  				}
  6339  				pcr.Name = &name
  6340  			}
  6341  		case "type":
  6342  			if v != nil {
  6343  				var typeVar string
  6344  				err = json.Unmarshal(*v, &typeVar)
  6345  				if err != nil {
  6346  					return err
  6347  				}
  6348  				pcr.Type = &typeVar
  6349  			}
  6350  		case "location":
  6351  			if v != nil {
  6352  				var location string
  6353  				err = json.Unmarshal(*v, &location)
  6354  				if err != nil {
  6355  					return err
  6356  				}
  6357  				pcr.Location = &location
  6358  			}
  6359  		case "tags":
  6360  			if v != nil {
  6361  				var tags map[string]*string
  6362  				err = json.Unmarshal(*v, &tags)
  6363  				if err != nil {
  6364  					return err
  6365  				}
  6366  				pcr.Tags = tags
  6367  			}
  6368  		case "eTag":
  6369  			if v != nil {
  6370  				var eTag string
  6371  				err = json.Unmarshal(*v, &eTag)
  6372  				if err != nil {
  6373  					return err
  6374  				}
  6375  				pcr.ETag = &eTag
  6376  			}
  6377  		}
  6378  	}
  6379  
  6380  	return nil
  6381  }
  6382  
  6383  // ProtectableContainerResourceList list of ProtectableContainer resources
  6384  type ProtectableContainerResourceList struct {
  6385  	autorest.Response `json:"-"`
  6386  	// Value - List of resources.
  6387  	Value *[]ProtectableContainerResource `json:"value,omitempty"`
  6388  	// NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources.
  6389  	NextLink *string `json:"nextLink,omitempty"`
  6390  }
  6391  
  6392  // ProtectableContainerResourceListIterator provides access to a complete listing of
  6393  // ProtectableContainerResource values.
  6394  type ProtectableContainerResourceListIterator struct {
  6395  	i    int
  6396  	page ProtectableContainerResourceListPage
  6397  }
  6398  
  6399  // NextWithContext advances to the next value.  If there was an error making
  6400  // the request the iterator does not advance and the error is returned.
  6401  func (iter *ProtectableContainerResourceListIterator) NextWithContext(ctx context.Context) (err error) {
  6402  	if tracing.IsEnabled() {
  6403  		ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableContainerResourceListIterator.NextWithContext")
  6404  		defer func() {
  6405  			sc := -1
  6406  			if iter.Response().Response.Response != nil {
  6407  				sc = iter.Response().Response.Response.StatusCode
  6408  			}
  6409  			tracing.EndSpan(ctx, sc, err)
  6410  		}()
  6411  	}
  6412  	iter.i++
  6413  	if iter.i < len(iter.page.Values()) {
  6414  		return nil
  6415  	}
  6416  	err = iter.page.NextWithContext(ctx)
  6417  	if err != nil {
  6418  		iter.i--
  6419  		return err
  6420  	}
  6421  	iter.i = 0
  6422  	return nil
  6423  }
  6424  
  6425  // Next advances to the next value.  If there was an error making
  6426  // the request the iterator does not advance and the error is returned.
  6427  // Deprecated: Use NextWithContext() instead.
  6428  func (iter *ProtectableContainerResourceListIterator) Next() error {
  6429  	return iter.NextWithContext(context.Background())
  6430  }
  6431  
  6432  // NotDone returns true if the enumeration should be started or is not yet complete.
  6433  func (iter ProtectableContainerResourceListIterator) NotDone() bool {
  6434  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  6435  }
  6436  
  6437  // Response returns the raw server response from the last page request.
  6438  func (iter ProtectableContainerResourceListIterator) Response() ProtectableContainerResourceList {
  6439  	return iter.page.Response()
  6440  }
  6441  
  6442  // Value returns the current value or a zero-initialized value if the
  6443  // iterator has advanced beyond the end of the collection.
  6444  func (iter ProtectableContainerResourceListIterator) Value() ProtectableContainerResource {
  6445  	if !iter.page.NotDone() {
  6446  		return ProtectableContainerResource{}
  6447  	}
  6448  	return iter.page.Values()[iter.i]
  6449  }
  6450  
  6451  // Creates a new instance of the ProtectableContainerResourceListIterator type.
  6452  func NewProtectableContainerResourceListIterator(page ProtectableContainerResourceListPage) ProtectableContainerResourceListIterator {
  6453  	return ProtectableContainerResourceListIterator{page: page}
  6454  }
  6455  
  6456  // IsEmpty returns true if the ListResult contains no values.
  6457  func (pcrl ProtectableContainerResourceList) IsEmpty() bool {
  6458  	return pcrl.Value == nil || len(*pcrl.Value) == 0
  6459  }
  6460  
  6461  // hasNextLink returns true if the NextLink is not empty.
  6462  func (pcrl ProtectableContainerResourceList) hasNextLink() bool {
  6463  	return pcrl.NextLink != nil && len(*pcrl.NextLink) != 0
  6464  }
  6465  
  6466  // protectableContainerResourceListPreparer prepares a request to retrieve the next set of results.
  6467  // It returns nil if no more results exist.
  6468  func (pcrl ProtectableContainerResourceList) protectableContainerResourceListPreparer(ctx context.Context) (*http.Request, error) {
  6469  	if !pcrl.hasNextLink() {
  6470  		return nil, nil
  6471  	}
  6472  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  6473  		autorest.AsJSON(),
  6474  		autorest.AsGet(),
  6475  		autorest.WithBaseURL(to.String(pcrl.NextLink)))
  6476  }
  6477  
  6478  // ProtectableContainerResourceListPage contains a page of ProtectableContainerResource values.
  6479  type ProtectableContainerResourceListPage struct {
  6480  	fn   func(context.Context, ProtectableContainerResourceList) (ProtectableContainerResourceList, error)
  6481  	pcrl ProtectableContainerResourceList
  6482  }
  6483  
  6484  // NextWithContext advances to the next page of values.  If there was an error making
  6485  // the request the page does not advance and the error is returned.
  6486  func (page *ProtectableContainerResourceListPage) NextWithContext(ctx context.Context) (err error) {
  6487  	if tracing.IsEnabled() {
  6488  		ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableContainerResourceListPage.NextWithContext")
  6489  		defer func() {
  6490  			sc := -1
  6491  			if page.Response().Response.Response != nil {
  6492  				sc = page.Response().Response.Response.StatusCode
  6493  			}
  6494  			tracing.EndSpan(ctx, sc, err)
  6495  		}()
  6496  	}
  6497  	for {
  6498  		next, err := page.fn(ctx, page.pcrl)
  6499  		if err != nil {
  6500  			return err
  6501  		}
  6502  		page.pcrl = next
  6503  		if !next.hasNextLink() || !next.IsEmpty() {
  6504  			break
  6505  		}
  6506  	}
  6507  	return nil
  6508  }
  6509  
  6510  // Next advances to the next page of values.  If there was an error making
  6511  // the request the page does not advance and the error is returned.
  6512  // Deprecated: Use NextWithContext() instead.
  6513  func (page *ProtectableContainerResourceListPage) Next() error {
  6514  	return page.NextWithContext(context.Background())
  6515  }
  6516  
  6517  // NotDone returns true if the page enumeration should be started or is not yet complete.
  6518  func (page ProtectableContainerResourceListPage) NotDone() bool {
  6519  	return !page.pcrl.IsEmpty()
  6520  }
  6521  
  6522  // Response returns the raw server response from the last page request.
  6523  func (page ProtectableContainerResourceListPage) Response() ProtectableContainerResourceList {
  6524  	return page.pcrl
  6525  }
  6526  
  6527  // Values returns the slice of values for the current page or nil if there are no values.
  6528  func (page ProtectableContainerResourceListPage) Values() []ProtectableContainerResource {
  6529  	if page.pcrl.IsEmpty() {
  6530  		return nil
  6531  	}
  6532  	return *page.pcrl.Value
  6533  }
  6534  
  6535  // Creates a new instance of the ProtectableContainerResourceListPage type.
  6536  func NewProtectableContainerResourceListPage(cur ProtectableContainerResourceList, getNextPage func(context.Context, ProtectableContainerResourceList) (ProtectableContainerResourceList, error)) ProtectableContainerResourceListPage {
  6537  	return ProtectableContainerResourceListPage{
  6538  		fn:   getNextPage,
  6539  		pcrl: cur,
  6540  	}
  6541  }
  6542  
  6543  // BasicProtectionContainer base class for container with backup items. Containers with specific workloads are derived
  6544  // from this class.
  6545  type BasicProtectionContainer interface {
  6546  	AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool)
  6547  	AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool)
  6548  	AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool)
  6549  	AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool)
  6550  	AsAzureSQLContainer() (*AzureSQLContainer, bool)
  6551  	AsAzureStorageContainer() (*AzureStorageContainer, bool)
  6552  	AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool)
  6553  	AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool)
  6554  	AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool)
  6555  	AsDpmContainer() (*DpmContainer, bool)
  6556  	AsBasicDpmContainer() (BasicDpmContainer, bool)
  6557  	AsGenericContainer() (*GenericContainer, bool)
  6558  	AsIaaSVMContainer() (*IaaSVMContainer, bool)
  6559  	AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool)
  6560  	AsMabContainer() (*MabContainer, bool)
  6561  	AsProtectionContainer() (*ProtectionContainer, bool)
  6562  }
  6563  
  6564  // ProtectionContainer base class for container with backup items. Containers with specific workloads are
  6565  // derived from this class.
  6566  type ProtectionContainer struct {
  6567  	// FriendlyName - Friendly name of the container.
  6568  	FriendlyName *string `json:"friendlyName,omitempty"`
  6569  	// BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
  6570  	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
  6571  	// RegistrationStatus - Status of registration of the container with the Recovery Services Vault.
  6572  	RegistrationStatus *string `json:"registrationStatus,omitempty"`
  6573  	// HealthStatus - Status of health of the container.
  6574  	HealthStatus *string `json:"healthStatus,omitempty"`
  6575  	// ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1'
  6576  	ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
  6577  }
  6578  
  6579  func unmarshalBasicProtectionContainer(body []byte) (BasicProtectionContainer, error) {
  6580  	var m map[string]interface{}
  6581  	err := json.Unmarshal(body, &m)
  6582  	if err != nil {
  6583  		return nil, err
  6584  	}
  6585  
  6586  	switch m["containerType"] {
  6587  	case string(ContainerTypeAzureBackupServerContainer1):
  6588  		var absc AzureBackupServerContainer
  6589  		err := json.Unmarshal(body, &absc)
  6590  		return absc, err
  6591  	case string(ContainerTypeMicrosoftClassicComputevirtualMachines):
  6592  		var aisccvc AzureIaaSClassicComputeVMContainer
  6593  		err := json.Unmarshal(body, &aisccvc)
  6594  		return aisccvc, err
  6595  	case string(ContainerTypeMicrosoftComputevirtualMachines):
  6596  		var aiscvc AzureIaaSComputeVMContainer
  6597  		err := json.Unmarshal(body, &aiscvc)
  6598  		return aiscvc, err
  6599  	case string(ContainerTypeSQLAGWorkLoadContainer1):
  6600  		var aswcpc AzureSQLAGWorkloadContainerProtectionContainer
  6601  		err := json.Unmarshal(body, &aswcpc)
  6602  		return aswcpc, err
  6603  	case string(ContainerTypeAzureSQLContainer1):
  6604  		var asc AzureSQLContainer
  6605  		err := json.Unmarshal(body, &asc)
  6606  		return asc, err
  6607  	case string(ContainerTypeStorageContainer1):
  6608  		var asc AzureStorageContainer
  6609  		err := json.Unmarshal(body, &asc)
  6610  		return asc, err
  6611  	case string(ContainerTypeVMAppContainer1):
  6612  		var avacpc AzureVMAppContainerProtectionContainer
  6613  		err := json.Unmarshal(body, &avacpc)
  6614  		return avacpc, err
  6615  	case string(ContainerTypeAzureWorkloadContainer):
  6616  		var awc AzureWorkloadContainer
  6617  		err := json.Unmarshal(body, &awc)
  6618  		return awc, err
  6619  	case string(ContainerTypeDPMContainer1):
  6620  		var dc DpmContainer
  6621  		err := json.Unmarshal(body, &dc)
  6622  		return dc, err
  6623  	case string(ContainerTypeGenericContainer1):
  6624  		var gc GenericContainer
  6625  		err := json.Unmarshal(body, &gc)
  6626  		return gc, err
  6627  	case string(ContainerTypeIaaSVMContainer):
  6628  		var isc IaaSVMContainer
  6629  		err := json.Unmarshal(body, &isc)
  6630  		return isc, err
  6631  	case string(ContainerTypeWindows1):
  6632  		var mc MabContainer
  6633  		err := json.Unmarshal(body, &mc)
  6634  		return mc, err
  6635  	default:
  6636  		var pc ProtectionContainer
  6637  		err := json.Unmarshal(body, &pc)
  6638  		return pc, err
  6639  	}
  6640  }
  6641  func unmarshalBasicProtectionContainerArray(body []byte) ([]BasicProtectionContainer, error) {
  6642  	var rawMessages []*json.RawMessage
  6643  	err := json.Unmarshal(body, &rawMessages)
  6644  	if err != nil {
  6645  		return nil, err
  6646  	}
  6647  
  6648  	pcArray := make([]BasicProtectionContainer, len(rawMessages))
  6649  
  6650  	for index, rawMessage := range rawMessages {
  6651  		pc, err := unmarshalBasicProtectionContainer(*rawMessage)
  6652  		if err != nil {
  6653  			return nil, err
  6654  		}
  6655  		pcArray[index] = pc
  6656  	}
  6657  	return pcArray, nil
  6658  }
  6659  
  6660  // MarshalJSON is the custom marshaler for ProtectionContainer.
  6661  func (pc ProtectionContainer) MarshalJSON() ([]byte, error) {
  6662  	pc.ContainerType = ContainerTypeProtectionContainer
  6663  	objectMap := make(map[string]interface{})
  6664  	if pc.FriendlyName != nil {
  6665  		objectMap["friendlyName"] = pc.FriendlyName
  6666  	}
  6667  	if pc.BackupManagementType != "" {
  6668  		objectMap["backupManagementType"] = pc.BackupManagementType
  6669  	}
  6670  	if pc.RegistrationStatus != nil {
  6671  		objectMap["registrationStatus"] = pc.RegistrationStatus
  6672  	}
  6673  	if pc.HealthStatus != nil {
  6674  		objectMap["healthStatus"] = pc.HealthStatus
  6675  	}
  6676  	if pc.ContainerType != "" {
  6677  		objectMap["containerType"] = pc.ContainerType
  6678  	}
  6679  	return json.Marshal(objectMap)
  6680  }
  6681  
  6682  // AsAzureBackupServerContainer is the BasicProtectionContainer implementation for ProtectionContainer.
  6683  func (pc ProtectionContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
  6684  	return nil, false
  6685  }
  6686  
  6687  // AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for ProtectionContainer.
  6688  func (pc ProtectionContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
  6689  	return nil, false
  6690  }
  6691  
  6692  // AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for ProtectionContainer.
  6693  func (pc ProtectionContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
  6694  	return nil, false
  6695  }
  6696  
  6697  // AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for ProtectionContainer.
  6698  func (pc ProtectionContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
  6699  	return nil, false
  6700  }
  6701  
  6702  // AsAzureSQLContainer is the BasicProtectionContainer implementation for ProtectionContainer.
  6703  func (pc ProtectionContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
  6704  	return nil, false
  6705  }
  6706  
  6707  // AsAzureStorageContainer is the BasicProtectionContainer implementation for ProtectionContainer.
  6708  func (pc ProtectionContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
  6709  	return nil, false
  6710  }
  6711  
  6712  // AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for ProtectionContainer.
  6713  func (pc ProtectionContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
  6714  	return nil, false
  6715  }
  6716  
  6717  // AsAzureWorkloadContainer is the BasicProtectionContainer implementation for ProtectionContainer.
  6718  func (pc ProtectionContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
  6719  	return nil, false
  6720  }
  6721  
  6722  // AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for ProtectionContainer.
  6723  func (pc ProtectionContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
  6724  	return nil, false
  6725  }
  6726  
  6727  // AsDpmContainer is the BasicProtectionContainer implementation for ProtectionContainer.
  6728  func (pc ProtectionContainer) AsDpmContainer() (*DpmContainer, bool) {
  6729  	return nil, false
  6730  }
  6731  
  6732  // AsBasicDpmContainer is the BasicProtectionContainer implementation for ProtectionContainer.
  6733  func (pc ProtectionContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
  6734  	return nil, false
  6735  }
  6736  
  6737  // AsGenericContainer is the BasicProtectionContainer implementation for ProtectionContainer.
  6738  func (pc ProtectionContainer) AsGenericContainer() (*GenericContainer, bool) {
  6739  	return nil, false
  6740  }
  6741  
  6742  // AsIaaSVMContainer is the BasicProtectionContainer implementation for ProtectionContainer.
  6743  func (pc ProtectionContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
  6744  	return nil, false
  6745  }
  6746  
  6747  // AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for ProtectionContainer.
  6748  func (pc ProtectionContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
  6749  	return nil, false
  6750  }
  6751  
  6752  // AsMabContainer is the BasicProtectionContainer implementation for ProtectionContainer.
  6753  func (pc ProtectionContainer) AsMabContainer() (*MabContainer, bool) {
  6754  	return nil, false
  6755  }
  6756  
  6757  // AsProtectionContainer is the BasicProtectionContainer implementation for ProtectionContainer.
  6758  func (pc ProtectionContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
  6759  	return &pc, true
  6760  }
  6761  
  6762  // AsBasicProtectionContainer is the BasicProtectionContainer implementation for ProtectionContainer.
  6763  func (pc ProtectionContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
  6764  	return &pc, true
  6765  }
  6766  
  6767  // ProtectionContainerResource base class for container with backup items. Containers with specific
  6768  // workloads are derived from this class.
  6769  type ProtectionContainerResource struct {
  6770  	autorest.Response `json:"-"`
  6771  	// Properties - ProtectionContainerResource properties
  6772  	Properties BasicProtectionContainer `json:"properties,omitempty"`
  6773  	// ID - READ-ONLY; Resource Id represents the complete path to the resource.
  6774  	ID *string `json:"id,omitempty"`
  6775  	// Name - READ-ONLY; Resource name associated with the resource.
  6776  	Name *string `json:"name,omitempty"`
  6777  	// Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/...
  6778  	Type *string `json:"type,omitempty"`
  6779  	// Location - Resource location.
  6780  	Location *string `json:"location,omitempty"`
  6781  	// Tags - Resource tags.
  6782  	Tags map[string]*string `json:"tags"`
  6783  	// ETag - Optional ETag.
  6784  	ETag *string `json:"eTag,omitempty"`
  6785  }
  6786  
  6787  // MarshalJSON is the custom marshaler for ProtectionContainerResource.
  6788  func (pcr ProtectionContainerResource) MarshalJSON() ([]byte, error) {
  6789  	objectMap := make(map[string]interface{})
  6790  	objectMap["properties"] = pcr.Properties
  6791  	if pcr.Location != nil {
  6792  		objectMap["location"] = pcr.Location
  6793  	}
  6794  	if pcr.Tags != nil {
  6795  		objectMap["tags"] = pcr.Tags
  6796  	}
  6797  	if pcr.ETag != nil {
  6798  		objectMap["eTag"] = pcr.ETag
  6799  	}
  6800  	return json.Marshal(objectMap)
  6801  }
  6802  
  6803  // UnmarshalJSON is the custom unmarshaler for ProtectionContainerResource struct.
  6804  func (pcr *ProtectionContainerResource) UnmarshalJSON(body []byte) error {
  6805  	var m map[string]*json.RawMessage
  6806  	err := json.Unmarshal(body, &m)
  6807  	if err != nil {
  6808  		return err
  6809  	}
  6810  	for k, v := range m {
  6811  		switch k {
  6812  		case "properties":
  6813  			if v != nil {
  6814  				properties, err := unmarshalBasicProtectionContainer(*v)
  6815  				if err != nil {
  6816  					return err
  6817  				}
  6818  				pcr.Properties = properties
  6819  			}
  6820  		case "id":
  6821  			if v != nil {
  6822  				var ID string
  6823  				err = json.Unmarshal(*v, &ID)
  6824  				if err != nil {
  6825  					return err
  6826  				}
  6827  				pcr.ID = &ID
  6828  			}
  6829  		case "name":
  6830  			if v != nil {
  6831  				var name string
  6832  				err = json.Unmarshal(*v, &name)
  6833  				if err != nil {
  6834  					return err
  6835  				}
  6836  				pcr.Name = &name
  6837  			}
  6838  		case "type":
  6839  			if v != nil {
  6840  				var typeVar string
  6841  				err = json.Unmarshal(*v, &typeVar)
  6842  				if err != nil {
  6843  					return err
  6844  				}
  6845  				pcr.Type = &typeVar
  6846  			}
  6847  		case "location":
  6848  			if v != nil {
  6849  				var location string
  6850  				err = json.Unmarshal(*v, &location)
  6851  				if err != nil {
  6852  					return err
  6853  				}
  6854  				pcr.Location = &location
  6855  			}
  6856  		case "tags":
  6857  			if v != nil {
  6858  				var tags map[string]*string
  6859  				err = json.Unmarshal(*v, &tags)
  6860  				if err != nil {
  6861  					return err
  6862  				}
  6863  				pcr.Tags = tags
  6864  			}
  6865  		case "eTag":
  6866  			if v != nil {
  6867  				var eTag string
  6868  				err = json.Unmarshal(*v, &eTag)
  6869  				if err != nil {
  6870  					return err
  6871  				}
  6872  				pcr.ETag = &eTag
  6873  			}
  6874  		}
  6875  	}
  6876  
  6877  	return nil
  6878  }
  6879  
  6880  // ProtectionContainerResourceList list of ProtectionContainer resources
  6881  type ProtectionContainerResourceList struct {
  6882  	autorest.Response `json:"-"`
  6883  	// Value - List of resources.
  6884  	Value *[]ProtectionContainerResource `json:"value,omitempty"`
  6885  	// NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources.
  6886  	NextLink *string `json:"nextLink,omitempty"`
  6887  }
  6888  
  6889  // ProtectionContainerResourceListIterator provides access to a complete listing of
  6890  // ProtectionContainerResource values.
  6891  type ProtectionContainerResourceListIterator struct {
  6892  	i    int
  6893  	page ProtectionContainerResourceListPage
  6894  }
  6895  
  6896  // NextWithContext advances to the next value.  If there was an error making
  6897  // the request the iterator does not advance and the error is returned.
  6898  func (iter *ProtectionContainerResourceListIterator) NextWithContext(ctx context.Context) (err error) {
  6899  	if tracing.IsEnabled() {
  6900  		ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerResourceListIterator.NextWithContext")
  6901  		defer func() {
  6902  			sc := -1
  6903  			if iter.Response().Response.Response != nil {
  6904  				sc = iter.Response().Response.Response.StatusCode
  6905  			}
  6906  			tracing.EndSpan(ctx, sc, err)
  6907  		}()
  6908  	}
  6909  	iter.i++
  6910  	if iter.i < len(iter.page.Values()) {
  6911  		return nil
  6912  	}
  6913  	err = iter.page.NextWithContext(ctx)
  6914  	if err != nil {
  6915  		iter.i--
  6916  		return err
  6917  	}
  6918  	iter.i = 0
  6919  	return nil
  6920  }
  6921  
  6922  // Next advances to the next value.  If there was an error making
  6923  // the request the iterator does not advance and the error is returned.
  6924  // Deprecated: Use NextWithContext() instead.
  6925  func (iter *ProtectionContainerResourceListIterator) Next() error {
  6926  	return iter.NextWithContext(context.Background())
  6927  }
  6928  
  6929  // NotDone returns true if the enumeration should be started or is not yet complete.
  6930  func (iter ProtectionContainerResourceListIterator) NotDone() bool {
  6931  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  6932  }
  6933  
  6934  // Response returns the raw server response from the last page request.
  6935  func (iter ProtectionContainerResourceListIterator) Response() ProtectionContainerResourceList {
  6936  	return iter.page.Response()
  6937  }
  6938  
  6939  // Value returns the current value or a zero-initialized value if the
  6940  // iterator has advanced beyond the end of the collection.
  6941  func (iter ProtectionContainerResourceListIterator) Value() ProtectionContainerResource {
  6942  	if !iter.page.NotDone() {
  6943  		return ProtectionContainerResource{}
  6944  	}
  6945  	return iter.page.Values()[iter.i]
  6946  }
  6947  
  6948  // Creates a new instance of the ProtectionContainerResourceListIterator type.
  6949  func NewProtectionContainerResourceListIterator(page ProtectionContainerResourceListPage) ProtectionContainerResourceListIterator {
  6950  	return ProtectionContainerResourceListIterator{page: page}
  6951  }
  6952  
  6953  // IsEmpty returns true if the ListResult contains no values.
  6954  func (pcrl ProtectionContainerResourceList) IsEmpty() bool {
  6955  	return pcrl.Value == nil || len(*pcrl.Value) == 0
  6956  }
  6957  
  6958  // hasNextLink returns true if the NextLink is not empty.
  6959  func (pcrl ProtectionContainerResourceList) hasNextLink() bool {
  6960  	return pcrl.NextLink != nil && len(*pcrl.NextLink) != 0
  6961  }
  6962  
  6963  // protectionContainerResourceListPreparer prepares a request to retrieve the next set of results.
  6964  // It returns nil if no more results exist.
  6965  func (pcrl ProtectionContainerResourceList) protectionContainerResourceListPreparer(ctx context.Context) (*http.Request, error) {
  6966  	if !pcrl.hasNextLink() {
  6967  		return nil, nil
  6968  	}
  6969  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  6970  		autorest.AsJSON(),
  6971  		autorest.AsGet(),
  6972  		autorest.WithBaseURL(to.String(pcrl.NextLink)))
  6973  }
  6974  
  6975  // ProtectionContainerResourceListPage contains a page of ProtectionContainerResource values.
  6976  type ProtectionContainerResourceListPage struct {
  6977  	fn   func(context.Context, ProtectionContainerResourceList) (ProtectionContainerResourceList, error)
  6978  	pcrl ProtectionContainerResourceList
  6979  }
  6980  
  6981  // NextWithContext advances to the next page of values.  If there was an error making
  6982  // the request the page does not advance and the error is returned.
  6983  func (page *ProtectionContainerResourceListPage) NextWithContext(ctx context.Context) (err error) {
  6984  	if tracing.IsEnabled() {
  6985  		ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerResourceListPage.NextWithContext")
  6986  		defer func() {
  6987  			sc := -1
  6988  			if page.Response().Response.Response != nil {
  6989  				sc = page.Response().Response.Response.StatusCode
  6990  			}
  6991  			tracing.EndSpan(ctx, sc, err)
  6992  		}()
  6993  	}
  6994  	for {
  6995  		next, err := page.fn(ctx, page.pcrl)
  6996  		if err != nil {
  6997  			return err
  6998  		}
  6999  		page.pcrl = next
  7000  		if !next.hasNextLink() || !next.IsEmpty() {
  7001  			break
  7002  		}
  7003  	}
  7004  	return nil
  7005  }
  7006  
  7007  // Next advances to the next page of values.  If there was an error making
  7008  // the request the page does not advance and the error is returned.
  7009  // Deprecated: Use NextWithContext() instead.
  7010  func (page *ProtectionContainerResourceListPage) Next() error {
  7011  	return page.NextWithContext(context.Background())
  7012  }
  7013  
  7014  // NotDone returns true if the page enumeration should be started or is not yet complete.
  7015  func (page ProtectionContainerResourceListPage) NotDone() bool {
  7016  	return !page.pcrl.IsEmpty()
  7017  }
  7018  
  7019  // Response returns the raw server response from the last page request.
  7020  func (page ProtectionContainerResourceListPage) Response() ProtectionContainerResourceList {
  7021  	return page.pcrl
  7022  }
  7023  
  7024  // Values returns the slice of values for the current page or nil if there are no values.
  7025  func (page ProtectionContainerResourceListPage) Values() []ProtectionContainerResource {
  7026  	if page.pcrl.IsEmpty() {
  7027  		return nil
  7028  	}
  7029  	return *page.pcrl.Value
  7030  }
  7031  
  7032  // Creates a new instance of the ProtectionContainerResourceListPage type.
  7033  func NewProtectionContainerResourceListPage(cur ProtectionContainerResourceList, getNextPage func(context.Context, ProtectionContainerResourceList) (ProtectionContainerResourceList, error)) ProtectionContainerResourceListPage {
  7034  	return ProtectionContainerResourceListPage{
  7035  		fn:   getNextPage,
  7036  		pcrl: cur,
  7037  	}
  7038  }
  7039  
  7040  // BasicRecoveryPoint base class for backup copies. Workload-specific backup copies are derived from this class.
  7041  type BasicRecoveryPoint interface {
  7042  	AsRecoveryPoint() (*RecoveryPoint, bool)
  7043  }
  7044  
  7045  // RecoveryPoint base class for backup copies. Workload-specific backup copies are derived from this class.
  7046  type RecoveryPoint struct {
  7047  	// ObjectType - Possible values include: 'ObjectTypeRecoveryPoint'
  7048  	ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
  7049  }
  7050  
  7051  func unmarshalBasicRecoveryPoint(body []byte) (BasicRecoveryPoint, error) {
  7052  	var m map[string]interface{}
  7053  	err := json.Unmarshal(body, &m)
  7054  	if err != nil {
  7055  		return nil, err
  7056  	}
  7057  
  7058  	switch m["objectType"] {
  7059  	default:
  7060  		var rp RecoveryPoint
  7061  		err := json.Unmarshal(body, &rp)
  7062  		return rp, err
  7063  	}
  7064  }
  7065  func unmarshalBasicRecoveryPointArray(body []byte) ([]BasicRecoveryPoint, error) {
  7066  	var rawMessages []*json.RawMessage
  7067  	err := json.Unmarshal(body, &rawMessages)
  7068  	if err != nil {
  7069  		return nil, err
  7070  	}
  7071  
  7072  	rpArray := make([]BasicRecoveryPoint, len(rawMessages))
  7073  
  7074  	for index, rawMessage := range rawMessages {
  7075  		rp, err := unmarshalBasicRecoveryPoint(*rawMessage)
  7076  		if err != nil {
  7077  			return nil, err
  7078  		}
  7079  		rpArray[index] = rp
  7080  	}
  7081  	return rpArray, nil
  7082  }
  7083  
  7084  // MarshalJSON is the custom marshaler for RecoveryPoint.
  7085  func (rp RecoveryPoint) MarshalJSON() ([]byte, error) {
  7086  	rp.ObjectType = ObjectTypeRecoveryPoint
  7087  	objectMap := make(map[string]interface{})
  7088  	if rp.ObjectType != "" {
  7089  		objectMap["objectType"] = rp.ObjectType
  7090  	}
  7091  	return json.Marshal(objectMap)
  7092  }
  7093  
  7094  // AsRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint.
  7095  func (rp RecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
  7096  	return &rp, true
  7097  }
  7098  
  7099  // AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint.
  7100  func (rp RecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
  7101  	return &rp, true
  7102  }
  7103  
  7104  // BasicRequest base class for backup request. Workload-specific backup requests are derived from this class.
  7105  type BasicRequest interface {
  7106  	AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool)
  7107  	AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool)
  7108  	AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool)
  7109  	AsRequest() (*Request, bool)
  7110  }
  7111  
  7112  // Request base class for backup request. Workload-specific backup requests are derived from this class.
  7113  type Request struct {
  7114  	// ObjectType - Possible values include: 'ObjectTypeBackupRequest', 'ObjectTypeAzureFileShareBackupRequest', 'ObjectTypeAzureWorkloadBackupRequest', 'ObjectTypeIaasVMBackupRequest'
  7115  	ObjectType ObjectType `json:"objectType,omitempty"`
  7116  }
  7117  
  7118  func unmarshalBasicRequest(body []byte) (BasicRequest, error) {
  7119  	var m map[string]interface{}
  7120  	err := json.Unmarshal(body, &m)
  7121  	if err != nil {
  7122  		return nil, err
  7123  	}
  7124  
  7125  	switch m["objectType"] {
  7126  	case string(ObjectTypeAzureFileShareBackupRequest):
  7127  		var afsbr AzureFileShareBackupRequest
  7128  		err := json.Unmarshal(body, &afsbr)
  7129  		return afsbr, err
  7130  	case string(ObjectTypeAzureWorkloadBackupRequest):
  7131  		var awbr AzureWorkloadBackupRequest
  7132  		err := json.Unmarshal(body, &awbr)
  7133  		return awbr, err
  7134  	case string(ObjectTypeIaasVMBackupRequest):
  7135  		var ivbr IaasVMBackupRequest
  7136  		err := json.Unmarshal(body, &ivbr)
  7137  		return ivbr, err
  7138  	default:
  7139  		var r Request
  7140  		err := json.Unmarshal(body, &r)
  7141  		return r, err
  7142  	}
  7143  }
  7144  func unmarshalBasicRequestArray(body []byte) ([]BasicRequest, error) {
  7145  	var rawMessages []*json.RawMessage
  7146  	err := json.Unmarshal(body, &rawMessages)
  7147  	if err != nil {
  7148  		return nil, err
  7149  	}
  7150  
  7151  	rArray := make([]BasicRequest, len(rawMessages))
  7152  
  7153  	for index, rawMessage := range rawMessages {
  7154  		r, err := unmarshalBasicRequest(*rawMessage)
  7155  		if err != nil {
  7156  			return nil, err
  7157  		}
  7158  		rArray[index] = r
  7159  	}
  7160  	return rArray, nil
  7161  }
  7162  
  7163  // MarshalJSON is the custom marshaler for Request.
  7164  func (r Request) MarshalJSON() ([]byte, error) {
  7165  	r.ObjectType = ObjectTypeBackupRequest
  7166  	objectMap := make(map[string]interface{})
  7167  	if r.ObjectType != "" {
  7168  		objectMap["objectType"] = r.ObjectType
  7169  	}
  7170  	return json.Marshal(objectMap)
  7171  }
  7172  
  7173  // AsAzureFileShareBackupRequest is the BasicRequest implementation for Request.
  7174  func (r Request) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) {
  7175  	return nil, false
  7176  }
  7177  
  7178  // AsAzureWorkloadBackupRequest is the BasicRequest implementation for Request.
  7179  func (r Request) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) {
  7180  	return nil, false
  7181  }
  7182  
  7183  // AsIaasVMBackupRequest is the BasicRequest implementation for Request.
  7184  func (r Request) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) {
  7185  	return nil, false
  7186  }
  7187  
  7188  // AsRequest is the BasicRequest implementation for Request.
  7189  func (r Request) AsRequest() (*Request, bool) {
  7190  	return &r, true
  7191  }
  7192  
  7193  // AsBasicRequest is the BasicRequest implementation for Request.
  7194  func (r Request) AsBasicRequest() (BasicRequest, bool) {
  7195  	return &r, true
  7196  }
  7197  
  7198  // RequestResource base class for backup request. Workload-specific backup requests are derived from this
  7199  // class.
  7200  type RequestResource struct {
  7201  	// Properties - BackupRequestResource properties
  7202  	Properties BasicRequest `json:"properties,omitempty"`
  7203  	// ID - READ-ONLY; Resource Id represents the complete path to the resource.
  7204  	ID *string `json:"id,omitempty"`
  7205  	// Name - READ-ONLY; Resource name associated with the resource.
  7206  	Name *string `json:"name,omitempty"`
  7207  	// Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/...
  7208  	Type *string `json:"type,omitempty"`
  7209  	// Location - Resource location.
  7210  	Location *string `json:"location,omitempty"`
  7211  	// Tags - Resource tags.
  7212  	Tags map[string]*string `json:"tags"`
  7213  	// ETag - Optional ETag.
  7214  	ETag *string `json:"eTag,omitempty"`
  7215  }
  7216  
  7217  // MarshalJSON is the custom marshaler for RequestResource.
  7218  func (rr RequestResource) MarshalJSON() ([]byte, error) {
  7219  	objectMap := make(map[string]interface{})
  7220  	objectMap["properties"] = rr.Properties
  7221  	if rr.Location != nil {
  7222  		objectMap["location"] = rr.Location
  7223  	}
  7224  	if rr.Tags != nil {
  7225  		objectMap["tags"] = rr.Tags
  7226  	}
  7227  	if rr.ETag != nil {
  7228  		objectMap["eTag"] = rr.ETag
  7229  	}
  7230  	return json.Marshal(objectMap)
  7231  }
  7232  
  7233  // UnmarshalJSON is the custom unmarshaler for RequestResource struct.
  7234  func (rr *RequestResource) UnmarshalJSON(body []byte) error {
  7235  	var m map[string]*json.RawMessage
  7236  	err := json.Unmarshal(body, &m)
  7237  	if err != nil {
  7238  		return err
  7239  	}
  7240  	for k, v := range m {
  7241  		switch k {
  7242  		case "properties":
  7243  			if v != nil {
  7244  				properties, err := unmarshalBasicRequest(*v)
  7245  				if err != nil {
  7246  					return err
  7247  				}
  7248  				rr.Properties = properties
  7249  			}
  7250  		case "id":
  7251  			if v != nil {
  7252  				var ID string
  7253  				err = json.Unmarshal(*v, &ID)
  7254  				if err != nil {
  7255  					return err
  7256  				}
  7257  				rr.ID = &ID
  7258  			}
  7259  		case "name":
  7260  			if v != nil {
  7261  				var name string
  7262  				err = json.Unmarshal(*v, &name)
  7263  				if err != nil {
  7264  					return err
  7265  				}
  7266  				rr.Name = &name
  7267  			}
  7268  		case "type":
  7269  			if v != nil {
  7270  				var typeVar string
  7271  				err = json.Unmarshal(*v, &typeVar)
  7272  				if err != nil {
  7273  					return err
  7274  				}
  7275  				rr.Type = &typeVar
  7276  			}
  7277  		case "location":
  7278  			if v != nil {
  7279  				var location string
  7280  				err = json.Unmarshal(*v, &location)
  7281  				if err != nil {
  7282  					return err
  7283  				}
  7284  				rr.Location = &location
  7285  			}
  7286  		case "tags":
  7287  			if v != nil {
  7288  				var tags map[string]*string
  7289  				err = json.Unmarshal(*v, &tags)
  7290  				if err != nil {
  7291  					return err
  7292  				}
  7293  				rr.Tags = tags
  7294  			}
  7295  		case "eTag":
  7296  			if v != nil {
  7297  				var eTag string
  7298  				err = json.Unmarshal(*v, &eTag)
  7299  				if err != nil {
  7300  					return err
  7301  				}
  7302  				rr.ETag = &eTag
  7303  			}
  7304  		}
  7305  	}
  7306  
  7307  	return nil
  7308  }
  7309  
  7310  // Resource ARM Resource.
  7311  type Resource struct {
  7312  	// ID - READ-ONLY; Resource Id represents the complete path to the resource.
  7313  	ID *string `json:"id,omitempty"`
  7314  	// Name - READ-ONLY; Resource name associated with the resource.
  7315  	Name *string `json:"name,omitempty"`
  7316  	// Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/...
  7317  	Type *string `json:"type,omitempty"`
  7318  	// Location - Resource location.
  7319  	Location *string `json:"location,omitempty"`
  7320  	// Tags - Resource tags.
  7321  	Tags map[string]*string `json:"tags"`
  7322  	// ETag - Optional ETag.
  7323  	ETag *string `json:"eTag,omitempty"`
  7324  }
  7325  
  7326  // MarshalJSON is the custom marshaler for Resource.
  7327  func (r Resource) MarshalJSON() ([]byte, error) {
  7328  	objectMap := make(map[string]interface{})
  7329  	if r.Location != nil {
  7330  		objectMap["location"] = r.Location
  7331  	}
  7332  	if r.Tags != nil {
  7333  		objectMap["tags"] = r.Tags
  7334  	}
  7335  	if r.ETag != nil {
  7336  		objectMap["eTag"] = r.ETag
  7337  	}
  7338  	return json.Marshal(objectMap)
  7339  }
  7340  
  7341  // ResourceConfig the resource storage details.
  7342  type ResourceConfig struct {
  7343  	// StorageModelType - Storage type. Possible values include: 'StorageTypeInvalid', 'StorageTypeGeoRedundant', 'StorageTypeLocallyRedundant'
  7344  	StorageModelType StorageType `json:"storageModelType,omitempty"`
  7345  	// StorageType - Storage type. Possible values include: 'StorageTypeInvalid', 'StorageTypeGeoRedundant', 'StorageTypeLocallyRedundant'
  7346  	StorageType StorageType `json:"storageType,omitempty"`
  7347  	// StorageTypeState - Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked. Possible values include: 'StorageTypeStateInvalid', 'StorageTypeStateLocked', 'StorageTypeStateUnlocked'
  7348  	StorageTypeState StorageTypeState `json:"storageTypeState,omitempty"`
  7349  }
  7350  
  7351  // ResourceConfigResource the resource storage details.
  7352  type ResourceConfigResource struct {
  7353  	autorest.Response `json:"-"`
  7354  	// Properties - BackupResourceConfigResource properties
  7355  	Properties *ResourceConfig `json:"properties,omitempty"`
  7356  	// ID - READ-ONLY; Resource Id represents the complete path to the resource.
  7357  	ID *string `json:"id,omitempty"`
  7358  	// Name - READ-ONLY; Resource name associated with the resource.
  7359  	Name *string `json:"name,omitempty"`
  7360  	// Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/...
  7361  	Type *string `json:"type,omitempty"`
  7362  	// Location - Resource location.
  7363  	Location *string `json:"location,omitempty"`
  7364  	// Tags - Resource tags.
  7365  	Tags map[string]*string `json:"tags"`
  7366  	// ETag - Optional ETag.
  7367  	ETag *string `json:"eTag,omitempty"`
  7368  }
  7369  
  7370  // MarshalJSON is the custom marshaler for ResourceConfigResource.
  7371  func (rcr ResourceConfigResource) MarshalJSON() ([]byte, error) {
  7372  	objectMap := make(map[string]interface{})
  7373  	if rcr.Properties != nil {
  7374  		objectMap["properties"] = rcr.Properties
  7375  	}
  7376  	if rcr.Location != nil {
  7377  		objectMap["location"] = rcr.Location
  7378  	}
  7379  	if rcr.Tags != nil {
  7380  		objectMap["tags"] = rcr.Tags
  7381  	}
  7382  	if rcr.ETag != nil {
  7383  		objectMap["eTag"] = rcr.ETag
  7384  	}
  7385  	return json.Marshal(objectMap)
  7386  }
  7387  
  7388  // ResourceList base for all lists of resources.
  7389  type ResourceList struct {
  7390  	// NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources.
  7391  	NextLink *string `json:"nextLink,omitempty"`
  7392  }
  7393  
  7394  // SQLDataDirectory sQLDataDirectory info
  7395  type SQLDataDirectory struct {
  7396  	// Type - Type of data directory mapping. Possible values include: 'SQLDataDirectoryTypeInvalid', 'SQLDataDirectoryTypeData', 'SQLDataDirectoryTypeLog'
  7397  	Type SQLDataDirectoryType `json:"type,omitempty"`
  7398  	// Path - File path
  7399  	Path *string `json:"path,omitempty"`
  7400  	// LogicalName - Logical name of the file
  7401  	LogicalName *string `json:"logicalName,omitempty"`
  7402  }
  7403  
  7404  // TokenInformation the token information details.
  7405  type TokenInformation struct {
  7406  	autorest.Response `json:"-"`
  7407  	// Token - Token value.
  7408  	Token *string `json:"token,omitempty"`
  7409  	// ExpiryTimeInUtcTicks - Expiry time of token.
  7410  	ExpiryTimeInUtcTicks *int64 `json:"expiryTimeInUtcTicks,omitempty"`
  7411  	// SecurityPIN - Security PIN
  7412  	SecurityPIN *string `json:"securityPIN,omitempty"`
  7413  }
  7414  
  7415  // WorkloadInquiryDetails details of an inquired protectable item.
  7416  type WorkloadInquiryDetails struct {
  7417  	// Type - Type of the Workload such as SQL, Oracle etc.
  7418  	Type *string `json:"type,omitempty"`
  7419  	// ItemCount - Contains the protectable item Count inside this Container.
  7420  	ItemCount *int64 `json:"itemCount,omitempty"`
  7421  	// InquiryValidation - Inquiry validation such as permissions and other backup validations.
  7422  	InquiryValidation *InquiryValidation `json:"inquiryValidation,omitempty"`
  7423  }
  7424  
  7425  // BasicWorkloadItem base class for backup item. Workload-specific backup items are derived from this class.
  7426  type BasicWorkloadItem interface {
  7427  	AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool)
  7428  	AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool)
  7429  	AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool)
  7430  	AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool)
  7431  	AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool)
  7432  	AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool)
  7433  	AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool)
  7434  	AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool)
  7435  	AsWorkloadItem() (*WorkloadItem, bool)
  7436  }
  7437  
  7438  // WorkloadItem base class for backup item. Workload-specific backup items are derived from this class.
  7439  type WorkloadItem struct {
  7440  	// BackupManagementType - Type of backup management to backup an item.
  7441  	BackupManagementType *string `json:"backupManagementType,omitempty"`
  7442  	// WorkloadType - Type of workload for the backup management
  7443  	WorkloadType *string `json:"workloadType,omitempty"`
  7444  	// FriendlyName - Friendly name of the backup item.
  7445  	FriendlyName *string `json:"friendlyName,omitempty"`
  7446  	// ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
  7447  	ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
  7448  	// WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1'
  7449  	WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
  7450  }
  7451  
  7452  func unmarshalBasicWorkloadItem(body []byte) (BasicWorkloadItem, error) {
  7453  	var m map[string]interface{}
  7454  	err := json.Unmarshal(body, &m)
  7455  	if err != nil {
  7456  		return nil, err
  7457  	}
  7458  
  7459  	switch m["workloadItemType"] {
  7460  	case string(WorkloadItemTypeAzureVMWorkloadItem):
  7461  		var avwi AzureVMWorkloadItem
  7462  		err := json.Unmarshal(body, &avwi)
  7463  		return avwi, err
  7464  	case string(WorkloadItemTypeSAPAseDatabase1):
  7465  		var avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem
  7466  		err := json.Unmarshal(body, &avwsadwi)
  7467  		return avwsadwi, err
  7468  	case string(WorkloadItemTypeSAPAseSystem1):
  7469  		var avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem
  7470  		err := json.Unmarshal(body, &avwsaswi)
  7471  		return avwsaswi, err
  7472  	case string(WorkloadItemTypeSAPHanaDatabase1):
  7473  		var avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem
  7474  		err := json.Unmarshal(body, &avwshdwi)
  7475  		return avwshdwi, err
  7476  	case string(WorkloadItemTypeSAPHanaSystem1):
  7477  		var avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem
  7478  		err := json.Unmarshal(body, &avwshswi)
  7479  		return avwshswi, err
  7480  	case string(WorkloadItemTypeSQLDataBase1):
  7481  		var avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem
  7482  		err := json.Unmarshal(body, &avwsdwi)
  7483  		return avwsdwi, err
  7484  	case string(WorkloadItemTypeSQLInstance1):
  7485  		var avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem
  7486  		err := json.Unmarshal(body, &avwsiwi)
  7487  		return avwsiwi, err
  7488  	default:
  7489  		var wi WorkloadItem
  7490  		err := json.Unmarshal(body, &wi)
  7491  		return wi, err
  7492  	}
  7493  }
  7494  func unmarshalBasicWorkloadItemArray(body []byte) ([]BasicWorkloadItem, error) {
  7495  	var rawMessages []*json.RawMessage
  7496  	err := json.Unmarshal(body, &rawMessages)
  7497  	if err != nil {
  7498  		return nil, err
  7499  	}
  7500  
  7501  	wiArray := make([]BasicWorkloadItem, len(rawMessages))
  7502  
  7503  	for index, rawMessage := range rawMessages {
  7504  		wi, err := unmarshalBasicWorkloadItem(*rawMessage)
  7505  		if err != nil {
  7506  			return nil, err
  7507  		}
  7508  		wiArray[index] = wi
  7509  	}
  7510  	return wiArray, nil
  7511  }
  7512  
  7513  // MarshalJSON is the custom marshaler for WorkloadItem.
  7514  func (wi WorkloadItem) MarshalJSON() ([]byte, error) {
  7515  	wi.WorkloadItemType = WorkloadItemTypeWorkloadItem
  7516  	objectMap := make(map[string]interface{})
  7517  	if wi.BackupManagementType != nil {
  7518  		objectMap["backupManagementType"] = wi.BackupManagementType
  7519  	}
  7520  	if wi.WorkloadType != nil {
  7521  		objectMap["workloadType"] = wi.WorkloadType
  7522  	}
  7523  	if wi.FriendlyName != nil {
  7524  		objectMap["friendlyName"] = wi.FriendlyName
  7525  	}
  7526  	if wi.ProtectionState != "" {
  7527  		objectMap["protectionState"] = wi.ProtectionState
  7528  	}
  7529  	if wi.WorkloadItemType != "" {
  7530  		objectMap["workloadItemType"] = wi.WorkloadItemType
  7531  	}
  7532  	return json.Marshal(objectMap)
  7533  }
  7534  
  7535  // AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem.
  7536  func (wi WorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
  7537  	return nil, false
  7538  }
  7539  
  7540  // AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem.
  7541  func (wi WorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
  7542  	return nil, false
  7543  }
  7544  
  7545  // AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem.
  7546  func (wi WorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
  7547  	return nil, false
  7548  }
  7549  
  7550  // AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem.
  7551  func (wi WorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
  7552  	return nil, false
  7553  }
  7554  
  7555  // AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem.
  7556  func (wi WorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
  7557  	return nil, false
  7558  }
  7559  
  7560  // AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem.
  7561  func (wi WorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
  7562  	return nil, false
  7563  }
  7564  
  7565  // AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem.
  7566  func (wi WorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
  7567  	return nil, false
  7568  }
  7569  
  7570  // AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem.
  7571  func (wi WorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
  7572  	return nil, false
  7573  }
  7574  
  7575  // AsWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem.
  7576  func (wi WorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
  7577  	return &wi, true
  7578  }
  7579  
  7580  // AsBasicWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem.
  7581  func (wi WorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
  7582  	return &wi, true
  7583  }
  7584  
  7585  // WorkloadItemResource base class for backup item. Workload-specific backup items are derived from this
  7586  // class.
  7587  type WorkloadItemResource struct {
  7588  	// Properties - WorkloadItemResource properties
  7589  	Properties BasicWorkloadItem `json:"properties,omitempty"`
  7590  	// ID - READ-ONLY; Resource Id represents the complete path to the resource.
  7591  	ID *string `json:"id,omitempty"`
  7592  	// Name - READ-ONLY; Resource name associated with the resource.
  7593  	Name *string `json:"name,omitempty"`
  7594  	// Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/...
  7595  	Type *string `json:"type,omitempty"`
  7596  	// Location - Resource location.
  7597  	Location *string `json:"location,omitempty"`
  7598  	// Tags - Resource tags.
  7599  	Tags map[string]*string `json:"tags"`
  7600  	// ETag - Optional ETag.
  7601  	ETag *string `json:"eTag,omitempty"`
  7602  }
  7603  
  7604  // MarshalJSON is the custom marshaler for WorkloadItemResource.
  7605  func (wir WorkloadItemResource) MarshalJSON() ([]byte, error) {
  7606  	objectMap := make(map[string]interface{})
  7607  	objectMap["properties"] = wir.Properties
  7608  	if wir.Location != nil {
  7609  		objectMap["location"] = wir.Location
  7610  	}
  7611  	if wir.Tags != nil {
  7612  		objectMap["tags"] = wir.Tags
  7613  	}
  7614  	if wir.ETag != nil {
  7615  		objectMap["eTag"] = wir.ETag
  7616  	}
  7617  	return json.Marshal(objectMap)
  7618  }
  7619  
  7620  // UnmarshalJSON is the custom unmarshaler for WorkloadItemResource struct.
  7621  func (wir *WorkloadItemResource) UnmarshalJSON(body []byte) error {
  7622  	var m map[string]*json.RawMessage
  7623  	err := json.Unmarshal(body, &m)
  7624  	if err != nil {
  7625  		return err
  7626  	}
  7627  	for k, v := range m {
  7628  		switch k {
  7629  		case "properties":
  7630  			if v != nil {
  7631  				properties, err := unmarshalBasicWorkloadItem(*v)
  7632  				if err != nil {
  7633  					return err
  7634  				}
  7635  				wir.Properties = properties
  7636  			}
  7637  		case "id":
  7638  			if v != nil {
  7639  				var ID string
  7640  				err = json.Unmarshal(*v, &ID)
  7641  				if err != nil {
  7642  					return err
  7643  				}
  7644  				wir.ID = &ID
  7645  			}
  7646  		case "name":
  7647  			if v != nil {
  7648  				var name string
  7649  				err = json.Unmarshal(*v, &name)
  7650  				if err != nil {
  7651  					return err
  7652  				}
  7653  				wir.Name = &name
  7654  			}
  7655  		case "type":
  7656  			if v != nil {
  7657  				var typeVar string
  7658  				err = json.Unmarshal(*v, &typeVar)
  7659  				if err != nil {
  7660  					return err
  7661  				}
  7662  				wir.Type = &typeVar
  7663  			}
  7664  		case "location":
  7665  			if v != nil {
  7666  				var location string
  7667  				err = json.Unmarshal(*v, &location)
  7668  				if err != nil {
  7669  					return err
  7670  				}
  7671  				wir.Location = &location
  7672  			}
  7673  		case "tags":
  7674  			if v != nil {
  7675  				var tags map[string]*string
  7676  				err = json.Unmarshal(*v, &tags)
  7677  				if err != nil {
  7678  					return err
  7679  				}
  7680  				wir.Tags = tags
  7681  			}
  7682  		case "eTag":
  7683  			if v != nil {
  7684  				var eTag string
  7685  				err = json.Unmarshal(*v, &eTag)
  7686  				if err != nil {
  7687  					return err
  7688  				}
  7689  				wir.ETag = &eTag
  7690  			}
  7691  		}
  7692  	}
  7693  
  7694  	return nil
  7695  }
  7696  
  7697  // WorkloadItemResourceList list of WorkloadItem resources
  7698  type WorkloadItemResourceList struct {
  7699  	autorest.Response `json:"-"`
  7700  	// Value - List of resources.
  7701  	Value *[]WorkloadItemResource `json:"value,omitempty"`
  7702  	// NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources.
  7703  	NextLink *string `json:"nextLink,omitempty"`
  7704  }
  7705  
  7706  // WorkloadItemResourceListIterator provides access to a complete listing of WorkloadItemResource values.
  7707  type WorkloadItemResourceListIterator struct {
  7708  	i    int
  7709  	page WorkloadItemResourceListPage
  7710  }
  7711  
  7712  // NextWithContext advances to the next value.  If there was an error making
  7713  // the request the iterator does not advance and the error is returned.
  7714  func (iter *WorkloadItemResourceListIterator) NextWithContext(ctx context.Context) (err error) {
  7715  	if tracing.IsEnabled() {
  7716  		ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadItemResourceListIterator.NextWithContext")
  7717  		defer func() {
  7718  			sc := -1
  7719  			if iter.Response().Response.Response != nil {
  7720  				sc = iter.Response().Response.Response.StatusCode
  7721  			}
  7722  			tracing.EndSpan(ctx, sc, err)
  7723  		}()
  7724  	}
  7725  	iter.i++
  7726  	if iter.i < len(iter.page.Values()) {
  7727  		return nil
  7728  	}
  7729  	err = iter.page.NextWithContext(ctx)
  7730  	if err != nil {
  7731  		iter.i--
  7732  		return err
  7733  	}
  7734  	iter.i = 0
  7735  	return nil
  7736  }
  7737  
  7738  // Next advances to the next value.  If there was an error making
  7739  // the request the iterator does not advance and the error is returned.
  7740  // Deprecated: Use NextWithContext() instead.
  7741  func (iter *WorkloadItemResourceListIterator) Next() error {
  7742  	return iter.NextWithContext(context.Background())
  7743  }
  7744  
  7745  // NotDone returns true if the enumeration should be started or is not yet complete.
  7746  func (iter WorkloadItemResourceListIterator) NotDone() bool {
  7747  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  7748  }
  7749  
  7750  // Response returns the raw server response from the last page request.
  7751  func (iter WorkloadItemResourceListIterator) Response() WorkloadItemResourceList {
  7752  	return iter.page.Response()
  7753  }
  7754  
  7755  // Value returns the current value or a zero-initialized value if the
  7756  // iterator has advanced beyond the end of the collection.
  7757  func (iter WorkloadItemResourceListIterator) Value() WorkloadItemResource {
  7758  	if !iter.page.NotDone() {
  7759  		return WorkloadItemResource{}
  7760  	}
  7761  	return iter.page.Values()[iter.i]
  7762  }
  7763  
  7764  // Creates a new instance of the WorkloadItemResourceListIterator type.
  7765  func NewWorkloadItemResourceListIterator(page WorkloadItemResourceListPage) WorkloadItemResourceListIterator {
  7766  	return WorkloadItemResourceListIterator{page: page}
  7767  }
  7768  
  7769  // IsEmpty returns true if the ListResult contains no values.
  7770  func (wirl WorkloadItemResourceList) IsEmpty() bool {
  7771  	return wirl.Value == nil || len(*wirl.Value) == 0
  7772  }
  7773  
  7774  // hasNextLink returns true if the NextLink is not empty.
  7775  func (wirl WorkloadItemResourceList) hasNextLink() bool {
  7776  	return wirl.NextLink != nil && len(*wirl.NextLink) != 0
  7777  }
  7778  
  7779  // workloadItemResourceListPreparer prepares a request to retrieve the next set of results.
  7780  // It returns nil if no more results exist.
  7781  func (wirl WorkloadItemResourceList) workloadItemResourceListPreparer(ctx context.Context) (*http.Request, error) {
  7782  	if !wirl.hasNextLink() {
  7783  		return nil, nil
  7784  	}
  7785  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  7786  		autorest.AsJSON(),
  7787  		autorest.AsGet(),
  7788  		autorest.WithBaseURL(to.String(wirl.NextLink)))
  7789  }
  7790  
  7791  // WorkloadItemResourceListPage contains a page of WorkloadItemResource values.
  7792  type WorkloadItemResourceListPage struct {
  7793  	fn   func(context.Context, WorkloadItemResourceList) (WorkloadItemResourceList, error)
  7794  	wirl WorkloadItemResourceList
  7795  }
  7796  
  7797  // NextWithContext advances to the next page of values.  If there was an error making
  7798  // the request the page does not advance and the error is returned.
  7799  func (page *WorkloadItemResourceListPage) NextWithContext(ctx context.Context) (err error) {
  7800  	if tracing.IsEnabled() {
  7801  		ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadItemResourceListPage.NextWithContext")
  7802  		defer func() {
  7803  			sc := -1
  7804  			if page.Response().Response.Response != nil {
  7805  				sc = page.Response().Response.Response.StatusCode
  7806  			}
  7807  			tracing.EndSpan(ctx, sc, err)
  7808  		}()
  7809  	}
  7810  	for {
  7811  		next, err := page.fn(ctx, page.wirl)
  7812  		if err != nil {
  7813  			return err
  7814  		}
  7815  		page.wirl = next
  7816  		if !next.hasNextLink() || !next.IsEmpty() {
  7817  			break
  7818  		}
  7819  	}
  7820  	return nil
  7821  }
  7822  
  7823  // Next advances to the next page of values.  If there was an error making
  7824  // the request the page does not advance and the error is returned.
  7825  // Deprecated: Use NextWithContext() instead.
  7826  func (page *WorkloadItemResourceListPage) Next() error {
  7827  	return page.NextWithContext(context.Background())
  7828  }
  7829  
  7830  // NotDone returns true if the page enumeration should be started or is not yet complete.
  7831  func (page WorkloadItemResourceListPage) NotDone() bool {
  7832  	return !page.wirl.IsEmpty()
  7833  }
  7834  
  7835  // Response returns the raw server response from the last page request.
  7836  func (page WorkloadItemResourceListPage) Response() WorkloadItemResourceList {
  7837  	return page.wirl
  7838  }
  7839  
  7840  // Values returns the slice of values for the current page or nil if there are no values.
  7841  func (page WorkloadItemResourceListPage) Values() []WorkloadItemResource {
  7842  	if page.wirl.IsEmpty() {
  7843  		return nil
  7844  	}
  7845  	return *page.wirl.Value
  7846  }
  7847  
  7848  // Creates a new instance of the WorkloadItemResourceListPage type.
  7849  func NewWorkloadItemResourceListPage(cur WorkloadItemResourceList, getNextPage func(context.Context, WorkloadItemResourceList) (WorkloadItemResourceList, error)) WorkloadItemResourceListPage {
  7850  	return WorkloadItemResourceListPage{
  7851  		fn:   getNextPage,
  7852  		wirl: cur,
  7853  	}
  7854  }
  7855  
  7856  // BasicWorkloadProtectableItem base class for backup item. Workload-specific backup items are derived from this class.
  7857  type BasicWorkloadProtectableItem interface {
  7858  	AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool)
  7859  	AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool)
  7860  	AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool)
  7861  	AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool)
  7862  	AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool)
  7863  	AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool)
  7864  	AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool)
  7865  	AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool)
  7866  	AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool)
  7867  	AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool)
  7868  	AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool)
  7869  	AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool)
  7870  	AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool)
  7871  	AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool)
  7872  }
  7873  
  7874  // WorkloadProtectableItem base class for backup item. Workload-specific backup items are derived from this
  7875  // class.
  7876  type WorkloadProtectableItem struct {
  7877  	// BackupManagementType - Type of backup management to backup an item.
  7878  	BackupManagementType *string `json:"backupManagementType,omitempty"`
  7879  	// WorkloadType - Type of workload for the backup management
  7880  	WorkloadType *string `json:"workloadType,omitempty"`
  7881  	// FriendlyName - Friendly name of the backup item.
  7882  	FriendlyName *string `json:"friendlyName,omitempty"`
  7883  	// ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
  7884  	ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
  7885  	// ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem'
  7886  	ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
  7887  }
  7888  
  7889  func unmarshalBasicWorkloadProtectableItem(body []byte) (BasicWorkloadProtectableItem, error) {
  7890  	var m map[string]interface{}
  7891  	err := json.Unmarshal(body, &m)
  7892  	if err != nil {
  7893  		return nil, err
  7894  	}
  7895  
  7896  	switch m["protectableItemType"] {
  7897  	case string(ProtectableItemTypeAzureFileShare):
  7898  		var afspi AzureFileShareProtectableItem
  7899  		err := json.Unmarshal(body, &afspi)
  7900  		return afspi, err
  7901  	case string(ProtectableItemTypeMicrosoftClassicComputevirtualMachines):
  7902  		var aisccvpi AzureIaaSClassicComputeVMProtectableItem
  7903  		err := json.Unmarshal(body, &aisccvpi)
  7904  		return aisccvpi, err
  7905  	case string(ProtectableItemTypeMicrosoftComputevirtualMachines):
  7906  		var aiscvpi AzureIaaSComputeVMProtectableItem
  7907  		err := json.Unmarshal(body, &aiscvpi)
  7908  		return aiscvpi, err
  7909  	case string(ProtectableItemTypeAzureVMWorkloadProtectableItem):
  7910  		var avwpi AzureVMWorkloadProtectableItem
  7911  		err := json.Unmarshal(body, &avwpi)
  7912  		return avwpi, err
  7913  	case string(ProtectableItemTypeSAPAseSystem):
  7914  		var avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem
  7915  		err := json.Unmarshal(body, &avwsaspi)
  7916  		return avwsaspi, err
  7917  	case string(ProtectableItemTypeSAPHanaDatabase):
  7918  		var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem
  7919  		err := json.Unmarshal(body, &avwshdpi)
  7920  		return avwshdpi, err
  7921  	case string(ProtectableItemTypeSAPHanaSystem):
  7922  		var avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem
  7923  		err := json.Unmarshal(body, &avwshspi)
  7924  		return avwshspi, err
  7925  	case string(ProtectableItemTypeSQLAvailabilityGroupContainer):
  7926  		var avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem
  7927  		err := json.Unmarshal(body, &avwsagpi)
  7928  		return avwsagpi, err
  7929  	case string(ProtectableItemTypeSQLDataBase):
  7930  		var avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem
  7931  		err := json.Unmarshal(body, &avwsdpi)
  7932  		return avwsdpi, err
  7933  	case string(ProtectableItemTypeSQLInstance):
  7934  		var avwsipi AzureVMWorkloadSQLInstanceProtectableItem
  7935  		err := json.Unmarshal(body, &avwsipi)
  7936  		return avwsipi, err
  7937  	case string(ProtectableItemTypeIaaSVMProtectableItem):
  7938  		var ispi IaaSVMProtectableItem
  7939  		err := json.Unmarshal(body, &ispi)
  7940  		return ispi, err
  7941  	default:
  7942  		var wpi WorkloadProtectableItem
  7943  		err := json.Unmarshal(body, &wpi)
  7944  		return wpi, err
  7945  	}
  7946  }
  7947  func unmarshalBasicWorkloadProtectableItemArray(body []byte) ([]BasicWorkloadProtectableItem, error) {
  7948  	var rawMessages []*json.RawMessage
  7949  	err := json.Unmarshal(body, &rawMessages)
  7950  	if err != nil {
  7951  		return nil, err
  7952  	}
  7953  
  7954  	wpiArray := make([]BasicWorkloadProtectableItem, len(rawMessages))
  7955  
  7956  	for index, rawMessage := range rawMessages {
  7957  		wpi, err := unmarshalBasicWorkloadProtectableItem(*rawMessage)
  7958  		if err != nil {
  7959  			return nil, err
  7960  		}
  7961  		wpiArray[index] = wpi
  7962  	}
  7963  	return wpiArray, nil
  7964  }
  7965  
  7966  // MarshalJSON is the custom marshaler for WorkloadProtectableItem.
  7967  func (wpi WorkloadProtectableItem) MarshalJSON() ([]byte, error) {
  7968  	wpi.ProtectableItemType = ProtectableItemTypeWorkloadProtectableItem
  7969  	objectMap := make(map[string]interface{})
  7970  	if wpi.BackupManagementType != nil {
  7971  		objectMap["backupManagementType"] = wpi.BackupManagementType
  7972  	}
  7973  	if wpi.WorkloadType != nil {
  7974  		objectMap["workloadType"] = wpi.WorkloadType
  7975  	}
  7976  	if wpi.FriendlyName != nil {
  7977  		objectMap["friendlyName"] = wpi.FriendlyName
  7978  	}
  7979  	if wpi.ProtectionState != "" {
  7980  		objectMap["protectionState"] = wpi.ProtectionState
  7981  	}
  7982  	if wpi.ProtectableItemType != "" {
  7983  		objectMap["protectableItemType"] = wpi.ProtectableItemType
  7984  	}
  7985  	return json.Marshal(objectMap)
  7986  }
  7987  
  7988  // AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem.
  7989  func (wpi WorkloadProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
  7990  	return nil, false
  7991  }
  7992  
  7993  // AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem.
  7994  func (wpi WorkloadProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
  7995  	return nil, false
  7996  }
  7997  
  7998  // AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem.
  7999  func (wpi WorkloadProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
  8000  	return nil, false
  8001  }
  8002  
  8003  // AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem.
  8004  func (wpi WorkloadProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
  8005  	return nil, false
  8006  }
  8007  
  8008  // AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem.
  8009  func (wpi WorkloadProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
  8010  	return nil, false
  8011  }
  8012  
  8013  // AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem.
  8014  func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
  8015  	return nil, false
  8016  }
  8017  
  8018  // AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem.
  8019  func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
  8020  	return nil, false
  8021  }
  8022  
  8023  // AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem.
  8024  func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
  8025  	return nil, false
  8026  }
  8027  
  8028  // AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem.
  8029  func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
  8030  	return nil, false
  8031  }
  8032  
  8033  // AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem.
  8034  func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
  8035  	return nil, false
  8036  }
  8037  
  8038  // AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem.
  8039  func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
  8040  	return nil, false
  8041  }
  8042  
  8043  // AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem.
  8044  func (wpi WorkloadProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
  8045  	return nil, false
  8046  }
  8047  
  8048  // AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem.
  8049  func (wpi WorkloadProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
  8050  	return nil, false
  8051  }
  8052  
  8053  // AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem.
  8054  func (wpi WorkloadProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
  8055  	return &wpi, true
  8056  }
  8057  
  8058  // AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem.
  8059  func (wpi WorkloadProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
  8060  	return &wpi, true
  8061  }
  8062  
  8063  // WorkloadProtectableItemResource base class for backup item. Workload-specific backup items are derived
  8064  // from this class.
  8065  type WorkloadProtectableItemResource struct {
  8066  	// Properties - WorkloadProtectableItemResource properties
  8067  	Properties BasicWorkloadProtectableItem `json:"properties,omitempty"`
  8068  	// ID - READ-ONLY; Resource Id represents the complete path to the resource.
  8069  	ID *string `json:"id,omitempty"`
  8070  	// Name - READ-ONLY; Resource name associated with the resource.
  8071  	Name *string `json:"name,omitempty"`
  8072  	// Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/...
  8073  	Type *string `json:"type,omitempty"`
  8074  	// Location - Resource location.
  8075  	Location *string `json:"location,omitempty"`
  8076  	// Tags - Resource tags.
  8077  	Tags map[string]*string `json:"tags"`
  8078  	// ETag - Optional ETag.
  8079  	ETag *string `json:"eTag,omitempty"`
  8080  }
  8081  
  8082  // MarshalJSON is the custom marshaler for WorkloadProtectableItemResource.
  8083  func (wpir WorkloadProtectableItemResource) MarshalJSON() ([]byte, error) {
  8084  	objectMap := make(map[string]interface{})
  8085  	objectMap["properties"] = wpir.Properties
  8086  	if wpir.Location != nil {
  8087  		objectMap["location"] = wpir.Location
  8088  	}
  8089  	if wpir.Tags != nil {
  8090  		objectMap["tags"] = wpir.Tags
  8091  	}
  8092  	if wpir.ETag != nil {
  8093  		objectMap["eTag"] = wpir.ETag
  8094  	}
  8095  	return json.Marshal(objectMap)
  8096  }
  8097  
  8098  // UnmarshalJSON is the custom unmarshaler for WorkloadProtectableItemResource struct.
  8099  func (wpir *WorkloadProtectableItemResource) UnmarshalJSON(body []byte) error {
  8100  	var m map[string]*json.RawMessage
  8101  	err := json.Unmarshal(body, &m)
  8102  	if err != nil {
  8103  		return err
  8104  	}
  8105  	for k, v := range m {
  8106  		switch k {
  8107  		case "properties":
  8108  			if v != nil {
  8109  				properties, err := unmarshalBasicWorkloadProtectableItem(*v)
  8110  				if err != nil {
  8111  					return err
  8112  				}
  8113  				wpir.Properties = properties
  8114  			}
  8115  		case "id":
  8116  			if v != nil {
  8117  				var ID string
  8118  				err = json.Unmarshal(*v, &ID)
  8119  				if err != nil {
  8120  					return err
  8121  				}
  8122  				wpir.ID = &ID
  8123  			}
  8124  		case "name":
  8125  			if v != nil {
  8126  				var name string
  8127  				err = json.Unmarshal(*v, &name)
  8128  				if err != nil {
  8129  					return err
  8130  				}
  8131  				wpir.Name = &name
  8132  			}
  8133  		case "type":
  8134  			if v != nil {
  8135  				var typeVar string
  8136  				err = json.Unmarshal(*v, &typeVar)
  8137  				if err != nil {
  8138  					return err
  8139  				}
  8140  				wpir.Type = &typeVar
  8141  			}
  8142  		case "location":
  8143  			if v != nil {
  8144  				var location string
  8145  				err = json.Unmarshal(*v, &location)
  8146  				if err != nil {
  8147  					return err
  8148  				}
  8149  				wpir.Location = &location
  8150  			}
  8151  		case "tags":
  8152  			if v != nil {
  8153  				var tags map[string]*string
  8154  				err = json.Unmarshal(*v, &tags)
  8155  				if err != nil {
  8156  					return err
  8157  				}
  8158  				wpir.Tags = tags
  8159  			}
  8160  		case "eTag":
  8161  			if v != nil {
  8162  				var eTag string
  8163  				err = json.Unmarshal(*v, &eTag)
  8164  				if err != nil {
  8165  					return err
  8166  				}
  8167  				wpir.ETag = &eTag
  8168  			}
  8169  		}
  8170  	}
  8171  
  8172  	return nil
  8173  }
  8174  
  8175  // WorkloadProtectableItemResourceList list of WorkloadProtectableItem resources
  8176  type WorkloadProtectableItemResourceList struct {
  8177  	autorest.Response `json:"-"`
  8178  	// Value - List of resources.
  8179  	Value *[]WorkloadProtectableItemResource `json:"value,omitempty"`
  8180  	// NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources.
  8181  	NextLink *string `json:"nextLink,omitempty"`
  8182  }
  8183  
  8184  // WorkloadProtectableItemResourceListIterator provides access to a complete listing of
  8185  // WorkloadProtectableItemResource values.
  8186  type WorkloadProtectableItemResourceListIterator struct {
  8187  	i    int
  8188  	page WorkloadProtectableItemResourceListPage
  8189  }
  8190  
  8191  // NextWithContext advances to the next value.  If there was an error making
  8192  // the request the iterator does not advance and the error is returned.
  8193  func (iter *WorkloadProtectableItemResourceListIterator) NextWithContext(ctx context.Context) (err error) {
  8194  	if tracing.IsEnabled() {
  8195  		ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadProtectableItemResourceListIterator.NextWithContext")
  8196  		defer func() {
  8197  			sc := -1
  8198  			if iter.Response().Response.Response != nil {
  8199  				sc = iter.Response().Response.Response.StatusCode
  8200  			}
  8201  			tracing.EndSpan(ctx, sc, err)
  8202  		}()
  8203  	}
  8204  	iter.i++
  8205  	if iter.i < len(iter.page.Values()) {
  8206  		return nil
  8207  	}
  8208  	err = iter.page.NextWithContext(ctx)
  8209  	if err != nil {
  8210  		iter.i--
  8211  		return err
  8212  	}
  8213  	iter.i = 0
  8214  	return nil
  8215  }
  8216  
  8217  // Next advances to the next value.  If there was an error making
  8218  // the request the iterator does not advance and the error is returned.
  8219  // Deprecated: Use NextWithContext() instead.
  8220  func (iter *WorkloadProtectableItemResourceListIterator) Next() error {
  8221  	return iter.NextWithContext(context.Background())
  8222  }
  8223  
  8224  // NotDone returns true if the enumeration should be started or is not yet complete.
  8225  func (iter WorkloadProtectableItemResourceListIterator) NotDone() bool {
  8226  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  8227  }
  8228  
  8229  // Response returns the raw server response from the last page request.
  8230  func (iter WorkloadProtectableItemResourceListIterator) Response() WorkloadProtectableItemResourceList {
  8231  	return iter.page.Response()
  8232  }
  8233  
  8234  // Value returns the current value or a zero-initialized value if the
  8235  // iterator has advanced beyond the end of the collection.
  8236  func (iter WorkloadProtectableItemResourceListIterator) Value() WorkloadProtectableItemResource {
  8237  	if !iter.page.NotDone() {
  8238  		return WorkloadProtectableItemResource{}
  8239  	}
  8240  	return iter.page.Values()[iter.i]
  8241  }
  8242  
  8243  // Creates a new instance of the WorkloadProtectableItemResourceListIterator type.
  8244  func NewWorkloadProtectableItemResourceListIterator(page WorkloadProtectableItemResourceListPage) WorkloadProtectableItemResourceListIterator {
  8245  	return WorkloadProtectableItemResourceListIterator{page: page}
  8246  }
  8247  
  8248  // IsEmpty returns true if the ListResult contains no values.
  8249  func (wpirl WorkloadProtectableItemResourceList) IsEmpty() bool {
  8250  	return wpirl.Value == nil || len(*wpirl.Value) == 0
  8251  }
  8252  
  8253  // hasNextLink returns true if the NextLink is not empty.
  8254  func (wpirl WorkloadProtectableItemResourceList) hasNextLink() bool {
  8255  	return wpirl.NextLink != nil && len(*wpirl.NextLink) != 0
  8256  }
  8257  
  8258  // workloadProtectableItemResourceListPreparer prepares a request to retrieve the next set of results.
  8259  // It returns nil if no more results exist.
  8260  func (wpirl WorkloadProtectableItemResourceList) workloadProtectableItemResourceListPreparer(ctx context.Context) (*http.Request, error) {
  8261  	if !wpirl.hasNextLink() {
  8262  		return nil, nil
  8263  	}
  8264  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  8265  		autorest.AsJSON(),
  8266  		autorest.AsGet(),
  8267  		autorest.WithBaseURL(to.String(wpirl.NextLink)))
  8268  }
  8269  
  8270  // WorkloadProtectableItemResourceListPage contains a page of WorkloadProtectableItemResource values.
  8271  type WorkloadProtectableItemResourceListPage struct {
  8272  	fn    func(context.Context, WorkloadProtectableItemResourceList) (WorkloadProtectableItemResourceList, error)
  8273  	wpirl WorkloadProtectableItemResourceList
  8274  }
  8275  
  8276  // NextWithContext advances to the next page of values.  If there was an error making
  8277  // the request the page does not advance and the error is returned.
  8278  func (page *WorkloadProtectableItemResourceListPage) NextWithContext(ctx context.Context) (err error) {
  8279  	if tracing.IsEnabled() {
  8280  		ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadProtectableItemResourceListPage.NextWithContext")
  8281  		defer func() {
  8282  			sc := -1
  8283  			if page.Response().Response.Response != nil {
  8284  				sc = page.Response().Response.Response.StatusCode
  8285  			}
  8286  			tracing.EndSpan(ctx, sc, err)
  8287  		}()
  8288  	}
  8289  	for {
  8290  		next, err := page.fn(ctx, page.wpirl)
  8291  		if err != nil {
  8292  			return err
  8293  		}
  8294  		page.wpirl = next
  8295  		if !next.hasNextLink() || !next.IsEmpty() {
  8296  			break
  8297  		}
  8298  	}
  8299  	return nil
  8300  }
  8301  
  8302  // Next advances to the next page of values.  If there was an error making
  8303  // the request the page does not advance and the error is returned.
  8304  // Deprecated: Use NextWithContext() instead.
  8305  func (page *WorkloadProtectableItemResourceListPage) Next() error {
  8306  	return page.NextWithContext(context.Background())
  8307  }
  8308  
  8309  // NotDone returns true if the page enumeration should be started or is not yet complete.
  8310  func (page WorkloadProtectableItemResourceListPage) NotDone() bool {
  8311  	return !page.wpirl.IsEmpty()
  8312  }
  8313  
  8314  // Response returns the raw server response from the last page request.
  8315  func (page WorkloadProtectableItemResourceListPage) Response() WorkloadProtectableItemResourceList {
  8316  	return page.wpirl
  8317  }
  8318  
  8319  // Values returns the slice of values for the current page or nil if there are no values.
  8320  func (page WorkloadProtectableItemResourceListPage) Values() []WorkloadProtectableItemResource {
  8321  	if page.wpirl.IsEmpty() {
  8322  		return nil
  8323  	}
  8324  	return *page.wpirl.Value
  8325  }
  8326  
  8327  // Creates a new instance of the WorkloadProtectableItemResourceListPage type.
  8328  func NewWorkloadProtectableItemResourceListPage(cur WorkloadProtectableItemResourceList, getNextPage func(context.Context, WorkloadProtectableItemResourceList) (WorkloadProtectableItemResourceList, error)) WorkloadProtectableItemResourceListPage {
  8329  	return WorkloadProtectableItemResourceListPage{
  8330  		fn:    getNextPage,
  8331  		wpirl: cur,
  8332  	}
  8333  }
  8334  

View as plain text