RestorableDatabaseAccountProperties Class

  • java.lang.Object
    • com.azure.resourcemanager.cosmos.fluent.models.RestorableDatabaseAccountProperties

Implements

public final class RestorableDatabaseAccountProperties
implements JsonSerializable<RestorableDatabaseAccountProperties>

The properties of a restorable database account.

Constructor Summary

Constructor Description
RestorableDatabaseAccountProperties()

Creates an instance of RestorableDatabaseAccountProperties class.

Method Summary

Modifier and Type Method and Description
String accountName()

Get the accountName property: The name of the global database account.

ApiType apiType()

Get the apiType property: The API type of the restorable database account.

OffsetDateTime creationTime()

Get the creationTime property: The creation time of the restorable database account (ISO-8601 format).

OffsetDateTime deletionTime()

Get the deletionTime property: The time at which the restorable database account has been deleted (ISO-8601 format).

static RestorableDatabaseAccountProperties fromJson(JsonReader jsonReader)

Reads an instance of RestorableDatabaseAccountProperties from the JsonReader.

OffsetDateTime oldestRestorableTime()

Get the oldestRestorableTime property: The least recent time at which the database account can be restored to (ISO-8601 format).

List<RestorableLocationResource> restorableLocations()

Get the restorableLocations property: List of regions where the of the database account can be restored from.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

RestorableDatabaseAccountProperties withAccountName(String accountName)

Set the accountName property: The name of the global database account.

RestorableDatabaseAccountProperties withCreationTime(OffsetDateTime creationTime)

Set the creationTime property: The creation time of the restorable database account (ISO-8601 format).

RestorableDatabaseAccountProperties withDeletionTime(OffsetDateTime deletionTime)

Set the deletionTime property: The time at which the restorable database account has been deleted (ISO-8601 format).

RestorableDatabaseAccountProperties 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 java.lang.Object

Constructor Details

RestorableDatabaseAccountProperties

public RestorableDatabaseAccountProperties()

Creates an instance of RestorableDatabaseAccountProperties class.

Method Details

accountName

public String accountName()

Get the accountName property: The name of the global database account.

Returns:

the accountName value.

apiType

public ApiType apiType()

Get the apiType property: The API type of the restorable database account.

Returns:

the apiType value.

creationTime

public OffsetDateTime creationTime()

Get the creationTime property: The creation time of the restorable database account (ISO-8601 format).

Returns:

the creationTime value.

deletionTime

public OffsetDateTime deletionTime()

Get the deletionTime property: The time at which the restorable database account has been deleted (ISO-8601 format).

Returns:

the deletionTime value.

fromJson

public static RestorableDatabaseAccountProperties fromJson(JsonReader jsonReader)

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.

oldestRestorableTime

public OffsetDateTime 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.

restorableLocations

public List<RestorableLocationResource> restorableLocations()

Get the restorableLocations property: List of regions where the of the database account can be restored from.

Returns:

the restorableLocations value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withAccountName

public RestorableDatabaseAccountProperties withAccountName(String accountName)

Set the accountName property: The name of the global database account.

Parameters:

accountName - the accountName value to set.

Returns:

the RestorableDatabaseAccountProperties object itself.

withCreationTime

public RestorableDatabaseAccountProperties withCreationTime(OffsetDateTime creationTime)

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.

withDeletionTime

public RestorableDatabaseAccountProperties withDeletionTime(OffsetDateTime deletionTime)

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.

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.

Applies to