Class RestoreDatabaseRequest.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderType>
-
- com.google.protobuf.GeneratedMessageV3.Builder<RestoreDatabaseRequest.Builder>
-
- com.google.spanner.admin.database.v1.RestoreDatabaseRequest.Builder
-
- All Implemented Interfaces:
com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,RestoreDatabaseRequestOrBuilder
,Cloneable
- Enclosing class:
- RestoreDatabaseRequest
public static final class RestoreDatabaseRequest.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<RestoreDatabaseRequest.Builder> implements RestoreDatabaseRequestOrBuilder
The request for [RestoreDatabase][google.spanner.admin.database.v1.DatabaseAdmin.RestoreDatabase].
Protobuf typegoogle.spanner.admin.database.v1.RestoreDatabaseRequest
-
-
Method Summary
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<RestoreDatabaseRequest.Builder>
-
clear
public RestoreDatabaseRequest.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<RestoreDatabaseRequest.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<RestoreDatabaseRequest.Builder>
-
getDefaultInstanceForType
public RestoreDatabaseRequest getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public RestoreDatabaseRequest build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public RestoreDatabaseRequest buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public RestoreDatabaseRequest.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<RestoreDatabaseRequest.Builder>
-
setField
public RestoreDatabaseRequest.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<RestoreDatabaseRequest.Builder>
-
clearField
public RestoreDatabaseRequest.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<RestoreDatabaseRequest.Builder>
-
clearOneof
public RestoreDatabaseRequest.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<RestoreDatabaseRequest.Builder>
-
setRepeatedField
public RestoreDatabaseRequest.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<RestoreDatabaseRequest.Builder>
-
addRepeatedField
public RestoreDatabaseRequest.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<RestoreDatabaseRequest.Builder>
-
mergeFrom
public RestoreDatabaseRequest.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<RestoreDatabaseRequest.Builder>
-
mergeFrom
public RestoreDatabaseRequest.Builder mergeFrom(RestoreDatabaseRequest other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<RestoreDatabaseRequest.Builder>
-
mergeFrom
public RestoreDatabaseRequest.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<RestoreDatabaseRequest.Builder>
- Throws:
IOException
-
getSourceCase
public RestoreDatabaseRequest.SourceCase getSourceCase()
- Specified by:
getSourceCase
in interfaceRestoreDatabaseRequestOrBuilder
-
clearSource
public RestoreDatabaseRequest.Builder clearSource()
-
getParent
public String getParent()
Required. The name of the instance in which to create the restored database. This instance must be in the same project and have the same instance configuration as the instance containing the source backup. Values are of the form `projects/<project>/instances/<instance>`.
string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
- Specified by:
getParent
in interfaceRestoreDatabaseRequestOrBuilder
- Returns:
- The parent.
-
getParentBytes
public com.google.protobuf.ByteString getParentBytes()
Required. The name of the instance in which to create the restored database. This instance must be in the same project and have the same instance configuration as the instance containing the source backup. Values are of the form `projects/<project>/instances/<instance>`.
string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
- Specified by:
getParentBytes
in interfaceRestoreDatabaseRequestOrBuilder
- Returns:
- The bytes for parent.
-
setParent
public RestoreDatabaseRequest.Builder setParent(String value)
Required. The name of the instance in which to create the restored database. This instance must be in the same project and have the same instance configuration as the instance containing the source backup. Values are of the form `projects/<project>/instances/<instance>`.
string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
- Parameters:
value
- The parent to set.- Returns:
- This builder for chaining.
-
clearParent
public RestoreDatabaseRequest.Builder clearParent()
Required. The name of the instance in which to create the restored database. This instance must be in the same project and have the same instance configuration as the instance containing the source backup. Values are of the form `projects/<project>/instances/<instance>`.
string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
- Returns:
- This builder for chaining.
-
setParentBytes
public RestoreDatabaseRequest.Builder setParentBytes(com.google.protobuf.ByteString value)
Required. The name of the instance in which to create the restored database. This instance must be in the same project and have the same instance configuration as the instance containing the source backup. Values are of the form `projects/<project>/instances/<instance>`.
string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
- Parameters:
value
- The bytes for parent to set.- Returns:
- This builder for chaining.
-
getDatabaseId
public String getDatabaseId()
Required. The id of the database to create and restore to. This database must not already exist. The `database_id` appended to `parent` forms the full database name of the form `projects/<project>/instances/<instance>/databases/<database_id>`.
string database_id = 2 [(.google.api.field_behavior) = REQUIRED];
- Specified by:
getDatabaseId
in interfaceRestoreDatabaseRequestOrBuilder
- Returns:
- The databaseId.
-
getDatabaseIdBytes
public com.google.protobuf.ByteString getDatabaseIdBytes()
Required. The id of the database to create and restore to. This database must not already exist. The `database_id` appended to `parent` forms the full database name of the form `projects/<project>/instances/<instance>/databases/<database_id>`.
string database_id = 2 [(.google.api.field_behavior) = REQUIRED];
- Specified by:
getDatabaseIdBytes
in interfaceRestoreDatabaseRequestOrBuilder
- Returns:
- The bytes for databaseId.
-
setDatabaseId
public RestoreDatabaseRequest.Builder setDatabaseId(String value)
Required. The id of the database to create and restore to. This database must not already exist. The `database_id` appended to `parent` forms the full database name of the form `projects/<project>/instances/<instance>/databases/<database_id>`.
string database_id = 2 [(.google.api.field_behavior) = REQUIRED];
- Parameters:
value
- The databaseId to set.- Returns:
- This builder for chaining.
-
clearDatabaseId
public RestoreDatabaseRequest.Builder clearDatabaseId()
Required. The id of the database to create and restore to. This database must not already exist. The `database_id` appended to `parent` forms the full database name of the form `projects/<project>/instances/<instance>/databases/<database_id>`.
string database_id = 2 [(.google.api.field_behavior) = REQUIRED];
- Returns:
- This builder for chaining.
-
setDatabaseIdBytes
public RestoreDatabaseRequest.Builder setDatabaseIdBytes(com.google.protobuf.ByteString value)
Required. The id of the database to create and restore to. This database must not already exist. The `database_id` appended to `parent` forms the full database name of the form `projects/<project>/instances/<instance>/databases/<database_id>`.
string database_id = 2 [(.google.api.field_behavior) = REQUIRED];
- Parameters:
value
- The bytes for databaseId to set.- Returns:
- This builder for chaining.
-
hasBackup
public boolean hasBackup()
Name of the backup from which to restore. Values are of the form `projects/<project>/instances/<instance>/backups/<backup>`.
string backup = 3 [(.google.api.resource_reference) = { ... }
- Specified by:
hasBackup
in interfaceRestoreDatabaseRequestOrBuilder
- Returns:
- Whether the backup field is set.
-
getBackup
public String getBackup()
Name of the backup from which to restore. Values are of the form `projects/<project>/instances/<instance>/backups/<backup>`.
string backup = 3 [(.google.api.resource_reference) = { ... }
- Specified by:
getBackup
in interfaceRestoreDatabaseRequestOrBuilder
- Returns:
- The backup.
-
getBackupBytes
public com.google.protobuf.ByteString getBackupBytes()
Name of the backup from which to restore. Values are of the form `projects/<project>/instances/<instance>/backups/<backup>`.
string backup = 3 [(.google.api.resource_reference) = { ... }
- Specified by:
getBackupBytes
in interfaceRestoreDatabaseRequestOrBuilder
- Returns:
- The bytes for backup.
-
setBackup
public RestoreDatabaseRequest.Builder setBackup(String value)
Name of the backup from which to restore. Values are of the form `projects/<project>/instances/<instance>/backups/<backup>`.
string backup = 3 [(.google.api.resource_reference) = { ... }
- Parameters:
value
- The backup to set.- Returns:
- This builder for chaining.
-
clearBackup
public RestoreDatabaseRequest.Builder clearBackup()
Name of the backup from which to restore. Values are of the form `projects/<project>/instances/<instance>/backups/<backup>`.
string backup = 3 [(.google.api.resource_reference) = { ... }
- Returns:
- This builder for chaining.
-
setBackupBytes
public RestoreDatabaseRequest.Builder setBackupBytes(com.google.protobuf.ByteString value)
Name of the backup from which to restore. Values are of the form `projects/<project>/instances/<instance>/backups/<backup>`.
string backup = 3 [(.google.api.resource_reference) = { ... }
- Parameters:
value
- The bytes for backup to set.- Returns:
- This builder for chaining.
-
hasEncryptionConfig
public boolean hasEncryptionConfig()
Optional. An encryption configuration describing the encryption type and key resources in Cloud KMS used to encrypt/decrypt the database to restore to. If this field is not specified, the restored database will use the same encryption configuration as the backup by default, namely [encryption_type][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.encryption_type] = `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
hasEncryptionConfig
in interfaceRestoreDatabaseRequestOrBuilder
- Returns:
- Whether the encryptionConfig field is set.
-
getEncryptionConfig
public RestoreDatabaseEncryptionConfig getEncryptionConfig()
Optional. An encryption configuration describing the encryption type and key resources in Cloud KMS used to encrypt/decrypt the database to restore to. If this field is not specified, the restored database will use the same encryption configuration as the backup by default, namely [encryption_type][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.encryption_type] = `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getEncryptionConfig
in interfaceRestoreDatabaseRequestOrBuilder
- Returns:
- The encryptionConfig.
-
setEncryptionConfig
public RestoreDatabaseRequest.Builder setEncryptionConfig(RestoreDatabaseEncryptionConfig value)
Optional. An encryption configuration describing the encryption type and key resources in Cloud KMS used to encrypt/decrypt the database to restore to. If this field is not specified, the restored database will use the same encryption configuration as the backup by default, namely [encryption_type][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.encryption_type] = `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
-
setEncryptionConfig
public RestoreDatabaseRequest.Builder setEncryptionConfig(RestoreDatabaseEncryptionConfig.Builder builderForValue)
Optional. An encryption configuration describing the encryption type and key resources in Cloud KMS used to encrypt/decrypt the database to restore to. If this field is not specified, the restored database will use the same encryption configuration as the backup by default, namely [encryption_type][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.encryption_type] = `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
-
mergeEncryptionConfig
public RestoreDatabaseRequest.Builder mergeEncryptionConfig(RestoreDatabaseEncryptionConfig value)
Optional. An encryption configuration describing the encryption type and key resources in Cloud KMS used to encrypt/decrypt the database to restore to. If this field is not specified, the restored database will use the same encryption configuration as the backup by default, namely [encryption_type][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.encryption_type] = `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
-
clearEncryptionConfig
public RestoreDatabaseRequest.Builder clearEncryptionConfig()
Optional. An encryption configuration describing the encryption type and key resources in Cloud KMS used to encrypt/decrypt the database to restore to. If this field is not specified, the restored database will use the same encryption configuration as the backup by default, namely [encryption_type][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.encryption_type] = `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
-
getEncryptionConfigBuilder
public RestoreDatabaseEncryptionConfig.Builder getEncryptionConfigBuilder()
Optional. An encryption configuration describing the encryption type and key resources in Cloud KMS used to encrypt/decrypt the database to restore to. If this field is not specified, the restored database will use the same encryption configuration as the backup by default, namely [encryption_type][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.encryption_type] = `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
-
getEncryptionConfigOrBuilder
public RestoreDatabaseEncryptionConfigOrBuilder getEncryptionConfigOrBuilder()
Optional. An encryption configuration describing the encryption type and key resources in Cloud KMS used to encrypt/decrypt the database to restore to. If this field is not specified, the restored database will use the same encryption configuration as the backup by default, namely [encryption_type][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.encryption_type] = `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getEncryptionConfigOrBuilder
in interfaceRestoreDatabaseRequestOrBuilder
-
setUnknownFields
public final RestoreDatabaseRequest.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<RestoreDatabaseRequest.Builder>
-
mergeUnknownFields
public final RestoreDatabaseRequest.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<RestoreDatabaseRequest.Builder>
-
-