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
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > Database.BuilderImplements
DatabaseOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
values |
Iterable<? extends com.google.spanner.admin.database.v1.EncryptionInfo> |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
value |
EncryptionInfo |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
builderForValue |
EncryptionInfo.Builder |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
index |
int |
value |
EncryptionInfo |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
index |
int |
builderForValue |
EncryptionInfo.Builder |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
Type | Description |
EncryptionInfo.Builder |
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Database.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field |
FieldDescriptor |
value |
Object |
Returns | |
---|---|
Type | Description |
Database.Builder |
build()
public Database build()
Returns | |
---|---|
Type | Description |
Database |
buildPartial()
public Database buildPartial()
Returns | |
---|---|
Type | Description |
Database |
clear()
public Database.Builder clear()
Returns | |
---|---|
Type | Description |
Database.Builder |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
Database.Builder |
clearEnableDropProtection()
public Database.Builder clearEnableDropProtection()
Whether drop protection is enabled for this database. Defaults to false, if not set.
bool enable_drop_protection = 11;
Returns | |
---|---|
Type | Description |
Database.Builder |
This builder for chaining. |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
Database.Builder |
clearField(Descriptors.FieldDescriptor field)
public Database.Builder clearField(Descriptors.FieldDescriptor field)
Parameter | |
---|---|
Name | Description |
field |
FieldDescriptor |
Returns | |
---|---|
Type | Description |
Database.Builder |
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 | |
---|---|
Type | Description |
Database.Builder |
This builder for chaining. |
clearOneof(Descriptors.OneofDescriptor oneof)
public Database.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter | |
---|---|
Name | Description |
oneof |
OneofDescriptor |
Returns | |
---|---|
Type | Description |
Database.Builder |
clearReconciling()
public Database.Builder clearReconciling()
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 | |
---|---|
Type | Description |
Database.Builder |
This builder for chaining. |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
Database.Builder |
This builder for chaining. |
clone()
public Database.Builder clone()
Returns | |
---|---|
Type | Description |
Database.Builder |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
int |
The enum numeric value on the wire for databaseDialect. |
getDefaultInstanceForType()
public Database getDefaultInstanceForType()
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
ByteString |
The bytes for defaultLeader. |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns | |
---|---|
Type | Description |
Descriptor |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
TimestampOrBuilder |
getEnableDropProtection()
public boolean getEnableDropProtection()
Whether drop protection is enabled for this database. Defaults to false, if not set.
bool enable_drop_protection = 11;
Returns | |
---|---|
Type | Description |
boolean |
The enableDropProtection. |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
ByteString |
The bytes for name. |
getReconciling()
public boolean getReconciling()
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 | |
---|---|
Type | Description |
boolean |
The reconciling. |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
boolean |
Whether the restoreInfo field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns | |
---|---|
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Returns | |
---|---|
Type | Description |
boolean |
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 | |
---|---|
Name | Description |
value |
Timestamp |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
value |
Timestamp |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
value |
EncryptionConfig |
Returns | |
---|---|
Type | Description |
Database.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public Database.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
Database.Builder |
Exceptions | |
---|---|
Type | Description |
IOException |
mergeFrom(Message other)
public Database.Builder mergeFrom(Message other)
Parameter | |
---|---|
Name | Description |
other |
Message |
Returns | |
---|---|
Type | Description |
Database.Builder |
mergeFrom(Database other)
public Database.Builder mergeFrom(Database other)
Parameter | |
---|---|
Name | Description |
other |
Database |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
value |
RestoreInfo |
Returns | |
---|---|
Type | Description |
Database.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Database.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields |
UnknownFieldSet |
Returns | |
---|---|
Type | Description |
Database.Builder |
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 | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
value |
Timestamp |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
builderForValue |
Builder |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
value |
DatabaseDialect The databaseDialect to set. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
value |
int The enum numeric value on the wire for databaseDialect to set. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
value |
String The defaultLeader to set. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
value |
ByteString The bytes for defaultLeader to set. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
value |
Timestamp |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
builderForValue |
Builder |
Returns | |
---|---|
Type | Description |
Database.Builder |
setEnableDropProtection(boolean value)
public Database.Builder setEnableDropProtection(boolean value)
Whether drop protection is enabled for this database. Defaults to false, if not set.
bool enable_drop_protection = 11;
Parameter | |
---|---|
Name | Description |
value |
boolean The enableDropProtection to set. |
Returns | |
---|---|
Type | Description |
Database.Builder |
This builder for chaining. |
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 | |
---|---|
Name | Description |
value |
EncryptionConfig |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
builderForValue |
EncryptionConfig.Builder |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
index |
int |
value |
EncryptionInfo |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
index |
int |
builderForValue |
EncryptionInfo.Builder |
Returns | |
---|---|
Type | Description |
Database.Builder |
setField(Descriptors.FieldDescriptor field, Object value)
public Database.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field |
FieldDescriptor |
value |
Object |
Returns | |
---|---|
Type | Description |
Database.Builder |
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 | |
---|---|
Name | Description |
value |
String The name to set. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
value |
ByteString The bytes for name to set. |
Returns | |
---|---|
Type | Description |
Database.Builder |
This builder for chaining. |
setReconciling(boolean value)
public Database.Builder setReconciling(boolean value)
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];
Parameter | |
---|---|
Name | Description |
value |
boolean The reconciling to set. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
field |
FieldDescriptor |
index |
int |
value |
Object |
Returns | |
---|---|
Type | Description |
Database.Builder |
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 | |
---|---|
Name | Description |
value |
RestoreInfo |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
builderForValue |
RestoreInfo.Builder |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
value |
Database.State The state to set. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
value |
int The enum numeric value on the wire for state to set. |
Returns | |
---|---|
Type | Description |
Database.Builder |
This builder for chaining. |
setUnknownFields(UnknownFieldSet unknownFields)
public final Database.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields |
UnknownFieldSet |
Returns | |
---|---|
Type | Description |
Database.Builder |
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 | |
---|---|
Name | Description |
value |
String The versionRetentionPeriod to set. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
value |
ByteString The bytes for versionRetentionPeriod to set. |
Returns | |
---|---|
Type | Description |
Database.Builder |
This builder for chaining. |