Class RestoreDatabaseRequest.Builder (3.36.0)

public static final class RestoreDatabaseRequest.Builder extends GeneratedMessage.Builder<RestoreDatabaseRequest.Builder> implements RestoreDatabaseRequestOrBuilder

The request message for FirestoreAdmin.RestoreDatabase.

Protobuf type google.firestore.admin.v1.RestoreDatabaseRequest

Static Methods

getDescriptor()

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

Methods

build()

public RestoreDatabaseRequest build()
Returns
Type Description
RestoreDatabaseRequest

buildPartial()

public RestoreDatabaseRequest buildPartial()
Returns
Type Description
RestoreDatabaseRequest

clear()

public RestoreDatabaseRequest.Builder clear()
Returns
Type Description
RestoreDatabaseRequest.Builder
Overrides

clearBackup()

public RestoreDatabaseRequest.Builder clearBackup()

Required. Backup to restore from. Must be from the same project as the parent.

The restored database will be created in the same location as the source backup.

Format is: projects/{project_id}/locations/{location}/backups/{backup}

string backup = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
RestoreDatabaseRequest.Builder

This builder for chaining.

clearDatabaseId()

public RestoreDatabaseRequest.Builder clearDatabaseId()

Required. The ID to use for the database, which will become the final component of the database's resource name. This database ID must not be associated with an existing database.

This value should be 4-63 characters. Valid characters are /a-z-/ with first character a letter and the last a letter or a number. Must not be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/.

"(default)" database ID is also valid.

string database_id = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
RestoreDatabaseRequest.Builder

This builder for chaining.

clearEncryptionConfig()

public RestoreDatabaseRequest.Builder clearEncryptionConfig()

Optional. Encryption configuration for the restored database.

If this field is not specified, the restored database will use the same encryption configuration as the backup, namely use_source_encryption.

.google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
RestoreDatabaseRequest.Builder

clearParent()

public RestoreDatabaseRequest.Builder clearParent()

Required. The project to restore the database in. Format is projects/{project_id}.

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
RestoreDatabaseRequest.Builder

This builder for chaining.

clearTags()

public RestoreDatabaseRequest.Builder clearTags()
Returns
Type Description
RestoreDatabaseRequest.Builder

containsTags(String key)

public boolean containsTags(String key)

Optional. Immutable. Tags to be bound to the restored database.

The tags should be provided in the format of tagKeys/{tag_key_id} -> tagValues/{tag_value_id}.

map<string, string> tags = 10 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
boolean

getBackup()

public String getBackup()

Required. Backup to restore from. Must be from the same project as the parent.

The restored database will be created in the same location as the source backup.

Format is: projects/{project_id}/locations/{location}/backups/{backup}

string backup = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The backup.

getBackupBytes()

public ByteString getBackupBytes()

Required. Backup to restore from. Must be from the same project as the parent.

The restored database will be created in the same location as the source backup.

Format is: projects/{project_id}/locations/{location}/backups/{backup}

string backup = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for backup.

getDatabaseId()

public String getDatabaseId()

Required. The ID to use for the database, which will become the final component of the database's resource name. This database ID must not be associated with an existing database.

This value should be 4-63 characters. Valid characters are /a-z-/ with first character a letter and the last a letter or a number. Must not be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/.

"(default)" database ID is also valid.

string database_id = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The databaseId.

getDatabaseIdBytes()

public ByteString getDatabaseIdBytes()

Required. The ID to use for the database, which will become the final component of the database's resource name. This database ID must not be associated with an existing database.

This value should be 4-63 characters. Valid characters are /a-z-/ with first character a letter and the last a letter or a number. Must not be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/.

"(default)" database ID is also valid.

string database_id = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for databaseId.

getDefaultInstanceForType()

public RestoreDatabaseRequest getDefaultInstanceForType()
Returns
Type Description
RestoreDatabaseRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getEncryptionConfig()

public Database.EncryptionConfig getEncryptionConfig()

