RestorableSqlDatabasePropertiesResource Class

  • java.lang.Object
    • com.azure.resourcemanager.cosmos.models.RestorableSqlDatabasePropertiesResource

Implements

public final class RestorableSqlDatabasePropertiesResource
implements JsonSerializable<RestorableSqlDatabasePropertiesResource>

The resource of an Azure Cosmos DB SQL database event.

Constructor Summary

Constructor Description
RestorableSqlDatabasePropertiesResource()

Creates an instance of RestorableSqlDatabasePropertiesResource class.

Method Summary

Modifier and Type Method and Description
String canUndelete()

Get the canUndelete property: A state of this database to identify if this database is restorable in same account.

String canUndeleteReason()

Get the canUndeleteReason property: The reason why this database can not be restored in same account.

RestorableSqlDatabasePropertiesResourceDatabase database()

Get the database property: Cosmos DB SQL database resource object.

String eventTimestamp()

Get the eventTimestamp property: The time when this database event happened.

static RestorableSqlDatabasePropertiesResource fromJson(JsonReader jsonReader)

Reads an instance of RestorableSqlDatabasePropertiesResource from the JsonReader.

OperationType operationType()

Get the operationType property: The operation type of this database event.

String ownerId()

Get the ownerId property: The name of the SQL database.

String ownerResourceId()

Get the ownerResourceId property: The resource ID of the SQL database.

String rid()

Get the rid property: A system generated property.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

RestorableSqlDatabasePropertiesResource withDatabase(RestorableSqlDatabasePropertiesResourceDatabase database)

Set the database property: Cosmos DB SQL database resource object.

Methods inherited from java.lang.Object

Constructor Details

RestorableSqlDatabasePropertiesResource

public RestorableSqlDatabasePropertiesResource()

Creates an instance of RestorableSqlDatabasePropertiesResource class.

Method Details

canUndelete

public String 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

public String canUndeleteReason()

Get the canUndeleteReason property: The reason why this database can not be restored in same account.

Returns:

the canUndeleteReason value.

database

public RestorableSqlDatabasePropertiesResourceDatabase database()

Get the database property: Cosmos DB SQL database resource object.

Returns:

the database value.

eventTimestamp

public String eventTimestamp()

Get the eventTimestamp property: The time when this database event happened.

Returns:

the eventTimestamp value.

fromJson

public static RestorableSqlDatabasePropertiesResource fromJson(JsonReader jsonReader)

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.

operationType

public OperationType operationType()

Get the operationType property: The operation type of this database event.

Returns:

the operationType value.

ownerId

public String ownerId()

Get the ownerId property: The name of the SQL database.

Returns:

the ownerId value.

ownerResourceId

public String ownerResourceId()

Get the ownerResourceId property: The resource ID of the SQL database.

Returns:

the ownerResourceId value.

rid

public String rid()

Get the rid property: A system generated property. A unique identifier.

Returns:

the rid value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

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.

Applies to