Class Database (3.26.5)

public final class Database extends GeneratedMessageV3 implements DatabaseOrBuilder

A Cloud Firestore Database.

Protobuf type google.firestore.admin.v1.Database

Implements

DatabaseOrBuilder

Static Fields

APP_ENGINE_INTEGRATION_MODE_FIELD_NUMBER

public static final int APP_ENGINE_INTEGRATION_MODE_FIELD_NUMBER
Field Value
Type Description
int

CMEK_CONFIG_FIELD_NUMBER

public static final int CMEK_CONFIG_FIELD_NUMBER
Field Value
Type Description
int

CONCURRENCY_MODE_FIELD_NUMBER

public static final int CONCURRENCY_MODE_FIELD_NUMBER
Field Value
Type Description
int

CREATE_TIME_FIELD_NUMBER

public static final int CREATE_TIME_FIELD_NUMBER
Field Value
Type Description
int

DELETE_PROTECTION_STATE_FIELD_NUMBER

public static final int DELETE_PROTECTION_STATE_FIELD_NUMBER
Field Value
Type Description
int

DELETE_TIME_FIELD_NUMBER

public static final int DELETE_TIME_FIELD_NUMBER
Field Value
Type Description
int

EARLIEST_VERSION_TIME_FIELD_NUMBER

public static final int EARLIEST_VERSION_TIME_FIELD_NUMBER
Field Value
Type Description
int

ETAG_FIELD_NUMBER

public static final int ETAG_FIELD_NUMBER
Field Value
Type Description
int

KEY_PREFIX_FIELD_NUMBER

public static final int KEY_PREFIX_FIELD_NUMBER
Field Value
Type Description
int

LOCATION_ID_FIELD_NUMBER

public static final int LOCATION_ID_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

POINT_IN_TIME_RECOVERY_ENABLEMENT_FIELD_NUMBER

public static final int POINT_IN_TIME_RECOVERY_ENABLEMENT_FIELD_NUMBER
Field Value
Type Description
int

PREVIOUS_ID_FIELD_NUMBER

public static final int PREVIOUS_ID_FIELD_NUMBER
Field Value
Type Description
int

SOURCE_INFO_FIELD_NUMBER

public static final int SOURCE_INFO_FIELD_NUMBER
Field Value
Type Description
int

TYPE_FIELD_NUMBER

public static final int TYPE_FIELD_NUMBER
Field Value
Type Description
int

UID_FIELD_NUMBER

public static final int UID_FIELD_NUMBER
Field Value
Type Description
int

UPDATE_TIME_FIELD_NUMBER

public static final int UPDATE_TIME_FIELD_NUMBER
Field Value
Type Description
int

VERSION_RETENTION_PERIOD_FIELD_NUMBER

public static final int VERSION_RETENTION_PERIOD_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Database getDefaultInstance()
Returns
Type Description
Database

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static Database.Builder newBuilder()
Returns
Type Description
Database.Builder

newBuilder(Database prototype)

public static Database.Builder newBuilder(Database prototype)
Parameter
Name Description
prototype Database
Returns
Type Description
Database.Builder

parseDelimitedFrom(InputStream input)

public static Database parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Database
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Database parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Database
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Database parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Database
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Database parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Database
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Database parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Database
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Database parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Database
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Database parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Database
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Database parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Database
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Database parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Database
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Database parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Database
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Database parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Database
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Database parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Database
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Database> parser()
Returns
Type Description
Parser<Database>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getAppEngineIntegrationMode()

public Database.AppEngineIntegrationMode getAppEngineIntegrationMode()

The App Engine integration mode to use for this database.

.google.firestore.admin.v1.Database.AppEngineIntegrationMode app_engine_integration_mode = 19;

Returns
Type Description
Database.AppEngineIntegrationMode

The appEngineIntegrationMode.

getAppEngineIntegrationModeValue()

public int getAppEngineIntegrationModeValue()

The App Engine integration mode to use for this database.

.google.firestore.admin.v1.Database.AppEngineIntegrationMode app_engine_integration_mode = 19;

Returns
Type Description
int

The enum numeric value on the wire for appEngineIntegrationMode.

getCmekConfig()

public Database.CmekConfig getCmekConfig()

Optional. Presence indicates CMEK is enabled for this database.

.google.firestore.admin.v1.Database.CmekConfig cmek_config = 23 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Database.CmekConfig

The cmekConfig.

getCmekConfigOrBuilder()

public Database.CmekConfigOrBuilder getCmekConfigOrBuilder()

Optional. Presence indicates CMEK is enabled for this database.

.google.firestore.admin.v1.Database.CmekConfig cmek_config = 23 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Database.CmekConfigOrBuilder

getConcurrencyMode()

public Database.ConcurrencyMode getConcurrencyMode()