Optional. Encryption configuration for the restored database.

If this field is not specified, the restored database will use the same encryption configuration as the backup, namely use_source_encryption.

.google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Database.EncryptionConfig

The encryptionConfig.

getEncryptionConfigBuilder()

public Database.EncryptionConfig.Builder getEncryptionConfigBuilder()

Optional. Encryption configuration for the restored database.

If this field is not specified, the restored database will use the same encryption configuration as the backup, namely use_source_encryption.

.google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Database.EncryptionConfig.Builder

getEncryptionConfigOrBuilder()

public Database.EncryptionConfigOrBuilder getEncryptionConfigOrBuilder()

Optional. Encryption configuration for the restored database.

If this field is not specified, the restored database will use the same encryption configuration as the backup, namely use_source_encryption.

.google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Database.EncryptionConfigOrBuilder

getMutableTags() (deprecated)

public Map<String,String> getMutableTags()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

getParent()

public String getParent()

Required. The project to restore the database in. Format is projects/{project_id}.

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The parent.

getParentBytes()

public ByteString getParentBytes()

Required. The project to restore the database in. Format is projects/{project_id}.

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for parent.

getTags() (deprecated)

public Map<String,String> getTags()

Use #getTagsMap() instead.

Returns
Type Description
Map<String,String>

getTagsCount()

public int getTagsCount()

Optional. Immutable. Tags to be bound to the restored database.

The tags should be provided in the format of tagKeys/{tag_key_id} -> tagValues/{tag_value_id}.

map<string, string> tags = 10 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getTagsMap()

public Map<String,String> getTagsMap()

Optional. Immutable. Tags to be bound to the restored database.

The tags should be provided in the format of tagKeys/{tag_key_id} -> tagValues/{tag_value_id}.

map<string, string> tags = 10 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Map<String,String>

getTagsOrDefault(String key, String defaultValue)

public String getTagsOrDefault(String key, String defaultValue)

Optional. Immutable. Tags to be bound to the restored database.

The tags should be provided in the format of tagKeys/{tag_key_id} -> tagValues/{tag_value_id}.

map<string, string> tags = 10 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getTagsOrThrow(String key)

public String getTagsOrThrow(String key)

Optional. Immutable. Tags to be bound to the restored database.

The tags should be provided in the format of tagKeys/{tag_key_id} -> tagValues/{tag_value_id}.

map<string, string> tags = 10 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
String

hasEncryptionConfig()

public boolean hasEncryptionConfig()

Optional. Encryption configuration for the restored database.

If this field is not specified, the restored database will use the same encryption configuration as the backup, namely use_source_encryption.

.google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the encryptionConfig field is set.

internalGetFieldAccessorTable()

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

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessage.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessage.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeEncryptionConfig(Database.EncryptionConfig value)

public RestoreDatabaseRequest.Builder mergeEncryptionConfig(Database.EncryptionConfig value)

Optional. Encryption configuration for the restored database.

If this field is not specified, the restored database will use the same encryption configuration as the backup, namely use_source_encryption.

.google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Database.EncryptionConfig
Returns
Type Description
RestoreDatabaseRequest.Builder

mergeFrom(RestoreDatabaseRequest other)

public RestoreDatabaseRequest.Builder mergeFrom(RestoreDatabaseRequest other)
Parameter
Name Description
other RestoreDatabaseRequest
Returns
Type Description
RestoreDatabaseRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public RestoreDatabaseRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
RestoreDatabaseRequest.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public RestoreDatabaseRequest.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
RestoreDatabaseRequest.Builder
Overrides

putAllTags(Map<String,String> values)

public RestoreDatabaseRequest.Builder putAllTags(Map<String,String> values)

Optional. Immutable. Tags to be bound to the restored database.

The tags should be provided in the format of tagKeys/{tag_key_id} -> tagValues/{tag_value_id}.

map<string, string> tags = 10 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Map<String,String>
Returns
Type Description
RestoreDatabaseRequest.Builder

