public final class Database extends GeneratedMessageV3 implements DatabaseOrBuilder
A Cloud Spanner database.Protobuf type
google.spanner.admin.database.v1.Database
Modifier and Type | Class and Description |
---|---|
static class |
Database.Builder
A Cloud Spanner database.
|
static class |
Database.State
Indicates the current state of the database.
|
GeneratedMessageV3.BuilderParent, GeneratedMessageV3.ExtendableBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage,BuilderType extends GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, GeneratedMessageV3.ExtendableMessage<MessageType extends GeneratedMessageV3.ExtendableMessage>, GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage>, GeneratedMessageV3.FieldAccessorTable, GeneratedMessageV3.UnusedPrivateParameter
AbstractMessageLite.InternalOneOfEnum
Modifier and Type | Field and Description |
---|---|
static int |
CREATE_TIME_FIELD_NUMBER |
static int |
DATABASE_DIALECT_FIELD_NUMBER |
static int |
DEFAULT_LEADER_FIELD_NUMBER |
static int |
EARLIEST_VERSION_TIME_FIELD_NUMBER |
static int |
ENCRYPTION_CONFIG_FIELD_NUMBER |
static int |
ENCRYPTION_INFO_FIELD_NUMBER |
static int |
NAME_FIELD_NUMBER |
static int |
RESTORE_INFO_FIELD_NUMBER |
static int |
STATE_FIELD_NUMBER |
static int |
VERSION_RETENTION_PERIOD_FIELD_NUMBER |
alwaysUseFieldBuilders, unknownFields
memoizedSize
memoizedHashCode
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof
toByteArray, toByteString, writeDelimitedTo, writeTo
public static final int NAME_FIELD_NUMBER
public static final int STATE_FIELD_NUMBER
public static final int CREATE_TIME_FIELD_NUMBER
public static final int RESTORE_INFO_FIELD_NUMBER
public static final int ENCRYPTION_CONFIG_FIELD_NUMBER
public static final int ENCRYPTION_INFO_FIELD_NUMBER
public static final int VERSION_RETENTION_PERIOD_FIELD_NUMBER
public static final int EARLIEST_VERSION_TIME_FIELD_NUMBER
public static final int DEFAULT_LEADER_FIELD_NUMBER
public static final int DATABASE_DIALECT_FIELD_NUMBER
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance
in class GeneratedMessageV3
public final UnknownFieldSet getUnknownFields()
getUnknownFields
in interface MessageOrBuilder
getUnknownFields
in class GeneratedMessageV3
public static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class GeneratedMessageV3
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];
getName
in interface DatabaseOrBuilder
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];
getNameBytes
in interface DatabaseOrBuilder
public int getStateValue()
Output only. The current database state.
.google.spanner.admin.database.v1.Database.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
getStateValue
in interface DatabaseOrBuilder
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];
getState
in interface DatabaseOrBuilder
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];
hasCreateTime
in interface DatabaseOrBuilder
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];
getCreateTime
in interface DatabaseOrBuilder
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];
getCreateTimeOrBuilder
in interface DatabaseOrBuilder
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];
hasRestoreInfo
in interface DatabaseOrBuilder
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];
getRestoreInfo
in interface DatabaseOrBuilder
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];
getRestoreInfoOrBuilder
in interface DatabaseOrBuilder
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];
hasEncryptionConfig
in interface DatabaseOrBuilder
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];
getEncryptionConfig
in interface DatabaseOrBuilder
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];
getEncryptionConfigOrBuilder
in interface DatabaseOrBuilder
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];
getEncryptionInfoList
in interface DatabaseOrBuilder
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];
getEncryptionInfoOrBuilderList
in interface DatabaseOrBuilder
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];
getEncryptionInfoCount
in interface DatabaseOrBuilder
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];
getEncryptionInfo
in interface DatabaseOrBuilder
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];
getEncryptionInfoOrBuilder
in interface DatabaseOrBuilder
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][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]. Defaults to 1 hour, if not set.
string version_retention_period = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
getVersionRetentionPeriod
in interface DatabaseOrBuilder
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][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]. Defaults to 1 hour, if not set.
string version_retention_period = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
getVersionRetentionPeriodBytes
in interface DatabaseOrBuilder
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];
hasEarliestVersionTime
in interface DatabaseOrBuilder
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];
getEarliestVersionTime
in interface DatabaseOrBuilder
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];
getEarliestVersionTimeOrBuilder
in interface DatabaseOrBuilder
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];
getDefaultLeader
in interface DatabaseOrBuilder
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];
getDefaultLeaderBytes
in interface DatabaseOrBuilder
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];
getDatabaseDialectValue
in interface DatabaseOrBuilder
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];
getDatabaseDialect
in interface DatabaseOrBuilder
public final boolean isInitialized()
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessageV3
public void writeTo(CodedOutputStream output) throws IOException
writeTo
in interface MessageLite
writeTo
in class GeneratedMessageV3
IOException
public int getSerializedSize()
getSerializedSize
in interface MessageLite
getSerializedSize
in class GeneratedMessageV3
public boolean equals(Object obj)
equals
in interface Message
equals
in class AbstractMessage
public int hashCode()
hashCode
in interface Message
hashCode
in class AbstractMessage
public static Database parseFrom(ByteBuffer data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Database parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Database parseFrom(ByteString data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Database parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Database parseFrom(byte[] data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Database parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Database parseFrom(InputStream input) throws IOException
IOException
public static Database parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static Database parseDelimitedFrom(InputStream input) throws IOException
IOException
public static Database parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static Database parseFrom(CodedInputStream input) throws IOException
IOException
public static Database parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public Database.Builder newBuilderForType()
newBuilderForType
in interface Message
newBuilderForType
in interface MessageLite
public static Database.Builder newBuilder()
public static Database.Builder newBuilder(Database prototype)
public Database.Builder toBuilder()
toBuilder
in interface Message
toBuilder
in interface MessageLite
protected Database.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
newBuilderForType
in class GeneratedMessageV3
public static Database getDefaultInstance()
public Parser<Database> getParserForType()
getParserForType
in interface Message
getParserForType
in interface MessageLite
getParserForType
in class GeneratedMessageV3
public Database getDefaultInstanceForType()
getDefaultInstanceForType
in interface MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder
Copyright © 2022 Google LLC. All rights reserved.