Class RestorableSqlDatabasePropertiesResource
java.lang.Object
com.azure.resourcemanager.cosmos.models.RestorableSqlDatabasePropertiesResource
- All Implemented Interfaces:
com.azure.json.JsonSerializable<RestorableSqlDatabasePropertiesResource>
public final class RestorableSqlDatabasePropertiesResource
extends Object
implements com.azure.json.JsonSerializable<RestorableSqlDatabasePropertiesResource>
The resource of an Azure Cosmos DB SQL database event.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of RestorableSqlDatabasePropertiesResource class. -
Method Summary
Modifier and TypeMethodDescriptionGet the canUndelete property: A state of this database to identify if this database is restorable in same account.Get the canUndeleteReason property: The reason why this database can not be restored in same account.database()
Get the database property: Cosmos DB SQL database resource object.Get the eventTimestamp property: The time when this database event happened.fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of RestorableSqlDatabasePropertiesResource from the JsonReader.Get the operationType property: The operation type of this database event.ownerId()
Get the ownerId property: The name of the SQL database.Get the ownerResourceId property: The resource ID of the SQL database.rid()
Get the rid property: A system generated property.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.Set the database property: Cosmos DB SQL database resource object.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
-
RestorableSqlDatabasePropertiesResource
public RestorableSqlDatabasePropertiesResource()Creates an instance of RestorableSqlDatabasePropertiesResource class.
-
-
Method Details
-
rid
Get the rid property: A system generated property. A unique identifier.- Returns:
- the rid value.
-
operationType
Get the operationType property: The operation type of this database event.- Returns:
- the operationType value.
-
canUndelete
Get the canUndelete property: A state of this database to identify if this database is restorable in same account.- Returns:
- the canUndelete value.
-
canUndeleteReason
Get the canUndeleteReason property: The reason why this database can not be restored in same account.- Returns:
- the canUndeleteReason value.
-
eventTimestamp
Get the eventTimestamp property: The time when this database event happened.- Returns:
- the eventTimestamp value.
-
ownerId
Get the ownerId property: The name of the SQL database.- Returns:
- the ownerId value.
-
ownerResourceId
Get the ownerResourceId property: The resource ID of the SQL database.- Returns:
- the ownerResourceId value.
-
database
Get the database property: Cosmos DB SQL database resource object.- Returns:
- the database value.
-
withDatabase
public RestorableSqlDatabasePropertiesResource withDatabase(RestorableSqlDatabasePropertiesResourceDatabase database) Set the database property: Cosmos DB SQL database resource object.- Parameters:
database
- the database value to set.- Returns:
- the RestorableSqlDatabasePropertiesResource 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<RestorableSqlDatabasePropertiesResource>
- Throws:
IOException
-
fromJson
public static RestorableSqlDatabasePropertiesResource fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of RestorableSqlDatabasePropertiesResource from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of RestorableSqlDatabasePropertiesResource 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 RestorableSqlDatabasePropertiesResource.
-