Class Database.Builder

public static final class Database.Builder extends GeneratedMessageV3.Builder<Database.Builder> implements DatabaseOrBuilder

A Cloud Spanner database.

Protobuf type google.spanner.admin.database.v1.Database

Implements

DatabaseOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllEncryptionInfo(Iterable<? extends EncryptionInfo> values)

public Database.Builder addAllEncryptionInfo(Iterable<? extends EncryptionInfo> values)

Output only. For databases that are using customer managed encryption, this field contains the encryption information for the database, such as encryption state and the Cloud KMS key versions that are in use. 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
valuesIterable<? extends com.google.spanner.admin.database.v1.EncryptionInfo>
Returns
TypeDescription
Database.Builder

addEncryptionInfo(EncryptionInfo value)

public Database.Builder addEncryptionInfo(EncryptionInfo value)

Output only. For databases that are using customer managed encryption, this field contains the encryption information for the database, such as encryption state and the Cloud KMS key versions that are in use. 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
valueEncryptionInfo
Returns
TypeDescription
Database.Builder

addEncryptionInfo(EncryptionInfo.Builder builderForValue)

public Database.Builder addEncryptionInfo(EncryptionInfo.Builder builderForValue)

Output only. For databases that are using customer managed encryption, this field contains the encryption information for the database, such as encryption state and the Cloud KMS key versions that are in use. 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
builderForValueEncryptionInfo.Builder
Returns
TypeDescription
Database.Builder

addEncryptionInfo(int index, EncryptionInfo value)

public Database.Builder addEncryptionInfo(int index, EncryptionInfo value)

Output only. For databases that are using customer managed encryption, this field contains the encryption information for the database, such as encryption state and the Cloud KMS key versions that are in use. 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];

Parameters
NameDescription
indexint
valueEncryptionInfo
Returns
TypeDescription
Database.Builder

addEncryptionInfo(int index, EncryptionInfo.Builder builderForValue)

public Database.Builder addEncryptionInfo(int index, EncryptionInfo.Builder builderForValue)

Output only. For databases that are using customer managed encryption, this field contains the encryption information for the database, such as encryption state and the Cloud KMS key versions that are in use. 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];

Parameters
NameDescription
indexint
builderForValueEncryptionInfo.Builder
Returns
TypeDescription
Database.Builder

addEncryptionInfoBuilder()

public EncryptionInfo.Builder addEncryptionInfoBuilder()

Output only. For databases that are using customer managed encryption, this field contains the encryption information for the database, such as encryption state and the Cloud KMS key versions that are in use. 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
EncryptionInfo.Builder

addEncryptionInfoBuilder(int index)

public EncryptionInfo.Builder addEncryptionInfoBuilder(int index)

Output only. For databases that are using customer managed encryption, this field contains the encryption information for the database, such as encryption state and the Cloud KMS key versions that are in use. 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.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Database.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Database.Builder
Overrides

build()

public Database build()
Returns
TypeDescription
Database

buildPartial()

public Database buildPartial()
Returns
TypeDescription
Database

clear()

public Database.Builder clear()
Returns
TypeDescription
Database.Builder
Overrides

clearCreateTime()

public Database.Builder clearCreateTime()

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
Database.Builder

clearDatabaseDialect()

public Database.Builder clearDatabaseDialect()

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
Database.Builder

This builder for chaining.

clearDefaultLeader()

public Database.Builder clearDefaultLeader()

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
Database.Builder

This builder for chaining.

clearEarliestVersionTime()

public Database.Builder clearEarliestVersionTime()

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
Database.Builder

clearEncryptionConfig()

public Database.Builder clearEncryptionConfig()

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
Database.Builder

clearEncryptionInfo()

public Database.Builder clearEncryptionInfo()

Output only. For databases that are using customer managed encryption, this field contains the encryption information for the database, such as encryption state and the Cloud KMS key versions that are in use. 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
Database.Builder

clearField(Descriptors.FieldDescriptor field)

public Database.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Database.Builder
Overrides

clearName()

public Database.Builder clearName()

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
Database.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Database.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Database.Builder
Overrides

clearRestoreInfo()

public Database.Builder clearRestoreInfo()

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
Database.Builder

clearState()

public Database.Builder clearState()

Output only. The current database state.

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

Returns
TypeDescription
Database.Builder

This builder for chaining.

clearVersionRetentionPeriod()

public Database.Builder clearVersionRetentionPeriod()

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
Database.Builder

This builder for chaining.

clone()

public Database.Builder clone()
Returns
TypeDescription
Database.Builder
Overrides

getCreateTime()

public Timestamp getCreateTime()

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.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

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
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

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()

public DatabaseDialect getDatabaseDialect()

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()

public int getDatabaseDialectValue()

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.

