Class RestoreDatabaseRequest.Builder (3.20.0)

public static final class RestoreDatabaseRequest.Builder extends GeneratedMessageV3.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public RestoreDatabaseRequest build()
Returns
TypeDescription
RestoreDatabaseRequest

buildPartial()

public RestoreDatabaseRequest buildPartial()
Returns
TypeDescription
RestoreDatabaseRequest

clear()

public RestoreDatabaseRequest.Builder clear()
Returns
TypeDescription
RestoreDatabaseRequest.Builder
Overrides

clearBackup()

public RestoreDatabaseRequest.Builder clearBackup()

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

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

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

Returns
TypeDescription
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
TypeDescription
RestoreDatabaseRequest.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

public RestoreDatabaseRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
RestoreDatabaseRequest.Builder
Overrides

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

This builder for chaining.

clone()

public RestoreDatabaseRequest.Builder clone()
Returns
TypeDescription
RestoreDatabaseRequest.Builder
Overrides

getBackup()

public String getBackup()

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

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

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

Returns
TypeDescription
String

The backup.

getBackupBytes()

public ByteString getBackupBytes()

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

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

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

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

The bytes for databaseId.

getDefaultInstanceForType()

public RestoreDatabaseRequest getDefaultInstanceForType()
Returns
TypeDescription
RestoreDatabaseRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

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

The bytes for parent.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(RestoreDatabaseRequest other)

public RestoreDatabaseRequest.Builder mergeFrom(RestoreDatabaseRequest other)
Parameter
NameDescription
otherRestoreDatabaseRequest
Returns
TypeDescription
RestoreDatabaseRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public RestoreDatabaseRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
RestoreDatabaseRequest.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public RestoreDatabaseRequest.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
RestoreDatabaseRequest.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setBackup(String value)

public RestoreDatabaseRequest.Builder setBackup(String value)

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

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

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

Parameter
NameDescription
valueString

The backup to set.

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

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

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

Parameter
NameDescription
valueByteString

The bytes for backup to set.

Returns
TypeDescription
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
NameDescription
valueString

The databaseId to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for databaseId to set.

Returns
TypeDescription
RestoreDatabaseRequest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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
NameDescription
valueString

The parent to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for parent to set.

Returns
TypeDescription
RestoreDatabaseRequest.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public RestoreDatabaseRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
RestoreDatabaseRequest.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final RestoreDatabaseRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
RestoreDatabaseRequest.Builder
Overrides