putTags(String key, String value)

public RestoreDatabaseRequest.Builder putTags(String key, String value)

Optional. Immutable. Tags to be bound to the restored database.

The tags should be provided in the format of tagKeys/{tag_key_id} -> tagValues/{tag_value_id}.

map<string, string> tags = 10 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
value String
Returns
Type Description
RestoreDatabaseRequest.Builder

removeTags(String key)

public RestoreDatabaseRequest.Builder removeTags(String key)

Optional. Immutable. Tags to be bound to the restored database.

The tags should be provided in the format of tagKeys/{tag_key_id} -> tagValues/{tag_value_id}.

map<string, string> tags = 10 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
RestoreDatabaseRequest.Builder

setBackup(String value)

public RestoreDatabaseRequest.Builder setBackup(String value)

Required. Backup to restore from. Must be from the same project as the parent.

The restored database will be created in the same location as the source backup.

Format is: projects/{project_id}/locations/{location}/backups/{backup}

string backup = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The backup to set.

Returns
Type Description
RestoreDatabaseRequest.Builder

This builder for chaining.

setBackupBytes(ByteString value)

public RestoreDatabaseRequest.Builder setBackupBytes(ByteString value)

Required. Backup to restore from. Must be from the same project as the parent.

The restored database will be created in the same location as the source backup.

Format is: projects/{project_id}/locations/{location}/backups/{backup}

string backup = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for backup to set.

Returns
Type Description
RestoreDatabaseRequest.Builder

This builder for chaining.

setDatabaseId(String value)

public RestoreDatabaseRequest.Builder setDatabaseId(String value)

Required. The ID to use for the database, which will become the final component of the database's resource name. This database ID must not be associated with an existing database.

This value should be 4-63 characters. Valid characters are /a-z-/ with first character a letter and the last a letter or a number. Must not be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/.

"(default)" database ID is also valid.

string database_id = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The databaseId to set.

Returns
Type Description
RestoreDatabaseRequest.Builder

This builder for chaining.

setDatabaseIdBytes(ByteString value)

public RestoreDatabaseRequest.Builder setDatabaseIdBytes(ByteString value)

Required. The ID to use for the database, which will become the final component of the database's resource name. This database ID must not be associated with an existing database.

This value should be 4-63 characters. Valid characters are /a-z-/ with first character a letter and the last a letter or a number. Must not be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/.

"(default)" database ID is also valid.

string database_id = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for databaseId to set.

Returns
Type Description
RestoreDatabaseRequest.Builder

This builder for chaining.

setEncryptionConfig(Database.EncryptionConfig value)

public RestoreDatabaseRequest.Builder setEncryptionConfig(Database.EncryptionConfig value)

Optional. Encryption configuration for the restored database.

If this field is not specified, the restored database will use the same encryption configuration as the backup, namely use_source_encryption.

.google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Database.EncryptionConfig
Returns
Type Description
RestoreDatabaseRequest.Builder

setEncryptionConfig(Database.EncryptionConfig.Builder builderForValue)

public RestoreDatabaseRequest.Builder setEncryptionConfig(Database.EncryptionConfig.Builder builderForValue)

Optional. Encryption configuration for the restored database.

If this field is not specified, the restored database will use the same encryption configuration as the backup, namely use_source_encryption.

.google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue Database.EncryptionConfig.Builder
Returns
Type Description
RestoreDatabaseRequest.Builder

setParent(String value)

public RestoreDatabaseRequest.Builder setParent(String value)

Required. The project to restore the database in. Format is projects/{project_id}.

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The parent to set.

Returns
Type Description
RestoreDatabaseRequest.Builder

This builder for chaining.

setParentBytes(ByteString value)

public RestoreDatabaseRequest.Builder setParentBytes(ByteString value)

Required. The project to restore the database in. Format is projects/{project_id}.

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for parent to set.

Returns
Type Description
RestoreDatabaseRequest.Builder

This builder for chaining.