Class Database.Builder (3.16.3)

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

A Cloud Firestore Database.

Protobuf type google.firestore.admin.v1.Database

Implements

DatabaseOrBuilder

Static Methods

getDescriptor()

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

Methods

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

clearAppEngineIntegrationMode()

public Database.Builder clearAppEngineIntegrationMode()

The App Engine integration mode to use for this database.

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

Returns
TypeDescription
Database.Builder

This builder for chaining.

clearConcurrencyMode()

public Database.Builder clearConcurrencyMode()

The concurrency control mode to use for this database.

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

Returns
TypeDescription
Database.Builder

This builder for chaining.

clearCreateTime()

public Database.Builder clearCreateTime()

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

clearDeleteProtectionState()

public Database.Builder clearDeleteProtectionState()

State of delete protection for the database.

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

Returns
TypeDescription
Database.Builder

This builder for chaining.

clearEarliestVersionTime()

public Database.Builder clearEarliestVersionTime()

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

clearEtag()

public Database.Builder clearEtag()

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

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearKeyPrefix()

public Database.Builder clearKeyPrefix()

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

This builder for chaining.

clearLocationId()

public Database.Builder clearLocationId()

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

string location_id = 9;

Returns
TypeDescription
Database.Builder

This builder for chaining.

clearName()

public Database.Builder clearName()

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

string name = 1;

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

clearPointInTimeRecoveryEnablement()

public Database.Builder clearPointInTimeRecoveryEnablement()

Whether to enable the PITR feature on this database.

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

Returns
TypeDescription
Database.Builder

This builder for chaining.

clearType()

public Database.Builder clearType()

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

This builder for chaining.

clearUid()

public Database.Builder clearUid()

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

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

Returns
TypeDescription
Database.Builder

This builder for chaining.

clearUpdateTime()

public Database.Builder clearUpdateTime()

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

clearVersionRetentionPeriod()

public Database.Builder clearVersionRetentionPeriod()

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

clone()

public Database.Builder clone()
Returns
TypeDescription
Database.Builder
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
TypeDescription
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
TypeDescription
int

The enum numeric value on the wire for appEngineIntegrationMode.

getConcurrencyMode()

public Database.ConcurrencyMode getConcurrencyMode()

The concurrency control mode to use for this database.

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

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

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
TypeDescription
TimestampOrBuilder

getDefaultInstanceForType()

public Database getDefaultInstanceForType()
Returns
TypeDescription
Database

getDeleteProtectionState()

public Database.DeleteProtectionState getDeleteProtectionState()

State of delete protection for the database.

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

Returns
TypeDescription
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
TypeDescription
int

The enum numeric value on the wire for deleteProtectionState.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

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
TypeDescription
Timestamp

The earliestVersionTime.

getEarliestVersionTimeBuilder()

public Timestamp.Builder getEarliestVersionTimeBuilder()

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

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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for locationId.

getName()

public String getName()

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

string name = 1;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

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

string name = 1;

Returns
TypeDescription
ByteString

The bytes for name.

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
TypeDescription
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
TypeDescription
int

The enum numeric value on the wire for pointInTimeRecoveryEnablement.

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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
Timestamp

The updateTime.

getUpdateTimeBuilder()

public Timestamp.Builder getUpdateTimeBuilder()

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

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
TypeDescription
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
TypeDescription
Duration

The versionRetentionPeriod.

getVersionRetentionPeriodBuilder()

public Duration.Builder getVersionRetentionPeriodBuilder()

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

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
TypeDescription
DurationOrBuilder

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
TypeDescription
boolean

Whether the createTime 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
TypeDescription
boolean

Whether the earliestVersionTime 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
TypeDescription
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
TypeDescription
boolean

Whether the versionRetentionPeriod 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. 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];

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Database.Builder

mergeEarliestVersionTime(Timestamp value)

public Database.Builder mergeEarliestVersionTime(Timestamp value)

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

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Database.Builder

mergeFrom(Database other)

public Database.Builder mergeFrom(Database other)
Parameter
NameDescription
otherDatabase
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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

mergeUpdateTime(Timestamp value)

public Database.Builder mergeUpdateTime(Timestamp value)

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

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Database.Builder

mergeVersionRetentionPeriod(Duration value)

public Database.Builder mergeVersionRetentionPeriod(Duration value)

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

Parameter
NameDescription
valueDuration
Returns
TypeDescription
Database.Builder

setAppEngineIntegrationMode(Database.AppEngineIntegrationMode value)

public Database.Builder setAppEngineIntegrationMode(Database.AppEngineIntegrationMode value)

The App Engine integration mode to use for this database.

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

Parameter
NameDescription
valueDatabase.AppEngineIntegrationMode

The appEngineIntegrationMode to set.

Returns
TypeDescription
Database.Builder

This builder for chaining.

setAppEngineIntegrationModeValue(int value)

public Database.Builder setAppEngineIntegrationModeValue(int value)

The App Engine integration mode to use for this database.

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

Parameter
NameDescription
valueint

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

Returns
TypeDescription
Database.Builder

This builder for chaining.

setConcurrencyMode(Database.ConcurrencyMode value)

public Database.Builder setConcurrencyMode(Database.ConcurrencyMode value)

The concurrency control mode to use for this database.

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

Parameter
NameDescription
valueDatabase.ConcurrencyMode

