Interface DatabaseOrBuilder (6.89.0)

publicinterfaceDatabaseOrBuilderextendsMessageOrBuilder

Methods

getCreateTime()

publicabstractTimestampgetCreateTime()

Output only. If exists, the time at which the database creation started.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Timestamp

The createTime.

getCreateTimeOrBuilder()

publicabstractTimestampOrBuildergetCreateTimeOrBuilder()

Output only. If exists, the time at which the database creation started.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
TimestampOrBuilder

getDatabaseDialect()

publicabstractDatabaseDialectgetDatabaseDialect()

Output only. The dialect of the Cloud Spanner Database.

.google.spanner.admin.database.v1.DatabaseDialect database_dialect = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
DatabaseDialect

The databaseDialect.

getDatabaseDialectValue()

publicabstractintgetDatabaseDialectValue()

Output only. The dialect of the Cloud Spanner Database.

.google.spanner.admin.database.v1.DatabaseDialect database_dialect = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
int

The enum numeric value on the wire for databaseDialect.

getDefaultLeader()

publicabstractStringgetDefaultLeader()

Output only. The read-write region which contains the database's leader replicas.

This is the same as the value of default_leader database option set using DatabaseAdmin.CreateDatabase or DatabaseAdmin.UpdateDatabaseDdl. If not explicitly set, this is empty.

string default_leader = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
String

The defaultLeader.

getDefaultLeaderBytes()

publicabstractByteStringgetDefaultLeaderBytes()

Output only. The read-write region which contains the database's leader replicas.

This is the same as the value of default_leader database option set using DatabaseAdmin.CreateDatabase or DatabaseAdmin.UpdateDatabaseDdl. If not explicitly set, this is empty.

string default_leader = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ByteString

The bytes for defaultLeader.

getEarliestVersionTime()

publicabstractTimestampgetEarliestVersionTime()

Output only. Earliest timestamp at which older versions of the data can be read. This value is continuously updated by Cloud Spanner and becomes stale the moment it is queried. If you are using this value to recover data, make sure to account for the time from the moment when the value is queried to the moment when you initiate the recovery.

.google.protobuf.Timestamp earliest_version_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Timestamp

The earliestVersionTime.

getEarliestVersionTimeOrBuilder()

publicabstractTimestampOrBuildergetEarliestVersionTimeOrBuilder()

Output only. Earliest timestamp at which older versions of the data can be read. This value is continuously updated by Cloud Spanner and becomes stale the moment it is queried. If you are using this value to recover data, make sure to account for the time from the moment when the value is queried to the moment when you initiate the recovery.

.google.protobuf.Timestamp earliest_version_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
TimestampOrBuilder

getEnableDropProtection()

publicabstractbooleangetEnableDropProtection()

Whether drop protection is enabled for this database. Defaults to false, if not set. For more details, please see how to prevent accidental database deletion.

bool enable_drop_protection = 11;

Returns
TypeDescription
boolean

The enableDropProtection.

getEncryptionConfig()

publicabstractEncryptionConfiggetEncryptionConfig()

Output only. For databases that are using customer managed encryption, this field contains the encryption configuration for the database. For databases that are using Google default or other types of encryption, this field is empty.

.google.spanner.admin.database.v1.EncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
EncryptionConfig

The encryptionConfig.

getEncryptionConfigOrBuilder()

publicabstractEncryptionConfigOrBuildergetEncryptionConfigOrBuilder()

Output only. For databases that are using customer managed encryption, this field contains the encryption configuration for the database. For databases that are using Google default or other types of encryption, this field is empty.

.google.spanner.admin.database.v1.EncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
EncryptionConfigOrBuilder

getEncryptionInfo(int index)

publicabstractEncryptionInfogetEncryptionInfo(intindex)

Output only. For databases that are using customer managed encryption, this field contains the encryption information for the database, such as all Cloud KMS key versions that are in use. The encryption_status' field inside of each EncryptionInfo` is not populated.

For databases that are using Google default or other types of encryption, this field is empty.

This field is propagated lazily from the backend. There might be a delay from when a key version is being used and when it appears in this field.

repeated .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
indexint
Returns
TypeDescription
EncryptionInfo

getEncryptionInfoCount()

publicabstractintgetEncryptionInfoCount()

Output only. For databases that are using customer managed encryption, this field contains the encryption information for the database, such as all Cloud KMS key versions that are in use. The encryption_status' field inside of each EncryptionInfo` is not populated.

For databases that are using Google default or other types of encryption, this field is empty.

This field is propagated lazily from the backend. There might be a delay from when a key version is being used and when it appears in this field.

repeated .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
int

getEncryptionInfoList()

publicabstractList<EncryptionInfo>getEncryptionInfoList()

Output only. For databases that are using customer managed encryption, this field contains the encryption information for the database, such as all Cloud KMS key versions that are in use. The encryption_status' field inside of each EncryptionInfo` is not populated.