The concurrency control mode to use for this database.

.google.firestore.admin.v1.Database.ConcurrencyMode concurrency_mode = 15;

Returns
Type Description
Database.ConcurrencyMode

The concurrencyMode.

getConcurrencyModeValue()

public int getConcurrencyModeValue()

The concurrency control mode to use for this database.

.google.firestore.admin.v1.Database.ConcurrencyMode concurrency_mode = 15;

Returns
Type Description
int

The enum numeric value on the wire for concurrencyMode.

getCreateTime()

public Timestamp getCreateTime()

Output only. The timestamp at which this database was created. Databases created before 2016 do not populate create_time.

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

Returns
Type Description
Timestamp

The createTime.

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. The timestamp at which this database was created. Databases created before 2016 do not populate create_time.

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

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public Database getDefaultInstanceForType()
Returns
Type Description
Database

getDeleteProtectionState()

public Database.DeleteProtectionState getDeleteProtectionState()

State of delete protection for the database.

.google.firestore.admin.v1.Database.DeleteProtectionState delete_protection_state = 22;

Returns
Type Description
Database.DeleteProtectionState

The deleteProtectionState.

getDeleteProtectionStateValue()

public int getDeleteProtectionStateValue()

State of delete protection for the database.

.google.firestore.admin.v1.Database.DeleteProtectionState delete_protection_state = 22;

Returns
Type Description
int

The enum numeric value on the wire for deleteProtectionState.

getDeleteTime()

public Timestamp getDeleteTime()

Output only. The timestamp at which this database was deleted. Only set if the database has been deleted.

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

Returns
Type Description
Timestamp

The deleteTime.

getDeleteTimeOrBuilder()

public TimestampOrBuilder getDeleteTimeOrBuilder()

Output only. The timestamp at which this database was deleted. Only set if the database has been deleted.

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

Returns
Type Description
TimestampOrBuilder

getEarliestVersionTime()

public Timestamp getEarliestVersionTime()

Output only. The earliest timestamp at which older versions of the data can be read from the database. See [version_retention_period] above; this field is populated with now - version_retention_period.

This value is continuously updated, 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 = 18 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The earliestVersionTime.

getEarliestVersionTimeOrBuilder()

public TimestampOrBuilder getEarliestVersionTimeOrBuilder()

Output only. The earliest timestamp at which older versions of the data can be read from the database. See [version_retention_period] above; this field is populated with now - version_retention_period.

This value is continuously updated, 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 = 18 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getEtag()

public String getEtag()

This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.

string etag = 99;

Returns
Type Description
String

The etag.

getEtagBytes()

public ByteString getEtagBytes()

This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.

string etag = 99;

Returns
Type Description
ByteString

The bytes for etag.

getKeyPrefix()

public String getKeyPrefix()

Output only. The key_prefix for this database. This key_prefix is used, in combination with the project ID ("<key prefix>~<project id>") to construct the application ID that is returned from the Cloud Datastore APIs in Google App Engine first generation runtimes.

This value may be empty in which case the appid to use for URL-encoded keys is the project_id (eg: foo instead of v~foo).

string key_prefix = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The keyPrefix.

getKeyPrefixBytes()

public ByteString getKeyPrefixBytes()

Output only. The key_prefix for this database. This key_prefix is used, in combination with the project ID ("<key prefix>~<project id>") to construct the application ID that is returned from the Cloud Datastore APIs in Google App Engine first generation runtimes.

This value may be empty in which case the appid to use for URL-encoded keys is the project_id (eg: foo instead of v~foo).

string key_prefix = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for keyPrefix.

getLocationId()

public String getLocationId()

The location of the database. Available locations are listed at https://cloud.google.com/firestore/docs/locations.

string location_id = 9;

Returns
Type Description
String

The locationId.

getLocationIdBytes()

public ByteString getLocationIdBytes()

The location of the database. Available locations are listed at https://cloud.google.com/firestore/docs/locations.

string location_id = 9;

Returns
Type Description
ByteString

The bytes for locationId.

getName()

public String getName()

The resource name of the Database. Format: projects/{project}/databases/{database}

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

The resource name of the Database. Format: projects/{project}/databases/{database}

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

getParserForType()

public Parser<Database> getParserForType()
Returns
Type Description
Parser<Database>
Overrides

getPointInTimeRecoveryEnablement()

public Database.PointInTimeRecoveryEnablement getPointInTimeRecoveryEnablement()

Whether to enable the PITR feature on this database.

.google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement point_in_time_recovery_enablement = 21;

Returns
Type Description
Database.PointInTimeRecoveryEnablement

The pointInTimeRecoveryEnablement.

getPointInTimeRecoveryEnablementValue()

public int getPointInTimeRecoveryEnablementValue()

