Class RestorableDatabaseAccountProperties
java.lang.Object
com.azure.resourcemanager.cosmos.fluent.models.RestorableDatabaseAccountProperties
- All Implemented Interfaces:
com.azure.json.JsonSerializable<RestorableDatabaseAccountProperties>
public final class RestorableDatabaseAccountProperties
extends Object
implements com.azure.json.JsonSerializable<RestorableDatabaseAccountProperties>
The properties of a restorable database account.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of RestorableDatabaseAccountProperties class. -
Method Summary
Modifier and TypeMethodDescriptionGet the accountName property: The name of the global database account.apiType()Get the apiType property: The API type of the restorable database account.Get the creationTime property: The creation time of the restorable database account (ISO-8601 format).Get the deletionTime property: The time at which the restorable database account has been deleted (ISO-8601 format).fromJson(com.azure.json.JsonReader jsonReader) Reads an instance of RestorableDatabaseAccountProperties from the JsonReader.Get the oldestRestorableTime property: The least recent time at which the database account can be restored to (ISO-8601 format).Get the restorableLocations property: List of regions where the of the database account can be restored from.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withAccountName(String accountName) Set the accountName property: The name of the global database account.withCreationTime(OffsetDateTime creationTime) Set the creationTime property: The creation time of the restorable database account (ISO-8601 format).withDeletionTime(OffsetDateTime deletionTime) Set the deletionTime property: The time at which the restorable database account has been deleted (ISO-8601 format).withOldestRestorableTime(OffsetDateTime oldestRestorableTime) Set the oldestRestorableTime property: The least recent time at which the database account can be restored to (ISO-8601 format).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
-
RestorableDatabaseAccountProperties
public RestorableDatabaseAccountProperties()Creates an instance of RestorableDatabaseAccountProperties class.
-
-
Method Details
-
accountName
Get the accountName property: The name of the global database account.- Returns:
- the accountName value.
-
withAccountName
Set the accountName property: The name of the global database account.- Parameters:
accountName- the accountName value to set.- Returns:
- the RestorableDatabaseAccountProperties object itself.
-
creationTime
Get the creationTime property: The creation time of the restorable database account (ISO-8601 format).- Returns:
- the creationTime value.
-
withCreationTime
Set the creationTime property: The creation time of the restorable database account (ISO-8601 format).- Parameters:
creationTime- the creationTime value to set.- Returns:
- the RestorableDatabaseAccountProperties object itself.
-
deletionTime
Get the deletionTime property: The time at which the restorable database account has been deleted (ISO-8601 format).- Returns:
- the deletionTime value.
-
withDeletionTime
Set the deletionTime property: The time at which the restorable database account has been deleted (ISO-8601 format).- Parameters:
deletionTime- the deletionTime value to set.- Returns:
- the RestorableDatabaseAccountProperties object itself.
-
oldestRestorableTime
Get the oldestRestorableTime property: The least recent time at which the database account can be restored to (ISO-8601 format).- Returns:
- the oldestRestorableTime value.
-
withOldestRestorableTime
public RestorableDatabaseAccountProperties withOldestRestorableTime(OffsetDateTime oldestRestorableTime) Set the oldestRestorableTime property: The least recent time at which the database account can be restored to (ISO-8601 format).- Parameters:
oldestRestorableTime- the oldestRestorableTime value to set.- Returns:
- the RestorableDatabaseAccountProperties object itself.
-
apiType
Get the apiType property: The API type of the restorable database account.- Returns:
- the apiType value.
-
restorableLocations
Get the restorableLocations property: List of regions where the of the database account can be restored from.- Returns:
- the restorableLocations value.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<RestorableDatabaseAccountProperties>- Throws:
IOException
-
fromJson
public static RestorableDatabaseAccountProperties fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of RestorableDatabaseAccountProperties from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of RestorableDatabaseAccountProperties 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 RestorableDatabaseAccountProperties.
-