Class PreValidateEnableBackupRequest
- java.lang.Object
-
- com.azure.resourcemanager.recoveryservicesbackup.models.PreValidateEnableBackupRequest
-
public final class PreValidateEnableBackupRequest extends Object
Contract to validate if backup can be enabled on the given resource in a given vault and given configuration. It will validate followings 1. Vault capacity 2. VM is already protected 3. Any VM related configuration passed in properties.
-
-
Constructor Summary
Constructors Constructor Description PreValidateEnableBackupRequest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
properties()
Get the properties property: Configuration of VM if any needs to be validated like OS type etc.String
resourceId()
Get the resourceId property: ARM Virtual Machine Id.DataSourceType
resourceType()
Get the resourceType property: ProtectedItem Type- VM, SqlDataBase, AzureFileShare etc.void
validate()
Validates the instance.String
vaultId()
Get the vaultId property: ARM id of the Recovery Services Vault.PreValidateEnableBackupRequest
withProperties(String properties)
Set the properties property: Configuration of VM if any needs to be validated like OS type etc.PreValidateEnableBackupRequest
withResourceId(String resourceId)
Set the resourceId property: ARM Virtual Machine Id.PreValidateEnableBackupRequest
withResourceType(DataSourceType resourceType)
Set the resourceType property: ProtectedItem Type- VM, SqlDataBase, AzureFileShare etc.PreValidateEnableBackupRequest
withVaultId(String vaultId)
Set the vaultId property: ARM id of the Recovery Services Vault.
-
-
-
Method Detail
-
resourceType
public DataSourceType resourceType()
Get the resourceType property: ProtectedItem Type- VM, SqlDataBase, AzureFileShare etc.- Returns:
- the resourceType value.
-
withResourceType
public PreValidateEnableBackupRequest withResourceType(DataSourceType resourceType)
Set the resourceType property: ProtectedItem Type- VM, SqlDataBase, AzureFileShare etc.- Parameters:
resourceType
- the resourceType value to set.- Returns:
- the PreValidateEnableBackupRequest object itself.
-
resourceId
public String resourceId()
Get the resourceId property: ARM Virtual Machine Id.- Returns:
- the resourceId value.
-
withResourceId
public PreValidateEnableBackupRequest withResourceId(String resourceId)
Set the resourceId property: ARM Virtual Machine Id.- Parameters:
resourceId
- the resourceId value to set.- Returns:
- the PreValidateEnableBackupRequest object itself.
-
vaultId
public String vaultId()
Get the vaultId property: ARM id of the Recovery Services Vault.- Returns:
- the vaultId value.
-
withVaultId
public PreValidateEnableBackupRequest withVaultId(String vaultId)
Set the vaultId property: ARM id of the Recovery Services Vault.- Parameters:
vaultId
- the vaultId value to set.- Returns:
- the PreValidateEnableBackupRequest object itself.
-
properties
public String properties()
Get the properties property: Configuration of VM if any needs to be validated like OS type etc.- Returns:
- the properties value.
-
withProperties
public PreValidateEnableBackupRequest withProperties(String properties)
Set the properties property: Configuration of VM if any needs to be validated like OS type etc.- Parameters:
properties
- the properties value to set.- Returns:
- the PreValidateEnableBackupRequest object itself.
-
validate
public void validate()
Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
-