Class BackupPolicy
java.lang.Object
com.azure.resourcemanager.cosmos.models.BackupPolicy
- All Implemented Interfaces:
com.azure.json.JsonSerializable<BackupPolicy>
- Direct Known Subclasses:
ContinuousModeBackupPolicy
,PeriodicModeBackupPolicy
The object representing the policy for taking backups on an account.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BackupPolicy
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of BackupPolicy from the JsonReader.Get the migrationState property: The object representing the state of the migration between the backup policies.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) type()
Get the type property: Describes the mode of backups.void
validate()
Validates the instance.withMigrationState
(BackupPolicyMigrationState migrationState) Set the migrationState property: The object representing the state of the migration between the backup policies.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
BackupPolicy
public BackupPolicy()Creates an instance of BackupPolicy class.
-
-
Method Details
-
type
Get the type property: Describes the mode of backups.- Returns:
- the type value.
-
migrationState
Get the migrationState property: The object representing the state of the migration between the backup policies.- Returns:
- the migrationState value.
-
withMigrationState
Set the migrationState property: The object representing the state of the migration between the backup policies.- Parameters:
migrationState
- the migrationState value to set.- Returns:
- the BackupPolicy object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<BackupPolicy>
- Throws:
IOException
-
fromJson
Reads an instance of BackupPolicy from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of BackupPolicy if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IOException
- If an error occurs while reading the BackupPolicy.
-