getDefaultInstanceForType()

public Database getDefaultInstanceForType()
Returns
TypeDescription
Database

getDefaultLeader()

public String getDefaultLeader()

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()

public ByteString getDefaultLeaderBytes()

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.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getEarliestVersionTime()

public Timestamp getEarliestVersionTime()

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.

getEarliestVersionTimeBuilder()

public Timestamp.Builder getEarliestVersionTimeBuilder()

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
Builder

getEarliestVersionTimeOrBuilder()

public TimestampOrBuilder getEarliestVersionTimeOrBuilder()

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

getEncryptionConfig()

public EncryptionConfig getEncryptionConfig()

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.

getEncryptionConfigBuilder()

public EncryptionConfig.Builder getEncryptionConfigBuilder()

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.Builder

getEncryptionConfigOrBuilder()

public EncryptionConfigOrBuilder getEncryptionConfigOrBuilder()

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)

public EncryptionInfo getEncryptionInfo(int index)

Output only. For databases that are using customer managed encryption, this field contains the encryption information for the database, such as encryption state and the Cloud KMS key versions that are in use. 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

getEncryptionInfoBuilder(int index)

public EncryptionInfo.Builder getEncryptionInfoBuilder(int index)

Output only. For databases that are using customer managed encryption, this field contains the encryption information for the database, such as encryption state and the Cloud KMS key versions that are in use. 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.Builder

getEncryptionInfoBuilderList()

public List<EncryptionInfo.Builder> getEncryptionInfoBuilderList()

Output only. For databases that are using customer managed encryption, this field contains the encryption information for the database, such as encryption state and the Cloud KMS key versions that are in use. 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<Builder>

getEncryptionInfoCount()

public int getEncryptionInfoCount()

Output only. For databases that are using customer managed encryption, this field contains the encryption information for the database, such as encryption state and the Cloud KMS key versions that are in use. 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()

public List<EncryptionInfo> getEncryptionInfoList()

Output only. For databases that are using customer managed encryption, this field contains the encryption information for the database, such as encryption state and the Cloud KMS key versions that are in use. 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)

public EncryptionInfoOrBuilder getEncryptionInfoOrBuilder(int index)

Output only. For databases that are using customer managed encryption, this field contains the encryption information for the database, such as encryption state and the Cloud KMS key versions that are in use. 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()

public List<? extends EncryptionInfoOrBuilder> getEncryptionInfoOrBuilderList()

Output only. For databases that are using customer managed encryption, this field contains the encryption information for the database, such as encryption state and the Cloud KMS key versions that are in use. 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()

public String getName()

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()

public ByteString getNameBytes()

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.

getRestoreInfo()

public RestoreInfo getRestoreInfo()

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.

getRestoreInfoBuilder()

public RestoreInfo.Builder getRestoreInfoBuilder()

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.Builder

getRestoreInfoOrBuilder()

public RestoreInfoOrBuilder getRestoreInfoOrBuilder()

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()

public Database.State getState()

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()

public int getStateValue()

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()

public String getVersionRetentionPeriod()

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()

public ByteString getVersionRetentionPeriodBytes()

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()

public boolean hasCreateTime()

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()

public boolean hasEarliestVersionTime()

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()

public boolean hasEncryptionConfig()

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()

public boolean hasRestoreInfo()

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.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeCreateTime(Timestamp value)

public Database.Builder mergeCreateTime(Timestamp value)

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

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

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Database.Builder

mergeEarliestVersionTime(Timestamp value)

public Database.Builder mergeEarliestVersionTime(Timestamp value)

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];

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Database.Builder

mergeEncryptionConfig(EncryptionConfig value)

public Database.Builder mergeEncryptionConfig(EncryptionConfig value)

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];

Parameter
NameDescription
valueEncryptionConfig
Returns
TypeDescription
Database.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Database.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Database.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Database.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Database.Builder
Overrides

mergeFrom(Database other)

public Database.Builder mergeFrom(Database other)
Parameter
NameDescription
otherDatabase
Returns
TypeDescription
Database.Builder

mergeRestoreInfo(RestoreInfo value)

public Database.Builder mergeRestoreInfo(RestoreInfo value)

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];

Parameter
NameDescription
valueRestoreInfo
Returns
TypeDescription
Database.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Database.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Database.Builder
Overrides

removeEncryptionInfo(int index)

public Database.Builder removeEncryptionInfo(int index)

Output only. For databases that are using customer managed encryption, this field contains the encryption information for the database, such as encryption state and the Cloud KMS key versions that are in use. 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
Database.Builder

setCreateTime(Timestamp value)

public Database.Builder setCreateTime(Timestamp value)

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

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

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Database.Builder

setCreateTime(Timestamp.Builder builderForValue)