The concurrencyMode to set.

Returns
TypeDescription
Database.Builder

This builder for chaining.

setConcurrencyModeValue(int value)

public Database.Builder setConcurrencyModeValue(int value)

The concurrency control mode to use for this database.

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

Parameter
NameDescription
valueint

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

Returns
TypeDescription
Database.Builder

This builder for chaining.

setCreateTime(Timestamp value)

public Database.Builder setCreateTime(Timestamp value)

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

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Database.Builder

setCreateTime(Timestamp.Builder builderForValue)

public Database.Builder setCreateTime(Timestamp.Builder builderForValue)

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

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
Database.Builder

setDeleteProtectionState(Database.DeleteProtectionState value)

public Database.Builder setDeleteProtectionState(Database.DeleteProtectionState value)

State of delete protection for the database.

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

Parameter
NameDescription
valueDatabase.DeleteProtectionState

The deleteProtectionState to set.

Returns
TypeDescription
Database.Builder

This builder for chaining.

setDeleteProtectionStateValue(int value)

public Database.Builder setDeleteProtectionStateValue(int value)

State of delete protection for the database.

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

Parameter
NameDescription
valueint

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

Returns
TypeDescription
Database.Builder

This builder for chaining.

setEarliestVersionTime(Timestamp value)

public Database.Builder setEarliestVersionTime(Timestamp value)

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

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Database.Builder

setEarliestVersionTime(Timestamp.Builder builderForValue)

public Database.Builder setEarliestVersionTime(Timestamp.Builder builderForValue)

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

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
Database.Builder

setEtag(String value)

public Database.Builder setEtag(String value)

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;

Parameter
NameDescription
valueString

The etag to set.

Returns
TypeDescription
Database.Builder

This builder for chaining.

setEtagBytes(ByteString value)

public Database.Builder setEtagBytes(ByteString value)

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;

Parameter
NameDescription
valueByteString

The bytes for etag to set.

Returns
TypeDescription
Database.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setKeyPrefix(String value)

public Database.Builder setKeyPrefix(String value)

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

Parameter
NameDescription
valueString

The keyPrefix to set.

Returns
TypeDescription
Database.Builder

This builder for chaining.

setKeyPrefixBytes(ByteString value)

public Database.Builder setKeyPrefixBytes(ByteString value)

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

Parameter
NameDescription
valueByteString

The bytes for keyPrefix to set.

Returns
TypeDescription
Database.Builder

This builder for chaining.

setLocationId(String value)

public Database.Builder setLocationId(String value)

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

string location_id = 9;

Parameter
NameDescription
valueString

The locationId to set.

Returns
TypeDescription
Database.Builder

This builder for chaining.

setLocationIdBytes(ByteString value)

public Database.Builder setLocationIdBytes(ByteString value)

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

string location_id = 9;

Parameter
NameDescription
valueByteString

The bytes for locationId to set.

Returns
TypeDescription
Database.Builder

This builder for chaining.

setName(String value)

public Database.Builder setName(String value)

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

string name = 1;

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
Database.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Database.Builder setNameBytes(ByteString value)

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

string name = 1;

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
Database.Builder

This builder for chaining.

setPointInTimeRecoveryEnablement(Database.PointInTimeRecoveryEnablement value)

public Database.Builder setPointInTimeRecoveryEnablement(Database.PointInTimeRecoveryEnablement value)

Whether to enable the PITR feature on this database.

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

Parameter
NameDescription
valueDatabase.PointInTimeRecoveryEnablement

The pointInTimeRecoveryEnablement to set.

Returns
TypeDescription
Database.Builder

This builder for chaining.

setPointInTimeRecoveryEnablementValue(int value)

public Database.Builder setPointInTimeRecoveryEnablementValue(int value)

Whether to enable the PITR feature on this database.

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

Parameter
NameDescription
valueint

The enum numeric value on the wire for pointInTimeRecoveryEnablement 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

setType(Database.DatabaseType value)

public Database.Builder setType(Database.DatabaseType value)

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;

Parameter
NameDescription
valueDatabase.DatabaseType

The type to set.

Returns
TypeDescription
Database.Builder

This builder for chaining.

setTypeValue(int value)

public Database.Builder setTypeValue(int value)

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;

Parameter
NameDescription
valueint

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

Returns
TypeDescription
Database.Builder

This builder for chaining.

setUid(String value)

public Database.Builder setUid(String value)

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

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

Parameter
NameDescription
valueString

The uid to set.

Returns
TypeDescription
Database.Builder

This builder for chaining.

setUidBytes(ByteString value)

public Database.Builder setUidBytes(ByteString value)

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

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

Parameter
NameDescription
valueByteString

The bytes for uid 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

setUpdateTime(Timestamp value)

public Database.Builder setUpdateTime(Timestamp value)

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

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Database.Builder

setUpdateTime(Timestamp.Builder builderForValue)

public Database.Builder setUpdateTime(Timestamp.Builder builderForValue)

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

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
Database.Builder

setVersionRetentionPeriod(Duration value)

public Database.Builder setVersionRetentionPeriod(Duration value)

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

Parameter
NameDescription
valueDuration
Returns
TypeDescription
Database.Builder

setVersionRetentionPeriod(Duration.Builder builderForValue)

public Database.Builder setVersionRetentionPeriod(Duration.Builder builderForValue)

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

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
Database.Builder