Class PeriodicModeProperties
java.lang.Object
com.azure.resourcemanager.cosmos.models.PeriodicModeProperties
- All Implemented Interfaces:
com.azure.json.JsonSerializable<PeriodicModeProperties>
public final class PeriodicModeProperties
extends Object
implements com.azure.json.JsonSerializable<PeriodicModeProperties>
Configuration values for periodic mode backup.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of PeriodicModeProperties class. -
Method Summary
Modifier and TypeMethodDescriptionGet the backupIntervalInMinutes property: An integer representing the interval in minutes between two backups.Get the backupRetentionIntervalInHours property: An integer representing the time (in hours) that each backup is retained.Get the backupStorageRedundancy property: Enum to indicate type of backup residency.static PeriodicModePropertiesfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of PeriodicModeProperties from the JsonReader.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withBackupIntervalInMinutes(Integer backupIntervalInMinutes) Set the backupIntervalInMinutes property: An integer representing the interval in minutes between two backups.withBackupRetentionIntervalInHours(Integer backupRetentionIntervalInHours) Set the backupRetentionIntervalInHours property: An integer representing the time (in hours) that each backup is retained.withBackupStorageRedundancy(BackupStorageRedundancy backupStorageRedundancy) Set the backupStorageRedundancy property: Enum to indicate type of backup residency.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
PeriodicModeProperties
public PeriodicModeProperties()Creates an instance of PeriodicModeProperties class.
-
-
Method Details
-
backupIntervalInMinutes
Get the backupIntervalInMinutes property: An integer representing the interval in minutes between two backups.- Returns:
- the backupIntervalInMinutes value.
-
withBackupIntervalInMinutes
Set the backupIntervalInMinutes property: An integer representing the interval in minutes between two backups.- Parameters:
backupIntervalInMinutes- the backupIntervalInMinutes value to set.- Returns:
- the PeriodicModeProperties object itself.
-
backupRetentionIntervalInHours
Get the backupRetentionIntervalInHours property: An integer representing the time (in hours) that each backup is retained.- Returns:
- the backupRetentionIntervalInHours value.
-
withBackupRetentionIntervalInHours
public PeriodicModeProperties withBackupRetentionIntervalInHours(Integer backupRetentionIntervalInHours) Set the backupRetentionIntervalInHours property: An integer representing the time (in hours) that each backup is retained.- Parameters:
backupRetentionIntervalInHours- the backupRetentionIntervalInHours value to set.- Returns:
- the PeriodicModeProperties object itself.
-
backupStorageRedundancy
Get the backupStorageRedundancy property: Enum to indicate type of backup residency.- Returns:
- the backupStorageRedundancy value.
-
withBackupStorageRedundancy
public PeriodicModeProperties withBackupStorageRedundancy(BackupStorageRedundancy backupStorageRedundancy) Set the backupStorageRedundancy property: Enum to indicate type of backup residency.- Parameters:
backupStorageRedundancy- the backupStorageRedundancy value to set.- Returns:
- the PeriodicModeProperties object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<PeriodicModeProperties>- Throws:
IOException
-
fromJson
public static PeriodicModeProperties fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of PeriodicModeProperties from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of PeriodicModeProperties 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 PeriodicModeProperties.
-