Class PeriodicModeBackupPolicy
java.lang.Object
com.azure.resourcemanager.cosmos.models.BackupPolicy
com.azure.resourcemanager.cosmos.models.PeriodicModeBackupPolicy
- All Implemented Interfaces:
com.azure.json.JsonSerializable<BackupPolicy>
The object representing periodic mode backup policy.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of PeriodicModeBackupPolicy class. -
Method Summary
Modifier and TypeMethodDescriptionstatic PeriodicModeBackupPolicy
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of PeriodicModeBackupPolicy from the JsonReader.Get the periodicModeProperties property: Configuration values for periodic mode backup.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.withPeriodicModeProperties
(PeriodicModeProperties periodicModeProperties) Set the periodicModeProperties property: Configuration values for periodic mode backup.Methods inherited from class com.azure.resourcemanager.cosmos.models.BackupPolicy
migrationState
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
-
PeriodicModeBackupPolicy
public PeriodicModeBackupPolicy()Creates an instance of PeriodicModeBackupPolicy class.
-
-
Method Details
-
type
Get the type property: Describes the mode of backups.- Overrides:
type
in classBackupPolicy
- Returns:
- the type value.
-
periodicModeProperties
Get the periodicModeProperties property: Configuration values for periodic mode backup.- Returns:
- the periodicModeProperties value.
-
withPeriodicModeProperties
public PeriodicModeBackupPolicy withPeriodicModeProperties(PeriodicModeProperties periodicModeProperties) Set the periodicModeProperties property: Configuration values for periodic mode backup.- Parameters:
periodicModeProperties
- the periodicModeProperties value to set.- Returns:
- the PeriodicModeBackupPolicy object itself.
-
withMigrationState
Set the migrationState property: The object representing the state of the migration between the backup policies.- Overrides:
withMigrationState
in classBackupPolicy
- Parameters:
migrationState
- the migrationState value to set.- Returns:
- the BackupPolicy object itself.
-
validate
public void validate()Validates the instance.- Overrides:
validate
in classBackupPolicy
- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<BackupPolicy>
- Overrides:
toJson
in classBackupPolicy
- Throws:
IOException
-
fromJson
public static PeriodicModeBackupPolicy fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of PeriodicModeBackupPolicy from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of PeriodicModeBackupPolicy 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 PeriodicModeBackupPolicy.
-