For databases that are using Google default or other types of encryption, this field is empty.

This field is propagated lazily from the backend. There might be a delay from when a key version is being used and when it appears in this field.

repeated .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
List<EncryptionInfo>

getEncryptionInfoOrBuilder(int index)

publicabstractEncryptionInfoOrBuildergetEncryptionInfoOrBuilder(intindex)

Output only. For databases that are using customer managed encryption, this field contains the encryption information for the database, such as all Cloud KMS key versions that are in use. The encryption_status' field inside of each EncryptionInfo` is not populated.

For databases that are using Google default or other types of encryption, this field is empty.

This field is propagated lazily from the backend. There might be a delay from when a key version is being used and when it appears in this field.

repeated .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
indexint
Returns
TypeDescription
EncryptionInfoOrBuilder

getEncryptionInfoOrBuilderList()

publicabstractList<?extendsEncryptionInfoOrBuilder>getEncryptionInfoOrBuilderList()

Output only. For databases that are using customer managed encryption, this field contains the encryption information for the database, such as all Cloud KMS key versions that are in use. The encryption_status' field inside of each EncryptionInfo` is not populated.

For databases that are using Google default or other types of encryption, this field is empty.

This field is propagated lazily from the backend. There might be a delay from when a key version is being used and when it appears in this field.

repeated .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
List<? extends com.google.spanner.admin.database.v1.EncryptionInfoOrBuilder>

getName()

publicabstractStringgetName()

Required. The name of the database. Values are of the form projects/<project>/instances/<instance>/databases/<database>, where <database> is as specified in the CREATE DATABASE statement. This name can be passed to other API methods to identify the database.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
String

The name.

getNameBytes()

publicabstractByteStringgetNameBytes()

Required. The name of the database. Values are of the form projects/<project>/instances/<instance>/databases/<database>, where <database> is as specified in the CREATE DATABASE statement. This name can be passed to other API methods to identify the database.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
ByteString

The bytes for name.

getReconciling()

publicabstractbooleangetReconciling()

Output only. If true, the database is being updated. If false, there are no ongoing update operations for the database.

bool reconciling = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

The reconciling.

getRestoreInfo()

publicabstractRestoreInfogetRestoreInfo()

Output only. Applicable only for restored databases. Contains information about the restore source.

.google.spanner.admin.database.v1.RestoreInfo restore_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
RestoreInfo

The restoreInfo.

getRestoreInfoOrBuilder()

publicabstractRestoreInfoOrBuildergetRestoreInfoOrBuilder()

Output only. Applicable only for restored databases. Contains information about the restore source.

.google.spanner.admin.database.v1.RestoreInfo restore_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
RestoreInfoOrBuilder

getState()

publicabstractDatabase.StategetState()

Output only. The current database state.

.google.spanner.admin.database.v1.Database.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Database.State

The state.

getStateValue()

publicabstractintgetStateValue()

Output only. The current database state.

.google.spanner.admin.database.v1.Database.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
int

The enum numeric value on the wire for state.

getVersionRetentionPeriod()

publicabstractStringgetVersionRetentionPeriod()

Output only. The period in which Cloud Spanner retains all versions of data for the database. This is the same as the value of version_retention_period database option set using UpdateDatabaseDdl. Defaults to 1 hour, if not set.

string version_retention_period = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
String

The versionRetentionPeriod.

getVersionRetentionPeriodBytes()

publicabstractByteStringgetVersionRetentionPeriodBytes()

Output only. The period in which Cloud Spanner retains all versions of data for the database. This is the same as the value of version_retention_period database option set using UpdateDatabaseDdl. Defaults to 1 hour, if not set.

string version_retention_period = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ByteString

The bytes for versionRetentionPeriod.

hasCreateTime()

publicabstractbooleanhasCreateTime()

Output only. If exists, the time at which the database creation started.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

Whether the createTime field is set.

hasEarliestVersionTime()

publicabstractbooleanhasEarliestVersionTime()

Output only. Earliest timestamp at which older versions of the data can be read. This value is continuously updated by Cloud Spanner and becomes stale the moment it is queried. If you are using this value to recover data, make sure to account for the time from the moment when the value is queried to the moment when you initiate the recovery.

.google.protobuf.Timestamp earliest_version_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

Whether the earliestVersionTime field is set.

hasEncryptionConfig()

publicabstractbooleanhasEncryptionConfig()

Output only. For databases that are using customer managed encryption, this field contains the encryption configuration for the database. For databases that are using Google default or other types of encryption, this field is empty.

.google.spanner.admin.database.v1.EncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

Whether the encryptionConfig field is set.

hasRestoreInfo()

publicabstractbooleanhasRestoreInfo()

Output only. Applicable only for restored databases. Contains information about the restore source.

.google.spanner.admin.database.v1.RestoreInfo restore_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

Whether the restoreInfo field is set.