public Database.Builder setCreateTime(Timestamp.Builder builderForValue)

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

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

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
Database.Builder

setDatabaseDialect(DatabaseDialect value)

public Database.Builder setDatabaseDialect(DatabaseDialect value)

Output only. The dialect of the Cloud Spanner Database.

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

Parameter
NameDescription
valueDatabaseDialect

The databaseDialect to set.

Returns
TypeDescription
Database.Builder

This builder for chaining.

setDatabaseDialectValue(int value)

public Database.Builder setDatabaseDialectValue(int value)

Output only. The dialect of the Cloud Spanner Database.

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

Parameter
NameDescription
valueint

The enum numeric value on the wire for databaseDialect to set.

Returns
TypeDescription
Database.Builder

This builder for chaining.

setDefaultLeader(String value)

public Database.Builder setDefaultLeader(String value)

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];

Parameter
NameDescription
valueString

The defaultLeader to set.

Returns
TypeDescription
Database.Builder

This builder for chaining.

setDefaultLeaderBytes(ByteString value)

public Database.Builder setDefaultLeaderBytes(ByteString value)

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];

Parameter
NameDescription
valueByteString

The bytes for defaultLeader to set.

Returns
TypeDescription
Database.Builder

This builder for chaining.

setEarliestVersionTime(Timestamp value)

public Database.Builder setEarliestVersionTime(Timestamp value)

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];

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Database.Builder

setEarliestVersionTime(Timestamp.Builder builderForValue)

public Database.Builder setEarliestVersionTime(Timestamp.Builder builderForValue)

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];

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
Database.Builder

setEncryptionConfig(EncryptionConfig value)

public Database.Builder setEncryptionConfig(EncryptionConfig value)

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];

Parameter
NameDescription
valueEncryptionConfig
Returns
TypeDescription
Database.Builder

setEncryptionConfig(EncryptionConfig.Builder builderForValue)

public Database.Builder setEncryptionConfig(EncryptionConfig.Builder builderForValue)

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];

Parameter
NameDescription
builderForValueEncryptionConfig.Builder
Returns
TypeDescription
Database.Builder

setEncryptionInfo(int index, EncryptionInfo value)

public Database.Builder setEncryptionInfo(int index, EncryptionInfo value)

Output only. For databases that are using customer managed encryption, this field contains the encryption information for the database, such as encryption state and the Cloud KMS key versions that are in use. 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];

Parameters
NameDescription
indexint
valueEncryptionInfo
Returns
TypeDescription
Database.Builder

setEncryptionInfo(int index, EncryptionInfo.Builder builderForValue)

public Database.Builder setEncryptionInfo(int index, EncryptionInfo.Builder builderForValue)

Output only. For databases that are using customer managed encryption, this field contains the encryption information for the database, such as encryption state and the Cloud KMS key versions that are in use. 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];

Parameters
NameDescription
indexint
builderForValueEncryptionInfo.Builder
Returns
TypeDescription
Database.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public Database.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Database.Builder
Overrides

setName(String value)

public Database.Builder setName(String value)

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];

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
Database.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Database.Builder setNameBytes(ByteString value)

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];

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
Database.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Database.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Database.Builder
Overrides

setRestoreInfo(RestoreInfo value)

public Database.Builder setRestoreInfo(RestoreInfo value)

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];

Parameter
NameDescription
valueRestoreInfo
Returns
TypeDescription
Database.Builder

setRestoreInfo(RestoreInfo.Builder builderForValue)

public Database.Builder setRestoreInfo(RestoreInfo.Builder builderForValue)

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];

Parameter
NameDescription
builderForValueRestoreInfo.Builder
Returns
TypeDescription
Database.Builder

setState(Database.State value)

public Database.Builder setState(Database.State value)

Output only. The current database state.

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

Parameter
NameDescription
valueDatabase.State

The state to set.

Returns
TypeDescription
Database.Builder

This builder for chaining.

setStateValue(int value)

public Database.Builder setStateValue(int value)

Output only. The current database state.

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

Parameter
NameDescription
valueint

The enum numeric value on the wire for state to set.

Returns
TypeDescription
Database.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final Database.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Database.Builder
Overrides

setVersionRetentionPeriod(String value)

public Database.Builder setVersionRetentionPeriod(String value)

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];

Parameter
NameDescription
valueString

The versionRetentionPeriod to set.

Returns
TypeDescription
Database.Builder

This builder for chaining.

setVersionRetentionPeriodBytes(ByteString value)

public Database.Builder setVersionRetentionPeriodBytes(ByteString value)

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];

Parameter
NameDescription
valueByteString

The bytes for versionRetentionPeriod to set.

Returns
TypeDescription
Database.Builder

This builder for chaining.