Whether to enable the PITR feature on this database.

.google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement point_in_time_recovery_enablement = 21;

Returns
Type Description
int

The enum numeric value on the wire for pointInTimeRecoveryEnablement.

getPreviousId()

public String getPreviousId()

Output only. The database resource's prior database ID. This field is only populated for deleted databases.

string previous_id = 25 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The previousId.

getPreviousIdBytes()

public ByteString getPreviousIdBytes()

Output only. The database resource's prior database ID. This field is only populated for deleted databases.

string previous_id = 25 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for previousId.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getSourceInfo()

public Database.SourceInfo getSourceInfo()

Output only. Information about the provenance of this database.

.google.firestore.admin.v1.Database.SourceInfo source_info = 26 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Database.SourceInfo

The sourceInfo.

getSourceInfoOrBuilder()

public Database.SourceInfoOrBuilder getSourceInfoOrBuilder()

Output only. Information about the provenance of this database.

.google.firestore.admin.v1.Database.SourceInfo source_info = 26 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Database.SourceInfoOrBuilder

getType()

public Database.DatabaseType getType()

The type of the database. See https://cloud.google.com/datastore/docs/firestore-or-datastore for information about how to choose.

.google.firestore.admin.v1.Database.DatabaseType type = 10;

Returns
Type Description
Database.DatabaseType

The type.

getTypeValue()

public int getTypeValue()

The type of the database. See https://cloud.google.com/datastore/docs/firestore-or-datastore for information about how to choose.

.google.firestore.admin.v1.Database.DatabaseType type = 10;

Returns
Type Description
int

The enum numeric value on the wire for type.

getUid()

public String getUid()

Output only. The system-generated UUID4 for this Database.

string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The uid.

getUidBytes()

public ByteString getUidBytes()

Output only. The system-generated UUID4 for this Database.

string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for uid.

getUpdateTime()

public Timestamp getUpdateTime()

Output only. The timestamp at which this database was most recently updated. Note this only includes updates to the database resource and not data contained by the database.

.google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. The timestamp at which this database was most recently updated. Note this only includes updates to the database resource and not data contained by the database.

.google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getVersionRetentionPeriod()

public Duration getVersionRetentionPeriod()

Output only. The period during which past versions of data are retained in the database.

Any read or query can specify a read_time within this window, and will read the state of the database at that time.

If the PITR feature is enabled, the retention period is 7 days. Otherwise, the retention period is 1 hour.

.google.protobuf.Duration version_retention_period = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Duration

The versionRetentionPeriod.

getVersionRetentionPeriodOrBuilder()

public DurationOrBuilder getVersionRetentionPeriodOrBuilder()

Output only. The period during which past versions of data are retained in the database.

Any read or query can specify a read_time within this window, and will read the state of the database at that time.

If the PITR feature is enabled, the retention period is 7 days. Otherwise, the retention period is 1 hour.

.google.protobuf.Duration version_retention_period = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
DurationOrBuilder

hasCmekConfig()

public boolean hasCmekConfig()

Optional. Presence indicates CMEK is enabled for this database.

.google.firestore.admin.v1.Database.CmekConfig cmek_config = 23 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the cmekConfig field is set.

hasCreateTime()

public boolean hasCreateTime()

Output only. The timestamp at which this database was created. Databases created before 2016 do not populate create_time.

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

Returns
Type Description
boolean

Whether the createTime field is set.

hasDeleteTime()

public boolean hasDeleteTime()

Output only. The timestamp at which this database was deleted. Only set if the database has been deleted.

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

Returns
Type Description
boolean

Whether the deleteTime field is set.

hasEarliestVersionTime()

public boolean hasEarliestVersionTime()

Output only. The earliest timestamp at which older versions of the data can be read from the database. See [version_retention_period] above; this field is populated with now - version_retention_period.

This value is continuously updated, 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 = 18 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the earliestVersionTime field is set.

hasSourceInfo()

public boolean hasSourceInfo()

Output only. Information about the provenance of this database.

.google.firestore.admin.v1.Database.SourceInfo source_info = 26 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the sourceInfo field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. The timestamp at which this database was most recently updated. Note this only includes updates to the database resource and not data contained by the database.

.google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the updateTime field is set.

hasVersionRetentionPeriod()

public boolean hasVersionRetentionPeriod()

Output only. The period during which past versions of data are retained in the database.

Any read or query can specify a read_time within this window, and will read the state of the database at that time.

If the PITR feature is enabled, the retention period is 7 days. Otherwise, the retention period is 1 hour.

.google.protobuf.Duration version_retention_period = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the versionRetentionPeriod field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public Database.Builder newBuilderForType()
Returns
Type Description
Database.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Database.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Database.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public Database.Builder toBuilder()
Returns
Type Description
Database.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException